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