After a speedy beginning some drudgery set in today - must have re-wrote the module at least four times before getting the basics right. The viewer has its own special scroll window with a navigator window that popups up. The scrolled window isn't absolutely necessary but rightly deserves support but it's not possible to create a scrolled window and then add an image. So, the choice has to be made from the outset as to which which layout is required (pretty much like a box or paned widget).
It is possible to draw to the pixbuf contained in the viewer which is the next milestone.
It is possible to draw to the pixbuf contained in the viewer which is the next milestone.
# test-imageViewer.tcl
#!/bin/sh
#\
exec tclsh "$0" "$@"
package require Gnocl
package require GnoclImageView
set iv(1) [gnocl::imageView -scrolled 1 -image %/[pwd]/desklet_or_gadget.png]
set iv(2) [gnocl::imageView -image %/[pwd]/desklet_or_gadget.png]
set box [gnocl::box]
$box add $iv(1) -fill {1 1} -expand 1
$box add $iv(2) -fill {1 1} -expand 1
gnocl::window -child $box -setSize 0.4
#!/bin/sh
#\
exec tclsh "$0" "$@"
package require Gnocl
package require GnoclImageView
set iv(1) [gnocl::imageView -scrolled 1 -image %/[pwd]/desklet_or_gadget.png]
set iv(2) [gnocl::imageView -image %/[pwd]/desklet_or_gadget.png]
set box [gnocl::box]
$box add $iv(1) -fill {1 1} -expand 1
$box add $iv(2) -fill {1 1} -expand 1
gnocl::window -child $box -setSize 0.4
Comments