6#include <Utility/traits.h>
13template<
typename ChildType>
15 const bool shouldInit,
16 const bool shouldSetToDefault)
18 static_assert(CDerived<ChildType, DesignerObject>,
19 "Child type must be a designer object.");
27 ChildType::getSdlClass(),
32 return static_cast<ChildType*
>(childObj);
45inline void DesignerObject::setParentObject(
DesignerObject*
const object)
47 PH_ASSERT(
object !=
nullptr);
48 PH_ASSERT(
object !=
this);
53 m_parent.u_object = object;
56inline void DesignerObject::setParentScene(DesignerScene*
const scene)
58 PH_ASSERT(scene !=
nullptr);
63 m_parent.u_scene = scene;
const TEnumFlags< EObjectState > & getState() const
Definition AbstractDesignerObject.ipp:10
Definition DesignerObject.h:31
bool isVisible() const
Definition DesignerObject.ipp:40
bool isSelected() const
Definition DesignerObject.ipp:35
ChildType * newChild(bool shouldInit=true, bool shouldSetToDefault=true)
Create and add the new object as a child.
Definition DesignerObject.ipp:14
bool haveChildren() const
Definition DesignerObject.ipp:71
virtual bool canHaveChildren() const =0
const std::string & getName() const
Definition DesignerObject.ipp:66
virtual TSpanView< DesignerObject * > getChildren() const =0
Definition ph_editor.h:10