Archicad 28 C++ API
|
Functions related to the manipulation of, and integrating into the Toolbox. More...
Classes | |
struct | API_ToolBoxInfo |
Contains information on the current state of the toolbox. More... | |
Functions | |
GSErrCode | ACAPI_Toolbox_GetToolBoxMode (API_ToolBoxItem *toolBoxItem) |
Returns the actual toolbox mode. | |
GSErrCode | ACAPI_Toolbox_SetToolBoxMode (API_ToolBoxItem *toolBoxItem) |
Sets the actual toolbox mode. | |
GSErrCode | ACAPI_Toolbox_GetToolBoxInfo (API_ToolBoxInfo *toolBoxInfo, bool enableHidden=false) |
Returns information on the current state of the toolbox. | |
GSErrCode | ACAPI_LibraryPart_RegisterSubtype (GSType signature, short templateFileResID, bool transparentNode, short stringResID, short smallIconResID, short largeIconResID, API_TBoxGroup toolGroupId, API_TBoxEnabled enableFlags, short defaultsResID) |
Registers a new library part subtype. | |
Functions related to the manipulation of, and integrating into the Toolbox.
GSErrCode ACAPI_LibraryPart_RegisterSubtype | ( | GSType | signature, |
short | templateFileResID, | ||
bool | transparentNode, | ||
short | stringResID, | ||
short | smallIconResID, | ||
short | largeIconResID, | ||
API_TBoxGroup | toolGroupId, | ||
API_TBoxEnabled | enableFlags, | ||
short | defaultsResID | ||
) |
Registers a new library part subtype.
signature | [in] A four-character identifier of this library part subtype |
templateFileResID | [in] 'FILE' resource ID of the subtype template library part compiled into the add-on |
transparentNode | [in] Objects of this subtype can be shown on higher ancestry levels as well |
stringResID | [in] Resource ID of the library part subtype description string |
smallIconResID | [in] Resource ID of the small-sized toolbox (toolbar) item icon |
largeIconResID | [in] Resource ID of the large-sized toolbox item icon |
toolGroupId | [in] Toolbox item position |
enableFlags | [in] Enable or disable the subtype tool depending on the active window |
defaultsResID | [in] ID of the 'ACP0' resource that contains the element default values for this subtype |
API_TBoxGroup | Meaning |
---|---|
TBoxGroup_Root | The subtype tool item will be appended to the group of model element tools |
TBoxGroup_Objects | The subtype tool item will be added to the object tools |
TBoxGroup_Openings | The subtype tool item will be added to the window/door tools |
You can control the availability of the subtype tool in the toolbox by setting the enableFlags
bits:
API_TBoxEnabled | The subtype tool is enabled |
---|---|
API_TBoxEnabled_FloorPlan | on floor plan window |
API_TBoxEnabled_ModelSection | on model type section and elevation windows |
API_TBoxEnabled_DrawingSection | on drawing type section and elevation windows |
API_TBoxEnabled_3D | on 3D model window |
API_TBoxEnabled_Detail | on detail window |
API_TBoxEnabled_Layout | on layout and master layout windows |
API_TBoxEnabled_Worksheet | on worksheet window |
API_TBoxEnabled_ModelInteriorElevation | on model type interior elevation windows |
API_TBoxEnabled_DrawingInteriorElevation | on drawing type interior elevation windows |
If you want to register your subtype tool without appearing in the toolbox, pass 0 for both the smallIconResID
and the largeIconResID
parameters. If you register a subtype tool you should define the factory default values for this element type in an 'ACP0' resource. The element default will be initialized with these parameters when no preferences data is stored. The structure of this resource is shown at the example below. The resource ID should be passed in the defaultsResID parameter. Learn more about this topic at the general description of Library Part Subtypes.
GSErrCode ACAPI_Toolbox_GetToolBoxInfo | ( | API_ToolBoxInfo * | toolBoxInfo, |
bool | enableHidden = false |
||
) |
Returns information on the current state of the toolbox.
toolBoxInfo | [out] Miscellaneous information on the toolbox. |
enableHidden | [in] Include hidden tools from the toolbox as well. This parameter is optional; if you pass nullptr in the second parameter, it defaults to false. |
GSErrCode ACAPI_Toolbox_GetToolBoxMode | ( | API_ToolBoxItem * | toolBoxItem | ) |
Returns the actual toolbox mode.
toolBoxItem | [out] Current toolbox mode data. |
API_ZombieElemID
. To change the active toolbox item use the ACAPI_Toolbox_SetToolBoxMode function. GSErrCode ACAPI_Toolbox_SetToolBoxMode | ( | API_ToolBoxItem * | toolBoxItem | ) |
Sets the actual toolbox mode.
toolBoxItem | [in] Toolbox mode to be set. |
API_ZombieElemID
or an invalid element type ID specification the arrow mode will be set. Note that the function does not switch the toolbox immediately, but posts an event into the application queue. The command will be executed only when the application events are processed. To get the active toolbox mode use the ACAPI_Toolbox_GetToolBoxMode function.