]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h
b3285692378b1fe7be551e9ca19027954bb308d0
[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-05-24
6  */
7
8 #ifndef BUTTONGROUP_H
9 #define BUTTONGROUP_H
10
11 //Library Definition
12 #include <map>
13 #include <list>
14 #include <wx/stattext.h>
15 #include <exception>
16
17 #include "button.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 ButtonGroup buttonGroup.h "buttonGroup.h"
31                  *      @brief This class contains the group of buttons.
32                  */
33                 class ButtonGroup
34                 {
35                         public:
36                                 //Typedef definition
37                                 /*!     @typedef creaButtonContainer::view::Button Button;
38                                  *      @brief Defines the Button type.
39                                  */
40                                 typedef creaButtonContainer::view::Button Button;
41                                 // ----------------------------------------------------------------------------------
42                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
43                                  *      @brief Defines the ButtonContainer type.
44                                  */
45                                 typedef std::map< long, Button* > ButtonContainer;
46                                 // ----------------------------------------------------------------------------------
47                                 /*!     typedef std::list< long > IdButtonContainer;
48                                  *      @brief Defines the IdButtonContainer type.
49                                  */
50                                 typedef std::list< long > IdButtonContainer;
51                         public:
52                                 // ----------------------------------------------------------------------------------
53                                 /*! @fn ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
54                                  *      @brief This is the parameterized constructor.
55                                  * @param groupName wxStatigText* with the name of the group.
56                                  * @param buttons A container with buttons.
57                                  */
58                                 ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
59                                 // ----------------------------------------------------------------------------------
60                                 /*! @fn ~ButtonGroup( );
61                                  * @brief This is the destructor.
62                                  */
63                                 virtual
64                                 ~ButtonGroup( );
65                                 // ----------------------------------------------------------------------------------
66                                 /*! @fn GetButton( long id );
67                                  * @brief This method returns a Button*
68                                  * @param id The ID of the button.
69                                  * @return Button*
70                                  */
71                                 Button*
72                                 GetButton( long id );
73                                 // ----------------------------------------------------------------------------------
74                                 /*! @fn GetButtonContainer( );
75                                  * @brief This method returns the button container.
76                                  * @exception std::bad_alloc
77                                  * @return ButtonContainer.
78                                  */
79                                 ButtonContainer
80                                 GetButtonContainer( );
81                                 // ----------------------------------------------------------------------------------
82                                 /*! @fn GetButtonIdContainer( );
83                                  * @brief This method returns a list of button IDs.
84                                  * @exception std::bad_alloc
85                                  * @return
86                                  */
87                                 IdButtonContainer
88                                 GetButtonIdContainer( );
89                                 // ----------------------------------------------------------------------------------
90                                 /*! @fn GetGroupName( );
91                                  * @brief This method returns the name of the group.
92                                  * @return
93                                  */
94                                 wxStaticText*
95                                 GetGroupName( );
96                                 // ----------------------------------------------------------------------------------
97                         private:
98                                 wxStaticText* m_GroupName; //!<A pointer with the name of the group.
99                                 ButtonContainer m_Buttons; //!<A container with buttons.
100                 };
101         }//ecapseman
102 }//ecapseman
103
104 #endif // BUTTONGROUP_H