LuciadCPillar C# 2024.0
Luciad.Edit.Handles.PointEditHandle Class Reference

This handle represents a Point on the Map and can be visualized using an icon. More...

Inheritance diagram for Luciad.Edit.Handles.PointEditHandle:
Luciad.Edit.Handles.IEditHandle

Classes

interface  IVisualAidProvider
 This interface allows to calculate a visual aid line based on the location of the handle. More...
 

Public Member Functions

 PointEditHandle (Luciad.Geometries.Point initialLocation)
 Creates a new PointEditHandle without associated actions. More...
 
 PointEditHandle (Luciad.Utils.Observable< Luciad.Geometries.Point > locationProvider)
 Creates a new PointEditHandle without associated actions. More...
 
void AddEditStateObserver (Luciad.Utils.IInvalidationCallback observer)
 Adds an observer that is called when the edit state of this handle has changed. More...
 
Luciad.Edit.Handles.EditActionBinder AddOnClickAction (Luciad.Edit.Handles.IPointEditAction action, uint clickCount)
 Adds an action that will be triggered when the handle is clicked or tapped (touch). More...
 
Luciad.Edit.Handles.EditActionBinder AddOnDragAction (Luciad.Edit.Handles.IPointEditAction action)
 Adds an action that will be triggered when the handle is dragged. More...
 
Luciad.Edit.Handles.EditActionBinder AddOnMouseMoveAction (Luciad.Edit.Handles.IPointEditAction action)
 Adds an action that will be executed on every mouse move. More...
 
Luciad.Edit.Handles.EditActionBinder AddOnTouchLongPressAction (Luciad.Edit.Handles.IPointEditAction action)
 Adds an action that will be triggered when a long press is performed on a handle. More...
 
void Dispose ()
 
Luciad.Edit.Handles.EditHandleState GetEditState ()
 Returns the current state of this handle. More...
 
Luciad.Maps.? MouseCursor GetMouseCursor ()
 Returns the current mouse cursor that should be displayed for this handle. More...
 
Luciad.Controllers.EventResult OnEvent (Luciad.Input.IInputEvent inputEvent, Luciad.Edit.Features.FeatureEditContext context)
 Handles the given event, and returns if the event was consumed or not. More...
 
void Paint (Luciad.Layers.Features.FeatureCanvas canvas, Luciad.Edit.Features.FeatureEditContext context)
 Paints this handle on the given canvas. More...
 
void RemoveEditStateObserver (Luciad.Utils.IInvalidationCallback observer)
 Removes the given observer. More...
 
void SetInvalidationCallback (Luciad.Utils.IInvalidationCallback invalidationCallback)
 Sets the callback for the handle to call when its visual representation or cursor has changed. More...
 
void AddEditStateObserver (Luciad.Utils.IInvalidationCallback observer)
 Adds an observer that is called when the edit state of this handle has changed. More...
 
Luciad.Edit.Handles.EditHandleState GetEditState ()
 Returns the current state of this handle. More...
 
Luciad.Maps.? MouseCursor GetMouseCursor ()
 Returns the current mouse cursor that should be displayed for this handle. More...
 
Luciad.Controllers.EventResult OnEvent (Luciad.Input.IInputEvent inputEvent, Luciad.Edit.Features.FeatureEditContext context)
 Handles the given event, and returns if the event was consumed or not. More...
 
void Paint (Luciad.Layers.Features.FeatureCanvas canvas, Luciad.Edit.Features.FeatureEditContext context)
 Paints this handle on the given canvas. More...
 
void RemoveEditStateObserver (Luciad.Utils.IInvalidationCallback observer)
 Removes the given observer. More...
 
void SetInvalidationCallback (Luciad.Utils.IInvalidationCallback invalidationCallback)
 Sets the callback for the handle to call when its visual representation or cursor has changed. More...
 

Properties

