Class ColPick
See Also: Class ColorPicker, Class HSVCallback, Class Class_ID, Class IPoint2, DWORD--COLORREF Color Format..
class ColPick : public InterfaceServer
Description:
This class is available in release 3.0 and later only.
This is the base class for the creation of plug-in color selectors. The list of available color pickers appear in the 3ds max user interface in the General page of the Preferences dialog. The choosen picker will be called whenever a user clicks on a 3ds max color swatch control.
Plug-In Information:
Class Defined In HSV.H
Super Class ID COLPICK_CLASS_ID
Standard File Name Extension DLU
Extra Include File Needed HSV.H
Functions:
These global functions are not part of this class but are used internally by 3ds max to plug in the current color picker. Developers should not need to access these.
Function:
ColPick *SetCurColPick(ColPick *colpick);
Remarks:
This function is available in release 3.0 and later only.
This global function is used internally to establish the current color picker used.
Parameters:
ColPick *colpick
Points to the color picker to use.
Return Value:
A pointer to the current color picker.
Function:
ColPick *GetCurColPick();
Remarks:
This function is available in release 3.0 and later only.
Returns a pointer to the current color picker.
Methods:
public:
Prototype:
virtual INT_PTR ModalColorPicker(HWND hwndOwner, DWORD *lpc, IPoint2 *spos, HSVCallback *callBack, TCHAR *name)=0;
Remarks:
Implemented by the Plug-In
This method is called to bring up the modal color picker.
Parameters:
HWND hwndOwner
The owning window handle
DWORD *lpc
A pointer to the color to be edited. See DWORD COLORREF Format.
IPoint2 *spos
The starting position of the dialog. This is set to ending position on return.
HSVCallback *callBack
This callback is called whenever color changes.
TCHAR *name
The name of color being edited
Return Value:
TRUE if the user pressed OK; FALSE on cancel.
Prototype:
virtual ColorPicker *CreateColorPicker(HWND hwndOwner,DWORD initColor, IPoint2* spos, HSVCallback *pcallback, TCHAR *name, BOOL isObjectColor=FALSE)=0;
Remarks:
Implemented by the Plug-In
This method is called to create and return a ColorPicker object for the modeless color picker.
Parameters:
HWND hwndOwner
The owning window handle.
DWORD initColor
The inital value of the color. See DWORD COLORREF Format.
IPoint2* spos
The starting position of dialog.
HSVCallback *pcallback
This callback is called whenever color changes.
TCHAR *name
The name of color being edited.
BOOL isObjectColor=FALSE
This indicates the color picker is being used for the object color in the command panel, and the color picker then displays the Add Color button
Prototype:
virtual const TCHAR *ClassName()=0;
Remarks:
Implemented by the Plug-In
Returns the name of the class. This name appears in the drop down list of color picker choices.
Prototype:
virtual Class_ID ClassID()=0;
Remarks:
Implemented by the Plug-In
Returns the unique ClassID of this plug-in. The Class_ID for the default color picker is Class_ID(DEFAULT_COLPICK_CLASS_ID,0).
Prototype:
virtual void DeleteThis()=0;
Remarks:
Implemented by the Plug-In
This method is called to delete this instance of the plug-in class.
Prototype:
virtual INT_PTR Execute(int cmd, ULONG arg1=0, ULONG arg2=0, ULONG arg3=0)=0;
Remarks:
Implemented by the Plug-In
This method is used for future expansion and is currently not used.