LuciadCPillar C# 2024.0.04
|
This handle allows you to translate a feature by translating its geometry using ITranslateEditAction
.
More...
Public Member Functions | |
TranslateEditHandle (Luciad.Geodesy.CoordinateReference reference, Luciad.Edit.Features.FeatureEditContext context) | |
Creates a new translate handle that allows you to drag around a feature or geometry horizontally. 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 | AddOnDragAction (Luciad.Edit.Handles.ITranslateEditAction action) |
Adds an action that will be triggered when dragging. 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.Layers.Styles.ComplexStrokes.ComplexStrokeLineStyle | ShadowComplexStrokeLineStyle [get, set] |
The complex stroke line style that is used for shadow lines. More... | |
Luciad.Layers.Styles.FillStyle | ShadowFillStyle [get, set] |
The fill style that is used when a shadow version of a geometry is painted. More... | |
Luciad.Geometries.Geometry | ShadowGeometry [get] |
The current shadow geometry of this handle, or null . More... | |
Luciad.Utils.Observable< Luciad.Geometries.Geometry > | ShadowGeometryProvider [get, set] |
The shadow geometry provider of this handle. More... | |
Luciad.Drawing.IIcon | ShadowIcon [get, set] |
The icon that is used when a shadow version of a geometry is painted. More... | |
Luciad.Layers.Styles.LineStyle | ShadowLineStyle [get, set] |
The line style that is used for shadow lines. More... | |
int | ZOrder [get, set] |
The Z-order that is used for this handle's paint calls to the FeatureCanvas . More... | |
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.
Feature
being painted. 2) Shadow geometry mode: this mode is enabled when a shadow geometry provider
is configured that provides a non-null
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.
If the shadow geometry provider returns null
, Feature
mode is enabled.
This handle uses drag events
to call ITranslateEditAction.Translate
.
|
inline |
Creates a new translate handle that allows you to drag around a feature or geometry horizontally.
reference | the coordinate reference in which the translation will occur, cannot be null |
context | the context, cannot be null |
|
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 |
System.ArgumentException | when the observer was already added. |
Implements Luciad.Edit.Handles.IEditHandle.
|
inline |
Adds an action that will be triggered when dragging.
For every drag event, the following method call will be triggered:
ITranslateEditAction.Translate
at the end of the drag sequence, or on every drag update when EditActionBinder.PerformOnIntermediateEvents
is set to true action | the action to be performed on drag, cannot be null . |
|
inline |
|
inline |
Returns the current state of this handle.
Implements Luciad.Edit.Handles.IEditHandle.
|
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.
Implements Luciad.Edit.Handles.IEditHandle.
|
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 null |
context | the context, cannot be null |
System.ArgumentNullException | when null is passed. |
Implements Luciad.Edit.Handles.IEditHandle.
|
inline |
Paints this handle on the given canvas.
This method is called when
IEditHandles
fires an EditHandlesEvent
containing this handle, when the handle is newly added or removed for example. 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 null |
Implements Luciad.Edit.Handles.IEditHandle.
|
inline |
Removes the given observer.
If the given observer was never added, an exception is thrown.
observer | an observer |
System.ArgumentException | when the observer is not known. |
Implements Luciad.Edit.Handles.IEditHandle.
|
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 |
Implements Luciad.Edit.Handles.IEditHandle.
|
getset |
The complex stroke line style that is used for shadow lines.
Returns the complex stroke line style that is used for shadow lines. This method is linked to the ShadowLineStyle
method:
null
, no shadow line is painted null
, that shadow line style is used null
value: they are mutually exclusive Sets the complex stroke line style that is used for shadow lines. Only one shadow 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.
|
getset |
The fill style that is used when a shadow version
of a geometry is painted.
Returns the fill style that is used when a shadow version
of a geometry is painted.
Sets the fill style that is used when a shadow version
of a geometry is painted. Setting this to null
means the shadow version of the geometry won't have a fill style.
|
get |
The current shadow geometry of this handle, or null
.
Returns the current shadow geometry of this handle, or null
.
ShadowGeometryProvider
|
getset |
The shadow geometry provider of this handle.
Returns the shadow geometry provider of this handle. Can be null
.
Sets the shadow geometry provider of this handle. When this provider (or the geometry it returned) is null
, Feature
mode is enabled for this handle. See TranslateEditHandle
for more information.
|
getset |
The icon that is used when a shadow version
of a geometry is painted.
Returns the icon that is used when a shadow version
of a geometry is painted.
Sets the icon that is used when a shadow version
of a geometry is painted.
|
getset |
The line style that is used for shadow lines.
Returns the line style that is used for shadow lines. This method is linked to the ShadowComplexStrokeLineStyle
method:
null
, no shadow line is painted null
, that shadow line style is used null
value: they are mutually exclusive Sets the line style that is used for shadow lines. Only one shadow 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.
|
getset |
The Z-order that is used for this handle's paint calls to the FeatureCanvas
.
Returns the Z-order that is used for this handle's paint calls to the FeatureCanvas
.
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.
ZOrder
. FeatureCanvas
draw commands. For example FeatureCanvas.IconDrawCommand.ZOrder
.