xtd 0.2.0
xtd::forms::mouse_event_args Class Reference

Definition

Constructors

 mouse_event_args ()=default
 Initializes a new instance of the MouseEventArgs class. More...
 
 mouse_event_args (mouse_buttons button, int32 clicks, int32 x, int32 y, int32 delta)
 Initializes a new instance of the MouseEventArgs class. More...
 
 mouse_event_args (mouse_buttons button, int32 clicks, const drawing::point &location, int32 delta)
 Initializes a new instance of the MouseEventArgs class. More...
 

Properties

mouse_buttons button () const noexcept
 Gets which mouse button was pressed. More...
 
int32 clicks () const noexcept
 Gets the number of times the mouse button was pressed and released. More...
 
int32 delta () const noexcept
 Gets a signed count of the number of detents the mouse wheel has rotated, multiplied by the WHEEL_DELTA constant. A detent is one notch of the mouse wheel. More...
 
const drawing::pointlocation () const noexcept
 Gets the location of the mouse during the generating mouse event. More...
 
int32 x () const noexcept
 Gets the x-coordinate of the mouse during the generating mouse event. More...
 
int32 y () const noexcept
 Gets the y-coordinate of the mouse during the generating mouse event. More...
 

Additional Inherited Members

- Static Public Attributes inherited from xtd::event_args
static const event_args empty
 Provides a value to use with events that do not have event data. More...
 
- Public Member Functions inherited from xtd::event_args
 event_args ()=default
 Initializes a new instance of the event_args class. More...
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Constructor & Destructor Documentation

◆ mouse_event_args() [1/3]

xtd::forms::mouse_event_args::mouse_event_args ( )
default

Initializes a new instance of the MouseEventArgs class.

◆ mouse_event_args() [2/3]

xtd::forms::mouse_event_args::mouse_event_args ( mouse_buttons  button,
int32  clicks,
int32  x,
int32  y,
int32  delta 
)
inline

Initializes a new instance of the MouseEventArgs class.

Parameters
buttonOne of the xtd::forms::mouse_buttons values that indicate which mouse button was pressed.
clicksThe number of times a mouse button was pressed.
xThe x-coordinate of a mouse click, in pixels.
yThe y-coordinate of a mouse click, in pixels.
deltaA signed count of the number of detents the wheel has rotated.

◆ mouse_event_args() [3/3]

xtd::forms::mouse_event_args::mouse_event_args ( mouse_buttons  button,
int32  clicks,
const drawing::point location,
int32  delta 
)
inline

Initializes a new instance of the MouseEventArgs class.

Parameters
buttonOne of the xtd::forms::mouse_buttons values that indicate which mouse button was pressed.
clicksThe number of times a mouse button was pressed.
locationThe location of a mouse click, in pixels.
deltaA signed count of the number of detents the wheel has rotated.

Member Function Documentation

◆ button()

mouse_buttons xtd::forms::mouse_event_args::button ( ) const
inlinenoexcept

Gets which mouse button was pressed.

Returns
One of the xtd::forms::mouse_buttons values.
Examples:
minesweeper.cpp.

◆ clicks()

int32 xtd::forms::mouse_event_args::clicks ( ) const
inlinenoexcept

Gets the number of times the mouse button was pressed and released.

Returns
An Int32_t that contains the number of times the mouse button was pressed and released.

◆ delta()

int32 xtd::forms::mouse_event_args::delta ( ) const
inlinenoexcept

Gets a signed count of the number of detents the mouse wheel has rotated, multiplied by the WHEEL_DELTA constant. A detent is one notch of the mouse wheel.

Returns
A signed count of the number of detents the mouse wheel has rotated, multiplied by the WHEEL_DELTA constant.

◆ location()

const drawing::point& xtd::forms::mouse_event_args::location ( ) const
inlinenoexcept

Gets the location of the mouse during the generating mouse event.

Returns
A xtd::drawing::point that contains the x- and y- mouse coordinates, in pixels, relative to the upper-left corner of the form.
Examples:
minesweeper.cpp.

◆ x()

int32 xtd::forms::mouse_event_args::x ( ) const
inlinenoexcept

Gets the x-coordinate of the mouse during the generating mouse event.

Returns
The x-coordinate of the mouse, in pixels.

◆ y()

int32 xtd::forms::mouse_event_args::y ( ) const
inlinenoexcept

Gets the y-coordinate of the mouse during the generating mouse event.

Returns
The y-coordinate of the mouse, in pixels.

The documentation for this class was generated from the following file: