Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
berry::IEditorInput Struct Referenceabstract

#include <berryIEditorInput.h>

Inheritance diagram for berry::IEditorInput:
Collaboration diagram for berry::IEditorInput:

Public Member Functions

 berryObjectMacro (berry::IEditorInput)
 
 ~IEditorInput () override
 
virtual bool Exists () const =0
 
virtual QIcon GetIcon () const =0
 
virtual QString GetName () const =0
 
virtual const IPersistableElementGetPersistable () const =0
 
virtual QString GetToolTipText () const =0
 
bool operator== (const Object *o) const override=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
 
- Public Member Functions inherited from berry::IAdaptable
virtual ObjectGetAdapter (const QString &adapterType) const =0
 
template<class A >
A * GetAdapter ()
 
virtual ~IAdaptable ()
 

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

IEditorInput is a light weight descriptor of editor input, like a file name but more abstract. It is not a model. It is a description of the model source for an IEditorPart.

Clients implementing this editor input interface must override Object::operator==(const Object*) to answer true for two inputs that are the same. The IWorkbenchPage.openEditor APIs are dependent on this to find an editor with the same input.

Clients should extend this interface to declare new types of editor inputs.

An editor input is passed to an editor via the IEditorPart.init method. Due to the wide range of valid editor inputs, it is not possible to define generic methods for getting and setting bytes.

Editor input must implement the IAdaptable interface; extensions are managed by the platform's adapter manager.

Please note that it is important that the editor input be light weight. Within the workbench, the navigation history tends to hold on to editor inputs as a means of reconstructing the editor at a later time. The navigation history can hold on to quite a few inputs (i.e., the default is fifty). The actual data model should probably not be held in the input.

See also
org.blueberry.ui.IEditorPart
org.blueberry.ui.IWorkbenchPage::openEditor(IEditorInput, String)
org.blueberry.ui.IWorkbenchPage::openEditor(IEditorInput, String, boolean)

Definition at line 66 of file berryIEditorInput.h.

Constructor & Destructor Documentation

◆ ~IEditorInput()

berry::IEditorInput::~IEditorInput ( )
override

Member Function Documentation

◆ berryObjectMacro()

berry::IEditorInput::berryObjectMacro ( berry::IEditorInput  )

◆ Exists()

virtual bool berry::IEditorInput::Exists ( ) const
pure virtual

Returns whether the editor input exists.

This method is primarily used to determine if an editor input should appear in the "File Most Recently Used" menu. An editor input will appear in the list until the return value of exists becomes false or it drops off the bottom of the list.

Returns
true if the editor input exists; false otherwise

Implemented in mitk::DataStorageEditorInput, and berry::FileEditorInput.

◆ GetIcon()

virtual QIcon berry::IEditorInput::GetIcon ( ) const
pure virtual

Returns the icon for this input.

Returns
the icon for this input; may be null icon if there is no image.

Implemented in mitk::DataStorageEditorInput, and berry::FileEditorInput.

◆ GetName()

virtual QString berry::IEditorInput::GetName ( ) const
pure virtual

Returns the name of this editor input for display purposes.

For instance, when the input is from a file, the return value would ordinarily be just the file name.

Returns
the name string; never null;

Implemented in mitk::DataStorageEditorInput, and berry::FileEditorInput.

◆ GetPersistable()

virtual const IPersistableElement* berry::IEditorInput::GetPersistable ( ) const
pure virtual

Returns an object that can be used to save the state of this editor input.

Returns
the persistable element, or null if this editor input cannot be persisted

Implemented in mitk::DataStorageEditorInput, and berry::FileEditorInput.

◆ GetToolTipText()

virtual QString berry::IEditorInput::GetToolTipText ( ) const
pure virtual

Returns the tool tip text for this editor input. This text is used to differentiate between two input with the same name. For instance, MyClass.java in folder X and MyClass.java in folder Y. The format of the text varies between input types.

Returns
the tool tip text; never null.

Implemented in mitk::DataStorageEditorInput, and berry::FileEditorInput.

◆ operator==()

bool berry::IEditorInput::operator== ( const Object o) const
overridepure virtual

Returns true if two editor inputs are the same

Reimplemented from berry::Object.

Implemented in berry::FileEditorInput, and mitk::DataStorageEditorInput.


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