				<LANGUAGE xml:lang="de">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="en">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="es">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="fr">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="it">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="ja">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="ko">X(mm)</LANGUAGE>
					<LANGUAGE xml:lang="pl">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="pt">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="ru">X (мм)</LANGUAGE>
					<LANGUAGE xml:lang="tr">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="zh">X (mm)</LANGUAGE>
					<LANGUAGE xml:lang="zh-tw">X (公釐)</LANGUAGE>
				</Title>
				<BreakColumn>0</BreakColumn>
				<columnIndex>93</columnIndex>
				<ContentFormula>STR(bom_implantx, 10, 2)</ContentFormula>
				<EnumerationDelimiter>,</EnumerationDelimiter>
				<HasTotal>0</HasTotal>
				<IsMultiline>1</IsMultiline>
				<IsNumerical>0</IsNumerical>
				<EnumerationType>3</EnumerationType>
				<IsVertSeparationVisible>1</IsVertSeparationVisible>
#.====================================================================
# [incr Tk] File
#.====================================================================
#. $Revision: 1.1.6.1 $
#. $Date: 2009/05/21 13:39:53 $
#.====================================================================
#. File Name:     euidlentry.itk
#. Author:        Eric P. Clevenger
#. Description:   This entry provides special behaviors and is to be
#.                used for all ANSYS GUI entry components.
#.
#.====================================================================
#. Copyright 1999 SAS IP, Inc. Proprietary Data.
#. Unauthorized use, distribution, or duplication is prohibited.  
#. All Rights Reserved.
#.====================================================================

#---------------------------------------------------------------------
#  Default Resources
#---------------------------------------------------------------------
option add *EuidlEntry*entryBackground #FFFFFF widgetDefault
option add *EuidlEntry*foreground #000000 widgetDefault
option add *EuidlEntry*highlightThickness 0 widgetDefault
option add *EuidlEntry*takeFocus 1 widgetDefault
option add *EuidlEntry*width 16 widgetDefault

#---------------------------------------------------------------------
#  Usual Options
#---------------------------------------------------------------------
itk::usual EuidlEntry {
   keep -width -state -maxchars -takefocus -validate -variable -validatedata
   keep -entrybackground -entryforeground
}

# ====================================================================
# = EuidlEntry CLASS DEFINITION
# ====================================================================
class ::euidl::EuidlEntry {

   # INHERITANCE
   inherit euidl::EuidlWidget

   #
   constructor {args} {}
   destructor {}

   # OPTIONS
   itk_option define -disabledbackground disabledBackground \
         IGNORE #C0C0C0 {}
   itk_option define -disabledforeground disabledForeground \
         IGNORE #FFFFFF {}
   itk_option define -maxchars maxChars MaxChars 80 {}
   itk_option define -state state State normal {}
   itk_option define -validate validate Validate {} {}
   itk_option define -validatedata validateData ValidateData {} {}
   itk_option define -variable variable Variable {} {}

   # PRIVATE
   private {
      # methods
      # variables
      variable _variableInUse {}
      variable _textVariable {}
   }

   # PROTECTED (private to the world public to the class)
   # variables

   # PUBLIC
   public {
      # methods
      method delete {args}
      method get {}
      method icursor {args}
      method index {args}
      method insert {args}
      method scan {args}
      method selection {args}
      method xview {args}
      method varChange {args}
      method varChange2 {args}
      method varUnset {args}
      # procs
   }

   # BINDINGS
   mwbind EuidlEntry <FocusIn> {
      if { [%W cget -takefocus] == 1 } {
         focus -force [%W component euidlEntry]
         set str [%W get]
         if {[regexp {^<(.*)>$} $str]} {
            %W configure -exportselection 0
            after idle [list \
               if { [string match [%W component euidlEntry] [focus]] } {
                  %W selection range 0 end;
                  %W configure -exportselection 0
               }]
         }
      }
   }

