]> Creatis software - creaMaracasVisu.git/commitdiff
#2507 creaMaracasVisu Feature New Normal - creaPanelButtonContainerListPanel
authormonica <monica@localhost.localdomain>
Mon, 19 Jan 2015 12:41:48 +0000 (13:41 +0100)
committermonica <monica@localhost.localdomain>
Mon, 19 Jan 2015 12:41:48 +0000 (13:41 +0100)
17 files changed:
bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/listGroupFactory.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/buttonManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.h
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

index abbdd39f219392c8c0b1fe61f4d3e67b552ffb05..85f630b0b402d553d57d05829aef89790a328451 100644 (file)
@@ -43,14 +43,9 @@ PanelButtonContainer::Process( )
        ButtonContainerSettings* settings = new ButtonContainerSettings( );
        printf("EED PanelButtonContainer::Process %d\n", bbGetInputIn( ).size() );
 
-       //if(bbGetInputType()== "1")
-       //{
-         // settings->AddItems(bbGetInputIn());
-          
-       //}
-       //else {
-         settings->AddButtons(bbGetInputIn( ));
-       //}
+
+         settings->AddButtons(bbGetInputIn( ), bbGetInputType());
+
 
        
        PBContainer* panel = new PBContainer( myPanel, settings, bbGetInputType() );
index 1d1adba9c068da3d0d81dd35755b5da007fed0c8..54559d904b6953b166917dd19f5fcc5a773bdfb9 100644 (file)
@@ -24,7 +24,7 @@
 # ------------------------------------------------------------------------ */
 
 
-#include "listGroupFactory.h"
+/*#include "listGroupFactory.h"
 
 namespace creaButtonContainer
 {
@@ -89,5 +89,5 @@ namespace creaButtonContainer
                }
        // ----------------------------------------------------------------------------------
        }//ecapseman
-}//ecapseman
+}//ecapseman*/
 
index a90a26a503a235b4c9e1d9caf11828ee9f103f86..aece2e4cb94a2bd482d865dd84be37bef439579b 100644 (file)
@@ -23,7 +23,7 @@
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------ */
 
-#ifndef LISTGROUPFACTORY_H
+/*#ifndef LISTGROUPFACTORY_H
 #define LISTGROUPFACTORY_H
 
 #include <wx/window.h>
@@ -79,4 +79,4 @@ namespace creaButtonContainer
        }//ecapseman
 }//ecapseman
 
-#endif // LISTGROUPFACTORY_H
+#endif // LISTGROUPFACTORY_H*/
index bdd564998b6cc042961643972084819c7d13d842..fb273461149a021192d3b7a739a1fc53efd5e25b 100644 (file)
@@ -49,7 +49,7 @@ namespace creaButtonContainer
                        std::cout<< std::endl << " MLER buttonContainerPanel.cxx / ButtonContainerPanel() " << std::endl;
 
                        ButtonGroupFactory factory;
-                       ListGroupFactory listFactory;
+                       //ListGroupFactory listFactory;
 
                        //MLER this->SetButtonGroupContainer( factory.CreateButtonGroupContainer( this, settings ) );
 
@@ -59,10 +59,10 @@ namespace creaButtonContainer
                        case 0:
                                this->SetButtonGroupContainer( factory.CreateButtonGroupContainer( this, settings ) );
                        break;
-                       case 1:
-                               this->SetListGroupContainer(listFactory.CreateButtonGroupContainer( this, settings ) );
+                       //case 1:
+                               //this->SetListGroupContainer(listFactory.CreateButtonGroupContainer( this, settings ) );
                                                                // MLER Verificar ButtonGroupList contra ListGroupList
-                       break;
+                       //break;
                        default:
                                this->SetButtonGroupContainer(factory.CreateButtonGroupContainer( this, settings ) );
                        }
@@ -84,10 +84,10 @@ namespace creaButtonContainer
                        this->m_ButtonGroupList = groupContainer;
                }
                // ----------------------------------------------------------------------------------
-               void ButtonContainerPanel::SetListGroupContainer(ListGroupList groupContainer )
+               /*void ButtonContainerPanel::SetListGroupContainer(ListGroupList groupContainer )
                {
                        this->m_ListGroupList = groupContainer;
-               }
+               }*/
                
                // ----------------------------------------------------------------------------------
                void ButtonContainerPanel::PanelInit( int type )
