25#include "common/array.h"
26#include "common/stack.h"
27#include "graphics/screen.h"
28#include "macs2/messages.h"
46 operator const Common::Rect &()
const {
return _bounds; }
48 int16 height()
const {
return _bounds.
height(); }
61 bool _needsRedraw =
true;
103#define MESSAGE(NAME) \
105 virtual bool msg##NAME(const NAME##Message &e) { \
106 for (Common::Array<UIElement *>::iterator it = _children.begin(); \
107 it != _children.end(); ++it) { \
108 if ((*it)->msg##NAME(e)) \
150#define MESSAGE(NAME) \
151 bool msg##NAME(const NAME##Message &e) override { \
152 return !_views.empty() ? focusedView()->msg##NAME(e) : false; \
166 uint32 currentMillis = 0;
182 return _views.empty() ? nullptr : _views.top();
213extern Events *g_events;
Definition: managed_surface.h:51
bool tick() override
Definition: events.h:208
virtual bool shouldQuit() const =0
void processEvent(Common::Event &ev)
void drawElements()
Definition: events.h:195
UIElement * focusedView() const
Definition: events.h:181
void draw() override
Definition: events.h:203
void addView(UIElement *ui)
Graphics::Screen * getScreen() const
Definition: events.h:188
Graphics::ManagedSurface getSurface() const
virtual UIElement * findView(const Common::String &name)
T height() const
Definition: rect.h:218