IP : 3.21.190.123Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
./
./
../
run/
../
lib64/
tcl8.6/
Tix8.4.3/
Balloon.tcl/
/
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*- # # $Id: Balloon.tcl,v 1.7 2008/02/27 22:17:28 hobbs Exp $ # # Balloon.tcl -- # # The help widget. It provides both "balloon" type of help # message and "status bar" type of help message. You can use # this widget to indicate the function of the widgets inside # your application. # # Copyright (c) 1993-1999 Ioi Kim Lam. # Copyright (c) 2000-2001 Tix Project Group. # Copyright (c) 2004 ActiveState # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. #
if {![info exists data(-state)]} { # puts "tixBalloon:XXMotion called without a state\n$w" set data(state) none return } if {$data(-state) eq "none"} { return }
if {$b == 0} { if {[info exists data(b:1)]} {unset data(b:1)} if {[info exists data(b:2)]} {unset data(b:2)} if {[info exists data(b:3)]} {unset data(b:3)} if {[info exists data(b:4)]} {unset data(b:4)} if {[info exists data(b:5)]} {unset data(b:5)} }
if {[llength [array names data b:*]]} { # Some buttons are down. Do nothing # return }
set cw [winfo containing -displayof $w $rootX $rootY] if {[tixBalloon:GrabBad $w $cw]} { return }
# Find the a client window that matches # if {$w eq $cw || [string match $w.* $cw]} { # Cursor moved over the balloon -- Ignore return }
while {$cw != ""} { if {[info exists data(m:$cw)]} { set client $cw break } else { set cw [winfo parent $cw] } } if {![info exists client]} { # The cursor is at a position covered by a non-client # Popdown the balloon if it is up if {$data(isActive)} { tixBalloon:Deactivate $w } set data(client) "" if {[info exists data(cancel)]} { unset data(cancel) } return }
if {$data(client) ne $client} { if {$data(isActive)} { tixBalloon:Deactivate $w } set data(client) $client after $data(-initwait) tixBalloon:SwitchToClient $w $client } }
if {$data(client) eq $client} { tixBalloon:Deactivate $w set data(client) "" }
# Maybe thses have already been unset by the Destroy method # if {[info exists data(m:$client)]} {unset data(m:$client)} if {[info exists data(s:$client)]} {unset data(s:$client)} }
#---------------------------------------------------------------------- # Popping up balloon: #---------------------------------------------------------------------- proc tixBalloon:Activate {w} { upvar #0 $w data
if {![info exists data(-state)]} { # puts "tixBalloon:Activate called without a state\n$w" set data(state) none return } if {$data(-state) eq "none"} { return }
tixBalloon:PopDown $w tixBalloon:ClearStatus $w set data(isActive) 0 if {[info exists data(cancel)]} { unset data(cancel) } }
proc tixBalloon:PopUp {w} { upvar #0 $w data
if {[string is true -strict $data(-installcolormap)]} { wm colormapwindows [winfo toplevel $data(client)] $w }
# trick: the following lines allow the balloon window to # acquire a stable width and height when it is finally # put on the visible screen # set client $data(client) if {$data(m:$client) == ""} {return ""}
# The windows may become destroyed as a result of the "update" command # if {![winfo exists $w]} { return } if {![winfo exists $client]} { return } # Put it on the visible screen # set x [expr {[winfo rootx $client]+[winfo width $client]/2}] set y [expr {int([winfo rooty $client]+[winfo height $client]/1.3)}]
set width [winfo reqwidth $w] set height [winfo reqheight $w] set scrwidth [winfo vrootwidth $w] set scrheight [winfo vrootheight $w]
# If the balloon is too far right, pull it back to the left # if {($x + $width) > $scrwidth} { set x [expr {$scrwidth - $width}] }
# If the balloon is too far left, pull it back to the right # if {$x < 0} { set x 0 }
# If the listbox is below bottom of screen, put it upwards # if {($y + $height) > $scrheight} { set y [expr {$scrheight-$height}] } if {$y < 0} { set y 0 }
wm geometry $w +$x+$y after idle raise $w }
proc tixBalloon:PopDown {w} { upvar #0 $w data
# Close the balloon # wm withdraw $w
# We don't set the data(client) to be zero, so that the balloon # will re-appear only if you move out then in the client window # set data(client) "" }
if {$opt(-balloonmsg) != ""} { set data(m:$client) $opt(-balloonmsg) } else { set data(m:$client) $opt(-msg) } if {$opt(-statusmsg) != ""} { set data(s:$client) $opt(-statusmsg) } else { set data(s:$client) $opt(-msg) }
tixAppendBindTag $client TixBal$w }
proc tixBalloon:post {w client} { upvar #0 $w data
#---------------------------------------------------------------------- # # Utility function # #---------------------------------------------------------------------- # # $w can be a widget name or a classs name proc tixBalIgnoreWhenGrabbed {wc} { global tixBalloon set tixBalloon(g_ignore,$wc) "" }
tixBalIgnoreWhenGrabbed TixComboBox tixBalIgnoreWhenGrabbed Menu tixBalIgnoreWhenGrabbed Menubutton