Event Handlers for AspectMouseClicks


Functions

void SmartWin::AspectMouseClicks::onLeftMouseDown (typename MessageMapType::itsVoidFunctionTakingMouseEventResult eventHandler)
 Left mouse button pressed event handler setter.
void SmartWin::AspectMouseClicks::onLeftMouseUp (typename MessageMapType::itsVoidFunctionTakingMouseEventResult eventHandler)
 Left mouse button pressed and released event handler setter.
void SmartWin::AspectMouseClicks::onMiddleMouseUp (typename MessageMapType::itsVoidFunctionTakingMouseEventResult eventHandler)
 Middle mouse button pressed and released event handler setter.
void SmartWin::AspectMouseClicks::onMouseMove (typename MessageMapType::itsVoidFunctionTakingMouseEventResult eventHandler)
 Mouse moved event handler setter.
void SmartWin::AspectMouseClicks::onRightMouseDown (typename MessageMapType::itsVoidFunctionTakingMouseEventResult eventHandler)
 Right mouse button pressed event handler setter.
void SmartWin::AspectMouseClicks::onRightMouseUp (typename MessageMapType::itsVoidFunctionTakingMouseEventResult eventHandler)
 Right mouse button pressed and released event handler setter.

Detailed Description

General info on event handlers and events.
An event handler is a typesafe callback function defined by your application which will be "raised" or called whenever the specified event occurs.
E.g. if you define a WidgetWindow::onClosing event handler for a WidgetWindow widget your function will be called when your widget is being closed.
All event handlers are completely typesafe which means if you don't supply the right signature or try to set an event handler to a member of another class you will get a compile bug.
Also all events can be set to either a global/static member function or a member function of your derived WidgetWindow class, if you're setting an event handler to a global or static function you will recieve a pointer to the calling widget in the event handler (it will be expected to be part of the function signature) if you're setting an event handler to a member function of your class, this is not necessary off course since you will then be able to access the widget anyway. Also all Event Handlers handled by the "parent" Widget or another Widget then the Widget raising the event will demand passing the Widget pointer as the first parameter to the event handler function. Meaning a member version of an event for a WidgetButton taking an integer returning a bool will look like this; bool foo( WidgetButton * btn, int value ); and must be a member of the parent class. A global/static event handler for the same event if the class name is Bar will look like this; bool foo( Bar * bar, WidgetButton * btn, int value );

Function Documentation

void onLeftMouseDown ( typename MessageMapType::itsVoidFunctionTakingMouseEventResult  eventHandler  )  [inherited]

Left mouse button pressed event handler setter.

If supplied, function will be called when user press the Left Mouse button in the client area of the widget.
The parameter passed is const MouseEventResult & which contains the state of the mouse.

void onLeftMouseUp ( typename MessageMapType::itsVoidFunctionTakingMouseEventResult  eventHandler  )  [inherited]

Left mouse button pressed and released event handler setter.

If supplied, function will be called when user releases the Left Mouse button after clicking onto the client area of the Widget.
The parameter passed is const MouseEventResult & which contains the state of the mouse.

void onMiddleMouseUp ( typename MessageMapType::itsVoidFunctionTakingMouseEventResult  eventHandler  )  [inherited]

Middle mouse button pressed and released event handler setter.

If supplied, function will be called when user releases the middle Mouse button after clicking onto the client area of the Widget.
The parameter passed is const MouseEventResult & which contains the state of the mouse.

void onMouseMove ( typename MessageMapType::itsVoidFunctionTakingMouseEventResult  eventHandler  )  [inherited]

Mouse moved event handler setter.

If supplied, function will be called when user moves the mouse.
The parameter passed is const MouseEventResult & which contains the state of the mouse.

void onRightMouseDown ( typename MessageMapType::itsVoidFunctionTakingMouseEventResult  eventHandler  )  [inherited]

Right mouse button pressed event handler setter.

If supplied, function will be called when user press the Right Mouse button in the client area of the widget.
The parameter passed is const MouseEventResult & which contains the state of the mouse.

void onRightMouseUp ( typename MessageMapType::itsVoidFunctionTakingMouseEventResult  eventHandler  )  [inherited]

Right mouse button pressed and released event handler setter.

If supplied, function will be called when user releases the Right Mouse button after clicking onto the client area of the Widget.
The parameter passed is const MouseEventResult & which contains the state of the mouse.

Back to SmartWin website
SourceForge.net Logo