replace most &dquot;...&dquot; by <...>
[lyx.git] / src / Bidi.h
blobcad9891de452792b8a84dd1621a6d6dd623a97a7
1 // -*- C++ -*-
2 /**
3 * \file Bidi.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Dekel Tsur
9 * Full author contact details are available in file CREDITS.
12 #ifndef BIDI_H
13 #define BIDI_H
15 #include <config.h>
17 #include "support/types.h"
18 #include <vector>
20 class Buffer;
21 class Paragraph;
22 class Row;
23 class LyXFont;
26 /// bidi stuff
27 struct Bidi {
28 ///
29 bool isBoundary(Buffer const &, Paragraph const & par,
30 lyx::pos_type pos) const;
31 ///
32 bool isBoundary(Buffer const &, Paragraph const & par,
33 lyx::pos_type pos, LyXFont const & font) const;
34 ///
35 lyx::pos_type log2vis(lyx::pos_type pos) const;
36 /** Maps positions in the logical string to positions
37 * in visual string.
39 lyx::pos_type vis2log(lyx::pos_type pos) const;
40 ///
41 lyx::pos_type level(lyx::pos_type pos) const;
42 ///
43 bool inRange(lyx::pos_type pos) const;
44 /// same_direction?
45 bool same_direction() const;
46 ///
47 void computeTables(Paragraph const & par,
48 Buffer const &, Row const & row);
49 private:
50 ///
51 bool same_direction_;
52 ///
53 std::vector<lyx::pos_type> log2vis_list_;
54 /** Maps positions in the visual string to positions
55 * in logical string.
57 std::vector<lyx::pos_type> vis2log_list_;
58 ///
59 std::vector<lyx::pos_type> levels_;
60 ///
61 lyx::pos_type start_;
62 ///
63 lyx::pos_type end_;
66 #endif // BIDI_H