From f761f821f95a3fbf8af1eb645d8ae9412abdc541 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 20 May 2006 15:15:17 +0000 Subject: 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 --- textscreen/txt_widget.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'textscreen/txt_widget.h') 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 */ -- cgit v1.2.3