   mwbind EuidlEntry <FocusOut> {
      %W configure -exportselection 1
   }

   bind Entry <<Paste>> {
      global tcl_platform
      catch {
        catch {
           %W delete sel.first sel.last
        }
        %W insert insert [selection get -displayof %W -selection CLIPBOARD]
        tk::EntrySeeInsert %W
      }
   }

   bind Entry <Home> {
      if { [string match {} %A] } {
         tk::EntrySetCursor %W 0
      } else {
         tk::EntryInsert %W %A
      }
   }

   bind Entry <End> {
      if { [string match {} %A] } {
         tk::EntrySetCursor %W end
      } else {
         tk::EntryInsert %W %A
      }
   }

   bind Entry <Right> {
      if { [string match {} %A] } {
         tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
      } else {
         tk::EntryInsert %W %A
      }
   }

   bind Entry <Left> {
      if { [string match {} %A] } {
         tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
      } else {
         tk::EntryInsert %W %A
      }
   }


   bind Entry <Insert> {
      if { [string match {} %A] } {
         catch {tk::EntryInsert %W [selection get -displayof %W]}
      } else {
         tk::EntryInsert %W %A
      }
   }

   # Different systems behave differently so must determine if this
   # is an actual delete or not.
   bind Entry <Delete> {
      if {[scan %A %%c match] == -1} {
            if {[string match {} %A]} {
               set match 127
            } else {
               continue
            }
      }
      if { $match == 127 } {
         if {[%W selection present]} {
             %W delete sel.first sel.last
         } else {
             %W delete insert
         }
      } else {
         tk::EntryInsert %W %A
      }
   }
}

 
# ----------------------------------------------------------------------------
# Provide lowercase access procedure for the EuidlEntry class
# ----------------------------------------------------------------------------
proc ::euidl::entry {pathName args} {
   uplevel ::euidl::EuidlEntry $pathName $args
}

# ----------------------------------------------------------------------------
#  CONSTRUCTOR
# ----------------------------------------------------------------------------
body ::euidl::EuidlEntry::constructor {args} {

   itk_component add euidlEntry {
      entry $itk_interior.euidlEntry
   } {
      usual
      keep -borderwidth -cursor -exportselection -font
      keep -highlightbackground -highlightcolor -highlightthickness
      keep -insertbackground -insertborderwidth -insertofftime -insertontime
      keep -insertwidth -invalidcommand -justify -relief -selectbackground
      keep -selectborderwidth -selectforeground -show -state -takefocus -width
      keep -xscrollcommand -validate -validatecommand
      rename -background -entrybackground entryBackground Background
      rename -foreground -entryforeground entryForeground Foreground
      ignore -textvariable
   }
   pack $itk_component(euidlEntry) -fill both -expand TRUE

   # Propagate the bindtags into the children
   mwbindtags $itk_component(hull) EuidlEntry

   # Evaluate options
   eval itk_initialize $args
}

# ----------------------------------------------------------------------------
#  DESTRUCTOR
# ----------------------------------------------------------------------------
body ::euidl::EuidlEntry::destructor {} {
   if {![string match {} $_variableInUse]} {
      uplevel #0 \
            [list trace vdelete $_variableInUse w [list $this varChange]]
      uplevel #0 \
            [list trace vdelete $_textVariable w [list $this varChange2]]
      uplevel #0 \
            [list trace vdelete $_variableInUse u [list $this varUnset]]
   }
}

# ===========================================================================
# = OPTIONS
# ============================================================================

