grafthistory: support curl
[elinks/elinks-j605.git] / src / bfu / checkbox.h
blob5d2ce5dc834e0347e7b5ec0652c47ced0023abb1
1 #ifndef EL__BFU_CHECKBOX_H
2 #define EL__BFU_CHECKBOX_H
4 struct dialog;
5 struct terminal;
6 struct widget_data;
8 struct widget_info_checkbox {
9 /* gid is 0 for checkboxes, or a positive int for
10 * each group of radio buttons. */
11 int gid;
12 /* gnum is 0 for checkboxes, or a positive int for
13 * each radio button in a group. */
14 int gnum;
17 struct widget_data_info_checkbox {
18 int checked;
22 void add_dlg_radio_do(struct dialog *dlg, unsigned char *text, int groupid, int groupnum, int *data);
24 #define add_dlg_radio(dlg, text, groupid, groupnum, data) \
25 add_dlg_radio_do(dlg, text, groupid, groupnum, data)
27 #define add_dlg_checkbox(dlg, text, data) \
28 add_dlg_radio_do(dlg, text, 0, 0, data)
30 extern struct widget_ops checkbox_ops;
32 void
33 dlg_format_checkbox(struct terminal *term,
34 struct widget_data *widget_data,
35 int x, int *y, int w, int *rw,
36 enum format_align align);
38 #define widget_has_group(widget_data) ((widget_data)->widget->type == WIDGET_CHECKBOX \
39 ? (widget_data)->widget->info.checkbox.gid : -1)
41 #endif