After spending a rather productive afternoon and evening hammering a Tcl package together I now have a workable binding to the rather nice Gtk+ Abiwidget. Here's snapshot just to show it working. The development code can be downloaded from the Gnocl nightly builds at sourceforge.
[code=]
#---------------
# AbiWidget.tcl
#---------------
# Created by William J Giddings
# 18-Sep-2010
#---------------
# Description:
#
#---------------
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
package require Gnocl
package require GnoclAbiWidget
set aw1 [gnocl::abiwidget]
set toolBar1 [gnocl::toolBar]
$toolBar1 add item \
-text "%#New" \
-onClicked exit
$toolBar1 add item \
-text "%#Open" \
-onClicked {
$aw1 load [pwd]/test.abw
}
$toolBar1 add item \
-text "Save As" \
-onClicked {
$aw1 save
}
$toolBar1 add item \
-text "%#Save" \
-onClicked {
$aw1 save [pwd]/test.abw
}
$toolBar1 add space
$toolBar1 add item \
-text "%#Undo" \
-onClicked {$aw1 undo}
$toolBar1 add item \
-text "%#Redo" \
-onClicked {$aw1 redo}
$toolBar1 add space
$toolBar1 add item \
-text "%#Cut" \
-onClicked {$aw1 cut}
$toolBar1 add item \
-text "%#Copy" \
-onClicked {$aw1 copy}
$toolBar1 add item \
-text "%#Paste" \
-onClicked {$aw1 paste}
# toolbar 2
set toolBar2 [gnocl::toolBar]
$toolBar2 add item \
-text "%#JustifyLeft" \
-onClicked {$aw1 align left 1}
$toolBar2 add item \
-text "%#JustifyRight" \
-onClicked {$aw1 align right 1}
$toolBar2 add item \
-text "%#JustifyCenter" \
-onClicked {$aw1 align center 1}
$toolBar2 add item \
-text "%#JustifyFill" \
-onClicked {$aw1 align justify 1}
$toolBar2 add space
$toolBar2 add item \
-text "Select All" \
-onClicked {$aw1 select all }
$toolBar2 add space
$toolBar2 add item \
-text "Erase EOL" \
-onClicked {$aw1 erase eol }
$toolBar2 add item \
-text "Ins Data" \
-onClicked {$aw1 insert data "OM GATE GATE PARAGATE PARASAMGATE BODHI SVAHA" }
$toolBar2 add item \
-text "Ins SPACE" \
-onClicked {$aw1 insert space }
# toolbar 3
set toolBar3 [gnocl::toolBar]
$toolBar3 add item \
-text "Header" \
-onClicked {$aw1 edit header}
$toolBar3 add item \
-text "Footer" \
-onClicked {$aw1 edit footer}
$toolBar2 add space
$toolBar3 add item \
-text "Open" \
-onClicked {$aw1 file open}
$toolBar3 add item \
-text "Save" \
-onClicked {$aw1 file save}
# assemble all the elements of the user interface
set container [gnocl::box -orientation vertical]
$container add $toolBar1
$container add $toolBar2
$container add $toolBar3
$container add $aw1 -fill {1 1} -expand 1
# pack int a toplevel window
gnocl::window \
-child $container \
-defaultWidth 480 -defaultHeight 320 \
-onDelete { exit }
gnocl::mainLoop
[/code]
WJG