Implements a layout positioning its children components relative to each other. More...
Public Member Functions | |
RelativeLayout (System *system) noexcept | |
RelativeLayout (const RelativeLayout &)=delete | |
virtual | ~RelativeLayout () |
Component * | getComponentAt (unsigned int index) const |
virtual void | setParentComponent (Component *parent) override |
void | addComponent (Component *component, const nkMaths::Rectangle &area) |
void | addComponent (Component *component, const nkMaths::Rectangle &area, RELATIVE_POSITION position, Component *relativeTo) |
virtual void | removeComponent (Component *component) override |
virtual void | update () override |
virtual void | exportComponentsNodeEntry (nkExport::Node *rootNode) override |
virtual void | processComponentsNodeEntry (nkExport::Node *rootNode) override |
RelativeLayout & | operator= (const RelativeLayout &)=delete |
Public Member Functions inherited from nkWinUi::Layout | |
Layout (System *system) noexcept | |
virtual | ~Layout () |
Component * | getParentComponent () const |
System * | getSystem () const |
LAYOUT_TYPE | getType () const |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkExport::Exportable | |
Exportable () noexcept | |
virtual | ~Exportable () |
Implements a layout positioning its children components relative to each other.
|
noexcept |
Constructor.
system | The parent system in which the layout will live. |
|
delete |
Copy constructor.
|
virtual |
Destructor.
Component* nkWinUi::RelativeLayout::getComponentAt | ( | unsigned int | index | ) | const |
index | The wanted component's index. |
|
overridevirtual |
See Layout::setParentComponent().
Reimplemented from nkWinUi::Layout.
void nkWinUi::RelativeLayout::addComponent | ( | Component * | component, |
const nkMaths::Rectangle & | area | ||
) |
Adds a child component to be placed by this layout.
component | The component to place. |
area | The area this component will have in the layout. |
void nkWinUi::RelativeLayout::addComponent | ( | Component * | component, |
const nkMaths::Rectangle & | area, | ||
RELATIVE_POSITION | position, | ||
Component * | relativeTo | ||
) |
Adds a child component to be place by this layout.
component | The component to place. |
area | The area this component will have in the layout, relative to the relativeTo component. |
position | The position the component should have, compared to the relativeTo component. |
relativeTo | The component being the anchor to place the new child component to add. It should be part of this layout, already. |
|
overridevirtual |
See Layout::removeComponent().
Implements nkWinUi::Layout.
|
overridevirtual |
See Layout::update().
Implements nkWinUi::Layout.
|
overridevirtual |
See Layout::exportComponentsNodeEntry().
Reimplemented from nkWinUi::Layout.
|
overridevirtual |
See Layout::processComponentsNodeEntry().
Reimplemented from nkWinUi::Layout.
|
delete |
Copy assignment.