35 #include "text/frect.h"
36 #include "text/specialchars.h"
37 #include "sctextstruct.h"
39 #include "styles/charstyle.h"
40 #include "styles/paragraphstyle.h"
41 #include "desaxe/saxio.h"
86 virtual void saxx(
SaxHandler& handler,
const Xml_string& elemtag)
const;
89 int cursorPosition()
const;
90 void setCursorPosition(
int pos,
bool relative =
false);
91 void normalizeCursorPosition();
92 int normalizedCursorPosition();
98 int indexOf(
const QString &str,
int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive)
const;
99 int indexOf(QChar ch,
int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive)
const;
103 void insert(
const StoryText& other,
bool onlySelection =
false);
105 void insert(
int pos,
const StoryText& other,
bool onlySelection =
false);
107 void append(
const StoryText& other) { insert(length(), other,
false); }
109 void removeChars(
int pos, uint len);
113 void insertChars(QString txt,
bool applyNeighbourStyle =
false);
115 void insertChars(
int pos, QString txt,
bool applyNeighbourStyle =
false);
117 void insertObject(
int obj);
119 void insertObject(
int pos,
int obj);
121 void insertMark(
Mark*
Mark,
int pos = -1);
122 void replaceChar(
int pos, QChar ch);
124 int replaceWord(
int pos, QString newWord);
125 void replaceObject(
int pos,
int obj);
127 void hyphenateWord(
int pos, uint len,
char* hyphens);
136 QString plainText()
const;
141 QChar text(
int pos)
const;
143 QString text(
int pos, uint len)
const;
145 QString sentence(
int pos,
int &posn);
147 QString wordAt(
int pos)
const;
149 bool hasObject(
int pos)
const;
151 bool hasMark(
int pos,
Mark* mrk = NULL)
const;
152 Mark *mark(
int pos)
const;
153 void replaceMark(
int pos,
Mark* mrk);
158 const CharStyle& charStyle(
int pos)
const;
165 void setCharStyle(
int pos, uint len,
const CharStyle& style);
167 void applyCharStyle(
int pos, uint len,
const CharStyle& style);
168 void applyStyle(
int pos,
const ParagraphStyle& style,
bool rmDirectFormatting =
false);
169 void eraseCharStyle(
int pos, uint len,
const CharStyle& style);
171 void replaceStyles(QMap<QString,QString> newNameForOld);
172 void replaceCharStyles(QMap<QString,QString> newNameForOld);
176 void fixLegacyFormatting();
179 void fixLegacyFormatting(
int pos);
184 uint nrOfParagraphs()
const;
185 int startOfParagraph()
const;
186 int startOfParagraph(uint index)
const;
187 int endOfParagraph()
const;
188 int endOfParagraph(uint index)
const;
189 uint nrOfParagraph()
const;
190 uint nrOfParagraph(
int pos)
const;
192 uint nrOfRuns()
const;
193 int startOfRun(uint index)
const;
194 int endOfRun(uint index)
const;
197 int nextChar(
int pos);
198 int prevChar(
int pos);
200 int nextWord(
int pos);
201 int prevWord(
int pos);
202 int endOfWord(
int pos)
const;
203 int nextSentence(
int pos);
204 int prevSentence(
int pos);
205 int nextParagraph(
int pos);
206 int prevParagraph(
int pos);
221 void removeSelection();
222 void extendSelection(
int oldPos,
int newPos);
223 int selectWord(
int pos);
224 void select(
int pos, uint len,
bool on =
true);
225 bool selected(
int pos)
const;
226 int startOfSelection()
const;
227 int endOfSelection()
const;
228 int lengthOfSelection()
const;
235 LayoutFlags flags(
int pos)
const;
236 bool hasFlag(
int pos, LayoutFlags flag)
const;
237 void setFlag(
int pos, LayoutFlags flag);
238 void clearFlag(
int pos, LayoutFlags flag);
243 void invalidateObject(
const PageItem* embedded);
245 void invalidateLayout();
249 void invalidateAll();
255 ScText * item(uint index);
256 const ScText * item(uint index)
const;
271 int m_selFirst, m_selLast;
278 QString textWithSoftHyphens (
int pos, uint len)
const;
279 void insertCharsWithSoftHyphens(
int pos, QString txt,
bool applyNeighbourStyle =
false);
282 void invalidate(
int firstRun,
int lastRun);
283 void removeParSep(
int pos);
284 void insertParSep(
int pos);
Definition: storytext.h:71
Definition: charstyle.h:78
Definition: saxhandler.h:21
Definition: sctextstruct.h:109
Definition: paragraphstyle.h:27
virtual void saxx(SaxHandler &handler) const
Definition: storytext.h:87
the Document Class
Definition: scribusdoc.h:90
Definition: sctext_shared.h:17
static const Xml_string saxxDefaultElem
Definition: saxio.h:40
Definition: pageitem.h:92
static void desaxeRules(const Xml_string &, desaxe::Digester &, const Xml_string=saxxDefaultElem)
Definition: saxio.h:49
Definition: digester.h:100
virtual void saxx(SaxHandler &, const Xml_string &) const =0
Definition: resourcecollection.h:41
Definition: sctextstruct.h:54