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-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 {
|
|
|
|
namespace external {
|
2003-10-07 20:25:10 +00:00
|
|
|
|
2003-10-01 10:16:00 +00:00
|
|
|
class Template;
|
2003-10-07 20:25:10 +00:00
|
|
|
|
2003-10-01 10:16:00 +00:00
|
|
|
} // namespace external
|
|
|
|
} // namespace lyx
|
2003-06-11 14:30:04 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
///
|
2003-10-01 10:16:00 +00:00
|
|
|
lyx::external::Template getTemplate(int) const;
|
2001-03-30 09:51:46 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string const Browse(std::string const &) const;
|
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_;
|
2001-03-30 09:51:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLEXTERNAL_H
|