proc defaultJustify {corner h_justification v_justification} {
if {"[$corner getCurrentValue]" == "LL"} {
$h_justification setCurrentValue "left"
$v_justification setCurrentValue "bottom"
} elseif {"[$corner getCurrentValue]" == "UL"} {
$h_justification setCurrentValue "left"
$v_justification setCurrentValue "top"
} elseif {"[$corner getCurrentValue]" == "UR"} {
$h_justification setCurrentValue "right"
$v_justification setCurrentValue "top"
} elseif {"[$corner getCurrentValue]" == "LR"} {
$h_justification setCurrentValue "right"
$v_justification setCurrentValue "bottom"
}
}
GuidoForm SpreadSheetEntity {
-default_buttons
-layout BoxLayout Y_AXIS
-label "Define Table Entity Attributes"
-tip SPREADSHEETENT_TIP_0
-help_id 1754
GuidoPanel ent_name_panel {
-layout CentreLineLayout
GuidoField entity_name {
-display_length 20
-format none
-input false
-label "Entity name"
-max_length "PLT_OBJECT_NAME_LENGTH"
-null false
-translate none
}
}
GuidoFiller fill1 {
-height 1
}
GuidoPanel form_body_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoPanel propPanel {
-label "Spreadsheet properties"
-border etched true
-layout CentreLineLayout
-height 10
GuidoCheckBox autosize_box {
-label "Autosize box width"
-selected_value Y
-unselected_value N
-default Y
-tip "PLT_ENTITY_ENT_AUTOSIZE_BOX_TIP"
-next_focus box_width
}
GuidoField box_width {
-dependency {"[$autosize_box getCurrentValue]" != "Y"}
-default 0.0
-null false
-display_length 3
-format double
-high_bound 1000
-label "Box width (mm)"
-low_bound 0
-max_length 3
-null true
-tip "PLT_ENTITY_ENT_BOX_WIDTH_TIP"
}
GuidoField h_spacing {
-label "Horizontal tile spacing (mm)"
-format double
-low_bound 0
-default 0
-display_length 6
-null true
-tip SPREADSHEETENT_HTILE_TIP
}
GuidoField v_spacing {
-label "Vertical tile spacing (mm)"
-format double
-low_bound 0
-default 0
-display_length 6
-null true
-tip SPREADSHEETENT_VTILE_TIP
}
GuidoField pri {
-display_length 3
-format integer
-label Priority
-max_length 3
-null false
-tip SPREADSHEETENT_PRIORITY_TIP
-translate none
}
GuidoField pen {
-display_length 3
-format integer
-high_bound 999
-label "Pen number"
-low_bound 1
-max_length 3
-null false
-tip 00225_TIP_13
-translate none
}
GuidoCheckBox box {
-default true
-label "Enclose text in a box"
-selected_value Y
-tip 00225_TIP_4
-unselected_value N
}
}
GuidoPanel font_panel {
-layout boxlayout Y_AXIS
-border etched true
-label "Font options"
-height 10
GuidoPanel font_replace_panel {
-layout CentreLineLayout
GuidoCheckBox use_excel_font {
-label "Use font styles from spreadsheet"
-selected_value Y
-tip "PLT_ENTITY_ENT_FONT_REPLACE_TIP"
-unselected_value N
-next_focus italic_font
-default Y
}
}
GuidoFiller font_filler { -height  0.2 }
GuidoPanel font_settings {
-layout CentreLineLayout
-dependency {"[$use_excel_font getCurrentValue]" == "N"}
GuidoFontNameBrowser font {
-label "Name"
-null false
-allowDefault true
-display_length 12
-format none
-max_length 50
-next_focus bold_font
-tip "PLT_FONT_NAME_TIP"
}
GuidoCheckBox bold_font {
-label "FONT_STYLE_BOLD"
-selected_value Y
-tip "FONT_STYLE_BOLD_TIP"
-unselected_value N
-next_focus italic_font
}
GuidoCheckBox italic_font {
-label "FONT_STYLE_ITALIC"
-selected_value Y
-tip "FONT_STYLE_ITALIC_TIP"
-unselected_value N
-next_focus underline_font
}
GuidoCheckBox underline_font {
-label "FONT_STYLE_UNDERLINE"
-selected_value Y
-tip "FONT_STYLE_UNDERLINED_TIP"
-unselected_value N
-next_focus hgt
}
GuidoField hgt {
-default 2.0
-display_length 3
-format double
-high_bound 100
-label "Text height (mm)"
-low_bound 0
-max_length 3
-null false
-tip 00225_TIP_2
-translate upper
}
}
}
GuidoPanel layoutPanel {
-label "Spreadsheet layout"
-border etched true
-layout CentreLineLayout
GuidoComboBox corner {
-label "Plot in which sheet corner"
-value_in LL UL LR UR
-alternative_values  "LL" "UL" "LR" "UR"
-display_length 6
-null false
-tip SPREADSHEETENT_CORNER_TIP
}
GuidoField xoff {
-default 0.0
-display_length 6
-format double
-label "X offset from corner (mm)"
-max_length 6
-null false
-tip 00225_TIP_7
-translate upper
}
GuidoField yoff {
-default 0.0
-display_length 6
-format double
-label "Y offset from corner (mm)"
-max_length 6
-null false
-tip 00225_TIP_8
-translate upper
}
GuidoComboBox h_justification {
-label "Horizontal justification"
-value_in left centre right
-alternative_values "left" "centre" "right"
-display_length 6
-null false
-tip SPREADSHEETENT_HORIZ_JUST_TIP
}
GuidoComboBox v_justification {
-label "Vertical justification"
-value_in bottom centre top
-alternative_values  "bottom" "centre" "top"
-display_length 6
-null false
-tip SPREADSHEETENT_VERT_JUST_TIP
}
GuidoButtonGroupPanel procession {
-layout BoxLayout Y_AXIS
-label "Multiple range procession"
-tip SPREADSHEETENT_PROCESSION_TIP
GuidoRadioButton vert_option {
-caption "Vertical"
-selected_value vertical
}
GuidoRadioButton horiz_option {
-caption "Horizontal"
-selected_value horizontal
}
}
$corner setActionCallback valueChanged {[defaultJustify $corner $h_justification $v_justification]}
}
}
$font updateBrowserList
}
