
#f window.tcl - gestion de la fenetre : modification des widgets,...


package provide stead 2.0


## stead:toggleIconify - iconifie ou déinconifie la fenetre
# 
proc stead:toggleIconify {top} {
    global stead 
    if {"x[wm state $top]" == "xnormal"} {
        wm iconify $top
        grab $top
    } elseif {"x[wm state $top]" == "xiconic"} {
        wm deiconify $top
        raise $top
        focus $stead(text)
    }
}

## stead:toggleFileNameLabel - raccourci ou ralonge l'affichage du nom fichier
proc stead:toggleFileNameLabel  {w} {
    global stead
    
    set but $stead(toggleFileNameButton)
    set lab $stead(fileNameLabel)
    
    if {![info exists stead(file)]} {
        return        
    }
    
    set sign [$but cget -text]
    
    if { [string equal "-" $sign] } {
        $but configure -text "+"
    } else {
        $but configure -text "-"
    }
    stead:updateFileLabel 
}
# ./

