Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
arranger_minimap.h
Go to the documentation of this file.
1// clang-format off
2// SPDX-FileCopyrightText: © 2019, 2021, 2023 Alexandros Theodotou <alex@zrythm.org>
3// SPDX-License-Identifier: LicenseRef-ZrythmLicense
4// clang-format on
5
12#ifndef __GUI_WIDGETS_ARRANGER_MINIMAP_H__
13#define __GUI_WIDGETS_ARRANGER_MINIMAP_H__
14
15#include "dsp/position.h"
16
17#include "gtk_wrapper.h"
18
19#define ARRANGER_MINIMAP_WIDGET_TYPE (arranger_minimap_widget_get_type ())
20G_DECLARE_FINAL_TYPE (
22 arranger_minimap_widget,
23 Z,
24 ARRANGER_MINIMAP_WIDGET,
25 GtkWidget)
26
27typedef struct _ArrangerMinimapBgWidget ArrangerMinimapBgWidget;
28typedef struct _ArrangerMinimapSelectionWidget ArrangerMinimapSelectionWidget;
29typedef struct ArrangerMinimap ArrangerMinimap;
30
37#define MW_TIMELINE_MINIMAP (MW_TIMELINE_PANEL->timeline_wrapper->minimap)
38
40{
41 ARRANGER_MINIMAP_ACTION_NONE,
42 ARRANGER_MINIMAP_ACTION_RESIZING_L,
43 ARRANGER_MINIMAP_ACTION_RESIZING_R,
47};
48
49enum class ArrangerMinimapType
50{
51 ARRANGER_MINIMAP_TYPE_TIMELINE,
52 ARRANGER_MINIMAP_TYPE_CLIP_EDITOR,
53};
54
55typedef struct _ArrangerMinimapWidget
56{
57 GtkWidget parent_instance;
58
59 GtkOverlay * overlay;
60
61 ArrangerMinimapType type;
62
63 ArrangerMinimapBgWidget * bg;
64 ArrangerMinimapSelectionWidget * selection;
66
69 double last_offset_y;
70
72 double start_x;
73 double start_y;
74
77 double selection_start_pos;
78 double selection_end_pos;
79
83
87void
90 Position * pos,
91 int px);
92
96void
98
103#endif
void arranger_minimap_widget_px_to_pos(ArrangerMinimapWidget *self, Position *pos, int px)
Taken from arranger.c.
ArrangerMinimapAction
void arranger_minimap_widget_refresh(ArrangerMinimapWidget *self)
Causes reallocation.
@ ARRANGER_MINIMAP_ACTION_STARTING_MOVING
in drag_start
@ ARRANGER_MINIMAP_ACTION_MOVING
in drag start,
Position struct and API.
double start_zoom_level
To be set in drag_begin().
int n_press
Number of presses, for click controller.
double start_x
Coordinates at the start of a drag action.
double last_offset_x
Last drag offsets during a drag.
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:124