0ce6bd9bf5
(that is most of the time when we are not concerned with displaying)
35 lines
788 B
C++
35 lines
788 B
C++
#ifndef highlighter_group_hh_INCLUDED
|
|
#define highlighter_group_hh_INCLUDED
|
|
|
|
#include "highlighter.hh"
|
|
#include "idvaluemap.hh"
|
|
|
|
namespace Kakoune
|
|
{
|
|
|
|
class DisplayBuffer;
|
|
class Window;
|
|
|
|
// HighlighterGroup is an highlighter which delegate to multiple
|
|
// other highlighters in order of insertion.
|
|
class HighlighterGroup
|
|
{
|
|
public:
|
|
void operator()(DisplayBuffer& display_buffer);
|
|
|
|
void append(HighlighterAndId&& highlighter);
|
|
void remove(const String& id);
|
|
|
|
HighlighterGroup& get_group(const String& id);
|
|
|
|
CandidateList complete_id(const String& prefix, ByteCount cursor_pos);
|
|
CandidateList complete_group_id(const String& prefix, ByteCount cursor_pos);
|
|
|
|
private:
|
|
idvaluemap<String, HighlighterFunc> m_highlighters;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // highlighter_group_hh_INCLUDED
|