Luciad.Drawing.IIcon ActiveIcon [get, set]
 The icon to paint when the handle is in an active state. More...
 
Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle ActiveVisualAidComplexStrokeLineStyle [get, set]
 The visual aid line style to use when this handle is in an Active state. More...
 
Luciad.Layers.Styles.LineStyle ActiveVisualAidLineStyle [get, set]
 The visual aid line style to use when this handle is in an Active state. More...
 
Luciad.Drawing.IIcon HighlightedIcon [get, set]
 The icon to paint when the handle is in a highlighted state. More...
 
Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle HighlightedVisualAidComplexStrokeLineStyle [get, set]
 The visual aid complex stroke line style to use when this handle is in a Highlighted state. More...
 
Luciad.Layers.Styles.LineStyle HighlightedVisualAidLineStyle [get, set]
 The visual aid line style to use when this handle is in a Highlighted state. More...
 
bool IsUseFeatureAsHandle [get, set]
 Whether this handle should paint any icons itself. More...
 
Luciad.Geometries.Point Location [get]
 The current location of this handle. More...
 
Luciad.Utils.Observable< Luciad.Geometries.PointLocationProvider [get]
 The location provider of this handle. More...
 
Luciad.Utils.Observable< Luciad.Geometries.PointLocationProviderWhenActive [get, set]
 The location provider to use when the handle is active. More...
 
Luciad.Edit.Handles.EditMoveConstraint MoveConstraint [get, set]
 The move constraint of this point handle. More...
 
Luciad.Drawing.IIcon RegularIcon [get, set]
 The icon to paint when the handle is in a regular state. More...
 
Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle RegularVisualAidComplexStrokeLineStyle [get, set]
 The visual aid complex stroke line style to use when this handle is in an Inactive state. More...
 
Luciad.Layers.Styles.LineStyle RegularVisualAidLineStyle [get, set]
 The visual aid line style to use when this handle is in an Inactive state. More...
 
Luciad.Edit.Handles.PointEditHandle.IVisualAidProvider VisualAidLineProvider [get, set]
 The visual aid line provider that allows to paint a visual aid line together with this handle. More...
 
int ZOrder [get, set]
 The Z-order that is used for this handle's paint calls to the FeatureCanvas. More...
 

Detailed Description

This handle represents a Point on the Map and can be visualized using an icon.

It can be moved around, or react to mouse events.

The handle executes IPointEditAction, based on mouse input events. IEditHandles implementations configure concrete IPointEditAction implementations on this handle to make sure they result in geometry or feature changes. For example, when this handle is dragged around on the Map, an IEditHandles implementation for polylines can make sure that the second point of the polyline is moved.

This class supports the following gestures:

This handle is painted using an icon at its current location.

Since
2020.1

Constructor & Destructor Documentation

◆ PointEditHandle() [1/2]

Luciad.Edit.Handles.PointEditHandle.PointEditHandle ( Luciad.Geometries.Point  initialLocation)
inline

Creates a new PointEditHandle without associated actions.

Parameters
initialLocationthe initial location of the handle, cannot be null

◆ PointEditHandle() [2/2]

Luciad.Edit.Handles.PointEditHandle.PointEditHandle ( Luciad.Utils.Observable< Luciad.Geometries.Point locationProvider)
inline

Creates a new PointEditHandle without associated actions.

Parameters
locationProviderthe location provider of the handle. The handle assumes the location of this point upon construction, while also observing the point to adjust its own location whenever the observable point changes; cannot be null.

Member Function Documentation

◆ AddEditStateObserver()

void Luciad.Edit.Handles.PointEditHandle.AddEditStateObserver ( Luciad.Utils.IInvalidationCallback  observer)
inline

Adds an observer that is called when the edit state of this handle has changed.

Adding the same observer twice is forbidden, and will cause an exception to be thrown.

Parameters
observeran observer
Exceptions
System.ArgumentExceptionwhen the observer was already added.
Since
2023.1

