3ds Max C++ API Reference
IViewPanelManager Class Referenceabstract

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

#include <IViewPanelManager.h>

+ Inheritance diagram for IViewPanelManager:

Public Types

enum class  ViewPanelFloatingID { NotFloating , ViewPanel_1 , ViewPanel_2 , ViewPanel_3 }
 Enum for our 3 floating view panels. More...
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

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 GetViewPanelIndex (const IViewPanel *pViewPanel) const =0
 Get the index of the 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, such as the default view panel or a floating view panel. More...
 
virtual bool IsViewPanelVisible (int viewpanelIndex) const =0
 This method gets if a view panel is currently visible by its index in the view panels array. More...
 
virtual bool IsViewPanelFloating (int viewpanelIndex) const =0
 This method gets if a view panel has the floating view panel property, whether or not it is currently visible. More...
 
virtual int GetNumFloatingViewPanels (void) const =0
 Get the number of floating view panels. More...
 
virtual void HideAllFloatingViewPanels (void)=0
 Hides all the floating view panels. More...
 
virtual ViewPanelFloatingID GetViewPanelFloatingID (int viewpanelIndex) const =0
 This method gets the view panel floating ID by its index in the array of view panels. More...
 
virtual int GetViewPanelIndexFromFloatingID (int viewPanelFloatingID) const =0
 This method gets the index of a view panel from its ViewPanelFloatingID. More...
 
virtual void SetFloatingViewPanelVisibility (int viewPanelFloatingID, bool bVisible)=0
 This method sets a floating view panel visible and active at the same time. More...
 
virtual int GetNumViewportsFromAllVisibleViewPanels () const =0
 This method sums the viewports from all visible view panels by calling getNumViews() on each of the view panel. More...
 
virtual int GetNumVisibleViewPanels (void) const =0
 Gets the number of view panels currently visible. 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=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
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...
 
- 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
 
MSPluginClasspc
 
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)
 

Detailed 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();
...
IViewPanelManager * GetViewPanelManager()
Return the IViewPanelManager interface.
Definition: IViewPanelManager.h:240

In a future release of 3ds Max we will introduce the notion of visible and floating view panels. When this is done, more than one view panel at a time can be visible. There will always be the main view panel attached to 3ds Max main window but you will be able to set visible, floating view panels, which could be put on another monitor. To support these visible view panels, instead of using GetActiveViewPanel() and do things on its viewports, use the new methods IsViewPanelVisible and IsViewPanelFloating when iterating on all view panels.

Member Enumeration Documentation

◆ ViewPanelFloatingID

enum ViewPanelFloatingID
strong

Enum for our 3 floating view panels.

Enumerator
NotFloating 
ViewPanel_1 
ViewPanel_2 
ViewPanel_3 
171  {
172  NotFloating,
173  ViewPanel_1,
174  ViewPanel_2,
175  ViewPanel_3,
176  };

Member Function Documentation

◆ CanCreateMoreViewPanels()

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.

◆ CreateViewPanel() [1/2]

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.

◆ CreateViewPanel() [2/2]

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.

◆ DestroyViewPanel()

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)

◆ GetActiveViewPanel()

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 or NULL if there is no active view panel.

◆ SetActiveViewPanel()

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.

◆ GetActiveViewPanelIndex()

virtual int GetActiveViewPanelIndex ( ) const
pure virtual

Get the index of the active view panel.

Returns
Return the index of the current active view panel or -1 if is there is no active view panel.

◆ GetViewPanelIndex()

virtual int GetViewPanelIndex ( const IViewPanel pViewPanel) const
pure virtual

Get the index of the view panel.

Parameters
[in]pViewPanelthe view panel.
Returns
Return the index of the view panel or -1 if pViewPanel is a nullptr or if pViewPanel is not in the view panel array.

◆ GetViewPanelCount()

virtual int GetViewPanelCount ( ) const
pure virtual

Get the count of current existing view panels.

Returns
Return the count of current existing view panels.

