class BufferParams;
class BufferView;
class CursorSlice;
+class DocIterator;
class ErrorList;
-class InsetBase;
-class InsetBase_code;
class FuncRequest;
class FuncStatus;
+class InsetBase;
class LColor_color;
class LCursor;
class LyXTextClass;
/// 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);
/// 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
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
/**
bool boundary) const;
/// delete double space or empty paragraphs around old cursor
- /// FIXME: replace LCursor with DocIterator.
- bool deleteEmptyParagraphMechanism(LCursor & cur, LCursor & old);
-
- /// 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);
+ /// FIXME: replace LCursor with DocIterator. This is not possible right
+ /// now because recordUndo() is called which needs a LCursor.
+ bool deleteEmptyParagraphMechanism(LCursor & cur,
+ LCursor & old, bool & need_anchor_change);
public:
/// the current font settings
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 string at current cursor.
+ /// \param str string to paste
+ /// \param argument method for parsing ("paragraph" is special)
+ void pasteString(LCursor & cur, docstring const & str,
+ docstring const & argument);
};
} // namespace lyx