22#ifndef GRAPHICS_MACGUI_MACWIDGET_H
23#define GRAPHICS_MACGUI_MACWIDGET_H
25#include "common/array.h"
26#include "common/events.h"
27#include "common/rect.h"
28#include "graphics/managed_surface.h"
37class MacWindowManager;
42 MacWidget(
MacWidget *parent,
int x,
int y,
int w,
int h,
MacWindowManager *wm,
bool focusable, uint16 border = 0, uint16 gutter = 0, uint16 shadow = 0, uint32 fgcolor = 0, uint32 bgcolor= 0xff);
62 void setDirty(
bool dirty) { _contentIsDirty = dirty; }
64 virtual bool needsRedraw() {
return _contentIsDirty; }
66 virtual bool draw(ManagedSurface *g,
bool forceRedraw =
false);
67 virtual bool draw(
bool forceRedraw =
false);
68 virtual void blit(ManagedSurface *g,
Common::Rect &dest);
70 virtual bool hasAllFocus() {
return _active; }
71 virtual bool isEditable() {
return _editable; }
73 virtual void setColors(uint32 fg, uint32 bg);
74 virtual void setBorderColor(uint32 color) {
76 _contentIsDirty =
true;
85 MacWidget *findEventHandler(
Common::Event &event,
int dx,
int dy);
87 void removeWidget(MacWidget *child,
bool del =
true);
98 uint32 _fgcolor, _bgcolor;
101 DisposeAfterUse::Flag _dispose;
103 bool _contentIsDirty;
113 MacWindowManager *_wm;
Definition: macwindowmanager.h:149
Definition: managed_surface.h:51
Definition: algorithm.h:29
Definition: formatinfo.h:28