]> git.lyx.org Git - lyx.git/blob - src/bufferview_funcs.h
"Inter-word Space"
[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 "LString.h"
18
19 class BufferView;
20 class LyXFont;
21 class LyXText;
22
23 namespace bv_funcs {
24
25 /** Set \param data using \param font and \param toggle.
26  *  If successful, returns true.
27  */
28 bool font2string(LyXFont const & font, bool toggle, string & data);
29 /** Set \param font and \param toggle using \param data.
30  *  If successful, returns true.
31  */
32 bool string2font(string const & data, LyXFont & font, bool & toggle);
33 /** Returns the current freefont, encoded as a string to be passed to the
34  *  frontends.
35  */
36 string const freefont2string();
37 /** Set the freefont using the contents of \param data dispatched from
38  *  the frontends and apply it at the current cursor location.
39  */
40 void update_and_apply_freefont(BufferView * bv, string const & data);
41 /** Apply the contents of freefont at the current cursor location.
42  */
43 void apply_freefont(BufferView * bv);
44
45 /// what type of depth change to make
46 enum DEPTH_CHANGE {
47         INC_DEPTH,
48         DEC_DEPTH
49 };
50
51 /**
52  * Increase or decrease the nesting depth of the selected paragraph(s)
53  * if test_only, don't change any depths. Returns whether something
54  * (would have) changed
55  */
56 extern bool changeDepth(BufferView *, LyXText *, DEPTH_CHANGE, bool test_only);
57
58 ///
59 extern void emph(BufferView *);
60 ///
61 extern void bold(BufferView *);
62 ///
63 extern void noun(BufferView *);
64 ///
65 extern void lang(BufferView *, string const &);
66 ///
67 extern void number(BufferView *);
68 ///
69 extern void tex(BufferView *);
70 ///
71 extern void code(BufferView *);
72 ///
73 extern void sans(BufferView *);
74 ///
75 extern void roman(BufferView *);
76 ///
77 extern void styleReset(BufferView *);
78 ///
79 extern void underline(BufferView *);
80 ///
81 extern void fontSize(BufferView *, string const &);
82 /// Returns the current font and depth as a message.
83 extern string const currentState(BufferView *);
84 ///
85 extern void toggleAndShow(BufferView *, LyXFont const &,
86                           bool toggleall = true);
87
88 }; // namespace bv_funcs
89
90 #endif