Castor3D 0.16.0
Multiplatform 3D engine
Classes | List of all members
castor3d::Layout Class Referenceabstract

#include <Layout.hpp>

Inheritance diagram for castor3d::Layout:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Layout:
Collaboration graph
[legend]

Classes

struct  Item
 

Public Member Functions

General
C3D_API Layout (Layout const &) noexcept=delete
 
C3D_API Layoutoperator= (Layout const &) noexcept=delete
 
C3D_API Layout (Layout &&) noexcept=delete
 
C3D_API Layoutoperator= (Layout &&) noexcept=delete
 
virtual C3D_API ~Layout () noexcept
 
C3D_API Layout (castor::String const &typeName, ControlsManager &manager)
 
C3D_API Layout (castor::String const &typeName, LayoutControl &container)
 
C3D_API void markDirty ()
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 

Controls management

ControlsManagerm_manager {}
 
LayoutControlm_container {}
 
castor::Vector< Itemm_items
 
castor::Vector< SpacerUPtr > m_spacers
 
CpuFrameEventm_event {}
 
std::atomic_bool m_updating { false }
 
C3D_API void addControl (Control &control, LayoutItemFlags flags={})
 
C3D_API void removeControl (Control const &control, bool checkPresent=true)
 
C3D_API void addSpacer (uint32_t size=Spacer::Dynamic)
 
bool hasManager () const noexcept
 
ControlsManagergetManager () const noexcept
 
bool hasContainer () const noexcept
 
LayoutControlgetContainer () const noexcept
 
auto begin () const noexcept
 
auto end () const noexcept
 
C3D_API void update ()
 

Additional Inherited Members

- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Constructor & Destructor Documentation

◆ Layout() [1/4]

C3D_API castor3d::Layout::Layout ( Layout const & )
deletenoexcept

◆ Layout() [2/4]

C3D_API castor3d::Layout::Layout ( Layout && )
deletenoexcept

◆ ~Layout()

virtual C3D_API castor3d::Layout::~Layout ( )
virtualnoexcept

◆ Layout() [3/4]

C3D_API castor3d::Layout::Layout ( castor::String const & typeName,
ControlsManager & manager )
explicit

Constructor for global layout

Parameters
[in]typeNameThe layout type name.
[in]managerThe parent controls manager.

◆ Layout() [4/4]

C3D_API castor3d::Layout::Layout ( castor::String const & typeName,
LayoutControl & container )
explicit

Constructor

Parameters
[in]typeNameThe layout type name.
[in]containerThe parent layout control.

Member Function Documentation

◆ addControl()

C3D_API void castor3d::Layout::addControl ( Control & control,
LayoutItemFlags flags = {} )

Adds a control.

Parameters
[in]controlThe control.
[in]flagsThe layout flags for the control.

◆ addSpacer()

C3D_API void castor3d::Layout::addSpacer ( uint32_t size = Spacer::Dynamic)

Adds a space.

Parameters
[in]sizeThe space size

◆ begin()

auto castor3d::Layout::begin ( ) const
inlinenoexcept

References m_items.

◆ end()

auto castor3d::Layout::end ( ) const
inlinenoexcept

References m_items.

◆ getContainer()

LayoutControl & castor3d::Layout::getContainer ( ) const
inlinenoexcept

References CU_Require, hasContainer(), and m_container.

Here is the call graph for this function:

◆ getManager()

ControlsManager & castor3d::Layout::getManager ( ) const
inlinenoexcept

References CU_Require, hasManager(), and m_manager.

Here is the call graph for this function:

◆ hasContainer()

bool castor3d::Layout::hasContainer ( ) const
inlinenoexcept

References m_container.

Referenced by getContainer().

Here is the caller graph for this function:

◆ hasManager()

bool castor3d::Layout::hasManager ( ) const
inlinenoexcept

References m_manager.

Referenced by getManager().

Here is the caller graph for this function:

◆ markDirty()

C3D_API void castor3d::Layout::markDirty ( )

Marks the layout as dirty.

Referenced by castor3d::LayoutBox::setHorizontal().

Here is the caller graph for this function:

◆ operator=() [1/2]

C3D_API Layout & castor3d::Layout::operator= ( Layout && )
deletenoexcept

◆ operator=() [2/2]

C3D_API Layout & castor3d::Layout::operator= ( Layout const & )
deletenoexcept

◆ removeControl()

C3D_API void castor3d::Layout::removeControl ( Control const & control,
bool checkPresent = true )

Removes a control.

Parameters
[in]controlThe control.
[in]checkPresenttrue to log a warning if not found.

◆ update()

C3D_API void castor3d::Layout::update ( )
protected

Updates the layout and its controls.

Member Data Documentation

◆ m_container

LayoutControl* castor3d::Layout::m_container {}
protected

Referenced by getContainer(), and hasContainer().

◆ m_event

CpuFrameEvent* castor3d::Layout::m_event {}
protected

◆ m_items

castor::Vector< Item > castor3d::Layout::m_items
protected

Referenced by begin(), and end().

◆ m_manager

ControlsManager* castor3d::Layout::m_manager {}
protected

Referenced by getManager(), and hasManager().

◆ m_spacers

castor::Vector< SpacerUPtr > castor3d::Layout::m_spacers
protected

◆ m_updating

std::atomic_bool castor3d::Layout::m_updating { false }
protected

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