]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlInclude.h
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlInclude.h
index 4d2a871efda125a6ebe024483c721593ce535bba..f5bd7cde80e5fd21cbd40d676ddbd1f7e5be36ef 100644 (file)
@@ -1,29 +1,27 @@
 // -*- C++ -*-
 /**
  * \file ControlInclude.h
- * Copyright 2001 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 Alejandro Aguilar Sierra
- * \author John Levon, moz@compsoc.man.ac.uk
- * \author Angus Leeming, a.leeming@.ac.uk
+ * \author John Levon
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef CONTROLINCLUDE_H
 #define CONTROLINCLUDE_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
-#include "ControlInset.h"
+#include "Dialog.h"
 #include "insets/insetinclude.h" // InsetIncludeParams
 
+
 /** A controller for the Include file dialog.
  */
-class ControlInclude
-       : public ControlInset<InsetInclude, InsetInclude::Params>
-{
+class ControlInclude : public Dialog::Controller {
 public:
        ///
        enum Type {
@@ -35,7 +33,22 @@ public:
                INCLUDE
        };
        ///
-       ControlInclude(LyXView &, Dialogs &);
+       ControlInclude(Dialog &);
+
+       ///
+       virtual bool initialiseParams(string const & data);
+       /// clean-up on hide.
+       virtual void clearParams();
+       /// clean-up on hide.
+       virtual void dispatchParams();
+       ///
+       virtual bool isBufferDependent() const { return true; }
+
+       ///
+       InsetInclude::Params const & params() const
+               { return inset_->params(); }
+       ///
+       void setParams(InsetInclude::Params const &);
 
        /// Browse for a file
        string const Browse(string const &, Type);
@@ -45,17 +58,9 @@ public:
 
        /// test if file exist
        bool fileExists(string const & file);
-
 private:
-       /// Dispatch the changed parameters to the kernel.
-       virtual void applyParamsToInset();
-       /// Should be used but currently isn't
-       virtual void applyParamsNoInset() {}
-       /// get the parameters from the string passed to createInset.
-       virtual InsetInclude::Params const getParams(string const &)
-               { return InsetInclude::Params(); }
-       /// get the parameters from the inset passed to showInset.
-       virtual InsetInclude::Params const getParams(InsetInclude const & inset)
-               { return inset.params(); }
+       ///
+       boost::scoped_ptr<InsetInclude> inset_;
 };
+
 #endif // CONTROLINCLUDE_H