@@ -108,7 +108,7 @@ namespace creaButtonContainer
                                                this->m_Sizer->Add( manager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
                                        }
                                }
-                               else
+                               /*else
                                {
                                        for(ListGroupList::iterator it1 = this->m_ListGroupList.begin(); it1 != this->m_ListGroupList.end(); ++it1)
                                        {
@@ -116,7 +116,7 @@ namespace creaButtonContainer
                                                this->m_GroupManagerList[ manager->GetButtonID( ) ] = manager;
                                                this->m_Sizer->Add( manager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
                                        }
-                               }//MLER
+                               }//MLER*/
 
                                this->SetSizer( this->m_Sizer );
                                this->Layout( );
index 8fdc3b6bec91dc18a3a9a833b4e20dc02808e202..7696062979c0a7256f4f28a212110c35be76580c 100644 (file)
@@ -133,11 +133,11 @@ namespace creaButtonContainer
                                typedef creaButtonContainer::controller::ButtonContainerController
                                    BCController;
 
-                               typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
+                               //typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
 
-                               typedef creaButtonContainer::view::ListGroup ListGroup;
+                               //typedef creaButtonContainer::view::ListGroup ListGroup;
 
-                               typedef std::list< ListGroup* > ListGroupList;
+                               //typedef std::list< ListGroup* > ListGroupList;
 
                                //typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
 
@@ -172,8 +172,8 @@ namespace creaButtonContainer
                                PanelInit( int type);
                                // ----------------------------------------------------------------------------------
 
-                               void
-                               SetListGroupContainer(ListGroupList groupContainer );
+                               //void
+                               //SetListGroupContainer(ListGroupList groupContainer );
                                // ----------------------------------------------------------------------------------
                                /*! @fn FitSizer( );
                                 * This method fits and organizes the sizer.
@@ -189,7 +189,7 @@ namespace creaButtonContainer
                                BCController* m_ButtonCController; //!<Pontier to controller.
                                Sizer* m_Sizer; //!<Pointer to wxSizer
 
-                               ListGroupList m_ListGroupList;
+                               //ListGroupList m_ListGroupList;
                        DECLARE_EVENT_TABLE() //!<Event Table declaration.
                };
        }//ecapseman
index dc793d537a0c123391a4fc10a781f502e4a1de68..62220ff9054d2f852f842eebcd0531110ad370d0 100644 (file)
@@ -60,7 +60,7 @@ namespace creaButtonContainer
                }
                // ----------------------------------------------------------------------------------
                //MLER
-               ButtonManager::ButtonManager (ListGroup* buttonGroup):
+               /*ButtonManager::ButtonManager (ListGroup* buttonGroup):
                                wxFlexGridSizer( 0, 1, 0, 0 )
                {
                        try
@@ -73,7 +73,7 @@ namespace creaButtonContainer
                        {
                                std::cerr << "Button::Execute( ) exception: " << e.what( ) << std::endl;
                        }//hctac
-               }
+               }*/
                // ----------------------------------------------------------------------------------
                ButtonManager::~ButtonManager( )
                {
@@ -110,7 +110,7 @@ namespace creaButtonContainer
                }
                // ----------------------------------------------------------------------------------
 
-               void ButtonManager::SetListManager(ListContainer buttonContainer )
+               /*void ButtonManager::SetListManager(ListContainer buttonContainer )
                {
                        try
                        {
@@ -130,7 +130,7 @@ namespace creaButtonContainer
                                << "ButtonManager::SetButtonManager( ButtonContainer buttonContainer )"
                                << "exception: " << e.what( ) << std::endl;
                        }//hctac
-               }
+               }*/
                // ----------------------------------------------------------------------------------
 
 
index 88eeb5f69c64951c5e0922b42b1c2fccf8f1b08a..7edb9bc655716d9e13513494d2d4910f5e3403ac 100644 (file)
@@ -83,8 +83,8 @@ namespace creaButtonContainer
                                typedef std::map< long, Button* > ButtonContainer;
                                // ----------------------------------------------------------------------------------
                                //MLER
-                               typedef creaButtonContainer::view::ListGroup ListGroup;
-                               typedef std::map<long, ListWx* > ListContainer;
+                               //typedef creaButtonContainer::view::ListGroup ListGroup;
+                               //typedef std::map<long, ListWx* > ListContainer;
 
                                //end of typedef definition.
                        public:
@@ -102,7 +102,7 @@ namespace creaButtonContainer
                                ButtonManager( ButtonGroup* buttonGroup );
                                // ----------------------------------------------------------------------------------
                                //MLER
-                               ButtonManager (ListGroup* buttonGroup);
+                               //ButtonManager (ListGroup* buttonGroup);
                                // ----------------------------------------------------------------------------------
 
                                /*! @fn ~ButtonManager( );
@@ -142,8 +142,8 @@ namespace creaButtonContainer
                                SetButtonManager( ButtonContainer buttonContainer );
                                // ----------------------------------------------------------------------------------
                                //MLER
-                               void
-                               SetListManager( ListContainer buttonContainer );
+                               /*void
+                               SetListManager( ListContainer buttonContainer );*/
                                // ----------------------------------------------------------------------------------
 
 
index 1cec6714d28672bef858f22a6f67155840cf733f..99747233decfeded124452141cab2191c14b49e9 100644 (file)
@@ -49,7 +49,7 @@ namespace creaButtonContainer
                        this->Add( this->m_ButtonManager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
                }
                
-               GroupManager::GroupManager(wxWindow* parent, ListGroup* buttonGroup ):
+               /*GroupManager::GroupManager(wxWindow* parent, ListGroup* buttonGroup ):
                                wxFlexGridSizer( 1, 0, 0, 0 )
                {
                        std::cout << " MLER groupManager.cxx / GroupManager(ListGroup* buttonGroup) " << std::endl;
@@ -58,7 +58,7 @@ namespace creaButtonContainer
                        this->Add( m_ExpansionButton, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
                        this->m_ButtonManager = new ButtonManager( buttonGroup );
                        this->Add( this->m_ButtonManager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
-               }//MLER
+               }//MLER*/
 
                // ----------------------------------------------------------------------------------
                GroupManager::~GroupManager( )
index 1d84118fc89f1027f441a11ef0c5ea0e12958fe0..ab69ab4cbf29888a617d143672941f41f8fa2925 100644 (file)
@@ -77,7 +77,7 @@ namespace creaButtonContainer
                                typedef wxButton ExpansionButton;
                                // ----------------------------------------------------------------------------------
                                //MLER
-                               typedef creaButtonContainer::view::ListGroup ListGroup;
+                               //typedef creaButtonContainer::view::ListGroup ListGroup;
 
                                //end of typedef definition.
                        public:
@@ -91,7 +91,7 @@ namespace creaButtonContainer
                                // ----------------------------------------------------------------------------------
 
                                //MLER
-                               GroupManager( wxWindow* parent, ListGroup* listGroup );
+                               //GroupManager( wxWindow* parent, ListGroup* listGroup );
                                /*! @fn ~GroupManager( );
                                 *  @brief This is the destructor.
                                */
index 92295a1cac8cb79c6d249461aad8a7d2af79c146..9ba6cee0e3386a3065da0ba4a54eddd486135fe4 100644 (file)
@@ -23,7 +23,7 @@
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------ */
 
-#include "listGroup.h"
+/*#include "listGroup.h"
 
 namespace creaButtonContainer
 {
@@ -93,4 +93,4 @@ namespace creaButtonContainer
                }
        // ----------------------------------------------------------------------------------
        }//ecapseman
-}//ecapseman
+}//ecapseman*/
index c34701055375d52dbf197fae2dd53c669f621e7a..494fe33800dfb48c827e90f1bc7e9aca026c5551 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef LISTGROUP_H
 #define LISTGROUP_H
 
-//Library Definition
+/*//Library Definition
 #include <wx/stattext.h>
 
 #include <map>
@@ -79,6 +79,6 @@ namespace creaButtonContainer
                                ButtonContainer m_Buttons; //!<A container with buttons.
                };
        }//ecapseman
-}//ecapseman
+}//ecapseman*/
 
 #endif // LISTGROUP_H
