]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx
#2509 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / button.cxx
index 4795f77a5f6d7bde0c83849e90fa50745d6a8c79..7c81882f3386babdcd6510b4c0b71080a56cf903 100644 (file)
@@ -39,21 +39,21 @@ namespace creaButtonContainer
                // ----------------------------------------------------------------------------------
                Button::Button( wxWindow* parent, long id, ButtonPair* pair )           
                {
+                       std::cout<< "MLER | Button::Button()" << std::endl;
+
                        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 ) ),
-                           wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator,
+                       this->Create( parent, id,wXicon,
+                           wxDefaultPosition, wxDefaultSize,wxBU_AUTODRAW, wxDefaultValidator,
                            buttonName );
                        this->SetToolTip( description );
                }
-               
+
                // ----------------------------------------------------------------------------------
                Button::~Button( )
                {
@@ -63,20 +63,30 @@ namespace creaButtonContainer
                StringType
                Button::GetButtonName( )
                {
+                       std::cout<< "MLER | Button::GetButtonName( )" << std::endl;
                        return ( this->m_ButtonPair->first->first );
                }
-               
+
                // ----------------------------------------------------------------------------------
-               StringType
+               BitmapType
+               Button::GetIcon( )
+               {
+                       std::cout<< "MLER | Button::GetIcon( )" << std::endl;
+                       return ( this->m_ButtonPair->first->second );
+               }               
+
+               // ----------------------------------------------------------------------------------
+               /*StringType
                Button::GetIconPath( )
                {
                        return ( this->m_ButtonPair->first->second );
-               }
+               }*/
                
                // ----------------------------------------------------------------------------------
                StringType
                Button::GetDescription( )
                {
+                       std::cout<< "MLER | Button::GetDescription( )" << std::endl;
                        return ( this->m_ButtonPair->second->first );
                }
                
@@ -84,11 +94,14 @@ namespace creaButtonContainer
                void
                Button::Execute( )
                {
+                       std::cout<< "MLER | Button::Execute( )" << std::endl;
                        try
                        {
                                TFunctor* vTable[ ] =
                                { this->m_ButtonPair->second->second };
+
                                vTable[ 0 ]->Call( this->m_ButtonPair->first->first );
+                               std::cout<< "Call Button: " << this->m_ButtonPair->first->first  <<std::endl;
                        }//yrt
                        catch ( const std::exception& e )
                        {