FuncRequest const FuncRequest::unknown(LFUN_UNKNOWN_ACTION);
FuncRequest const FuncRequest::noaction(LFUN_NOACTION);
+FuncRequest const FuncRequest::prefix(LFUN_COMMAND_PREFIX);
FuncRequest::FuncRequest(Origin o)
- : action_(LFUN_NOACTION), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier)
+ : origin_(o)
{}
FuncRequest::FuncRequest(FuncCode act, Origin o)
- : action_(act), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier)
+ : action_(act), origin_(o)
{}
FuncRequest::FuncRequest(FuncCode act, docstring const & arg, Origin o)
- : action_(act), argument_(arg), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier)
+ : action_(act), argument_(arg), origin_(o)
{}
FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
- : action_(act), argument_(from_utf8(arg)), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier)
+ : FuncRequest(act, from_utf8(arg), o)
{}
FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
- mouse_button::state but, KeyModifier modifier, Origin o)
- : action_(act), origin_(o), x_(ax), y_(ay), button_(but),
- modifier_(modifier)
+ mouse_button::state button, KeyModifier modifier, Origin o)
+ : action_(act), origin_(o),
+ x_(ax), y_(ay), button_(button), modifier_(modifier)
{}
FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, Origin o)
: action_(cmd.action()), argument_(arg), origin_(o),
- x_(cmd.x_), y_(cmd.y_), button_(cmd.button_), modifier_(NoModifier)
+ x_(cmd.x_), y_(cmd.y_), button_(cmd.button_)
{}
}
+bool operator!=(FuncRequest const & lhs, FuncRequest const & rhs)
+{
+ return !(lhs == rhs);
+}
+
+
ostream & operator<<(ostream & os, FuncRequest const & cmd)
{
return os