X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FcreaButtonContainer%2Fview%2FbuttonManager.cxx;h=dc793d537a0c123391a4fc10a781f502e4a1de68;hb=4518d93a0a51221812cfb6d783f8e7f4fd77b498;hp=74ea51947b568a07fd2aa2b07406286a053e58ae;hpb=c1742e6eca1299979dbacc1f609bc14c3494bc7a;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.cxx index 74ea519..dc793d5 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.cxx @@ -49,6 +49,7 @@ namespace creaButtonContainer { try { + std::cout << " MLER buttonManager.cxx / GroupManager(ButtonGroup* buttonGroup) " << std::endl; this->SetGroupName( buttonGroup->GetGroupName( ) ); this->SetButtonManager( buttonGroup->GetButtonContainer( ) ); }//yrt @@ -57,7 +58,22 @@ namespace creaButtonContainer std::cerr << "Button::Execute( ) exception: " << e.what( ) << std::endl; }//hctac } - + // ---------------------------------------------------------------------------------- + //MLER + ButtonManager::ButtonManager (ListGroup* buttonGroup): + wxFlexGridSizer( 0, 1, 0, 0 ) + { + try + { + std::cout << " MLER buttonManager.cxx / ButtonManager(ListGroup* buttonGroup) " << std::endl; + this->SetGroupName( buttonGroup->GetGroupName( ) ); + this->SetListManager(buttonGroup->GetButtonContainer( ) ); + }//yrt + catch ( const std::exception& e ) + { + std::cerr << "Button::Execute( ) exception: " << e.what( ) << std::endl; + }//hctac + } // ---------------------------------------------------------------------------------- ButtonManager::~ButtonManager( ) { @@ -93,6 +109,33 @@ namespace creaButtonContainer }//hctac } // ---------------------------------------------------------------------------------- + + void ButtonManager::SetListManager(ListContainer buttonContainer ) + { + try + { + if ( this->m_GroupName != NULL ) + { + this->m_GridSizer = new wxGridSizer( 0, 3, 0, 0 ); + for( ListContainer::iterator it = buttonContainer.begin( ); it!= buttonContainer.end( ); ++it ) + { + this->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 ) + { + std::cerr + << "ButtonManager::SetButtonManager( ButtonContainer buttonContainer )" + << "exception: " << e.what( ) << std::endl; + }//hctac + } + // ---------------------------------------------------------------------------------- + + + + void ButtonManager::ShowButtonManager( ) {