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
26 void resizeInsets(BufferView * bv);
27 /** Set \param data using \param font and \param toggle.
28 * If successful, returns true.
30 bool font2string(LyXFont const & font, bool toggle, string & data);
31 /** Set \param font and \param toggle using \param data.
32 * If successful, returns true.
34 bool string2font(string const & data, LyXFont & font, bool & toggle);
35 /** Returns the current freefont, encoded as a string to be passed to the
38 string const freefont2string();
39 /** Set the freefont using the contents of \param data dispatched from
40 * the frontends and apply it at the current cursor location.
42 void update_and_apply_freefont(BufferView * bv, string const & data);
43 /** Apply the contents of freefont at the current cursor location.
45 void apply_freefont(BufferView * bv);
47 /// what type of depth change to make
54 * Increase or decrease the nesting depth of the selected paragraph(s)
55 * if test_only, don't change any depths. Returns whether something
56 * (would have) changed
58 extern bool changeDepth(BufferView *, LyXText *, DEPTH_CHANGE, bool test_only);
61 extern void emph(BufferView *);
63 extern void bold(BufferView *);
65 extern void noun(BufferView *);
67 extern void lang(BufferView *, string const &);
69 extern void number(BufferView *);
71 extern void tex(BufferView *);
73 extern void code(BufferView *);
75 extern void sans(BufferView *);
77 extern void roman(BufferView *);
79 extern void styleReset(BufferView *);
81 extern void underline(BufferView *);
83 extern void fontSize(BufferView *, string const &);
84 /// Returns the current font and depth as a message.
85 extern string const currentState(BufferView *);
87 extern void toggleAndShow(BufferView *, LyXFont const &,
88 bool toggleall = true);
90 }; // namespace bv_funcs