3ds Max C++ API Reference
Loading...
Searching...
No Matches
ToolButtonItem Class Reference

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

#include <custcont.h>

+ Inheritance diagram for ToolButtonItem:

Public Attributes

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

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=nullptr, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor.
 
 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.
 
 ToolButtonItem (ToolItemType t, MaxBmpFileIcon *pIcon, MaxBmpFileIcon *pInIcon, int iW, int iH, int wd, int ht, int ID, DWORD hID=0, const MCHAR *lbl=nullptr, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor.
 
 ToolButtonItem (ToolItemType t, const MSTR &iconName, int iW, int iH, int wd, int ht, int ID, DWORD hID=0, const MCHAR *lbl=nullptr, int ori=CTB_HORIZ|CTB_VERT|CTB_FLOAT)
 Constructor that uses a multi-resolution icon for the button.
 

Additional Inherited Members

- Public Member Functions inherited from ToolItem
virtual ~ToolItem ()
 
- 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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- Protected Member Functions inherited from ToolItem
 ToolItem (ToolItemType type, int id, DWORD helpID, int w, int h, int orient)
 

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 = nullptr,
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)
3240 : ToolButtonItem(t, iW, iH, wd, ht, ID, hID, lbl, ori)
3241 {
3242 iOutEn = iOE;
3243 iInEn = iIE;
3244 iOutDis = iOD;
3245 iInDis = iID;
3246 }
This class describes the properties of a 3ds Max custom toolbar button.
Definition: custcont.h:3173
int iOutDis
Out 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:3184
int iInDis
In Disabled.
Definition: custcont.h:3190
int iInEn
In Enabled.
Definition: custcont.h:3186

◆ 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.
3262 : ToolButtonItem(t, iW, iH, wd, ht, ID, hID, lbl, ori)
3263 {
3264 mpIcon = pIcon;
3265 }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3206

◆ 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 = nullptr,
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 : ToolButtonItem(t, iW, iH, wd, ht, ID, hID, lbl, ori)
3284 {
3285 mpIcon = pIcon;
3286 mpInIcon = pInIcon;
3287 }
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3208

◆ 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 = nullptr,
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 )
3305 : ToolButtonItem(t, iW, iH, wd, ht, ID, hID, lbl, ori)
3306 {
3307 mIconName = iconName;
3308 }
MSTR mIconName
The icon name for loading a multi-resolution icon associated with the button.
Definition: custcont.h:3215

Member Data Documentation

◆ iOutEn

int iOutEn = -1

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 = -1

In Enabled.

◆ iOutDis

int iOutDis = -1

Out Disabled.

◆ iInDis

int iInDis = -1

In Disabled.

◆ iw

int iw = 0

The width of the button image.

◆ ih

int ih = 0

The height of the button image.

◆ label

const MCHAR* label = nullptr

The label describing the tool button item.

◆ mpIcon

MaxBmpFileIcon* mpIcon = nullptr

A pointer to the icon image associated with the button.

◆ mpInIcon

MaxBmpFileIcon* mpInIcon = nullptr

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 )