*
* \author Angus Leeming
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#ifndef VIEWBASE_H
#define VIEWBASE_H
-#include "support/LAssert.h"
-
-#include <boost/utility.hpp>
-
class ControlButtons;
+class ButtonController;
+#include "support/std_string.h"
+
+#include <boost/utility.hpp>
class ViewBase : boost::noncopyable {
public:
///
- ViewBase() : controller_ptr_(0) {}
+ ViewBase(string const &);
///
virtual ~ViewBase() {}
/** This should be set by the GUI class that owns both the controller
* and the view
*/
- void setController(ControlButtons & c) { controller_ptr_ = &c; }
+ void setController(ControlButtons &);
///
- ControlButtons & getController() {
- lyx::Assert(controller_ptr_);
- return *controller_ptr_;
- }
+ ControlButtons & getController();
///
- ControlButtons const & getController() const {
- lyx::Assert(controller_ptr_);
- return *controller_ptr_;
- }
+ ControlButtons const & getController() const;
+ ///
+ ButtonController & bc();
+ /// sets the title of the dialog (window caption)
+ void setTitle(string const &);
+ /// gets the title of the dialog
+ string const & getTitle() const;
+
protected:
/// We don't own this.
ControlButtons * controller_ptr_;
-};
+private:
+ string title_;
+
+};
#endif // VIEWBASE_H