[vtkusers] Disabling middle mouse button for vtkImageTracerWidget

Jim Peterson jimcp at cox.net
Mon Nov 22 23:15:33 EST 2010


David Doria wrote:
>> David,
>> I think except for this line with overrides the pointer type for "self" and
>>  keeps the functionality in vtkImageTracerWidget...
>>
>>  vtkImageTracerWidget* self = reinterpret_cast<vtkImageTracerWidget
>>
>> It looks to me like ProcessEvents() is the callback function used for all of
>> the callback operations, and the way ProcessEvents() is coded it defeats sub
>> classing. Hope that helps,
>>     
>
> Hm, so I would have to implement the ProcessEvents() function and
> copy/paste everything except the middle mouse button stuff? That seems
> quite silly... Is there a reason that it is implemented like this
> instead of allowing subclassing?
>
> David
>
>   
David,
This logic in the vtkImageTracerWidget constructor:
 
this->EventCallbackCommand->SetCallback(vtkImageTracerWidget::ProcessEvents);

looks to me like it will prevent extending the ProcessEvents() method as 
well. It looks to me like a clone is the way to change the behavior. 


Jim



More information about the vtkusers mailing list