23 #ifndef KSPELL_FILTER_H 24 #define KSPELL_FILTER_H 27 #include <kdelibs_export.h> 42 Word() : start( 0 ), end(
true )
45 Word(
const TQString& w,
int st,
bool e =
false )
46 : word( w ), start( st ), end( e )
49 : word( other.word ), start( other.start ),
68 static Filter *defaultFilter();
78 void setSettings( Settings* );
83 Settings *settings()
const;
87 void setBuffer(
const TQString& buffer );
88 TQString buffer()
const;
92 virtual Word nextWord()
const;
93 virtual Word previousWord()
const;
94 virtual Word wordAtPosition(
unsigned int pos )
const;
96 virtual void setCurrentPosition(
int );
97 virtual int currentPosition()
const;
98 virtual void replace(
const Word& w,
const TQString& newWord );
103 virtual TQString context()
const;
105 bool trySkipLinks()
const;
106 bool ignore(
const TQString& word )
const;
107 TQChar skipToLetter( uint &fromPosition )
const;
108 bool shouldBeSkipped(
bool wordWasUppercase,
bool wordWasRunTogether,
109 const TQString& foundWord )
const;
113 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.