#ifndef BUFFER_VIEW_H
#define BUFFER_VIEW_H
-#include "Dimension.h"
#include "update_flags.h"
-#include "support/docstring.h"
+#include "support/strfwd.h"
#include "support/types.h"
-#include <boost/noncopyable.hpp>
-
-#include <utility>
-#include <string>
-
-
namespace lyx {
namespace support { class FileName; }
class Inset;
class ParIterator;
class ParagraphMetrics;
+class Point;
class Text;
class TextMetrics;
-class ViewMetricsInfo;
enum CursorStatus {
CUR_INSIDE,
* \sa Buffer
* \sa CoordCache
*/
-class BufferView : boost::noncopyable {
+class BufferView {
public:
///
BufferView(Buffer & buffer);
bool checkDepm(Cursor & cur, Cursor & old);
/// sets cursor.
/// This is used when handling LFUN_MOUSE_PRESS.
- bool mouseSetCursor(Cursor & cur);
+ bool mouseSetCursor(Cursor & cur, bool select = false);
/// sets the selection.
/* When \c backwards == false, set anchor
void putSelectionAt(DocIterator const & cur,
int length, bool backwards);
- /// return the internal \c ViewMetricsInfo.
- /// This is used specifically by the \c Workrea.
- /// \sa WorkArea
- /// \sa ViewMetricsInfo
- ViewMetricsInfo const & viewMetricsInfo();
/// update the internal \c ViewMetricsInfo.
- /// \param singlepar indicates wether
- void updateMetrics(bool singlepar = false);
+ void updateMetrics();
///
TextMetrics const & textMetrics(Text const * t) const;
/// This signal is emitted when some dialog needs to be shown with
/// some data.
- void showDialogWithData(std::string const & name, std::string const & data);
-
- /// This signal is emitted when some inset dialogs needs to be shown.
- void showInsetDialog(std::string const & name, std::string const & data,
- Inset * inset);
+ void showDialog(std::string const & name, std::string const & data,
+ Inset * inset = 0);
/// This signal is emitted when some dialogs needs to be updated.
void updateDialog(std::string const & name, std::string const & data);
void insertPlaintextFile(std::string const & fileName, bool asParagraph);
private:
+ /// noncopyable
+ BufferView(BufferView const &);
+ void operator=(BufferView const &);
+
// the position relative to (0, baseline) of outermost paragraph
Point coordOffset(DocIterator const & dit, bool boundary) const;
/// Update current paragraph metrics.
/// \return true if no further update is needed.
bool singleParUpdate();
- ///
- bool multiParSel();
/// Search recursively for the the innermost inset that covers (x, y) position.
/// \retval 0 if no inset is found.
void updateOffsetRef();
- struct BufferViewPrivate;
- BufferViewPrivate & d;
+ struct Private;
+ Private * const d;
};
/// some space for drawing the 'nested' markers (in pixel)