HoverRace
2.0
|
This is used to reference a cell of the grid without directly accessing it; useful for adding new widgets to the grid. More...
#include <FlexGrid.h>
Public Member Functions | |
CellProxy (size_t row, size_t col, FlexGrid &grid, Cell *cell) | |
CellProxy (const CellProxy &)=default | |
CellProxy (CellProxy &&)=default | |
virtual | ~CellProxy () |
template<class T , class... Args> | |
std::enable_if< std::is_base_of< UiViewModel, T >::value, std::shared_ptr< BasicCell< T > > >::type | NewChild (Args &&...args) |
Creates a new child widget in this cell. More... | |
CellProxy & | operator= (const CellProxy &)=delete |
CellProxy & | operator= (CellProxy &&)=delete |
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... | |
bool | TryFocus (const Control::Nav &nav) override |
Trigger TryFocus() on the contents. More... | |
Private Types | |
using | SUPER = Cell |
Private Member Functions | |
Cell * | CheckCell () const |
Private Attributes | |
Cell * | cell |
size_t | col |
FlexGrid & | grid |
size_t | row |
This is used to reference a cell of the grid without directly accessing it; useful for adding new widgets to the grid.
|
private |
|
inline |
|
default |
|
default |
|
inlinevirtual |
|
inlineprivate |
|
inlineoverrideprotectedvirtual |
Check if this contains the specified widget.
child | The child to check (may be nullptr ). |
true
if the cell contains the widget, false
otherwise. Implements HoverRace::Display::FlexGrid::Cell.
|
inlineoverrideprotectedvirtual |
Trigger DropFocus() on the contents.
Implements HoverRace::Display::FlexGrid::Cell.
|
inlineoverrideprotectedvirtual |
Measure the size of the cell contents.
Implements HoverRace::Display::FlexGrid::Cell.
|
inline |
Creates a new child widget in this cell.
If the cell coordinates are outside of the current grid size, then the grid is automatically resized to fit the cell.
T | The type of the child widget. |
Args | The types of the arguments. |
args | The arguments to pass to the child widget's constructor. |
|
inlineoverrideprotectedvirtual |
Trigger OnAction() on the contents.
Implements HoverRace::Display::FlexGrid::Cell.
|
inlineoverrideprotectedvirtual |
Trigger OnNavigate() on the contents.
Implements HoverRace::Display::FlexGrid::Cell.
|
inlineoverridevirtual |
Set the how the widget is aligned inside the cell when the cell is larger than the widget.
alignment | The alignment (default is NW ). |
Implements HoverRace::Display::FlexGrid::Cell.
|
inlineoverrideprotectedvirtual |
Set the position and size of the cell.
x | The X position of the cell. |
y | The Y position of the cell. |
w | The width of the cell. |
h | The height of the cell. |
paddingX | The horizontal padding on the cell. |
paddingY | The vertical padding on the cell. |
Implements HoverRace::Display::FlexGrid::Cell.
|
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.
fill | true To resize the widget, false to leave it alone. |
Implements HoverRace::Display::FlexGrid::Cell.
|
inlineoverrideprotectedvirtual |
Trigger TryFocus() on the contents.
Implements HoverRace::Display::FlexGrid::Cell.
|
private |
|
private |
|
private |
|
private |