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"
24 * This class encapsulates a LyX action and its argument
25 * in order to pass it around easily.
29 /// just for putting thes things in std::container
31 /// actions without extra argument
32 explicit FuncRequest(kb_action act);
33 /// actions without extra argument
34 FuncRequest(kb_action act, int x, int y, mouse_button::state button);
35 /// actions with extra argument
36 FuncRequest(kb_action act, std::string const & arg);
37 /// actions without extra argument
38 FuncRequest(BufferView * bv, kb_action act);
39 /// actions with extra argument
40 FuncRequest(BufferView * bv, kb_action act, std::string const & arg);
42 FuncRequest(BufferView * bv, kb_action act,
43 int x, int y, mouse_button::state button);
44 /// for changing requests a bit
45 FuncRequest(FuncRequest const & cmd, std::string const & arg);
46 /// for changing requests a bit
47 FuncRequest(FuncRequest const & cmd, BufferView * bv);
49 /// access to the view
50 BufferView * view() const;
51 /// access to the view
52 void setView(BufferView * bv);
54 mouse_button::state button() const;
57 void message(std::string const & msg) const;
58 /// output an error message
59 void errorMessage(std::string const & msg) const;
61 /// argument parsing, extract argument i as std::string
62 std::string getArg(unsigned int i) const;
65 /// the BufferView we are talking to
67 public: // should be private, too...
70 /// the action's std::string argument
72 /// the x coordinate of a mouse press
74 /// the y coordinate of a mouse press
76 /// some extra information (like button number)
77 mouse_button::state button_;
81 bool operator==(FuncRequest const & lhs, FuncRequest const & rhs);
83 std::ostream & operator<<(std::ostream &, FuncRequest const &);
85 #endif // FUNCREQUEST_H