]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlPrint.h
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlPrint.h
index 738bbdb389cd1eaa69c3222cb03f03ead9cf966e..35c8cc32c660fe9f2a8be50bb17cb573f4640fbe 100644 (file)
 #ifndef CONTROLPRINT_H
 #define CONTROLPRINT_H
 
-
-#include "ControlDialog_impl.h"
-
-#include "LString.h"
+#include "Dialog.h"
+#include <boost/scoped_ptr.hpp>
 
 class PrinterParams;
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Print dialogs.
  */
-class ControlPrint : public ControlDialogBD {
+class ControlPrint : public Dialog::Controller {
 public:
        ///
-       ControlPrint(LyXView &, Dialogs &);
+       ControlPrint(Dialog &);
+       ///
+       virtual bool initialiseParams(std::string const & data);
+       ///
+       virtual void clearParams();
+       ///
+       virtual void dispatchParams();
+       ///
+       virtual bool isBufferDependent() const { return true; }
+       ///
+       virtual kb_action getLfun() const { return LFUN_PRINT; }
 
        /// Browse for a file
-       string const Browse(string const &);
+       std::string const browse(std::string const &) const;
        ///
        PrinterParams & params() const;
 private:
-       /// Get changed parameters and Dispatch them to the kernel.
-       virtual void apply();
-       /// set the params before show or update.
-       virtual void setParams();
-       /// clean-up on hide.
-       virtual void clearParams();
-
        ///
-       PrinterParams * params_;
+       boost::scoped_ptr<PrinterParams> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPRINT_H