2001-08-06 14:55:02 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
2002-03-21 21:21:28 +00:00
|
|
|
*
|
2001-08-06 14:55:02 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 21:21:28 +00:00
|
|
|
*
|
2001-08-06 14:55:02 +00:00
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
*
|
|
|
|
*======================================================
|
|
|
|
*
|
|
|
|
* \file ControlERT.h
|
|
|
|
* \author Juergen Vigna, jug@sad.it
|
2002-08-15 16:02:22 +00:00
|
|
|
* \author Angus Leeming <leeming@lyx.org>
|
2001-08-06 14:55:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLERT_H
|
|
|
|
#define CONTROLERT_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "ControlInset.h"
|
|
|
|
#include "insets/insetert.h" // InsetERT::Status
|
|
|
|
|
|
|
|
/** This should be moved back into insetert.h and InsetERT should
|
|
|
|
contain an instance of it. */
|
|
|
|
|
|
|
|
struct ERTParams {
|
|
|
|
///
|
|
|
|
ERTParams();
|
|
|
|
///
|
|
|
|
ERTParams(InsetERT const &);
|
|
|
|
///
|
|
|
|
InsetERT::ERTStatus status;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
bool operator==(ERTParams const &, ERTParams const &);
|
|
|
|
///
|
|
|
|
bool operator!=(ERTParams const &, ERTParams const &);
|
|
|
|
|
|
|
|
|
|
|
|
/** A controller for ERT dialogs.
|
|
|
|
*/
|
|
|
|
class ControlERT : public ControlInset<InsetERT, ERTParams> {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
ControlERT(LyXView &, Dialogs &);
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// Dispatch the changed parameters to the kernel.
|
|
|
|
virtual void applyParamsToInset();
|
2002-03-21 21:21:28 +00:00
|
|
|
///
|
2001-08-06 14:55:02 +00:00
|
|
|
virtual void applyParamsNoInset();
|
|
|
|
/// get the parameters from the string passed to createInset.
|
|
|
|
virtual ERTParams const getParams(string const &)
|
|
|
|
{ return ERTParams(); }
|
|
|
|
/// get the parameters from the inset passed to showInset.
|
|
|
|
virtual ERTParams const getParams(InsetERT const &);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|