Changeset 1862
- Timestamp:
- Aug 16, 2010, 6:27:53 PM (14 years ago)
- Location:
- branches/blt4/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/icons.tcl
r1652 r1862 16 16 17 17 namespace eval Rappture::icon { 18 variable iconpath [ file join $RapptureGUI::library scripts images]18 variable iconpath [list [file join $RapptureGUI::library scripts images]] 19 19 variable icons 20 20 } -
branches/blt4/gui/scripts/textentry.tcl
r1860 r1862 92 92 rename -font -hintfont hintFont Font 93 93 } 94 pack $itk_component(hints) -side bottom -fill x 94 pack $itk_component(hints) -side bottom -fill x 95 95 } 96 96 … … 231 231 # take down any existing widget 232 232 foreach win [pack slaves $itk_interior] { 233 if { [winfo name $win] != "hints" } { 234 pack forget $win 235 } 233 pack forget $win 236 234 } 237 235 … … 549 547 # CONFIGURATION OPTION: -state 550 548 # ---------------------------------------------------------------------- 549 550 551 551 552 itcl::configbody Rappture::TextEntry::state { 552 553 set valid {normal disabled} -
branches/blt4/gui/scripts/textresult.tcl
r1710 r1862 28 28 inherit itk::Widget 29 29 30 constructor {args} { # defined below } 31 30 constructor {args} { 31 # defined below 32 } 32 33 public method add {dataobj {settings ""}} 33 34 public method get {} 34 35 public method delete {args} 35 36 public method scale {args} 36 public method parameters {title args} { # do nothing } 37 public method parameters {title args} { 38 # do nothing 39 } 37 40 public method download {option args} 38 41 39 42 public method select {option args} 40 43 public method find {option} 44 public method popup {option args} 41 45 42 46 private variable _dataobj "" ;# data object currently being displayed … … 141 145 $itk_component(text) tag configure ERROR -foreground red 142 146 143 eval itk_initialize $args 147 itk_component add emenu { 148 menu $itk_component(text).menu -tearoff 0 149 } { 150 ignore -tearoff 151 } 152 $itk_component(emenu) add command \ 153 -label "Copy" -accelerator "^C" \ 154 -command [list event generate $itk_component(text) <<Copy>>] 155 $itk_component(emenu) add command \ 156 -label "Select All" -accelerator "^A" \ 157 -command [itcl::code $this select all] 158 $itk_component(emenu) add command \ 159 -label "Select None" -accelerator "Esc" \ 160 -command [list puts stderr $this select none] 161 bind $itk_component(text) <<PopupMenu>> \ 162 [itcl::code $this popup menu emenu %X %Y] 163 164 eval itk_initialize $args 144 165 } 145 166 … … 337 358 switch -- $option { 338 359 all { 360 puts stderr "$itk_component(text) tag add sel 1.0 end" 339 361 $itk_component(text) tag add sel 1.0 end 340 362 } … … 412 434 $itk_component(findstatus) configure -text $status 413 435 } 436 437 # ---------------------------------------------------------------------- 438 # USAGE: _popup menu <which> <X> <Y> 439 # 440 # Used internally to manage edit operations. 441 # ---------------------------------------------------------------------- 442 itcl::body Rappture::TextResult::popup {option args} { 443 puts stderr "popup option=$option args=$args" 444 switch -- $option { 445 menu { 446 if {[llength $args] != 3} { 447 error "wrong # args: should be \"_popup $option which x y\"" 448 } 449 set mname [lindex $args 0] 450 set x [lindex $args 1] 451 set y [lindex $args 2] 452 tk_popup $itk_component($mname) $x $y 453 } 454 default { 455 error "bad option \"$option\": should be menu" 456 } 457 } 458 }
Note: See TracChangeset
for help on using the changeset viewer.