]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
Final fix to get unit with optional arg (value) working
[lyx.git] / src / BufferView.h
index c9652b6b5a1d8f9d623e07b2449b401ce3341b49..5b726d8c5af19792815dd2bc987eb693c03c0fcc 100644 (file)
@@ -24,7 +24,7 @@
 #include "support/types.h"
 
 #include <boost/tuple/tuple.hpp>
-#include <boost/utility.hpp>
+#include <boost/noncopyable.hpp>
 #include <boost/signal.hpp>
 
 #include <utility>
@@ -48,6 +48,12 @@ class Text;
 class ParIterator;
 class ParagraphMetrics;
 class ViewMetricsInfo;
+enum CursorStatus {
+       CUR_INSIDE,
+       CUR_ABOVE,
+       CUR_BELOW
+};
 
 /// Scrollbar Parameters.
 struct ScrollbarParameters
@@ -171,6 +177,8 @@ public:
        /// access to anchor.
        pit_type anchor_ref() const;
 
+       ///
+       CursorStatus cursorStatus(DocIterator const & dit) const;
        /// access to full cursor.
        Cursor & cursor();
        /// access to full cursor.
@@ -210,13 +218,13 @@ public:
        ParagraphMetrics const & parMetrics(Text const *, pit_type) const;
 
        ///
-       CoordCache & coordCache() {
-               return coord_cache_;
-       }
+       CoordCache & coordCache() { return coord_cache_; }
        ///
-       CoordCache const & coordCache() const {
-               return coord_cache_;
-       }
+       CoordCache const & coordCache() const { return coord_cache_; }
+
+       ///
+       Point getPos(DocIterator const & dit, bool boundary) const;
+
 
        ///
        void draw(frontend::Painter & pain);
@@ -249,6 +257,11 @@ public:
        boost::signal<void(docstring layout)> layoutChanged;
 
 private:
+       // 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();