ImageGear for C and C++ on Linux v20.0 - Updated
LPFNIG_ART_SELECTNOTIFYFUNC
API Reference Guide > ART Component API Reference > ART Component Callback Functions Reference > LPFNIG_ART_SELECTNOTIFYFUNC

This function is called by the library when the selection state of a mark is changed.

Declaration:

 
Copy Code
typedef BOOL (ACCUAPI *LPFNIG_ART_SELECTNOTIFYFUNC)(
        HIGEAR hIGear, 
        LPVOID lpPrivate, 
        ART_MARK_INDEX hMarkIndex, 
        BOOL fSelect
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of an image.
lpPrivate LPVOID A far pointer to the private callback data.
hMarkIndex ART_MARK_INDEX The index for the selected mark.
fSelect BOOL A flag of type BOOL indicating the new selection state (selected/unselected).

Return Value:

Returns FALSE for the mark's selection state to remain unchanged; returns TRUE to allow the mark's selection state to change.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Example:

 
Copy Code
BOOL ACCUAPI ARTSelectNotify(        HIGEAR hIGear, LPVOID 
lpPrivate, ART_MARK_INDEX hMarkIndex, BOOL fSelect)
{
ART_MARK_ATTRIBUTES  ma;
ART_mark_query(hIGear, hMarkIndex, &ma);
if (ma.dwType == ART_MARK_BUTTON && fSelect == TRUE)
{
    /* prevent button marks from being selected */
    return FALSE;
}
return TRUE;
}

Remarks:

If the callback function returns FALSE, the mark's selection state is not changed. It returns TRUE to allow the selection state to be changed.

In order to use this callback, it must be registered with ART using the function ART_callback_register().
Is this page helpful?
Yes No
Thanks for your feedback.