GuidoApp check_db "CHECK DATABASE CONNECTED"
$check_db setParam "databasesession" "GeologyDatabase"
set result [$check_db invoke]
$check_db destroy
if {$result == "0"} {
set form_displayed 0
GuidoScript scripts/geologyutilities.tcl
proc decimals_allowed {table_name field_name dp} {
if {$field_name != ""} {
set buffer [GuidoExecServer GetFieldInformation [subst {DatabaseType = "GeologyDatabase" SurpacTableName = $table_name SurpacFieldName = $field_name}]]
set FieldType [GuidoGetParamBufferValue $buffer FieldType]
if {$FieldType == "real"} {
if {[$dp getCurrentValue] == ""} {
$dp setCurrentValue 2
}
return 1
}
}
$dp setCurrentValue ""
return 0
}
proc panel_selected {main_tabbed_pane composites_table composites_table1 tbl fld tbl1 fld1} {
if {[$main_tabbed_pane getSelectedIndex] == 1} {
while {[$composites_table getRowCount] > [$composites_table1 getRowCount]} {
$composites_table removeRow 0
}
for {set row_idx 0} {$row_idx < [$composites_table1 getRowCount]} {incr row_idx} {
$tbl1 setCurrentValue $row_idx [$tbl getCurrentValue $row_idx]
$fld1 setCurrentValue $row_idx [$fld getCurrentValue $row_idx]
}
}
}
GuidoForm form {
-default_buttons
-label "Compositing Options"
-tip DB_COMPOSITE_OPT_TIP
-layout BoxLayout Y_AXIS
GuidoTabbedPane main_tabbed_pane {
-action mousePressed {[
panel_selected $main_tabbed_pane $composites_table $composites_table1 $tbl $fld $tbl1 $fld1
]}
-action keyReleased {[
panel_selected $main_tabbed_pane $composites_table $composites_table1 $tbl $fld $tbl1 $fld1
]}
-width 64
GuidoPanel front_panel {
-label "Composite fields"
-layout BoxLayout Y_AXIS
-height 15
GuidoPanel main_top {
-layout CentreLineLayout
GuidoPanel top_left {
-layout BoxLayout Y_AXIS
GuidoPanel top_right {
-layout CentreLineLayout
-label "Composite colours"
-border etched true
GuidoDatabaseTableBrowser composite_table {
-display_length 6
-label "Composite table"
-database dbHandle
-table_types "interval"
-null true
-exclusive true
-tip DB_COMPOSITE_OPT_COMP_STYLE_TIP
-default ""
-action focusGained {[
global form_displayed
set form_displayed 1
updateTableName $composite_field $composite_table
]}
}
GuidoTableFieldBrowser composite_field {
-display_length 6
-exclusive false
-format none
-label "Composite field"
-max_length 18
-database dbHandle
-translate none
-action focusGained {[
updateTableName $composite_field $composite_table
]}
-validation {[validateTableFieldPair $composite_table $composite_field]}
-tip DB_COMPOSITE_OPT_COMP_STYLE_TIP
}
}
}
}
GuidoPanel label_wrapper {
-layout CentreLineLayout
-border etched true
-label "Composite fields"
GuidoScrollPane scroller1 {
-height 8
GuidoTable composites_table1 {
-height 8
-instances 0 0 200
-interactive true "insert|remove|add"
GuidoDatabaseTableBrowser tbl {
-display_length 5
-label DB_HTML_TABLE
-database dbHandle
-table_types "interval"
-exclusive true
-action focusGained {[
updateTableName $fld $tbl
]}
-tip DB_COMPOSITE_OPT_TBL_TIP
}
GuidoTableFieldBrowser fld {
-display_length 5
-label DB_HTML_FIELD
-format string
-dependency {[string length [$tbl getCurrentValue]] > 0}
-exclusive true
-database dbHandle
-action focusGained {[
updateTableName $fld $tbl
]}
-validation {[validateTableFieldPair $tbl $fld]}
-tip DB_COMPOSITE_OPT_FLD_TIP
}
GuidoCheckBox dilute {
-default true
-font_style bold
-label DB_HTML_DILUTE
-selected_value true
-unselected_value false
-tip DB_COMPOSITE_OPT_NEG_TIP
}
GuidoComboBox position {
-label DB_HTML_POSITION
-display_length 2
-exclusive true
-null false
-max_length 5
-value_in left right
-default right
-tip DB_COMPOSITE_OPT_VPOSITION_TIP
}
GuidoComboBox alignment {
-label DB_HTML_ALIGNMENT
-display_length 3
-exclusive true
-null false
-max_length 5
-value_in left centre right
-default left
-tip DB_COMPOSITE_OPT_VALIGNMENT_TIP
}
GuidoField offset {
-label DB_HTML_OFFSET
-display_length 3
-format double
-max_length 8
-null false
-default 3.0
-tip DB_COMPOSITE_OPT_VOFFSET_TIP
}
GuidoField decimals {
-label DB_HTML_DP
-display_length 3
-format integer
-low_bound 0
-max_length 8
-null false
-default 2
-tip DB_COMPOSITE_OPT_VDP_TIP
}
}
}
}
}
GuidoPanel Advanced {
-label "Display options"
-layout BoxLayout Y_AXIS
GuidoPanel Advanced2 {
-layout BoxLayout X_AXIS
GuidoPanel wrapper {
-layout BoxLayout Y_AXIS
GuidoPanel display_options {
-layout CentreLineLayout
-border etched true
-label "Display options"
-width 32
GuidoPanel top {
-layout CentreLineLayout
GuidoPanel wrapper1 {
-layout CentreLineLayout
GuidoField minwidth {
-label "Minimum mining width"
-display_length 4
-format double
-max_length 8
-null true
-tip DB_COMPOSITE_OPT_MIN_TIP
}
GuidoComboBox extend {
-label "Extend smaller composites"
-display_length 6
-exclusive true
-null false
-max_length 15
-value_in uphole downhole "both directions"
-default ""
-dependency {[string length [$minwidth getCurrentValue]] > 0}
-tip DB_COMPOSITE_OPT_EXTEND_TIP
}
GuidoComboBox symbol {
-display_length 6
-format none
-label "Marker symbol"
-max_length 5
-tip DB_COMPOSITE_OPT_MARKER_TIP
-value_in * x + . () @ (.) (x) (+) (()) \[\] \[*\] \[.\] \[x\] <> <*> <.> <+> /\\ /*\\ /.\\ \\/ \\*/ \\./ # ++ "/ \\" /_\\ /__\\ /_^_\\ / \\ Y Z
-default "<.>"
}
GuidoField symbol_size {
-display_length 4
-format double
-high_bound 999
-label Size
-low_bound .001
-max_length 4
-null false
-tip DB_COMPOSITE_OPT_MARKER_SIZE_TIP
-translate upper
-default "0.5"
}
}
GuidoPanel wrapper2 {
-layout CentreLineLayout
GuidoComboBox line_pattern {
-default ---
-display_length 6
-format none
-label "Line pattern"
-max_length 8
-null false
-tip DB_COMPOSITE_OPT_LINE_TIP
-value_in --- -- ... -.- "- -" -..- -... "-- --" center phantom
}
GuidoField default_line_weight {
-default 2
-display_length 4
-format integer
-high_bound 9
-label "Default line thickness"
-low_bound 1
-max_length 1
-null false
-tip DB_COMPOSITE_OPT_LINE_WEIGHT_TIP
}
GuidoColourBrowserField default_colour {
-label "Default colour"
-display_length 6
-max_length 32
-exclusive false
-tip DB_COMPOSITE_OPT_COLOUR_TIP
-default "blue"
}
}
}
}
}
}
GuidoPanel top_right3 {
-layout CentreLineLayout
-border etched true
-label "Composite field display options"
GuidoScrollPane scroller2 {
-height 8
GuidoTable composites_table {
-height 8
-instances 0 0 200
-interactive false
GuidoLabel tbl1 {
-height 1
-display_length 7.5
-label DB_HTML_TABLE
}
GuidoLabel fld1 {
-height 1
-display_length 7.5
-label DB_HTML_FIELD
}
GuidoField cutoff {
-label DB_HTML_CUTOFF
-display_length 4
-format double
-max_length 8
-null true
-tip DB_COMPOSITE_OPT_CUTOFF_TIP
}
GuidoComboBox hilo {
-label DB_HTML_TYPE
-display_length 3
-exclusive true
-null false
-max_length 10
-value_in high-bound low-bound
-default ""
-dependency {[string length [$cutoff getCurrentValue]] > 0}
-tip DB_COMPOSITE_OPT_HILO_TIP
}
GuidoColourBrowserField cutoff_colour {
-label Highlight
-display_length 6
-exclusive false
-format colour
-max_length 32
-dependency {[string length [$cutoff getCurrentValue]] > 0}
-tip DB_COMPOSITE_OPT_CUT_COLOUR_TIP
}
GuidoCheckBox use_styles {
-default true
-font_style bold
-label DB_HTML_STYLES
-selected_value true
-unselected_value false
-tip DB_COMPOSITE_OPT_VSTYLE_TIP
}
GuidoColourBrowserField colour {
-label "Label colour"
-display_length 6
-exclusive false
-format colour
-max_length 32
-dependency {"[$use_styles getCurrentValue]" == "false"}
-tip DB_COMPOSITE_OPT_VCOLOUR_TIP
}
GuidoFontNameBrowser font_style {
-label DB_HTML_FONT
-display_length 8
-default "Default"
-format none
-max_length 14
-tip DB_COMPOSITE_OPT_VFONT_TIP
}
GuidoField font_size {
-label DB_HTML_FONT_SIZE
-display_length 3
-format double
-max_length 8
-null false
-default 1.0
-tip DB_FONT_SIZE_TIP
}
GuidoComboBox font_units {
-display_length 3
-label DB_HTML_FONT_UNITS
-default oru
-display_length 1
-format none
-max_length 3
-null false
-value_in oru sru
-tip DB_FONT_SIZE_TIP
}
}
}
}
$font_style updateBrowserList
}
GuidoPanel code_label_panel {
-label "Composite code labels"
-layout BoxLayout Y_AXIS
-height 15
GuidoPanel display_labels_wrapper {
-layout CentreLineLayout
GuidoCheckBox display_labels {
-default true
-label "Display code labels"
-selected_value true
-unselected_value false
-tip DB_COMPOSITE_OPT_LABELS_TIP
}
}
GuidoFiller filler1 {
-height 1
}
GuidoPanel label_panel_wrapper {
-layout BoxLayout Y_AXIS
-dependency {[$display_labels getCurrentValue] == "true"}
GuidoPanel top_right2 {
-layout BoxLayout X_AXIS
-width 31
GuidoFiller filler2 {
-width 1
}
GuidoPanel top_right3 {
-layout CentreLineLayout
GuidoComboBox code_position {
-label "Position"
-display_length 6
-exclusive true
-null false
-max_length 5
-value_in left right
-default left
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_COMPOSITE_OPT_POSITION_TIP
}
GuidoComboBox code_alignment {
-label "Alignment"
-display_length 6
-exclusive true
-null false
-max_length 5
-value_in left centre right
-default right
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_COMPOSITE_OPT_ALIGN_TIP
}
GuidoField code_offset {
-label "Offset"
-display_length 4
-format double
-max_length 8
-null false
-default 3.0
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_COMPOSITE_OPT_OFFSET_TIP
}
GuidoField code_decimals {
-label "Decimals"
-display_length 4
-format integer
-low_bound 0
-max_length 8
-null false
-default 2
-dependency {[$display_labels getCurrentValue] == "true"}
-dependency {"[decimals_allowed [$composite_table getCurrentValue] [$composite_field getCurrentValue] $code_decimals]"}
-tip DB_COMPOSITE_OPT_DP_TIP
}
}
GuidoFiller filler3 {
-width 2
}
GuidoPanel top_right4 {
-layout CentreLineLayout
GuidoCheckBox code_use_styles {
-default true
-font_style bold
-label "Use styles"
-selected_value true
-unselected_value false
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_COMPOSITE_OPT_STYLES_TIP
}
GuidoColourBrowserField code_colour {
-label "Colour"
-display_length 6
-exclusive false
-format colour
-max_length 32
-dependency {"[$code_use_styles getCurrentValue]" == "false"}
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_COMPOSITE_OPT_CODE_COLOUR_TIP
-default red
}
GuidoFontNameBrowser code_font_style {
-label "Font name"
-display_length 8
-format none
-max_length 14
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_COMPOSITE_OPT_CODE_FONT_TIP
}
GuidoField code_font_size {
-label "Font size"
-display_length 4
-format double
-max_length 8
-null false
-default 1.0
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_FONT_SIZE_TIP
}
GuidoComboBox code_font_units {
-display_length 4
-label "Font units"
-default oru
-display_length 1
-format none
-max_length 3
-null false
-value_in oru sru
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_FONT_SIZE_TIP
}
}
}
}
$code_font_style updateBrowserList
}
GuidoPanel optional_weight_panel {
-label "Optional weighting fields"
-layout BoxLayout Y_AXIS
-height 15
GuidoPanel weighting_panel {
-layout BoxLayout Y_AXIS
-width 32
GuidoPanel use_weight_panel {
-layout CentreLineLayout
GuidoCheckBox use_weights {
-default false
-label "Use weighting fields"
-selected_value true
-unselected_value false
}
}
GuidoFiller filler4 {
-height 1
}
GuidoPanel optional_weight_panel_hider {
-layout CentreLineLayout
-dependency {[$use_weights getCurrentValue]}
GuidoScrollPane optional_weights {
-height 7
-width 31
GuidoTable weighting_fields {
-instances 0 0 200
-interactive true "insert|remove|add"
GuidoDatabaseTableBrowser weighting_table {
-display_length 6
-label "Table"
-database dbHandle
-table_types "interval"
-null false
-exclusive true
-action focusGained {[
updateTableName $weighting_field $weighting_table
]}
-tip DB_COMPOSITE_OPT_WGT_TBL_TIP
-dependency {[$use_weights getCurrentValue]}
}
GuidoTableFieldBrowser weighting_field {
-display_length 6
-format none
-label "Field"
-max_length 18
-database dbHandle
-tip DB_COMPOSITE_OPT_WGT_FLD_TIP
-translate none
-action focusGained {[
updateTableName $weighting_field $weighting_table
]}
-validation {[validateTableFieldPair $weighting_table $weighting_field]}
-dependency {[$use_weights getCurrentValue]}
}
GuidoField weighting_default {
-default 1
-display_length 7
-format none
-label "Default weight"
-max_length 10
-null false
-tip DB_COMPOSITE_OPT_WGT_DEFAULT_TIP
-translate none
-dependency {[$use_weights getCurrentValue]}
}
}
}
}
}
}
GuidoPanel true_thickness_panel {
-label "Thickness options"
-layout BoxLayout X_AXIS
-height 15
GuidoPanel true_thickness_panel1 {
-layout BoxLayout Y_AXIS
GuidoPanel display_thickness_labels_panel {
-layout CentreLineLayout
GuidoCheckBox display_thickness_labels {
-default true
-label "Display thickness labels"
-selected_value true
-unselected_value false
-tip DB_COMP_THICKNESS_LABEL_TIP
}
}
GuidoFiller filler9 {
-height 0
-width 25
}
GuidoPanel thickness_label_panel_hider {
-layout CentreLineLayout
-dependency {[$display_thickness_labels getCurrentValue] == "true"}
GuidoLabel filler_label_1 {
-label "Display thickness labels"
-visible false
-height 0.5
}
GuidoFiller filler10 {
-height 0.5
}
GuidoComboBox thickness_position {
-label "Position"
-display_length 6
-exclusive true
-null false
-max_length 5
-value_in left right
-default left
-dependency {[$display_thickness_labels getCurrentValue] == "true"}
-tip DB_LABELS_POSITION_TIP
}
GuidoComboBox thickness_alignment {
-label "Alignment"
-display_length 6
-exclusive true
-null false
-max_length 5
-value_in left centre right
-default right
-dependency {[$display_thickness_labels getCurrentValue] == "true"}
-tip DB_LABELS_ALIGN_TIP
}
GuidoField thickness_offset {
-label "Offset"
-display_length 4
-format double
-max_length 8
-null false
-default 6.0
-dependency {[$display_thickness_labels getCurrentValue] == "true"}
-tip DB_LABELS_OFFSET_TIP
}
GuidoField thickness_decimals {
-label "Decimals"
-display_length 4
-format integer
-low_bound 0
-max_length 8
-null false
-default 2
-dependency {[$display_thickness_labels getCurrentValue] == "true"}
-tip DB_LABELS_DP_TIP
}
GuidoColourBrowserField thickness_colour {
-label "Colour"
-display_length 6
-exclusive false
-format colour
-max_length 32
-dependency {[$display_thickness_labels getCurrentValue] == "true"}
-tip DB_LABELS_COLOUR_TIP
-default "red"
}
GuidoFontNameBrowser thickness_font_style {
-label "Font name"
-display_length 8
-format none
-max_length 14
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_LABELS_FONT_TIP
}
GuidoField thickness_font_size {
-label "Font size"
-display_length 4
-format double
-max_length 8
-null false
-default 1.0
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_FONT_SIZE_TIP
}
GuidoComboBox thickness_font_units {
-display_length 4
-label "Font units"
-default oru
-display_length 1
-format none
-max_length 3
-null false
-value_in oru sru
-dependency {[$display_labels getCurrentValue] == "true"}
-tip DB_FONT_SIZE_TIP
}
}
$thickness_font_style updateBrowserList
}
GuidoFiller filler8 {
-height 1
}
GuidoPanel true_thickness_panel2 {
-layout BoxLayout Y_AXIS
GuidoPanel use_true_thickness_panel {
-layout CentreLineLayout
GuidoCheckBox use_true_thickness {
-default false
-label "Use true thickness calculations"
-selected_value true
-unselected_value false
-tip 00615_TIP_5a
}
}
GuidoFiller filler5 {
-height 0
}
GuidoPanel dip_panel_hider {
-layout BoxLayout Y_AXIS
-dependency {[$use_true_thickness getCurrentValue]}
GuidoPanel dip_panel {
-layout CentreLineLayout
GuidoLabel filler_label_2 {
-label "Use true thickness calculations"
-visible false
-height 0.5
}
GuidoFiller filler10 {
-height 0.5
}
GuidoField orebody_dip {
-label "Orebody dip"
-display_length 4
-format double
-max_length 16
-null false
-default 0.0
-tip 12000_TIP_005
-dependency {[$use_true_thickness getCurrentValue]}
}
GuidoField orebody_dip_direction {
-label "Orebody dip direction"
-decimals 4
-display_length 4
-format dms_angle
-high_bound 6.283185307
-low_bound 0
-max_length 16
-null false
-default 0.0
-tip 12000_TIP_005
-dependency {[$use_true_thickness getCurrentValue]}
}
}
}
}
}
}
}
GuidoApp get_handle "GET DATABASE HANDLE"
$get_handle setParam sessionType "GeologyDatabase"
set result [$get_handle invoke]
set dbHandle [$get_handle getParam "DatabaseHandle"]
$get_handle destroy
$tbl updateBrowserList
$weighting_table updateBrowserList
$composite_table updateBrowserList
set databuf [ GuidoExecServer GetComposites {} ]
set status [GuidoGetParamBufferValue $databuf status]
if {$status >= 0} {
$minwidth setCurrentValue [GuidoGetParamBufferValue $databuf "minwidth"]
$extend setCurrentValue [GuidoGetParamBufferValue $databuf "extend"]
$composite_table setCurrentValue [GuidoGetParamBufferValue $databuf "composite_table"]
updateTableName $composite_field $composite_table
$composite_field setCurrentValue [GuidoGetParamBufferValue $databuf "composite_field"]
$symbol setCurrentValue [GuidoGetParamBufferValue $databuf "symbol"]
$symbol_size setCurrentValue [GuidoGetParamBufferValue $databuf "symbol_size"]
$line_pattern setCurrentValue [GuidoGetParamBufferValue $databuf "line_pattern"]
$default_line_weight setCurrentValue [GuidoGetParamBufferValue $databuf "default_line_weight"]
$default_colour setCurrentValue [GuidoGetParamBufferValue $databuf "default_colour"]
$display_labels setCurrentValue [GuidoGetParamBufferValue $databuf "display_labels"]
$use_weights setCurrentValue [GuidoGetParamBufferValue $databuf "use_weights"]
$code_position setCurrentValue [GuidoGetParamBufferValue $databuf "code_position"]
$code_alignment setCurrentValue [GuidoGetParamBufferValue $databuf "code_alignment"]
$code_offset setCurrentValue [GuidoGetParamBufferValue $databuf "code_offset"]
$code_decimals setCurrentValue [GuidoGetParamBufferValue $databuf "code_decimals"]
$code_use_styles setCurrentValue [GuidoGetParamBufferValue $databuf "code_use_styles"]
$code_colour setCurrentValue [GuidoGetParamBufferValue $databuf "code_colour"]
$code_font_style setCurrentValue [GuidoGetParamBufferValue $databuf "code_font_style"]
$code_font_size setCurrentValue [GuidoGetParamBufferValue $databuf "code_font_size"]
$code_font_units setCurrentValue [GuidoGetParamBufferValue $databuf "code_font_units"]
$display_thickness_labels setCurrentValue [GuidoGetParamBufferValue $databuf "display_thickness_labels"]
$thickness_position setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_position"]
$thickness_alignment setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_alignment"]
$thickness_offset setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_offset"]
$thickness_decimals setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_decimals"]
$thickness_font_style setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_font_style"]
$thickness_font_size setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_font_size"]
$thickness_font_units setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_font_units"]
$thickness_colour setCurrentValue [GuidoGetParamBufferValue $databuf "thickness_colour"]
$use_true_thickness setCurrentValue [GuidoGetParamBufferValue $databuf "use_true_thickness"]
$orebody_dip setCurrentValue [GuidoGetParamBufferValue $databuf "orebody_dip"]
$orebody_dip_direction setCurrentValue [GuidoGetParamBufferValue $databuf "orebody_dip_direction"]
set num_weighting_rows [GuidoGetParamBufferValue $databuf "num_weighting_rows"]
if {$num_weighting_rows > 0} {
$weighting_fields setInitialRows $num_weighting_rows 0 200
} else {
$weighting_fields setInitialRows 1 0 200
}
for {set i 0} {$i < $num_weighting_rows} {incr i} {
$weighting_table   setCurrentValue $i [GuidoGetParamBufferValue $databuf "weighting_table($i)"]
$weighting_field   setCurrentValue $i [GuidoGetParamBufferValue $databuf "weighting_field($i)"]
$weighting_default setCurrentValue $i [GuidoGetParamBufferValue $databuf "weighting_default($i)"]
}
set num_composite_rows [GuidoGetParamBufferValue $databuf "num_composite_rows"]
if {$num_composite_rows > 0} {
$composites_table1 setInitialRows $num_composite_rows 0 200
$composites_table setInitialRows $num_composite_rows 0 200
} else {
$composites_table1 setInitialRows 1 0 200
}
for {set i 0} {$i < $num_composite_rows} {incr i} {
$tbl           setCurrentValue $i [GuidoGetParamBufferValue $databuf "tbl($i)"]
$fld           setCurrentValue $i [GuidoGetParamBufferValue $databuf "fld($i)"]
$font_style    setCurrentValue $i [GuidoGetParamBufferValue $databuf "font_style($i)"]
$font_size     setCurrentValue $i [GuidoGetParamBufferValue $databuf "font_size($i)"]
$font_units    setCurrentValue $i [GuidoGetParamBufferValue $databuf "font_units($i)"]
$position      setCurrentValue $i [GuidoGetParamBufferValue $databuf "position($i)"]
$offset        setCurrentValue $i [GuidoGetParamBufferValue $databuf "offset($i)"]
$colour        setCurrentValue $i [GuidoGetParamBufferValue $databuf "colour($i)"]
$alignment     setCurrentValue $i [GuidoGetParamBufferValue $databuf "alignment($i)"]
$dilute        setCurrentValue $i [GuidoGetParamBufferValue $databuf "dilute($i)"]
$cutoff        setCurrentValue $i [GuidoGetParamBufferValue $databuf "cutoff($i)"]
$hilo          setCurrentValue $i [GuidoGetParamBufferValue $databuf "hilo($i)"]
$cutoff_colour setCurrentValue $i [GuidoGetParamBufferValue $databuf "cutoff_colour($i)"]
$decimals      setCurrentValue $i [GuidoGetParamBufferValue $databuf "decimals($i)"]
if {[GuidoGetParamBufferValue $databuf "colour($i)"] > ""} {
$use_styles setCurrentValue $i false
$colour setInputAllowed $i true
} else {
$use_styles setCurrentValue $i true
$colour setInputAllowed $i false
}
}
}
$tbl setActionCallback initial {[
$composites_table addRows 1 [$composites_table1 getEditingRow]
]}
$tbl setActionCallback final {[
$composites_table removeRow [$composites_table1 getEditingRow]
]}
set return_code [$form interact]
while {[$composites_table getRowCount] > [$composites_table1 getRowCount]} {
$composites_table removeRow 0
}
GuidoApp app "COMPOSITING OPTIONS"
if {$return_code == "apply"} {
$app setParam minwidth [$minwidth getCurrentValue]
$app setParam extend [$extend getCurrentValue]
set table [$composite_table getCurrentValue]
set field [$composite_field getCurrentValue]
if {$table > "" && $field > ""} {
set buffer [GuidoExecServer ValidTableFieldPair [subst {TableName = $table FieldName = $field}]]
if {[ GuidoGetParamBufferValue $buffer status ] >= 0} {
$app setParam composite_table [$composite_table getCurrentValue]
$app setParam composite_field [$composite_field getCurrentValue]
} else {
$app setParam composite_table ""
$app setParam composite_field ""
}
} else {
$app setParam composite_table ""
$app setParam composite_field ""
}
$app setParam symbol [$symbol getCurrentValue]
$app setParam symbol_size [$symbol_size getCurrentValue]
$app setParam line_pattern [$line_pattern getCurrentValue]
$app setParam default_line_weight [$default_line_weight getCurrentValue]
$app setParam default_colour [$default_colour getCurrentValue]
set display_labels_value [$display_labels getCurrentValue]
$app setParam display_labels [$display_labels getCurrentValue]
$app setParam use_weights [$use_weights getCurrentValue]
if {$display_labels_value == "true"} {
$app setParam code_position [$code_position getCurrentValue]
$app setParam code_alignment [$code_alignment getCurrentValue]
$app setParam code_offset [$code_offset getCurrentValue]
$app setParam code_decimals [$code_decimals getCurrentValue]
$app setParam code_use_styles [$code_use_styles getCurrentValue]
if {[$code_use_styles getCurrentValue] == "true" } {
$app setParam code_colour ""
} else {
$app setParam code_colour [$code_colour getCurrentValue]
}
$app setParam code_font_style [$code_font_style getCurrentValue]
$app setParam code_font_size [$code_font_size getCurrentValue]
$app setParam code_font_units [$code_font_units getCurrentValue]
}
set num_weighting_rows 0
for {set row 0} {$row < [$weighting_fields getRowCount]} {incr row} {
set table [$weighting_table getCurrentValue $row]
set field [$weighting_field getCurrentValue $row]
if {$table > "" && $field > ""} {
set buffer [GuidoExecServer ValidTableFieldPair [subst {TableName = $table FieldName = $field}]]
if {[ GuidoGetParamBufferValue $buffer status ] >= 0} {
$app setParam "weighting_table($num_weighting_rows)" [$weighting_table getCurrentValue $row]
$app setParam "weighting_field($num_weighting_rows)" [$weighting_field getCurrentValue $row]
$app setParam "weighting_default($num_weighting_rows)" [$weighting_default getCurrentValue $row]
incr num_weighting_rows
}
}
}
$app setParam num_weighting_rows $num_weighting_rows
set num_composite_rows 0
for {set row 0} {$row < [$composites_table getRowCount]} {incr row} {
set table [$tbl getCurrentValue $row]
set field [$fld getCurrentValue $row]
if {$table > "" && $field > ""} {
set buffer [GuidoExecServer ValidTableFieldPair [subst {TableName = $table FieldName = $field}]]
if {[ GuidoGetParamBufferValue $buffer status ] >= 0} {
$app setParam "tbl($num_composite_rows)" [$tbl getCurrentValue $row]
$app setParam "fld($num_composite_rows)" [$fld getCurrentValue $row]
$app setParam "dilute($num_composite_rows)" [$dilute getCurrentValue $row]
$app setParam "cutoff($num_composite_rows)" [$cutoff getCurrentValue $row]
$app setParam "hilo($num_composite_rows)" [$hilo getCurrentValue $row]
$app setParam "cutoff_colour($num_composite_rows)" [$cutoff_colour getCurrentValue $row]
$app setParam "position($num_composite_rows)" [$position getCurrentValue $row]
$app setParam "offset($num_composite_rows)" [$offset getCurrentValue $row]
$app setParam "decimals($num_composite_rows)" [$decimals getCurrentValue $row]
$app setParam "use_styles($num_composite_rows)" [$use_styles getCurrentValue $row]
$app setParam "colour($num_composite_rows)" [$colour getCurrentValue $row]
$app setParam "font_style($num_composite_rows)" [$font_style getCurrentValue $row]
$app setParam "font_size($num_composite_rows)" [$font_size getCurrentValue $row]
$app setParam "font_units($num_composite_rows)" [$font_units getCurrentValue $row]
$app setParam "alignment($num_composite_rows)" [$alignment getCurrentValue $row]
incr num_composite_rows
}
}
}
$app setParam num_composite_rows $num_composite_rows
$app setParam display_thickness_labels [$display_thickness_labels getCurrentValue]
set display_thickness [$display_thickness_labels getCurrentValue]
$app setParam thickness_position [$thickness_position getCurrentValue]
$app setParam thickness_alignment [$thickness_alignment getCurrentValue]
$app setParam thickness_offset [$thickness_offset getCurrentValue]
$app setParam thickness_decimals [$thickness_decimals getCurrentValue]
$app setParam thickness_colour [$thickness_colour getCurrentValue]
$app setParam thickness_font_style [$thickness_font_style getCurrentValue]
$app setParam thickness_font_size [$thickness_font_size getCurrentValue]
$app setParam thickness_font_units [$thickness_font_units getCurrentValue]
$app setParam use_true_thickness [$use_true_thickness getCurrentValue]
set true_thickness [$use_true_thickness getCurrentValue]
if {$true_thickness == "true"} {
$app setParam orebody_dip [$orebody_dip getCurrentValue]
$app setParam orebody_dip_direction [$orebody_dip_direction getCurrentValue]
}
set return_code [$app invoke]
}
$app destroy
$form destroy
}
