diff options
author | Simon Howard | 2006-05-20 15:15:17 +0000 |
---|---|---|
committer | Simon Howard | 2006-05-20 15:15:17 +0000 |
commit | f761f821f95a3fbf8af1eb645d8ae9412abdc541 (patch) | |
tree | c6699ce7a4487043391ee014bca9582bf29b7559 /textscreen/txt_widget.h | |
parent | c63afd766a9fdb19bc2c3a650f859bbba4699e8f (diff) | |
download | chocolate-doom-f761f821f95a3fbf8af1eb645d8ae9412abdc541.tar.gz chocolate-doom-f761f821f95a3fbf8af1eb645d8ae9412abdc541.tar.bz2 chocolate-doom-f761f821f95a3fbf8af1eb645d8ae9412abdc541.zip |
Add selectable and visible properties to widgets. Allow the position of
windows to be set based on position of top/bottom/center,left/right,center
coordinates.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 486
Diffstat (limited to 'textscreen/txt_widget.h')
-rw-r--r-- | textscreen/txt_widget.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/textscreen/txt_widget.h b/textscreen/txt_widget.h index a8d78bfc..e0a4350e 100644 --- a/textscreen/txt_widget.h +++ b/textscreen/txt_widget.h @@ -33,21 +33,26 @@ typedef struct txt_widget_s txt_widget_t; typedef int (*TxtWidgetSizeCalc)(txt_widget_t *widget); typedef void (*TxtWidgetDrawer)(txt_widget_t *widget, int w, int selected); typedef void (*TxtWidgetDestroy)(txt_widget_t *widget); +typedef int (*TxtWidgetKeyPress)(txt_widget_t *widget, int key); struct txt_widget_class_s { TxtWidgetSizeCalc size_calc; TxtWidgetDrawer drawer; + TxtWidgetKeyPress key_press; TxtWidgetDestroy destructor; }; struct txt_widget_s { txt_widget_class_t *widget_class; + int selectable; + int visible; }; int TXT_WidgetWidth(txt_widget_t *widget); void TXT_DrawWidget(txt_widget_t *widget, int w, int selected); +void TXT_WidgetKeyPress(txt_widget_t *widget, int key); void TXT_DestroyWidget(txt_widget_t *widget); #endif /* #ifndef TXT_WIDGET_H */ |