LuciadCPillar C# 2023.1.04
Luciad.Edit.Handles.TranslateEditHandle Class Reference

This handle allows you to translate a feature by translating its geometry using ITranslateEditAction. More...

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

Public Member Functions

 TranslateEditHandle (Luciad.Geodesy.CoordinateReference reference, Luciad.Edit.Features.FeatureEditContext context)
 
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 AddOnDragAction (Luciad.Edit.Handles.ITranslateEditAction action)
 
void Dispose ()
 
Luciad.Edit.Handles.EditHandleState GetEditState ()
 
Luciad.Maps.? MouseCursor GetMouseCursor ()
 
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 ()
 
Luciad.Maps.? MouseCursor GetMouseCursor ()
 
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.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle ShadowComplexStrokeLineStyle [get, set]
 
Luciad.Layers.Styles.FillStyle ShadowFillStyle [get, set]
 
Luciad.Geometries.Geometry ShadowGeometry [get]
 
Luciad.Utils.Observable< Luciad.Geometries.GeometryShadowGeometryProvider [get, set]
 
Luciad.Drawing.IIcon ShadowIcon [get, set]
 
Luciad.Layers.Styles.LineStyle ShadowLineStyle [get, set]
 
int ZOrder [get, set]
 

Detailed Description

This handle allows you to translate a feature by translating its geometry using ITranslateEditAction.

This handle can operate in 2 modes: 1) Feature mode: the handle is highlighted and can be interacted with when the feature is touched.

the handle does not paint anything. It depends on the original Feature being painted. you can drag the feature the EditHandleState and cursor are changed accordingly

2) Shadow geometry mode: this mode is enabled when a shadow geometry provider is configured that provides a non-nullptr shadow geometry. A shadow geometry is a draped version of a geometry. In that case the handle is highlighted and can be interacted with when that shadow geometry is touched.

the handle paints a shadow geometry you can drag the shadow instead of the feature the EditHandleState and cursor are changed accordingly

If the shadow geometry provider returns nullptr, Feature mode is enabled. This handle uses drag events to call ITranslateEditAction::translate. 2020.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::TranslateEditHandle.

Constructor & Destructor Documentation

◆ TranslateEditHandle()

Luciad.Edit.Handles.TranslateEditHandle.TranslateEditHandle ( Luciad.Geodesy.CoordinateReference  reference,
Luciad.Edit.Features.FeatureEditContext  context 
)
inline

Member Function Documentation

◆ AddEditStateObserver()

void Luciad.Edit.Handles.TranslateEditHandle.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.

observer

an observer

InvalidArgumentException

when the observer was already added.

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::addEditStateObserver.

Implements Luciad.Edit.Handles.IEditHandle.

◆ AddOnDragAction()

Luciad.Edit.Handles.EditActionBinder Luciad.Edit.Handles.TranslateEditHandle.AddOnDragAction ( Luciad.Edit.Handles.ITranslateEditAction  action)
inline

◆ Dispose()

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

◆ GetEditState()

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

the current state of this handle.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::getEditState.

Implements Luciad.Edit.Handles.IEditHandle.

◆ GetMouseCursor()

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

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, std::nullopt can be returned.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::getMouseCursor.

Implements Luciad.Edit.Handles.IEditHandle.

◆ OnEvent()

Luciad.Controllers.EventResult Luciad.Edit.Handles.TranslateEditHandle.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

inputEvent

the event to handle, cannot be nullptr

context

the context, cannot be nullptr

if the event was consumed or not

NullArgumentException

when nullptr is passed.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::onEvent.

Implements Luciad.Edit.Handles.IEditHandle.

◆ Paint()

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

Paints this handle on the given canvas.

This method is called when the handle's IEditHandles fires an EditHandlesEvent containing this handle, when the handle is newly added or removed for example. the handle triggers a new paint call itself by calling its invalidation callback.

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

canvas

the canvas on which this handle gets painted.

context

the context, cannot be nullptr

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::paint.

Implements Luciad.Edit.Handles.IEditHandle.

◆ RemoveEditStateObserver()

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

Removes the given observer.

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

observer

an observer

InvalidArgumentException

when the observer is not known.

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::removeEditStateObserver.

Implements Luciad.Edit.Handles.IEditHandle.

◆ SetInvalidationCallback()

void Luciad.Edit.Handles.TranslateEditHandle.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.

invalidationCallback

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

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IEditHandle::setInvalidationCallback.

Implements Luciad.Edit.Handles.IEditHandle.

Property Documentation

◆ ShadowComplexStrokeLineStyle

Luciad.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle Luciad.Edit.Handles.TranslateEditHandle.ShadowComplexStrokeLineStyle
getset

◆ ShadowFillStyle

Luciad.Layers.Styles.FillStyle Luciad.Edit.Handles.TranslateEditHandle.ShadowFillStyle
getset

◆ ShadowGeometry

Luciad.Geometries.Geometry Luciad.Edit.Handles.TranslateEditHandle.ShadowGeometry
get

◆ ShadowGeometryProvider

Luciad.Utils.Observable<Luciad.Geometries.Geometry> Luciad.Edit.Handles.TranslateEditHandle.ShadowGeometryProvider
getset

◆ ShadowIcon

Luciad.Drawing.IIcon Luciad.Edit.Handles.TranslateEditHandle.ShadowIcon
getset

◆ ShadowLineStyle

Luciad.Layers.Styles.LineStyle Luciad.Edit.Handles.TranslateEditHandle.ShadowLineStyle
getset

◆ ZOrder

int Luciad.Edit.Handles.TranslateEditHandle.ZOrder
getset