]> Creatis software - creaMaracasVisu.git/commitdiff
Diego Caceres: creaButtonContainer & creaPanelButtonContainer
authorDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Mon, 9 May 2011 12:26:37 +0000 (12:26 +0000)
committerDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Mon, 9 May 2011 12:26:37 +0000 (12:26 +0000)
CMakeLists.txt modification.
New changes in the project - CreateButtonGroup function has been removed from the project.

CMakeLists.txt
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h

index 06f8a721b189b170d7889dd33819ec6790abde41..9ed5f293da4382736d25615574d1989c0d10f6cf 100644 (file)
@@ -64,10 +64,10 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWi
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint )
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView )
 #DCH
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/include )
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/include )
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/include )
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/include )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer )
 #DCH
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/CutModule/interface )
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/CutModule/kernel )
index 297ac4381d602b7401a44f627262cb2eebdf03b7..060211b4781671547eb1fca4f04e7adc04a7e773 100644 (file)
@@ -45,27 +45,24 @@ namespace creaButtonContainer
                {
                        this->m_GroupNameList = m_GroupNameList;
                }
-
-               void
-               ContainerSettings::CreateGroup( const std::string & groupName )
-               {
-                       this->m_GroupNameList.push_back( groupName );
-               }
                void
                ContainerSettings::AddButton( const std::string & groupName,
                    const std::string buttonName, const std::string iconpath,
                    const std::string buttonDescription, FunctionEventType event )
                {
+                       ButtonPair* pair = new ButtonPair(
+                           new ButtonInfo( buttonName, iconpath ),
+                           new ActionButton( buttonDescription, event ) );
                        for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                            != this->m_GroupNameList.end( ); ++it )
                                if ( ( *it ).compare( groupName ) == 0 )
                                {
-                                       ButtonPair* pair = new ButtonPair(
-                                           new ButtonInfo( buttonName, iconpath ),
-                                           new ActionButton( buttonDescription, event ) );
                                        this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                                        return;
-                               }
+                               }//fi
+                       //rof
+                       this->m_GroupNameList.push_back( groupName );
+                       this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                }
        }
 }
index 1707176244cceea21679d2fec5927d205a8a1d62..6d10f7a1c7db94b43f4d014245c0bdaaa12912fe 100644 (file)
@@ -75,14 +75,6 @@ namespace creaButtonContainer
                                 * @return The wx button group container.
                                 */
                                void
-                               CreateGroup( const std::string & groupName );
-                               /*!
-                                * @brief This function allows to create the ButtonGroupContainer.
-                                * @param the wxWindow* parent to be attached.
-                                * @param The Container settings.
-                                * @return The wx button group container.
-                                */
-                               void
                                AddButton( const std::string & groupName, const std::string buttonName,
                                    const std::string iconpath, const std::string buttonDescription,
                                    FunctionEventType event );
index 9f60e03c4ee16411269334db9972734f996d9bf9..55e595e0a3fd1d43d4d035d39b86d0913366dd20 100644 (file)
@@ -78,29 +78,27 @@ namespace creaPanelButtonContainer
                this->m_GroupNameList = m_GroupNameList;
        }
 
-       void
-       ButtonContainerSettings::CreateGroup( const std::string & groupName )
-       {
-               this->m_GroupNameList.push_back( groupName );
-       }
        void
        ButtonContainerSettings::AddButton( const std::string & groupName,
            const std::string buttonName, const std::string iconpath,
            const std::string buttonDescription, PanelButton panel )
        {
+               //builds the button information
+               ButtonPair* pair = new ButtonPair( new ButtonInfo( buttonName, iconpath ),
+                   new ActionButton( buttonDescription, panel ) );
+               panel->Show( false );
                for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                    != this->m_GroupNameList.end( ); ++it )
                {
                        if ( ( *it ).compare( groupName ) == 0 )
                        {
-                               panel->Show( false );
-                               ButtonPair* pair = new ButtonPair(
-                                   new ButtonInfo( buttonName, iconpath ),
-                                   new ActionButton( buttonDescription, panel ) );
                                this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                                return;
                        }//fi
                }//rof
+               //if the group doesn't exist it creates a new groupName
+               this->m_GroupNameList.push_back( groupName );
+               this->m_ButtonGroupContainer[ groupName ].push_back( pair );
        }
 }//ecapseman
 
index dd24670cdcf23883ffb4d4d734fe731c814d3771..31d6993fb40a85ae1d8361ff623025a26fca53e0 100644 (file)
@@ -49,11 +49,9 @@ namespace creaPanelButtonContainer
                        void
                        SetGroupNameList( KeyMapList m_GroupNameList );
                        void
-                       CreateGroup( const std::string & groupName );
-                       void
                        AddButton( const std::string & groupName, const std::string buttonName,
                            const std::string iconpath, const std::string buttonDescription,
-                           PanelButton event );
+                           PanelButton panel );
 
                private:
                        ButtonGroupMap m_ButtonGroupContainer;