IViewPanelManager Class Reference

IViewPanelManager Class Referenceabstract

#include <IViewPanelManager.h>

Class Description

In 3ds Max 2013, 3ds Max introduces the tabbed view panels.

Previously 3ds Max can have only one view panel(One view panel contains at most 4 viewports). Now 3ds Max users can create additional view panels other than the default view panel by using the tabbed view panel toolbar or MaxScript. Users can switch between those view panels. At one time, there can only be one view panel visible which we usually call it current view panel or active view panel. Each view panel can have one active viewport. Users can also destroy those additional view panels (NOTE: The default view panel can't be destroyed). Tabbed view panels will be saved & loaded during FileIO. When saving as previous, only the current active view panel will be saved. This interface is used to manage the multiple tabbed view panels. To acquire this interface, simply use the codes below.

...
IViewPanelManager* pViewPanelMgr = GetViewPanelManager();
...
+ Inheritance diagram for IViewPanelManager:

Public Member Functions

virtual bool CanCreateMoreViewPanels () const =0
 Check if we can create any more tabbed view panels. More...
 
virtual int CreateViewPanel (const MCHAR *tabName, int layout, bool bActive)=0
 Create a new tabbed view panel. More...
 
virtual int CreateViewPanel (int layout, bool bActive)=0
 Create a new tabbed view panel. More...
 
virtual bool DestroyViewPanel (int index)=0
 Destroy the specified tabbed view panel. More...
 
virtual IViewPanelGetActiveViewPanel () const =0
 Get the IViewPanel interface of the active tabbed view panel. More...
 
virtual bool SetActiveViewPanel (int index)=0
 Set a tabbed view panel as the current active view panel. More...
 
virtual int GetActiveViewPanelIndex () const =0
 Get the index of the active view panel. More...
 
virtual int GetViewPanelCount () const =0
 Get the count of current existing view panels. More...
 
virtual IViewPanelGetViewPanel (int index) const =0
 Get the IViewPanel interface of the specified tabbed view panel. More...
 
virtual const MCHARGetViewPanelName (int index) const =0
 Get the name of the specified view panel. More...
 
virtual bool SetViewPanelName (int index, const MCHAR *newName)=0
 Set the name of the specified view panel. More...
 
virtual bool IsViewPanelLocked (int index) const =0
 A locked view panel is one that cannot be deleted by the user. More...
 
virtual int GetHighlightViewPanelIndex () const =0
 Returns the index of the currently highlighted ViewPanel. More...
 
virtual void CycleHighlightedViewPanels ()=0
 Cycle the highlight through available view panels. More...
 
virtual void CycleHighlightedViewPanelsBack ()=0
 Cycle back through the highlight through available view panels. More...
 
virtual bool SelectHighlightedViewPanel ()=0
 Select the currently highlighted view panel. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 
- 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...
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClass * pc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Member Function Documentation

virtual bool CanCreateMoreViewPanels ( ) const
pure virtual

Check if we can create any more tabbed view panels.

Returns
true if we can create more view panels, false otherwise.
virtual int CreateViewPanel ( const MCHAR tabName,
int  layout,
bool  bActive 
)
pure virtual

Create a new tabbed view panel.

Parameters
[in]tabNamethe name of the new tabbed view panel. If NULL, a default name will be assigned to the new tabbed view panel automatically.
[in]layoutthe initial layout of the new tabbed view panel. Use VP_LAYOUT_XXX macro in maxapi.h.
[in]bActiveif true, the new tabbed view panel will be set as active view panel after creation.
Returns
Return the index of the new tabbed view panel.If creation fails, -1 will be returned.
virtual int CreateViewPanel ( int  layout,
bool  bActive 
)
pure virtual

Create a new tabbed view panel.

The panel is given a default name based on its layout.

Parameters
[in]layoutthe initial layout of the new tabbed view panel. Use VP_LAYOUT_XXX macro in maxapi.h.
[in]bActiveif true, the new tabbed view panel will be set as active view panel after creation.
Returns
Return the index of the new tabbed view panel. If creation fails, -1 will be returned.
virtual bool DestroyViewPanel ( int  index)
pure virtual

Destroy the specified tabbed view panel.

Parameters
[in]indexthe index of the tabbed view panel to be destroyed. An valid index should be from 1(0 is the default view panel) to GetViewPanelCount() - 1. Also, the panel specified cannot be 'locked'. Locked panels cannot be destroyed.
Returns
Return true if destruction succeeds, false otherwise.
See also
IsViewPanelLocked(int)
virtual IViewPanel* GetActiveViewPanel ( ) const
pure virtual

Get the IViewPanel interface of the active tabbed view panel.

Returns
Return the IViewPanel interface of the current active view panel. Return NULL if there is no active view panel.
virtual bool SetActiveViewPanel ( int  index)
pure virtual

Set a tabbed view panel as the current active view panel.

Parameters
[in]indexthe index of the view panel to be activated.
Returns
Return true if operation succeeds, false otherwise.
virtual int GetActiveViewPanelIndex ( ) const
pure virtual

Get the index of the active view panel.

Returns
Return the index of the current active view panel. Return -1 is there is no active view panel.
virtual int GetViewPanelCount ( ) const
pure virtual

Get the count of current existing view panels.

Returns
Return the count of current existing view panels.
virtual IViewPanel* GetViewPanel ( int  index) const
pure virtual

Get the IViewPanel interface of the specified tabbed view panel.

Parameters
[in]indexthe index of the tabbed view panel
Returns
Return the IViewPanel interface of the tabbed view panel specified by the input index. Return NULL
virtual const MCHAR* GetViewPanelName ( int  index) const
pure virtual

Get the name of the specified view panel.

Parameters
[in]indexthe index of the view panel whose name to be returned
Returns
Return the name of the specified view panel. If the input index is invalid, NULL will be returned.
virtual bool SetViewPanelName ( int  index,
const MCHAR newName 
)
pure virtual

Set the name of the specified view panel.

Parameters
[in]indexthe index of the view panel whose name to be set
[in]newNamethe new name of the specified view panel
Returns
Return true if the operation succeeds, false otherwise.
virtual bool IsViewPanelLocked ( int  index) const
pure virtual

A locked view panel is one that cannot be deleted by the user.

Parameters
[in]indexof the panel to check
Returns
true if the index is valid and the panel is considered 'locked' by the manager
virtual int GetHighlightViewPanelIndex ( ) const
pure virtual

Returns the index of the currently highlighted ViewPanel.

This is the index of the tabs as iterated through via Ctrl-Tab

Returns
Index of the currently highlighted ViewPanel, or -1 if none are highlighted.
virtual void CycleHighlightedViewPanels ( )
pure virtual

Cycle the highlight through available view panels.

This is the equivalent of the ctrl-tab functionality

virtual void CycleHighlightedViewPanelsBack ( )
pure virtual

Cycle back through the highlight through available view panels.

This is the equivalent of the shift-ctrl-tab functionality

virtual bool SelectHighlightedViewPanel ( )
pure virtual

Select the currently highlighted view panel.

Returns
True if the active panel is changed.