[vtk-developers] vtkContextMouseEvent.h enum not wrapped?

Eric E. Monson emonson at cs.duke.edu
Tue Nov 23 11:41:57 EST 2010


On Nov 23, 2010, at 11:18 AM, Marcus D. Hanwell wrote:

> On Tue, Nov 23, 2010 at 11:14 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> Hey Marcus,
>> 
>> Thanks for the explanation. I am implementing a simple ivar for setting the mouse button assignments in vtkChartXY and was testing in Python, so I was going to use the enum values. Now I've gotten spoiled by David G's nice enum wrapping!
>> 
>> As a side note, I'm planning on submitting a few changes to Gerrit for functions I'd like to see in the common code (because they're not easy to do in sub-classes) so I don't have to keep carrying around a bunch of little VTK mods to get my apps to work the way I need them to.
>> 
>> 1. Ivar to set mouse button function assignments in vtkChartXY
>> 2. Change paint order in vtkPlotPoints so selection highlights don't get covered up when there is over-plotting of the standard markers (paint order then will be the same as in parallel coordinates).
>> 3. Break out vtkChartXY tooltip set info call so it's not hard-coded (buried) in LocatePointInPlots and can be overridden in sub-classes.
>> 4. Maybe a Set for selection highlight color in vtkPlotPoints
>> 
>> Let me know if any of these sound totally unreasonable and I won't bother.
>> 
> These all sound quite reasonable, and I am currently working on other
> things. I should have time to review and integrate them once they are
> ready, and certainly appreciate your contributions. Another thing I
> had been considering is pulling some more of the objects out of the
> opaque ChartPrivate class, and putting it into protected so that it
> could be reused from inherited classes.
> 
> Add me as a reviewer once you push some of this and I will take a look
> at it. It sounds like you could try what David suggested, and I would
> be happy to merge that as part of the commit to add the ivars to
> Chart. I would prefer the ivars in Chart if that makes sense for the
> other chart types (I think it does).
> 
> Thanks,
> 
> Marcus

I'll try what David suggested and see how it behaves. There also seems to be a stray /ETX at the end of vtkContextMouseEvent.h which I will delete.

I'm glad to hear you're breaking out some of those ChartPrivate variables. Maybe if I would have been more clever I could have figured out ways to get around it, but they caused me a lot of problems early on trying to customize the charts -- having to re-implement a lot of code rather than create simpler sub-classes.

Maybe you're right that it would make sense to put the mouse button assignment ivar in vtkChart. I was playing with a SetMousePanSelectZoom method so the names/assignment order would be clear (both for the user and in the source code), and thought that wouldn't be general enough for all charts, but maybe a SetMouseMoveSelectZoomButtons would cover even the parallel coordinates... I wanted to keep all of the assignments in one method call to force users to think about all of the button assignments at once and not try reassigning one without shifting the other button functions, too.

Thanks,
-Eric




More information about the vtk-developers mailing list