SysInfo_demo_gui: Updated namespaces and time callbacks

git-svn-id: svn://ultimatepp.org/upp/trunk@11814 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2018-03-02 13:50:28 +00:00
parent e702db1d97
commit 4201622edd
2 changed files with 13 additions and 2 deletions

View file

@ -36,7 +36,9 @@ struct WindowsList_ : WithWindowsList<StaticRect> {
}
void Fill();
void ButUpdate_Push();
#if defined(PLATFORM_WIN32)
void ButTopmost_Push();
#endif
void MenuCallback(Bar &bar);
void CbCopy();
};
@ -106,6 +108,9 @@ public:
void TimerFun();
void Exit();
private:
TimeCallback timeCallback;
};

View file

@ -40,7 +40,7 @@ void SpecialFolders::Fill() {
const char *ext[] = {".html", ".doc", ".png", ".pdf", ".txt", ".xyz", ""};
for (int i = 0; *ext[i] != 0; ++i)
DefaultExes.Add(ext[i], GetExtExecutable(ext[i]));
#if defined(PLATFORM_WIN32)
#if defined(PLATFORM_WIN32)
ButInstalledSoftware.WhenPush = THISBACK(ButInstalledSoftware_Push);
#else
SoftwareInstalled.Enable(false);
@ -356,13 +356,18 @@ void WindowsList_::Fill() {
}
Windows.SetEditable();
ButUpdate.WhenPush = THISBACK(ButUpdate_Push);
#if defined(PLATFORM_WIN32)
ButTopmost.WhenPush = THISBACK(ButTopmost_Push);
#else
ButTopmost.Disable();
#endif
static MenuBar bar;
//GetList().StdToolBar(bar); //bar(2).Remove();bar(1).Remove();
//GetList().WhenToolBar=THISBACK(cb);
Windows.WhenBar = THISBACK(MenuCallback);
}
#if defined(PLATFORM_WIN32)
void WindowsList_::ButTopmost_Push() {
int row = Windows.GetCursor();
if (row < 0)
@ -370,6 +375,7 @@ void WindowsList_::ButTopmost_Push() {
int64 id = ScanInt64(String(Windows.Get(row, 1)));
Window_TopMost(id);
}
#endif
void WindowsList_::CbCopy() {
String text;
@ -631,7 +637,7 @@ SysInfoDemo::SysInfoDemo()
menu.Set(THISBACK(MainMenu));
menu.WhenHelp = info;
SetTimeCallback(-500, THISBACK(TimerFun));
timeCallback.Set(-500, THISBACK(TimerFun));
Sizeable().Zoomable();
}