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...
-
Over the past few programming sessions I've been working on producing a central point, a dashboard, around which it's possible to se...
-
The contents of a GtkTextBuffer can be saved as serialized binary file. Whilst converting such a file to ascii may be problematic if the bu...

No comments:
Post a Comment