]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
creaButtonContainer: Updates in documentation, adding try catch clauses and cleaning...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / model / containerSettings.h
1 /************************************************************************************//*!
2  * Name:      @file containerSettings.h
3  * Purpose:   @brief This contains the ContainerSettings class
4  * Author:    @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * Modified:  2011-05-18
6  * Copyright:
7  * License:
8  ***************************************************************************************/
9
10 #ifndef BUTTONGROUPSETTINGS_H_
11 #define BUTTONGROUPSETTINGS_H_
12
13 //! @include <list>
14 #include <list>
15 //! @include <map>
16 #include <map>
17 //! @include <iostream>
18 #include <iostream>
19 //! @include "system.h"
20 #include "system.h"
21 //! @include "functor"
22 #include "functor.h"
23
24 //!     @namespace <creaButtonContainer>
25 namespace creaButtonContainer
26 {
27         //!     @namespace <model>
28         namespace model
29         {
30                 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
31                  *      @brief This class contains the settings of the button container.
32                  *  This class describes how to add new buttons to the container.
33                  */
34                 class ContainerSettings
35                 {
36                         public:
37                                 // ----------------------------------------------------------------------------------
38                                 /*! @fn void ContainerSettings::ContainerSettings( )
39                                  *      @brief This is the constructor.
40                                  */
41                                 ContainerSettings( );
42                                 // ----------------------------------------------------------------------------------
43                                 /*! @fn ContainerSettings::~ContainerSettings( )
44                                  *      @brief This is the destructor.
45                                  */
46                                 virtual
47                                 ~ContainerSettings( );
48                                 // ----------------------------------------------------------------------------------
49                                 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
50                                  *      @brief This function returns a container of buttons ordered by group.
51                                  *      @return ButtonGroupMap A container with buttons
52                                  */
53                                 ButtonGroupMap
54                                 GetButtonGroupContainer( );
55                                 // ----------------------------------------------------------------------------------
56                                 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
57                                  *      @brief This function returns a container with the name of the groups.
58                                  *      @return KeyMapList A list with the name of the button groups.
59                                  */
60                                 KeyMapList
61                                 GetGroupNameList( );
62                                 // ----------------------------------------------------------------------------------
63                                 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
64                                  *      @brief This function allows to create the ButtonGroupContainer.
65                                  *      @param bgContainer The ButtonGroupMap with all buttons.
66                                  */
67                                 void
68                                 SetButtonGroupContainer( ButtonGroupMap bgContainer );
69                                 // ----------------------------------------------------------------------------------
70                                 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
71                                  * @brief This function sets a container with the name of the groups.
72                                  * @param gNameList the KeyMapList with all groupNames.
73                                  */
74                                 void
75                                 SetGroupNameList( KeyMapList gNameList );
76                                 // ----------------------------------------------------------------------------------
77                                 /*!
78                                  * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
79                                  const std::string iconpath, const std::string buttonDescription,
80                                  FunctionEventType event )
81                                  * @brief This function adds a new button to the container.
82                                  * @param groupName The name of the group of buttons.
83                                  * @param buttonName The ID of the button.
84                                  * @param iconpath The path of the button icon.
85                                  * @param buttonDescription The description of the button.
86                                  * @param event The event associated to the button.
87                                  * @see class Functor, ConcreteFunctor for add an event for a button.
88                                  * @exception std::bad_alloc
89                                  */
90                                 void
91                                 AddButton( const std::string & groupName, const std::string buttonName,
92                                     const std::string iconpath, const std::string buttonDescription,
93                                     FunctionEventType event );
94                                 // ----------------------------------------------------------------------------------
95
96                         private:
97                                 ButtonGroupMap m_ButtonGroupContainer; //! <std::map< std::string, ButtonList > View pointer.
98                                 KeyMapList m_GroupNameList; //! <ButtonContainerPanel View pointer.
99                 };
100         }
101 }
102
103 #endif /* BUTTONGROUPSETTINGS_H_ */