]> git.lyx.org Git - lyx.git/blob - src/bufferview_funcs.h
2514ec737f7a1e75c6a7d18c3393a325e5efa8e8
[lyx.git] / src / bufferview_funcs.h
1 // -*- C++ -*-
2 /**
3  * \file bufferview_funcs.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author Jean-Marc Lasgouttes
9  * \author Angus Leeming
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef BUFFERVIEW_FUNCS_H
15 #define BUFFERVIEW_FUNCS_H
16
17 #include <string>
18
19
20 class BufferView;
21 class LCursor;
22 class LyXFont;
23 class LyXText;
24 class PosIterator;
25
26
27 namespace bv_funcs {
28
29 /** Set \param data using \param font and \param toggle.
30  *  If successful, returns true.
31  */
32 bool font2string(LyXFont const & font, bool toggle, std::string & data);
33 /** Set \param font and \param toggle using \param data.
34  *  If successful, returns true.
35  */
36 bool string2font(std::string const & data, LyXFont & font, bool & toggle);
37 /** Returns the current freefont, encoded as a std::string to be passed to the
38  *  frontends.
39  */
40 std::string const freefont2string();
41
42
43 /// what type of depth change to make
44 enum DEPTH_CHANGE {
45         INC_DEPTH,
46         DEC_DEPTH
47 };
48
49 /// Returns whether something would be changed by changeDepth
50 bool changeDepthAllowed(LCursor & cur, LyXText * text, DEPTH_CHANGE);
51
52 }; // namespace bv_funcs
53
54 #endif