2012-12-11 19:51:59 +01:00
|
|
|
#ifndef dynamic_selection_list_hh_INCLUDED
|
|
|
|
#define dynamic_selection_list_hh_INCLUDED
|
|
|
|
|
|
|
|
#include "selection.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
2013-03-31 13:49:56 +02:00
|
|
|
class DynamicSelectionList : public SelectionList,
|
|
|
|
public BufferChangeListener_AutoRegister
|
2012-12-11 19:51:59 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
using iterator = SelectionList::iterator;
|
|
|
|
using const_iterator = SelectionList::const_iterator;
|
|
|
|
|
|
|
|
DynamicSelectionList(const Buffer& buffer, SelectionList selections = {});
|
|
|
|
|
2012-12-12 14:21:50 +01:00
|
|
|
DynamicSelectionList& operator=(SelectionList selections);
|
|
|
|
void check_invariant() const;
|
2012-12-11 19:51:59 +01:00
|
|
|
|
|
|
|
private:
|
2013-07-26 00:44:00 +02:00
|
|
|
void on_insert(const Buffer& buffer, BufferCoord begin, BufferCoord end) override;
|
|
|
|
void on_erase(const Buffer& buffer, BufferCoord begin, BufferCoord end) override;
|
2012-12-11 19:51:59 +01:00
|
|
|
};
|
|
|
|
|
2013-04-03 19:20:38 +02:00
|
|
|
}
|
2012-12-11 19:51:59 +01:00
|
|
|
|
|
|
|
#endif // dynamic_selection_list_hh_INCLUDED
|
|
|
|
|