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_button.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'textscreen/txt_button.h') 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 */ -- cgit v1.2.3 From f9c51c1b5c78234a138f9f44c261990336b445e7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 Mar 2009 22:51:25 +0000 Subject: Add "make doc" target to run Doxygen, and add a Doxyfile. Add @file tags to start of header files so that Doxygen will process them. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1451 --- textscreen/txt_button.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'textscreen/txt_button.h') diff --git a/textscreen/txt_button.h b/textscreen/txt_button.h index ea7fd6e5..7c16c01b 100644 --- a/textscreen/txt_button.h +++ b/textscreen/txt_button.h @@ -22,6 +22,12 @@ #ifndef TXT_BUTTON_H #define TXT_BUTTON_H +/** + * @file txt_button.h + * + * Button widget. + */ + /** * Button widget. * -- cgit v1.2.3