ColorPicker Class Reference
 
 
 
ColorPicker Class Reference

#include <hsv.h>

Inheritance diagram for ColorPicker:
InterfaceServer MaxHeapOperators

Class Description

See also:
Class HSVCallback, COLORREF - DWORD, Class IPoint2.

Description:
This class allows a plug-in to create a modeless color picker dialog box.

Developers may also create a modal version of this dialog box. The function HSVDlg_Do is defined for this purpose. Note that this is not a class method but a global function.

To use these APIs you need to #include "hsv.h".

Public Member Functions

  ColorPicker ()
virtual void  ModifyColor (DWORD color)=0
virtual void  SetNewColor (DWORD color, const MCHAR *name)=0
virtual void  SetNewColor (DWORD color, MCHAR *name) MAX_SEALED
virtual DWORD  GetColor ()=0
virtual IPoint2  GetPosition ()=0
virtual void  Destroy ()=0
virtual void  InstallNewCB (DWORD col, HSVCallback *pcb, const MCHAR *name)=0
virtual void  InstallNewCB (DWORD col, HSVCallback *pcb, MCHAR *name) MAX_SEALED
virtual void  RefreshUI ()
virtual void  ModifyColor (AColor color)
virtual void  SetNewColor (AColor, const MCHAR *name)
virtual void  SetNewColor (AColor color, MCHAR *name) MAX_SEALED
virtual AColor  GetAColor ()
virtual void  InstallNewCB (AColor col, HSVCallback *pcb, const MCHAR *name)
virtual void  InstallNewCB (AColor col, HSVCallback *pcb, MCHAR *name) MAX_SEALED
virtual CoreExport RECT  GetRect () const
virtual CoreExport bool  IsColorSamplerMode () const
  Is this picker in color sampling (eyedropper) mode.

Protected Member Functions

  ~ColorPicker ()

Constructor & Destructor Documentation

~ColorPicker ( ) [inline, protected]
Remarks:
Destructor.
{}
ColorPicker ( ) [inline]
Remarks:
Constructor.
{}

Member Function Documentation

virtual void ModifyColor ( DWORD  color ) [pure virtual]
Remarks:
This method changes the current color in the color picker, but does not change the "reset" color.
Parameters:
DWORD color

The current color.
virtual void SetNewColor ( DWORD  color,
const MCHAR *  name 
) [pure virtual]
Remarks:
Sets a new color as current in the dialog.
Parameters:
DWORD color

The color to set.

MCHAR *name

A new name to display in the title bar.
virtual void SetNewColor ( DWORD  color,
MCHAR *  name 
) [inline, virtual]
Deprecated:
Deprecated method in terms of implementation as of 3ds Max 2013 - re-implement with const MCHAR* method signature
{ SetNewColor(color, const_cast<const MCHAR*>(name)); }
virtual DWORD GetColor ( ) [pure virtual]
Remarks:
Returns the current color.
virtual IPoint2 GetPosition ( ) [pure virtual]
Remarks:
Returns the screen position of the upper left corner of the dialog as a IPoint2.
virtual void Destroy ( ) [pure virtual]
Remarks:
This is called when the parent is going away.
virtual void InstallNewCB ( DWORD  col,
HSVCallback pcb,
const MCHAR *  name 
) [pure virtual]
Remarks:
This method is used to add a different callback, set a new initial color and update the title string.
Parameters:
DWORD col

The new initial color.

HSVCallback *pcb

The new callback.

MCHAR *name

The new title string.
virtual void InstallNewCB ( DWORD  col,
HSVCallback pcb,
MCHAR *  name 
) [inline, virtual]
Deprecated:
Deprecated method in terms of implementation as of 3ds Max 2013 - re-implement with const MCHAR* method signature
{ InstallNewCB(col, pcb, const_cast<const MCHAR*>(name)); }
virtual void RefreshUI ( ) [inline, virtual]
Remarks:
This method is available in release 4.0 and later only.

This method is called when the display gamma changes.
{}  // Called when display gamma changes
virtual void ModifyColor ( AColor  color ) [inline, virtual]
Remarks:
This method changes the current color in the color picker, but does not change the "reset" color.
Parameters:
AColor color

The current color.
{}
virtual void SetNewColor ( AColor  ,
const MCHAR *  name 
) [inline, virtual]
Remarks:
Sets a new color as current in the dialog.
Parameters:
AColor color

The color to set.

MCHAR *name

A new name to display in the title bar.
{}
virtual void SetNewColor ( AColor  color,
MCHAR *  name 
) [inline, virtual]
Deprecated:
Deprecated method in terms of implementation as of 3ds Max 2013 - re-implement with const MCHAR* method signature
{ SetNewColor(color, const_cast<const MCHAR*>(name)); }
virtual AColor GetAColor ( ) [inline, virtual]
Remarks:
Returns the current color as an Acolor from the color picker. Default implementation returns AColor(0,0,0,0).
{return AColor(0,0,0,0);}
virtual void InstallNewCB ( AColor  col,
HSVCallback pcb,
const MCHAR *  name 
) [inline, virtual]
Remarks:
This method is used to add a different callback, set a new initial color and update the title string.
Parameters:
Acolor col

The new initial color.

HSVCallback *pcb

The new callback.

MCHAR *name

The new title string.
{}
virtual void InstallNewCB ( AColor  col,
HSVCallback pcb,
MCHAR *  name 
) [inline, virtual]
Deprecated:
Deprecated method in terms of implementation as of 3ds Max 2013 - re-implement with const MCHAR* method signature
{ InstallNewCB(col, pcb, const_cast<const MCHAR*>(name)); }
virtual CoreExport RECT GetRect ( ) const [virtual]
Remarks:
Call this function to get the rectangle of current dialog of color picker.
Returns:
Default implementation returns RECT(0,0,0,0).
virtual CoreExport bool IsColorSamplerMode ( ) const [virtual]

Is this picker in color sampling (eyedropper) mode.

Default implementation returns false.

Returns:
true if this picker is in sampling mode, false otherwise.