# 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"
}
// ----------------------------------------------------------------------------------
- ListGroupFactory::ListGroupContainer ListGroupFactory::CreateListGroupContainer(wxWindow* parent,ListModel* settings )
+ ListGroupFactory::ButtonGroupContainer ListGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings )
{
- ListGroupContainer groupView;
+ ButtonGroupContainer groupView;
try
{
- ListGroupMap map = settings->GetListGroupContainer( );
- for( ListGroupMap::iterator it = map.begin( ); it != map.end( ); ++it )
+ std::cout<< std::endl << " MLER listGroupFactory.cxx / CreateButtonGroupContainer(): " << std::endl;
+ ButtonGroupMap map = settings->GetButtonGroupContainer( );
+ for( ButtonGroupMap::iterator it = map.begin( ); it != map.end( ); ++it )
{
- wxString groupNameAux( ( *it ).first.c_str( ), wxConvUTF8 );//nombre grupo
+ wxString groupNameAux( ( *it ).first.c_str( ), wxConvUTF8 );
wxStaticText* wxGroupName = new wxStaticText( parent, -1, groupNameAux, wxDefaultPosition, wxDefaultSize, 0, _T("GroupText") );
- ListGroup* group = new ListGroup( wxGroupName, this->GetList( parent, ( *it ).second ) );
- //ListGroup* group;
+ ButtonGroup* group = new ButtonGroup( wxGroupName, this->GetButtons( parent, ( *it ).second ) );
groupView.push_back( group );
}//rof
}//yrt
catch ( const std::exception& e )
{
std::cerr
- << "ListGroupFactory::CreateListGroupContainer( wxWindow* parent, ListModel* settings )"
+ << "ButtonGroupFactory::CreateButtonGroupContainer( wxWindow* parent, ButtonGroupModel* settings )"
<< " exception: " << e.what( ) << std::endl;
}//chtac
return ( groupView );
// ----------------------------------------------------------------------------------
- ListGroupFactory::ListContainer ListGroupFactory::GetList( wxWindow* parent, tlist lst )
+ ListGroupFactory::ButtonContainer ListGroupFactory::GetButtons( wxWindow* parent, ButtonList buttonModel )
{
- ListContainer cList;
-
+ ButtonContainer buttonList;
try
{
- /*List list = new List(parent,items);
-
- cList.push_back(list);
- //return ( buttonList ); // JPR*/
- }//yrt
+ for( ButtonList::iterator it = buttonModel.begin( ); it
+ != buttonModel.end( ); ++it )
+ {
+ long id = wxNewId( );
+ buttonList[ id ] = new Button( parent, id, *it );
+ }
+ }
catch ( const std::exception& e )
{
std::cerr
<< "exception: " << e.what( ) << std::endl;
}//chtac
- return ( cList ); // JPR
+ return ( buttonList ); // JPR
}
// ----------------------------------------------------------------------------------
}//ecapseman
}//ecapseman
+