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
28 /** Set \param data using \param font and \param toggle.
29 * If successful, returns true.
31 bool font2string(LyXFont const & font, bool toggle, std::string & data);
32 /** Set \param font and \param toggle using \param data.
33 * If successful, returns true.
35 bool string2font(std::string const & data, LyXFont & font, bool & toggle);
36 /** Returns the current freefont, encoded as a std::string to be passed to the
39 std::string const freefont2string();
41 void put_selection_at(BufferView * bv, PosIterator const & cur,
42 int length, bool backwards);
45 /// what type of depth change to make
51 /// Increase or decrease the nesting depth of the selected paragraph(s)
52 void changeDepth(BufferView *, LyXText *, DEPTH_CHANGE);
54 /// Returns whether something would be changed by changeDepth
55 bool changeDepthAllowed(BufferView *, LyXText *, DEPTH_CHANGE);
57 /// Returns the current font and depth as a message.
58 std::string const currentState(BufferView *);
59 /// replace selection with insertion
60 void replaceSelection(LyXText * lt);
63 }; // namespace bv_funcs