]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlForks.h
prefs/tabular MVC work
[lyx.git] / src / frontends / controllers / ControlForks.h
1 // -*- C++ -*-
2 /**
3  * \file ControlForks.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
12 #ifndef CONTROLFORKS_H
13 #define CONTROLFORKS_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "ControlDialog_impl.h"
20 #include "LString.h"
21
22 #include <boost/signals/connection.hpp>
23
24 #include <sys/types.h>
25 #include <vector>
26
27 /** A controller for dialogs that display the child processes forked by LyX.
28     Also provides an interface enabling them to be killed prematurely.
29 */
30 class ControlForks : public ControlDialogBI {
31 public:
32         ///
33         ControlForks(LyXView &, Dialogs &);
34         ///
35         std::vector<pid_t> const getPIDs() const;
36         ///
37         string const getCommand(pid_t) const;
38         ///
39         void kill(pid_t);
40 private:
41         ///
42         virtual void apply();
43         /// disconnect from the ForkedcallsController
44         virtual void clearParams();
45         /// connect to the ForkedcallsController
46         virtual void setParams();
47         /// Connection to the ForkedcallsController signal
48         boost::signals::connection childrenChanged_;
49         /// The list of PIDs to kill
50         std::vector<string> pids_;
51 };
52
53 #endif // CONTROLFORKS_H