LuciadCPillar C# 2024.1.04
Luciad.Controllers.SelectEventHandler Class Reference

Handler that translates click gesture events to a select operation. More...

Inheritance diagram for Luciad.Controllers.SelectEventHandler:

Public Member Functions

 SelectEventHandler (Luciad.Controllers.SelectMode selectMode)
 Creates a new event handler that uses the given select mode. More...
 
void Dispose ()
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
Luciad.Controllers.EventResult OnClickEvent (Luciad.Input.ClickEvent clickEvent, Luciad.Maps.Map map)
 Changes the FeatureState.selected() state of features located under the event location directly or delegates the selection to the handler if it has been set. More...
 
Luciad.Controllers.EventResult OnTouchLongPressEvent (Luciad.Input.Touch.TouchLongPressEvent touchLongPressEvent, Luciad.Maps.Map map)
 Changes the FeatureState.selected() state of features located under the event location directly or delegates the selection to the handler if it has been set. More...
 

Properties

uint Margin [get, set]
 The margin used to detect if a feature is considered under the mouse cursor or not. More...
 
Luciad.Controllers.ISelectionCandidateChooser SelectionCandidateChooser [get, set]
 The selection candidate chooser that is used to choose which features need to be selected when there are multiple selection candidates. More...
 
uint TouchMargin [get, set]
 The margin used to detect if a feature is considered under a touch point or not. More...
 

Detailed Description

Handler that translates click gesture events to a select operation.

The select mode can be configured using the SelectMode enumeration.

Since
2020.1

Constructor & Destructor Documentation

◆ SelectEventHandler()

Luciad.Controllers.SelectEventHandler.SelectEventHandler ( Luciad.Controllers.SelectMode  selectMode)
inline

Creates a new event handler that uses the given select mode.

Parameters
selectModethe mode.

Member Function Documentation

◆ Dispose()

void Luciad.Controllers.SelectEventHandler.Dispose ( )
inline

◆ Equals()

override bool Luciad.Controllers.SelectEventHandler.Equals ( object  obj)
inline

◆ GetHashCode()

override int Luciad.Controllers.SelectEventHandler.GetHashCode ( )
inline

◆ OnClickEvent()

Luciad.Controllers.EventResult Luciad.Controllers.SelectEventHandler.OnClickEvent ( Luciad.Input.ClickEvent  clickEvent,
Luciad.Maps.Map  map 
)
inline

Changes the FeatureState.selected() state of features located under the event location directly or delegates the selection to the handler if it has been set.

This allows the display of a context menu when multiple features are below the cursor, for example.

Parameters
clickEventa click event. Cannot be null.
mapthe map. Cannot be null.
Returns
whether the click event is consumed or not. The event is not consumed if the amount of clicks is different than 1.
Exceptions
System.ArgumentNullExceptionwhen passing null for the map or the event.
See also
Margin and {SelectEventHandler.TouchMargin TouchMargin} for the margin applied to the mouse cursor or touch point position to detect which features are considered.

◆ OnTouchLongPressEvent()

Luciad.Controllers.EventResult Luciad.Controllers.SelectEventHandler.OnTouchLongPressEvent ( Luciad.Input.Touch.TouchLongPressEvent  touchLongPressEvent,
Luciad.Maps.Map  map 
)
inline

Changes the FeatureState.selected() state of features located under the event location directly or delegates the selection to the handler if it has been set.

This allows the display of a context menu when multiple features are below the cursor, for example.

Parameters
touchLongPressEventa touch long press event.
mapthe map.
Returns
whether the event is consumed or not.
Exceptions
System.ArgumentNullExceptionwhen passing null.
Since
2022.0
See also
TouchMargin for the margin applied to the touch point position to detect which features are considered.

Property Documentation

◆ Margin

uint Luciad.Controllers.SelectEventHandler.Margin
getset

The margin used to detect if a feature is considered under the mouse cursor or not.

[get]

Returns the margin used to detect if a feature is considered under the mouse cursor or not.

[set]

Sets the margin used to detect if a feature is considered under the mouse cursor or not. By default, the margin is 1 pixel.

◆ SelectionCandidateChooser

Luciad.Controllers.ISelectionCandidateChooser Luciad.Controllers.SelectEventHandler.SelectionCandidateChooser
getset

The selection candidate chooser that is used to choose which features need to be selected when there are multiple selection candidates.

[get]

Returns the selection candidate chooser that is used to choose which features need to be selected when there are multiple selection candidates.

[set]

Sets the selection candidate chooser that is used to choose which features need to be selected when there are multiple selection candidates. This selection chooser can for example be implemented by showing a popup menu that allows you to choose the feature to select. By default, this handler is null and no selection is requested.

See also
SelectEventHandler.SelectionCandidateChooser

◆ TouchMargin

uint Luciad.Controllers.SelectEventHandler.TouchMargin
getset

The margin used to detect if a feature is considered under a touch point or not.

[get]

Returns the margin used to detect if a feature is considered under a touch point or not.

[set]

Sets the margin used to detect if a feature is considered under a touch point or not. By default, the margin is 5 pixels.