rofi  1.7.0
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)
 
static int box_get_desired_height (widget *wid)
 
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 *box, widget *child, gboolean expand)
 
static void box_resize (widget *widget, 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.

◆ 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()

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

Definition at line 264 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()

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

Definition at line 316 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()

static void box_free ( widget wid)
static

Definition at line 273 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()

static int box_get_desired_height ( widget wid)
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(), and widget_padding_get_padding_height().

Referenced by box_create().

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

◆ box_get_desired_width()

static int box_get_desired_width ( widget wid)
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()

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

Definition at line 307 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()

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

Definition at line 337 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()

static void box_update ( widget wid)
static

Definition at line 365 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()