reference: SetLayout example

git-svn-id: svn://ultimatepp.org/upp/trunk@3453 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-05-24 15:59:13 +00:00
parent c78825527c
commit 847790ece7
4 changed files with 58 additions and 0 deletions

View 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();
}