X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FcreaPanelButtonContainer%2FcreaPanelButtonContainer.cxx;h=d377773c6c77f6d61bb9dfaae82ee6218b21ac89;hb=ff116b1d805145619b44879358f1fa8521ef5569;hp=ea943d82b1ddf19c0d1c152b99e4ba0b401c2ab8;hpb=db86dba6381cc26c3fa1070608b2ac56abeb823c;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx index ea943d8..d377773 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx @@ -32,6 +32,7 @@ #include "creaPanelButtonContainer.h" + namespace creaPanelButtonContainer { BEGIN_EVENT_TABLE(PanelButtonContainer,wxPanel) @@ -55,14 +56,25 @@ namespace creaPanelButtonContainer // TConcreteFunctor* functor = new TConcreteFunctor( this->m_ButtonPanel, &PanelButtonContainer::GenericButtonEvent ); //end of the event definition - this->m_ButtonContainerPanel = new ButtonContainerPanel( this, this->m_ButtonContainerSettings->GetButtonGroupSettings( functor ),type ); + + wxPanel* listPanel = new wxPanel(this); + + if(type == 0) + this->m_ButtonContainerPanel = new ButtonContainerPanel( this, this->m_ButtonContainerSettings->GetButtonGroupSettings( functor ),type ); + else if( type == 1) + this->mylist = new ListWx(listPanel, -1, this->m_ButtonContainerSettings->GetItemsMap(), functor); + //MLER + //Using AuiManager to Manage the Panels this->m_AuiManager = new wxAuiManager( this, wxAUI_MGR_DEFAULT ); this->m_AuiManager->AddPane(this->m_ButtonPanel, wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption( _("Panel") ). CaptionVisible(true ).CloseButton( false ).Bottom( ).Resizable( true ) ); //CartoButtonPanel Management - this->m_AuiManager->AddPane( this->m_ButtonContainerPanel,wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(_("creaButtonContainer") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) ); + if(type == 0) + this->m_AuiManager->AddPane( this->m_ButtonContainerPanel,wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(_("creaButtonContainer") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) ); + else + this->m_AuiManager->AddPane( listPanel,wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(_("creaButtonContainer") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) ); this->m_AuiManager->Update( ); } // ----------------------------------------------------------------------------------