mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@5558 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
19eee2c486
commit
8fcb15cec7
3 changed files with 58 additions and 51 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "Demonstrates IdCtrls utility class to match widgets with keys (in JSON here)\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
|
|
|
|||
4
reference/RichImlImage/init
Normal file
4
reference/RichImlImage/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _RichImlImage_icpp_init_stub
|
||||
#define _RichImlImage_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue