26
26
# Initialize panel info
27
27
if [catch {set Nv_($BASE)}] {
28
set panel [St_create {window name size priority} $BASE "Position" 1 5]
28
set panel [St_create {window name size priority} $BASE [G_msg "Position"] 1 5]
30
30
set panel $Nv_($BASE)
33
33
frame $BASE -relief flat -borderwidth 0
34
Nv_mkPanelname $BASE "Position Panel"
34
Nv_mkPanelname $BASE [G_msg "Position Panel"]
36
36
#################################
37
37
# Positioning menus
42
42
set col4 [frame $BASE.top1.col4]
44
44
set c1r1 [label $col1.1 -text " "]
45
set c1r2 [label $col1.2 -text "From (eye):"]
46
set c1r3 [label $col1.3 -text "To (surface):"]
45
set c1r2 [label $col1.2 -text [G_msg "From (eye):"]]
46
set c1r3 [label $col1.3 -text [G_msg "To (surface):"]]
47
47
set c1r4 [label $col1.4 -text " "]
48
48
set c1r5 [label $col1.5 -text " "]
49
set c1r6 [label $col1.6 -text "Range/bearing:"]
49
set c1r6 [label $col1.6 -text [G_msg "Range/bearing:"]]
50
50
pack $c1r1 $c1r2 $c1r3 $c1r4 $c1r5 $c1r6 -side top -anchor e
52
set c2r1 [label $col2.1 -text "East" -fg black -font $nviztxtfont]
52
set c2r1 [label $col2.1 -text [G_msg "East"] -fg black -font $nviztxtfont]
53
53
set c2r2 [entry $col2.2 -width 10 -textvariable Nv_(east1) -bg white]
54
54
set c2r3 [entry $col2.3 -width 10 -textvariable Nv_(east2) -bg white]
55
55
set c2r4 [label $col2.4 -text " "]
56
set c2r5 [label $col2.5 -text "Range" -fg black -font $nviztxtfont]
56
set c2r5 [label $col2.5 -text [G_msg "Range"] -fg black -font $nviztxtfont]
57
57
set c2r6 [entry $col2.6 -width 10 -textvariable Nv_(range) -bg white]
58
58
pack $c2r1 $c2r2 $c2r3 $c2r4 $c2r5 $c2r6 -side top
60
set c3r1 [label $col3.1 -text "North" -fg black -font $nviztxtfont]
60
set c3r1 [label $col3.1 -text [G_msg "North"] -fg black -font $nviztxtfont]
61
61
set c3r2 [entry $col3.2 -width 10 -textvariable Nv_(north1) -bg white]
62
62
set c3r3 [entry $col3.3 -width 10 -textvariable Nv_(north2) -bg white]
63
63
set c3r4 [label $col3.4 -text " "]
64
set c3r5 [label $col3.5 -text "Bearing" -fg black -font $nviztxtfont]
64
set c3r5 [label $col3.5 -text [G_msg "Bearing"] -fg black -font $nviztxtfont]
65
65
set c3r6 [entry $col3.6 -width 10 -textvariable Nv_(bearing) -bg white]
66
66
pack $c3r1 $c3r2 $c3r3 $c3r4 $c3r5 $c3r6 -side top
68
set c4r1 [label $col4.1 -text "Height" -fg black -font $nviztxtfont]
68
set c4r1 [label $col4.1 -text [G_msg "Height"] -fg black -font $nviztxtfont]
69
69
set c4r2 [entry $col4.2 -width 8 -textvariable Nv_(ht1) -bg white]
70
70
set c4r3 [entry $col4.3 -width 8 -textvariable Nv_(ht2) -bg white]
71
71
set c4r4 [label $col4.4 -text " "]
72
set c4r5 [label $col4.5 -text "Elev" -fg black -font $nviztxtfont]
72
set c4r5 [label $col4.5 -text [G_msg "Elev"] -fg black -font $nviztxtfont]
73
73
set c4r6 [entry $col4.6 -width 8 -textvariable Nv_(elev) -bg white]
74
74
pack $c4r1 $c4r2 $c4r3 $c4r4 $c4r5 $c4r6 -side top
81
81
# Mode setting radiobuttons
82
82
set tmp3 [frame $BASE.top3]
83
radiobutton $tmp3.r1 -text "Eye to surface" -variable "bearing_calc" -value "1" -command "catch {show_bearing}"
84
radiobutton $tmp3.r2 -text "Surface to eye" -variable "bearing_calc" -value "2" -command "catch {show_bearing}"
85
button $tmp3.b1 -text "Calculate" -command "catch {calc_position $bearing_calc};catch {show_bearing}" -bd 1
83
radiobutton $tmp3.r1 -text [G_msg "Eye to surface"] -variable "bearing_calc" -value "1" -command "catch {show_bearing}"
84
radiobutton $tmp3.r2 -text [G_msg "Surface to eye"] -variable "bearing_calc" -value "2" -command "catch {show_bearing}"
85
button $tmp3.b1 -text [G_msg "Calculate"] -command "catch {calc_position $bearing_calc};catch {show_bearing}" -bd 1
86
86
pack $tmp3.r1 $tmp3.r2 $tmp3.b1 -side left -padx 3 -expand 1 -fill x
88
88
pack $tmp3 -side top -fill x -expand 1 -pady 4
93
93
set tmp4 [frame $BASE.top4]
95
button $tmp4.b1 -text "Refresh" -bd 1 \
95
button $tmp4.b1 -text [G_msg "Refresh"] -bd 1 \
96
96
-command {set from_loc [Nget_real_position 1]
97
97
set to_loc [Nget_real_position 2]
98
98
set Nv_(east1) [format_number [lindex $from_loc 0]]