#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:
_display.get_selection()->unselect_all ();
}
- void delete_unused_regions();
+ void remove_unused_regions ();
XMLNode& get_state () const;
void set_state (const XMLNode &);
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 &);
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::samplepos_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 ();
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;
std::list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list;
- typedef boost::unordered_map<boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::RowReference> RegionRowMap;
+ typedef boost::unordered_map<boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::iterator> RegionRowMap;
typedef boost::unordered_map<std::string, Gtk::TreeModel::RowReference > RegionSourceMap;
RegionRowMap region_row_map;
PBD::ScopedConnection editor_freeze_connection;
PBD::ScopedConnection editor_thaw_connection;
- bool expanded;
+ bool expanded;
};
#endif /* __gtk_ardour_editor_regions_h__ */