Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
midi_editor_space.h
Go to the documentation of this file.
1// clang-format off
2// SPDX-FileCopyrightText: © 2018-2019, 2021-2023 Alexandros Theodotou <alex@zrythm.org>
3// SPDX-License-Identifier: LicenseRef-ZrythmLicense
4// clang-format on
5
12#ifndef __GUI_WIDGETS_MIDI_EDITOR_SPACE_H__
13#define __GUI_WIDGETS_MIDI_EDITOR_SPACE_H__
14
15#include <gtk/gtk.h>
16
17#define MIDI_EDITOR_SPACE_WIDGET_TYPE (midi_editor_space_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
20 midi_editor_space_widget,
21 Z,
22 MIDI_EDITOR_SPACE_WIDGET,
23 GtkWidget);
24
25TYPEDEF_STRUCT_UNDERSCORED (ArrangerWrapperWidget);
26TYPEDEF_STRUCT_UNDERSCORED (PianoRollKeysWidget);
27TYPEDEF_STRUCT_UNDERSCORED (VelocitySettingsWidget);
28
35#define MW_MIDI_EDITOR_SPACE MW_CLIP_EDITOR_INNER->midi_editor_space
36
41typedef struct _MidiEditorSpaceWidget
42{
43 GtkWidget parent_instance;
44
45 GtkPaned * midi_arranger_velocity_paned;
46
47 GtkScrolledWindow * piano_roll_keys_scroll;
48 GtkViewport * piano_roll_keys_viewport;
49
50 GtkBox * midi_notes_box;
51
52 PianoRollKeysWidget * piano_roll_keys;
53
56 ArrangerWrapperWidget * arranger_wrapper;
57 ArrangerWidget * modifier_arranger;
58
59 VelocitySettingsWidget * velocity_settings;
60 GtkBox * midi_vel_chooser_box;
61 GtkComboBoxText * midi_modifier_chooser;
62
66
73
74void
75midi_editor_space_widget_setup (MidiEditorSpaceWidget * self);
76
80void
83 int visible);
84
88void
91 int y);
92
97gboolean
99
100void
101midi_editor_space_widget_refresh (MidiEditorSpaceWidget * self);
102
107#endif
gboolean midi_editor_space_widget_scroll_to_middle(MidiEditorSpaceWidget *self)
To be used as a source func when first showing a MIDI region.
void midi_editor_space_widget_update_size_group(MidiEditorSpaceWidget *self, int visible)
See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
void midi_editor_space_widget_set_piano_keys_scroll_start_y(MidiEditorSpaceWidget *self, int y)
Updates the scroll adjustment.
The arranger widget is a canvas that draws all the arranger objects it contains.
Definition arranger.h:108
Wraps the arranger widget in a box with scrollbars.
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.
GtkBox * midi_arranger_box
Piano roll.
GtkSizeGroup * arranger_and_keys_vsize_group
Vertical size goup for the keys and the arranger.
bool scrolled_on_first_refresh
Whether we scrolled to the middle already (should happen once per run).