]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.h
c187c2e0fb91bcee8b8bc27fdc2c69a9c3e65682
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / groupManager.h
1 /*!
2  * @file groupManager.h
3  * @brief This contains the GroupManager class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #ifndef GROUPMANAGER_H
9 #define GROUPMANAGER_H
10
11 #include <wx/sizer.h>
12 #include <wx/button.h>
13 #include <wx/stattext.h>
14
15 #include <list>
16 #include <iostream>
17 #include <exception>
18
19 #include "buttonManager.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 GroupManager groupManager.h "groupManager.h"
34                  *      @brief This class contains the GroupManager.
35                  *  @details This class describes a wxFlexGridSizer with the group manager.
36                  *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxflexGridSizer.html">wxFlexGridSizer</a>
37                  */
38                 class GroupManager : public wxFlexGridSizer
39                 {
40                         public:
41                                 //typedef definition
42                                 // ----------------------------------------------------------------------------------
43                                 /*!     @typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
44                                  *      @brief Defines the ButtonGroup type.
45                                  */
46                                 typedef creaButtonContainer::view::ButtonGroup ButtonGroup;
47                                 // ----------------------------------------------------------------------------------
48                                 /*!     @typedef wxButton ExpansionButton;
49                                  *      @brief Defines the ExpansionButton type.
50                                  */
51                                 typedef wxButton ExpansionButton;
52                                 // ----------------------------------------------------------------------------------
53                                 //end of typedef definition.
54                         public:
55                                 // ----------------------------------------------------------------------------------
56                                 /*! @fn GroupManager( wxWindow* parent, ButtonGroup* buttonGroup );
57                                  *      @brief This is the parameterized constructor.
58                                  *      @param parent The wxWindow* parent
59                                  *      @param buttonGroup The pointer to the ButtonGroup.
60                                  */
61                                 GroupManager( wxWindow* parent, ButtonGroup* buttonGroup );
62                                 // ----------------------------------------------------------------------------------
63                                 /*! @fn ~GroupManager( );
64                                  *  @brief This is the destructor.
65                                  */
66                                 virtual
67                                 ~GroupManager( );
68                                 // ----------------------------------------------------------------------------------
69                                 /*! @fn GetButtonID( );
70                                  *  @brief This method returns the Button ID.
71                                  *  @return
72                                  */
73                                 long
74                                 GetButtonID( );
75                                 // ----------------------------------------------------------------------------------
76                                 /*! @fn GetButton( );
77                                  *      @brief This method returns the expansion button.
78                                  * @return
79                                  */
80                                 ExpansionButton*
81                                 GetButton( );
82                                 // ----------------------------------------------------------------------------------
83                                 /*! @fn GetButtonManager( );
84                                  *      @brief This method returns the manager of the buttons.
85                                  *      @return
86                                  */
87                                 ButtonManager*
88                                 GetButtonManager( );
89                                 // ----------------------------------------------------------------------------------
90                                 /*! @fn SetButtonID( long id );
91                                  *      @brief This method sets the ID of the expansion button.
92                                  * @param id
93                                  */
94                                 void
95                                 SetButtonID( long id );
96                                 // ----------------------------------------------------------------------------------
97                                 /*! @fn SetButton( ExpansionButton* button );
98                                  *      @brief This method sets the expansion button.
99                                  * @param button
100                                  */
101                                 void
102                                 SetButton( ExpansionButton* button );
103                                 // ----------------------------------------------------------------------------------
104                                 /*! @fn SetButtonManager( ButtonManager* manager );
105                                  *      @brief This method Sets the ButtonManager
106                                  * @param manager A pointer with the manager.
107                                  */
108                                 void
109                                 SetButtonManager( ButtonManager* manager );
110                                 // ----------------------------------------------------------------------------------
111                                 /*! @fn HideSubPanel( bool hide );
112                                  *      @brief This method hides the subPanel (Hides the buttons).
113                                  * @param hide True if you need to hide the buttons.
114                                  */
115                                 void
116                                 HideSubPanel( bool hide );
117
118                         private:
119                                 long m_IDExpButton; //!<ID of "+""-" expansion button.
120                                 ExpansionButton* m_ExpansionButton; //!<The expansion button.
121                                 ButtonManager* m_ButtonManager; //!<The button manager.
122                 };
123         }//ecapseman
124 }//ecapseman
125
126 #endif // GROUPMANAGER_H