Layout Grids
PBGrid
Opaque object handle:
This is a subclass of PBElement. You can safely cast from PBGrid to PBElement. To cast from PBElement to PBGrid, call PBGridCast; this performs a runtime assertion to check the cast is possible. This function is thread-safe.
This object maintains an internal reference count. When the reference count reaches zero, the object will be automatically deallocated. To increment the reference count, call PBElementRetain; to decrement the reference count, call PBElementRelease. These functions are thread-safe.
PBGridFlags
Enumeration/bitset of type uint32_t:
Constants
PBGrid_LAYOUT_ROWS_FIRST
PBGrid_LAYOUT_ROWS_FIRST = 1<<0
PBGrid_LAYOUT_JUSTIFY_COLUMNS
PBGrid_LAYOUT_JUSTIFY_COLUMNS = 1<<1
PBGrid_LAYOUT_JUSTIFY_ROWS
PBGrid_LAYOUT_JUSTIFY_ROWS = 1<<2
Or any of the values from PBElementFlags.
PBGridCreate
Function:
Syntax (C/C++)
PBGridPtr _Nullable PBGridCreate(PBElementRef parent, PBGridFlags gridFlags);
Syntax (Python)
GridCreate(parent, gridFlags) -> (grid)
Parameters and Return Values
[in] parent (referenced PBElement):
[in] gridFlags (PBGridFlags):
[out] grid (nullable owned PBGrid):
PBGridSetCellOfChild
Function:
Syntax (C/C++)
void PBGridSetCellOfChild(PBGridRef grid, PBElementRef childElement,
uint32_t column, uint32_t row);
Syntax (Python)
GridSetCellOfChild(grid, childElement, column, row)
Parameters and Return Values
[in] grid (referenced PBGrid):
[in] childElement (referenced PBElement):
[in] column (uint32_t
):
[in] row (uint32_t
):
PBGridGetCellRangeOfChild
Function:
Syntax (C/C++)
bool PBGridGetCellRangeOfChild(PBGridRef grid, PBElementRef childElement,
/* output */ int32_t * __restrict column,
/* output */ uint32_t * __restrict columnFrom,
/* output */ uint32_t * __restrict columnTo,
/* output */ int32_t * __restrict row,
/* output */ uint32_t * __restrict rowFrom,
/* output */ uint32_t * __restrict rowTo);
Syntax (Python)
GridGetCellRangeOfChild(grid, childElement) -> (inGrid, column, columnFrom, columnTo, row, rowFrom, rowTo)
Parameters and Return Values
[in] grid (referenced PBGrid):
[in] childElement (referenced PBElement):
[out] inGrid (bool
):
[out] column (int32_t
):
[out] columnFrom (uint32_t
):
[out] columnTo (uint32_t
):
[out] row (int32_t
):
[out] rowFrom (uint32_t
):
[out] rowTo (uint32_t
):
PBGridSetCellRangeOfChild
Function:
Syntax (C/C++)
void PBGridSetCellRangeOfChild(PBGridRef grid, PBElementRef childElement,
int32_t column, uint32_t columnFrom, uint32_t columnTo, int32_t row,
uint32_t rowFrom, uint32_t rowTo);
Syntax (Python)
GridSetCellRangeOfChild(grid, childElement, column, columnFrom, columnTo, row, rowFrom, rowTo)
Parameters and Return Values
[in] grid (referenced PBGrid):
[in] childElement (referenced PBElement):
[in] column (int32_t
):
[in] columnFrom (uint32_t
):
[in] columnTo (uint32_t
):
[in] row (int32_t
):
[in] rowFrom (uint32_t
):
[in] rowTo (uint32_t
):
PBGridSetColumnSize
Function:
Syntax (C/C++)
void PBGridSetColumnSize(PBGridRef grid, uint32_t columnIndex, int32_t sizeDp,
uint32_t fillWeight);
Syntax (Python)
GridSetColumnSize(grid, columnIndex, sizeDp, fillWeight)
Parameters and Return Values
[in] grid (referenced PBGrid):
[in] columnIndex (uint32_t
):
[in] sizeDp (int32_t
):
[in] fillWeight (uint32_t
):
PBGridSetRowSize
Function:
Syntax (C/C++)
void PBGridSetRowSize(PBGridRef grid, uint32_t rowIndex, int32_t sizeDp,
uint32_t fillWeight);
Syntax (Python)
GridSetRowSize(grid, rowIndex, sizeDp, fillWeight)
Parameters and Return Values
[in] grid (referenced PBGrid):
[in] rowIndex (uint32_t
):
[in] sizeDp (int32_t
):
[in] fillWeight (uint32_t
):
PBGridSetGapSizes
Function:
Syntax (C/C++)
void PBGridSetGapSizes(PBGridRef grid, int32_t columnGapDp, int32_t rowGapDp);
Syntax (Python)
GridSetGapSizes(grid, columnGapDp, rowGapDp)
Parameters and Return Values
[in] grid (referenced PBGrid):
[in] columnGapDp (int32_t
):
[in] rowGapDp (int32_t
):