1 /*
2  * Copyright (C) 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 this program.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 /**
21  * \file
22  *
23  * Audio editor space.
24  */
25 
26 #ifndef __GUI_WIDGETS_AUDIO_EDITOR_SPACE_H__
27 #define __GUI_WIDGETS_AUDIO_EDITOR_SPACE_H__
28 
29 #include <gtk/gtk.h>
30 
31 #define AUDIO_EDITOR_SPACE_WIDGET_TYPE \
32   (audio_editor_space_widget_get_type ())
33 G_DECLARE_FINAL_TYPE (
34   AudioEditorSpaceWidget,
35   audio_editor_space_widget,
36   Z, AUDIO_EDITOR_SPACE_WIDGET,
37   GtkBox)
38 
39 typedef struct _ArrangerWidget ArrangerWidget;
40 
41 /**
42  * @addtogroup widgets
43  *
44  * @{
45  */
46 
47 #define MW_AUDIO_EDITOR_SPACE \
48   MW_CLIP_EDITOR_INNER->audio_editor_space
49 
50 /**
51  * The piano roll widget is the whole space inside
52  * the clip editor tab when a AUDIO region is selected.
53  */
54 typedef struct _AudioEditorSpaceWidget
55 {
56   GtkBox             parent_instance;
57 
58   GtkBox *           left_box;
59   GtkScrolledWindow * arranger_scroll;
60   GtkViewport *      arranger_viewport;
61   ArrangerWidget *   arranger;
62 } AudioEditorSpaceWidget;
63 
64 void
65 audio_editor_space_widget_setup (
66   AudioEditorSpaceWidget * self);
67 
68 /**
69  * See CLIP_EDITOR_INNER_WIDGET_ADD_TO_SIZEGROUP.
70  */
71 void
72 audio_editor_space_widget_update_size_group (
73   AudioEditorSpaceWidget * self,
74   int                     visible);
75 
76 void
77 audio_editor_space_widget_refresh (
78   AudioEditorSpaceWidget * self);
79 
80 /**
81  * @}
82  */
83 
84 #endif
85