proc changeLineValues {} {
global line_type
global line_pattern_length
global line_pen
global line_allow_pen_mods
global preview
set buffer [subst { line_type = "[$line_type getCurrentValue]"
line_pattern_length = "[$line_pattern_length getCurrentValue]"
line_pen = "[$line_pen getCurrentValue]"
line_allow_pen_mods = "[$line_allow_pen_mods getCurrentValue]" } ]
$preview loadBuffer "lines" $buffer
}
proc setLinesOn {} {
global preview
global use_line_ops
$preview setOperationOn "lines" [$use_line_ops getCurrentValue]
changeLineValues
}
GuidoPanel _main_main_10b {
global line_fields
for {set idx 0} {$idx < [array size line_fields]} {incr idx} {
global "line_$line_fields($idx)"
}
global use_line_ops
-layout BoxLayout X_AXIS
GuidoPanel _main_main_8 {
-layout BoxLayout Y_AXIS
GuidoPanel frm00227_243 {
-layout CentreLineLayout
GuidoLabel use_line_ops_label {
-font_style bold
-label "Use line operation"
}
GuidoCheckBox use_line_ops {
-selected_value Y
-tip "00227_2_TIP_001"
-unselected_value N
-action mouseClicked {[setLinesOn]}
}
}
GuidoPanel line_ops {
-border etched true
-layout BoxLayout Y_AXIS
-dependency { "[ $use_line_ops getCurrentValue ]" == "Y" }
GuidoPanel line_ops_3 {
-layout CentreLineLayout
GuidoComboBox line_type {
-default --------
-display_length 11
-format none
-label "Line type"
-max_length 10
-tip "00227_2_TIP_002"
-value_in -------- "-- - --" "-- -- --" "--- ---" "-- .. --" "-- . --" "--  --  --" SPECIAL
-action valueChanged {[changeLineValues]}
}
GuidoField line_priority {
-default 0
-display_length 3
-format integer
-high_bound 125
-label "Line priority"
-low_bound 0
-max_length 3
-null false
-tip "00227_2_TIP_003"
-translate upper
}
GuidoField line_pen {
-default 1
-display_length 3
-format integer
-high_bound 999
-label "Pen number"
-low_bound 1
-max_length 3
-null false
-tip "PLT_STR_PEN_TIP"
-translate upper
-action valueChanged {[changeLineValues]}
}
GuidoCheckBox line_allow_pen_mods {
-label "PLT_LABEL_ALLOW_PEN_MODS"
-default true
-selected_value Y
-unselected_value N
-tip "PLT_ALLOW_PEN_MODIFIERS"
}
GuidoPanel line_ops_0 {
-label "Pattern repeat length"
-layout CentreLineLayout
GuidoField line_pattern_length {
-default 25
-display_length 5
-format double
-high_bound 2000.000000
-low_bound 0.000000
-max_length 5
-null false
-tip "Enter the pattern repeat length in millimetres for both standard and user-defined line types."
-translate upper
-action valueChanged {[changeLineValues]}
}
GuidoLabel frm00227_162 {
-label (mm)
}
}
GuidoFiller line_ops_1 {
-height 1
}
GuidoFiller line_ops_2 {
-height 1
}
}
GuidoPanel dep_special_panel {
-layout BoxLayout Y_AXIS
-dependency { "[ $line_type getCurrentValue ]" == "SPECIAL" &&
"[ $use_line_ops getCurrentValue ]" == "Y" }
GuidoPanel line_segments_p1 {
-layout CentreLineLayout
GuidoField line_segments {
-default 4
-display_length 3
-format integer
-high_bound 8
-label "# of segments in pattern"
-low_bound 1
-max_length 1
-null false
-tip "00227_2_TIP_006"
-translate upper
}
}
GuidoPanel line_ops_6 {
-layout BoxLayout X_AXIS
GuidoPanel line_ops_4 {
-label "Pen down"
-layout CentreLineLayout
-border etched true
GuidoFiller line_ops_7 {}
GuidoLabel frm00227_166 {
-label "Segment length"
}
GuidoField line_segment1 {
-dependency { "[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 1
-max_length 3
-next_focus line_segment2
-null false
-tip "00227_2_TIP_007"
-translate upper
}
GuidoField line_segment3 {
-dependency { "[ $line_segments getCurrentValue ]" > "2" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 3
-max_length 3
-next_focus line_segment4
-tip "00227_2_TIP_007"
-translate upper
}
GuidoField line_segment5 {
-dependency { "[ $line_segments getCurrentValue ]" > "4" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 5
-max_length 3
-next_focus line_segment6
-tip "00227_2_TIP_007"
-translate upper
}
GuidoField line_segment7 {
-dependency { "[ $line_segments getCurrentValue ]" > "6" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 7
-max_length 3
-next_focus line_segment8
-tip "00227_2_TIP_007"
-translate upper
}
}
GuidoFiller line_ops_9 {
-width 1
}
GuidoPanel line_ops_5 {
-label "Pen up"
-layout CentreLineLayout
-border etched true
GuidoFiller line_ops_8 {}
GuidoLabel frm00227_167 {
-label "Segment length"
}
GuidoField line_segment2 {
-dependency { "[ $line_segments getCurrentValue ]" > "1" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 2
-max_length 6
-next_focus line_segment3
-tip "00227_2_TIP_007"
-translate upper
}
GuidoField line_segment4 {
-dependency { "[ $line_segments getCurrentValue ]" > "3" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 4
-max_length 3
-next_focus line_segment5
-tip "00227_2_TIP_007"
-translate upper
}
GuidoField line_segment6 {
-dependency { "[ $line_segments getCurrentValue ]" > "5" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 6
-max_length 3
-next_focus line_segment7
-tip "00227_2_TIP_007"
-translate upper
}
GuidoField line_segment8 {
-dependency { "[ $line_segments getCurrentValue ]" > "7" &&
"[ $line_type getCurrentValue ]" == "SPECIAL" }
-display_length 3
-format none
-label 8
-max_length 3
-tip "00227_2_TIP_007"
-translate upper
}
}
GuidoFiller line_ops_9 {
-width 1
}
}
}
}
}
}
$_main_main_10 add [eval "\$_main_main_10b getObject"]
global frm00227
$use_line_ops setCurrentValue 1
$use_line_ops setCurrentValue 0
$use_line_ops setCurrentValue [$frm00227 readInputField use_line_ops]
$line_type setCurrentValue --------
$line_type setCurrentValue "-- -- --"
$line_type setCurrentValue --------
if {[$frm00227 readInputField use_line_ops] == "Y"} {
global line_fields
global preview
for {set idx 0} {$idx < [array size line_fields]} {incr idx} {
global "line_$line_fields($idx)"
}
for {set idx 0} {$idx < [array size line_fields]} {incr idx} {
set val [$frm00227 readInputField line_$line_fields($idx)]
if {$val > ""} {
eval "\$line_$line_fields($idx) setCurrentValue \"\""
eval "\$line_$line_fields($idx) setCurrentValue \"$val\""
}
}
}
