GridConcept is a base class for the nodes that implement layout that arranges items in a grid. More...
#include <kanzi/ui/node/concept/grid_layout_concept.hpp>
Classes | |
struct | RowColumnDefinition |
Definition for the size and position of a single row or column. More... | |
Public Types | |
enum | RowColumnSizeMode { RowColumnSizeModeUser, RowColumnSizeModeAuto, RowColumnSizeModeWeighted } |
Size mode for a grid row or a column. More... | |
enum | GridDirection { GridDirectionRight, GridDirectionDown } |
Direction of layout of grid layout. Items which don't have fixed ColumnProperty and RowProperty are laid out in this direction. More... | |
typedef vector< RowColumnDefinition > | RowColumnDefinitionContainer |
Container type for row and column definitions. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
static void | calculateWeightedSizes (RowColumnDefinitionContainer &definitions, float weightMultiplier) |
Calculates grid row or column definition maximum sizes for weighted rows or columns. More... | |
static void | calculateOffsets (RowColumnDefinitionContainer &definitions) |
Calculates grid row or column definition offsets according to current maximum sizes. More... | |
static float | accumulateMaximumSize (const RowColumnDefinitionContainer &definitions) |
Calculates the sum of row or column definition's maximum sizes. More... | |
static void | parseRowColumnDefinitions (const string &definitionCollection, RowColumnDefinitionContainer &definitions) |
Parse grid row or column definitions from property string. More... | |
Static Public Attributes | |
Properties | |
static PropertyType< GridLayoutConcept::GridDirection > | DirectionProperty |
Direction property. More... | |
static PropertyType< string > | ColumnDefinitionsProperty |
ColumnDefinitions property. More... | |
static PropertyType< string > | RowDefinitionsProperty |
RowDefinitions property. More... | |
static PropertyType< int > | ColumnProperty |
Column property. More... | |
static PropertyType< int > | ColumnSpanProperty |
ColumnSpan property. More... | |
static PropertyType< int > | RowProperty |
Row property. More... | |
static PropertyType< int > | RowSpanProperty |
RowSpan property. More... | |
GridConcept is a base class for the nodes that implement layout that arranges items in a grid.
Grid nodes arrange their items in a grid of cells. The grid node contains the definition for grid: the number and size of rows and columns. The grid items contain the coordinates of their cell, and the number of cells the item spans.
Container type for row and column definitions.
Size mode for a grid row or a column.
Direction of layout of grid layout. Items which don't have fixed ColumnProperty and RowProperty are laid out in this direction.
Enumerator | |
---|---|
GridDirectionRight |
Layout first right, then down. |
GridDirectionDown |
Layout first down, then right. |
|
static |
|
static |
Calculates grid row or column definition maximum sizes for weighted rows or columns.
definitions | Row or column definitions. |
weightMultiplier | The size of a single weight unit. |
|
static |
Calculates grid row or column definition offsets according to current maximum sizes.
definitions | Row or column definitions. |
|
static |
Calculates the sum of row or column definition's maximum sizes.
definitions | Row or column definitions. |
|
static |
Parse grid row or column definitions from property string.
definitionCollection | Property string describing grid rows or columns. See RowDefinitionsProperty for format definition. |
definitions | Output parameter that will hold the row or column definitions. |
|
static |
Direction property.
Defines the grid primary layouting direction. This property specifies how to choose the row and column for items without explicit grid row and column properties. The default value is GridLayoutConcept::GridDirectionRight.
|
static |
ColumnDefinitions property.
Defines the columns of the grid. See RowDefinitionsProperty. The default value is "".
|
static |
RowDefinitions property.
Defines the rows of the grid. The string has a special format of "[*f|f];[*f|f];...", where each row definition is separated by a ';' character, 'f' signifies a float number and '*' signifies a weighted (proportional) height. For example, "1.0;2.0;3.0;" defines three rows with heights of 1.0, 2.0 and 3.0 respectively. ";;" specifies two rows that all have heights calculated from their content. "*1.0;*2.0;*3.0;" specifies three rows where the first row has 1/6 of the total height (#HeightProperty), the second 2/6 and the third 3/6. The default value is "".
|
static |
Column property.
Defines the column of an item in a grid, starting from 0. The default value is 0.
|
static |
ColumnSpan property.
Defines how many columns this grid item spans. The default value is 1.
|
static |
Row property.
Defines the row of an item in a grid, starting from 0. The default value is 0.
|
static |
RowSpan property.
Defines how many rows this grid item spans. The default value is 1.