Commit 137d5dc6 authored by luc.moulinier's avatar luc.moulinier

annotation suite

parent e73234c2
#
# ordali_db.tcl
#
proc DBProfile {s t} {
global TPS
......@@ -744,6 +748,7 @@ proc MacEdite {{v ""}} {
proc MacCourant {{quoi "index"}} {
if {$quoi eq "index"} {
return [set ::Defauts(IxMacCourant)]
} else {
return [set ::Defauts(NmMacCourant)]
}
......
......@@ -302,6 +302,9 @@ proc AfficheBoutonsAnnotation {} {
if {[TypeAli] eq "pasdali"} {return}
LoadSnapAnnotations
# gui
grid columnconfig $FrmBouton 1 -weight 1
set wp "${FrmBouton}.fanno"
frame $wp \
......@@ -309,22 +312,19 @@ proc AfficheBoutonsAnnotation {} {
-bd 2
grid $wp -row 0 -column 1 -sticky ew
set Anno(iAnno) 0
LoadSnapAnnotations
set Lcol [set ::Couleurs(Stock)]
set Anno(LColors) $Lcol
# gui
frame $wp.fcols
label $wp.fcols.label \
-text "Show annotations colored in : " \
-justify left
set wdt [PlusLongEltDe $Anno(LColorsUsed)]
set Anno(Color) ""
set Anno(ShowColor) "None"
set ::Anno(WComboCol) $wp.fcols.cbbcol
ttk::combobox $wp.fcols.cbbcol \
-state readonly \
-values $Anno(LColorsUsed) \
-width $wdt \
-textvariable Anno(Color)
-textvariable Anno(ShowColor)
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
......@@ -333,30 +333,38 @@ proc AfficheBoutonsAnnotation {} {
button $wp.fshhi.bshow \
-text " Show All " \
-bg cyan \
-command [list ShowAnnotation showall]
-command [list ShowAnnotation All]
button $wp.fshhi.bhide \
-text " Hide All " \
-bg red \
-command [list ShowAnnotation hideall]
-command [list ShowAnnotation None]
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 " \
-bg green1 \
-command [list QuitteAnnotation]
-command [list QuitAnnotation ok]
button $wp.bdis \
-text " Dismiss " \
-bg red -fg white \
-command [list QuitAnnotation dismiss]
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 $wp.bdis -row 1 -column 2 -sticky e -padx 20
grid columnconfig $wp all -weight 1
$NomTextSeq tag configure selZoneAnno -background lightblue
bind $NomTextSeq <ButtonPress-1> [list PositionAnnotation %W %x %y "debut"]
bind $NomTextSeq <ButtonPress-1> [list PositionAnnotation %W %x %y "start"]
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}
bind $NomTextSeq <ButtonRelease-1> [list PositionAnnotation %W %x %y "endsel"]
bind $NomTextSeq <Control-1> {PositionAnnotation %W %x %y "delete" ; break}
bind $NomTextSeq <Shift-1> {PositionAnnotation %W %x %y edit ; break}
ShowAnnotation All
update idletasks
tkwait window $wp
......
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