IViewPanel Class Reference

IViewPanel Class Referenceabstract

#include <IViewPanel.h>

Class 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. Here is an example on how to get the number of active and non-extended viewports of all view panels.

int viewportCount = 0;
for (int i = 0; i < GetViewPanelManager()->GetViewPanelCount(); ++i)
{
if (pViewPanel)
{
viewportCount += pViewPanel->GetNumberOfViewports();
}
}
See also
IViewPanelManager
+ 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)=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)=0
 Get the index of the active viewport. More...
 
virtual HWND GetHWnd ()=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 ()=0
 Get the view panel name. More...
 
virtual ViewExpGetViewExpByIndex (int index)=0
 Get the ViewExp interface given the viewport index. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
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=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...
 

Constructor & Destructor Documentation

virtual ~IViewPanel ( )
inlinevirtual
44 {}

Member Function Documentation

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

Reimplemented from BaseInterface.

46 { return VIEW_PANEL_INTERFACE; }
#define VIEW_PANEL_INTERFACE
Definition: IViewPanel.h:18
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.
virtual int GetLayout ( ) const
pure virtual

Gets the layout of this view panel.

Returns
the layout id
See also
View Panel Layout Configurations
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
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
virtual int GetViewportIndex ( HWND  hwnd)
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.
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.
virtual int GetActiveViewportIndex ( void  )
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.
virtual HWND GetHWnd ( )
pure virtual

Get the window handle of the tabbed view panel.

Returns
Return the window handle of the view panel.
virtual void SetViewPanelName ( const MSTR newName)
pure virtual

Set the view panel name.

Parameters
[in]newNamethe new name for the view panel.
virtual const MSTR& GetViewPanelName ( )
pure virtual

Get the view panel name.

Returns
Return the view panel name.
virtual ViewExp& GetViewExpByIndex ( int  index)
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.