Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
timeline_minimap.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019, 2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __GUI_WIDGETS_TIMELINE_MINIMAP_H__
11#define __GUI_WIDGETS_TIMELINE_MINIMAP_H__
12
13#include "dsp/position.h"
14
15#include <gtk/gtk.h>
16
17#define TIMELINE_MINIMAP_WIDGET_TYPE (timeline_minimap_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
20 timeline_minimap_widget,
21 Z,
22 TIMELINE_MINIMAP_WIDGET,
23 GtkWidget)
24
25typedef struct _TimelineMinimapBgWidget TimelineMinimapBgWidget;
26typedef struct _TimelineMinimapSelectionWidget TimelineMinimapSelectionWidget;
27typedef struct TimelineMinimap TimelineMinimap;
28
35#define MW_TIMELINE_MINIMAP MW_TIMELINE_BOT_BOX->timeline_minimap
36
38{
39 TIMELINE_MINIMAP_ACTION_NONE,
40 TIMELINE_MINIMAP_ACTION_RESIZING_L,
41 TIMELINE_MINIMAP_ACTION_RESIZING_R,
46
47typedef struct _TimelineMinimapWidget
48{
49 GtkWidget parent_instance;
50
51 GtkOverlay * overlay;
52
53 TimelineMinimapBgWidget * bg;
54 TimelineMinimapSelectionWidget * selection;
56 //GtkGestureDrag * drag;
57 //GtkGestureClick * multipress;
58 //GtkGestureClick * right_mouse_mp;
59
62 double last_offset_y;
63
65 double start_x;
66 double start_y;
67
70 double selection_start_pos;
71 double selection_end_pos;
72
76
80void
83 Position * pos,
84 int px);
85
89void
91
96#endif
void timeline_minimap_widget_refresh(TimelineMinimapWidget *self)
Causes reallocation.
TimelineMinimapAction
void timeline_minimap_widget_px_to_pos(TimelineMinimapWidget *self, Position *pos, int px)
Taken from arranger.c.
@ TIMELINE_MINIMAP_ACTION_STARTING_MOVING
in drag_start
@ TIMELINE_MINIMAP_ACTION_MOVING
in drag start,
Position struct and API.
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:127
double start_x
Coordinates at the start of a drag action.
double start_zoom_level
To be set in drag_begin().
double last_offset_x
Last drag offsets during a drag.
int n_press
Number of presses, for click controller.