2002-10-09 08:59:02 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file ControlDocument.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-10-09 08:59:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLDOCUMENT_H
|
|
|
|
#define CONTROLDOCUMENT_H
|
|
|
|
|
2004-03-30 19:18:14 +00:00
|
|
|
#include "Dialog.h"
|
2003-09-09 11:24:33 +00:00
|
|
|
#include "support/types.h"
|
2003-09-07 21:25:37 +00:00
|
|
|
#include <boost/scoped_ptr.hpp>
|
2002-10-09 08:59:02 +00:00
|
|
|
|
2003-09-09 11:24:33 +00:00
|
|
|
class BufferParams;
|
|
|
|
class LyXTextClass;
|
2002-10-09 08:59:02 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
2002-10-09 08:59:02 +00:00
|
|
|
|
|
|
|
/** A controller for Document dialogs.
|
|
|
|
*/
|
2004-03-30 19:18:14 +00:00
|
|
|
class ControlDocument : public Dialog::Controller {
|
2002-10-09 08:59:02 +00:00
|
|
|
public:
|
|
|
|
///
|
2004-03-30 19:18:14 +00:00
|
|
|
ControlDocument(Dialog &);
|
2002-10-20 01:48:28 +00:00
|
|
|
///
|
2002-10-09 08:59:02 +00:00
|
|
|
~ControlDocument();
|
|
|
|
///
|
2004-03-30 19:18:14 +00:00
|
|
|
virtual bool initialiseParams(std::string const & data);
|
|
|
|
///
|
|
|
|
virtual void clearParams();
|
|
|
|
///
|
|
|
|
virtual void dispatchParams();
|
|
|
|
///
|
|
|
|
virtual bool isBufferDependent() const { return true; }
|
2005-04-26 09:37:52 +00:00
|
|
|
/// always true since we don't manipulate document contents
|
|
|
|
virtual bool canApply() const { return true; }
|
2004-03-30 19:18:14 +00:00
|
|
|
///
|
|
|
|
LyXTextClass const & textClass() const;
|
2002-10-09 08:59:02 +00:00
|
|
|
///
|
2004-03-30 19:18:14 +00:00
|
|
|
BufferParams & params() const;
|
2002-10-09 08:59:02 +00:00
|
|
|
///
|
2004-03-30 19:18:14 +00:00
|
|
|
void setLanguage() const;
|
2002-10-09 08:59:02 +00:00
|
|
|
///
|
2004-03-30 19:18:14 +00:00
|
|
|
void saveAsDefault() const;
|
2002-10-20 01:48:28 +00:00
|
|
|
///
|
2004-05-19 15:11:37 +00:00
|
|
|
bool loadTextclass(textclass_type tc) const;
|
2002-10-09 08:59:02 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
boost::scoped_ptr<BufferParams> bp_;
|
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2002-10-09 08:59:02 +00:00
|
|
|
#endif // CONTROLDOCUMENT_H
|