mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
reorganizing repo
git-svn-id: svn://ultimatepp.org/upp/trunk@9207 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e3e8d627f5
commit
e29f8e4718
265 changed files with 0 additions and 69272 deletions
|
|
@ -1,236 +0,0 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
class App : public TopWindow {
|
||||
public:
|
||||
typedef App CLASSNAME;
|
||||
ArrayCtrl log;
|
||||
|
||||
void Log(const String& s)
|
||||
{
|
||||
log.Add(s);
|
||||
log.GoEnd();
|
||||
}
|
||||
|
||||
virtual void Activate()
|
||||
{
|
||||
Log("Activate");
|
||||
}
|
||||
|
||||
virtual void Deactivate()
|
||||
{
|
||||
Log("Deactivate");
|
||||
}
|
||||
|
||||
virtual Image FrameMouseEvent(int event, Point p, int zdelta, dword keyflags)
|
||||
{
|
||||
if(event != CURSORIMAGE)
|
||||
Log(Format("FrameMouseEvent(%d, Point(%d, %d), %d, %x)",
|
||||
event, p.x, p.y, zdelta, (int)keyflags));
|
||||
return TopWindow::FrameMouseEvent(event, p, zdelta, keyflags);
|
||||
}
|
||||
|
||||
virtual Image MouseEvent(int event, Point p, int zdelta, dword keyflags)
|
||||
{
|
||||
if(event != CURSORIMAGE)
|
||||
Log(Format("MouseEvent(%d, Point(%d, %d), %d, %x)",
|
||||
event, p.x, p.y, zdelta, (int)keyflags));
|
||||
return TopWindow::MouseEvent(event, p, zdelta, keyflags);
|
||||
}
|
||||
|
||||
virtual void MouseEnter(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MouseEnter(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MouseMove(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MouseMove(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void LeftDown(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("LeftDown(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
virtual void LeftDouble(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("LeftDouble(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void LeftTriple(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("LeftTriple(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void LeftDrag(Point p, dword keyflags) {
|
||||
Log(Format("LeftDrag(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void LeftHold(Point p, dword keyflags) {
|
||||
Log(Format("LeftHold(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void LeftRepeat(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("LeftRepeat(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void LeftUp(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("LeftUp(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightDown(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("RightDown(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightDouble(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("RightDouble(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightTriple(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("RightTriple(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightDrag(Point p, dword keyflags) {
|
||||
Log(Format("RightDrag(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightHold(Point p, dword keyflags) {
|
||||
Log(Format("RightHold(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightRepeat(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("RightRepeat(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void RightUp(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("RightUp(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleDown(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MiddleDown(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleDouble(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MiddleDouble(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleTriple(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MiddleTriple(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleDrag(Point p, dword keyflags) {
|
||||
Log(Format("MiddleDrag(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleHold(Point p, dword keyflags) {
|
||||
Log(Format("MiddleHold(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleRepeat(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MiddleRepeat(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MiddleUp(Point p, dword keyflags)
|
||||
{
|
||||
Log(Format("MiddleUp(Point(%d, %d), %x)", p.x, p.y, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MouseWheel(Point p, int zdelta, dword keyflags)
|
||||
{
|
||||
Log(Format("MouseWheel(Point(%d, %d), %d, %x)", p.x, p.y, zdelta, (int)keyflags));
|
||||
}
|
||||
|
||||
virtual void MouseLeave()
|
||||
{
|
||||
Log("MouseLeave");
|
||||
}
|
||||
|
||||
virtual Image CursorImage(Point p, dword keyflags)
|
||||
{
|
||||
return keyflags & K_CTRL ? CtrlImg::swap_color_cursor() : Image::Arrow();
|
||||
}
|
||||
|
||||
virtual bool Key(dword key, int count)
|
||||
{
|
||||
Log(Format("Key(%x, %d) ", (int)key, count) + GetKeyDesc(key));
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool WKey(dword key, int count)
|
||||
{
|
||||
Log(Format("WKey(%x, %d) ", (int)key, count) + GetKeyDesc(key));
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void GotFocus()
|
||||
{
|
||||
Log("GotFocus");
|
||||
}
|
||||
|
||||
virtual void LostFocus()
|
||||
{
|
||||
Log("LostFocus");
|
||||
}
|
||||
|
||||
virtual bool HotKey(dword key)
|
||||
{
|
||||
Log(Format("HotKey(%x) ", (int)key) + GetKeyDesc(key));
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void ChildGotFocus()
|
||||
{
|
||||
Log("ChildGotFocus");
|
||||
}
|
||||
|
||||
virtual void ChildLostFocus()
|
||||
{
|
||||
Log("ChildLostFocus");
|
||||
}
|
||||
|
||||
virtual void Layout()
|
||||
{
|
||||
Log("Layout");
|
||||
}
|
||||
|
||||
void OnTimer()
|
||||
{
|
||||
Log("Timer");
|
||||
}
|
||||
|
||||
App()
|
||||
{
|
||||
SetFrame(InsetFrame());
|
||||
AddFrame(InsetFrame());
|
||||
AddFrame(InsetFrame());
|
||||
AddFrame(InsetFrame());
|
||||
log.AddColumn("");
|
||||
log.NoHeader();
|
||||
Add(log.HSizePos().BottomPos(0, 200));
|
||||
SetTimeCallback(-1000, THISBACK(OnTimer));
|
||||
}
|
||||
|
||||
~App()
|
||||
{
|
||||
Shutdown();
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
App().Run();
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
description "Demonstration of basic input events";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
uses(SKELETON) Skeleton;
|
||||
|
||||
uses(WINALT) WinAlt;
|
||||
|
||||
uses(WINFB) WinFb;
|
||||
|
||||
uses(LINUXFB) LinuxFb;
|
||||
|
||||
uses(SDLFB) SDLFb;
|
||||
|
||||
uses(WINGL) WinGl;
|
||||
|
||||
file
|
||||
Events.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI SKELETON",
|
||||
"" = "GUI WINALT",
|
||||
"" = "GUI WINFB",
|
||||
"" = "GUI LINUXFB",
|
||||
"" = "GUI SDLFB",
|
||||
"" = "GUI WINGL",
|
||||
"" = "GUI";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue