|
3ds Max C++ API Reference
|
#include "maxheap.h"#include "CoreExport.h"#include <WTypes.h>#include "geom/acolor.h"#include "Geom/ipoint2.h"#include "baseinterface.h"#include "strbasic.h"#include "paramtype.h"Classes | |
| class | ColorPickerCallback |
| This class provides methods that are called when using the color picker. More... | |
| class | ColorPicker |
| This class represents a modeless color picker and lets developers interact with it during its lifetime. More... | |
| class | ColPick |
| This is the base class for the creation of plug-in color selectors. More... | |
| class | IColorPickerMgr |
| struct | IColorPickerMgr::UnderlyingColorData |
| Structure used to exchange underlying color data between the color picker and the window under the mouse cursor when the user is using the eyedropper tool to sample underlying scene colors. More... | |
Macros | |
| #define | WM_ADD_COLOR (WM_USER+2321) |
| Sent by the color picker to add custom colors to object color palette. | |
Functions | |
| CoreExport INT_PTR | ModalColorPicker (HWND hwndOwner, AColor &color, ColorPicker::Flags flags, IPoint2 *pPos, ColorPickerCallback *callBack, const MCHAR *name, ColorContext context=ColorContext::COLOR_SPACE_CONTEXT_NONE) |
| This function puts up the "modal" color picker dialog box. | |
| CoreExport ColorPicker * | CreateColorPicker (HWND hwndOwner, const AColor &initColor, ColorPicker::Flags flags, IPoint2 *pPos, ColorPickerCallback *callback, const MCHAR *name, ColorContext context=ColorContext::COLOR_SPACE_CONTEXT_NONE, BOOL objClr=FALSE) |
| Creates and shows the modeless color picker dialog. | |
| CoreExport Color | RGBtoHSV (Color rgb) |
| Converts the specified color in the HSV (hue, saturation, value) format to the RGB (red, green, blue) format. | |
| CoreExport Color | HSVtoRGB (Color hsv) |
| Converts the specified color in the HSV (hue, saturation, value) format to the RGB (red, green, blue) format. | |
| #define WM_ADD_COLOR (WM_USER+2321) |
Sent by the color picker to add custom colors to object color palette.
wParam will have the display-referred color packed in DWORD.
lParam is a pointer to AColor holding the scene-referred color.
|
extern |
This function puts up the "modal" color picker dialog box.
This is a blocking call, that means the function won't return until the user closes the color picker.
| [in] | hwndOwner | Owner (parent) window handle. |
| [in,out] | color | Reference to the color to be edited. Value of this parameter will be used as the initial color. When the function returns, it will contain the color selected by the user if the user pressed OK. |
| [in] | flags | ColorPicker::Flags values controlling the look and behavior of the color picker (e.g. alpha enabled/disabled) |
| [in,out] | pPos | Pointer to the starting position of the upper left corner of the dialog window. This is set to the ending position when the user is done. If null, color picker will be displayed in the current mouse position. |
| [in] | callBack | Callback object whose procs are called when user interacts with the color picker. See Class ColorPickerCallback. |
| [in] | name | The name of color being edited to appear in the title bar. |
| [in] | context | The color context to be used by the color picker. see ColorContext for details. |
| CoreExport ColorPicker * CreateColorPicker | ( | HWND | hwndOwner, |
| const AColor & | initColor, | ||
| ColorPicker::Flags | flags, | ||
| IPoint2 * | pPos, | ||
| ColorPickerCallback * | callback, | ||
| const MCHAR * | name, | ||
| ColorContext | context = ColorContext::COLOR_SPACE_CONTEXT_NONE, | ||
| BOOL | objClr = FALSE ) |
Creates and shows the modeless color picker dialog.
This picker remains open allowing interactive color updates through the supplied callback until it is closed by the user or programmatically via ColorPicker::Destroy(). Unlike ModalColorPicker(), this call returns immediately with a pointer to the live ColorPicker instance. The returned object is owned by the system. When the picker is closed ColorPickerCallback::BeingDestroyed() is invoked and any stored pointer to it must be cleared.
| [in] | hwndOwner | Owner (parent) window handle. |
| [in] | initColor | Value of this parameter will be used as the initial color, which also becomes the reset color in the UI. |
| [in] | flags | ColorPicker::Flags values controlling the look and behavior of the color picker (e.g. alpha enabled/disabled) |
| [in,out] | pPos | Pointer to the starting position of the upper left corner of the dialog window. This is set to the ending position when the user is done. If null, color picker will be displayed in the current mouse position. |
| [in] | callback | Callback object whose functions are called when user interacts with the color picker. See Class ColorPickerCallback. |
| [in] | name | The name of color being edited to appear in the title bar. |
| [in] | context | The color context to be used by the color picker. see ColorContext for details. |
| [in] | objClr | if TRUE, object color picker variant is created with "Add %Color" button. |