*/
int anchor_row_offset_;
public:
+ /// update all cached row positions
+ void updateRowPositions();
/// get the y coord. of the top of the screen (relative to doc start)
int top_y() const;
/// set the y coord. of the top of the screen (relative to doc start)
///
int getRealCursorX() const;
///
- LyXFont const getFont(Buffer const *, Paragraph * par,
+ LyXFont const getFont(Buffer const *, ParagraphList::iterator pit,
lyx::pos_type pos) const;
///
- LyXFont const getLayoutFont(Buffer const *, Paragraph * par) const;
+ LyXFont const getLayoutFont(Buffer const *,
+ ParagraphList::iterator pit) const;
///
- LyXFont const getLabelFont(Buffer const *, Paragraph * par) const;
+ LyXFont const getLabelFont(Buffer const *,
+ ParagraphList::iterator pit) const;
///
- void setCharFont(Buffer const *, Paragraph * par,
+ void setCharFont(Buffer const *, ParagraphList::iterator pit,
lyx::pos_type pos, LyXFont const & font);
- void setCharFont(Paragraph * par,
- lyx::pos_type pos, LyXFont const & font, bool toggleall);
+ void setCharFont(ParagraphList::iterator pit,
+ lyx::pos_type pos,
+ LyXFont const & font, bool toggleall);
///
void breakAgainOneRow(RowList::iterator rit);
/** set layout over selection and make a total rebreak of
those paragraphs
*/
- Paragraph * setLayout(LyXCursor & actual_cursor,
- LyXCursor & selection_start,
- LyXCursor & selection_end,
- string const & layout);
+ ParagraphList::iterator
+ setLayout(LyXCursor & actual_cursor,
+ LyXCursor & selection_start,
+ LyXCursor & selection_end,
+ string const & layout);
///
void setLayout(string const & layout);
This function is needed after SetLayout and SetFont etc.
*/
void redoParagraphs(LyXCursor const & cursor,
- Paragraph const * end_par);
+ ParagraphList::iterator endpit);
///
void redoParagraph();
of the row
*/
RowList::iterator
- getRow(Paragraph * par, lyx::pos_type pos, int & y) const;
+ getRow(ParagraphList::iterator pit, lyx::pos_type pos, int & y) const;
RowList & rows() const {
return rowlist_;
void setCurrentFont();
///
- bool isBoundary(Buffer const *, Paragraph * par,
+ bool isBoundary(Buffer const *, Paragraph const & par,
lyx::pos_type pos) const;
///
- bool isBoundary(Buffer const *, Paragraph * par,
+ bool isBoundary(Buffer const *, Paragraph const & par,
lyx::pos_type pos,
LyXFont const & font) const;
///
void copySelection();
///
- void pasteSelection();
- ///
- void copyEnvironmentType();
- ///
- void pasteEnvironmentType();
+ void pasteSelection(size_t sel_index = 0);
/** the DTP switches for paragraphs. LyX will store the top settings
always in the first physical paragraph, the bottom settings in the
/// returns false if inset wasn't found
bool updateInset(Inset *);
///
- void checkParagraph(Paragraph * par, lyx::pos_type pos);
+ void checkParagraph(ParagraphList::iterator pit, lyx::pos_type pos);
///
int workWidth() const;
- ///
- int workWidth(Inset * inset) const;
+ /// returns width of row containing inset
+ int workWidth(Inset const * inset) const;
///
void computeBidiTables(Buffer const *, RowList::iterator row) const;
*/
void redoDrawingOfParagraph(LyXCursor const & cursor);
- /** Copybuffer for copy environment type.
- Asger has learned that this should be a buffer-property instead
- Lgb has learned that 'char' is a lousy type for non-characters
- */
- string copylayouttype;
-
/// removes the row and reset the touched counters
void removeRow(RowList::iterator rit);
void removeParagraph(RowList::iterator rit);
/// insert the specified paragraph behind the specified row
- void insertParagraph(Paragraph * par, RowList::iterator rowit);
+ void insertParagraph(ParagraphList::iterator pit,
+ RowList::iterator rowit);
/** appends the implizit specified paragraph behind the specified row,
* start at the implizit given position */
Inset * checkInsetHit(int & x, int & y);
///
- int singleWidth(Paragraph * par,
+ int singleWidth(ParagraphList::iterator pit,
lyx::pos_type pos) const;
///
- int singleWidth(Paragraph * par,
+ int singleWidth(ParagraphList::iterator pit,
lyx::pos_type pos, char c) const;
/// return the color of the canvas
///
mutable bool bidi_same_direction;
- unsigned char transformChar(unsigned char c, Paragraph * par,
+ unsigned char transformChar(unsigned char c, Paragraph const & par,
lyx::pos_type pos) const;
/**
private:
///
- void setCounter(Buffer const *, Paragraph * par);
+ void setCounter(Buffer const *, ParagraphList::iterator pit);
///
void deleteWordForward();
///
// special owner functions
///
ParagraphList & ownerParagraphs() const;
- //
- void ownerParagraph(Paragraph *) const;
- // set it searching first for the right owner using the paragraph id
- void ownerParagraph(int id, Paragraph *) const;
/// return true if this is owned by an inset.
bool isInInset() const;