[vtk-developers] Finishing up the assign_chartxy_mousebuttons topic branch

Eric E. Monson emonson at cs.duke.edu
Sat Dec 25 11:41:14 EST 2010


Hey Marcus,

(Sorry you're getting this double, but I didn't see that you'd posted something to the dev list when I replied earlier.)

I think this looks great. One small question, though: Where the MouseActions methods are defined is it possible to use the enums instead of numbers (just to make it a little clearer)

   short& Pan() { return Data[PAN]; }
   short& Zoom() { return Data[ZOOM]; }
   short& Select() { return Data[SELECT]; }

or are those enums not available at that point in the code?

Thanks a lot for implementing this. I think it's a lot clearer than my version and will suit my needs perfectly.

Regarding the creation of an external MouseActions class: It's up to you if you feel like implementing this. For my needs I don't think it's really necessary. I can see some utility in it when you want to create an array of charts, all with the same mouse functionality, but I guess I don't feel like it'll be that different to do the mouse assignments on each. I'm trying to think, too, about whether it would make it easier if someone wanted to create a new type of mouse action with a corresponding new chart behavior... Really I think it would be fine to leave it as it is for now unless you feel strongly that it would make others' lives easier or add a lot of flexibility.

Thanks again, and have a Happy Holiday,
-Eric


On Dec 24, 2010, at 2:36 PM, Marcus D. Hanwell wrote:

> Hi,
> 
> Just to let you both know I have pushed a counter-proposal to Gerrit,
> 
> http://review.source.kitware.com/#change,431
> 
> I wonder if it would be useful to pass lightweight objects like this
> into multiple classes for example. It is there for your consideration,
> I think we should get something in soon as I can see the need for such
> flexibility. I would appreciate input from prospective users such as
> yourselves.
> 
> Thanks,
> 
> Marcus
> 
> On Wed, Dec 8, 2010 at 9:31 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> Hello Ben,
>> 
>> Yes, I'm still interested in getting that behavior into the Charts, too. My implementation worked, but wasn't really good enough, and I just haven't had time to work out a new scheme. You're welcome to give it a try yourself, but I wouldn't worry about pulling that topic branch – if I were you I'd just start a new one. You can take a look at the diffs on Gerrit and see that my changes were pretty minimal. Here are Marcus' comments/concerns so maybe you can get something working that addresses them better:
>> 
>> "I like the change in principle, but I would rather have three variable names, or the components in an enum. I understand why you want to force all three to be set at the same time, but it makes the code harder to read too - it becomes a meaningless number again. Maybe a little more logic in the set function, and an enum, would give flexibility and multiple buttons."
>> 
>> Marcus has been working on other changes to the charts, so maybe he'll have a chance to speak up in case some of his work is going to involve mouse events.
>> 
>> Thanks a lot,
>> -Eric
>> 
>> 
>> On Dec 7, 2010, at 5:42 PM, Ben Medina wrote:
>> 
>>> Hello all,
>>> 
>>> Coincidentally, we need the ability to specify mouse button behavior
>>> in vtkCharts. This is implemented in this topic branch:
>>> http://review.source.kitware.com/#q,status:open+project:VTK+branch:master+topic:assign_chartxy_mousebuttons,n,z
>>> 
>>> It hasn't been merged due to some unresolved issues. If the
>>> outstanding issues haven't been resolved, I'd like to resolve them
>>> myself and resubmit the merge request. How do I get at the code on
>>> that topic branch? I don't see that branch as something I can switch
>>> to:
>>> 
>>> e:/dev/VTK $ git branch -a
>>> * master
>>>  remotes/gerrit/master
>>>  remotes/origin/HEAD -> origin/master
>>>  remotes/origin/hooks
>>>  remotes/origin/master
>>>  remotes/origin/nightly-master
>>>  remotes/origin/release
>>> 
>>> Thanks,
>>> Ben
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>> 
>> 




More information about the vtk-developers mailing list