3ds Max C++ API Reference
IViewPanel Class Referenceabstract

Many viewpanel related methods of CORE interface only work on the active tabbed view panel. More...

#include <IViewPanel.h>

+ Inheritance diagram for IViewPanel:

Public Member Functions

virtual ~IViewPanel ()
 
virtual Interface_ID GetID ()
 
virtual size_t GetNumberOfViewports () const =0
 Gets number of the enabled and non-extended viewports. More...
 
virtual int GetLayout () const =0
 Gets the layout of this view panel. More...
 
virtual void SetLayout (int layout)=0
 Set layout of this view panel. More...
 
virtual void SetLayout (int layout, bool forceSettings)=0
 Set layout of this view panel. More...
 
virtual int GetViewportIndex (HWND hwnd) const =0
 Gets index of the viewport with the specified window handle. More...
 
virtual bool SetActiveViewport (int index)=0
 Set active viewport according to the input param. More...
 
virtual int GetActiveViewportIndex (void) const =0
 Get the index of the active viewport. More...
 
virtual HWND GetHWnd () const =0
 Get the window handle of the tabbed view panel. More...
 
virtual void SetViewPanelName (const MSTR &newName)=0
 Set the view panel name. More...
 
virtual const MSTRGetViewPanelName () const =0
 Get the view panel name. More...
 
virtual ViewExpGetViewExpByIndex (int index) const =0
 Get the ViewExp interface given the viewport index. More...
 
virtual bool IsViewPanelFloating () const =0
 Gets if this view panel is a floating view panel. More...
 
virtual bool IsViewPanelVisible () const =0
 Gets if this view panel is currently visible . More...
 
virtual bool IsInPresentationMode () const =0
 Is the view panel in presentation mode ? The presentation mode works only on floating view panels. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual LifetimeType LifetimeControl ()
 
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

- 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...
 
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

Many viewpanel related methods of CORE interface only work on the active tabbed view panel.

For example, Interface::getNumViewports() only return the number of viewports of current view panel. This interface provides methods to get/modify settings of a tabbed view panel no matter it is currently active or not.

Constructor & Destructor Documentation

◆ ~IViewPanel()

virtual ~IViewPanel ( )
inlinevirtual
30 {}

Member Function Documentation

◆ GetID()

virtual Interface_ID GetID ( )
inlinevirtual
Remarks
This method returns the unique interface ID.

Reimplemented from BaseInterface.

32 { return VIEW_PANEL_INTERFACE; }
#define VIEW_PANEL_INTERFACE
Definition: IViewPanel.h:18

◆ GetNumberOfViewports()

virtual size_t GetNumberOfViewports ( ) const
pure virtual

Gets number of the enabled and non-extended viewports.

Returns
the number of the enabled and non-extended viewports.

◆ GetLayout()

virtual int GetLayout ( ) const
pure virtual

Gets the layout of this view panel.

Returns
the layout id
See also
View Panel Layout Configurations

◆ SetLayout() [1/2]

virtual void SetLayout ( int  layout)
pure virtual

Set layout of this view panel.

Parameters
[in]layoutthe layout configuration to use
See also
View Panel Layout Configurations

◆ SetLayout() [2/2]

virtual void SetLayout ( int  layout,
bool  forceSettings 
)
pure virtual

Set layout of this view panel.

Parameters
[in]layoutthe layout configuration to use
[in]forceSettingsforce the config setting to be re-applied
See also
View Panel Layout Configurations

◆ GetViewportIndex()

virtual int GetViewportIndex ( HWND  hwnd) const
pure virtual

Gets index of the viewport with the specified window handle.

User can use the viewport index to get the corresponding ViewExp interface by calling IViewPanel::GetViewExpByIndex(int index).

Parameters
[in]hwndthe window handle of a viewport in this viewpanel.
Returns
the index of the viewport with the given window handle. If none of the viewport matches the given handle, -1 is returned.

◆ SetActiveViewport()

virtual bool SetActiveViewport ( int  index)
pure virtual

Set active viewport according to the input param.

Parameters
[in]indexthe index of the viewport to be activated
Returns
true if this operation succeeds, false otherwise.

◆ GetActiveViewportIndex()

virtual int GetActiveViewportIndex ( void  ) const
pure virtual

Get the index of the active viewport.

Returns
the index of the active viewport. If there is no active viewport in this viewpanel, -1 is returned.

◆ GetHWnd()

virtual HWND GetHWnd ( ) const
pure virtual

Get the window handle of the tabbed view panel.

Returns
Return the window handle of the view panel.

◆ SetViewPanelName()

virtual void SetViewPanelName ( const MSTR newName)
pure virtual

Set the view panel name.

Parameters
[in]newNamethe new name for the view panel.

◆ GetViewPanelName()

virtual const MSTR& GetViewPanelName ( ) const
pure virtual

Get the view panel name.

Returns
Return the view panel name.

◆ GetViewExpByIndex()

virtual ViewExp& GetViewExpByIndex ( int  index) const
pure virtual

Get the ViewExp interface given the viewport index.

Parameters
[in]indexa valid viewport index
Returns
if input is valid, the specified ViewExp interface will be returned. Otherwise, the ViewExp interface of the first viewport(index = 0) will be returned.

◆ IsViewPanelFloating()

virtual bool IsViewPanelFloating ( ) const
pure virtual

Gets if this view panel is a floating view panel.

Returns
Return true if it is a floating view panel.

◆ IsViewPanelVisible()

virtual bool IsViewPanelVisible ( ) const
pure virtual

Gets if this view panel is currently visible .

Returns
Return true if this view panel is currently visible.

◆ IsInPresentationMode()

virtual bool IsInPresentationMode ( ) const
pure virtual

Is the view panel in presentation mode ? The presentation mode works only on floating view panels.

It is a viewport mode where there are no border, no grid, no view cube, no gizmos... The view in presentation mode is always updated even if it is not the active view.

Returns
Return true if it is in presentation mode.