3ds Max C++ API Reference
IParamMap2 Class Referenceabstract

#include <iparamm2.h>

+ Inheritance diagram for IParamMap2:

Public Member Functions

virtual void Invalidate ()=0
 
virtual void Validate ()=0
 
virtual void Invalidate (ParamID id, int tabIndex=0)=0
 
virtual void UpdateUI (TimeValue t)=0
 
virtual void RedrawViews (TimeValue t, DWORD flag=REDRAW_NORMAL)=0
 
virtual IntervalValidity ()=0
 
virtual void SetParamBlock (IParamBlock2 *pb)=0
 Makes the parameter map point to a new parameter block, updating the user interface in the process. More...
 
virtual void SetParamBlock (IParamBlock2 *pb, ReferenceMaker *owner)=0
 Makes the parameter map point to a new parameter block, updating the user interface in the process. More...
 
virtual MapID GetMapID ()=0
 
virtual void SetUserDlgProc (ParamMap2UserDlgProc *proc=NULL)=0
 
virtual ParamMap2UserDlgProcGetUserDlgProc ()=0
 
virtual void ReplaceParam (ParamID curParam, ParamID newParam)
 
virtual HWND GetHWnd ()=0
 
virtual MaxSDK::QMaxParamBlockWidgetGetQWidget () const =0
 Returns the Qt widget being controlled by this parameter map, if applicable. More...
 
virtual IRollupWindowGetIRollup ()
 
virtual IParamBlock2GetParamBlock ()=0
 
virtual BOOL DlgActive ()=0
 
virtual ParamBlockDesc2GetDesc ()=0
 
virtual void ActivateDlg (BOOL onOff)=0
 
virtual int FindSubTexFromHWND (HWND hw)=0
 
virtual int FindSubMtlFromHWND (HWND hw)=0
 
virtual void Enable (ParamID id, BOOL onOff, int tabIndex=0)=0
 
virtual void SetText (ParamID id, const MCHAR *txt, int tabIndex=0)=0
 
virtual void SetTooltip (ParamID id, bool bEnable, const MCHAR *txt, int tabIndex=0)=0
 Set tooltip of param UI control. More...
 
virtual void SetRange (ParamID id, float low, float high, int tabIndex=0)=0
 
virtual void Show (ParamID id, BOOL showHide, int tabIndex=0)=0
 
virtual void SetThing (ReferenceTarget *m)=0
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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 IParamBlock2, Class ParamBlockDesc2, Class ParamMap2UserDlgProc.

Description:
This class provides methods to work with parameter map2s. Methods are provided for things like invalidating the parameter map so it gets redrawn, working with the parameter blocks associated with the parameter map, and establishing an optional dialog proc to handle controls not directly handled by the parameter map. This section also documents several functions that are available for creating and destroying parameter maps but are not part of this class.

Note: The use of this class requires the explicit inclusion the IPARAMM2.H header file.

Member Function Documentation

◆ Invalidate() [1/2]

virtual void Invalidate ( )
pure virtual
Remarks
This method marks the user interface as needing to be updated. This affects the entire UI for the parameter map.

◆ Validate()

virtual void Validate ( )
pure virtual
Remarks
This methods un-invalidates the entire user interface.

◆ Invalidate() [2/2]

virtual void Invalidate ( ParamID  id,
int  tabIndex = 0 
)
pure virtual
Remarks
This methods marks a specific control in the UI as requiring an update.
Parameters
idThe permanent ID of the control requiring an update.
tabIndexIf the control is a Tab<> then this is the zero based index into the table of the value to be invalidated.

◆ UpdateUI()

virtual void UpdateUI ( TimeValue  t)
pure virtual
Remarks
This method will update the user interface if the current settings are not valid at the given time (i.e., if anything is animated at that time).
Parameters
tThe time to check for the update.

◆ RedrawViews()

virtual void RedrawViews ( TimeValue  t,
DWORD  flag = REDRAW_NORMAL 
)
pure virtual
Remarks
This method may be called to cause the viewports to be redrawn.
Parameters
tThe time at which to redraw the viewports.
flagYou may specify one of the following:

REDRAW_BEGIN
Call this before you redraw.

REDRAW_INTERACTIVE
This allows the view quality to degrade to maintain interactively.

REDRAW_END
If during interactive redraw the state degraded, this will redraw the views in the undegraded state.

REDRAW_NORMAL
This redraws the views in the undegraded state.

◆ Validity()

virtual Interval& Validity ( )
pure virtual
Remarks
Provides access to pmap's validity interval. Returns a refernce to the actual interval so it can be modified if desired.

◆ SetParamBlock() [1/2]

virtual void SetParamBlock ( IParamBlock2 pb)
pure virtual

Makes the parameter map point to a new parameter block, updating the user interface in the process.

Remarks
Consider calling SetParamBlock(IParamBlock2 pb, ReferenceMaker owner) instead.
Parameters
pbThe new parameter block to use with the parameter map.
Remarks
This method swaps the existing parameter block with a new

◆ SetParamBlock() [2/2]

virtual void SetParamBlock ( IParamBlock2 pb,
ReferenceMaker owner 
)
pure virtual

Makes the parameter map point to a new parameter block, updating the user interface in the process.

Parameters
pbThe new parameter block to use with the parameter map.
ownerThe owner the parameter block. In most cases, this should be IParamBlock2::GetOwner(). But in the case of class parameter block (see P_CLASS_PARAMS), where the parameter block does not have an owner, then this should point to the object for which the UI is currently being edited.

◆ GetMapID()

virtual MapID GetMapID ( )
pure virtual
Remarks
Returns the parameter map's ID.

