diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-05 23:00:49 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-05 23:00:49 +0000 |
commit | f649d775bc4f1e8721214e81619099de46810783 (patch) | |
tree | 8d07557453dd81462f8963afe247234403fb557a /gtk2_ardour/canvas-note-event.h | |
parent | fb2ef7cb9a6d903181da3b1d4681dc3faa778d1a (diff) |
prevent trim cursors appearing, and prevent note trimming, when in a MIDI note that is too small on-screen. avoids silliness with trim cursors appearing while drawing small notes on screen, though really, it would nice to avoid them appearing ever in a note that was just added. not sure how to do that.
git-svn-id: svn://localhost/ardour2/branches/3.0@9077 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-note-event.h')
-rw-r--r-- | gtk2_ardour/canvas-note-event.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h index 191b9e2ad8..24e7c78834 100644 --- a/gtk2_ardour/canvas-note-event.h +++ b/gtk2_ardour/canvas-note-event.h @@ -95,10 +95,10 @@ class CanvasNoteEvent : virtual public sigc::trackable virtual void set_outline_color(uint32_t c) = 0; virtual void set_fill_color(uint32_t c) = 0; - virtual double x1() = 0; - virtual double y1() = 0; - virtual double x2() = 0; - virtual double y2() = 0; + virtual double x1() const = 0; + virtual double y1() const = 0; + virtual double x2() const = 0; + virtual double y2() const = 0; float mouse_x_fraction() const { return _mouse_x_fraction; } float mouse_y_fraction() const { return _mouse_y_fraction; } @@ -143,7 +143,8 @@ class CanvasNoteEvent : virtual public sigc::trackable static const uint32_t midi_channel_colors[16]; bool mouse_near_ends () const; - + bool big_enough_to_trim () const; + protected: enum State { None, Pressed, Dragging }; |