4 @brief Nviz (3D view) tools window
12 (C) 2008-2010 by the GRASS Development Team
14 This program is free software under the GNU General Public
15 License (>=v2). Read the file COPYING that comes with GRASS
18 @author Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
19 @author Enhancements by Michael Barton <michael.barton@asu.edu>
28 import wx.lib.colourselect
as csel
29 import wx.lib.scrolledpanel
as SP
31 import wx.lib.agw.flatnotebook
as FN
33 import wx.lib.flatnotebook
as FN
40 from preferences
import globalSettings
as UserSettings
41 from preferences
import PreferencesBaseDialog
43 from nviz_mapdisp
import wxUpdateView, wxUpdateLight, wxUpdateProperties
45 except (ImportError, NameError):
47 from debug
import Debug
50 """!Nviz (3D view) tools panel
52 def __init__(self, parent, display, id = wx.ID_ANY,
53 style = globalvar.FNPageStyle, **kwargs):
57 self.
_display = self.mapWindow.GetDisplay()
60 kwargs[
'agwStyle'] = style
62 kwargs[
'style'] = style
63 FN.FlatNotebook.__init__(self, parent, id, **kwargs)
64 self.SetTabAreaColour(globalvar.FNPageColor)
71 text =
" %s " % _(
"View"))
75 text =
" %s " % _(
"Data"))
79 text =
" %s " % _(
"Appearance"))
83 self.mapWindow.render[
'quick'] =
False
84 self.mapWindow.Refresh(
False)
87 self.Bind(wx.EVT_CLOSE, self.
OnClose)
91 wx.CallAfter(self.
SetPage,
'view')
92 wx.CallAfter(self.notebookData.SetSelection, 0)
93 wx.CallAfter(self.notebookAppearance.SetSelection, 0)
96 new = event.GetSelection()
100 """!Change view settings"""
101 event = wxUpdateView(zExag = zExag)
104 def _createViewPage(self):
105 """!Create view settings page"""
106 panel = SP.ScrolledPanel(parent = self, id = wx.ID_ANY)
107 panel.SetupScrolling(scroll_x =
False)
108 self.
page[
'view'] = {
'id' : 0,
109 'notebook' : self.GetId()}
111 pageSizer = wx.BoxSizer(wx.VERTICAL)
112 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
113 label =
" %s " % (_(
"Control View")))
114 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
115 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
117 self.
win[
'view'] = {}
120 posSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
121 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"W")),
122 pos = (1, 0), flag = wx.ALIGN_CENTER)
123 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"N")),
124 pos = (0, 1), flag = wx.ALIGN_CENTER | wx.ALIGN_BOTTOM)
127 self.
win[
'view'][
'position'] = view.GetId()
128 posSizer.Add(item = view,
129 pos = (1, 1), flag = wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL)
130 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"S")),
131 pos = (2, 1), flag = wx.ALIGN_CENTER | wx.ALIGN_TOP)
132 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"E")),
133 pos = (1, 2), flag = wx.ALIGN_CENTER)
134 gridSizer.Add(item = posSizer, pos = (0, 0))
141 gridSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Perspective:")),
142 pos = (1, 0), flag = wx.ALIGN_CENTER)
143 gridSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'persp'][
'slider']), pos = (2, 0))
144 gridSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'persp'][
'spin']), pos = (3, 0),
145 flag = wx.ALIGN_CENTER)
151 gridSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Twist:")),
152 pos = (1, 1), flag = wx.ALIGN_CENTER)
153 gridSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'twist'][
'slider']), pos = (2, 1))
154 gridSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'twist'][
'spin']), pos = (3, 1),
155 flag = wx.ALIGN_CENTER)
158 self.
_createControl(panel, data = self.
win[
'view'], name =
'height', sliderHor =
False,
162 self.
_createControl(panel, data = self.
win[
'view'], name =
'z-exag', sliderHor =
False,
165 self.FindWindowById(self.
win[
'view'][
'z-exag'][
'slider']).SetValue(1)
166 self.FindWindowById(self.
win[
'view'][
'z-exag'][
'spin']).SetValue(1)
168 heightSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
169 heightSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Height:")),
170 pos = (0, 0), flag = wx.ALIGN_LEFT, span = (1, 2))
171 heightSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'height'][
'slider']),
172 flag = wx.ALIGN_RIGHT, pos = (1, 0))
173 heightSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'height'][
'spin']),
174 flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT | wx.TOP |
175 wx.BOTTOM | wx.RIGHT, pos = (1, 1))
176 heightSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Z-exag:")),
177 pos = (0, 2), flag = wx.ALIGN_LEFT, span = (1, 2))
178 heightSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'z-exag'][
'slider']),
179 flag = wx.ALIGN_RIGHT, pos = (1, 2))
180 heightSizer.Add(item = self.FindWindowById(self.
win[
'view'][
'z-exag'][
'spin']),
181 flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT | wx.TOP |
182 wx.BOTTOM | wx.RIGHT, pos = (1, 3))
184 gridSizer.Add(item = heightSizer, pos = (0, 1), flag = wx.ALIGN_RIGHT)
187 viewSizer = wx.BoxSizer(wx.HORIZONTAL)
189 viewSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY,
190 label = _(
"Look at:")),
191 flag = wx.ALL | wx.ALIGN_CENTER_VERTICAL,
194 viewType = wx.Choice (parent = panel, id = wx.ID_ANY, size = (125, -1),
204 viewType.SetSelection(0)
205 viewType.Bind(wx.EVT_CHOICE, self.
OnLookAt)
207 viewSizer.Add(item = viewType,
208 flag = wx.ALL | wx.ALIGN_CENTER_VERTICAL,
211 reset = wx.Button(panel, id = wx.ID_ANY, label = _(
"Reset"))
212 reset.SetToolTipString(_(
"Reset to default view"))
216 viewSizer.Add(item = wx.Size(-1, -1), proportion = 1,
218 viewSizer.Add(item = reset, proportion = 0,
219 flag = wx.ALL | wx.ALIGN_RIGHT,
222 gridSizer.AddGrowableCol(2)
223 gridSizer.Add(item = viewSizer, pos = (4, 0), span = (1, 2),
227 boxSizer.Add(item = gridSizer, proportion = 1,
228 flag = wx.ALL | wx.EXPAND, border = 2)
229 pageSizer.Add(item = boxSizer, proportion = 0,
230 flag = wx.EXPAND | wx.ALL,
233 box = wx.StaticBox(parent = panel, id = wx.ID_ANY,
234 label =
" %s " % (_(
"Image Appearance")))
235 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
236 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
237 gridSizer.AddGrowableCol(0)
240 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
241 label = _(
"Background color:")),
242 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
244 color = csel.ColourSelect(panel, id = wx.ID_ANY,
245 colour = UserSettings.Get(group =
'nviz', key =
'view',
246 subkey = [
'background',
'color']),
247 size = globalvar.DIALOG_COLOR_SIZE)
248 self.
win[
'view'][
'bgcolor'] = color.GetId()
249 color.Bind(csel.EVT_COLOURSELECT, self.
OnBgColor)
250 gridSizer.Add(item = color, pos = (0, 1))
252 boxSizer.Add(item = gridSizer, proportion = 1,
253 flag = wx.ALL | wx.EXPAND, border = 3)
254 pageSizer.Add(item = boxSizer, proportion = 0,
255 flag = wx.EXPAND | wx.LEFT | wx.RIGHT,
258 panel.SetSizer(pageSizer)
262 def _createDataPage(self):
263 """!Create data (surface, vector, volume) settings page"""
266 agwStyle = globalvar.FNPageDStyle)
268 self.
notebookData = FN.FlatNotebook(parent = self, id = wx.ID_ANY,
269 style = globalvar.FNPageDStyle)
273 text =
" %s " % _(
"Surface"))
278 text =
" %s " % _(
"Vector"))
283 text =
" %s " % _(
"Volume"))
288 def _createAppearancePage(self):
289 """!Create data (surface, vector, volume) settings page"""
292 agwStyle = globalvar.FNPageDStyle)
295 style = globalvar.FNPageDStyle)
299 text =
" %s " % _(
"Lighting"))
303 text =
" %s " % _(
"Fringe"))
308 def _createSurfacePage(self):
309 """!Create view settings page"""
310 panel = SP.ScrolledPanel(parent = self, id = wx.ID_ANY)
311 panel.SetupScrolling(scroll_x =
False)
312 self.
page[
'surface'] = {
'id' : 0,
313 'panel' : panel.GetId(),
314 'notebook' : self.notebookData.GetId() }
315 pageSizer = wx.BoxSizer(wx.VERTICAL)
317 self.
win[
'surface'] = {}
320 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
321 label =
" %s " % (_(
"Raster map")))
322 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
325 rmaps.GetChildren()[0].Bind(wx.EVT_TEXT, self.
OnSetRaster)
326 self.
win[
'surface'][
'map'] = rmaps.GetId()
327 desc = wx.StaticText(parent = panel, id = wx.ID_ANY)
328 self.
win[
'surface'][
'desc'] = desc.GetId()
329 boxSizer.Add(item = rmaps, proportion = 0,
332 boxSizer.Add(item = desc, proportion = 0,
335 pageSizer.Add(item = boxSizer, proportion = 0,
336 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
342 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
343 label =
" %s " % (_(
"Surface attributes")))
344 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
345 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
348 self.
win[
'surface'][
'attr'] = {}
350 for code, attrb
in ((
'topo', _(
"Topography")),
351 (
'color', _(
"Color")),
353 (
'transp', _(
"Transparency")),
354 (
'shine', _(
"Shininess")),
355 (
'emit', _(
"Emission"))):
356 self.
win[
'surface'][code] = {}
357 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
358 label = attrb +
':'),
359 pos = (row, 0), flag = wx.ALIGN_CENTER_VERTICAL)
360 use = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
361 choices = [_(
"map")])
363 if code
not in (
'topo',
'color',
'shine'):
364 use.Insert(item = _(
"unset"), pos = 0)
365 self.
win[
'surface'][code][
'required'] =
False
367 self.
win[
'surface'][code][
'required'] =
True
369 use.Append(item = _(
'constant'))
370 self.
win[
'surface'][code][
'use'] = use.GetId()
372 gridSizer.Add(item = use, flag = wx.ALIGN_CENTER_VERTICAL,
379 self.
win[
'surface'][code][
'map'] = map.GetId() - 1
384 gridSizer.Add(item = map, flag = wx.ALIGN_CENTER_VERTICAL,
388 value = csel.ColourSelect(panel, id = wx.ID_ANY,
390 size = globalvar.DIALOG_COLOR_SIZE)
395 value = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
398 value.SetRange(minVal = -1e9, maxVal = 1e9)
399 elif code
in (
'shine',
'transp',
'emit'):
400 value.SetRange(minVal = 0, maxVal = 255)
402 value.SetRange(minVal = 0, maxVal = 100)
406 self.
win[
'surface'][code][
'const'] = value.GetId()
408 gridSizer.Add(item = value, flag = wx.ALIGN_CENTER_VERTICAL,
411 self.
win[
'surface'][code][
'const'] =
None
418 boxSizer.Add(item = gridSizer, proportion = 1,
419 flag = wx.ALL | wx.EXPAND, border = 3)
420 pageSizer.Add(item = boxSizer, proportion = 0,
421 flag = wx.EXPAND | wx.ALL,
427 self.
win[
'surface'][
'draw'] = {}
428 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
429 label =
" %s " % (_(
"Draw")))
430 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
431 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
432 gridSizer.AddGrowableCol(6)
435 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
437 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
438 mode = wx.Choice (parent = panel, id = wx.ID_ANY, size = (-1, -1),
439 choices = [_(
"coarse"),
443 mode.SetName(
"selection")
445 self.
win[
'surface'][
'draw'][
'mode'] = mode.GetId()
446 gridSizer.Add(item = mode, flag = wx.ALIGN_CENTER_VERTICAL,
450 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
451 label = _(
"Shading:")),
452 pos = (0, 2), flag = wx.ALIGN_CENTER_VERTICAL)
453 shade = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
454 choices = [_(
"flat"),
456 shade.SetName(
"selection")
457 self.
win[
'surface'][
'draw'][
'shading'] = shade.GetId()
459 gridSizer.Add(item = shade, flag = wx.ALIGN_CENTER_VERTICAL,
463 all = wx.Button(panel, id = wx.ID_ANY, label = _(
"Set to all"))
464 all.SetToolTipString(_(
"Use draw settings for all loaded surfaces"))
466 gridSizer.Add(item = all, flag = wx.ALL | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND,
467 pos = (0, 4), span = (1,2), border = 3 )
470 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
471 label = _(
"Coarse:")),
472 pos = (1, 0), flag = wx.ALIGN_CENTER_VERTICAL)
473 resSizer = wx.BoxSizer(wx.HORIZONTAL)
474 resSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
476 flag = wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL,
478 resC = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
482 resC.SetName(
"value")
485 self.
win[
'surface'][
'draw'][
'res-coarse'] = resC.GetId()
487 resSizer.Add(item = resC, flag = wx.ALL | wx.ALIGN_LEFT |
488 wx.ALIGN_CENTER_VERTICAL, border = 3)
489 gridSizer.Add(item = resSizer, pos = (1, 1), flag = wx.ALIGN_CENTER_VERTICAL)
492 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
494 pos = (1, 2), flag = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
495 style = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
496 choices = [_(
"wire"),
498 style.SetName(
"selection")
499 self.
win[
'surface'][
'draw'][
'style'] = style.GetId()
501 gridSizer.Add(item = style, flag = wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL,
505 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
506 label = _(
"wire color")),
507 pos = (1, 4), flag = wx.ALIGN_CENTER_VERTICAL |
508 wx.ALIGN_RIGHT | wx.LEFT, border = 3)
509 color = csel.ColourSelect(panel, id = wx.ID_ANY,
510 size = globalvar.DIALOG_COLOR_SIZE)
511 color.SetColour((136,136,136))
512 color.SetName(
"colour")
514 self.
win[
'surface'][
'draw'][
'wire-color'] = color.GetId()
515 gridSizer.Add(item = color, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT,
519 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
521 pos = (2, 0), flag = wx.ALIGN_CENTER_VERTICAL)
523 resSizer = wx.BoxSizer(wx.HORIZONTAL)
524 resSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
526 flag = wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL,
528 resF = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
532 resF.SetName(
"value")
534 self.
win[
'surface'][
'draw'][
'res-fine'] = resF.GetId()
536 resSizer.Add(item = resF, flag = wx.ALL | wx.ALIGN_LEFT |
537 wx.ALIGN_CENTER_VERTICAL, border = 3)
538 gridSizer.Add(item = resSizer, pos = (2, 1), flag = wx.ALIGN_CENTER_VERTICAL)
540 boxSizer.Add(item = gridSizer, proportion = 1,
541 flag = wx.ALL | wx.EXPAND, border = 3)
542 pageSizer.Add(item = boxSizer, proportion = 0,
543 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
549 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
550 label =
" %s " % (_(
"Mask")))
551 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
552 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
554 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
555 label = _(
"Mask zeros:")),
556 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
558 elev = wx.CheckBox(parent = panel, id = wx.ID_ANY,
559 label = _(
"by elevation"))
561 gridSizer.Add(item = elev, pos = (0, 1))
563 color = wx.CheckBox(parent = panel, id = wx.ID_ANY,
564 label = _(
"by color"))
566 gridSizer.Add(item = color, pos = (0, 2))
568 boxSizer.Add(item = gridSizer, proportion = 1,
569 flag = wx.ALL | wx.EXPAND, border = 3)
570 pageSizer.Add(item = boxSizer, proportion = 0,
571 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
577 self.
win[
'surface'][
'position'] = {}
578 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
579 label =
" %s " % (_(
"Position")))
580 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
581 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
585 range = (-10000, 10000),
588 axis = wx.Choice (parent = panel, id = wx.ID_ANY, size = (75, -1),
593 self.
win[
'surface'][
'position'][
'axis'] = axis.GetId()
597 pslide = self.FindWindowById(self.
win[
'surface'][
'position'][
'slider'])
598 pspin = self.FindWindowById(self.
win[
'surface'][
'position'][
'spin'])
600 gridSizer.Add(item = axis, flag = wx.ALIGN_CENTER_VERTICAL, pos = (0, 0))
601 gridSizer.Add(item = pslide, flag = wx.ALIGN_CENTER_VERTICAL, pos = (0, 1))
602 gridSizer.Add(item = pspin, flag = wx.ALIGN_CENTER_VERTICAL, pos = (0, 2))
604 boxSizer.Add(item = gridSizer, proportion = 1,
605 flag = wx.ALL | wx.EXPAND, border = 3)
606 box.SetSizer(boxSizer)
609 pageSizer.Add(item = boxSizer, proportion = 0,
610 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
613 panel.SetSizer(pageSizer)
617 def _createVectorPage(self):
618 """!Create view settings page"""
619 panel = SP.ScrolledPanel(parent = self, id = wx.ID_ANY)
620 panel.SetupScrolling(scroll_x =
False)
621 self.
page[
'vector'] = {
'id' : 1,
622 'panel' : panel.GetId(),
623 'notebook' : self.notebookData.GetId() }
624 pageSizer = wx.BoxSizer(wx.VERTICAL)
626 self.
win[
'vector'] = {}
629 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
630 label =
" %s " % (_(
"Vector map")))
631 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
634 vmaps.GetChildren()[0].Bind(wx.EVT_TEXT, self.
OnSetVector)
635 self.
win[
'vector'][
'map'] = vmaps.GetId()
636 desc = wx.StaticText(parent = panel, id = wx.ID_ANY)
637 self.
win[
'vector'][
'desc'] = desc.GetId()
638 boxSizer.Add(item = vmaps, proportion = 0,
641 boxSizer.Add(item = desc, proportion = 0,
644 pageSizer.Add(item = boxSizer, proportion = 0,
645 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
651 self.
win[
'vector'][
'lines'] = {}
653 showLines = wx.CheckBox(parent = panel, id = wx.ID_ANY,
654 label = _(
"Show vector lines"))
655 showLines.SetValue(
True)
657 self.
win[
'vector'][
'lines'][
'show'] = showLines.GetId()
660 pageSizer.Add(item = showLines, proportion = 0,
661 flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
663 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
664 label =
" %s " % (_(
"Vector lines")))
665 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
666 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
669 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
671 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
672 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
674 pos = (0, 1), flag = wx.ALIGN_CENTER_VERTICAL |
677 width = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
682 self.
win[
'vector'][
'lines'][
'width'] = width.GetId()
684 gridSizer.Add(item = width, pos = (0, 2),
685 flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT)
688 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
690 pos = (0, 3), flag = wx.ALIGN_CENTER_VERTICAL |
693 color = csel.ColourSelect(panel, id = wx.ID_ANY,
695 size = globalvar.DIALOG_COLOR_SIZE)
696 self.
win[
'vector'][
'lines'][
'color'] = color.GetId()
699 gridSizer.Add(item = color, pos = (0, 4), flag = wx.ALIGN_CENTER_VERTICAL |
703 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
704 label = _(
"display")),
705 pos = (1, 1), flag = wx.ALIGN_CENTER_VERTICAL |
708 display = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
709 choices = [_(
"on surface"),
711 self.
win[
'vector'][
'lines'][
'flat'] = display.GetId()
714 gridSizer.Add(item = display, flag = wx.ALIGN_CENTER_VERTICAL |
715 wx.ALIGN_LEFT, pos = (1, 2), span = (1,2))
718 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
719 label = _(
"Height above surface:")),
720 pos = (2, 0), flag = wx.ALIGN_CENTER_VERTICAL,
723 surface = wx.ComboBox(parent = panel, id = wx.ID_ANY, size = (250, -1),
724 style = wx.CB_SIMPLE | wx.CB_READONLY,
727 self.
win[
'vector'][
'lines'][
'surface'] = surface.GetId()
728 gridSizer.Add(item = surface,
729 pos = (2, 3), span = (1, 6),
730 flag = wx.ALIGN_CENTER_VERTICAL)
732 self.
_createControl(panel, data = self.
win[
'vector'][
'lines'], name =
'height', size = 300,
735 self.FindWindowById(self.
win[
'vector'][
'lines'][
'height'][
'slider']).SetValue(0)
736 self.FindWindowById(self.
win[
'vector'][
'lines'][
'height'][
'spin']).SetValue(0)
737 gridSizer.Add(item = self.FindWindowById(self.
win[
'vector'][
'lines'][
'height'][
'slider']),
738 pos = (3, 0), span = (1, 7))
739 gridSizer.Add(item = self.FindWindowById(self.
win[
'vector'][
'lines'][
'height'][
'spin']),
741 flag = wx.ALIGN_CENTER)
743 boxSizer.Add(item = gridSizer, proportion = 1,
744 flag = wx.ALL | wx.EXPAND, border = 3)
745 pageSizer.Add(item = boxSizer, proportion = 0,
746 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
752 self.
win[
'vector'][
'points'] = {}
754 showPoints = wx.CheckBox(parent = panel, id = wx.ID_ANY,
755 label = _(
"Show vector points"))
756 showPoints.SetValue(
True)
757 self.
win[
'vector'][
'points'][
'show'] = showPoints.GetId()
760 pageSizer.Add(item = showPoints, proportion = 0,
761 flag = wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border = 5)
763 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
764 label =
" %s " % (_(
"Vector points")))
765 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
766 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
769 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
771 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
772 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
774 pos = (0, 1), flag = wx.ALIGN_CENTER_VERTICAL |
777 isize = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
781 isize.SetName(
'value')
783 self.
win[
'vector'][
'points'][
'size'] = isize.GetId()
786 gridSizer.Add(item = isize, pos = (0, 2),
787 flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT)
790 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
792 pos = (0, 3), flag = wx.ALIGN_CENTER_VERTICAL |
794 icolor = csel.ColourSelect(panel, id = wx.ID_ANY,
795 size = globalvar.DIALOG_COLOR_SIZE)
796 icolor.SetName(
"color")
797 icolor.SetColour((0,0,255))
798 self.
win[
'vector'][
'points'][
'color'] = icolor.GetId()
800 gridSizer.Add(item = icolor, flag = wx.ALIGN_CENTER_VERTICAL |
805 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
807 pos = (0, 5), flag = wx.ALIGN_CENTER_VERTICAL |
810 iwidth = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
814 iwidth.SetName(
'value')
816 self.
win[
'vector'][
'points'][
'width'] = iwidth.GetId()
819 gridSizer.Add(item = iwidth, pos = (0, 6),
820 flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT)
823 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
824 label = _(
"symbol")),
825 pos = (1, 1), flag = wx.ALIGN_CENTER_VERTICAL)
826 isym = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
827 choices = UserSettings.Get(group =
'nviz', key =
'vector',
828 subkey = [
'points',
'marker'], internal =
True))
829 isym.SetName(
"selection")
830 self.
win[
'vector'][
'points'][
'marker'] = isym.GetId()
832 gridSizer.Add(item = isym, flag = wx.ALIGN_CENTER_VERTICAL,
833 pos = (1, 2), span = (1,2))
836 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
837 label = _(
"Height above surface:")),
838 pos = (2, 0), flag = wx.ALIGN_CENTER_VERTICAL,
841 surface = wx.ComboBox(parent = panel, id = wx.ID_ANY, size = (250, -1),
842 style = wx.CB_SIMPLE | wx.CB_READONLY,
845 self.
win[
'vector'][
'points'][
'surface'] = surface.GetId()
846 gridSizer.Add(item = surface,
847 pos = (2, 3), span = (1, 5),
848 flag = wx.ALIGN_CENTER_VERTICAL)
850 self.
_createControl(panel, data = self.
win[
'vector'][
'points'], name =
'height', size = 300,
854 self.FindWindowById(self.
win[
'vector'][
'points'][
'height'][
'slider']).SetValue(0)
855 self.FindWindowById(self.
win[
'vector'][
'points'][
'height'][
'spin']).SetValue(0)
857 gridSizer.Add(item = self.FindWindowById(self.
win[
'vector'][
'points'][
'height'][
'slider']),
858 pos = (3, 0), span = (1, 7))
859 gridSizer.Add(item = self.FindWindowById(self.
win[
'vector'][
'points'][
'height'][
'spin']),
861 flag = wx.ALIGN_CENTER)
863 boxSizer.Add(item = gridSizer, proportion = 1,
864 flag = wx.ALL | wx.EXPAND, border = 3)
865 pageSizer.Add(item = boxSizer, proportion = 0,
866 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
869 panel.SetSizer(pageSizer)
874 """Update gselect.Select() items"""
876 for layer
in self.mapWindow.Map.GetListOfLayers(l_type = ltype):
877 maps.append(layer.GetName())
880 def _createVolumePage(self):
881 """!Create view settings page"""
882 panel = SP.ScrolledPanel(parent = self, id = wx.ID_ANY)
883 panel.SetupScrolling(scroll_x =
False)
884 self.
page[
'volume'] = {
'id' : 2,
885 'panel' : panel.GetId(),
886 'notebook' : self.notebookData.GetId() }
887 pageSizer = wx.BoxSizer(wx.VERTICAL)
889 self.
win[
'volume'] = {}
892 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
893 label =
" %s " % (_(
"3D raster map")))
894 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
898 self.
win[
'volume'][
'map'] = rmaps.GetId()
899 desc = wx.StaticText(parent = panel, id = wx.ID_ANY)
900 self.
win[
'volume'][
'desc'] = desc.GetId()
901 boxSizer.Add(item = rmaps, proportion = 0,
904 boxSizer.Add(item = desc, proportion = 0,
907 pageSizer.Add(item = boxSizer, proportion = 0,
908 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
914 self.
win[
'volume'][
'draw'] = {}
915 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
916 label =
" %s " % (_(
"Draw")))
917 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
918 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
919 gridSizer.AddGrowableCol(4)
922 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
924 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
925 mode = wx.Choice (parent = panel, id = wx.ID_ANY, size = (150, -1),
926 choices = [_(
"isosurfaces"),
929 mode.SetName(
"selection")
931 self.
win[
'volume'][
'draw'][
'mode'] = mode.GetId()
932 gridSizer.Add(item = mode, flag = wx.ALIGN_CENTER_VERTICAL,
936 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
937 label = _(
"Shading:")),
938 pos = (0, 2), flag = wx.ALIGN_CENTER_VERTICAL)
939 shade = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
940 choices = [_(
"flat"),
942 shade.SetName(
"selection")
943 self.
win[
'volume'][
'draw'][
'shading'] = shade.GetId()
945 gridSizer.Add(item = shade, flag = wx.ALIGN_CENTER_VERTICAL,
949 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
950 label = _(
"Resolution:")),
951 pos = (0, 4), flag = wx.ALIGN_CENTER_VERTICAL)
952 resol = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = (65, -1),
956 resol.SetName(
"value")
957 self.
win[
'volume'][
'draw'][
'resolution'] = resol.GetId()
960 gridSizer.Add(item = resol, pos = (0, 5))
962 boxSizer.Add(item = gridSizer, proportion = 1,
963 flag = wx.ALL | wx.EXPAND, border = 3)
964 pageSizer.Add(item = boxSizer, proportion = 0,
965 flag = wx.EXPAND | wx.ALL,
971 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
972 label =
" %s " % (_(
"List of isosurfaces")))
973 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
974 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
977 isolevel = wx.CheckListBox(parent = panel, id = wx.ID_ANY,
982 self.
win[
'volume'][
'isosurfs'] = isolevel.GetId()
983 gridSizer.Add(item = isolevel, pos = (0, 0), span = (4, 1))
986 btnAdd = wx.Button(parent = panel, id = wx.ID_ADD)
987 self.
win[
'volume'][
'btnIsosurfAdd'] = btnAdd.GetId()
989 gridSizer.Add(item = btnAdd,
991 btnDelete = wx.Button(parent = panel, id = wx.ID_DELETE)
992 self.
win[
'volume'][
'btnIsosurfDelete'] = btnDelete.GetId()
994 btnDelete.Enable(
False)
995 gridSizer.Add(item = btnDelete,
997 btnMoveUp = wx.Button(parent = panel, id = wx.ID_UP)
998 self.
win[
'volume'][
'btnIsosurfMoveUp'] = btnMoveUp.GetId()
1000 btnMoveUp.Enable(
False)
1001 gridSizer.Add(item = btnMoveUp,
1003 btnMoveDown = wx.Button(parent = panel, id = wx.ID_DOWN)
1004 self.
win[
'volume'][
'btnIsosurfMoveDown'] = btnMoveDown.GetId()
1006 btnMoveDown.Enable(
False)
1007 gridSizer.Add(item = btnMoveDown,
1010 boxSizer.Add(item = gridSizer, proportion = 1,
1011 flag = wx.ALL | wx.EXPAND, border = 3)
1012 pageSizer.Add(item = boxSizer, proportion = 0,
1013 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1019 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
1020 label =
" %s " % (_(
"Isosurface attributes")))
1021 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
1022 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
1024 self.
win[
'volume'][
'attr'] = {}
1026 for code, attrb
in ((
'topo', _(
"Topography level")),
1027 (
'color', _(
"Color")),
1028 (
'mask', _(
"Mask")),
1029 (
'transp', _(
"Transparency")),
1030 (
'shine', _(
"Shininess")),
1031 (
'emit', _(
"Emission"))):
1032 self.
win[
'volume'][code] = {}
1034 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
1035 label = attrb +
':'),
1036 pos = (row, 0), flag = wx.ALIGN_CENTER_VERTICAL)
1038 use = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
1039 choices = [_(
"map")])
1043 if code
not in (
'topo',
'color',
'shine'):
1044 use.Insert(item = _(
"unset"), pos = 0)
1045 self.
win[
'volume'][code][
'required'] =
False
1047 self.
win[
'volume'][code][
'required'] =
True
1048 if use
and code !=
'mask':
1049 use.Append(item = _(
'constant'))
1051 self.
win[
'volume'][code][
'use'] = use.GetId()
1053 gridSizer.Add(item = use, flag = wx.ALIGN_CENTER_VERTICAL,
1061 self.
win[
'volume'][code][
'map'] = map.GetId() - 1
1063 gridSizer.Add(item = map, flag = wx.ALIGN_CENTER_VERTICAL,
1069 value = csel.ColourSelect(panel, id = wx.ID_ANY,
1071 size = globalvar.DIALOG_COLOR_SIZE)
1073 elif code ==
'mask':
1080 value = wx.SpinCtrl(parent = panel, id = wx.ID_ANY, size = size,
1083 value.SetRange(minVal = -1e9, maxVal = 1e9)
1084 elif code
in (
'shine',
'transp',
'emit'):
1085 value.SetRange(minVal = 0, maxVal = 255)
1087 value.SetRange(minVal = 0, maxVal = 100)
1092 self.
win[
'volume'][code][
'const'] = value.GetId()
1094 gridSizer.Add(item = value, flag = wx.ALIGN_CENTER_VERTICAL,
1098 gridSizer.Add(item = value, flag = wx.ALIGN_CENTER_VERTICAL,
1101 self.
win[
'volume'][code][
'const'] =
None
1109 boxSizer.Add(item = gridSizer, proportion = 1,
1110 flag = wx.ALL | wx.EXPAND, border = 3)
1111 pageSizer.Add(item = boxSizer, proportion = 0,
1112 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1115 panel.SetSizer(pageSizer)
1119 def _createLightPage(self):
1120 """!Create light page"""
1121 panel = SP.ScrolledPanel(parent = self, id = wx.ID_ANY)
1122 panel.SetupScrolling(scroll_x =
False)
1124 self.
page[
'light'] = {
'id' : 0,
1125 'notebook' : self.notebookAppearance.GetId() }
1126 self.
win[
'light'] = {}
1128 pageSizer = wx.BoxSizer(wx.VERTICAL)
1130 show = wx.CheckBox(parent = panel, id = wx.ID_ANY,
1131 label = _(
"Show light model"))
1133 pageSizer.Add(item = show, proportion = 0,
1134 flag = wx.ALL, border = 3)
1135 surface = wx.CheckBox(parent = panel, id = wx.ID_ANY,
1136 label = _(
"Follow source viewpoint"))
1137 pageSizer.Add(item = surface, proportion = 0,
1138 flag = wx.ALL, border = 3)
1141 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
1142 label =
" %s " % (_(
"Light source position")))
1143 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
1145 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
1146 posSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
1147 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"W")),
1148 pos = (1, 0), flag = wx.ALIGN_CENTER)
1149 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"N")),
1150 pos = (0, 1), flag = wx.ALIGN_CENTER | wx.ALIGN_BOTTOM)
1153 self.
win[
'light'][
'position'] = pos.GetId()
1154 posSizer.Add(item = pos,
1155 pos = (1, 1), flag = wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL)
1156 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"S")),
1157 pos = (2, 1), flag = wx.ALIGN_CENTER | wx.ALIGN_TOP)
1158 posSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"E")),
1159 pos = (1, 2), flag = wx.ALIGN_CENTER)
1160 gridSizer.Add(item = posSizer, pos = (0, 0))
1163 self.
_createControl(panel, data = self.
win[
'light'], name =
'z', sliderHor =
False,
1167 heightSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
1168 heightSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Height:")),
1169 pos = (0, 0), flag = wx.ALIGN_LEFT, span = (1, 2))
1170 heightSizer.Add(item = self.FindWindowById(self.
win[
'light'][
'z'][
'slider']),
1171 flag = wx.ALIGN_RIGHT, pos = (1, 0))
1172 heightSizer.Add(item = self.FindWindowById(self.
win[
'light'][
'z'][
'spin']),
1173 flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT | wx.TOP |
1174 wx.BOTTOM | wx.RIGHT, pos = (1, 1))
1176 gridSizer.Add(item = heightSizer, pos = (0, 1), flag = wx.ALIGN_RIGHT)
1178 boxSizer.Add(item = gridSizer, proportion = 1,
1179 flag = wx.ALL | wx.EXPAND, border = 2)
1180 pageSizer.Add(item = boxSizer, proportion = 0,
1181 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1185 box = wx.StaticBox (parent = panel, id = wx.ID_ANY,
1186 label =
" %s " % (_(
"Light color and intensity")))
1187 boxSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
1188 gridSizer = wx.GridBagSizer(vgap = 3, hgap = 3)
1190 gridSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Color:")),
1191 pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
1192 color = csel.ColourSelect(panel, id = wx.ID_ANY,
1193 colour = UserSettings.Get(group =
'nviz', key =
'light',
1195 size = globalvar.DIALOG_COLOR_SIZE)
1196 self.
win[
'light'][
'color'] = color.GetId()
1198 gridSizer.Add(item = color, pos = (0, 2))
1200 gridSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Brightness:")),
1201 pos = (1, 0), flag = wx.ALIGN_CENTER_VERTICAL)
1202 self.
_createControl(panel, data = self.
win[
'light'], name =
'bright', size = 300,
1205 gridSizer.Add(item = self.FindWindowById(self.
win[
'light'][
'bright'][
'slider']),
1206 pos = (1, 1), flag = wx.ALIGN_CENTER_VERTICAL)
1207 gridSizer.Add(item = self.FindWindowById(self.
win[
'light'][
'bright'][
'spin']),
1209 flag = wx.ALIGN_CENTER)
1210 gridSizer.Add(item = wx.StaticText(panel, id = wx.ID_ANY, label = _(
"Ambient:")),
1211 pos = (2, 0), flag = wx.ALIGN_CENTER_VERTICAL)
1212 self.
_createControl(panel, data = self.
win[
'light'], name =
'ambient', size = 300,
1215 gridSizer.Add(item = self.FindWindowById(self.
win[
'light'][
'ambient'][
'slider']),
1216 pos = (2, 1), flag = wx.ALIGN_CENTER_VERTICAL)
1217 gridSizer.Add(item = self.FindWindowById(self.
win[
'light'][
'ambient'][
'spin']),
1219 flag = wx.ALIGN_CENTER)
1221 boxSizer.Add(item = gridSizer, proportion = 1,
1222 flag = wx.ALL | wx.EXPAND, border = 2)
1223 pageSizer.Add(item = boxSizer, proportion = 0,
1224 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1240 panel.SetSizer(pageSizer)
1244 def _createFringePage(self):
1245 """!Create fringe page"""
1246 panel = SP.ScrolledPanel(parent = self, id = wx.ID_ANY)
1247 panel.SetupScrolling(scroll_x =
False)
1249 self.
page[
'fringe'] = {
'id' : 1,
1250 'notebook' : self.notebookAppearance.GetId() }
1251 self.
win[
'fringe'] = {}
1253 pageSizer = wx.BoxSizer(wx.VERTICAL)
1256 rbox = wx.StaticBox (parent = panel, id = wx.ID_ANY,
1257 label =
" %s " % (_(
"Surface")))
1258 rboxSizer = wx.StaticBoxSizer(rbox, wx.VERTICAL)
1261 rmaps.GetChildren()[0].Bind(wx.EVT_TEXT, self.
OnSetSurface)
1262 self.
win[
'fringe'][
'map'] = rmaps.GetId()
1263 rboxSizer.Add(item = rmaps, proportion = 0,
1266 pageSizer.Add(item = rboxSizer, proportion = 0,
1267 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1270 ebox = wx.StaticBox (parent = panel, id = wx.ID_ANY,
1271 label =
" %s " % (_(
"Edges with fringe")))
1272 eboxSizer = wx.StaticBoxSizer(ebox, wx.HORIZONTAL)
1273 for edge
in [(_(
"N && W"),
"nw"),
1274 (_(
"N && E"),
"ne"),
1275 (_(
"S && W"),
"sw"),
1276 (_(
"S && E"),
"se")]:
1277 chkbox = wx.CheckBox(parent = panel,
1280 self.
win[
'fringe'][edge[1]] = chkbox.GetId()
1281 eboxSizer.Add(item = chkbox, proportion = 0,
1282 flag = wx.ADJUST_MINSIZE | wx.LEFT | wx.RIGHT, border = 5)
1283 chkbox.Bind(wx.EVT_CHECKBOX, self.
OnFringe)
1285 pageSizer.Add(item = eboxSizer, proportion = 0,
1286 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1289 sbox = wx.StaticBox (parent = panel, id = wx.ID_ANY,
1290 label =
" %s " % (_(
"Settings")))
1291 sboxSizer = wx.StaticBoxSizer(sbox, wx.HORIZONTAL)
1292 gridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
1295 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
1296 label = _(
"Elevation of fringe from bottom:")),
1298 flag = wx.ALIGN_CENTER_VERTICAL)
1299 spin = wx.SpinCtrl(parent = panel, id = wx.ID_ANY,
1300 size = (65, -1), min = -1e6, max = 1e6)
1301 spin.SetValue(UserSettings.Get(group =
'nviz', key =
'fringe', subkey =
'elev'))
1302 spin.Bind(wx.EVT_SPINCTRL, self.
OnFringe)
1303 self.
win[
'fringe'][
'elev'] = spin.GetId()
1304 gridSizer.Add(item = spin, pos = (0, 1))
1307 gridSizer.Add(item = wx.StaticText(parent = panel, id = wx.ID_ANY,
1308 label = _(
"Color:")),
1310 flag = wx.ALIGN_CENTER_VERTICAL)
1311 color = csel.ColourSelect(parent = panel, id = wx.ID_ANY,
1312 size = globalvar.DIALOG_COLOR_SIZE)
1313 color.SetColour(UserSettings.Get(group =
'nviz', key =
'fringe',
1315 color.Bind(csel.EVT_COLOURSELECT, self.
OnFringe)
1316 self.
win[
'fringe'][
'color'] = color.GetId()
1317 gridSizer.Add(item = color, pos = (1, 1))
1319 sboxSizer.Add(item = gridSizer, proportion = 1,
1320 flag = wx.ALL | wx.EXPAND, border = 3)
1321 pageSizer.Add(item = sboxSizer, proportion = 0,
1322 flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM,
1325 panel.SetSizer(pageSizer)
1330 """!Get nviz data"""
1331 name = self.FindWindowById(self.
win[nvizType][
'map']).GetValue()
1333 if nvizType ==
'surface' or nvizType ==
'fringe':
1334 return self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1335 elif nvizType ==
'vector':
1336 return self.mapWindow.GetLayerByName(name, mapType =
'vector', dataType =
'nviz')
1337 elif nvizType ==
'volume':
1338 return self.mapWindow.GetLayerByName(name, mapType =
'3d-raster', dataType =
'nviz')
1343 """!Show/hide fringe"""
1344 enabled = event.IsChecked()
1345 win = self.FindWindowById(event.GetId())
1349 sid = data[
'object'][
'id']
1350 elev = self.FindWindowById(self.
win[
'fringe'][
'elev']).GetValue()
1351 color = self.FindWindowById(self.
win[
'fringe'][
'color']).GetValue()
1353 self._display.SetFringe(sid, color, elev,
1354 self.FindWindowById(self.
win[
'fringe'][
'nw']).IsChecked(),
1355 self.FindWindowById(self.
win[
'fringe'][
'ne']).IsChecked(),
1356 self.FindWindowById(self.
win[
'fringe'][
'sw']).IsChecked(),
1357 self.FindWindowById(self.
win[
'fringe'][
'se']).IsChecked())
1358 self.mapWindow.Refresh(
False)
1361 """!Generic scrolling handler"""
1365 data[winName] = event.GetInt()
1366 for w
in win[winName].itervalues():
1367 self.FindWindowById(w).SetValue(data[winName])
1371 def _createControl(self, parent, data, name, range, bind = (
None,
None,
None),
1372 sliderHor =
True, size = 200):
1373 """!Add control (Slider + SpinCtrl)"""
1376 style = wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | \
1380 style = wx.SL_VERTICAL | wx.SL_AUTOTICKS | \
1384 slider = wx.Slider(parent = parent, id = wx.ID_ANY,
1385 minValue = range[0],
1386 maxValue = range[1],
1389 slider.SetName(
'slider')
1391 slider.Bind(wx.EVT_SCROLL, bind[0])
1395 slider.Bind(wx.EVT_SCROLL_CHANGED, bind[1])
1396 data[name][
'slider'] = slider.GetId()
1398 spin = wx.SpinCtrl(parent = parent, id = wx.ID_ANY, size = (65, -1),
1403 spin.SetName(
'spin')
1405 spin.Bind(wx.EVT_SPINCTRL, bind[2])
1407 data[name][
'spin'] = spin.GetId()
1409 def __GetWindowName(self, data, id):
1410 for name
in data.iterkeys():
1412 for win
in data[name].itervalues():
1416 if data[name] == id:
1422 """!Update view from settings values
1423 stored in self.mapWindow.view dictionary"""
1424 for control
in (
'height',
1428 for win
in self.
win[
'view'][control].itervalues():
1429 if control ==
'height':
1430 value = UserSettings.Get(group =
'nviz', key =
'view',
1431 subkey = [
'height',
'value'], internal =
True)
1434 value = self.mapWindow.view[control][
'value']
1438 self.FindWindowById(win).SetValue(value)
1440 viewWin = self.FindWindowById(self.
win[
'view'][
'position'])
1441 x, y = viewWin.UpdatePos(self.mapWindow.view[
'position'][
'x'],
1442 self.mapWindow.view[
'position'][
'y'])
1443 viewWin.Draw(pos = (x, y), scale =
True)
1444 viewWin.Refresh(
False)
1450 self.mapWindow.Refresh(eraseBackground =
False)
1451 self.mapWindow.render[
'quick'] =
False
1452 self.mapWindow.Refresh(
False)
1455 """!Show light model"""
1456 self._display.showLight = event.IsChecked()
1457 self._display.DrawLightingModel()
1460 """!Position of the light changed"""
1465 val = event.GetInt()
1466 self.mapWindow.light[
'position'][
'z'] = val
1467 for win
in self.
win[
'light'][winName].itervalues():
1468 self.FindWindowById(win).SetValue(val)
1470 event = wxUpdateLight()
1476 """!Color of the light changed"""
1477 self.mapWindow.light[
'color'] = event.GetValue()
1479 event = wxUpdateLight()
1485 """!Light brightness changed"""
1486 data = self.mapWindow.light
1489 event = wxUpdateLight()
1495 """!Background color changed"""
1496 color = event.GetValue()
1497 self.mapWindow.view[
'background'][
'color'] = event.GetValue()
1498 color = str(color[0]) +
':' + str(color[1]) +
':' + str(color[2])
1500 self._display.SetBgColor(str(color))
1502 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1503 self.mapWindow.Refresh(
False)
1506 """!Surface selected, currently used for fringes"""
1507 name = event.GetString()
1509 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')[
'surface']
1514 layer = self.mapWindow.GetLayerByName(name, mapType =
'raster')
1518 """!Raster map selected, update surface page"""
1519 name = event.GetString()
1521 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')[
'surface']
1526 layer = self.mapWindow.GetLayerByName(name, mapType =
'raster')
1531 """!Vector map selected, update properties page"""
1532 name = event.GetString()
1534 data = self.mapWindow.GetLayerByName(name, mapType =
'vector', dataType =
'nviz')[
'vector']
1539 layer = self.mapWindow.GetLayerByName(name, mapType =
'vector')
1544 """!3D Raster map selected, update surface page"""
1545 name = event.GetString()
1547 data = self.mapWindow.GetLayerByName(name, mapType =
'3d-raster', dataType =
'nviz')[
'volume']
1552 layer = self.mapWindow.GetLayerByName(name, mapType =
'3d-raster')
1557 """!Change view, render in quick mode"""
1563 if winName ==
'height':
1564 view = self.mapWindow.iview
1566 view = self.mapWindow.view
1568 if winName ==
'z-exag' and event.GetInt() >= 0:
1573 view[winName][
'value'] = event.GetInt()
1575 for win
in self.
win[
'view'][winName].itervalues():
1576 self.FindWindowById(win).SetValue(view[winName][
'value'])
1578 self.mapWindow.render[
'quick'] =
True
1579 self.mapWindow.Refresh(
False)
1584 """!View changed, render in full resolution"""
1585 self.mapWindow.render[
'quick'] =
False
1586 self.mapWindow.Refresh(
False)
1591 """!View changed, render in full resolution"""
1592 self.mapWindow.render[
'quick'] =
False
1600 """!Reset to default view (view page)"""
1601 self.mapWindow.ResetView()
1603 self.mapWindow.Refresh(
False)
1606 """!Look at (view page)"""
1607 sel = event.GetSelection()
1609 self.mapWindow.view[
'position'][
'x'] = 0.5
1610 self.mapWindow.view[
'position'][
'y'] = 0.5
1612 self.mapWindow.view[
'position'][
'x'] = 0.5
1613 self.mapWindow.view[
'position'][
'y'] = 0.0
1615 self.mapWindow.view[
'position'][
'x'] = 0.5
1616 self.mapWindow.view[
'position'][
'y'] = 1.0
1618 self.mapWindow.view[
'position'][
'x'] = 1.0
1619 self.mapWindow.view[
'position'][
'y'] = 0.5
1621 self.mapWindow.view[
'position'][
'x'] = 0.0
1622 self.mapWindow.view[
'position'][
'y'] = 0.5
1624 self.mapWindow.view[
'position'][
'x'] = 0.0
1625 self.mapWindow.view[
'position'][
'y'] = 0.0
1627 self.mapWindow.view[
'position'][
'x'] = 1.0
1628 self.mapWindow.view[
'position'][
'y'] = 0.0
1630 self.mapWindow.view[
'position'][
'x'] = 1.0
1631 self.mapWindow.view[
'position'][
'y'] = 1.0
1633 self.mapWindow.view[
'position'][
'x'] = 0.0
1634 self.mapWindow.view[
'position'][
'y'] = 1.0
1639 self.mapWindow.render[
'quick'] =
False
1640 self.mapWindow.Refresh(
False)
1643 """!Close button pressed
1650 """!Set surface attribute -- use -- map/constant"""
1651 if not self.mapWindow.init:
1662 nvizType =
'surface'
1664 selection = event.GetSelection()
1665 if self.
win[nvizType][attrb][
'required']:
1670 elif selection == 1:
1672 value = self.FindWindowById(self.
win[nvizType][attrb][
'map']).GetValue()
1673 elif selection == 2:
1675 if attrb ==
'color':
1676 value = self.FindWindowById(self.
win[nvizType][attrb][
'const']).GetColour()
1679 value = self.FindWindowById(self.
win[nvizType][attrb][
'const']).GetValue()
1682 attrb = attrb, map = useMap)
1684 name = self.FindWindowById(self.
win[nvizType][
'map']).GetValue()
1685 if nvizType ==
'surface':
1686 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1687 data[nvizType][
'attribute'][attrb] = {
'map' : useMap,
1688 'value' : str(value),
1691 data = self.mapWindow.GetLayerByName(name, mapType =
'3d-raster', dataType =
'nviz')
1692 list = self.FindWindowById(self.
win[
'volume'][
'isosurfs'])
1693 id = list.GetSelection()
1694 data[nvizType][
'isosurface'][id][attrb] = {
'map' : useMap,
1695 'value' : str(value),
1699 event = wxUpdateProperties(data = data)
1702 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1703 self.mapWindow.Refresh(
False)
1706 """!Enable/disable all widgets on page"""
1707 for key, item
in self.
win[name].iteritems():
1708 if key ==
'map' or key ==
'surface':
1710 if type(item) == types.DictType:
1711 for sitem
in self.
win[name][key].itervalues():
1712 if type(sitem) == types.IntType:
1713 self.FindWindowById(sitem).Enable(enabled)
1715 if type(item) == types.IntType:
1716 self.FindWindowById(item).Enable(enabled)
1719 """!Update dialog widgets when attribute type changed"""
1720 if attrb
in (
'topo',
'color',
'shine'):
1728 self.FindWindowById(self.
win[nvizType][attrb][
'map'] + 1).Enable(
True)
1729 if self.
win[nvizType][attrb][
'const']:
1730 self.FindWindowById(self.
win[nvizType][attrb][
'const']).Enable(
False)
1731 self.FindWindowById(self.
win[nvizType][attrb][
'use']).SetSelection(1 + incSel)
1733 self.FindWindowById(self.
win[nvizType][attrb][
'map'] + 1).Enable(
False)
1734 if self.
win[nvizType][attrb][
'const']:
1735 self.FindWindowById(self.
win[nvizType][attrb][
'const']).Enable(
True)
1736 self.FindWindowById(self.
win[nvizType][attrb][
'use']).SetSelection(2 + incSel)
1738 self.FindWindowById(self.
win[nvizType][attrb][
'map'] + 1).Enable(
False)
1739 if self.
win[nvizType][attrb][
'const']:
1740 self.FindWindowById(self.
win[nvizType][attrb][
'const']).Enable(
False)
1741 self.FindWindowById(self.
win[nvizType][attrb][
'use']).SetSelection(0)
1744 """!Set surface attribute"""
1748 """!Set map object (surface/isosurface) attribute (map/constant)"""
1749 if not self.mapWindow.init:
1756 if nvizType ==
'volume' and attrb ==
'topo':
1759 selection = self.FindWindowById(self.
win[nvizType][attrb][
'use']).GetSelection()
1760 if self.
win[nvizType][attrb][
'required']:
1766 elif selection == 1:
1767 value = self.FindWindowById(self.
win[nvizType][attrb][
'map']).GetValue()
1770 if attrb ==
'color':
1771 value = self.FindWindowById(self.
win[nvizType][attrb][
'const']).GetColour()
1775 value = self.FindWindowById(self.
win[nvizType][attrb][
'const']).GetValue()
1779 name = self.FindWindowById(self.
win[nvizType][
'map']).GetValue()
1780 if nvizType ==
'surface':
1781 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1782 data[nvizType][
'attribute'][attrb] = {
'map' : useMap,
1783 'value' : str(value),
1786 data = self.mapWindow.GetLayerByName(name, mapType =
'3d-raster', dataType =
'nviz')
1787 list = self.FindWindowById(self.
win[
'volume'][
'isosurfs'])
1788 id = list.GetSelection()
1790 data[nvizType][
'isosurface'][id][attrb] = {
'map' : useMap,
1791 'value' : str(value),
1795 event = wxUpdateProperties(data = data)
1798 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1799 self.mapWindow.Refresh(
False)
1802 """!Draw resolution changed"""
1805 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1806 self.mapWindow.Refresh(
False)
1809 """!Set draw resolution"""
1810 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1811 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):
1869 data = self.mapWindow.GetLayerByName(name, mapType =
'raster', dataType =
'nviz')
1873 data[
'surface'][
'draw'][
'all'] =
True
1874 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1877 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1880 data[
'surface'][
'draw'][
'wire-color'] = {
'value' : cvalue,
1814 data[
'surface'][
'draw'][
'resolution'] = {
'coarse' : coarse,
1819 event = wxUpdateProperties(data = data)
1823 """!Set draw mode"""
1824 mode = self.FindWindowById(self.
win[
'surface'][
'draw'][
'mode']).GetSelection()
1826 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1827 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
False)
1829 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
False)
1830 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1832 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).Enable(
True)
1833 self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).Enable(
True)
1835 style = self.FindWindowById(self.
win[
'surface'][
'draw'][
'style']).GetSelection()
1837 shade = self.FindWindowById(self.
win[
'surface'][
'draw'][
'shading']).GetSelection()
1839 value, desc = self.mapWindow.nvizDefault.GetDrawMode(mode, style, shade)
1844 """!Set draw mode"""
1848 data[
'surface'][
'draw'][
'mode'] = {
'value' : value,
1853 event = wxUpdateProperties(data = data)
1856 if self.mapDisplay.statusbarWin[
'render'].IsChecked():
1857 self.mapWindow.Refresh(
False)
1860 """!Set draw mode (including wire color) for all loaded surfaces"""
1862 coarse = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-coarse']).GetValue()
1863 fine = self.FindWindowById(self.
win[
'surface'][
'draw'][
'res-fine']).GetValue()
1864 color = self.FindWindowById(self.
win[
'surface'][
'draw'][
'wire-color']).GetColour()
1867 for name
in self.mapWindow.GetLayerNames(type =
'raster'):