Archicad 28 C++ API
Loading...
Searching...
No Matches
INavigatorCallbackInterface Struct Referenceabstract

Callback interface object to register with ACAPI_Navigator_RegisterCallbackInterface. More...

#include <INavigatorCallbackInterface.hpp>

Inheritance diagram for INavigatorCallbackInterface:

Public Types

enum  IconTWMode { TWNormal , TWReserved , TWBeforeSend , TWNotMineBeforeSend }
 The possible Teamwork modes for the navigator item in case of icon requests.
 
enum  IconLinkness {
  Normal , Link , Shortcut , PDFShortcut ,
  DWGShortcut , DXFShortcut , IFCShortcut
}
 The possible linkness modes for the Navigator item in case of icon requests.
 
enum  IconSize { NormalSize , Small }
 The possible sizes of the requested icon.
 
enum  IconContext { Model , Layout }
 The possible contexts of the requested icon.
 
enum  ContextMenuCommand { NewItemCommand , DeleteItemCommand , RenameItemCommand , OpenSettingsCommand }
 The possible commands of the context menu.
 
enum  TWCommandMenu {
  ReserveNode , ReserveGroupChildren , ReleaseNode , ReleaseGroupChildren ,
  RequestNode
}
 The possible Teamwork-related commands of the context menu.
 
enum  TWCommandMail { Request1Mail , RequestNMail , Grant1Mail , GrantNMail }
 The possible Teamwork interactions.
 

Public Member Functions

virtual bool IsDummyInterface (void) const
 Used for internal purposes only. Do not override.
 
virtual GSErrCode OpenView (const API_Guid &viewPointID, bool newWindow) const =0
 This function is called the when user wants to open the view.
 
virtual GSErrCode OpenSettings (const API_Guid &viewPointID) const =0
 This function is called when the user wants to open the navigator item's settings.
 
virtual GSErrCode ExecuteMergePostProcess () const =0
 This function is called when there are some conflicts in Teamwork mode which needs to be resolved.
 
virtual GSErrCode CreateIDFStore (const API_Guid &viewPointID, double scale, double &clipBoxWidth, double &clipBoxHeight, GSPtr &idfStore, API_Box &boundingBox, double &paddingX, double &paddingY, GS::Array< API_Guid > &elems) const =0
 This function is called when a drawing is created or updated.
 
virtual GSErrCode GetElemsForDrawingCheck (const API_Guid &viewPointID, GS::Array< API_Guid > &elems) const =0
 This function is called when Archicad wants to check if the drawing is up-to-date.
 
virtual GSErrCode NewItem (const API_Guid &viewPointID) const =0
 This function is called when the user clicks the "New viewpoint" command in the navigator or the identical command in the context menu.
 
virtual GSErrCode DeleteItem (const GS::Array< API_Guid > &viewPointIDList) const =0
 This function is called when the user clicks the "Delete" command in the navigator or the identical command in the context menu.
 
virtual GSErrCode RenameItem (const API_Guid &viewPointID) const =0
 This function is called when the user changes the name of the view point.
 
virtual DG::Icon GetIcon (Int32 iconId, IconTWMode iconTWMode, IconLinkness linkness, IconSize size, IconContext context) const =0
 This function is called when an icon is requested by the Navigator to be put next to the handled view by AddOn.
 
virtual bool GetContextMenuCommandString (ContextMenuCommand cmd, const API_Guid &viewPointId, GS::UniString &text) const
 Get the string of the context menu command for the specified navigator item in case of the context menu is requested.
 
virtual bool IsContextMenuCommandEnabled (ContextMenuCommand cmd, const API_Guid &viewPointId) const
 Returns whether the given menu command is enabled for the given navigator item.
 
virtual bool GetTWCommandMenuString (TWCommandMenu cmd, const API_Guid &viewPointId, GS::UniString &text) const
 Returns the given Teamwork-related menu command's string for the given navigator item.
 
virtual bool GetTWCommandMailString (TWCommandMail cmd, const API_Guid &viewPointId, GS::UniString &text) const
 Get the text of the automatic teamwork message in case the user is granted access to the navigator item or requests it from another teamwork user.
 

Detailed Description

Callback interface object to register with ACAPI_Navigator_RegisterCallbackInterface.

Since
Archicad 26

Member Function Documentation

◆ CreateIDFStore()

virtual GSErrCode INavigatorCallbackInterface::CreateIDFStore ( const API_Guid viewPointID,
double  scale,
double &  clipBoxWidth,
double &  clipBoxHeight,
GSPtr &  idfStore,
API_Box boundingBox,
double &  paddingX,
double &  paddingY,
GS::Array< API_Guid > &  elems 
) const
pure virtual

This function is called when a drawing is created or updated.

Parameters
viewPointIDNavigator item's guid from which the drawing will be made.
scaleDefines the scaling from paper to model. For example, for 1:100 scaling, pass 100.
clipBoxWidth[out] Clip box width.
clipBoxHeight[out] Clip box height.
idfStore[out] An opaque data stream containing the drawing database in a serialized form.
boundingBox[out] The bounding box of the created drawing.
paddingX[out] Padding in the X axis.
paddingY[out] Padding in the Y axis.
elems[out] Elements in the navigator item.
Returns
Returns NoError if the drawing creation was successful otherwise return with an error code.

◆ DeleteItem()

