33 #define CUI__WINDOW_DRAGSTEP 1
59 laPoint3 _ptPointerOldPos;
60 laPoint3 _ptPointerOffest;
102 virtual void create(laPoint3 pos, laPoint3 size);
109 virtual void reply();
115 virtual void show() { _bVisible=
true; };
116 virtual void hide() { _bVisible=
false; };
119 void enable() { _bEnabled=
true; };
120 void disable() { _bEnabled=
false; };
126 unsigned long getID() {
return _uID; };
127 void setID(
unsigned long id) { _uID=id; };
135 laPoint3 getSize() {
return _ptSize; }
142 if( (pt.x() < 0) || (pt.y() < 0) || (pt.x() > _ptSize.x()) || (pt.y() > _ptSize.y()))
148 virtual void move(laPoint3 ptNewPos,
unsigned nHReference=
M_AL,
unsigned nVReference=
M_AT);
153 virtual void onMouseIn();
154 virtual void onMouseOut();
155 virtual void onMouseMove(laPoint3 ptRelativePos);
157 virtual void onDown(
unsigned nButton);
158 virtual void onUp(
unsigned nButton);
159 virtual void onClick(
unsigned nButton);
166 virtual void onCommand(
unsigned long uID,
unsigned long nCmd);
M_BOOL isMouseInside()
Helpful function that checks if the mouse pointer is inside the window.
laPoint3 _ptPos
Windos position (relative to parent)
virtual void load(class laFileParser *fp)
Load a dialog layout form .cui file.
virtual void move(laPoint3 ptNewPos, unsigned nHReference=M_AL, unsigned nVReference=M_AT)
Change window position.
Interface for loadable objects.
#define M_AL
Text align left.
#define M_AT
Text align top.
laPoint3 _ptSize
Window size.
bool _bVisible
Window visibility flag.
uiWindow * _pParent
Pointer to parent window, if any.
laPoint3 getAbsolutePos()
Get absolute window position.
static uiPointer * getMousePointer()
Enables children to get a pointer to the mouse pointer, but not to change it.
uiWindow(void)
Class constructor.
Base class for GUI windows.
virtual void create(laPoint3 pos, laPoint3 size)
Create new empty window.
laPoint3 _ptDecorationSize
Size of border elements; defaults to 0.
laPoint3 getRelativePointerPos()
Get mouse pointer position relative to window position.
bool _bEnabled
Window interactivity flag.
virtual void reply()
Handle input message.
virtual void draw()
Display the window.
laPoint3 getPos()
Get relative window position with regard to parent.
virtual void onCommand(unsigned long uID, unsigned long nCmd)
Command event handler.
virtual void kill()
Discard window and all children.