# ----------------------------------------------------------------------------
# OPTION:	-maxchars maxChars MaxChars {}
#
# Purpose:	Specify the maximum number of characters allowed.
#
# Comments:	N/A
#
# See Also:	N/A
#
# ----------------------------------------------------------------------------
configbody ::euidl::EuidlEntry::maxchars {
   if {[regexp {[^0-9]} $itk_option(-maxchars)] || \
	      ($itk_option(-maxchars) < 1) } {
      error "bad maxchars value \"$itk_option(-maxchars)\": \
      must be greater than 1."
   }
   $itk_component(hull) delete $itk_option(-maxchars) end

   if { ![string match {} $itk_option(-validatedata)] } {
      $itk_component(hull) configure \
         -validatecommand \
            [list euidl::errHandler::validatedata \
               -type $itk_option(-validatedata) \
               -data %P \
               -maxlength $itk_option(-maxchars) \
               -inserting %d \
               -eventtype %V \
               -entrydefault 1 \
               -window %W] \
         -invalidcommand \
            [list euidl::errHandler::invalidcommand \
               -window %W \
               -type $itk_option(-validatedata) \
               -data %P \
               -maxlength $itk_option(-maxchars)]
   }
} 

# ----------------------------------------------------------------------------
# OPTION:	-validatedata validateData ValidataData {}
#
# Purpose:	Type of validation require on text
#
# Comments:	N/A
#
# See Also:	N/A
#
# ----------------------------------------------------------------------------
configbody ::euidl::EuidlEntry::validatedata {
   if { ![string match {} $itk_option(-validatedata)] } {
      if { [string match {} $itk_option(-validate)]  || \
           [string match none $itk_option(-validate)] } {
         $itk_component(hull) configure -validate all
      }
      $itk_component(hull) configure \
         -validatecommand \
            [code euidl::errHandler::validatedata \
               -type $itk_option(-validatedata) \
               -data %P \
               -maxlength $itk_option(-maxchars) \
               -inserting %d \
               -event %V \
               -entrydefault 1 \
               -window %W] \
         -invalidcommand \
            [code euidl::errHandler::invalidcommand \
               -window %W \
               -type $itk_option(-validatedata) \
               -data %P \
               -event %V \
               -maxlength $itk_option(-maxchars)]
   }
} 

# ----------------------------------------------------------------------------
# OPTION:	-state state State normal
#
# Purpose:	Specify the overall state of the EuidlEntry
#
# Comments:	N/A
#
# See Also:	N/A
#
# ----------------------------------------------------------------------------
configbody ::euidl::EuidlEntry::state {
    switch -- $itk_option(-state) {
        disabled {
           $itk_component(euidlEntry) configure -state disabled
           $itk_component(euidlEntry) configure \
                 -background $itk_option(-disabledbackground) \
                 -foreground $itk_option(-disabledforeground) \
                 -selectbackground $itk_option(-disabledbackground) \
                 -selectforeground $itk_option(-disabledforeground) \
                 -selectborderwidth 0
        }
        normal {
           $itk_component(euidlEntry) configure -state normal
           $itk_component(euidlEntry) configure \
               -background $itk_option(-entrybackground) \
               -foreground $itk_option(-entryforeground) \
               -selectbackground $itk_option(-selectbackground) \
               -selectforeground $itk_option(-selectforeground) \
               -selectborderwidth 1
        }
        default {
            error "bad state value \"$itk_option(-state)\":\
                                   must be normal or disabled"
        }
    }

} 

