Gooey GUI Library
Loading...
Searching...
No Matches
gooey_checkbox.h File Reference

Header file for the GooeyCheckbox module. More...

#include "common/gooey_common.h"

Go to the source code of this file.

Functions

GooeyCheckbox * GooeyCheckbox_Create (int x, int y, char *label, void(*callback)(bool checked))
 Adds a checkbox to the specified window.
 

Detailed Description

Header file for the GooeyCheckbox module.

Author
Yassine Ahmed Ali

Provides functions to create, handle, and draw checkboxes within a GooeyWindow.

Function Documentation

◆ GooeyCheckbox_Create()

GooeyCheckbox * GooeyCheckbox_Create ( int  x,
int  y,
char *  label,
void(*)(bool checked)  callback 
)

Adds a checkbox to the specified window.

This function creates a new GooeyCheckbox with the given label.

Parameters
xThe x-coordinate of the checkbox's position.
yThe y-coordinate of the checkbox's position.
labelThe label text displayed next to the checkbox.
callbackThe function to call when the checkbox is clicked. The callback receives a boolean indicating whether the checkbox is checked (true) or unchecked (false).
Returns
A pointer to the newly created GooeyCheckbox.