summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_editor.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-22 00:26:26 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-22 00:26:26 +0000
commit22a2c820452eeec0399039149c179c4b0f7dcc21 (patch)
treea5a9a812976b060932a6c51f6857ffed4624592a /gtk2_ardour/region_editor.h
parentb1c3a224983a6b0cc5c5bb4b042d15f1d67ae5b3 (diff)
Make region properties dialogue work for MIDI regions too.
git-svn-id: svn://localhost/ardour2/branches/3.0@7136 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_editor.h')
-rw-r--r--gtk2_ardour/region_editor.h86
1 files changed, 78 insertions, 8 deletions
diff --git a/gtk2_ardour/region_editor.h b/gtk2_ardour/region_editor.h
index f66d7f8f81..8fdb563211 100644
--- a/gtk2_ardour/region_editor.h
+++ b/gtk2_ardour/region_editor.h
@@ -20,22 +20,92 @@
#ifndef __gtk_ardour_region_edit_h__
#define __gtk_ardour_region_edit_h__
-#include "ardour/session_handle.h"
+#include <map>
+#include <gtkmm/label.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/box.h>
+#include <gtkmm/togglebutton.h>
+#include <gtkmm/button.h>
+#include <gtkmm/arrow.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/table.h>
+#include <gtkmm/adjustment.h>
+#include <gtkmm/separator.h>
+#include <gtkmm/spinbutton.h>
+
+#include <libgnomecanvas/libgnomecanvas.h>
+
+#include "pbd/signals.h"
+
+#include "audio_clock.h"
#include "ardour_dialog.h"
+#include "region_editor.h"
-namespace ARDOUR { class Session; }
+namespace ARDOUR {
+ class Region;
+ class Session;
+}
-/** Just a useless stub for now... */
class RegionEditor : public ArdourDialog
{
public:
- RegionEditor(ARDOUR::Session* s)
- : ArdourDialog ("region editor") {
- set_session (s);
- }
+ RegionEditor (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Region>);
+
+ protected:
+ virtual void region_changed (const PBD::PropertyChange&);
+
+ Gtk::Table _table;
+
+ private:
+ boost::shared_ptr<ARDOUR::Region> _region;
+
+ void connect_editor_events ();
+
+ Gtk::Label name_label;
+ Gtk::Entry name_entry;
+ Gtk::ToggleButton audition_button;
+
+ Gtk::Label position_label;
+ Gtk::Label end_label;
+ Gtk::Label length_label;
+ Gtk::Label sync_relative_label;
+ Gtk::Label sync_absolute_label;
+ Gtk::Label start_label;
+
+ AudioClock position_clock;
+ AudioClock end_clock;
+ AudioClock length_clock;
+ AudioClock sync_offset_relative_clock; ///< sync offset relative to the start of the region
+ AudioClock sync_offset_absolute_clock; ///< sync offset relative to the start of the timeline
+ AudioClock start_clock;
+
+ PBD::ScopedConnection state_connection;
+ PBD::ScopedConnection audition_connection;
+
+ void bounds_changed (const PBD::PropertyChange&);
+ void name_changed ();
+
+ void audition_state_changed (bool);
+
+ void activation ();
+
+ void name_entry_changed ();
+ void position_clock_changed ();
+ void end_clock_changed ();
+ void length_clock_changed ();
+ void sync_offset_absolute_clock_changed ();
+ void sync_offset_relative_clock_changed ();
+
+ void audition_button_toggled ();
+
+ gint bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (RegionEditor::*pmf)());
+ gint breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (RegionEditor::*pmf)());
+
+ bool on_delete_event (GdkEventAny *);
+ void handle_response (int);
- virtual ~RegionEditor () {}
+ bool spin_arrow_grab;
};
#endif /* __gtk_ardour_region_edit_h__ */