Class ResourceMakerCallback
See Also: Class ICurveCtl.
class ResourceMakerCallback
public:
Description:
This class is available in release 3.0 and later only.
This callback object may be used to handle custom bitmaps and tooltips for the display buttons of a curve control. There are also methods which get called to handle the situations when a curve is reset or a new curve is created.
All methods of this class are implemented by the plug-in.
Methods:
public:
Prototype:
virtual BOOL SetCustomImageList(HIMAGELIST &hCTools,ICurveCtl *pCCtl);
Remarks:
This method is called to set the image list.
This callback is used to update the HIMAGELIST to handle custom bitmaps on the display buttons. The image list has to have 2*NumCurves 16x15 bitmaps. The format for the first set of images is for Out&In Enabled. The second set is for Out&In Disabled (which are not yet used).
Parameters:
HIMAGELIST &hCTools
A reference to the image list to set. An HIMAGELIST is a Win32 data type that is a handle to an image list.
ICurveCtl *pCCtl
This pointer can be used to determine which ICurveCtl calls the callback, in case the plugin uses many CurveControls and want to set different bitmaps for different CurveControls.
Return Value:
If the image list was assigned the callback should return TRUE. If it returns FALSE, the default bitmaps will be used.
Default Implementation:
{return FALSE;}
Prototype:
virtual BOOL GetToolTip(int iButton, TSTR &ToolTip,ICurveCtl *pCCtl);
Remarks:
This callback allows the developer to assign custom ToolTips to the display buttons. One simply has to assing a string to the ToolTip parameter for the specified button number.
Parameters:
int iButton
The zero based index of the button whose tool tip text to retrieve.
TSTR &ToolTip
The string for the tool tip text.
ICurveCtl *pCCtl
This pointer can be used to determine which ICurveCtl calls the callback, in case the plugin uses many CurveControls and want to set different Tooltips for different CurveControls.
Return Value:
TRUE if the method is implemented to use custom tooltips; otherwise FALSE.
Default Implementation:
{return FALSE;}
Prototype:
virtual void ResetCallback(int curvenum, ICurveCtl *pCCtl);
Remarks:
This methods gets called when the user preses the Reset button (cross symbol) in the user interface (if the control is using the upper toolbar).
Parameters:
int curvenum
The zero based index of the curve.
ICurveCtl *pCCtl
Points to the interface for the custom curve control.
Default Implementation:
{}
Prototype:
virtual void NewCurveCreatedCallback(int curvenum, ICurveCtl *pCCtl);
Remarks:
This method gets called after the curve control creates a new curve. The developer can set the default values here for the new curve. This call will be a result of a call to SetNumCurves(i) where the new size is bigger than the old size.
Parameters:
int curvenum
The zero based index of the curve.
ICurveCtl *pCCtl
Points to the interface for the custom curve control.
Default Implementation:
{}