mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@13581 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f6d0b99783
commit
bff1dc48ef
1 changed files with 15 additions and 0 deletions
|
|
@ -9,6 +9,13 @@ struct App : TopWindow {
|
||||||
Sizeable().Zoomable().CenterScreen();
|
Sizeable().Zoomable().CenterScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Paint(Draw& w) {
|
||||||
|
Rect r = GetRect();
|
||||||
|
Size sz = GetSize();
|
||||||
|
w.DrawRect(sz, White());
|
||||||
|
w.DrawText(40, 40, String() << r << " " << sz);
|
||||||
|
}
|
||||||
|
|
||||||
bool Key(dword key, int count) override
|
bool Key(dword key, int count) override
|
||||||
{
|
{
|
||||||
Rect r = GetRect();
|
Rect r = GetRect();
|
||||||
|
|
@ -27,8 +34,16 @@ struct App : TopWindow {
|
||||||
else
|
else
|
||||||
if(key == K_SPACE)
|
if(key == K_SPACE)
|
||||||
r.right += 10; // See especially this. Even this one moves the window downwards on GTK.
|
r.right += 10; // See especially this. Even this one moves the window downwards on GTK.
|
||||||
|
else
|
||||||
|
if(key == K_DELETE)
|
||||||
|
r = Rect(0, 0, 640, 480);
|
||||||
|
else
|
||||||
|
if(key == K_INSERT)
|
||||||
|
r = Rect(0, 10, 640, 480);
|
||||||
|
|
||||||
|
r.SetSize(Size(640, 480));
|
||||||
SetRect(r);
|
SetRect(r);
|
||||||
|
Refresh();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue