MyGUI  3.0.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
MyGUI::Widget Class Reference

#include <MyGUI_Widget.h>

+ Inheritance diagram for MyGUI::Widget:

Public Types

typedef Widget RTTIBase

Public Member Functions

virtual const std::string & getTypeName () const
virtual bool isType (const std::type_info &_type) const
template<typename Type >
bool isType () const
template<typename Type >
Type * castType (bool _throw=true)
template<typename Type >
const Type * castType (bool _throw=true) const
 Widget ()
WidgetcreateWidgetT (const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_name="")
WidgetcreateWidgetT (const std::string &_type, const std::string &_skin, int _left, int _top, int _width, int _height, Align _align, const std::string &_name="")
WidgetcreateWidgetRealT (const std::string &_type, const std::string &_skin, const FloatCoord &_coord, Align _align, const std::string &_name="")
WidgetcreateWidgetRealT (const std::string &_type, const std::string &_skin, float _left, float _top, float _width, float _height, Align _align, const std::string &_name="")
template<typename T >
T * createWidget (const std::string &_skin, const IntCoord &_coord, Align _align, 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 &_name="")
template<typename T >
T * createWidgetReal (const std::string &_skin, const FloatCoord &_coord, Align _align, 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 &_name="")
WidgetcreateWidgetT (WidgetStyle _style, const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer="", const std::string &_name="")
template<typename T >
T * createWidget (WidgetStyle _style, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer="", const std::string &_name="")
const std::string & getName () const
 Get name of widget.
virtual void setPosition (const IntPoint &_value)
virtual void setSize (const IntSize &_value)
virtual void setCoord (const IntCoord &_value)
void setPosition (int _left, int _top)
void setSize (int _width, int _height)
void setCoord (int _left, int _top, int _width, int _height)
void setRealPosition (const FloatPoint &_value)
void setRealSize (const FloatSize &_value)
void setRealCoord (const FloatCoord &_value)
void setRealPosition (float _left, float _top)
void setRealSize (float _width, float _height)
void setRealCoord (float _left, float _top, float _width, float _height)
virtual void setVisible (bool _value)
virtual void setAlign (Align _value)
virtual void setCaption (const UString &_value)
virtual const UStringgetCaption ()
void setAlpha (float _value)
float getAlpha ()
void setInheritsAlpha (bool _value)
bool isInheritsAlpha ()
bool setState (const std::string &_value)
void setColour (const Colour &_value)
bool isRootWidget ()
WidgetgetParent ()
EnumeratorWidgetPtr getEnumerator ()
size_t getChildCount ()
WidgetgetChildAt (size_t _index)
WidgetfindWidget (const std::string &_name)
void setNeedKeyFocus (bool _value)
bool isNeedKeyFocus ()
void setNeedMouseFocus (bool _value)
bool isNeedMouseFocus ()
void setInheritsPick (bool _value)
bool isInheritsPick ()
void setMaskPick (const std::string &_filename)
virtual void setEnabled (bool _value)
void setEnabledSilent (bool _value)
bool isEnabled ()
void setPointer (const std::string &_value)
const std::string & getPointer ()
const std::string & getLayerName ()
IntCoord getClientCoord ()
WidgetgetClientWidget ()
ISubWidgetTextgetSubWidgetText ()
ISubWidgetRectgetSubWidgetMain ()
void setNeedToolTip (bool _value)
bool getNeedToolTip ()
void setEnableToolTip (bool _value)
bool getEnableToolTip ()
void detachFromWidget (const std::string &_layer="")
void attachToWidget (Widget *_parent, WidgetStyle _style=WidgetStyle::Child, const std::string &_layer="")
void changeWidgetSkin (const std::string &_skinname)
void setWidgetStyle (WidgetStyle _style, const std::string &_layer="")
WidgetStyle getWidgetStyle ()
virtual void setProperty (const std::string &_key, const std::string &_value)
virtual void _getContainer (Widget *&_container, size_t &_index)
void _forcePeek (Widget *_widget)
void _setUVSet (const FloatRect &_rect)
virtual void _setTextureName (const std::string &_texture)
virtual const std::string & _getTextureName ()
IWidgetCreator_getIWidgetCreator ()
IntCoord _getTextRegion ()
IntSize _getTextSize ()
void _setFontName (const std::string &_font)
const std::string & _getFontName ()
void _setFontHeight (int _height)
int _getFontHeight ()
void _setTextAlign (Align _align)
Align _getTextAlign ()
void _setTextColour (const Colour &_colour)
const Colour_getTextColour ()
void setCaptionWithNewLine (const std::string &_value)
virtual void _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, Widget *_parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name)
void setPosition (const IntCoord &_coord)
void setPosition (int _left, int _top, int _width, int _height)
void enableToolTip (bool _enable)
void setInheritsPeek (bool _inherits)
bool isInheritsPeek ()
void setMaskPeek (const std::string &_filename)
IntCoord getTextCoord ()
IntSize getTextSize ()
void setFontName (const std::string &_font)
const std::string & getFontName ()
void setFontHeight (int _height)
int getFontHeight ()
void setTextAlign (Align _align)
Align getTextAlign ()
void setTextColour (const Colour &_colour)
const ColourgetTextColour ()

Static Public Member Functions

static const std::string & getClassTypeName ()

Protected Member Functions

 Widget (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, Widget *_parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name)
virtual ~Widget ()
virtual void baseChangeWidgetSkin (ResourceSkin *_info)
void _updateView ()
void _setAlign (const IntSize &_oldsize, bool _update)
void _setAlign (const IntCoord &_oldcoord, bool _update)
virtual WidgetbaseCreateWidget (WidgetStyle _style, const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer, const std::string &_name)
virtual void _destroyChildWidget (Widget *_widget)
virtual void _destroyAllChildWidget ()
virtual size_t _getContainerIndex (const IntPoint &_point)
virtual void _resetContainer (bool _update)
virtual void baseUpdateEnable ()
virtual ILayerItemgetLayerItemByPoint (int _left, int _top)
virtual const IntCoordgetLayerItemCoord ()

Protected Attributes

MapWidgetStateInfo mStateInfo
MaskPickInfo const * mMaskPickInfo
MaskPickInfo mOwnMaskPickInfo
VectorWidgetPtr mWidgetChild
VectorWidgetPtr mWidgetChildSkin
VectorSubWidget mSubSkinChild
ISubWidgetTextmText
ISubWidgetRectmMainSkin
bool mEnabled
bool mInheritsEnabled
bool mSubSkinsVisible
bool mInheritsVisible
float mAlpha
float mRealAlpha
bool mInheritsAlpha
std::string mName
std::string mPointer
std::string mTextureName
ITexturemTexture
WidgetmParent
IWidgetCreatormIWidgetCreator
bool mNeedKeyFocus
bool mNeedMouseFocus
bool mInheritsPick
WidgetmWidgetClient
bool mNeedToolTip
bool mEnableToolTip
bool mToolTipVisible
float mToolTipCurrentTime
IntPoint mToolTipOldPoint
size_t mToolTipOldIndex
IntPoint m_oldMousePoint
WidgetStyle mWidgetStyle
FloatCoord mRelativeCoord
bool mDisableUpdateRelative

Friends

class IWidgetCreator

Detailed Description

Definition at line 41 of file MyGUI_Widget.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Definition at line 77 of file MyGUI_Widget.cpp.

MyGUI::Widget::Widget ( WidgetStyle  _style,
const IntCoord _coord,
Align  _align,
ResourceSkin _info,
Widget _parent,
ICroppedRectangle _croppedParent,
IWidgetCreator _creator,
const std::string &  _name 
) [protected]

Definition at line 48 of file MyGUI_Widget.cpp.

MyGUI::Widget::~Widget ( ) [protected, virtual]

Definition at line 191 of file MyGUI_Widget.cpp.


Member Function Documentation

void MyGUI::Widget::_destroyAllChildWidget ( ) [protected, virtual]

