]> git.lyx.org Git - features.git/blobdiff - src/frontends/controllers/ViewBase.h
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / controllers / ViewBase.h
index a3c3217a15cf4c9ac6c32772be2fe47065e2a1da..203f88e98c0b769dd14ecf767fc42141caeb8016 100644 (file)
@@ -6,23 +6,23 @@
  *
  * \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() {}
 
@@ -50,22 +50,26 @@ public:
        /** 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