*GridCtrlTest: Few small fixes..

git-svn-id: svn://ultimatepp.org/upp/trunk@2673 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
unodgs 2010-09-08 20:04:35 +00:00
parent f3a7082912
commit cf70be8efe
8 changed files with 57 additions and 63 deletions

View file

@ -18,14 +18,6 @@ App::App()
{
CtrlLayout(*this, "Grid Test Panel");
testMain.Init();
testExcelGrid.Init();
testPropertyGrid.Init();
testFocusLost.Init();
testArrayCtrl.Init();
panel.Init(testMain.grid);
tab.Add(testMain.SizePos(), "Main");
tab.Add(testExcelGrid.SizePos(), "Excel grid");
tab.Add(testPropertyGrid.SizePos(), "Property grid");
@ -33,7 +25,6 @@ App::App()
tab.Add(testFocusLost.SizePos(), "Focus lost");
tab <<= THISBACK(TabChange);
resort <<= THISBACK(Resort);
toxml <<= THISBACK(ToXml);
fromxml <<= THISBACK(FromXml);
@ -41,6 +32,17 @@ App::App()
Sizeable().Zoomable();//.BackPaint(!false);
}
void App::Init()
{
testMain.Init();
testExcelGrid.Init();
testPropertyGrid.Init();
testFocusLost.Init();
testArrayCtrl.Init();
panel.Init(testMain.grid);
}
void App::TabChange()
{
int t = tab.Get();
@ -60,6 +62,8 @@ void App::Serialize(Stream &s)
{
SerializePlacement(s);
s % panel.level;
if(s.IsLoading())
dlev = ~panel.level;
}
void App::Resort()
@ -83,9 +87,10 @@ void App::FromXml()
GUI_APP_MAIN
{
SetLanguage(LNGC_('E','N','E','N', CHARSET_UTF8));
App app;
LoadFromFile(app);
SetLanguage(LNGC_('E','N','E','N', CHARSET_UTF8));
app.Init();
app.Run();
StoreToFile(app);
}