|
Medical Imaging Interaction Toolkit
2025.08.00
Medical Imaging Interaction Toolkit
|
#include <berryINullSelectionListener.h>


Public Types | |
| typedef R | Listener |
| typedef void(R::* | Callback) (const IWorkbenchPart::Pointer &, const ISelection::ConstPointer &) |
Public Member Functions | |
| NullSelectionChangedAdapter (R *l, Callback c) | |
| void | SelectionChanged (const IWorkbenchPart::Pointer &part, const ISelection::ConstPointer &selection) override |
Public Member Functions inherited from berry::INullSelectionListener | |
| ~INullSelectionListener () override | |
Public Member Functions inherited from berry::ISelectionListener | |
| virtual | ~ISelectionListener () |
This template can be used like this:
class MyClass {
private: void HandleSelectionChanged(berry::IWorkbenchPart::Pointer part, berry::ISelection::ConstPointer selection) { // do something }
berry::INullSelectionListener::Pointer m_SelectionListener;
public: MyClass() : m_SelectionListener(new berry::NullSelectionChangedAdapter<MyClass>(this, &MyClass::HandleSelectionChanged)) { // get the selection service // ... service->AddPostSelectionListener(m_SelectionListener); } };
Definition at line 69 of file berryINullSelectionListener.h.
| typedef void(R::* berry::NullSelectionChangedAdapter< R >::Callback) (const IWorkbenchPart::Pointer &, const ISelection::ConstPointer &) |
Definition at line 74 of file berryINullSelectionListener.h.
| typedef R berry::NullSelectionChangedAdapter< R >::Listener |
Definition at line 72 of file berryINullSelectionListener.h.
|
inline |
Definition at line 76 of file berryINullSelectionListener.h.
|
inlineoverridevirtual |
Notifies this listener that the selection has changed.
This method is called when the selection changes from one to a non-null value, but not when the selection changes to null. If there is a requirement to be notified in the latter scenario, implement INullSelectionListener. The event will be posted through this method.
| part | the workbench part containing the selection |
| selection | the current selection. This may be null if INullSelectionListener is implemented. |
Implements berry::ISelectionListener.
Definition at line 83 of file berryINullSelectionListener.h.