proc changeStringValues { idx_c idx showValue } {
global string_ops_str_attribute$idx_c
global string_ops_str_field$idx_c
global string_ops_str_ndec$idx_c
global string_ops_str_notation$idx_c
global string_ops_str_symbol$idx_c
global string_ops_str_image$idx_c
global string_ops_str_filled$idx_c
global string_ops_str_direction$idx_c
global string_ops_str_bearing$idx_c
global string_ops_str_distance$idx_c
global string_ops_str_distance_type$idx_c
global string_ops_str_position$idx_c
global string_ops_str_text_angle$idx_c
global string_ops_str_text_angle_type$idx_c
global string_ops_str_horiz_just$idx_c
global string_ops_str_vert_just$idx_c
global string_ops_str_font$idx_c
global string_ops_str_bold_font$idx_c
global string_ops_str_italic_font$idx_c
global string_ops_str_underline_font$idx_c
global string_ops_str_text_height$idx_c
global string_ops_str_pen$idx_c
global string_ops_str_allow_pen_mods$idx_c
global preview
upvar 0 "string_ops_str_field$idx_c" str_field
upvar 0 "string_ops_str_ndec$idx_c" str_ndec
upvar 0 "string_ops_str_notation$idx_c" str_notation
upvar 0 "string_ops_str_symbol$idx_c" str_symbol
upvar 0 "string_ops_str_image$idx_c" str_image
upvar 0 "string_ops_str_filled$idx_c" str_filled
upvar 0 "string_ops_str_direction$idx_c" str_direction
upvar 0 "string_ops_str_bearing$idx_c" str_bearing
upvar 0 "string_ops_str_distance$idx_c" str_distance
upvar 0 "string_ops_str_distance_type$idx_c"  str_distance_type
upvar 0 "string_ops_str_position$idx_c" str_position
upvar 0 "string_ops_str_text_angle$idx_c" str_text_angle
upvar 0 "string_ops_str_text_angle_type$idx_c" str_text_angle_type
upvar 0 "string_ops_str_horiz_just$idx_c" str_horiz_just
upvar 0 "string_ops_str_vert_just$idx_c" str_vert_just
upvar 0 "string_ops_str_font$idx_c" str_font
upvar 0 "string_ops_str_bold_font$idx_c" str_bold_font
upvar 0 "string_ops_str_italic_font$idx_c" str_italic_font
upvar 0 "string_ops_str_underline_font$idx_c" str_underline_font
upvar 0 "string_ops_str_text_height$idx_c" str_text_height
upvar 0 "string_ops_str_pen$idx_c" str_pen
upvar 0 "string_ops_str_attribute$idx_c" str_attribute
upvar 0 "string_ops_str_allow_pen_mods$idx_c" str_allow_pen_mods
set buffer [subst { str_attribute = "[$str_attribute getCurrentValue]"
str_field = "[$str_field getCurrentValue]"
str_ndec = "[$str_ndec getCurrentValue]"
str_notation = "[$str_notation getCurrentValue]"
str_symbol = "[$str_symbol getCurrentValue]"
str_image = "[$str_image getCurrentValue]"
str_filled = "[$str_filled getCurrentValue]"
str_direction = "[$str_direction getCurrentValue]"
str_bearing = "[$str_bearing getCurrentValue]"
str_distance = "[$str_distance getCurrentValue]"
str_distance_type = "[$str_distance_type getCurrentValue]"
str_position = "[$str_position getCurrentValue]"
str_text_angle = "[$str_text_angle getCurrentValue]"
str_text_angle_type = "[$str_text_angle_type getCurrentValue]"
str_horiz_just = "[$str_horiz_just getCurrentValue]"
str_vert_just = "[$str_vert_just getCurrentValue]"
str_font = "[$str_font getCurrentValue]"
str_bold_font = "[$str_bold_font getCurrentValue]"
str_italic_font = "[$str_italic_font getCurrentValue]"
str_underline_font = "[$str_underline_font getCurrentValue]"
str_text_height = "[$str_text_height getCurrentValue]"
str_pen = "[$str_pen getCurrentValue]"
str_allow_pen_mods = "[$str_allow_pen_mods getCurrentValue]" } ]
if {$showValue == "Y"} {
$preview loadBuffer "String Op $idx" $buffer
}
}
proc addstringpanel {idx_c idx string_ops_p1} {
global str_attribute_tip
global str_field_tip
global str_ndec_tip
global str_notation_tip
global str_symbol_tip
global str_filled_tip
global str_position_tip
global str_direction_tip
global str_bearing_tip
global str_distance_tip
global str_distance_type_tip
global str_text_height_tip
global str_text_angle_tip
global str_text_angle_type_tip
global str_horiz_just_tip
global str_vert_just_tip
global str_priority_tip
global str_pen_tip
global use_string_ops
global use_string_ops_1
global use_string_ops_2
global use_string_ops_3
global use_string_ops_4
global use_string_ops_5
global use_string_ops_6
global use_string_ops_7
global use_string_ops_8
global use_string_ops_9
global str_fields
for {set temp_idx 0} {$temp_idx < [array size str_fields]} {incr temp_idx} {
global "string_ops_str_$str_fields($temp_idx)$idx_c"
}
upvar 0 "use_string_ops_$idx" checked
GuidoPanel "string_ops_container$idx" {
-layout GridLayout 3 2
GuidoPanel "Data_source_p$idx" {
-label "Data source"
-layout CentreLineLayout
-border etched true
GuidoComboBox "string_ops_str_attribute$idx_c" {
-default field
-display_length 11
-format none
-label "Attribute type"
-max_length 12
-null false
-tip $str_attribute_tip
-value_in field symbol image "sym in field" note "note+field" "\(field\)"
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
upvar 0 "string_ops_str_attribute$idx_c" attribute
GuidoComboBox "string_ops_str_field$idx_c" {
-default STR
-dependency { [ typecallback $attribute ] }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-display_length 11
-format none
-label "String file field"
-null false
-max_length 6
-tip $str_field_tip
-value_in STR Y X Z DESC D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100 STRSEG PTS LOC ID
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoField "string_ops_str_ndec$idx_c" {
-default 0
-dependency { [ typecallback $attribute ] }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-display_length 8
-format integer
-label "# of decimals"
-max_length 2
-null false
-tip $str_ndec_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
-low_bound 0
}
GuidoField "string_ops_str_notation$idx_c" {
-display_length 8
-dependency { "[ $attribute getCurrentValue ]" == "note" ||
"[ $attribute getCurrentValue ]" == "note+field" }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-format none
-label Notation
-max_length 14
-tip $str_notation_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoSymbolBrowserField "string_ops_str_symbol$idx_c" {
-display_length 12
-dependency { "[ $attribute getCurrentValue ]" == "symbol" ||
"[ $attribute getCurrentValue ]" == "sym in field" }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-format none
-label Symbol
-max_length 12
-tip $str_symbol_tip
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
upvar 0 "string_ops_str_symbol$idx_c" symbolField
$attribute setActionCallback valueChanged { [attributeCallback $attribute $symbolField] }
GuidoFileBrowserField "string_ops_str_image$idx_c" {
-display_length 12
-dependency { "[ $attribute getCurrentValue ]" == "image" }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-file_mask "*.gif *.jpg *.jpeg *.tif *.bmp *.png"
-format none
-label Image
-max_length 252
-translate none
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
}
GuidoPanel "position_and_direction_str_p$idx" {
-label "Position, direction and filling"
-layout CentreLineLayout
-border etched true
GuidoCheckBox "string_ops_str_filled$idx_c" {
-dependency { "[ $attribute getCurrentValue ]" == "symbol"}
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-label "Fill symbol"
-default false
-selected_value Yes
-unselected_value No
-help $str_filled_tip
-action mouseClicked {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoComboBox "string_ops_str_position$idx_c" {
-default centre
-display_length 11
-format none
-label Position
-max_length 9
-null false
-tip $str_position_tip
-value_in start "b1-2" last centre centroid frequency
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
upvar 0 "string_ops_str_position$idx_c" position
GuidoComboBox "string_ops_str_direction$idx_c" {
-default none
-dependency { "[ $position getCurrentValue ]" != "frequency" }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-display_length 11
-format none
-label Direction
-max_length 8
-null false
-tip $str_direction_tip
-value_in none angle forward backward centre
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
upvar 0 "string_ops_str_direction$idx_c" direction
GuidoField "string_ops_str_bearing$idx_c" {
-default 0.0
-dependency { "[ $position getCurrentValue ]" != "frequency" &&
"[ $direction getCurrentValue ]" == "angle" }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-display_length 8
-format double
-high_bound 360.000000
-low_bound 0.000000
-label "Angle from point"
-max_length 3
-null false
-tip $str_bearing_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoField "string_ops_str_distance$idx_c" {
-default 5.0
-dependency { "[ $position getCurrentValue ]" == "frequency" ||
"[ $direction getCurrentValue ]" != "none" }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-display_length 8
-format double
-label "Dist. from point"
-max_length 6
-null false
-tip $str_distance_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
upvar 0 "string_ops_str_distance$idx_c" distance
$position setActionCallback valueChanged {[positionCallback $position $distance]}
GuidoComboBox "string_ops_str_distance_type$idx_c" {
-default actual
-dependency { "[ $position getCurrentValue ]" != "frequency" &&
[ directioncallback $direction ] }
-dependency { "[ $checked getCurrentValue ]" == "Y" &&
"[ $use_string_ops getCurrentValue ]" == "Y"}
-display_length 11
-format none
-label "Distance type"
-max_length 11
-null false
-tip $str_distance_type_tip
-value_in actual percentage
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
}
GuidoPanel "str_text_p$idx" {
-label "Text properties"
-layout CentreLineLayout
-border etched true
GuidoField "string_ops_str_text_angle$idx_c" {
-default 0.0
-display_length 8
-format none
-label "Text angle"
-max_length 5
-null false
-tip $str_text_angle_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoComboBox "string_ops_str_text_angle_type$idx_c" {
-default absolute
-display_length 11
-format none
-label "Text angle type"
-max_length 8
-null false
-tip $str_text_angle_type_tip
-value_in absolute relative bearing
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoComboBox "string_ops_str_horiz_just$idx_c" {
-default centre
-display_length 11
-format none
-label "Horiz. just."
-max_length 6
-null false
-tip $str_horiz_just_tip
-value_in left centre right
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoComboBox "string_ops_str_vert_just$idx_c" {
-default centre
-display_length 11
-format none
-label "Vert. just."
-max_length 6
-null false
-tip $str_vert_just_tip
-value_in top centre bottom
-alternative_mlt_keys top centre PLT_BOTTOM
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
}
GuidoPanel "string_ops_str_font_p$idx" {
-label "Font options"
-layout CentreLineLayout
-border etched true
GuidoFontNameBrowser "string_ops_str_font$idx_c" {
-label "Name"
-null false
-allowDefault true
-display_length 12
-format none
-max_length 50
-next_focus "string_ops_str_bold_font$idx_c"
-tip "PLT_FONT_NAME_TIP"
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoCheckBox "string_ops_str_bold_font$idx_c" {
-label "FONT_STYLE_BOLD"
-selected_value Y
-tip "FONT_STYLE_BOLD_TIP"
-unselected_value N
-next_focus "string_ops_str_italic_font$idx_c"
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoCheckBox "string_ops_str_italic_font$idx_c" {
-label "FONT_STYLE_ITALIC"
-selected_value Y
-tip "FONT_STYLE_ITALIC_TIP"
-unselected_value N
-next_focus "string_ops_str_underline_font$idx_c"
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoCheckBox "string_ops_str_underline_font$idx_c" {
-label "FONT_STYLE_UNDERLINE"
-selected_value Y
-tip "FONT_STYLE_UNDERLINED_TIP"
-unselected_value N
-next_focus "string_ops_str_height$idx_c"
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoField "string_ops_str_text_height$idx_c" {
-default 1.8
-display_length 8
-format none
-label "Text height"
-max_length 6
-null false
-tip $str_text_height_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
}
GuidoPanel "Other_prop_p$idx" {
-label "Other properties"
-layout CentreLineLayout
-border etched true
GuidoField "string_ops_str_priority$idx_c" {
-default 101
-display_length 8
-format integer
-high_bound 125
-low_bound 0
-label Priority
-max_length 3
-null false
-tip $str_priority_tip
-translate upper
}
GuidoField "string_ops_str_pen$idx_c" {
-default 1
-display_length 3
-format integer
-high_bound 999
-low_bound 1
-label "Pen number"
-max_length 3
-null false
-tip $str_pen_tip
-translate upper
-action valueChanged {[changeStringValues $idx_c $idx [$checked getCurrentValue]]}
}
GuidoCheckBox "string_ops_str_allow_pen_mods$idx_c" {
-label "PLT_LABEL_ALLOW_PEN_MODS"
-default true
-selected_value Y
-unselected_value N
-tip "PLT_ALLOW_PEN_MODIFIERS"
}
}
}
$string_ops_p1 add [eval "\$string_ops_container$idx getObject"]
global "string_ops_str_font$idx_c"
upvar 0 "string_ops_str_font$idx_c" str_font
$str_font updateBrowserList
}
