]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
layout file converter for layout files in old format
[lyx.git] / src / lyxtext.h
index 504366885db4df7b156e6f3dc7fde2815052aa9f..ab1362d932a490bb776bf9486e73a60ab910edec 100644 (file)
@@ -126,12 +126,12 @@ public:
                FuncStatus & status) const;
 
        /// access to out BufferView. This should go...
-//     BufferView * bv();
-       /// access to out BufferView. This should go...
        BufferView * bv() const;
 
-       /// access to individual paragraphs
-       Paragraph & getPar(pit_type par) const;
+       /// read-only access to individual paragraph
+       Paragraph const & getPar(pit_type pit) const { return pars_[pit]; }
+       /// read-write access to individual paragraph
+       Paragraph & getPar(pit_type pit) { return pars_[pit]; }
        // Returns the current font and depth as a message.
        std::string LyXText::currentState(LCursor & cur);
 
@@ -165,8 +165,7 @@ public:
        bool setCursor(LCursor & cur, pit_type par, pos_type pos,
                       bool setfont = true, bool boundary = false);
        ///
-       void setCursor(CursorSlice &, pit_type par,
-                      pos_type pos, bool boundary = false);
+       void setCursor(CursorSlice &, pit_type par, pos_type pos);
        ///
        void setCursorIntern(LCursor & cur, pit_type par,
                 pos_type pos, bool setfont = true, bool boundary = false);
@@ -177,8 +176,8 @@ public:
        void recUndo(pit_type first, pit_type last) const;
        ///
        void recUndo(pit_type first) const;
-       ///
-       void setCursorFromCoordinates(LCursor & cur, int x, int y);
+       /// returns true if par was empty and was removed
+       bool setCursorFromCoordinates(LCursor & cur, int x, int y);
        ///
        InsetBase * editXY(LCursor & cur, int x, int y);
        /// Move cursor one line up.
@@ -291,7 +290,8 @@ public:
        RowMetrics computeRowMetrics(pit_type pit, Row const & row) const;
 
        /// access to our paragraphs
-       ParagraphList & paragraphs() const;
+       ParagraphList const & paragraphs() const { return pars_; }
+       ParagraphList & paragraphs() { return pars_; }
        /// return true if this is the main text
        bool isMainText() const;