i6engine
1.0
|
Superclass for all GUI widgets. More...
#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/api/gui/GUIWidget.h>
Public Member Functions | |
GUIWidget (const std::string &name) | |
virtual | ~GUIWidget () |
virtual void | update (uint16_t type, gui::GUIUpdateMessageStruct *message) |
Method to process incoming messages. More... | |
virtual void | tick () |
This method is called every Tick, if ticking is enabled for this widget. More... | |
void | loadWindowLayout (const std::string &name, const std::string &filename) |
loads a Layout from a .layout file and stores it in _window More... | |
void | enableTicking (bool enabled) |
Registers this widget to be ticked. More... | |
void | subscribeClickEvent (const boost::function< void(void)> &callback) |
Subscribes to a window event. This function can be used to handle event-subscription-messages. More... | |
bool | canDrop () const |
returns whether the widget accepts drops or not More... | |
std::vector< GUIWidget * > | getAllMouseoverWidgets () const |
returns a vector containing all windows the mousecursor is currently over More... | |
void | setMouseOverCallback (const std::function< std::vector< GUIWidget * >(void)> &func) |
sets mouse over callback More... | |
void | setPosition (double x, double y) |
sets position of this widget More... | |
void | setSize (double w, double h) |
sets size of this widget More... | |
bool | isHit () const |
bool | renderingEndedHandler (const CEGUI::EventArgs &args) |
handler to copy rendered data to a memory buffer More... | |
Public Attributes | |
std::string | _name |
CEGUI::Window * | _window |
GUIWidget * | _parent |
std::vector< GUIWidget * > | _childs |
Superclass for all GUI widgets.
A GUIWidget is a part of your GUI. Each GUIWidget has an unique name and handles one CEGUI Window. The GUIWidgets are managed by the GUIManager:
Definition at line 65 of file GUIWidget.h.
|
explicit |
|
virtual |
|
inline |
returns whether the widget accepts drops or not
Definition at line 103 of file GUIWidget.h.
void i6e::api::GUIWidget::enableTicking | ( | bool | enabled | ) |
Registers this widget to be ticked.
enabled | If true this widget's tick-method will be called every tick |
|
inline |
returns a vector containing all windows the mousecursor is currently over
Definition at line 110 of file GUIWidget.h.
bool i6e::api::GUIWidget::isHit | ( | ) | const |
void i6e::api::GUIWidget::loadWindowLayout | ( | const std::string & | name, |
const std::string & | filename | ||
) |
loads a Layout from a .layout file and stores it in _window
bool i6e::api::GUIWidget::renderingEndedHandler | ( | const CEGUI::EventArgs & | args | ) |
handler to copy rendered data to a memory buffer
|
inline |
sets mouse over callback
Definition at line 117 of file GUIWidget.h.
void i6e::api::GUIWidget::setPosition | ( | double | x, |
double | y | ||
) |
sets position of this widget
void i6e::api::GUIWidget::setSize | ( | double | w, |
double | h | ||
) |
sets size of this widget
|
inline |
Subscribes to a window event. This function can be used to handle event-subscription-messages.
callback | The function to be executed. |
Definition at line 96 of file GUIWidget.h.
|
virtual |
This method is called every Tick, if ticking is enabled for this widget.
Reimplemented in i6e::modules::GUIPrint, i6e::modules::GUIStatusList, and i6e::modules::GUITooltip.
|
virtual |
Method to process incoming messages.
Reimplemented in i6e::modules::GUIPrint, i6e::modules::GUIStatusList, i6e::modules::GUIChat, i6e::modules::GUIMultiColumnList, i6e::modules::GUIBar, i6e::modules::GUIComboBox, i6e::modules::GUIEditbox, i6e::modules::GUIImage, i6e::modules::GUITextButton, i6e::modules::GUIToggleButton, i6e::modules::GUIImageButton, and i6e::modules::GUITooltip.
std::vector<GUIWidget *> i6e::api::GUIWidget::_childs |
Definition at line 140 of file GUIWidget.h.
std::string i6e::api::GUIWidget::_name |
Definition at line 136 of file GUIWidget.h.
GUIWidget* i6e::api::GUIWidget::_parent |
Definition at line 139 of file GUIWidget.h.
CEGUI::Window* i6e::api::GUIWidget::_window |
Definition at line 137 of file GUIWidget.h.