]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
e180dc12d5fa4fb0dd2bd4c6aeae75b62e7123ac
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / containerSettings.h
1 /*!
2  * @file containerSettings.h
3  * @brief Contains the ContainerSettings class
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-05-24
6  */
7
8 #ifndef BUTTONGROUPSETTINGS_H_
9 #define BUTTONGROUPSETTINGS_H_
10
11 #include <list>
12 #include <map>
13 #include <vector>
14 #include <iostream>
15 #include <exception>
16 #include "structBCSettings.h"
17 #include "system.h"
18 #include "functor.h"
19
20 /*!     @namespace <creaButtonContainer>
21  *      @brief Contains the creaButtonContainer library included in creaMaracasVisu.
22  */
23 namespace creaButtonContainer
24 {
25         /*! @namespace <creaButtonContainer::model>
26          *      @brief Contains the implementation of the model in creaButtonContainer library.
27          *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
28          */
29         namespace model
30         {
31                 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
32                  *      @brief This class contains the settings of the button container.
33                  */
34                 class ContainerSettings
35                 {
36                         public:
37                                 //typedef definition
38                                 // ----------------------------------------------------------------------------------
39                                 /*!     @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
40                                  *      @brief Defines the BCSettingsStruct type.
41                                  */
42                                 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
43                                 // ----------------------------------------------------------------------------------
44                                 /*!     @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
45                                  *      @brief Defines the BCStructVectorType type.
46                                  */
47                                 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
48                                 // ----------------------------------------------------------------------------------
49                                 //end of typedef definition
50                         public:
51                                 // ----------------------------------------------------------------------------------
52                                 /*! @fn ContainerSettings::ContainerSettings( )
53                                  *      @brief This is the constructor.
54                                  */
55                                 ContainerSettings( );
56                                 // ----------------------------------------------------------------------------------
57                                 /*! @fn virtual ContainerSettings::~ContainerSettings( )
58                                  *      @brief This is the destructor.
59                                  */
60                                 virtual
61                                 ~ContainerSettings( );
62                                 // ----------------------------------------------------------------------------------
63                                 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
64                                  *      @brief This method returns a container of buttons ordered by group.
65                                  *      @return ButtonGroupMap A container with buttons
66                                  */
67                                 ButtonGroupMap
68                                 GetButtonGroupContainer( );
69                                 // ----------------------------------------------------------------------------------
70                                 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
71                                  *      @brief This method returns a container with the name of the groups.
72                                  *      @return KeyMapList A list with the name of the button groups.
73                                  */
74                                 KeyMapList
75                                 GetGroupNameList( );
76                                 // ----------------------------------------------------------------------------------
77                                 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
78                                  *      @brief This method allows to create the ButtonGroupContainer.
79                                  *      @param bgContainer The ButtonGroupMap with all buttons.
80                                  */
81                                 void
82                                 SetButtonGroupContainer( ButtonGroupMap bgContainer );
83                                 // ----------------------------------------------------------------------------------
84                                 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
85                                  * @brief This method sets a container with the name of the groups.
86                                  * @param gNameList the KeyMapList with all groupNames.
87                                  */
88                                 void
89                                 SetGroupNameList( KeyMapList gNameList );
90                                 // ----------------------------------------------------------------------------------
91                                 /*!
92                                  * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
93                                  const std::string iconpath, const std::string buttonDescription,
94                                  FunctionEventType event )
95                                  * @brief This method adds a new button to the container.
96                                  * @param groupName The name of the group of buttons.
97                                  * @param buttonName The ID of the button.
98                                  * @param iconpath The path of the button icon.
99                                  * @param buttonDescription The description of the button.
100                                  * @param event The event associated to the button.
101                                  * @see class Functor, ConcreteFunctor for add an event for a button.
102                                  * @exception std::bad_alloc
103                                  */
104                                 void
105                                 AddButton( const std::string & groupName, const std::string buttonName,
106                                     const std::string iconpath, const std::string buttonDescription,
107                                     FunctionEventType event );
108                                 // ----------------------------------------------------------------------------------
109                                 /*! @fn void AddButton( BCSettingsStruct* info );
110                                  *      @brief This method adds a new button to the container.
111                                  *      @exception std::bad_alloc
112                                  *      @param info
113                                  */
114                                 void
115                                 AddButton( BCSettingsStruct* info );
116                                 // ----------------------------------------------------------------------------------
117                                 /*! @fn void AddButtons( BCStructVectorType infoList );
118                                  *      @brief This method adds new buttons to the container.
119                                  *      @exception std::bad_alloc
120                                  *      @param infoList
121                                  */
122                                 void
123                                 AddButtons( BCStructVectorType infoList );
124                                 // ----------------------------------------------------------------------------------
125                         private:
126                                 ButtonGroupMap m_ButtonGroupContainer; //! <std::map< std::string, ButtonList > View pointer.
127                                 KeyMapList m_GroupNameList; //! <ButtonContainerPanel View pointer.
128                 };
129         }
130 }
131
132 #endif /* BUTTONGROUPSETTINGS_H_ */