Implements MyGUI::IWidgetCreator.

Definition at line 490 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_destroyChildWidget ( Widget _widget) [protected, virtual]

Implements MyGUI::IWidgetCreator.

Definition at line 462 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_forcePeek ( Widget _widget)

Definition at line 622 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_getContainer ( Widget *&  _container,
size_t &  _index 
) [virtual]

Reimplemented in MyGUI::DDContainer.

Definition at line 651 of file MyGUI_Widget.cpp.

virtual size_t MyGUI::Widget::_getContainerIndex ( const IntPoint _point) [inline, protected, virtual]

Reimplemented in MyGUI::ItemBox, and MyGUI::ListCtrl.

Definition at line 393 of file MyGUI_Widget.h.

Definition at line 932 of file MyGUI_Widget.cpp.

const std::string & MyGUI::Widget::_getFontName ( )

Definition at line 911 of file MyGUI_Widget.cpp.

Definition at line 307 of file MyGUI_Widget.h.

Definition at line 878 of file MyGUI_Widget.cpp.

Definition at line 895 of file MyGUI_Widget.cpp.

Definition at line 948 of file MyGUI_Widget.cpp.

Definition at line 940 of file MyGUI_Widget.cpp.

const std::string & MyGUI::Widget::_getTextureName ( ) [virtual]

Definition at line 605 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_initialise ( WidgetStyle  _style,
const IntCoord _coord,
Align  _align,
ResourceSkin _info,
Widget _parent,
ICroppedRectangle _croppedParent,
IWidgetCreator _creator,
const std::string &  _name 
) [virtual]
void MyGUI::Widget::_resetContainer ( bool  _update) [protected, virtual]

Reimplemented in MyGUI::ItemBox, and MyGUI::ListCtrl.

Definition at line 815 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setAlign ( const IntSize _oldsize,
bool  _update 
) [protected, virtual]

Reimplemented from MyGUI::ICroppedRectangle.

Definition at line 962 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setAlign ( const IntCoord _oldcoord,
bool  _update 
) [protected, virtual]

Reimplemented from MyGUI::ICroppedRectangle.

Definition at line 956 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setFontHeight ( int  _height)

Definition at line 924 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setFontName ( const std::string &  _font)

Definition at line 903 of file MyGUI_Widget.cpp.

Definition at line 870 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setTextColour ( const Colour _colour)

Definition at line 887 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setTextureName ( const std::string &  _texture) [virtual]

Definition at line 595 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setUVSet ( const FloatRect _rect)

Definition at line 590 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_updateView ( ) [protected, virtual]

Reimplemented from MyGUI::ICroppedRectangle.

Definition at line 377 of file MyGUI_Widget.cpp.

void MyGUI::Widget::attachToWidget ( Widget _parent,
WidgetStyle  _style = WidgetStyle::Child,
const std::string &  _layer = "" 
)

Attach widget to parent

Parameters:
_styleChild widget type
_layerAttach to specified layer (if any)
Note:
you might also need to call void Widget::setWidgetStyle(WidgetStyle _style); to set widget style (widget attached with MyGUI::WidgetStyle::Popup by default)

Definition at line 1301 of file MyGUI_Widget.cpp.

void MyGUI::Widget::baseChangeWidgetSkin ( ResourceSkin _info) [protected, virtual]
Widget * MyGUI::Widget::baseCreateWidget ( WidgetStyle  _style,
const std::string &  _type,
const std::string &  _skin,
const IntCoord _coord,
Align  _align,
const std::string &  _layer,
const std::string &  _name 
) [protected, virtual]

Implements MyGUI::IWidgetCreator.

Reimplemented in MyGUI::Tab, MyGUI::MenuCtrl, MyGUI::Window, MyGUI::MenuItem, and MyGUI::ScrollView.

Definition at line 359 of file MyGUI_Widget.cpp.

void MyGUI::Widget::baseUpdateEnable ( ) [protected, virtual]

Reimplemented in MyGUI::Button.

Definition at line 1627 of file MyGUI_Widget.cpp.

