]> git.lyx.org Git - features.git/blob - src/bufferview_funcs.h
merge decDepth(), killing some non-parlist code
[features.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 /// change the nesting depth of the selection
52 extern void changeDepth(BufferView *, LyXText *, DEPTH_CHANGE);
53
54 ///
55 extern void emph(BufferView *);
56 ///
57 extern void bold(BufferView *);
58 ///
59 extern void noun(BufferView *);
60 ///
61 extern void lang(BufferView *, string const &);
62 ///
63 extern void number(BufferView *);
64 ///
65 extern void tex(BufferView *);
66 ///
67 extern void code(BufferView *);
68 ///
69 extern void sans(BufferView *);
70 ///
71 extern void roman(BufferView *);
72 ///
73 extern void styleReset(BufferView *);
74 ///
75 extern void underline(BufferView *);
76 ///
77 extern void fontSize(BufferView *, string const &);
78 /// Returns the current font and depth as a message.
79 extern string const currentState(BufferView *);
80 ///
81 extern void toggleAndShow(BufferView *, LyXFont const &,
82                           bool toggleall = true);
83
84 }; // namespace bv_funcs
85
86 #endif