2011-12-02 15:28:27 +01:00
|
|
|
#ifndef filter_hh_INCLUDED
|
|
|
|
#define filter_hh_INCLUDED
|
|
|
|
|
2012-04-14 03:17:09 +02:00
|
|
|
#include "string.hh"
|
2012-11-19 13:40:23 +01:00
|
|
|
#include "selection.hh"
|
2011-12-02 15:28:27 +01:00
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class Buffer;
|
2012-08-10 19:12:43 +02:00
|
|
|
class BufferIterator;
|
2011-12-02 15:28:27 +01:00
|
|
|
|
2012-01-11 15:21:58 +01:00
|
|
|
// A Filter is a function which is applied to a Buffer and a pending
|
|
|
|
// Modification in order to mutate the Buffer or the Modification
|
|
|
|
// prior to it's application.
|
|
|
|
|
2012-11-19 13:40:23 +01:00
|
|
|
using FilterFunc = std::function<void (Buffer& buffer, Selection& selection, String& content)>;
|
|
|
|
using FilterAndId = std::pair<String, FilterFunc>;
|
2011-12-02 15:28:27 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // filter_hh_INCLUDED
|