2012-01-19 21:37:29 +01:00
|
|
|
#ifndef highlighter_group_hh_INCLUDED
|
|
|
|
#define highlighter_group_hh_INCLUDED
|
|
|
|
|
|
|
|
#include "highlighter.hh"
|
|
|
|
#include "idvaluemap.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class DisplayBuffer;
|
|
|
|
class Window;
|
|
|
|
|
2012-06-12 20:24:29 +02:00
|
|
|
// HighlighterGroup is an highlighter which delegate to multiple
|
|
|
|
// other highlighters in order of insertion.
|
2012-01-19 21:37:29 +01:00
|
|
|
class HighlighterGroup
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void operator()(DisplayBuffer& display_buffer);
|
|
|
|
|
|
|
|
void append(HighlighterAndId&& highlighter);
|
2012-04-14 03:17:09 +02:00
|
|
|
void remove(const String& id);
|
2012-01-19 21:37:29 +01:00
|
|
|
|
2012-04-14 03:17:09 +02:00
|
|
|
HighlighterGroup& get_group(const String& id);
|
2012-01-19 21:37:29 +01:00
|
|
|
|
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-01-19 21:37:29 +01:00
|
|
|
|
|
|
|
private:
|
2012-04-14 03:17:09 +02:00
|
|
|
idvaluemap<String, HighlighterFunc> m_highlighters;
|
2012-01-19 21:37:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // highlighter_group_hh_INCLUDED
|