]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ViewBase.h
John's character.C patch (bug fix).
[lyx.git] / src / frontends / controllers / ViewBase.h
index 78a4f0e82c0c9f12a592af7fa588fd1945d0db55..f84cf426f02fa65634fd2fad666ed85de71549a3 100644 (file)
 #define VIEWBASE_H
 
 #include <boost/utility.hpp>
-#include "ControlButton.h"
+#include "ControlButtons.h"
 #include "ControlSplash.h"
 
 class ViewBase {
 public:
        /// 
-       ViewBase(ControlButton & c) : controller_(c) {}
+       ViewBase(ControlButtons & c) : controller_(c) {}
        /// 
        virtual ~ViewBase() {}
 
@@ -35,6 +35,8 @@ public:
        virtual void show() = 0;
        /// Update dialog before/whilst showing it.
        virtual void update() = 0;
+       /// build the dialog
+       virtual void build() = 0;
 
        /** These shortcuts allow (e.g. xform's) global callback functions
            access to the buttons without making the whole controller_ public.
@@ -47,10 +49,15 @@ public:
         void CancelButton() { controller_.CancelButton(); }
         ///
         void RestoreButton() { controller_.RestoreButton(); }
-
+       
+       /** Defaults to nothing. Can be used by the Controller, however, to
+           indicate to the View that something has changed and that the
+           dialog therefore needs updating. */
+       virtual void partialUpdate(int) {}
+   
 protected:
        /// The view is, after all, controlled!
-       ControlButton & controller_;
+       ControlButtons & controller_;
 };
 
 
@@ -84,7 +91,7 @@ template <class GUIbc>
 class ViewBC : public ViewBase {
 public:
        ///
-       ViewBC(ControlButton & c) : ViewBase(c) {}
+       ViewBC(ControlButtons & c) : ViewBase(c) {}
 
 protected:
        ///