]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlParagraph.h
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlParagraph.h
index 343e0dd28a13b366b9e3657f164a25e82464b6bc..6daf2caf21bff03fac710a5985d52af5435f8a0f 100644 (file)
@@ -1,56 +1,60 @@
 // -*- C++ -*-
 /**
  * \file ControlParagraph.h
- * Copyright 2002 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Edwin Leuven <leuven@fee.uva.nl>
+ * \author Edwin Leuven
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef CONTROLPARAGRAPH_H
 #define CONTROLPARAGRAPH_H
 
-#include <boost/scoped_ptr.hpp>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlDialog_impl.h"
+#include "Dialog.h"
 #include "layout.h" // for LyXAlignment
 
 class ParagraphParameters;
 
-/** A controller for Paragraph dialogs.
- */
-class ControlParagraph : public ControlDialogBD
-{
+namespace lyx {
+namespace frontend {
+
+class ControlParagraph : public Dialog::Controller {
 public:
        ///
-       ControlParagraph(LyXView &, Dialogs &);
-       /** Declaring this out of line allows us to forward declare
-           ParagraphParameters without upsetting boost::scoped_ptr. */
-       ~ControlParagraph();
-
+       ControlParagraph(Dialog &);
+       ///
+       virtual bool initialiseParams(std::string const & data);
+       /// clean-up on hide.
+       virtual void clearParams();
+       ///
+       virtual void dispatchParams();
+       ///
+       virtual bool isBufferDependent() const { return true; }
        ///
        ParagraphParameters & params();
        ///
+       ParagraphParameters const & params() const;
+       ///
        bool inInset() const;
        ///
        LyXAlignment alignPossible() const;
+       ///
+       LyXAlignment alignDefault() const;
 
 private:
-       /// Get changed parameters and Dispatch them to the kernel.
-       virtual void apply();
-       /// set the params before show or update.
-       virtual void setParams();
-
        ///
-       boost::scoped_ptr<ParagraphParameters> pp_;
+       boost::scoped_ptr<ParagraphParameters> params_;
        ///
        bool ininset_;
        ///
-       LyXAlignment alignpos_;
+       LyXAlignment alignpossible_;
+       ///
+       LyXAlignment aligndefault_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPARAGRAPH_H