index facd7f02ea39638e0c87342c72b97c04689ebc32..868e331da4a37f8e2c5ed888493d8fc2b34a47b6 100644 (file)
@@ -31,36 +31,17 @@ namespace creaButtonContainer
        namespace view
        {
                // ----------------------------------------------------------------------------------
-               ListWx::ListWx( wxWindow* parent, long id, ButtonPair* pair )
+               ListWx::ListWx( wxWindow* parent, wxWindowID id, ItemsMap iMap , TFunctor* functor ): wxListCtrl(parent,id)
                {
-                       this->m_ButtonPair                      = pair;
-                       StringType wXbuttonName         = this->m_ButtonPair->first->first;
-                       BitmapType wXicon               = this->m_ButtonPair->first->second;
-                       StringType wXdescription        = this->m_ButtonPair->second->first;
-                       wxString buttonName( wXbuttonName.c_str( ), wxConvUTF8 );
-                       wxString description( wXdescription.c_str( ), wxConvUTF8 );
-                       //creating the button.
-                       //this->Create( parent, id,
-                               //      wXicon,
-                           //wxDefaultPosition, wxDefaultSize,wxBU_AUTODRAW, wxDefaultValidator,
-                           //buttonName );
-                       this->Create( parent, id,
-                                                   wxDefaultPosition, wxDefaultSize,wxLC_LIST, wxDefaultValidator,
-                                                   buttonName );
-                       this->SetToolTip( description );
-
-
-                               long index = this->InsertItem(0, _("John Smith"));
-                           this->SetItem(index, 1, _("jsmith"));
-
-                           index = this->InsertItem(1, _("Monica"));
-                           this->SetItem(index, 1, _("monica"));
-
-                           index = this->InsertItem(2, _("Momo"));
-                           this->SetItem(index, 2, _("momo"));
-
-
-
+                       this->m_itemsMap = iMap;
+                       this->functor = functor;
+                       for (ItemsMap::iterator it=this->m_itemsMap.begin(); it!=this->m_itemsMap.end(); ++it)
+                       {
+                               std::string key = it->first;
+                               long index = this->InsertItem(0,  wxString::From8BitData(key.c_str()));
+                               //this->Connect( index, wxEVT_LIST_ITEM_SELECTED,
+                                       //                                          (wxObjectEventFunction) &ListWx::ButtonEvent );
+                       }
                }
 
                // ----------------------------------------------------------------------------------
@@ -68,47 +49,19 @@ namespace creaButtonContainer
                {
                }
 
-               // ----------------------------------------------------------------------------------
-               StringType
-               ListWx::GetButtonName( )
-               {
-                       return ( this->m_ButtonPair->first->first );
-               }
-
-               // ----------------------------------------------------------------------------------
-               BitmapType
-               ListWx::GetIcon( )
-               {
-                       return ( this->m_ButtonPair->first->second );
-               }
-
-               // ----------------------------------------------------------------------------------
-               /*StringType
-               Button::GetIconPath( )
-               {
-                       return ( this->m_ButtonPair->first->second );
-               }*/
-
-               // ----------------------------------------------------------------------------------
-               StringType
-               ListWx::GetDescription( )
-               {
-                       return ( this->m_ButtonPair->second->first );
-               }
-
-               // ----------------------------------------------------------------------------------
                void
-               ListWx::Execute( )
+               ListWx::ButtonEvent( wxCommandEvent& event )
                {
                        try
                        {
-                               TFunctor* vTable[ ] =
-                               { this->m_ButtonPair->second->second };
-                               vTable[ 0 ]->Call( this->m_ButtonPair->first->first );
+                               //MLDR - Aqui necesita el nombre de la funcion para poderla ejecutar
+                               this->functor->Call("PanelButtonContainer::GenericButtonEvent");
                        }//yrt
                        catch ( const std::exception& e )
                        {
-                               std::cerr << "Button::Execute( ) exception: " << e.what( ) << std::endl;
+                               std::cerr
+                                   << "ButtonContainerController::ButtonEvent( wxCommandEvent& event ) exception: "
+                                   << e.what( ) << std::endl;
                        }//hctac
                }
        // ----------------------------------------------------------------------------------
index 905dbec35612b45dc4f1678b313b84e8815156ad..970799c44088320653534ee6c3639bae1899ed0e 100644 (file)
 #define LISTWX_H
 
 //#include <wx/bmpbuttn.h>
+#include <wx/panel.h>
 #include <wx/image.h>
 #include <wx/string.h>
 #include <wx/bitmap.h>
 #include <wx/listctrl.h>
+#include <map>
+#include <cstring>
+#include "functor.h"
 
 #include "system.h"
 
@@ -46,10 +50,10 @@ namespace creaButtonContainer
                        public:
 
                                typedef creaButtonContainer::model::TFunctor TFunctor;
-
+                               typedef std::map<std::string, wxPanel*> ItemsMap;
                        public:
 
-                               ListWx( wxWindow* parent, long id, ButtonPair* pair );
+                               ListWx( wxWindow* parent, wxWindowID id, ItemsMap iMap , TFunctor* functor );
                                // ----------------------------------------------------------------------------------
 
                                virtual
@@ -58,27 +62,13 @@ namespace creaButtonContainer
 
                                long
                                GetID( );
-                               // ----------------------------------------------------------------------------------
-
-                               StringType
-                               GetButtonName( );
-
-                               // ----------------------------------------------------------------------------------
-
-                               BitmapType
-                               GetIcon( );
-
-                               // ----------------------------------------------------------------------------------
-
-                               StringType
-                               GetDescription( );
-                               // ----------------------------------------------------------------------------------
 
                                void
-                               Execute( );
+                               ButtonEvent( wxCommandEvent& event );
                                // ----------------------------------------------------------------------------------
                        private:
-                               ButtonPair* m_ButtonPair; //! <The pair with the button information.
+                               ItemsMap m_itemsMap; //! <The pair with the button information.
+                               TFunctor* functor;
 
                };
        }//ecapseman
