fader+meter: update numeric display bg on style change
[ardour.git] / gtk2_ardour / time_axis_view.h
index b9cae8cb234120393ee4aef7511482fcb38baccf..21819586721ee6b6d147cef0e280f3385016df4c 100644 (file)
@@ -59,7 +59,7 @@ namespace Gtk {
 
 namespace ArdourCanvas {
        class Canvas;
-       class Group;
+       class Container;
        class Item;
 }
 
@@ -104,9 +104,8 @@ class TimeAxisView : public virtual AxisView
         virtual void enter_internal_edit_mode () {}
         virtual void leave_internal_edit_mode () {}
 
-       ArdourCanvas::Group* canvas_display () { return _canvas_display; }
-       ArdourCanvas::Group* canvas_background () { return _canvas_background; }
-       ArdourCanvas::Group* ghost_group () { return _ghost_group; }
+       ArdourCanvas::Container* canvas_display () { return _canvas_display; }
+       ArdourCanvas::Container* ghost_group () { return _ghost_group; }
 
        /** @return effective height (taking children into account) in canvas units, or
            0 if this TimeAxisView has not yet been shown */
@@ -125,8 +124,6 @@ class TimeAxisView : public virtual AxisView
        virtual guint32 show_at (double y, int& nth, Gtk::VBox *parent);
        virtual void hide ();
 
-       void clip_to_viewport ();
-
        bool touched (double top, double bot);
 
        /** @return true if hidden, otherwise false */
@@ -147,14 +144,15 @@ class TimeAxisView : public virtual AxisView
 
        virtual void reset_visual_state ();
 
-       std::pair<TimeAxisView*, double> covers_y_position (double);
+       std::pair<TimeAxisView*, double> covers_y_position (double) const;
+        bool covered_by_y_range (double y0, double y1) const;
 
        virtual void step_height (bool);
 
        virtual ARDOUR::RouteGroup* route_group() const { return 0; }
        virtual boost::shared_ptr<ARDOUR::Playlist> playlist() const { return boost::shared_ptr<ARDOUR::Playlist> (); }
 
-       virtual void set_frames_per_pixel (double);
+       virtual void set_samples_per_pixel (double);
        virtual void show_selection (TimeSelection&);
        virtual void hide_selection ();
        virtual void reshow_selection (TimeSelection&);
@@ -169,6 +167,8 @@ class TimeAxisView : public virtual AxisView
        virtual void set_selected_regionviews (RegionSelection&) {}
        virtual void set_selected_points (PointSelection&) {}
 
+       virtual void fade_range (TimeSelection&) {}
+
        virtual boost::shared_ptr<ARDOUR::Region> find_next_region (framepos_t /*pos*/, ARDOUR::RegionPoint, int32_t /*dir*/) {
                return boost::shared_ptr<ARDOUR::Region> ();
        }
@@ -203,10 +203,14 @@ class TimeAxisView : public virtual AxisView
        /* The Standard LHS Controls */
        Gtk::HBox              controls_hbox;
        Gtk::Table             controls_table;
+       Gtk::Table             name_table;
        Gtk::EventBox          controls_ebox;
        Gtk::VBox              controls_vbox;
+       Gtk::VBox              name_vbox;
        Gtk::VBox              time_axis_vbox;
+       Gtk::Frame              time_axis_frame;
        Gtk::HBox              name_hbox;
+       Gtk::HBox              top_hbox;
        Gtk::Label             name_label;
         bool                  _name_editing;
         uint32_t               height;  /* in canvas units */
@@ -214,14 +218,15 @@ class TimeAxisView : public virtual AxisView
        std::string            controls_base_selected_name;
        Gtk::Menu*             display_menu; /* The standard LHS Track control popup-menus */
        TimeAxisView*          parent;
-       ArdourCanvas::Group*   selection_group;
+       ArdourCanvas::Container*   selection_group;
+       ArdourCanvas::Container*  _ghost_group;
        std::list<GhostRegion*> ghosts;
        std::list<SelectionRect*> free_selection_rects;
        std::list<SelectionRect*> used_selection_rects;
        bool                  _hidden;
        bool                   in_destructor;
        Gtk::Menu*            _size_menu;
-       ArdourCanvas::Group*  _canvas_display;
+       ArdourCanvas::Container*  _canvas_display;
        double                _y_position;
        PublicEditor&         _editor;
 
@@ -281,14 +286,12 @@ class TimeAxisView : public virtual AxisView
        void build_size_menu ();
 
 private:
-       ArdourCanvas::Group* _canvas_background;
        Gtk::VBox*            control_parent;
        int                  _order;
        uint32_t             _effective_height;
        double               _resize_drag_start;
        GdkCursor*           _preresize_cursor;
        bool                 _have_preresize_cursor;
-       ArdourCanvas::Group* _ghost_group;
         bool                  _ebox_release_can_act;
 
        static uint32_t button_height;