X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fregion_selection.h;h=5c05a813f9464127ad7ee5560a21fb4cb2c867d2;hb=76c25a4a4459b8e550c3c687458d04db0beaee77;hp=2192442cb0cbdf5ac0eb53435f1af27c5fdd3716;hpb=79986643c0c904f6574bb5323e2233a43a9e622e;p=ardour.git diff --git a/gtk2_ardour/region_selection.h b/gtk2_ardour/region_selection.h index 2192442cb0..5c05a813f9 100644 --- a/gtk2_ardour/region_selection.h +++ b/gtk2_ardour/region_selection.h @@ -29,11 +29,7 @@ using std::set; class RegionView; -struct RegionComparator { - bool operator() (const RegionView* a, const RegionView* b) const; -}; - -class RegionSelection : public set, public sigc::trackable +class RegionSelection : public std::list, public sigc::trackable { public: RegionSelection(); @@ -41,32 +37,34 @@ class RegionSelection : public set, public sigc:: RegionSelection& operator= (const RegionSelection&); - void add (RegionView*, bool dosort = true); + void add (RegionView*); bool remove (RegionView*); bool contains (RegionView*); + void sort_by_position_and_track (); void clear_all(); - jack_nframes_t start () const { + nframes_t start () const { return _current_start; } - /* collides with list<>::end */ + /* "end" collides with list<>::end */ - jack_nframes_t end_frame () const { + nframes_t end_frame () const { return _current_end; } - const list & by_layer() const { return _bylayer; } - void by_position (list&) const; + const std::list& by_layer() const { return _bylayer; } + void by_position (std::list&) const; + void by_track (std::list&) const; private: void remove_it (RegionView*); void add_to_layer (RegionView *); - jack_nframes_t _current_start; - jack_nframes_t _current_end; + nframes_t _current_start; + nframes_t _current_end; list _bylayer; };