#define VIEWBASE_H
#include <boost/utility.hpp>
-#include "ControlBase.h"
+#include "ControlButtons.h"
#include "ControlSplash.h"
class ViewBase {
public:
///
- ViewBase(ControlBase & c) : controller_(c) {}
+ ViewBase(ControlButtons & c) : controller_(c) {}
///
virtual ~ViewBase() {}
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.
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!
- ControlBase & controller_;
+ ControlButtons & controller_;
};
class ViewBC : public ViewBase {
public:
///
- ViewBC(ControlBase & c) : ViewBase(c) {}
+ ViewBC(ControlButtons & c) : ViewBase(c) {}
protected:
///