]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h
creaButtonContainer: new structure to make easy the button settings
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaPanelButtonContainer / creaPanelButtonContainer.h
1 /*!
2  * @file PanelButtonContainer
3  * @brief This contains the ButtonContainerSettings class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-24
6  */
7
8 #ifndef PANELBUTTONCONTAINER_H_
9 #define PANELBUTTONCONTAINER_H_
10
11 #include <wx/panel.h>
12 #include <wx/aui/aui.h>
13 #include <string>
14
15 #include "containerSettings.h"
16 #include "buttonContainerPanel.h"
17 #include "buttonContainerSettings.h"
18 #include "functor.h"
19
20 /*!     @namespace <creaPanelButtonContainer>
21  *      @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
22  */
23 namespace creaPanelButtonContainer
24 {
25         /*! @class PanelButtonContainer panelButtonContainer.h "panelButtonContainer.h"
26          *      @brief This class contains the PanelButtonContainer. It derives from wxPanel.
27          *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxpanel.html">wxPanel</a>
28          */
29         class PanelButtonContainer : public wxPanel
30         {
31                 public:
32                         //typedef definition.
33                         /*!     typedef creaButtonContainer::model::TFunctor TFunctor;
34                          *      @brief Defines the TFunctor type.
35                          */
36                         typedef creaPanelButtonContainer::ButtonContainerSettings
37                             ButtonContainerSettings;
38                         /*!     typedef creaButtonContainer::model::TFunctor TFunctor;
39                          *      @brief Defines the TFunctor type.
40                          */
41                         typedef creaButtonContainer::view::ButtonContainerPanel
42                             ButtonContainerPanel;
43                         // ----------------------------------------------------------------------------------
44                         //end of typedef definition.
45                 public:
46                         // ----------------------------------------------------------------------------------
47                         /*! @fn PanelButtonContainer( wxWindow* parent, ButtonContainerSettings* bcSettings );
48                          *      @brief This is the parameterized constructor.
49                          *      @param parent
50                          *      @param bcSettings
51                          */
52                         PanelButtonContainer( wxWindow* parent,
53                             ButtonContainerSettings* bcSettings );
54                         // ----------------------------------------------------------------------------------
55                         /*! @fn virtual PanelButtonContainer( );
56                          *      @brief This is the destructor.
57                          */
58                         virtual
59                         ~PanelButtonContainer( );
60                         // ----------------------------------------------------------------------------------
61                         /*! @fn void UpdatePanel( const std::string &buttonName );
62                          *  @brief This method Updates the m_ButtonPanel for a panel
63                          *  of the clicked button in creaButtonContainer.
64                          *      @param buttonName
65                          */
66                         void
67                         UpdatePanel( const std::string &buttonName );
68                         // ----------------------------------------------------------------------------------
69                         /*! @fn void GenericButtonEvent( const std::string &buttonName );
70                          *      @brief This method is the function that calls the panels contained in the buttons
71                          *      (in creaButtonContainer is the function contained in the functors to be called back.
72                          *      @param buttonName
73                          */
74                         void
75                         GenericButtonEvent( const std::string &buttonName );
76                         // ----------------------------------------------------------------------------------
77                 private:
78                         //Settings
79                         ButtonContainerSettings* m_ButtonContainerSettings; //!<This is the buttonContainer settings.
80                         //Panel
81                         ButtonContainerPanel* m_ButtonContainerPanel; //!<This is the panel with de buttons (creaButtonContainer)
82                         wxAuiManager* m_AuiManager; //!<The AUI Manager for the panels.
83                         wxPanel* m_ButtonPanel; //!<This is the panel used to contain the panels of the buttons. (it changes with the buttonAction)
84         };
85 }//ecapseman
86
87 #endif // PANELBUTTONCONTAINER_H_