]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/LyXView.h
Extracted from r14281
[lyx.git] / src / frontends / LyXView.h
index c43dc7118638b69930cad6f8c0a786a2dfa73ef7..36245d0f5bfddcacb44c47ab95d727fbda7ef13f 100644 (file)
@@ -34,8 +34,11 @@ class FuncRequest;
 
 namespace lyx {
 namespace frontend {
+class Gui;
+class WorkArea;
 class ControlCommandBuffer;
 } // namespace frontend
+
 } // namespace lyx
 
 /**
@@ -54,10 +57,11 @@ class ControlCommandBuffer;
 class LyXView : public boost::signals::trackable, boost::noncopyable {
 public:
 
-       LyXView();
+       LyXView(lyx::frontend::Gui & owner);
 
        virtual ~LyXView();
 
+       void setWorkArea(lyx::frontend::WorkArea * work_area);
        /**
         * This is called after the concrete view has been created.
         * We have to have the toolbar and the other stuff created
@@ -74,7 +78,7 @@ public:
            Returned as a shared_ptr so that anything wanting to cache the
            buffer view can do so safely using a boost::weak_ptr.
         */
-       boost::shared_ptr<BufferView> const & view() const;
+       BufferView * view() const;
 
        /// return the buffer currently shown in this window
        Buffer * buffer() const;
@@ -142,17 +146,28 @@ public:
         */
        Buffer const * const updateInset(InsetBase const *) const;
 
-       // returns true if this view has the focus.
+       /// returns true if this view has the focus.
        virtual bool hasFocus() const = 0;
 
+       ///
+       virtual lyx::frontend::Gui & gui();
+
+       lyx::frontend::WorkArea * workArea() const { return work_area_; }
+
+       /// Temporary method used by the kernel to redraw the work area.
+       virtual void redrawWorkArea();
 protected:
-       /// view of a buffer. Eventually there will be several.
-       boost::shared_ptr<BufferView> bufferview_;
+       /// current work area (screen view of a BufferView).
+       /**
+       \todo FIXME: there is only one workArea per LyXView for now.
+       */
+       lyx::frontend::WorkArea * work_area_;
 
        /// view's menubar
        boost::scoped_ptr<Menubar> menubar_;
 
 private:
+       lyx::frontend::Gui & owner_;
        /**
         * setWindowTitle - set title of window
         * @param t main window title