Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berry::IEditorPart Struct Referenceabstract

#include <berryIEditorPart.h>

Inheritance diagram for berry::IEditorPart:
Collaboration diagram for berry::IEditorPart:

Public Member Functions

 berryObjectMacro (berry::IEditorPart, IWorkbenchPart, ISaveablePart)
 
 ~IEditorPart () override
 
virtual SmartPointer< IEditorInputGetEditorInput () const =0
 
virtual SmartPointer< IEditorSiteGetEditorSite () const =0
 
virtual void Init (SmartPointer< IEditorSite > site, SmartPointer< IEditorInput > input)=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
 
- Public Member Functions inherited from berry::ISaveablePart
 berryObjectMacro (berry::ISaveablePart)
 
virtual void DoSave ()=0
 
virtual void DoSaveAs ()=0
 
virtual bool IsDirty () const =0
 
virtual bool IsSaveAsAllowed () const =0
 
virtual bool IsSaveOnCloseNeeded () const =0
 

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 ()
 
- Static Public Attributes inherited from berry::ISaveablePart
static const int PROP_DIRTY
 
- 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

An editor is a visual component within a workbench page. It is typically used to edit or browse a document or input object. The input is identified using an IEditorInput. Modifications made in an editor part follow an open-save-close lifecycle model (in contrast to a view part, where modifications are saved to the workbench immediately).

An editor is document or input-centric. Each editor has an input, and only one editor can exist for each editor input within a page. This policy has been designed to simplify part management.

An editor should be used in place of a view whenever more than one instance of a document type can exist.

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

An editor part is added to the workbench in two stages:

  1. An editor extension is contributed to the workbench registry. This extension defines the extension id, extension class, and the file extensions which are supported by the editor.
  2. An editor part based upon the extension is created and added to the workbench when the user opens a file with one of the supported file extensions (or some other suitable form of editor input).

All editor parts implement the IAdaptable interface; extensions are managed by the platform's adapter manager.

See also
org.blueberry.ui.IWorkbenchPage::openEditor(IEditorInput, String)
org.blueberry.ui.part.EditorPart

Definition at line 66 of file berryIEditorPart.h.

Constructor & Destructor Documentation

◆ ~IEditorPart()

berry::IEditorPart::~IEditorPart ( )
override

Member Function Documentation

◆ berryObjectMacro()

berry::IEditorPart::berryObjectMacro ( berry::IEditorPart  ,
IWorkbenchPart  ,
ISaveablePart   
)

◆ GetEditorInput()

virtual SmartPointer<IEditorInput> berry::IEditorPart::GetEditorInput ( ) const
pure virtual

The property id for getEditorInput. Returns the input for this editor. If this value changes the part must fire a property listener event with PROP_INPUT.

Returns
the editor input

Implemented in berry::EditorPart.

◆ GetEditorSite()

virtual SmartPointer<IEditorSite> berry::IEditorPart::GetEditorSite ( ) const
pure virtual

Returns the site for this editor. This method is equivalent to (IEditorSite) getSite().

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

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

Implemented in berry::EditorPart.

◆ Init()

virtual void berry::IEditorPart::Init ( SmartPointer< IEditorSite site,
SmartPointer< IEditorInput input 
)
pure virtual

Initializes this editor with the given editor site and input.

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

Implementors of this method must examine the editor input object type to determine if it is understood. If not, the implementor must throw a PartInitException

Parameters
sitethe editor site
inputthe editor input
Exceptions
PartInitExceptionif this editor was not initialized successfully

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