23#ifndef __KATE_SEARCH_H__
24#define __KATE_SEARCH_H__
26#include "katecursor.h"
27#include "../interfaces/document.h"
29#include <kdialogbase.h>
33#include <tqstringlist.h>
34#include <tqvaluelist.h>
38class KateSuperRangeList;
42class KateSearch :
public TQObject
46 friend class KateDocument;
52 bool caseSensitive :1;
54 bool fromBeginning :1;
68 KateTextCursor cursor;
69 KateTextCursor wrappedEnd;
73 KateTextCursor selBegin;
74 KateTextCursor selEnd;
87 KateSearch( KateView* );
90 void createActions( TDEActionCollection* );
105 void find(
const TQString &pattern,
long flags,
bool add=
true,
bool shownotfound=
false );
115 void replace(
const TQString &pattern,
const TQString &replacement,
long flags );
116 void findAgain(
bool reverseDirection );
120 void slotFindNext() { findAgain(
false ); }
121 void slotFindPrev() { findAgain(
true ); }
124 static void addToList( TQStringList&,
const TQString& );
125 static void addToSearchList(
const TQString& s ) { addToList( s_searchList, s ); }
126 static void addToReplaceList(
const TQString& s ) { addToList( s_replaceList, s ); }
127 static TQStringList s_searchList;
128 static TQStringList s_replaceList;
129 static TQString s_pattern;
131 void search( SearchFlags flags );
136 void promptReplace();
141 TQString getSearchText();
142 KateTextCursor getCursor( SearchFlags flags );
143 bool doSearch(
const TQString& text );
144 void exposeFound( KateTextCursor &cursor,
int slen );
146 inline KateView* view() {
return m_view; }
147 inline KateDocument* doc() {
return m_doc; }
152 KateSuperRangeList* m_arbitraryHLList;
156 TQValueList<SConfig> m_searchResults;
160 TQDialog* replacePrompt;
161 TQString m_replacement;
215 void done (
int result);
221 SearchCommand() : m_ifindFlags(0) {;}
222 bool exec(
class Kate::View *view,
const TQString &cmd, TQString &errorMsg);
223 bool help(
class Kate::View *,
const TQString &, TQString &);
225 bool wantsToProcessText(
const TQString & );
226 void processText( Kate::View *view,
const TQString& text );
232 void ifindInit(
const TQString &cmd );
KDialogBase(TQWidget *parent=0, const char *name=0, bool modal=true, const TQString &caption=TQString::null, int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
void slotUser3()
Yes pressed.
void slotUser2()
last pressed
KateReplacePrompt(TQWidget *parent)
Constructor.
void done(int result)
dialog done
void slotClose()
close pressed
void slotUser1()
replace all pressed
void clicked()
button clicked
Extension to the Command interface, allowing to interact with commands during typing.
virtual TQStringList cmds()=0
Pure text start part of the commands which can be handled by this object which means i....