add single-layer zoom toggle; add toggle-fade-active commands (& bindings for SAE...
[ardour.git] / gtk2_ardour / editor.h
index c434bc1de8802e778edee0ce64b31d9b5f676f97..63a19e0d3eb83bae62a7109737e8d73357187f41 100644 (file)
@@ -231,6 +231,7 @@ class Editor : public PublicEditor
        void select_all (Selection::Operation op);
        void invert_selection_in_track ();
        void invert_selection ();
+       void deselect_all ();
 
        /* tempo */
 
@@ -256,7 +257,7 @@ class Editor : public PublicEditor
 
        void      set_zoom_focus (Editing::ZoomFocus);
        Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
-       gdouble   get_current_zoom () { return frames_per_unit; }
+       double   get_current_zoom () const { return frames_per_unit; }
 
        void temporal_zoom_step (bool coarser);
 
@@ -264,8 +265,6 @@ class Editor : public PublicEditor
 
        PlaylistSelector& playlist_selector() const;
        void route_name_changed (TimeAxisView *);
-       gdouble        frames_per_unit;
-       nframes_t leftmost_frame;
        void clear_playlist (boost::shared_ptr<ARDOUR::Playlist>);
 
        void new_playlists (TimeAxisView*);
@@ -370,7 +369,22 @@ class Editor : public PublicEditor
 
        PlaylistSelector* _playlist_selector;
 
-       void          set_frames_per_unit (double);
+       struct VisualState {
+           double    frames_per_unit;
+           nframes_t leftmost_frame;
+           Editing::ZoomFocus zoom_focus;
+       };
+       
+       VisualState last_visual_state;
+
+       nframes_t   leftmost_frame;
+       double      frames_per_unit;
+       Editing::ZoomFocus zoom_focus;
+
+       void use_visual_state (const VisualState&);
+       void set_frames_per_unit (double);
+       void swap_visual_state ();
+       void post_zoom ();
 
        Editing::MouseMode mouse_mode;
 
@@ -989,9 +1003,8 @@ class Editor : public PublicEditor
        void play_location (ARDOUR::Location&);
        void loop_location (ARDOUR::Location&);
 
-       Editing::ZoomFocus zoom_focus;
-
        void temporal_zoom_selection ();
+       void temporal_zoom_region ();
        void temporal_zoom_session ();
        void temporal_zoom (gdouble scale);
        void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
@@ -1161,7 +1174,7 @@ class Editor : public PublicEditor
        void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
        
        void set_fade_length (bool in);
-
+       void toggle_fade_active (bool in);
        void set_fade_in_active (bool);
        void set_fade_out_active (bool);
        
@@ -1945,6 +1958,7 @@ class Editor : public PublicEditor
        Gtk::CheckMenuItem* region_opaque_item;
        
        bool on_key_press_event (GdkEventKey*);
+       bool on_key_release_event (GdkEventKey*);
 
        void session_state_saved (string);