3ds Max C++ API Reference
IMenuElement Class Referenceabstract

#include <imenus.h>

+ Inheritance diagram for IMenuElement:

Public Types

enum  OriginLocation { UPPER_LEFT , LOWER_LEFT , LOWER_RIGHT , UPPER_RIGHT }
 

Public Member Functions

virtual ~IMenuElement ()
 
virtual void SetOrigin (const IPoint2 &origin, OriginLocation location)=0
 
virtual const IPoint2GetOrigin () const =0
 
virtual void SetVisible (bool visible)=0
 
virtual bool GetVisible ()=0
 
virtual void SetTitle (const MCHAR *customTitle)=0
 
virtual const MSTRGetTitle ()=0
 
virtual void SetEnabled (bool enabled)=0
 
virtual bool GetEnabled ()=0
 
virtual const IPoint2GetSize ()=0
 
virtual const Box2GetRect ()=0
 
virtual bool IsInRect (const IPoint2 &point)=0
 

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

See also
Class IMenuItem, Class IPoint2, Class Box2

Description:
This abstract class represents an interface for any menu element. Methods that are marked as internal should not be used.

Member Enumeration Documentation

◆ OriginLocation

Enumerator
UPPER_LEFT 
LOWER_LEFT 
LOWER_RIGHT 
UPPER_RIGHT 
@ UPPER_LEFT
Definition: imenus.h:1272
@ UPPER_RIGHT
Definition: imenus.h:1272
@ LOWER_RIGHT
Definition: imenus.h:1272
@ LOWER_LEFT
Definition: imenus.h:1272

Constructor & Destructor Documentation

◆ ~IMenuElement()

virtual ~IMenuElement ( )
inlinevirtual
Remarks
Destructor.
1274 {;}

Member Function Documentation

◆ SetOrigin()

virtual void SetOrigin ( const IPoint2 origin,
OriginLocation  location 
)
pure virtual
Remarks
This method is used internally.

This method allows you to set the element's origin and origin location.
Parameters:
IPoint2& origin

The x, y coordinates of the origin.

OriginLocation location

The origin location, either one of; UPPER_LEFT, LOWER_LEFT, LOWER_RIGHT, or UPPER_RIGHT.

◆ GetOrigin()

virtual const IPoint2& GetOrigin ( ) const
pure virtual
Remarks
This method is used internally.

This method returns the x, y coordinates of the element's origin.

◆ SetVisible()

virtual void SetVisible ( bool  visible)
pure virtual
Remarks
This method allows you to set the visibility of the element.
Parameters:
bool visible

TRUE for visible, FALSE for invisible.

◆ GetVisible()

virtual bool GetVisible ( )
pure virtual
Remarks
This method returns the visibility of the element. TRUE if the element is visible, otherwise FALSE.

◆ SetTitle()

virtual void SetTitle ( const MCHAR customTitle)
pure virtual
Remarks
This method allows you to set the item's title.
Parameters:
MCHAR *customTitle

The title string.

◆ GetTitle()

virtual const MSTR& GetTitle ( )
pure virtual
Remarks
This method returns the item's title string.

◆ SetEnabled()

virtual void SetEnabled ( bool  enabled)
pure virtual
Remarks
This method allows you to enable and disable the element.
Parameters:
bool enabled

TRUE to enable, FALSE to disable.

◆ GetEnabled()

virtual bool GetEnabled ( )
pure virtual
Remarks
This method returns the state of the element. TRUE if it's enabled, FALSE if it's disabled.

◆ GetSize()

virtual const IPoint2& GetSize ( )
pure virtual
Remarks
This method is used internally.

This method returns the element's size in the menu's coordinate space.

◆ GetRect()

virtual const Box2& GetRect ( )
pure virtual
Remarks
This method is used internally.

This method returns the element's rectangle size in the menu's coordinate space.

◆ IsInRect()

virtual bool IsInRect ( const IPoint2 point)
pure virtual
Remarks
This method is used internally.

This method determines if a specific point is inside the element's rectangle.
Parameters:
IPoint2& point

The point to test.
Returns
TRUE if the point is inside the rectangle, otherwise FALSE.