18 #ifndef _KATE_TEMPLATE_HANDLER_H_
19 #define _KATE_TEMPLATE_HANDLER_H_
21 #include "katesupercursor.h"
22 #include "katekeyinterceptorfunctor.h"
26 #include <tqptrlist.h>
31 class KateTemplateHandler:
public TQObject,
public KateKeyInterceptorFunctor {
34 KateTemplateHandler(KateDocument *doc,uint line,uint column,
const TQString &templateString,
const TQMap<TQString,TQString> &initialValues);
35 virtual ~KateTemplateHandler();
36 inline bool initOk() {
return m_initOk;}
37 virtual bool operator()(
KKey key);
39 struct KateTemplatePlaceHolder {
40 KateSuperRangeList ranges;
44 class KateTemplateHandlerPlaceHolderInfo{
46 KateTemplateHandlerPlaceHolderInfo():begin(0),len(0),placeholder(
""){};
47 KateTemplateHandlerPlaceHolderInfo(uint begin_,uint len_,
const TQString& placeholder_):begin(begin_),len(len_),placeholder(placeholder_){}
52 class KateSuperRangeList *m_ranges;
53 class KateDocument *m_doc;
54 TQPtrList<KateTemplatePlaceHolder> m_tabOrder;
55 TQDict<KateTemplatePlaceHolder> m_dict;
56 void generateRangeTable(uint insertLine,uint insertCol,
const TQString& insertString,
const TQValueList<KateTemplateHandlerPlaceHolderInfo> &buildList);
63 void slotTextInserted(
int,
int);
64 void slotDocumentDestroyed();
65 void slotAboutToRemoveText(
const KateTextRange &range);
66 void slotTextRemoved();
Represents a range of text, from the start() to the end().
Simple cursor class with no document pointer.