X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FcreaButtonContainer%2Fview%2FlistGroup.cxx;h=92295a1cac8cb79c6d249461aad8a7d2af79c146;hb=4518d93a0a51221812cfb6d783f8e7f4fd77b498;hp=cb193d6d1005968f9d6e7887ad8bd53e168f5b21;hpb=c1742e6eca1299979dbacc1f609bc14c3494bc7a;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx index cb193d6..92295a1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx @@ -23,13 +23,6 @@ # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ */ -/*! - * @file buttonGroup.cxx - * @brief Implements the ListGroup class. - * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) - * @date 2011-06-02 - */ - #include "listGroup.h" namespace creaButtonContainer @@ -37,10 +30,10 @@ namespace creaButtonContainer namespace view { // ---------------------------------------------------------------------------------- - ListGroup::ListGroup( wxStaticText* groupName, ListContainer list ) + ListGroup::ListGroup( wxStaticText* groupName, ButtonContainer cartoButtons ) { this->m_GroupName = groupName; - this->m_List = list; + this->m_Buttons = cartoButtons; } // ---------------------------------------------------------------------------------- @@ -49,10 +42,10 @@ namespace creaButtonContainer } // ---------------------------------------------------------------------------------- - ListGroup::ListContainer - ListGroup::GetListContainer( ) + ListGroup::ButtonContainer + ListGroup::GetButtonContainer( ) { - return ( this->m_List ); + return ( this->m_Buttons ); } // ---------------------------------------------------------------------------------- @@ -63,8 +56,41 @@ namespace creaButtonContainer } // ---------------------------------------------------------------------------------- + ListGroup::IdButtonContainer + ListGroup::GetButtonIdContainer( ) + { + IdButtonContainer idContainer; + try + { + for( ButtonContainer::iterator it = this->m_Buttons.begin( ); it + != this->m_Buttons.end( ); ++it ) + { + idContainer.push_back( ( *it ).first ); + }//rof + }//yrt + catch ( std::exception& e ) + { + std::cerr << "ButtonGroup::GetButtonIdContainer( )" << "exception: " + << e.what( ) << std::endl; + }//hctac + return ( idContainer ); + } - + // ---------------------------------------------------------------------------------- + ListGroup::Button* + ListGroup::GetButton( long id ) + { + try + { + //return ( this->m_Buttons[ id ] ); // JPR + }//yrt + catch ( std::exception& e ) + { + std::cerr << "ButtonGroup::GetButton( long id )" << "exception: " + << e.what( ) << std::endl; + }//hctac + return ( this->m_Buttons[ id ] );// JPR + } // ---------------------------------------------------------------------------------- }//ecapseman }//ecapseman