GuidoScript scripts/geologyutilities.tcl
global depth_font_style
global depth_font_size
global depth_font_units
global depth_position
global depth_offset
global depth_colour
global depth_alignment
global depth_decimals
global depth_major
global depth_minor
global depth_display
global depth_major_length
global depth_minor_length
global depth_use_styles
global depth_colour
GuidoPanel depth_panelb {
-layout BoxLayout Y_AXIS
GuidoPanel smallbox {
-layout CentreLineLayout
GuidoCheckBox depth_display {
-default true
-font_style bold
-label "Display depth markers"
-selected_value true
-unselected_value false
-tip DB_DEPTH_DISPLAY_TIP
-action focusGained {[
global form_displayed
set form_displayed 1
]}
}
}
GuidoPanel bigbox {
-layout CentreLineLayout
GuidoPanel box1 {
-layout CentreLineLayout
GuidoField depth_major {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Major tick distance"
-decimals 1
-display_length 4
-format double
-max_length 8
-null false
-default 10.0
-tip DB_DEPTH_MAJOR_TIP
}
GuidoField depth_major_length {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-dependency {"[ $depth_major getCurrentValue]" > 0}
-label "Major tick length"
-decimals 1
-display_length 4
-format double
-max_length 8
-null false
-default 3.0
-tip DB_DEPTH_MAJOR_LENGTH_TIP
}
GuidoField depth_minor {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Minor tick distance"
-decimals 1
-display_length 4
-format double
-max_length 8
-null false
-default 1.0
-tip DB_DEPTH_MINOR_TIP
}
GuidoField depth_minor_length {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-dependency {"[ $depth_minor getCurrentValue]" > 0}
-label "Minor tick length"
-decimals 1
-display_length 4
-format double
-max_length 8
-null false
-default 3.0
-tip DB_DEPTH_MINOR_LENGTH_TIP
}
GuidoButtonGroupPanel depth_position {
-label "Position"
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-tip DB_DEPTH_POSITION_TIP
GuidoRadioButton position_left {
-caption "left"
-selected_value "left"
}
GuidoRadioButton position_right {
-caption "right"
-selected_value "right"
}
}
GuidoButtonGroupPanel depth_alignment {
-label "Alignment"
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-tip DB_DEPTH_ALIGN_TIP
GuidoRadioButton alignment_left {
-caption "left"
-selected_value "left"
}
GuidoRadioButton alignment_centre {
-caption "centre"
-selected_value "centre"
}
GuidoRadioButton alignment_right {
-caption "right"
-selected_value "right"
}
}
}
GuidoPanel box2 {
-layout CentreLineLayout
GuidoField depth_offset {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Offset"
-decimals 1
-display_length 4
-format double
-max_length 8
-null false
-default 1.0
-tip DB_DEPTH_OFFSET_TIP
}
GuidoField depth_decimals {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Decimals"
-display_length 4
-format integer
-max_length 8
-null false
-default 2
-tip DB_DEPTH_DP_TIP
}
GuidoCheckBox depth_use_styles {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-default true
-font_style bold
-label "Use Styles"
-selected_value false
-unselected_value true
-tip DB_DEPTH_STYLES_TIP
}
GuidoColourBrowserField depth_colour {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Colour"
-display_length 8
-max_length 32
-exclusive false
-default red
-dependency {"[ $depth_use_styles getCurrentValue]"}
-tip DB_DEPTH_COLOUR_TIP
-null false
}
GuidoFontNameBrowser depth_font_style {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Font"
-display_length 8
-format none
-max_length 14
-tip DB_DEPTH_FONT_TIP
}
GuidoField depth_font_size {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Size"
-decimals 3
-display_length 4
-format double
-max_length 8
-null false
-default 1.0
-tip DB_FONT_SIZE_TIP
}
GuidoComboBox depth_font_units {
-dependency {"[ $depth_display getCurrentValue]" == "true"}
-label "Units"
-default oru
-display_length 1
-format none
-max_length 3
-null false
-value_in oru sru
-tip DB_FONT_SIZE_TIP
}
}
}
$depth_font_style updateBrowserList
}
$depth_panel add [eval "\$depth_panelb getObject"]
set databuf [ GuidoExecServer GetDepthMarkers {} ]
set status [GuidoGetParamBufferValue $databuf status]
if {$status >= 0} {
$depth_font_style   setCurrentValue [GuidoGetParamBufferValue $databuf "font_style"]
$depth_font_size    setCurrentValue [GuidoGetParamBufferValue $databuf "font_size"]
$depth_font_units   setCurrentValue [GuidoGetParamBufferValue $databuf "font_units"]
$depth_position     setCurrentValue [GuidoGetParamBufferValue $databuf "position"]
$depth_offset       setCurrentValue [GuidoGetParamBufferValue $databuf "offset"]
$depth_colour       setCurrentValue [GuidoGetParamBufferValue $databuf "colour"]
$depth_alignment    setCurrentValue [GuidoGetParamBufferValue $databuf "alignment"]
$depth_decimals     setCurrentValue [GuidoGetParamBufferValue $databuf "decimals"]
$depth_major        setCurrentValue [GuidoGetParamBufferValue $databuf "major"]
$depth_minor        setCurrentValue [GuidoGetParamBufferValue $databuf "minor"]
$depth_display      setCurrentValue [GuidoGetParamBufferValue $databuf "display"]
$depth_major_length setCurrentValue [GuidoGetParamBufferValue $databuf "major_length"]
$depth_minor_length setCurrentValue [GuidoGetParamBufferValue $databuf "minor_length"]
if {[GuidoGetParamBufferValue $databuf "colour"] > ""} {
$depth_use_styles setCurrentValue true
$depth_colour setInputAllowed true
} else {
$depth_use_styles setCurrentValue false
$depth_colour setInputAllowed false
}
}
