Implementation class for GridLayoutConcept. More...
#include <kanzi/ui/node/concept/grid_layout_concept.hpp>
Classes | |
| struct | GridObjectLocationWorkspace |
| Information used to store the state between function calls when locating objects. More... | |
Public Member Functions | |
| void | addAutomaticColumn () |
| Adds a new automatic size column to the grid. | |
| void | addAutomaticRow () |
| Adds a new automatic size row to the grid. | |
| void | addFixedColumn (float size) |
| Adds a new fixed size column to the grid. | |
| void | addFixedRow (float size) |
| Adds a new fixed size row to the grid. | |
| void | addWeightedColumn (float weight) |
| Adds a new weighted size column to the grid. | |
| void | addWeightedRow (float weight) |
| Adds a new weighted size row to the grid. | |
| float | getActualColumnSize (unsigned int index) const |
| Gets the last calculated value for a grid column size. | |
| float | getActualRowSize (unsigned int index) const |
| Gets the last calculated value for a grid row size. | |
| unsigned int | getColumnCount () const |
| Gets the number of columns in the grid. | |
| string | getColumnDefinitions () const |
| Gets the ColumnDefinitions property. | |
| GridDirection | getDirection () const |
| Gets the Direction property. | |
| unsigned int | getRowCount () const |
| Gets the number of rows in the grid. | |
| string | getRowDefinitions () const |
| Gets the RowDefinitions property. | |
| void | removeColumn () |
| Removes the last column from the grid. | |
| void | removeRow () |
| Removes the last row from the grid. | |
| void | setColumnAutomatic (unsigned int index) |
| Sets a grid column to automatic size. | |
| void | setColumnDefinitions (string_view value) |
| Sets the ColumnDefinitions property. | |
| void | setColumnFixed (unsigned int index, float size) |
| Sets a grid column to a fixed size. | |
| void | setColumnWeighted (unsigned int index, float weight) |
| Sets a grid column to a weighted size. | |
| void | setDirection (GridDirection value) |
| Sets the Direction property. | |
| void | setRowAutomatic (unsigned int index) |
| Sets a grid row to automatic size. | |
| void | setRowDefinitions (string_view value) |
| Sets the RowDefinitions property. | |
| void | setRowFixed (unsigned int index, float size) |
| Sets a grid row to a fixed size. | |
| void | setRowWeighted (unsigned int index, float weight) |
| Sets a grid row to a weighted size. | |
Static Public Member Functions | |
| static unsigned int | getColumn (const Node &item) |
| Gets the column of an item. | |
| static unsigned int | getColumnSpan (const Node &item) |
| Gets the column span of an item. | |
| static unsigned int | getRow (const Node &item) |
| Gets the row of an item. | |
| static unsigned int | getRowSpan (const Node &item) |
| Gets the row span of an item. | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
| static void | setColumn (Node &item, unsigned int column) |
| Sets the column of an item. | |
| static void | setColumnSpan (Node &item, unsigned int columnSpan) |
| Sets the column span of an item. | |
| static void | setRow (Node &item, unsigned int row) |
| Sets the row of an item. | |
| static void | setRowSpan (Node &item, unsigned int rowSpan) |
| Sets the row span of an item. | |
Static Public Member Functions inherited from kanzi::GridLayoutConcept | |
| static float | accumulateMaximumSize (const RowColumnDefinitionContainer &definitions) |
| Calculates the sum of row or column definition's maximum sizes. | |
| static void | calculateOffsets (RowColumnDefinitionContainer &definitions) |
| Calculates grid row or column definition offsets according to current maximum sizes. | |
| static void | calculateWeightedSizes (RowColumnDefinitionContainer &definitions, float weightMultiplier) |
| Calculates grid row or column definition maximum sizes for weighted rows or columns. | |
| static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
| static void | parseRowColumnDefinitions (const string &definitionCollection, RowColumnDefinitionContainer &definitions) |
| Parse grid row or column definitions from property string. | |
Protected Member Functions | |
| GridLayoutConceptImpl (Domain *domain, string_view name) | |
| Constructor. | |
| void | onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override |
| TBaseClass::arrangeOverride() implementation. | |
Static Protected Member Functions | |
| static void | getNextItemLocation (const Node &node, GridObjectLocationWorkspace &workspace, unsigned int &out_row, unsigned int &out_column) |
| Decides the row and column for the next item in the grid. | |
| static void | getSpan (const Node &item, unsigned int &rowSpan, unsigned int &columnSpan) |
| Gets the span of a grid item. | |
Protected Attributes | |
| float | m_accumulatedColumnSize |
| Total size of all columns. | |
| float | m_accumulatedRowSize |
| Total size of all rows. | |
| RowColumnDefinitionContainer | m_columns |
| Column definitions. | |
| float | m_columnWeights |
| Total weight of weighted columns. | |
| RowColumnDefinitionContainer | m_rows |
| Row definitions. | |
| float | m_rowWeights |
| Total weights of weighted rows. | |
Implementation class for GridLayoutConcept.
|
protected |
Constructor.
| domain | The UI domain the new node belongs to. |
| name | The name of the node. |
|
static |
|
static |
Gets the column of an item.
| item | A node that is or can become an item of a grid. |
|
static |
Sets the column of an item.
| item | A node that is or can become an item of a grid. |
| column | Column of the item. |
|
static |
Gets the column span of an item.
| item | A node that is or can become an item of a grid. |
|
static |
Sets the column span of an item.
| item | A node that is or can become an item of a grid. |
| columnSpan | Column span of the item. |
|
static |
Gets the row of an item.
| item | A node that is or can become an item of a grid. |
|
static |
Sets the row of an item.
| item | A node that is or can become an item of a grid. |
| row | Row of the item. |
|
static |
Gets the row span of an item.
| item | A node that is or can become an item of a grid. |
|
static |
Sets the row span of an item.
| item | A node that is or can become an item of a grid. |
| rowSpan | Row span of the item. |
| unsigned int kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getRowCount | ( | ) | const |
Gets the number of rows in the grid.
| unsigned int kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getColumnCount | ( | ) | const |
Gets the number of columns in the grid.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::addFixedRow | ( | float | size | ) |
Adds a new fixed size row to the grid.
| size | Size of the row. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::addAutomaticRow | ( | ) |
Adds a new automatic size row to the grid.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::addWeightedRow | ( | float | weight | ) |
Adds a new weighted size row to the grid.
| weight | Weight of the row. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::addFixedColumn | ( | float | size | ) |
Adds a new fixed size column to the grid.
| size | Size of the column. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::addAutomaticColumn | ( | ) |
Adds a new automatic size column to the grid.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::addWeightedColumn | ( | float | weight | ) |
Adds a new weighted size column to the grid.
| weight | Weight of the column. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::removeRow | ( | ) |
Removes the last row from the grid.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::removeColumn | ( | ) |
Removes the last column from the grid.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setRowFixed | ( | unsigned int | index, |
| float | size ) |
Sets a grid row to a fixed size.
| index | Index of the row, starting from 0. |
| size | Size of the row. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setRowAutomatic | ( | unsigned int | index | ) |
Sets a grid row to automatic size.
| index | Index of the row, starting from 0. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setRowWeighted | ( | unsigned int | index, |
| float | weight ) |
Sets a grid row to a weighted size.
| index | Index of the row, starting from 0. |
| weight | Weight of the row. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setColumnFixed | ( | unsigned int | index, |
| float | size ) |
Sets a grid column to a fixed size.
| index | Index of the column, starting from 0. |
| size | Size of the column. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setColumnAutomatic | ( | unsigned int | index | ) |
Sets a grid column to automatic size.
| index | Index of the row, starting from 0. |
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setColumnWeighted | ( | unsigned int | index, |
| float | weight ) |
Sets a grid column to a weighted size.
| index | Index of the column, starting from 0. |
| weight | Weight of the column. |
| float kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getActualRowSize | ( | unsigned int | index | ) | const |
Gets the last calculated value for a grid row size.
The value is recalculated whenever the grid is layouted.
| index | Index of the row, starting from 0. |
| float kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getActualColumnSize | ( | unsigned int | index | ) | const |
Gets the last calculated value for a grid column size.
The value is recalculated whenever the grid is layouted.
| index | Index of the column, starting from 0. |
| GridLayoutConcept::GridDirection kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getDirection | ( | ) | const |
Gets the Direction property.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setDirection | ( | GridLayoutConcept::GridDirection | value | ) |
Sets the Direction property.
| string kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getColumnDefinitions | ( | ) | const |
Gets the ColumnDefinitions property.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setColumnDefinitions | ( | string_view | value | ) |
Sets the ColumnDefinitions property.
| string kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::getRowDefinitions | ( | ) | const |
Gets the RowDefinitions property.
| void kanzi::GridLayoutConceptImpl< TBaseClass, TDerivedClass >::setRowDefinitions | ( | string_view | value | ) |
Sets the RowDefinitions property.
|
overrideprotected |
TBaseClass::arrangeOverride() implementation.
|
staticprotected |
Decides the row and column for the next item in the grid.
Requires a workspace to store state between calls.
| node | Next item to position. |
| workspace | Stores state from previous calls to this function. Updated during the call. |
| out_row | Row of the item. |
| out_column | Column of the item. |
|
staticprotected |
Gets the span of a grid item.
|
protected |
Row definitions.
|
protected |
Column definitions.
|
protected |
Total weights of weighted rows.
|
protected |
Total weight of weighted columns.
|
protected |
Total size of all rows.
|
protected |
Total size of all columns.