summaryrefslogtreecommitdiff
path: root/textscreen/txt_button.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_button.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_button.h')
-rw-r--r--textscreen/txt_button.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/textscreen/txt_button.h b/textscreen/txt_button.h
index 11040f2f..ea7fd6e5 100644
--- a/textscreen/txt_button.h
+++ b/textscreen/txt_button.h
@@ -22,6 +22,13 @@
#ifndef TXT_BUTTON_H
#define TXT_BUTTON_H
+/**
+ * Button widget.
+ *
+ * A button is a widget that can be selected to perform some action.
+ * When a button is pressed, it emits the "pressed" signal.
+ */
+
typedef struct txt_button_s txt_button_t;
#include "txt_widget.h"
@@ -32,9 +39,35 @@ struct txt_button_s
char *label;
};
+/**
+ * Create a new button widget.
+ *
+ * @param label The label to use on the new button.
+ * @return Pointer to the new button widget.
+ */
+
txt_button_t *TXT_NewButton(char *label);
-txt_button_t *TXT_NewButton2(char *label, TxtWidgetSignalFunc func,
+
+/**
+ * Create a new button widget, binding the "pressed" signal to a
+ * specified callback function.
+ *
+ * @param label The label to use on the new button.
+ * @param func The callback function to invoke.
+ * @param user_data User-specified pointer to pass to the callback.
+ * @return Pointer to the new button widget.
+ */
+
+txt_button_t *TXT_NewButton2(char *label, TxtWidgetSignalFunc func,
void *user_data);
+
+/**
+ * Change the label used on a button.
+ *
+ * @param button The button.
+ * @param label The new label.
+ */
+
void TXT_SetButtonLabel(txt_button_t *button, char *label);
#endif /* #ifndef TXT_BUTTON_H */