X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBidi.h;h=dfa779ae4947d13a4d4f24c6de9a1c0f99e15b05;hb=acc5af9912533261c37795971af269f77317f14f;hp=a961d93f2ebe1c1110abcac0faebe1f072421e1e;hpb=aabd481ab63fd50606dd0d984c0b407e4b27e6a7;p=lyx.git diff --git a/src/Bidi.h b/src/Bidi.h index a961d93f2e..dfa779ae49 100644 --- a/src/Bidi.h +++ b/src/Bidi.h @@ -13,12 +13,17 @@ #define BIDI_H #include "support/types.h" + #include + +namespace lyx { + class Buffer; +class Cursor; class Paragraph; class Row; -class LyXFont; +class Font; /// bidi stuff @@ -26,20 +31,20 @@ class Bidi { public: /// bool isBoundary(Buffer const &, Paragraph const & par, - lyx::pos_type pos) const; + pos_type pos) const; /// bool isBoundary(Buffer const &, Paragraph const & par, - lyx::pos_type pos, LyXFont const & font) const; + pos_type pos, Font const & font) const; /// - lyx::pos_type log2vis(lyx::pos_type pos) const; + pos_type log2vis(pos_type pos) const; /** Maps positions in the logical string to positions * in visual string. */ - lyx::pos_type vis2log(lyx::pos_type pos) const; + pos_type vis2log(pos_type pos) const; /// - lyx::pos_type level(lyx::pos_type pos) const; + pos_type level(pos_type pos) const; /// - bool inRange(lyx::pos_type pos) const; + bool inRange(pos_type pos) const; /// same_direction? bool same_direction() const; /// @@ -49,17 +54,25 @@ private: /// bool same_direction_; /// - std::vector log2vis_list_; + std::vector log2vis_list_; /** Maps positions in the visual string to positions * in logical string. */ - std::vector vis2log_list_; + std::vector vis2log_list_; /// - std::vector levels_; + std::vector levels_; /// - lyx::pos_type start_; + pos_type start_; /// - lyx::pos_type end_; + pos_type end_; }; +/// Should interpretation of the arrow keys be reversed? +bool reverseDirectionNeeded(Cursor const & cur); + +/// Is current paragraph in RTL mode? +bool isWithinRtlParagraph(Cursor const & cur); + +} // namespace lyx + #endif // BIDI_H