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.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
9 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS
14 #ifndef BUFFERVIEW_FUNCS_H
15 #define BUFFERVIEW_FUNCS_H
23 /** Set \param data using \param font and \param toggle.
24 * If successful, returns true.
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.
30 bool string2font(string const & data, LyXFont & font, bool & toggle);
31 /** Returns the current freefont, encoded as a string to be passed to the
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.
38 void update_and_apply_freefont(BufferView * bv, string const & data);
39 /** Apply the contents of freefont at the current cursor location.
41 void apply_freefont(BufferView * bv);
45 extern void emph(BufferView *);
47 extern void bold(BufferView *);
49 extern void noun(BufferView *);
51 extern void lang(BufferView *, string const &);
53 extern void number(BufferView *);
55 extern void tex(BufferView *);
57 extern void changeDepth(BufferView *, LyXText *, int);
59 extern void code(BufferView *);
61 extern void sans(BufferView *);
63 extern void roman(BufferView *);
65 extern void styleReset(BufferView *);
67 extern void underline(BufferView *);
69 extern void fontSize(BufferView *, string const &);
70 /// Returns the current font and depth as a message.
71 extern string const currentState(BufferView *);
73 extern void toggleAndShow(BufferView *, LyXFont const &,
74 bool toggleall = true);