29 #include "saga2/input.h" 30 #include "saga2/vdraw.h" 64 void HandleTimerTick(
long newTick);
65 void EventLoop(
bool &running,
bool modal =
false);
101 typedef void AppFunc(
gEvent &);
104 #define APPFUNCDECL __cdecl 109 #define APPFUNC(a) void a ( gEvent &ev ) 110 #define APPFUNCV(a) void a ( gEvent & ) 148 virtual gPanel *keyTest(int16 key);
158 virtual void onMouseHintDelay();
160 void notify(gEventType, int32 value);
162 if (_command) _command(ev);
164 void drawTitle(TextPositions placement);
169 virtual bool activate(gEventType why);
170 virtual void deactivate();
172 virtual void enable(
bool abled);
173 virtual void select(uint16 selected);
174 virtual void ghost(
bool ghosted);
175 virtual void invalidate(
Rect16 *area =
nullptr);
176 virtual void setMousePoll(
bool abled) {
177 _wantMousePoll = abled ? 1 : 0;
182 virtual void drawClipped(
196 return _selected != 0;
199 return _ghosted != 0;
201 bool getEnabled()
const {
202 return (
bool)_enabled;
204 void show(
bool shown =
true,
bool inval =
true) {
260 friend void gPanel::moveToFront(
gPanelList &l);
261 friend void gPanel::moveToBack(
gPanelList &l);
275 gPanel *keyTest(int16 key);
276 void removeControls();
279 void invalidate(
Rect16 *area =
nullptr);
286 void enable(
bool abled);
290 inline void gPanel::moveToFront(
gPanelList &l) {
291 l._contents.remove(
this);
292 l._contents.push_front(
this);
295 inline void gPanel::moveToBack(
gPanelList &l) {
296 l._contents.remove(
this);
297 l._contents.push_back(
this);
324 gWindow(
const Rect16 &, uint16,
const char saveName[], AppFunc *cmd = NULL);
330 void postEvent(
gEvent &ev) {
340 bool activate(gEventType why);
355 static int _dragMode;
362 void setExtent(
const Rect16 &);
369 virtual void toFront();
388 void enable(
bool abled);
389 void select(uint16 sel);
392 virtual void close();
393 virtual bool isModal();
397 virtual void update(
const Rect16 &updateRect) = 0;
417 gPanel *keyTest(int16 key);
419 void enable(
bool abled);
420 void select(uint16 sel);
421 void ghost(
bool ghosted);
438 void disableDblClick() {
439 _dblClickFlag =
true;
448 bool activate(gEventType why);
464 void setMouseTextF(
char *format, ...);
465 void LockUI(
bool state);
470 friend void EventLoop(
bool &running);
471 friend int16 leftButtonState();
472 friend int16 rightButtonState();
473 friend void StageModeCleanup();
474 friend void TileModeCleanup();
475 friend void dumpGBASE(
char *msg);
490 int32 _lastMouseMoveTime;
498 _mouseWindow =
nullptr;
499 _activeWindow =
nullptr;
500 _mousePanel =
nullptr;
501 _activePanel =
nullptr;
504 _lastMouseMoveTime = 0;
509 if (panel == &panel->_window)
510 msg_._pickPos = _pickPos;
512 _msg._pickPos.x = (int16)(_pickPos.x - panel->_extent.x);
513 _msg._pickPos.y = (int16)(_pickPos.y - panel->_extent.y);
518 setMsgQ(msg_, panel);
519 _msg._inPanel = (msg_._pickPos.x >= 0
520 && msg_._pickPos.y >= 0
521 && msg_._pickPos.x < panel->_extent.width
522 && msg_._pickPos.y < panel->_extent.height);
527 void setActive(
gPanel *newActive);
532 void handleTimerTick(int32 tick);
534 return _windowList.
end();
540 return _windowList.
front();
543 return _windowList.
back();
545 bool isMousePanel(
gPanel *p) {
546 return (_mousePanel != NULL) ? (p == _mousePanel) : (p == topWindow());
554 void EventLoop(
bool &running);
556 void cleanupPanels();
560 int16 leftButtonState();
561 int16 rightButtonState();
t_T & back()
Definition: list.h:167
iterator end()
Definition: list.h:240
Definition: algorithm.h:29
t_T & front()
Definition: list.h:157
iterator reverse_begin()
Definition: list.h:235
Definition: list_intern.h:51