Skip to main content

Posts

Showing posts from September, 2024

Simple Tcl/Gnocl based widget message bar.

The gtk api provides it own status bar widget which could be used for embedded widget feedback but this it aimed at being used as part of a application's toplevel window. A complex UI may have several component zone each of which giving its own feedback. This simpler messaging areas provided this capability by making feedback available by directly displaying the contents of global variables rather than pushing items onto a status message stack. if 0 { +-------------------------------------------------------------------------+ | msg0                                      |  msg1   |  msg2   |  msg3   |    +-------------------------------------------------------------------------+ } ## # Simple Tcl/Gnocl based message bar # ref = unique ref  (could...

Using GnoclOption functions to Return Values for Customised Widget Options.

What to do... Make changes to the widgetFunc function to enable the GnoclOption function for that option to return a value by setting the ret to point ot a TclObj. /* this is a gnocl option handler ?? */ case GNOCL_CGET_NOTHANDLED: { /* cget for gnocl options handled in option function * the caveat here is that different widgets with the same option name may act differently, * if this is the case, then would it be more practical to create specific option functions? * (08/09/25) */ Tcl_Obj *ret = NULL; options[idx2].func ( interp, &options[idx2], G_OBJECT ( area ), &ret ); Tcl_SetObjResult (interp, ret); }