11#ifndef __GUI_WIDGETS_DIGITAL_METER_H__
12#define __GUI_WIDGETS_DIGITAL_METER_H__
17#include "gtk_wrapper.h"
19#define DIGITAL_METER_WIDGET_TYPE (digital_meter_widget_get_type ())
37enum class DigitalMeterType
39 DIGITAL_METER_TYPE_BPM,
40 DIGITAL_METER_TYPE_POSITION,
41 DIGITAL_METER_TYPE_TIMESIG,
42 DIGITAL_METER_TYPE_NOTE_TYPE,
43 DIGITAL_METER_TYPE_NOTE_LENGTH,
48typedef struct _DigitalMeterWidget
50 GtkWidget parent_instance;
52 DigitalMeterType type;
56 GtkGestureDrag * drag;
64 int num_part_start_pos;
66 int dec_part_start_pos;
88 int sixteenths_start_pos;
89 int sixteenths_end_pos;
96 int update_sixteenths;
106 int seconds_start_pos;
119 NoteLength * note_length;
127 int update_timesig_top;
129 int update_timesig_bot;
133 int beat_unit_at_start;
143 void (*on_drag_begin) (
void *);
145 void (*on_drag_end) (
void *);
160 PangoLayout * seg7_layout;
161 PangoLayout * normal_layout;
165 GtkPopoverMenu * popover_menu;
183 DigitalMeterType type,
184 NoteLength * note_length,
186 const char * caption);
188#define digital_meter_widget_new_for_position( \
189 obj, drag_begin, getter, setter, drag_end, caption) \
190 _digital_meter_widget_new_for_position ( \
191 (void *) obj, (void (*) (void *)) drag_begin, \
192 (void (*) (void *, Position *)) getter, \
193 (void (*) (void *, Position *)) setter, (void (*) (void *)) drag_end, \
214 void (*drag_begin) (
void *),
215 void (*get_val) (
void *,
Position *),
216 void (*set_val) (
void *,
Position *),
217 void (*drag_end) (
void *),
218 const char * caption);
A Position is made up of bars.beats.sixteenths.ticks.