Data Fields | |
view_t ** | children |
The child views. More... | |
void * | data |
User supplied data. More... | |
void(* | draw )(view_t *view) |
Callback for drawing the view. More... | |
grav_t | gravity |
The gravity of the view. More... | |
int | max_children |
Size of children array. More... | |
int | num_children |
Number of child views in view. More... | |
view_t * | parent |
The parent view. More... | |
unsigned | resize_x:1 |
If true, view's width follows parent's. More... | |
unsigned | resize_y:1 |
If true, view's height follows parent's. More... | |
void(* | setgeometry )(view_t *view) |
Callback for when the position and/or size of the view changes. More... | |
unsigned | visible:1 |
If false, view_draw() skips this view. More... | |
int | xpos |
Coordinates of view's origin relative to parent's gravity point. More... | |
int | ypos |
int | xlen |
Size of the view. More... | |
int | ylen |
int | xabs |
Absolute coordinates of the top left (northwest) corner of the view. More... | |
int | yabs |
int | xrel |
Coordinates of the top left (northwest) corner of the view relative to the parent view's top left corner. More... | |
int | yrel |
view_t** children |
The child views.
void* data |
User supplied data.
Purely for external use. The view functions do not touch this at all except view_new(), which just sets it to 0.
void(* draw)(view_t *view) |
Callback for drawing the view.
defaults to view_draw(). if overridden, the supplied callback should call view_draw() to draw any child views unless the view is a leaf view.
view | This view. |
grav_t gravity |
The gravity of the view.
int max_children |
Size of children array.
int num_children |
Number of child views in view.
view_t* parent |
The parent view.
unsigned resize_x |
If true, view's width follows parent's.
unsigned resize_y |
If true, view's height follows parent's.
void(* setgeometry)(view_t *view) |
Callback for when the position and/or size of the view changes.
Set this if the underlying drawing system needs to take any action when the view's geometry changes (eg, moving/resizing the window in curses).
view | This view. |
unsigned visible |
If false, view_draw() skips this view.
int xabs |
Absolute coordinates of the top left (northwest) corner of the view.
Set interally.
int xlen |
Size of the view.
int xpos |
Coordinates of view's origin relative to parent's gravity point.
int xrel |
Coordinates of the top left (northwest) corner of the view relative to the parent view's top left corner.
Set internally.
int yabs |
int ylen |
int ypos |
int yrel |