3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS.
13 #include "ControlForks.h"
17 #include "funcrequest.h"
19 #include "support/forkedcontr.h"
20 #include "support/tostr.h"
22 #include <boost/bind.hpp>
25 using lyx::support::ForkedcallsController;
31 ControlForks::ControlForks(LyXView & lv, Dialogs & d)
32 : ControlDialogBI(lv, d)
36 vector<pid_t> const ControlForks::getPIDs() const
38 return ForkedcallsController::get().getPIDs();
42 string const ControlForks::getCommand(pid_t pid) const
44 return ForkedcallsController::get().getCommand(pid);
48 void ControlForks::kill(pid_t pid)
54 void ControlForks::apply()
56 if (!bufferIsAvailable())
65 for (vector<pid_t>::const_iterator it = pids_.begin();
66 it != pids_.end(); ++it) {
67 lyxfunc().dispatch(FuncRequest(LFUN_FORKS_KILL, tostr(*it)));
74 void ControlForks::setParams()
76 if (childrenChanged_.connected())
81 ForkedcallsController & fcc = ForkedcallsController::get();
83 fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
87 void ControlForks::clearParams()
90 childrenChanged_.disconnect();