2 Copyright (C) 2001 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __gtk_ardour_region_edit_h__
22 #define __gtk_ardour_region_edit_h__
27 #include <libgnomecanvas/libgnomecanvas.h>
28 #include <sigc++/signal.h>
30 #include "audio_clock.h"
31 #include "ardour_dialog.h"
38 class AudioRegionView;
40 class AudioRegionEditor : public ArdourDialog
43 AudioRegionEditor (ARDOUR::Session&, ARDOUR::AudioRegion&, AudioRegionView& rv);
44 ~AudioRegionEditor ();
47 ARDOUR::Session& _session;
48 ARDOUR::AudioRegion& _region;
49 AudioRegionView& _region_view;
51 void connect_editor_events ();
53 Gtk::Label name_label;
54 Gtk::Entry name_entry;
57 Gtk::HBox top_row_hbox;
58 Gtk::HBox top_row_button_hbox;
60 Gtk::ToggleButton lock_button;
61 Gtk::ToggleButton mute_button;
62 Gtk::ToggleButton opaque_button;
63 Gtk::ToggleButton envelope_active_button;
64 Gtk::ToggleButton envelope_view_button;
65 Gtk::Label envelope_active_button_label;
66 Gtk::Label envelope_view_button_label;
68 Gtk::Button raise_button;
69 Gtk::Arrow raise_arrow;
70 Gtk::Button lower_button;
71 Gtk::Arrow lower_arrow;
72 Gtk::Frame layer_frame;
73 Gtk::Label layer_value_label;
74 Gtk::Label layer_label;
77 Gtk::ToggleButton audition_button;
78 Gtk::Label audition_label;
83 Gtk::Table time_table;
85 Gtk::Label start_label;
87 Gtk::Label length_label;
88 Gtk::Alignment start_alignment;
89 Gtk::Alignment end_alignment;
90 Gtk::Alignment length_alignment;
92 AudioClock start_clock;
94 AudioClock length_clock;
95 AudioClock sync_offset_clock;
97 Gtk::Table envelope_loop_table;
98 Gtk::Button loop_button;
99 Gtk::Label loop_label;
100 Gtk::Label envelope_label;
102 Gtk::Table fade_in_table;
103 Gtk::Label fade_in_label;
104 Gtk::Alignment fade_in_label_align;
105 Gtk::Label fade_in_active_button_label;
106 Gtk::ToggleButton fade_in_active_button;
107 Gtk::Label fade_in_length_label;
109 Gtk::Adjustment fade_in_length_adjustment;
110 Gtk::SpinButton fade_in_length_spinner;
112 Gtk::Table fade_out_table;
113 Gtk::Label fade_out_label;
114 Gtk::Alignment fade_out_label_align;
115 Gtk::Label fade_out_active_button_label;
116 Gtk::ToggleButton fade_out_active_button;
117 Gtk::Label fade_out_length_label;
119 Gtk::Adjustment fade_out_length_adjustment;
120 Gtk::SpinButton fade_out_length_spinner;
122 Gtk::HSeparator sep3;
123 Gtk::VSeparator sep1;
124 Gtk::VSeparator sep2;
126 void region_changed (ARDOUR::Change);
127 void bounds_changed (ARDOUR::Change);
128 void name_changed ();
129 void opacity_changed ();
130 void mute_changed ();
131 void envelope_active_changed ();
132 void lock_changed ();
133 void layer_changed ();
135 void fade_in_length_adjustment_changed ();
136 void fade_out_length_adjustment_changed ();
137 void fade_in_changed ();
138 void fade_out_changed ();
142 void name_entry_changed ();
143 void start_clock_changed ();
144 void end_clock_changed ();
145 void length_clock_changed ();
147 gint envelope_active_button_press (GdkEventButton *);
148 gint envelope_active_button_release (GdkEventButton *);
150 void audition_button_toggled ();
151 void envelope_view_button_toggled ();
152 void lock_button_clicked ();
153 void mute_button_clicked ();
154 void opaque_button_clicked ();
155 void raise_button_clicked ();
156 void lower_button_clicked ();
158 void fade_in_active_toggled ();
159 void fade_out_active_toggled ();
160 void fade_in_active_changed ();
161 void fade_out_active_changed ();
163 void fade_in_realized ();
164 void fade_out_realized ();
166 void start_editing_fade_in ();
167 void start_editing_fade_out ();
168 void stop_editing_fade_in ();
169 void stop_editing_fade_out ();
171 gint bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)());
172 gint breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)());
174 bool spin_arrow_grab;
177 #endif /* __gtk_ardour_region_edit_h__ */