GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Functions
gp_widget_overlay.h File Reference

An overlay widget. More...

Go to the source code of this file.

Functions

gp_widgetgp_widget_overlay_new (unsigned int stack_size)
 Allocates new overlay widget.
 
void gp_widget_overlay_hide (gp_widget *self, unsigned int stack_pos)
 Hides a widget in overlay stack.
 
void gp_widget_overlay_show (gp_widget *self, unsigned int stack_pos)
 Shows a widget in overlay stack.
 
unsigned int gp_widget_overlay_stack_size (gp_widget *self)
 Returns the widget overlay stack size.
 
int gp_widget_overlay_stack_pos_by_child (gp_widget *self, gp_widget *child, unsigned int *stack_pos)
 Returns widget overlay stack position by child widget pointer.
 
gp_widgetgp_widget_overlay_put (gp_widget *self, unsigned int stack_pos, gp_widget *child)
 Puts a widget on stack_pos into an overlay.
 

Detailed Description

An overlay widget.

Overlay widget is a widget that allows widgets to be stack on the top of each other. The main use for this widget are all kinds of floating menus/dialogs etc.

Definition in file gp_widget_overlay.h.

Function Documentation

◆ gp_widget_overlay_hide()

void gp_widget_overlay_hide ( gp_widget self,
unsigned int  stack_pos 
)

Hides a widget in overlay stack.

Parameters
selfAn overlay widget.
stack_posPosition of a widget to hide.

◆ gp_widget_overlay_new()

gp_widget * gp_widget_overlay_new ( unsigned int  stack_size)

Allocates new overlay widget.

Parameters
stack_sizeInitial size for the overlay stack size.
Returns
Newly allocated overlay widget.

◆ gp_widget_overlay_put()

gp_widget * gp_widget_overlay_put ( gp_widget self,
unsigned int  stack_pos,
gp_widget child 
)

Puts a widget on stack_pos into an overlay.

Parameters
selfAn overlay widget.
stack_posPosition of the stack to add to.
childA widget to be put into the stack.
Returns
Returns a widget that previously occupied the position or NULL if it was empty.

◆ gp_widget_overlay_show()

void gp_widget_overlay_show ( gp_widget self,
unsigned int  stack_pos 
)

Shows a widget in overlay stack.

Parameters
selfAn overlay widget.
stack_posPosition of a widget to hide.

◆ gp_widget_overlay_stack_pos_by_child()

int gp_widget_overlay_stack_pos_by_child ( gp_widget self,
gp_widget child,
unsigned int *  stack_pos 
)

Returns widget overlay stack position by child widget pointer.

Parameters
selfAn overlay widget.
childAn overlay widget child widget.
stack_posA variable to store the stack position to.
Returns
Zero-on succes, non-zero if not found.

◆ gp_widget_overlay_stack_size()

unsigned int gp_widget_overlay_stack_size ( gp_widget self)

Returns the widget overlay stack size.

Parameters
selfAn overlay widget.
returnStack size.