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

Go to the source code of this file.

Functions

GooeyRadioButton * GooeyRadioButton_Add (GooeyWindow *win, int x, int y, char *label, void(*callback)(bool selected))
 Adds a radio button to the window.
 
bool GooeyRadioButton_HandleClick (GooeyWindow *win, int x, int y)
 Handles radio button click events.
 
bool GooeyRadioButtonGroup_HandleClick (GooeyWindow *win, int x, int y)
 
GooeyRadioButtonGroup * GooeyRadioButtonGroup_Create (GooeyWindow *win)
 Creates a radio button group widget.
 
GooeyRadioButton * GooeyRadioButtonGroup_AddChild (GooeyWindow *win, GooeyRadioButtonGroup *group, int x, int y, const char *label, void(*callback)(bool))
 Adds a radio button to a radio button group.
 
void GooeyRadioButtonGroup_Draw (GooeyWindow *win)
 Draws the radio button group on the window.
 

Function Documentation

◆ GooeyRadioButton_Add()

GooeyRadioButton * GooeyRadioButton_Add ( GooeyWindow *  win,
int  x,
int  y,
char *  label,
void(*)(bool selected)  callback 
)

Adds a radio button to the window.

Parameters
winThe window to add the radio button to.
xThe x-coordinate of the radio button's position.
yThe y-coordinate of the radio button's position.
labelThe label of the radio button.
callbackThe callback function to call when the radio button is selected.
Returns
A new GooeyRadioButton object.

◆ GooeyRadioButton_HandleClick()

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

Handles radio button click events.

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

◆ GooeyRadioButtonGroup_AddChild()

GooeyRadioButton * GooeyRadioButtonGroup_AddChild ( GooeyWindow *  win,
GooeyRadioButtonGroup *  group,
int  x,
int  y,
const char *  label,
void(*)(bool)  callback 
)

Adds a radio button to a radio button group.

Parameters
groupThe radio button group to add the button to.
xThe x-coordinate of the radio button.
yThe y-coordinate of the radio button.
labelThe label for the radio button.
callbackThe callback to execute when the radio button is selected.
Returns
The GooeyRadioButton object.

◆ GooeyRadioButtonGroup_Create()

GooeyRadioButtonGroup * GooeyRadioButtonGroup_Create ( GooeyWindow *  win)

Creates a radio button group widget.

Parameters
winThe window containing the radio button group.
Returns
GooeyRadioButtonGroup widget pointer.

◆ GooeyRadioButtonGroup_Draw()

void GooeyRadioButtonGroup_Draw ( GooeyWindow *  win)

Draws the radio button group on the window.

Parameters
winThe window to draw the radio button group on.

◆ GooeyRadioButtonGroup_HandleClick()

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