diff options
author | Simon Howard | 2009-03-07 00:24:45 +0000 |
---|---|---|
committer | Simon Howard | 2009-03-07 00:24:45 +0000 |
commit | 2b5dae761ba1727cb483f4bae334a1b25f222e18 (patch) | |
tree | 3d8f68186aca380f39bf2974b59d17cbfcb888cd /textscreen/txt_spinctrl.h | |
parent | 9b5d574982b49d0c12c5c7229a9151ad40c1bcb9 (diff) | |
download | chocolate-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_spinctrl.h')
-rw-r--r-- | textscreen/txt_spinctrl.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/textscreen/txt_spinctrl.h b/textscreen/txt_spinctrl.h index 2fdd2a62..02d5a211 100644 --- a/textscreen/txt_spinctrl.h +++ b/textscreen/txt_spinctrl.h @@ -22,7 +22,16 @@ #ifndef TXT_SPINCONTROL_H #define TXT_SPINCONTROL_H +/** + * Spin control widget. + * + * A spin control widget works as an input box that can be used to + * set numeric values, but also has buttons that allow its value + * to be increased or decreased. + */ + typedef struct txt_spincontrol_s txt_spincontrol_t; + typedef enum { TXT_SPINCONTROL_INT, @@ -40,7 +49,28 @@ struct txt_spincontrol_s char *buffer; }; +/** + * Create a new spin control widget tracking an integer value. + * + * @param value Pointer to the variable containing the value + * displayed in the widget. + * @param min Minimum value that may be set. + * @param max Maximum value that may be set. + * @return Pointer to the new spin control widget. + */ + txt_spincontrol_t *TXT_NewSpinControl(int *value, int min, int max); + +/** + * Create a new spin control widget tracking a float value. + * + * @param value Pointer to the variable containing the value + * displayed in the widget. + * @param min Minimum value that may be set. + * @param max Maximum value that may be set. + * @return Pointer to the new spin control widget. + */ + txt_spincontrol_t *TXT_NewFloatSpinControl(float *value, float min, float max); #endif /* #ifndef TXT_SPINCONTROL_H */ |