mutable LyXFont real_current_font;
/// first visible pixel-row is set from LyXScreen!!!
// unsigned is wrong here for text-insets!
mutable LyXFont real_current_font;
/// first visible pixel-row is set from LyXScreen!!!
// unsigned is wrong here for text-insets!
LyXFont const getLabelFont(Buffer const *, Paragraph * par) const;
///
void setCharFont(Buffer const *, Paragraph * par,
LyXFont const getLabelFont(Buffer const *, Paragraph * par) const;
///
void setCharFont(Buffer const *, Paragraph * par,
/// what you expect when pressing <enter> at cursor position
void breakParagraph(BufferView *, char keep_layout = 0);
/// what you expect when pressing <enter> at cursor position
void breakParagraph(BufferView *, char keep_layout = 0);
- LyXCursor & selection_start,
- LyXCursor & selection_end,
- lyx::layout_type layout);
+ LyXCursor & selection_start,
+ LyXCursor & selection_end,
+ string const & layout);
/** set font over selection and make a total rebreak of those
paragraphs.
toggleall defaults to false.
*/
void setFont(BufferView *, LyXFont const &, bool toggleall = false);
/** set font over selection and make a total rebreak of those
paragraphs.
toggleall defaults to false.
*/
void setFont(BufferView *, LyXFont const &, bool toggleall = false);
/** deletes and inserts again all paragaphs between the cursor
and the specified par. The Cursor is needed to set the refreshing
/** deletes and inserts again all paragaphs between the cursor
and the specified par. The Cursor is needed to set the refreshing
This function is needed after SetLayout and SetFont etc.
*/
void redoParagraphs(BufferView *, LyXCursor const & cursor,
Paragraph const * end_par) const;
///
void redoParagraph(BufferView *) const;
This function is needed after SetLayout and SetFont etc.
*/
void redoParagraphs(BufferView *, LyXCursor const & cursor,
Paragraph const * end_par) const;
///
void redoParagraph(BufferView *) const;
///
void toggleFree(BufferView *, LyXFont const &, bool toggleall = false);
///
string getStringToIndex(BufferView *);
///
void toggleFree(BufferView *, LyXFont const &, bool toggleall = false);
///
string getStringToIndex(BufferView *);
/** recalculates the heights of all previous rows of the
specified paragraph. needed, if the last characters font
/** recalculates the heights of all previous rows of the
specified paragraph. needed, if the last characters font
same Paragraph one to the right and make a little rebreak
*/
void insertChar(BufferView *, char c);
///
void insertInset(BufferView *, Inset * inset);
same Paragraph one to the right and make a little rebreak
*/
void insertChar(BufferView *, char c);
///
void insertInset(BufferView *, Inset * inset);
/** Completes the insertion with a full rebreak.
Returns true if something was broken. */
bool fullRebreak(BufferView *);
/** Completes the insertion with a full rebreak.
Returns true if something was broken. */
bool fullRebreak(BufferView *);
/** wether the screen needs a refresh,
starting with refresh_y
*/
mutable text_status status_;
/** wether the screen needs a refresh,
starting with refresh_y
*/
mutable text_status status_;
public:
/** returns a pointer to the row near the specified y-coordinate
(relative to the whole text). y is set to the real beginning
of this row
public:
/** returns a pointer to the row near the specified y-coordinate
(relative to the whole text). y is set to the real beginning
of this row
lyx::pos_type getColumnNearX(BufferView *, Row * row,
int & x, bool & boundary) const;
lyx::pos_type getColumnNearX(BufferView *, Row * row,
int & x, bool & boundary) const;
/** returns the height of a default row, needed for scrollbar
*/
int defaultHeight() const;
/** returns the height of a default row, needed for scrollbar
*/
int defaultHeight() const;
/** The cursor.
Later this variable has to be removed. There should be now internal
cursor in a text (and thus not in a buffer). By keeping this it is
/** The cursor.
Later this variable has to be removed. There should be now internal
cursor in a text (and thus not in a buffer). By keeping this it is
LyXCursor start; // start of a REAL selection
LyXCursor end; // end of a REAL selection
private:
bool set_; // former selection
bool mark_; // former mark_set
LyXCursor start; // start of a REAL selection
LyXCursor end; // end of a REAL selection
private:
bool set_; // former selection
bool mark_; // former mark_set
/// needed for toggling the selection in screen.C
mutable LyXCursor toggle_cursor;
/// needed for toggling the selection in screen.C
mutable LyXCursor toggle_end_cursor;
/// needed for toggling the selection in screen.C
mutable LyXCursor toggle_cursor;
/// needed for toggling the selection in screen.C
mutable LyXCursor toggle_end_cursor;
/// need the selection cursor:
void setSelection(BufferView *);
///
void clearSelection() const;
///
string const selectionAsString(Buffer const *, bool label) const;
/// need the selection cursor:
void setSelection(BufferView *);
///
void clearSelection() const;
///
string const selectionAsString(Buffer const *, bool label) const;
word_location const) const;
/// just selects the word the cursor is in
void selectWord(BufferView *, word_location const);
/// returns the inset at cursor (if it exists), 0 otherwise
Inset * getInset() const;
word_location const) const;
/// just selects the word the cursor is in
void selectWord(BufferView *, word_location const);
/// returns the inset at cursor (if it exists), 0 otherwise
Inset * getInset() const;
- /** 'selects" the next word, where the cursor is not in
- and returns this word as string. THe cursor will be moved
- to the beginning of this word.
+ /** 'selects" the next word, where the cursor is not in
+ and returns this word as string. THe cursor will be moved
+ to the beginning of this word.
string const selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
string const selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
/** returns a printed row in a pixmap. The y value is needed to
decide, wether it is selected text or not. This is a strange
solution but faster.
/** returns a printed row in a pixmap. The y value is needed to
decide, wether it is selected text or not. This is a strange
solution but faster.
void getVisibleRow(BufferView *, int y_offset, int x_offset,
Row * row_ptr, int y, bool cleared=false);
void getVisibleRow(BufferView *, int y_offset, int x_offset,
Row * row_ptr, int y, bool cleared=false);
void toggleInset(BufferView *);
///
void cutSelection(BufferView *, bool doclear = true, bool realcut = true);
void toggleInset(BufferView *);
///
void cutSelection(BufferView *, bool doclear = true, bool realcut = true);
/** the DTP switches for paragraphs. LyX will store the top settings
always in the first physical paragraph, the bottom settings in the
/** the DTP switches for paragraphs. LyX will store the top settings
always in the first physical paragraph, the bottom settings in the
settings are given to the new one. So I can make shure, they do not
duplicate themself (and you cannnot make dirty things with them! )
settings are given to the new one. So I can make shure, they do not
duplicate themself (and you cannnot make dirty things with them! )
void setParagraph(BufferView *,
bool line_top, bool line_bottom,
bool pagebreak_top, bool pagebreak_bottom,
VSpace const & space_top,
VSpace const & space_bottom,
Spacing const & spacing,
void setParagraph(BufferView *,
bool line_top, bool line_bottom,
bool pagebreak_top, bool pagebreak_bottom,
VSpace const & space_top,
VSpace const & space_bottom,
Spacing const & spacing,
/// returns false if inset wasn't found
bool updateInset(BufferView *, Inset *);
///
/// returns false if inset wasn't found
bool updateInset(BufferView *, Inset *);
///
Asger has learned that this should be a buffer-property instead
Lgb has learned that 'char' is a lousy type for non-characters
*/
Asger has learned that this should be a buffer-property instead
Lgb has learned that 'char' is a lousy type for non-characters
*/
/** inserts a new row behind the specified row, increments
the touched counters */
void insertRow(Row * row, Paragraph * par, lyx::pos_type pos) const;
/** inserts a new row behind the specified row, increments
the touched counters */
void insertRow(Row * row, Paragraph * par, lyx::pos_type pos) const;
/** appends the implizit specified paragraph behind the specified row,
* start at the implizit given position */
void appendParagraph(BufferView *, Row * row) const;
/** appends the implizit specified paragraph behind the specified row,
* start at the implizit given position */
void appendParagraph(BufferView *, Row * row) const;
void setHeightOfRow(BufferView *, Row * row_ptr) const;
/** this calculates the specified parameters. needed when setting
void setHeightOfRow(BufferView *, Row * row_ptr) const;
/** this calculates the specified parameters. needed when setting
void prepareToPrint(BufferView *, Row * row, float & x,
void prepareToPrint(BufferView *, Row * row, float & x,
void paintRowSelection(DrawRowParams & p);
/// paint appendix marker
void paintRowAppendix(DrawRowParams & p);
void paintRowSelection(DrawRowParams & p);
/// paint appendix marker
void paintRowAppendix(DrawRowParams & p);
/// get the on-screen size of the length marker
int getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const;
/// get the on-screen size of the length marker
int getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const;
/// paint an added space marker
int drawLengthMarker(DrawRowParams & p, string const & str,
/// paint an added space marker
int drawLengthMarker(DrawRowParams & p, string const & str,
// fix the cursor `cur' after a characters has been deleted at `where'
// position. Called by deleteEmptyParagraphMechanism
void fixCursorAfterDelete(BufferView * bview,
LyXCursor & cur,
LyXCursor const & where) const;
// fix the cursor `cur' after a characters has been deleted at `where'
// position. Called by deleteEmptyParagraphMechanism
void fixCursorAfterDelete(BufferView * bview,
LyXCursor & cur,
LyXCursor const & where) const;
bool deleteEmptyParagraphMechanism(BufferView *,
LyXCursor const & old_cursor) const;
public:
/** Updates all counters starting BEHIND the row. Changed paragraphs
bool deleteEmptyParagraphMechanism(BufferView *,
LyXCursor const & old_cursor) const;
public:
/** Updates all counters starting BEHIND the row. Changed paragraphs
void updateCounters(BufferView *, Row * row) const;
private:
///
void setCounter(Buffer const *, Paragraph * par) const;
void updateCounters(BufferView *, Row * row) const;
private:
///
void setCounter(Buffer const *, Paragraph * par) const;
///
int singleWidth(BufferView *, Paragraph * par,
lyx::pos_type pos) const;
///
int singleWidth(BufferView *, Paragraph * par,
lyx::pos_type pos) const;
int singleWidth(BufferView *, Paragraph * par,
lyx::pos_type pos, char c) const;
int singleWidth(BufferView *, Paragraph * par,
lyx::pos_type pos, char c) const;
/// draw normal chars
void drawChars(DrawRowParams & p, lyx::pos_type & vpos,
bool hebrew, bool arabic);
/// draw normal chars
void drawChars(DrawRowParams & p, lyx::pos_type & vpos,
bool hebrew, bool arabic);
void drawHebrewComposeChar(DrawRowParams & p, lyx::pos_type & vpos);
/// draw a mark for foreign language, starting from orig_x
void drawForeignMark(DrawRowParams & p, float const orig_x, LyXFont const & orig_font);
void drawHebrewComposeChar(DrawRowParams & p, lyx::pos_type & vpos);
/// draw a mark for foreign language, starting from orig_x
void drawForeignMark(DrawRowParams & p, float const orig_x, LyXFont const & orig_font);
void drawInset(DrawRowParams & p, lyx::pos_type const pos);
/// draw new line marker
void drawNewline(DrawRowParams & p, lyx::pos_type const pos);
void drawInset(DrawRowParams & p, lyx::pos_type const pos);
/// draw new line marker
void drawNewline(DrawRowParams & p, lyx::pos_type const pos);
lyx::pos_type nextBreakPoint(BufferView *, Row const * row, int width) const;
/// returns the minimum space a row needs on the screen in pixel
int fill(BufferView *, Row * row, int workwidth) const;
lyx::pos_type nextBreakPoint(BufferView *, Row const * row, int width) const;
/// returns the minimum space a row needs on the screen in pixel
int fill(BufferView *, Row * row, int workwidth) const;
int labelFill(BufferView *, Row const * row) const;
///
lyx::pos_type beginningOfMainBody(Buffer const *, Paragraph const * par) const;
int labelFill(BufferView *, Row const * row) const;
///
lyx::pos_type beginningOfMainBody(Buffer const *, Paragraph const * par) const;
/** Returns the left beginning of the text.
This information cannot be taken from the layouts-objekt, because
in LaTeX the beginning of the text fits in some cases
/** Returns the left beginning of the text.
This information cannot be taken from the layouts-objekt, because
in LaTeX the beginning of the text fits in some cases
/** returns the number of separators in the specified row.
The separator on the very last column doesnt count
/** returns the number of separators in the specified row.
The separator on the very last column doesnt count
int numberOfSeparators(Buffer const *, Row const * row) const;
/** returns the number of hfills in the specified row. The
int numberOfSeparators(Buffer const *, Row const * row) const;
/** returns the number of hfills in the specified row. The
more usefull than not to ignore!
*/
int numberOfHfills(Buffer const *, Row const * row) const;
more usefull than not to ignore!
*/
int numberOfHfills(Buffer const *, Row const * row) const;
/// like NumberOfHfills, but only those in the manual label!
int numberOfLabelHfills(Buffer const *, Row const * row) const;
/// like NumberOfHfills, but only those in the manual label!
int numberOfLabelHfills(Buffer const *, Row const * row) const;
LaTeX
*/
bool hfillExpansion(Buffer const *, Row const * row_ptr,
lyx::pos_type pos) const;
LaTeX
*/
bool hfillExpansion(Buffer const *, Row const * row_ptr,
lyx::pos_type pos) const;
unsigned char transformChar(unsigned char c, Paragraph * par,
lyx::pos_type pos) const;
unsigned char transformChar(unsigned char c, Paragraph * par,
lyx::pos_type pos) const;