LuciadCPillar 2024.0.04
|
This class can provide edit handles
for a given Geometry.
More...
#include <luciad/edit/geometries/IGeometryHandlesProvider.h>
Public Member Functions | |
virtual | ~IGeometryHandlesProvider ()=default |
virtual bool | canProvide (const std::shared_ptr< Observable< std::shared_ptr< Geometry > > > &geometry, const std::shared_ptr< FeatureEditContext > &context) const =0 |
Indicates if this handles provider can create handles for the given geometry. More... | |
virtual std::shared_ptr< IEditHandles > | provide (std::shared_ptr< Observable< std::shared_ptr< Geometry > > > geometry, const std::shared_ptr< FeatureEditContext > &context, std::shared_ptr< IGeometryEditCallback > geometryEditCallback) const =0 |
Returns the handles for the given feature. More... | |
virtual std::shared_ptr< ITranslateEditAction > | provideTranslateAction (std::shared_ptr< Observable< std::shared_ptr< Geometry > > > geometry, const std::shared_ptr< FeatureEditContext > &context, std::shared_ptr< IGeometryEditCallback > geometryEditCallback) const =0 |
Provides a translate action that can be used by the caller to add translation behavior. More... | |
This class can provide edit handles
for a given Geometry.
The given Geometry is passed to this provider as an Observable. This object allows Editor
to communicate
geometry changes
to the IEditHandles
implementations, who can use it to create and update their collection of handles. Editing changes originating from IEditHandles
are communicated to the Editor
or handles wrappers
by calling IGeometryEditCallback
. See also the related guide on editing interactions.
This class is typically used in the context of feature editing
, when a feature is edited by modifying its geometry.
It has a default implementation
that supports many geometries.
See the related guide for an overview of the editing API.
|
virtualdefault |
|
pure virtual |
Indicates if this handles provider can create handles for the given geometry.
geometry | an observable geometry, cannot be nullptr |
context | the context. Contains additional information about the edited feature, cannot be nullptr . |
Implemented in luciad::CompositeGeometryHandlesProvider, luciad::PatchHandlesProvider, luciad::PointHandlesProvider, luciad::PolygonHandlesProvider, luciad::PolylineHandlesProvider, and luciad::PolylineRingHandlesProvider.
|
pure virtual |
Returns the handles for the given feature.
Note: translation
of features is handled by IFeatureHandlesProvider
. So geometry handles providers should not provide handles to translate a geometry.
geometry | the observable geometry for which to provide handles, cannot be nullptr . |
context | the context. Contains additional information about the edited feature, cannot be nullptr . |
geometryEditCallback | a callback that notifies the caller when the Feature has changed, cannot be nullptr . |
nullptr
. Implemented in luciad::CompositeGeometryHandlesProvider, luciad::PatchHandlesProvider, luciad::PointHandlesProvider, luciad::PolygonHandlesProvider, luciad::PolylineHandlesProvider, and luciad::PolylineRingHandlesProvider.
|
pure virtual |
Provides a translate action that can be used by the caller to add translation behavior.
A translation handle is typically added by an IFeatureHandlesProvider
, like for example the FeatureHandlesProvider
implementation. It calls this method to retrieve a translate action, and uses it to create a TranslateEditHandle
.
When ITranslateEditAction::translate
is called, the returned implementation must:
IGeometryEditCallback
with the resulting geometrygeometry | the observable geometry for which to provide a translate action, cannot be nullptr |
context | the context, cannot be nullptr |
geometryEditCallback | a callback that notifies the caller of this method when a translation has occurred, cannot be nullptr |
nullptr
. Implemented in luciad::CompositeGeometryHandlesProvider, luciad::PatchHandlesProvider, luciad::PointHandlesProvider, luciad::PolygonHandlesProvider, luciad::PolylineHandlesProvider, and luciad::PolylineRingHandlesProvider.