rofi 1.7.9
box.c File Reference
#include "widgets/box.h"
#include "theme.h"
#include "widgets/widget-internal.h"
#include "widgets/widget.h"
#include <stdio.h>
Include dependency graph for box.c:

Go to the source code of this file.

Data Structures

struct  _box

Macros

#define G_LOG_DOMAIN   "Widgets.Box"
#define DEFAULT_SPACING   2

Functions

static void box_update (widget *wid)
static int box_get_desired_width (widget *wid, const int height)
static int box_get_desired_height (widget *wid, const int width)
static void vert_calculate_size (box *b)
static void hori_calculate_size (box *b)
static void box_draw (widget *wid, cairo_t *draw)
static void box_free (widget *wid)
void box_add (box *wid, widget *child, gboolean expand)
static void box_resize (widget *wid, short w, short h)
static widgetbox_find_mouse_target (widget *wid, WidgetType type, gint x, gint y)
static void box_set_state (widget *wid, const char *state)
boxbox_create (widget *parent, const char *name, RofiOrientation type)

Macro Definition Documentation

◆ DEFAULT_SPACING

#define DEFAULT_SPACING   2

Default spacing used in the box

Definition at line 38 of file box.c.

Referenced by box_create(), and listview_create().

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "Widgets.Box"

The log domain of this widget.

Definition at line 29 of file box.c.

Function Documentation

◆ box_draw()

void box_draw ( widget * wid,
cairo_t * draw )
static

Definition at line 266 of file box.c.

References _box::children, and widget_draw().

Referenced by box_create().

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

◆ box_find_mouse_target()

widget * box_find_mouse_target ( widget * wid,
WidgetType type,
gint x,
gint y )
static

Definition at line 318 of file box.c.

References _box::children, _widget::enabled, widget_find_mouse_target(), widget_intersect(), _widget::x, and _widget::y.

Referenced by box_create().

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

◆ box_free()

void box_free ( widget * wid)
static

Definition at line 275 of file box.c.

References _box::children, and widget_free().

Referenced by box_create().

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

◆ box_get_desired_height()

int box_get_desired_height ( widget * wid,
const int width )
static

Definition at line 95 of file box.c.

References _box::children, distance_get_pixel(), _widget::enabled, ROFI_ORIENTATION_VERTICAL, _box::spacing, _box::type, widget_get_desired_height(), widget_padding_get_padding_height(), and widget_padding_get_padding_width().

Referenced by box_create().

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

◆ box_get_desired_width()

int box_get_desired_width ( widget * wid,
const int height )
static

Definition at line 52 of file box.c.

References _box::children, distance_get_pixel(), _widget::enabled, _widget::expand, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_distance(), _box::spacing, _box::type, widget_get_desired_width(), and widget_padding_get_padding_width().

Referenced by box_create().

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

◆ box_resize()

void box_resize ( widget * wid,
short w,
short h )
static

Definition at line 309 of file box.c.

References _widget::h, _widget::w, _box::widget, and widget_update().

Referenced by box_create().

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

◆ box_set_state()

void box_set_state ( widget * wid,
const char * state )
static

Definition at line 339 of file box.c.

References widget_set_state().

Referenced by box_create().

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

◆ box_update()

void box_update ( widget * wid)
static

Definition at line 367 of file box.c.

References hori_calculate_size(), _widget::parent, ROFI_ORIENTATION_HORIZONTAL, ROFI_ORIENTATION_VERTICAL, _box::type, vert_calculate_size(), and widget_update().

Referenced by box_create().

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

◆ hori_calculate_size()

◆ vert_calculate_size()