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

Go to the source code of this file.

Functions

GooeyCheckbox * GooeyCheckbox_Add (GooeyWindow *win, int x, int y, char *label, void(*callback)(bool checked))
 Adds a checkbox to the window.
 
bool GooeyCheckbox_HandleClick (GooeyWindow *win, int x, int y)
 Handles checkbox click events.
 
void GooeyCheckbox_Draw (GooeyWindow *win)
 

Function Documentation

◆ GooeyCheckbox_Add()

GooeyCheckbox * GooeyCheckbox_Add ( GooeyWindow *  win,
int  x,
int  y,
char *  label,
void(*)(bool checked)  callback 
)

Adds a checkbox to the window.

Parameters
winThe window to add the checkbox to.
xThe x-coordinate of the checkbox's position.
yThe y-coordinate of the checkbox's position.
labelThe label for the checkbox.
callbackThe callback function to call when the checkbox is clicked.
Returns
A new GooeyCheckbox object.

◆ GooeyCheckbox_Draw()

void GooeyCheckbox_Draw ( GooeyWindow *  win)

◆ GooeyCheckbox_HandleClick()

bool GooeyCheckbox_HandleClick ( GooeyWindow *  win,
int  x,
int  y 
)

Handles checkbox click events.

Parameters
winThe window containing the checkbox.
xThe x-coordinate of the click event.
yThe y-coordinate of the click event.
Returns
True if the checkbox was clicked, false otherwise.