]> Creatis software - creaMaracasVisu.git/commitdiff
commit
authorDiego Caceres <pechan@localhost.localdomain>
Tue, 6 Jan 2015 14:25:00 +0000 (15:25 +0100)
committerDiego Caceres <pechan@localhost.localdomain>
Tue, 6 Jan 2015 14:34:56 +0000 (15:34 +0100)
19 files changed:
bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx
bbtk/src/bbcreaMaracasVisuPanelButtonContainer.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/structBCSettings.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/system.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonContainerPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonContainerPanel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.cxx [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.h [new file with mode: 0644]
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/structBCPSettings.h

index fc31b69bf7703e43bae1f0fd524e81668ce669a9..76119b7be6306ea4847016d207645f292fa44e9a 100644 (file)
@@ -42,8 +42,18 @@ PanelButtonContainer::Process( )
 {
        ButtonContainerSettings* settings = new ButtonContainerSettings( );
        printf("EED PanelButtonContainer::Process %d\n", bbGetInputIn( ).size() );
-       settings->AddButtons( bbGetInputIn( ) );
-       PBContainer* panel = new PBContainer( myPanel, settings );
+
+       if(bbGetInputType()== "1")
+       {
+          settings->AddItems(bbGetInputIn());
+          
+       }
+       else {
+         settings->AddButtons(bbGetInputIn( ));
+       }       
+
+       
+       PBContainer* panel = new PBContainer( myPanel, settings, bbGetInputType() );
        wxBoxSizer* sizer  = new wxBoxSizer( wxHORIZONTAL );
        sizer->Add( panel, 1, wxEXPAND, 0 );
        this->myPanel->SetSizer(sizer);
index bbf30e6ca5eb690ddce64a347eaf441ffe20cfd4..3d59055cbced2f1869df7b2e78f592f15c88f58d 100644 (file)
@@ -51,6 +51,7 @@ class bbcreaMaracasVisu_EXPORT PanelButtonContainer
 //===== 
   BBTK_DECLARE_INPUT(Title,std::string);
   BBTK_DECLARE_INPUT(In,BCStructVectorType);
+  BBTK_DECLARE_INPUT(Type,std::string);
   BBTK_PROCESS(Process);
   void Process();
   BBTK_CREATE_WIDGET(CreateWidget);
@@ -70,6 +71,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(PanelButtonContainer,bbtk::WxBlackBox);
 
   BBTK_INPUT(PanelButtonContainer,Title,"Title prepended to the text",std::string,"");
   BBTK_INPUT(PanelButtonContainer,In,"ButtonContainerSettings List",BCStructVectorType,"");
+  BBTK_INPUT(PanelButtonContainer,Type,"Type container",std::string,"");
 
 BBTK_END_DESCRIBE_BLACK_BOX(PanelButtonContainer);
 //===== 
index d3f426967b37faf9d0a1c31c4d1d6ff97754fe66..6779dd399e7f0545cb93954256e472a8b68dd715 100644 (file)
@@ -60,7 +60,7 @@ namespace creaButtonContainer
                
                // ----------------------------------------------------------------------------------
                void
-               ContainerSettings::SetButtonGroupContainer( ButtonGroupMap bgContainer )
+               ContainerSettings::SetButtonGroupContainer(ButtonGroupMap bgContainer)
                {
                        this->m_ButtonGroupContainer = bgContainer;
                }
@@ -71,12 +71,32 @@ namespace creaButtonContainer
                        this->m_GroupNameList = gNameList;
                }
                
+               // ----------------------------------------------------------------------------------
+
+               ListGroupMap
+               ContainerSettings::GetListGroupContainer( )
+               {
+                       return ( this->m_ListGroupContainer );
+               }
+
+               void
+               ContainerSettings::SetListGroupContainer( ListGroupMap lstContainer )
+               {
+                       this->m_ListGroupContainer = lstContainer;
+               }
+
+               // ----------------------------------------------------------------------------------
+
                // ----------------------------------------------------------------------------------
                void
                ContainerSettings::AddButton( const StringType & groupName,
                    const StringType &buttonName, const wxBitmap &icon,
                    const StringType &buttonDescription, FunctionEventType event )
                {
+                       std::cout<< std::endl<<"MLER CLASS : ContainerSettings" << std::endl;
+                       std::cout<< std::endl<<"MLER ContainerSettings // AddButton "<<std::endl;
+
+
                        ButtonPair* pair = new ButtonPair(
                            new ButtonInfo( buttonName, icon ),
                            new ButtonAction( buttonDescription, event ) );
@@ -87,6 +107,8 @@ namespace creaButtonContainer
                                {
                                        if ( ( *it ).compare( groupName ) == 0 )
                                        {
+                                               std::cout<<"MLER ContainerSettings // AddButton : it "<<*it <<std::endl;
+
                                                this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                                                return;
                                        }//fi
@@ -150,6 +172,102 @@ namespace creaButtonContainer
                                    << "exception: " << e.what( ) << std::endl;
                        }//hctac
                }
+
+               void
+               ContainerSettings::AddItems(BCStructVectorType infoList)
+               {
+                       try
+                       {
+                               for( BCStructVectorType::iterator it = infoList.begin( ); it
+                                   != infoList.end( ); ++it )
+                               {
+                                       this->AddItem(*it);
+                               }//rof
+                       }//yrt
+                       catch ( const std::exception& e )
+                       {
+                               std::cerr
+                           << "ContainerSettings::AddButtons( BCStructVectorType infoList ) "
+                           << "exception: " << e.what( ) << std::endl;
+                       }//hctac
+               }
+               //-----------------------------------------------------------------------------------
+                       void
+                               ContainerSettings::AddItem(const StringType & groupName)
+                               {
+
+                               //Es importante hacer un test, recibiendo como parametro la info de un item.
+
+
+                                       wxListItem* item;
+                                       item->SetId(1);
+                                       item->SetText(wxT("monica"));
+
+                                       creaButtonContainer::view::ListWx l;
+                                       l.setItems(item);
+
+
+                                       try
+                                       {
+                                               for( KeyMapList::iterator it = this->m_GroupNameList.begin( );
+                                                        it!= this->m_GroupNameList.end( ); ++it )
+                                               {
+                                                       if(( *it ).compare( groupName ) == 0 )
+                                                       {
+                                                               this->m_ListGroupContainer[ groupName ].push_back(l);
+                                                               return;
+                                                       }
+                                               }
+                                               this->m_GroupNameList.push_back( groupName );
+                                               this->m_ListGroupContainer[ groupName ].push_back( l );
+                                       }
+                                       catch ( const std::exception& e )
+                                       {
+                                               std::cerr
+                                               << "ContainerSettings::AddButton( const std::string & groupName,"
+                                               << "const std::string buttonName, const std::string iconpath,"
+                                               << "const std::string buttonDescription, FunctionEventType event ) exception: "
+                                               << e.what( ) << std::endl;
+                                       }//hctac
+                               }
+
+
+                               void
+                               ContainerSettings::AddItem( BCSettingsStruct* info )
+                               {
+                                       wxListItem* item;
+
+                                       wxString myString((info->buttonName).c_str(),wxConvUTF8);
+                                       item->SetText(myString);
+
+                                       creaButtonContainer::view::ListWx l;
+                                       l.setItems(item);
+
+                                       try
+                                       {
+                                               for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
+                                                       != this->m_GroupNameList.end( ); ++it )
+                                               {
+                                                       if ( ( *it ).compare( info->groupName ) == 0 )
+                                                       {
+                                                               this->m_ListGroupContainer[ info->groupName ].push_back( l );
+                                                               return;
+                                                       }//fi
+                                               }//rof
+                                               this->m_GroupNameList.push_back( info->groupName );
+                                               this->m_ListGroupContainer[ info->groupName ].push_back( l );
+                                       }
+                                       catch (const std::exception& e)
+                                       {
+                                               std::cerr
+                                               << "void ContainerSettings::AddItem( BCSettingsStruct* info ) "
+                                               << "exception: " << e.what( ) << std::endl;
+                                       }
+
+                               }
+
+
+
        // ----------------------------------------------------------------------------------
        }//ecapseman
 }//ecapseman
index cb5a4f554553e91c25aad54b5c1c658991cbdfcc..d00db70c51f3c8fbaa1f71d68443852f7490b6bc 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <vector>
 #include <wx/bitmap.h>
+#include <wx/listctrl.h>
 
 #include "structBCSettings.h"
 #include "system.h"
@@ -42,6 +43,8 @@
 /*!    @namespace <creaButtonContainer>
  *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
  */
+
+
 namespace creaButtonContainer
 {
        /*! @namespace <creaButtonContainer::model>
@@ -112,6 +115,13 @@ namespace creaButtonContainer
                                void
                                SetGroupNameList( KeyMapList gNameList );
                                
+                               ListGroupMap
+                               GetListGroupContainer( );
+
+                               void
+                               SetListGroupContainer( ListGroupMap lstContainer );
+
+
                                // ----------------------------------------------------------------------------------
                                /*!
                                 * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
@@ -147,10 +157,24 @@ namespace creaButtonContainer
                                 */
                                void
                                AddButtons( BCStructVectorType infoList );
+
+                               // ----------------------------------------------------------------------------------
+                               void
+                               AddItem(const StringType & groupName);
+
+                               void
+                               AddItem( BCSettingsStruct* info );
+
+                               void
+                               AddItems( BCStructVectorType infoList );
+
+                               // ----------------------------------------------------------------------------------
                                // ----------------------------------------------------------------------------------
                        private:
                                ButtonGroupMap m_ButtonGroupContainer; //! <The container with the group of buttons.
                                KeyMapList m_GroupNameList; //! <The container with the name of the groups of buttons.
+
+                               ListGroupMap m_ListGroupContainer; // contenedor del grupo de listas
                };
        }
 }
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.cxx
new file mode 100644 (file)
index 0000000..7322b06
--- /dev/null
@@ -0,0 +1,97 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+/*!
+ * @file buttonGroupFactory.cxx
+ * @brief Implements the ButtonGroupFactory class.
+ * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date  2011-06-02
+ */
+
+#include "listGroupFactory.h"
+
+namespace creaButtonContainer
+{
+       namespace model
+       {
+               // ----------------------------------------------------------------------------------
+               ListGroupFactory::ListGroupFactory( )
+               {
+               }
+               // ----------------------------------------------------------------------------------
+               ListGroupFactory::~ListGroupFactory( )
+               {
+               }
+
+               // ----------------------------------------------------------------------------------
+               ListGroupFactory::ListGroupContainer ListGroupFactory::CreateListGroupContainer(wxWindow* parent,ListModel* settings )
+               {
+                       ListGroupContainer groupView;
+                       try
+                       {
+                               ListGroupMap map = settings->GetListGroupContainer( );
+                               for( ListGroupMap::iterator it = map.begin( ); it != map.end( ); ++it )
+                               {
+                                       wxString groupNameAux( ( *it ).first.c_str( ), wxConvUTF8 );//nombre grupo
+                                       wxStaticText* wxGroupName = new wxStaticText( parent, -1, groupNameAux, wxDefaultPosition, wxDefaultSize, 0, _T("GroupText") );
+                                       ListGroup* group = new ListGroup( wxGroupName, this->GetList( parent, ( *it ).second ) );
+                                       //ListGroup* group;
+                                       groupView.push_back( group );
+                               }//rof
+                       }//yrt
+                       catch ( const std::exception& e )
+                       {
+                               std::cerr
+                                   << "ListGroupFactory::CreateListGroupContainer( wxWindow* parent,   ListModel* settings )"
+                                   << " exception: " << e.what( ) << std::endl;
+                       }//chtac
+                       return ( groupView );
+               }
+
+
+               // ----------------------------------------------------------------------------------
+               ListGroupFactory::ListContainer ListGroupFactory::GetList( wxWindow* parent, tlist lst )
+               {
+                       ListContainer cList;
+
+                       try
+                       {
+                               /*List list = new List(parent,items);
+
+                               cList.push_back(list);
+                               //return ( buttonList ); // JPR*/
+                       }//yrt
+                       catch ( const std::exception& e )
+                       {
+                               std::cerr
+                                   << "ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel )"
+                                   << "exception: " << e.what( ) << std::endl;
+                       }//chtac
+
+                       return ( cList );        // JPR
+               }
+       // ----------------------------------------------------------------------------------
+       }//ecapseman
+}//ecapseman
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.h
new file mode 100644 (file)
index 0000000..7e137bd
--- /dev/null
@@ -0,0 +1,123 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+/*!
+ * @file buttonGroupFactory.h
+ * @brief Contains ButtonGroupFactory class
+ * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date  2011-06-02
+ */
+
+#ifndef LISTGROUPFACTORY_H
+#define LISTGROUPFACTORY_H
+
+#include <wx/window.h>
+#include <wx/listctrl.h>
+
+#include "listWx.h"
+#include "system.h"
+#include "listGroup.h"
+#include "containerSettings.h"
+
+/*!    @namespace <creaButtonContainer>
+ *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
+ */
+namespace creaButtonContainer
+{
+       /*! @namespace <creaButtonContainer::model>
+        *      @brief Contains the implementation of the model in creaButtonContainer library.
+        *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
+        */
+       namespace model
+       {
+               /*! @class ButtonGroupFactory buttonGroupFactory.h "buttonGroupFactory.h"
+                *      @brief This class contains the ButtonGroup factory.
+                *  @details This class creates a container of group of buttons.
+                *  @see <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
+                */
+               class ListGroupFactory
+               {
+                       public:
+
+                               typedef creaButtonContainer::view::ListWx List;
+
+                               typedef creaButtonContainer::view::ListGroup ListGroup;
+                               // ----------------------------------------------------------------------------------
+                               /*!     @typedef creaButtonContainer::model::ContainerSettings ButtonGroupModel;
+                                *      @brief Defines the ButtonGroupModel type.
+                                */
+                               typedef creaButtonContainer::model::ContainerSettings ListModel;
+                               // ----------------------------------------------------------------------------------
+                               /*!     @typedef std::list< ButtonGroup* > ButtonGroupContainer;
+                                *      @brief Defines the ButtonGroupContainer type.
+                                */
+                               typedef std::list< ListGroup* > ListGroupContainer;
+                               // ----------------------------------------------------------------------------------
+                               /*!     @typedef std::map< long, Button* > ButtonContainer;
+                                *      @brief Defines the ButtonContainer type.
+                                */
+                               typedef std::list<ListWx> ListContainer;
+
+                               // ----------------------------------------------------------------------------------
+                               //end of typedef definition
+                       public:
+                               /*!     @fn ListGroupFactory::ListGroupFactory( );
+                                *      @brief This is the default constructor.
+                                */
+                               ListGroupFactory( );
+                               // -------------------------------------------------------------------------------
+                               /*!     @fn virtual ButtonGroupFactory::~ButtonGroupFactory( );
+                                *      @brief This is the destructor.
+                                */
+                               virtual
+                               ~ListGroupFactory( );
+
+                               /*! @fn ButtonGroupContainer ListGroupFactory::CreateListContainer( wxWindow* parent, ButtonGroupModel* settings );
+                                * @brief This method creates the ButtonGroupContainer.
+                                * @param parent the wxWindow* parent to be attached.
+                                * @param settings The Container settings.
+                                * @exception std::bad_alloc
+                                * @return ButtonGroupContainer The wx button group container.
+                                */
+                               ListGroupContainer
+                               CreateListGroupContainer( wxWindow* parent,
+                                   ListModel* settings );
+                       private:
+
+
+                               /*! @fn ButtonContainer ButtonGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel );
+                                * @brief  This method creates a wx button container for a group.
+                                * @param parent the wxWindow* parent to be attached.
+                                * @param buttonModel The button list with its own information.
+                                * @exception std::bad_alloc
+                                * @return ButtonContainer The wx button container.
+                                */
+                               ListGroupContainer
+                               GetList( wxWindow* parent, ListWx lst );
+               };
+       }//ecapseman
+}//ecapseman
+
+#endif // CARTOBUTTONFACTORY_H
index 80cda3283001d24f03b483b385b1d9a2afe6be1e..de3a3045e3c9562df502223d9465212d27911ee2 100755 (executable)
@@ -57,6 +57,10 @@ namespace creaButtonContainer
                                BitmapType icon;                        //! <The iconPath of the button.
                                StringType buttonDescription;           //! <The description of the button.
                                FunctionEventType eventFunction;        //! <The event associated to the button.
+
+                               //===MLER===
+                               StringType type;                        //!<Tipo contenedor>
+                               StringType itemsList;
                };
        } //ecapseman
 } //ecapseman
index ab863ea211103dc75f02e9775b3f74a2f869c534..9481b66c2db1f8607491ed66e0fe5cc07578f982 100644 (file)
 #include <exception>
 #include <string>
 #include "functor.h"
-#include "wx/bitmap.h"
+#include <listWx.h>
+#include <wx/listctrl.h>
+
 
 /*!    @namespace <creaButtonContainer>
  *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
  */
+
+/*namespace creaButtonContainer
+{
+       namespace view
+       {
+               typedef std::list< ListWx* > ListLst;
+               typedef std::map< StringType, ListLst > ListGroupMap; // ex: grupo A,lista A,lista B
+       }
+
+
+}*/
 namespace creaButtonContainer
 {
+       using namespace view;
        // ----------------------------------------------------------------------------------
        /*!     @typedef std::string* StringType;
         *      @brief Defines the StringType type.
@@ -97,7 +111,19 @@ namespace creaButtonContainer
         *      @brief Defines the ButtonGroupMap type.
         */
        typedef std::map< StringType, ButtonList > ButtonGroupMap;
+
+
+
+       //typedef wxListItem* Item; //lista objeto
+       //typedef std::list< Item > ItemsList; //lista de los objetos lista
+       //typedef std::list <ItemsList> Lista;
+       //typedef std::map< StringType, ItemsList > ListGroupMap; // ex: grupo A,items lista A (la lista de ese grupo)
+
+
+       typedef std::list< ListWx > ListLst;
+       typedef std::map< StringType, ListLst > ListGroupMap; // ex: grupo A,lista A,lista B
+
+
 // ----------------------------------------------------------------------------------
 }
