--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaMaracasVisuPanelButtonContainer.h"
+#include "bbcreaMaracasVisuPackage.h"
+namespace bbcreaMaracasVisu
+{
+
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,PanelButtonContainer)
+ BBTK_BLACK_BOX_IMPLEMENTATION(PanelButtonContainer,bbtk::WxBlackBox)
+;
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainer::Process( )
+{
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainer::CreateWidget( wxWindow* parent )
+{
+ this->myPanel = new wxPanel( parent, -1 );
+ wxWindow* ww = bbCreateWidgetOfInput( "In", this->myPanel );
+ ButtonContainerSettings* settings = new ButtonContainerSettings( );
+ settings->AddButtons( bbGetInputIn( ) );
+ PBContainer* panel = new PBContainer( myPanel,
+ settings );
+ wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL );
+ sizer->Add( panel, 1, wxEXPAND, 0 );
+ this->myPanel->SetSizer(sizer);
+ bbSetOutputWidget( myPanel);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainer::bbUserSetDefaultValues( )
+{
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainer::bbUserInitializeProcessing( )
+{
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainer::bbUserFinalizeProcessing( )
+{
+
+}
+}
+// EO namespace bbcreaMaracasVisu
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifdef _USE_WXWIDGETS_
+#ifndef __bbcreaMaracasVisuPanelButtonContainer_h_INCLUDED__
+#define __bbcreaMaracasVisuPanelButtonContainer_h_INCLUDED__
+#include "bbcreaMaracasVisu_EXPORT.h"
+#include "bbtkWxBlackBox.h"
+#include <structButtonContainerSettings.h>
+#include <buttonContainerSettings.h>
+#include <creaPanelButtonContainer.h>
+
+namespace bbcreaMaracasVisu
+{
+ typedef creaPanelButtonContainer::ButtonContainerSettings ButtonContainerSettings;
+ typedef creaPanelButtonContainer::PanelButtonContainer PBContainer;
+ typedef std::vector< BCSettingsStruct* > BCStructVectorType;
+class bbcreaMaracasVisu_EXPORT PanelButtonContainer
+ :
+ public bbtk::WxBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(PanelButtonContainer,bbtk::WxBlackBox);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+ BBTK_DECLARE_INPUT(Title,std::string);
+ BBTK_DECLARE_INPUT(In,BCStructVectorType);
+ BBTK_PROCESS(Process);
+ void Process();
+ BBTK_CREATE_WIDGET(CreateWidget);
+ void CreateWidget(wxWindow*);
+ private:
+ wxPanel* myPanel;
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(PanelButtonContainer,bbtk::WxBlackBox);
+BBTK_NAME("PanelButtonContainer");
+BBTK_AUTHOR("caceres@creatis.insa-lyon.fr");
+BBTK_DESCRIPTION("This blackbox creates a Widget of creaButtonContainerPanel");
+BBTK_CATEGORY("__CategoryBlackBox__");
+BBTK_INPUT(PanelButtonContainer,Title,"Title prepended to the text",std::string,"");
+BBTK_INPUT(PanelButtonContainer,In,"ButtonContainerSettings List",BCStructVectorType,"");
+BBTK_END_DESCRIBE_BLACK_BOX(PanelButtonContainer);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+}
+// EO namespace bbcreaMaracasVisu
+
+#endif // __bbcreaMaracasVisuPanelButtonContainer_h_INCLUDED__
+#endif // _USE_WXWIDGETS_
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaMaracasVisuPanelButtonContainerSettings.h"
+#include "bbcreaMaracasVisuPackage.h"
+namespace bbcreaMaracasVisu
+{
+
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,PanelButtonContainerSettings)
+ BBTK_BLACK_BOX_IMPLEMENTATION(PanelButtonContainerSettings,bbtk::WxBlackBox)
+;
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainerSettings::Process( )
+{
+
+ // std::string msg;
+ // if (bbGetInputTitle()!="")
+ // {
+ // msg = bbGetInputTitle()+": " + bbGetInputIn();
+ // }
+ // else
+ // {
+ // msg = bbGetInputIn();
+ // }
+ // ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) );
+
+ this->m_BSettings->groupName = bbGetInputGroupName( );
+ this->m_BSettings->buttonName = bbGetInputButtonName( );
+ this->m_BSettings->buttonDescription = bbGetInputButtonDescription( );
+ this->m_BSettings->iconpath = bbGetInputIconpath( );
+ this->m_BSettings->panel = this->myPanel;
+ this->m_BCSettingsVector = bbGetInputIn();
+ this->m_BCSettingsVector.push_back( this->m_BSettings );
+ bbSetOutputOut( bbGetInputIn() );
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainerSettings::CreateWidget( wxWindow* parent )
+{
+ this->myPanel = new wxPanel( parent, -1 );
+ wxWindow* w = bbCreateWidgetOfInput("Widget", myPanel);
+ wxWindow* ww = bbCreateWidgetOfInput("In", parent);
+
+ wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
+ sizer->Add(w,1,wxEXPAND, 0);
+ this->myPanel->SetSizer(sizer);
+ bbSetOutputWidget( myPanel );
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainerSettings::bbUserSetDefaultValues( )
+{
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainerSettings::bbUserInitializeProcessing( )
+{
+ this->m_BSettings = new BCSettingsStruct();
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void
+PanelButtonContainerSettings::bbUserFinalizeProcessing( )
+{
+
+}
+}
+// EO namespace bbcreaMaracasVisu
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifdef _USE_WXWIDGETS_
+#ifndef __bbcreaMaracasVisuPanelButtonContainerSettings_h_INCLUDED__
+#define __bbcreaMaracasVisuPanelButtonContainerSettings_h_INCLUDED__
+#include "bbcreaMaracasVisu_EXPORT.h"
+#include "bbtkWxBlackBox.h"
+
+#include <string>
+#include <vector>
+
+#include <structButtonContainerSettings.h>
+
+namespace bbcreaMaracasVisu
+{
+ typedef std::vector< BCSettingsStruct* > BCStructVectorType;
+ class bbcreaMaracasVisu_EXPORT PanelButtonContainerSettings :
+ public bbtk::WxBlackBox
+ {
+ BBTK_BLACK_BOX_INTERFACE(PanelButtonContainerSettings,bbtk::WxBlackBox);
+ //=====
+ // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+ //=====
+ BBTK_DECLARE_INPUT(Title,std::string);
+ BBTK_DECLARE_INPUT(In,BCStructVectorType);
+ BBTK_DECLARE_INPUT(GroupName,std::string);
+ BBTK_DECLARE_INPUT(ButtonName,std::string);
+ BBTK_DECLARE_INPUT(Iconpath,std::string);
+ BBTK_DECLARE_INPUT(ButtonDescription,std::string);
+ BBTK_DECLARE_INPUT(Widget,wxWindow*);
+ BBTK_DECLARE_OUTPUT(Out,BCStructVectorType);
+ BBTK_PROCESS(Process);
+
+ void
+ Process( );BBTK_CREATE_WIDGET(CreateWidget);
+ void
+ CreateWidget( wxWindow* );
+
+ private:
+ BCSettingsStruct* m_BSettings;
+ BCStructVectorType m_BCSettingsVector;
+ wxPanel* myPanel;
+ //=====
+ // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+ //=====
+ };
+
+ BBTK_BEGIN_DESCRIBE_BLACK_BOX(PanelButtonContainerSettings,bbtk::WxBlackBox);
+ BBTK_NAME("PanelButtonContainerSettings");
+ BBTK_AUTHOR("Info-Dev");
+ BBTK_DESCRIPTION("_description_");
+ BBTK_CATEGORY("__CategoryBlackBox__");
+ BBTK_INPUT(PanelButtonContainerSettings,Title,"Title prepended to the text",std::string,"");
+ BBTK_INPUT(PanelButtonContainerSettings,In,"ButtonContainerSettings List",BCStructVectorType,"");
+ BBTK_INPUT(PanelButtonContainerSettings,GroupName,"Group Name",std::string,"");
+ BBTK_INPUT(PanelButtonContainerSettings,ButtonName,"Button Name",std::string,"");
+ BBTK_INPUT(PanelButtonContainerSettings,Iconpath,"The path of the Icon",std::string,"");
+ BBTK_INPUT(PanelButtonContainerSettings,ButtonDescription,"Full description of the button",std::string,"");
+ BBTK_INPUT(PanelButtonContainerSettings,Widget,"Panel associated to the button",wxWindow*,"");
+ BBTK_OUTPUT(PanelButtonContainerSettings,Out,"ButtonContainerSettings List",BCStructVectorType,"");
+ BBTK_END_DESCRIBE_BLACK_BOX(PanelButtonContainerSettings);
+ //=====
+ // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+ //=====
+}
+// EO namespace bbcreaMaracasVisu
+
+#endif // __bbcreaMaracasVisuPanelButtonContainerSettings_h_INCLUDED__
+#endif // _USE_WXWIDGETS_
}
void
- ButtonContainerSettings::AddButtons( BCSetListType infoList )
+ ButtonContainerSettings::AddButtons( BCStructVectorType infoList )
{
- for( BCSetListType::iterator it = infoList.begin( ); it
+ for( BCStructVectorType::iterator it = infoList.begin( ); it
!= infoList.end( ); ++it )
{
- BCSettingsStruct* info = *it;
- this->AddButton( info );
+ this->AddButton( *it );
}//rof
}
#include <list>
#include <map>
#include <wx/panel.h>
+#include <vector>
#include "structButtonContainerSettings.h"
#include "containerSettings.h"
typedef std::list< std::string > KeyMapList;
typedef std::list< ButtonPair* > ButtonList;
typedef std::map< std::string, ButtonList > ButtonGroupMap;
- typedef std::list< BCSettingsStruct* > BCSetListType;
+ typedef std::vector< BCSettingsStruct* > BCStructVectorType;
class ButtonContainerSettings
{
public:
AddButton( BCSettingsStruct* info );
void
- AddButtons( BCSetListType infoList );
+ AddButtons( BCStructVectorType infoList );
private:
ButtonGroupMap m_ButtonGroupContainer;