]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.cxx
#2502 creaMaracasVisu Feature New Normal - alternation between containers: button...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / buttonManager.cxx
index 74ea51947b568a07fd2aa2b07406286a053e58ae..dc793d537a0c123391a4fc10a781f502e4a1de68 100644 (file)
@@ -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( )
                {