]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h
creaButtonContainer: new structure to make easy the button settings
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / buttonManager.h
1 /*!
2  * @file buttonManager.h
3  * @brief This contains the ButtonManager class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-24
6  */
7
8 #ifndef CARTOBUTTONCONTAINER_H
9 #define CARTOBUTTONCONTAINER_H
10
11 #include <wx/sizer.h>
12 #include <wx/bmpbuttn.h>
13 #include <wx/stattext.h>
14 #include <wx/string.h>
15 #include <map>
16 #include "button.h"
17 #include "buttonGroup.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 ButtonManager buttonManager.h "buttonManager.h"
31                  *      @brief This class contains the ButtonManager view.
32                  *  @details This class describes a wxFlexGridSizer with the button manager.
33                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxflexGridSizer.html">wxFlexGridSizer</a>
34                  */
35                 class ButtonManager : public wxFlexGridSizer
36                 {
37                         public:
38                                 //typedef definition.
39                                 /*!     @typedef creaButtonContainer::view::Button Button;
40                                  *      @brief Defines the Button type.
41                                  */
42                                 typedef creaButtonContainer::view::Button Button;
43                                 // ----------------------------------------------------------------------------------
44                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
45                                  *      @brief Defines the ButtonGroup type.
46                                  */
47                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
48                                 // ----------------------------------------------------------------------------------
49                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
50                                  *      @brief Defines the ButtonContainer type.
51                                  */
52                                 typedef std::map< long, Button* > ButtonContainer;
53                                 // ----------------------------------------------------------------------------------
54                                 //end of typedef definition.
55                         public:
56                                 // ----------------------------------------------------------------------------------
57                                 /*! @fn ButtonManager( );
58                                  * @brief This is the default constructor.
59                                  * @exception std::bad_alloc
60                                  */
61                                 ButtonManager( );
62                                 // ----------------------------------------------------------------------------------
63                                 /*! @fn ButtonManager( ButtonGroup* buttonGroup );
64                                  * @brief This is the parameterized constructor
65                                  * @param buttonGroup The group of buttons.
66                                  */
67                                 ButtonManager( ButtonGroup* buttonGroup );
68                                 // ----------------------------------------------------------------------------------
69                                 /*! @fn ~ButtonManager( );
70                                  * @brief This is the destructor.
71                                  */
72                                 virtual
73                                 ~ButtonManager( );
74                                 // ----------------------------------------------------------------------------------
75                                 /*! @fn SetGroupName( wxStaticText* groupName );
76                                  * @details Sets the groupName.
77                                  * @param groupName
78                                  */
79                                 void
80                                 SetGroupName( wxStaticText* groupName );
81                                 // ----------------------------------------------------------------------------------
82                                 /*! @fn ShowButtonManager( );
83                                  * @brief This method shows the ButtonManager
84                                  */
85                                 void
86                                 ShowButtonManager( );
87                                 // ----------------------------------------------------------------------------------
88                                 /*! @fn HideButtonManager( );
89                                  * @brief This method hides the ButtonManager.
90                                  * @exception std::bad_alloc
91                                  */
92                                 void
93                                 HideButtonManager( );
94                                 // ----------------------------------------------------------------------------------
95                         private:
96                                 // ----------------------------------------------------------------------------------
97                                 /*! @fn SetButtonManager( ButtonContainer buttonContainer );
98                                  * @brief This method set the buttons and it is private.
99                                  * @param buttonContainer
100                                  */
101                                 void
102                                 SetButtonManager( ButtonContainer buttonContainer );
103                                 // ----------------------------------------------------------------------------------
104                         private:
105                                 wxStaticText* m_GroupName; //!<The name of the group.
106                                 wxGridSizer* m_GridSizer; //!<The sizer that contains the buttons.
107                 };
108         }//ecapseman
109 }//ecapseman
110
111 #endif // CARTOBUTTONCONTAINER_H