A sub-class of DgnElementSetTool for the purpose of creating planar regions. More...
Classes | |
struct | DgnRegionElementTool |
Functions | |
RegionGraphicsContext * | GetRegionContext () |
Get the current RegionGraphicsContext used by the tool. More... | |
RegionToolPhase | GetCurrentToolPhase () |
Get the current tool phase. More... | |
bool | IsFloodRegionSelected () |
Returns true if there is a valid flood region result preview. More... | |
virtual DgnPlatform::RegionParams const & | _GetRegionParams ()=0 |
Return RegionParams to use for REGION_CREATE_ByParams. More... | |
virtual RegionCreateMode | _GetRegionCreateMode ()=0 |
Return the desired RegionCreateMode. More... | |
virtual BentleyStatus | _OnProcessRegionResult (EditElementHandleR elHandle)=0 |
Called with region result. The tool is responsible for setting symbology and adding to a DgnModel as needed. More... | |
virtual StatusInt | _DoComputeRegionResult (ElementAgendaR result, DgnButtonEventCR ev) |
Create the new region elements that are a result of the given region creation parameters and options. More... | |
virtual void | _GetRegionPreviewSymbology (UInt32 &lineColorTBGR, UInt32 &fillColorTBGR, UInt32 &lineWeight, UInt32 &lineStyle, ViewportR, DgnDrawMode) |
Provided to allow sub-classes to override the default symbology used to for region preview and flood dynamic area. More... | |
virtual WCharCP | _GetAssociativeRegionName () |
Default cell name used when creating an Associative Region element. More... | |
virtual StatusInt | _OnElementModify (EditElementHandleR eeh) |
Called only if _WantProcessOriginals returns true. Invalidate eeh and return SUCCESS to delete element. More... | |
virtual bool | _WantProcessOriginals () |
Return true if the tool wants to process the original elements that were directly involved in creating the result region. More... | |
virtual bool | _WantFloodDynamicArea () |
Return true if the tool wants region flood dynamics using the current cursor location as the flood seed point. More... | |
virtual bool | _AllowPhysicallyClosed () |
Return true to allow physically closed open paths as boundary candidates. More... | |
virtual bool | _AcceptClosedElement (ElementHandleCR eh, WStringR cantAcceptReason) |
Called from _OnPostLocate and _FilterAgendaEntries to reject invalid boundary candidates. More... | |
virtual bool | _IsModifyOriginal () override |
Don't copy the originals. More... | |
virtual bool | _DoGroups () override |
Whether to allow named and graphic groups. More... | |
virtual bool | _WantDynamics () override |
Whether to start tool dynamics. More... | |
virtual bool | _WantAccuSnap () override |
Whether to enable AccuSnap. More... | |
virtual bool | _WantAdditionalLocate (DgnButtonEventCP ev) override |
Require a minimum number of selected elements/areas, checks for control key to allow additional selection. More... | |
virtual bool | _NeedAcceptPoint () override |
Whether an explicit data point is requires to accept the region result. More... | |
virtual bool | _AcceptIdentifiesNext () override |
Whether data point to accept can also identify new element/area. More... | |
virtual UsesDragSelect | _AllowDragSelect () override |
Whether to allow elements to be selected by crossing line (Allowed for element/boolean modes). More... | |
virtual bool | _CheckStop () override |
Allow abort of region creation using reset. More... | |
virtual void | _ResetStop () override |
Initialize abort processing. More... | |
virtual void | _DrawTransients (ViewContextR context, bool isPreUpdate) override |
Use to preview the region result that will be accepted. More... | |
virtual void | _DecorateScreen (ViewportR vp) override |
Used to show dynamic region result under the cursor. More... | |
virtual StatusInt | _ProcessAgenda (DgnButtonEventCR ev) override |
virtual void | _HiliteAgendaEntries (bool changed) override |
Show boolean region result preview (IViewTransients). More... | |
virtual void | _UnHiliteAgendaEntries (bool empty) override |
Clear boolean region result preview (IViewTransients). More... | |
virtual bool | _OnPostLocate (HitPathCP path, WStringR cantAcceptReason) override |
Check for valid boundary candidates. More... | |
virtual bool | _FilterAgendaEntries () override |
Check for valid boundary candidates when creating region from a selection set. More... | |
virtual void | _SetLocateCriteria () override |
Setup search modelRef list. More... | |
virtual void | _SetupAndPromptForNextAction () override |
Output default prompts, enable/disable AccuSnap and AutoLocate. More... | |
virtual void | _OnDynamicFrame (DgnButtonEventCR ev) override |
Used for create dynamics when defining a region by points (REGION_CREATE_Points). More... | |
virtual bool | _OnModelMotion (DgnButtonEventCR ev) override |
Request _DecorateScreen be called for flood dynamic area. More... | |
virtual bool | _OnModifierKeyTransition (bool wentDown, int key) override |
Used to monitor control key up/down event for additional selection. More... | |
virtual bool | _OnModifyComplete (DgnButtonEventCR ev) override |
Exit or restart tool after accepting region result. More... | |
virtual bool | _OnResetButton (DgnButtonEventCR ev) override |
Accept region by points, cycle between over-lapping elements, restart or exit tool. More... | |
virtual bool | _OnDataButton (DgnButtonEventCR ev) override |
Identify elements/area and advance tool state. More... | |
virtual void | _OnUndoPreviousStep () override |
Used to undo last point when defining a region by points (REGION_CREATE_Points). More... | |
virtual void | _OnCleanup () override |
Add tool instance to registered IViewTransients providers. More... | |
virtual void | _OnPostInstall () override |
Drop tool instance from registered IViewTransients providers. More... | |
DgnRegionElementTool () | |
Default constructor for DgnRegionElementTool. Can only create an instance of a sub-class that implements the required pure-virtual methods. More... | |
A sub-class of DgnElementSetTool for the purpose of creating planar regions.
Regions can be created through 2d booleans or by flood using one or more seed points. The result regions have the option of being associated with the original boundary elements such that they will update when/if those boundary elements are modified. This tool class provides a wrapper around RegionGraphicsContext to help with interactive region creation.
enum RegionCreateMode |
enum RegionToolPhase |
|
protectedvirtual |
Called from _OnPostLocate and _FilterAgendaEntries to reject invalid boundary candidates.
|
overrideprotectedvirtual |
Whether data point to accept can also identify new element/area.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Whether to allow elements to be selected by crossing line (Allowed for element/boolean modes).
Reimplemented from DgnElementSetTool.
|
protectedvirtual |
Return true to allow physically closed open paths as boundary candidates.
|
overrideprotectedvirtual |
Allow abort of region creation using reset.
Reimplemented from ModifyOp.
|
overrideprotectedvirtual |
Used to show dynamic region result under the cursor.
Reimplemented from DgnElementSetTool.
|
protectedvirtual |
Create the new region elements that are a result of the given region creation parameters and options.
Afterwards, _OnProcessRegionResult will be called for each result region to allow the tool to make necessary modifications.
[out] | result | The result region elements that have been created. |
[in] | ev | The accept point. |
|
overrideprotectedvirtual |
Whether to allow named and graphic groups.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Use to preview the region result that will be accepted.
Implements IViewTransients.
|
overrideprotectedvirtual |
Check for valid boundary candidates when creating region from a selection set.
Reimplemented from DgnElementSetTool.
|
protectedvirtual |
Default cell name used when creating an Associative Region element.
|
protectedpure virtual |
Return the desired RegionCreateMode.
|
protectedpure virtual |
Return RegionParams to use for REGION_CREATE_ByParams.
|
protectedvirtual |
Provided to allow sub-classes to override the default symbology used to for region preview and flood dynamic area.
A DgnDrawMode of DRAW_MODE_Flash means it for flood dynamic display.
|
overrideprotectedvirtual |
Show boolean region result preview (IViewTransients).
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Don't copy the originals.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Whether an explicit data point is requires to accept the region result.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Add tool instance to registered IViewTransients providers.
Reimplemented from DgnTool.
|
overrideprotectedvirtual |
Identify elements/area and advance tool state.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Used for create dynamics when defining a region by points (REGION_CREATE_Points).
Reimplemented from DgnElementSetTool.
|
protectedvirtual |
Called only if _WantProcessOriginals returns true. Invalidate eeh and return SUCCESS to delete element.
Implements DgnElementSetTool.
References Bentley::ERROR.
|
overrideprotectedvirtual |
Request _DecorateScreen be called for flood dynamic area.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Used to monitor control key up/down event for additional selection.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Exit or restart tool after accepting region result.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Drop tool instance from registered IViewTransients providers.
Reimplemented from DgnElementSetTool.
Check for valid boundary candidates.
Reimplemented from DgnElementSetTool.
|
protectedpure virtual |
Called with region result. The tool is responsible for setting symbology and adding to a DgnModel as needed.
|
overrideprotectedvirtual |
Accept region by points, cycle between over-lapping elements, restart or exit tool.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Used to undo last point when defining a region by points (REGION_CREATE_Points).
Reimplemented from DgnPrimitiveTool.
|
overrideprotectedvirtual |
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Initialize abort processing.
Reimplemented from ModifyOp.
|
overrideprotectedvirtual |
Setup search modelRef list.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Output default prompts, enable/disable AccuSnap and AutoLocate.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Clear boolean region result preview (IViewTransients).
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Whether to enable AccuSnap.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Require a minimum number of selected elements/areas, checks for control key to allow additional selection.
Reimplemented from DgnElementSetTool.
|
overrideprotectedvirtual |
Whether to start tool dynamics.
Reimplemented from DgnElementSetTool.
|
protectedvirtual |
Return true if the tool wants region flood dynamics using the current cursor location as the flood seed point.
|
protectedvirtual |
Return true if the tool wants to process the original elements that were directly involved in creating the result region.
DgnRegionElementTool | ( | ) |
Default constructor for DgnRegionElementTool. Can only create an instance of a sub-class that implements the required pure-virtual methods.
|
protected |
Get the current tool phase.
|
protected |
Get the current RegionGraphicsContext used by the tool.
|
protected |
Returns true if there is a valid flood region result preview.