1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
27 * @file containerSettings.h
28 * @brief Contains the ContainerSettings class
29 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
33 #ifndef BUTTONGROUPSETTINGS_H_
34 #define BUTTONGROUPSETTINGS_H_
37 #include <wx/bitmap.h>
39 #include "structBCSettings.h"
42 /*! @namespace <creaButtonContainer>
43 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
45 namespace creaButtonContainer
47 /*! @namespace <creaButtonContainer::model>
48 * @brief Contains the implementation of the model in creaButtonContainer library.
49 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
53 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
54 * @brief This class contains the settings of the button container.
56 class ContainerSettings
60 // ----------------------------------------------------------------------------------
61 /*! @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
62 * @brief Defines the BCSettingsStruct type.
64 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
65 // ----------------------------------------------------------------------------------
66 /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
67 * @brief Defines the BCStructVectorType type.
69 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
70 // ----------------------------------------------------------------------------------
71 //end of typedef definition
73 // ----------------------------------------------------------------------------------
74 /*! @fn ContainerSettings::ContainerSettings( )
75 * @brief This is the constructor.
78 // ----------------------------------------------------------------------------------
79 /*! @fn virtual ContainerSettings::~ContainerSettings( )
80 * @brief This is the destructor.
83 ~ContainerSettings( );
85 // ----------------------------------------------------------------------------------
86 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
87 * @brief This method returns a container of buttons ordered by group.
88 * @return ButtonGroupMap A container with buttons
91 GetButtonGroupContainer( );
92 // ----------------------------------------------------------------------------------
93 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
94 * @brief This method returns a container with the name of the groups.
95 * @return KeyMapList A list with the name of the button groups.
100 // ----------------------------------------------------------------------------------
101 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
102 * @brief This method allows to create the ButtonGroupContainer.
103 * @param bgContainer The ButtonGroupMap with all buttons.
106 SetButtonGroupContainer( ButtonGroupMap bgContainer );
107 // ----------------------------------------------------------------------------------
108 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
109 * @brief This method sets a container with the name of the groups.
110 * @param gNameList the KeyMapList with all groupNames.
113 SetGroupNameList( KeyMapList gNameList );
115 // ----------------------------------------------------------------------------------
117 * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
118 const std::string iconpath, const std::string buttonDescription,
119 FunctionEventType event )
120 * @brief This method adds a new button to the container.
121 * @param groupName The name of the group of buttons.
122 * @param buttonName The ID of the button.
123 * @param iconpath The path of the button icon.
124 * @param buttonDescription The description of the button.
125 * @param event The event associated to the button.
126 * @see class Functor, ConcreteFunctor for add an event for a button.
127 * @exception std::bad_alloc
130 AddButton( const StringType & groupName, const StringType &buttonName,
131 const wxBitmap &icon, const StringType &buttonDescription,
132 FunctionEventType event );
133 // ----------------------------------------------------------------------------------
134 /*! @fn void AddButton( BCSettingsStruct* info );
135 * @brief This method adds a new button to the container using the
136 * BCSettingsStruct structure.
137 * @exception std::bad_alloc
141 AddButton( BCSettingsStruct* info );
142 // ----------------------------------------------------------------------------------
143 /*! @fn void AddButtons( BCStructVectorType infoList );
144 * @brief This method adds new buttons to the container.
145 * @exception std::bad_alloc
149 AddButtons( BCStructVectorType infoList );
150 // ----------------------------------------------------------------------------------
152 ButtonGroupMap m_ButtonGroupContainer; //! <The container with the group of buttons.
153 KeyMapList m_GroupNameList; //! <The container with the name of the groups of buttons.
158 #endif /* BUTTONGROUPSETTINGS_H_ */