]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.cxx
creaButtonContainer: Updates in documentation, adding try catch clauses and cleaning...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / controller / buttonContainerController.cxx
index ecbf950d05cbfb2d2f6731bc98a33577ee104114..175093062ccc60bfd9690dcfb95e68b1c1b7f282 100644 (file)
@@ -58,13 +58,13 @@ namespace creaButtonContainer
                                                        & ButtonContainerController::ButtonEvent );
                                        }//rof
                                }//rof
-                       }
+                       }//yrt
                        catch ( std::exception& e )
                        {
                                std::cerr
                                    << "ButtonContainerController::ButtonExpEvent( wxCommandEvent& event ) exception: "
                                    << e.what( ) << std::endl;
-                       }
+                       }//hctac
                }
                // ----------------------------------------------------------------------------------
                void
@@ -79,41 +79,43 @@ namespace creaButtonContainer
                                        this->m_BCPanel->m_GroupManagerList[ id ]->GetButton( )->SetLabel(
                                            _( "-" ) );
                                        this->m_BCPanel->m_GroupManagerList[ id ]->HideSubPanel( false );
-                               }
+                               }//fi
                                else if ( this->m_BCPanel->m_GroupManagerList[ id ]->GetButton( )->GetLabel( ).Cmp(
                                    _( "-" ) ) == 0 )
                                {
                                        this->m_BCPanel->m_GroupManagerList[ id ]->GetButton( )->SetLabel(
                                            _( "+" ) );
                                        this->m_BCPanel->m_GroupManagerList[ id ]->HideSubPanel( true );
-                               }
+                               }//fi esle
                                this->m_BCPanel->FitSizer( );
-                       }
+                       }//yrt
                        catch ( std::exception& e )
                        {
                                std::cerr << "ButtonContainerController::AddEvents( ) exception: "
                                    << e.what( ) << std::endl;
-                       }
+                       }//hctac
                }
                // ----------------------------------------------------------------------------------
                void
                ButtonContainerController::ButtonEvent( wxCommandEvent& event )
                {
-                       for( ButtonGroupList::iterator it =
-                           this->m_BCPanel->m_ButtonGroupList.begin( ); it
-                           != this->m_BCPanel->m_ButtonGroupList.end( ); ++it )
+                       try
                        {
-                               try
+                               for( ButtonGroupList::iterator it =
+                                   this->m_BCPanel->m_ButtonGroupList.begin( ); it
+                                   != this->m_BCPanel->m_ButtonGroupList.end( ); ++it )
                                {
+
                                        ( *it )->GetButton( event.GetId( ) )->Execute( );
-                               }
-                               catch ( std::exception& e )
-                               {
-                                       std::cerr
-                                           << "ButtonContainerController::ButtonExpEvent( wxCommandEvent& event ) exception: "
-                                           << e.what( ) << std::endl;
-                               }
-                       }
+
+                               }//rof
+                       }//yrt
+                       catch ( std::exception& e )
+                       {
+                               std::cerr
+                                   << "ButtonContainerController::ButtonExpEvent( wxCommandEvent& event ) exception: "
+                                   << e.what( ) << std::endl;
+                       }//hctac
                }
        // ----------------------------------------------------------------------------------
        }//ecapsename