extend strict-i/o to include route outputs.
[ardour.git] / gtk2_ardour / step_entry.h
index c627b9575f671402e2c772457ffb4dd18bea5ccc..26c46d5c51150a24f54c4c0419205c55d89d16f0 100644 (file)
 #include <gtkmm/adjustment.h>
 #include <gtkmm2ext/bindings.h>
 
-#include "ardour_dialog.h"
+#include "ardour_window.h"
 #include "gtk_pianokeyboard.h"
 
-class MidiTimeAxisView;
+class StepEditor;
 
-class StepEntry : public ArdourDialog
+class StepEntry : public ArdourWindow
 {
   public:
-        StepEntry (MidiTimeAxisView&);
+        StepEntry (StepEditor&);
         ~StepEntry ();
 
         void note_off_event_handler (int note);
         void rest_event_handler ();
 
-        Evoral::MusicalTime note_length();
+        Evoral::Beats note_length();
         uint8_t note_velocity() const;
         uint8_t note_channel() const;
-        
+
         int current_octave () const { return (int) floor (octave_adjustment.get_value()); }
-        
+
   private:
-        Evoral::MusicalTime _current_note_length;
+        Evoral::Beats _current_note_length;
         uint8_t _current_note_velocity;
 
         Gtk::VBox packer;
@@ -58,18 +58,27 @@ class StepEntry : public ArdourDialog
 
         Gtk::ToggleButton chord_button;
         Gtk::ToggleButton triplet_button;
-        Gtk::ToggleButton dot_button;
+        Gtk::ToggleButton dot0_button;
+        Gtk::ToggleButton dot1_button;
+        Gtk::ToggleButton dot2_button;
+        Gtk::ToggleButton dot3_button;
+        Gtk::Adjustment   dot_adjustment;
+        Gtk::VBox dot_box1;
+        Gtk::VBox dot_box2;
         Gtk::ToggleButton restart_button;
 
         Gtk::VBox   resync_box;
         Gtk::Button beat_resync_button;
         Gtk::Button bar_resync_button;
+        Gtk::Button resync_button;
 
         Gtk::Button sustain_button;
         Gtk::Button rest_button;
         Gtk::Button grid_rest_button;
         Gtk::VBox   rest_box;
 
+        Gtk::Button back_button;
+
         Gtk::RadioButton length_1_button;
         Gtk::RadioButton length_2_button;
         Gtk::RadioButton length_4_button;
@@ -115,7 +124,7 @@ class StepEntry : public ArdourDialog
 
         PianoKeyboard* _piano;
         Gtk::Widget* piano;
-        MidiTimeAxisView* _mtv;
+        StepEditor*   se;
 
         void bank_click ();
         void program_click ();
@@ -131,7 +140,6 @@ class StepEntry : public ArdourDialog
         /* actions */
 
         void register_actions ();
-        Gtkmm2ext::ActionMap myactions;
 
         void insert_note (uint8_t);
         void insert_rest ();
@@ -149,7 +157,7 @@ class StepEntry : public ArdourDialog
         void insert_fsharp ();
         void insert_g ();
         void insert_gsharp ();
-        
+
         void note_length_change (GtkAction*);
         void note_velocity_change (GtkAction*);
 
@@ -157,7 +165,8 @@ class StepEntry : public ArdourDialog
         bool radio_button_release (GdkEventButton*, Gtk::RadioButton*, int);
 
         void load_bindings ();
-        Gtkmm2ext::Bindings  bindings;
+       Gtkmm2ext::ActionMap myactions;
+       Gtkmm2ext::Bindings*  bindings;
 
         void inc_note_velocity ();
         void dec_note_velocity ();
@@ -185,11 +194,15 @@ class StepEntry : public ArdourDialog
         void octave_9 () { octave_n (9); }
         void octave_10 () { octave_n (10); }
 
-        void toggle_dotted();
+        void dot_change (GtkAction*);
+        void dot_value_change ();
+
         void toggle_triplet();
         void toggle_chord();
-        
+
         void do_sustain ();
+        void back();
+        void sync_to_edit_point ();
 };
 
 #endif /* __gtk2_ardour_step_entry_h__ */