Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] right-click menu tools?

You can change the current modal tool of the map from pretty much anywhere; make a menu contribution based on the tool definition and go nuts. You can look at how the operations are processed into the right click (ie context menu) as an example.

The right click menu is mostly provided by the current modal tool; so it is likely that this functionality would only allow the user to switch between tools you have set up this way.

If you look at the InfoView you will see an example of a modal tool placed in a view toolbar; it hunts down the current map and change the Maps current modal tool. So all the wrappers you need are already around.

Cheers,
Jody


On Sat, Feb 7, 2009 at 8:41 AM, Graham Davis <gdavis@xxxxxxxxxxxxxxx> wrote:
I have a group of modal tools in the toolbar.  My client would like to also access this set of tools by right-clicking within the map and selecting the tool from some sort of right-click tool menu that pops up.

Is this possible without too much hacking?  The first problem I see is that if the user has some modal tool already active and they right-click on the map, that modal tool is likely catching all the user clicks.  Is there some system place where all those events are also passed where I should look to add some sort of right-click menu?  The second problem I see is if it is even possible to put a group of modal tools somewhere other than the toolbar?  They are currently setup as usual as udig tool extensions, but I'm not sure how to hook them into anything else.

Any tips on how to get started or any examples I could look at?

--
Graham Davis
Refractions Research Inc.
gdavis@xxxxxxxxxxxxxxx

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top