summaryrefslogtreecommitdiff
path: root/gtk2_ardour/step_editor.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-12-22 16:48:16 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2018-12-22 16:48:16 -0500
commitbc1a7ec9e59e03dc630cbfb2e702ed0fe5233516 (patch)
tree7e2ebfbfc8a90f8a6b420fd52b165f415b4ed589 /gtk2_ardour/step_editor.h
parent933b2b1a9c346a09e0539816a6ca1d1d5f945c85 (diff)
deal with end-of-step-editing in a better way
Diffstat (limited to 'gtk2_ardour/step_editor.h')
-rw-r--r--gtk2_ardour/step_editor.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gtk2_ardour/step_editor.h b/gtk2_ardour/step_editor.h
index 761ac0125b..dca0129c9f 100644
--- a/gtk2_ardour/step_editor.h
+++ b/gtk2_ardour/step_editor.h
@@ -38,12 +38,25 @@ class MidiTimeAxisView;
class PublicEditor;
class StepEntry;
+/** A StepEditor is an object which understands how to interact with the
+ * MidiTrack and MidiTimeAxisView APIs to make the changes required during step
+ * editing. However, it defers all GUI matters to the StepEntry class, which
+ * presents an interface to the user, and then calls StepEditor methods to make
+ * changes.
+ *
+ * The StepEntry is a singleton, used over and over each time the user wants to
+ * step edit; the StepEditor is owned by a MidiTimeAxisView and re-used for any
+ * step editing in the MidiTrack for which the MidiTimeAxisView is a view.
+ */
+
class StepEditor : public PBD::ScopedConnectionList, public sigc::trackable
{
public:
StepEditor (PublicEditor&, boost::shared_ptr<ARDOUR::MidiTrack>, MidiTimeAxisView&);
virtual ~StepEditor ();
+ void step_entry_done ();
+
void check_step_edit ();
void step_edit_rest (Temporal::Beats beats);
void step_edit_beat_sync ();
@@ -82,10 +95,12 @@ private:
int8_t last_added_pitch;
Temporal::Beats last_added_end;
+ sigc::connection delete_connection;
+ sigc::connection hide_connection;
+
void region_removed (boost::weak_ptr<ARDOUR::Region>);
void playlist_changed ();
bool step_entry_hidden (GdkEventAny*);
- void step_entry_hide ();
void resync_step_edit_position ();
void prepare_step_edit_region ();
};