2005-09-15 09:58:31 -04:00
|
|
|
#ifndef EL__BFU_CHECKBOX_H
|
|
|
|
#define EL__BFU_CHECKBOX_H
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
struct dialog;
|
2008-09-07 12:02:37 -04:00
|
|
|
struct dialog_data;
|
2005-09-15 09:58:31 -04:00
|
|
|
struct terminal;
|
|
|
|
struct widget_data;
|
|
|
|
|
|
|
|
struct widget_info_checkbox {
|
|
|
|
/* gid is 0 for checkboxes, or a positive int for
|
|
|
|
* each group of radio buttons. */
|
|
|
|
int gid;
|
|
|
|
/* gnum is 0 for checkboxes, or a positive int for
|
|
|
|
* each radio button in a group. */
|
|
|
|
int gnum;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct widget_data_info_checkbox {
|
|
|
|
int checked;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-01-02 10:20:27 -05:00
|
|
|
void add_dlg_radio_do(struct dialog *dlg, char *text, int groupid, int groupnum, int *data);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
#define add_dlg_radio(dlg, text, groupid, groupnum, data) \
|
|
|
|
add_dlg_radio_do(dlg, text, groupid, groupnum, data)
|
|
|
|
|
|
|
|
#define add_dlg_checkbox(dlg, text, data) \
|
|
|
|
add_dlg_radio_do(dlg, text, 0, 0, data)
|
|
|
|
|
2007-01-28 07:41:40 -05:00
|
|
|
extern const struct widget_ops checkbox_ops;
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
void
|
2008-09-07 12:27:06 -04:00
|
|
|
dlg_format_checkbox(struct dialog_data *dlg_data,
|
2005-09-15 09:58:31 -04:00
|
|
|
struct widget_data *widget_data,
|
|
|
|
int x, int *y, int w, int *rw,
|
2006-03-06 00:01:12 -05:00
|
|
|
enum format_align align, int format_only);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
#define widget_has_group(widget_data) ((widget_data)->widget->type == WIDGET_CHECKBOX \
|
|
|
|
? (widget_data)->widget->info.checkbox.gid : -1)
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|