Index: vtkImplicitPlaneWidget.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Widgets/vtkImplicitPlaneWidget.cxx,v
retrieving revision 1.9.2.1
diff -u -r1.9.2.1 vtkImplicitPlaneWidget.cxx
--- vtkImplicitPlaneWidget.cxx	16 Jun 2008 16:28:01 -0000	1.9.2.1
+++ vtkImplicitPlaneWidget.cxx	17 Mar 2009 21:16:47 -0000
@@ -51,6 +51,10 @@
   this->NormalToXAxis = 0;
   this->NormalToYAxis = 0;
   this->NormalToZAxis = 0;
+  
+  this->RotateAboutXAxis = 0;
+  this->RotateAboutYAxis = 0;
+  this->RotateAboutZAxis = 0;
 
   // Build the representation of the widget
   //
@@ -89,6 +93,8 @@
   this->EdgesActor = vtkActor::New();
   this->EdgesActor->SetMapper(this->EdgesMapper);
   this->Tubing = 1; //control whether tubing is on
+  //control if the widget can be translated by selecting the tubing
+  this->TranslateByTubing = this->Tubing;
 
   // Create the + plane normal
   this->LineSource = vtkLineSource::New();
@@ -439,6 +445,7 @@
      << (this->NormalToZAxis ? "On" : "Off") << "\n";
 
   os << indent << "Tubing: " << (this->Tubing ? "On" : "Off") << "\n";
+  os << indent << "Translate by Tubing: " << (this->TranslateByTubing ? "On" : "Off") << "\n";
   os << indent << "Origin Translation: "
      << (this->OriginTranslation ? "On" : "Off") << "\n";
   os << indent << "Outline Translation: "
@@ -546,6 +553,11 @@
     this->HighlightPlane(1);
     this->State = vtkImplicitPlaneWidget::Pushing;
     }
+  else if ( prop == this->EdgesActor && this->TranslateByTubing )
+    {
+      this->HighlightPlane(1);
+      this->State = vtkImplicitPlaneWidget::Pushing;
+    }
   else if ( prop == this->SphereActor )
     {
     if ( this->OriginTranslation )
@@ -792,6 +804,8 @@
 
   // Create axis of rotation and angle of rotation
   vtkMath::Cross(vpn,v,axis);
+    
+  
   if ( vtkMath::Normalize(axis) == 0.0 )
     {
     return;
@@ -812,6 +826,19 @@
   //Set the new normal
   double nNew[3];
   this->Transform->TransformNormal(normal,nNew);
+  if(this->RotateAboutXAxis == 1)
+    {
+    nNew[0] = 0;
+    }
+  else if(this->RotateAboutYAxis == 1)
+    {
+    nNew[1] = 0;
+    }
+  else if(this->RotateAboutZAxis == 1)
+    {
+    nNew[2] = 0;
+    }
+      
   this->Plane->SetNormal(nNew);
 
   this->UpdateRepresentation();
@@ -1136,6 +1163,47 @@
     this->Interactor->Render();
     }
 }
+//----------------------------------------------------------------------------
+void vtkImplicitPlaneWidget::SetRotateAboutXAxis (int var)
+{
+  if (this->RotateAboutXAxis != var)
+    {
+      this->RotateAboutXAxis = var;
+    }
+  if (var)
+    {
+      this->RotateAboutYAxisOff();
+      this->RotateAboutZAxisOff();
+    }
+}
+
+//----------------------------------------------------------------------------
+void vtkImplicitPlaneWidget::SetRotateAboutYAxis (int var)
+{
+  if (this->RotateAboutYAxis != var)
+    {
+      this->RotateAboutYAxis = var;
+    }
+  if (var)
+    {
+      this->RotateAboutXAxisOff();
+      this->RotateAboutZAxisOff();
+    }
+}
+
+//----------------------------------------------------------------------------
+void vtkImplicitPlaneWidget::SetRotateAboutZAxis (int var)
+{
+  if (this->RotateAboutZAxis != var)
+    {
+      this->RotateAboutZAxis = var;
+    }
+  if (var)
+    {
+      this->RotateAboutXAxisOff();
+      this->RotateAboutYAxisOff();
+    }
+}
 
 //----------------------------------------------------------------------------
 void vtkImplicitPlaneWidget::SetNormalToXAxis (int var)
@@ -1292,4 +1360,45 @@
 
   this->EdgesTuber->SetRadius(0.25*radius);
 }
+//----------------------------------------------------------------------------
+void vtkImplicitPlaneWidget::SetTranslateByTubing(int onOff)
+{
+  if(onOff)
+    {
+    TranslateByTubingOn();
+    }
+  else
+    {
+    TranslateByTubingOff();  
+    }
+}
+//----------------------------------------------------------------------------
+void vtkImplicitPlaneWidget::TranslateByTubingOn()
+{
+  // Tubing has to be enabled to select it
+  if( !this->Tubing )
+    {
+    this->Tubing = 1;
+    }
+  
+  if( !this->Picker->GetPickList()->IsItemPresent( this->EdgesActor ) )
+    {
+    this->Picker->AddPickList( this->EdgesActor );
+    } 
+  
+  UpdateRepresentation();
+}
+//----------------------------------------------------------------------------
+void vtkImplicitPlaneWidget::TranslateByTubingOff()
+{
+  this->TranslateByTubing = 0;
+  if( this->Picker->GetPickList()->IsItemPresent( this->EdgesActor ) )
+    {
+      this->Picker->DeletePickList( this->EdgesActor );
+    } 
+  UpdateRepresentation();
+}
+
+
+
 
Index: vtkImplicitPlaneWidget.h
===================================================================
RCS file: /cvsroot/VTK/VTK/Widgets/vtkImplicitPlaneWidget.h,v
retrieving revision 1.7
diff -u -r1.7 vtkImplicitPlaneWidget.h
--- vtkImplicitPlaneWidget.h	7 Dec 2007 13:49:01 -0000	1.7
+++ vtkImplicitPlaneWidget.h	17 Mar 2009 21:16:47 -0000
@@ -134,6 +134,22 @@
   vtkBooleanMacro(NormalToZAxis,int);
 
   // Description:
+  // Force the plane widget rotate about one of the x-y-z axes.
+  // If one axis is set on, the other two will be set off.
+  // Remember that when the state changes, a ModifiedEvent is invoked.
+  // This can be used to snap the plane to the axes if it is orginally
+  // not aligned.
+  void SetRotateAboutXAxis(int);
+  vtkGetMacro(RotateAboutXAxis,int);
+  vtkBooleanMacro(RotateAboutXAxis,int);
+  void SetRotateAboutYAxis(int);
+  vtkGetMacro(RotateAboutYAxis,int);
+  vtkBooleanMacro(RotateAboutYAxis,int);
+  void SetRotateAboutZAxis(int);
+  vtkGetMacro(RotateAboutZAxis,int);
+  vtkBooleanMacro(RotateAboutZAxis,int);
+  
+  // Description:
   // Turn on/off tubing of the wire outline of the plane. The tube thickens
   // the line by wrapping with a vtkTubeFilter.
   vtkSetMacro(Tubing,int);
@@ -206,6 +222,15 @@
   // Description:
   // Control widget appearance
   virtual void SizeHandles();
+  
+  // Description
+  // Get/Set if the plane can be translated by left-click dragging on
+  //it's tubing. This will enable tubing if it is not already.
+  // Default is off
+  vtkGetMacro(TranslateByTubing,int);
+  void SetTranslateByTubing(int translateByTubing);
+  void TranslateByTubingOn();
+  void TranslateByTubingOff();
 
   // Description:
   // Get the properties on the normal (line and cone).
@@ -266,6 +291,10 @@
   int NormalToZAxis;
   void UpdateRepresentation();
 
+  int RotateAboutXAxis;
+  int RotateAboutYAxis;
+  int RotateAboutZAxis;
+  
   // The actual plane which is being manipulated
   vtkPlane *Plane;
 
@@ -292,6 +321,7 @@
   vtkPolyDataMapper *EdgesMapper;
   vtkActor          *EdgesActor;
   int               Tubing; //control whether tubing is on
+  int TranslateByTubing; //whether the tubing can be used for translation 
 
   // Control final length of the arrow:
   double DiagonalRatio;
