]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCommand.h
Hold on to your hats.
[lyx.git] / src / frontends / controllers / ControlCommand.h
1 // -*- C++ -*-
2 /**
3  * \file ControlCommand.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  *
11  * ControlCommand is a controller class for dialogs that create or modify
12  * an inset derived from InsetCommand.
13  */
14
15 #ifndef CONTROLCOMMAND_H
16 #define CONTROLCOMMAND_H
17
18
19 #include "Dialog.h"
20 #include "insets/insetcommandparams.h"
21 #include "commandtags.h" // kb_action
22
23
24 class ControlCommand : public Dialog::Controller {
25 public:
26         ///
27         ControlCommand(Dialog &, kb_action=LFUN_NOACTION);
28         ///
29         InsetCommandParams & params() { return params_; }
30         ///
31         InsetCommandParams const & params() const { return params_; }
32         ///
33         virtual void initialiseParams(string const & data);
34         /// clean-up on hide.
35         virtual void clearParams();
36         /// clean-up on hide.
37         virtual void dispatchParams();
38         ///
39         virtual bool isBufferDependent() const { return true; }
40
41 private:
42         ///
43         InsetCommandParams params_;
44         /// Flags what action is taken by Kernel::dispatch()
45         kb_action const action_;
46 };
47
48
49 #endif // CONTROLCOMMAND_H