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

#include <berryIPageLayout.h>

Inheritance diagram for berry::IPageLayout:
Collaboration diagram for berry::IPageLayout:

Public Member Functions

 berryObjectMacro (berry::IPageLayout) static const QString ID_EDITOR_AREA
 
virtual void AddPerspectiveShortcut (const QString &id)=0
 
virtual void AddPlaceholder (const QString &viewId, int relationship, float ratio, const QString &refId)=0
 
virtual void AddShowInPart (const QString &id)=0
 
virtual void AddShowViewShortcut (const QString &id)=0
 
virtual void AddView (const QString &viewId, int relationship, float ratio, const QString &refId)=0
 
virtual IFolderLayout::Pointer CreateFolder (const QString &folderId, int relationship, float ratio, const QString &refId)=0
 
virtual IPlaceholderFolderLayout::Pointer CreatePlaceholderFolder (const QString &folderId, int relationship, float ratio, const QString &refId)=0
 
virtual QString GetEditorArea ()=0
 
virtual bool IsEditorAreaVisible ()=0
 
virtual void SetEditorAreaVisible (bool showEditorArea)=0
 
virtual void SetFixed (bool isFixed)=0
 
virtual bool IsFixed ()=0
 
virtual IViewLayout::Pointer GetViewLayout (const QString &id)=0
 
virtual void AddStandaloneView (const QString &viewId, bool showTitle, int relationship, float ratio, const QString &refId)=0
 
virtual void AddStandaloneViewPlaceholder (const QString &viewId, int relationship, float ratio, const QString &refId, bool showTitle)=0
 
virtual IPerspectiveDescriptor::Pointer GetDescriptor ()=0
 
virtual IPlaceholderFolderLayout::Pointer GetFolderForView (const QString &id)=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
 

Static Public Attributes

static const QString ID_RES_NAV
 
static const QString ID_PROP_SHEET
 
static const QString ID_OUTLINE
 
static const QString ID_BOOKMARKS
 
static const QString ID_PROBLEM_VIEW
 
static const QString ID_PROGRESS_VIEW
 
static const QString ID_TASK_LIST
 
static const QString ID_NAVIGATE_ACTION_SET
 
static const int LEFT
 
static const int RIGHT
 
static const int TOP
 
static const int BOTTOM
 
static const float RATIO_MIN
 
static const float RATIO_MAX
 
static const float DEFAULT_VIEW_RATIO
 
static const float INVALID_RATIO
 
static const float NULL_RATIO
 

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 page layout defines the initial layout for a perspective within a page in a workbench window.

This interface is not intended to be implemented by clients.

When a perspective is opened, it creates a new page layout with a single editor area. This layout is then passed to the perspective factory (implementation of org.blueberry.ui.IPerspectiveFactory#createInitialLayout(IPageLayout)) where additional views and other content can be added, using the existing editor area as the initial point of reference.

In some cases, multiple instances of a particular view may need to be added to the same layout. These are disambiguated using a secondary id. In layout methods taking a view id, the id can have the compound form: primaryId [':' secondaryId]. If a secondary id is given, the view must allow multiple instances by having specified allowMultiple="true" in its extension. View placeholders may also have a secondary id.

Wildcards are permitted in placeholder ids (but not regular view ids). '*' matches any substring, '?' matches any single character. Wildcards can be specified for the primary id, the secondary id, or both. For example, the placeholder "someView:*" will match any occurrence of the view that has primary id "someView" and that also has some non-null secondary id. Note that this placeholder will not match the view if it has no secondary id, since the compound id in this case is simply "someView".

Example of populating a layout with standard workbench views:

IPageLayout layout = ...
// Get the editor area.
String editorArea = layout.getEditorArea();
// Top left: Resource Navigator view and Bookmarks view placeholder
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,
   editorArea);
topLeft.addView(IPageLayout.ID_RES_NAV);
topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
// Bottom left: Outline view and Property Sheet view
IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.50f,
    "topLeft");
bottomLeft.addView(IPageLayout.ID_OUTLINE);
bottomLeft.addView(IPageLayout.ID_PROP_SHEET);
// Bottom right: Task List view
layout.addView(IPageLayout.ID_TASK_LIST, IPageLayout.BOTTOM, 0.66f, editorArea);

This interface is not intended to be implemented by clients.

Definition at line 87 of file berryIPageLayout.h.

Member Function Documentation

virtual void berry::IPageLayout::AddPerspectiveShortcut ( const QString &  id)
pure virtual

Adds an action set with the given id to this page layout. The id must name an action set contributed to the workbench's extension point (named "org.blueberry.ui.actionSet").

Parameters
actionSetIdthe action set id Adds a perspective shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate new wizards. For example, in the Eclipse IDE, these appear as items under the Window > Open Perspective menu. The id must name a perspective extension contributed to the workbench's perspectives extension point (named "org.blueberry.ui.perspectives").
idthe perspective id
virtual void berry::IPageLayout::AddPlaceholder ( const QString &  viewId,
int  relationship,
float  ratio,
const QString &  refId 
)
pure virtual

Adds a view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears. Initially, it is invisible; however, if the user ever opens a view whose compound id matches the placeholder, the view will appear at the same location as the placeholder. See the IPageLayout type documentation for more details about compound ids. If the placeholder contains wildcards, it remains in the layout, otherwise it is replaced by the view. If the primary id of the placeholder has no wildcards, it must refer to a view contributed to the workbench's view extension point (named "org.blueberry.ui.views").

Parameters
viewIdthe compound view id (wildcards allowed)
relationshipthe position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratioa ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refIdthe id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
virtual void berry::IPageLayout::AddShowInPart ( const QString &  id)
pure virtual

Adds an item to the Show In prompter. The id must name a view contributed to the workbench's view extension point (named "org.blueberry.ui.views").

Parameters
idthe view id
Since
2.1
virtual void berry::IPageLayout::AddShowViewShortcut ( const QString &  id)
pure virtual

Adds a show view shortcut to the page layout. These are typically shown in the UI to allow rapid navigation to appropriate views. For example, in the Eclipse IDE, these appear as items under the Window > Show View menu. The id must name a view contributed to the workbench's views extension point (named "org.blueberry.ui.views").

Parameters
idthe view id
virtual void berry::IPageLayout::AddStandaloneView ( const QString &  viewId,
bool  showTitle,
int  relationship,
float  ratio,
const QString &  refId 
)
pure virtual

Adds a standalone view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. A standalone view cannot be docked together with other views. A standalone view's title can optionally be hidden. If hidden, then any controls typically shown with the title (such as the close button) are also hidden. Any contributions or other content from the view itself are always shown (e.g. toolbar or view menu contributions, content description).

The id must name a view contributed to the workbench's view extension point (named "org.blueberry.ui.views").

Parameters
viewIdthe compound view id
showTitletrue to show the title and related controls, false to hide them
relationshipthe position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratioa ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refIdthe id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Since
3.0
virtual void berry::IPageLayout::AddStandaloneViewPlaceholder ( const QString &  viewId,
int  relationship,
float  ratio,
const QString &  refId,
bool  showTitle 
)
pure virtual

Adds a standalone view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears. Initially, it is invisible; however, if the user ever opens a view whose compound id matches the placeholder, the view will appear at the same location as the placeholder. See the IPageLayout type documentation for more details about compound ids. If the placeholder contains wildcards, it remains in the layout, otherwise it is replaced by the view. If the primary id of the placeholder has no wildcards, it must refer to a view contributed to the workbench's view extension point (named "org.blueberry.ui.views").

Parameters
viewIdthe compound view id (wildcards allowed)
relationshipthe position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratioa ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refIdthe id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
showTitletrue to show the view's title, false if not
Since
3.2
virtual void berry::IPageLayout::AddView ( const QString &  viewId,
int  relationship,
float  ratio,
const QString &  refId 
)
pure virtual

Adds a view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.blueberry.ui.views").

Parameters
viewIdthe compound view id
relationshipthe position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratioa ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refIdthe id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
berry::IPageLayout::berryObjectMacro ( berry::IPageLayout  ) const

The part id for the workbench's editor area. This may only be used as a reference part for view addition.

virtual IFolderLayout::Pointer berry::IPageLayout::CreateFolder ( const QString &  folderId,
int  relationship,
float  ratio,
const QString &  refId 
)
pure virtual

Creates and adds a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.

Parameters
folderIdthe id for the new folder. This must be unique within the layout to avoid collision with other parts.
relationshipthe position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratioa ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refIdthe id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Returns
the new folder
virtual IPlaceholderFolderLayout::Pointer berry::IPageLayout::CreatePlaceholderFolder ( const QString &  folderId,
int  relationship,
float  ratio,
const QString &  refId 
)
pure virtual

Creates and adds a placeholder for a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.

Parameters
folderIdthe id for the new folder. This must be unique within the layout to avoid collision with other parts.
relationshipthe position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratioa ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refIdthe id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Returns
a placeholder for the new folder
Since
2.0
virtual IPerspectiveDescriptor::Pointer berry::IPageLayout::GetDescriptor ( )
pure virtual

Returns the perspective descriptor for the perspective being layed out.

Returns
the perspective descriptor for the perspective being layed out
Since
3.2
virtual QString berry::IPageLayout::GetEditorArea ( )
pure virtual

Returns the special identifier for the editor area in this page layout. The identifier for the editor area is also stored in ID_EDITOR_AREA.

The editor area is automatically added to each layout before anything else. It should be used as the point of reference when adding views to a layout.

Returns
the special id of the editor area
virtual IPlaceholderFolderLayout::Pointer berry::IPageLayout::GetFolderForView ( const QString &  id)
pure virtual

Returns the folder layout for the view or placeholder with the given compound id in this page layout. See the IPageLayout type documentation for more details about compound ids. Returns null if the specified view or placeholder is unknown to the layout, or the placeholder was not in a folder.

Parameters
idthe compound view id or placeholder. Must not be null.
Returns
the folder layout, or null
Since
3.3
virtual IViewLayout::Pointer berry::IPageLayout::GetViewLayout ( const QString &  id)
pure virtual

Returns the layout for the view or placeholder with the given compound id in this page layout. See the IPageLayout type documentation for more details about compound ids. Returns null if the specified view or placeholder is unknown to the layout.

Parameters
idthe compound view id or placeholder
Returns
the view layout, or null
Since
3.0
virtual bool berry::IPageLayout::IsEditorAreaVisible ( )
pure virtual

Returns whether the page's layout will show the editor area.

Returns
true when editor area visible, false otherwise
virtual bool berry::IPageLayout::IsFixed ( )
pure virtual

Returns true if this layout is fixed, false if not. In a fixed layout, layout parts cannot be moved or zoomed, and the initial set of views cannot be closed. The default is false.

Returns
true if this layout is fixed, false if not.
Since
3.0
virtual void berry::IPageLayout::SetEditorAreaVisible ( bool  showEditorArea)
pure virtual

Show or hide the editor area for the page's layout.

Parameters
showEditorAreatrue to show the editor area, false to hide the editor area
virtual void berry::IPageLayout::SetFixed ( bool  isFixed)
pure virtual

Sets whether this layout is fixed. In a fixed layout, layout parts cannot be moved or zoomed, and the initial set of views cannot be closed.

Parameters
isFixedtrue if this layout is fixed, false if not
Since
3.0

Member Data Documentation

const int berry::IPageLayout::BOTTOM
static

Relationship constant indicating a part should be placed below its relative.

Definition at line 164 of file berryIPageLayout.h.

const float berry::IPageLayout::DEFAULT_VIEW_RATIO
static

The default view ratio width for regular (non-fast) views.

Since
2.0

Definition at line 182 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_BOOKMARKS
static

The view id for the workbench's Bookmark Navigator standard component.

Definition at line 116 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_NAVIGATE_ACTION_SET
static

Id of the navigate action set. (value "org.blueberry.ui.NavigateActionSet")

Since
2.1

Definition at line 140 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_OUTLINE
static

The view id for the workbench's Content Outline standard component.

Definition at line 111 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_PROBLEM_VIEW
static

The view id for the workbench's Problems View standard component.

Since
3.0

Definition at line 122 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_PROGRESS_VIEW
static

The view id for the workbench's Progress View standard component.

Since
3.2

Definition at line 128 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_PROP_SHEET
static

The view id for the workbench's Property Sheet standard component.

Definition at line 106 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_RES_NAV
static

The view id for the workbench's Resource Navigator standard component.

Definition at line 101 of file berryIPageLayout.h.

const QString berry::IPageLayout::ID_TASK_LIST
static

The view id for the workbench's Task List standard component.

Definition at line 133 of file berryIPageLayout.h.

const float berry::IPageLayout::INVALID_RATIO
static

A variable used to represent invalid ratios.

Since
2.0

Definition at line 188 of file berryIPageLayout.h.

const int berry::IPageLayout::LEFT
static

Relationship constant indicating a part should be placed to the left of its relative.

Definition at line 146 of file berryIPageLayout.h.

const float berry::IPageLayout::NULL_RATIO
static

A variable used to represent a ratio which has not been specified.

Since
2.0

Definition at line 194 of file berryIPageLayout.h.

const float berry::IPageLayout::RATIO_MAX
static

Maximum acceptable ratio value when adding a view

Since
2.0

Definition at line 176 of file berryIPageLayout.h.

const float berry::IPageLayout::RATIO_MIN
static

Minimum acceptable ratio value when adding a view

Since
2.0

Definition at line 170 of file berryIPageLayout.h.

const int berry::IPageLayout::RIGHT
static

Relationship constant indicating a part should be placed to the right of its relative.

Definition at line 152 of file berryIPageLayout.h.

const int berry::IPageLayout::TOP
static

Relationship constant indicating a part should be placed above its relative.

Definition at line 158 of file berryIPageLayout.h.


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