- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have been working with the Fusion API recently.
I noticed the following in connection with the development of "MouseEventHandler".
The notify member function of the "MouseEventHandler" class receives the address of the "MouseEventArgs" object from the caller.
"void OnMousexxxxxHandler::notify(const Ptr<MouseEventArgs>& eventArgs)"
The "MouseEventArgs" object also includes the "button" property. This is described in the API as follows: "Retrieves which mouse button(s) are pressed.
The returned value is bitwise and can indicate that more than one button is pressed."
If you follow the link under button you will find out that button is of type "enum MouseButtons{...}", which is defined as follows:
/// Mouse button values.
enum MouseButtons
{
/// None
NoMouseButton = 0x0,
/// Left
LeftMouseButton = 0x1,
/// Right
RightMouseButton = 0x2,
/// Middle
MiddleMouseButton = 0x4
};
But that doesn't match the description of "button", because it explicitly states that all key combinations can occur.
Accordingly, the definition for MuoseButtons should look like this:
/// Mouse button values.
enum MouseButtons
{
/// None
NoMouseButton = 0x0,
/// Left
LeftMouseButton = 0x1,
/// Right
RightMouseButton = 0x2,
/// LeftRight
LeftRightMouseButton = 0x3
/// Middle
MiddleMouseButton = 0x4
/// LeftRight
LeftMiddleMouseButton = 0x5
/// LeftRight
MiddleRightMouseButton = 0x6
/// LeftRight
LeftMiddleRightMouseButton = 0x7
};
It has also been noticed that when reading the button value for all types of mouse events (drag, down, up, click, move) either no mouse button is returned
or only the left mouse button is returned as pressed.
This could of course be because the basic software processes the right mouse button or middle mouse button pressed beforehand and no longer passes the information
on to the subsequently installed mouse event.
I would like to know if anyone can give me more detailed information on how this works in the context of ADDÍN development.
Is there, for example, an API function with which all mouse activities are forwarded to a corresponding ADDIN?
Can the first recipients of the mouse events be switched off under certain circumstances so that the ADDIN becomes the first recipient???
Thank you in advance for your advice.
Solved! Go to Solution.