LuciadCPillar 2024.0.04
|
This handles provider can create handles to edit Polygon
geometries.
More...
#include <luciad/edit/geometries/PolygonHandlesProvider.h>
Public Member Functions | |
PolygonHandlesProvider () | |
Creates a new handles provider that can create handles for a Polygon geometry. More... | |
~PolygonHandlesProvider () override | |
bool | canProvide (const std::shared_ptr< Observable< std::shared_ptr< Geometry > > > &geometry, const std::shared_ptr< FeatureEditContext > &context) const override |
Indicates if this handles provider can create handles for the given geometry. More... | |
std::shared_ptr< IGeometryHandlesProvider > | getPolylineRingHandlesProvider () const |
Returns the IGeometryHandlesProvider that is used to provide handles for exterior and interior PolylineRing instances. More... | |
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 override |
Returns the handles for the given feature. More... | |
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 override |
Provides a translate action that can be used by the caller to add translation behavior. More... | |
void | setPolylineRingHandlesProvider (std::shared_ptr< IGeometryHandlesProvider > provider) |
Sets the IGeometryHandlesProvider that is used to provide handles for the exterior and interior PolylineRing instances. More... | |
Public Member Functions inherited from luciad::IGeometryHandlesProvider | |
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 handles provider can create handles to edit Polygon
geometries.
It delegates its handle creation to a delegate IGeometryHandlesProvider
for its exterior and interior PolylineRing
instances.
Note: the handle to translate the entire feature is typically created by the IFeatureHandlesProvider
. FeatureHandlesProvider
does this by default.
Limitations of this handle provider:
PolylineRing
instancesPolylineRing
instancesPolylineRing
instances that overlap with other PolylineRing
instances, or that self-overlap.luciad::PolygonHandlesProvider::PolygonHandlesProvider | ( | ) |
Creates a new handles provider that can create handles for a Polygon geometry.
|
override |
|
overridevirtual |
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 . |
Implements luciad::IGeometryHandlesProvider.
std::shared_ptr< IGeometryHandlesProvider > luciad::PolygonHandlesProvider::getPolylineRingHandlesProvider | ( | ) | const |
Returns the IGeometryHandlesProvider
that is used to provide handles for exterior and interior PolylineRing
instances.
IGeometryHandlesProvider
that is used to provide handles for exterior and interior PolylineRing
instances.
|
overridevirtual |
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
. Implements luciad::IGeometryHandlesProvider.
|
overridevirtual |
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
. Implements luciad::IGeometryHandlesProvider.
void luciad::PolygonHandlesProvider::setPolylineRingHandlesProvider | ( | std::shared_ptr< IGeometryHandlesProvider > | provider | ) |
Sets the IGeometryHandlesProvider
that is used to provide handles for the exterior and interior PolylineRing
instances.
If this method is not called, a default
implementation is used.
provider | the IGeometryHandlesProvider to use, cannot be nullptr . |
NullArgumentException | when nullptr is passed. |