

proc gred:init {args} {
global gred auto_path env tcl_platform

    
    # On ajoute éventuellement la librairie personnelle de l'utilisateur :
    # Ceci permet d'écraser ou de personnaliser de comportement de l'appli.
    set gred(setup,userlibs) [file join $pref_root_folder pist]
    setup:insertLib -sourceindex $gred(setup,userlibs)
    set gred(setup,userfilerc) \
               [file join $gred(setup,userlibs) gred gredrc]

    ...
    
        
    gred:initPrefs

}
proc gred:mkmenu:config {w} {
global gred
    set frame $w.menubar
    set name $frame.config
    set menuName $name.menu
    set mb [menubutton $name -text Configurer -menu $menuName]
    pack $mb -side left
    set menu [menu $menuName -tearoff 0]
    
    $menu add command -label "Editer les préférences..." -command {Pref_Dialog}
        
    $menu add command -label "Montrer/Cacher la grille" \
                      -command "Grid_ToggleShow [gred:windowToCanvas $w]"
                                            
    $menu add separator
                      
    $menu add command -label "Taille A4v" \
                      -command "gred:setCanvasSize A4v"
                                            
    $menu add command -label "Taille A4h" \
                      -command "gred:setCanvasSize A4h"
                                            
    $menu add command -label "Taille A3v" \
                      -command "gred:setCanvasSize A3v"
                                            
    $menu add command -label "Taille A3h" \
                      -command "gred:setCanvasSize A3h"
                                            
    $menu add command -label "Taille A2v" \
                      -command "gred:setCanvasSize A2v"
                                            
    $menu add command -label "Taille A2h" \
                      -command "gred:setCanvasSize A2h"
                                            
    $menu add command -label "Taille A1v" \
                      -command "gred:setCanvasSize A1v"
                                            
    $menu add command -label "Taille A1h" \
                      -command "gred:setCanvasSize A1h"
                                            

    $menu add separator
                      
    $menu add command -label "Enregister les préférences courantes" \
                      -command "Pref_Save "
}
#./