Implements Luciad.Edit.Handles.IEditHandle.

◆ AddOnClickAction()

Luciad.Edit.Handles.EditActionBinder Luciad.Edit.Handles.PointEditHandle.AddOnClickAction ( Luciad.Edit.Handles.IPointEditAction  action,
uint  clickCount 
)
inline

Adds an action that will be triggered when the handle is clicked or tapped (touch).

Parameters
actionthe action to be performed on click, cannot be null.
clickCountthe action will only be performed when an event is received with this click count
Returns
an object on which more options or requirements can be specified regarding the given on-click action, such as the mouse buttons that need to be pressed for the action to be executed.

◆ AddOnDragAction()

Luciad.Edit.Handles.EditActionBinder Luciad.Edit.Handles.PointEditHandle.AddOnDragAction ( Luciad.Edit.Handles.IPointEditAction  action)
inline

Adds an action that will be triggered when the handle is dragged.

The given action is executed at least when the drag gesture starts and ends, and if EditActionBinder.PerformOnIntermediateEvents is set to true, it also gets executed on every intermediate drag event. The action is always called with an EventStatus parameter corresponding to the drag event.

Parameters
actionthe action to be performed on drag, cannot be null.
Returns
an object on which more options or requirements can be specified regarding the given on-drag action, such as the mouse buttons that need to be pressed for the action to be executed.

◆ AddOnMouseMoveAction()

Luciad.Edit.Handles.EditActionBinder Luciad.Edit.Handles.PointEditHandle.AddOnMouseMoveAction ( Luciad.Edit.Handles.IPointEditAction  action)
inline

Adds an action that will be executed on every mouse move.

Parameters
actionthe action to be performed during the mouse move, cannot be null.
Returns
an object on which more options or requirements can be specified regarding the given action, such as the modifier keys that need to be pressed for the action to be executed.

◆ AddOnTouchLongPressAction()

Luciad.Edit.Handles.EditActionBinder Luciad.Edit.Handles.PointEditHandle.AddOnTouchLongPressAction ( Luciad.Edit.Handles.IPointEditAction  action)
inline

Adds an action that will be triggered when a long press is performed on a handle.

Parameters
actionthe action to be performed, cannot be null.
Returns
an object on which more options or requirements can be specified regarding the given on-drag action
Since
2022.1

◆ Dispose()

void Luciad.Edit.Handles.PointEditHandle.Dispose ( )
inline

◆ GetEditState()

Luciad.Edit.Handles.EditHandleState Luciad.Edit.Handles.PointEditHandle.GetEditState ( )
inline

Returns the current state of this handle.

Returns
the current state of this handle.

Implements Luciad.Edit.Handles.IEditHandle.

◆ GetMouseCursor()

Luciad.Maps.? MouseCursor Luciad.Edit.Handles.PointEditHandle.GetMouseCursor ( )
inline

Returns the current mouse cursor that should be displayed for this handle.

This method typically returns a value when this handle is highlighted or active. If not, null can be returned.

Returns
the current mouse cursor that should be displayed for this handle.

Implements Luciad.Edit.Handles.IEditHandle.

◆ OnEvent()

Luciad.Controllers.EventResult Luciad.Edit.Handles.PointEditHandle.OnEvent ( Luciad.Input.IInputEvent  inputEvent,
Luciad.Edit.Features.FeatureEditContext  context 
)
inline

Handles the given event, and returns if the event was consumed or not.

While handling events, IEditHandles can mark themselves as highlighted or as Active. Related to event handling, the main effect of this is that highlighted or active handles get a higher priority compared to other handles: they get the chance to consume events first. See EditHandleState

Parameters
inputEventthe event to handle, cannot be null
contextthe context, cannot be null
Returns
if the event was consumed or not
Exceptions
System.ArgumentNullExceptionwhen null is passed.

Implements Luciad.Edit.Handles.IEditHandle.

◆ Paint()

void Luciad.Edit.Handles.PointEditHandle.Paint ( Luciad.Layers.Features.FeatureCanvas  canvas,
Luciad.Edit.Features.FeatureEditContext  context 
)
inline

Paints this handle on the given canvas.

This method is called when

This method only gets called on the UI thread, so there is no need for additional synchronization.

Parameters
canvasthe canvas on which this handle gets painted.
contextthe context, cannot be null

Implements Luciad.Edit.Handles.IEditHandle.

◆ RemoveEditStateObserver()

void Luciad.Edit.Handles.PointEditHandle.RemoveEditStateObserver ( Luciad.Utils.IInvalidationCallback  observer)
inline

Removes the given observer.

If the given observer was never added, an exception is thrown.

Parameters
observeran observer
Exceptions
System.ArgumentExceptionwhen the observer is not known.
Since
2023.1

Implements Luciad.Edit.Handles.IEditHandle.

◆ SetInvalidationCallback()

void Luciad.Edit.Handles.PointEditHandle.SetInvalidationCallback ( Luciad.Utils.IInvalidationCallback  invalidationCallback)
inline

Sets the callback for the handle to call when its visual representation or cursor has changed.

Calling this callback triggers a new call to this handle's Paint method.

Parameters
invalidationCallbackthe callback for the handle to call when its visual representation has changed

Implements Luciad.Edit.Handles.IEditHandle.

Property Documentation

◆ ActiveIcon

Luciad.Drawing.IIcon Luciad.Edit.Handles.PointEditHandle.ActiveIcon
getset

The icon to paint when the handle is in an active state.

[get]

Returns the icon to paint when the handle is in an active state.

[set]

Sets the icon to paint when the handle is in an active state. This icon is only used when setUseFeatureAsHandle is set to false.

See also
ActiveIcon

◆ ActiveVisualAidComplexStrokeLineStyle

Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle Luciad.Edit.Handles.PointEditHandle.ActiveVisualAidComplexStrokeLineStyle
getset

The visual aid line style to use when this handle is in an Active state.

[get]

Returns the visual aid line style to use when this handle is in an Active state. This method is linked to the ActiveVisualAidLineStyle method:

  • if both of them return null, no visual aid line is painted
  • if one of them is not null, that line style is used
  • it's not possible for both methods to return a non null value: they are mutually exclusive

[set]

Sets the visual aid line style to use when this handle is in an Active state. This style is only used when a visual aid line is set.

Only one active line style can be set, if this function is called with a non null value when a LineStyle has already been set, it will be overwritten.

The default is null, as a linestyle is used as default active visual aid style.

Since
2023.1
See also
ActiveVisualAidComplexStrokeLineStyle

◆ ActiveVisualAidLineStyle

Luciad.Layers.Styles.LineStyle Luciad.Edit.Handles.PointEditHandle.ActiveVisualAidLineStyle
getset

The visual aid line style to use when this handle is in an Active state.

[get]

Returns the visual aid line style to use when this handle is in an Active state. This method is linked to the ActiveVisualAidComplexStrokeLineStyle method:

  • if both of them return null, no visual aid line is painted
  • if one of them is not null, that line style is used
  • it's not possible for both methods to return a non null value: they are mutually exclusive

[set]

Sets the visual aid line style to use when this handle is in an Active state. This style is only used when a visual aid line is set.

Only one active line style can be set, if this function is called with a non null value when a ComplexStrokeLineStyle has already been set, it will be overwritten.

The default is a small, grey line.

See also
ActiveVisualAidLineStyle

◆ HighlightedIcon

Luciad.Drawing.IIcon Luciad.Edit.Handles.PointEditHandle.HighlightedIcon
getset

The icon to paint when the handle is in a highlighted state.

[get]

Returns the icon to paint when the handle is in a highlighted state.

[set]

Sets the icon to paint when the handle is in a highlighted state. This icon is only used when setUseFeatureAsHandle is set to false.

See also
HighlightedIcon

◆ HighlightedVisualAidComplexStrokeLineStyle

Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle Luciad.Edit.Handles.PointEditHandle.HighlightedVisualAidComplexStrokeLineStyle
getset

The visual aid complex stroke line style to use when this handle is in a Highlighted state.

[get]

Returns the visual aid complex stroke line style to use when this handle is in a Highlighted state. This method is linked to the HighlightedVisualAidLineStyle method:

  • if both of them return null, no visual aid line is painted
  • if one of them is not null, that line style is used
  • it's not possible for both methods to return a non null value: they are mutually exclusive

[set]

Sets the visual aid complex stroke line style to use when this handle is in a Highlighted state. This style is only used when a visual aid line is set.

Only one highlighted line style can be set, if this function is called with a non null value when a LineStyle has already been set, it will be overwritten.

The default is null, as a linestyle is used as default highlighted visual aid style.

Since
2023.1
See also
HighlightedVisualAidComplexStrokeLineStyle

◆ HighlightedVisualAidLineStyle

Luciad.Layers.Styles.LineStyle Luciad.Edit.Handles.PointEditHandle.HighlightedVisualAidLineStyle
getset

The visual aid line style to use when this handle is in a Highlighted state.

[get]

Returns the visual aid line style to use when this handle is in a Highlighted state. This method is linked to the HighlightedVisualAidComplexStrokeLineStyle method:

  • if both of them return null, no visual aid line is painted
  • if one of them is not null, that line style is used
  • it's not possible for both methods to return a non null value: they are mutually exclusive

[set]

Sets the visual aid line style to use when this handle is in a Highlighted state. This style is only used when a visual aid line is set.

Only one regular line style can be set, if this function is called with a non null value when a ComplexStrokeLineStyle has already been set, it will be overwritten.

The default is a small, grey line.

See also
HighlightedVisualAidLineStyle

◆ IsUseFeatureAsHandle

bool Luciad.Edit.Handles.PointEditHandle.IsUseFeatureAsHandle
getset

Whether this handle should paint any icons itself.

[get]

Returns whether this handle should paint any icons itself. When set to true, this handle does not paint any icons itself.

[set]

Sets whether this handle should paint any icons itself. When set to true, this handle does not paint any icons for itself. In this case, the handle considers the feature that is being edited for determining whether it is touched or not. Otherwise, when this is set to false, the handle paints itself as an icon and only considers that icon for deciding whether it is touched.

By default, this is false.

See also
setUseFeatureAsHandle

◆ Location

Luciad.Geometries.Point Luciad.Edit.Handles.PointEditHandle.Location
get

The current location of this handle.

[get]

Returns the current location of this handle. Note that this location is not necessarily equal to the location provider at all times. For example, they may differ when the handle is dragged around and no location changes are triggered in the location provider.

◆ LocationProvider

Luciad.Utils.Observable<Luciad.Geometries.Point> Luciad.Edit.Handles.PointEditHandle.LocationProvider
get

The location provider of this handle.

[get]

Returns the location provider of this handle. Note that the handle's current location is not necessarily equal to this location provider at all times. For example, they may differ when the handle is dragged around and no location changes are triggered in this location provider. Additionally, the handle may have a different location provider when it is active. See LocationProviderWhenActive.

◆ LocationProviderWhenActive

Luciad.Utils.Observable<Luciad.Geometries.Point> Luciad.Edit.Handles.PointEditHandle.LocationProviderWhenActive
getset

The location provider to use when the handle is active.

[get]

Returns the location provider to use when the handle is active. Can be null if no distinct location provider is set for when the handle is active.

[set]

Sets the location provider to use when the handle is active. If set, this overrides the regular location provider when the handle is active.

Can be null.

◆ MoveConstraint

