|
NAMEAG_Radio —
agar radio group widget
SYNOPSIS#include <agar/core.h> #include <agar/gui.h> DESCRIPTIONTheAG_Radio widget implements a group of
"radio" buttons.
INHERITANCE HIERARCHYAG_Object(3) -> AG_Widget(3) ->AG_Radio .
INITIALIZATIONAG_Radio *AG_RadioNew (AG_Widget
*parent, Uint flags,
const char *items[]);
The
The The
BINDINGSTheAG_Radio widget provides the following bindings:
EVENTSTheAG_Radio widget generates the following events:
STRUCTURE DATAFor the AG_Radio object:
EXAMPLESThe following code fragment bindsAG_Radio to an enum:
enum fruit { APPLE, ORANGE, BANANA } fruit = APPLE; const char *fruitNames[] = { "Apple", "Orange", "Banana", NULL }; AG_Radio *r = AG_RadioNew(NULL, 0, fruitNames); AG_BindInt(r, "value", &fruit); To specify a callback routine:
void
MyCallback(AG_Event *event)
{
int newSelection = AG_INT(1);
printf("Selected item %d\n", newSelection);
}
SEE ALSOAG_Intro(3), AG_Widget(3), AG_Window(3)HISTORYTheAG_Radio widget first appeared in Agar 1.0.
Visit the GSP FreeBSD Man Page Interface. |