From 2b5dae761ba1727cb483f4bae334a1b25f222e18 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 7 Mar 2009 00:24:45 +0000 Subject: Add documentation for high-level textscreen functions. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1449 --- textscreen/txt_checkbox.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'textscreen/txt_checkbox.h') diff --git a/textscreen/txt_checkbox.h b/textscreen/txt_checkbox.h index 1b34c3a0..b786ad61 100644 --- a/textscreen/txt_checkbox.h +++ b/textscreen/txt_checkbox.h @@ -22,6 +22,19 @@ #ifndef TXT_CHECKBOX_H #define TXT_CHECKBOX_H +/** + * Checkbox widget. + * + * A checkbox is used to control boolean values that may be either on + * or off. The widget has a label that is displayed to the right of + * the checkbox indicator. The widget tracks an integer variable; + * if the variable is non-zero, the checkbox is checked, while if it + * is zero, the checkbox is unchecked. It is also possible to + * create "inverted" checkboxes where this logic is reversed. + * + * When a checkbox is changed, it emits the "changed" signal. + */ + typedef struct txt_checkbox_s txt_checkbox_t; #include "txt_widget.h" @@ -34,7 +47,29 @@ struct txt_checkbox_s int inverted; }; +/** + * Create a new checkbox. + * + * @param label The label for the new checkbox. + * @param variable Pointer to the variable containing this checkbox's + * value. + * @return Pointer to the new checkbox. + */ + txt_checkbox_t *TXT_NewCheckBox(char *label, int *variable); + +/** + * Create a new inverted checkbox. + * + * An inverted checkbox displays the opposite of a normal checkbox; + * where it would be checked, it appears unchecked, and vice-versa. + * + * @param label The label for the new checkbox. + * @param variable Pointer to the variable containing this checkbox's + * value. + * @return Pointer to the new checkbox. + */ + txt_checkbox_t *TXT_NewInvertedCheckBox(char *label, int *variable); #endif /* #ifndef TXT_CHECKBOX_H */ -- cgit v1.2.3