1 /*
2  * Copyright (C) 2019-2020 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 this program.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 /**
21  * \file
22  *
23  * Automation editor space.
24  */
25 
26 #ifndef __GUI_WIDGETS_AUTOMATION_EDITOR_SPACE_H__
27 #define __GUI_WIDGETS_AUTOMATION_EDITOR_SPACE_H__
28 
29 #include <gtk/gtk.h>
30 
31 #define AUTOMATION_EDITOR_SPACE_WIDGET_TYPE \
32   (automation_editor_space_widget_get_type ())
33 G_DECLARE_FINAL_TYPE (
34   AutomationEditorSpaceWidget,
35   automation_editor_space_widget,
36   Z, AUTOMATION_EDITOR_SPACE_WIDGET,
37   GtkBox)
38 
39 typedef struct _ArrangerWidget ArrangerWidget;
40 typedef struct _AutomationEditorLegendWidget
41   AutomationEditorLegendWidget;
42 
43 /**
44  * @addtogroup widgets
45  *
46  * @{
47  */
48 
49 #define MW_AUTOMATION_EDITOR_SPACE \
50   MW_CLIP_EDITOR_INNER->automation_editor_space
51 
52 /**
53  * The piano roll widget is the whole space inside
54  * the clip editor tab when a AUTOMATION region is selected.
55  */
56 typedef struct _AutomationEditorSpaceWidget
57 {
58   GtkBox              parent_instance;
59 
60   /** The box dividing the chord keys and the
61    * arranger. */
62   GtkBox *            left_slash_arranger_box;
63 
64   /** The box on the left of the arranger containing
65    * the chord keys. */
66   GtkBox *            left_box;
67 
68   /** The arranger. */
69   ArrangerWidget *    arranger;
70   GtkScrolledWindow * arranger_scroll;
71   GtkViewport *       arranger_viewport;
72 
73   /* The legend on the left side. */
74   AutomationEditorLegendWidget * legend;
75 } AutomationEditorSpaceWidget;
76 
77 void
78 automation_editor_space_widget_setup (
79   AutomationEditorSpaceWidget * self);
80 
81 /**
82  * See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
83  */
84 void
85 automation_editor_space_widget_update_size_group (
86   AutomationEditorSpaceWidget * self,
87   int                     visible);
88 
89 void
90 automation_editor_space_widget_refresh (
91   AutomationEditorSpaceWidget * self);
92 
93 /**
94  * @}
95  */
96 
97 #endif
98