fw4spl
fwGui::layoutManager::IMenuBarLayoutManager Class Referenceabstract

Defines the menu bar layout manager for IHM. More...

#include <IMenuBarLayoutManager.hpp>

+ Inheritance diagram for fwGui::layoutManager::IMenuBarLayoutManager:
+ Collaboration diagram for fwGui::layoutManager::IMenuBarLayoutManager:

Public Types

typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType
 
typedef std::string RegistryKeyType
 
- Public Types inherited from fwGui::GuiBaseObject
typedef ::fwGui::factory::Key Key
 

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWGUI_API IMenuBarLayoutManager ()
 Constructor. Do nothing.
 
virtual FWGUI_API ~IMenuBarLayoutManager ()
 Destructor. Do nothing.
 
virtual FWGUI_API std::vector< ::fwGui::container::fwMenu::sptr > getMenus ()
 Returns the vector of fwMenu managed by this layout.
 
virtual FWGUI_API void initialize (ConfigurationType configuration)
 Initialize layout managers. More...
 
virtual FWGUI_API void createLayout (::fwGui::container::fwMenuBar::sptr parent)=0
 Instantiate menu with parent menuBar. More...
 
virtual FWGUI_API void destroyLayout ()=0
 Destroy local menus. More...
 
virtual FWGUI_API void menuIsVisible (::fwGui::container::fwMenu::sptr, bool isVisible)=0
 Set the menu visibility.
 
virtual FWGUI_API void menuIsEnabled (::fwGui::container::fwMenu::sptr, bool isEnabled)=0
 Set the menu enable or not.
 
- Public Member Functions inherited from fwGui::GuiBaseObject
- Public Member Functions inherited from fwCore::BaseObject
virtual const std::string & getLeafClassname () const
 return object's classname without its namespace, i.e. BaseObject
 

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwGui::GuiBaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Static Public Attributes

FWGUI_API static const RegistryKeyType REGISTRY_KEY = "::fwGui::MenuBarLayoutManager"
 

Protected Member Functions

virtual FWGUI_API void destroyMenus ()
 Helper to destroy local sub views.
 
- Protected Member Functions inherited from fwGui::GuiBaseObject
 GuiBaseObject ()
 
virtual ~GuiBaseObject ()
 

Protected Attributes

std::vector< ::fwGui::container::fwMenu::sptr > m_menus
 All sub containers managed by this layout.
 
std::vector< std::string > m_menuNames
 Save menu name from configuration.
 

Demangling methods

virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 

Detailed Description

Defines the menu bar layout manager for IHM.

Date
2009-2010.

Definition at line 37 of file IMenuBarLayoutManager.hpp.

Member Function Documentation

virtual FWGUI_API void fwGui::layoutManager::IMenuBarLayoutManager::createLayout ( ::fwGui::container::fwMenuBar::sptr  parent)
pure virtual

Instantiate menu with parent menuBar.

Precondition
LayoutManager must be initialized before.
parent menuBar must be instanced.

Implemented in fwGui::layoutManager::MenuBarLayoutManager.

virtual FWGUI_API void fwGui::layoutManager::IMenuBarLayoutManager::destroyLayout ( )
pure virtual

Destroy local menus.

Precondition
services using this menus must be stopped before.

Implemented in fwGui::layoutManager::MenuBarLayoutManager.

void fwGui::layoutManager::IMenuBarLayoutManager::initialize ( ConfigurationType  configuration)
virtual

Initialize layout managers.

Example of configuration

1 <service uid="menuBar" type="::fwGui::IMenuBarSrv" impl="::gui::aspect::SDefaultMenuBar" autoConnect="no" >
2  <gui>
3  <layout>
4  <menu name="My Menu"/>
5  <menu name="My Menu 2"/>
6  </layout>
7  </gui>
8  <registry>
9  <menu sid="myMenu" start="yes" />
10  <menu sid="myMenu2" start="yes" />
11  </registry>
12 </service>

This method analyzes the gui section of the configuration.

  • <layout> (mandatory) : give the list of the menu that will appear in the menu bar.
  • <menu name="My Menu"/> :
    • name (mandatory) : give the name of the menu that will appear in the interface.

Definition at line 36 of file IMenuBarLayoutManager.cpp.

References m_menuNames, m_menus, OSLM_ASSERT, SLM_ASSERT, and SLM_TRACE_IF.


The documentation for this class was generated from the following files: