I'm pleased to announce that, after much frustration, the gnocl binding to the GtkToolPalette is now complete. To try it out, download and compile the latest nightly build from Sourceforge.
And here's the test script:
#---------------
# test-toolPalette.tcl
#---------------
# Created by Dr. William J Giddings, 2016
#
#!/bin/sh
#\
exec tclsh "$0" "$@"
package require Gnocl
set tp [gnocl::toolPalette -tooltip TOOL-PALETTE -orientation vertical]
puts >[$tp commands]
puts >[$tp options]
set ig(1) [$tp addGroup -label MyGroup1]
puts >>[$ig(1) commands]
puts >>[$ig(1) options]
$ig(1) addItem -icon %#New -text XXX -tooltip YYY -data £££ -onClicked {puts "Hello from %w %d"}
$ig(1) addItem -icon %#Cut -text ABC -tooltip ZZZ -onClicked {puts "Hello from %w"}
$ig(1) addItem -icon %#Copy -tooltip WWW -onClicked {puts "Hello from %w"}
set pi [$ig(1) addItem -icon %#Paste -tooltip AAA -onClicked {puts pi} ]
puts ....$pi....
puts "class = [$pi class]"
puts >>>[$pi commands]
puts >>>[$pi options]
$pi configure -onClicked { puts "BOING! BOINGG!" } -icon %#Stop
if 1 {
set ig(2) [$tp addGroup -label MyGroup2 -collapsed 1 -sensitive 0]
$ig(2) addItem -icon %#New -text XXX -tooltip YYY -onClicked {puts "Hello from %w"}
$ig(2) addItem -icon %#Cut -text ABC
$ig(2) addItem -icon %#Copy
$ig(2) addItem -icon %#Paste
}
parray ig
gnocl::window -child $tp -width 200 -height 400
Subscribe to:
Post Comments (Atom)
-
Given this module some attention today. Added some of the more package wide options to the module and created customised handler for settin...
-
Spent some time today creating some simple howto-tutorials on creating standalone Tcl/Gnocl applications using freewrap. The process is almo...
-
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 un...

No comments:
Post a Comment