#include <MyGUI_Gui.h>
Public Member Functions | |
void | initialise (const std::string &_core="core.xml", const std::string &_logFileName="MyGUI.log") |
void | shutdown () |
WidgetPtr | createWidgetT (const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer, const std::string &_name="") |
WidgetPtr | createWidgetT (const std::string &_type, const std::string &_skin, int _left, int _top, int _width, int _height, Align _align, const std::string &_layer, const std::string &_name="") |
WidgetPtr | createWidgetRealT (const std::string &_type, const std::string &_skin, const FloatCoord &_coord, Align _align, const std::string &_layer, const std::string &_name="") |
WidgetPtr | createWidgetRealT (const std::string &_type, const std::string &_skin, float _left, float _top, float _width, float _height, Align _align, const std::string &_layer, const std::string &_name="") |
template<typename T > | |
T * | createWidget (const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer, const std::string &_name="") |
template<typename T > | |
T * | createWidget (const std::string &_skin, int _left, int _top, int _width, int _height, Align _align, const std::string &_layer, const std::string &_name="") |
template<typename T > | |
T * | createWidgetReal (const std::string &_skin, const FloatCoord &_coord, Align _align, const std::string &_layer, const std::string &_name="") |
template<typename T > | |
T * | createWidgetReal (const std::string &_skin, float _left, float _top, float _width, float _height, Align _align, const std::string &_layer, const std::string &_name="") |
const IntSize & | getViewSize () |
int | getViewWidth () |
int | getViewHeight () |
void | injectFrameEntered (float _time) |
bool | injectMouseMove (int _absx, int _absy, int _absz) |
bool | injectMousePress (int _absx, int _absy, MouseButton _id) |
bool | injectMouseRelease (int _absx, int _absy, MouseButton _id) |
bool | injectKeyPress (KeyCode _key, Char _text=0) |
bool | injectKeyRelease (KeyCode _key) |
void | destroyWidget (WidgetPtr _widget) |
void | destroyWidgets (VectorWidgetPtr &_widgets) |
void | destroyWidgets (EnumeratorWidgetPtr &_widgets) |
WidgetPtr | findWidgetT (const std::string &_name, bool _throw=true) |
WidgetPtr | findWidgetT (const std::string &_name, const std::string &_prefix, bool _throw=true) |
template<typename T > | |
T * | findWidget (const std::string &_name, bool _throw=true) |
template<typename T > | |
T * | findWidget (const std::string &_name, const std::string &_prefix, bool _throw=true) |
void | setVisiblePointer (bool _visible) |
bool | isVisiblePointer () |
bool | load (const std::string &_file) |
void | resizeWindow (const IntSize &_size) |
void | destroyChildWidget (WidgetPtr _widget) |
void | destroyAllChildWidget () |
EnumeratorWidgetPtr | getEnumerator () |
__declspec (deprecated("use : void Gui::destroyWidgets(VectorWidgetPtr &_widgets)")) void destroyWidgetsVector(VectorWidgetPtr &_widgets) | |
__declspec (deprecated("use : void Gui::setVisiblePointer(bool _value)")) void hidePointer() | |
__declspec (deprecated("use : void Gui::setVisiblePointer(bool _value)")) void showPointer() | |
__declspec (deprecated("use : bool Gui::isVisiblePointer()")) bool isShowPointer() | |
Data Fields | |
FrameEventDelegate | eventFrameStart |
Friends | |
class | WidgetManager |
Definition at line 40 of file MyGUI_Gui.h.
MyGUI::Gui::__declspec | ( | deprecated("use : bool Gui::isVisiblePointer()") | ) | [inline] |
Definition at line 232 of file MyGUI_Gui.h.
MyGUI::Gui::__declspec | ( | deprecated("use : void Gui::setVisiblePointer(bool _value)") | ) | [inline] |
Definition at line 230 of file MyGUI_Gui.h.
MyGUI::Gui::__declspec | ( | deprecated("use : void Gui::setVisiblePointer(bool _value)") | ) | [inline] |
Definition at line 228 of file MyGUI_Gui.h.
MyGUI::Gui::__declspec | ( | deprecated("use : void Gui::destroyWidgets(VectorWidgetPtr &_widgets)") | ) | [inline] |
Definition at line 225 of file MyGUI_Gui.h.
T* MyGUI::Gui::createWidget | ( | const std::string & | _skin, | |
int | _left, | |||
int | _top, | |||
int | _width, | |||
int | _height, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Same as Gui::createWidgetT but return T* instead of WidgetPtr
Definition at line 96 of file MyGUI_Gui.h.
T* MyGUI::Gui::createWidget | ( | const std::string & | _skin, | |
const IntCoord & | _coord, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Same as Gui::createWidgetT but return T* instead of WidgetPtr
Definition at line 90 of file MyGUI_Gui.h.
T* MyGUI::Gui::createWidgetReal | ( | const std::string & | _skin, | |
float | _left, | |||
float | _top, | |||
float | _width, | |||
float | _height, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Same as Gui::createWidgetRealT but return T* instead of WidgetPtr
Definition at line 108 of file MyGUI_Gui.h.
T* MyGUI::Gui::createWidgetReal | ( | const std::string & | _skin, | |
const FloatCoord & | _coord, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Same as Gui::createWidgetRealT but return T* instead of WidgetPtr
Definition at line 102 of file MyGUI_Gui.h.
WidgetPtr MyGUI::Gui::createWidgetRealT | ( | const std::string & | _type, | |
const std::string & | _skin, | |||
float | _left, | |||
float | _top, | |||
float | _width, | |||
float | _height, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Create widget using coordinates relative to parent. see Gui::createWidgetT
Definition at line 82 of file MyGUI_Gui.h.
WidgetPtr MyGUI::Gui::createWidgetRealT | ( | const std::string & | _type, | |
const std::string & | _skin, | |||
const FloatCoord & | _coord, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Create widget using coordinates relative to parent. see Gui::createWidgetT
Definition at line 77 of file MyGUI_Gui.h.
WidgetPtr MyGUI::Gui::createWidgetT | ( | const std::string & | _type, | |
const std::string & | _skin, | |||
int | _left, | |||
int | _top, | |||
int | _width, | |||
int | _height, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Definition at line 72 of file MyGUI_Gui.h.
WidgetPtr MyGUI::Gui::createWidgetT | ( | const std::string & | _type, | |
const std::string & | _skin, | |||
const IntCoord & | _coord, | |||
Align | _align, | |||
const std::string & | _layer, | |||
const std::string & | _name = "" | |||
) | [inline] |
Create widget
_type | widget type | |
_skin | widget skin | |
_coord | int coordinates of widget (_left, _top, _width, _height) | |
_align | widget align (possible values can be found in enum Align) | |
_layer | layer where widget will be created (all layers usually defined in core.layer file). If your widget will overlap with any other you shoud select _layer with "overlapped" property enabled. | |
_name | if needed (you can use it for finding widget by name later) |
Definition at line 67 of file MyGUI_Gui.h.
void MyGUI::Gui::destroyAllChildWidget | ( | ) | [inline] |
Destroy all child widgets
Definition at line 207 of file MyGUI_Gui.h.
void MyGUI::Gui::destroyChildWidget | ( | WidgetPtr | _widget | ) | [inline] |
Destroy child widget or throw exception if this child widget not found
Definition at line 204 of file MyGUI_Gui.h.
void MyGUI::Gui::destroyWidget | ( | WidgetPtr | _widget | ) |
Destroy any created widget
Definition at line 264 of file MyGUI_Gui.cpp.
void MyGUI::Gui::destroyWidgets | ( | EnumeratorWidgetPtr & | _widgets | ) |
Destroy Enumerator of widgets
Definition at line 274 of file MyGUI_Gui.cpp.
void MyGUI::Gui::destroyWidgets | ( | VectorWidgetPtr & | _widgets | ) |
Destroy vector of widgets
Definition at line 269 of file MyGUI_Gui.cpp.
T* MyGUI::Gui::findWidget | ( | const std::string & | _name, | |
const std::string & | _prefix, | |||
bool | _throw = true | |||
) | [inline] |
Find widget by name and prefix and cast it to T type If widget not found or T and found widget have different types cause exception, or if the second parameter is false the nullptr pointer will be returned
Definition at line 185 of file MyGUI_Gui.h.
T* MyGUI::Gui::findWidget | ( | const std::string & | _name, | |
bool | _throw = true | |||
) | [inline] |
Find widget by name and cast it to T type. If widget not found or T and found widget have different types cause exception, or if the second parameter is false the nullptr pointer will be returned
Definition at line 174 of file MyGUI_Gui.h.
WidgetPtr MyGUI::Gui::findWidgetT | ( | const std::string & | _name, | |
const std::string & | _prefix, | |||
bool | _throw = true | |||
) | [inline] |
Find widget by name and prefix If widget is not found the exception will be thrown, or if the second parameter is false the nullptr pointer will be returned
Definition at line 164 of file MyGUI_Gui.h.
WidgetPtr MyGUI::Gui::findWidgetT | ( | const std::string & | _name, | |
bool | _throw = true | |||
) |
Find widget by name If widget is not found the exception will be thrown, or if the second parameter is false the nullptr pointer will be returned
Definition at line 205 of file MyGUI_Gui.cpp.
EnumeratorWidgetPtr MyGUI::Gui::getEnumerator | ( | ) | [inline] |
Get name of Gui ResourceGroup Get root widgets Enumerator
Definition at line 213 of file MyGUI_Gui.h.
int MyGUI::Gui::getViewHeight | ( | ) | [inline] |
Definition at line 117 of file MyGUI_Gui.h.
const IntSize& MyGUI::Gui::getViewSize | ( | ) | [inline] |
Get view size of GUI area
Definition at line 114 of file MyGUI_Gui.h.
int MyGUI::Gui::getViewWidth | ( | ) | [inline] |
Definition at line 116 of file MyGUI_Gui.h.
void MyGUI::Gui::initialise | ( | const std::string & | _core = "core.xml" , |
|
const std::string & | _logFileName = "MyGUI.log" | |||
) |
Initialise GUI and all GUI Managers
_core | name of core config file for MyGUI (contain main config files with skins, layers, fonts, etc.) | |
_logFileName | Log file name |
Definition at line 76 of file MyGUI_Gui.cpp.
void MyGUI::Gui::injectFrameEntered | ( | float | _time | ) |
Inject frame entered event. This function should be called every frame.
Definition at line 289 of file MyGUI_Gui.cpp.
Inject KeyPress event
Definition at line 192 of file MyGUI_Gui.cpp.
bool MyGUI::Gui::injectKeyRelease | ( | KeyCode | _key | ) |
Inject KeyReleas event
Definition at line 193 of file MyGUI_Gui.cpp.
bool MyGUI::Gui::injectMouseMove | ( | int | _absx, | |
int | _absy, | |||
int | _absz | |||
) |
Inject MouseMove event
Definition at line 188 of file MyGUI_Gui.cpp.
bool MyGUI::Gui::injectMousePress | ( | int | _absx, | |
int | _absy, | |||
MouseButton | _id | |||
) |
Inject MousePress event
Definition at line 189 of file MyGUI_Gui.cpp.
bool MyGUI::Gui::injectMouseRelease | ( | int | _absx, | |
int | _absy, | |||
MouseButton | _id | |||
) |
Inject MouseRelease event
Definition at line 190 of file MyGUI_Gui.cpp.
bool MyGUI::Gui::isVisiblePointer | ( | ) |
Is mouse pointer visible
Definition at line 284 of file MyGUI_Gui.cpp.
bool MyGUI::Gui::load | ( | const std::string & | _file | ) |
Load config with any info (file can have different data such other config files that will be loaded, skins, layers, pointers, etc)
Definition at line 259 of file MyGUI_Gui.cpp.
void MyGUI::Gui::resizeWindow | ( | const IntSize & | _size | ) |
Definition at line 313 of file MyGUI_Gui.cpp.
void MyGUI::Gui::setVisiblePointer | ( | bool | _visible | ) |
Show or hide mouse pointer
Definition at line 279 of file MyGUI_Gui.cpp.
void MyGUI::Gui::shutdown | ( | ) |
Shutdown GUI and all GUI Managers
Definition at line 136 of file MyGUI_Gui.cpp.
friend class WidgetManager [friend] |
Reimplemented from MyGUI::IWidgetCreator.
Definition at line 42 of file MyGUI_Gui.h.
Multidelegate for GUI per frame call.
signature : void method(float _time)
_time | Time elapsed since last frame |
Definition at line 220 of file MyGUI_Gui.h.