Gooey GUI Library
Loading...
Searching...
No Matches
gooey_layout.h File Reference
#include "core/gooey_backend_internal.h"
#include "gooey_widgets_internal.h"

Go to the source code of this file.

Functions

GooeyLayout * GooeyLayout_Create (GooeyWindow *win, GooeyLayoutType layout_type, int x, int y, int width, int height)
 Creates a layout for the specified window.
 
void GooeyLayout_AddChild (GooeyLayout *layout, void *widget)
 Adds a child widget to a layout.
 
void GooeyLayout_Build (GooeyLayout *layout)
 Builds the layout, arranging all child widgets according to the layout type.
 

Function Documentation

◆ GooeyLayout_AddChild()

void GooeyLayout_AddChild ( GooeyLayout *  layout,
void *  widget 
)

Adds a child widget to a layout.

Parameters
layoutThe layout to which the widget will be added.
widgetThe widget to add to the layout.

◆ GooeyLayout_Build()

void GooeyLayout_Build ( GooeyLayout *  layout)

Builds the layout, arranging all child widgets according to the layout type.

Parameters
layoutThe layout to build.

◆ GooeyLayout_Create()

GooeyLayout * GooeyLayout_Create ( GooeyWindow *  win,
GooeyLayoutType  layout_type,
int  x,
int  y,
int  width,
int  height 
)

Creates a layout for the specified window.

Initializes a new layout with a specified layout type, position, and size within the window.

Parameters
winThe window to attach the layout to.
layout_typeThe type of layout (e.g., grid, box).
xThe x-coordinate of the layout's position.
yThe y-coordinate of the layout's position.
widthThe width of the layout.
heightThe height of the layout.
Returns
A new GooeyLayout object.