3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
13 #include "frontends/mouse_state.h"
19 * This class encapsulates a LyX action and its argument
20 * in order to pass it around easily.
24 /// just for putting thes things in std::container
26 /// actions without extra argument
27 explicit FuncRequest(kb_action act);
28 /// actions without extra argument
29 FuncRequest(kb_action act, int x, int y, mouse_button::state button);
30 /// actions with extra argument
31 FuncRequest(kb_action act, string const & arg);
32 /// actions without extra argument
33 FuncRequest(BufferView * bv, kb_action act);
34 /// actions with extra argument
35 FuncRequest(BufferView * bv, kb_action act, string const & arg);
37 FuncRequest(BufferView * bv, kb_action act,
38 int x, int y, mouse_button::state button);
39 /// for changing requests a bit
40 FuncRequest(FuncRequest const & cmd, string const & arg);
41 /// for changing requests a bit
42 FuncRequest(FuncRequest const & cmd, BufferView * bv);
44 /// access to the view
45 BufferView * view() const;
46 /// access to the view
47 void setView(BufferView * bv);
49 mouse_button::state button() const;
52 void message(string const & msg) const;
53 /// output an error message
54 void errorMessage(string const & msg) const;
56 /// argument parsing, extract argument i as string
57 string getArg(int i) const;
60 /// the BufferView we are talking to
62 public: // should be private, too...
65 /// the action's string argument
67 /// the x coordinate of a mouse press
69 /// the y coordinate of a mouse press
71 /// some extra information (like button number)
72 mouse_button::state button_;
75 #endif // FUNCREQUEST_H