Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
clip_editor_inner.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __GUI_WIDGETS_CLIP_EDITOR_INNER_H__
11#define __GUI_WIDGETS_CLIP_EDITOR_INNER_H__
12
13#include "gui/backend/gtk_widgets/gtk_wrapper.h"
14
15#define CLIP_EDITOR_INNER_WIDGET_TYPE (clip_editor_inner_widget_get_type ())
16G_DECLARE_FINAL_TYPE (
18 clip_editor_inner_widget,
19 Z,
20 CLIP_EDITOR_INNER_WIDGET,
21 GtkWidget)
22
23typedef struct _RulerWidget RulerWidget;
24typedef struct _ColorAreaWidget ColorAreaWidget;
25typedef struct _MidiEditorSpaceWidget MidiEditorSpaceWidget;
26typedef struct _AudioEditorSpaceWidget AudioEditorSpaceWidget;
27typedef struct _ChordEditorSpaceWidget ChordEditorSpaceWidget;
28typedef struct _AutomationEditorSpaceWidget AutomationEditorSpaceWidget;
29typedef struct _ArrangerWidget ArrangerWidget;
30TYPEDEF_STRUCT_UNDERSCORED (ZoomButtonsWidget);
31
37
38#define MW_CLIP_EDITOR_INNER MW_CLIP_EDITOR->clip_editor_inner
39
44void
47 GtkWidget * widget,
48 bool add);
49
54typedef struct _ClipEditorInnerWidget
55{
56 GtkWidget parent_instance;
57
58 ColorAreaWidget * color_bar;
59 GtkBox * bot_of_arranger_toolbar;
60 GtkLabel * track_name_lbl;
61 GtkBox * left_of_ruler_box;
62 RulerWidget * ruler;
63 GtkStack * editor_stack;
64 GtkSizeGroup * left_of_ruler_size_group;
65
66 /* ==== Piano Roll (Midi Editor) ==== */
67
69 GtkToggleButton * toggle_notation;
70 GtkToggleButton * toggle_listen_notes;
71 GtkToggleButton * show_automation_values;
72
73 MidiEditorSpaceWidget * midi_editor_space;
74
75 /* ==== End Piano Roll (Midi Editor) ==== */
76
77 /* ==== Automation Editor ==== */
78
79 AutomationEditorSpaceWidget * automation_editor_space;
80
81 /* ==== End Automation Editor ==== */
82
83 /* ==== Chord Editor ==== */
84
85 ChordEditorSpaceWidget * chord_editor_space;
86
87 /* ==== End Chord Editor ==== */
88
89 /* ==== Audio Editor ==== */
90
91 AudioEditorSpaceWidget * audio_editor_space;
92
93 /* ==== End Audio Editor ==== */
94
95 /* === Right toolbar === */
96
97 ZoomButtonsWidget * zoom_buttons;
98
102
104
105void
106clip_editor_inner_widget_setup (ClipEditorInnerWidget * self);
107
108void
109clip_editor_inner_widget_refresh (ClipEditorInnerWidget * self);
110
112clip_editor_inner_widget_get_visible_arranger (ClipEditorInnerWidget * self);
113
117
118#endif
struct _ArrangerWidget { GtkWidget parent_instance; ArrangerWidgetType type; GtkGestureDrag * drag; GtkGestureClick * click; GtkGestureClick * right_click; GtkEventControllerMotion *motion_controller; double last_offset_x; double last_offset_y; double offset_x_from_scroll; double offset_y_from_scroll; UiOverlayAction action; double start_x; double start_y; double start_pos_px; bool drag_update_started; std::unique_ptr< Position > earliest_obj_start_pos; Position fade_pos_at_start; std::unique_ptr< ArrangerObject > start_object; std::weak_ptr< ArrangerObject > prj_start_object; std::weak_ptr< ArrangerObject > hovered_object; bool start_object_was_selected; std::unique_ptr< ArrangerSelections > sel_at_start; std::unique_ptr< Region > region_at_start; std::unique_ptr< ArrangerSelections > sel_to_delete; Position start_pos; bool was_paused; Position playhead_pos_at_start; double curr_ticks_diff_from_start; double adj_ticks_diff; double last_adj_ticks_diff; Position curr_pos; Position end_pos; gboolean key_is_pressed; double hover_x; double hover_y; bool hovered; int n_press; std::shared_ptr< SnapGrid > snap_grid; int shift_held; int ctrl_held; int alt_held; gint64 last_frame_time; int visible_track_diff; int lane_diff; int visible_at_diff; int is_pinned; int resizing_range; int resizing_range_start; AutomationTrack *hovered_at; TrackLane * hovered_lane; Track * hovered_track; GdkTexture *symbolic_link_texture; GdkTexture *music_note_16th_texture; GdkTexture *fork_awesome_snowflake_texture; GdkTexture *media_playlist_repeat_texture; int region_icon_texture_size; GskRenderNode *loop_line_node; GskRenderNode *clip_start_line_node; GskRenderNode *cut_line_node; int hovered_note; int start_vel_val; int vel_diff; int hovered_chord_index; float fval_at_start; double dval_at_start; int last_playhead_px; bool redraw; graphene_rect_t last_rect; bool can_link; bool is_highlighted; GdkRectangle highlight_rect; GdkRectangle last_selection_rect; guint drag_start_btn; bool first_draw; double new_hadj_val; Transport::Display ruler_display; PangoLayoutUniquePtr vel_layout; PangoLayoutUniquePtr ap_layout; PangoLayoutUniquePtr audio_layout; PangoLayoutUniquePtr debug_layout; int queued_playhead_px; GtkPopoverMenu *popover_menu; guint unlisten_notes_timeout_id;} ArrangerWidget
A canvas widget for drawing and interacting with arranger objects.
Definition arranger.h:95
void clip_editor_inner_widget_add_to_left_of_ruler_sizegroup(ClipEditorInnerWidget *self, GtkWidget *widget, bool add)
Adds or remove the widget from the "left of ruler" size group.
The piano roll widget is the whole space inside the clip editor tab when a AUDIO region is selected.
The piano roll widget is the whole space inside the clip editor tab when a AUTOMATION region is selec...
The piano roll widget is the whole space inside the clip editor tab when a CHORD region is selected.
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.
GtkSizeGroup * ruler_arranger_hsize_group
Size group for keeping the whole ruler and each timeline the same width.
GtkToggleButton * toggle_notation
Toggle between drum mode and normal mode.
The piano roll widget is the whole space inside the clip editor tab when a MIDI region is selected.