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_
16 #include "structBCPSettings.h"
17 #include "containerSettings.h"
20 /*! @namespace <creaPanelButtonContainer>
21 * @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
23 namespace creaPanelButtonContainer
25 /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
26 * @brief This class contains the settings of the buttons.
28 class ButtonContainerSettings
32 /*! typedef creaButtonContainer::model::TFunctor TFunctor;
33 * @brief Defines the TFunctor type.
35 typedef creaButtonContainer::model::TFunctor TFunctor;
36 // ----------------------------------------------------------------------------------
37 /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
38 * @brief Defines the ButtonGroupSettings type.
40 typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
41 // ----------------------------------------------------------------------------------
42 /*! @typedef wxPanel* PanelButton;
43 * @brief Defines the PanelButton type.
45 typedef wxPanel* PanelButton;
46 // ----------------------------------------------------------------------------------
47 /*! @typedef std::pair< std::string, PanelButton > ActionButton;
48 * @brief Defines the ActionButton type.
49 * First is the button description, Second FunctionEventType
51 typedef std::pair< std::string, PanelButton > ActionButton;
52 // ----------------------------------------------------------------------------------
53 /*! @typedef std::pair< std::string, std::string > ButtonInfo;
54 * @brief Defines the ButtonInfo type.
55 * First is the ButtonName, Second is the ImageIconPath
57 typedef std::pair< std::string, std::string > ButtonInfo;
58 // ----------------------------------------------------------------------------------
59 /*! @typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
60 * @brief Defines the ButtonPair type.
62 typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
63 // ----------------------------------------------------------------------------------
64 /*! @typedef std::list< std::string > KeyMapList;
65 * @brief Defines the KeyMapList type.
67 typedef std::list< std::string > KeyMapList;
68 // ----------------------------------------------------------------------------------
69 /*! @typedef std::list< ButtonPair* > ButtonList;
70 * @brief Defines the ButtonList type.
72 typedef std::list< ButtonPair* > ButtonList;
73 // ----------------------------------------------------------------------------------
74 /*! @typedef std::map< std::string, ButtonList > ButtonGroupMap;
75 * @brief Defines the ButtonGroupMap type.
77 typedef std::map< std::string, ButtonList > ButtonGroupMap;
78 // ----------------------------------------------------------------------------------
79 /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
80 * @brief Defines the BCStructVectorType type.
82 typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
83 //end typedef definition
84 // ----------------------------------------------------------------------------------
85 /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
86 * @brief This class contains the settings of the button container.
89 // ----------------------------------------------------------------------------------
90 /*! @fn ButtonContainerSettings( );
91 * @brief This is the default constructor.
93 ButtonContainerSettings( );
94 // ----------------------------------------------------------------------------------
95 /*! @fn virtual ~ButtonContainerSettings( );
96 * @brief This is the destructor.
99 ~ButtonContainerSettings( );
100 // ----------------------------------------------------------------------------------
101 /*! @fn ButtonGroupMap GetButtonGroupContainer( );
102 * @brief This method returns ButtonGroupMap with all buttons.
106 GetButtonGroupContainer( );
107 // ----------------------------------------------------------------------------------
108 /*! @fn KeyMapList GetGroupNameList( );
109 * @brief This method returns a KeyMapsList with the name of the groups.
114 // ----------------------------------------------------------------------------------
115 /*! @fn PanelButton GetPanelButton( const std::string &buttonName );
116 * @brief This method returns the panel of a button.
118 * @exception std::bad_alloc
122 GetPanelButton( const std::string &buttonName );
123 // ----------------------------------------------------------------------------------
124 /*! @fn ButtonGroupSettings* GetButtonGroupSettings( TFunctor* functor );
125 * @brief this method return the settings the generic settings for creaButtonContainer.
127 * @exception std::bad_alloc
131 GetButtonGroupSettings( TFunctor* functor );
132 // ----------------------------------------------------------------------------------
133 /*! @fn void SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
134 * @brief This method sets the button group container.
135 * @param bGroupContainer
138 SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
139 // ----------------------------------------------------------------------------------
140 /*! @fn void SetGroupNameList( KeyMapList gNameList );
141 * @brief this method sets the groupName list
145 SetGroupNameList( KeyMapList gNameList );
146 // ----------------------------------------------------------------------------------
147 /*! @fn void AddButton( const std::string &groupName, const std::string &buttonName,
148 const std::string &iconpath, const std::string &buttonDescription,
150 * @brief This method adds a new button into a group of buttons.
154 * @param buttonDescription
156 * @exception std::bad_alloc
159 AddButton( const std::string &groupName, const std::string &buttonName,
160 const std::string &iconpath, const std::string &buttonDescription,
162 // ----------------------------------------------------------------------------------
163 /*! @fn void AddButton( BCPSettingsStruct* info );
164 * @brief This method adds a new button into a group of buttons.
166 * @exception std::bad_alloc
169 AddButton( BCPSettingsStruct* info );
170 // ----------------------------------------------------------------------------------
171 /*! @fn void AddButtons( BCStructVectorType infoList );
172 * @brief This method adds new buttons into the container.
174 * @exception std::bad_alloc
177 AddButtons( BCStructVectorType infoList );
178 // ----------------------------------------------------------------------------------
180 ButtonGroupMap m_ButtonGroupContainer; //!<This is the map with the groups of buttons.
181 KeyMapList m_GroupNameList; //!<This is a container with the name of the groups.
184 #endif /* BUTTONCONTAINERSETTINGS_H_ */