ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <widget.h>

Inheritance diagram for GUI::Widget:
Collaboration diagram for GUI::Widget:

List of all members.

Public Member Functions

 Widget (GuiObject *boss, int x, int y, int w, int h, const char *tooltip=0)
 Widget (GuiObject *boss, const Common::String &name, const char *tooltip=0)
virtual ~Widget ()
void init ()
void resize (int x, int y, int w, int h)
void setNext (Widget *w)
Widgetnext ()
virtual int16 getAbsX () const
virtual int16 getAbsY () const
virtual void setPos (int x, int y)
virtual void setSize (int w, int h)
virtual void handleMouseDown (int x, int y, int button, int clickCount)
virtual void handleMouseUp (int x, int y, int button, int clickCount)
virtual void handleMouseEntered (int button)
virtual void handleMouseLeft (int button)
virtual void handleMouseMoved (int x, int y, int button)
virtual void handleMouseWheel (int x, int y, int direction)
virtual bool handleKeyDown (Common::KeyState state)
virtual bool handleKeyUp (Common::KeyState state)
virtual void handleTickle ()
virtual void markAsDirty ()
 Mark the widget and its children as dirty so they are redrawn on the next screen update.
virtual void draw ()
 Redraw the widget if it was marked as dirty, and recursively proceed with its children.
void receivedFocus ()
void lostFocus ()
virtual bool wantsFocus ()
void setFlags (int flags)
void clearFlags (int flags)
int getFlags () const
void setEnabled (bool e)
bool isEnabled () const
void setVisible (bool e)
bool isVisible () const
uint8 parseHotkey (const Common::String &label)
Common::String cleanupHotkey (const Common::String &label)
bool hasTooltip () const
const Common::StringgetTooltip () const
void setTooltip (const Common::String &tooltip)
virtual bool containsWidget (Widget *) const

Static Public Member Functions

static WidgetfindWidgetInChain (Widget *start, int x, int y)
static WidgetfindWidgetInChain (Widget *start, const char *name)
static bool containsWidgetInChain (Widget *start, Widget *search)

Protected Member Functions

void updateState (int oldFlags, int newFlags)
virtual void drawWidget ()=0
virtual void receivedFocusWidget ()
virtual void lostFocusWidget ()
virtual WidgetfindWidget (int x, int y)
void releaseFocus ()
void handleCommand (CommandSender *sender, uint32 cmd, uint32 data)

Protected Attributes

uint32 _type
GuiObject_boss
Widget_next
uint16 _id
bool _hasFocus
ThemeEngine::WidgetStateInfo _state
Common::String _tooltip

Private Attributes

uint16 _flags
bool _needsRedraw

Friends

class Dialog

Detailed Description

Definition at line 93 of file widget.h.


Constructor & Destructor Documentation

GUI::Widget::Widget ( GuiObject boss,
int  x,
int  y,
int  w,
int  h,
const char *  tooltip = 0 
)

Definition at line 38 of file widget.cpp.

GUI::Widget::Widget ( GuiObject boss,
const Common::String name,
const char *  tooltip = 0 
)

Definition at line 44 of file widget.cpp.

GUI::Widget::~Widget (  )  [virtual]

Definition at line 57 of file widget.cpp.


Member Function Documentation

Common::String GUI::Widget::cleanupHotkey ( const Common::String label  ) 

Definition at line 249 of file widget.cpp.

void GUI::Widget::clearFlags ( int  flags  ) 

Definition at line 74 of file widget.cpp.

virtual bool GUI::Widget::containsWidget ( Widget  )  const [inline, virtual]

Reimplemented in GUI::ContainerWidget, and GUI::TabWidget.

Definition at line 167 of file widget.h.

bool GUI::Widget::containsWidgetInChain ( Widget start,
Widget search 
) [static]

Definition at line 173 of file widget.cpp.

void GUI::Widget::draw (  )  [virtual]

Redraw the widget if it was marked as dirty, and recursively proceed with its children.

Reimplemented in GUI::TabWidget.

Definition at line 101 of file widget.cpp.

virtual void GUI::Widget::drawWidget (  )  [protected, pure virtual]
virtual Widget* GUI::Widget::findWidget ( int  x,
int  y 
) [inline, protected, virtual]

Reimplemented in GUI::ContainerWidget, and GUI::TabWidget.

Definition at line 177 of file widget.h.

Widget * GUI::Widget::findWidgetInChain ( Widget start,
const char *  name 
) [static]

Definition at line 163 of file widget.cpp.

Widget * GUI::Widget::findWidgetInChain ( Widget start,
int  x,
int  y 
) [static]

Definition at line 151 of file widget.cpp.

virtual int16 GUI::Widget::getAbsX (  )  const [inline, virtual]

Reimplemented from GUI::GuiObject.

Definition at line 124 of file widget.h.

virtual int16 GUI::Widget::getAbsY (  )  const [inline, virtual]

Reimplemented from GUI::GuiObject.

Definition at line 125 of file widget.h.

int GUI::Widget::getFlags (  )  const [inline]

Definition at line 152 of file widget.h.

const Common::String& GUI::Widget::getTooltip (  )  const [inline]

Definition at line 164 of file widget.h.

void GUI::Widget::handleCommand ( CommandSender sender,
uint32  cmd,
uint32  data 
) [inline, protected, virtual]

Reimplemented from GUI::CommandReceiver.

Reimplemented in GUI::TabWidget.

Definition at line 182 of file widget.h.

virtual bool GUI::Widget::handleKeyDown ( Common::KeyState  state  )  [inline, virtual]

Reimplemented in GUI::TabWidget.

Definition at line 136 of file widget.h.

virtual bool GUI::Widget::handleKeyUp ( Common::KeyState  state  )  [inline, virtual]

Definition at line 137 of file widget.h.

virtual void GUI::Widget::handleMouseDown ( int  x,
int  y,
int  button,
int  clickCount 
) [inline, virtual]

Reimplemented in GUI::TabWidget.

Definition at line 130 of file widget.h.

virtual void GUI::Widget::handleMouseEntered ( int  button  )  [inline, virtual]

Definition at line 132 of file widget.h.

virtual void GUI::Widget::handleMouseLeft ( int  button  )  [inline, virtual]

Definition at line 133 of file widget.h.

virtual void GUI::Widget::handleMouseMoved ( int  x,
int  y,
int  button 
) [inline, virtual]

Definition at line 134 of file widget.h.

virtual void GUI::Widget::handleMouseUp ( int  x,
int  y,
int  button,
int  clickCount 
) [inline, virtual]

Definition at line 131 of file widget.h.

virtual void GUI::Widget::handleMouseWheel ( int  x,
int  y,
int  direction 
) [inline, virtual]

Definition at line 135 of file widget.h.

virtual void GUI::Widget::handleTickle (  )  [inline, virtual]

Definition at line 138 of file widget.h.

bool GUI::Widget::hasTooltip (  )  const [inline]

Definition at line 163 of file widget.h.

void GUI::Widget::init (  ) 

Reimplemented in GUI::TabWidget.

Definition at line 50 of file widget.cpp.

bool GUI::Widget::isEnabled (  )  const

Definition at line 193 of file widget.cpp.

bool GUI::Widget::isVisible (  )  const [virtual]

Implements GUI::GuiObject.

Definition at line 207 of file widget.cpp.

void GUI::Widget::lostFocus (  )  [inline]

Definition at line 147 of file widget.h.

virtual void GUI::Widget::lostFocusWidget (  )  [inline, protected, virtual]

Definition at line 175 of file widget.h.

void GUI::Widget::markAsDirty (  )  [virtual]

Mark the widget and its children as dirty so they are redrawn on the next screen update.

Reimplemented in GUI::TabWidget.

Definition at line 91 of file widget.cpp.

Widget* GUI::Widget::next (  )  [inline]

Definition at line 122 of file widget.h.

uint8 GUI::Widget::parseHotkey ( const Common::String label  ) 

Definition at line 214 of file widget.cpp.

void GUI::Widget::receivedFocus (  )  [inline]

Definition at line 146 of file widget.h.

virtual void GUI::Widget::receivedFocusWidget (  )  [inline, protected, virtual]

Definition at line 174 of file widget.h.

void GUI::Widget::releaseFocus (  )  [inline, protected, virtual]

Implements GUI::GuiObject.

Definition at line 179 of file widget.h.

void GUI::Widget::resize ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 62 of file widget.cpp.

void GUI::Widget::setEnabled ( bool  e  ) 

Definition at line 182 of file widget.cpp.

void GUI::Widget::setFlags ( int  flags  ) 

Definition at line 69 of file widget.cpp.

void GUI::Widget::setNext ( Widget w  )  [inline]

Definition at line 121 of file widget.h.

virtual void GUI::Widget::setPos ( int  x,
int  y 
) [inline, virtual]

Definition at line 127 of file widget.h.

virtual void GUI::Widget::setSize ( int  w,
int  h 
) [inline, virtual]

Definition at line 128 of file widget.h.

void GUI::Widget::setTooltip ( const Common::String tooltip  )  [inline]

Definition at line 165 of file widget.h.

void GUI::Widget::setVisible ( bool  e  ) 

Definition at line 200 of file widget.cpp.

void GUI::Widget::updateState ( int  oldFlags,
int  newFlags 
) [protected]

Definition at line 79 of file widget.cpp.

virtual bool GUI::Widget::wantsFocus (  )  [inline, virtual]

Definition at line 148 of file widget.h.


Friends And Related Function Documentation

friend class Dialog [friend]

Definition at line 94 of file widget.h.


Member Data Documentation

Definition at line 97 of file widget.h.

Definition at line 105 of file widget.h.

bool GUI::Widget::_hasFocus [protected]

Definition at line 100 of file widget.h.

uint16 GUI::Widget::_id [protected]

Definition at line 99 of file widget.h.

bool GUI::Widget::_needsRedraw [private]

Definition at line 106 of file widget.h.

Widget* GUI::Widget::_next [protected]

Definition at line 98 of file widget.h.

Definition at line 101 of file widget.h.

Definition at line 102 of file widget.h.

Definition at line 96 of file widget.h.


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


Generated on Sat Jan 12 2019 05:04:46 for ResidualVM by doxygen 1.7.1
curved edge   curved edge