proc isNumeric {x} {
set a [expr ![catch {expr $x*1}]]
return $a
}
proc validateExtent {extent otherextent} {
set value [$extent getCurrentValue]
if {[isNumeric $value]} {
if {$value < 0.0} {
GuidoMessage warning FRM_VAL_LT_LOWBOUND 0.0
return 0
}
return 1
} else {
if {[string compare $value "maintain aspect ratio"] == 0} {
set value [$otherextent getCurrentValue]
if {[string compare $value "maintain aspect ratio"] == 0} {
GuidoMessage warning PLT_NEED_ONE_EXTENT
return 0
}
return 1
} else {
if {[string compare $value ""] == 0} {
return 1
}
}
}
GuidoMessage warning CNV_NOT_NUMERIC $value
return 0
}
GuidoForm frm00703 {
-default_buttons
-label "Define Image Entity Attributes"
-tip IMAGE_ENTITY_TIP
GuidoField entity_name {
-display_length 20
-format none
-input false
-label "Entity name"
-max_length 32
-null false
-translate none
}
GuidoPanel frm00703_17 {
-label "Plot in which sheet corner"
-layout BoxLayout X_AXIS
-tip IMAGE_ENTITY_CORNER_TIP
GuidoButtonGroupPanel corner {
GuidoRadioButton frm00703_13 {
-caption LL
-default true
-selected_value LL
}
GuidoRadioButton frm00703_14 {
-caption UL
-selected_value UL
}
GuidoRadioButton frm00703_15 {
-caption LR
-selected_value LR
}
GuidoRadioButton frm00703_16 {
-caption UR
-selected_value UR
}
}
}
GuidoField xoffset {
-display_length 6
-format double
-label "X offset from corner (mm)"
-max_length 6
-null false
-tip IMAGE_ENTITY_OFFSET_TIP
-translate upper
}
GuidoField yoffset {
-display_length 6
-format double
-label "Y offset from corner (mm)"
-max_length 6
-null false
-tip IMAGE_ENTITY_OFFSET2_TIP
-translate upper
}
GuidoPanel frm00703_22 {
-label "Horizontal justification"
-layout BoxLayout X_AXIS
-tip IMAGE_ENTITY_JUSTIFICATION_TIP
GuidoButtonGroupPanel hj {
GuidoRadioButton frm00703_19 {
-caption L
-selected_value L
}
GuidoRadioButton frm00703_20 {
-caption C
-selected_value C
}
GuidoRadioButton frm00703_21 {
-caption R
-selected_value R
}
}
}
GuidoPanel frm00703_27 {
-label "Vertical justification"
-layout BoxLayout X_AXIS
-tip IMAGE_ENTITY_JUSTIFICATION2_TIP
GuidoButtonGroupPanel vj {
GuidoRadioButton frm00703_24 {
-caption T
-selected_value T
}
GuidoRadioButton frm00703_25 {
-caption C
-selected_value C
}
GuidoRadioButton frm00703_26 {
-caption B
-selected_value B
}
}
}
GuidoComboBox size_specification {
-value_in "physical dimensions" "resolution"
-display_length 8
-max_length 19
-default "physical dimensions"
-label "Size specification"
-tip PLT_IMAGE_SIZE_SPECIFICATION
}
GuidoComboBox xextent {
-dependency {"[$size_specification getCurrentValue]" == "physical dimensions"}
-display_length 8
-label "X extent (mm)"
-low_bound 0.0
-max_length 21
-tip IMAGE_ENTITY_EXTENT_TIP
-exclusive false
-value_in "maintain aspect ratio"
-validation {[validateExtent $xextent $yextent]}
}
GuidoComboBox yextent {
-dependency {"[$size_specification getCurrentValue]" == "physical dimensions"}
-display_length 8
-label "Y extent (mm)"
-low_bound 0.0
-max_length 21
-tip IMAGE_ENTITY_EXTENT_TIP
-exclusive false
-value_in "maintain aspect ratio"
-validation {[validateExtent $yextent $xextent]}
}
GuidoField resolution {
-dependency {"[$size_specification getCurrentValue]" == "resolution"}
-display_length 6
-format integer
-label "Resolution (DPI)"
-low_bound 100
-max_length 6
-tip PLT_IMAGE_RESOLUTION
-translate upper
-null false
-default 300
}
GuidoCheckBox clashing {
-default false
-label Foreground
-selected_value Y
-tip IMAGE_ENTITY_CLASHING_TIP
-unselected_value N
}
GuidoField fade {
-display_length 6
-format double
-high_bound 100
-label "Image Intensity (%)"
-low_bound 0
-max_length 6
-null false
-tip IMAGE_ENTITY_FADE_TIP
-translate upper
}
}
