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

#include <berryIMenuService.h>

Inheritance diagram for berry::IMenuService:
Collaboration diagram for berry::IMenuService:

Public Member Functions

 berryObjectMacro (berry::IMenuService)
 
virtual void AddContributionFactory (const SmartPointer< AbstractContributionFactory > &factory)=0
 
virtual void RemoveContributionFactory (const SmartPointer< AbstractContributionFactory > &factory)=0
 
virtual void PopulateContributionManager (ContributionManager *mgr, const QString &location)=0
 
virtual void ReleaseContributions (ContributionManager *mgr)=0
 
virtual SmartPointer< IEvaluationContextGetCurrentState () const =0
 
- Public Member Functions inherited from berry::IServiceWithSources
 berryObjectMacro (berry::IServiceWithSources)
 
 ~IServiceWithSources () override
 
virtual void AddSourceProvider (const SmartPointer< ISourceProvider > &provider)=0
 
virtual void RemoveSourceProvider (const SmartPointer< ISourceProvider > &provider)=0
 
- Public Member Functions inherited from berry::IDisposable
 berryObjectMacro (berry::IDisposable)
 
 ~IDisposable () override
 
virtual void Dispose ()=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
 

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

Provides services related to the menu architecture within the workbench. It can be used to contribute additional items to the menu, tool bar and status line.

This service can be acquired from your service locator:

 IMenuService service = (IMenuService) getSite().getService(IMenuService.class);
  • This service is available globally.
Note
This interface is not intended to be implemented by clients.
This interface is not intended to be extended by clients.

Definition at line 44 of file berryIMenuService.h.

Member Function Documentation

◆ AddContributionFactory()

virtual void berry::IMenuService::AddContributionFactory ( const SmartPointer< AbstractContributionFactory > &  factory)
pure virtual

Contribute and initialize the contribution factory. This should only be called once per factory. After the call, the factory should be treated as an unmodifiable object.

Note: factories should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.

Parameters
factorythe contribution factory. Must not be null
See also
RemoveContributionFactory

◆ berryObjectMacro()

berry::IMenuService::berryObjectMacro ( berry::IMenuService  )

◆ GetCurrentState()

virtual SmartPointer<IEvaluationContext> berry::IMenuService::GetCurrentState ( ) const
pure virtual

Get the current state of eclipse as seen by the menu service.

Returns
an IEvaluationContext containing state variables.
See also
org.eclipse.ui.ISources
org.eclipse.ui.services.IEvaluationService

◆ PopulateContributionManager()

virtual void berry::IMenuService::PopulateContributionManager ( ContributionManager mgr,
const QString &  location 
)
pure virtual

Populate a ContributionManager at the specified starting location with a set of IContributionItemss. It applies AbstractContributionFactorys that are stored against the provided location.

Parameters
mgrThe ContributionManager to populate
locationThe starting location to begin populating this contribution manager. The format is the Menu API URI format.
See also
ReleaseContributions

◆ ReleaseContributions()

virtual void berry::IMenuService::ReleaseContributions ( ContributionManager mgr)
pure virtual

Before calling dispose() on a ContributionManager populated by the menu service, you must inform the menu service to release its contributions. This takes care of unregistering any IContributionItems that have their visibleWhen clause managed by this menu service.

Parameters
mgrThe manager that was populated by a call to PopulateContributionManager

◆ RemoveContributionFactory()

virtual void berry::IMenuService::RemoveContributionFactory ( const SmartPointer< AbstractContributionFactory > &  factory)
pure virtual

Remove the contributed factory from the menu service. If the factory is not contained by this service, this call does nothing.

Parameters
factorythe contribution factory to remove. Must not be null.

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