ultimatepp/upptst/TestChStyle/main.cpp
cxl 7a9686af98 .upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@13755 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2019-12-12 13:07:49 +00:00

55 lines
996 B
C++

#include "TestChStyle.h"
void Dl(DropList& dl)
{
dl.Add("Case1");
dl.Add("Case2");
dl <<= "Case1";
}
void Dc(WithDropChoice<EditString>& dc)
{
dc.AddList("Case1");
dc.AddList("Case2");
dc <<= "Case1";
}
TestChStyle::TestChStyle()
{
CtrlLayout(*this, "Window title");
normal.NullText("Normal");
readonly <<= "Read only";
disabled <<= "Disabled";
disabled.Disable();
Dl(dl_normal);
Dl(dl_readonly);
Dl(dl_disabled);
dl_disabled.Disable();
Dc(dc_normal);
Dc(dc_readonly);
Dc(dc_disabled);
dc_disabled.Disable();
#ifdef CPP_11
standard << [] { Ctrl::SetSkin(ChStdSkin); };
classic << [] { Ctrl::SetSkin(ChClassicSkin); };
host << [] { Ctrl::SetSkin(ChHostSkin); };
#endif
for(int i = 0; i < 100; i++)
tab.Add("Tab " + AsString(i));
AddFrame(bar);
bar.Set([](Bar& bar) { bar.Add(CtrlImg::Diskette(), [] {}).Tip("This is test"); });
}
GUI_APP_MAIN
{
Ctrl::SetDarkThemeEnabled();
TestChStyle().Run();
}