2000-08-01 17:33:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMCOMMAND_H
|
|
|
|
#define FORMCOMMAND_H
|
|
|
|
|
2000-09-27 05:40:29 +00:00
|
|
|
#include "FormBase.h"
|
2000-08-01 17:33:32 +00:00
|
|
|
#include "insets/insetcommand.h"
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
FormInset( LyXView *, Dialogs *, string const &,
|
|
|
|
ButtonPolicy * bp = new OkCancelReadOnlyPolicy,
|
|
|
|
char const * close = N_("Close"),
|
|
|
|
char const * cancel = N_("Cancel"));
|
|
|
|
|
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.
|
|
|
|
Connection ih_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
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
|
2000-10-02 00:10:25 +00:00
|
|
|
FormCommand( LyXView *, Dialogs *, string const &,
|
2000-10-13 05:57:05 +00:00
|
|
|
ButtonPolicy * = new OkCancelReadOnlyPolicy,
|
|
|
|
char const * close = N_("Close"),
|
|
|
|
char const * cancel = N_("Cancel"));
|
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-08-01 17:33:32 +00:00
|
|
|
void createInset( string const & );
|
2000-08-03 12:56:25 +00:00
|
|
|
/// Slot launching dialog to an existing inset
|
2000-10-04 03:17:36 +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
|
|
|
|
InsetCommandParams params;
|
2000-08-01 17:33:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|