ModelessParamMapClassDesc2 Class Reference

ModelessParamMapClassDesc2 Class Reference

#include <iparamb2.h>

Class Description

Extension class that adds functionality to class ClassDesc2 for parameter block-linked modeless UI.

Vanilla ClassDesc2 manages only modal ParamMaps, and those are destroyed when EndEditParams is called. This extension allows plugins to support modeless user interface rollups that are tied to parameter blocks.

The plugin developer may implement this method by deriving a plugin's class descriptor from this class alongside ClassDesc2.

A pointer to this extension interface may be retrieved through a dynamic_cast from a ClassDesc2.

+ Inheritance diagram for ModelessParamMapClassDesc2:

Public Member Functions

virtual PB2Export ~ModelessParamMapClassDesc2 ()
 
virtual int NumModelessParamMaps ()
 
virtual IParamMap2GetModelessParamMap (int i)
 
virtual PB2Export IParamMap2GetModelessParamMap (ParamBlockDesc2 *pbd, MapID map_id=0)
 
virtual PB2Export void AddModelessParamMap2 (IParamMap2 *map)
 
virtual PB2Export void RemoveModelessParamMap2 (IParamMap2 *map)
 
virtual PB2Export void RemoveModelessParamMap2 (int id)
 
virtual PB2Export MaxSDK::QMaxParamBlockWidgetCreateModelessQtWidget (ReferenceMaker &owner, IParamBlock2 &paramBlock, const MapID paramMapID)
 Creates a Qt widget to be associated with the given parameter map ID for modeless use. /*! This method is to be implemented by the plugin developer, if and only if the P_AUTO_UI_QT flag has been specific on a parameter block descriptor. It replaces the UI definition that exists in the parameter block descriptor for Win32 dialogs; it is responsible for building a Qt widget which defines the UI to be controlled by the parameter map with the given ID. This Qt widget will be hosted in a rollup window. More...
 
virtual PB2Export void DestroyModelessUI (IParamBlock2 *pblock, int id)
 
- Public Member Functions inherited from ClassDesc2
PB2Export ClassDesc2 ()
 
PB2Export ~ClassDesc2 ()
 
PB2Export void ResetClassParams (BOOL fileReset)
 
PB2Export int NumParamBlockDescs ()
 
PB2Export ParamBlockDesc2GetParamBlockDesc (int i)
 
PB2Export ParamBlockDesc2GetParamBlockDescByID (BlockID id)
 
PB2Export ParamBlockDesc2GetParamBlockDescByName (const MCHAR *name)
 
PB2Export void AddParamBlockDesc (ParamBlockDesc2 *pbd)
 
PB2Export void ClearParamBlockDescs ()
 
PB2Export void BeginEditParams (IObjParam *ip, ReferenceMaker *obj, ULONG flags, Animatable *prev)
 
PB2Export void EndEditParams (IObjParam *ip, ReferenceMaker *obj, ULONG flags, Animatable *prev)
 
PB2Export void InvalidateUI ()
 
PB2Export void InvalidateUI (ParamBlockDesc2 *pbd)
 
PB2Export void InvalidateUI (ParamBlockDesc2 *pbd, ParamID id, int tabIndex=-1)
 
PB2Export void MakeAutoParamBlocks (ReferenceMaker *owner)
 
PB2Export int NumParamMaps ()
 
PB2Export IParamMap2GetParamMap (int i)
 
PB2Export IParamMap2GetParamMap (ParamBlockDesc2 *pbd, MapID map_id=0)
 
PB2Export bool SetUserDlgProc (ParamBlockDesc2 *pbd, MapID map_id, ParamMap2UserDlgProc *proc=NULL)
 
bool SetUserDlgProc (ParamBlockDesc2 *pbd, ParamMap2UserDlgProc *proc=NULL)
 
PB2Export ParamMap2UserDlgProcGetUserDlgProc (ParamBlockDesc2 *pbd, MapID map_id=0)
 
PB2Export IAutoMParamDlgCreateParamDlgs (HWND hwMtlEdit, IMtlParams *imp, ReferenceTarget *obj)
 
PB2Export IAutoMParamDlgCreateParamDlg (BlockID id, HWND hwMtlEdit, IMtlParams *imp, ReferenceTarget *obj, MapID mapID=0)
 
PB2Export IAutoEParamDlgCreateParamDialogs (IRendParams *ip, SpecialFX *obj)
 
PB2Export IAutoRendererParamDlgCreateParamDialogs (IRendParams *ip, Renderer &renderer)
 Creates the automatically-managed parameter dialogs defined with the P_AUTO_UI or P_AUTO_UI_QT flags in the parameter block descriptors. More...
 
PB2Export IAutoRendererParamDlgCreateParamDialog (BlockID id, IRendParams *ip, Renderer &renderer, MapID mapID)
 Creates the automatically-managed parameter dialog for the given parameter block and parameter map only. More...
 
PB2Export IAutoEParamDlgCreateParamDialog (BlockID id, IRendParams *ip, SpecialFX *obj, MapID mapID=0)
 
PB2Export void MasterDlgDeleted (IAutoMParamDlg *dlg)
 
PB2Export void MasterDlgDeleted (IAutoEParamDlg *dlg)
 
PB2Export void MasterDlgDeleted (IAutoRendererParamDlg &dlg)
 Used internally. More...
 
PB2Export IAutoMParamDlgGetMParamDlg ()
 
PB2Export IAutoEParamDlgGetEParamDlg ()
 
PB2Export void RestoreRolloutState ()
 
PB2Export ParamID LastNotifyParamID (ReferenceMaker *owner, IParamBlock2 *&pb)
 
PB2Export void Reset (ReferenceMaker *owner, BOOL updateUI=TRUE, BOOL callSetHandlers=TRUE)
 
PB2Export void GetValidity (ReferenceMaker *owner, TimeValue t, Interval &valid)
 
PB2Export void RemoveParamBlockDesc (ParamBlockDesc2 *pbd)
 
virtual MaxSDK::QMaxParamBlockWidgetCreateQtWidget (ReferenceMaker &owner, IParamBlock2 &paramBlock, const MapID paramMapID, MSTR &rollupTitle, int &rollupFlags, int &rollupCategory)
 Creates a Qt widget to be associated with the given parameter map ID. More...
 
virtual MaxSDK::QMaxParamBlockWidgetCreateQtWidget (ReferenceMaker &owner, IParamBlock2 &paramBlock, const MapID paramMapID, MSTR &rollupTitle, int &rollupFlags, int &rollupCategory, Class_ID &tabID)
 Creates a Qt widget that is connected to the given parameter block. More...
 
- Public Member Functions inherited from ClassDesc
virtual ~ClassDesc ()
 
virtual int IsPublic ()=0
 Controls if the plug-in shows up in lists from the user to choose from. More...
 
virtual const MCHARClassName ()=0
 This method returns the name of the class. More...
 
virtual SClass_ID SuperClassID ()=0
 This method returns a system defined constant describing the class this plug-in class was derived from. More...
 
virtual Class_ID ClassID ()=0
 This method must return the unique ID for the object. More...
 
virtual const MCHARCategory ()=0
 This methods returns a string describing the category a plug-in fits into. More...
 
virtual DWORD InitialRollupPageState ()
 This method returns a DWORD which is used to initialize the rollup state in both the create branch and the modify branch. More...
 
virtual const MCHARInternalName ()
 Returns a string which provides a fixed, machine parsable internal name for the plug-in. More...
 
virtual bool UseOnlyInternalNameForMAXScriptExposure ()
 Returns true if only the InternalName is to be used for MAXScript exposure. More...
 
virtual HINSTANCE HInstance ()
 Returns the DLL instance handle of the plug-in. More...
 
virtual CoreExport const MCHARGetRsrcString (INT_PTR id)
 Returns a pointer to the string from the resource string table. More...
 
virtual Class_ID SubClassID ()
 This method can be used for further categorizing plugins. More...
 
virtual voidCreate (BOOL loading=FALSE)=0
 3ds Max calls this method when it needs a pointer to a new instance of the plug-in class. More...
 
virtual int BeginCreate (Interface *i)
 The custom creation process of the plug-in object is handled by this method. More...
 
virtual int EndCreate (Interface *i)
 The termination of the custom creation process is managed by the implementation of this method. More...
 
virtual BOOL OkToCreate (Interface *i)
 This method is used to enable or disable the button that allows the plug-ins class to be created. More...
 
virtual BOOL HasClassParams ()
 If a plug-in class has default parameters that it needs to allow the user to edit, TRUE should be returned and EditClassParams() and ResetClassParams() should be implemented. More...
 
virtual void EditClassParams (HWND hParent)
 If the user picks the class from the list this method is called. More...
 
virtual int NumActionTables ()
 3ds Max calls this to get the number of action tables a plug-in has. More...
 
virtual ActionTableGetActionTable (int i)
 Returns a pointer to the specified action table. More...
 
virtual BOOL IsManipulator ()
 Returns TRUE if the class implements a manipulator object; otherwise FALSE. More...
 
virtual BOOL CanManipulate (ReferenceTarget *hTarget)
 The method returns true if the class is a manipulator and it manipulates the given base object, modifier or controller. More...
 
virtual BOOL CanManipulateNode (INode *pNode)
 Returns TRUE if the manipulator applies to the given node; otherwise FALSE. More...
 
virtual ManipulatorCreateManipulator (ReferenceTarget *hTarget, INode *pNode)
 Creates a manipulator object When a manipulator returns TRUE to CanManipulate(ReferenceTarget* hTarget), the system calls this version of CreateManipulator() to create an instance of the manipulator. More...
 
virtual ManipulatorCreateManipulator (INode *pNode)
 Creates a manipulator object. More...
 
virtual BOOL NeedsToSave ()
 Returns TRUE if there is data associated with the class that needs to be saved in the 3ds Max file. More...
 
virtual IOResult Save (ISave *isave)
 If NeedsToSave() returns TRUE then this method should be implemented to save the data associated with the class. More...
 
virtual IOResult Load (ILoad *iload)
 If NeedsToSave() returns TRUE then this method should be implemented to load the data associated with the class. More...
 
virtual IParamMap2GetParamMap (ParamBlockDesc2 *pbd)
 Returns a pointer to the parameter map2 whose descriptor is passed. More...
 
virtual ParamMap2UserDlgProcGetUserDlgProc (ParamBlockDesc2 *pbd)
 Returns a pointer to the parameter map 2 user dialog proc (if any) for the specified descriptor. More...
 
virtual bool DrawRepresentation (COLORREF bkColor, HDC hDC, Rect &rect)
 Allows a plug-in to provide a custom image for display in Schematic View. More...
 
virtual int NumInterfaces ()
 Returns the number of function publishing interfaces maintained by the class descriptor. More...
 
virtual FPInterfaceGetInterfaceAt (int i)
 Returns the nth function publishing interface. More...
 
virtual CoreExport FPInterfaceGetInterface (Interface_ID id)
 Returns a pointer to the function publishing interface whose ID is specified. More...
 
virtual CoreExport FPInterfaceGetInterface (const MCHAR *name)
 Returns a pointer to the function publishing interface whose name is specified. More...
 
virtual CoreExport void AddInterface (FPInterface *fpi)
 Adds the specified interface to the list maintained by this class descriptor. More...
 
virtual void ClearInterfaces ()
 Deletes all the interfaces maintained by the class descriptor. More...
 
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
 This function is maintained so the 3ds Max SDK can be extended without breaking backwards compatibility. More...
 

Protected Attributes

Tab< IParamMap2 * > modelessParamMaps
 

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...
 
- Protected Member Functions inherited from ClassDesc2
void SetMParamDlg (IAutoMParamDlg *dlg)
 Sets the root level material ParamDlg. More...
 
void SetEParamDlg (IAutoEParamDlg *dlg)
 Sets the root level effect ParamDlg. More...
 
Tab< IParamMap2 * > & GetParamMaps ()
 

Constructor & Destructor Documentation

virtual PB2Export ~ModelessParamMapClassDesc2 ( )
virtual
Remarks
Destructor.

Member Function Documentation

virtual int NumModelessParamMaps ( )
inlinevirtual
Remarks
Implemented by the System.

Returns the number of modeless parameter map2s, which are maintained by the class.
2901 { return modelessParamMaps.Count(); }
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
Tab< IParamMap2 * > modelessParamMaps
Definition: iparamb2.h:2895
virtual IParamMap2* GetModelessParamMap ( int  i)
inlinevirtual
Remarks
Implemented by the System.

Gets the modeless parameter map indicated by the index.

Parameters
iThe index of the desired modeless parameter map.
Returns
A pointer to the modeless parameter map2 requested.
2907 { return modelessParamMaps[i]; }
Tab< IParamMap2 * > modelessParamMaps
Definition: iparamb2.h:2895
virtual PB2Export IParamMap2* GetModelessParamMap ( ParamBlockDesc2 pbd,
MapID  map_id = 0 
)
virtual
Remarks
Implemented by the System.

Returns a pointer to the parameter map2 as specified by the parameter block2 pointer and optional map ID index passed.
Parameters
pbdPoints to the parameter block descriptor2 associated with this parameter map.
map_idThis parameter specifies the ID of the map/rollout to get.
virtual PB2Export void AddModelessParamMap2 ( IParamMap2 map)
virtual
Remarks
Implemented by the System.

Adds a parameter map to the list of modeless maps being managed.
Parameters
mapPoints to the parameter map2 to add to the list.
virtual PB2Export void RemoveModelessParamMap2 ( IParamMap2 map)
virtual
Remarks
Implemented by the System.

Removes a parameter map from the list of modeless maps being managed.
Parameters
mapPoints to the parameter map2 to remove from the list.
virtual PB2Export void RemoveModelessParamMap2 ( int  id)
virtual
Remarks
Implemented by the System.

Removes a parameter map from the list of modeless maps being managed using its id.
Parameters
idProvides the id of the map to remove from the list.
virtual PB2Export MaxSDK::QMaxParamBlockWidget* CreateModelessQtWidget ( ReferenceMaker owner,
IParamBlock2 paramBlock,
const MapID  paramMapID 
)
virtual

Creates a Qt widget to be associated with the given parameter map ID for modeless use. /*! This method is to be implemented by the plugin developer, if and only if the P_AUTO_UI_QT flag has been specific on a parameter block descriptor. It replaces the UI definition that exists in the parameter block descriptor for Win32 dialogs; it is responsible for building a Qt widget which defines the UI to be controlled by the parameter map with the given ID. This Qt widget will be hosted in a rollup window.

Remarks
Implemented by the System.

!
Parameters
ownerThe owner of the dialog. This will normally be the owner of the parameter block, but in the case of P_CLASS_PARAMS, where the parameter block doesn't have an owner, this will be the object for which the dialog is being displayed.
paramBlockThe parameter block to which the parameter map belongs.
paramMapIDThe ID of the parameter map, as specific in the parameter block descriptor.
Returns
An instance of a new Qt widget which will be hosted in the parameter map's rollup.
Remarks
The ownership of the Qt widget is transferred to the caller.
May return null if no dialog should be shown for the given parameter map.
See also
Qt in Parameter Maps and Parameter Blocks.
virtual PB2Export void DestroyModelessUI ( IParamBlock2 pblock,
int  id 
)
virtual
Remarks
Implemented by the System.

Destroys any parameter map associated with the given parameter block and ID.
Parameters
pblockGives the parameter block of the map to be destroyed
idGives the unique ID of the map to be destroyed
Remarks
This only destroys the parameter map associated with the ID, not the Qt widget.

Member Data Documentation

Tab<IParamMap2*> modelessParamMaps
protected