]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx
#2516 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaPanelButtonContainer / creaPanelButtonContainer.cxx
index 7139fd1deca8434f54bf58ec5e217d4f8b3efdf7..d7212643309df2ef6e71cfefff67d49e74eab739 100644 (file)
@@ -50,7 +50,7 @@ namespace creaPanelButtonContainer
                std::cout<< "MLER | creaPanelButtonContainer:: PanelButtonContainer() " << std::endl;
 
                this->m_ButtonContainerSettings = bcSettings;
-               this->m_ButtonPanel = new wxPanel( this );
+
 
                //Class that manages the event!!!
        //EED 20/01/2012
@@ -61,33 +61,33 @@ namespace creaPanelButtonContainer
                TConcreteFunctor* lFunctor = new TConcreteFunctor( this, &PanelButtonContainer::GenericListEvent );
                //MLER
 
-               this->m_ListPanel = new wxPanel(this);
+               //Using AuiManager to Manage the Panels
+               this->m_AuiManager = new wxAuiManager( this, wxAUI_MGR_DEFAULT );
+
 
                if(type == 0)
                {
+                       this->m_ButtonPanel = new wxPanel( this );
                        std::cout << "tipo 0; new ButtonContainerPanel"<<std::endl;
                        this->m_ButtonContainerPanel = new ButtonContainerPanel( this, this->m_ButtonContainerSettings->GetButtonGroupSettings( functor ),type );
+
+                       this->m_AuiManager->AddPane( this->m_ButtonContainerPanel,wxAuiPaneInfo( ).Name( _T("ButtonContainerPanel") ).Caption(_("ButtonContainerPanel") ). CaptionVisible( true ).CloseButton(false ).Center( ).Resizable( true ) );
+                       this->m_AuiManager->AddPane(this->m_ButtonPanel, wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption( _("ButtonPanel") ). CaptionVisible(true ).CloseButton( false ).Bottom( ).Resizable( true ) );
                }
                else if( type == 1)
                {
+                       this->m_ListPanel = new wxPanel(this);
                        std::cout << "tipo 1; new LIstWx"<<std::endl;
-                       this->mylist = new ListWx(this->m_ListPanel, -1,this->m_ButtonContainerSettings->GetItemsMap(), lFunctor);
+                       this->mylist = new ListWx(this, -1,this->m_ButtonContainerSettings->GetItemsMap(), lFunctor);
+
+                       this->m_AuiManager->AddPane( this->mylist,wxAuiPaneInfo( ).Name( _T("ListContainerPanel") ).Caption(_("ListContainerPanel") ). CaptionVisible( true ).CloseButton(false ).Center( ).Resizable( true ) );
+                       this->m_AuiManager->AddPane(this->m_ListPanel, wxAuiPaneInfo( ).Name( _T("ListPanel") ).Caption( _("ListPanel") ). CaptionVisible(true ).CloseButton( false ).Bottom( ).Resizable( true ) );
                }//MLER
 
 
-               //Using AuiManager to Manage the Panels
-               this->m_AuiManager = new wxAuiManager( this, wxAUI_MGR_DEFAULT );
+               //CartoButtonPanel Management
 
-               if(type == 0)
-                       this->m_AuiManager->AddPane(this->m_ButtonContainerPanel, wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption( _("Panel") ). CaptionVisible(true ).CloseButton( false ).Bottom( ).Resizable( true ) );
-               else if(type == 1)
-                       this->m_AuiManager->AddPane(this->m_ListPanel, wxAuiPaneInfo( ).Name( _T("ListPanel") ).Caption( _("Panel") ). CaptionVisible(true ).CloseButton( false ).Bottom( ).Resizable( true ) );
 
-               //CartoButtonPanel Management
-               if(type == 0)
-                       this->m_AuiManager->AddPane( this->m_ButtonContainerPanel,wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption(_("ListPanel") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) );
-               else if(type ==1)
-                       {this->m_AuiManager->AddPane( this->m_ListPanel,wxAuiPaneInfo( ).Name( _T("ListPanel") ).Caption(_("ListPanel") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) );}
                this->m_AuiManager->Update( );
        }
        // ----------------------------------------------------------------------------------