-
 #endif /* SYSTEM_H_ */
index a66eb5137c2b3d4831a0e97a733cbe98577c385b..aaeae8cbabd7c93a56404c2738faf148c7416b09 100644 (file)
@@ -42,12 +42,15 @@ namespace creaButtonContainer
                END_EVENT_TABLE()
 
                // ----------------------------------------------------------------------------------
-               ButtonContainerPanel::ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings ) 
+               ButtonContainerPanel::ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings, std::string type )
                : wxScrolledWindow(parent,-1, wxDefaultPosition,wxDefaultSize, wxTAB_TRAVERSAL | wxVSCROLL | wxHSCROLL | wxFULL_REPAINT_ON_RESIZE, _T("creaButtonContainer") )
                {
+
+                       std::cout<< std::endl << " MLER buttonContainerPanel.cxx / ButtonContainerPanel() " << std::endl;
+
                        ButtonGroupFactory factory;
                        this->SetGroupContainer( factory.CreateButtonGroupContainer( this, settings ) );
-                       this->PanelInit( );
+                       this->PanelInit(type );
                        this->m_ButtonCController = new BCController( this );
                        this->m_ButtonCController->AddEvents( );
                        this->SetEventHandler( this->m_ButtonCController );
@@ -65,19 +68,33 @@ namespace creaButtonContainer
                }
                
                // ----------------------------------------------------------------------------------
