Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::ContributionItemFactory Class Referenceabstract

#include <berryContributionItemFactory.h>

Inheritance diagram for berry::ContributionItemFactory:

Public Member Functions

virtual SmartPointer< IContributionItemCreate (IWorkbenchWindow *window)=0
 
QString GetId () const
 

Static Public Attributes

static const QScopedPointer< ContributionItemFactoryOPEN_WINDOWS
 
static const QScopedPointer< ContributionItemFactoryVIEWS_SHORTLIST
 
static const QScopedPointer< ContributionItemFactoryREOPEN_EDITORS
 
static const QScopedPointer< ContributionItemFactoryPERSPECTIVES_SHORTLIST
 

Protected Member Functions

 ContributionItemFactory (const QString &contributionItemId)
 

Detailed Description

Access to standard contribution items provided by the workbench.

Most of the functionality of this class is provided by static methods and fields. Example usage:

MenuManager menu = ...;
IContributionItem::Pointer reEdit
    = ContributionItemFactory::REOPEN_EDITORS->Create(window);
menu->Add(reEdit);

Clients may declare subclasses that provide additional application-specific contribution item factories.

Definition at line 49 of file berryContributionItemFactory.h.

Constructor & Destructor Documentation

berry::ContributionItemFactory::ContributionItemFactory ( const QString &  contributionItemId)
protected

Creates a new workbench contribution item factory with the given id.

Parameters
contributionItemIdthe id of contribution items created by this factory

Definition at line 30 of file berryContributionItemFactory.cpp.

Member Function Documentation

virtual SmartPointer<IContributionItem> berry::ContributionItemFactory::Create ( IWorkbenchWindow window)
pure virtual

Creates a new standard contribution item for the given workbench window.

A typical contribution item automatically registers listeners against the workbench window so that it can keep its enablement state up to date. Ordinarily, the window's references to these listeners will be dropped automatically when the window closes. However, if the client needs to get rid of a contribution item while the window is still open, the client must call IContributionItem::dispose to give the item an opportunity to deregister its listeners and to perform any other cleanup.

Parameters
windowthe workbench window
Returns
the workbench contribution item
QString berry::ContributionItemFactory::GetId ( ) const

Returns the id of this contribution item factory.

Returns
the id of contribution items created by this factory

Definition at line 34 of file berryContributionItemFactory.cpp.

Member Data Documentation

const QScopedPointer< ContributionItemFactory > berry::ContributionItemFactory::OPEN_WINDOWS
static

Workbench contribution item (id "openWindows"): A list of windows currently open in the workbench. Selecting one of the items makes the corresponding window the active window. This action dynamically maintains the list of windows.

Definition at line 100 of file berryContributionItemFactory.h.

const QScopedPointer< ContributionItemFactory > berry::ContributionItemFactory::PERSPECTIVES_SHORTLIST
static

Workbench contribution item (id "perspectivesShortlist"): A list of perspectives available to be opened, arranged as a shortlist of promising perspectives and an "Other" subitem. Selecting one of the items makes the corresponding perspective active. Should a new perspective need to be opened, a workbench user preference controls whether the prespective is opened in the active window or a new window. This action dynamically maintains the perspectives shortlist.

Definition at line 128 of file berryContributionItemFactory.h.

const QScopedPointer< ContributionItemFactory > berry::ContributionItemFactory::REOPEN_EDITORS
static

Workbench contribution item (id "reopenEditors"): A list of recent editors (with inputs) available to be reopened in the window. Selecting one of the items reopens the corresponding editor on its input in the active window. This action dynamically maintains the list of editors.

Definition at line 117 of file berryContributionItemFactory.h.

const QScopedPointer< ContributionItemFactory > berry::ContributionItemFactory::VIEWS_SHORTLIST
static

Workbench contribution item (id "viewsShortlist"): A list of views available to be opened in the window, arranged as a shortlist of promising views and an "Other" subitem. Selecting one of the items opens the corresponding view in the active window. This action dynamically maintains the view shortlist.

Definition at line 109 of file berryContributionItemFactory.h.


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