Skip to main content

Posts

Showing posts from September, 2021

Creating icons from UTF-8 Characters.

Linux distros have heaps of pre-installed icons ready for use. I recently needed to create a toolbar menu which needed to access a set of unique icons which contained single characters. It was, in fact, a pull down menu for the insertion of 'special characters'. The Gtk+ api has complete functionality for creating icons from pixbufs and Gnocl providing convenient access.  Here's a screenshot and the script.     # !/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" package require Gnocl if { [namespace exists jmls] == 0} {     namespace eval jmls {} } set ::app(specialCharacters)  [list Section ¶ Paragraph § Separator • Left-Arrow ← Up-Arrow ↑ Right-Arrow → Down-Arrow ↓ Root √] proc jmls::charIcon {name ch} {          set pb1 [gnocl::pixBuf new -width 40 -height 40]     $pb1 text \         -position [list 15 30] \         -font [list...

September updates

August saw a few modifications to the core, largely in the form of resolving some minor issues adding some utility functionality.   2021-08:     gnocl::menu         o bug in configure -tearoff now fixed.     gnocl::notebook         o new tab option -tooltip     gnocl::text         o fixed problems with -onButtonPress/Release signal handling.           See gnoclConnectOptCmd.     gnocl::pointer         o new subcommand, monitor.     gnocl::timeOut         o now works properly.           Use as an alternative to Tcl after which does not work within a Gtk.     %c (child) substitution string added to -onKeyPress/Release callbacks           for Gtk...