From: Diego Caceres Date: Thu, 2 Jun 2011 01:03:18 +0000 (+0000) Subject: creaButtonContainer & creaPanelButtonContainer: Updates in doxygen documentation... X-Git-Tag: v1.0.4~106 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=65c158dc171f8d3114ee3544b2a94a1f41880df0;p=creaMaracasVisu.git creaButtonContainer & creaPanelButtonContainer: Updates in doxygen documentation. Those projects are cleaned :) :) --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.cxx index 3af5eaf..7cba265 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.cxx @@ -2,7 +2,7 @@ * @file buttonContainerController.cxx * @brief This contains the ButtonContainerController class implementation * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "buttonContainerController.h" @@ -98,7 +98,9 @@ namespace creaButtonContainer != this->m_BCPanel->m_ButtonGroupList.end( ); ++it ) { if ( ( *it )->GetButton( event.GetId( ) ) != NULL ) + { ( *it )->GetButton( event.GetId( ) )->Execute( ); + }//fi }//rof }//yrt catch ( const std::exception& e ) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h index 2ccadcc..b240cb8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h @@ -1,8 +1,8 @@ /*! * @file buttonContainerController.h - * @brief This contains the ButtonContainerController class + * @brief Contains the ButtonContainerController class * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef BUTTONCONTAINERCONTROLLER_H_ @@ -40,14 +40,14 @@ namespace creaButtonContainer { /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h" * @brief This class contains the ButtonContainerPanel controller. - * @details This class describes the button events, it derives from wxEvtHandler and it is the - * controller in the MVC. + * @details This class describes the button events, it derives from wxEvtHandler. * @see wxEvtHandler */ class ButtonContainerController : public wxEvtHandler { public: //typedef definitions + // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup * @brief Defines the ButtonGroup type */ @@ -88,6 +88,7 @@ namespace creaButtonContainer * @brief Defines the BCPanel type */ typedef creaButtonContainer::view::ButtonContainerPanel BCPanel; + // ---------------------------------------------------------------------------------- //end of typedef definition public: // ---------------------------------------------------------------------------------- @@ -105,7 +106,7 @@ namespace creaButtonContainer // ---------------------------------------------------------------------------------- /*! @fn void AddEvents( ); - * @brief This method connect every buttonEvent to the view. + * @brief This method connect every buttonEvents to the view. * @exception std::bad_alloc */ void diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.cxx index 395f12d..f596414 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.cxx @@ -2,7 +2,7 @@ * @file buttonGroupFactory.cxx * @brief Implements the ButtonGroupFactory class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "buttonGroupFactory.h" @@ -24,9 +24,9 @@ namespace creaButtonContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings ) { + ButtonGroupContainer groupView; try { - ButtonGroupContainer groupView; ButtonGroupMap map = settings->GetButtonGroupContainer( ); for( ButtonGroupMap::iterator it = map.begin( ); it != map.end( ); ++it ) { @@ -37,8 +37,7 @@ namespace creaButtonContainer ButtonGroup* group = new ButtonGroup( wxGroupName, this->GetButtons( parent, ( *it ).second ) ); groupView.push_back( group ); - } - return ( groupView ); + }//rof }//yrt catch ( const std::exception& e ) { @@ -46,6 +45,7 @@ namespace creaButtonContainer << "ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings )" << " exception: " << e.what( ) << std::endl; }//chtac + return ( groupView ); } // ---------------------------------------------------------------------------------- ButtonGroupFactory::ButtonContainer @@ -60,7 +60,7 @@ namespace creaButtonContainer { long id = wxNewId( ); buttonList[ id ] = new Button( parent, id, *it ); - } + }//rof return ( buttonList ); }//yrt catch ( const std::exception& e ) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h index b12cfb5..42b4186 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.h @@ -2,23 +2,18 @@ * @file buttonGroupFactory.h * @brief Contains ButtonGroupFactory class * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef BUTTONGROUPFACTORY_H #define BUTTONGROUPFACTORY_H #include -#include -#include -#include -#include #include "system.h" #include "button.h" #include "buttonGroup.h" #include "containerSettings.h" -#include "functor.h" /*! @namespace * @brief Contains the creaButtonContainer library included in creaMaracasVisu. @@ -40,6 +35,7 @@ namespace creaButtonContainer { public: //typedef definition + // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::view::Button Button; * @brief Defines the Button type. */ @@ -78,7 +74,7 @@ namespace creaButtonContainer virtual ~ButtonGroupFactory( ); /*! @fn ButtonGroupContainer ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings ); - * @brief This method allows to create the ButtonGroupContainer. + * @brief This method creates the ButtonGroupContainer. * @param parent the wxWindow* parent to be attached. * @param settings The Container settings. * @exception std::bad_alloc @@ -89,7 +85,7 @@ namespace creaButtonContainer ButtonGroupModel* settings ); private: /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel ); - * @brief This method allows to create a wx button container for a group. + * @brief This method creates a wx button container for a group. * @param parent the wxWindow* parent to be attached. * @param buttonModel The button list with its own information. * @exception std::bad_alloc diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx index a4e18f9..a85aff5 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx @@ -2,7 +2,7 @@ * @file containerSettings.cxx * @brief Implements the ContainerSettings class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "containerSettings.h" @@ -23,13 +23,13 @@ namespace creaButtonContainer ButtonGroupMap ContainerSettings::GetButtonGroupContainer( ) { - return this->m_ButtonGroupContainer; + return ( this->m_ButtonGroupContainer ); } // ---------------------------------------------------------------------------------- KeyMapList ContainerSettings::GetGroupNameList( ) { - return this->m_GroupNameList; + return ( this->m_GroupNameList ); } // ---------------------------------------------------------------------------------- void @@ -45,15 +45,15 @@ namespace creaButtonContainer } // ---------------------------------------------------------------------------------- void - ContainerSettings::AddButton( const std::string & groupName, - const std::string buttonName, const std::string iconpath, - const std::string buttonDescription, FunctionEventType event ) + ContainerSettings::AddButton( const StringType & groupName, + const StringType &buttonName, const StringType &iconpath, + const StringType &buttonDescription, FunctionEventType event ) { + ButtonPair* pair = new ButtonPair( + new ButtonInfo( buttonName, iconpath ), + new ButtonAction( buttonDescription, event ) ); try { - ButtonPair* pair = new ButtonPair( - new ButtonInfo( buttonName, iconpath ), - new ButtonAction( buttonDescription, event ) ); for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it != this->m_GroupNameList.end( ); ++it ) { @@ -79,11 +79,11 @@ namespace creaButtonContainer void ContainerSettings::AddButton( BCSettingsStruct* info ) { + ButtonPair* pair = new ButtonPair( + new ButtonInfo( info->buttonName, info->iconpath ), + new ButtonAction( info->buttonDescription, info->eventFunction ) ); try { - ButtonPair* pair = new ButtonPair( - new ButtonInfo( info->buttonName, info->iconpath ), - new ButtonAction( info->buttonDescription, info->eventFunction ) ); for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it != this->m_GroupNameList.end( ); ++it ) { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h index e180dc1..8be4861 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h @@ -2,20 +2,16 @@ * @file containerSettings.h * @brief Contains the ContainerSettings class * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef BUTTONGROUPSETTINGS_H_ #define BUTTONGROUPSETTINGS_H_ -#include -#include #include -#include -#include + #include "structBCSettings.h" #include "system.h" -#include "functor.h" /*! @namespace * @brief Contains the creaButtonContainer library included in creaMaracasVisu. @@ -102,12 +98,13 @@ namespace creaButtonContainer * @exception std::bad_alloc */ void - AddButton( const std::string & groupName, const std::string buttonName, - const std::string iconpath, const std::string buttonDescription, + AddButton( const StringType & groupName, const StringType &buttonName, + const StringType &iconpath, const StringType &buttonDescription, FunctionEventType event ); // ---------------------------------------------------------------------------------- /*! @fn void AddButton( BCSettingsStruct* info ); - * @brief This method adds a new button to the container. + * @brief This method adds a new button to the container using the + * BCSettingsStruct structure. * @exception std::bad_alloc * @param info */ @@ -123,8 +120,8 @@ namespace creaButtonContainer AddButtons( BCStructVectorType infoList ); // ---------------------------------------------------------------------------------- private: - ButtonGroupMap m_ButtonGroupContainer; //! View pointer. - KeyMapList m_GroupNameList; //! #include "system.h" /*! @namespace @@ -27,10 +26,10 @@ namespace creaButtonContainer */ struct BCSettingsStruct { - std::string groupName; //! #include #include +#include #include "functor.h" /*! @namespace @@ -19,6 +20,12 @@ */ namespace creaButtonContainer { + // ---------------------------------------------------------------------------------- + /*! @typedef std::string* StringType; + * @brief Defines the StringType type. + */ + typedef std::string StringType; + // ---------------------------------------------------------------------------------- /*! @typedef model::TFunctor* FunctionEventType; * @brief Defines the FunctionEventType type. */ @@ -28,13 +35,13 @@ namespace creaButtonContainer * @brief Defines the ActionButton type. * First is the button description, Second FunctionEventType */ - typedef std::pair< std::string, FunctionEventType > ButtonAction; + typedef std::pair< StringType, FunctionEventType > ButtonAction; // ---------------------------------------------------------------------------------- /*! @typedef std::pair< std::string, std::string > ButtonInfo; * @brief Defines the ButtonInfo type. * First is the ButtonName and Second is the IconPath */ - typedef std::pair< std::string, std::string > ButtonInfo; + typedef std::pair< StringType, StringType > ButtonInfo; // ---------------------------------------------------------------------------------- /*! @typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair; * @brief Defines the ButtonPair type. @@ -44,7 +51,7 @@ namespace creaButtonContainer /*! @typedef std::list< std::string > KeyMapList; * @brief Defines the KeyMapList type. */ - typedef std::list< std::string > KeyMapList; + typedef std::list< StringType > KeyMapList; // ---------------------------------------------------------------------------------- /*! @typedef std::list< ButtonPair* > ButtonList; * @brief Defines the ButtonList type. @@ -54,7 +61,7 @@ namespace creaButtonContainer /*! @typedef std::map< std::string, ButtonList > ButtonGroupMap; * @brief Defines the ButtonGroupMap type. */ - typedef std::map< std::string, ButtonList > ButtonGroupMap; + typedef std::map< StringType, ButtonList > ButtonGroupMap; // ---------------------------------------------------------------------------------- } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx index 40b1697..323e2a7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx @@ -2,7 +2,7 @@ * @file button.cxx * @brief Implements the Button class implementation. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "button.h" @@ -15,9 +15,9 @@ namespace creaButtonContainer Button::Button( wxWindow* parent, long id, ButtonPair* pair ) { this->m_ButtonPair = pair; - std::string wXbuttonName = this->m_ButtonPair->first->first; - std::string wXiconPath = this->m_ButtonPair->first->second; - std::string wXdescription = this->m_ButtonPair->second->first; + StringType wXbuttonName = this->m_ButtonPair->first->first; + StringType wXiconPath = this->m_ButtonPair->first->second; + StringType wXdescription = this->m_ButtonPair->second->first; wxString buttonName( wXbuttonName.c_str( ), wxConvUTF8 ); wxString imageIcon( wXiconPath.c_str( ), wxConvUTF8 ); wxString description( wXdescription.c_str( ), wxConvUTF8 ); @@ -33,19 +33,19 @@ namespace creaButtonContainer { } // ---------------------------------------------------------------------------------- - std::string + StringType Button::GetButtonName( ) { return ( this->m_ButtonPair->first->first ); } // ---------------------------------------------------------------------------------- - std::string + StringType Button::GetIconPath( ) { return ( this->m_ButtonPair->first->second ); } // ---------------------------------------------------------------------------------- - std::string + StringType Button::GetDescription( ) { return ( this->m_ButtonPair->second->first ); @@ -56,8 +56,6 @@ namespace creaButtonContainer { try { - std::cout << "ButtonAction: " << this->m_ButtonPair->first->first - << std::endl; TFunctor* vTable[ ] = { this->m_ButtonPair->second->second }; vTable[ 0 ]->Call( this->m_ButtonPair->first->first ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.h index 67d2861..8462034 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.h @@ -2,7 +2,7 @@ * @file button.h * @brief Contains the Button class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef BUTTON_H @@ -11,10 +11,7 @@ #include #include #include -#include -#include -#include -#include "functor.h" + #include "system.h" /*! @namespace @@ -37,6 +34,7 @@ namespace creaButtonContainer { public: //typedef definition + // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::model::TFunctor TFunctor; * @brief Defines the TFunctor type. */ @@ -70,21 +68,21 @@ namespace creaButtonContainer * @brief This method returns the name of the button. * @return std::string The name of the button. */ - std::string + StringType GetButtonName( ); // ---------------------------------------------------------------------------------- /*! @fn std::string Button::GetIconPath( ); * @brief This method returns the iconPath of the button. * @return std::string The path of the icon. */ - std::string + StringType GetIconPath( ); // ---------------------------------------------------------------------------------- /*! @fn std::string Button::GetDescription( ); * @brief This method returns a the description of the button. * @return std::string The tooltip of the button. */ - std::string + StringType GetDescription( ); // ---------------------------------------------------------------------------------- /*! @fn void Button::Execute( ); @@ -98,7 +96,7 @@ namespace creaButtonContainer Execute( ); // ---------------------------------------------------------------------------------- private: - ButtonPair* m_ButtonPair; //! #include #include + #include #include #include @@ -34,8 +35,7 @@ namespace creaButtonContainer { /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h" * @brief This class contains the ButtonContainerPanel controller. - * @details This class describes the button events, it derives from wxEvtHandler and it is the - * controller in the MVC. + * @details This class describes the button events, it derives from wxEvtHandler. * @see wxEvtHandler */ class ButtonContainerController; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.cxx index 5a0db8b..0738e60 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.cxx @@ -2,7 +2,7 @@ * @file buttonGroup.cxx * @brief Implements the ButtonGroup class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "buttonGroup.h" @@ -38,21 +38,21 @@ namespace creaButtonContainer ButtonGroup::IdButtonContainer ButtonGroup::GetButtonIdContainer( ) { + IdButtonContainer idContainer; try { - IdButtonContainer idContainer; for( ButtonContainer::iterator it = this->m_Buttons.begin( ); it != this->m_Buttons.end( ); ++it ) { idContainer.push_back( ( *it ).first ); - } - return ( idContainer ); + }//rof }//yrt catch ( std::exception& e ) { std::cerr << "ButtonGroup::GetButtonIdContainer( )" << "exception: " << e.what( ) << std::endl; }//hctac + return ( idContainer ); } // ---------------------------------------------------------------------------------- Button* diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h index b328569..0172389 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h @@ -2,16 +2,17 @@ * @file buttonGroup.h * @brief This contains the ButtonGroup class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef BUTTONGROUP_H #define BUTTONGROUP_H //Library Definition +#include + #include #include -#include #include #include "button.h" @@ -34,6 +35,7 @@ namespace creaButtonContainer { public: //Typedef definition + // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::view::Button Button; * @brief Defines the Button type. */ @@ -95,7 +97,7 @@ namespace creaButtonContainer GetGroupName( ); // ---------------------------------------------------------------------------------- private: - wxStaticText* m_GroupName; //!m_GridSizer->Add( ( *it ).second, -1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 ); this->Add( m_GridSizer, -1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 ); - } + }//fi }//yrt catch ( const std::exception& e ) { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h index 15127e9..88c6786 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h @@ -2,7 +2,7 @@ * @file buttonManager.h * @brief This contains the ButtonManager class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef CARTOBUTTONCONTAINER_H @@ -12,8 +12,10 @@ #include #include #include + #include #include + #include "button.h" #include "buttonGroup.h" @@ -37,6 +39,7 @@ namespace creaButtonContainer { public: //typedef definition. + // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::view::Button Button; * @brief Defines the Button type. */ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx index bdb49d2..86a461a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx @@ -2,7 +2,7 @@ * @file groupManager.cxx * @brief Implements the GroupManager class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "groupManager.h" @@ -21,7 +21,8 @@ namespace creaButtonContainer wxDefaultValidator, _T("EXPBUTTON") ); this->Add( m_ExpansionButton, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 ); this->m_ButtonManager = new ButtonManager( buttonGroup ); - this->Add( this->m_ButtonManager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 ); + this->Add( this->m_ButtonManager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, + 5 ); } // ---------------------------------------------------------------------------------- GroupManager::~GroupManager( ) @@ -68,10 +69,14 @@ namespace creaButtonContainer GroupManager::HideSubPanel( bool hide ) { if ( hide == true ) + { this->m_ButtonManager->HideButtonManager( ); + }//fi else + { this->m_ButtonManager->ShowButtonManager( ); + }//esle } - // ---------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------- }//ecapseman }//ecapseman diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.h index 969b7a4..c187c2e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.h @@ -2,7 +2,7 @@ * @file groupManager.h * @brief This contains the GroupManager class * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef GROUPMANAGER_H @@ -11,13 +11,13 @@ #include #include #include -#include + #include #include #include + #include "buttonManager.h" #include "buttonGroup.h" -#include /*! @namespace * @brief Contains the creaButtonContainer library included in creaMaracasVisu. @@ -39,6 +39,7 @@ namespace creaButtonContainer { public: //typedef definition + // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup; * @brief Defines the ButtonGroup type. */ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx index 8ca88d0..80dee9a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx @@ -2,7 +2,7 @@ * @file buttonContainerSettings.cxx * @brief Implements the ButtonContainerSettings class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #include "buttonContainerSettings.h" @@ -32,7 +32,7 @@ namespace creaPanelButtonContainer // ---------------------------------------------------------------------------------- //GetButtonPanel returns the panel associated to the buttonAction ButtonContainerSettings::PanelButton - ButtonContainerSettings::GetPanelButton( const std::string &buttonName ) + ButtonContainerSettings::GetPanelButton( const StringType &buttonName ) { try { @@ -52,7 +52,7 @@ namespace creaPanelButtonContainer catch ( std::exception& e ) { std::cerr - << "ButtonContainerSettings::GetPanelButton( const std::string &buttonName ) " + << "ButtonContainerSettings::GetPanelButton( const StringType &buttonName ) " << "exception: " << e.what( ) << std::endl; }//hctac return ( NULL ); @@ -79,7 +79,7 @@ namespace creaPanelButtonContainer catch ( std::exception& e ) { std::cerr - << "ButtonContainerSettings::GetPanelButton( const std::string &buttonName ) " + << "ButtonContainerSettings::GetPanelButton( const StringType &buttonName ) " << "exception: " << e.what( ) << std::endl; }//hctac } @@ -98,9 +98,9 @@ namespace creaPanelButtonContainer } // ---------------------------------------------------------------------------------- void - ButtonContainerSettings::AddButton( const std::string & groupName, - const std::string &buttonName, const std::string &iconpath, - const std::string &buttonDescription, PanelButton panel ) + ButtonContainerSettings::AddButton( const StringType & groupName, + const StringType &buttonName, const StringType &iconpath, + const StringType &buttonDescription, PanelButton panel ) { try { @@ -131,9 +131,9 @@ namespace creaPanelButtonContainer catch ( const std::exception& e ) { std::cerr - << "ButtonContainerSettings::AddButton( const std::string & groupName," - << "const std::string &buttonName, const std::string &iconpath," - << "const std::string &buttonDescription, PanelButton panel ) " + << "ButtonContainerSettings::AddButton( const StringType & groupName," + << "const StringType &buttonName, const StringType &iconpath," + << "const StringType &buttonDescription, PanelButton panel ) " << "exception: " << e.what( ) << std::endl; }//hctac } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h index fa94fd1..92391e1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h @@ -2,15 +2,16 @@ * @file buttonContainerSettings.h * @brief This contains the ButtonContainerSettings class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef BUTTONCONTAINERSETTINGS_H_ #define BUTTONCONTAINERSETTINGS_H_ +#include + #include #include -#include #include #include @@ -30,6 +31,12 @@ namespace creaPanelButtonContainer { public: //typedef definition. + // ---------------------------------------------------------------------------------- + /*! @typedef std::string* StringType; + * @brief Defines the StringType type. + */ + typedef std::string StringType; + // ---------------------------------------------------------------------------------- /*! typedef creaButtonContainer::model::TFunctor TFunctor; * @brief Defines the TFunctor type. */ @@ -124,7 +131,7 @@ namespace creaPanelButtonContainer // ---------------------------------------------------------------------------------- /*! @fn ButtonGroupSettings* GetButtonGroupSettings( TFunctor* functor ); * @brief this method return the settings the generic settings for creaButtonContainer. - * @param functor + * @param functor The function to be called in the action button. * @exception std::bad_alloc * @return */ @@ -149,11 +156,11 @@ namespace creaPanelButtonContainer const std::string &iconpath, const std::string &buttonDescription, PanelButton panel ); * @brief This method adds a new button into a group of buttons. - * @param groupName - * @param buttonName - * @param iconpath - * @param buttonDescription - * @param panel + * @param groupName The button groupName + * @param buttonName The buttonName + * @param iconpath The path of the icon + * @param buttonDescription The button tooltip + * @param panel The panel to be called when the button is clicked * @exception std::bad_alloc */ void @@ -163,7 +170,7 @@ namespace creaPanelButtonContainer // ---------------------------------------------------------------------------------- /*! @fn void AddButton( BCPSettingsStruct* info ); * @brief This method adds a new button into a group of buttons. - * @param info + * @param info The pointer to BCPSettingsStruct. * @exception std::bad_alloc */ void @@ -171,7 +178,7 @@ namespace creaPanelButtonContainer // ---------------------------------------------------------------------------------- /*! @fn void AddButtons( BCStructVectorType infoList ); * @brief This method adds new buttons into the container. - * @param infoList + * @param infoList The BCStructVectorType * @exception std::bad_alloc */ void diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx index c2b954a..9ea9dc7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx @@ -2,7 +2,7 @@ * @file creaPanelButtonContainer.h * @brief implements PanelButtonContainer class * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-28 + * @date 2011-06-02 */ #include "creaPanelButtonContainer.h" @@ -65,7 +65,9 @@ namespace creaPanelButtonContainer buttonName ); //changing the parent of the panel! if ( this->m_ButtonPanel->GetParent( ) != this ) + { this->m_ButtonPanel->Reparent( this ); + }//fi //CartoSettingsPanel Management this->m_AuiManager->GetPane( _T("ButtonPanel") ).window = this->m_ButtonPanel; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h index aac12ec..dffcdeb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h @@ -2,7 +2,7 @@ * @file PanelButtonContainer * @brief This contains the ButtonContainerSettings class. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-28 + * @date 2011-06-02 */ #ifndef PANELBUTTONCONTAINER_H_ @@ -30,13 +30,14 @@ namespace creaPanelButtonContainer { public: //typedef definition. - /*! typedef creaButtonContainer::model::TFunctor TFunctor; - * @brief Defines the TFunctor type. + // ---------------------------------------------------------------------------------- + /*! typedef creaPanelButtonContainer::ButtonContainerSettings ButtonContainerSettings; + * @brief Defines the ButtonContainerSettings type. */ typedef creaPanelButtonContainer::ButtonContainerSettings ButtonContainerSettings; - /*! typedef creaButtonContainer::model::TFunctor TFunctor; - * @brief Defines the TFunctor type. + /*! typedef creaButtonContainer::view::ButtonContainerPanel ButtonContainerPanel; + * @brief Defines the ButtonContainerPanel type. */ typedef creaButtonContainer::view::ButtonContainerPanel ButtonContainerPanel; @@ -46,8 +47,8 @@ namespace creaPanelButtonContainer // ---------------------------------------------------------------------------------- /*! @fn PanelButtonContainer( wxWindow* parent, ButtonContainerSettings* bcSettings ); * @brief This is the parameterized constructor. - * @param parent - * @param bcSettings + * @param parent The wxWindow pointer to parent + * @param bcSettings //The buttonContainerSettings */ PanelButtonContainer( wxWindow* parent, ButtonContainerSettings* bcSettings ); @@ -59,7 +60,7 @@ namespace creaPanelButtonContainer ~PanelButtonContainer( ); // ---------------------------------------------------------------------------------- /*! @fn void UpdatePanel( const std::string &buttonName ); - * @brief This method Updates the m_ButtonPanel for a panel + * @brief This method Updates the m_ButtonPanel to a panel * of the clicked button in creaButtonContainer. * @param buttonName */ @@ -69,7 +70,7 @@ namespace creaPanelButtonContainer /*! @fn void GenericButtonEvent( const std::string &buttonName ); * @brief This method is the function that calls the panels contained in the buttons * (in creaButtonContainer is the function contained in the functors to be called back. - * @param buttonName + * @param buttonName The name of the button */ void GenericButtonEvent( const std::string &buttonName ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/structBCPSettings.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/structBCPSettings.h index be67f22..76e186d 100755 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/structBCPSettings.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/structBCPSettings.h @@ -2,7 +2,7 @@ * @file structBCPSettings.h * @brief Contains BCPSettingsStruct structure. * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-05-24 + * @date 2011-06-02 */ #ifndef STRUCTBCPSETTINGS_H_