2001-10-09 15:20:10 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file ControlTexinfo.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-10-09 15:20:10 +00:00
|
|
|
|
*
|
2003-09-07 01:45:40 +00:00
|
|
|
|
* \author Herbert Vo<EFBFBD>
|
2001-10-09 15:20:10 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-10-09 15:20:10 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef CONTROLTEXINFO_H
|
|
|
|
|
#define CONTROLTEXINFO_H
|
|
|
|
|
|
|
|
|
|
|
2003-06-19 17:16:12 +00:00
|
|
|
|
#include "Dialog.h"
|
2003-06-20 14:03:49 +00:00
|
|
|
|
#include "tex_helpers.h"
|
2001-10-09 15:20:10 +00:00
|
|
|
|
|
|
|
|
|
/** A controller for Texinfo dialogs. */
|
|
|
|
|
|
2003-06-19 17:16:12 +00:00
|
|
|
|
class ControlTexinfo : public Dialog::Controller {
|
2001-10-09 15:20:10 +00:00
|
|
|
|
public:
|
2003-06-19 17:16:12 +00:00
|
|
|
|
///
|
|
|
|
|
ControlTexinfo(Dialog &);
|
2003-07-17 15:35:42 +00:00
|
|
|
|
/// Nothing to initialise in this case.
|
2003-10-06 15:43:21 +00:00
|
|
|
|
virtual bool initialiseParams(std::string const &) { return true; }
|
2003-06-19 17:16:12 +00:00
|
|
|
|
///
|
|
|
|
|
virtual void clearParams() {}
|
|
|
|
|
///
|
|
|
|
|
virtual void dispatchParams() {}
|
|
|
|
|
///
|
|
|
|
|
virtual bool isBufferDependent() const { return false; }
|
|
|
|
|
|
|
|
|
|
|
2001-10-10 16:45:05 +00:00
|
|
|
|
/// the file extensions
|
|
|
|
|
enum texFileSuffix {cls, sty, bst};
|
2002-06-20 20:41:00 +00:00
|
|
|
|
/// show contents af a file
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void viewFile(std::string const & filename) const;
|
2002-06-20 20:41:00 +00:00
|
|
|
|
/// show all classoptions
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string const getClassOptions(std::string const & filename) const;
|
2001-10-09 15:20:10 +00:00
|
|
|
|
private:
|
|
|
|
|
///
|
|
|
|
|
virtual void apply() {}
|
|
|
|
|
};
|
|
|
|
|
|
2003-06-20 14:03:49 +00:00
|
|
|
|
|
|
|
|
|
/** Fill \c contents from one of the three texfiles.
|
|
|
|
|
* Each entry in the file list is returned as a pair<name_with_path, name_only>
|
|
|
|
|
*/
|
|
|
|
|
void getTexFileList(ControlTexinfo::texFileSuffix type,
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::vector<std::string> & contents);
|
2003-06-20 14:03:49 +00:00
|
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
|
#endif // CONTROLTEXINFO_H
|