4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
16 #include "frontends/mouse_state.h"
17 #include "support/std_string.h"
22 * This class encapsulates a LyX action and its argument
23 * in order to pass it around easily.
27 /// just for putting thes things in std::container
29 /// actions without extra argument
30 explicit FuncRequest(kb_action act);
31 /// actions without extra argument
32 FuncRequest(kb_action act, int x, int y, mouse_button::state button);
33 /// actions with extra argument
34 FuncRequest(kb_action act, string const & arg);
35 /// actions without extra argument
36 FuncRequest(BufferView * bv, kb_action act);
37 /// actions with extra argument
38 FuncRequest(BufferView * bv, kb_action act, string const & arg);
40 FuncRequest(BufferView * bv, kb_action act,
41 int x, int y, mouse_button::state button);
42 /// for changing requests a bit
43 FuncRequest(FuncRequest const & cmd, string const & arg);
44 /// for changing requests a bit
45 FuncRequest(FuncRequest const & cmd, BufferView * bv);
47 /// access to the view
48 BufferView * view() const;
49 /// access to the view
50 void setView(BufferView * bv);
52 mouse_button::state button() const;
55 void message(string const & msg) const;
56 /// output an error message
57 void errorMessage(string const & msg) const;
59 /// argument parsing, extract argument i as string
60 string getArg(int i) const;
63 /// the BufferView we are talking to
65 public: // should be private, too...
68 /// the action's string argument
70 /// the x coordinate of a mouse press
72 /// the y coordinate of a mouse press
74 /// some extra information (like button number)
75 mouse_button::state button_;
78 #endif // FUNCREQUEST_H