Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berry::PlatformUI Class Reference

#include <berryPlatformUI.h>

Static Public Member Functions

static QString PLUGIN_ID ()
 
static int CreateAndRunWorkbench (Display *display, WorkbenchAdvisor *advisor)
 
static DisplayCreateDisplay ()
 
static IWorkbenchGetWorkbench ()
 
static bool IsWorkbenchRunning ()
 
static TestableObject::Pointer GetTestableObject ()
 

Static Public Attributes

static const QString XP_WORKBENCH
 
static const QString XP_VIEWS
 
static const int RETURN_OK
 
static const int RETURN_RESTART
 
static const int RETURN_UNSTARTABLE
 
static const int RETURN_EMERGENCY_CLOSE
 

Detailed Description

The central class for access to the BlueBerry Platform User Interface. This class cannot be instantiated; all functionality is provided by static methods.

Features provided:

  • creation of the workbench.
  • access to the workbench.
See also
IWorkbench

Definition at line 40 of file berryPlatformUI.h.

Member Function Documentation

◆ CreateAndRunWorkbench()

static int berry::PlatformUI::CreateAndRunWorkbench ( Display display,
WorkbenchAdvisor advisor 
)
static

Creates the workbench and associates it with the given display and workbench advisor, and runs the workbench UI. This entails processing and dispatching events until the workbench is closed or restarted.

This method is intended to be called by the main class (the "application"). Fails if the workbench UI has already been created.

Use createDisplay to create the display to pass in.

Note that this method is intended to be called by the application (org.blueberry.core.boot.IPlatformRunnable). It must be called exactly once, and early on before anyone else asks getWorkbench() for the workbench.

Parameters
displaythe display to be used for all UI interactions with the workbench
advisorthe application-specific advisor that configures and specializes the workbench
Returns
return code RETURN_OK for normal exit; RETURN_RESTART if the workbench was terminated with a call to IWorkbench.restart ; RETURN_UNSTARTABLE if the workbench could not be started; RETURN_EMERGENCY_CLOSE if the UI quit because of an emergency; other values reserved for future use

◆ CreateDisplay()

static Display* berry::PlatformUI::CreateDisplay ( )
static

Creates the Display to be used by the workbench. It is the caller's responsibility to dispose the resulting Display, not the workbench's.

Returns
the display

◆ GetTestableObject()

static TestableObject::Pointer berry::PlatformUI::GetTestableObject ( )
static

Returns the testable object facade, for use by the test harness.

IMPORTANT: This method is only for use by the test harness. Applications and regular plug-ins should not call this method.

Returns
the testable object facade
Since
3.0

◆ GetWorkbench()

static IWorkbench* berry::PlatformUI::GetWorkbench ( )
static

Returns the workbench. Fails if the workbench has not been created yet.

Returns
the workbench. A raw pointer is returned because you normally should not hold a smart pointer to it (and possibly create reference cycles)

◆ IsWorkbenchRunning()

static bool berry::PlatformUI::IsWorkbenchRunning ( )
static

Returns whether CreateAndRunWorkbench() has been called to create the workbench, and the workbench has yet to terminate.

Note that this method may return true while the workbench is still being initialized, so it may not be safe to call workbench API methods even if this method returns true. See bug 49316 for details.

Returns
true if the workbench has been created and is still running, and false if the workbench has not yet been created or has completed
Since
3.0

◆ PLUGIN_ID()

static QString berry::PlatformUI::PLUGIN_ID ( )
static

Member Data Documentation

◆ RETURN_EMERGENCY_CLOSE

const int berry::PlatformUI::RETURN_EMERGENCY_CLOSE
static

Return code (value 3) indicating that the workbench was terminated with a call to IWorkbenchConfigurer::emergencyClose.

See also
CreateAndRunWorkbench()
Since
3.0

Definition at line 82 of file berryPlatformUI.h.

◆ RETURN_OK

const int berry::PlatformUI::RETURN_OK
static

Return code (value 0) indicating that the workbench terminated normally.

See also
CreateAndRunWorkbench()
Since
3.0

Definition at line 54 of file berryPlatformUI.h.

◆ RETURN_RESTART

const int berry::PlatformUI::RETURN_RESTART
static

Return code (value 1) indicating that the workbench was terminated with a call to IWorkbench.restart.

See also
CreateAndRunWorkbench()
IWorkbench::Restart
Since
3.0

Definition at line 64 of file berryPlatformUI.h.

◆ RETURN_UNSTARTABLE

const int berry::PlatformUI::RETURN_UNSTARTABLE
static

Return code (value 2) indicating that the workbench failed to start.

See also
CreateAndRunWorkbench()
IWorkbench::Restart
Since
3.0

Definition at line 73 of file berryPlatformUI.h.

◆ XP_VIEWS

const QString berry::PlatformUI::XP_VIEWS
static

Definition at line 46 of file berryPlatformUI.h.

◆ XP_WORKBENCH

const QString berry::PlatformUI::XP_WORKBENCH
static

Definition at line 45 of file berryPlatformUI.h.


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