NetSurf
|
Widget description. More...
#include <widget.h>
Widget description.
A widget is an entry in a tree structure which represents a rectangular area with co-ordinates relative to its parent widget. This area has a distinct set of callback operations for handling events which occour within its boundries. A widget may have an arbitrary number of child widgets. The order within the tree determines a widgets z order.
A | +-------—+ +—>| Button 3 | | +-------—+ | | A | V | | +-------—+ | | Button 2 | | +-------—+ | | A | V | | +-------—+ | | Button 1 | | +-------—+ | | A | V | — | +-------—+ A | +->| Filled | | | | +-------—+ +-------—+ | | | +-—>| |-+ | V | | Window 1 | | — — | | |—+ A | +-------—+ | | | A +-------—+ — | | | +—>| Button 2 | A | | | | +-------—+ | | | | | | A +----------—+ | | | | | | +—>| Button Up | | | | | | | | +----------—+ | | | | | | | | A | | | | | | | V | | | | | | | | +----------—+ | | | | | | | | Button Down | | | | | | | | +----------—+ | | | | | | | | A | | | | | | | V | | | | | | | | +----------—+ | | | | | | | +->| Scroller | | | | | V | | | +----------—+ | | | | +-------—+ | | | | | | | | |-+ | V | | | | | V Scroll | | — | | | | | |—+ | | | | +-------—+ | | | | | A | | | | V | | | | | +-------—+ | | | | +->| Button 1 | | | | | | +-------—+ | +-------—+ | | | | | |-+ | V | | Window 2 | | — | | |—+ | +-------—+ | | A | V | | +---------—+ — | | Background | A | +->| Bitmap | | | | +---------—+ +---—+ | | | | |-+ | V | Root | | — | |—+ +---—+ |
Every widget is contained within this generic wrapper. The integrated union provides for data specific to a widget type.
colour fbtk_widget_s::bg |
Definition at line 137 of file widget.h.
Referenced by fb_redraw_bitmap(), fb_redraw_fill(), fb_redraw_text(), fb_redraw_text_button(), fb_redraw_window(), fb_text_font_style(), fbtk_create_bitmap(), fbtk_create_button(), fbtk_create_fill(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_vscroll(), fbtk_create_window(), fbtk_create_writable_text(), hscroll_redraw(), and vscroll_redraw().
struct fbtk_bitmap* fbtk_widget_s::bitmap |
Definition at line 177 of file widget.h.
Referenced by fb_redraw_bitmap(), fbtk_create_bitmap(), fbtk_create_button(), and fbtk_set_bitmap().
struct { ... } fbtk_widget_s::bitmap |
struct fbtk_widget_s* fbtk_widget_s::btndr |
Definition at line 206 of file widget.h.
Referenced by fbtk_create_hscroll(), fbtk_create_vscroll(), fbtk_reposition_hscroll(), and fbtk_reposition_vscroll().
struct fbtk_widget_s* fbtk_widget_s::btnul |
Definition at line 205 of file widget.h.
Referenced by fbtk_create_hscroll(), fbtk_create_vscroll(), fbtk_reposition_hscroll(), and fbtk_reposition_vscroll().
fbtk_callback fbtk_widget_s::callback[FBTK_CBT_END] |
Definition at line 141 of file widget.h.
Referenced by fbtk_get_handler(), fbtk_post_callback(), and fbtk_set_handler().
void* fbtk_widget_s::callback_context[FBTK_CBT_END] |
Definition at line 142 of file widget.h.
Referenced by fbtk_post_callback(), and fbtk_set_handler().
struct { ... } fbtk_widget_s::caret |
bool fbtk_widget_s::child |
Definition at line 146 of file widget.h.
Referenced by do_redraw(), and fbtk_request_redraw().
int fbtk_widget_s::drag |
Definition at line 203 of file widget.h.
Referenced by hscroll_drag(), hscrollarea_click(), vscroll_drag(), and vscrollarea_click().
int fbtk_widget_s::drag_position |
Definition at line 204 of file widget.h.
Referenced by hscroll_drag(), hscrollarea_click(), vscroll_drag(), and vscrollarea_click().
fbtk_enter_t fbtk_widget_s::enter |
colour fbtk_widget_s::fg |
Definition at line 138 of file widget.h.
Referenced by fb_text_font_style(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_vscroll(), fbtk_create_writable_text(), hscroll_redraw(), and vscroll_redraw().
struct fbtk_widget_s* fbtk_widget_s::first_child |
Definition at line 126 of file widget.h.
Referenced by fbtk_destroy_widget(), fbtk_get_widget_at(), and swap_siblings().
struct fbtk_widget_s* fbtk_widget_s::grabbed |
int fbtk_widget_s::height |
Definition at line 136 of file widget.h.
Referenced by do_redraw(), fb_text_font_style(), fbtk_clip_to_widget(), fbtk_get_bbox(), fbtk_get_height(), fbtk_get_widget_at(), fbtk_request_redraw(), fbtk_set_pos_and_size(), fbtk_set_text(), fbtk_warp_pointer(), fbtk_widget_new(), hscroll_redraw(), text_input(), text_input_click(), vscroll_drag(), vscroll_redraw(), and vscrollarea_click().
struct fbtk_widget_s* fbtk_widget_s::input |
struct fbtk_widget_s* fbtk_widget_s::last_child |
Definition at line 127 of file widget.h.
Referenced by do_redraw(), fbtk_request_redraw(), and swap_siblings().
bool fbtk_widget_s::mapped |
The widget is mapped/visible .
Definition at line 130 of file widget.h.
Referenced by fbtk_create_bitmap(), fbtk_create_button(), fbtk_create_fill(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_user(), fbtk_create_vscroll(), fbtk_create_writable_text(), fbtk_get_widget_at(), fbtk_post_callback(), fbtk_request_redraw(), and fbtk_set_mapping().
int fbtk_widget_s::maximum |
Definition at line 199 of file widget.h.
Referenced by fbtk_set_scroll_parameters(), fbtk_set_scroll_position(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), hscrollr_click(), vscroll_drag(), vscroll_redraw(), vscrollarea_click(), and vscrolld_click().
int fbtk_widget_s::minimum |
Definition at line 198 of file widget.h.
Referenced by fbtk_set_scroll_parameters(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), hscrolll_click(), vscroll_drag(), vscroll_redraw(), vscrollarea_click(), and vscrollu_click().
bool fbtk_widget_s::needed |
Definition at line 147 of file widget.h.
Referenced by do_redraw(), and fbtk_request_redraw().
struct fbtk_widget_s* fbtk_widget_s::next |
Definition at line 121 of file widget.h.
Referenced by fbtk_destroy_widget(), fbtk_get_widget_at(), fbtk_set_zorder(), fbtk_widget_new(), gui_window_create(), and swap_siblings().
struct fbtk_widget_s* fbtk_widget_s::owner |
int fbtk_widget_s::page |
Definition at line 201 of file widget.h.
Referenced by fbtk_set_scroll_parameters(), hscrollarea_click(), hscrolll_click(), hscrollr_click(), vscrollarea_click(), vscrolld_click(), and vscrollu_click().
struct fbtk_widget_s* fbtk_widget_s::parent |
Definition at line 124 of file widget.h.
Referenced by fbtk_destroy_widget(), fbtk_get_absx(), fbtk_get_absy(), fbtk_get_bbox(), fbtk_get_root_widget(), fbtk_request_redraw(), fbtk_set_mapping(), fbtk_set_pos_and_size(), fbtk_widget_new(), and swap_siblings().
int fbtk_widget_s::position |
Definition at line 202 of file widget.h.
Referenced by fbtk_set_scroll_parameters(), fbtk_set_scroll_position(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), hscrolll_click(), hscrollr_click(), vscroll_drag(), vscroll_redraw(), vscrollarea_click(), vscrolld_click(), and vscrollu_click().
struct fbtk_widget_s* fbtk_widget_s::prev |
Definition at line 122 of file widget.h.
Referenced by do_redraw(), fbtk_destroy_widget(), fbtk_request_redraw(), fbtk_set_zorder(), fbtk_widget_new(), and swap_siblings().
void* fbtk_widget_s::pw |
Definition at line 185 of file widget.h.
Referenced by fbtk_create_user(), and fbtk_get_userpw().
struct { ... } fbtk_widget_s::redraw |
Referenced by do_redraw(), and fbtk_request_redraw().
void(* fbtk_widget_s::remove_cb) (fbtk_widget_t *widget) |
struct { ... } fbtk_widget_s::root |
struct { ... } fbtk_widget_s::scroll |
Referenced by fbtk_create_hscroll(), fbtk_create_vscroll(), fbtk_reposition_hscroll(), fbtk_reposition_vscroll(), fbtk_set_scroll_parameters(), fbtk_set_scroll_position(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), hscrolll_click(), hscrollr_click(), vscroll_drag(), vscroll_redraw(), vscrollarea_click(), vscrolld_click(), and vscrollu_click().
char* fbtk_widget_s::text |
Definition at line 182 of file widget.h.
Referenced by fb_destroy_text(), fb_redraw_text(), fb_redraw_text_button(), fb_text_font_style(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_writable_text(), fbtk_set_text(), fbtk_writable_text(), gui_window_create(), text_input(), and text_input_click().
struct { ... } fbtk_widget_s::text |
int fbtk_widget_s::thumb |
Definition at line 200 of file widget.h.
Referenced by fbtk_set_scroll_parameters(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), hscrollr_click(), vscroll_drag(), vscroll_redraw(), vscrollarea_click(), and vscrolld_click().
enum fbtk_widgettype_e fbtk_widget_s::type |
The type of the widget.
Definition at line 154 of file widget.h.
Referenced by fb_destroy_text(), fbtk_get_root_widget(), fbtk_get_userpw(), fbtk_reposition_hscroll(), fbtk_reposition_vscroll(), fbtk_set_bitmap(), fbtk_set_scroll_parameters(), fbtk_set_scroll_position(), fbtk_set_text(), and fbtk_widget_new().
union { ... } fbtk_widget_s::u |
Referenced by fb_destroy_text(), fb_redraw_bitmap(), fb_redraw_text(), fb_redraw_text_button(), fb_text_font_style(), fbtk_create_bitmap(), fbtk_create_button(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_user(), fbtk_create_vscroll(), fbtk_create_writable_text(), fbtk_get_userpw(), fbtk_reposition_hscroll(), fbtk_reposition_vscroll(), fbtk_set_bitmap(), fbtk_set_scroll_parameters(), fbtk_set_scroll_position(), fbtk_set_text(), fbtk_writable_text(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), hscrolll_click(), hscrollr_click(), text_input(), text_input_click(), vscroll_drag(), vscroll_redraw(), vscrollarea_click(), vscrolld_click(), and vscrollu_click().
struct { ... } fbtk_widget_s::user |
Referenced by fbtk_create_user(), and fbtk_get_userpw().
int fbtk_widget_s::width |
Definition at line 135 of file widget.h.
Referenced by do_redraw(), fb_redraw_text(), fbtk_clip_to_widget(), fbtk_get_bbox(), fbtk_get_widget_at(), fbtk_get_width(), fbtk_request_redraw(), fbtk_set_pos_and_size(), fbtk_warp_pointer(), fbtk_widget_new(), hscroll_drag(), hscroll_redraw(), hscrollarea_click(), and vscroll_redraw().
int fbtk_widget_s::x |
Definition at line 133 of file widget.h.
Referenced by do_redraw(), fbtk_get_absx(), fbtk_get_bbox(), fbtk_get_widget_at(), fbtk_request_redraw(), fbtk_set_pos_and_size(), and fbtk_widget_new().
int fbtk_widget_s::y |
Definition at line 134 of file widget.h.
Referenced by do_redraw(), fbtk_get_absy(), fbtk_get_bbox(), fbtk_get_widget_at(), fbtk_request_redraw(), fbtk_set_pos_and_size(), and fbtk_widget_new().