rofi  1.5.1
Collaboration diagram for box:

Typedefs

typedef struct _box box
 

Functions

boxbox_create (widget *parent, const char *name, RofiOrientation type)
 
void box_add (box *box, widget *child, gboolean expand)
 

Detailed Description

Widget used to pack multiple widgets either horizontally or vertically. It supports packing widgets horizontally or vertically. Child widgets are always expanded to the maximum size in the opposite direction of the packing direction. e.g. vertically packed widgets use the full box width.

Typedef Documentation

◆ box

typedef struct _box box

Abstract handle to the box widget internal state.

Definition at line 48 of file box.h.

Function Documentation

◆ box_add()

void box_add ( box box,
widget child,
gboolean  expand 
)
Parameters
boxHandle to the box widget.
childHandle to the child widget to pack.
expandIf the child widget should expand and use all available space.

Add a widget to the box.

Definition at line 283 of file box.c.

References _box::children, _widget::expand, _widget::h, _widget::parent, ROFI_ORIENTATION_VERTICAL, rofi_theme_get_boolean(), _box::type, _widget::w, _box::widget, WIDGET, widget_padding_get_padding_height(), widget_padding_get_padding_width(), and widget_update().

Referenced by rofi_view_add_widget(), and rofi_view_error_dialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ box_create()

box* box_create ( widget parent,
const char *  name,
RofiOrientation  type 
)
Parameters
parentThe widgets parent.
nameThe name of the widget.
typeThe packing direction of the newly created box.
Returns
a newly created box, free with widget_free

Definition at line 335 of file box.c.

References box_draw(), box_find_mouse_target(), box_free(), box_get_desired_height(), box_get_desired_width(), box_resize(), box_update(), DEFAULT_SPACING, _widget::draw, _widget::find_mouse_target, _widget::free, _widget::get_desired_height, _widget::get_desired_width, _widget::resize, rofi_theme_get_distance(), rofi_theme_get_orientation(), _box::spacing, _box::type, _widget::update, _box::widget, WIDGET, widget_init(), and WIDGET_TYPE_UNKNOWN.

Referenced by __create_window(), rofi_view_add_widget(), rofi_view_create(), and rofi_view_error_dialog().

Here is the call graph for this function:
Here is the caller graph for this function: