Add missing snap-to actions to the main menu so that their keyboard accelerators...
[ardour.git] / gtk2_ardour / processor_box.h
index 6a9c1312adbbc7782ae73f396c097443cdf8308a..bd5f18b947dc432abb3b9b76ac3c0af1f2d75b8d 100644 (file)
@@ -106,13 +106,28 @@ public:
        Gtk::EventBox& action_widget ();
        Gtk::Widget& widget ();
        std::string drag_text () const;
+       void set_visual_state (Gtk::StateType);
+
+       enum Position {
+               PreFader,
+               Fader,
+               PostFader
+       };
+       
+       void set_position (Position);
        boost::shared_ptr<ARDOUR::Processor> processor () const;
        void set_enum_width (Width);
        virtual void set_pixel_width (int) {}
 
+       /** Hide any widgets that should be hidden */
+       virtual void hide_things () {}
+
 protected:
        
+       virtual void setup_visuals ();
+       
        Gtk::VBox _vbox;
+       Position _position;
        
 private:
 
@@ -120,13 +135,15 @@ private:
        void processor_active_changed ();
        void processor_property_changed (const PBD::PropertyChange&);
        std::string name () const;
-       
+
+       Gtk::Frame _frame;
        Gtk::EventBox _event_box;
        Gtk::Label _name;
        Gtk::HBox _hbox;
        Gtk::CheckButton _active;
        boost::shared_ptr<ARDOUR::Processor> _processor;
        Width _width;
+       Gtk::StateType _visual_state;
        PBD::ScopedConnection active_connection;
        PBD::ScopedConnection name_connection;
 };
@@ -154,6 +171,28 @@ private:
        static Glib::RefPtr<Gdk::Pixbuf> _slider;
 };
 
+class PluginInsertProcessorEntry : public ProcessorEntry
+{
+public:
+       PluginInsertProcessorEntry (boost::shared_ptr<ARDOUR::PluginInsert>, Width);
+
+       void hide_things ();
+       
+private:
+       void setup_visuals ();
+       void plugin_insert_splitting_changed ();
+
+       /* XXX: this seems a little ridiculous just for a simple scaleable icon */
+       class SplittingIcon : public Gtk::DrawingArea {
+       private:
+               bool on_expose_event (GdkEventExpose *);
+       };
+
+       boost::shared_ptr<ARDOUR::PluginInsert> _plugin_insert;
+       SplittingIcon _splitting_icon;
+       PBD::ScopedConnection _splitting_connection;
+};
+
 class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARDOUR::SessionHandlePtr
 {
   public:
@@ -172,6 +211,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
        void select_all_inserts ();
        void select_all_sends ();
 
+       void hide_things ();
+
        Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;
        void toggle_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
        
@@ -204,8 +245,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
 
        void selection_changed ();
 
-       Gtk::EventBox          processor_eventbox;
-       Gtk::HBox              processor_hpacker;
        Gtkmm2ext::DnDVBox<ProcessorEntry> processor_display;
        Gtk::ScrolledWindow    processor_scroller;
 
@@ -292,6 +331,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
        void weird_plugin_dialog (ARDOUR::Plugin& p, ARDOUR::Route::ProcessorStreams streams);
        void on_size_allocate (Gtk::Allocation &);
 
+       void setup_entry_positions ();
+       
        static ProcessorBox* _current_processor_box;
 
        static void rb_choose_aux (boost::weak_ptr<ARDOUR::Route>);