mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
9705be9f1b
Cleaned up code in controllers in the process; I think that the interface is stabilising now. Cleaned up code in InsetInclude a little. Mental note (to me?!): the Bibitem, Bibtex and Include insets create an inset when the appropriate menu item is selected. This is incorrect; the inset should only be created when "Ok" is pressed, as with the majority of insets. CREATE_XXX flags and associated code are needed. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1817 a592a061-630c-0410-9148-cb99ea01b6c8
58 lines
1.6 KiB
C++
58 lines
1.6 KiB
C++
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 2001 The LyX Team.
|
|
*
|
|
* ======================================================
|
|
*
|
|
* \file ControlCommand.h
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
*
|
|
* ControlCommand is a controller class for dialogs that create or modify
|
|
* an inset derived from InsetCommand.
|
|
*
|
|
* The class is likely to be changed as other Inset controllers are created
|
|
* and it becomes clear just what functionality can be moved back into
|
|
* ControlInset.
|
|
*
|
|
*/
|
|
|
|
#ifndef CONTROLCOMMAND_H
|
|
#define CONTROLCOMMAND_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
#include "ControlInset.h"
|
|
#include "insets/insetcommand.h"
|
|
#include "commandtags.h" // kb_action
|
|
|
|
/** The Inset dialog controller. Connects/disconnects signals, launches
|
|
GUI-dependent View and returns the output from this View to the kernel.
|
|
*/
|
|
class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
|
|
{
|
|
public:
|
|
///
|
|
ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
|
|
|
|
private:
|
|
/// Dispatch the changed parameters to the kernel.
|
|
virtual void applyParamsToInset();
|
|
///
|
|
virtual void applyParamsNoInset();
|
|
/// get the parameters from the string passed to createInset.
|
|
virtual InsetCommandParams const getParams(string const &);
|
|
/// get the parameters from the inset passed to showInset.
|
|
virtual InsetCommandParams const getParams(InsetCommand const &);
|
|
|
|
/// Controls what is done in LyXFunc::Dispatch()
|
|
kb_action const action_;
|
|
};
|
|
|
|
|
|
#endif // CONTROLCOMMAND_H
|