2000-04-12 15:11:29 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-03-12 22:17:50 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file bufferview_funcs.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
2003-03-12 22:17:50 +00:00
|
|
|
|
* \author Jean-Marc Lasgouttes
|
|
|
|
|
* \author Angus Leeming
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-03-12 22:17:50 +00:00
|
|
|
|
*/
|
2000-07-24 13:53:19 +00:00
|
|
|
|
|
2000-04-12 15:11:29 +00:00
|
|
|
|
#ifndef BUFFERVIEW_FUNCS_H
|
|
|
|
|
#define BUFFERVIEW_FUNCS_H
|
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
#include <string>
|
|
|
|
|
|
2000-04-12 15:11:29 +00:00
|
|
|
|
class LyXFont;
|
2004-11-30 01:59:49 +00:00
|
|
|
|
class Point;
|
|
|
|
|
class DocIterator;
|
|
|
|
|
class BufferView;
|
2000-04-12 15:11:29 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
|
2003-04-03 00:36:31 +00:00
|
|
|
|
namespace bv_funcs {
|
|
|
|
|
|
2004-02-13 11:05:29 +00:00
|
|
|
|
/// Set \param data using \param font and \param toggle. Return success.
|
2003-10-06 15:43:21 +00:00
|
|
|
|
bool font2string(LyXFont const & font, bool toggle, std::string & data);
|
2004-02-13 11:05:29 +00:00
|
|
|
|
|
|
|
|
|
/// Set \param font and \param toggle using \param data. Return success.
|
2003-10-06 15:43:21 +00:00
|
|
|
|
bool string2font(std::string const & data, LyXFont & font, bool & toggle);
|
2004-02-13 11:05:29 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
/** Returns the current freefont, encoded as a std::string to be passed to the
|
2003-03-12 22:17:50 +00:00
|
|
|
|
* frontends.
|
|
|
|
|
*/
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string const freefont2string();
|
2003-11-03 09:23:23 +00:00
|
|
|
|
|
2004-11-30 01:59:49 +00:00
|
|
|
|
Point getPos(DocIterator const & dit);
|
|
|
|
|
|
|
|
|
|
enum CurStatus {
|
|
|
|
|
CUR_INSIDE,
|
|
|
|
|
CUR_ABOVE,
|
|
|
|
|
CUR_BELOW
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CurStatus status(BufferView const * bv, DocIterator const & dit);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Point coordOffset(DocIterator const & dit);
|
|
|
|
|
|
|
|
|
|
|
2004-02-13 11:05:29 +00:00
|
|
|
|
} // namespace bv_funcs
|
2003-04-03 00:36:31 +00:00
|
|
|
|
|
2000-04-12 15:11:29 +00:00
|
|
|
|
#endif
|