proc changeColourOps { } {
global use_colour_ops
global preview
$preview setOperationOn "colourFill" [$use_colour_ops getCurrentValue]
}
proc changeColourValues {} {
global colour_fill_option
global colour_lookup_file
global colour_pen
global colour_allow_pen_mods
global preview
set buffer [subst { colour_fill_option = "[$colour_fill_option getCurrentValue]"
colour_lookup_file = "[$colour_lookup_file getCurrentValue]"
colour_pen = "[$colour_pen getCurrentValue]"
colour_allow_pen_mods = "[$colour_allow_pen_mods getCurrentValue]" } ]
$preview loadBuffer "colourFill" $buffer
}
GuidoPanel colour_opsb {
global cfill_fields
for {set idx 0} {$idx < [array size cfill_fields]} {incr idx} {
global "colour_$cfill_fields($idx)"
}
global use_colour_ops
-layout BoxLayout Y_AXIS
GuidoPanel colour_ops_p1 {
-layout CentreLineLayout
GuidoLabel use_colour_ops_label {
-font_style bold
-label "Use colour fill"
}
GuidoCheckBox use_colour_ops {
-selected_value Y
-tip "00227_5_TIP_001"
-unselected_value N
-action mouseClicked {[changeColourOps]}
}
}
GuidoPanel colour_ops_dependency_p1 {
-dependency { "[ $use_colour_ops getCurrentValue ]" == "Y" }
-layout BoxLayout Y_AXIS
GuidoLabel frm00227_222 {
-font_style bold
-label "Note: This attribute only works"
}
GuidoLabel frm00227_223 {
-font_style bold
-label "with HPGL2 compatible plotters"
}
GuidoFiller colour_ops_0 {
-height 1
}
GuidoPanel colour_ops_1 {
-layout CentreLineLayout
GuidoPanel frm00227_233 {
-label "Apply to"
-layout BoxLayout X_AXIS
-tip "00227_5_TIP_002"
GuidoButtonGroupPanel colour_fill_option {
-layout BoxLayout X_AXIS
GuidoRadioButton frm00227_231 {
-caption segment
-default true
-selected_value segment
-action mouseClicked {[changeColourValues]}
}
GuidoRadioButton frm00227_232 {
-caption string
-selected_value string
-action mouseClicked {[changeColourValues]}
}
}
}
}
GuidoFiller colour_ops_2 {
-height 1
}
GuidoPanel colour_ops_3 {
-layout CentreLineLayout VERTICAL LEFT
GuidoLabel lookupfilelabellabel {
-label "Use a lookup file"
}
GuidoFiller filler {}
GuidoFileBrowserField colour_lookup_file {
-legacy_dependency
-display_length 10
-format none
-label "Lookup file"
-max_length 40
-tip "00227_5_TIP_003"
-translate upper
-action valueChanged {[changeColourValues]}
}
GuidoComboBox colour_lookup_field {
-dependency {"[$colour_lookup_file getCurrentValue]" != ""}
-dependency { "[ $use_colour_ops getCurrentValue ]" == "Y" }
-default D1
-display_length 10
-format string_field
-label "Lookup field"
-max_length 6
-null true
-tip "00227_5_TIP_004"
-value_in 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
-translate upper
}
GuidoButtonGroupPanel colour_method {
-dependency {"[$colour_lookup_file getCurrentValue]" != ""}
-dependency { "[ $use_colour_ops getCurrentValue ]" == "Y" }
-label "Determine colour by"
-layout BoxLayout X_AXIS
-tip "00227_5_TIP_005"
GuidoRadioButton frm00227_235 {
-caption match
-default true
-selected_value match
}
GuidoRadioButton frm00227_236 {
-caption bounds
-selected_value bounds
}
}
GuidoLabel orPenLabel {
-label "or pen"
}
GuidoFiller filler2 {}
GuidoField colour_pen {
-dependency {"[$colour_lookup_file getCurrentValue]" == ""}
-dependency { "[ $use_colour_ops getCurrentValue ]" == "Y" }
-default 1
-display_length 3
-format integer
-high_bound 999
-label "Pen number"
-low_bound 1
-max_length 3
-null false
-tip "The pen number is only used if you are NOT using a lookup file."
-translate upper
-action valueChanged {[changeColourValues]}
}
GuidoCheckBox colour_allow_pen_mods {
-dependency {"[$colour_lookup_file getCurrentValue]" == ""}
-dependency { "[ $use_colour_ops getCurrentValue ]" == "Y" }
-label "PLT_LABEL_ALLOW_PEN_MODS"
-default true
-selected_value Y
-unselected_value N
-tip "PLT_ALLOW_PEN_MODIFIERS"
}
}
}
}
$colour_ops add [eval "\$colour_opsb getObject"]
global frm00227
$use_colour_ops setCurrentValue 1
$use_colour_ops setCurrentValue 0
$use_colour_ops setCurrentValue [$frm00227 readInputField use_colour_ops]
if {[$frm00227 readInputField use_colour_ops] == "Y"} {
global cfill_fields
for {set idx 0} {$idx < [array size cfill_fields]} {incr idx} {
global "colour_$cfill_fields($idx)"
}
for {set idx 0} {$idx < [array size cfill_fields]} {incr idx} {
set val [$frm00227 readInputField colour_$cfill_fields($idx)]
if {$val > ""} {
eval "\$colour_$cfill_fields($idx) setCurrentValue \"\""
eval "\$colour_$cfill_fields($idx) setCurrentValue \"$val\""
} else {
eval "\$colour_$cfill_fields($idx) setCurrentValue \" \""
eval "\$colour_$cfill_fields($idx) setCurrentValue \"\""
}
}
}