# ----------------------------------------------------------------------------
# OPTION:	-variable variable Variable {}
#
# Purpose:	Specify the variable to associate with this entry.
#
# Comments:	N/A
#
# See Also:	N/A
#
# ----------------------------------------------------------------------------
configbody ::euidl::EuidlEntry::variable {

   if { [string match {} $itk_option(-variable)] } {
      # If the variable is not defined, do nothing.
      return
   }

   upvar #0 $itk_option(-variable) localVar

   if { ![info exists localVar] } {
      set preTrace [trace vinfo localVar]
      set i 0
      foreach pt $preTrace {
         set trId($i,op) [lindex $pt 0]
         set trId($i,cmd) [lindex $pt 1]

         if { [string match w $trId($i,op)] } {
            uplevel #0 [list trace vdelete $itk_option(-variable) $trId($i,op) $trId($i,cmd)]
         }
         incr i
      }

      set localVar {} 

      for { set j 0 } { $j < $i } { incr j } {
         uplevel #0 [list \
               trace variable $itk_option(-variable) $trId($j,op) $trId($j,cmd)]
      }
   }

   # We must trace the variable to keep it in sync.
   if [string match {} $_variableInUse] {
      set _textVariable "_[namespace tail $this]_var"
      set ${_textVariable} $localVar
      $itk_component(euidlEntry) configure -textvariable ${_textVariable}

      varChange
      uplevel #0 \
         [list trace variable \
               $itk_option(-variable) w [list $this varChange]]
      uplevel #0 \
         [list trace variable \
               $_textVariable w [list $this varChange2]]

      uplevel #0 \
         [list trace variable \
               $itk_option(-variable) u [list $this varUnset]]

   } elseif [string match $_variableInUse $itk_option(-variable)] {
      # We already have a trace so ignore
   } else {
      # We need to trace on a different variable
      uplevel #0 \
            [list trace vdelete $_variableInUse w [list $this varChange]]
      uplevel #0 \
            [list trace vdelete $_variableInUse u [list $this varUnset]]

      varChange
      uplevel #0 \
            [list trace variable \
                  $itk_option(-variable) w [list $this varChange]]
      uplevel #0 \
         [list trace variable \
               $itk_option(-variable) u [list $this varUnset]]
   }
   set _variableInUse $itk_option(-variable)
} 

# ===========================================================================
# = METHODS
# ============================================================================

# ----------------------------------------------------------------------------
#   Wrapped methods of the standard entry
# ----------------------------------------------------------------------------
# ------------------------------------------------------------------
# METHOD: delete
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::delete {args} {
    return [eval $itk_component(euidlEntry) delete $args]
}
# ------------------------------------------------------------------
# METHOD: get 
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::get {} {
    return [$itk_component(euidlEntry) get]
}
# ------------------------------------------------------------------
# METHOD: icursor 
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::icursor {args} {
    return [eval $itk_component(euidlEntry) icursor $args]
}
# ------------------------------------------------------------------
# METHOD: index 
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::index {args} {
    return [eval $itk_component(euidlEntry) index $args]
}
# ------------------------------------------------------------------
# METHOD: insert 
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::insert {args} {
   return [eval $itk_component(euidlEntry) insert $args]
}
# ------------------------------------------------------------------
# METHOD: scan 
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::scan {args} {
    return [eval $itk_component(euidlEntry) scan $args]
}
# ------------------------------------------------------------------
# METHOD: selection
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::selection {args} {
    return [eval $itk_component(euidlEntry) selection $args]
}
# ------------------------------------------------------------------
# METHOD: xview 
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::xview {args} {
    return [eval $itk_component(euidlEntry) xview $args]
}

# ------------------------------------------------------------------
# METHOD:  
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::varChange {args} {
   upvar #0 $itk_option(-variable) var

   if {![string match {} $var]} {
      # Compare variable to tiny only if var is a valid numerical value.
      if { [string is double $var] && ![catch {expr double($var)}] } {
         if {[expr $var == [expr pow(2,-100)]]} {
            set var {}
         }
      }
   }
   upvar #0 ${_textVariable} var2
   set var2 $var
}

# ------------------------------------------------------------------
# METHOD:  
# ------------------------------------------------------------------
body ::euidl::EuidlEntry::varChange2 {args} {
#   upvar #0 $itk_option(-variable) var
   upvar #0 ${_textVariable} var2
#   set var $var2
   uplevel #0 [list set $itk_option(-variable) $var2]
}

body ::euidl::EuidlEntry::varUnset {args} {

   uplevel #0 \
      [list trace variable \
            $itk_option(-variable) w [list $this varChange]]

   uplevel #0 \
      [list trace variable \
            $itk_option(-variable) u [list $this varUnset]]
}
