2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
2001-03-30 09:51:46 +00:00
|
|
|
* \file ControlExternal.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
2001-03-30 09:51:46 +00:00
|
|
|
* \author Asger Alstrup
|
|
|
|
* \author John Levon
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-30 09:51:46 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLEXTERNAL_H
|
|
|
|
#define CONTROLEXTERNAL_H
|
|
|
|
|
2003-03-05 11:30:35 +00:00
|
|
|
#include "Dialog.h"
|
2003-10-07 20:25:10 +00:00
|
|
|
|
2003-12-04 18:51:55 +00:00
|
|
|
#include "support/types.h"
|
|
|
|
|
2003-03-05 11:30:35 +00:00
|
|
|
#include <boost/scoped_ptr.hpp>
|
2001-03-30 09:51:46 +00:00
|
|
|
|
2003-10-07 20:25:10 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
class InsetExternalParams;
|
2003-03-05 11:30:35 +00:00
|
|
|
|
2003-10-01 10:16:00 +00:00
|
|
|
namespace lyx {
|
2004-05-19 15:11:37 +00:00
|
|
|
|
2003-10-01 10:16:00 +00:00
|
|
|
namespace external {
|
2004-05-19 15:11:37 +00:00
|
|
|
|
2003-10-01 10:16:00 +00:00
|
|
|
class Template;
|
2003-12-04 18:51:55 +00:00
|
|
|
class RotationDataType;
|
2004-05-19 15:11:37 +00:00
|
|
|
|
2003-10-01 10:16:00 +00:00
|
|
|
} // namespace external
|
2003-06-11 14:30:04 +00:00
|
|
|
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace frontend {
|
|
|
|
|
2003-03-05 11:30:35 +00:00
|
|
|
class ControlExternal : public Dialog::Controller {
|
2001-03-30 09:51:46 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-03-05 11:30:35 +00:00
|
|
|
ControlExternal(Dialog &);
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
virtual bool initialiseParams(std::string const & data);
|
2003-03-05 11:30:35 +00:00
|
|
|
/// clean-up on hide.
|
|
|
|
virtual void clearParams();
|
|
|
|
/// clean-up on hide.
|
|
|
|
virtual void dispatchParams();
|
|
|
|
///
|
|
|
|
virtual bool isBufferDependent() const { return true; }
|
|
|
|
|
|
|
|
///
|
2003-10-07 20:25:10 +00:00
|
|
|
InsetExternalParams const & params() const;
|
2003-03-05 11:30:35 +00:00
|
|
|
///
|
2003-10-07 20:25:10 +00:00
|
|
|
void setParams(InsetExternalParams const &);
|
2001-03-30 09:51:46 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void editExternal();
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::string> const getTemplates() const;
|
2001-03-30 09:51:46 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
int getTemplateNumber(std::string const &) const;
|
2001-03-30 09:51:46 +00:00
|
|
|
///
|
2004-05-19 15:11:37 +00:00
|
|
|
external::Template getTemplate(int) const;
|
2001-03-30 09:51:46 +00:00
|
|
|
///
|
2006-04-19 09:11:25 +00:00
|
|
|
std::string const
|
|
|
|
getTemplateFilters(std::string const & template_name) const;
|
|
|
|
///
|
2006-10-09 16:33:20 +00:00
|
|
|
lyx::docstring const browse(lyx::docstring const & input_file,
|
|
|
|
lyx::docstring const & template_name) const;
|
2003-12-04 18:51:55 +00:00
|
|
|
|
|
|
|
/// Read the Bounding Box from a eps or ps-file
|
|
|
|
std::string const readBB(std::string const & file);
|
|
|
|
///
|
|
|
|
void bbChanged(bool val) { bb_changed_ = val; }
|
|
|
|
bool bbChanged() const { return bb_changed_; }
|
2001-03-30 09:51:46 +00:00
|
|
|
private:
|
2002-03-21 21:21:28 +00:00
|
|
|
///
|
2003-10-07 20:25:10 +00:00
|
|
|
boost::scoped_ptr<InsetExternalParams> params_;
|
2003-12-04 18:51:55 +00:00
|
|
|
bool bb_changed_;
|
2001-03-30 09:51:46 +00:00
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
|
2003-12-04 18:51:55 +00:00
|
|
|
|
|
|
|
namespace external {
|
|
|
|
|
|
|
|
std::vector<RotationDataType> const & all_origins();
|
2004-05-19 15:11:37 +00:00
|
|
|
std::string const origin_gui_str(size_type i);
|
2003-12-04 18:51:55 +00:00
|
|
|
|
|
|
|
} // namespace external
|
|
|
|
} // namespace lyx
|
|
|
|
|
2001-03-30 09:51:46 +00:00
|
|
|
#endif // CONTROLEXTERNAL_H
|