X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText.h;h=5ab0864d7f9f7831116124210e058cded51ec039;hb=d8993d2d6cfaf401af47a3c6cc40f4c3e7dfde52;hp=edc2524a66179fb6d103fdc35adb96b91ce3c703;hpb=7930b9e5b6b3796eba60ccfa474a772b1ccf9248;p=lyx.git diff --git a/src/Text.h b/src/Text.h index edc2524a66..5ab0864d7f 100644 --- a/src/Text.h +++ b/src/Text.h @@ -165,7 +165,7 @@ public: /// just selects the word the cursor is in void selectWord(Cursor & cur, word_location loc); - /// what type of change operation to make + /// what type of change operation to make enum ChangeOp { ACCEPT, REJECT @@ -207,19 +207,7 @@ public: /// FIXME: cleanup to use BufferView::getCoveringInset() and /// setCursorFromCoordinates() instead of checkInsetHit(). Inset * editXY(Cursor & cur, int x, int y); - - /// Move cursor one line up. - /** - * Returns true if an update is needed after the move. - */ - /// FIXME: move to TextMetrics. - bool cursorUp(Cursor & cur); - /// Move cursor one line down. - /** - * Returns true if an update is needed after the move. - */ - /// FIXME: move to TextMetrics. - bool cursorDown(Cursor & cur); + /// Move cursor one position left /** * Returns true if an update is needed after the move. @@ -345,6 +333,15 @@ public: docstring getPossibleLabel(Cursor & cur) const; /// is this paragraph right-to-left? bool isRTL(Buffer const &, Paragraph const & par) const; + /// is this position in the paragraph right-to-left? + bool isRTL(Buffer const & buffer, CursorSlice const & sl, bool boundary) const; + /// is between pos-1 and pos an RTL<->LTR boundary? + bool isRTLBoundary(Buffer const & buffer, Paragraph const & par, + pos_type pos) const; + /// would be a RTL<->LTR boundary between pos and the given font? + bool isRTLBoundary(Buffer const & buffer, Paragraph const & par, + pos_type pos, Font const & font) const; + /// bool checkAndActivateInset(Cursor & cur, bool front); @@ -381,8 +378,6 @@ public: /// int background_color_; - /// - mutable Bidi bidi; /// ParagraphList pars_; @@ -417,6 +412,10 @@ private: void charInserted(); /// set 'number' font property void number(Cursor & cur); + /// draw selection for a single row + void drawRowSelection(PainterInfo & pi, int x, Row const & row, + DocIterator const & beg, DocIterator const & end, + bool drawOnBegMargin, bool drawOnEndMargin) const; /// paste plain text at current cursor. /// \param str string to paste