◆ SetUserDlgProc()

virtual void SetUserDlgProc ( ParamMap2UserDlgProc proc = NULL)
pure virtual
Remarks
This method allows a developer to provide special handling for one or more controls. The developer provides a dialog proc to process the message from the control. This method is used to tell the parameter map that the developer defined method should be called. The given proc will be called after default processing is done. Note that if the proc is non-NULL when the ParamMap2 is deleted its DeleteThis() method will be called.
Parameters
procPoints to the user dialog proc object to process the controls.

◆ GetUserDlgProc()

virtual ParamMap2UserDlgProc* GetUserDlgProc ( )
pure virtual
Remarks
Returns a pointer to the user dialog proc for the parameter map (or NULL if none is defined). See SetUserDlgProc() above.

◆ ReplaceParam()

virtual void ReplaceParam ( ParamID  curParam,
ParamID  newParam 
)
inlinevirtual
Remarks
This method changes a parameter map entry to refer to a different item in the parameter block.
Parameters
curParamThe parameter ID of the item to change.
newParamThe new parameter ID.
179 { UNUSED_PARAM(curParam); UNUSED_PARAM(newParam); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

◆ GetHWnd()

virtual HWND GetHWnd ( )
pure virtual
Remarks
Returns the dialog window handle of the parameter map.

◆ GetQWidget()

virtual MaxSDK::QMaxParamBlockWidget* GetQWidget ( ) const
pure virtual

Returns the Qt widget being controlled by this parameter map, if applicable.

This method will return a valid Qt widget only if the parameter map was constructed from a Qt widget. It will return null if the parameter map controls a Win32 dialog.

◆ GetIRollup()

virtual IRollupWindow* GetIRollup ( )
inlinevirtual
189 { return NULL; }
#define NULL
Definition: autoptr.h:18

◆ GetParamBlock()

virtual IParamBlock2* GetParamBlock ( )
pure virtual
Remarks
Returns a pointer to the parameter block2 used by this parameter map.

◆ DlgActive()

virtual BOOL DlgActive ( )
pure virtual
Remarks
Returns TRUE if the parameter map dialog proc is active; otherwise FALSE.

◆ GetDesc()

virtual ParamBlockDesc2* GetDesc ( )
pure virtual
Remarks
Returns a pointer to the ParamBlockDesc2 instance for this parameter map.

◆ ActivateDlg()

virtual void ActivateDlg ( BOOL  onOff)
pure virtual
Remarks
This method is called to indicate the dialog is going inactive or is becoming active.
Parameters
onOffTRUE if becoming active; FALSE for inactive.

◆ FindSubTexFromHWND()

virtual int FindSubTexFromHWND ( HWND  hw)
pure virtual
Remarks
This method is sent to a Material Editor map to find the SubTex index corresponding to the control handle. It should return the index of the sub-texmap corresponding to the window whose handle is passed. If the handle is not valid return -1.
Parameters
hwThe window handle of the control.

◆ FindSubMtlFromHWND()

virtual int FindSubMtlFromHWND ( HWND  hw)
pure virtual

◆ Enable()

virtual void Enable ( ParamID  id,
BOOL  onOff,
int  tabIndex = 0 
)
pure virtual
Remarks
This method is used to enable of disable an individual user interface control.
Parameters
idThe parameter ID of the control to enable/disable.
onOffTRUE to enable; FALSE to disable.
tabIndexIf the control is a Tab<> then this is the zero based index in the table of the item to enable/disable.

◆ SetText()

virtual void SetText ( ParamID  id,
const MCHAR txt,
int  tabIndex = 0 
)
pure virtual
Remarks
This method sets the text of a parameter user interface control.
Parameters
idThe ID of the parameter whose user interface text to change.
txtThe new string to display.
tabIndexIf the parmeter is a Tab<> this is the zero based index of the parameter in the table.

◆ SetTooltip()

virtual void SetTooltip ( ParamID  id,
bool  bEnable,
const MCHAR txt,
int  tabIndex = 0 
)
pure virtual

Set tooltip of param UI control.

This method allows for turning on or off the tooltip for a parameter user interface control.

Parameters
id- The ID of the parameter whose user interface tooltip to set.
bEnable- if true, the tooltip is enabled, otherwise disabled. When disabled, the tooltip won't be displayed when the the mouse hovers on top of the control. Enabling the tooltip repeatedly will have the same effect as enabling it once.
txt- pointer to a string representing the text to be displayed in the tooltip window. This parameter is ignored when the tooltip is being disabled.
tabIndexIf the parameter is a Tab<> this is the zero based index of the parameter in the table.

◆ SetRange()

virtual void SetRange ( ParamID  id,
float  low,
float  high,
int  tabIndex = 0 
)
pure virtual
Remarks
This method sets the range of parameter for a spinner or slider control.
Parameters
idThe ID of the parameter.
lowThe low range for the spinner / slider.
highThe high range for the spinner / slider.
tabIndexIf the parmeter is a Tab<> this is the zero based index of the parameter in the table.

◆ Show()

virtual void Show ( ParamID  id,
BOOL  showHide,
int  tabIndex = 0 
)
pure virtual
Remarks
This method will show or hide the specified control.
Parameters
idThe ID of the parameter.
showHideTRUE to show; FALSE to hide.
tabIndexIf the parmeter is a Tab<> this is the zero based index of the parameter in the table.

◆ SetThing()

virtual void SetThing ( ReferenceTarget m)
pure virtual
Remarks
This method is called by any IAutoXXParamDlg when it receives a SetThing().
Parameters
mThe item which was set.