-               void ButtonContainerPanel::PanelInit( )
+               void ButtonContainerPanel::PanelInit( std::string type )
                {
                        try
                        {
                                
 // EED 20/01/2012  flag 01
                                this->m_Sizer = new Sizer( 0, 1, 0, 0 );
-                               for( ButtonGroupList::iterator it = this->m_ButtonGroupList.begin( ); it != this->m_ButtonGroupList.end( ); ++it )
+
+                               if(type == "1")
                                {
-                                       GroupManager* manager = new GroupManager( this, *it );
-                                       this->m_GroupManagerList[ manager->GetButtonID( ) ] = manager;
-                                       this->m_Sizer->Add( manager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
+                                       for( ButtonGroupList::iterator it = this->m_ButtonGroupList.begin( ); it != this->m_ButtonGroupList.end( ); ++it )
+                                       {
+                                               GroupManager* manager = new GroupManager( this, *it );
+                                               this->m_GroupManagerList[ manager->GetButtonID( ) ] = manager;
+                                               this->m_Sizer->Add( manager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
+                                       }
                                }
+                               else
+                               {
+                                       for( ButtonGroupList::iterator it = this->m_ButtonGroupList.begin( ); it != this->m_ButtonGroupList.end( ); ++it )
+                                       {
+                                               GroupManager* manager = new GroupManager( this, *it );
+                                               this->m_GroupManagerList[ manager->GetButtonID( ) ] = manager;
+                                               this->m_Sizer->Add( manager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
+                                       }
+                               }
+
                                this->SetSizer( this->m_Sizer );
                                this->Layout( );
                                this->FitSizer( );
index 2a7349bd01e84283dcee445976c0819c6c874cde..988fbc2496905652ac77e80f90dd1af937eb8b63 100644 (file)
@@ -46,6 +46,8 @@
 #include "buttonGroupFactory.h"
 #include "containerSettings.h"
 #include "buttonContainerController.h"
+#include "listGroup.h"
+#include "listGroupFactory.h"
 
 /*!    @namespace <creaButtonContainer>
  *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
@@ -130,6 +132,13 @@ namespace creaButtonContainer
                                 */
                                typedef creaButtonContainer::controller::ButtonContainerController
                                    BCController;
+
+                               typedef creaButtonContainer::view::ListGroup ListGroup;
+
+                               typedef std::list< ListGroup* > ListGroupList;
+
+                               typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
+
                                // ----------------------------------------------------------------------------------
                                //end of typedef definition
                        public:
@@ -138,7 +147,7 @@ namespace creaButtonContainer
                                 * @param parent wxWindow pointer to parent.
                                 * @param settings ButtonGroupSettings Pointer to button container settings.
                                 */
-                               ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings );
+                               ButtonContainerPanel( wxWindow* parent, ButtonGroupSettings* settings, std::string type );
                                // ----------------------------------------------------------------------------------
                                /*! @fn ~ButtonContainerPanel( );
                                 * @brief This is the destructor.
@@ -158,7 +167,7 @@ namespace creaButtonContainer
                                 *      @exception std::bad_alloc
                                 */
                                void
-                               PanelInit( );
+                               PanelInit( std::string type);
                                // ----------------------------------------------------------------------------------
                                /*! @fn FitSizer( );
                                 * This method fits and organizes the sizer.
@@ -173,6 +182,8 @@ namespace creaButtonContainer
                                ButtonGroupList m_ButtonGroupList; //!<The list of button groups.
                                BCController* m_ButtonCController; //!<Pontier to controller.
                                Sizer* m_Sizer; //!<Pointer to wxSizer
+
+                               ListGroupList m_ListGroupList;
                        DECLARE_EVENT_TABLE() //!<Event Table declaration.
                };
        }//ecapseman
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx
new file mode 100644 (file)
index 0000000..cb193d6
--- /dev/null
@@ -0,0 +1,70 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+/*!
+ * @file buttonGroup.cxx
+ * @brief Implements the ListGroup class.
+ * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date  2011-06-02
+ */
+
+#include "listGroup.h"
+
+namespace creaButtonContainer
+{
+       namespace view
+       {
+               // ----------------------------------------------------------------------------------
+               ListGroup::ListGroup( wxStaticText* groupName, ListContainer list )
+               {
+                       this->m_GroupName = groupName;
+                       this->m_List = list;
+               }
+
+               // ----------------------------------------------------------------------------------
+               ListGroup::~ListGroup( )
+               {
+               }
+
+               // ----------------------------------------------------------------------------------
+               ListGroup::ListContainer
+               ListGroup::GetListContainer( )
+               {
+                       return ( this->m_List );
+               }
+
+               // ----------------------------------------------------------------------------------
+               wxStaticText*
+               ListGroup::GetGroupName( )
+               {
+                       return ( this->m_GroupName );
+               }
+
+               // ----------------------------------------------------------------------------------
+
+
+       // ----------------------------------------------------------------------------------
+       }//ecapseman
+}//ecapseman
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.h
new file mode 100644 (file)
index 0000000..209d09c
--- /dev/null
@@ -0,0 +1,122 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+/*!
+ * @file buttonGroup.h
+ * @brief This contains the ButtonGroup class.
+ * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date  2011-06-02
+ */
+
+#ifndef LISTGROUP_H
+#define LISTGROUP_H
+
+//Library Definition
+#include <wx/stattext.h>
+
+#include <map>
+#include <list>
+#include <exception>
+
+#include "listWx.h"
+
+/*!    @namespace <creaButtonContainer>
+ *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
+ */
+namespace creaButtonContainer
+{
+       /*! @namespace <creaButtonContainer::view>
+        *      @brief Contains the implementation of the view in creaButtonContainer library.
+        *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
+        */
+       namespace view
+       {
+               /*! @class ButtonGroup buttonGroup.h "buttonGroup.h"
+                *      @brief This class contains the group of buttons.
+                */
+               class ListGroup
+               {
+                       public:
+                               //Typedef definition
+                               // ----------------------------------------------------------------------------------
+                               /*!     @typedef creaButtonContainer::view::Button Button;
+                                *      @brief Defines the Button type.
+                                */
+                               typedef creaButtonContainer::view::ListWx List;
+                               // ----------------------------------------------------------------------------------
+                               /*!     @typedef std::map< long, Button* > ButtonContainer;
+                                *      @brief Defines the ButtonContainer type.
+                                */
+                               typedef std::list< ListWx* > ListContainer;
+                               // ----------------------------------------------------------------------------------
+
+
+                       public:
+                               // ----------------------------------------------------------------------------------
+                               /*! @fn ButtonGroup( wxStaticText* groupName, ButtonContainer buttons );
+                                *      @brief This is the parameterized constructor.
+                                * @param groupName wxStatigText* with the name of the group.
+                                * @param buttons A container with buttons.
+                                */
+                               ListGroup( wxStaticText* groupName, ListContainer lists );
+                               // ----------------------------------------------------------------------------------
+                               /*! @fn ~ButtonGroup( );
+                                * @brief This is the destructor.
+                                */
+                               virtual
+                               ~ListGroup( );
+
+                               // ----------------------------------------------------------------------------------
+                               /*! @fn GetButtonContainer( );
+                                * @brief This method returns the button container.
+                                * @exception std::bad_alloc
+                                * @return ButtonContainer.
+                                */
+                               ListContainer
+                               GetListContainer( );
+                               // ----------------------------------------------------------------------------------
+                               /*! @fn GetButtonIdContainer( );
+                                * @brief This method returns a list of button IDs.
+                                * @exception std::bad_alloc
+                                * @return
+                                */
+                       //      IdListContainer
+                       //      GetListIdContainer( );
+                               // ----------------------------------------------------------------------------------
+                               /*! @fn GetGroupName( );
+                                * @brief This method returns the name of the group.
+                                * @return
+                                */
+                               wxStaticText*
+                               GetGroupName( );
+                               // ----------------------------------------------------------------------------------
+                       private:
+                               wxStaticText* m_GroupName; //!<A pointer with the wxStaticText of name of the group.
+                               ListContainer m_List; //!<A container with buttons.
+               };
+       }//ecapseman
+}//ecapseman
+
+#endif // LISTGROUP_H
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.cxx
new file mode 100644 (file)
index 0000000..5e670e7
--- /dev/null
@@ -0,0 +1,62 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+#include "listWx.h"
+
+namespace creaButtonContainer
+{
+       namespace view
+       {
+               ListWx::ListWx(wxWindow* parent, ItemsList items)
+               {
+                       wxListCtrl* lstCtrl = new wxListCtrl (parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxLC_REPORT);
+
+                       this->m_items                   = items;
+                       lstCtrl->InsertItem(0,(*items.front()).GetText());
+               }
+
+               //-------------------------------------------------------
+
+               tList::~tList( )
+               {
+               }
+
+               //-------------------------------------------------------
+
+               ItemsList getItems() const
+               {
+                       return m_items;
+               }
+
+               void setItems(ItemsList items)
+               {
+                       m_items = items;
+               }
+
+
+
+       }
+
+}
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.h
new file mode 100644 (file)
index 0000000..472875c
--- /dev/null
@@ -0,0 +1,78 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
+
+#ifndef LISTWX_H_
+#define LISTWX_H_
+
+#include <wx/window.h>
+#include <wx/string.h>
+#include <wx/listctrl.h>
+
+#include <list>
+
+#include "system.h"
+
+/*!    @namespace <creaButtonContainer>
+ *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
+ */
+namespace creaButtonContainer
+{
+       /*! @namespace <creaButtonContainer::view>
+        *      @brief Contains the implementation of the view in creaButtonContainer library.
+        *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
+        */
+       namespace view
+       {
+               class ListWx : wxListCtrl
+               {
+                       public :
+
+                               typedef wxListItem* Item;
+                               typedef std::list< Item > ItemsList; //lista de los objetos lista
+
+                       public :
+
+                               ListWx();
+                               ListWx( wxWindow* parent, ItemsList items );
+
+                               virtual
+                               ~ListWx();
+
+                               ItemsList const
+                               getItems ();
+
+                               void
+                               setItems(Item i);
+
+                       private :
+
+                               ItemsList m_items;
+
+               };
+       }
+}
+
+#endif /* LISTWX_H_ */
index f8cd8f3f70d64cecdfec0a3beb3bed16a601e084..2ca8d8dab6bc79dd51f47306f28d5b0c77238e20 100644 (file)
@@ -62,9 +62,14 @@ namespace creaPanelButtonContainer
        {
                try
                {
+                       std::cout<<"MLER ButtonContainerSettings // GetPanelButton "<<std::endl;
+
                        for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                            != this->m_GroupNameList.end( ); ++it )
                        {
+
+                               std::cout<< std::endl<<"MLER ButtonContainerSettings // GetPanelButton :: it "<< *it<<std::endl;
+
                                ButtonList list = this->m_ButtonGroupContainer[ ( *it ) ];
                                for( ButtonList::iterator it1 = list.begin( ); it1 != list.end( ); ++it1 )
                                {
@@ -90,11 +95,17 @@ namespace creaPanelButtonContainer
                ButtonGroupSettings* settings = NULL;
                try
                {
+                       std::cout<< std::endl<<"MLER CLASS : ButtonContainerSettings" << std::endl;
+                       std::cout<< std::endl<<"MLER ButtonContainerSettings // GetButtonGroupSettings "<<std::endl;
+
                        settings = new ButtonGroupSettings( );
                        for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                            != this->m_GroupNameList.end( ); ++it )
                        {
                                ButtonList list = this->m_ButtonGroupContainer[ ( *it ) ];
+
+                               std::cout<<"MLER ButtonContainerSettings // GetButtonGroupSettings :: it "<< *it<<std::endl;
+
                                for( ButtonList::iterator it1 = list.begin( ); it1 != list.end( ); ++it1 )
                                {
                                        settings->AddButton( ( *it ), ( *it1 )->first->first, ( *it1 )->first->second, ( *it1 )->second->first, functor );
@@ -131,6 +142,8 @@ namespace creaPanelButtonContainer
        {
                try
                {
+                       std::cout<< std::endl<<"MLER ButtonContainerSettings // AddButton"<<std::endl;
+
                        //builds the button information
                        //I don't know the try catch doesn't work!!
                        if ( panel == NULL )
@@ -223,6 +236,65 @@ namespace creaPanelButtonContainer
                            << "exception: " << e.what( ) << std::endl;
                }//hctac
        }
+
+       void
+               ButtonContainerSettings::AddItem(BCPSettingsStruct* info)
+               {
+                       if(info->panel == NULL)
+                       {
+                               std::cerr
+                               << "ButtonContainerSettings::AddItem"
+                               << "exception: NULL Pointer in panel" << std::endl;
+                               exit(1);
+                       }
+
+                       wxListItem item;
+                       wxString myString((info->buttonName).c_str(),wxConvUTF8);
+                       item.SetText(myString);
+
+                       try
+                               {
+                                       for(KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
+                                           != this->m_GroupNameList.end( ); ++it )
+                                       {
+                                               if((*it).compare(info->groupName) == 0)
+                                               {
+                                                       this->m_ListGroupContainer[info->groupName].push_back(item);
+                                                       return;
+                                               }
+                                       }//rof
+                                       this->m_GroupNameList.push_back(info->groupName);
+                                       this->m_ListGroupContainer[info->groupName].push_back(item);
+
+                               }//yrt
+                               catch ( const std::exception& e )
+                               {
+                                       std::cerr
+                                   << "ContainerSettings::AddButtons( BCStructVectorType infoList ) "
+                                   << "exception: " << e.what( ) << std::endl;
+                               }//hctac
+                       }
+
+       void
+               ButtonContainerSettings::AddItems(BCStructVectorType infoList)
+               {
+                       try
+                       {
+                               for( BCStructVectorType::iterator it = infoList.begin( ); it
+                                   != infoList.end( ); ++it )
+                               {
+                                       this->AddItem(*it);
+                               }//rof
+                       }//yrt
+                       catch ( const std::exception& e )
+                       {
+                               std::cerr
+                           << "ContainerSettings::AddButtons( BCStructVectorType infoList ) "
+                           << "exception: " << e.what( ) << std::endl;
+                       }//hctac
+               }
+
+
 // ----------------------------------------------------------------------------------
 }//ecapseman
 
index a502b9a37fed363c3e2cb5a95f80a27916d9a469..cdb3207783c62ad3a1a171201293cfa65abd2231 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <wx/panel.h>
 #include <wx/bitmap.h>
+#include <wx/listctrl.h>
 
 #include <list>
 #include <map>
@@ -45,6 +46,7 @@
 #include "containerSettings.h"
 #include "functor.h"
 
+
 /*!    @namespace <creaPanelButtonContainer>
  *     @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
  */
@@ -123,6 +125,12 @@ namespace creaPanelButtonContainer
                        /*! @class ButtonContainerSettings buttonContainerSettings.h "buttonContainerSettings.h"
                         *      @brief This class contains the settings of the button container.
                         */
+
+                       typedef wxListItem Item;
+                       typedef std::list < tList* > ItemsList;
+                       typedef std::map< StringType, ListLst > ListGroupMap;
+
+
                public:
                        // ----------------------------------------------------------------------------------
                        /*! @fn ButtonContainerSettings( );
@@ -173,6 +181,16 @@ namespace creaPanelButtonContainer
                         *      @brief This method sets the button group container.
                         * @param bGroupContainer
                         */
+
+                       // ----------------------------------------------------------------------------------
+
+                       ButtonGroupSettings*
+                       GetListGroupSettings();
+
+                       // ----------------------------------------------------------------------------------
+
+
+
                        void
                        SetButtonGroupContainer( ButtonGroupMap bGroupContainer );
                        // ----------------------------------------------------------------------------------
@@ -217,10 +235,19 @@ namespace creaPanelButtonContainer
                         */
                        void
                        AddButtons( BCStructVectorType infoList );
+
+                       void
+                       AddItem (BCPSettingsStruct* info);
+
+                       void
+                       AddItems( BCStructVectorType infoList );
+
                        // ----------------------------------------------------------------------------------
                private:
                        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.
+
+                       ListGroupMap m_ListGroupContainer;
        };
 }//ecapseman
 #endif /* BUTTONCONTAINERSETTINGS_H_ */
index 251e5f769144d9126c870a7b0da41cb58db9af93..70a5a6973533dc796852dbf26fcdd1e3614f325c 100644 (file)
@@ -41,9 +41,11 @@ namespace creaPanelButtonContainer
        // ----------------------------------------------------------------------------------
        typedef creaButtonContainer::model::TConcreteFunctor< PanelButtonContainer >   TConcreteFunctor;
        // ----------------------------------------------------------------------------------
-       PanelButtonContainer::PanelButtonContainer( wxWindow* parent,  ButtonContainerSettings* bcSettings ) 
+       PanelButtonContainer::PanelButtonContainer( wxWindow* parent,  ButtonContainerSettings* bcSettings, std::string type )
                : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("creaPanelButtonContainer") )
        {
+               std::cout<< std::endl << " MLER creaPanelButtonContainer.cxx / PanelButtonContainer() " << std::endl;
+
                this->m_ButtonContainerSettings = bcSettings;
                this->m_ButtonPanel = new wxPanel( this );
 
@@ -53,7 +55,7 @@ namespace creaPanelButtonContainer
 //             TConcreteFunctor* functor = new TConcreteFunctor( this->m_ButtonPanel, &PanelButtonContainer::GenericButtonEvent );
                //end of the event definition
 
-               this->m_ButtonContainerPanel = new ButtonContainerPanel( this, this->m_ButtonContainerSettings->GetButtonGroupSettings( functor ) );
+               this->m_ButtonContainerPanel = new ButtonContainerPanel( this, this->m_ButtonContainerSettings->GetButtonGroupSettings( functor ),type );
 
                //Using AuiManager to Manage the Panels
                this->m_AuiManager = new wxAuiManager( this, wxAUI_MGR_DEFAULT );
index 9b752a64102b97ea21b99b11f706cf8b2b86ca12..deb21348fde8ac24fe1d83c087ff5addf715ed9a 100644 (file)
@@ -76,7 +76,7 @@ namespace creaPanelButtonContainer
                         *      @param bcSettings //The buttonContainerSettings
                         */
                        PanelButtonContainer( wxWindow* parent,
-                           ButtonContainerSettings* bcSettings );
+                           ButtonContainerSettings* bcSettings, std::string type );
                        // ----------------------------------------------------------------------------------
                        /*! @fn virtual PanelButtonContainer( );
                         *      @brief This is the destructor.
index 6802a2422d74db74b19ffc6ddd54c969818a4e54..48681549b176dcd8cb0b1a53d688041b785f8400 100755 (executable)
@@ -36,6 +36,7 @@
 #include <string>
 #include <wx/panel.h>
 #include <wx/bitmap.h>
+#include "tlist.h"
 
 /*!    @namespace <creaPanelButtonContainer>
  *     @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
@@ -53,6 +54,11 @@ namespace creaPanelButtonContainer
                        wxBitmap icon; //! <The icon of the button.
                        std::string buttonDescription; //! <The description of the button.
                        wxPanel* panel; //! <The panel of the button.
+
+                       //===MLER===
+                       std::string type;                       //!<Tipo contenedor>
+                       std::string itemsList;
+
        };
 }
 #endif //STRUCTBCPSETTINGS_H_