![]() |
BSB Developer Docs
|
A widget that arranges its elements in flexible rows or columns. More...
#include <gui/widget.h>Go to the source code of this file.
Typedefs | |
| typedef struct FlexBox | FlexBox |
| FlexBox opaque structure. | |
Enumerations | |
| enum | FlexBoxFlow { FlexBoxFlowRow , FlexBoxFlowColumn , FlexBoxFlowMax } |
| Enumeration of possible flow types. More... | |
| enum | FlexBoxAlign { FlexBoxAlignStart , FlexBoxAlignEnd , FlexBoxAlignCenter , FlexBoxAlignMax } |
| Enumeration of possible item alignment types. More... | |
Functions | |
| FlexBox * | flex_box_alloc (Widget *parent) |
| Create a new FlexBox instance. | |
| void | flex_box_free (FlexBox *instance) |
| Delete a FlexBox instance. | |
| Widget * | flex_box_get_base (FlexBox *instance) |
| Get a pointer to the base class instance. | |
| void | flex_box_set_flow (FlexBox *instance, FlexBoxFlow flow) |
| Set the direction in which the child elements will be arranged. | |
| void | flex_box_set_align (FlexBox *instance, FlexBoxAlign main, FlexBoxAlign cross) |
| Set the alignment type of the child elements. | |
| void | flex_box_set_spacing (FlexBox *instance, int32_t spacing) |
| Set the spacing between child elements. | |
A widget that arranges its elements in flexible rows or columns.
To add a widget to a FlexBox, pass it as the parent during your widget's creation.
| enum FlexBoxAlign |
| enum FlexBoxFlow |
Create a new FlexBox instance.
| [in,out] | parent | pointer to the parent Widget instance |
| void flex_box_free | ( | FlexBox * | instance | ) |
Delete a FlexBox instance.
| [in,out] | instance | pointer to the FlexBox instance to be deleted |
Get a pointer to the base class instance.
The return value can be used in all Widget methods.
| [in,out] | instance | pointer to the FlexBox instance to be queried |
| void flex_box_set_align | ( | FlexBox * | instance, |
| FlexBoxAlign | main, | ||
| FlexBoxAlign | cross ) |
Set the alignment type of the child elements.
| [in,out] | instance | pointer to the FlexBox instance to be modified |
| [in] | main | Placement of items along main axis. |
| [in] | cross | Placement of items along cross axis. |
| void flex_box_set_flow | ( | FlexBox * | instance, |
| FlexBoxFlow | flow ) |
Set the direction in which the child elements will be arranged.
| [in,out] | instance | pointer to the FlexBox instance to be modified |
| [in] | flow | value corresponding to the flow type required |
| void flex_box_set_spacing | ( | FlexBox * | instance, |
| int32_t | spacing ) |
Set the spacing between child elements.
| [in,out] | instance | pointer to the FlexBox instance to be modified |
| [in] | spacing | spacing between elements, in pixels |