]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlExternal.h
Some helper functions for the augmented dialogs.
[lyx.git] / src / frontends / controllers / ControlExternal.h
index 5e21d9d53857d630da77077b24bf39c7ed75cf19..f1db7bd9588a87c8f327fa9084d6c7eb8045bf87 100644 (file)
@@ -8,24 +8,40 @@
  * \author John Levon
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef CONTROLEXTERNAL_H
 #define CONTROLEXTERNAL_H
 
-
 #include "Dialog.h"
-#include "insets/insetexternal.h"
+
+#include "support/types.h"
+
 #include <boost/scoped_ptr.hpp>
 
+#include <string>
+#include <vector>
+
+
+class InsetExternalParams;
+
+namespace lyx {
+namespace external {
+
+class Template;
+class RotationDataType;
+
+} // namespace external
+} // namespace lyx
+
 
 class ControlExternal : public Dialog::Controller {
 public:
        ///
        ControlExternal(Dialog &);
        ///
-       virtual bool initialiseParams(string const & data);
+       virtual bool initialiseParams(std::string const & data);
        /// clean-up on hide.
        virtual void clearParams();
        /// clean-up on hide.
@@ -34,28 +50,40 @@ public:
        virtual bool isBufferDependent() const { return true; }
 
        ///
-       InsetExternal::Params const & params() const
-               { return inset_->params(); }
+       InsetExternalParams const & params() const;
        ///
-       void setParams(InsetExternal::Params const &);
+       void setParams(InsetExternalParams const &);
 
        ///
        void editExternal();
        ///
-       void viewExternal();
-       ///
-       void updateExternal();
+       std::vector<std::string> const getTemplates() const;
        ///
-       std::vector<string> const getTemplates() const;
+       int getTemplateNumber(std::string const &) const;
        ///
-       int getTemplateNumber(string const &) const;
+       lyx::external::Template getTemplate(int) const;
        ///
-       ExternalTemplate getTemplate(int) const;
+       std::string const Browse(std::string const &) const;
+
+       /// Read the Bounding Box from a eps or ps-file
+       std::string const readBB(std::string const & file);
        ///
-       string const Browse(string const &) const;
+       void bbChanged(bool val) { bb_changed_ = val; }
+       bool bbChanged() const { return bb_changed_; }
 private:
        ///
-       boost::scoped_ptr<InsetExternal> inset_;
+       boost::scoped_ptr<InsetExternalParams> params_;
+       bool bb_changed_;
 };
 
+
+namespace lyx {
+namespace external {
+
+std::vector<RotationDataType> const & all_origins();
+std::string const origin_gui_str(lyx::size_type i);
+
+} // namespace external
+} // namespace lyx
+
 #endif // CONTROLEXTERNAL_H