diff options
author | Simon Howard | 2010-12-10 23:46:22 +0000 |
---|---|---|
committer | Simon Howard | 2010-12-10 23:46:22 +0000 |
commit | d1a3967194323b08227b20822acedb837e05281a (patch) | |
tree | 39e4f4da91717159f4f82e6eb37c9fb32d306892 /textscreen/txt_widget.h | |
parent | 6a2d4763a9080cf88ca9f0b588b8187963eeacf5 (diff) | |
parent | e225e0c93ce58bb0e33c174847305d39800fd755 (diff) | |
download | chocolate-doom-d1a3967194323b08227b20822acedb837e05281a.tar.gz chocolate-doom-d1a3967194323b08227b20822acedb837e05281a.tar.bz2 chocolate-doom-d1a3967194323b08227b20822acedb837e05281a.zip |
Merge from trunk.
Subversion-branch: /branches/raven-branch
Subversion-revision: 2214
Diffstat (limited to 'textscreen/txt_widget.h')
-rw-r--r-- | textscreen/txt_widget.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/textscreen/txt_widget.h b/textscreen/txt_widget.h index 9688829d..bb895f92 100644 --- a/textscreen/txt_widget.h +++ b/textscreen/txt_widget.h @@ -77,9 +77,11 @@ typedef int (*TxtWidgetKeyPress)(TXT_UNCAST_ARG(widget), int key); typedef void (*TxtWidgetSignalFunc)(TXT_UNCAST_ARG(widget), void *user_data); typedef void (*TxtMousePressFunc)(TXT_UNCAST_ARG(widget), int x, int y, int b); typedef void (*TxtWidgetLayoutFunc)(TXT_UNCAST_ARG(widget)); +typedef int (*TxtWidgetSelectableFunc)(TXT_UNCAST_ARG(widget)); struct txt_widget_class_s { + TxtWidgetSelectableFunc selectable; TxtWidgetSizeCalc size_calc; TxtWidgetDrawer drawer; TxtWidgetKeyPress key_press; @@ -92,7 +94,6 @@ struct txt_widget_s { txt_widget_class_t *widget_class; txt_callback_table_t *callback_table; - int selectable; int visible; txt_horiz_align_t align; @@ -111,6 +112,8 @@ int TXT_WidgetKeyPress(TXT_UNCAST_ARG(widget), int key); void TXT_WidgetMousePress(TXT_UNCAST_ARG(widget), int x, int y, int b); void TXT_DestroyWidget(TXT_UNCAST_ARG(widget)); void TXT_LayoutWidget(TXT_UNCAST_ARG(widget)); +int TXT_AlwaysSelectable(TXT_UNCAST_ARG(widget)); +int TXT_NeverSelectable(TXT_UNCAST_ARG(widget)); /** * Set a callback function to be invoked when a signal occurs. @@ -134,6 +137,15 @@ void TXT_SignalConnect(TXT_UNCAST_ARG(widget), const char *signal_name, void TXT_SetWidgetAlign(TXT_UNCAST_ARG(widget), txt_horiz_align_t horiz_align); +/** + * Query whether a widget is selectable with the cursor. + * + * @param widget The widget. + * @return Non-zero if the widget is selectable. + */ + +int TXT_SelectableWidget(TXT_UNCAST_ARG(widget)); + #endif /* #ifndef TXT_WIDGET_H */ |