[GRASS5] embedding GRASS display into my app
Thierry Laronde
tlaronde at polynum.com
Tue Apr 6 19:58:25 EDT 2004
On Tue, Apr 06, 2004 at 04:45:52PM -0700, David Piasecki wrote:
>
> I had thought I would have to do this using Tcl/Tk, but from your
> description, it sounds like I can use anything I like so long as I
> interface with the XDRIVER for GRASS. Could use Qt instead of Tcl/Tk?
> Since GRASS already uses Tcl/Tk, wouldn't it be easier to use what's
> already available, or is it simple enough to do in any toolkit? Do you
> know of where I can get more information and possibly some
> documentation on how to write widgets like this?
It's depend upon how much you want to dive in the code. Since, by
construction, in GRASS everything is accessible via a command line, the
GUI is generally simply a graphical way to select and launch, in the
background, GRASS CLI programs (exec <program> and so on). This is
undoubtely the quickest way, and if the toolkit is itself a scripting
language you can have a result quickly.
Doing the same (`exec' programs) from a more powerful GUI (Qt, GTK,
Motif and so on) will take more time (but if you have peculiar needs it
is perhaps worth doing it).
For long term (not prototyping and so on), "real" programming with real
toolkit is, IMHO, far better.
But you can always start in prototyping mode by studying our the 5.7
developers have done the job with Tcl/Tk. But I'm not a 5.7 developer,
nor a Tcl/Tk guy so other are better placed to answer.
And note that you have, perhaps not the greatest documentation, but a
least a great deal of documentation: the source code ;)
Cheers,
[Disconnecting, it's 2:00am here in France and I need to sleep a
little...]
--
Thierry Laronde (Alceste) <tlaronde at polynum.org>
http://www.kergis.org/ | http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
More information about the grass-dev
mailing list