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(BufferView * view, kb_action act)
32 : view_(view), action(act)
36 FuncRequest::FuncRequest(BufferView * view, kb_action act, string const & arg)
37 : view_(view), action(act), argument(arg)
41 FuncRequest::FuncRequest
42 (BufferView * view, kb_action act, int ax, int ay, mouse_button::state but)
43 : view_(view), action(act), argument(), x(ax), y(ay), button_(but)
48 FuncRequest::FuncRequest(FuncRequest const & cmd, string const & arg)
49 : view_(cmd.view_), action(cmd.action), argument(arg),
50 x(cmd.x), y(cmd.y), button_(cmd.button_)
54 BufferView * FuncRequest::view() const
60 void FuncRequest::setView(BufferView * view)
66 mouse_button::state FuncRequest::button() const
72 void FuncRequest::message(string const & msg) const
75 view_->owner()->getLyXFunc().setMessage(msg);
77 lyxerr << "Dropping message '" << msg << "'\n";
81 void FuncRequest::errorMessage(string const & msg) const
84 view_->owner()->getLyXFunc().setErrorMessage(msg);
86 lyxerr << "Dropping error message '" << msg << "'\n";