2011-11-29 23:37:20 +01:00
|
|
|
#ifndef highlighter_hh_INCLUDED
|
|
|
|
#define highlighter_hh_INCLUDED
|
|
|
|
|
2012-01-15 14:44:16 +01:00
|
|
|
#include <string>
|
2011-11-29 23:37:20 +01:00
|
|
|
#include <functional>
|
2012-01-15 14:44:16 +01:00
|
|
|
#include <vector>
|
2011-11-29 23:37:20 +01:00
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class DisplayBuffer;
|
|
|
|
|
2012-01-11 15:21:58 +01:00
|
|
|
// An Highlighter is a function which mutates a DisplayBuffer in order to
|
|
|
|
// change the visual representation of a file. It could be changing text
|
|
|
|
// color, adding information text (line numbering for example) or replacing
|
|
|
|
// buffer content (folding for example)
|
|
|
|
|
2011-11-29 23:37:20 +01:00
|
|
|
typedef std::function<void (DisplayBuffer& display_buffer)> HighlighterFunc;
|
|
|
|
typedef std::pair<std::string, HighlighterFunc> HighlighterAndId;
|
2012-01-15 14:44:16 +01:00
|
|
|
typedef std::vector<std::string> HighlighterParameters;
|
|
|
|
|
2011-11-29 23:37:20 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // highlighter_hh_INCLUDED
|