]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.h
creaButtonContainer: Documentation updates :) :). If you turns on the documentation...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / button.h
1 /*!
2  * @file button.h
3  * @brief This contains the Button class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-19
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 #include <string>
15 #include <iostream>
16 #include "functor.h"
17 #include "system.h"
18
19 /*!     @namespace <creaButtonContainer>
20  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
21  */
22 namespace creaButtonContainer
23 {
24         /*! @namespace <creaButtonContainer::view>
25          *      @brief Contains the implementation of the view in creaButtonContainer library.
26          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
27          */
28         namespace view
29         {
30                 /*! @class Button : public wxBitmapButton button.h "button.h"
31                  *      @brief This class contains the Button in the view perspective.
32                  *  @details This class contains the information of a button, it derives from wxBitmapButton
33                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxbitmapbutton.html">wxBitmapButton</a>
34                  */
35                 class Button : public wxBitmapButton
36                 {
37                         public:
38                                 //typedef definition
39                                 /*!     @typedef creaButtonContainer::model::TFunctor TFunctor;
40                                  *      @brief Defines the TFunctor type.
41                                  */
42                                 typedef creaButtonContainer::model::TFunctor TFunctor;
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 function 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 function returns the name of the button.
69                                  *      @return std::string The name of the button.
70                                  */
71                                 std::string
72                                 GetButtonName( );
73                                 // ----------------------------------------------------------------------------------
74                                 /*! @fn std::string Button::GetIconPath( );
75                                  *      @brief This function returns the iconPath of the button.
76                                  *      @return std::string The path of the icon.
77                                  */
78                                 std::string
79                                 GetIconPath( );
80                                 // ----------------------------------------------------------------------------------
81                                 /*! @fn std::string Button::GetDescription( );
82                                  *      @brief This function returns a the description of the button.
83                                  *      @return std::string The tooltip of the button.
84                                  */
85                                 std::string
86                                 GetDescription( );
87                                 // ----------------------------------------------------------------------------------
88                                 /*! @fn void Button::Execute( );
89                                  *      @brief This function 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                                  *      @see TFunctor
93                                  */
94                                 void
95                                 Execute( );
96                                 // ----------------------------------------------------------------------------------
97                         private:
98                                 ButtonPair* m_ButtonPair; //! <ButtonPair* ButtonPair pointer.
99                 };
100         }//ecapseman
101 }//ecapseman
102
103 #endif // BUTTON_H