rofi  1.5.1
box.c File Reference
#include <config.h>
#include <stdio.h>
#include "widgets/widget.h"
#include "widgets/widget-internal.h"
#include "widgets/box.h"
#include "theme.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)
 
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().

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "Widgets.Box"

Definition at line 28 of file box.c.

Function Documentation

◆ box_draw()

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

Definition at line 262 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 315 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 271 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 96 of file box.c.

References _box::children, distance_get_pixel(), _widget::enabled, _widget::expand, 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 53 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 305 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_update()

static void box_update ( widget wid)
static

Definition at line 355 of file box.c.

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

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