diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-11 02:30:56 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-11 02:30:56 +0000 |
commit | e545b222b9ff9bde402da247910db424a04c1d2e (patch) | |
tree | c8e6680773d31f02fec4019710625861d2900a23 /gtk2_ardour/editor.h | |
parent | ccebd73f6b5da1074a115d080c5ec90541fdda0c (diff) |
try to rationalize zoom/scroll ops for the canvas
git-svn-id: svn://localhost/ardour2/trunk@1305 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.h')
-rw-r--r-- | gtk2_ardour/editor.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 8ee9c45ed1..82f60e8d3d 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -332,11 +332,13 @@ class Editor : public PublicEditor bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; } void prepare_for_cleanup (); - void reposition_x_origin (nframes_t sample); - void maximise_editing_space(); void restore_editing_space(); + void reset_x_origin (nframes_t); + void reset_zoom (double); + void reposition_and_zoom (nframes_t, double); + protected: void map_transport_state (); void map_position_change (nframes_t); @@ -678,10 +680,31 @@ class Editor : public PublicEditor void tie_vertical_scrolling (); void canvas_horizontally_scrolled (); - void reposition_and_zoom (nframes_t sample, double fpu); - gint deferred_reposition_and_zoom (nframes_t sample, double fpu); + struct VisualChange { + enum Type { + TimeOrigin = 0x1, + ZoomLevel = 0x2 + }; + + Type pending; + nframes_t time_origin; + double frames_per_unit; + + int idle_handler_id; + + VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {} + }; + + + VisualChange pending_visual_change; + + static int _idle_visual_changer (void *arg); + int idle_visual_changer (); + + void queue_visual_change (nframes_t); + void queue_visual_change (double); + void end_location_changed (ARDOUR::Location*); - bool repos_zoom_queued; struct RegionListDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { RegionListDisplayModelColumns() { @@ -1798,7 +1821,6 @@ class Editor : public PublicEditor Glib::RefPtr<Gtk::Action> redo_action; void history_changed (); - }; #endif /* __ardour_editor_h__ */ |