10#ifndef __GUI_WIDGETS_BAR_SLIDER_H__
11#define __GUI_WIDGETS_BAR_SLIDER_H__
13#include "common/utils/types.h"
14#include "common/utils/ui.h"
15#include "gui/backend/gtk_widgets/gtk_wrapper.h"
17#define BAR_SLIDER_WIDGET_TYPE (bar_slider_widget_get_type ())
38 BAR_SLIDER_TYPE_NORMAL,
43 BAR_SLIDER_TYPE_CONTROL_PORT,
53typedef struct _BarSliderWidget
55 GtkWidget parent_instance;
138 int last_width_extent;
139 int last_height_extent;
140 char last_extent_str[3000];
163 int convert_to_percentage,
167 const char * suffix);
172#define bar_slider_widget_new( \
173 getter, setter, obj, min, max, w, h, zero, dec, mode, suffix) \
174 _bar_slider_widget_new ( \
175 BarSliderType::BAR_SLIDER_TYPE_NORMAL, getter, setter, (void *) obj, min, \
176 max, w, h, zero, 0, dec, mode, "", suffix)
183#define bar_slider_widget_new_port_connection(conn, prefix) \
184 _bar_slider_widget_new ( \
185 BarSliderType::BAR_SLIDER_TYPE_PORT_MULTIPLIER, nullptr, nullptr, \
186 (void *) conn, 0.f, 1.f, 160, 20, 0.f, 1, 0, \
187 UiDragMode::UI_DRAG_MODE_CURSOR, prefix, " %")
std::function< float()> GenericFloatGetter
Getter prototype for float values.
std::function< void(float)> GenericFloatSetter
Setter prototype for float values.