template<typename Type >
Type* MyGUI::Widget::castType ( bool  _throw = true) [inline]

Try to cast pointer to selected type. \

Parameters:
_throwIf true throw exception when casting in wrong type, else return nullptr \

Reimplemented from MyGUI::IObject.

Definition at line 53 of file MyGUI_Widget.h.

template<typename Type >
const Type* MyGUI::Widget::castType ( bool  _throw = true) const [inline]

Try to cast pointer to selected type. \

Parameters:
_throwIf true throw exception when casting in wrong type, else return nullptr \

Reimplemented from MyGUI::IObject.

Definition at line 53 of file MyGUI_Widget.h.

void MyGUI::Widget::changeWidgetSkin ( const std::string &  _skinname)

Change widget skin

Definition at line 214 of file MyGUI_Widget.cpp.

template<typename T >
T* MyGUI::Widget::createWidget ( const std::string &  _skin,
const IntCoord _coord,
Align  _align,
const std::string &  _name = "" 
) [inline]

Same as Widget::createWidgetT but return T pointer instead of Widget*

Definition at line 79 of file MyGUI_Widget.h.

template<typename T >
T* MyGUI::Widget::createWidget ( const std::string &  _skin,
int  _left,
int  _top,
int  _width,
int  _height,
Align  _align,
const std::string &  _name = "" 
) [inline]

Same as Widget::createWidgetT but return T pointer instead of Widget*

Definition at line 86 of file MyGUI_Widget.h.

template<typename T >
T* MyGUI::Widget::createWidget ( WidgetStyle  _style,
const std::string &  _skin,
const IntCoord _coord,
Align  _align,
const std::string &  _layer = "",
const std::string &  _name = "" 
) [inline]

Same as Widget::createWidgetT but return T* instead of Widget*

Definition at line 117 of file MyGUI_Widget.h.

template<typename T >
T* MyGUI::Widget::createWidgetReal ( const std::string &  _skin,
const FloatCoord _coord,
Align  _align,
const std::string &  _name = "" 
) [inline]

Same as Widget::createWidgetRealT but return T* instead of Widget*

Definition at line 93 of file MyGUI_Widget.h.

template<typename T >
T* MyGUI::Widget::createWidgetReal ( const std::string &  _skin,
float  _left,
float  _top,
float  _width,
float  _height,
Align  _align,
const std::string &  _name = "" 
) [inline]

Same as Widget::createWidgetRealT but return T* instead of Widget*

Definition at line 100 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 372 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 1512 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

Parameters:
_typewidget type
_skinwidget skin
_coordint coordinates of widget (_left, _top, _width, _height)
_alignwidget align (possible values can be found in enum Align)
_nameif needed (you can use it for finding widget by name later)

Definition at line 1502 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 1507 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

Parameters:
_styleChild, Popup or Overlapped widget style
_typewidget type
_skinwidget skin
_coordint coordinates of widget (_left, _top, _width, _height)
_alignwidget align (possible values can be found in enum Align)
_nameif needed (you can use it for finding widget by name later)

Definition at line 1517 of file MyGUI_Widget.cpp.

void MyGUI::Widget::detachFromWidget ( const std::string &  _layer = "")

Detach widget from widgets hierarchy

Parameters:
_layerAttach to specified layer (if any)

Definition at line 1239 of file MyGUI_Widget.cpp.

void MyGUI::Widget::enableToolTip ( bool  _enable) [inline]
Deprecated:
"use : void Widget::setEnableToolTip"

Definition at line 334 of file MyGUI_Widget.h.

Widget * MyGUI::Widget::findWidget ( const std::string &  _name)

Find widget by name (search recursively through all childs starting from this widget)

Definition at line 658 of file MyGUI_Widget.cpp.

float MyGUI::Widget::getAlpha ( ) [inline]

Get widget opacity

Definition at line 168 of file MyGUI_Widget.h.

const UString & MyGUI::Widget::getCaption ( ) [virtual]

Get widget caption

Reimplemented in MyGUI::Edit, MyGUI::Window, and MyGUI::TabItem.

Definition at line 436 of file MyGUI_Widget.cpp.

Widget * MyGUI::Widget::getChildAt ( size_t  _index)

Get child by index (index from 0 to child_count - 1)

Definition at line 1536 of file MyGUI_Widget.cpp.

Get child count

Definition at line 1529 of file MyGUI_Widget.cpp.

static const std::string& MyGUI::Widget::getClassTypeName ( ) [inline, static]

Get rect where child widgets placed

Reimplemented in MyGUI::ScrollView.

Definition at line 510 of file MyGUI_Widget.cpp.

Get clien area widget or nullptr if widget don't have client

Definition at line 246 of file MyGUI_Widget.h.

Get tool tip enabled flag

Definition at line 261 of file MyGUI_Widget.h.

Get child widgets Enumerator

Definition at line 1522 of file MyGUI_Widget.cpp.

int MyGUI::Widget::getFontHeight ( ) [inline]
Deprecated:
"use : int StaticText::getFontHeight()"

Reimplemented in MyGUI::StaticText.

Definition at line 357 of file MyGUI_Widget.h.

const std::string& MyGUI::Widget::getFontName ( ) [inline]
Deprecated:
"use : const std::string& StaticText::getFontName()"

Reimplemented in MyGUI::StaticText.

Definition at line 352 of file MyGUI_Widget.h.

ILayerItem * MyGUI::Widget::getLayerItemByPoint ( int  _left,
int  _top 
) [protected, virtual]

Implements MyGUI::ILayerItem.

Definition at line 548 of file MyGUI_Widget.cpp.

virtual const IntCoord& MyGUI::Widget::getLayerItemCoord ( ) [inline, protected, virtual]

Implements MyGUI::ILayerItem.

Definition at line 402 of file MyGUI_Widget.h.

const std::string & MyGUI::Widget::getLayerName ( )

Get widget's layer, return "" if widget is not root widget (root == without parents)

Definition at line 640 of file MyGUI_Widget.cpp.

const std::string& MyGUI::Widget::getName ( void  ) const [inline]

Get name of widget.

Definition at line 123 of file MyGUI_Widget.h.

bool MyGUI::Widget::getNeedToolTip ( ) [inline]

Get need tool tip mode flag

Definition at line 256 of file MyGUI_Widget.h.

Get parent widget or nullptr if no parent

Definition at line 185 of file MyGUI_Widget.h.

const std::string & MyGUI::Widget::getPointer ( )

Get mouse pointer name for this widget

Definition at line 1544 of file MyGUI_Widget.cpp.

Get sub widget of first texture or nullptr if no sub widget with texture

Definition at line 251 of file MyGUI_Widget.h.

Get text sub widget or nullptr if no text sub widget

Definition at line 249 of file MyGUI_Widget.h.

Deprecated:
"use : Align StaticText::getTextAlign()"

Reimplemented in MyGUI::StaticText.

Definition at line 362 of file MyGUI_Widget.h.

const Colour& MyGUI::Widget::getTextColour ( ) [inline]
Deprecated:
"use : const Colour& StaticText::getTextColour()"

Reimplemented in MyGUI::StaticText.

Definition at line 367 of file MyGUI_Widget.h.

Deprecated:
"use : const IntCoord& StaticText::getTextRegion()"

Definition at line 345 of file MyGUI_Widget.h.

Deprecated:
"use : IntSize StaticText::getTextSize()"

Reimplemented in MyGUI::StaticText.

Definition at line 347 of file MyGUI_Widget.h.

virtual const std::string& MyGUI::Widget::getTypeName ( ) const [inline, virtual]

Get widget style

Definition at line 286 of file MyGUI_Widget.h.

bool MyGUI::Widget::isEnabled ( ) [inline]

Is widget enabled

Definition at line 232 of file MyGUI_Widget.h.

bool MyGUI::Widget::isInheritsAlpha ( ) [inline]

Get inherits alpha mode flag

Definition at line 173 of file MyGUI_Widget.h.

bool MyGUI::Widget::isInheritsPeek ( ) [inline]
Deprecated:
"use : bool isInheritsPick()"

Definition at line 339 of file MyGUI_Widget.h.

bool MyGUI::Widget::isInheritsPick ( ) [inline]

Get inherits mode flag

Definition at line 222 of file MyGUI_Widget.h.

bool MyGUI::Widget::isNeedKeyFocus ( ) [inline]

Is need key focus If disable this widget won't be reacting on keyboard at all.
Enabled (true) by default.

Definition at line 205 of file MyGUI_Widget.h.

Is need mouse focus If disable this widget won't be reacting on mouse at all.
Enabled (true) by default.

Definition at line 213 of file MyGUI_Widget.h.

bool MyGUI::Widget::isRootWidget ( ) [inline]

Is this widget is root widget (root == without parents)

Definition at line 182 of file MyGUI_Widget.h.

template<typename Type >
bool MyGUI::Widget::isType ( ) const [inline]
virtual bool MyGUI::Widget::isType ( const std::type_info &  _type) const [inline, virtual]
void MyGUI::Widget::setAlign ( Align  _value) [virtual]

Set align

Reimplemented from MyGUI::ICroppedRectangle.

Definition at line 1205 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setAlpha ( float  _value)

Set widget opacity

Definition at line 517 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setCaption ( const UString _value) [virtual]

Set widget caption

Reimplemented in MyGUI::Edit, MyGUI::Window, MyGUI::MenuItem, and MyGUI::TabItem.

Definition at line 431 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setCaptionWithNewLine ( const std::string &  _value)

Definition at line 1481 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setColour ( const Colour _value)

Definition at line 1714 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setCoord ( const IntCoord _value) [virtual]

Set widget position and size

Reimplemented from MyGUI::ICroppedRectangle.

Reimplemented in MyGUI::Edit, MyGUI::List, MyGUI::ItemBox, MyGUI::Canvas, MyGUI::ListCtrl, MyGUI::VScroll, MyGUI::Window, MyGUI::Tab, MyGUI::Progress, and MyGUI::ScrollView.

Definition at line 1137 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setCoord ( int  _left,
int  _top,
int  _width,
int  _height 
) [inline]
void MyGUI::Widget::setEnabled ( bool  _value) [virtual]

Enable or disable widget

Definition at line 1672 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setEnabledSilent ( bool  _value) [inline]

Enable or disable widget without changing widget's state

Definition at line 230 of file MyGUI_Widget.h.

void MyGUI::Widget::setEnableToolTip ( bool  _value)

Enable or disable tooltip event

Definition at line 795 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setFontHeight ( int  _height) [inline]
Deprecated:
"use : void StaticText::setFontHeight(int _height)"

Reimplemented in MyGUI::Edit, and MyGUI::StaticText.

Definition at line 355 of file MyGUI_Widget.h.

void MyGUI::Widget::setFontName ( const std::string &  _font) [inline]
Deprecated:
"use : void StaticText::setFontName(const std::string& _font)"

Reimplemented in MyGUI::Edit, and MyGUI::StaticText.

Definition at line 350 of file MyGUI_Widget.h.

void MyGUI::Widget::setInheritsAlpha ( bool  _value)

Enable or disable inherits alpha mode

Definition at line 539 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setInheritsPeek ( bool  _inherits) [inline]
Deprecated:
"use : void setInheritsPick(bool _inherits)"

Definition at line 337 of file MyGUI_Widget.h.

void MyGUI::Widget::setInheritsPick ( bool  _value) [inline]

Set inherits mode flag This mode makes all child widgets pickable even if widget don't need mouse focus (was set setNeedKeyFocus(false) ).
Disabled (false) by default.

Definition at line 220 of file MyGUI_Widget.h.

void MyGUI::Widget::setMaskPeek ( const std::string &  _filename) [inline]
Deprecated:
"use : void setMaskPick(const std::string& _filename)"

Definition at line 342 of file MyGUI_Widget.h.

