ScummVM API documentation
Graphics::MacWidget Class Reference
Inheritance diagram for Graphics::MacWidget:
Graphics::BaseMacWindow Graphics::MacText Graphics::MacMenu Graphics::MacWindow Graphics::MacButton Graphics::MacPopUp Director::Window Graphics::MacTextWindow

Public Member Functions

 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)
 
const Common::RectgetDimensions ()
 
virtual void setActive (bool active)
 
void setDirty (bool dirty)
 
virtual bool needsRedraw ()
 
virtual bool draw (ManagedSurface *g, bool forceRedraw=false)
 
virtual bool draw (bool forceRedraw=false)
 
virtual void blit (ManagedSurface *g, Common::Rect &dest)
 
virtual bool processEvent (Common::Event &event)
 
virtual bool hasAllFocus ()
 
virtual bool isEditable ()
 
virtual void setColors (uint32 fg, uint32 bg)
 
virtual void setDimensions (const Common::Rect &r)
 
Common::Point getAbsolutePos ()
 
MacWidgetfindEventHandler (Common::Event &event, int dx, int dy)
 
void removeWidget (MacWidget *child, bool del=true)
 
Graphics::ManagedSurfacegetSurface ()
 

Public Attributes

bool _focusable
 
bool _active
 
bool _editable
 
uint _priority
 
Common::Rect _dims
 
MacWindowManager_wm
 
MacWidget_parent
 
Common::Array< MacWidget * > _children
 

Protected Attributes

uint16 _border
 
uint16 _gutter
 
uint16 _shadow
 
uint32 _fgcolor
 
uint32 _bgcolor
 
Graphics::ManagedSurface_composeSurface
 
bool _contentIsDirty
 

Member Function Documentation

◆ getDimensions()

const Common::Rect& Graphics::MacWidget::getDimensions ( )
inline

Accessor method for the complete dimensions of the widget.

Returns
Dimensions of the widget relative to the parent's position.

◆ setActive()

virtual void Graphics::MacWidget::setActive ( bool  active)
virtual

Method for indicating whether the widget is active or inactive. Used by the WM to handle focus on windows, etc.

Parameters
activeDesired state of the widget.

Reimplemented in Graphics::MacWindow, Graphics::MacText, and Graphics::MacButton.

◆ setDirty()

void Graphics::MacWidget::setDirty ( bool  dirty)
inline

Method for marking the widget for redraw.

Parameters
dirtyTrue if the widget needs to be redrawn.

The documentation for this class was generated from the following file: