3ds Max C++ API Reference
ToolButtonItem Class Reference

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

#include <custcont.h>

+ 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...
 

Detailed 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.

Constructor & Destructor Documentation

◆ ToolButtonItem() [1/4]

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)
3232  {
3233  type = t;
3234  orient = ori;
3235  iOutEn = iOE; iInEn = iIE; iOutDis = iOD; iInDis = iID;
3236  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3237  label = lbl;
3238  mpIcon = mpInIcon = NULL;
3239  }
#define NULL
Definition: autoptr.h:18
int iw
The width of the button image.
Definition: custcont.h:3187
int iOutDis
Out Disabled.
Definition: custcont.h:3179
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list.
Definition: custcont.h:3175
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3199
int ih
The height of the button image.
Definition: custcont.h:3189
int iInDis
In Disabled.
Definition: custcont.h:3181
int iInEn
In Enabled.
Definition: custcont.h:3177
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3195
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3197
int h
Definition: custcont.h:3154
ToolItemType type
Definition: custcont.h:3151
int orient
Definition: custcont.h:3155
int w
Definition: custcont.h:3154
DWORD helpID
Definition: custcont.h:3153

◆ ToolButtonItem() [2/4]

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.
3256  {
3257  type = t;
3258  orient = ori;
3259  mpIcon = pIcon;
3260  mpInIcon = NULL;
3261  iOutEn = iInEn = iOutDis = iInDis = -1;
3262  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3263  label = lbl;
3264  }

◆ ToolButtonItem() [3/4]

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.
3283  {
3284  type = t;
3285  orient = ori;
3286  mpIcon = pIcon;
3287  mpInIcon = pInIcon;
3288  iOutEn = iInEn = iOutDis = iInDis = -1;
3289  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3290  label = lbl;
3291  }

◆ ToolButtonItem() [4/4]

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 )
3310  {
3311  type = t;
3312  orient = ori;
3313  mpIcon = mpInIcon = NULL;
3314  iOutEn = iInEn = iOutDis = iInDis = -1;
3315  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3316  label = lbl;
3317  mIconName = iconName;
3318  }
MSTR mIconName
The icon name for loading a multi-resolution icon associated with the button.
Definition: custcont.h:3206

Member Data Documentation

◆ iOutEn

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

◆ iInEn

int iInEn

In Enabled.

◆ iOutDis

int iOutDis

Out Disabled.

◆ iInDis

int iInDis

In Disabled.

◆ iw

int iw

The width of the button image.

◆ ih

int ih

The height of the button image.

◆ label

const MCHAR* label

The label describing the tool button item.

◆ mpIcon

MaxBmpFileIcon* mpIcon

A pointer to the icon image associated with the button.

◆ mpInIcon

MaxBmpFileIcon* mpInIcon

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

◆ mIconName

MSTR mIconName

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

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