]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h
creaButtonContainer & creaPanelButtonContainer: Updates in doxygen documentation...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / buttonGroup.h
1 /*!
2  * @file buttonGroup.h
3  * @brief This contains the ButtonGroup class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #ifndef BUTTONGROUP_H
9 #define BUTTONGROUP_H
10
11 //Library Definition
12 #include <wx/stattext.h>
13
14 #include <map>
15 #include <list>
16 #include <exception>
17
18 #include "button.h"
19
20 /*!     @namespace <creaButtonContainer>
21  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
22  */
23 namespace creaButtonContainer
24 {
25         /*! @namespace <creaButtonContainer::view>
26          *      @brief Contains the implementation of the view in creaButtonContainer library.
27          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
28          */
29         namespace view
30         {
31                 /*! @class ButtonGroup buttonGroup.h "buttonGroup.h"
32                  *      @brief This class contains the group of buttons.
33                  */
34                 class ButtonGroup
35                 {
36                         public:
37                                 //Typedef definition
38                                 // ----------------------------------------------------------------------------------
39                                 /*!     @typedef creaButtonContainer::view::Button Button;
40                                  *      @brief Defines the Button type.
41                                  */
42                                 typedef creaButtonContainer::view::Button Button;
43                                 // ----------------------------------------------------------------------------------
44                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
45                                  *      @brief Defines the ButtonContainer type.
46                                  */
47                                 typedef std::map< long, Button* > ButtonContainer;
48                                 // ----------------------------------------------------------------------------------
49                                 /*!     typedef std::list< long > IdButtonContainer;
50                                  *      @brief Defines the IdButtonContainer type.
51                                  */
52                                 typedef std::list< long > IdButtonContainer;
53                         public:
54                                 // ----------------------------------------------------------------------------------
55                                 /*! @fn ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
56                                  *      @brief This is the parameterized constructor.
57                                  * @param groupName wxStatigText* with the name of the group.
58                                  * @param buttons A container with buttons.
59                                  */
60                                 ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
61                                 // ----------------------------------------------------------------------------------
62                                 /*! @fn ~ButtonGroup( );
63                                  * @brief This is the destructor.
64                                  */
65                                 virtual
66                                 ~ButtonGroup( );
67                                 // ----------------------------------------------------------------------------------
68                                 /*! @fn GetButton( long id );
69                                  * @brief This method returns a Button*
70                                  * @param id The ID of the button.
71                                  * @return Button*
72                                  */
73                                 Button*
74                                 GetButton( long id );
75                                 // ----------------------------------------------------------------------------------
76                                 /*! @fn GetButtonContainer( );
77                                  * @brief This method returns the button container.
78                                  * @exception std::bad_alloc
79                                  * @return ButtonContainer.
80                                  */
81                                 ButtonContainer
82                                 GetButtonContainer( );
83                                 // ----------------------------------------------------------------------------------
84                                 /*! @fn GetButtonIdContainer( );
85                                  * @brief This method returns a list of button IDs.
86                                  * @exception std::bad_alloc
87                                  * @return
88                                  */
89                                 IdButtonContainer
90                                 GetButtonIdContainer( );
91                                 // ----------------------------------------------------------------------------------
92                                 /*! @fn GetGroupName( );
93                                  * @brief This method returns the name of the group.
94                                  * @return
95                                  */
96                                 wxStaticText*
97                                 GetGroupName( );
98                                 // ----------------------------------------------------------------------------------
99                         private:
100                                 wxStaticText* m_GroupName; //!<A pointer with the wxStaticText of name of the group.
101                                 ButtonContainer m_Buttons; //!<A container with buttons.
102                 };
103         }//ecapseman
104 }//ecapseman
105
106 #endif // BUTTONGROUP_H