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 ()
WidgetPtr createWidgetT (const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, 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 &_name="")
WidgetPtr createWidgetRealT (const std::string &_type, const std::string &_skin, const FloatCoord &_coord, Align _align, 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 &_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="")
WidgetPtr createWidgetT (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 ()
 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)
bool isRootWidget ()
WidgetPtr getParent ()
EnumeratorWidgetPtr getEnumerator ()
size_t getChildCount ()
WidgetPtr getChildAt (size_t _index)
WidgetPtr findWidget (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 ()
WidgetPtr getClientWidget ()
ISubWidgetTextgetSubWidgetText ()
ISubWidgetRectgetSubWidgetMain ()
void setNeedToolTip (bool _value)
bool getNeedToolTip ()
void setEnableToolTip (bool _value)
bool getEnableToolTip ()
void detachFromWidget (const std::string &_layer="")
void attachToWidget (WidgetPtr _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 (WidgetPtr &_container, size_t &_index)
void _forcePeek (WidgetPtr _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 ()
virtual ILayerItemgetLayerItemByPoint (int _left, int _top)
virtual const IntCoordgetLayerItemCoord ()
void setCaptionWithNewLine (const std::string &_value)
virtual void _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, WidgetPtr _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 setColour (const Colour &_colour)
const ColourgetColour ()
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, WidgetPtr _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 WidgetPtr baseCreateWidget (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 (WidgetPtr _widget)
virtual void _destroyAllChildWidget ()
virtual size_t _getContainerIndex (const IntPoint &_point)
virtual void _resetContainer (bool _update)
virtual void baseUpdateEnable ()

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 mTexture
WidgetPtr mParent
IWidgetCreatormIWidgetCreator
bool mNeedKeyFocus
bool mNeedMouseFocus
bool mInheritsPick
WidgetPtr mWidgetClient
bool mNeedToolTip
bool mEnableToolTip
bool mToolTipVisible
float mToolTipCurrentTime
IntPoint mToolTipOldPoint
size_t mToolTipOldIndex
IntPoint m_oldMousePoint
size_t mOldToolTipIndex
WidgetStyle mWidgetStyle
FloatCoord mRelativeCoord
bool mDisableUpdateRelative

Friends

class IWidgetCreator

Detailed Description

Definition at line 42 of file MyGUI_Widget.h.


Member Typedef Documentation


Constructor & Destructor Documentation

MyGUI::Widget::Widget (  ) 

Definition at line 74 of file MyGUI_Widget.cpp.

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

Definition at line 47 of file MyGUI_Widget.cpp.

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

Definition at line 183 of file MyGUI_Widget.cpp.


Member Function Documentation

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

Definition at line 480 of file MyGUI_Widget.cpp.

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

Definition at line 452 of file MyGUI_Widget.cpp.

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

Definition at line 610 of file MyGUI_Widget.cpp.

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

Reimplemented in MyGUI::DDContainer.

Definition at line 639 of file MyGUI_Widget.cpp.

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

Definition at line 398 of file MyGUI_Widget.h.

int MyGUI::Widget::_getFontHeight (  ) 

Definition at line 920 of file MyGUI_Widget.cpp.

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

Definition at line 899 of file MyGUI_Widget.cpp.

IWidgetCreator* MyGUI::Widget::_getIWidgetCreator (  )  [inline]

Definition at line 303 of file MyGUI_Widget.h.

Align MyGUI::Widget::_getTextAlign (  ) 

Definition at line 866 of file MyGUI_Widget.cpp.

const Colour & MyGUI::Widget::_getTextColour (  ) 

Definition at line 883 of file MyGUI_Widget.cpp.

IntCoord MyGUI::Widget::_getTextRegion (  ) 

Definition at line 936 of file MyGUI_Widget.cpp.

IntSize MyGUI::Widget::_getTextSize (  ) 

Definition at line 928 of file MyGUI_Widget.cpp.

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

Definition at line 593 of file MyGUI_Widget.cpp.

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

Definition at line 803 of file MyGUI_Widget.cpp.

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

Definition at line 944 of file MyGUI_Widget.cpp.

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

Definition at line 950 of file MyGUI_Widget.cpp.

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

Definition at line 912 of file MyGUI_Widget.cpp.

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

Definition at line 891 of file MyGUI_Widget.cpp.

void MyGUI::Widget::_setTextAlign ( Align  _align  ) 

Definition at line 858 of file MyGUI_Widget.cpp.

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

Definition at line 875 of file MyGUI_Widget.cpp.

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

Definition at line 585 of file MyGUI_Widget.cpp.

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

Definition at line 580 of file MyGUI_Widget.cpp.

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

Definition at line 367 of file MyGUI_Widget.cpp.

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

Attach widget to parent

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 1289 of file MyGUI_Widget.cpp.

void MyGUI::Widget::baseChangeWidgetSkin ( ResourceSkin _info  )  [protected, virtual]
WidgetPtr 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]

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

Definition at line 349 of file MyGUI_Widget.cpp.

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

Reimplemented in MyGUI::Button.

Definition at line 1615 of file MyGUI_Widget.cpp.

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

Try to cast pointer to selected type. \ @param _throw If true throw exception when casting in wrong type, else return nullptr \

Definition at line 54 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. \ @param _throw If true throw exception when casting in wrong type, else return nullptr \

Definition at line 54 of file MyGUI_Widget.h.

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

Change widget skin

Definition at line 206 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 WidgetPtr

Definition at line 80 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 WidgetPtr

Definition at line 118 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 WidgetPtr

Definition at line 87 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 WidgetPtr

Definition at line 101 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 WidgetPtr

Definition at line 94 of file MyGUI_Widget.h.

WidgetPtr 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 362 of file MyGUI_Widget.cpp.

WidgetPtr 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 1500 of file MyGUI_Widget.cpp.

WidgetPtr 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 1495 of file MyGUI_Widget.cpp.

WidgetPtr MyGUI::Widget::createWidgetT ( const std::string &  _type,
const std::string &  _skin,
const IntCoord _coord,
Align  _align,
const std::string &  _name = "" 
)

Create child widget

Parameters:
_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 1490 of file MyGUI_Widget.cpp.

WidgetPtr 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:
_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)
_name if needed (you can use it for finding widget by name later)

Definition at line 1505 of file MyGUI_Widget.cpp.

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

Detach widget from widgets hierarchy

Definition at line 1227 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.

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

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

Definition at line 646 of file MyGUI_Widget.cpp.

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

Get widget opacity

Definition at line 169 of file MyGUI_Widget.h.

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

Get widget caption

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

Definition at line 426 of file MyGUI_Widget.cpp.

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

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

Definition at line 1524 of file MyGUI_Widget.cpp.

size_t MyGUI::Widget::getChildCount (  ) 

Get child count

Definition at line 1517 of file MyGUI_Widget.cpp.

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

Get rect where child widgets placed

Definition at line 500 of file MyGUI_Widget.cpp.

WidgetPtr MyGUI::Widget::getClientWidget (  )  [inline]

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

Definition at line 245 of file MyGUI_Widget.h.

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

Definition at line 352 of file MyGUI_Widget.h.

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

Get tool tip enabled flag

Definition at line 260 of file MyGUI_Widget.h.

EnumeratorWidgetPtr MyGUI::Widget::getEnumerator (  ) 

Get child widgets Enumerator

Definition at line 1510 of file MyGUI_Widget.cpp.

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

Reimplemented in MyGUI::StaticText.

Definition at line 362 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 357 of file MyGUI_Widget.h.

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

Definition at line 538 of file MyGUI_Widget.cpp.

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

Definition at line 318 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 628 of file MyGUI_Widget.cpp.

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

Get name of widget.

Definition at line 124 of file MyGUI_Widget.h.

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

Get need tool tip mode flag

Definition at line 255 of file MyGUI_Widget.h.

WidgetPtr MyGUI::Widget::getParent (  )  [inline]

Get parent widget or nullptr if no parent

Definition at line 184 of file MyGUI_Widget.h.

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

Get mouse pointer name for this widget

Definition at line 1532 of file MyGUI_Widget.cpp.

ISubWidgetRect* MyGUI::Widget::getSubWidgetMain (  )  [inline]

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

Definition at line 250 of file MyGUI_Widget.h.

ISubWidgetText* MyGUI::Widget::getSubWidgetText (  )  [inline]

Get text sub widget or nullptr if no text sub widget

Definition at line 248 of file MyGUI_Widget.h.

Align MyGUI::Widget::getTextAlign (  )  [inline]
Deprecated:
"use : Align StaticText::getTextAlign()"

Reimplemented in MyGUI::StaticText.

Definition at line 367 of file MyGUI_Widget.h.

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

Reimplemented in MyGUI::StaticText.

Definition at line 372 of file MyGUI_Widget.h.

IntCoord MyGUI::Widget::getTextCoord (  )  [inline]
Deprecated:
"use : const IntCoord& StaticText::getTextRegion()"

Definition at line 345 of file MyGUI_Widget.h.

IntSize MyGUI::Widget::getTextSize (  )  [inline]
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]
WidgetStyle MyGUI::Widget::getWidgetStyle (  )  [inline]

Get widget style

Definition at line 283 of file MyGUI_Widget.h.

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

Is widget enabled

Definition at line 231 of file MyGUI_Widget.h.

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

Get inherits alpha mode flag

Definition at line 174 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 221 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 204 of file MyGUI_Widget.h.

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

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

Definition at line 212 of file MyGUI_Widget.h.

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

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

Definition at line 181 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

Definition at line 1193 of file MyGUI_Widget.cpp.

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

Set widget opacity

Definition at line 507 of file MyGUI_Widget.cpp.

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

Set widget caption

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

Definition at line 421 of file MyGUI_Widget.cpp.

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

Definition at line 1469 of file MyGUI_Widget.cpp.

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

Definition at line 350 of file MyGUI_Widget.h.

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

Set widget position and size

Reimplemented in MyGUI::Canvas, MyGUI::List, MyGUI::Progress, MyGUI::Tab, MyGUI::VScroll, and MyGUI::Window.

Definition at line 1125 of file MyGUI_Widget.cpp.

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

Enable or disable widget

Definition at line 1660 of file MyGUI_Widget.cpp.

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

Enable or disable widget without changing widget's state

Definition at line 229 of file MyGUI_Widget.h.

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

Enable or disable tooltip event

Definition at line 783 of file MyGUI_Widget.cpp.

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

Reimplemented in MyGUI::StaticText.

Definition at line 360 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::StaticText.

Definition at line 355 of file MyGUI_Widget.h.

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

Enable or disable inherits alpha mode

Definition at line 529 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 219 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 817 of file MyGUI_Widget.cpp.

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

Set need key focus flag

Definition at line 199 of file MyGUI_Widget.h.

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

Set need mouse focus flag

Definition at line 207 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 659 of file MyGUI_Widget.cpp.

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

Set mouse pointer for this widget

Definition at line 234 of file MyGUI_Widget.h.

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

Set widget position (position of left top corner)

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

Definition at line 1029 of file MyGUI_Widget.cpp.

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::List, MyGUI::Progress, MyGUI::Tab, MyGUI::VScroll, and MyGUI::Window.

Definition at line 331 of file MyGUI_Widget.h.

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

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

Definition at line 329 of file MyGUI_Widget.h.

void MyGUI::Widget::setPosition ( int  _left,
int  _top 
) [inline]
void MyGUI::Widget::setProperty ( const std::string &  _key,
const std::string &  _value 
) [virtual]

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::Button, MyGUI::DDContainer, MyGUI::List, MyGUI::MenuItem, MyGUI::Message, MyGUI::Progress, MyGUI::StaticImage, MyGUI::StaticText, MyGUI::Tab, MyGUI::TabItem, MyGUI::VScroll, and MyGUI::Window.

Definition at line 1542 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 153 of file MyGUI_Widget.h.

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

Set widget position and size

Definition at line 839 of file MyGUI_Widget.cpp.

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

Set widget position (position of left top corner)

Definition at line 829 of file MyGUI_Widget.cpp.

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

Set widget size

Definition at line 834 of file MyGUI_Widget.cpp.

void MyGUI::Widget::setSize ( const IntSize _value  )  [virtual]

Set widget size

Reimplemented in MyGUI::Canvas, MyGUI::List, MyGUI::Progress, MyGUI::Tab, MyGUI::VScroll, and MyGUI::Window.

Definition at line 1067 of file MyGUI_Widget.cpp.

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

Set widget's state

Definition at line 436 of file MyGUI_Widget.cpp.

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

Reimplemented in MyGUI::StaticText.

Definition at line 365 of file MyGUI_Widget.h.

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

Reimplemented in MyGUI::StaticText.

Definition at line 370 of file MyGUI_Widget.h.

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

Hide or show widget

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

Definition at line 1627 of file MyGUI_Widget.cpp.

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

Set widget style.

Note:
When choosing WidgetStyle::Popup style you also need attach widget to layer see LayerManager::attachToLayerNode

Definition at line 1370 of file MyGUI_Widget.cpp.


Friends And Related Function Documentation

friend class IWidgetCreator [friend]

Definition at line 52 of file MyGUI_Widget.h.


Field Documentation

Definition at line 491 of file MyGUI_Widget.h.

float MyGUI::Widget::mAlpha [protected]

Definition at line 459 of file MyGUI_Widget.h.

Definition at line 498 of file MyGUI_Widget.h.

bool MyGUI::Widget::mEnabled [protected]

Definition at line 452 of file MyGUI_Widget.h.

Definition at line 486 of file MyGUI_Widget.h.

Definition at line 461 of file MyGUI_Widget.h.

Definition at line 453 of file MyGUI_Widget.h.

bool MyGUI::Widget::mInheritsPick [protected]

Definition at line 478 of file MyGUI_Widget.h.

Definition at line 457 of file MyGUI_Widget.h.

Definition at line 472 of file MyGUI_Widget.h.

Definition at line 449 of file MyGUI_Widget.h.

Definition at line 436 of file MyGUI_Widget.h.

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

Definition at line 463 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.

size_t MyGUI::Widget::mOldToolTipIndex [protected]

Definition at line 492 of file MyGUI_Widget.h.

Definition at line 437 of file MyGUI_Widget.h.

Definition at line 469 of file MyGUI_Widget.h.

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

Definition at line 465 of file MyGUI_Widget.h.

float MyGUI::Widget::mRealAlpha [protected]

Definition at line 460 of file MyGUI_Widget.h.

Definition at line 497 of file MyGUI_Widget.h.

Definition at line 434 of file MyGUI_Widget.h.

Definition at line 444 of file MyGUI_Widget.h.

Definition at line 455 of file MyGUI_Widget.h.

Definition at line 447 of file MyGUI_Widget.h.

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

Reimplemented in MyGUI::Canvas.

Definition at line 466 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 440 of file MyGUI_Widget.h.

Definition at line 442 of file MyGUI_Widget.h.

Definition at line 483 of file MyGUI_Widget.h.

Definition at line 495 of file MyGUI_Widget.h.


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