Tk Library Source Code

Artifact [be70b00335]
Login

Artifact be70b00335b23108c838ac635c434dc8a83b10fa:

Attachment "balloon_help.tcl" to ticket [923942ffff] added by decosterjos 2004-03-26 22:36:31.
# ----------------------------------------------------------------------------
#  Command DynamicHelp::_motion_balloon
# ----------------------------------------------------------------------------
proc DynamicHelp::_motion_balloon { type path x y {isCanvasItem 0} } {
    variable _top
    variable _id
    variable _delay
    variable _current_balloon

    set w $path
    if {$isCanvasItem} { set path [_get_canvas_path $path balloon] }

    if { $_current_balloon != $path && $type == "enter" } {
        set _current_balloon $path
        set type "motion"
        destroy $_top
    }
    if { $_current_balloon == $path } {
        if { $_id != "" } {
            after cancel $_id
            set _id ""
        }
        if { $type == "motion" && ![winfo exists $_top] } {
	    set cmd [list DynamicHelp::_show_help $path $w $x $y]
	    set _id [after $_delay $cmd]
        } else {
            destroy $_top
            set _current_balloon ""
        }
    }
}