]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.h
creaButtonContainer & creaPanelButtonContainer: Updates in doxygen documentation...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / button.h
1 /*!
2  * @file button.h
3  * @brief Contains the Button class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #ifndef BUTTON_H
9 #define BUTTON_H
10
11 #include <wx/bmpbuttn.h>
12 #include <wx/image.h>
13 #include <wx/string.h>
14
15 #include "system.h"
16
17 /*!     @namespace <creaButtonContainer>
18  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
19  */
20 namespace creaButtonContainer
21 {
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>
25          */
26         namespace view
27         {
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>
32                  */
33                 class Button : public wxBitmapButton
34                 {
35                         public:
36                                 //typedef definition
37                                 // ----------------------------------------------------------------------------------
38                                 /*!     @typedef creaButtonContainer::model::TFunctor TFunctor;
39                                  *      @brief Defines the TFunctor type.
40                                  */
41                                 typedef creaButtonContainer::model::TFunctor TFunctor;
42                                 // ----------------------------------------------------------------------------------
43                                 //end of typedef definition
44                         public:
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.
51                                  */
52                                 Button( wxWindow* parent, long id, ButtonPair* pair );
53                                 // ----------------------------------------------------------------------------------
54                                 /*! @fn virtual Button::~Button( );
55                                  *      @brief This is the destructor.
56                                  */
57                                 virtual
58                                 ~Button( );
59                                 // ----------------------------------------------------------------------------------
60                                 /*! @fn long Button::GetID( );
61                                  *      @brief This method gets the wxID of the button.
62                                  *      @return long wxID of the button.
63                                  */
64                                 long
65                                 GetID( );
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.
70                                  */
71                                 StringType
72                                 GetButtonName( );
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.
77                                  */
78                                 StringType
79                                 GetIconPath( );
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.
84                                  */
85                                 StringType
86                                 GetDescription( );
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
93                                  *      @see TFunctor
94                                  */
95                                 void
96                                 Execute( );
97                                 // ----------------------------------------------------------------------------------
98                         private:
99                                 ButtonPair* m_ButtonPair; //! <The pair with the button information.
100                 };
101         }//ecapseman
102 }//ecapseman
103
104 #endif // BUTTON_H