diff options
author | Simon Howard | 2009-03-12 22:20:07 +0000 |
---|---|---|
committer | Simon Howard | 2009-03-12 22:20:07 +0000 |
commit | 6e2c404f64f39e059848bc66b707dfe979f044ff (patch) | |
tree | cd0aba502696ceef12bd311d4576fd46c4dd5c02 /textscreen/txt_button.h | |
parent | 20cb00076d39bcb8a5c2e82912af8200c97034cb (diff) | |
parent | 535c64b336ce59b4e18819544cd2a1129ae97c61 (diff) | |
download | chocolate-doom-6e2c404f64f39e059848bc66b707dfe979f044ff.tar.gz chocolate-doom-6e2c404f64f39e059848bc66b707dfe979f044ff.tar.bz2 chocolate-doom-6e2c404f64f39e059848bc66b707dfe979f044ff.zip |
Update from trunk.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1467
Diffstat (limited to 'textscreen/txt_button.h')
-rw-r--r-- | textscreen/txt_button.h | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/textscreen/txt_button.h b/textscreen/txt_button.h index 11040f2f..7c16c01b 100644 --- a/textscreen/txt_button.h +++ b/textscreen/txt_button.h @@ -22,6 +22,19 @@ #ifndef TXT_BUTTON_H #define TXT_BUTTON_H +/** + * @file txt_button.h + * + * Button widget. + */ + +/** + * 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 +45,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 */ |