2012-06-12 20:24:29 +02:00
|
|
|
#ifndef filter_group_hh_INCLUDED
|
|
|
|
#define filter_group_hh_INCLUDED
|
|
|
|
|
|
|
|
#include "filter.hh"
|
|
|
|
#include "idvaluemap.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
// FilterGroup is an filter which delegate to multiple
|
|
|
|
// other filters in order of insertion.
|
|
|
|
class FilterGroup
|
|
|
|
{
|
|
|
|
public:
|
2012-08-10 19:12:43 +02:00
|
|
|
void operator()(Buffer& buffer, BufferIterator& position, String& content);
|
2012-06-12 20:24:29 +02:00
|
|
|
|
|
|
|
void append(FilterAndId&& filter);
|
|
|
|
void remove(const String& id);
|
|
|
|
|
|
|
|
FilterGroup& get_group(const String& id);
|
|
|
|
|
2012-10-11 00:41:48 +02:00
|
|
|
CandidateList complete_id(const String& prefix, ByteCount cursor_pos);
|
|
|
|
CandidateList complete_group_id(const String& prefix, ByteCount cursor_pos);
|
2012-06-12 20:24:29 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
idvaluemap<String, FilterFunc> m_filters;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // filter_group_hh_INCLUDED
|