]> Creatis software - bbtk.git/blobdiff - packages/wx/src/bbwxSlider.cxx
MagicBox : support of data synchronization + various related fixes
[bbtk.git] / packages / wx / src / bbwxSlider.cxx
index 16192ccb0dd0c74d94322d440f14057ebac73044..adb884da0dabb4f671b06ddc7342b3a3b615e805 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxSlider.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/19 08:08:14 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2009/03/30 14:42:28 $
+  Version:   $Revision: 1.21 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -74,6 +74,7 @@ namespace bbwx
     void OnResolutionOfSlider(wxScrollEvent& event);
 
     // Accessors
+    void SetValue(int v) { mwxSlider->SetValue(v); }
     int  GetValue() { return mwxSlider->GetValue(); }
     void SetRange(int min, int max);
     // Update the texts which display the min/max/current values of the slider
@@ -412,7 +413,15 @@ namespace bbwx
   //--------------------------------------------------------------------------
   void Slider::Process() 
   {
+    bbtkDebugMessage("process",3,
+                    "Slider "<<bbGetName()<<" input="
+                    <<bbGetInputIn()<<std::endl);
+   
     bbSetOutputOut( bbGetInputIn() );
+    if (bbGetOutputWidget()!=0)
+      {
+       ((SliderWidget*)bbGetOutputWidget())->SetValue(bbGetInputIn());
+      }
   }
 
   void Slider::CreateWidget(wxWindow* parent)