3
namespace eval DmVector {
4
variable array opt # vector options
9
proc DmVector::legend { id } {
12
set lh $DmTree::legend_height
13
set lw $DmTree::legend_width
15
set leg $opt($id,_legend)
20
set xc [expr $lw / 6 + 1 ]
21
set yc [expr $lh / 2 ]
22
set size $opt($id,size)
24
set maxpsize [expr $lw / 3 - 2 ]
25
if { $size > $maxpsize } { set size $maxpsize }
26
set x1 [expr $xc - $size / 2 ]
27
set x2 [expr $xc + $size / 2 + 1 ]
28
set y1 [expr $yc - $size / 2 ]
29
set y2 [expr $yc + $size / 2 + 1 ]
31
if { $opt($id,type_point) || $opt($id,type_centroid) } {
32
$leg create line $x1 $yc $x2 $yc -fill $opt($id,color)
33
$leg create line $xc $y1 $xc $y2 -fill $opt($id,color)
36
if { $opt($id,type_line) || $opt($id,type_boundary) || $opt($id,type_face) } {
37
set x1 [expr $lw / 3 + $mar ]
38
set x2 [expr 2 * $lw / 3 - $mar ]
39
set y1 [expr $lh - $mar ]
41
$leg create line $x1 $y1 $x2 $y2 -fill $opt($id,color)
44
if { $opt($id,type_area) } {
45
set x1 [expr 2 * $lw / 3 + $mar ]
46
set x2 [expr $lw - $mar ]
48
set y2 [expr $lh - $mar ]
49
$leg create rectangle $x1 $y1 $x2 $y2 -outline $opt($id,color) \
50
-fill $opt($id,fcolor)
54
proc DmVector::create { tree parent } {
59
set node "vector:$count"
61
set frm [ frame .vectoricon$count]
62
set fon [font create -size 10]
63
set check [checkbutton $frm.check -font $fon \
64
-variable DmVector::opt($count,_check) \
65
-height 1 -padx 0 -width 0]
66
set can [ canvas $frm.c -width $DmTree::legend_width \
67
-height $DmTree::legend_height ]
68
set opt($count,_legend) $can
69
pack $check $can -side left
71
$tree insert end $parent $node \
72
-text "vector $count" \
76
set opt($count,_check) 1
78
set opt($count,map) ""
79
set opt($count,display_shape) 1
80
set opt($count,display_cat) 0
81
set opt($count,display_topo) 0
82
set opt($count,display_dir) 0
83
set opt($count,display_attr) 0
84
set opt($count,type_point) 1
85
set opt($count,type_line) 1
86
set opt($count,type_boundary) 1
87
set opt($count,type_centroid) 1
88
set opt($count,type_area) 1
89
set opt($count,type_face) 0
91
set opt($count,color) \#000000
92
set opt($count,sqlcolor) 0
93
set opt($count,rdmcolor) 0
94
set opt($count,fcolor) \#AAAAAA
95
set opt($count,lcolor) \#000000
96
set opt($count,_use_color) 1
97
set opt($count,_use_fcolor) 1
98
set opt($count,lwidth) 1
100
set opt($count,symdir) "basic"
101
set opt($count,icon) "basic/x"
102
set opt($count,size) 5
104
set opt($count,field) 1
105
set opt($count,lfield) 1
106
set opt($count,cat) ""
107
set opt($count,where) ""
108
set opt($count,_use_where) 1
110
set opt($count,attribute) ""
111
set opt($count,xref) "left"
112
set opt($count,yref) "center"
113
set opt($count,lsize) 8
115
set opt($count,minreg) ""
116
set opt($count,maxreg) ""
118
# Default form mode used for vectors, it can be 'gui' (default) or 'txt'
119
set form_mode [exec g.gisenv get=DM_FORM_MODE]
120
if { $form_mode == "txt" } {
121
set opt($count,_query_text) 1
123
set opt($count,_query_text) 0
125
set opt($count,_query_edit) 0
127
set opt($count,_width) 1
129
DmVector::legend $count
135
proc DmVector::set_option { node key value } {
138
set id [Dm::node_id $node]
139
set opt($id,$key) $value
144
proc DmVector::select_map { id } {
145
set m [GSelect vector]
147
set DmVector::opt($id,map) $m
152
proc DmVector::show_columns { id } {
155
set mapname $opt($id,map)
156
set layernum $opt($id,field)
157
set cmd "v.info -c map=$mapname layer=$layernum"
161
proc DmVector::show_data { id } {
164
set mapname $opt($id,map)
165
set layernum $opt($id,field)
166
if {![catch {open "|v.db.connect map=$mapname layer=$layernum -g" r} vdb]} {
167
set vectdb [read $vdb]
169
set vdblist [split $vectdb " "]
170
set tbl [lindex $vdblist 1]
171
set db [lindex $vdblist 3]
172
set drv [lindex $vdblist 4]
173
set cmd "db.select table=$tbl database=$db driver=$drv"
178
# select symbols from directories
179
proc DmVector::select_symbol { id } {
181
set i [GSelect symbol]
183
set DmVector::opt($id,icon) $i
187
# display vector options
188
proc DmVector::options { id frm } {
196
set row [ frame $frm.name ]
197
Button $row.a -text [G_msg "Vector name:"] \
198
-command "DmVector::select_map $id"
199
Entry $row.b -width 40 -text "$opt($id,map)" \
200
-textvariable DmVector::opt($id,map) \
202
Button $row.c -text [G_msg "Help"] \
203
-image [image create photo -file "$dmpath/grass.gif"] \
204
-command "run g.manual d.vect" \
205
-background $bgcolor \
206
-helptext [G_msg "Help"]
207
pack $row.a $row.b $row.c -side left
208
pack $row -side top -fill both -expand yes
211
set row [ frame $frm.disp ]
212
Label $row.a -text [G_msg "Display:"]
213
checkbutton $row.b -text [G_msg "shapes"] -variable DmVector::opt($id,display_shape) \
214
-command "DmVector::legend $id"
215
checkbutton $row.c -text [G_msg "categories"] -variable DmVector::opt($id,display_cat) \
216
-command "DmVector::legend $id"
217
checkbutton $row.d -text [G_msg "topology"] -variable DmVector::opt($id,display_topo) \
218
-command "DmVector::legend $id"
219
checkbutton $row.e -text [G_msg "line directions"] -variable DmVector::opt($id,display_dir) \
220
-command "DmVector::legend $id"
221
pack $row.a $row.b $row.c $row.d $row.e -side left
222
pack $row -side top -fill both -expand yes
225
set row [ frame $frm.type ]
226
Label $row.a -text [G_msg " "]
227
checkbutton $row.b -text [G_msg "points"] -variable DmVector::opt($id,type_point) \
228
-command "DmVector::legend $id"
229
checkbutton $row.c -text [G_msg "lines"] -variable DmVector::opt($id,type_line) \
230
-command "DmVector::legend $id"
231
checkbutton $row.d -text [G_msg "boundaries"] -variable DmVector::opt($id,type_boundary) \
232
-command "DmVector::legend $id"
233
checkbutton $row.e -text [G_msg "centroids"] -variable DmVector::opt($id,type_centroid)\
234
-command "DmVector::legend $id"
235
checkbutton $row.f -text [G_msg "areas"] -variable DmVector::opt($id,type_area) \
236
-command "DmVector::legend $id"
237
checkbutton $row.g -text [G_msg "faces"] -variable DmVector::opt($id,type_face) \
238
-command "DmVector::legend $id"
239
pack $row.a $row.b $row.c $row.d $row.e $row.f $row.g -side left
240
pack $row -side top -fill both -expand yes
243
set row [ frame $frm.icon ]
244
Label $row.a -text "Point symbols:"
245
Button $row.b -text [G_msg "icon"] \
246
-command "DmVector::select_symbol $id"
247
Entry $row.c -width 15 -text "$opt($id,icon)" \
248
-textvariable DmVector::opt($id,icon) \
250
Label $row.d -text " size"
251
SpinBox $row.e -range {1 50 1} -textvariable DmVector::opt($id,size) \
252
-width 2 -helptext "Icon size" -modifycmd "DmVector::legend $id" \
254
pack $row.a $row.b $row.c $row.d $row.e -side left
255
pack $row -side top -fill both -expand yes
258
set row [ frame $frm.color ]
259
Label $row.a -text [G_msg "Draw lines:"]
260
checkbutton $row.b -variable DmVector::opt($id,_use_color) \
261
-command "DmVector::legend $id"
262
Label $row.c -text [G_msg "color"]
263
SelectColor $row.d -type menubutton -variable DmVector::opt($id,color) \
264
-command "DmVector::legend $id"
265
Label $row.e -text " width"
266
SpinBox $row.f -range {1 50 1} -textvariable DmVector::opt($id,lwidth) \
267
-entrybg white -width 2 -helptext "Line width" \
268
-modifycmd "DmVector::legend $id"
269
Label $row.g -text "(pixels) "
270
pack $row.a $row.b $row.c $row.d $row.e $row.f $row.g -side left
271
pack $row -side top -fill both -expand yes
274
set row [ frame $frm.multicolor ]
275
Label $row.a -text [G_msg "Fill areas:"]
276
checkbutton $row.b -variable DmVector::opt($id,_use_fcolor) \
277
-command "DmVector::legend $id"
278
Label $row.c -text [G_msg "color"]
279
SelectColor $row.d -type menubutton -variable DmVector::opt($id,fcolor) \
280
-command "DmVector::legend $id"
281
Label $row.e -text [G_msg " "]
282
checkbutton $row.f -text [G_msg "random colors"] -variable DmVector::opt($id,rdmcolor) \
283
-command "DmVector::legend $id"
284
checkbutton $row.g -text [G_msg "GRASSRGB column colors"] -variable DmVector::opt($id,sqlcolor) \
285
-command "DmVector::legend $id"
286
pack $row.a $row.b $row.c $row.d $row.e $row.f $row.g -side left
287
pack $row -side top -fill both -expand yes
290
set row [ frame $frm.label ]
291
Label $row.a -text [G_msg "Label vectors:"]
292
checkbutton $row.b -text [G_msg "label"] -variable DmVector::opt($id,display_attr) \
293
-command "DmVector::legend $id"
294
Label $row.c -text [G_msg "color"]
295
SelectColor $row.d -type menubutton -variable DmVector::opt($id,lcolor) \
296
-command "DmVector::legend $id"
297
Label $row.e -text [G_msg " size"]
298
SpinBox $row.f -range {1 50 1} -textvariable DmVector::opt($id,lsize) \
299
-width 2 -helptext [G_msg "text size"] \
300
-modifycmd "DmVector::legend $id" -entrybg white
301
ComboBox $row.g -label [G_msg " align with pt"] \
302
-width 6 -textvariable DmVector::opt($id,xref) \
304
-values {"left" "center" "right"} \
305
-modifycmd "DmVector::legend $id"
306
ComboBox $row.h -width 6 -textvariable DmVector::opt($id,yref) \
308
-values {"top" "center" "bottom"} \
309
-modifycmd "DmVector::legend $id"
310
pack $row.a $row.b $row.c $row.d $row.e $row.f $row.g $row.h -side left
311
pack $row -side top -fill both -expand yes
313
# labels layer and attribute column
314
set row [ frame $frm.attribute ]
315
LabelEntry $row.a -label [G_msg " layer for labels"] \
316
-textvariable DmVector::opt($id,lfield) -width 3 \
318
LabelEntry $row.b -label [G_msg " attribute col for labels"] \
319
-textvariable DmVector::opt($id,attribute) -width 26 \
321
pack $row.a $row.b -side left
322
pack $row -side top -fill both -expand yes
325
set row [ frame $frm.cat ]
326
Label $row.a -text [G_msg "Query vectors: "]
327
LabelEntry $row.b -label [G_msg "layer for query"] \
328
-textvariable DmVector::opt($id,field) -width 3 \
330
LabelEntry $row.c -label [G_msg " query cat values"] \
331
-textvariable DmVector::opt($id,cat) \
332
-width 5 -entrybg white
333
checkbutton $row.d -text [G_msg "SQL query"] -variable DmVector::opt($id,_use_where) \
334
-command "DmVector::legend $id"
335
pack $row.a $row.b $row.c $row.d -side left
336
pack $row -side top -fill both -expand yes
339
set row [ frame $frm.where ]
340
LabelEntry $row.a -label [G_msg " SQL where statement"] \
341
-textvariable DmVector::opt($id,where) \
342
-width 44 -entrybg white
343
pack $row.a -side left
344
pack $row -side top -fill both -expand yes
346
#show columns and data
347
set row [ frame $frm.columns ]
348
Label $row.a -text [G_msg " show attribute columns"]
349
Button $row.b -text [G_msg "columns"] \
350
-image [image create photo -file "$dmpath/columns.gif"] \
351
-command "DmVector::show_columns $id" \
352
-background $bgcolor \
353
-helptext [G_msg "Show columns"]
354
Label $row.c -text [G_msg " show data"]
355
Button $row.d -text [G_msg "data"] \
356
-image [image create photo -file "$dmpath/columns.gif"] \
357
-command "DmVector::show_data $id" \
358
-background $bgcolor \
359
-helptext [G_msg "Show data"]
360
pack $row.a $row.b $row.c $row.d -side left
361
pack $row -side top -fill both -expand yes
365
set row [ frame $frm.query ]
366
Label $row.a -text [G_msg "Mouse query setup:"]
367
checkbutton $row.b -text [G_msg "edit attributes (form mode)"] \
368
-variable DmVector::opt($id,_query_edit)
369
checkbutton $row.c -text [G_msg "results as text in terminal"] \
370
-variable DmVector::opt($id,_query_text)
371
pack $row.a $row.b $row.c -side left
372
pack $row -side top -fill both -expand yes
374
# display only in limited region size range
375
set row [ frame $frm.region ]
376
Label $row.a -text [G_msg "Display when avg. region dimension is"]
377
LabelEntry $row.b -label ">" -textvariable DmVector::opt($id,minreg) \
378
-width 8 -entrybg white
379
LabelEntry $row.c -label " or <" -textvariable DmVector::opt($id,maxreg) \
380
-width 8 -entrybg white
381
pack $row.a $row.b $row.c -side left
382
pack $row -side top -fill both -expand yes
385
set row [ frame $frm.print ]
386
Label $row.a -text [G_msg "Line width for ps.map print output:"]
387
SpinBox $row.b -range {1 100 1} -textvariable DmVector::opt($id,_width) \
388
-width 2 -helptext [G_msg "Line width used for printing"] \
390
pack $row.a $row.b -side left
391
pack $row -side top -fill both -expand yes
394
proc DmVector::save { tree depth node } {
397
set id [Dm::node_id $node]
400
foreach key { _check map display_shape display_cat display_topo display_dir display_attr
401
type_point type_line type_boundary type_centroid type_area type_face
402
color _use_color fcolor _use_fcolor lcolor rdmcolor sqlcolor icon size lwidth field lfield attribute
403
xref yref lsize cat where _query_text _query_edit _use_where minreg maxreg _width } {
404
Dm::rc_write $depth "$key $opt($id,$key)"
409
proc DmVector::display { node } {
413
set id [Dm::node_id $node]
415
if { ! ( $opt($id,_check) ) } { return }
417
if { $opt($id,map) == "" } { return }
419
if { !$opt($id,display_shape) && !$opt($id,display_cat) &&
420
!$opt($id,display_topo) && !$opt($id,display_dir) &&
421
!$opt($id,display_attr) } { return }
423
if { !$opt($id,type_point) && !$opt($id,type_line) &&
424
!$opt($id,type_boundary) && !$opt($id,type_centroid) &&
425
!$opt($id,type_area) && !$opt($id,type_face) } { return }
427
set cmd "d.vect map=$opt($id,map)"
430
if { $opt($id,rdmcolor) } { append cmd " -c" }
431
if { $opt($id,sqlcolor) } { append cmd " -a" }
432
set color [Dm::color $opt($id,color)]
433
set fcolor [Dm::color $opt($id,fcolor)]
434
set lcolor [Dm::color $opt($id,lcolor)]
436
if { $opt($id,_use_color) } { append cmd " color=$color" } { append cmd " color=none" }
437
append cmd " lcolor=$lcolor"
439
if { $opt($id,_use_fcolor) } { append cmd " fcolor=$fcolor" } { append cmd " fcolor=none" }
443
foreach d { shape cat topo dir } {
444
if { $opt($id,display_$d) } { lappend dlist $d }
446
if { $opt($id,display_attr) && $opt($id,attribute) != "" } { lappend dlist attr }
448
set display [join $dlist , ]
449
append cmd " display=$display"
453
foreach t { point line boundary centroid area face } {
454
if { $opt($id,type_$t) } { lappend tlist $t }
456
set type [join $tlist , ]
457
append cmd " type=$type"
459
append cmd " icon=$opt($id,icon) size=$opt($id,size)"
461
if { $opt($id,lwidth) != 1 } {
462
append cmd " width=$opt($id,lwidth)"
466
if { $opt($id,field) != "" } {
467
append cmd " layer=$opt($id,field)"
469
if { $opt($id,attribute) != "" && $opt($id,display_attr) } {
470
append cmd " {att=$opt($id,attribute)}"
472
append cmd " lsize=$opt($id,lsize)"
474
append cmd " xref=$opt($id,xref) yref=$opt($id,yref)"
476
if { $opt($id,lfield) != "" } {
477
append cmd " llayer=$opt($id,lfield)"
479
if { $opt($id,cat) != "" } {
480
append cmd " cat=$opt($id,cat)"
482
if { $opt($id,where) != "" && $opt($id,_use_where) } {
483
append cmd " {where=$opt($id,where)}"
485
if { $opt($id,minreg) != "" } {
486
append cmd " minreg=$opt($id,minreg)"
488
if { $opt($id,maxreg) != "" } {
489
append cmd " maxreg=$opt($id,maxreg)"
495
proc DmVector::print { file node } {
499
set id [Dm::node_id $node]
501
if { ! $opt($id,_check) } { return }
502
if { $opt($id,map) == "" } { return }
504
if { $opt($id,display_cat) || $opt($id,display_topo) ||
505
$opt($id,display_dir) || $opt($id,display_attr)
506
} { puts "At least one of selected display options for vector is not supported for PS" }
508
if { ! $opt($id,display_shape) } { return }
510
set color [Dm::color $opt($id,color)]
511
set fcolor [Dm::color $opt($id,fcolor)]
514
if { $opt($id,type_point) || $opt($id,type_centroid) } {
515
puts $file "vpoints $opt($id,map)"
518
if { $opt($id,type_point) } { append str " point" }
519
if { $opt($id,type_centroid) } { append str " centroid" }
522
if { $opt($id,field) != "" } { puts $file " layer $opt($id,field)" }
523
if { $opt($id,cat) != "" } { puts $file " cats $opt($id,cat)" }
524
if { $opt($id,where) != "" } { puts $file " where $opt($id,where)" }
526
if { $opt($id,_use_color) } {
527
puts $file " color $color"
529
puts $file " color none"
532
#puts $file "width $opt($id,ps_width)"
534
if { $opt($id,_use_fcolor) } {
535
puts $file " fcolor $fcolor"
537
puts $file " fcolor none"
540
puts $file " symbol $opt($id,icon)"
541
puts $file " size $opt($id,size)"
544
# puts $file " xref $opt($id,xref)"
545
# puts $file " yref $opt($id,yref)"
551
if { $opt($id,type_line) || $opt($id,type_boundary) } {
552
puts $file "vlines $opt($id,map)"
555
if { $opt($id,type_line) } { append str " line" }
556
if { $opt($id,type_boundary) } { append str " boundary" }
559
if { $opt($id,field) != "" } { puts $file " layer $opt($id,field)" }
560
if { $opt($id,cat) != "" } { puts $file " cats $opt($id,cat)" }
561
if { $opt($id,where) != "" } { puts $file " where $opt($id,where)" }
563
if { $opt($id,_use_color) } {
564
puts $file " color $color"
566
puts $file " color none"
569
puts $file "width $opt($id,_width)"
571
puts $file " hcolor NONE"
577
if { $opt($id,type_area) } {
578
puts $file "vareas $opt($id,map)"
580
if { $opt($id,field) != "" } { puts $file " layer $opt($id,field)" }
581
if { $opt($id,cat) != "" } { puts $file " cats $opt($id,cat)" }
582
if { $opt($id,where) != "" } { puts $file " where $opt($id,where)" }
584
if { $opt($id,_use_color) } {
585
puts $file " color $color"
587
puts $file " color none"
590
puts $file "width $opt($id,_width)"
592
if { $opt($id,_use_fcolor) } {
593
puts $file " fcolor $fcolor"
595
puts $file " fcolor none"
602
proc DmVector::query { node } {
606
set id [Dm::node_id $node]
608
if { ! ( $opt($id,_check) ) } { return }
610
if { $opt($id,map) == "" } { return }
612
if { !$opt($id,display_shape) && !$opt($id,display_cat) &&
613
!$opt($id,display_topo) && !$opt($id,display_dir) &&
614
!$opt($id,display_attr) } { return }
616
if { !$opt($id,type_point) && !$opt($id,type_line) &&
617
!$opt($id,type_boundary) && !$opt($id,type_centroid) &&
618
!$opt($id,type_area) && !$opt($id,type_face) } { return }
620
set cmd "d.what.vect -f map=$opt($id,map)"
621
if { $opt($id,_query_text) && !$opt($id,_query_edit) } {
624
if { $opt($id,_query_edit) } {
628
if { $opt($id,_query_text) && !$opt($id,_query_edit) } {
635
proc DmVector::WorkOnVector { node } {
640
set id [Dm::node_id $node]
642
if { ! ( $opt($id,_check) ) } { return }
644
if { $opt($id,map) == "" } { return }
646
if { !$opt($id,display_shape) && !$opt($id,display_cat) &&
647
!$opt($id,display_topo) && !$opt($id,display_dir) &&
648
!$opt($id,display_attr) } { return }
650
if { !$opt($id,type_point) && !$opt($id,type_line) &&
651
!$opt($id,type_boundary) && !$opt($id,type_centroid) &&
652
!$opt($id,type_area) && !$opt($id,type_face) } { return }
654
set bg [exec d.save -o | cut -f1 -d# | tr {\n} {;}]
657
spawn v.digit -n map=$opt($id,map) bgcmd=$bg
661
proc DmVector::duplicate { tree parent node id } {
666
set node "vector:$count"
668
set frm [ frame .vectoricon$count]
669
set fon [font create -size 10]
670
set check [checkbutton $frm.check -font $fon \
671
-variable DmVector::opt($count,_check) \
672
-height 1 -padx 0 -width 0]
673
set can [ canvas $frm.c -width $DmTree::legend_width \
674
-height $DmTree::legend_height -borderwidth 0 ]
675
set opt($count,_legend) $can
676
pack $check $can -side left
678
if { $opt($id,map) == ""} {
679
$tree insert end $parent $node \
680
-text "vector $count" \
684
$tree insert end $parent $node \
685
-text "$opt($id,map)" \
690
set opt($count,_check) $opt($id,_check)
692
set opt($count,map) "$opt($id,map)"
693
set opt($count,display_shape) $opt($id,display_shape)
694
set opt($count,display_cat) $opt($id,display_cat)
695
set opt($count,display_topo) $opt($id,display_topo)
696
set opt($count,display_dir) $opt($id,display_dir)
697
set opt($count,display_attr) $opt($id,display_attr)
698
set opt($count,type_point) $opt($id,type_point)
699
set opt($count,type_line) $opt($id,type_line)
700
set opt($count,type_boundary) $opt($id,type_boundary)
701
set opt($count,type_centroid) $opt($id,type_centroid)
702
set opt($count,type_area) $opt($id,type_area)
703
set opt($count,type_face) $opt($id,type_face)
705
set opt($count,color) $opt($id,color)
706
set opt($count,sqlcolor) $opt($id,sqlcolor)
707
set opt($count,rdmcolor) $opt($id,rdmcolor)
708
set opt($count,fcolor) $opt($id,fcolor)
709
set opt($count,lcolor) $opt($id,lcolor)
710
set opt($count,_use_color) $opt($id,_use_color)
711
set opt($count,_use_fcolor) $opt($id,_use_fcolor)
713
set opt($count,symdir) "$opt($id,symdir)"
714
set opt($count,icon) "$opt($id,icon)"
715
set opt($count,size) $opt($id,size)
716
set opt($count,lwidth) $opt($id,lwidth)
718
set opt($count,field) $opt($id,field)
719
set opt($count,lfield) $opt($id,lfield)
720
set opt($count,cat) "$opt($id,cat)"
721
set opt($count,where) "$opt($id,where)"
722
set opt($count,_use_where) $opt($id,_use_where)
724
set opt($count,attribute) "$opt($id,attribute)"
725
set opt($count,xref) "$opt($id,xref)"
726
set opt($count,yref) "$opt($id,yref)"
727
set opt($count,lsize) $opt($id,lsize)
729
set opt($count,minreg) "$opt($id,minreg)"
730
set opt($count,maxreg) "$opt($id,maxreg)"
732
# Default form mode used for vectors, it can be 'gui' (default) or 'txt'
733
set form_mode [exec g.gisenv get=DM_FORM_MODE]
734
if { $form_mode == "txt" } {
735
set opt($count,_query_text) $opt($id,_query_text)
737
set opt($count,_query_text) $opt($id,_query_text)
739
set opt($count,_query_edit) $opt($id,_query_edit)
741
set opt($count,_width) $opt($id,_width)
743
DmVector::legend $count