53 Widget* createWidgetT(
const std::string& _type,
const std::string& _skin,
const IntCoord& _coord,
Align _align,
const std::string& _name =
"");
56 Widget* createWidgetT(
const std::string& _type,
const std::string& _skin,
int _left,
int _top,
int _width,
int _height,
Align _align,
const std::string& _name =
"");
59 Widget* createWidgetRealT(
const std::string& _type,
const std::string& _skin,
const FloatCoord& _coord,
Align _align,
const std::string& _name =
"");
62 Widget* createWidgetRealT(
const std::string& _type,
const std::string& _skin,
float _left,
float _top,
float _width,
float _height,
Align _align,
const std::string& _name =
"");
69 return static_cast<T*
>(createWidgetT(T::getClassTypeName(), _skin, _coord, _align, _name));
74 T*
createWidget(
const std::string& _skin,
int _left,
int _top,
int _width,
int _height,
Align _align,
const std::string& _name =
"")
76 return static_cast<T*
>(createWidgetT(T::getClassTypeName(), _skin,
IntCoord(_left, _top, _width, _height), _align, _name));
83 return static_cast<T*
>(createWidgetRealT(T::getClassTypeName(), _skin, _coord, _align, _name));
88 T*
createWidgetReal(
const std::string& _skin,
float _left,
float _top,
float _width,
float _height,
Align _align,
const std::string& _name =
"")
90 return static_cast<T*
>(createWidgetRealT(T::getClassTypeName(), _skin, _left, _top, _width, _height, _align, _name));
102 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 =
"");
105 template <
typename T>
108 return static_cast<T*
>(createWidgetT(_style, T::getClassTypeName(), _skin, _coord, _align, _layer, _name));
112 void setPosition(
const IntPoint& _value)
override;
114 void setSize(
const IntSize& _value)
override;
116 void setCoord(
const IntCoord& _value)
override;
119 void setPosition(
int _left,
int _top);
121 void setSize(
int _width,
int _height);
123 void setCoord(
int _left,
int _top,
int _width,
int _height);
126 void setRealPosition(
const FloatPoint& _value);
128 void setRealSize(
const FloatSize& _value);
133 void setRealPosition(
float _left,
float _top);
135 void setRealSize(
float _width,
float _height);
137 void setRealCoord(
float _left,
float _top,
float _width,
float _height);
140 const std::string& getName()
const;
143 virtual void setVisible(
bool _value);
145 bool getVisible()
const;
151 void setDepth(
int _value);
153 int getDepth()
const;
156 bool getInheritedVisible()
const;
159 virtual void setAlign(
Align _value);
161 Align getAlign()
const;
164 void setAlpha(
float _value);
166 float getAlpha()
const;
178 void setInheritsAlpha(
bool _value);
180 bool getInheritsAlpha()
const;
182 void setColour(
const Colour& _value);
186 bool isRootWidget()
const;
189 Widget* getParent()
const;
197 size_t getChildCount()
const;
200 Widget* getChildAt(
size_t _index)
const;
206 Widget* findWidget(
const std::string& _name);
214 virtual void setEnabled(
bool _value);
216 void setEnabledSilent(
bool _value);
218 bool getEnabled()
const;
221 bool getInheritedEnabled()
const;
227 Widget* getClientWidget();
228 const Widget* getClientWidget()
const;
233 void detachFromWidget(
const std::string& _layer =
"");
243 void changeWidgetSkin(
const std::string& _skinName);
250 void setWidgetStyle(
WidgetStyle _style,
const std::string& _layer =
"");
258 void setProperty(
const std::string& _key,
const std::string& _value);
283 virtual size_t _getItemIndex(
Widget* _item)
const;
286 void _forcePick(
Widget* _widget);
292 void _destroyChildWidget(
Widget* _widget);
294 void _setContainer(
Widget* _value);
295 Widget* _getContainer()
const;
298 bool _checkPoint(
int _left,
int _top)
const;
300 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 =
"");
303 virtual void _resetContainer(
bool _update);
305 bool _setWidgetState(
const std::string& _value);
308 void _updateChilds();
314 virtual void shutdownOverride();
315 virtual void initialiseOverride();
320 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,
bool _template);
323 void _destroyAllChildWidget();
326 virtual size_t _getContainerIndex(
const IntPoint& _point)
const;
328 virtual void baseUpdateEnable();
331 ILayerItem* getLayerItemByPoint(
int _left,
int _top)
const override;
332 const IntCoord& getLayerItemCoord()
const override;
334 template <
typename T>
338 for (VectorWidgetPtr::iterator iter = mWidgetChildSkin.begin(); iter != mWidgetChildSkin.end(); ++iter)
351 virtual void onWidgetCreated(
Widget* _widget);
352 virtual void onWidgetDestroy(
Widget* _widget);
354 void setWidgetClient(
Widget* _widget);
356 Widget* _getClientWidget();
357 const Widget* _getClientWidget()
const;
359 virtual void setPropertyOverride(
const std::string& _key,
const std::string& _value);
363 void shutdownWidgetSkinBase();
366 void _updateAbsolutePoint();
369 void _updateVisible();
371 void _updateEnabled();
373 float _getRealAlpha()
const;
376 void _destroyChildSkinWidget();
379 void _checkInheristProperties();
381 void _linkChildWidget(
Widget* _widget);
382 void _unlinkChildWidget(
Widget* _widget);
386 void resizeLayerItemView(
const IntSize& _oldView,
const IntSize& _newView)
override;
388 void addWidget(
Widget* _widget);
404 bool mInheritedEnabled;
407 bool mInheritedVisible;
#define MYGUI_RTTI_DERIVED(DerivedType)
Type * castType(bool _throw=true)
delegates::CMultiDelegate3< Widget *, const std::string &, const std::string & > EventHandle_WidgetStringString
types::TCoord< int > IntCoord
std::vector< Widget * > VectorWidgetPtr