]> Creatis software - bbtk.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 17 Jun 2011 16:19:41 +0000 (16:19 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 17 Jun 2011 16:19:41 +0000 (16:19 +0000)
packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg
packages/wx/src/bbwxInputText.cxx
packages/wx/src/bbwxInputText.h

index d66d7a7954c9918d979c38181ca7e16293e7600d..6b9a8e2563b2205bd4ae8a43c2db62e5cfeeef89 100644 (file)
@@ -13,93 +13,93 @@ PACKAGENAME:toolsbbtk
 COMPLEXINPUTS:1
 COMPLEX_PORT
 in
--111.333484:159.878833:900.000000
+34.967521:145.605564:900.000000
 FIN_COMPLEX_PORT
 COMPLEXOUTPUTS:6
 COMPLEX_PORT
 widget
--142.967861:-58.247376:900.000000
+3.333144:-72.520645:900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Dimensions
--124.883681:-57.175644:900.000000
+21.417324:-71.448913:900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 MinMax
--92.628104:-54.898845:900.000000
+53.672901:-69.172114:900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Size
--81.734224:-56.500886:900.000000
+64.566781:-70.774155:900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Spacing
--70.199528:-56.180478:900.000000
+76.101477:-70.453747:900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 TypeName
--57.383199:-56.821294:900.000000
+88.917806:-71.094563:900.000000
 FIN_COMPLEX_PORT
 BOXES:8
 BOX
 wx:OutputText:Box02
 ISEXEC:FALSE
--319.583358:61.213510:900.000000
--274.008358:51.213510:900.000000
+-173.282353:46.940241:900.000000
+-127.707353:36.940241:900.000000
 PORT
 Title:"Dimensions"
 FIN_BOX
 BOX
 wx:OutputText:Box17
 ISEXEC:FALSE
--227.071421:48.954652:900.000000
--181.496421:38.954652:900.000000
+-80.770416:34.681383:900.000000
+-35.195416:24.681383:900.000000
 PORT
 Title:"Size"
 FIN_BOX
 BOX
 wx:OutputText:Box20
 ISEXEC:FALSE
--198.753235:35.034649:900.000000
--153.178235:25.034649:900.000000
+-52.452230:20.761380:900.000000
+-6.877230:10.761380:900.000000
 PORT
 Title:"Spacing"
 FIN_BOX
 BOX
 wx:OutputText:Box22
 ISEXEC:FALSE
--181.633325:15.503763:900.000000
--136.058325:5.503763:900.000000
+-35.332320:1.230494:900.000000
+10.242680:-8.769506:900.000000
 PORT
 Title:"TypeName"
 FIN_BOX
 BOX
 wx:OutputText:Box26
 ISEXEC:FALSE
--277.916631:40.902260:900.000000
--232.341631:30.902260:900.000000
+-131.615626:26.628991:900.000000
+-86.040626:16.628991:900.000000
 PORT
 Title:"Min Max"
 FIN_BOX
 BOX
 vtk:ImageVtkProperties:Box09
 ISEXEC:FALSE
--112.729954:127.472083:900.000000
--67.154954:117.472083:900.000000
+33.571051:113.198814:900.000000
+79.146051:103.198814:900.000000
 FIN_BOX
 BOX
 wx:OutputText:Box10
 ISEXEC:FALSE
--342.740798:79.777576:900.000000
--297.165798:69.777576:900.000000
+-196.439793:65.504307:900.000000
+-150.864793:55.504307:900.000000
 PORT
 Title:"Components"
 FIN_BOX
 BOX
 wx:LayoutLine:Box11
 ISEXEC:FALSE
--292.980794:-9.396306:900.000000
--235.420794:-19.396306:900.000000
+-146.679789:-23.669575:900.000000
+-89.119789:-33.669575:900.000000
 PORT
 WinTitle:"Image properties"
 FIN_BOX
index 7aaeeff92d4399bc60699d53e906ee88262d65ac..58c329be058d3e9f4818ca3ece0c8d15992064c1 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxInputText.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/04/09 14:02:15 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2011/06/17 16:19:42 $
+  Version:   $Revision: 1.11 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -52,6 +52,8 @@ namespace bbwx
     ~InputTextWidget();
 
     std::string GetValue();
+       void SetValue(std::string value);
+
     void OnTextEnter(wxCommandEvent& event);
     void OnTextUpdate(wxCommandEvent& event);
 
@@ -122,7 +124,12 @@ namespace bbwx
   { 
     return bbtk::wx2std ( mwxTextCtrl->GetValue() );
   }
-
+       
+  void InputTextWidget::SetValue(std::string value)
+  { 
+       mwxTextCtrl->SetValue( bbtk::std2wx(value) ) ;
+  }
+       
   //--------------------------------------------------------------------------
   void InputTextWidget::OnTextUpdate(wxCommandEvent& event)
   {
@@ -156,6 +163,7 @@ namespace bbwx
        //-----------------------------------------------------------------     
        void InputText::bbUserSetDefaultValues()
        {
+               firsttime=true;
                bbSetInputTitle("");
                bbSetInputIn("");
                bbSetOutputWidget(0);
@@ -179,10 +187,15 @@ namespace bbwx
     InputTextWidget *w=(InputTextWidget *)bbGetOutputWidget();
        if (w) 
        {
-               bbSetInputIn( w->GetValue() );
+               if (firsttime==true)
+               {
+                       firsttime=false;
+                       w->SetValue(  bbGetInputIn().c_str() );
+               }
                w->SetTitle( bbtk::std2wx ( bbGetInputTitle() ) );
+               bbSetOutputOut( w->GetValue() );
        }
-       bbSetOutputOut( bbGetInputIn() );
+         bbSetOutputOut( "<VOID>" );
   }
   
 
index 4a3afce12228043597183b815cadb26fc68d5d7d..079e2bfa0e92c7b4454275670640e4266507398d 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxInputText.h,v $
   Language:  C++
-  Date:      $Date: 2010/04/09 14:02:15 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2011/06/17 16:19:42 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -70,6 +70,8 @@ namespace bbwx
     BBTK_CREATE_WIDGET(CreateWidget);
     void CreateWidget(wxWindow*);
     
+  private:
+         bool firsttime;
   protected:
 
   };