]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonGroup.h
creaButtonContainer: new structure to make easy the button settings
[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
16 #include "button.h"
17
18 /*!     @namespace <creaButtonContainer>
19  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
20  */
21 namespace creaButtonContainer
22 {
23         /*! @namespace <creaButtonContainer::view>
24          *      @brief Contains the implementation of the view in creaButtonContainer library.
25          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
26          */
27         namespace view
28         {
29                 /*! @class ButtonGroup buttonGroup.h "buttonGroup.h"
30                  *      @brief This class contains the group of buttons.
31                  */
32                 class ButtonGroup
33                 {
34                         public:
35                                 //Typedef definition
36                                 /*!     @typedef creaButtonContainer::view::Button Button;
37                                  *      @brief Defines the Button type.
38                                  */
39                                 typedef creaButtonContainer::view::Button Button;
40                                 // ----------------------------------------------------------------------------------
41                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
42                                  *      @brief Defines the ButtonContainer type.
43                                  */
44                                 typedef std::map< long, Button* > ButtonContainer;
45                                 // ----------------------------------------------------------------------------------
46                                 /*!     typedef std::list< long > IdButtonContainer;
47                                  *      @brief Defines the IdButtonContainer type.
48                                  */
49                                 typedef std::list< long > IdButtonContainer;
50                         public:
51                                 // ----------------------------------------------------------------------------------
52                                 /*! @fn ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
53                                  *      @brief This is the parameterized constructor.
54                                  * @param groupName wxStatigText* with the name of the group.
55                                  * @param buttons A container with buttons.
56                                  */
57                                 ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
58                                 // ----------------------------------------------------------------------------------
59                                 /*! @fn ~ButtonGroup( );
60                                  * @brief This is the destructor.
61                                  */
62                                 virtual
63                                 ~ButtonGroup( );
64                                 // ----------------------------------------------------------------------------------
65                                 /*! @fn GetButton( long id );
66                                  * @brief This method returns a Button*
67                                  * @param id The ID of the button.
68                                  * @return Button*
69                                  */
70                                 Button*
71                                 GetButton( long id );
72                                 // ----------------------------------------------------------------------------------
73                                 /*! @fn GetButtonContainer( );
74                                  * @brief This method returns the button container.
75                                  * @exception std::bad_alloc
76                                  * @return ButtonContainer.
77                                  */
78                                 ButtonContainer
79                                 GetButtonContainer( );
80                                 // ----------------------------------------------------------------------------------
81                                 /*! @fn GetButtonIdContainer( );
82                                  * @brief This method returns a list of button IDs.
83                                  * @exception std::bad_alloc
84                                  * @return
85                                  */
86                                 IdButtonContainer
87                                 GetButtonIdContainer( );
88                                 // ----------------------------------------------------------------------------------
89                                 /*! @fn GetGroupName( );
90                                  * @brief This method returns the name of the group.
91                                  * @return
92                                  */
93                                 wxStaticText*
94                                 GetGroupName( );
95                                 // ----------------------------------------------------------------------------------
96                         private:
97                                 wxStaticText* m_GroupName; //!<A pointer with the name of the group.
98                                 ButtonContainer m_Buttons; //!<A container with buttons.
99                 };
100         }//ecapseman
101 }//ecapseman
102
103 #endif // BUTTONGROUP_H