NetSurf
Data Fields
fbtk_widget_s Struct Reference

Widget description. More...

#include <widget.h>

Collaboration diagram for fbtk_widget_s:
[legend]

Data Fields

struct fbtk_widget_snext
 
struct fbtk_widget_sprev
 
struct fbtk_widget_sparent
 
struct fbtk_widget_sfirst_child
 
struct fbtk_widget_slast_child
 
bool mapped
 The widget is mapped/visible . More...
 
int x
 
int y
 
int width
 
int height
 
colour bg
 
colour fg
 
fbtk_callback callback [FBTK_CBT_END]
 
void * callback_context [FBTK_CBT_END]
 
struct {
   bool   child
 
   bool   needed
 
   int   x
 
   int   y
 
   int   width
 
   int   height
 
redraw
 
enum fbtk_widgettype_e type
 The type of the widget. More...
 
union {
   struct {
      nsfb_t *   fb
 
      struct fbtk_widget_s *   prev
 
      struct fbtk_widget_s *   grabbed
 
      struct fbtk_widget_s *   input
 
      struct {
         struct fbtk_widget_s *   owner
 
         int   x
 
         int   y
 
         int   height
 
         void(*   remove_cb )(fbtk_widget_t *widget)
 
      }   caret
 
   }   root
 
   struct {
      struct fbtk_bitmap *   bitmap
 
   }   bitmap
 
   struct {
      char *   text
 
      bool   outline
 
      fbtk_enter_t   enter
 
      void *   pw
 
      int   idx
 
      int   len
 
      int   width
 
      int   idx_offset
 
   }   text
 
   struct {
      void *   pw
 
   }   user
 
   struct {
      int   minimum
 
      int   maximum
 
      int   thumb
 
      int   page
 
      int   position
 
      int   drag
 
      int   drag_position
 
      struct fbtk_widget_s *   btnul
 
      struct fbtk_widget_s *   btndr
 
   }   scroll
 
u
 

Detailed Description

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 | | — | |—+ +---—+ |

V

Every widget is contained within this generic wrapper. The integrated union provides for data specific to a widget type.

Definition at line 120 of file widget.h.

Field Documentation

◆ bg

colour fbtk_widget_s::bg

◆ bitmap [1/2]

struct fbtk_bitmap* fbtk_widget_s::bitmap

◆  [2/2]

struct { ... } fbtk_widget_s::bitmap

◆ btndr

struct fbtk_widget_s* fbtk_widget_s::btndr

◆ btnul

struct fbtk_widget_s* fbtk_widget_s::btnul

◆ callback

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().

◆ callback_context

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

◆ child

bool fbtk_widget_s::child

Definition at line 146 of file widget.h.

Referenced by do_redraw(), and fbtk_request_redraw().

◆ drag

int fbtk_widget_s::drag

Definition at line 203 of file widget.h.

Referenced by hscroll_drag(), hscrollarea_click(), vscroll_drag(), and vscrollarea_click().

◆ drag_position

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().

◆ enter

fbtk_enter_t fbtk_widget_s::enter

Definition at line 184 of file widget.h.

◆ fb

nsfb_t* fbtk_widget_s::fb

Definition at line 160 of file widget.h.

◆ fg

colour fbtk_widget_s::fg

◆ first_child

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().

◆ grabbed

struct fbtk_widget_s* fbtk_widget_s::grabbed

Definition at line 162 of file widget.h.

◆ height

int fbtk_widget_s::height

◆ idx

int fbtk_widget_s::idx

Definition at line 186 of file widget.h.

◆ idx_offset

int fbtk_widget_s::idx_offset

Definition at line 189 of file widget.h.

◆ input

struct fbtk_widget_s* fbtk_widget_s::input

Definition at line 163 of file widget.h.

◆ last_child

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().

◆ len

int fbtk_widget_s::len

Definition at line 187 of file widget.h.

◆ mapped

bool fbtk_widget_s::mapped

◆ maximum

int fbtk_widget_s::maximum

◆ minimum

int fbtk_widget_s::minimum

◆ needed

bool fbtk_widget_s::needed

Definition at line 147 of file widget.h.

Referenced by do_redraw(), and fbtk_request_redraw().

◆ next

struct fbtk_widget_s* fbtk_widget_s::next

◆ outline

bool fbtk_widget_s::outline

Definition at line 183 of file widget.h.

◆ owner

struct fbtk_widget_s* fbtk_widget_s::owner

Definition at line 167 of file widget.h.

◆ page

int fbtk_widget_s::page

◆ parent

struct fbtk_widget_s* fbtk_widget_s::parent

◆ position

int fbtk_widget_s::position

◆ prev

struct fbtk_widget_s* fbtk_widget_s::prev

◆ pw

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().

◆ remove_cb

void(* fbtk_widget_s::remove_cb) (fbtk_widget_t *widget)

Definition at line 171 of file widget.h.

◆ 

struct { ... } fbtk_widget_s::root

◆ 

struct { ... } fbtk_widget_s::scroll

◆ text [1/2]

char* fbtk_widget_s::text

◆  [2/2]

struct { ... } fbtk_widget_s::text

◆ thumb

int fbtk_widget_s::thumb

◆ type

enum fbtk_widgettype_e fbtk_widget_s::type

◆ 

union { ... } fbtk_widget_s::u

◆ 

struct { ... } fbtk_widget_s::user

◆ width

int fbtk_widget_s::width

◆ x

int fbtk_widget_s::x

◆ y

int fbtk_widget_s::y

The documentation for this struct was generated from the following file: