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
25 /** Set \param data using \param font and \param toggle.
26 * If successful, returns true.
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.
32 bool string2font(string const & data, LyXFont & font, bool & toggle);
33 /** Returns the current freefont, encoded as a string to be passed to the
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.
40 void update_and_apply_freefont(BufferView * bv, string const & data);
41 /** Apply the contents of freefont at the current cursor location.
43 void apply_freefont(BufferView * bv);
45 /// what type of depth change to make
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
56 extern bool changeDepth(BufferView *, LyXText *, DEPTH_CHANGE, bool test_only);
59 extern void emph(BufferView *);
61 extern void bold(BufferView *);
63 extern void noun(BufferView *);
65 extern void lang(BufferView *, string const &);
67 extern void number(BufferView *);
69 extern void tex(BufferView *);
71 extern void code(BufferView *);
73 extern void sans(BufferView *);
75 extern void roman(BufferView *);
77 extern void styleReset(BufferView *);
79 extern void underline(BufferView *);
81 extern void fontSize(BufferView *, string const &);
82 /// Returns the current font and depth as a message.
83 extern string const currentState(BufferView *);
85 extern void toggleAndShow(BufferView *, LyXFont const &,
86 bool toggleall = true);
88 }; // namespace bv_funcs