void MyGUI::Widget::setMaskPick ( const std::string &  _filename)

Set picking mask for widget

Definition at line 829 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setNeedKeyFocus ( bool  _value) [inline]

Set need key focus flag

Definition at line 200 of file MyGUI_Widget.h.

void MyGUI::Widget::setNeedMouseFocus ( bool  _value) [inline]

Set need mouse focus flag

Definition at line 208 of file MyGUI_Widget.h.

void MyGUI::Widget::setNeedToolTip ( bool  _value)

Set need tool tip mode flag. Enable this if you need tool tip events for widget

Definition at line 671 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setPointer ( const std::string &  _value) [inline]

Set mouse pointer for this widget

Definition at line 235 of file MyGUI_Widget.h.

void MyGUI::Widget::setPosition ( const IntPoint _value) [virtual]

Set widget position (position of left top corner)

Reimplemented from MyGUI::ICroppedRectangle.

Reimplemented in MyGUI::Edit, MyGUI::List, MyGUI::ItemBox, MyGUI::ListCtrl, MyGUI::VScroll, MyGUI::Window, MyGUI::Tab, MyGUI::Progress, and MyGUI::ScrollView.

Definition at line 1041 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setPosition ( int  _left,
int  _top 
) [inline]
void MyGUI::Widget::setPosition ( const IntCoord _coord) [inline]
Deprecated:
"use : void Widget::setCoord(const IntCoord& _coord)"

Reimplemented in MyGUI::Edit, MyGUI::Tab, MyGUI::List, MyGUI::ItemBox, MyGUI::Window, MyGUI::VScroll, MyGUI::ScrollView, and MyGUI::Progress.

Definition at line 329 of file MyGUI_Widget.h.

void MyGUI::Widget::setPosition ( int  _left,
int  _top,
int  _width,
int  _height 
) [inline]
Deprecated:
"use : void Widget::setCoord(int _left, int _top, int _width, int _height)"

Reimplemented in MyGUI::Edit, MyGUI::Tab, MyGUI::List, MyGUI::ItemBox, MyGUI::Window, MyGUI::VScroll, MyGUI::ScrollView, and MyGUI::Progress.

Definition at line 331 of file MyGUI_Widget.h.

void MyGUI::Widget::setProperty ( const std::string &  _key,
const std::string &  _value 
) [virtual]

Set any widget property

Parameters:
_keyProperty name (for example Widget_Alpha or Edit_MultiLine)
_valueValue converted to string
Properties:
Widget_Caption is Widget property with type string. Sets caption
Properties:
Widget_Position is Widget property with type IntPoint. Sets position

Reimplemented in MyGUI::Edit, MyGUI::Tab, MyGUI::StaticImage, MyGUI::List, MyGUI::ComboBox, MyGUI::VScroll, MyGUI::Window, MyGUI::Message, MyGUI::MenuItem, MyGUI::ScrollView, MyGUI::Progress, MyGUI::TabItem, MyGUI::Button, MyGUI::StaticText, and MyGUI::DDContainer.

Definition at line 1554 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setRealCoord ( const FloatCoord _value)

Set widget position and size

Definition at line 851 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setRealCoord ( float  _left,
float  _top,
float  _width,
float  _height 
) [inline]

See Widget::setRealPosition(const FloatCoord& _coord)

Definition at line 152 of file MyGUI_Widget.h.

void MyGUI::Widget::setRealPosition ( const FloatPoint _value)

Set widget position (position of left top corner)

Definition at line 841 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setRealPosition ( float  _left,
float  _top 
) [inline]
void MyGUI::Widget::setRealSize ( const FloatSize _value)

Set widget size

Definition at line 846 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setRealSize ( float  _width,
float  _height 
) [inline]
void MyGUI::Widget::setSize ( const IntSize _value) [virtual]
void MyGUI::Widget::setSize ( int  _width,
int  _height 
) [inline]
bool MyGUI::Widget::setState ( const std::string &  _value)

Set widget's state

