4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup
9 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
17 #include "GuiDialog.h"
18 #include "ui_ExternalUi.h"
20 #include "support/types.h"
22 #include "insets/InsetExternal.h"
33 class RotationDataType;
35 } // namespace external
39 class GuiExternal : public GuiDialog, public Ui::ExternalUi, public Controller
44 GuiExternal(LyXView & lv);
49 void change_adaptor();
51 void extraChanged(const QString&);
52 void formatChanged(const QString&);
55 void templateChanged();
56 void widthUnitChanged();
60 typedef std::map<std::string, QString> MapType;
63 void closeEvent(QCloseEvent * e);
65 bool activateAspectratio() const;
67 Controller & controller() { return *this; }
71 void updateContents();
72 /// Helper function called when the template is changed.
73 void updateTemplate();
74 /// get bounding box from file
80 bool initialiseParams(std::string const & data);
84 void dispatchParams();
86 bool isBufferDependent() const { return true; }
91 std::vector<std::string> const getTemplates() const;
93 int getTemplateNumber(std::string const &) const;
95 external::Template getTemplate(int) const;
98 getTemplateFilters(std::string const & template_name) const;
100 docstring const browse(docstring const & input_file,
101 docstring const & template_name) const;
103 /// Read the Bounding Box from a eps or ps-file
104 std::string const readBB(std::string const & file);
108 InsetExternalParams params_;
112 } // namespace frontend
115 #endif // GUIEXTERNAL_H