]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx
2413 creaMaracasVisu Feature New Normal New blackBox BitmapButtonIcon and fix the...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / button.cxx
index 4795f77a5f6d7bde0c83849e90fa50745d6a8c79..39a30e3ce9c11664443fd6f0eb73b173428c6e1b 100644 (file)
@@ -41,19 +41,18 @@ namespace creaButtonContainer
                {
                        this->m_ButtonPair                      = pair;
                        StringType wXbuttonName         = this->m_ButtonPair->first->first;
-                       StringType wXiconPath           = this->m_ButtonPair->first->second;
+                       BitmapType wXicon               = this->m_ButtonPair->first->second;
                        StringType wXdescription        = this->m_ButtonPair->second->first;
                        wxString buttonName( wXbuttonName.c_str( ), wxConvUTF8 );
-                       wxString imageIcon( wXiconPath.c_str( ), wxConvUTF8 );
                        wxString description( wXdescription.c_str( ), wxConvUTF8 );
                        //creating the button.
                        this->Create( parent, id,
-                           wxBitmap( wxImage( imageIcon, wxBITMAP_TYPE_ANY, -1 ) ),
+                           wXicon,
                            wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator,
                            buttonName );
                        this->SetToolTip( description );
                }
-               
+
                // ----------------------------------------------------------------------------------
                Button::~Button( )
                {
@@ -65,13 +64,20 @@ namespace creaButtonContainer
                {
                        return ( this->m_ButtonPair->first->first );
                }
-               
+
                // ----------------------------------------------------------------------------------
-               StringType
+               BitmapType
+               Button::GetIcon( )
+               {
+                       return ( this->m_ButtonPair->first->second );
+               }               
+
+               // ----------------------------------------------------------------------------------
+               /*StringType
                Button::GetIconPath( )
                {
                        return ( this->m_ButtonPair->first->second );
-               }
+               }*/
                
                // ----------------------------------------------------------------------------------
                StringType