2001-10-09 15:20:10 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
2002-03-21 21:21:28 +00:00
|
|
|
* ======================================================
|
2001-10-09 15:20:10 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* \file ControlTexinfo.h
|
|
|
|
* \author Herbert Voss <voss@perce.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLTEXINFO_H
|
|
|
|
#define CONTROLTEXINFO_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2002-01-16 14:47:58 +00:00
|
|
|
#include "ControlDialog_impl.h"
|
2002-01-25 19:07:34 +00:00
|
|
|
#include "LString.h"
|
2001-10-09 15:20:10 +00:00
|
|
|
|
|
|
|
/** A controller for Texinfo dialogs. */
|
|
|
|
|
2002-01-16 14:47:58 +00:00
|
|
|
class ControlTexinfo : public ControlDialogBI {
|
2001-10-09 15:20:10 +00:00
|
|
|
public:
|
2001-10-10 16:45:05 +00:00
|
|
|
/// the file extensions
|
|
|
|
enum texFileSuffix {cls, sty, bst};
|
2001-10-09 15:20:10 +00:00
|
|
|
///
|
|
|
|
ControlTexinfo(LyXView &, Dialogs &);
|
2002-06-20 20:41:00 +00:00
|
|
|
/// show contents af a file
|
2001-10-10 16:45:05 +00:00
|
|
|
void viewFile(string const filename) const;
|
2002-06-20 20:41:00 +00:00
|
|
|
/// show all classoptions
|
|
|
|
string const getClassOptions(string const & filename) const;
|
|
|
|
/// build new cls bst sty - lists
|
2001-10-10 16:45:05 +00:00
|
|
|
void rescanStyles() const;
|
2002-06-20 20:41:00 +00:00
|
|
|
/// build new bst sty cls lists
|
2001-10-10 16:45:05 +00:00
|
|
|
void runTexhash() const;
|
2002-06-20 20:41:00 +00:00
|
|
|
/// read filecontents
|
2001-10-10 16:45:05 +00:00
|
|
|
string const getContents(texFileSuffix type, bool withPath) const;
|
|
|
|
|
2001-10-09 15:20:10 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
virtual void apply() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLTEXINFO_H
|