diff --git a/reference/GuiLock/main.cpp b/reference/GuiLock/main.cpp index 7ae5f50e0..e231cd766 100644 --- a/reference/GuiLock/main.cpp +++ b/reference/GuiLock/main.cpp @@ -1,51 +1,52 @@ -#include - -using namespace Upp; - -struct App : TopWindow { - Thread work; - - void Work(); - - ArrayCtrl list; - - typedef App CLASSNAME; - - App(); - ~App(); -}; - -void App::Work() -{ - for(;;) { - Sleep(1); - GuiLock __; - if(Thread::IsShutdownThreads()) - break; - if(list.GetCount() > 1000) { - if(PromptYesNo("Quit?")) - Break(); - list.Clear(); - } - list.Add((int64)Random()); - } -} - -App::App() -{ - list.AddColumn("Test"); - Add(list.SizePos()); - work.Run(THISBACK(Work)); -} - -App::~App() -{ - Thread::ShutdownThreads(); - work.Wait(); -} - -GUI_APP_MAIN -{ - App app; - app.Run(); -} +#include + +using namespace Upp; + +struct App : TopWindow { + Thread work; + + void Work(); + + ArrayCtrl list; + + typedef App CLASSNAME; + + App(); + ~App(); +}; + +void App::Work() +{ + for(;;) { + Sleep(1); + GuiLock __; + if(IsShutdownThreads()) + break; + if(list.GetCount() > 100) { + if(PromptYesNo("Quit?")) { + Break(); + return; + } + list.Clear(); + } + list.Add((int64)Random()); + } +} + +App::App() +{ + list.AddColumn("Test"); + Add(list.SizePos()); + work.Run(THISBACK(Work)); +} + +App::~App() +{ + ShutdownThreads(); +} + +GUI_APP_MAIN +{ + App app; + app.Run(); +} diff --git a/reference/IdCtrls/IdCtrls.upp b/reference/IdCtrls/IdCtrls.upp index dff53a37b..25ea7735a 100644 --- a/reference/IdCtrls/IdCtrls.upp +++ b/reference/IdCtrls/IdCtrls.upp @@ -1,3 +1,5 @@ +description "Demonstrates IdCtrls utility class to match widgets with keys (in JSON here)\377"; + uses CtrlLib; diff --git a/reference/RichImlImage/init b/reference/RichImlImage/init new file mode 100644 index 000000000..cb62fdc79 --- /dev/null +++ b/reference/RichImlImage/init @@ -0,0 +1,4 @@ +#ifndef _RichImlImage_icpp_init_stub +#define _RichImlImage_icpp_init_stub +#include "CtrlLib/init" +#endif