Skip to main content

Posts

Showing posts from July, 2013

Running the Gnome 'yelp' Help System from Tcl/Gnocl applications.

I implemented some yelp help pages a while ago for my major app. After installing, however, the pages would load but not the graphics. When calling yelp all that needs to be passed is the directory containing all the pages, graphics, media etc. that are part of the help. To resolve this I resorted to launching a separate shell script to handle the help system. So, good-bye to: set app(baseDir) $ENV(home)/help exec yelp $app(baseDir)/help & and hello to exec my_yelp.sh & Where my_yelp.sh is nothing more complex than cd $HOME/help yelp ./

Its a lot of work!

Decided add to the ability to get more feedback from the gnocl package. The implementation of the cget command across the various widgets is still a little patchy and I've just added a new command, 'options' to all the widgets which will return a list of valid switches. With well over 50  modules to update this is a lot of work! Its taken me about 5hrs so far! Following that I will add a similar command to obtain the valid widget and contents (e.g. text tags) sub-commands. For some widgets with just a handful of options and commands it something of an overkill but, then comes the task of updating the documentation. I've completed most of the support in place for using pango markup strings in the text widget. The set of available tags is pre-defined, but quite extensive. Just a little more work in this area before the handling of <span.. </span> will work properly. Added this is a new toolbar with all the necessary buttons for the pango markup in place.

Dockable side toolbars

Gtk offers a dockable toolbar but this cannot be re-docked elsewhere on screen. The screenshot below shows a possible workaround using notebook groups. As the toolbar must be configured as either horizontal or vertical whenever a new page is dropped onto a notebook, then the toolbar will be automatically re-oriented. The accompanying script is basically for proof of principle rather than a realistic package. proc addToolBarItems {tb} {     foreach item {Open Close New Cut Paste Copy} {         $tb add item -icon %#$item     } } set container [gnocl::box] set table [gnocl::table] $container add $table -fill {1 1} -expand 1 set nb(1) [gnocl::notebook -groupId 1 -onPageAdded { %c configure -orientation %d } -data horizontal] set nb(2) [gnocl::notebook -groupId 1 -tabPosition left -onPageAdded { %c configure -orientation %d } -data vertical] set nb(3) [gnocl::notebook -groupId 1 -tabPosition right -onPageAdded { %c configure -orientation %d } -data vertical] set nb(4) [gnocl::notebook -gro

Recent Enhancements

Added the following enhancements to the nightly build code. 2013-07:    gnocl::notebook         o new options             -data         o added extra percentage subtitution strings to -onPageAdded, -onPageRemoved             %c child             %n page number             %d data 2013-06:     gnocl::toolBar         o configure/cget -orientation now works