10#ifndef __GUI_WIDGETS_BAR_SLIDER_H__
11#define __GUI_WIDGETS_BAR_SLIDER_H__
16#include "gtk_wrapper.h"
18#define BAR_SLIDER_WIDGET_TYPE (bar_slider_widget_get_type ())
39 BAR_SLIDER_TYPE_NORMAL,
44 BAR_SLIDER_TYPE_CONTROL_PORT,
54typedef struct _BarSliderWidget
56 GtkWidget parent_instance;
139 int last_width_extent;
140 int last_height_extent;
141 char last_extent_str[3000];
156 float (*get_val) (
void *),
157 void (*set_val) (
void *,
float),
164 int convert_to_percentage,
168 const char * suffix);
173#define bar_slider_widget_new( \
174 getter, setter, obj, min, max, w, h, zero, dec, mode, suffix) \
175 _bar_slider_widget_new ( \
176 BarSliderType::BAR_SLIDER_TYPE_NORMAL, (float (*) (void *)) getter, \
177 (void (*) (void *, float)) setter, (void *) obj, min, max, w, h, zero, 0, \
178 dec, mode, "", suffix)
185#define bar_slider_widget_new_port_connection(conn, prefix) \
186 _bar_slider_widget_new ( \
187 BarSliderType::BAR_SLIDER_TYPE_PORT_MULTIPLIER, NULL, NULL, (void *) conn, \
188 0.f, 1.f, 160, 20, 0.f, 1, 0, UI_DRAG_MODE_CURSOR, prefix, " %")
float(* GenericFloatGetter)(void *object)
Getter prototype for float values.
UiDragMode
Dragging modes for widgets that have click&drag.
void(* GenericFloatSetter)(void *object, float val)
Setter prototype for float values.
Must ONLY be created via port_new()