[Thuban-list] simple tool

Bernhard Herzog bh at intevation.de
Fri Sep 19 13:04:05 CEST 2003

"Fidel Serrano" <barbarito at omplace.com> writes:

> i want this simple tool to display the distance in a mesage box for
> example, so my cuestion is how can i get the thuban context?, 
> adding a new command to the registry is the only way?

The context as such is only used for the commands. Tools are activated
through commands as shown in the simple_tool.py example so getting hold
of the context shouldn't be a problem.

In the tool object itself you can use self.view if you need to access
the map window the tool is operating on. That self.view is the same as


Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/

More information about the Thuban-list mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)