Luciad.Edit.Handles.EditMoveConstraint Luciad.Edit.Handles.PointEditHandle.MoveConstraint
getset

The move constraint of this point handle.

[get]

Returns the move constraint of this point handle.

[set]

Sets the move constraint of this point handle. By default, this is EditMoveConstraint.XY.

◆ RegularIcon

Luciad.Drawing.IIcon Luciad.Edit.Handles.PointEditHandle.RegularIcon
getset

The icon to paint when the handle is in a regular state.

[get]

Returns the icon to paint when the handle is in a regular state.

[set]

Sets the icon to paint when the handle is in a regular state. This icon is only used when setUseFeatureAsHandle is set to false.

See also
RegularIcon

◆ RegularVisualAidComplexStrokeLineStyle

Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle Luciad.Edit.Handles.PointEditHandle.RegularVisualAidComplexStrokeLineStyle
getset

The visual aid complex stroke line style to use when this handle is in an Inactive state.

[get]

Returns the visual aid complex stroke line style to use when this handle is in an Inactive state. This method is linked to the RegularVisualAidLineStyle method:

  • if both of them return null, no visual aid line is painted
  • if one of them is not null, that line style is used
  • it's not possible for both methods to return a non null value: they are mutually exclusive

[set]

Sets the visual aid complex stroke line style to use when this handle is in an Inactive state. This style is only used when a visual aid line is set.

Only one regular line style can be set, if this function is called with a non null value when a LineStyle has already been set, it will be overwritten.

The default is null, as a linestyle is used as default regular visual aid style.

Since
2023.1
See also
RegularVisualAidComplexStrokeLineStyle

◆ RegularVisualAidLineStyle

Luciad.Layers.Styles.LineStyle Luciad.Edit.Handles.PointEditHandle.RegularVisualAidLineStyle
getset

The visual aid line style to use when this handle is in an Inactive state.

[get]

Returns the visual aid line style to use when this handle is in an Inactive state. This method is linked to the RegularVisualAidComplexStrokeLineStyle method:

  • if both of them return null, no visual aid line is painted
  • if one of them is not null, that line style is used
  • it's not possible for both methods to return a non null value: they are mutually exclusive

[set]

Sets the visual aid line style to use when this handle is in an Inactive state. This style is only used when a visual aid line is set.

Only one regular line style can be set, if this function is called with a non null value when a ComplexStrokeLineStyle has already been set, it will be overwritten.

The default is a small, grey line.

See also
RegularVisualAidLineStyle

◆ VisualAidLineProvider

Luciad.Edit.Handles.PointEditHandle.IVisualAidProvider Luciad.Edit.Handles.PointEditHandle.VisualAidLineProvider
getset

The visual aid line provider that allows to paint a visual aid line together with this handle.

[get]

Returns the visual aid line provider that allows to paint a visual aid line together with this handle.

[set]

Sets the visual aid line provider that allows to paint a visual aid line together with this handle. It is not possible to interact with this line. The line style can be configured using RegularVisualAidLineStyle.

If null, no visual aid line is painted. The default is null.

See also
VisualAidLineProvider

◆ ZOrder

int Luciad.Edit.Handles.PointEditHandle.ZOrder
getset

The Z-order that is used for this handle's paint calls to the FeatureCanvas.

[get]

Returns the Z-order that is used for this handle's paint calls to the FeatureCanvas.

[set]

Sets the Z-order that is used for this handle's paint calls to the FeatureCanvas. This Z-order determines which handles are painted on top, when multiple handles overlap. Edit handles with a higher Z-order are painted on top of handles with a lower Z-order. Note: Highlighted edit handles are always painted above regular handles, and active handles are always painted above highlighted handles.

Must be between [-1000,1000]. The default value is 0.

See also
ZOrder.
FeatureCanvas draw commands. For example FeatureCanvas.IconDrawCommand.ZOrder.