3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
11 #include "funcrequest.h"
12 #include "BufferView.h"
13 #include "lyxfunc.h" // only for setMessage()
14 #include "frontends/LyXView.h"
18 FuncRequest::FuncRequest()
19 : view_(0), action(LFUN_UNKNOWN_ACTION)
23 FuncRequest::FuncRequest(kb_action act)
24 : view_(0), action(act)
28 FuncRequest::FuncRequest(kb_action act, string const & arg)
29 : view_(0), action(act), argument(arg)
33 FuncRequest::FuncRequest
34 (kb_action act, int ax, int ay, mouse_button::state button)
35 : view_(0), action(act), argument(), x(ax), y(ay), button_(button)
39 FuncRequest::FuncRequest(BufferView * view, kb_action act)
40 : view_(view), action(act)
44 FuncRequest::FuncRequest(BufferView * view, kb_action act, string const & arg)
45 : view_(view), action(act), argument(arg)
49 FuncRequest::FuncRequest
50 (BufferView * view, kb_action act, int ax, int ay, mouse_button::state but)
51 : view_(view), action(act), argument(), x(ax), y(ay), button_(but)
55 FuncRequest::FuncRequest(FuncRequest const & cmd, string const & arg)
56 : view_(cmd.view_), action(cmd.action), argument(arg),
57 x(cmd.x), y(cmd.y), button_(cmd.button_)
61 FuncRequest::FuncRequest(FuncRequest const & cmd, BufferView * view)
62 : view_(view), action(cmd.action), argument(cmd.argument),
63 x(cmd.x), y(cmd.y), button_(cmd.button_)
67 BufferView * FuncRequest::view() const
73 void FuncRequest::setView(BufferView * view)
79 mouse_button::state FuncRequest::button() const
85 void FuncRequest::message(string const & msg) const
88 view_->owner()->getLyXFunc().setMessage(msg);
90 lyxerr << "Dropping message '" << msg << "'\n";
94 void FuncRequest::errorMessage(string const & msg) const
97 view_->owner()->getLyXFunc().setErrorMessage(msg);
99 lyxerr << "Dropping error message '" << msg << "'\n";