]> git.lyx.org Git - lyx.git/blob - src/bufferview_funcs.h
mathed uglyfication
[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 LyXFont;
22 class LyXText;
23 class PosIterator;
24
25
26 namespace bv_funcs {
27
28 /** Set \param data using \param font and \param toggle.
29  *  If successful, returns true.
30  */
31 bool font2string(LyXFont const & font, bool toggle, std::string & data);
32 /** Set \param font and \param toggle using \param data.
33  *  If successful, returns true.
34  */
35 bool string2font(std::string const & data, LyXFont & font, bool & toggle);
36 /** Returns the current freefont, encoded as a std::string to be passed to the
37  *  frontends.
38  */
39 std::string const freefont2string();
40
41
42 /// what type of depth change to make
43 enum DEPTH_CHANGE {
44         INC_DEPTH,
45         DEC_DEPTH
46 };
47
48 /// Increase or decrease the nesting depth of the selected paragraph(s)
49 void changeDepth(BufferView *, LyXText *, DEPTH_CHANGE);
50
51 /// Returns whether something would be changed by changeDepth
52 bool changeDepthAllowed(BufferView *, LyXText *, DEPTH_CHANGE);
53
54 /// Returns the current font and depth as a message.
55 std::string const currentState(BufferView *);
56 /// replace selection with insertion
57 void replaceSelection(LyXText * lt);
58
59
60 }; // namespace bv_funcs
61
62 #endif