<div class="gmail_quote">On Tue, Feb 2, 2010 at 6:46 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

The rubber band interactor styles should definately be unified. I stole from rubberbandzoom to make rubberbandpick and later the other two were stolen from one of those. <br><br>They should all have a common helper class which does the xor rendering of the rubber band (and whatever else is common) and leaves the functionality differences to the existing classes.<br>



<br clear="all">David E DeMarle<br><br></blockquote><div class="gmail_quote"><br></div><div class="gmail_quote">What about just a vtkInteractorStyleRubberBand superclass for the vtkInteractorStyleRubberBand* classes?</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">OnLeftButtonDown() and OnLeftButtonUp() should be the same for all the rubberband classes - they just get the start and end position of the rubberband selection.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">I believe RedrawRubberBand() is also the same for all of them.</div><div class="gmail_quote"><br></div><div class="gmail_quote">So OnLeftButtonDown(), OnLeftButtonUp(), and RedrawRubberBand() could just live in the superclass.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Those 3 functions are the bulk of the duplicated code. The other mouse buttons could stay duplicated because they are short and the name of the class doesn't indicate anything about what those buttons should do.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Thoughts?</div><br><div>David</div></div>