index e6c991b182b48972a1536be652a43b746b68b073..a0d1ff43e919da508fda06fae53fae68b48600dc 100644 (file)
@@ -226,14 +226,17 @@ namespace creaPanelButtonContainer
        
        // ----------------------------------------------------------------------------------
        void
-       ButtonContainerSettings::AddButtons( BCStructVectorType infoList )
+       ButtonContainerSettings::AddButtons( BCStructVectorType infoList, int type )
        {
                try
                {
                        for( BCStructVectorType::iterator it = infoList.begin( ); it
                            != infoList.end( ); ++it )
                        {
-                               this->AddButton( *it );
+                               if( type == 0 )
+                                       this->AddButton( *it );
+                               else if( type == 1 )
+                                       this->AddItems(*it);
                        }//rof
                }//yrt
                catch ( std::exception& e )
@@ -244,6 +247,39 @@ namespace creaPanelButtonContainer
                }//hctac
        }
 
+       void
+       ButtonContainerSettings::AddItems(BCPSettingsStruct* info)
+       {
+               try
+               {
+                       //builds the button information
+                       //I don't know the try catch doesn't work!!
+                       if ( info->panel == NULL )
+                       {
+                               std::cerr << "ButtonContainerSettings::AddButton"
+                                   << "exception: NULL Pointer in panel " << std::endl;
+                               exit( 1 );
+                       }
+                       info->panel->Show( false );
+                       std::string mapKey = info->groupName + ":" + info->buttonName;
+                       m_itemsMap[mapKey] = info->panel;
+
+               }//yrt
+               catch ( const std::exception& e )
+               {
+                       std::cerr
+                       << "ButtonContainerSettings::AddButton( BCPSettingsStruct* info )"
+                       << "exception: " << e.what( ) << std::endl;
+                       exit( 1 );
+               }//hctac
+       }
+
+       ButtonContainerSettings::ItemsMap
+       ButtonContainerSettings::GetItemsMap()
+       {
+               return m_itemsMap;
+       }
+
 
 // ----------------------------------------------------------------------------------
 }//ecapseman
index 329ced9f1b7f5c3d6b9d868027e7e09d04c136e3..e88f08dbe73cd6fbdcac8332db9645c54dbc0156 100644 (file)
@@ -126,7 +126,7 @@ namespace creaPanelButtonContainer
                         *      @brief This class contains the settings of the button container.
                         */
 
