2000-08-01 17:33:32 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
/**
|
|
|
|
* \file FormInset.h
|
|
|
|
* Copyright 2000-2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
2000-08-01 17:33:32 +00:00
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* A base class for dialogs connected to insets. This class is temporary in that
|
|
|
|
* it has been superceeded by the controller-view split.
|
2000-08-01 17:33:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMCOMMAND_H
|
|
|
|
#define FORMCOMMAND_H
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include "FormBaseDeprecated.h"
|
2002-07-04 14:03:55 +00:00
|
|
|
#include "insets/insetcommandparams.h"
|
2000-08-01 17:33:32 +00:00
|
|
|
|
2002-05-29 16:21:03 +00:00
|
|
|
#include <boost/signals/connection.hpp>
|
|
|
|
|
2000-08-01 17:33:32 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2002-07-04 14:03:55 +00:00
|
|
|
class InsetCommand;
|
2000-10-13 05:57:05 +00:00
|
|
|
|
|
|
|
/** This class is an XForms GUI base class to insets
|
|
|
|
*/
|
|
|
|
class FormInset : public FormBaseBD {
|
2000-10-20 09:50:09 +00:00
|
|
|
protected:
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Constructor
|
2001-03-15 13:37:04 +00:00
|
|
|
FormInset(LyXView *, Dialogs *, string const &);
|
2000-10-13 05:57:05 +00:00
|
|
|
|
2000-10-24 15:15:25 +00:00
|
|
|
/// Connect signals. Also perform any necessary initialisation.
|
|
|
|
virtual void connect();
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Disconnect signals. Also perform any necessary housekeeping.
|
|
|
|
virtual void disconnect();
|
|
|
|
|
2000-10-24 13:13:59 +00:00
|
|
|
/// bool indicates if a buffer switch took place
|
|
|
|
virtual void updateSlot(bool);
|
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/// inset::hide connection.
|
2002-05-29 16:21:03 +00:00
|
|
|
boost::signals::connection ih_;
|
2000-10-13 05:57:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-08-01 17:33:32 +00:00
|
|
|
/** This class is an XForms GUI base class to insets derived from
|
|
|
|
InsetCommand
|
|
|
|
*/
|
2000-10-13 05:57:05 +00:00
|
|
|
class FormCommand : public FormInset {
|
2000-10-20 09:50:09 +00:00
|
|
|
protected:
|
2000-08-01 17:33:32 +00:00
|
|
|
/// Constructor
|
2001-03-15 13:37:04 +00:00
|
|
|
FormCommand(LyXView *, Dialogs *, string const &);
|
2000-08-08 13:55:26 +00:00
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/// Disconnect signals. Also perform any necessary housekeeping.
|
|
|
|
virtual void disconnect();
|
|
|
|
|
2000-08-03 12:56:25 +00:00
|
|
|
/// Slot launching dialog to (possibly) create a new inset
|
2000-11-14 02:01:57 +00:00
|
|
|
void createInset(string const &);
|
2000-08-03 12:56:25 +00:00
|
|
|
/// Slot launching dialog to an existing inset
|
2000-11-14 02:01:57 +00:00
|
|
|
void showInset(InsetCommand *);
|
2000-08-03 12:56:25 +00:00
|
|
|
|
2000-10-13 05:57:05 +00:00
|
|
|
/// pointer to the inset passed through showInset
|
2000-08-03 12:56:25 +00:00
|
|
|
InsetCommand * inset_;
|
|
|
|
/// the nitty-griity. What is modified and passed back
|
2002-03-21 21:21:28 +00:00
|
|
|
InsetCommandParams params;
|
2000-08-01 17:33:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|