• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl_ext/incrtcl/iwidgets/generic/

Lines Matching refs:index

77       method index {index} 
79 method disable {index}
82 method insert {index string args}
84 method select {index}
94 method _getNextItem {index}
283 # METHOD: index index
285 # Return the numerical index corresponding to index.
287 itcl::body iwidgets::Optionmenu::index {index} {
289 if {[regexp {(^[0-9]+$)} $index]} {
290 set idx [$itk_component(popupMenu) index $index]
295 return [expr {$index > $idx ? $_numitems : $idx}]
297 } elseif {$index == "end"} {
300 } elseif {$index == "select"} {
305 set numValue [lsearch -glob $_items $index]
308 error "bad Optionmenu index \"$index\""
320 set first [index $first]
321 set last [expr {$last != {} ? [index $last] : $first}]
337 set index [lsearch -exact $_items $nextAvail]
338 _setItem [expr {$index != -1 ? $nextAvail : ""}]
342 # METHOD: disable index
350 itcl::body iwidgets::Optionmenu::disable {index} {
351 set index [index $index]
352 $itk_component(popupMenu) entryconfigure $index -state disabled
356 # METHOD: enable index
361 itcl::body iwidgets::Optionmenu::enable {index} {
362 set index [index $index]
363 $itk_component(popupMenu) entryconfigure $index -state normal
376 set first [index $first]
382 set last [$itk_component(popupMenu) index end]
384 set last [index $last]
395 # METHOD: insert index string ?string?
399 itcl::body iwidgets::Optionmenu::insert {index string args} {
400 if {$index == "end"} {
401 set index $_numitems
403 set index [index $index]
406 _setitems [eval linsert {$_items} $index $args]
411 # METHOD: select index
416 itcl::body iwidgets::Optionmenu::select {index} {
417 set index [index $index]
418 if {$index > ($_numitems - 1)} {
419 incr index -1
421 _setItem [lindex $_items $index]
468 # PRIVATE METHOD: _getNextItem index
470 # Allows either a string or index number to be passed in, and returns
473 itcl::body iwidgets::Optionmenu::_getNextItem {index} {
475 if {[incr index] >= $_numitems} {
476 set index 0 ;# wrap around
478 return [lindex $_items $index]