Version 0 of gnocl::ruler

Updated 2009-05-22 08:24:01 by WJG

WJG (22/05/09) The Gtk Widget is a legacy of the GIMP image processing package and so, as expected, there are a few legacy widgets which need to be implement in Gnocl, to claim the status of complete support. One of these is the creation of horizonatl and veritical rulers to be used in conjuction with drawing objects for edition purpose. Here's a sample screenshot and the test script.

http://wjgiddings.googlepages.com/Screenshot-rulerTest.tcl.png

#---------------
# Author:   William J Giddings
# Date:     07/05/09
#---------------
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
#---------------

package require Gnocl
package require GnoclCanvas

# build UI components
set box [gnocl::box ] ;#-orientation vertical]
set Vrul [gnocl::ruler -orientation vertical -metric inches]
set Hrul [gnocl::ruler -orientation horizontal -metric pixels]
set can [gnocl::canvas -background white]
set bar [gnocl::statusBar]

set table_1 [gnocl::table -homogeneous 0]
$table_1 addRow [list "" $Hrul] -expand {1 0}
$table_1 addRow [list $Vrul ] -expand { 0 1}
$table_1 add $can 1 1

gnocl::window -child $table_1 -widthRequest 320 -heightRequest 200

enter categories here