]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
cleanup and reorder initialisation code of GuiView and GuiToolbars. Move some things...
[lyx.git] / src / BufferView.h
index df58d927e4d06c8d31355021cc527e8ce72dadc1..92fd31072796e555014eb17516865223c8b1c38a 100644 (file)
 #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; }
@@ -45,9 +38,9 @@ class Intl;
 class Inset;
 class ParIterator;
 class ParagraphMetrics;
+class Point;
 class Text;
 class TextMetrics;
-class ViewMetricsInfo;
 
 enum CursorStatus {
        CUR_INSIDE,
@@ -85,7 +78,7 @@ struct ScrollbarParameters
  * \sa Buffer
  * \sa CoordCache
  */
-class BufferView : boost::noncopyable {
+class BufferView {
 public:
        ///
        BufferView(Buffer & buffer);
@@ -201,14 +194,8 @@ public:
        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;
@@ -244,11 +231,8 @@ public:
 
        /// 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);
@@ -262,13 +246,15 @@ public:
        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.
@@ -290,8 +276,8 @@ private:
 
        void updateOffsetRef();
 
-       struct BufferViewPrivate;
-       BufferViewPrivate & d;
+       struct Private;
+       Private * const d;
 };
 
 /// some space for drawing the 'nested' markers (in pixel)