ui/motif/button.h

changeset 100
d2bd73d28ff1
parent 0
2483f517c562
equal deleted inserted replaced
99:b9767cb5b06b 100:d2bd73d28ff1
34 34
35 #ifdef __cplusplus 35 #ifdef __cplusplus
36 extern "C" { 36 extern "C" {
37 #endif 37 #endif
38 38
39 typedef struct {
40 CxList *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 int64_t ui_radiobutton_get(UiInteger *i);
54 void ui_radiobutton_set(UiInteger *i, int64_t value);
63 55
64 #ifdef __cplusplus 56 #ifdef __cplusplus
65 } 57 }
66 #endif 58 #endif
67 59

mercurial