]> Creatis software - creaMaracasVisu.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 17 Jun 2011 16:17:17 +0000 (16:17 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 17 Jun 2011 16:17:17 +0000 (16:17 +0000)
bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx
bbtk/src/bbcreaMaracasVisuPanelButtonContainerSettings.cxx
bbtk/src/bbmaracasvisuSliderMinMax.cxx
bbtk/src/bbmaracasvisuSliderMinMax.h

index 2d771f9cf1ca484ac0c660d79c59f5ccd08f8a83..5dd1aa26265583e4300924c647e91ba37736e31f 100644 (file)
@@ -15,23 +15,27 @@ namespace bbcreaMaracasVisu
 void
 PanelButtonContainer::Process( )
 {
+       ButtonContainerSettings* settings = new ButtonContainerSettings( );
+       printf("EED PanelButtonContainer::Process %d\n", bbGetInputIn( ).size() );
+       settings->AddButtons( bbGetInputIn( ) );
+       
+       PBContainer* panel = new PBContainer( myPanel, settings );
+       wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL );
+       sizer->Add( panel, 1, wxEXPAND, 0 );
+       this->myPanel->SetSizer(sizer);
+       
+       this->myPanel->SetAutoLayout(true);
+       this->myPanel->Layout();
 
+       
 }
 //===== 
 // 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 )
+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);
 
 }
index 1911c214eca725f045091e866f3867d5e3e081fd..0934d08a3f45df1664a6e251f8744c897c0b0632 100644 (file)
@@ -16,26 +16,19 @@ 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_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() );
-
+       bbSetOutputOut( this->m_BCSettingsVector );
+       
+       printf("EED PanelButtonContainerSettings::Process In  %d\n", bbGetInputIn( ).size() );
+       printf("EED PanelButtonContainerSettings::Process tmpVec  %d\n", this->m_BCSettingsVector.size() );
+       printf("EED PanelButtonContainerSettings::Process Out  %d\n", bbGetOutputOut( ).size() );
+       
 }
 //===== 
 // 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)
@@ -51,6 +44,8 @@ PanelButtonContainerSettings::CreateWidget( wxWindow* parent )
   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)
index ce4ea2f904c03b4708c0570b88947d299b1e15fe..2c074cab6cfb9e224db87a0f74c45b0c68281dbe 100644 (file)
@@ -76,6 +76,13 @@ BBTK_BLACK_BOX_IMPLEMENTATION(SliderMinMax,bbtk::WxBlackBox);
 void SliderMinMax::Process()
 {
        if (mwxwidget!=NULL){
+               if (firsttime==true)
+               {
+                       firsttime=false;
+                       mwxwidget -> setRepresentedValues( bbGetInputInMin(), bbGetInputInMax() );
+                       mwxwidget -> SetStart(bbGetInputInMinShow());
+                       mwxwidget -> SetEnd(bbGetInputInMaxShow());  
+               }
                bbSetOutputOutStart(mwxwidget->GetStart());
                bbSetOutputOutEnd(mwxwidget->GetEnd());
                bbSetOutputOutActual(mwxwidget->GetActual());
@@ -93,11 +100,11 @@ void SliderMinMax::CreateWidget(wxWindow* parent)
                mwxwidget -> setActiveStateTo(true);
                mwxwidget -> setVisibleLabels( bbGetInputShowLabels()==1 );
                mwxwidget -> setDeviceEndMargin(10);
-           mwxwidget -> setRepresentedValues(bbGetInputInMin(), bbGetInputInMax());
+//         mwxwidget -> setRepresentedValues(bbGetInputInMin(), bbGetInputInMax());
                mwxwidget -> setDeviceBlitStart(10,10); 
                mwxwidget -> setIfWithActualDrawed(bbGetInputShowActual());
-               mwxwidget -> SetStart(bbGetInputInMinShow());
-               mwxwidget -> SetEnd(bbGetInputInMaxShow());  
+//             mwxwidget -> SetStart(bbGetInputInMinShow());
+//             mwxwidget -> SetEnd(bbGetInputInMaxShow());  
                //wxWidgetSliderMinMax * eventHandler = new wxWidgetSliderMinMax(this, mwxwidget); //JPRx
                bbtkDebugDecTab("Core",9);
 
@@ -109,7 +116,8 @@ void SliderMinMax::CreateWidget(wxWindow* parent)
 //------------------------------------------------------
 void SliderMinMax::bbUserSetDefaultValues()
 {
-               mwxwidget = NULL;
+               firsttime       =       true;
+               mwxwidget       =       NULL;
                bbSetInputOrientation(1);
                bbSetInputInW(200);
                bbSetInputInH(65);
index d62496a813a07c758cdeaa2f76ad6ff919faee76..eaab03266355f8200e525e85ebbfe5133bd10d99 100644 (file)
@@ -40,8 +40,8 @@ namespace bbcreaMaracasVisu
          //--------------------------------------------------------------------------------------------------------------------------------
          // Attributes
          //--------------------------------------------------------------------------------------------------------------------------------
-         SliderMinMax mbbtkSliderMinMax;
-         mBarRange modBarRange;
+         SliderMinMax  *mbbtkSliderMinMax;
+         mBarRange             *modBarRange;
   };
 
 
@@ -75,7 +75,8 @@ class /*BBTK_EXPORT*/ SliderMinMax
   void CreateWidget(wxWindow*);
 
   private:
-       mBarRange* mwxwidget;
+       bool                    firsttime;
+       mBarRange               *mwxwidget;
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(SliderMinMax,bbtk::WxBlackBox);