Changeset 0731938 in tol for tolbase/lib/toltk/tolinspe__wtree1.tcl
- Timestamp:
- Nov 4, 2016, 11:04:56 AM (10 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- e933fd6
- Parents:
- e0578ae
- File:
-
- 1 edited
-
tolbase/lib/toltk/tolinspe__wtree1.tcl (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/toltk/tolinspe__wtree1.tcl
re0578ae r0731938 125 125 126 126 set parent_grammar $arguments(parent_grammar) 127 127 128 128 #@ Si la llamada a InsertChild viene de SelectSet el argumento tolref 129 129 #@ no está definido y se crea a partir de parent_tolref … … 183 183 #? } 184 184 #? } 185 186 #@ ::TolInspector:: LNode index grammar185 186 #@ ::TolInspector::RNode index grammar 187 187 #@ icon name content description path reference 188 set wt_row [::TolInspector::RNode $arguments(index) $grammar \ 189 $icon_grammar $name $data3 $brief_desc $path $tolref] 190 191 set idx [$wt insert $wt_row -at child -relative root] 188 #@! set wt_row [::TolInspector::RNode $arguments(index) $grammar \ 189 $icon_grammar $name $data3 $brief_desc $path $tolref] 190 #@! set idx [$wt insert $wt_row -at child -relative root] 191 #@! Las lÃneas anteriores parecen lentas y se sustituyen por las siguientes: 192 set idx [$wt item create -button 1] 193 $wt item element configure $idx \ 194 [RiIndex] eTXT -text $arguments(index) , \ 195 [RiGrammar] eTXT -text $grammar , \ 196 [RiName] eIMG -image $icon_grammar + eTXT -text $name , \ 197 [RiContent] eTXT -text $data3 , \ 198 [RiDescription] eTXT -text $brief_desc , \ 199 [RiPath] eTXT -text $path , \ 200 [RiReference] eTXT -text $tolref 201 $wt item lastchild root $idx 202 192 203 $wt item element configure $idx \ 193 204 [RiIndex] eTXT -fill $fcolor , \ … … 196 207 [RiDescription] eTXT -fill $fcolor , \ 197 208 [RiPath] eTXT -fill $fcolor 198 209 199 210 incr arguments(index) 200 211 } … … 211 222 variable OnSelectItem 212 223 213 foreach it [$wt_vars item children root] { 214 $wt_vars item delete $it 215 } 216 foreach it [$wt_funcs item children root] { 217 $wt_funcs item delete $it 218 } 224 $wt_vars selection clear 225 $wt_vars item delete all 226 $wt_funcs selection clear 227 $wt_funcs item delete all 228 219 229 #@ToDo $wt_vars column configure Index -hide no 220 230 #@ToDo $wt_funcs column configure Index -hide no 221 231 222 $w_tabset tab configure Variables -text [mc Variables] -state normal223 $w_tabset tabconfigure Functions -state normal232 $w_tabset itemconfigure Variables -text [mc Variables] -state normal 233 $w_tabset itemconfigure Functions -state normal 224 234 225 235 if { [string length $OnSelectItem] } { … … 264 274 #@ + parent_grammar es usado por InsertSubset para abrir o no un nodo 265 275 #@ + parent_tolref es usado por InsertSubset para determinar tolref 266 set arguments(parent_grammar) [ GetParentGrammar $tolReference]276 set arguments(parent_grammar) [$wt_tree item text $node [LiGrammar]] 267 277 set arguments(parent_tolref) $tolReference 268 278 ::tol::forallchild $tolReference ::TolInspector::InsertSubset … … 399 409 set parent_grammar $arguments(parent_grammar) 400 410 #@ para obtener el icono de las instancias 401 set parent_tolref $arguments(parent_tolref) 411 set parent_tolref $arguments(parent_tolref) 402 412 403 413 #@# Tolcon_Trace "InsertSubset $args" … … 464 474 variable wt_tree 465 475 variable arguments 466 476 467 477 set node [$wt_tree selection get 0] 468 478 if { ![string length $node] } return 469 479 if { $node == 0 } { 470 480 ClearHiertables 481 #@D $w_tabset itemconfigure Variables -state disabled 482 #@D $w_tabset itemconfigure Functions -state disabled 471 483 return 472 484 } … … 478 490 #@ Aquà llegan los nodos raÃz y las gramáticas 479 491 #@ Argumentos pasados por atributo 480 #@ + parent_grammar es usado por InsertItem para determinar el color de sus miembros si es NameBlock492 #@ + parent_grammar es usado por InsertItem para saber si es NameBlock 481 493 set arguments(parent_grammar) "" 482 494 switch $tolReference { … … 484 496 File SelectFileRoot 485 497 Console SelectConsoleRoot 486 default ClearHiertables 498 default { 499 ClearHiertables 500 #@D $w_tabset itemconfigure Variables -state disabled 501 #@D $w_tabset itemconfigure Functions -state disabled 502 } 487 503 } 488 504 } elseif { [lindex $tolReference 0] == "Grammar" } { 489 505 #@ Argumentos pasados por atributo 490 #@ + parent_grammar es usado por InsertItem para determinar el color de sus miembros si es NameBlock506 #@ + parent_grammar es usado por InsertItem para saber si es NameBlock 491 507 set arguments(parent_grammar) "" 492 508 SelectGrammar 493 509 } else { 510 #@ Argumentos pasados por atributo 511 #@ + parent_grammar es usado por InsertItem para saber si es NameBlock 512 set arguments(parent_grammar) [$wt_tree item text $node [LiGrammar]] 494 513 SelectSet $tolReference 495 514 } … … 513 532 514 533 ClearHiertables 515 $w_tabset select 0 ;# Variables 534 $w_tabset itemconfigure Variables -text [mc Packages] 535 $w_tabset raise Variables 536 #@D $w_tabset itemconfigure Functions -state disabled 516 537 517 538 #@=> tiene que incrementarse automáticamente es el contador del foreach … … 543 564 544 565 ClearHiertables 545 $w_tabset tabconfigure Variables -text [mc Files]546 # $w_tabset tab configure Functions -state disabled547 $w_tabset select 0 ;# Variables566 $w_tabset itemconfigure Variables -text [mc Files] 567 $w_tabset raise Variables 568 #@D $w_tabset itemconfigure Functions -state disabled 548 569 549 570 #@=> tiene que incrementarse automáticamente es el contador del foreach … … 568 589 # 569 590 #///////////////////////////////////////////////////////////////////////////// 570 variable w_tabset571 591 variable wt_tree 572 592 variable arguments … … 577 597 578 598 ClearHiertables 599 579 600 #(pgea) se quita la linea que oculta la columna del indice y que 580 601 #(pgea) el procedimimento anterior ClearHiertables muestra 581 602 # $ht_vars column configure Index -hide yes 582 # $w_tabset tab configure Functions -state disabled583 603 584 604 foreach co [::tol::console stack list] { 605 Tolcon_Trace "co $co" 585 606 #puts "SelectConsoleRoot: co = $co" 586 607 set gra [lindex $co 0] … … 662 683 } 663 684 } else { 664 # $w_tabset tab configure Variables -state disabled 665 # $w_tabset select 1 685 $w_tabset raise Functions 686 #@D $w_tabset itemconfigure Variables -state disabled 666 687 } 667 688 foreach fun [::tol::info functions $grammar] { … … 689 710 690 711 #@ Argumentos pasados por atributo 691 #@ + index es usado e incrementado por InsertItem 692 #@ + parent_grammar es usado por InsertItem para determinar el color de sus miembros si es NameBlock 712 #@ + index es usado e incrementado por InsertItem 693 713 #@ + tolref indica a InsertItem que se ha de obtener desde parent_tolref 694 714 #@ + parent_tolref es usado por InsertItem para encontrar tolref 695 715 set arguments(index) 1 696 set arguments(parent_grammar) [GetParentGrammar $tolReference]697 716 set arguments(tolref) "" 698 set arguments(parent_tolref) $tolReference 717 set arguments(parent_tolref) $tolReference 699 718 ::tol::forallchild $tolReference ::TolInspector::InsertChild 700 719 }
Note: See TracChangeset
for help on using the changeset viewer.
