]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
fix reading the author field.
[lyx.git] / src / BufferView.h
index 9c50f9597b3fd0ffc83f69a7113ec52dda2662b9..e9a8101e6f9abd8dc2a62c1b78aba06bbc87564e 100644 (file)
 
 class Buffer;
 class Change;
-class Encoding;
+class DocIterator;
 class ErrorList;
 class FuncRequest;
-class InsetBase;
+class FuncStatus;
 class InsetOld;
 class Language;
 class LCursor;
@@ -35,9 +35,6 @@ class LyXScreen;
 class LyXView;
 class Painter;
 class ParIterator;
-class PosIterator;
-class TeXErrors;
-class UpdatableInset;
 
 /**
  * A buffer view encapsulates a view onto a particular
@@ -53,12 +50,12 @@ public:
         * Create a view with the given owner main window,
         * of the given dimensions.
         */
-       BufferView(LyXView * owner, int x, int y, int w, int h);
+       BufferView(LyXView * owner, int w, int h);
 
        ~BufferView();
 
        /// set the buffer we are viewing
-       void buffer(Buffer * b);
+       void setBuffer(Buffer * b);
        /// return the buffer being viewed
        Buffer * buffer() const;
 
@@ -81,7 +78,7 @@ public:
        /// reload the contained buffer
        void reload();
        /// create a new buffer based on template
-       bool newFile(std::string const & fname, std::string const & tname,
+       void newFile(std::string const & fname, std::string const & tname,
                     bool named = true);
        /// load a buffer into the view
        bool loadLyXFile(std::string const & name, bool tolastfiles = true);
@@ -111,13 +108,7 @@ public:
        /// return the lyxtext we are using
        LyXText * getLyXText() const;
 
-       /// return the current encoding at the cursor
-       Encoding const * getEncoding() const;
-
-       /// return the parent language of the given inset
-       Language const * getParentLanguage(InsetOld * inset) const;
-
-       /// simple replacing. Use the font of the first selected character 
+       /// simple replacing. Use the font of the first selected character
        void replaceSelectionWithString(std::string const & str);
 
        /// move cursor to the named label
@@ -130,12 +121,6 @@ public:
        /// set the cursor based on the given TeX source row
        void setCursorFromRow(int row);
 
-       /// Inserts a lyx file at cursor position. return false if it fails
-       bool insertLyXFile(std::string const & file);
-
-       /// FIXME
-       bool fitLockedInsetCursor(int x, int y, int asc, int desc);
-
        /// hide the cursor if it is visible
        void hideCursor();
 
@@ -144,7 +129,7 @@ public:
        /// scroll document by the given number of lines of default height
        void scroll(int lines);
        /// Scroll the view by a number of pixels
-       void scrollDocView(int);
+       void scrollDocView(int pixels);
 
        /// return the pixel width of the document view
        int workWidth() const;
@@ -161,9 +146,11 @@ public:
        /// tell the window system we have a selection
        void haveSelection(bool sel);
 
+       /// return true for events that will handle
+       FuncStatus getStatus(FuncRequest const & cmd);
        /// execute the given function
        bool dispatch(FuncRequest const & argument);
-       
+
        /// clear the X selection
        void unsetXSel();
 
@@ -176,7 +163,8 @@ public:
        ///
        void setCursor(ParIterator const & par, lyx::pos_type pos);
        ///
-       void putSelectionAt(PosIterator const & cur, int length, bool backwards);
+       void putSelectionAt(DocIterator const & cur,
+               int length, bool backwards);
 
 private:
        ///