jyoti wrote:
> I need to get the state of checkbutton and radiobutton i.e. whether it is 
> selected or not . I have not found any such method in agar. pls help.

Look at checkbox.c in the agar/gui folder.

The Draw function contains the information you need:

static void
Draw(void *obj)
{
        AG_Checkbox *cb = obj;
        AG_WidgetBinding *stateb;
        void *p;
        int state;
        
        stateb = AG_WidgetGetBinding(cb, "state", &p);
        switch (stateb->vtype) {
        case AG_WIDGET_BOOL:
        case AG_WIDGET_INT:
        case AG_WIDGET_UINT:
                state = *(int *)p;

.....

You need AG_WidgetGetBinding().

-- Andreas

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to