Changeset cc64b09 in tol for tolbase/lib/toltk/tolinspe__main.tcl
- Timestamp:
- Nov 24, 2016, 11:58:38 AM (10 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- f738c05
- Parents:
- 6dc91d2
- File:
-
- 1 edited
-
tolbase/lib/toltk/tolinspe__main.tcl (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/toltk/tolinspe__main.tcl
r6dc91d2 rcc64b09 21 21 %W yview scroll %d units 22 22 }] 23 #@! REVISAR24 23 bind TreeView <$but> $comm 25 24 } 26 25 } else { 27 #@! REVISAR28 26 bind TreeView <MouseWheel> { 29 27 %W yview scroll [expr int(-1*%D/36)] units … … 218 216 # packing the panedwindowmain 219 217 pack $pwMain -fill both -expand yes 220 221 # esto es para evitar que aparezca el icono open cuando222 # relleno estando el mouse sobre ht_*223 #@! Por revisar224 #@! $ht_vars bind Entry <Enter> ""225 #@! $ht_vars bind Entry <Leave> ""226 #@! $ht_funcs bind Entry <Enter> ""227 #@! $ht_funcs bind Entry <Leave> ""228 218 } 229 219 … … 248 238 -highlightbackground gray75 -highlightcolor black \ 249 239 -highlightthickness 0 -font $toltk_options(fonts,Label) \ 250 -columns [::TolInspector::LNodeDef] ] 240 -columns [list \ 241 [list {image text} -label Name -tags Name] \ 242 [list text -label Index -tags Index] \ 243 [list text -label Grammar -tags Grammar] \ 244 [list text -label Reference -tags Reference] 245 ]] 251 246 252 247 # configuration of the left tree … … 260 255 # creation of the root node "Tol Objects" 261 256 set img [::Bitmap::get Objects] 262 #@ Se pone el style a mano, no sé la manera natural de hacer esto con wtree263 $wt_tree item style set root Name [$wt_tree column cget Name -itemstyle]264 257 $wt_tree item text root Name [mc "Tol Objects"] 265 258 $wt_tree item image root Name $img 266 259 267 260 # creation of the node father "Grammars" 268 set img [::Bitmap::get Grammars]269 set wt_row [::TolInspector::LNode "" Root $img [mc "Grammars"] "Grammar"]270 $wt_tree i nsert $wt_row -at child -relative root -tags "root-grammars"261 set node [$wt_tree item create -parent root -button 1 -open 0 -tags "root-grammars"] 262 $wt_tree item image $node Name [::Bitmap::get Grammars] 263 $wt_tree item text $node Index "" Grammar "Root" Name [mc "Grammars"] Reference "Grammar" 271 264 # Inserts in the node of grammars a node by each grammar that exists in Tol 272 265 InsertGrammars 273 266 274 267 # creation of the node father "Packages" 275 set img [::Bitmap::get "package"]276 set wt_row [::TolInspector::LNode "" Root $img [mc "Packages"] "Package"]277 $wt_tree i nsert $wt_row -at child -relative root -tags "root-packages" -button yes268 set node [$wt_tree item create -parent root -button 1 -open 0 -tags "root-packages"] 269 $wt_tree item image $node Name [::Bitmap::get "package"] 270 $wt_tree item text $node Index "" Grammar "Root" Name [mc "Packages"] Reference "Package" 278 271 279 272 # creation of the node father "Included Files" 280 set img [::Bitmap::get "Files"]281 set wt_row [::TolInspector::LNode "" Root $img [mc "Included Files"] "File"]282 $wt_tree i nsert $wt_row -at child -relative root -tags "root-files" -button yes273 set node [$wt_tree item create -parent root -button 1 -open 0 -tags "root-files"] 274 $wt_tree item image $node Name [::Bitmap::get "Files"] 275 $wt_tree item text $node Index "" Grammar "Root" Name [mc "Included Files"] Reference "File" 283 276 284 # creation of the node father "Console Objects" 285 set img [::Bitmap::get "Console"] 286 set wt_row [::TolInspector::LNode "" Root $img [mc "Console Objects"] "Console"] 287 $wt_tree insert $wt_row -at child -relative root -tags "root-console" -button yes 288 277 # creation of the node father "Console Objects" 278 set node [$wt_tree item create -parent root -button 1 -open 0 -tags "root-console"] 279 $wt_tree item image $node Name [::Bitmap::get "Console"] 280 $wt_tree item text $node Index "" Grammar "Root" Name [mc "Console Objects"] Reference "Console" 281 282 289 283 # associates the tree to scrolled window 290 284 $sw1 setwidget $wt_tree … … 294 288 295 289 # bind the focus on tree 296 bind $ {wt_tree}.frameTree.t<Button-1> "::focus $wt_tree"290 bind $wt_tree <Button-1> "::focus $wt_tree" 297 291 298 292 # expand/collapse (and fill/unfill) a node with a double clic 299 bind $ {wt_tree}.frameTree.t<Double-1> "::TolInspector::ToggleItem %x %y"293 bind $wt_tree <Double-1> "::TolInspector::ToggleItem %x %y" 300 294 } 301 295 … … 333 327 -highlightbackground gray75 -highlightcolor black \ 334 328 -highlightthickness 0 -font $toltk_options(fonts,Label) \ 335 -columns [::TolInspector::RNodeDef] ] 329 -columns [list \ 330 [list text -label Index -tags Index] \ 331 [list text -label Grammar -tags Grammar] \ 332 [list {image text} -label Name -tags Name] \ 333 [list text -label Content -tags Content] \ 334 [list text -label Description -tags Description] \ 335 [list text -label Path -tags Path] \ 336 [list text -label Reference -tags Reference] \ 337 ]] 336 338 # configuration of the tree of variables 337 339 $wt_vars column configure Grammar -visible no … … 340 342 $wt_vars notify bind $wt_vars <Expand-before> "::TolInspector::OpenVariable %I" 341 343 $wt_vars notify bind $wt_vars <Selection> "::TolInspector::SelectItem $wt_vars" 342 #@! el bind deberÃa poder hacerse directamente sobre el wtree 343 bind ${wt_vars}.frameTree.t <Button-1> "::focus $wt_vars" 344 bind ${wt_vars}.frameTree.t <Double-1> "::TolInspector::SelectionExpand" 344 bind $wt_vars <Button-1> "::focus $wt_vars" 345 bind $wt_vars <Double-1> "::TolInspector::SelectionExpand" 345 346 346 347 # Creation of the right TREE RIGHT with FUNCTIONS … … 349 350 -highlightbackground gray75 -highlightcolor black \ 350 351 -highlightthickness 0 -font $toltk_options(fonts,Label) \ 351 -columns [::TolInspector::RNodeDef] ] 352 -columns [list \ 353 [list text -label Index -tags Index] \ 354 [list text -label Grammar -tags Grammar] \ 355 [list {image text} -label Name -tags Name] \ 356 [list text -label Content -tags Content] \ 357 [list text -label Description -tags Description] \ 358 [list text -label Path -tags Path] \ 359 [list text -label Reference -tags Reference] \ 360 ]] 352 361 # configuration of the tree of functions 353 362 $wt_funcs column configure Grammar -visible no … … 355 364 $wt_funcs column configure all -itembackground "" 356 365 $wt_funcs notify bind $wt_funcs <Selection> "::TolInspector::SelectItem $wt_funcs" 357 bind $ {wt_funcs}.frameTree.t<Button-1> "::focus $wt_funcs"366 bind $wt_funcs <Button-1> "::focus $wt_funcs" 358 367 359 368 # associates the trees to scrolled windows … … 368 377 pack $tab2.sw22 -fill both -expand yes 369 378 pack $w_tabset -fill both -expand yes 370 #@! $w_tabset tab configure Variables\371 #@! -command "::TolInspector::SelectItem $wt_vars"372 #@! $w_tabset tab configure Functions\373 #@! -command "::TolInspector::SelectItem $wt_funcs"374 379 } 375 380 … … 435 440 436 441 # composes the menus for each one of the trees, depending the node that is selected 437 bind $ {wt_tree}.frameTree.t <Button-3> "::TolInspector::PostTree%X %Y"438 bind $ {wt_vars}.frameTree.t <Button-3> "::TolInspector::PostVariable%X %Y"439 bind $ {wt_funcs}.frameTree.t <Button-3> "::TolInspector::PostFunction%X %Y"442 bind $wt_tree <Button-3> "::TolInspector::PostTree %x %y %X %Y" 443 bind $wt_vars <Button-3> "::TolInspector::PostVariable %x %y %X %Y" 444 bind $wt_funcs <Button-3> "::TolInspector::PostFunction %x %y %X %Y" 440 445 } 441 446 … … 466 471 # 467 472 #///////////////////////////////////////////////////////////////////////////// 468 #@ ! wtree destroy ??473 #@ Hay algo que destruir? 469 474 return 470 475 } … … 814 819 } 815 820 } 821 ::TolInspector::UpdatePackageRoot 816 822 ::TolInspector::UpdateConsoleObj 817 823 }
Note: See TracChangeset
for help on using the changeset viewer.
