]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx
creaButtonContainer: Updates in documentation, adding try catch clauses and cleaning...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / button.cxx
index d936a53ba097cbbb74e8970124ec62cfcdf03ebb..15ad6fc3120d593d539054ec2fb206ecad1ae48c 100644 (file)
@@ -7,14 +7,16 @@
  * License:
  **************************************************************/
 
+//! @include "button.h"
 #include "button.h"
-#include <iostream>
 
+//!    @namespace <creaButtonContainer>
 namespace creaButtonContainer
 {
+       //!     @namespace <view>
        namespace view
        {
-               //--------------------------------------------------------------------
+               // ----------------------------------------------------------------------------------
                Button::Button( wxWindow* parent, long id, ButtonPair* pair )
                {
                        this->m_ButtonPair = pair;
@@ -24,43 +26,45 @@ namespace creaButtonContainer
                        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,
                            buttonName );
                        this->SetToolTip( description );
                }
-               //--------------------------------------------------------------------
+               // ----------------------------------------------------------------------------------
                Button::~Button( )
                {
                }
-               //--------------------------------------------------------------------
-               //--------------------------------------------------------------------
-               string
+               // ----------------------------------------------------------------------------------
+               std::string
                Button::GetButtonName( )
                {
-                       return( this->m_ButtonPair->first->first );
+                       return ( this->m_ButtonPair->first->first );
                }
-               //--------------------------------------------------------------------
-               string
+               // ----------------------------------------------------------------------------------
+               std::string
                Button::GetIconPath( )
                {
-                       return( this->m_ButtonPair->first->second );
+                       return ( this->m_ButtonPair->first->second );
                }
-               //--------------------------------------------------------------------
-               string
+               // ----------------------------------------------------------------------------------
+               std::string
                Button::GetDescription( )
                {
-                       return( this->m_ButtonPair->second->first );
+                       return ( this->m_ButtonPair->second->first );
                }
-               //--------------------------------------------------------------------
+               // ----------------------------------------------------------------------------------
                void
                Button::Execute( )
                {
-                       std::cout << "ButtonAction: "<< this->m_ButtonPair->first->first <<std::endl;
-                       TFunctor* vTable[] = {this->m_ButtonPair->second->second};
-                       vTable[0]->Call( this->m_ButtonPair->first->first );
+                       std::cout << "ButtonAction: " << this->m_ButtonPair->first->first
+                           << std::endl;
+                       TFunctor* vTable[ ] =
+                       { this->m_ButtonPair->second->second };
+                       vTable[ 0 ]->Call( this->m_ButtonPair->first->first );
                }
-
+       // ----------------------------------------------------------------------------------
        }//ecapseman
 }//ecapseman