mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
reference: SetLayout example
git-svn-id: svn://ultimatepp.org/upp/trunk@3453 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c78825527c
commit
847790ece7
4 changed files with 58 additions and 0 deletions
28
reference/SetLayout/SetLayout.cpp
Normal file
28
reference/SetLayout/SetLayout.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <SetLayout/SetLayout.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
class MyApp : public WithLayout1<TopWindow> {
|
||||
public:
|
||||
void Layout1() { SetLayout_Layout1(*this); }
|
||||
void Layout2() { SetLayout_Layout2(*this); }
|
||||
|
||||
typedef MyApp CLASSNAME;
|
||||
|
||||
MyApp()
|
||||
{
|
||||
CtrlLayout(*this, "Window title");
|
||||
layout1 <<= THISBACK(Layout1);
|
||||
layout2 <<= THISBACK(Layout2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue