Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
berry::IViewPart Struct Referenceabstract

#include <berryIViewPart.h>

Inheritance diagram for berry::IViewPart:
Collaboration diagram for berry::IViewPart:

Public Member Functions

 berryObjectMacro (berry::IViewPart, IWorkbenchPart)
 
 ~IViewPart () override
 
virtual IViewSite::Pointer GetViewSite ()=0
 
virtual void Init (IViewSite::Pointer site, IMemento::Pointer memento=IMemento::Pointer(nullptr))=0
 
virtual void SaveState (IMemento::Pointer memento)=0
 
- Public Member Functions inherited from berry::IWorkbenchPart
 berryObjectMacro (berry::IWorkbenchPart, Object)
 
 ~IWorkbenchPart () override
 
virtual void AddPropertyListener (IPropertyChangeListener *listener)=0
 
virtual void CreatePartControl (QWidget *parent)=0
 
virtual SmartPointer< IWorkbenchPartSiteGetSite () const =0
 
virtual QString GetPartName () const =0
 
virtual QString GetContentDescription () const =0
 
virtual QIcon GetTitleImage () const =0
 
virtual QString GetTitleToolTip () const =0
 
virtual void RemovePropertyListener (IPropertyChangeListener *listener)=0
 
virtual QString GetPartProperty (const QString &key) const =0
 
virtual void SetPartProperty (const QString &key, const QString &value)=0
 
virtual const QHash< QString, QString > & GetPartProperties () const =0
 
virtual void SetFocus ()=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 view is a visual component within a workbench page. It is typically used to navigate a hierarchy of information (like the workspace), open an editor, or display properties for the active editor. Modifications made in a view are saved immediately (in contrast to an editor part, which conforms to a more elaborate open-save-close lifecycle).

Only one instance of a particular view type may exist within a workbench page. This policy is designed to simplify part management for a user.

This interface may be implemented directly. For convenience, a base implementation is defined in ViewPart.

A view is added to the workbench in two steps:

  1. A view extension is contributed to the workbench registry. This extension defines the extension id and extension class.
  2. The view is included in the default layout for a perspective. Alternatively, the user may open the view from the Perspective menu.

Views implement the IAdaptable interface; extensions are managed by the platform's adapter manager.

As of 3.4, views may optionally adapt to ISizeProvider if they have a preferred size. The default presentation will make a best effort to allocate the preferred size to a view if it is the only part in a stack. If there is more than one part in the stack, the constraints will be disabled for that stack. The size constraints are adjusted for the size of the tab and border trim. Note that this is considered to be a hint to the presentation, and not all presentations may honor size constraints.

See also
IWorkbenchPage::showView
org.blueberry.ui.part.ViewPart
ISizeProvider

Definition at line 70 of file berryIViewPart.h.

Constructor & Destructor Documentation

◆ ~IViewPart()

berry::IViewPart::~IViewPart ( )
override

Member Function Documentation

◆ berryObjectMacro()

berry::IViewPart::berryObjectMacro ( berry::IViewPart  ,
IWorkbenchPart   
)

◆ GetViewSite()

virtual IViewSite::Pointer berry::IViewPart::GetViewSite ( )
pure virtual

Returns the site for this view. This method is equivalent to (IViewSite) getSite().

The site can be null while the view is being initialized. After the initialization is complete, this value must be non-null for the remainder of the view's life cycle.

Returns
the view site; this value may be null if the view has not yet been initialized

Implemented in berry::ViewPart.

◆ Init()

virtual void berry::IViewPart::Init ( IViewSite::Pointer  site,
IMemento::Pointer  memento = IMemento::Pointer(nullptr) 
)
pure virtual

Initializes this view with the given view site. A memento is passed to the view which contains a snapshot of the views state from a previous session. Where possible, the view should try to recreate that state within the part controls.

This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method.

Parameters
sitethe view site
mementothe IViewPart state or null if there is no previous saved state
Exceptions
PartInitExceptionif this view was not initialized successfully

Implemented in berry::ViewPart.

◆ SaveState()

virtual void berry::IViewPart::SaveState ( IMemento::Pointer  memento)
pure virtual

Saves the object state within a memento.

Parameters
mementoa memento to receive the object state

Implemented in berry::ViewPart.


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