.reference

git-svn-id: svn://ultimatepp.org/upp/trunk@5558 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-11-18 23:45:02 +00:00
parent 19eee2c486
commit 8fcb15cec7
3 changed files with 58 additions and 51 deletions

View file

@ -1,51 +1,52 @@
#include <CtrlLib/CtrlLib.h>
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 <CtrlLib/CtrlLib.h>
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();
}

View file

@ -1,3 +1,5 @@
description "Demonstrates IdCtrls utility class to match widgets with keys (in JSON here)\377";
uses
CtrlLib;

View file

@ -0,0 +1,4 @@
#ifndef _RichImlImage_icpp_init_stub
#define _RichImlImage_icpp_init_stub
#include "CtrlLib/init"
#endif