ui/motif/button.h

changeset 431
bb7da585debc
parent 419
7d15cad351fc
equal deleted inserted replaced
169:fe49cff3c571 431:bb7da585debc
34 34
35 #ifdef __cplusplus 35 #ifdef __cplusplus
36 extern "C" { 36 extern "C" {
37 #endif 37 #endif
38 38
39 typedef struct {
40 UcxList *buttons;
41 Widget current;
42 int ref;
43 } RadioButtonGroup;
44
45 typedef struct {
46 UiObject *obj;
47 ui_callback callback;
48 void *userdata;
49 RadioButtonGroup *group;
50 } RadioEventData;
51
52 // wrapper
53 int64_t ui_toggle_button_get(UiInteger *i);
54 void ui_toggle_button_set(UiInteger *i, int64_t value);
55 void ui_toggle_button_callback(
56 Widget widget,
57 UiEventData *data,
58 XmToggleButtonCallbackStruct *e);
59 void ui_push_button_callback(Widget widget, UiEventData *event, XtPointer d); 39 void ui_push_button_callback(Widget widget, UiEventData *event, XtPointer d);
60 40
61 int64_t ui_radiobutton_get(UiInteger *value); 41 void ui_bind_togglebutton(
62 void ui_radiobutton_set(UiInteger *value, int64_t i); 42 UiObject *obj,
43 Widget widget,
44 const char *varname,
45 UiInteger *value,
46 ui_callback onchange,
47 void *onchangedata,
48 int enable_state);
49
50 int64_t ui_togglebutton_get(UiInteger *i);
51 void ui_togglebutton_set(UiInteger *i, int64_t value);
52
53 void ui_bind_radiobutton(UiObject *obj, Widget rbutton, UiInteger *value, const char *varname, ui_callback onchange, void *onchangedata, int enable_group);
54
55 int64_t ui_radiobutton_get(UiInteger *i);
56 void ui_radiobutton_set(UiInteger *i, int64_t value);
63 57
64 #ifdef __cplusplus 58 #ifdef __cplusplus
65 } 59 }
66 #endif 60 #endif
67 61

mercurial