Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
automation_track.h
1/*
2 * Copyright (C) 2018-2019 Alexandros Theodotou <alex at zrythm dot org>
3 *
4 * This file is part of Zrythm
5 *
6 * Zrythm is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Zrythm is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef __GUI_WIDGETS_AUTOMATION_TRACK_H__
21#define __GUI_WIDGETS_AUTOMATION_TRACK_H__
22
23#include <gtk/gtk.h>
24
25#define AUTOMATION_TRACK_WIDGET_TYPE (automation_track_widget_get_type ())
26G_DECLARE_FINAL_TYPE (
28 automation_track_widget,
29 Z,
30 AUTOMATION_TRACK_WIDGET,
31 GtkGrid)
32
33typedef struct _TrackWidget TrackWidget;
34typedef struct AutomationTrack AutomationTrack;
35typedef struct _DigitalMeterWidget DigitalMeterWidget;
36typedef struct Track Track;
37typedef struct _AutomationPointWidget AutomationPointWidget;
38typedef struct AutomationTrack AutomationTrack;
39typedef struct _AutomatableSelectorButtonWidget AutomatableSelectorButtonWidget;
40
41typedef struct _AutomationTrackWidget
42{
43 GtkGrid parent_instance;
44 AutomatableSelectorButtonWidget * selector;
45 GtkTreeModel * selector_model;
46 GtkBox * value_box;
47 DigitalMeterWidget * value;
48 GtkToggleButton * mute_toggle;
49
54
58 char * path;
59
61 float last_val;
62
67
68 GtkLabel * current_val;
70
75automation_track_widget_new (AutomationTrack * at);
76
80void
81automation_track_widget_refresh (AutomationTrackWidget * self);
82
83void
84automation_track_widget_update_current_val (AutomationTrackWidget * self);
85
90int
93 float fval);
94
99float
100automation_track_widget_get_fvalue_at_y (
102 double _start_y);
103
104double
105automation_track_widget_get_y (
107 AutomationPointWidget * ap);
108
109#endif
NONNULL int automation_track_get_y_px_from_normalized_val(AutomationTrack *self, float normalized_val)
Returns the y pixels from the value based on the allocation of the automation track.
AutomationTrack * at
Associated automation track.
gulong selector_changed_cb_id
For freezing callbacks.
float last_val
Cache for showing the value.
char * path
Selected automatable path.
The TrackWidget is split into 3 parts.
Definition track.h:106
Track to be inserted into the Project's Tracklist.
Definition track.h:190