summaryrefslogtreecommitdiff
path: root/textscreen/txt_checkbox.h
diff options
context:
space:
mode:
authorSimon Howard2009-03-07 00:24:45 +0000
committerSimon Howard2009-03-07 00:24:45 +0000
commit2b5dae761ba1727cb483f4bae334a1b25f222e18 (patch)
tree3d8f68186aca380f39bf2974b59d17cbfcb888cd /textscreen/txt_checkbox.h
parent9b5d574982b49d0c12c5c7229a9151ad40c1bcb9 (diff)
downloadchocolate-doom-2b5dae761ba1727cb483f4bae334a1b25f222e18.tar.gz
chocolate-doom-2b5dae761ba1727cb483f4bae334a1b25f222e18.tar.bz2
chocolate-doom-2b5dae761ba1727cb483f4bae334a1b25f222e18.zip
Add documentation for high-level textscreen functions.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1449
Diffstat (limited to 'textscreen/txt_checkbox.h')
-rw-r--r--textscreen/txt_checkbox.h35
1 files changed, 35 insertions, 0 deletions
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 */