45 template <
typename... Args>
47 : m_WidgetPtr{std::make_shared<WidgetType>(std::forward<Args>(args)...)}
52 : m_WidgetPtr{std::make_shared<WidgetType>(*other.m_WidgetPtr)}
57 : m_WidgetPtr{std::move(other.m_WidgetPtr)}
64 m_WidgetPtr = std::make_shared<WidgetType>(*other.m_WidgetPtr);
72 m_WidgetPtr = std::move(other.m_WidgetPtr);
77 operator bool()
const noexcept
79 return (m_WidgetPtr !=
nullptr);
82 WidgetType& operator*()
const noexcept
87 WidgetType* operator->()
const noexcept
89 return m_WidgetPtr.get();
92 TGUI_NODISCARD WidgetType* get()
const noexcept
94 return m_WidgetPtr.get();
100 std::shared_ptr<WidgetType> m_WidgetPtr;