]> git.lyx.org Git - lyx.git/blob - src/bufferview_funcs.h
fix some C++ parsing bugs
[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 /** Set \param data using \param font and \param toggle.
24  *  If successful, returns true.
25  */
26 bool font2string(LyXFont const & font, bool toggle, string & data);
27 /** Set \param font and \param toggle using \param data.
28  *  If successful, returns true.
29  */
30 bool string2font(string const & data, LyXFont & font, bool & toggle);
31 /** Returns the current freefont, encoded as a string to be passed to the
32  *  frontends.
33  */
34 string const freefont2string();
35 /** Set the freefont using the contents of \param data dispatched from
36  *  the frontends and apply it at the current cursor location.
37  */
38 void update_and_apply_freefont(BufferView * bv, string const & data);
39 /** Apply the contents of freefont at the current cursor location.
40  */
41 void apply_freefont(BufferView * bv);
42
43
44 ///
45 extern void emph(BufferView *);
46 ///
47 extern void bold(BufferView *);
48 ///
49 extern void noun(BufferView *);
50 ///
51 extern void lang(BufferView *, string const &);
52 ///
53 extern void number(BufferView *);
54 ///
55 extern void tex(BufferView *);
56 ///
57 extern void changeDepth(BufferView *, LyXText *, int);
58 ///
59 extern void code(BufferView *);
60 ///
61 extern void sans(BufferView *);
62 ///
63 extern void roman(BufferView *);
64 ///
65 extern void styleReset(BufferView *);
66 ///
67 extern void underline(BufferView *);
68 ///
69 extern void fontSize(BufferView *, string const &);
70 /// Returns the current font and depth as a message.
71 extern string const currentState(BufferView *);
72 ///
73 extern void toggleAndShow(BufferView *, LyXFont const &,
74                           bool toggleall = true);
75 #endif