2001-03-20 10:14:03 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file ControlLog.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.
|
2001-03-20 10:14:03 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author John Levon
|
|
|
|
* \author Angus Leeming
|
2001-03-20 10:14:03 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-20 10:14:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLLOG_H
|
|
|
|
#define CONTROLLOG_H
|
|
|
|
|
2003-03-25 18:13:46 +00:00
|
|
|
#include "Dialog.h"
|
2001-03-20 10:14:03 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2001-03-20 10:14:03 +00:00
|
|
|
/**
|
|
|
|
* A controller for a read-only text browser.
|
|
|
|
*/
|
2003-03-25 18:13:46 +00:00
|
|
|
class ControlLog : public Dialog::Controller {
|
2001-03-20 10:14:03 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-03-25 18:13:46 +00:00
|
|
|
ControlLog(Dialog &);
|
2003-12-05 13:37:23 +00:00
|
|
|
/** \param data should contain "<logtype> <logfile>"
|
|
|
|
* where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
|
|
|
|
*/
|
2003-10-06 15:43:21 +00:00
|
|
|
virtual bool initialiseParams(std::string const & data);
|
2001-03-20 10:14:03 +00:00
|
|
|
///
|
2003-03-25 18:13:46 +00:00
|
|
|
virtual void clearParams();
|
|
|
|
///
|
|
|
|
virtual void dispatchParams() {}
|
|
|
|
///
|
|
|
|
virtual bool isBufferDependent() const { return true; }
|
2003-12-05 13:37:23 +00:00
|
|
|
|
|
|
|
/// The title displayed by the dialog reflects the \c LOGTYPE
|
|
|
|
std::string const title() const;
|
|
|
|
/// put the log file into the ostream
|
|
|
|
void getContents(std::ostream & ss) const;
|
|
|
|
|
2001-03-23 17:09:34 +00:00
|
|
|
private:
|
2003-12-05 13:37:23 +00:00
|
|
|
/// Recognized log file-types
|
|
|
|
enum LOGTYPE {
|
|
|
|
LatexLog,
|
|
|
|
LiterateLog,
|
|
|
|
Lyx2lyxLog,
|
|
|
|
VCLog
|
|
|
|
};
|
2001-03-20 10:14:03 +00:00
|
|
|
|
2003-12-05 13:37:23 +00:00
|
|
|
LOGTYPE type_;
|
|
|
|
std::string logfile_;
|
2001-03-20 10:14:03 +00:00
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2001-03-20 10:14:03 +00:00
|
|
|
#endif // CONTROLLOG_H
|