set ssiforminitialised 0
proc ssiforminitialisedvalue { } {
global ssiforminitialised
return $ssiforminitialised
}
proc PrevValue {fieldName graph graph_depend} {
set val [ssiforminitialisedvalue]
if {$val} {
set rval [$fieldName getCurrentValueRelative -1]
if {[string length $rval] > 0} {
$fieldName setCurrentValue $rval
}
if {$graph_depend == 1} {
set currentValue [string trim "[ $graph getCurrentValue ]"]
if {[string compare $currentValue "none"] == 0} {
$fieldName setInputAllowed false
}
}
}
}
set not_already_called 1
proc firstcallback { } {
global not_already_called
if {$not_already_called} {
global scroll_1
global graph
global barpos
global barsize
global barmax
set numberOfRows [$scroll_1 getRowCount]
for {set row 0} {$row < $numberOfRows} {incr row} {
set currentValue [string trim "[ $graph getCurrentValue $row]"]
if {[string compare $currentValue "none"] == 0} {
$barpos setCurrentValue $row ""
$barsize setCurrentValue $row ""
$barmax setCurrentValue $row ""
$barpos setInputAllowed $row false
$barsize setInputAllowed $row false
$barmax setInputAllowed $row false
} else {
$barpos setInputAllowed $row true
$barsize setInputAllowed $row true
$barmax setInputAllowed $row true
}
}
set not_already_called 0
}
}
proc attributecallback { graph barpos barsize barmax } {
set currentValue [string trim "[ $graph getCurrentValue ]"]
if {[string compare $currentValue "none"] == 0} {
$barpos setCurrentValue ""
$barsize setCurrentValue ""
$barmax setCurrentValue ""
$barpos setInputAllowed false
$barsize setInputAllowed false
$barmax setInputAllowed false
} else {
set rval [$barpos getCurrentValueRelative -1]
set oval [$barpos getCurrentValue]
if {[string length $oval] == 0} {
if {[string length $rval] > 0} {
$barpos setCurrentValue $rval
} else {
$barpos setCurrentValue "right"
}
}
set rval [$barsize getCurrentValueRelative -1]
set oval [$barsize getCurrentValue]
if {[string length $oval] == 0} {
if {[string length $rval] > 0} {
$barsize setCurrentValue $rval
} else {
$barsize setCurrentValue "1"
}
}
set rval [$barmax getCurrentValueRelative -1]
set oval [$barmax getCurrentValue]
if {[string length $oval] == 0} {
if {[string length $rval] > 0} {
$barmax setCurrentValue $rval
} else {
$barmax setCurrentValue "50"
}
}
$barpos setInputAllowed true
$barsize setInputAllowed true
$barmax setInputAllowed true
}
}
GuidoForm frm12009 {
-default_buttons
-label "Define Sample Fields for Plotting"
-layout BoxLayout Y_AXIS
-tip PLT_SAMPLE_FIELDS_FORM_TIP
GuidoPanel frm12009_47 {
-layout CentreLineLayout
GuidoLabel frm12009_2 {
-label Table
}
GuidoLabel asstable {}
GuidoCheckBox element {
-default false
-label "Process each element seperately"
-selected_value Y
-tip PLT_SAMPLE_FIELDS_ELEMENT_TIP
-unselected_value N
}
GuidoCheckBox combass {
-default false
-label "Combine adjacent samples"
-selected_value Y
-tip PLT_SAMPLE_FIELDS_COMBASS_TIP
-unselected_value N
}
}
GuidoFiller frm12009_48 {
-height 1
}
GuidoLabel frm12009_5 {
-font_style bold
-label "Define the sample fields and their plotting characteristics"
}
GuidoScrollPane frm12009_46 {
-height 9
GuidoTable scroll_1 {
-instances 1 1 10
-interactive true
GuidoComboBox field {
-display_length 10
-format none
-label "Field Name"
-max_length 18
-tip PLT_SAMPLE_FIELDS_FIELD_TIP
-translate none
}
GuidoField range {
-display_length 21
-format range
-label "Class Range"
-max_length 64
-tip PLT_SAMPLE_FIELDS_RANGE_TIP
-translate none
-action initial {[PrevValue $range $graph 0]}
}
GuidoComboBox negatives {
-display_length 10
-label "Treat negatives"
-value_in "as negatives" "as nulls"
-exclusive true
-tip DB_EXTRACT_NEGATIVES_FOR_PLOT
-null false
-action initial {[PrevValue $negatives $graph 0]}
}
GuidoField bulk {
-default 0
-display_length 5
-format double
-high_bound 9999999
-label "Bulking Threshold"
-low_bound -9999999
-max_length 8
-null false
-tip PLT_SAMPLE_FIELDS_BULK_TIP
-translate upper
-action initial {[PrevValue $bulk $graph 0]}
}
GuidoField ndec {
-default 2
-display_length 2
-format integer
-high_bound 4
-label "Decimals"
-low_bound 0
-max_length 1
-null false
-tip PLT_SAMPLE_FIELDS_NDEC_TIP
-translate none
-action initial {[PrevValue $ndec $graph 0]}
}
GuidoComboBox graph {
-default none
-display_length 3
-format none
-label Graphs
-max_length 5
-tip PLT_SAMPLE_FIELDS_GRAPH_TIP
-value_in bar line none
-action initial {[PrevValue $graph $graph 0]}
-null false
-action focusGained {[
set ssiforminitialised 1
]}
}
GuidoComboBox barpos {
-default right
-display_length 5
-format none
-label "Graph Location"
-max_length 5
-tip PLT_SAMPLE_FIELDS_BARPOS_TIP
-value_in left right
-action initial {[PrevValue $barpos $graph 1]}
-null false
}
GuidoField barsize {
-default 1
-display_length 3
-format double
-high_bound 999
-label "Length per Unit"
-low_bound 0
-max_length 6
-null false
-tip PLT_SAMPLE_FIELDS_BARSIZE_TIP
-translate upper
-action initial {[PrevValue $barsize $graph 1]}
}
GuidoField barmax {
-default 50
-display_length 3
-format double
-high_bound 9999999
-label "Maximum Value"
-low_bound 0
-max_length 7
-null false
-tip PLT_SAMPLE_FIELDS_BARMAX_TIP
-translate upper
-action initial {[PrevValue $barmax $graph 1]}
-action focusGained {[
set ssiforminitialised 1
]}
}
$graph setActionCallback focusGained {[attributecallback $graph $barpos $barsize $barmax]}
}
}
$element setActionCallback focusGained {[firstcallback]}
}
