Base class for the Grid Layout nodes. 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 | 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. | |
enum | RowColumnSizeMode { RowColumnSizeModeUser , RowColumnSizeModeAuto , RowColumnSizeModeWeighted } |
Size mode for a grid row or a column. More... | |
Static Public Member Functions | |
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. | |
Static Public Attributes | |
Properties | |
static PropertyType< GridLayoutConcept::GridDirection > | DirectionProperty |
Direction property. | |
static PropertyType< string > | ColumnDefinitionsProperty |
ColumnDefinitions property. | |
static PropertyType< string > | RowDefinitionsProperty |
RowDefinitions property. | |
static PropertyType< int > | ColumnProperty |
Column property. | |
static PropertyType< int > | ColumnSpanProperty |
ColumnSpan property. | |
static PropertyType< int > | RowProperty |
Row property. | |
static PropertyType< int > | RowSpanProperty |
RowSpan property. | |
Base class for the Grid Layout nodes.
Grid Layout 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 a grid. The string format is "[*f|f];[*f|f];...", where:
For example:
|
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.