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"
23 * This class encapsulates a LyX action and its argument
24 * in order to pass it around easily.
28 /// just for putting thes things in std::container
30 /// actions without extra argument
31 explicit FuncRequest(kb_action act
);
32 /// actions without extra argument
33 FuncRequest(kb_action act
, int x
, int y
, mouse_button::state button
);
34 /// actions with extra argument
35 FuncRequest(kb_action act
, std::string
const & arg
);
36 /// for changing requests a bit
37 FuncRequest(FuncRequest
const & cmd
, std::string
const & arg
);
40 mouse_button::state
button() const;
42 /// argument parsing, extract argument i as std::string
43 std::string
getArg(unsigned int i
) const;
45 public: // should be private
48 /// the action's std::string argument
50 /// the x coordinate of a mouse press
52 /// the y coordinate of a mouse press
54 /// some extra information (like button number)
55 mouse_button::state button_
;
59 bool operator==(FuncRequest
const & lhs
, FuncRequest
const & rhs
);
61 std::ostream
& operator<<(std::ostream
&, FuncRequest
const &);
63 #endif // FUNCREQUEST_H