X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FcreaPanelButtonContainer%2FbuttonContainerSettings.h;h=bb00f7dff81a165f03ff055861531a7f3b23adad;hb=8f1f70ffb361d0ccde7da40ff128cebdcfcf3f13;hp=ef4819635b46eef281d65ff30cbd3c55e728fff5;hpb=e4ef2b5df5aac431ff3b806f83b7dd5e55e89d86;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h index ef48196..bb00f7d 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h @@ -34,6 +34,8 @@ #define BUTTONCONTAINERSETTINGS_H_ #include +#include +#include #include #include @@ -44,6 +46,7 @@ #include "containerSettings.h" #include "functor.h" + /*! @namespace * @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu. */ @@ -82,12 +85,14 @@ namespace creaPanelButtonContainer * First is the button description, Second FunctionEventType */ typedef std::pair< std::string, PanelButton > ActionButton; + // ---------------------------------------------------------------------------------- - /*! @typedef std::pair< std::string, std::string > ButtonInfo; + /*! @typedef std::pair< std::string, wxBitmap > ButtonInfo; * @brief Defines the ButtonInfo type. - * First is the ButtonName, Second is the ImageIconPath + * First is the ButtonName, Second is the ImageIcon */ - typedef std::pair< std::string, std::string > ButtonInfo; + typedef std::pair< std::string, wxBitmap > ButtonInfo; + // ---------------------------------------------------------------------------------- /*! @typedef std::pair< ButtonInfo*, ActionButton* > ButtonPair; * @brief Defines the ButtonPair type. @@ -98,11 +103,13 @@ namespace creaPanelButtonContainer * @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::list< ButtonPair* > ButtonList; + // ---------------------------------------------------------------------------------- /*! @typedef std::map< std::string, ButtonList > ButtonGroupMap; * @brief Defines the ButtonGroupMap type. @@ -118,6 +125,8 @@ namespace creaPanelButtonContainer /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h" * @brief This class contains the settings of the button container. */ + + typedef std::map< std::string, wxPanel* > ItemsMap; public: // ---------------------------------------------------------------------------------- /*! @fn ButtonContainerSettings( ); @@ -130,6 +139,7 @@ namespace creaPanelButtonContainer */ virtual ~ButtonContainerSettings( ); + // ---------------------------------------------------------------------------------- /*! @fn ButtonGroupMap GetButtonGroupContainer( ); * @brief This method returns ButtonGroupMap with all buttons. @@ -167,6 +177,16 @@ namespace creaPanelButtonContainer * @brief This method sets the button group container. * @param bGroupContainer */ + + // ---------------------------------------------------------------------------------- + + ButtonGroupSettings* + GetListGroupSettings(); + + // ---------------------------------------------------------------------------------- + + + void SetButtonGroupContainer( ButtonGroupMap bGroupContainer ); // ---------------------------------------------------------------------------------- @@ -176,6 +196,7 @@ namespace creaPanelButtonContainer */ void SetGroupNameList( KeyMapList gNameList ); + // ---------------------------------------------------------------------------------- /*! @fn void AddButton( const std::string &groupName, const std::string &buttonName, const std::string &iconpath, const std::string &buttonDescription, @@ -190,8 +211,9 @@ namespace creaPanelButtonContainer */ void AddButton( const std::string &groupName, const std::string &buttonName, - const std::string &iconpath, const std::string &buttonDescription, + const wxBitmap &icon, const std::string &buttonDescription, PanelButton panel ); + // ---------------------------------------------------------------------------------- /*! @fn void AddButton( BCPSettingsStruct* info ); * @brief This method adds a new button into a group of buttons. @@ -200,6 +222,7 @@ namespace creaPanelButtonContainer */ void AddButton( BCPSettingsStruct* info ); + // ---------------------------------------------------------------------------------- /*! @fn void AddButtons( BCStructVectorType infoList ); * @brief This method adds new buttons into the container. @@ -207,11 +230,25 @@ namespace creaPanelButtonContainer * @exception std::bad_alloc */ void - AddButtons( BCStructVectorType infoList ); + AddButtons( BCStructVectorType infoList, int type ); + + void + AddItems(BCPSettingsStruct* info); + + ItemsMap + GetItemsMap(); + + PanelButton + GetPanelList( const StringType &buttonName ); + + // ---------------------------------------------------------------------------------- private: ButtonGroupMap m_ButtonGroupContainer; //!