55 std::string_view
_type,
56 std::string_view
_skin,
59 std::string_view
_name = {});
63 std::string_view
_type,
64 std::string_view
_skin,
70 std::string_view
_name = {});
73 Widget* createWidgetRealT(
74 std::string_view _type,
75 std::string_view _skin,
76 const FloatCoord& _coord,
78 std::string_view _name = {});
81 Widget* createWidgetRealT(
82 std::string_view _type,
83 std::string_view _skin,
89 std::string_view _name = {});
102 std::string_view
_skin,
108 std::string_view
_name = {})
110 return static_cast<T*
>(
124 std::string_view
_skin,
130 std::string_view
_name = {})
132 return static_cast<T*
>(
145 Widget* createWidgetT(
147 std::string_view _type,
148 std::string_view _skin,
149 const IntCoord& _coord,
151 std::string_view _layer = {},
152 std::string_view _name = {});
158 std::string_view
_skin,
161 std::string_view
_layer = {},
162 std::string_view
_name = {})
164 return static_cast<T*
>(createWidgetT(_style, T::getClassTypeName(), _skin, _coord, _align, _layer, _name));
168 void setPosition(
const IntPoint& _point)
override;
170 void setSize(
const IntSize& _size)
override;
172 void setCoord(
const IntCoord& _coord)
override;
175 void setPosition(
int _left,
int _top);
177 void setSize(
int _width,
int _height);
179 void setCoord(
int _left,
int _top,
int _width,
int _height);
182 void setRealPosition(
const FloatPoint& _point);
184 void setRealSize(
const FloatSize& _size);
186 void setRealCoord(
const FloatCoord& _coord);
189 void setRealPosition(
float _left,
float _top);
191 void setRealSize(
float _width,
float _height);
193 void setRealCoord(
float _left,
float _top,
float _width,
float _height);
196 const std::string& getName()
const;
199 virtual void setVisible(
bool _value);
201 bool getVisible()
const;
207 void setDepth(
int _value);
209 int getDepth()
const;
212 bool getInheritedVisible()
const;
215 virtual void setAlign(Align _value);
217 Align getAlign()
const;
220 void setAlpha(
float _alpha);
222 float getAlpha()
const;
234 void setInheritsAlpha(
bool _inherits);
236 bool getInheritsAlpha()
const;
238 void setColour(
const Colour& _value);
242 bool isRootWidget()
const;
245 Widget* getParent()
const;
254 size_t getChildCount()
const;
257 Widget* getChildAt(
size_t _index)
const;
263 Widget* findWidget(std::string_view _name);
268 void findWidgets(std::string_view _name, VectorWidgetPtr& _result);
271 virtual void setEnabled(
bool _value);
273 void setEnabledSilent(
bool _value);
275 bool getEnabled()
const;
278 bool getInheritedEnabled()
const;
284 Widget* getClientWidget();
285 const Widget* getClientWidget()
const;
290 void detachFromWidget(std::string_view _layer = {});
297 void attachToWidget(Widget* _parent, WidgetStyle _style = WidgetStyle::Child, std::string_view _layer = {});
300 void changeWidgetSkin(std::string_view _skinName);
307 void setWidgetStyle(WidgetStyle _style, std::string_view _layer = {});
309 WidgetStyle getWidgetStyle()
const;
315 void setProperty(std::string_view _key, std::string_view _value);
351 std::string_view
_name);
358 Widget* _getContainer()
const;
361 bool _checkPoint(
int _left,
int _top)
const;
363 Widget* _createSkinWidget(
365 std::string_view
_type,
366 std::string_view
_skin,
369 std::string_view
_layer = {},
370 std::string_view
_name = {});
373 virtual void _resetContainer(
bool _update);
375 bool _setWidgetState(std::string_view _state);
378 void _updateChilds();
384 virtual void shutdownOverride();
385 virtual void initialiseOverride();
392 std::string_view
_type,
393 std::string_view
_skin,
397 std::string_view
_name,
401 void _destroyAllChildWidget();
406 virtual void baseUpdateEnable();
410 const IntCoord& getLayerItemCoord()
const override;
416 for (
const auto&
iter : mWidgetChildSkin)
434 Widget* _getClientWidget();
435 const Widget* _getClientWidget()
const;
437 virtual void setPropertyOverride(std::string_view
_key, std::string_view
_value);
441 void shutdownWidgetSkinBase();
444 void _updateAbsolutePoint();
447 void _updateVisible();
449 void _updateEnabled();
451 float _getRealAlpha()
const;
454 void _destroyChildSkinWidget();
457 void _checkInheristProperties();
472 Widget* mWidgetClient{
nullptr};
475 VectorWidgetPtr mWidgetChild;
478 VectorWidgetPtr mWidgetChildSkin;
482 bool mInheritedEnabled{
true};
485 bool mInheritedVisible{
true};
489 bool mInheritsAlpha{
true};
493 Widget* mParent{
nullptr};
495 WidgetStyle mWidgetStyle{WidgetStyle::Child};
497 Widget* mContainer{
nullptr};
499 Align mAlign{Align::Default};
#define MYGUI_RTTI_DERIVED(DerivedType)
Type * castType(bool _throw=true)
constexpr float ALPHA_MAX
Enumerator< VectorWidgetPtr > EnumeratorWidgetPtr
types::TCoord< int > IntCoord
types::TSize< int > IntSize
std::vector< Widget * > VectorWidgetPtr