class FuncStatus;
class Inset;
class InsetText;
-class Lexer;
class Paragraph;
class ParagraphParameters;
+namespace support { class Lexer; }
+
/// This class encapsulates the main text data and operations in LyX.
/// This is more or less the private implementation of InsetText.
class Text {
};
/// Increase or decrease the nesting depth of the selected paragraph(s)
/// FIXME: replace Cursor with DocIterator.
- void changeDepth(Cursor const & cur, DEPTH_CHANGE type);
+ void changeDepth(Cursor & cur, DEPTH_CHANGE type);
/// Returns whether something would be changed by changeDepth
/// FIXME: replace Cursor with DocIterator.
void forOutliner(docstring & os, size_t maxlen, pit_type start, pit_type end,
bool shorten = true) const;
- /// insert a character at cursor position
+ /// FIXME: investigate why those two function behave differently wrt cursor.
+ /// insert a character at cursor position and move cursor forward
/// FIXME: replace Cursor with DocIterator.
void insertChar(Cursor & cur, char_type c);
- /// insert an inset at cursor position
+ /// insert an inset at cursor position; do not move cursor
/// FIXME: replace Cursor with DocIterator.
- void insertInset(Cursor & cur, Inset * inset);
+ bool insertInset(Cursor & cur, Inset * inset);
/// try to handle that request
/// FIXME: replace Cursor with DocIterator.
void write(std::ostream & os) const;
/// returns true if \end_document has not been read
/// insetPtr is the containing Inset
- bool read(Lexer & lex, ErrorList & errorList,
+ bool read(support::Lexer & lex, ErrorList & errorList,
InsetText * insetPtr);
/// delete double spaces, leading spaces, and empty paragraphs around old cursor.
void pasteString(Cursor & cur, docstring const & str,
bool asParagraphs);
///
- void readParToken(Paragraph & par, Lexer & lex, std::string const & token,
+ void readParToken(Paragraph & par, support::Lexer & lex, std::string const & token,
Font & font, Change & change, ErrorList & errorList);
///
- void readParagraph(Paragraph & par, Lexer & lex, ErrorList & errorList);
+ void readParagraph(Paragraph & par, support::Lexer & lex, ErrorList & errorList);
/// Set Label Width string to all paragraphs of the same layout
/// and depth in a sequence.
void setLabelWidthStringToSequence(Cursor const & cur, docstring const & s);