FormIt C++ API  v23.0.0 (2023.0.0)
WSM::Utils::IAppHelper Class Referenceabstract

Description

IAppHelper is the interface for an application helper class.class IAppHelper.

An implementation of this must be provided by the host application It is used to gather app-specific information, and to send messages to the host app.

#include <interfaces.h>

Public Types

enum  InferenceEventId { kInferenceChanged, kInferenceLockedChanged }
 Broadcast an inference event. More...
 

Public Member Functions

virtual ~IAppHelper ()
 
virtual void NewModel ()=0
 Request a new model. More...
 
virtual size_t GetHistoryID ()=0
 Request the id of the history being edited - app supplied. More...
 
virtual size_t GetDisplayHistoryID ()=0
 Request the id of the top level history being displayed - app supplied. More...
 
virtual WSM::GroupInstancePath GetEditingPath () const =0
 Request the Editing path, app supplied. More...
 
virtual bool IsInEditingHistory (GroupInstancePath const &, bool bAllowReferencedGeometrySelection=false)=0
 Is this object in the history that is currently being edited. More...
 
virtual ITooltipProviderGetTooltipProvider ()=0
 Request the ITooltipProvider to add tooltips. More...
 
virtual WSM::Transf3d GetLCS (bool includeHistoryLCS=true) const =0
 Get the App's current LCS. More...
 
virtual bool IsUsingTouch () const =0
 Is the App using a touch interface. More...
 
virtual bool SnapToGridDistance (const Point3d &basePoint, const UnitVector3d &direction, double &snapDist) const =0
 Snaps the provided distance from the basePoint along direction to the appropriate grid interval. More...
 
virtual void showNotification (WSM::Result const &wsmres, 1::string const &message={}, bool bSelectObjectsFromResult=false, int nTimeout=0)=0
 Display a modeless error or warning notification to the user for a period of time. More...
 
virtual void SelectObjects (1::vector< WSM::GroupInstancePath > const &paths, bool bQuiet=false)=0
 Causes the app to select the given objects. More...
 
virtual ICameraGetCamera ()=0
 Get the camera interface for the current view. More...
 
virtual ::vector< WSM::PlaneGetSectionPlanes () const =0
 Get the active section planes in the app. More...
 
virtual ::vector< WSM::GroupInstancePath > const & GetSectionInstances () const =0
 Get the instances representing the section planes. More...
 
virtual bool IsLayerVisible (const WSM::ObjectHistoryID &layerId)=0
 Check whether a WSM layer is visible or not. More...
 
virtual bool IsLayerPickable (const WSM::ObjectHistoryID &layerId)=0
 Check whether a WSM layer is pickable or not. More...
 
virtual bool IsObjectHiddenByLayer (const WSM::ObjectHistoryID &nId)=0
 Check whether a WSM object is hidden or not. More...
 
virtual bool IsObjectNotPickableByLayer (const WSM::ObjectHistoryID &nId)=0
 Check whether a WSM object is pickable or not. More...
 
virtual void InferenceEvent (InferenceEventId eventId, const 1::any &payLoad)=0
 
virtual bool GetShowEditedGroupOnly () const =0
 Return the "get show edited group only" option. More...
 
virtual void StartActiveWidgetID (size_t widgId)=0
 These are helpers to store the current dimension widget ID being edited to be able to determine what dimension on the screen is being edited when multiple dimension are on the screen in a tool. More...
 
virtual void EndActiveWidgetID ()=0
 
virtual size_t GetActiveWidgetID ()=0
 
virtual void ShowSelectionHighlights (bool show)=0
 Turn selection highlights on/off. More...
 
virtual WSM::Result GetTextureInfo (size_t historyId, size_t textureId, size_t &hRes, size_t &vRes)=0
 Get info for a texture. Returns the horizontal and vertical pixel resolution. More...
 
virtual const WSM::GroupInstancePathGetFirstSelectedObject ()=0
 Get the object that was first selected, or an invalid object, if that information is not available (such as from area selection). More...
 
virtual const WSM::GroupInstancePathGetContextMenuObject (WSM::Point2d *pickPoint)=0
 Get the object selected from the context menu click. More...
 
