proc prepareIDNumberValue { formHandle } {
set rValue "[$formHandle readInputField IDNumber]"
return $rValue;
}
proc prepareLabelValue { formHandle } {
set lValue "[$formHandle readInputField label]"
return $lValue;
}
proc prepareStringValue { formHandle } {
set sValue "line_colour~[$formHandle readInputField line_colour]!"
append sValue "line_weight~[$formHandle readInputField line_weight]!"
append sValue "line_pattern~[$formHandle readInputField line_pattern]!"
append sValue "line_join~[$formHandle readInputField line_join]!"
append sValue "line_end~[$formHandle readInputField line_end]"
return $sValue
}
proc prepareMarkerValue {formHandle } {
set mValue "marker_symbol~[$formHandle readInputField marker_symbol]!"
append mValue "marker_size~[$formHandle readInputField marker_size]"
return $mValue
}
proc preparePolygonValue {formHandle } {
set transmissionColor [$formHandle readInputField transmission]
if {$transmissionColor == ""} {
set transmissionColor "none"
}
set pValue "face_colour~[$formHandle readInputField face_colour]!"
append pValue "edge_weight~[$formHandle readInputField edge_weight]!"
append pValue "edge_pattern~[$formHandle readInputField edge_pattern]!"
append pValue "specular~[$formHandle readInputField specular]!"
append pValue "transmission~$transmissionColor!"
append pValue "gloss~[$formHandle readInputField gloss]!"
append pValue "face_pattern~[$formHandle readInputField face_pattern]"
return $pValue
}
proc setupFields {formHandle} {
global IDNumber
global stringLabel
global s
global m
global p
$IDNumber setCurrentValue [prepareIDNumberValue $formHandle ]
$stringLabel setCurrentValue [prepareLabelValue $formHandle ]
$s setCurrentValue [prepareStringValue $formHandle ]
$m setCurrentValue [prepareMarkerValue $formHandle ]
$p setCurrentValue [preparePolygonValue $formHandle ]
}
proc writeNormalValues {formHandle value} {
set valueList [split $value ~!]
for {set index 0 } {$index < [llength $valueList]} {incr index 2} {
set listKey [lindex $valueList $index]
if {[string compare $listKey "transmission"] ==  0} {
if {[string compare [lindex $valueList [expr $index +1]] "none"] ==  0} {
set listValue ""
} else {
set listValue [lindex $valueList [expr $index +1] ]
}
} else {
set listValue [lindex $valueList [expr $index +1] ]
}
$formHandle writeOutputField "$listKey" $listValue
}
}
proc writeOutFields {formHandle} {
global IDNumber
global stringLabel
global s
global m
global p
if { [string compare [$formHandle getStatus] "legacy preprocess apply"] ==  0 } {
$formHandle preprocessInit
set labelName label
$formHandle writeOutputField "$labelName" [$stringLabel getCurrentValue ]
writeNormalValues $formHandle [$s getCurrentValue ]
writeNormalValues $formHandle [$m getCurrentValue ]
writeNormalValues $formHandle [$p getCurrentValue ]
$formHandle finishedWritingFields
}
}
GuidoForm frm00576 {
-help_id 1281
-action initial {[setupFields $frm00576]}
-action stateChanged {[writeOutFields $frm00576 ]}
-label "Object Drawing Properties"
-default_buttons
-tip STYLES_ONE_STRING_TIP
GuidoLabel l1 {
-label "Object number"
}
GuidoField IDNumber {
-display_length 5
-format none
-height 1
-input false
}
GuidoFiller f0 {
-height 1
}
GuidoFiller f0 {
-height 1
}
GuidoField stringLabel {
-display_length 5
-label Label
-format none
-tip STYLES_LABEL_TIP
}
GuidoFiller f1 {
-height .2
}
GuidoFiller f1 {
-height .2
}
StringLineStyles s {
-label Line
-tip STYLES_STRING_TIP
}
GuidoFiller f1 {
-height .2
}
GuidoFiller f1 {
-height .2
}
MarkerSymbols m {
-label Markers
-tip STYLES_MARKER_TIP
}
GuidoFiller f1 {
-height .2
}
GuidoFiller f1 {
-height .2
}
PolygonStyles p {
-label Polygon
-tip STYLES_POLYGON_TIP
}
$frm00576 legacyProcessValues false
}
