mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
changed svn layout
git-svn-id: svn://ultimatepp.org/upp/trunk@281 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
commit
d2b54f7989
2872 changed files with 670392 additions and 0 deletions
11
reference/Splitter/Splitter.upp
Normal file
11
reference/Splitter/Splitter.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
description "Splitting window into resizable parts";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
38
reference/Splitter/main.cpp
Normal file
38
reference/Splitter/main.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct App : public TopWindow
|
||||
{
|
||||
Button a, b, c, d;
|
||||
Splitter v, h;
|
||||
|
||||
void Toggle();
|
||||
|
||||
App();
|
||||
};
|
||||
|
||||
void App::Toggle()
|
||||
{
|
||||
h.Zoom(h.GetZoom() == 1 ? -1 : 1);
|
||||
}
|
||||
|
||||
App::App()
|
||||
{
|
||||
a.SetLabel("A");
|
||||
b.SetLabel("B");
|
||||
c.SetLabel("C");
|
||||
d.SetLabel("Toggle!");
|
||||
h.Horz(a, v);
|
||||
v << b << c << d;
|
||||
v.Vert();
|
||||
Add(h.SizePos());
|
||||
Sizeable().Zoomable();
|
||||
d <<= callback(this, &App::Toggle);
|
||||
}
|
||||
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
App().Run();
|
||||
}
|
||||
Loading…
Reference in a new issue