virtual double GetCurveAccuracyOrCountCurrent ()=0
 Get the current curve facet accuracy. More...
 
virtual double GetSurfaceAccuracyOrCountCurrent ()=0
 Get the current surface facet accuracy. More...
 
virtual bool NoInferencingSmoothEdgesAndPoints ()=0
 Get the no inferencing smooth edges or points flag. More...
 
virtual double GetWorldBounds ()=0
 Get the "extent" of the world. More...
 
virtual bool IsTestRunning ()=0
 Returns true if a test is running. More...
 
virtual bool GetShowPickToleranceDebug ()=0
 Update the debug drawing of the pick tolerance. More...
 
virtual void SetShowPickToleranceDebug (bool bShow)=0
 
virtual void DrawPickToleranceDebug (const WSM::Point2d &screenPoint, double dScreenRadius)=0
 

Member Enumeration Documentation

Broadcast an inference event.

Enumerator
kInferenceChanged 

Inference changed payload : std::pair<IInferencePtr,IInferencePtr> previous and current inference, (nullptr, if no inference)

kInferenceLockedChanged 

Inference axis lock changed payload : bool.

Constructor & Destructor Documentation

virtual WSM::Utils::IAppHelper::~IAppHelper ( )
inlinevirtual

Member Function Documentation

virtual void WSM::Utils::IAppHelper::DrawPickToleranceDebug ( const WSM::Point2d screenPoint,
double  dScreenRadius 
)
pure virtual
virtual void WSM::Utils::IAppHelper::EndActiveWidgetID ( )
pure virtual
virtual size_t WSM::Utils::IAppHelper::GetActiveWidgetID ( )
pure virtual
virtual ICamera* WSM::Utils::IAppHelper::GetCamera ( )
pure virtual

Get the camera interface for the current view.

virtual const WSM::GroupInstancePath& WSM::Utils::IAppHelper::GetContextMenuObject ( WSM::Point2d pickPoint)
pure virtual

Get the object selected from the context menu click.

Used by tools that are interested which object was picked through the context menu click. Returns an invalid object, if that information is not available If pickPoint is supplied it will be assigned the 2d normalized screen point with which the context menu was invoked

virtual double WSM::Utils::IAppHelper::GetCurveAccuracyOrCountCurrent ( )
pure virtual

Get the current curve facet accuracy.

virtual size_t WSM::Utils::IAppHelper::GetDisplayHistoryID ( )
pure virtual

Request the id of the top level history being displayed - app supplied.

virtual WSM::GroupInstancePath WSM::Utils::IAppHelper::GetEditingPath ( ) const
pure virtual

Request the Editing path, app supplied.

If not valid, editing the displayed history.

virtual const WSM::GroupInstancePath& WSM::Utils::IAppHelper::GetFirstSelectedObject ( )
pure virtual

Get the object that was first selected, or an invalid object, if that information is not available (such as from area selection).

virtual size_t WSM::Utils::IAppHelper::GetHistoryID ( )
pure virtual

Request the id of the history being edited - app supplied.

virtual WSM::Transf3d WSM::Utils::IAppHelper::GetLCS ( bool  includeHistoryLCS = true) const
pure virtual

Get the App's current LCS.

includeHistoryLCS controls whether the History's LCS (APIGetLocalCoordinateSystemReadOnly) is also included.

virtual ::vector<WSM::GroupInstancePath> const& WSM::Utils::IAppHelper::GetSectionInstances ( ) const
pure virtual

Get the instances representing the section planes.

virtual ::vector<WSM::Plane> WSM::Utils::IAppHelper::GetSectionPlanes ( ) const
pure virtual

Get the active section planes in the app.

virtual bool WSM::Utils::IAppHelper::GetShowEditedGroupOnly ( ) const
pure virtual

Return the "get show edited group only" option.

virtual bool WSM::Utils::IAppHelper::GetShowPickToleranceDebug ( )
pure virtual

Update the debug drawing of the pick tolerance.

virtual double WSM::Utils::IAppHelper::GetSurfaceAccuracyOrCountCurrent ( )
pure virtual

Get the current surface facet accuracy.

virtual WSM::Result WSM::Utils::IAppHelper::GetTextureInfo ( size_t  historyId,
size_t  textureId,
size_t &  hRes,
size_t &  vRes 
)
pure virtual

Get info for a texture. Returns the horizontal and vertical pixel resolution.

virtual ITooltipProvider* WSM::Utils::IAppHelper::GetTooltipProvider ( )
pure virtual

Request the ITooltipProvider to add tooltips.

virtual double WSM::Utils::IAppHelper::GetWorldBounds ( )
pure virtual

Get the "extent" of the world.

virtual void WSM::Utils::IAppHelper::InferenceEvent ( InferenceEventId  eventId,
const 1::any &  payLoad 
)
pure virtual
virtual bool WSM::Utils::IAppHelper::IsInEditingHistory ( GroupInstancePath const &  ,
bool  bAllowReferencedGeometrySelection = false 
)
pure virtual

Is this object in the history that is currently being edited.

virtual bool WSM::Utils::IAppHelper::IsLayerPickable ( const WSM::ObjectHistoryID layerId)
pure virtual

Check whether a WSM layer is pickable or not.

virtual bool WSM::Utils::IAppHelper::IsLayerVisible ( const WSM::ObjectHistoryID layerId)
pure virtual

Check whether a WSM layer is visible or not.

virtual bool WSM::Utils::IAppHelper::IsObjectHiddenByLayer ( const WSM::ObjectHistoryID nId)
pure virtual

Check whether a WSM object is hidden or not.

virtual bool WSM::Utils::IAppHelper::IsObjectNotPickableByLayer ( const WSM::ObjectHistoryID nId)
pure virtual

Check whether a WSM object is pickable or not.

virtual bool WSM::Utils::IAppHelper::IsTestRunning ( )
pure virtual

Returns true if a test is running.

virtual bool WSM::Utils::IAppHelper::IsUsingTouch ( ) const
pure virtual

Is the App using a touch interface.

virtual void WSM::Utils::IAppHelper::NewModel ( )
pure virtual

Request a new model.

This will delete the Display History and create a new History with the same ID.

virtual bool WSM::Utils::IAppHelper::NoInferencingSmoothEdgesAndPoints ( )
pure virtual

Get the no inferencing smooth edges or points flag.

virtual void WSM::Utils::IAppHelper::SelectObjects ( 1::vector< WSM::GroupInstancePath > const &  paths,
bool  bQuiet = false 
)
pure virtual

Causes the app to select the given objects.

If bQuiet true disable broadcasts and updates. This is used in the measure tool to stop properties panel and other menus from updating during the operation.

virtual void WSM::Utils::IAppHelper::SetShowPickToleranceDebug ( bool  bShow)
pure virtual
virtual void WSM::Utils::IAppHelper::showNotification ( WSM::Result const &  wsmres,
1::string const &  message = {},
bool  bSelectObjectsFromResult = false,
int  nTimeout = 0 
)
pure virtual

Display a modeless error or warning notification to the user for a period of time.

How and where the notification is displayed is platform specific.

The optional message comes first to give context, followed by the error or warning string from the WSM::Result. The message has a default timeout that can be changed by specifying a non-zero value in ms. The boolean parameter will cause the objects listed in the WSM::Result, if any, to be selected, replacing any existing selection or preselection highlight.

Whether the message is a Warning or an Error is determined by the content of the Result.

virtual void WSM::Utils::IAppHelper::ShowSelectionHighlights ( bool  show)
pure virtual

Turn selection highlights on/off.

Use with caution. Always turn back on when done with a tool or other feature.

virtual bool WSM::Utils::IAppHelper::SnapToGridDistance ( const Point3d basePoint,
const UnitVector3d direction,
double &  snapDist 
) const
pure virtual

Snaps the provided distance from the basePoint along direction to the appropriate grid interval.

Returns true if any snapping occurred (i.e. App has grid snapping enabled)

virtual void WSM::Utils::IAppHelper::StartActiveWidgetID ( size_t  widgId)
pure virtual

These are helpers to store the current dimension widget ID being edited to be able to determine what dimension on the screen is being edited when multiple dimension are on the screen in a tool.


The documentation for this class was generated from the following file: