Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
BarSliderWidget Struct Reference

Draggable slider to adjust an amount (such as a percentage). More...

#include <gui/widgets/bar_slider.h>

Collaboration diagram for BarSliderWidget:

Data Fields

GtkWidget parent_instance
 
int decimals
 Number of decimal points to show.
 
char suffix [600]
 The suffix to show after the value (eg "%" for percentages).
 
char prefix [600]
 The prefix to show before the value.
 
float max
 Maximum value.
 
float min
 Minimum value.
 
float zero
 Zero point.
 
GenericFloatGetter getter
 Float getter.
 
GenericFloatGetter snapped_getter
 Float getter for snapped values (optional).
 
GenericFloatSetter setter
 Float setter.
 
GenericFloatSetter init_setter
 Float setter for drag begin.
 
GenericFloatSetter end_setter
 Float setter for drag end.
 
Portport
 Port, if control port.
 
int width
 Widget width.
 
int height
 Widget height.
 
void * object
 Object to call get/set with.
 
GtkGestureDrag * drag
 Used when dragging.
 
double last_x
 Used in gesture drag.
 
double start_x
 Used in gesture drag.
 
UiDragMode mode
 Update mode.
 
int hover
 Whether hovering or not.
 
BarSliderType type
 The type of slider.
 
int show_value
 Whether to show the value in text or just the prefix + suffix.
 
int editable
 Whether the user can change the value.
 
int convert_to_percentage
 Multiply the value by 100 when showing it.
 
PangoLayout * layout
 Cache layout.
 
float last_real_val
 Cache of text extents.
 
int last_width_extent
 
int last_height_extent
 
char last_extent_str [3000]
 

Detailed Description

Draggable slider to adjust an amount (such as a percentage).

It displays the value in the background as a progress bar.

Definition at line 54 of file bar_slider.h.

Field Documentation

◆ convert_to_percentage

int BarSliderWidget::convert_to_percentage

Multiply the value by 100 when showing it.

Definition at line 130 of file bar_slider.h.

◆ decimals

int BarSliderWidget::decimals

Number of decimal points to show.

Definition at line 59 of file bar_slider.h.

◆ drag

GtkGestureDrag* BarSliderWidget::drag

Used when dragging.

Definition at line 105 of file bar_slider.h.

◆ editable

int BarSliderWidget::editable

Whether the user can change the value.

Definition at line 127 of file bar_slider.h.

◆ end_setter

GenericFloatSetter BarSliderWidget::end_setter

Float setter for drag end.

Definition at line 90 of file bar_slider.h.

◆ getter

GenericFloatGetter BarSliderWidget::getter

Float getter.

Definition at line 78 of file bar_slider.h.

◆ height

int BarSliderWidget::height

Widget height.

Definition at line 99 of file bar_slider.h.

◆ hover

int BarSliderWidget::hover

Whether hovering or not.

Definition at line 117 of file bar_slider.h.

◆ init_setter

GenericFloatSetter BarSliderWidget::init_setter

Float setter for drag begin.

Definition at line 87 of file bar_slider.h.

◆ last_extent_str

char BarSliderWidget::last_extent_str[3000]

Definition at line 141 of file bar_slider.h.

◆ last_height_extent

int BarSliderWidget::last_height_extent

Definition at line 140 of file bar_slider.h.

◆ last_real_val

float BarSliderWidget::last_real_val

Cache of text extents.

Definition at line 138 of file bar_slider.h.

◆ last_width_extent

int BarSliderWidget::last_width_extent

Definition at line 139 of file bar_slider.h.

◆ last_x

double BarSliderWidget::last_x

Used in gesture drag.

Definition at line 108 of file bar_slider.h.

◆ layout

PangoLayout* BarSliderWidget::layout

Cache layout.

Definition at line 133 of file bar_slider.h.

◆ max

float BarSliderWidget::max

Maximum value.

Definition at line 69 of file bar_slider.h.

◆ min

float BarSliderWidget::min

Minimum value.

Definition at line 72 of file bar_slider.h.

◆ mode

UiDragMode BarSliderWidget::mode

Update mode.

Definition at line 114 of file bar_slider.h.

◆ object

void* BarSliderWidget::object

Object to call get/set with.

Definition at line 102 of file bar_slider.h.

◆ parent_instance

GtkWidget BarSliderWidget::parent_instance

Definition at line 56 of file bar_slider.h.

◆ port

Port* BarSliderWidget::port

Port, if control port.

Definition at line 93 of file bar_slider.h.

◆ prefix

char BarSliderWidget::prefix[600]

The prefix to show before the value.

Definition at line 66 of file bar_slider.h.

◆ setter

GenericFloatSetter BarSliderWidget::setter

Float setter.

Definition at line 84 of file bar_slider.h.

◆ show_value

int BarSliderWidget::show_value

Whether to show the value in text or just the prefix + suffix.

Definition at line 124 of file bar_slider.h.

◆ snapped_getter

GenericFloatGetter BarSliderWidget::snapped_getter

Float getter for snapped values (optional).

Definition at line 81 of file bar_slider.h.

◆ start_x

double BarSliderWidget::start_x

Used in gesture drag.

Definition at line 111 of file bar_slider.h.

◆ suffix

char BarSliderWidget::suffix[600]

The suffix to show after the value (eg "%" for percentages).

Definition at line 63 of file bar_slider.h.

◆ type

BarSliderType BarSliderWidget::type

The type of slider.

Definition at line 120 of file bar_slider.h.

◆ width

int BarSliderWidget::width

Widget width.

Definition at line 96 of file bar_slider.h.

◆ zero

float BarSliderWidget::zero

Zero point.

Definition at line 75 of file bar_slider.h.


The documentation for this struct was generated from the following file: