RouteDialog: Move built-in types into template list experiment
[ardour.git] / gtk2_ardour / editor_regions.h
index 6a37595bd33d925cb55589be2f5f408596c1ac24..3284259ed70d1ccba56a3f1fcb70372ae36f1b4c 100644 (file)
 #ifndef __gtk_ardour_editor_regions_h__
 #define __gtk_ardour_editor_regions_h__
 
-#include "editor_component.h"
 #include <boost/unordered_map.hpp>
 
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treerowreference.h>
+#include <gtkmm/treestore.h>
+
+#include "editor_component.h"
+
 class EditorRegions : public EditorComponent, public ARDOUR::SessionHandlePtr
 {
 public:
@@ -68,7 +74,7 @@ public:
                _display.get_selection()->unselect_all ();
        }
 
-       void delete_unused_regions();
+       void remove_unused_regions ();
 
        XMLNode& get_state () const;
        void set_state (const XMLNode &);
@@ -127,9 +133,9 @@ private:
 
        bool selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
 
-        Gtk::Widget* old_focus;
-        Gtk::CellEditable* name_editable;
-        void name_editing_started (Gtk::CellEditable*, const Glib::ustring&);
+       Gtk::Widget* old_focus;
+       Gtk::CellEditable* name_editable;
+       void name_editing_started (Gtk::CellEditable*, const Glib::ustring&);
 
        void name_edit (const std::string&, const std::string&);
        void locked_changed (std::string const &);
@@ -140,33 +146,33 @@ private:
        bool key_press (GdkEventKey *);
        bool button_press (GdkEventButton *);
 
-        bool focus_in (GdkEventFocus*);
-        bool focus_out (GdkEventFocus*);
-        bool enter_notify (GdkEventCrossing*);
-        bool leave_notify (GdkEventCrossing*);
+       bool focus_in (GdkEventFocus*);
+       bool focus_out (GdkEventFocus*);
+       bool enter_notify (GdkEventCrossing*);
+       bool leave_notify (GdkEventCrossing*);
 
        void show_context_menu (int button, int time);
 
        int sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
 
-        void format_position (ARDOUR::framepos_t pos, char* buf, size_t bufsize);
+       void format_position (ARDOUR::framepos_t pos, char* buf, size_t bufsize, bool onoff = true);
 
        void add_region (boost::shared_ptr<ARDOUR::Region>);
 
-       void populate_row (boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &);
-        void populate_row_used (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_position (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_end (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_sync (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_fade_in (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
-        void populate_row_fade_out (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
-        void populate_row_locked (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_muted (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_glued (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_opaque (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
-        void populate_row_length (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
-        void populate_row_name (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
-        void populate_row_source (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
+       void populate_row (boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &, PBD::PropertyChange const &);
+       void populate_row_used (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_position (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_end (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_sync (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_fade_in (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
+       void populate_row_fade_out (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used, boost::shared_ptr<ARDOUR::AudioRegion>);
+       void populate_row_locked (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_muted (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_glued (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_opaque (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row, uint32_t used);
+       void populate_row_length (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
+       void populate_row_name (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
+       void populate_row_source (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
 
        void update_row (boost::shared_ptr<ARDOUR::Region>);
        void update_all_rows ();
@@ -182,7 +188,7 @@ private:
 
        Glib::RefPtr<Gtk::Action> hide_action () const;
        Glib::RefPtr<Gtk::Action> show_action () const;
-       Glib::RefPtr<Gtk::Action> delete_unused_regions_action() const;
+       Glib::RefPtr<Gtk::Action> remove_unused_regions_action () const;
        Glib::RefPtr<Gtk::ToggleAction> toggle_full_action () const;
        Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action () const;
 
@@ -215,7 +221,7 @@ private:
        PBD::ScopedConnection editor_freeze_connection;
        PBD::ScopedConnection editor_thaw_connection;
 
-        bool expanded;
+       bool expanded;
 };
 
 #endif /* __gtk_ardour_editor_regions_h__ */