Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
berry::IPersistableEditor Struct Referenceabstract

#include <berryIPersistableEditor.h>

Inheritance diagram for berry::IPersistableEditor:
Collaboration diagram for berry::IPersistableEditor:

Public Member Functions

virtual void RestoreState (const SmartPointer< const IMemento > &memento)=0
 
- Public Member Functions inherited from berry::IPersistable
virtual ~IPersistable ()
 
virtual void SaveState (const SmartPointer< IMemento > &memento) const =0
 

Detailed Description

An editor can implement this interface and participate in the workbench session save/restore cycle using IMemento, similar to how IViewPart currently works.

Refer to IWorkbenchPart for the part lifecycle.

If a memento is available, RestoreState(*) will be inserted into the editor startup.

  1. editor.Init(site, input)
  2. editor.RestoreState(memento)
  3. editor.CreatePartControl(parent)
  4. ...

On workbench shutdown, the editor state will be persisted when the editor references are saved.

Definition at line 42 of file berryIPersistableEditor.h.

Member Function Documentation

◆ RestoreState()

virtual void berry::IPersistableEditor::RestoreState ( const SmartPointer< const IMemento > &  memento)
pure virtual

Called with a memento for this editor. The editor can parse the data or save the memento. This method may not be called.

Parameters
mementothe saved state for this editor. May be null.

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