[GRASS5] New gui.tcl generic user interface
Glynn Clements
glynn at gclements.plus.com
Thu Mar 16 13:17:01 EST 2006
Cedric Shock wrote:
> You would have to source gui.tcl into your program directly for these panes
> (You run it in a separate wish for external command right now, right?)
Both d.m and gis.m source gui.tcl. This is why parser.c has both
G_gui() and G_tcltk(). The former is for the stand-alone UI and the
latter for use by Tcl/Tk programs such as d.m and gis.m.
Having the Tcl/Tk code executed within the context of the main GUI
allows for things like command history.
> Do you want the output from commands run in gui.tcl to come through to your
> output windows? We'd need an interface for that, and hooking into stuff. We'd
> also need to have a way of not getting those buttons (Run, Help, etc).
> Perhaps separation of this little bitty UI from the code for making options
> frames (libgui.tcl anyone?)
gui.tcl was designed to allow for the possibility of overriding some
of its procedures. It shouldn't be necessary to split it up.
> Your hand/hard-coded UIs are in may ways more flexible than what can be done
> with a simple layout rule, however consistany of layout does have its
> advantages.
I think that hand-coding the layer panels is the way to go. Although
for the generic "command" layers, it would be useful (and probably not
too hard) to provide a facility to choose a command from a list and
bring up the command's auto-generated dialog.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list