APISelectionChangeHandlerProc

User supplied callback procedure for handling selection changes.

    typedef GSErrCode  APISelectionChangeHandlerProc (
        const API_Neig*     selElemNeig
    );

 

Parameters

selElemNeig
[in] This structure identifies the last selected element.

 

Return Values

NoError
The function has completed with success.

For other common API errors see the API Errors document.

 

Remarks

This is the function which will be called when your add-on installed it with ACAPI_Notify_CatchSelectionChange.

 

Example


// -----------------------------------------------------------------------------
// Selection change handler function
// -----------------------------------------------------------------------------
static GSErrCode __ACENV_CALL    SelectionChangeHandler (const API_Neig *selElemNeig)

{
    char    msgStr[256];

    if (selElemNeig->neigID != APINeig_None) {
        sprintf (msgStr, "Last selected element: NeigID %d; index: %d, inIndex: %d",
                 selElemNeig->neigID, selElemNeig->index, selElemNeig->inIndex);
        ACAPI_WriteReport (msgStr, false);
    } else
        ACAPI_WriteReport ("All elements deselected", false);

    return NoError;
}   // SelectionChangeHandler

 

Requirements

Version: API 4.1 or later
Header: APIdefs_Callback.h

 

See Also

API_Neig>
ACAPI_Notify_CatchSelectionChange
API Functions