#include <events.h>
Public Member Functions | |
UIElement (const Common::String &name, UIElement *uiParent) | |
UIElement (const Common::String &name) | |
bool | needsRedraw () const |
void | redraw () |
virtual void | close () |
virtual void | replaceView (UIElement *ui, bool replaceAllViews=false, bool fadeOutIn=false) |
virtual void | replaceView (const Common::String &name, bool replaceAllViews=false, bool fadeOutIn=false) |
virtual void | addView (UIElement *ui) |
virtual void | addView (const Common::String &name) |
void | addView () |
void | open () |
int | getRandomNumber (int minNumber, int maxNumber) |
int | getRandomNumber (int maxNumber) |
virtual void | setBounds (const Common::Rect &r) |
Common::Rect | getBounds () const |
const Common::String & | getName () const |
Gfx::GfxSurface | getSurface (bool innerBounds=false) const |
virtual void | draw () |
virtual bool | tick () |
virtual UIElement * | findView (const Common::String &name) |
bool | send (const MouseMoveMessage &msg) |
bool | send (const Common::String &viewName, const FocusMessage &msg) |
bool | send (const FocusMessage &msg) |
bool | send (const Common::String &viewName, const UnfocusMessage &msg) |
bool | send (const UnfocusMessage &msg) |
bool | send (const Common::String &viewName, const MouseEnterMessage &msg) |
bool | send (const MouseEnterMessage &msg) |
bool | send (const Common::String &viewName, const MouseLeaveMessage &msg) |
bool | send (const MouseLeaveMessage &msg) |
bool | send (const Common::String &viewName, const KeypressMessage &msg) |
bool | send (const KeypressMessage &msg) |
bool | send (const Common::String &viewName, const MouseDownMessage &msg) |
bool | send (const MouseDownMessage &msg) |
bool | send (const Common::String &viewName, const MouseUpMessage &msg) |
bool | send (const MouseUpMessage &msg) |
bool | send (const Common::String &viewName, const ActionMessage &msg) |
bool | send (const ActionMessage &msg) |
bool | send (const Common::String &viewName, const GameMessage &msg) |
bool | send (const GameMessage &msg) |
bool | send (const Common::String &viewName, const ValueMessage &msg) |
bool | send (const ValueMessage &msg) |
Protected Member Functions | |
bool | isDelayActive () const |
void | cancelDelay () |
virtual void | timeout () |
virtual bool | msgMouseMove (const MouseMoveMessage &msg) |
virtual bool | msgFocus (const FocusMessage &e) |
virtual bool | msgUnfocus (const UnfocusMessage &e) |
virtual bool | msgMouseEnter (const MouseEnterMessage &e) |
virtual bool | msgMouseLeave (const MouseLeaveMessage &e) |
virtual bool | msgKeypress (const KeypressMessage &e) |
virtual bool | msgMouseDown (const MouseDownMessage &e) |
virtual bool | msgMouseUp (const MouseUpMessage &e) |
virtual bool | msgAction (const ActionMessage &e) |
virtual bool | msgGame (const GameMessage &e) |
virtual bool | msgValue (const ValueMessage &e) |
Protected Attributes | |
UIElement * | _parent |
Common::Array< UIElement * > | _children |
Common::Rect | _innerBounds |
Bounds | _bounds |
bool | _needsRedraw = true |
Common::String | _name |
User interface element
|
inlineprotected |
Returns true if a delay is active
|
inlineprotected |
Cancels any active delay
|
protectedvirtual |
Called when an active timeout countdown expired
|
inline |
Returns true if the elements needs to be redrawn
void Got::UIElement::redraw | ( | ) |
Sets that the element needs to be redrawn
|
virtual |
Closes the current view. The view must have been added via addView, so there's a remaining view afterwards
Reimplemented in Got::Events.
|
virtual |
Sets the focus to a new view
Reimplemented in Got::Events.
|
virtual |
Adds a focused view to the view stack without replacing current one
Reimplemented in Got::Events.
int Got::UIElement::getRandomNumber | ( | int | minNumber, |
int | maxNumber | ||
) |
Returns a random number
|
inlinevirtual |
Sets the element's bounds
|
inline |
Gets the element's bounds
|
inline |
Gets a view's name
Gfx::GfxSurface Got::UIElement::getSurface | ( | bool | innerBounds = false | ) | const |
Returns a surface for drawing the element
|
virtual |
Draws the element
Reimplemented in Got::Events, Got::Views::GameContent, Got::Views::Dialogs::Say, Got::Views::Dialogs::SelectOption, Got::Views::GameStatus, Got::Views::Story, Got::Views::Dialogs::HighScores, Got::Views::Opening, Got::Views::SplashScreen, Got::Views::Credits, Got::Views::Dialogs::SelectItem, Got::Views::PartTitle, Got::Views::TitleBackground, and Got::Views::Dialogs::Dialog.
|
virtual |
Called for game frame ticks
Reimplemented in Got::Events, Got::Views::GameContent, Got::Views::Dialogs::Say, Got::Views::Dialogs::SelectOption, Got::Views::Dialogs::HighScores, Got::Views::GameStatus, Got::Views::Story, Got::Views::Opening, Got::Views::SplashScreen, Got::Views::Credits, Got::Views::Game, and Got::Views::PartTitle.
|
virtual |
Find a view by name
|
inlineprotectedvirtual |
Handles events
Reimplemented in Got::Events, and Got::Views::View.