]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
Delay bibfileCache first update up until it is used.
[lyx.git] / src / lyxtext.h
index b1a7f71f5890897a218b31d0bb6e0aa4f5c6566e..9a03033cf96d49ff0d23729887ad2876e2942a6f 100644 (file)
@@ -94,11 +94,6 @@ public:
        /// FIXME: replace LCursor with DocIterator.
        void setFont(LCursor & cur, LyXFont const &, bool toggleall = false);
 
-       /// returns pos in given par at given x coord.
-       /// FIXME: move to TextMetrics.
-       pos_type x2pos(BufferView const &, pit_type pit, int row, int x) const;
-       int pos2x(pit_type pit, pos_type pos) const;
-
        ///
        void toggleFree(LCursor & cur, LyXFont const &, bool toggleall = false);
 
@@ -149,13 +144,6 @@ public:
        /// FIXME: move to TextMetrics.
        pit_type getPitNearY(BufferView & bv, int y);
 
-       /** returns the column near the specified x-coordinate of the row
-        x is set to the real beginning of this column
-        */
-       /// FIXME: move to TextMetrics.
-       pos_type getColumnNearX(BufferView const & bv, int right_margin,
-               pit_type pit, Row const & row, int & x, bool & boundary) const;
-
        /** Find the word under \c from in the relative location
         *  defined by \c word_location.
         *  @param from return here the start of the word
@@ -185,8 +173,10 @@ public:
        void recUndo(LCursor & cur, pit_type first, pit_type last) const;
        ///
        void recUndo(LCursor & cur, pit_type first) const;
-       /// returns true if par was empty and was removed
-       bool setCursorFromCoordinates(LCursor & cur, int x, int y);
+
+       /// sets cursor only within this LyXText.
+       /// x,y are screen coordinates
+       void setCursorFromCoordinates(LCursor & cur, int x, int y);
 
        /// sets cursor recursively descending into nested editable insets
        /**
@@ -354,20 +344,6 @@ public:
        bool deleteEmptyParagraphMechanism(LCursor & cur,
                LCursor & old, bool & need_anchor_change);
 
-       /// sets row.end to the pos value *after* which a row should break.
-       /// for example, the pos after which isNewLine(pos) == true
-       /// FIXME: move to TextMetrics.
-       void rowBreakPoint(Buffer const &, int right_margin, int max_width, pit_type pit,
-               Row & row) const;
-       /// sets row.width to the minimum space a row needs on the screen in pixel
-       /// FIXME: move to TextMetrics.
-       void setRowWidth(Buffer const &, int right_margin, int max_width, pit_type pit,
-               Row & row) const;
-
-       /// Calculate and set the height of the row
-       /// FIXME: move to TextMetrics.
-       void setHeightOfRow(BufferView const &, pit_type, Row & row);
-
 public:
        /// the current font settings
        LyXFont current_font;
@@ -406,14 +382,16 @@ private:
        void deleteWordBackward(LCursor & cur);
        ///
        void deleteLineForward(LCursor & cur);
-
-       /// FIXME
-       int labelEnd(Buffer const &, int max_width, pit_type pit) const;
-
        ///
        void charInserted();
        /// set 'number' font property
        void number(LCursor & cur);
+
+       /// paste plain text at current cursor.
+       /// \param str string to paste
+       /// \param asParagraphs whether to paste as paragraphs or as lines
+       void pasteString(LCursor & cur, docstring const & str,
+                       bool asParagraphs);
 };
 
 } // namespace lyx