mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
.upptst
This commit is contained in:
parent
8fefb89735
commit
80c62ae837
3 changed files with 39 additions and 14 deletions
|
|
@ -3,23 +3,14 @@
|
|||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
Label label[3];
|
||||
Label label;
|
||||
TimeCallback tm;
|
||||
|
||||
MyApp() {
|
||||
Sizeable().Zoomable();
|
||||
|
||||
#if 0
|
||||
tm.Set(-100, [=] {
|
||||
static int ii;
|
||||
label[0] = AsString(ii++);
|
||||
});
|
||||
#endif
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
Add(label[i].LeftPos(0, 1000).TopPos(i * 200, 200));
|
||||
label[i].SetFont(Arial(200));
|
||||
}
|
||||
Add(label.LeftPos(0, 1000).TopPos(0, 200));
|
||||
label.SetFont(Arial(200));
|
||||
|
||||
Thread::Start([=] {
|
||||
int ii = 0;
|
||||
|
|
@ -29,8 +20,7 @@ struct MyApp : TopWindow {
|
|||
DDUMP(ii);
|
||||
if(IsShutdownThreads())
|
||||
break;
|
||||
label[1] = AsString(ii++);
|
||||
|
||||
label = AsString(ii++);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
9
upptst/PostCallbackResize/PostCallbackResize.upp
Normal file
9
upptst/PostCallbackResize/PostCallbackResize.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
26
upptst/PostCallbackResize/main.cpp
Normal file
26
upptst/PostCallbackResize/main.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
Label label;
|
||||
TimeCallback tm;
|
||||
int ii = 0;
|
||||
|
||||
MyApp() {
|
||||
Sizeable().Zoomable();
|
||||
|
||||
Add(label.LeftPos(0, 1000).TopPos(0, 200));
|
||||
label.SetFont(Arial(200));
|
||||
|
||||
tm.Set(-100, [=] { label = AsString(ii++); });
|
||||
}
|
||||
~MyApp() {
|
||||
ShutdownThreads();
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue