gnocl::drawingArea -more work done

GtkDrawingArea is basically the blank canvas from which other widgets are built up. The developer decided what signals and properties are to be applied to the object. The basic module for the gnocl::drawingArea has been around for some time and today I got it all running a little more smoothly and now that remains is to hard-code into the module the various choices and options that can be added during run-time. Here's the test script to show how simply the process is working out.

# the next line restarts using tclsh \
exec tclsh "$0" "$@"

package require Gnocl

# create and display the drawingArea widget
set da [gnocl::drawingArea]
gnocl::window -widthRequest 320 -heightRequest 200 -child $da

$da option add -onPointerMotion
$da configure -onPointerMotion {puts "%x %y YIPPEEE!!!"}
$da option add -onEnter
$da configure -onEnter {puts "Enter -Hello!"}
$da option add -onLeave
$da configure -onLeave {puts "Leave -Bye!"}
$da option add -onButtonPress
$da configure -onButtonPress {puts "You Clicked!"}


There's still some way to go, more error checking, the ability add a list of options etc...

Also did some more tidying up of the gnocl::ruler code.


Popular posts from this blog

gnocl::list add

Recent Changes, April 2019

Recent activity -Scripting...