GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_widget_hvbox.h
Go to the documentation of this file.
1//SPDX-License-Identifier: LGPL-2.0-or-later
2
3/*
4
5 Copyright (c) 2014-2024 Cyril Hrubis <metan@ucw.cz>
6
7 */
8
67#ifndef GP_WIDGET_HVBOX_H
68#define GP_WIDGET_HVBOX_H
69
71
80static inline gp_widget *gp_widget_hbox_new(unsigned int cols,
81 enum gp_widget_grid_flags flags)
82{
83 return gp_widget_grid_new(cols, 1, flags);
84}
85
94static inline gp_widget *gp_widget_vbox_new(unsigned int rows,
95 enum gp_widget_grid_flags flags)
96{
97 return gp_widget_grid_new(1, rows, flags);
98}
99
109gp_widget *gp_widget_box_put(gp_widget *self, unsigned int pos, gp_widget *child);
110
119gp_widget *gp_widget_box_rem(gp_widget *self, unsigned int pos);
120
121#endif /* GP_WIDGET_VHBOX_H */
A grid to position widgets.
gp_widget * gp_widget_grid_new(unsigned int cols, unsigned int rows, enum gp_widget_grid_flags flags)
Allocates and initializes a widget grid.
gp_widget_grid_flags
A widget grid flags.
gp_widget * gp_widget_box_rem(gp_widget *self, unsigned int pos)
Removes a widget from hbox or vbox.
gp_widget * gp_widget_box_put(gp_widget *self, unsigned int pos, gp_widget *child)
Puts a widget into a hbox or vbox.
static gp_widget * gp_widget_vbox_new(unsigned int rows, enum gp_widget_grid_flags flags)
Creates a vbox i.e. grid with single column.
static gp_widget * gp_widget_hbox_new(unsigned int cols, enum gp_widget_grid_flags flags)
Creates a hbox i.e. grid with single row.
A widget base.
Definition gp_widget.h:28