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>
17 /*! @namespace <creaButtonContainer>
18 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
20 namespace creaButtonContainer
22 /*! @namespace <creaButtonContainer::view>
23 * @brief Contains the implementation of the view in creaButtonContainer library.
24 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
28 /*! @class Button button.h "button.h"
29 * @brief This class contains the Button in the view perspective.
30 * @details This class contains the information of a button, it derives from wxBitmapButton.
31 * @see <a href="http://docs.wxwidgets.org/stable/wx_wxbitmapbutton.html">wxBitmapButton</a>
33 class Button : public wxBitmapButton
37 // ----------------------------------------------------------------------------------
38 /*! @typedef creaButtonContainer::model::TFunctor TFunctor;
39 * @brief Defines the TFunctor type.
41 typedef creaButtonContainer::model::TFunctor TFunctor;
42 // ----------------------------------------------------------------------------------
43 //end of typedef definition
45 // ----------------------------------------------------------------------------------
46 /*! @fn Button::Button( wxWindow* parent, long id, ButtonPair* pair );
47 * @brief This is the constructor.
48 * @param parent The wxWindow* parent.
49 * @param id The wxID of the button.
50 * @param pair The button information.
52 Button( wxWindow* parent, long id, ButtonPair* pair );
53 // ----------------------------------------------------------------------------------
54 /*! @fn virtual Button::~Button( );
55 * @brief This is the destructor.
59 // ----------------------------------------------------------------------------------
60 /*! @fn long Button::GetID( );
61 * @brief This method gets the wxID of the button.
62 * @return long wxID of the button.
66 // ----------------------------------------------------------------------------------
67 /*! @fn std::string Button::GetButtonName( );
68 * @brief This method returns the name of the button.
69 * @return std::string The name of the button.
73 // ----------------------------------------------------------------------------------
74 /*! @fn std::string Button::GetIconPath( );
75 * @brief This method returns the iconPath of the button.
76 * @return std::string The path of the icon.
80 // ----------------------------------------------------------------------------------
81 /*! @fn std::string Button::GetDescription( );
82 * @brief This method returns a the description of the button.
83 * @return std::string The tooltip of the button.
87 // ----------------------------------------------------------------------------------
88 /*! @fn void Button::Execute( );
89 * @brief This method executes the Functor (Call_Back Function).
90 * This is the event of the button that it was defined to be called remotely using
91 * call_back functions. In this project it was implemented using Functors.
92 * @exception std::bad_alloc
97 // ----------------------------------------------------------------------------------
99 ButtonPair* m_ButtonPair; //! <The pair with the button information.