Definition at line 446 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setTextAlign ( Align  _align) [inline]
Deprecated:
"use : void StaticText::setTextAlign(Align _align)"

Reimplemented in MyGUI::Edit, and MyGUI::StaticText.

Definition at line 360 of file MyGUI_Widget.h.

void MyGUI::Widget::setTextColour ( const Colour _colour) [inline]
Deprecated:
"use : void StaticText::setTextColour(const Colour& _colour)"

Reimplemented in MyGUI::Edit, and MyGUI::StaticText.

Definition at line 365 of file MyGUI_Widget.h.

void MyGUI::Widget::setVisible ( bool  _value) [virtual]

Hide or show widget

Reimplemented from MyGUI::ICroppedRectangle.

Reimplemented in MyGUI::MenuCtrl, and MyGUI::Window.

Definition at line 1639 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setWidgetStyle ( WidgetStyle  _style,
const std::string &  _layer = "" 
)

Set widget style.

Parameters:
_layerAttach to specified layer (if any)
Note:
When choosing WidgetStyle::Popup style you also need attach widget to layer see LayerManager::attachToLayerNode

Definition at line 1382 of file MyGUI_Widget.cpp.


Friends And Related Function Documentation

friend class IWidgetCreator [friend]

Definition at line 51 of file MyGUI_Widget.h.


Field Documentation

Definition at line 491 of file MyGUI_Widget.h.

float MyGUI::Widget::mAlpha [protected]

Definition at line 458 of file MyGUI_Widget.h.

Definition at line 497 of file MyGUI_Widget.h.

bool MyGUI::Widget::mEnabled [protected]

Definition at line 451 of file MyGUI_Widget.h.

Definition at line 486 of file MyGUI_Widget.h.

Definition at line 460 of file MyGUI_Widget.h.

Definition at line 452 of file MyGUI_Widget.h.

bool MyGUI::Widget::mInheritsPick [protected]

Definition at line 478 of file MyGUI_Widget.h.

Definition at line 456 of file MyGUI_Widget.h.

Definition at line 472 of file MyGUI_Widget.h.

Definition at line 448 of file MyGUI_Widget.h.

Definition at line 435 of file MyGUI_Widget.h.

std::string MyGUI::Widget::mName [protected]

Definition at line 462 of file MyGUI_Widget.h.

bool MyGUI::Widget::mNeedKeyFocus [protected]

Definition at line 475 of file MyGUI_Widget.h.

Definition at line 477 of file MyGUI_Widget.h.

bool MyGUI::Widget::mNeedToolTip [protected]

Definition at line 485 of file MyGUI_Widget.h.

Definition at line 436 of file MyGUI_Widget.h.

Definition at line 469 of file MyGUI_Widget.h.

std::string MyGUI::Widget::mPointer [protected]

Definition at line 464 of file MyGUI_Widget.h.

float MyGUI::Widget::mRealAlpha [protected]

Definition at line 459 of file MyGUI_Widget.h.

Definition at line 496 of file MyGUI_Widget.h.

Definition at line 433 of file MyGUI_Widget.h.

Definition at line 443 of file MyGUI_Widget.h.

Definition at line 454 of file MyGUI_Widget.h.

Definition at line 446 of file MyGUI_Widget.h.

Reimplemented from MyGUI::LayerItem.

Reimplemented in MyGUI::Canvas.

Definition at line 466 of file MyGUI_Widget.h.

std::string MyGUI::Widget::mTextureName [protected]

Definition at line 465 of file MyGUI_Widget.h.

Definition at line 488 of file MyGUI_Widget.h.

size_t MyGUI::Widget::mToolTipOldIndex [protected]

Definition at line 490 of file MyGUI_Widget.h.

Definition at line 489 of file MyGUI_Widget.h.

Definition at line 487 of file MyGUI_Widget.h.

Definition at line 439 of file MyGUI_Widget.h.

Definition at line 441 of file MyGUI_Widget.h.

Definition at line 483 of file MyGUI_Widget.h.

Definition at line 494 of file MyGUI_Widget.h.


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