~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to gui/tcltk/gis.m/maptext.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
##########################################################################
11
11
 
12
12
namespace eval GmCtext {
13
 
    variable array opt # ctext options
14
 
    variable placement #entry widget for x,y coordinates
 
13
    variable array opt ;# ctext options
 
14
    variable placement ;#entry widget for x,y coordinates
15
15
    variable count 1
16
16
    variable optlist
17
17
}
58
58
    set opt($count,1,fill) \#000000 
59
59
    set opt($count,1,width)  100
60
60
    set opt($count,1,anchor) "center_left" 
61
 
    set opt($count,1,justify) "left" 
62
 
    set opt($count,1,coordinates) "pixels" 
 
61
    set opt($count,1,anchorlv) ""
 
62
    set opt($count,1,justify) "left"
 
63
    set opt($count,1,justifylv) ""
 
64
    set opt($count,1,coordinates) "pixels"
 
65
    set opt($count,1,coordinateslv) ""
63
66
    set opt($count,1,mouseset) 0
64
67
    
65
68
    set optlist { _check opacity text at font fill width anchor justify coordinates mouseset}
77
80
        global mon
78
81
        variable opt
79
82
    
80
 
    set fon [SelectFont $frm.fontset -type dialog -sampletext [G_msg "This is font sample text."] -title [G_msg "Select label font"]]
 
83
    set fon [SelectFont $frm.fontset -type dialog -sampletext [G_msg "This is font sample text."] -title [G_msg "Select label font"] -font $opt($id,1,font) ]
81
84
        if { $fon != "" } {set opt($id,1,font) $fon}
82
85
}
83
86
 
146
149
    set row [ frame $frm.textcoord2 ]
147
150
    Label $row.a -text [G_msg "     coordinate type for text placement "] 
148
151
    ComboBox $row.b -padx 2 -width 10 -textvariable GmCtext::opt($id,1,coordinates) \
149
 
        -values {"pixels" "percent" "geographic" } -modifycmd "GmCtext::mouseset $id"
 
152
        -values {"pixels" "percent" "geographic" } -modifycmd "GmCtext::mouseset $id" \
 
153
        -labels [list [G_msg "pixels"] [G_msg "percent"] [G_msg "geographic"]] -labelsvariable GmCtext::opt($id,1,coordinateslv)
150
154
    checkbutton $row.c -text [G_msg "place with mouse"] \
151
155
        -variable GmCtext::opt($id,1,mouseset) \
152
156
        -command "GmCtext::mouseset $id"
156
160
    # text options1
157
161
    set row [ frame $frm.textopt1 ]
158
162
    Label $row.a -text [G_msg "     align text with coordinate point  "] 
159
 
    ComboBox $row.b -padx 2 -width 12 -textvariable GmCtext::opt($id,1,anchor) \
 
163
    ComboBox $row.b -padx 2 -width 16 -textvariable GmCtext::opt($id,1,anchor) \
160
164
                -values {"lower_left" "bottom_center" "lower_right" "center_left" "center" 
161
 
                "center_right" "upper_left" "top_center" "upper_right" } 
 
165
                "center_right" "upper_left" "top_center" "upper_right" } \
 
166
                -labels [list [G_msg "lower left"] [G_msg "bottom center"] [G_msg "lower right"] [G_msg "center left"] [G_msg "center"] [G_msg "center right"] [G_msg "upper left"] [G_msg "top center"] [G_msg "upper right"]] -labelsvariable GmCtext::opt($id,1,anchorlv)
162
167
    pack $row.a $row.b -side left
163
168
    pack $row -side top -fill both -expand yes
164
169
 
165
170
    # text options2
166
171
    set row [ frame $frm.textopt2 ]
167
172
    Label $row.a -text [G_msg "     justification"] 
168
 
    ComboBox $row.b -padx 2 -width 7 -textvariable GmCtext::opt($id,1,justify) \
169
 
                -values {"left" "center" "right"} 
 
173
    ComboBox $row.b -padx 2 -width 10 -textvariable GmCtext::opt($id,1,justify) \
 
174
                -values {"left" "center" "right"} \
 
175
                -labels [list [G_msg "left"] [G_msg "center"] [G_msg "right"]] -labelsvariable GmCtext::opt($id,1,justifylv)
170
176
    Label $row.c -text [G_msg "  line width"]
171
177
    LabelEntry $row.d -textvariable GmCtext::opt($id,1,width) -width 5 
172
178
    pack $row.a $row.b $row.c $row.d -side left