2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
11 * \file ControlCommand.h
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
14 * ControlCommand is a controller class for dialogs that create or modify
15 * an inset derived from InsetCommand.
17 * The class is likely to be changed as other Inset controllers are created
18 * and it becomes clear just what functionality can be moved back into
23 #ifndef CONTROLCOMMAND_H
24 #define CONTROLCOMMAND_H
30 #include "ControlInset.h"
31 #include "insets/insetcommand.h"
32 #include "commandtags.h" // kb_action
34 /** The Inset dialog controller. Connects/disconnects signals, launches
35 GUI-dependent View and returns the output from this View to the kernel.
37 class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
41 ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
44 /// Dispatch the changed parameters to the kernel.
45 virtual void applyParamsToInset();
47 virtual void applyParamsNoInset();
48 /// get the parameters from the string passed to createInset.
49 virtual InsetCommandParams const getParams(string const &);
50 /// get the parameters from the inset passed to showInset.
51 virtual InsetCommandParams const getParams(InsetCommand const &);
53 /// Controls what is done in LyXFunc::Dispatch()
54 kb_action const action_;
58 #endif // CONTROLCOMMAND_H