Layout

A layout is an area that can be split into multiple cells. Each of these cells can be resized and can act as a Widget container. Layouts in the editor are used as the base of a workspace due to their flexibility.

See Also

Static Variables


Name Description
widget Parent Widget where the Layout component is defined.
grip_count Current amount of grip or split the Layout currently contains.

Variables


Name Description
margin Size of the grips in pixels.
max_cells Specify the maximum amount of cells.
row_size Minimum (X) and maximum (Y) size of a row in pixels.
column_size Minimum (X) and maximum (Y) size of a column in pixels.
dynamic_resize Determine wether or not the cells are dynamically resized when the Layout size changes.
snap_vertical Allow grips to snap vertically.
snap_horizontal Allow grips to snap horizontally.
allow_merge Allow cells to be merged.
allow_split Allow cells to be splitted.

Functions


Name Description
CanSplit Helper function to check if a Layout cell can split.
SplitCell Function to split an existing cell in two.
CanMerge Test if the cell delimited by a specific grip can merge.
MergeCell Merge two cell together.
ResizeCells Resize the cells delimited by a specific grip index.
ResizeCells Resize the cells delimited by a specific grip index using snapping.
Resize Resize the Layout.
Resize Resize the Layout using snapping.
RebuildLimits Rebuilt the Layout edges limits to insure proper resizing.
RebuildGrips Force to recalculate all grips to insure proper cell resizing.
Realign Force to realign all cells contained in the current Layout to insure that they are all snap to their associated grip(s).

MergeDirection


Constant value that represent the direction to use while merging Layout cells.

  • kUpperBounds: Represent the right side for vertical grips and below for horizontal grips.
  • kLowerBounds: Represent the left side for vertical grips and above (for horizontal grips).




NRG - API 2022.1.377663 - Fri Feb 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA