libGumball 0.0.1
C23-Based, libGimbal-powered UI Library
Loading...
Searching...
No Matches
gumball_container.h File Reference

Go to the source code of this file.

Macros

#define GUM_Container_create(...)
Type System

Type UUID and cast operators

#define GUM_CONTAINER_TYPE
#define GUM_CONTAINER(self)
#define GUM_CONTAINER_CLASS(klass)
#define GUM_CONTAINER_CLASSOF(self)

Variables

Properties

Properties you can set/get at or after creation.

Note
You can also set/get properties from parent classes (see GUM_Container).
GUM_Widget char orientation
bool resizeWidgets
bool alignWidgets
float padding
float margin

Detailed Description

GUM_Container data structure and hierarchy graph

GUM_Container is a container element that can hold other widgets. It can be used to group widgets together, and to optionally automatically resize / align them as needed.

Todo
  • Make variables private
  • Make orientation an enum
  • Add scrolling
Author
2025 Agustín Bellagamba

Macro Definition Documentation

◆ GUM_CONTAINER_TYPE

#define GUM_CONTAINER_TYPE

Returns the GUM_Container Type UUID.

◆ GUM_CONTAINER

#define GUM_CONTAINER ( self)

Casts an instance of a compatible element to a GUM_Container.

◆ GUM_CONTAINER_CLASS

#define GUM_CONTAINER_CLASS ( klass)

Casts an class of a compatible element to a GUM_ContainerClass.

◆ GUM_CONTAINER_CLASSOF

#define GUM_CONTAINER_CLASSOF ( self)

Casts an instance of a compatible element to a GUM_Container.

◆ GUM_Container_create

#define GUM_Container_create ( ...)

Returns a new GUM_Container. Optionally takes in a list of Name/Value pairs for properties.

Variable Documentation

◆ orientation

GUM_Widget char orientation

'h' for horizontal, 'v' for vertical layout of child widgets.

Default value is 'v'

Warning
This is planned to be replaced by an enum.

◆ resizeWidgets

bool resizeWidgets

If child widgets should be resized to take an equal amount of space.

Default value is true

◆ alignWidgets

bool alignWidgets

If child widgets should be aligned.

Default value is true

◆ padding

float padding

The space between the container's border and its child widgets.

Default value is 5

◆ margin

float margin

The space between child widgets.

Default value is 5