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