You.i Engine
CYIGridLayoutConfig Class Reference

Detailed Description

A class used to hold per-child layout configuration for CYIGridLayout layouts.

See also
CYIGridLayout

#include <layout/YiGridLayout.h>

Inheritance diagram for CYIGridLayoutConfig:

Public Member Functions

 CYIGridLayoutConfig ()
 
virtual ~CYIGridLayoutConfig ()
 
virtual std::unique_ptr< CYILayoutConfigClone () const override
 
virtual void ConfigureFrom (const IYIPropertiesSource *pSource) override
 
void SetCellWidth (uint32_t width)
 
uint32_t GetCellWidth () const
 
void SetCellHeight (uint32_t height)
 
uint32_t GetCellHeight () const
 
- Public Member Functions inherited from CYIAnimatingLayoutConfig
 CYIAnimatingLayoutConfig ()
 
virtual ~CYIAnimatingLayoutConfig ()
 
void SetAnimatePosition (bool animatePosition)
 Sets whether position layout animations should be applied to this node. More...
 
bool IsUsingAnimatedPosition () const
 
void SetAnimateSize (bool animateSize)
 Sets whether size position animations should be applied to this node. More...
 
bool IsUsingAnimatedSize () const
 
- Public Member Functions inherited from CYILayoutConfig
 CYILayoutConfig ()
 
virtual ~CYILayoutConfig ()
 
void SetSizeConstraints (const SizeConstraints &sizeConstraints)
 
const SizeConstraintsGetSizeConstraints () const
 
void SetMargin (const Margin &margin)
 
const MarginGetMargin () const
 
void SetLayoutable (bool layoutable)
 
bool IsLayoutable () const
 
void SetItemGravity (const glm::vec3 &itemGravity)
 
void SetItemGravity (Gravity itemGravity)
 
const glm::vec3 & GetItemGravity () const
 
void SetIsBackground (bool background)
 
bool IsBackground () const
 

Protected Attributes

uint32_t m_cellWidth
 
uint32_t m_cellHeight
 
- Protected Attributes inherited from CYIAnimatingLayoutConfig
bool m_animatePosition
 
bool m_animateSize
 

Additional Inherited Members

- Public Types inherited from CYILayoutConfig
enum  Gravity {
  Gravity::None,
  Gravity::Center,
  Gravity::Left,
  Gravity::Right,
  Gravity::Top,
  Gravity::Bottom,
  Gravity::Front,
  Gravity::Back,
  Gravity::TopLeft,
  Gravity::TopRight,
  Gravity::BottomLeft,
  Gravity::BottomRight
}
 
typedef CubeOffset Margin
 
- Static Public Member Functions inherited from CYILayoutConfig
static void RemoveSuffixFromNumber (CYIString &inOutNumber, CYIString &outSuffix)
 
static glm::vec3 ReadGravityFrom (CYIStringView key, const IYIPropertiesSource *pSource, const glm::vec3 &defaultGravity)
 
static glm::vec3 GetGravityVectorFor (Gravity gravity)
 

Constructor & Destructor Documentation

◆ CYIGridLayoutConfig()

CYIGridLayoutConfig::CYIGridLayoutConfig ( )

◆ ~CYIGridLayoutConfig()

virtual CYIGridLayoutConfig::~CYIGridLayoutConfig ( )
virtual

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<CYILayoutConfig> CYIGridLayoutConfig::Clone ( ) const
overridevirtual

Creates a duplicate of this layout configuration object. The created type is the dynamic type of this object.

Reimplemented from CYIAnimatingLayoutConfig.

◆ ConfigureFrom()

virtual void CYIGridLayoutConfig::ConfigureFrom ( const IYIPropertiesSource pSource)
overridevirtual

Extracts configuration properties from properties source pSource (typically a scene node) and assigns them to this object.

Note
Subclasses should override this method. Remember to call the parent ConfigureFrom function.
CYILayout instances do not call this function when pSource has no properties.
See also
IYIPropertiesSource::HasProperties()

Reimplemented from CYIAnimatingLayoutConfig.

◆ GetCellHeight()

uint32_t CYIGridLayoutConfig::GetCellHeight ( ) const

◆ GetCellWidth()

uint32_t CYIGridLayoutConfig::GetCellWidth ( ) const

◆ SetCellHeight()

void CYIGridLayoutConfig::SetCellHeight ( uint32_t  height)

Sets the cell height to height. The cell height indicates how many cells that the associated node takes up, vertically, in the grid.

Note
A values of 0 is not supported and would be replaced by a value of 1.

◆ SetCellWidth()

void CYIGridLayoutConfig::SetCellWidth ( uint32_t  width)

Sets the cell width to width. The cell width indicates how many cells that the associated node takes up, horizontally, in the grid.

Note
A values of 0 is not supported and would be replaced by a value of 1.

Member Data Documentation

◆ m_cellHeight

uint32_t CYIGridLayoutConfig::m_cellHeight
protected

◆ m_cellWidth

uint32_t CYIGridLayoutConfig::m_cellWidth
protected

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