LuciadCPillar 2023.1.04
luciad::IMouseCursorCallback Class Referenceabstract

A callback class that is called when a cursor changes. More...

#include <luciad/maps/IMouseCursorCallback.h>

Public Member Functions

virtual ~IMouseCursorCallback ()=default
 
virtual void onMouseCursorChanged (MouseCursor cursor)=0
 Implement this method to handle a cursor that is returned when the map's cursor changes. More...
 

Static Public Member Functions

static std::shared_ptr< IMouseCursorCallbackcreate (std::function< void(MouseCursor)> function)
 Creates a default IMouseCursorCallback instance that delegates the IMouseCursorCallback::onMouseCursorChanged to the given function. More...
 

Detailed Description

A callback class that is called when a cursor changes.

See for example

Since
2020.1

Constructor & Destructor Documentation

◆ ~IMouseCursorCallback()

virtual luciad::IMouseCursorCallback::~IMouseCursorCallback ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr< IMouseCursorCallback > luciad::IMouseCursorCallback::create ( std::function< void(MouseCursor)>  function)
static

Creates a default IMouseCursorCallback instance that delegates the IMouseCursorCallback::onMouseCursorChanged to the given function.

This is a convenience method that allows to reduce boiler plate code, and use lambdas.

Parameters
functionthe function that is called by IMouseCursorCallback::onMouseCursorChanged
Returns
an IMouseCursorCallback instance based on the given function.

◆ onMouseCursorChanged()

virtual void luciad::IMouseCursorCallback::onMouseCursorChanged ( MouseCursor  cursor)
pure virtual

Implement this method to handle a cursor that is returned when the map's cursor changes.

Parameters
cursorthe mouse cursor.