ToolButtonItem Class Reference

ToolButtonItem Class Reference

#include <custcont.h>

Class Description

This class describes the properties of a 3ds Max custom toolbar button.

Each one of these items represents a UI widget on a Toolbar in 3dsmax user interface.

See also
Class ToolItem, Class MAXBmpFileIcon, Custom User Interface Controls.
+ Inheritance diagram for ToolButtonItem:

Public Member Functions

Constructors
 ToolButtonItem (ToolItemType t, int iOE, int iIE, int iOD, int iID, int iW, int iH, int wd, int ht, int ID, DWORD hID=0, const MCHAR *lbl=NULL, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor. More...
 
 ToolButtonItem (ToolItemType t, MaxBmpFileIcon *pIcon, int iW, int iH, int wd, int ht, int ID, DWORD hID=0, const MCHAR *lbl=NULL, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor. More...
 
 ToolButtonItem (ToolItemType t, MaxBmpFileIcon *pIcon, MaxBmpFileIcon *pInIcon, int iW, int iH, int wd, int ht, int ID, DWORD hID=0, const MCHAR *lbl=NULL, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor. More...
 
 ToolButtonItem (ToolItemType t, const MSTR &iconName, int iW, int iH, int wd, int ht, int ID, DWORD hID=0, const MCHAR *lbl=NULL, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor that uses a multi-resolution icon for the button. More...
 
- Public Member Functions inherited from ToolItem
virtual ~ToolItem ()
 

Public Attributes

ImageList Members
int iOutEn
 The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list. More...
 
int iInEn
 In Enabled. More...
 
int iOutDis
 Out Disabled. More...
 
int iInDis
 In Disabled. More...
 
Dimensions
int iw
 The width of the button image. More...
 
int ih
 The height of the button image. More...
 
Pointer Members
const MCHARlabel
 The label describing the tool button item. More...
 
MaxBmpFileIconmpIcon
 A pointer to the icon image associated with the button. More...
 
MaxBmpFileIconmpInIcon
 A pointer to the pressed (or in) icon image associated with the button. More...
 
Multi-resolution icon
MSTR mIconName
 The icon name for loading a multi-resolution icon associated with the button. More...
 
- Public Attributes inherited from ToolItem
ToolItemType type
 
int id
 
DWORD helpID
 
int w
 
int h
 
int orient
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Constructor & Destructor Documentation

ToolButtonItem ( ToolItemType  t,
int  iOE,
int  iIE,
int  iOD,
int  iID,
int  iW,
int  iH,
int  wd,
int  ht,
int  ID,
DWORD  hID = 0,
const MCHAR lbl = NULL,
int  ori = CTB_HORIZ|CTB_VERT|CTB_FLOAT 
)
inline

Constructor.

Parameters
t- See Tool Item Types.
iOE- The Out&Enabled index.
iIE- The In&Enabled index.
iOD- The Out&Disabled index.
iID- The In&Disabled index.
iW- The image width (size of the bitmap in the ImageList).
iH- The image height (size of the bitmap in the ImageList).
wd- The width of the button.
ht- The height of the button.
ID- The ID of the control.
hID- The help ID. For plug-in developers this id should be set to 0.
*lbl= NULL - The label of the button.
ori= CTB_HORIZ|CTB_VERT|CTB_FLOAT - The allowable orientation of the item. This may be one or more of the following: CTB_HORIZ - Horizontal, CTB_VERT - Vertical CTB_FLOAT - Floating (not docked)
3239  {
3240  type = t;
3241  orient = ori;
3242  iOutEn = iOE; iInEn = iIE; iOutDis = iOD; iInDis = iID;
3243  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3244  label = lbl;
3245  mpIcon = mpInIcon = NULL;
3246  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3204
int orient
Definition: custcont.h:3162
int iInEn
In Enabled.
Definition: custcont.h:3184
int w
Definition: custcont.h:3161
#define NULL
Definition: autoptr.h:18
int iOutDis
Out Disabled.
Definition: custcont.h:3186
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3202
ToolItemType type
Definition: custcont.h:3158
int iInDis
In Disabled.
Definition: custcont.h:3188
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3182
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3206
int ih
The height of the button image.
Definition: custcont.h:3196
int iw
The width of the button image.
Definition: custcont.h:3194
int h
Definition: custcont.h:3161
DWORD helpID
Definition: custcont.h:3160
ToolButtonItem ( ToolItemType  t,
MaxBmpFileIcon pIcon,
int  iW,
int  iH,
int  wd,
int  ht,
int  ID,
DWORD  hID = 0,
const MCHAR lbl = NULL,
int  ori = CTB_HORIZ|CTB_VERT|CTB_FLOAT 
)
inline

Constructor.

Parameters
t- See Tool Item Types.
*pIcon- A pointer to the icon associated with the button.
iW- The image width (size of the bitmap in the ImageList).
iH- The image height (size of the bitmap in the ImageList).
wd- The width of the button.
ht- The height of the button.
ID- The ID of the control.
hID- The help ID. For plug-in developers this id should be set to 0.
lbl- The label of the button.
ori- The orientation of the button item.
3263  {
3264  type = t;
3265  orient = ori;
3266  mpIcon = pIcon;
3267  mpInIcon = NULL;
3268  iOutEn = iInEn = iOutDis = iInDis = -1;
3269  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3270  label = lbl;
3271  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3204
int orient
Definition: custcont.h:3162
int iInEn
In Enabled.
Definition: custcont.h:3184
int w
Definition: custcont.h:3161
#define NULL
Definition: autoptr.h:18
int iOutDis
Out Disabled.
Definition: custcont.h:3186
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3202
ToolItemType type
Definition: custcont.h:3158
int iInDis
In Disabled.
Definition: custcont.h:3188
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3182
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3206
int ih
The height of the button image.
Definition: custcont.h:3196
int iw
The width of the button image.
Definition: custcont.h:3194
int h
Definition: custcont.h:3161
DWORD helpID
Definition: custcont.h:3160
ToolButtonItem ( ToolItemType  t,
MaxBmpFileIcon pIcon,
MaxBmpFileIcon pInIcon,
int  iW,
int  iH,
int  wd,
int  ht,
int  ID,
DWORD  hID = 0,
const MCHAR lbl = NULL,
int  ori = CTB_HORIZ|CTB_VERT|CTB_FLOAT 
)
inline

Constructor.

Parameters
t- See Tool Item Types.
pIcon- A pointer to the icon associated with the button.
pInIcon- A pointer to the in icon associated with the button.
iW- The image width (size of the bitmap in the ImageList).
iH- The image height (size of the bitmap in the ImageList).
wd- The width of the button.
ht- The height of the button.
ID- The ID of the control.
hID- The help ID. For plug-in developers this id should be set to 0.
lbl- The label of the button.
ori- The orientation of the button item.
3290  {
3291  type = t;
3292  orient = ori;
3293  mpIcon = pIcon;
3294  mpInIcon = pInIcon;
3295  iOutEn = iInEn = iOutDis = iInDis = -1;
3296  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3297  label = lbl;
3298  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3204
int orient
Definition: custcont.h:3162
int iInEn
In Enabled.
Definition: custcont.h:3184
int w
Definition: custcont.h:3161
int iOutDis
Out Disabled.
Definition: custcont.h:3186
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3202
ToolItemType type
Definition: custcont.h:3158
int iInDis
In Disabled.
Definition: custcont.h:3188
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3182
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3206
int ih
The height of the button image.
Definition: custcont.h:3196
int iw
The width of the button image.
Definition: custcont.h:3194
int h
Definition: custcont.h:3161
DWORD helpID
Definition: custcont.h:3160
ToolButtonItem ( ToolItemType  t,
const MSTR iconName,
int  iW,
int  iH,
int  wd,
int  ht,
int  ID,
DWORD  hID = 0,
const MCHAR lbl = NULL,
int  ori = CTB_HORIZ|CTB_VERT|CTB_FLOAT 
)
inline

Constructor that uses a multi-resolution icon for the button.

Parameters
t- See Tool Item Types.
iconName- The name of the icon associated with the button.
iW- The image width.
iH- The image height.
wd- The width of the button.
ht- The height of the button.
ID- The ID of the control.
hID- The help ID. For plug-in developers this id should be set to 0.
lbl- The label of the button.
ori- The orientation of the button item.
See also
QIcon MaxSDK::LoadMaxMultiResIcon( const QString& iconName )
3317  {
3318  type = t;
3319  orient = ori;
3320  mpIcon = mpInIcon = NULL;
3321  iOutEn = iInEn = iOutDis = iInDis = -1;
3322  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3323  label = lbl;
3324  mIconName = iconName;
3325  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3204
int orient
Definition: custcont.h:3162
int iInEn
In Enabled.
Definition: custcont.h:3184
int w
Definition: custcont.h:3161
#define NULL
Definition: autoptr.h:18
MSTR mIconName
The icon name for loading a multi-resolution icon associated with the button.
Definition: custcont.h:3213
int iOutDis
Out Disabled.
Definition: custcont.h:3186
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3202
ToolItemType type
Definition: custcont.h:3158
int iInDis
In Disabled.
Definition: custcont.h:3188
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3182
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3206
int ih
The height of the button image.
Definition: custcont.h:3196
int iw
The width of the button image.
Definition: custcont.h:3194
int h
Definition: custcont.h:3161
DWORD helpID
Definition: custcont.h:3160

Member Data Documentation

int iOutEn

The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list.

They indicate which images to use for each of the four possible button states. You may specify a unique image for each one of these states by passing a different index for each state. Or you may supply a single image to be used for all the states by specifying the same index four times. Out Enabled

int iInEn

In Enabled.

int iOutDis

Out Disabled.

int iInDis

In Disabled.

int iw

The width of the button image.

int ih

The height of the button image.

const MCHAR* label

The label describing the tool button item.

MaxBmpFileIcon* mpIcon

A pointer to the icon image associated with the button.

MaxBmpFileIcon* mpInIcon

A pointer to the pressed (or in) icon image associated with the button.

MSTR mIconName

The icon name for loading a multi-resolution icon associated with the button.

See also
QIcon MaxSDK::LoadMaxMultiResIcon( const QString& iconName )