-/***************************************************************
- * Name: buttonContainerSettings.h
- * Purpose: It is the ButtonGroupSettings
- * Author: Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * Modified: 2011-05-09
- * Copyright: Diego CACERES (http://www.creatis.insa-lyon.fr/~caceres/)
- * License:
- **************************************************************/
+/*!
+ * @file buttonContainerSettings.h
+ * @brief This contains the ButtonContainerSettings class.
+ * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date 2011-05-24
+ */
#ifndef BUTTONCONTAINERSETTINGS_H_
#define BUTTONCONTAINERSETTINGS_H_
#include <list>
#include <map>
#include <wx/panel.h>
+#include <vector>
+#include "structBCPSettings.h"
#include "containerSettings.h"
#include "functor.h"
+/*! @namespace <creaPanelButtonContainer>
+ * @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
+ */
namespace creaPanelButtonContainer
{
- typedef creaButtonContainer::model::TFunctor TFunctor;
- typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
- typedef wxPanel* PanelButton;
- //First is the button description, Second FunctionEventType
- typedef std::pair< std::string, PanelButton > ActionButton;
- //First is the ButtonName and Second is the ImageIconPath
- typedef std::pair< std::string, std::string > ButtonInfo;
- typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
- typedef std::list< std::string > KeyMapList;
- typedef std::list< ButtonPair* > ButtonList;
- typedef std::map< std::string, ButtonList > ButtonGroupMap;
+ /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
+ * @brief This class contains the settings of the buttons.
+ */
class ButtonContainerSettings
{
public:
+ //typedef definition.
+ /*! typedef creaButtonContainer::model::TFunctor TFunctor;
+ * @brief Defines the TFunctor type.
+ */
+ typedef creaButtonContainer::model::TFunctor TFunctor;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
+ * @brief Defines the ButtonGroupSettings type.
+ */
+ typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef wxPanel* PanelButton;
+ * @brief Defines the PanelButton type.
+ */
+ typedef wxPanel* PanelButton;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::pair< std::string, PanelButton > ActionButton;
+ * @brief Defines the ActionButton type.
+ * First is the button description, Second FunctionEventType
+ */
+ typedef std::pair< std::string, PanelButton > ActionButton;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::pair< std::string, std::string > ButtonInfo;
+ * @brief Defines the ButtonInfo type.
+ * First is the ButtonName, Second is the ImageIconPath
+ */
+ typedef std::pair< std::string, std::string > ButtonInfo;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
+ * @brief Defines the ButtonPair type.
+ */
+ typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::list< std::string > KeyMapList;
+ * @brief Defines the KeyMapList type.
+ */
+ typedef std::list< std::string > KeyMapList;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::list< ButtonPair* > ButtonList;
+ * @brief Defines the ButtonList type.
+ */
+ typedef std::list< ButtonPair* > ButtonList;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::map< std::string, ButtonList > ButtonGroupMap;
+ * @brief Defines the ButtonGroupMap type.
+ */
+ typedef std::map< std::string, ButtonList > ButtonGroupMap;
+ // ----------------------------------------------------------------------------------
+ /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
+ * @brief Defines the BCStructVectorType type.
+ */
+ typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
+ //end typedef definition
+ // ----------------------------------------------------------------------------------
+ /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
+ * @brief This class contains the settings of the button container.
+ */
+ public:
+ // ----------------------------------------------------------------------------------
+ /*! @fn ButtonContainerSettings( );
+ * @brief This is the default constructor.
+ */
ButtonContainerSettings( );
+ // ----------------------------------------------------------------------------------
+ /*! @fn virtual ~ButtonContainerSettings( );
+ * @brief This is the destructor.
+ */
virtual
~ButtonContainerSettings( );
+ // ----------------------------------------------------------------------------------
+ /*! @fn ButtonGroupMap GetButtonGroupContainer( );
+ * @brief This method returns ButtonGroupMap with all buttons.
+ * @return
+ */
ButtonGroupMap
GetButtonGroupContainer( );
+ // ----------------------------------------------------------------------------------
+ /*! @fn KeyMapList GetGroupNameList( );
+ * @brief This method returns a KeyMapsList with the name of the groups.
+ * @return
+ */
KeyMapList
GetGroupNameList( );
+ // ----------------------------------------------------------------------------------
+ /*! @fn PanelButton GetPanelButton( const std::string &buttonName );
+ * @brief This method returns the panel of a button.
+ * @param buttonName
+ * @exception std::bad_alloc
+ * @return
+ */
PanelButton
GetPanelButton( const std::string &buttonName );
+ // ----------------------------------------------------------------------------------
+ /*! @fn ButtonGroupSettings* GetButtonGroupSettings( TFunctor* functor );
+ * @brief this method return the settings the generic settings for creaButtonContainer.
+ * @param functor
+ * @exception std::bad_alloc
+ * @return
+ */
ButtonGroupSettings*
GetButtonGroupSettings( TFunctor* functor );
+ // ----------------------------------------------------------------------------------
+ /*! @fn void SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
+ * @brief This method sets the button group container.
+ * @param bGroupContainer
+ */
void
- SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer );
+ SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
+ // ----------------------------------------------------------------------------------
+ /*! @fn void SetGroupNameList( KeyMapList gNameList );
+ * @brief this method sets the groupName list
+ * @param gNameList
+ */
void
- SetGroupNameList( KeyMapList m_GroupNameList );
+ SetGroupNameList( KeyMapList gNameList );
+ // ----------------------------------------------------------------------------------
+ /*! @fn void AddButton( const std::string &groupName, const std::string &buttonName,
+ const std::string &iconpath, const std::string &buttonDescription,
+ PanelButton panel );
+ * @brief This method adds a new button into a group of buttons.
+ * @param groupName
+ * @param buttonName
+ * @param iconpath
+ * @param buttonDescription
+ * @param panel
+ * @exception std::bad_alloc
+ */
void
- AddButton( const std::string & groupName, const std::string buttonName,
- const std::string iconpath, const std::string buttonDescription,
+ AddButton( const std::string &groupName, const std::string &buttonName,
+ const std::string &iconpath, const std::string &buttonDescription,
PanelButton panel );
-
+ // ----------------------------------------------------------------------------------
+ /*! @fn void AddButton( BCPSettingsStruct* info );
+ * @brief This method adds a new button into a group of buttons.
+ * @param info
+ * @exception std::bad_alloc
+ */
+ void
+ AddButton( BCPSettingsStruct* info );
+ // ----------------------------------------------------------------------------------
+ /*! @fn void AddButtons( BCStructVectorType infoList );
+ * @brief This method adds new buttons into the container.
+ * @param infoList
+ * @exception std::bad_alloc
+ */
+ void
+ AddButtons( BCStructVectorType infoList );
+ // ----------------------------------------------------------------------------------
private:
- ButtonGroupMap m_ButtonGroupContainer;
- KeyMapList m_GroupNameList;
+ ButtonGroupMap m_ButtonGroupContainer; //!<This is the map with the groups of buttons.
+ KeyMapList m_GroupNameList; //!<This is a container with the name of the groups.
};
}//ecapseman
#endif /* BUTTONCONTAINERSETTINGS_H_ */