Adding uppdev....

git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-08-15 08:36:24 +00:00
commit 351994a6cc
2823 changed files with 619073 additions and 0 deletions

8
uppdev/Key/Key.upp Normal file
View file

@ -0,0 +1,8 @@
uses
CtrlLib;
file
main.cpp;
mainconfig
"" = "GUI";

40
uppdev/Key/main.cpp Normal file
View file

@ -0,0 +1,40 @@
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : TopWindow {
Label l;
String k;
void Do() {
static int ii;
String x;
if(GetCtrl())
x << "Ctrl ";
if(GetAlt())
x << "Alt ";
if(GetShift())
x << "Shift ";
x << k << ' ' << GetMousePos();
l = x;
}
bool Key(dword key, int count) {
k = GetKeyDesc(key) + ' ' + FormatIntHex(key);
if(key < 256)
k << '\"' << (char)key << '\"';
Do();
}
typedef MyApp CLASSNAME;
MyApp() {
Add(l.SizePos());
SetTimeCallback(-100, THISBACK(Do));
}
};
GUI_APP_MAIN
{
MyApp().Run();
}