◆ GetViewPanel()

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

◆ GetViewPanelName()

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.

◆ SetViewPanelName()

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.

◆ IsViewPanelLocked()

virtual bool IsViewPanelLocked ( int  index) const
pure virtual

A locked view panel is one that cannot be deleted by the user, such as the default view panel or a floating view panel.

Parameters
[in]indexof the panel to check
Returns
true if the index is valid and the panel is considered 'locked' by the manager

◆ IsViewPanelVisible()

virtual bool IsViewPanelVisible ( int  viewpanelIndex) const
pure virtual

This method gets if a view panel is currently visible by its index in the view panels array.

Parameters
[in]viewpanelIndexthe index in the view panel array
Returns
Returns true if the view panel is visible, false if it is not or if viewpanelIndex is out of range

◆ IsViewPanelFloating()

virtual bool IsViewPanelFloating ( int  viewpanelIndex) const
pure virtual

This method gets if a view panel has the floating view panel property, whether or not it is currently visible.

Parameters
[in]viewpanelIndexthe index in the view panel array
Returns
Returns true if the view panel is a floating view panel, false if it is not or if viewpanelIndex is out of range

◆ GetNumFloatingViewPanels()

virtual int GetNumFloatingViewPanels ( void  ) const
pure virtual

Get the number of floating view panels.

Returns
Returns the number of floating view panels

◆ HideAllFloatingViewPanels()

virtual void HideAllFloatingViewPanels ( void  )
pure virtual

Hides all the floating view panels.

◆ GetViewPanelFloatingID()

virtual ViewPanelFloatingID GetViewPanelFloatingID ( int  viewpanelIndex) const
pure virtual

This method gets the view panel floating ID by its index in the array of view panels.

Parameters
[in]viewpanelIndexthe index in the view panel array
Returns
Returns the ViewPanelFloatingID of this view panel. If it's not a floating view panel, it returns ViewPanelFloatingID::NotFloating

◆ GetViewPanelIndexFromFloatingID()

virtual int GetViewPanelIndexFromFloatingID ( int  viewPanelFloatingID) const
pure virtual

This method gets the index of a view panel from its ViewPanelFloatingID.

Parameters
[in]viewPanelFloatingIDthe ViewPanelFloatingID of the view panel to retrieve
Returns
Returns the index of the view panel whose ViewPanelFloatingID is viewPanelFloatingID or -1 if not found.

◆ SetFloatingViewPanelVisibility()

virtual void SetFloatingViewPanelVisibility ( int  viewPanelFloatingID,
bool  bVisible 
)
pure virtual

This method sets a floating view panel visible and active at the same time.

Parameters
[in]viewPanelFloatingIDthe ViewPanelFloatingID of the view panel
[in]bVisibleis true if we want the floating view panel to be visible and active or false if we want to hide it

◆ GetNumViewportsFromAllVisibleViewPanels()

virtual int GetNumViewportsFromAllVisibleViewPanels ( ) const
pure virtual

This method sums the viewports from all visible view panels by calling getNumViews() on each of the view panel.

Returns
Return the number of viewports from all visible view panels

◆ GetNumVisibleViewPanels()

virtual int GetNumVisibleViewPanels ( void  ) const
pure virtual

Gets the number of view panels currently visible.

Returns
Returns the number of visible view panels.

◆ GetHighlightViewPanelIndex()

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.

◆ CycleHighlightedViewPanels()

virtual void CycleHighlightedViewPanels ( )
pure virtual

Cycle the highlight through available view panels.

This is the equivalent of the ctrl-tab functionality

◆ CycleHighlightedViewPanelsBack()

virtual void CycleHighlightedViewPanelsBack ( )
pure virtual

Cycle back through the highlight through available view panels.

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

◆ SelectHighlightedViewPanel()

virtual bool SelectHighlightedViewPanel ( )
pure virtual

Select the currently highlighted view panel.

Returns
True if the active panel is changed.