Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::IWorkbenchWindow Struct Referenceabstract

#include <berryIWorkbenchWindow.h>

Inheritance diagram for berry::IWorkbenchWindow:
Collaboration diagram for berry::IWorkbenchWindow:

Public Member Functions

 berryObjectMacro (berry::IWorkbenchWindow, IPageService, IServiceLocator, Object) virtual bool Close()=0
 
virtual QList< SmartPointer< IWorkbenchPage > > GetPages () const =0
 
virtual SmartPointer< IWorkbenchPageGetActivePage () const override=0
 
virtual void SetActivePage (SmartPointer< IWorkbenchPage > page)=0
 
virtual IPartServiceGetPartService ()=0
 
virtual ISelectionServiceGetSelectionService () const =0
 
virtual Shell::Pointer GetShell () const =0
 
virtual IWorkbenchGetWorkbench () const =0
 
virtual SmartPointer< IWorkbenchPageOpenPage (const QString &perspectiveId, IAdaptable *input)=0
 
virtual SmartPointer< IWorkbenchPageOpenPage (IAdaptable *input)=0
 
virtual ~IWorkbenchWindow ()
 
- Public Member Functions inherited from berry::IPageService
virtual ~IPageService ()
 
virtual void AddPerspectiveListener (IPerspectiveListener *listener)=0
 
virtual void RemovePerspectiveListener (IPerspectiveListener *listener)=0
 
virtual IPerspectiveListener::EventsGetPerspectiveEvents ()=0
 
- Public Member Functions inherited from berry::IServiceLocator
 berryObjectMacro (berry::IServiceLocator, Object)~IServiceLocator()
 
template<class S >
S * GetService ()
 
template<class S >
bool HasService () const
 
virtual ObjectGetService (const QString &api)=0
 
virtual bool HasService (const QString &api) const =0
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () const
 
virtual void Delete ()
 
QDebug Print (QDebug os, Indent Indent=0) const
 
virtual QString ToString () const
 
virtual uint HashCode () const
 
virtual bool operator< (const Object *) const
 
void Register () const
 
void UnRegister (bool del=true) const
 
int GetReferenceCount () const
 
void SetReferenceCount (int)
 
void AddDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
void RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
virtual bool operator== (const Object *) const
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Member Functions inherited from berry::Object
 Object ()
 
virtual ~Object ()
 
virtual QDebug PrintSelf (QDebug os, Indent indent) const
 
virtual QDebug PrintHeader (QDebug os, Indent indent) const
 
virtual QDebug PrintTrailer (QDebug os, Indent indent) const
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

A workbench window is a top level window in a workbench. Visually, a workbench window has a menubar, a toolbar, a status bar, and a main area for displaying a single page consisting of a collection of views and editors.

Each workbench window has a collection of 0 or more pages; the active page is the one that is being presented to the end user; at most one page is active in a window at a time.

The workbench window supports a few services by default. If these services are used to allocate resources, it is important to remember to clean up those resources after you are done with them. Otherwise, the resources will exist until the workbench window is closed. The supported services are:

This interface is not intended to be implemented by clients.

See also
IWorkbenchPage This interface is not intended to be implemented by clients.

Definition at line 70 of file berryIWorkbenchWindow.h.

Constructor & Destructor Documentation

berry::IWorkbenchWindow::~IWorkbenchWindow ( )
virtual

Definition at line 22 of file berryIWorkbenchWindow.cpp.

Member Function Documentation

berry::IWorkbenchWindow::berryObjectMacro ( berry::IWorkbenchWindow  ,
IPageService  ,
IServiceLocator  ,
Object   
)
pure virtual

Closes this workbench window.

If the window has an open editor with unsaved content, the user will be given the opportunity to save it.

Returns
true if the window was successfully closed, and false if it is still open
virtual SmartPointer<IWorkbenchPage> berry::IWorkbenchWindow::GetActivePage ( ) const
overridepure virtual

Returns the currently active page for this workbench window.

Returns
the active page, or null if none

Implements berry::IPageService.

Referenced by QmitkCloseProjectAction::Run().

virtual QList<SmartPointer<IWorkbenchPage> > berry::IWorkbenchWindow::GetPages ( ) const
pure virtual

Returns a list of the pages in this workbench window.

Note that each window has its own pages; pages are never shared between different windows.

Returns
a list of pages
virtual IPartService* berry::IWorkbenchWindow::GetPartService ( )
pure virtual

Returns the part service which tracks part activation within this workbench window.

Returns
the part service
virtual ISelectionService* berry::IWorkbenchWindow::GetSelectionService ( ) const
pure virtual

Returns the selection service which tracks selection within this workbench window.

Returns
the selection service
virtual Shell::Pointer berry::IWorkbenchWindow::GetShell ( ) const
pure virtual

Returns this workbench window's shell.

Returns
the shell containing this window's controls or null if the shell has not been created yet or if the window has been closed
virtual IWorkbench* berry::IWorkbenchWindow::GetWorkbench ( ) const
pure virtual

Returns the workbench for this window.

Returns
the workbench
virtual SmartPointer<IWorkbenchPage> berry::IWorkbenchWindow::OpenPage ( const QString &  perspectiveId,
IAdaptable input 
)
pure virtual

Returns whether the specified menu is an application menu as opposed to a part menu. Application menus contain items which affect the workbench or window. Part menus contain items which affect the active part (view or editor).

This is typically used during "in place" editing. Application menus should be preserved during menu merging. All other menus may be removed from the window.

Parameters
menuIdthe menu id
Returns
true if the specified menu is an application menu, and false if it is not Creates and opens a new workbench page. The perspective of the new page is defined by the specified perspective ID. The new page become active.

Note: Since release 2.0, a window is limited to contain at most one page. If a page exist in the window when this method is used, then another window is created for the new page. Callers are strongly recommended to use the IWorkbench.showPerspective APIs to programmatically show a perspective.

Parameters
perspectiveIdthe perspective id for the window's initial page
inputthe page input, or null if there is no current input. This is used to seed the input for the new page's views.
Returns
the new workbench page
Exceptions
WorkbenchExceptionif a page could not be opened
See also
IWorkbench::showPerspective(String, IWorkbenchWindow, IAdaptable)
virtual SmartPointer<IWorkbenchPage> berry::IWorkbenchWindow::OpenPage ( IAdaptable input)
pure virtual

Creates and opens a new workbench page. The default perspective is used as a template for creating the page. The page becomes active.

Note: Since release 2.0, a window is limited to contain at most one page. If a page exist in the window when this method is used, then another window is created for the new page. Callers are strongly recommended to use the IWorkbench.showPerspective APIs to programmatically show a perspective.

Parameters
inputthe page input, or null if there is no current input. This is used to seed the input for the new page's views.
Returns
the new workbench window
Exceptions
WorkbenchExceptionif a page could not be opened
See also
IWorkbench::showPerspective(String, IWorkbenchWindow, IAdaptable)
virtual void berry::IWorkbenchWindow::SetActivePage ( SmartPointer< IWorkbenchPage page)
pure virtual

Sets or clears the currently active page for this workbench window.

Parameters
pagethe new active page

The documentation for this struct was generated from the following files: