]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/buttonGroupFactory.cxx
creaButtonContainer: Updates in documentation, adding try catch clauses and cleaning...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / buttonGroupFactory.cxx
index 7acc0d9a4700a9af19fb78ade28be1d2059f535d..eda556b8096b410295705ddbd7debcaaf44886eb 100644 (file)
@@ -2,7 +2,7 @@
  * Name:      @file buttonGroupFactory.cxx
  * Purpose:   @brief This contains the ButtonGroupFactory class implementation
  * Author:    @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * Modified:  2011-05-17
+ * Modified:  2011-05-18
  * Copyright:
  * License:
  ***************************************************************************************/
@@ -35,21 +35,24 @@ namespace creaButtonContainer
                                ButtonGroupMap map = settings->GetButtonGroupContainer( );
                                for( ButtonGroupMap::iterator it = map.begin( ); it != map.end( ); ++it )
                                {
+                                       //using wxWidgets.
                                        wxString groupNameAux( ( *it ).first.c_str( ), wxConvUTF8 );
                                        wxStaticText* wxGroupName = new wxStaticText( parent, -1,
                                            groupNameAux, wxDefaultPosition, wxDefaultSize, 0,
                                            _T( "GroupText" ) );
+                                       //creating a wxButtonGroup.
                                        ButtonGroup* group = new ButtonGroup( wxGroupName,
                                            this->GetButtons( parent, ( *it ).second ) );
+                                       //adding the group to the container.
                                        groupView.push_back( group );
-                               }
-                       }
+                               }//rof
+                       }//yrt
                        catch ( std::exception& e )
                        {
                                std::cerr
                                    << "ButtonContainerController::ButtonExpEvent( wxCommandEvent& event ) exception: "
                                    << e.what( ) << std::endl;
-                       }
+                       }//chtac
                        return ( groupView );
                }
                // ----------------------------------------------------------------------------------
@@ -66,13 +69,13 @@ namespace creaButtonContainer
                                        buttonList[ id ] = new Button( parent, id, *it );
                                }
                                return ( buttonList );
-                       }
+                       }//yrt
                        catch ( std::exception& e )
                        {
                                std::cerr
                                    << "ButtonContainerController::ButtonExpEvent( wxCommandEvent& event ) exception: "
                                    << e.what( ) << std::endl;
-                       }
+                       }//chtac
                }
        // ----------------------------------------------------------------------------------
        }//ecapseman