Commit e73234c2 authored by luc.moulinier's avatar luc.moulinier

annotation

parent af9dbf98
#
# ordali_affiche.tcl
#
......@@ -2991,10 +2993,8 @@ proc ShowFeature {pxy {show 1}} {
set Ltg [$::NomTextSeq tag names [$::NomTextSeq index $pxy]]
set Lf [lsearch -all -inline -regexp $Ltg "FDisp"]
if {$Lf != {} } {
foreach f $Lf {
lappend note [string range $f [string first "_" $f]+1 end]
}
foreach f $Lf {
lappend note [string range $f [string first "_" $f]+1 end]
}
}
......@@ -3091,38 +3091,49 @@ proc AffichePosGenSeqSL {w {pos ""}} {
proc MontreCacheMessageSurSeq {pos {note ""}} {
global NomFenetreOrdali
global NomFenetreOrdali notePrev
if {[winfo exists $NomFenetreOrdali.message]} {
destroy $NomFenetreOrdali.message
}
if {$note eq ""} {
if {[winfo exists $NomFenetreOrdali.message]} {
destroy $NomFenetreOrdali.message
}
set notePrev ""
return
}
set note [join $note \n]
set note [string map {_ " "} $note]
# compute position relative to master window
set px [winfo pointerx $NomFenetreOrdali]
set py [winfo pointery $NomFenetreOrdali]
set ry [winfo rooty $NomFenetreOrdali]
set rx [winfo rootx $NomFenetreOrdali]
set ry [winfo rooty $NomFenetreOrdali]
set x [expr {$px-$rx}]
set y [expr {$py-$ry-10}]
message $NomFenetreOrdali.message \
-borderwidth 3 \
-relief raise \
-width 800 \
-justify left \
-text $note \
-background "lightyellow" \
-foreground "black"
set note [join $note \n]
set note [string map {_ " "} $note]
place $NomFenetreOrdali.message \
-x $x -y $y \
-anchor sw \
-in $NomFenetreOrdali
if {$note ne $notePrev} {
if {[winfo exists $NomFenetreOrdali.message]} {
destroy $NomFenetreOrdali.message
}
message $NomFenetreOrdali.message \
-borderwidth 3 \
-relief raise \
-width 800 \
-justify left \
-text $note \
-background "lightyellow" \
-foreground "black"
place $NomFenetreOrdali.message \
-x $x -y $y \
-anchor sw \
-in $NomFenetreOrdali
set notePrev $note
} else {
place configure $NomFenetreOrdali.message \
-x $x -y $y
}
return
}
......@@ -8814,6 +8825,7 @@ proc LanceOrdali {{behave slave} {aNomFenetreOrdali ""}} {
set LongueurTotale 0
array set TabSF {}
set BufNTimes ""
set notePrev ""
InitComparaison
InitChemicals
......@@ -9604,5 +9616,60 @@ proc BoutonParDefaut {w} {
proc ttagt {} {
LoadTkAndPackages
text .t -bg black -fg white \
-font "Helvetica 48 bold" \
-width 50 -height 10
pack .t -expand 1 -fill both
FenetreAuCentre .
.t insert end "qmlsdfjjfks lsdkf sldfjskldfj sddlkj sdflkjs d
flksddf sdklfj sdklfj sdflk skldf skldfj skldfj sl
kdfj sdfs dfjhslkdf sdj flskdjf skldjf skldjf skldjf skldfj skldjf sldkjf sd"
.t tag configure tag1 -background cyan -foreground black
.t tag configure tag2 -background magenta -foreground black
.t tag bind tag1 <Enter> [list posemsg %x %y enter]
.t tag bind tag1 <Motion> [list posemsg %x %y move]
.t tag bind tag1 <Leave> [list posemsg %x %y leave]
.t tag add tag1 1.5 1.15 3.10 3.25
.t tag add tag2 1.35 1.45 2.30 2.45
return
}
proc posemsg {x y what} {
puts "x= $x $y"
switch $what {
"leave" {destroy .t.m}
"enter" {
message .t.m \
-text "##########\n# TAG >1< #\n############" \
-bg green1 -fg black \
-bd 5 \
-font "Courier 64 bold"
place .t.m \
-anchor nw \
-in .t \
-x [expr {$x+10}] -y [expr {$y+10}]
}
"move" {
place configure .t.m -x [expr {$x+10}] -y [expr {$y+10}]
}
}
return
}
#
# ordali_mode.tcl
#
proc ChangeMode {{mode ""}} {
......@@ -300,117 +301,64 @@ proc AfficheBoutonsAnnotation {} {
global FrmBouton Anno NomTextSeq WOrdali
if {[TypeAli] eq "pasdali"} {return}
grid columnconfig $FrmBouton 1 -weight 1
set wp "${FrmBouton}.fanno"
frame $wp -relief sunken -bd 2
frame $wp \
-relief sunken \
-bd 2
grid $wp -row 0 -column 1 -sticky ew
grid rowconfig $wp all -weight 0
grid columnconfig $wp {0 2 3 4} -weight 0
grid columnconfig $wp 1 -weight 1
# Inits
UpdateVisibleAnnotations
set Anno(iAnno) 0
LoadSnapAnnotations
set Lcol [set ::Couleurs(Stock)]
set Anno(Color) [lindex $Lcol 0]
set Anno(NtagCou) ""
# GUI
frame $wp.fshow
label $wp.fshow.label \
-text "Show : "
set wdt [PlusLongEltDe $Anno(Lnoms)]
ttk::combobox $wp.fshow.combo \
-state readonly \
-values $Anno(Lnoms) \
-width $wdt \
-textvariable Anno(Nom)
bind $wp.fshow.combo <<ComboboxSelected>> [list ShowAnnotation]
set Anno(LColors) $Lcol
grid $wp.fshow.label -row 0 -column 0
grid $wp.fshow.combo -row 0 -column 1
set wcol [PlusLongEltDe $Lcol]
set WOrdali(ComboColAnno) $wp.ccol
ttk::combobox $wp.ccol \
# gui
frame $wp.fcols
label $wp.fcols.label \
-text "Show annotations colored in : " \
-justify left
set wdt [PlusLongEltDe $Anno(LColorsUsed)]
ttk::combobox $wp.fcols.cbbcol \
-state readonly \
-width $wcol \
-values $Lcol \
-values $Anno(LColorsUsed) \
-width $wdt \
-textvariable Anno(Color)
#bind $wp.ccol <<ComboboxSelected>> [list ChangeCouleurAnnotation]
button $wp.bcre \
-text " Create " \
-bg cyan \
-command [list AjouteAnnotation]
button $wp.bedt \
-text " Edit " \
bind $wp.fcols.cbbcol <<ComboboxSelected>> [list ShowAnnotation]
grid $wp.fcols.label -row 0 -column 0 -sticky w
grid $wp.fcols.cbbcol -row 0 -column 1 -sticky e
frame $wp.fshhi
button $wp.fshhi.bshow \
-text " Show All " \
-bg cyan \
-command [list EditeAnnotation]
frame $wp.tmp1
label $wp.tmp1.lnom \
-text "Name " \
-relief flat
entry $wp.tmp1.enom \
-font "Helvetica 10" \
-width 16 \
-bg white -fg black \
-textvariable Anno(Nom)
label $wp.lano \
-text "Annotation : " \
frame $wp.tmp2
grid rowconfig $wp.tmp2 0 -weight 1
set Anno(WText) $wp.tmp2.txt
text $wp.tmp2.txt \
-width 10 -height 3 \
-font "Helvetica 10" \
-bg white \
-yscrollcommand "$wp.tmp2.scr set" \
-state normal
scrollbar $wp.tmp2.scr \
-width 8 \
-command "$wp.tmp2.A1AAAtxt yview "
button $wp.badd \
-bg yellow \
-command [list AjouteAnnotation %W]
button $wp.bdel \
-text "Delete" \
-command [list ShowAnnotation showall]
button $wp.fshhi.bhide \
-text " Hide All " \
-bg red \
-command [list DetruitAnnotation]
-command [list ShowAnnotation hideall]
grid $wp.fshhi.bshow -row 0 -column 0 -sticky w -padx 10
grid $wp.fshhi.bhide -row 0 -column 1 -sticky e -padx 10
button $wp.bret \
-text "Return" \
-text " Return " \
-bg green1 \
-command [list QuitteAnnotation]
grid columnconfig $wp.tmp1 1 -weight 1
grid $wp.tmp1.lnom -row 0 -column 0 -sticky w
grid $wp.tmp1.enom -row 0 -column 1 -sticky ew
grid columnconfig $wp.tmp2 0 -weight 1
grid $wp.tmp2.txt -row 0 -column 0 -sticky news
grid $wp.tmp2.scr -row 0 -column 1 -sticky ns
grid $wp.lano -row 0 -column 0 -sticky w
#grid $wp.tmp1 -row 0 -column 0 -sticky ew
grid $wp.tmp2 -row 0 -column 1 -rowspan 3 -sticky ew
grid $wp.ccol -row 0 -column 2 -sticky w -padx {30 60}
grid $wp.bcre -row 1 -column 2 -rowspan 2 -sticky news -padx {30 60}
grid $wp.fcols -row 0 -column 0 -sticky w -padx 20
grid $wp.fshhi -row 0 -column 1 -padx 10
grid $wp.bret -row 0 -column 2 -sticky e -padx 20
grid columnconfig $wp all -weight 1
#grid $wp.fshow -row 0 -column 2 -sticky w -padx 10
#grid $wp.bedt -row 1 -column 2 -sticky w -padx 10
#grid $wp.badd -row 0 -column 4 -sticky e
#grid $wp.bdel -row 1 -column 4 -sticky e
grid $wp.bret -row 0 -column 3 -rowspan 3 -sticky e -padx 10
$::NomTextSeq tag configure selZone -background lightblue
$NomTextSeq tag configure selZoneAnno -background lightblue
bind $NomTextSeq <ButtonPress-1> [list PositionAnnotation %W %x %y "debut"]
bind $NomTextSeq <B1-Motion> [list PositionAnnotation %W %x %y "move"]
bind $NomTextSeq <ButtonRelease-1> [list PositionAnnotation %W %x %y termine]
bind $NomTextSeq <Control-1> {PositionAnnotation %W %x %y delete ; break}
update idletasks
tkwait window $wp
return
......
......@@ -2115,7 +2115,7 @@ proc FindTclAll {fic {dir "."}} {
set Ld [glob -directory $dir -type d -nocomplain -- *]
foreach dir $Ld {
set r [FindTcl $fic $dir]
if {$r != ""} {lappend ResFind $r}
if {$r != ""} {lappend ResFind {*}$r}
}
if {[info exists ResFind]} {
......
#
# ordali_sequence.tcl
#
proc OuvrirFichierAlignementDansOrdali {{type "Unk"} {Fichier ""}} {
global Sequences FichierTFA FichierXML FichierMSF FichierRSF FichierORD FichierALN Defauts
......@@ -703,7 +708,7 @@ proc EcritLeTfa {FilOut LesNoms LesSequences} {
if {[catch {set f [open $FilOut w]}]} {
if {[ModeI]} {
FaireLire "Warning !\nFile $outfile can not be open !"
FaireLire "Warning !\nFile $fileOut can not be open !"
}
return
......@@ -2890,6 +2895,23 @@ proc ReAlignSeqs {} {
return
}
if {0} {
couldn't change working directory to "": no such file or directory
while executing
"cd $appPWD"
(procedure "::tk::dialog::file::Update" line 31)
invoked from within
"::tk::dialog::file::Update .__tk_filedialog"
("after" script)
}
proc tbug {} {
LoadTkAndPackages
set out [DemandeEtSauveFichier "tfa" 1]
exit
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment