]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
fix "make dist" target
[lyx.git] / src / BufferView.h
index 678d39a33698c78592c0a033923b651608ad3250..2215b08f7aee37df0ebd53dde13580eaafaefe41 100644 (file)
@@ -16,8 +16,9 @@
 #pragma interface
 #endif
 
-#include FORMS_H_LOCATION
+#include "LString.h"
 #include "undo.h"
+#include "commandtags.h"
 #include <boost/utility.hpp>
 
 class LyXView;
@@ -26,9 +27,10 @@ class TeXErrors;
 class Buffer;
 class LyXScreen;
 class WorkArea;
+class Language;
 
 ///
-class BufferView : public noncopyable {
+class BufferView : boost::noncopyable {
 public:
        ///
        enum UpdateCodes {
@@ -53,8 +55,6 @@ public:
        ///
        LyXScreen * screen() const;
        ///
-       WorkArea * workarea() const;
-       ///
        void buffer(Buffer * b);
        ///
        void resize(int, int, int, int);
@@ -67,7 +67,7 @@ public:
        ///
        void update();
        //
-       void update(UpdateCodes uc);
+       void update(LyXText *, UpdateCodes uc);
        ///
        void updateScrollbar();
        ///
@@ -78,7 +78,10 @@ public:
        ///
        int resizeCurrentBuffer();
        ///
-       void gotoError();
+       void gotoInset(std::vector<Inset::Code> const & codes,
+                      bool same_content);
+       ///
+       void gotoInset(Inset::Code codes, bool same_content);
        ///
        void cursorPrevious(LyXText *);
        ///
@@ -88,18 +91,24 @@ public:
        ///
        LyXView * owner() const;
        ///
-       void beforeChange();
+       void beforeChange(LyXText *);
         ///
-        void savePosition();
+        void savePosition(unsigned int i);
         ///
-        void restorePosition();
+        void restorePosition(unsigned int i);
        ///
-       bool NoSavedPositions();
+       bool isSavedPosition(unsigned int i);
        /** This holds the mapping between buffer paragraphs and screen rows.
            This should be private...but not yet. (Lgb)
        */
        LyXText * text;
        ///
+       LyXText * getLyXText() const;
+       ///
+       LyXText * getParentText(Inset * inset) const;
+       ///
+       Language const * getParentLanguage(Inset * inset) const;
+       ///
        int workWidth() const;
        ///
        UpdatableInset * theLockingInset() const;
@@ -130,8 +139,6 @@ public:
        ///
        void insertCorrectQuote();
        ///
-       void gotoNote();
-       ///
        bool gotoLabel(string const & label);
        ///
        void paste();
@@ -146,7 +153,7 @@ public:
        ///
        void hfill();
        ///
-       void protectedBlank();
+       void protectedBlank(LyXText *);
        ///
        void newline();
        ///
@@ -161,18 +168,6 @@ public:
        void menuUndo();
        ///
        void menuRedo();
-#ifndef NEW_INSETS
-       ///
-       void toggleFloat();
-       ///
-       void openStuff();
-#endif
-       ///
-       void insertNote();
-#ifndef NEW_INSETS
-       ///
-       void allFloats(char flag, char figmar);
-#endif
        /// removes all autodeletable insets
        bool removeAutoInsets();
        ///
@@ -185,8 +180,6 @@ public:
        */
        bool insertInset(Inset * inset, string const & lout = string(),
                         bool no_table = false);
-       /// open and lock an updatable inset
-       bool open_new_inset(UpdatableInset * new_inset);
        /** Inserts a lyx file at cursor position.
            @return #false# if it fails.
        */
@@ -231,27 +224,20 @@ public:
        ///
        void pushIntoUpdateList(Inset * i);
        ///
-       void workAreaExpose();
-       ///
-       void workAreaButtonPress(int x, int y, unsigned int button);
-       ///
-       void workAreaButtonRelease(int x, int y, unsigned int button);
+       bool ChangeInsets(Inset::Code code, string const & from, 
+                         string const & to);
        ///
-       void workAreaMotionNotify(int x, int y, unsigned int state);
+       bool ChangeRefsIfUnique(string const & from, string const & to);
        ///
-       void doubleClick(int x, int y, unsigned int button);
+       bool ChangeCitationsIfUnique(string const & from, string const & to);
        ///
-       void tripleClick(int x, int y, unsigned int button);
-       ///
-       void enterView();
-       ///
-       void leaveView();
-       ///
-       bool ChangeRefs(string const & from, string const & to);
+       string const getClipboard() const;
        ///
        void pasteClipboard(bool asPara);
        ///
        void stuffClipboard(string const &) const;
+       ///
+       bool Dispatch(kb_action action, string const & argument);
 private:
        struct Pimpl;
        ///