API Documentation
RelativeLayout.h
1 // RelativeLayout.h
3 //
5 
6 namespace nkWinUi
7 {
11  class RelativeLayout final : public Layout
12  {
13  public :
14 
20  RelativeLayout (System* system) noexcept ;
24  virtual ~RelativeLayout () ;
25 
26  // Getters
31  Component* getComponentAt (unsigned int index) const ;
32 
33  // Setters
37  virtual void setParentComponent (Component* parent) override ;
38 
39  // Components
48  void addComponent (Component* component, const nkMaths::Rectangle& area) ;
57  void addComponent (Component* component, const nkMaths::Rectangle& area, RELATIVE_POSITION position, Component* relativeTo) ;
61  virtual void removeComponent (Component* component) override ;
62 
63  // Update
67  virtual void update () override ;
68 
69  // Import / Export
73  virtual void exportComponentsNodeEntry (nkExport::Node* rootNode) override ;
77  virtual void processComponentsNodeEntry (nkExport::Node* rootNode) override ;
78  } ;
79 }
nkWinUi::RelativeLayout::addComponent
void addComponent(Component *component, const nkMaths::Rectangle &area, RELATIVE_POSITION position, Component *relativeTo)
nkWinUi::Layout
Represents a layout to organize children of a component.
Definition: Layout.h:12
nkWinUi::RelativeLayout::setParentComponent
virtual void setParentComponent(Component *parent) override
nkWinUi::RelativeLayout::exportComponentsNodeEntry
virtual void exportComponentsNodeEntry(nkExport::Node *rootNode) override
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkWinUi::RelativeLayout
Implements a layout positioning its children components relative to each other.
Definition: RelativeLayout.h:12
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkWinUi::RelativeLayout::~RelativeLayout
virtual ~RelativeLayout()
nkWinUi::RelativeLayout::RelativeLayout
RelativeLayout(System *system) noexcept
nkWinUi::RelativeLayout::removeComponent
virtual void removeComponent(Component *component) override
nkMaths::Rectangle
Represents a 2D rectangle.
Definition: Rectangle.h:12
nkWinUi::RelativeLayout::update
virtual void update() override
nkWinUi::RelativeLayout::getComponentAt
Component * getComponentAt(unsigned int index) const
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::RELATIVE_POSITION
RELATIVE_POSITION
Possible relative positions of components.
Definition: RelativePosition.h:12
nkWinUi::RelativeLayout::processComponentsNodeEntry
virtual void processComponentsNodeEntry(nkExport::Node *rootNode) override
nkWinUi::RelativeLayout::addComponent
void addComponent(Component *component, const nkMaths::Rectangle &area)