HoverRace  2.0
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Display::FlexGrid::BasicCell< T > Class Template Reference

#include <FlexGrid.h>

+ Inheritance diagram for HoverRace::Display::FlexGrid::BasicCell< T >:

Public Member Functions

 BasicCell (FlexGrid *parent, const DefaultCell &defaultCell, std::shared_ptr< T > contents)
 
virtual ~BasicCell ()
 
std::shared_ptr< T > & GetContents ()
 
void SetAlignment (Alignment alignment) override
 Set the how the widget is aligned inside the cell when the cell is larger than the widget. More...
 
void SetFill (bool fill) override
 Set whether the widget is resized to fill the space of the cell. More...
 
- Public Member Functions inherited from HoverRace::Display::FlexGrid::Cell
 Cell ()
 
virtual ~Cell ()
 

Protected Member Functions

bool Contains (const UiViewModel *child) const override
 Check if this contains the specified widget. More...
 
void DropFocus () override
 Trigger DropFocus() on the contents. More...
 
Vec3 Measure () override
 Measure the size of the cell contents. More...
 
bool OnAction () override
 Trigger OnAction() on the contents. More...
 
bool OnNavigate (const Control::Nav &nav) override
 Trigger OnNavigate() on the contents. More...
 
void SetExtents (double x, double y, double w, double h, double paddingX, double paddingY) override
 Set the position and size of the cell. More...
 
void SetSize (double w, double h)
 
bool TryFocus (const Control::Nav &nav) override
 Trigger TryFocus() on the contents. More...
 

Private Types

using SUPER = Cell
 

Private Attributes

std::shared_ptr< T > contents
 
bool fill
 
FlexGridparent
 

Member Typedef Documentation

template<typename T >
using HoverRace::Display::FlexGrid::BasicCell< T >::SUPER = Cell
private

Constructor & Destructor Documentation

template<typename T >
HoverRace::Display::FlexGrid::BasicCell< T >::BasicCell ( FlexGrid parent,
const DefaultCell defaultCell,
std::shared_ptr< T >  contents 
)
inline
template<typename T >
virtual HoverRace::Display::FlexGrid::BasicCell< T >::~BasicCell ( )
inlinevirtual

Member Function Documentation

template<typename T >
bool HoverRace::Display::FlexGrid::BasicCell< T >::Contains ( const UiViewModel child) const
inlineoverrideprotectedvirtual

Check if this contains the specified widget.

Parameters
childThe child to check (may be nullptr).
Returns
true if the cell contains the widget, false otherwise.

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
void HoverRace::Display::FlexGrid::BasicCell< T >::DropFocus ( )
inlineoverrideprotectedvirtual

Trigger DropFocus() on the contents.

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
std::shared_ptr<T>& HoverRace::Display::FlexGrid::BasicCell< T >::GetContents ( )
inline
template<typename T >
Vec3 HoverRace::Display::FlexGrid::BasicCell< T >::Measure ( )
inlineoverrideprotectedvirtual

Measure the size of the cell contents.

Returns
The size (may be zero).

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
bool HoverRace::Display::FlexGrid::BasicCell< T >::OnAction ( )
inlineoverrideprotectedvirtual

Trigger OnAction() on the contents.

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
bool HoverRace::Display::FlexGrid::BasicCell< T >::OnNavigate ( const Control::Nav )
inlineoverrideprotectedvirtual

Trigger OnNavigate() on the contents.

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
void HoverRace::Display::FlexGrid::BasicCell< T >::SetAlignment ( Alignment  alignment)
inlineoverridevirtual

Set the how the widget is aligned inside the cell when the cell is larger than the widget.

Parameters
alignmentThe alignment (default is NW).

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
void HoverRace::Display::FlexGrid::BasicCell< T >::SetExtents ( double  x,
double  y,
double  w,
double  h,
double  paddingX,
double  paddingY 
)
inlineoverrideprotectedvirtual

Set the position and size of the cell.

Parameters
xThe X position of the cell.
yThe Y position of the cell.
wThe width of the cell.
hThe height of the cell.
paddingXThe horizontal padding on the cell.
paddingYThe vertical padding on the cell.

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
void HoverRace::Display::FlexGrid::BasicCell< T >::SetFill ( bool  fill)
inlineoverridevirtual

Set whether the widget is resized to fill the space of the cell.

If the widget cannot be resized, then nothing will be done.

Parameters
filltrue To resize the widget, false to leave it alone.

Implements HoverRace::Display::FlexGrid::Cell.

template<typename T >
void HoverRace::Display::FlexGrid::BasicCell< T >::SetSize ( double  w,
double  h 
)
inlineprotected
template<typename T >
bool HoverRace::Display::FlexGrid::BasicCell< T >::TryFocus ( const Control::Nav nav)
inlineoverrideprotectedvirtual

Trigger TryFocus() on the contents.

Implements HoverRace::Display::FlexGrid::Cell.

Member Data Documentation

template<typename T >
std::shared_ptr<T> HoverRace::Display::FlexGrid::BasicCell< T >::contents
private
template<typename T >
bool HoverRace::Display::FlexGrid::BasicCell< T >::fill
private
template<typename T >
FlexGrid* HoverRace::Display::FlexGrid::BasicCell< T >::parent
private

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