59 iType(aType), iParameter(aParameter)
69 return !std::holds_alternative<std::monostate>(iParameter);
73 return static_variant_cast<neogfx::size>(iParameter);
77 return static_variant_cast<neogfx::point>(iParameter);
81 static_variant_cast<neogfx::size&>(iParameter) = aExtents;
85 static_variant_cast<neogfx::point&>(iParameter) = aPosition;
108 template <mouse_event_location Location>
123 iType{ aType }, iParameter1{ aParameter1 }, iParameter2{ aParameter2 }, iParameter3{ aParameter3 }, iParameter4{ aParameter4 }
133 return static_variant_cast<neogfx::point>(iParameter1);
137 return self_type{ iType, aPosition, iParameter2, iParameter3, iParameter4 };
141 return static_variant_cast<neogfx::mouse_button>(iParameter2);
145 return static_variant_cast<neogfx::mouse_wheel>(iParameter2);
149 return static_variant_cast<neogfx::key_modifiers_e>(iParameter3);
153 return static_variant_cast<neogfx::delta>(iParameter4);
203 iType(aType), iParameter1(aParameter1), iParameter2(aParameter2), iParameter3(aParameter3)
213 return static_variant_cast<neogfx::scan_code_e>(iParameter1);
217 return static_variant_cast<neogfx::key_code_e>(iParameter2);
221 return static_variant_cast<neogfx::key_modifiers_e>(iParameter3);
225 return static_variant_cast<string>(iParameter1);
bool is_middle_button() const
self_type with_position(neogfx::point const &aPosition) const
basic_mouse_event(mouse_event_type aType, const parameter_type &aParameter1=parameter_type{}, const parameter_type &aParameter2=parameter_type{}, const parameter_type &aParameter3=parameter_type{}, const parameter_type &aParameter4=parameter_type{})
mouse_event_type type() const
neogfx::key_modifiers_e key_modifiers() const
bool is_left_button() const
neogfx::mouse_button mouse_button() const
neolib::variant< neogfx::point, neogfx::delta, neogfx::mouse_button, neogfx::mouse_wheel, neogfx::key_modifiers_e > parameter_type
bool is_right_button() const
bool is_x2_button() const
neogfx::point position() const
neogfx::mouse_wheel mouse_wheel() const
neogfx::delta wheel_delta() const
bool is_x1_button() const
keyboard_event(keyboard_event_type aType, const parameter_type &aParameter1=parameter_type(), const parameter_type &aParameter2=parameter_type(), const parameter_type &aParameter3=parameter_type())
neogfx::scan_code_e scan_code() const
keyboard_event abstract_type
neogfx::key_modifiers_e key_modifiers() const
neolib::variant< neogfx::scan_code_e, neogfx::key_code_e, neogfx::key_modifiers_e, string > parameter_type
keyboard_event_type type() const
neogfx::key_code_e key_code() const
neogfx::point position() const
window_event_type type() const
window_event abstract_type
void set_position(const neogfx::point &aPosition)
void set_extents(const neogfx::size &aExtents)
window_event(window_event_type aType, const parameter_type &aParameter=parameter_type{})
neolib::variant< neogfx::size, neogfx::point > parameter_type
bool has_parameter() const
neogfx::size extents() const
basic_mouse_event< mouse_event_location::NonClient > non_client_mouse_event
basic_mouse_event< mouse_event_location::Client > mouse_event