Thursday, November 20, 2014

Paned motion events now handled

I'm not quite certain why, but the GtkPaned API has no direct support for tracking the events associated with the mouse pointer. Signals are implemented, but only for keyboard operations. The docs give useful function to isolate the handle gdkwindow but why didn't they go the whole hog and implement a proper binding? Well we have it now in Gnocl!  

To test this feature get the latest nighly build.

set p [gnocl::paned \
-children [list $b1 $ebox] \
-resize 1 -shrink 1 \
-onHandleMotion {
## puts "MOVING w= %w x= %x X= %X p= %p s=%s"
if {"%s"== "256" } {
foreach {x y w h} [gnocl::winfo geometry %w] {}
_set_width $paned [expr $w - "%p"]
gnocl::update
}
}]

No comments: