12#ifndef __GUI_WIDGETS_RULER_H__
13#define __GUI_WIDGETS_RULER_H__
17#include "gtk_wrapper.h"
19#define RW_RULER_MARKER_SIZE 8
20#define RW_CUE_MARKER_HEIGHT 12
21#define RW_CUE_MARKER_WIDTH 7
22#define RW_PLAYHEAD_TRIANGLE_WIDTH 12
23#define RW_PLAYHEAD_TRIANGLE_HEIGHT 8
24#define RW_RANGE_HEIGHT_DIVISOR 4
29#define RW_SCROLL_SPEED 48
34#define RW_PX_TO_HIDE_BEATS 40.0
36#define RULER_WIDGET_TYPE (ruler_widget_get_type ())
37G_DECLARE_FINAL_TYPE (
RulerWidget, ruler_widget, Z, RULER_WIDGET, GtkWidget)
53#define DEFAULT_PX_PER_TICK 0.03
58#define SPACE_BEFORE_START 10
59#define SPACE_BEFORE_START_F 10.f
60#define SPACE_BEFORE_START_D 10.0
63#define RULER_ZOOM_LEVEL_MULTIPLIER 1.28
65#define MIN_ZOOM_LEVEL 0.04
66#define MAX_ZOOM_LEVEL 1800.
83enum class RulerWidgetType
85 RULER_WIDGET_TYPE_TIMELINE,
86 RULER_WIDGET_TYPE_EDITOR,
102typedef struct _RulerWidget
104 GtkWidget parent_instance;
106 RulerWidgetType type;
110 double px_per_sixteenth;
126 double last_offset_x;
127 double last_offset_y;
133 bool vertical_panning_started;
135 GtkGestureDrag * drag;
136 GtkGestureClick * click;
186 cairo_surface_t * cached_surface;
192 PangoLayout * layout_normal;
193 PangoLayout * monospace_layout_small;
194 PangoLayout * marker_layout;
102typedef struct _RulerWidget {
…};
258ruler_widget_is_range_hit (
275ruler_widget_px_to_pos (
UiOverlayAction
Various overlay actions to be shared.
A Position is made up of bars.beats.sixteenths.ticks.