Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berry::ISelectionService Struct Referenceabstract

#include <berryISelectionService.h>

Inheritance diagram for berry::ISelectionService:

Classes

struct  SelectionEvents
 

Public Member Functions

virtual ~ISelectionService ()
 
virtual void AddSelectionListener (ISelectionListener *listener)=0
 
virtual void AddSelectionListener (const QString &partId, ISelectionListener *listener)=0
 
virtual void AddPostSelectionListener (ISelectionListener *listener)=0
 
virtual void AddPostSelectionListener (const QString &partId, ISelectionListener *listener)=0
 
virtual ISelection::ConstPointer GetSelection () const =0
 
virtual ISelection::ConstPointer GetSelection (const QString &partId)=0
 
virtual void RemoveSelectionListener (ISelectionListener *listener)=0
 
virtual void RemoveSelectionListener (const QString &partId, ISelectionListener *listener)=0
 
virtual void RemovePostSelectionListener (ISelectionListener *listener)=0
 
virtual void RemovePostSelectionListener (const QString &partId, ISelectionListener *listener)=0
 

Detailed Description

A selection service tracks the selection within an object.

A listener that wants to be notified when the selection becomes null must implement the INullSelectionListener interface.

This interface is not intended to be implemented by clients.

See also
org.blueberry.ui.ISelectionListener
org.blueberry.ui.INullSelectionListener

Definition at line 41 of file berryISelectionService.h.

Constructor & Destructor Documentation

◆ ~ISelectionService()

virtual berry::ISelectionService::~ISelectionService ( )
virtual

Member Function Documentation

◆ AddPostSelectionListener() [1/2]

virtual void berry::ISelectionService::AddPostSelectionListener ( const QString &  partId,
ISelectionListener listener 
)
pure virtual

Adds a part-specific selection listener which is notified when selection changes in the part with the given id. This is independent of part activation - the part need not be active for notification to be sent.

When the part is created, the listener is passed the part's initial selection. When the part is disposed, the listener is passed a null selection, but only if the listener implements INullSelectionListener.

Note: This will not correctly track editor parts as each editor does not have a unique partId.

Parameters
partIdthe id of the part to track
listenera selection listener
Since
2.0

◆ AddPostSelectionListener() [2/2]

virtual void berry::ISelectionService::AddPostSelectionListener ( ISelectionListener listener)
pure virtual

Adds the given post selection listener.It is equivalent to selection changed if the selection was triggered by the mouse but it has a delay if the selection is triggered by the keyboard arrows. Has no effect if an identical listener is already registered.

Note: Works only for StructuredViewer(s).

Parameters
listenera selection listener

◆ AddSelectionListener() [1/2]

virtual void berry::ISelectionService::AddSelectionListener ( const QString &  partId,
ISelectionListener listener 
)
pure virtual

Adds a part-specific selection listener which is notified when selection changes in the part with the given id. This is independent of part activation - the part need not be active for notification to be sent.

When the part is created, the listener is passed the part's initial selection. When the part is disposed, the listener is passed a null selection, but only if the listener implements INullSelectionListener.

Note: This will not correctly track editor parts as each editor does not have a unique partId.

Parameters
partIdthe id of the part to track
listenera selection listener
Since
2.0

◆ AddSelectionListener() [2/2]

virtual void berry::ISelectionService::AddSelectionListener ( ISelectionListener listener)
pure virtual

Adds the given selection listener. Has no effect if an identical listener is already registered.

Parameters
listenera selection listener

◆ GetSelection() [1/2]

virtual ISelection::ConstPointer berry::ISelectionService::GetSelection ( ) const
pure virtual

Returns the current selection in the active part. If the selection in the active part is undefined (the active part has no selection provider) the result will be null.

Returns
the current selection, or null if undefined

◆ GetSelection() [2/2]

virtual ISelection::ConstPointer berry::ISelectionService::GetSelection ( const QString &  partId)
pure virtual

Returns the current selection in the part with the given id. If the part is not open, or if the selection in the active part is undefined (the active part has no selection provider) the result will be null.

Parameters
partIdthe id of the part
Returns
the current selection, or null if undefined
Since
2.0

◆ RemovePostSelectionListener() [1/2]

virtual void berry::ISelectionService::RemovePostSelectionListener ( const QString &  partId,
ISelectionListener listener 
)
pure virtual

Removes the given part-specific post selection listener. Has no effect if an identical listener is not registered for the given part id.

Parameters
partIdthe id of the part to track
listenera selection listener
Since
2.0

◆ RemovePostSelectionListener() [2/2]

virtual void berry::ISelectionService::RemovePostSelectionListener ( ISelectionListener listener)
pure virtual

Removes the given post selection listener. Has no effect if an identical listener is not registered.

Parameters
listenera selection listener

◆ RemoveSelectionListener() [1/2]

virtual void berry::ISelectionService::RemoveSelectionListener ( const QString &  partId,
ISelectionListener listener 
)
pure virtual

Removes the given part-specific selection listener. Has no effect if an identical listener is not registered for the given part id.

Parameters
partIdthe id of the part to track
listenera selection listener
Since
2.0

◆ RemoveSelectionListener() [2/2]

virtual void berry::ISelectionService::RemoveSelectionListener ( ISelectionListener listener)
pure virtual

Removes the given selection listener. Has no effect if an identical listener is not registered.

Parameters
listenera selection listener

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