]> git.lyx.org Git - lyx.git/blob - src/funcrequest.C
remove some very old dead code
[lyx.git] / src / funcrequest.C
1 /**
2  * \file funcrequest.C
3  * Copyright 2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author André Pönitz
7  */
8
9 #include <config.h>
10
11 #include "funcrequest.h"
12 #include "BufferView.h"
13 #include "lyxfunc.h" // only for setMessage()
14 #include "frontends/LyXView.h"
15 #include "debug.h"
16
17
18 FuncRequest::FuncRequest()
19         : view_(0), action(LFUN_UNKNOWN_ACTION)
20 {}
21
22
23 FuncRequest::FuncRequest(kb_action act)
24         : view_(0), action(act)
25 {}
26
27
28 FuncRequest::FuncRequest(kb_action act, string const & arg)
29         : view_(0), action(act), argument(arg)
30 {}
31
32
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)
36 {}
37
38
39 FuncRequest::FuncRequest(BufferView * view, kb_action act)
40         : view_(view), action(act)
41 {}
42
43
44 FuncRequest::FuncRequest(BufferView * view, kb_action act, string const & arg)
45         : view_(view), action(act), argument(arg)
46 {}
47
48
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)
52 {}
53
54
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_)
58 {}
59
60
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_)
64 {}
65
66
67 BufferView * FuncRequest::view() const
68 {
69         return view_;
70 }
71
72
73 void FuncRequest::setView(BufferView * view)
74 {
75         view_ = view;
76 }
77
78
79 mouse_button::state FuncRequest::button() const
80 {
81         return button_;
82 }
83
84
85 void FuncRequest::message(string const & msg) const
86 {
87         if (view_)
88                 view_->owner()->getLyXFunc().setMessage(msg);
89         else
90                 lyxerr  << "Dropping message '" << msg << "'\n";
91 }
92
93
94 void FuncRequest::errorMessage(string const & msg) const
95 {
96         if (view_)
97                 view_->owner()->getLyXFunc().setErrorMessage(msg);
98         else
99                 lyxerr  << "Dropping error message '" << msg << "'\n";
100 }