2 * @file buttonContainerSettings.h
3 * @brief This contains the ButtonContainerSettings class.
4 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
8 #ifndef BUTTONCONTAINERSETTINGS_H_
9 #define BUTTONCONTAINERSETTINGS_H_
17 #include "structBCPSettings.h"
18 #include "containerSettings.h"
21 /*! @namespace <creaPanelButtonContainer>
22 * @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
24 namespace creaPanelButtonContainer
26 /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
27 * @brief This class contains the settings of the buttons.
29 class ButtonContainerSettings
33 /*! typedef creaButtonContainer::model::TFunctor TFunctor;
34 * @brief Defines the TFunctor type.
36 typedef creaButtonContainer::model::TFunctor TFunctor;
37 // ----------------------------------------------------------------------------------
38 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
39 * @brief Defines the ButtonGroupSettings type.
41 typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
42 // ----------------------------------------------------------------------------------
43 /*! @typedef wxPanel* PanelButton;
44 * @brief Defines the PanelButton type.
46 typedef wxPanel* PanelButton;
47 // ----------------------------------------------------------------------------------
48 /*! @typedef std::pair< std::string, PanelButton > ActionButton;
49 * @brief Defines the ActionButton type.
50 * First is the button description, Second FunctionEventType
52 typedef std::pair< std::string, PanelButton > ActionButton;
53 // ----------------------------------------------------------------------------------
54 /*! @typedef std::pair< std::string, std::string > ButtonInfo;
55 * @brief Defines the ButtonInfo type.
56 * First is the ButtonName, Second is the ImageIconPath
58 typedef std::pair< std::string, std::string > ButtonInfo;
59 // ----------------------------------------------------------------------------------
60 /*! @typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
61 * @brief Defines the ButtonPair type.
63 typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
64 // ----------------------------------------------------------------------------------
65 /*! @typedef std::list< std::string > KeyMapList;
66 * @brief Defines the KeyMapList type.
68 typedef std::list< std::string > KeyMapList;
69 // ----------------------------------------------------------------------------------
70 /*! @typedef std::list< ButtonPair* > ButtonList;
71 * @brief Defines the ButtonList type.
73 typedef std::list< ButtonPair* > ButtonList;
74 // ----------------------------------------------------------------------------------
75 /*! @typedef std::map< std::string, ButtonList > ButtonGroupMap;
76 * @brief Defines the ButtonGroupMap type.
78 typedef std::map< std::string, ButtonList > ButtonGroupMap;
79 // ----------------------------------------------------------------------------------
80 /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
81 * @brief Defines the BCStructVectorType type.
83 typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
84 //end typedef definition
85 // ----------------------------------------------------------------------------------
86 /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
87 * @brief This class contains the settings of the button container.
90 // ----------------------------------------------------------------------------------
91 /*! @fn ButtonContainerSettings( );
92 * @brief This is the default constructor.
94 ButtonContainerSettings( );
95 // ----------------------------------------------------------------------------------
96 /*! @fn virtual ~ButtonContainerSettings( );
97 * @brief This is the destructor.
100 ~ButtonContainerSettings( );
101 // ----------------------------------------------------------------------------------
102 /*! @fn ButtonGroupMap GetButtonGroupContainer( );
103 * @brief This method returns ButtonGroupMap with all buttons.
107 GetButtonGroupContainer( );
108 // ----------------------------------------------------------------------------------
109 /*! @fn KeyMapList GetGroupNameList( );
110 * @brief This method returns a KeyMapsList with the name of the groups.
115 // ----------------------------------------------------------------------------------
116 /*! @fn PanelButton GetPanelButton( const std::string &buttonName );
117 * @brief This method returns the panel of a button.
119 * @exception std::bad_alloc
123 GetPanelButton( const std::string &buttonName );
124 // ----------------------------------------------------------------------------------
125 /*! @fn ButtonGroupSettings* GetButtonGroupSettings( TFunctor* functor );
126 * @brief this method return the settings the generic settings for creaButtonContainer.
128 * @exception std::bad_alloc
132 GetButtonGroupSettings( TFunctor* functor );
133 // ----------------------------------------------------------------------------------
134 /*! @fn void SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
135 * @brief This method sets the button group container.
136 * @param bGroupContainer
139 SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
140 // ----------------------------------------------------------------------------------
141 /*! @fn void SetGroupNameList( KeyMapList gNameList );
142 * @brief this method sets the groupName list
146 SetGroupNameList( KeyMapList gNameList );
147 // ----------------------------------------------------------------------------------
148 /*! @fn void AddButton( const std::string &groupName, const std::string &buttonName,
149 const std::string &iconpath, const std::string &buttonDescription,
151 * @brief This method adds a new button into a group of buttons.
155 * @param buttonDescription
157 * @exception std::bad_alloc
160 AddButton( const std::string &groupName, const std::string &buttonName,
161 const std::string &iconpath, const std::string &buttonDescription,
163 // ----------------------------------------------------------------------------------
164 /*! @fn void AddButton( BCPSettingsStruct* info );
165 * @brief This method adds a new button into a group of buttons.
167 * @exception std::bad_alloc
170 AddButton( BCPSettingsStruct* info );
171 // ----------------------------------------------------------------------------------
172 /*! @fn void AddButtons( BCStructVectorType infoList );
173 * @brief This method adds new buttons into the container.
175 * @exception std::bad_alloc
178 AddButtons( BCStructVectorType infoList );
179 // ----------------------------------------------------------------------------------
181 ButtonGroupMap m_ButtonGroupContainer; //!<This is the map with the groups of buttons.
182 KeyMapList m_GroupNameList; //!<This is a container with the name of the groups.
185 #endif /* BUTTONCONTAINERSETTINGS_H_ */