]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx
2413 creaMaracasVisu Feature New Normal New blackBox BitmapButtonIcon and fix the...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaPanelButtonContainer / buttonContainerSettings.cxx
index 9497e0d2e2e809223a0ef610046f4df362c59ed5..f8cd8f3f70d64cecdfec0a3beb3bed16a601e084 100644 (file)
@@ -42,6 +42,7 @@ namespace creaPanelButtonContainer
        ButtonContainerSettings::~ButtonContainerSettings( )
        {
        }
+       
        // ----------------------------------------------------------------------------------
        ButtonContainerSettings::ButtonGroupMap
        ButtonContainerSettings::GetButtonGroupContainer( )
@@ -96,8 +97,7 @@ namespace creaPanelButtonContainer
                                ButtonList list = this->m_ButtonGroupContainer[ ( *it ) ];
                                for( ButtonList::iterator it1 = list.begin( ); it1 != list.end( ); ++it1 )
                                {
-                                       settings->AddButton( ( *it ), ( *it1 )->first->first,
-                                           ( *it1 )->first->second, ( *it1 )->second->first, functor );
+                                       settings->AddButton( ( *it ), ( *it1 )->first->first, ( *it1 )->first->second, ( *it1 )->second->first, functor );
                                }//rof
                        }//rof
                }//yrt
@@ -122,10 +122,11 @@ namespace creaPanelButtonContainer
        {
                this->m_GroupNameList = m_GroupNameList;
        }
+       
        // ----------------------------------------------------------------------------------
        void
        ButtonContainerSettings::AddButton( const StringType & groupName,
-           const StringType &buttonName, const StringType &iconpath,
+           const StringType &buttonName, const wxBitmap &icon,
            const StringType &buttonDescription, PanelButton panel )
        {
                try
@@ -140,7 +141,7 @@ namespace creaPanelButtonContainer
                        }
                        panel->Show( false );
                        ButtonPair* pair = new ButtonPair(
-                           new ButtonInfo( buttonName, iconpath ),
+                           new ButtonInfo( buttonName, icon ),
                            new ActionButton( buttonDescription, panel ) );
                        for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                            != this->m_GroupNameList.end( ); ++it )
@@ -163,6 +164,7 @@ namespace creaPanelButtonContainer
                            << "exception: " << e.what( ) << std::endl;
                }//hctac
        }
+       
        // ----------------------------------------------------------------------------------
        void
        ButtonContainerSettings::AddButton( BCPSettingsStruct* info )
@@ -179,7 +181,7 @@ namespace creaPanelButtonContainer
                        }
                        info->panel->Show( false );
                        ButtonPair* pair = new ButtonPair(
-                           new ButtonInfo( info->buttonName, info->iconpath ),
+                           new ButtonInfo( info->buttonName, info->icon ),
                            new ActionButton( info->buttonDescription, info->panel ) );
                        for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                            != this->m_GroupNameList.end( ); ++it )
@@ -201,6 +203,7 @@ namespace creaPanelButtonContainer
                        exit( 1 );
                }//hctac
        }
+       
        // ----------------------------------------------------------------------------------
        void
        ButtonContainerSettings::AddButtons( BCStructVectorType infoList )