API Documentation
Public Member Functions | List of all members
nkWinUi::Layout Class Referenceabstract

Represents a layout to organize children of a component. More...

Inheritance diagram for nkWinUi::Layout:
nkExport::Exportable nkWinUi::GridLayout nkWinUi::RelativeLayout

Public Member Functions

 Layout (System *system) noexcept
 
virtual ~Layout ()
 
ComponentgetParentComponent () const
 
SystemgetSystem () const
 
LAYOUT_TYPE getType () const
 
virtual void setParentComponent (Component *parent)
 
virtual void removeComponent (Component *component)=0
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void exportComponentsNodeEntry (nkExport::Node *rootNode)
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
virtual void processComponentsNodeEntry (nkExport::Node *rootNode)
 
virtual void update ()=0
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

Represents a layout to organize children of a component.

Constructor & Destructor Documentation

◆ Layout()

nkWinUi::Layout::Layout ( System system)
noexcept

Constructor.

Parameters
systemThe parent system in which the layout will live.

◆ ~Layout()

virtual nkWinUi::Layout::~Layout ( )
virtual

Destructor.

Member Function Documentation

◆ getParentComponent()

Component* nkWinUi::Layout::getParentComponent ( ) const
Returns
The component in which this layout is used.

◆ getSystem()

System* nkWinUi::Layout::getSystem ( ) const
Returns
The system the resource lives in.

◆ getType()

LAYOUT_TYPE nkWinUi::Layout::getType ( ) const
Returns
The type this layout is.

◆ setParentComponent()

virtual void nkWinUi::Layout::setParentComponent ( Component parent)
virtual

Sets the component holding the layout.

Parameters
parentThe component holding the layout.
Remarks
In theory, should not be called by external code.

Reimplemented in nkWinUi::GridLayout, and nkWinUi::RelativeLayout.

◆ removeComponent()

virtual void nkWinUi::Layout::removeComponent ( Component component)
pure virtual

Removes a child component from this layout.

Parameters
componentThe component to remove from this layout.

Implemented in nkWinUi::GridLayout, and nkWinUi::RelativeLayout.

◆ exportClassToTree()

virtual void nkWinUi::Layout::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Basic export capabilities.

Parameters
rootNodeThe node in which the layout will be exported.

Implements nkExport::Exportable.

Reimplemented in nkWinUi::GridLayout.

◆ exportComponentsNodeEntry()

virtual void nkWinUi::Layout::exportComponentsNodeEntry ( nkExport::Node rootNode)
virtual

Exports a component within the layout into a tree.

Parameters
rootNodeThe node in which the component will be exported.

Reimplemented in nkWinUi::GridLayout, and nkWinUi::RelativeLayout.

◆ importClassFromTree()

virtual void nkWinUi::Layout::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Basic importing capabilities.

Parameters
rootNodeThe tree to import from.

Implements nkExport::Exportable.

Reimplemented in nkWinUi::GridLayout.

◆ processComponentsNodeEntry()

virtual void nkWinUi::Layout::processComponentsNodeEntry ( nkExport::Node rootNode)
virtual

Imports a component within the layout into a tree.

Parameters
rootNodeThe tree to import the component from.

Reimplemented in nkWinUi::GridLayout, and nkWinUi::RelativeLayout.

◆ update()

virtual void nkWinUi::Layout::update ( )
pure virtual

Updates the layout. Can be called because of a resize for instance.

Implemented in nkWinUi::GridLayout, and nkWinUi::RelativeLayout.


The documentation for this class was generated from the following file: