diff options
author | Simon Howard | 2009-07-13 00:52:26 +0000 |
---|---|---|
committer | Simon Howard | 2009-07-13 00:52:26 +0000 |
commit | 480a31094b7621dd7d65ec05a6e36964dca99b66 (patch) | |
tree | 11b218d674e828c12981d819b8f2396b680436df /textscreen/txt_button.h | |
parent | 37db69b86bc5052901e250578e9c3920886d79ff (diff) | |
parent | e66653a8a67f3613344ae4ea30b37403d6ff17cf (diff) | |
download | chocolate-doom-480a31094b7621dd7d65ec05a6e36964dca99b66.tar.gz chocolate-doom-480a31094b7621dd7d65ec05a6e36964dca99b66.tar.bz2 chocolate-doom-480a31094b7621dd7d65ec05a6e36964dca99b66.zip |
Merge from trunk.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1624
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 */ |