summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_summary.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-06-18 00:05:44 +0000
committerCarl Hetherington <carl@carlh.net>2010-06-18 00:05:44 +0000
commita54f107d4f9106a1fe67357030086682f4d7151a (patch)
treec646f787f85f01227db2885404ec38ded06e2f22 /gtk2_ardour/editor_summary.h
parent6a634b9c72b0118efc2dd73a56836365b7517b01 (diff)
Make summary zoom happen based on where the drag is started, rather than
needing a modifier. Change mouse pointer shape in the summary to indicate what will happen on a drag. Allow vertical zoom in the summary, which modifies track heights accordingly. git-svn-id: svn://localhost/ardour2/branches/3.0@7275 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_summary.h')
-rw-r--r--gtk2_ardour/editor_summary.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h
index 3b18c51099..283cd63c02 100644
--- a/gtk2_ardour/editor_summary.h
+++ b/gtk2_ardour/editor_summary.h
@@ -42,6 +42,22 @@ public:
void set_overlays_dirty ();
private:
+
+ enum Position {
+ LEFT,
+ LEFT_TOP,
+ TOP,
+ RIGHT_TOP,
+ RIGHT,
+ RIGHT_BOTTOM,
+ BOTTOM,
+ LEFT_BOTTOM,
+ INSIDE,
+ BELOW_OR_ABOVE,
+ TO_LEFT_OR_RIGHT,
+ OTHERWISE_OUTSIDE
+ };
+
bool on_expose_event (GdkEventExpose *);
void on_size_request (Gtk::Requisition *);
bool on_button_press_event (GdkEventButton *);
@@ -54,9 +70,15 @@ private:
void render_region (RegionView*, cairo_t*, double) const;
void get_editor (std::pair<double, double> *, std::pair<double, double> *) const;
void set_editor (std::pair<double, double> const &, double);
+ void set_editor (std::pair<double, double> const &, std::pair<double, double> const &);
+ void set_editor_x (std::pair<double, double> const &);
+ void set_editor_y (double);
+ void set_editor_y (std::pair<double, double> const &);
void playhead_position_changed (nframes64_t);
double summary_y_to_editor (double) const;
double editor_y_to_summary (double) const;
+ Position get_position (double, double) const;
+ void set_cursor (Position);
nframes_t _start; ///< start frame of the overview
nframes_t _end; ///< end frame of the overview
@@ -72,19 +94,18 @@ private:
std::pair<double, double> _start_editor_y;
double _start_mouse_x;
double _start_mouse_y;
- enum {
- IN_VIEWBOX,
- BELOW_OR_ABOVE_VIEWBOX,
- TO_LEFT_OR_RIGHT_OF_VIEWBOX
- } _start_position;
+
+ Position _start_position;
bool _move_dragging;
- double _x_offset;
- double _y_offset;
bool _moved;
+ std::pair<double, double> _view_rectangle_x;
+ std::pair<double, double> _view_rectangle_y;
bool _zoom_dragging;
- bool _zoom_left;
+ Position _zoom_position;
+ std::pair<double, double> _pending_zoom_x;
+ std::pair<double, double> _pending_zoom_y;
PBD::ScopedConnectionList position_connection;
PBD::ScopedConnectionList region_property_connection;