22 #ifndef TDESPELL_FILTER_H
23 #define TDESPELL_FILTER_H
26 #include <tdelibs_export.h>
41 Word() : start( 0 ), end(
true )
44 Word(
const TQString& w,
int st,
bool e =
false )
45 : word( w ), start( st ), end( e )
48 : word( other.word ), start( other.start ),
67 static Filter *defaultFilter();
77 void setSettings( Settings* );
82 Settings *settings()
const;
86 void setBuffer(
const TQString& buffer );
87 TQString buffer()
const;
91 virtual Word nextWord()
const;
92 virtual Word previousWord()
const;
93 virtual Word wordAtPosition(
unsigned int pos )
const;
95 virtual void setCurrentPosition(
int );
96 virtual int currentPosition()
const;
97 virtual void replace(
const Word& w,
const TQString& newWord );
102 virtual TQString context()
const;
104 bool trySkipLinks()
const;
105 bool ignore(
const TQString& word )
const;
106 TQChar skipToLetter( uint &fromPosition )
const;
107 bool shouldBeSkipped(
bool wordWasUppercase,
bool wordWasRunTogether,
108 const TQString& foundWord )
const;
112 mutable uint m_currentPosition;
Filter is used to split text into words which will be spell checked.
Structure abstracts the word and its position in the parent text.