]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.h
Fix bug 2485 and crash on middle mouse paste on math
[lyx.git] / src / BufferView_pimpl.h
index 815d9c6918e50c9cf5898bc7c608027be9162564..7c14f6c9e43f6213a0161146fa8f1792f29ef1b7 100644 (file)
@@ -45,7 +45,8 @@ class ViewMetricsInfo;
 
 
 ///
-struct BufferView::Pimpl : public boost::signals::trackable {
+class BufferView::Pimpl : public boost::signals::trackable {
+public:
        ///
        Pimpl(BufferView & bv, LyXView * owner, int width, int height);
        ///
@@ -56,10 +57,12 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        void setBuffer(Buffer * buf);
        ///
        void resizeCurrentBuffer();
-       // 
+       //
        bool fitCursor();
+       //
+       bool multiParSel();
        ///
-       void update(bool fitcursor = false, bool forceupdate = true);
+       void update(Update::flags flags = Update::Force);
        ///
        void newFile(std::string const &, std::string const &, bool);
        ///
@@ -92,6 +95,8 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        void restorePosition(unsigned int i);
        ///
        bool isSavedPosition(unsigned int i);
+       /// save bookmarks to .lyx/session
+       void saveSavedPositions();
        ///
        void switchKeyMap();
        ///
@@ -102,6 +107,10 @@ struct BufferView::Pimpl : public boost::signals::trackable {
        FuncStatus getStatus(FuncRequest const & cmd);
        /// a function should be executed
        bool dispatch(FuncRequest const & ev);
+       /// Flag: do a full redraw of inside text of inset
+       bool repaintAll() { return refresh_inside_; }
+       ///
+       void repaintAll(bool r) {refresh_inside_ = r; }
 private:
        /// An error list (replaces the error insets)
        ErrorList errorlist_;
@@ -144,6 +153,8 @@ private:
        boost::scoped_ptr<LyXScreen> screen_;
        ///
        boost::scoped_ptr<WorkArea> workarea_;
+       /// Estimated average par height for scrollbar
+       int wh_;
        ///
        Timeout cursor_timeout;
        ///
@@ -151,7 +162,8 @@ private:
        ///
        bool using_xterm_cursor;
        ///
-       struct Position {
+       class Position {
+       public:
                /// Filename
                std::string filename;
                /// Cursor paragraph Id
@@ -167,7 +179,7 @@ private:
        ///
        std::vector<Position> saved_positions;
        ///
-       void MenuInsertLyXFile(std::string const & filen);
+       void menuInsertLyXFile(std::string const & filen);
        /// our workarea
        WorkArea & workarea() const;
        /// this is used to handle XSelection events in the right manner
@@ -179,13 +191,15 @@ private:
        ///
        LCursor cursor_;
        ///
+       bool multiparsel_cache_;
        ///
        lyx::pit_type anchor_ref_;
        ///
        int offset_ref_;
        ///
-       ViewMetricsInfo metrics();
-
+       ViewMetricsInfo metrics(bool singlepar = false);
+       /// Working variable indicating a full screen refresh
+       mutable bool refresh_inside_;
 
 };
 #endif // BUFFERVIEW_PIMPL_H