1 /* GSequencer - Advanced GTK Sequencer
2  * Copyright (C) 2005-2019 Joël Krähemann
3  *
4  * This file is part of GSequencer.
5  *
6  * GSequencer is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU 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  * GSequencer 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 General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GSequencer.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef __AGS_AUTOMATION_TOOLBAR_H__
21 #define __AGS_AUTOMATION_TOOLBAR_H__
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <gtk/gtk.h>
27 
28 #include <ags/libags.h>
29 #include <ags/libags-audio.h>
30 #include <ags/libags-gui.h>
31 
32 G_BEGIN_DECLS
33 
34 #define AGS_TYPE_AUTOMATION_TOOLBAR                (ags_automation_toolbar_get_type())
35 #define AGS_AUTOMATION_TOOLBAR(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUTOMATION_TOOLBAR, AgsAutomationToolbar))
36 #define AGS_AUTOMATION_TOOLBAR_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUTOMATION_TOOLBAR, AgsAutomationToolbarClass))
37 #define AGS_IS_AUTOMATION_TOOLBAR(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUTOMATION_TOOLBAR))
38 #define AGS_IS_AUTOMATION_TOOLBAR_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_AUTOMATION_TOOLBAR))
39 #define AGS_AUTOMATION_TOOLBAR_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_AUTOMATION_TOOLBAR, AgsAutomationToolbarClass))
40 
41 #define AGS_AUTOMATION_TOOLBAR_DATA_CHANNEL "ags-channel"
42 #define AGS_AUTOMATION_TOOLBAR_DATA_PORT "ags-port"
43 
44 typedef struct _AgsAutomationToolbar AgsAutomationToolbar;
45 typedef struct _AgsAutomationToolbarClass AgsAutomationToolbarClass;
46 
47 typedef enum{
48   AGS_AUTOMATION_TOOLBAR_CONNECTED    = 1,
49   AGS_AUTOMATION_TOOLBAR_RESET_PORT   = 1 << 1,
50 }AgsAutomationToolbarFlags;
51 
52 struct _AgsAutomationToolbar
53 {
54   GtkToolbar toolbar;
55 
56   guint flags;
57 
58   GtkToggleToolButton *selected_edit_mode;
59   GtkToggleToolButton *position;
60   GtkToggleToolButton *edit;
61   GtkToggleToolButton *clear;
62   GtkToggleToolButton *select;
63 
64   GtkToolButton *copy;
65   GtkToolButton *cut;
66   GtkMenuToolButton *paste_tool;
67 
68   GtkMenuToolButton *menu_tool;
69   GtkMenu *tool_popup;
70 
71   GtkDialog *select_acceleration;
72   GtkDialog *ramp_acceleration;
73   GtkDialog *position_automation_cursor;
74 
75   guint zoom_history;
76   GtkComboBox *zoom;
77 
78   GtkComboBox *port;
79 
80   GtkSpinButton *opacity;
81 };
82 
83 struct _AgsAutomationToolbarClass
84 {
85   GtkToolbarClass toolbar;
86 };
87 
88 GType ags_automation_toolbar_get_type(void);
89 
90 void ags_automation_toolbar_load_port(AgsAutomationToolbar *automation_toolbar);
91 void ags_automation_toolbar_apply_port(AgsAutomationToolbar *automation_toolbar,
92 				       GType channel_type, gchar *control_name);
93 
94 GtkMenu* ags_automation_toolbar_tool_popup_new(AgsAutomationToolbar *automation_toolbar);
95 
96 AgsAutomationToolbar* ags_automation_toolbar_new();
97 
98 G_END_DECLS
99 
100 #endif /*__AGS_AUTOMATION_TOOLBAR_H__*/
101