X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBidi.h;h=c406a7a2b52ed995ab5e5f8f0f8a1be2c5f8524f;hb=f76d6997b710f7fb5180f0cd05415786de5d9417;hp=2fdb3abad341c249e083b2450fd16510c94b778d;hpb=e9780fe317b3bad923dee327d68a06562c926029;p=lyx.git diff --git a/src/Bidi.h b/src/Bidi.h index 2fdb3abad3..c406a7a2b5 100644 --- a/src/Bidi.h +++ b/src/Bidi.h @@ -13,13 +13,14 @@ #define BIDI_H #include "support/types.h" -#include "Cursor.h" + #include namespace lyx { class Buffer; +class Cursor; class Paragraph; class Row; class Font; @@ -34,19 +35,27 @@ public: /// bool isBoundary(Buffer const &, Paragraph const & par, pos_type pos, Font const & font) const; - /// + /** Maps positions in the visual string to positions + * in logical string. + */ pos_type log2vis(pos_type pos) const; /** Maps positions in the logical string to positions * in visual string. */ pos_type vis2log(pos_type pos) const; - /// + /* + * The text direction at logical position \param pos. + * Possible values are + * 0: left-to-right text + * 1: right-to-left text + * 2: left-to-right text in right-to-left language (aka numbers) + */ pos_type level(pos_type pos) const; - /// + /// Is logical position covered by this row? bool inRange(pos_type pos) const; - /// same_direction? + /// Is the whole row in the same direction as the paragraph? bool same_direction() const; - /// + /// Compute the data for visual positions. void computeTables(Paragraph const & par, Buffer const &, Row const & row); private: