3 * @brief Contains the Button class.
4 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
11 #include <wx/bmpbuttn.h>
13 #include <wx/string.h>
21 /*! @namespace <creaButtonContainer>
22 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
24 namespace creaButtonContainer
26 /*! @namespace <creaButtonContainer::view>
27 * @brief Contains the implementation of the view in creaButtonContainer library.
28 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
32 /*! @class Button button.h "button.h"
33 * @brief This class contains the Button in the view perspective.
34 * @details This class contains the information of a button, it derives from wxBitmapButton.
35 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxbitmapbutton.html">wxBitmapButton</a>
37 class Button : public wxBitmapButton
41 /*! @typedef creaButtonContainer::model::TFunctor TFunctor;
42 * @brief Defines the TFunctor type.
44 typedef creaButtonContainer::model::TFunctor TFunctor;
45 //end of typedef definition
47 // ----------------------------------------------------------------------------------
48 /*! @fn Button::Button( wxWindow* parent, long id, ButtonPair* pair );
49 * @brief This is the constructor.
50 * @param parent The wxWindow* parent.
51 * @param id The wxID of the button.
52 * @param pair The button information.
54 Button( wxWindow* parent, long id, ButtonPair* pair );
55 // ----------------------------------------------------------------------------------
56 /*! @fn virtual Button::~Button( );
57 * @brief This is the destructor.
61 // ----------------------------------------------------------------------------------
62 /*! @fn long Button::GetID( );
63 * @brief This method gets the wxID of the button.
64 * @return long wxID of the button.
68 // ----------------------------------------------------------------------------------
69 /*! @fn std::string Button::GetButtonName( );
70 * @brief This method returns the name of the button.
71 * @return std::string The name of the button.
75 // ----------------------------------------------------------------------------------
76 /*! @fn std::string Button::GetIconPath( );
77 * @brief This method returns the iconPath of the button.
78 * @return std::string The path of the icon.
82 // ----------------------------------------------------------------------------------
83 /*! @fn std::string Button::GetDescription( );
84 * @brief This method returns a the description of the button.
85 * @return std::string The tooltip of the button.
89 // ----------------------------------------------------------------------------------
90 /*! @fn void Button::Execute( );
91 * @brief This method executes the Functor (Call_Back Function).
92 * This is the event of the button that it was defined to be called remotely using
93 * call_back functions. In this project it was implemented using Functors.
94 * @exception std::bad_alloc
99 // ----------------------------------------------------------------------------------
101 ButtonPair* m_ButtonPair; //! <ButtonPair* ButtonPair pointer.