MyGUI 3.4.2
|
widget description should be here. More...
#include <MyGUI_Widget.h>
Public Types | |
typedef RTTIBase | Base |
typedef Widget | RTTIBase |
![]() | |
typedef IObject | RTTIBase |
Static Public Member Functions | |
static const std::string & | getClassTypeName () |
![]() | |
static const std::string & | getClassTypeName () |
Friends | |
class | WidgetManager |
Additional Inherited Members | |
![]() | |
IntRect | mMargin |
IntCoord | mCoord |
IntPoint | mAbsolutePosition |
bool | mIsMargin |
ICroppedRectangle * | mCroppedParent |
widget description should be here.
Definition at line 29 of file MyGUI_Widget.h.
Definition at line 41 of file MyGUI_Widget.h.
Definition at line 41 of file MyGUI_Widget.h.
MyGUI::Widget::Widget | ( | ) |
Definition at line 31 of file MyGUI_Widget.cpp.
|
overrideprotecteddefault |
Definition at line 1035 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::_createSkinWidget | ( | WidgetStyle | _style, |
const std::string & | _type, | ||
const std::string & | _skin, | ||
const IntCoord & | _coord, | ||
Align | _align, | ||
const std::string & | _layer = "" , |
||
const std::string & | _name = "" |
||
) |
Definition at line 1139 of file MyGUI_Widget.cpp.
|
protected |
Definition at line 410 of file MyGUI_Widget.cpp.
Definition at line 379 of file MyGUI_Widget.cpp.
Definition at line 515 of file MyGUI_Widget.cpp.
|
protected |
If there is client widget return it, otherwise return this.
Definition at line 1129 of file MyGUI_Widget.cpp.
Definition at line 1134 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::_getContainer | ( | ) | const |
Definition at line 1315 of file MyGUI_Widget.cpp.
Reimplemented in MyGUI::ItemBox.
Definition at line 1320 of file MyGUI_Widget.cpp.
Reimplemented in MyGUI::ItemBox, and MyGUI::ListBox.
Definition at line 1305 of file MyGUI_Widget.cpp.
void MyGUI::Widget::_initialise | ( | WidgetStyle | _style, |
const IntCoord & | _coord, | ||
const std::string & | _skinName, | ||
Widget * | _parent, | ||
ICroppedRectangle * | _croppedParent, | ||
const std::string & | _name | ||
) |
Definition at line 48 of file MyGUI_Widget.cpp.
Reimplemented in MyGUI::ComboBox, MyGUI::ItemBox, and MyGUI::ListBox.
Definition at line 1029 of file MyGUI_Widget.cpp.
Definition at line 568 of file MyGUI_Widget.cpp.
Definition at line 1310 of file MyGUI_Widget.cpp.
Definition at line 374 of file MyGUI_Widget.cpp.
void MyGUI::Widget::_shutdown | ( | ) |
Definition at line 123 of file MyGUI_Widget.cpp.
void MyGUI::Widget::_updateChilds | ( | ) |
Definition at line 1390 of file MyGUI_Widget.cpp.
|
protected |
Definition at line 327 of file MyGUI_Widget.cpp.
|
inlineprotected |
Definition at line 336 of file MyGUI_Widget.h.
void MyGUI::Widget::attachToWidget | ( | Widget * | _parent, |
WidgetStyle | _style = WidgetStyle::Child , |
||
const std::string & | _layer = "" |
||
) |
Attach widget to parent
_parent | New parent |
_style | New widget style (see WidgetStyle::Enum) |
_layer | Attach to specified layer (if any) |
Definition at line 798 of file MyGUI_Widget.cpp.
|
protected |
Definition at line 287 of file MyGUI_Widget.cpp.
|
protectedvirtual |
Reimplemented in MyGUI::Button.
Definition at line 951 of file MyGUI_Widget.cpp.
Change widget skin
Definition at line 154 of file MyGUI_Widget.cpp.
|
inline |
Same as Widget::createWidgetT but return T pointer instead of Widget*
Definition at line 67 of file MyGUI_Widget.h.
|
inline |
Same as Widget::createWidgetT but return T pointer instead of Widget*
Definition at line 74 of file MyGUI_Widget.h.
|
inline |
Same as Widget::createWidgetT but return T* instead of Widget*
Definition at line 106 of file MyGUI_Widget.h.
|
inline |
Same as Widget::createWidgetRealT but return T* instead of Widget*
Definition at line 81 of file MyGUI_Widget.h.
|
inline |
Same as Widget::createWidgetRealT but return T* instead of Widget*
Definition at line 88 of file MyGUI_Widget.h.
Widget * MyGUI::Widget::createWidgetRealT | ( | const std::string & | _type, |
const std::string & | _skin, | ||
const FloatCoord & | _coord, | ||
Align | _align, | ||
const std::string & | _name = "" |
||
) |
Create widget using coordinates relative to parent. see Widget::createWidgetT(const std::string& _type, const std::string& _skin, const IntCoord& _coord, Align _align, const std::string& _name = "")
Definition at line 322 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::createWidgetRealT | ( | const std::string & | _type, |
const std::string & | _skin, | ||
float | _left, | ||
float | _top, | ||
float | _width, | ||
float | _height, | ||
Align | _align, | ||
const std::string & | _name = "" |
||
) |
Create widget using coordinates relative to parent. see Widget::createWidgetT(const std::string& _type, const std::string& _skin, const IntCoord& _coord, Align _align, const std::string& _name = "")
Definition at line 919 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::createWidgetT | ( | const std::string & | _type, |
const std::string & | _skin, | ||
const IntCoord & | _coord, | ||
Align | _align, | ||
const std::string & | _name = "" |
||
) |
Create child 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) |
_name | if needed (you can use it for finding widget by name later) |
Definition at line 909 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::createWidgetT | ( | const std::string & | _type, |
const std::string & | _skin, | ||
int | _left, | ||
int | _top, | ||
int | _width, | ||
int | _height, | ||
Align | _align, | ||
const std::string & | _name = "" |
||
) |
See Widget::createWidgetT(const std::string& _type, const std::string& _skin, const IntCoord& _coord, Align _align, const std::string& _name = "")
Definition at line 914 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::createWidgetT | ( | WidgetStyle | _style, |
const std::string & | _type, | ||
const std::string & | _skin, | ||
const IntCoord & | _coord, | ||
Align | _align, | ||
const std::string & | _layer = "" , |
||
const std::string & | _name = "" |
||
) |
Create child widget
_style | Child, Popup or Overlapped widget style |
_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.xml file). |
_name | optional widget name (you can use it for finding widget by name later) |
Definition at line 924 of file MyGUI_Widget.cpp.
Detach widget from widgets hierarchy
_layer | Attach to specified layer (if any) |
Definition at line 736 of file MyGUI_Widget.cpp.
Find widget by name. Search recursively through all childs starting from this widget.
Definition at line 537 of file MyGUI_Widget.cpp.
void MyGUI::Widget::findWidgets | ( | const std::string & | _name, |
VectorWidgetPtr & | _result | ||
) |
Find all widgets with given name and add them into _result. Search recursively through all childs starting from this widget.
Definition at line 1099 of file MyGUI_Widget.cpp.
Align MyGUI::Widget::getAlign | ( | ) | const |
Get align
Definition at line 1255 of file MyGUI_Widget.cpp.
float MyGUI::Widget::getAlpha | ( | ) | const |
Get widget opacity
Definition at line 1260 of file MyGUI_Widget.cpp.
Get child by index (index from 0 to child_count - 1)
Definition at line 943 of file MyGUI_Widget.cpp.
size_t MyGUI::Widget::getChildCount | ( | ) | const |
Get child count
Definition at line 936 of file MyGUI_Widget.cpp.
Definition at line 41 of file MyGUI_Widget.h.
IntCoord MyGUI::Widget::getClientCoord | ( | ) | const |
Get rectangle where child widgets placed
Definition at line 427 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::getClientWidget | ( | ) |
Get client area widget or nullptr if widget don't have client
Definition at line 1290 of file MyGUI_Widget.cpp.
Definition at line 1295 of file MyGUI_Widget.cpp.
int MyGUI::Widget::getDepth | ( | ) | const |
Get child widget rendering depth
Definition at line 1365 of file MyGUI_Widget.cpp.
bool MyGUI::Widget::getEnabled | ( | ) | const |
Is widget enabled
Definition at line 1285 of file MyGUI_Widget.cpp.
EnumeratorWidgetPtr MyGUI::Widget::getEnumerator | ( | ) | const |
Get child widgets Enumerator
Definition at line 929 of file MyGUI_Widget.cpp.
bool MyGUI::Widget::getInheritedEnabled | ( | ) | const |
Is widget enabled and all it's parents in hierarchy are enabled.
Definition at line 1335 of file MyGUI_Widget.cpp.
bool MyGUI::Widget::getInheritedVisible | ( | ) | const |
Return widget's visibility based on it's and parents visibility.
Definition at line 1340 of file MyGUI_Widget.cpp.
bool MyGUI::Widget::getInheritsAlpha | ( | ) | const |
Get inherits alpha mode flag
Definition at line 1265 of file MyGUI_Widget.cpp.
|
overrideprotectedvirtual |
Implements MyGUI::ILayerItem.
Definition at line 464 of file MyGUI_Widget.cpp.
Implements MyGUI::ILayerItem.
Definition at line 1325 of file MyGUI_Widget.cpp.
const std::string & MyGUI::Widget::getName | ( | ) | const |
Get name of widget.
Definition at line 1245 of file MyGUI_Widget.cpp.
Widget * MyGUI::Widget::getParent | ( | ) | const |
Get parent widget or nullptr if no parent
Definition at line 1275 of file MyGUI_Widget.cpp.
IntSize MyGUI::Widget::getParentSize | ( | ) | const |
Get parent widget size. If there is no parent get layer size
Definition at line 1019 of file MyGUI_Widget.cpp.
|
protected |
Definition at line 1089 of file MyGUI_Widget.cpp.
Get type name as string
Reimplemented from MyGUI::IObject.
Reimplemented in MyGUI::Button, MyGUI::Canvas, MyGUI::ComboBox, MyGUI::DDContainer, MyGUI::VScroll, MyGUI::HScroll, MyGUI::EditBox, MyGUI::ImageBox, MyGUI::ItemBox, MyGUI::ListBox, MyGUI::MenuBar, MyGUI::MenuControl, MyGUI::MenuItem, MyGUI::MultiListBox, MyGUI::MultiListItem, MyGUI::PopupMenu, MyGUI::ProgressBar, MyGUI::ScrollBar, MyGUI::ScrollView, MyGUI::TabControl, MyGUI::TabItem, MyGUI::TextBox, and MyGUI::Window.
Definition at line 41 of file MyGUI_Widget.h.
bool MyGUI::Widget::getVisible | ( | ) | const |
Return true if visible
Definition at line 1250 of file MyGUI_Widget.cpp.
WidgetStyle MyGUI::Widget::getWidgetStyle | ( | ) | const |
Get widget style
Definition at line 1300 of file MyGUI_Widget.cpp.
|
protectedvirtual |
Reimplemented in MyGUI::Button, MyGUI::Canvas, MyGUI::ComboBox, MyGUI::EditBox, MyGUI::ItemBox, MyGUI::ListBox, MyGUI::MenuControl, MyGUI::MenuItem, MyGUI::MultiListBox, MyGUI::MultiListItem, MyGUI::ProgressBar, MyGUI::ScrollBar, MyGUI::ScrollView, MyGUI::TabControl, MyGUI::TabItem, and MyGUI::Window.
Definition at line 1058 of file MyGUI_Widget.cpp.
bool MyGUI::Widget::isRootWidget | ( | ) | const |
Is this widget is root widget (root == without parents)
Definition at line 1270 of file MyGUI_Widget.cpp.
Compare with selected type
Definition at line 41 of file MyGUI_Widget.h.
Compare with selected type
Reimplemented from MyGUI::IObject.
Reimplemented in MyGUI::Button, MyGUI::Canvas, MyGUI::ComboBox, MyGUI::DDContainer, MyGUI::VScroll, MyGUI::HScroll, MyGUI::EditBox, MyGUI::ImageBox, MyGUI::ItemBox, MyGUI::ListBox, MyGUI::MenuBar, MyGUI::MenuControl, MyGUI::MenuItem, MyGUI::MultiListBox, MyGUI::MultiListItem, MyGUI::PopupMenu, MyGUI::ProgressBar, MyGUI::ScrollBar, MyGUI::ScrollView, MyGUI::TabControl, MyGUI::TabItem, MyGUI::TextBox, and MyGUI::Window.
Definition at line 41 of file MyGUI_Widget.h.
Reimplemented in MyGUI::MenuControl, MyGUI::MenuItem, MyGUI::MultiListBox, and MyGUI::TabControl.
Definition at line 1115 of file MyGUI_Widget.cpp.
Reimplemented in MyGUI::MultiListBox.
Definition at line 1119 of file MyGUI_Widget.cpp.
Set align
Definition at line 731 of file MyGUI_Widget.cpp.
Set widget opacity
Definition at line 434 of file MyGUI_Widget.cpp.
Definition at line 1011 of file MyGUI_Widget.cpp.
Set widget position and size
Reimplemented from MyGUI::ICroppedRectangle.
Reimplemented in MyGUI::Window, and MyGUI::Window.
Definition at line 686 of file MyGUI_Widget.cpp.
See Widget::setCoord(const IntCoord& _coord)
Definition at line 1225 of file MyGUI_Widget.cpp.
Set child widget rendering depth for ordering child widgets. Widget with higher depth is rendered below widget with lower depth. Available only for child widgets. For root widgets use layer property instead.
Definition at line 1350 of file MyGUI_Widget.cpp.
Enable or disable widget
Definition at line 986 of file MyGUI_Widget.cpp.
Enable or disable widget without changing widget's state
Definition at line 1280 of file MyGUI_Widget.cpp.
Enable or disable inherits alpha mode.
Inherits alpha mode: when enabled widget alpha is it's own alpha value multiplied by parent's real alpha (that depend on parent's parent and so on).
When disabled widget's alpha doesn't depend on parent's alpha. So this is used when you need things like semi-transparent window with non-transparent text on it and window's alpha changes.
Enabled (true) by default.
Definition at line 458 of file MyGUI_Widget.cpp.
Set widget position (position of left top corner)
Reimplemented from MyGUI::ICroppedRectangle.
Reimplemented in MyGUI::Window, and MyGUI::Window.
Definition at line 632 of file MyGUI_Widget.cpp.
See Widget::setPosition(const IntPoint& _pos)
Definition at line 1215 of file MyGUI_Widget.cpp.
Set any widget property
_key | Property name (for example Alpha or Enabled) |
_value | Value converted to string |
Definition at line 1071 of file MyGUI_Widget.cpp.
|
protectedvirtual |
Reimplemented in MyGUI::Button, MyGUI::ComboBox, MyGUI::DDContainer, MyGUI::EditBox, MyGUI::ImageBox, MyGUI::ItemBox, MyGUI::ListBox, MyGUI::MenuControl, MyGUI::MenuItem, MyGUI::MultiListItem, MyGUI::ProgressBar, MyGUI::ScrollBar, MyGUI::ScrollView, MyGUI::TabControl, MyGUI::TabItem, MyGUI::TextBox, and MyGUI::Window.
Definition at line 1144 of file MyGUI_Widget.cpp.
void MyGUI::Widget::setRealCoord | ( | const FloatCoord & | _value | ) |
Set widget position and size
Definition at line 563 of file MyGUI_Widget.cpp.
See Widget::setRealPosition(const FloatCoord& _coord)
Definition at line 1240 of file MyGUI_Widget.cpp.
void MyGUI::Widget::setRealPosition | ( | const FloatPoint & | _value | ) |
Set widget position (position of left top corner)
Definition at line 553 of file MyGUI_Widget.cpp.
See Widget::setRealPosition(const FloatPoint& _point)
Definition at line 1230 of file MyGUI_Widget.cpp.
Set widget size
Definition at line 558 of file MyGUI_Widget.cpp.
See Widget::setRealSize(const FloatSize& _size)
Definition at line 1235 of file MyGUI_Widget.cpp.
Set widget size
Reimplemented from MyGUI::ICroppedRectangle.
Reimplemented in MyGUI::Window, and MyGUI::Window.
Definition at line 649 of file MyGUI_Widget.cpp.
See Widget::setSize(const IntSize& _size)
Definition at line 1220 of file MyGUI_Widget.cpp.
Hide or show widget
Reimplemented in MyGUI::MenuControl, and MyGUI::Window.
Definition at line 959 of file MyGUI_Widget.cpp.
Definition at line 1123 of file MyGUI_Widget.cpp.
void MyGUI::Widget::setWidgetStyle | ( | WidgetStyle | _style, |
const std::string & | _layer = "" |
||
) |
Set widget style.
_style | New widget style (see WidgetStyle::Enum) |
_layer | Attach to specified layer (if any) |
Definition at line 895 of file MyGUI_Widget.cpp.
|
protectedvirtual |
Reimplemented in MyGUI::Button, MyGUI::Canvas, MyGUI::ComboBox, MyGUI::EditBox, MyGUI::ImageBox, MyGUI::ItemBox, MyGUI::ListBox, MyGUI::MenuControl, MyGUI::MenuItem, MyGUI::MultiListBox, MyGUI::MultiListItem, MyGUI::ProgressBar, MyGUI::ScrollBar, MyGUI::ScrollView, MyGUI::TabControl, MyGUI::TabItem, and MyGUI::Window.
Definition at line 1054 of file MyGUI_Widget.cpp.
|
friend |
Definition at line 39 of file MyGUI_Widget.h.
EventHandle_WidgetVoid MyGUI::Widget::eventChangeCoord |
Event : Widget coordinate changed (widget was resized or moved).
signature : void method(MyGUI::Widget* _sender)
_sender | widget that called this event |
Definition at line 274 of file MyGUI_Widget.h.
EventHandle_WidgetStringString MyGUI::Widget::eventChangeProperty |
Event : Widget property changed through setProperty (in code, or from layout)
signature : void method(MyGUI::Widget* _sender, const std::string& _key, const std::string& _value);
_sender | widget that called this event |
_key | |
_value |
Definition at line 268 of file MyGUI_Widget.h.
EventHandle_WidgetVoid MyGUI::Widget::eventWidgetDestroyed |
Event : Widget is about to be destroyed, but its content is valid at this point.
signature : void method(MyGUI::Widget* _sender)
_sender | widget that called this event |
Definition at line 280 of file MyGUI_Widget.h.