3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
9 #include "funcrequest.h"
10 #include "BufferView.h"
11 #include "lyxfunc.h" // only for setMessage()
12 #include "frontends/LyXView.h"
16 FuncRequest::FuncRequest()
17 : view_(0), action(LFUN_UNKNOWN_ACTION)
21 FuncRequest::FuncRequest(kb_action act)
22 : view_(0), action(act)
26 FuncRequest::FuncRequest(kb_action act, string const & arg)
27 : view_(0), action(act), argument(arg)
31 FuncRequest::FuncRequest
32 (kb_action act, int ax, int ay, mouse_button::state button)
33 : view_(0), action(act), argument(), x(ax), y(ay), button_(button)
37 FuncRequest::FuncRequest(BufferView * view, kb_action act)
38 : view_(view), action(act)
42 FuncRequest::FuncRequest(BufferView * view, kb_action act, string const & arg)
43 : view_(view), action(act), argument(arg)
47 FuncRequest::FuncRequest
48 (BufferView * view, kb_action act, int ax, int ay, mouse_button::state but)
49 : view_(view), action(act), argument(), x(ax), y(ay), button_(but)
53 FuncRequest::FuncRequest(FuncRequest const & cmd, string const & arg)
54 : view_(cmd.view_), action(cmd.action), argument(arg),
55 x(cmd.x), y(cmd.y), button_(cmd.button_)
59 FuncRequest::FuncRequest(FuncRequest const & cmd, BufferView * view)
60 : view_(view), action(cmd.action), argument(cmd.argument),
61 x(cmd.x), y(cmd.y), button_(cmd.button_)
65 BufferView * FuncRequest::view() const
71 void FuncRequest::setView(BufferView * view)
77 mouse_button::state FuncRequest::button() const
83 void FuncRequest::message(string const & msg) const
86 view_->owner()->getLyXFunc().setMessage(msg);
88 lyxerr << "Dropping message '" << msg << "'\n";
92 void FuncRequest::errorMessage(string const & msg) const
95 view_->owner()->getLyXFunc().setErrorMessage(msg);
97 lyxerr << "Dropping error message '" << msg << "'\n";