1 #ifndef EL__BFU_WIDGET_H
2 #define EL__BFU_WIDGET_H
4 /* XXX: Include common definitions first */
5 #include "bfu/common.h"
7 #include "bfu/button.h"
8 #include "bfu/checkbox.h"
10 #include "bfu/inpfield.h"
11 #include "bfu/inphist.h"
13 #include "bfu/listbox.h"
14 #include "bfu/msgbox.h"
16 #include "util/lists.h"
23 /* XXX: Order matters here. --Zas */
24 widget_handler_T
*display
;
25 widget_handler_T
*init
;
26 widget_handler_T
*mouse
;
27 widget_handler_T
*kbd
;
28 widget_handler_T
*select
;
29 widget_handler_T
*clear
;
33 struct widget_ops
*ops
;
37 widget_handler_T
*handler
;
40 int datalen
; /* 0 = no alloc/copy to cdata. */
43 struct widget_info_checkbox checkbox
;
44 struct widget_info_field field
;
45 struct widget_info_listbox listbox
;
46 struct widget_info_button button
;
47 struct widget_info_text text
;
50 enum widget_type type
;
54 struct widget
*widget
;
60 struct widget_data_info_field field
;
61 struct widget_data_info_checkbox checkbox
;
62 struct widget_data_info_text text
;
66 void display_widget(struct dialog_data
*, struct widget_data
*);
69 widget_is_focusable(struct widget_data
*widget_data
)
71 switch (widget_data
->widget
->type
) {
72 case WIDGET_LISTBOX
: return 0;
73 case WIDGET_TEXT
: return text_is_scrollable(widget_data
);