![]() |
Heaven v0.1.0-1
C++ global-menu library for Wayland sessions
|
Mixin interface for client objects that can be nested inside a parent. More...
#include "HNWithParent.h"


Public Member Functions | |
| virtual | ~HNWithParent () noexcept |
| Destructor. Detaches this object from its parent. | |
| HNObject * | parent () const noexcept |
| Returns the parent object. | |
| bool | setParent (HNObject *parent) noexcept |
| Sets the parent. | |
| bool | insertBefore (HNObject *sibling) noexcept |
| Inserts this object before the specified sibling. | |
Mixin interface for client objects that can be nested inside a parent.
Provides the API to attach an object to a parent implementing HNWithChildren and to reorder it among its siblings.
|
virtualnoexcept |
Destructor. Detaches this object from its parent.
Declared virtual so the mixin is polymorphic, enabling safe cross-casts (via dynamic_cast) between the base subobjects of a concrete object.
|
noexcept |
Inserts this object before the specified sibling.
If sibling is nullptr, the object is inserted at the end of the current parent's children list.
If sibling has no parent, the operation has no effect. If sibling belongs to a different parent, this object is reparented to match the sibling's parent.
| sibling | Pointer to the sibling object before which this object will be inserted. May be nullptr. |
sibling is invalid.
|
inlinenoexcept |
Returns the parent object.
|
noexcept |
Sets the parent.
Appends this object to the parent's children list. If the same parent is provided, the object is not reinserted at the end. Passing nullptr detaches it from its current parent.
| parent | Object implementing HNWithChildren, or nullptr. |