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

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)
3776  {
3777  type = t;
3778  orient = ori;
3779  iOutEn = iOE; iInEn = iIE; iOutDis = iOD; iInDis = iID;
3780  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3781  label = lbl;
3782  mpIcon = mpInIcon = NULL;
3783  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3741
int orient
Definition: custcont.h:3699
int iInEn
In Enabled.
Definition: custcont.h:3721
int w
Definition: custcont.h:3698
#define NULL
Definition: autoptr.h:18
int iOutDis
Out Disabled.
Definition: custcont.h:3723
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3739
ToolItemType type
Definition: custcont.h:3695
int iInDis
In Disabled.
Definition: custcont.h:3725
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3719
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3743
int ih
The height of the button image.
Definition: custcont.h:3733
int iw
The width of the button image.
Definition: custcont.h:3731
int h
Definition: custcont.h:3698
DWORD helpID
Definition: custcont.h:3697
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.
3800  {
3801  type = t;
3802  orient = ori;
3803  mpIcon = pIcon;
3804  mpInIcon = NULL;
3805  iOutEn = iInEn = iOutDis = iInDis = -1;
3806  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3807  label = lbl;
3808  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3741
int orient
Definition: custcont.h:3699
int iInEn
In Enabled.
Definition: custcont.h:3721
int w
Definition: custcont.h:3698
#define NULL
Definition: autoptr.h:18
int iOutDis
Out Disabled.
Definition: custcont.h:3723
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3739
ToolItemType type
Definition: custcont.h:3695
int iInDis
In Disabled.
Definition: custcont.h:3725
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3719
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3743
int ih
The height of the button image.
Definition: custcont.h:3733
int iw
The width of the button image.
Definition: custcont.h:3731
int h
Definition: custcont.h:3698
DWORD helpID
Definition: custcont.h:3697
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.
3827  {
3828  type = t;
3829  orient = ori;
3830  mpIcon = pIcon;
3831  mpInIcon = pInIcon;
3832  iOutEn = iInEn = iOutDis = iInDis = -1;
3833  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3834  label = lbl;
3835  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3741
int orient
Definition: custcont.h:3699
int iInEn
In Enabled.
Definition: custcont.h:3721
int w
Definition: custcont.h:3698
int iOutDis
Out Disabled.
Definition: custcont.h:3723
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3739
ToolItemType type
Definition: custcont.h:3695
int iInDis
In Disabled.
Definition: custcont.h:3725
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3719
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3743
int ih
The height of the button image.
Definition: custcont.h:3733
int iw
The width of the button image.
Definition: custcont.h:3731
int h
Definition: custcont.h:3698
DWORD helpID
Definition: custcont.h:3697
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 )
3854  {
3855  type = t;
3856  orient = ori;
3857  mpIcon = mpInIcon = NULL;
3858  iOutEn = iInEn = iOutDis = iInDis = -1;
3859  iw = iW; ih = iH; w = wd; h = ht; id = ID; helpID = hID;
3860  label = lbl;
3861  mIconName = iconName;
3862  }
MaxBmpFileIcon * mpIcon
A pointer to the icon image associated with the button.
Definition: custcont.h:3741
int orient
Definition: custcont.h:3699
int iInEn
In Enabled.
Definition: custcont.h:3721
int w
Definition: custcont.h:3698
#define NULL
Definition: autoptr.h:18
MSTR mIconName
The icon name for loading a multi-resolution icon associated with the button.
Definition: custcont.h:3750
int iOutDis
Out Disabled.
Definition: custcont.h:3723
const MCHAR * label
The label describing the tool button item.
Definition: custcont.h:3739
ToolItemType type
Definition: custcont.h:3695
int iInDis
In Disabled.
Definition: custcont.h:3725
int iOutEn
The following four data members (iOutEn, iInEn, iOutDis, iInDis) are indices into the image list...
Definition: custcont.h:3719
MaxBmpFileIcon * mpInIcon
A pointer to the pressed (or in) icon image associated with the button.
Definition: custcont.h:3743
int ih
The height of the button image.
Definition: custcont.h:3733
int iw
The width of the button image.
Definition: custcont.h:3731
int h
Definition: custcont.h:3698
DWORD helpID
Definition: custcont.h:3697

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 )