]> git.lyx.org Git - lyx.git/blob - src/Bidi.h
Change to use preffered calling of Boost.Function
[lyx.git] / src / Bidi.h
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.
6  *
7  * \author Dekel Tsur
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef BIDI_H
13 #define BIDI_H
14
15 #include <config.h>
16
17 #include "support/types.h"
18 #include <vector>
19
20 class Buffer;
21 class Paragraph;
22 class Row;
23 class LyXFont;
24
25
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.
38          */
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.
56          */
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_;
64 };
65
66 #endif // BIDI_H