]> git.lyx.org Git - lyx.git/blobdiff - src/Text.h
Amend 6c3447c8: FindAdv: sometimes a space is added on some math symbols
[lyx.git] / src / Text.h
index 45fb69c5be517ca2bcbe3d85353add72ad96370c..9ef9c9626054274cbc1f962c23bbbc790a87e5f5 100644 (file)
@@ -33,10 +33,11 @@ class FuncRequest;
 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 {
@@ -141,12 +142,13 @@ public:
        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.
@@ -298,7 +300,7 @@ public:
        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.
@@ -380,10 +382,10 @@ private:
        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);