-
+                       typedef std::map< std::string, wxPanel* > ItemsMap;
                public:
                        // ----------------------------------------------------------------------------------
                        /*! @fn ButtonContainerSettings( );
@@ -230,7 +230,13 @@ namespace creaPanelButtonContainer
                         * @exception std::bad_alloc
                         */
                        void
-                       AddButtons( BCStructVectorType infoList );
+                       AddButtons( BCStructVectorType infoList, int type );
+
+                       void
+                       AddItems(BCPSettingsStruct* info);
+
+                       ItemsMap
+                       GetItemsMap();
 
 
                        // ----------------------------------------------------------------------------------
@@ -238,6 +244,8 @@ namespace creaPanelButtonContainer
                        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.
 
-                       };
+                       //MLER
+                       ItemsMap m_itemsMap; //This is the map with the name and the wPanel
+               };
 }//ecapseman
 #endif /* BUTTONCONTAINERSETTINGS_H_ */
index ea943d82b1ddf19c0d1c152b99e4ba0b401c2ab8..d377773c6c77f6d61bb9dfaae82ee6218b21ac89 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "creaPanelButtonContainer.h"
 
+
 namespace creaPanelButtonContainer
 {
        BEGIN_EVENT_TABLE(PanelButtonContainer,wxPanel)
@@ -55,14 +56,25 @@ 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 ),type );
+
+               wxPanel* listPanel = new wxPanel(this);
+
+               if(type == 0)
+                       this->m_ButtonContainerPanel = new ButtonContainerPanel( this, this->m_ButtonContainerSettings->GetButtonGroupSettings( functor ),type );
+               else if( type == 1)
+                       this->mylist = new ListWx(listPanel, -1, this->m_ButtonContainerSettings->GetItemsMap(), functor);
+               //MLER
+
 
                //Using AuiManager to Manage the Panels
                this->m_AuiManager = new wxAuiManager( this, wxAUI_MGR_DEFAULT );
 
                this->m_AuiManager->AddPane(this->m_ButtonPanel, wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption( _("Panel") ). CaptionVisible(true ).CloseButton( false ).Bottom( ).Resizable( true ) );
                //CartoButtonPanel Management
-               this->m_AuiManager->AddPane( this->m_ButtonContainerPanel,wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(_("creaButtonContainer") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) );
+               if(type == 0)
+                       this->m_AuiManager->AddPane( this->m_ButtonContainerPanel,wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(_("creaButtonContainer") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) );
+               else
+                       this->m_AuiManager->AddPane( listPanel,wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(_("creaButtonContainer") ). CaptionVisible( false ).CloseButton(false ).Center( ).Resizable( true ) );
                this->m_AuiManager->Update( );
        }
        // ----------------------------------------------------------------------------------
index f20232ba4ae9cdcd8f879af1ac374fc243df0a39..acbe800b098aca3c7b1cb205f3bb7ebe1f21ecea 100644 (file)
@@ -41,6 +41,7 @@
 #include "buttonContainerPanel.h"
 #include "buttonContainerSettings.h"
 #include "functor.h"
+#include "listWx.h"
 
 /*!    @namespace <creaPanelButtonContainer>
  *     @brief Contains the creaPanelButtonContainer library included in creaMaracasVisu.
@@ -66,6 +67,7 @@ namespace creaPanelButtonContainer
                         */
                        typedef creaButtonContainer::view::ButtonContainerPanel
                            ButtonContainerPanel;
+                       typedef creaButtonContainer::view::ListWx ListWx;
                        // ----------------------------------------------------------------------------------
                        //end of typedef definition.
                public:
@@ -107,6 +109,10 @@ namespace creaPanelButtonContainer
                        ButtonContainerPanel* m_ButtonContainerPanel; //!<This is the panel with de buttons (creaButtonContainer)
                        wxAuiManager* m_AuiManager; //!<The AUI Manager for the panels.
                        wxPanel* m_ButtonPanel; //!<This is the panel used to contain the panels of the buttons. (it changes with the buttonAction)
+
+
+                       ListWx* mylist; //MLER
+
                DECLARE_EVENT_TABLE() //!<Event Table declaration.
        };
 }//ecapseman