]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h
creaButtonContainer & creaPanelButtonContainer: Deep errors have been solved!! ready...
[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 <exception>
17 #include "button.h"
18 #include "buttonGroup.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 ButtonManager buttonManager.h "buttonManager.h"
32                  *      @brief This class contains the ButtonManager view.
33                  *  @details This class describes a wxFlexGridSizer with the button manager.
34                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxflexGridSizer.html">wxFlexGridSizer</a>
35                  */
36                 class ButtonManager : public wxFlexGridSizer
37                 {
38                         public:
39                                 //typedef definition.
40                                 /*!     @typedef creaButtonContainer::view::Button Button;
41                                  *      @brief Defines the Button type.
42                                  */
43                                 typedef creaButtonContainer::view::Button Button;
44                                 // ----------------------------------------------------------------------------------
45                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
46                                  *      @brief Defines the ButtonGroup type.
47                                  */
48                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
49                                 // ----------------------------------------------------------------------------------
50                                 /*!     @typedef std::map< long, Button* > ButtonContainer;
51                                  *      @brief Defines the ButtonContainer type.
52                                  */
53                                 typedef std::map< long, Button* > ButtonContainer;
54                                 // ----------------------------------------------------------------------------------
55                                 //end of typedef definition.
56                         public:
57                                 // ----------------------------------------------------------------------------------
58                                 /*! @fn ButtonManager( );
59                                  * @brief This is the default constructor.
60                                  * @exception std::bad_alloc
61                                  */
62                                 ButtonManager( );
63                                 // ----------------------------------------------------------------------------------
64                                 /*! @fn ButtonManager( ButtonGroup* buttonGroup );
65                                  * @brief This is the parameterized constructor
66                                  * @param buttonGroup The group of buttons.
67                                  */
68                                 ButtonManager( ButtonGroup* buttonGroup );
69                                 // ----------------------------------------------------------------------------------
70                                 /*! @fn ~ButtonManager( );
71                                  * @brief This is the destructor.
72                                  */
73                                 virtual
74                                 ~ButtonManager( );
75                                 // ----------------------------------------------------------------------------------
76                                 /*! @fn SetGroupName( wxStaticText* groupName );
77                                  * @details Sets the groupName.
78                                  * @param groupName
79                                  */
80                                 void
81                                 SetGroupName( wxStaticText* groupName );
82                                 // ----------------------------------------------------------------------------------
83                                 /*! @fn ShowButtonManager( );
84                                  * @brief This method shows the ButtonManager
85                                  */
86                                 void
87                                 ShowButtonManager( );
88                                 // ----------------------------------------------------------------------------------
89                                 /*! @fn HideButtonManager( );
90                                  * @brief This method hides the ButtonManager.
91                                  * @exception std::bad_alloc
92                                  */
93                                 void
94                                 HideButtonManager( );
95                                 // ----------------------------------------------------------------------------------
96                         private:
97                                 // ----------------------------------------------------------------------------------
98                                 /*! @fn SetButtonManager( ButtonContainer buttonContainer );
99                                  * @brief This method set the buttons and it is private.
100                                  * @param buttonContainer
101                                  */
102                                 void
103                                 SetButtonManager( ButtonContainer buttonContainer );
104                                 // ----------------------------------------------------------------------------------
105                         private:
106                                 wxStaticText* m_GroupName; //!<The name of the group.
107                                 wxGridSizer* m_GridSizer; //!<The sizer that contains the buttons.
108                 };
109         }//ecapseman
110 }//ecapseman
111
112 #endif // CARTOBUTTONCONTAINER_H