15 #include "fwGui/builder/IToolBarBuilder.hpp" 17 #include <boost/lexical_cast.hpp> 24 const IToolBarBuilder::RegistryKeyType IToolBarBuilder::REGISTRY_KEY =
"::fwGui::ToolBarBuilder";
30 m_toolBitmapSize = std::make_pair(32, 32);
43 OSLM_ASSERT(
"Bad configuration name "<<configuration->getName()<<
", must be toolBar",
44 configuration->getName() ==
"toolBar");
47 if (configuration->hasAttribute(
"align"))
49 std::string aligment = configuration->getExistingAttributeValue(
"align");
50 if (aligment ==
"top")
54 else if (aligment ==
"bottom")
58 else if (aligment ==
"right")
62 else if (aligment ==
"left")
68 OSLM_FATAL(
"Wrong value '"<< aligment <<
"' for 'align' attribute (require top, bottom, right or left)");
73 for( iter = configuration->begin(); iter != configuration->end(); ++iter )
75 if( (*iter)->getName() ==
"toolBitmapSize" )
77 if((*iter)->hasAttribute(
"height"))
79 m_toolBitmapSize.second = ::boost::lexical_cast<
int > ((*iter)->getExistingAttributeValue(
"height"));
81 if((*iter)->hasAttribute(
"width"))
83 m_toolBitmapSize.first = ::boost::lexical_cast<
int > ((*iter)->getExistingAttributeValue(
"width"));
#define OSLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
The namespace fwGui contains the base interface for IHM services.
#define OSLM_FATAL(message)
Container::iterator Iterator
Defines the configuration element container type.