virtual GSErrCode INavigatorCallbackInterface::DeleteItem ( const GS::Array< API_Guid > &  viewPointIDList) const
pure virtual

This function is called when the user clicks the "Delete" command in the navigator or the identical command in the context menu.

Parameters
viewPointIDListList of guid of the selected navigator item which the user wants to delete.
Returns
Returns NoError if the deletion of the items is succeeded.

◆ ExecuteMergePostProcess()

virtual GSErrCode INavigatorCallbackInterface::ExecuteMergePostProcess ( ) const
pure virtual

This function is called when there are some conflicts in Teamwork mode which needs to be resolved.

Returns
Returns NoError if all conflicts are resolved.

◆ GetContextMenuCommandString()

bool INavigatorCallbackInterface::GetContextMenuCommandString ( ContextMenuCommand  cmd,
const API_Guid viewPointId,
GS::UniString &  text 
) const
inlinevirtual

Get the string of the context menu command for the specified navigator item in case of the context menu is requested.

Parameters
cmdCommand of the context menu.
viewPointIdNavigator item's guid for which the context menu is requested.
text[out] The string of the context menu command.
Returns
Indicates whether the string request was successful.

◆ GetElemsForDrawingCheck()

virtual GSErrCode INavigatorCallbackInterface::GetElemsForDrawingCheck ( const API_Guid viewPointID,
GS::Array< API_Guid > &  elems 
) const
pure virtual

This function is called when Archicad wants to check if the drawing is up-to-date.

Parameters
viewPointIDNavigator item's guid from which the drawing is made.
elems[out] Elements in the navigator item.
Returns
Returns NoError if the element collection is successful otherwise return with an error code.

◆ GetIcon()

virtual DG::Icon INavigatorCallbackInterface::GetIcon ( Int32  iconId,
IconTWMode  iconTWMode,
IconLinkness  linkness,
IconSize  size,
IconContext  context 
) const
pure virtual

This function is called when an icon is requested by the Navigator to be put next to the handled view by AddOn.

Parameters
iconIdThe type of the navigator item. Its value comes from API_NavigatorAddOnViewPointTypeID.
iconTWModeThe TeamWork mode for the requested icon.
linknessLinkness for the requested icon.
sizeRequested size of the icon.
contextContext of the requested icon.
Returns
Returns with the requested icon based on the input parameters.

◆ GetTWCommandMailString()

bool INavigatorCallbackInterface::GetTWCommandMailString ( TWCommandMail  cmd,
const API_Guid viewPointId,
GS::UniString &  text 
) const
inlinevirtual

Get the text of the automatic teamwork message in case the user is granted access to the navigator item or requests it from another teamwork user.

Parameters
cmdCommand of the interaction.
viewPointIdNavigator item's guid for which the interaction is requested.
text[out] Mail string of the command.
Returns
Indicates whether the string request was successful.

◆ GetTWCommandMenuString()

bool INavigatorCallbackInterface::GetTWCommandMenuString ( TWCommandMenu  cmd,
const API_Guid viewPointId,
GS::UniString &  text 
) const
inlinevirtual

Returns the given Teamwork-related menu command's string for the given navigator item.

Parameters
cmdTeamwork command of the context menu.
viewPointIdNavigator item's guid for which the context menu is requested.
text[out] The string of the context menu command.
Returns
Indicates whether the string request was successful.

◆ IsContextMenuCommandEnabled()

bool INavigatorCallbackInterface::IsContextMenuCommandEnabled ( ContextMenuCommand  cmd,
const API_Guid viewPointId 
) const
inlinevirtual

Returns whether the given menu command is enabled for the given navigator item.

Parameters
cmdCommand to be enabled.
viewPointIdNavigator item's guid for which commands enabling is defined.
Returns
Returns true if the command is enabled otherwise false.

◆ IsDummyInterface()

bool INavigatorCallbackInterface::IsDummyInterface ( void  ) const
inlinevirtual

Used for internal purposes only. Do not override.

Returns
Indicates whether the installed navigator interface is a dummy one.

◆ NewItem()

virtual GSErrCode INavigatorCallbackInterface::NewItem ( const API_Guid viewPointID) const
pure virtual

This function is called when the user clicks the "New viewpoint" command in the navigator or the identical command in the context menu.

Parameters
viewPointIDGuid of the selected navigator item.
Returns
Returns NoError if the item creation is succeeded.

◆ OpenSettings()

virtual GSErrCode INavigatorCallbackInterface::OpenSettings ( const API_Guid viewPointID) const
pure virtual

This function is called when the user wants to open the navigator item's settings.

Parameters
viewPointIDNavigator item's guid for which settings opening is requested.
Returns
Returns NoError if the opening settings was successful otherwise with an error code.

◆ OpenView()

virtual GSErrCode INavigatorCallbackInterface::OpenView ( const API_Guid viewPointID,
bool  newWindow 
) const
pure virtual

This function is called the when user wants to open the view.

Parameters
viewPointIDNavigator item's guid which user wants to open.
newWindowIndicates whether 'Open' or 'Open in New Tab' was requested.
Returns
Returns NoError if the view opening was succeeded otherwise with an error code.

◆ RenameItem()

virtual GSErrCode INavigatorCallbackInterface::RenameItem ( const API_Guid viewPointID) const
pure virtual

This function is called when the user changes the name of the view point.

Parameters
viewPointIDGuid of the selected navigator item.
Returns
Returns NoError if the item renaming is succeeded.