GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Base class for map display window. More...
Public Member Functions | |
def | __init__ |
def | SetProperty |
Sets property. More... | |
def | GetProperty |
Returns property. More... | |
def | HasProperty |
Checks whether object has property. More... | |
def | GetPPM |
Get pixel per meter. More... | |
def | SetMapScale |
Set current map scale. More... | |
def | GetMapScale |
Get current map scale. More... | |
def | GetProgressBar |
Returns progress bar. More... | |
def | GetMap |
Returns current Map instance. More... | |
def | GetWindow |
Get map window. More... | |
def | GetMapToolbar |
Returns toolbar with zooming tools. More... | |
def | GetToolbar |
Returns toolbar if exists else None. More... | |
def | StatusbarUpdate |
Update statusbar content. More... | |
def | IsAutoRendered |
Check if auto-rendering is enabled. More... | |
def | CoordinatesChanged |
Shows current coordinates on statusbar. More... | |
def | StatusbarReposition |
Reposition items in statusbar. More... | |
def | StatusbarEnableLongHelp |
Enable/disable toolbars long help. More... | |
def | IsStandalone |
Check if Map display is standalone. More... | |
def | OnRender |
Re-render map composition (each map layer) More... | |
def | OnDraw |
Re-display current map composition. More... | |
def | OnErase |
Erase the canvas. More... | |
def | OnZoomIn |
Zoom in the map. More... | |
def | OnZoomOut |
Zoom out the map. More... | |
def | OnPointer |
Sets mouse mode to pointer. More... | |
def | OnPan |
Panning, set mouse to drag. More... | |
def | OnZoomBack |
Zoom last (previously stored position) More... | |
def | OnZoomToMap |
Set display extents to match selected raster (including NULLs) or vector map. More... | |
def | OnZoomToWind |
Set display geometry to match computational region settings (set with g.region) More... | |
def | OnZoomToDefault |
Set display geometry to match default region settings. More... | |
Data Fields | |
Map | |
parent | |
cursors | |
iconsize | |
toolbars | |
height | |
Base class for map display window.
Derived class must use statusbarManager or override GetProperty, SetProperty and HasProperty methods. If derived class enables and disables auto-rendering, it should override IsAutoRendered method.
Definition at line 28 of file mapdisp.py.
def mapdisp.MapFrameBase.__init__ | ( | self, | |
parent = None , |
|||
id = wx.ID_ANY , |
|||
title = None , |
|||
style = wx.DEFAULT_FRAME_STYLE , |
|||
toolbars = None , |
|||
Map = None , |
|||
auimgr = None , |
|||
name = None , |
|||
kwargs | |||
) |
toolbars | array of activated toolbars, e.g. ['map', 'digit'] |
Map | instance of render.Map |
auimgs | AUI manager |
name | frame name |
kwargs | wx.Frame attributes |
Definition at line 38 of file mapdisp.py.
def mapdisp.MapFrameBase.CoordinatesChanged | ( | self | ) |
Shows current coordinates on statusbar.
Used in BufferedWindow to report change of map coordinates (under mouse cursor).
Definition at line 221 of file mapdisp.py.
def mapdisp.MapFrameBase.GetMap | ( | self | ) |
Returns current Map instance.
Definition at line 190 of file mapdisp.py.
References mapdisp.MapFrameBase.Map, mapdisplay.MapFrame.Map, manager.GCPWizard.Map, and manager.GCP.Map.
Referenced by frame.MapFrame.RemoveQueryLayer().
def mapdisp.MapFrameBase.GetMapScale | ( | self, | |
map = None |
|||
) |
Get current map scale.
map | Map instance (if none self.Map is used) |
Definition at line 157 of file mapdisp.py.
References mapdisp.MapFrameBase.GetPPM(), mapdisp.MapFrameBase.Map, mapdisplay.MapFrame.Map, manager.GCPWizard.Map, and manager.GCP.Map.
def mapdisp.MapFrameBase.GetMapToolbar | ( | self | ) |
Returns toolbar with zooming tools.
Definition at line 199 of file mapdisp.py.
Referenced by manager.GCP.OnDispResize(), mapdisp.MapFrameBase.OnPan(), frame.MapFrame.OnPointer(), frame.MapFrame.OnQuery(), frame.MapFrame.OnRotate(), mapdisp.MapFrameBase.OnZoomIn(), mapdisp.MapFrameBase.OnZoomOut(), and manager.GCP.UpdateActive().
def mapdisp.MapFrameBase.GetPPM | ( | self | ) |
Get pixel per meter.
now computed every time, is it necessary?
enable user to specify ppm (and store it in UserSettings)
Definition at line 106 of file mapdisp.py.
Referenced by mapdisp.MapFrameBase.GetMapScale(), and mapdisp.MapFrameBase.SetMapScale().
def mapdisp.MapFrameBase.GetProgressBar | ( | self | ) |
Returns progress bar.
Progress bar can be used by other classes.
Definition at line 183 of file mapdisp.py.
Referenced by mapdisplay.MapFrame.OnUpdateProgress(), and frame.MapFrame.OnUpdateProgress().
def mapdisp.MapFrameBase.GetProperty | ( | self, | |
name | |||
) |
Returns property.
Definition at line 98 of file mapdisp.py.
Referenced by mapdisp.MapFrameBase.IsAutoRendered().
def mapdisp.MapFrameBase.GetToolbar | ( | self, | |
name | |||
) |
Returns toolbar if exists else None.
Toolbars dictionary contains currently used toolbars only.
Definition at line 203 of file mapdisp.py.
References mapdisp.MapFrameBase.toolbars.
Referenced by frame.MapFrame.OnCloseWindow(), frame.MapFrame.OnPointer(), and frame.MapFrame.OnRender().
def mapdisp.MapFrameBase.GetWindow | ( | self | ) |
Get map window.
Definition at line 195 of file mapdisp.py.
References mapdisplay.MapFrame.MapWindow, frame.MapFrame.MapWindow, and manager.GCP.MapWindow.
Referenced by mapdisp.MapFrameBase.OnPan(), mapdisp.MapFrameBase.OnZoomIn(), mapdisp.MapFrameBase.OnZoomOut(), mapdisp.MapFrameBase.SetMapScale(), dialogs.TCValidator.Validate(), widgets.BaseValidator.Validate(), and widgets.GenericValidator.Validate().
def mapdisp.MapFrameBase.HasProperty | ( | self, | |
name | |||
) |
Checks whether object has property.
Definition at line 102 of file mapdisp.py.
def mapdisp.MapFrameBase.IsAutoRendered | ( | self | ) |
Check if auto-rendering is enabled.
Definition at line 217 of file mapdisp.py.
References mapdisp.MapFrameBase.GetProperty().
Referenced by frame.MapFrame.QueryVector().
def mapdisp.MapFrameBase.IsStandalone | ( | self | ) |
Check if Map display is standalone.
Definition at line 237 of file mapdisp.py.
Referenced by frame.MapFrame.OnQuery().
def mapdisp.MapFrameBase.OnDraw | ( | self, | |
event | |||
) |
Re-display current map composition.
Definition at line 246 of file mapdisp.py.
def mapdisp.MapFrameBase.OnErase | ( | self, | |
event | |||
) |
Erase the canvas.
Definition at line 251 of file mapdisp.py.
def mapdisp.MapFrameBase.OnPan | ( | self, | |
event | |||
) |
Panning, set mouse to drag.
Definition at line 300 of file mapdisp.py.
References mapdisp.MapFrameBase._preparePan(), mapdisp.MapFrameBase._switchTool(), mapdisp.MapFrameBase.cursors, frame.ModelFrame.cursors, mapdisp.MapFrameBase.GetMapToolbar(), mapdisplay.MapFrame.GetMapToolbar(), mapdisp.MapFrameBase.GetWindow(), and render.Map.GetWindow().
def mapdisp.MapFrameBase.OnPointer | ( | self, | |
event | |||
) |
Sets mouse mode to pointer.
Definition at line 296 of file mapdisp.py.
def mapdisp.MapFrameBase.OnRender | ( | self, | |
event | |||
) |
Re-render map composition (each map layer)
Definition at line 241 of file mapdisp.py.
def mapdisp.MapFrameBase.OnZoomBack | ( | self, | |
event | |||
) |
Zoom last (previously stored position)
Definition at line 321 of file mapdisp.py.
def mapdisp.MapFrameBase.OnZoomIn | ( | self, | |
event | |||
) |
Zoom in the map.
Set mouse cursor, zoombox attributes, and zoom direction
Definition at line 256 of file mapdisp.py.
References mapdisp.MapFrameBase._prepareZoom(), mapdisp.MapFrameBase._switchTool(), mapdisp.MapFrameBase.GetMapToolbar(), mapdisplay.MapFrame.GetMapToolbar(), mapdisp.MapFrameBase.GetWindow(), and render.Map.GetWindow().
def mapdisp.MapFrameBase.OnZoomOut | ( | self, | |
event | |||
) |
Zoom out the map.
Set mouse cursor, zoombox attributes, and zoom direction
Definition at line 266 of file mapdisp.py.
References mapdisp.MapFrameBase._prepareZoom(), mapdisp.MapFrameBase._switchTool(), mapdisp.MapFrameBase.cursors, frame.ModelFrame.cursors, mapdisp.MapFrameBase.GetMapToolbar(), mapdisplay.MapFrame.GetMapToolbar(), mapdisp.MapFrameBase.GetWindow(), and render.Map.GetWindow().
def mapdisp.MapFrameBase.OnZoomToDefault | ( | self, | |
event | |||
) |
Set display geometry to match default region settings.
Definition at line 339 of file mapdisp.py.
Referenced by mapdisplay.MapFrame.OnZoomMenu(), and frame.MapFrame.OnZoomMenu().
def mapdisp.MapFrameBase.OnZoomToMap | ( | self, | |
event | |||
) |
Set display extents to match selected raster (including NULLs) or vector map.
Definition at line 326 of file mapdisp.py.
def mapdisp.MapFrameBase.OnZoomToWind | ( | self, | |
event | |||
) |
Set display geometry to match computational region settings (set with g.region)
Definition at line 333 of file mapdisp.py.
Referenced by mapdisplay.MapFrame.OnZoomMenu(), and frame.MapFrame.OnZoomMenu().
def mapdisp.MapFrameBase.SetMapScale | ( | self, | |
value, | |||
map = None |
|||
) |
Set current map scale.
value | scale value (n if scale is 1:n) |
map | Map instance (if none self.Map is used) |
Definition at line 136 of file mapdisp.py.
References mapdisp.MapFrameBase.GetPPM(), mapdisp.MapFrameBase.GetWindow(), render.Map.GetWindow(), mapdisp.MapFrameBase.Map, mapdisplay.MapFrame.Map, manager.GCPWizard.Map, and manager.GCP.Map.
def mapdisp.MapFrameBase.SetProperty | ( | self, | |
name, | |||
value | |||
) |
Sets property.
Definition at line 94 of file mapdisp.py.
Referenced by frame.MapFrame.SetProperties().
def mapdisp.MapFrameBase.StatusbarEnableLongHelp | ( | self, | |
enable = True |
|||
) |
Enable/disable toolbars long help.
Definition at line 232 of file mapdisp.py.
def mapdisp.MapFrameBase.StatusbarReposition | ( | self | ) |
Reposition items in statusbar.
Definition at line 228 of file mapdisp.py.
def mapdisp.MapFrameBase.StatusbarUpdate | ( | self | ) |
Update statusbar content.
Definition at line 213 of file mapdisp.py.
Referenced by manager.GCP.AddGCP(), manager.GCP.AdjustMap(), manager.GCP.DeleteGCP(), mapdisplay.MapFrame.OnRender(), frame.MapFrame.OnRender(), frame.MapFrame.SetProperties(), and manager.GCP.UpdateActive().
mapdisp.MapFrameBase.cursors |
Definition at line 54 of file mapdisp.py.
Referenced by frame.MapFrame.AddNviz(), frame.MapFrame.OnFlyThrough(), mapwindow.GLWindow.OnLeftDown(), mapwindow.GLWindow.OnLeftUp(), frame.PsMapBufferedWindow.OnMouseMoving(), mapdisp.MapFrameBase.OnPan(), mapdisplay.MapFrame.OnPan(), frame.PsMapFrame.OnPan(), mapdisplay.MapFrame.OnPointer(), frame.PsMapFrame.OnPointer(), frame.MapFrame.OnPointer(), frame.MapFrame.OnQuery(), frame.MapFrame.OnRotate(), mapdisplay.MapFrame.OnZoomIn(), frame.PsMapFrame.OnZoomIn(), mapdisp.MapFrameBase.OnZoomOut(), mapdisplay.MapFrame.OnZoomOut(), and frame.PsMapFrame.OnZoomOut().
mapdisp.MapFrameBase.height |
Definition at line 87 of file mapdisp.py.
Referenced by wxnviz.Texture.Draw(), utils.Rect2D.GetHeight(), wxnviz.Texture.Load(), wxnviz.Texture.Resize(), wxnviz.Nviz.ResizeWindow(), wxnviz.Nviz.SaveToFile(), and wxnviz.Nviz.Start2D().
mapdisp.MapFrameBase.iconsize |
Definition at line 68 of file mapdisp.py.
Referenced by frame.GMFrame.OnAboutGRASS().
mapdisp.MapFrameBase.Map |
Definition at line 48 of file mapdisp.py.
Referenced by frame.MapFrame.AddNviz(), frame.MapFrame.AddToolbar(), mapdisp.MapFrameBase.GetMap(), layertree.LayerTree.GetMap(), mapdisp.MapFrameBase.GetMapScale(), frame.MapFrame.GetMapWindow(), mapwindow.BufferedWindow.OnMouseEnter(), and mapdisp.MapFrameBase.SetMapScale().
mapdisp.MapFrameBase.parent |
Definition at line 49 of file mapdisp.py.
Referenced by wxdigit.VDigitError.Database(), wxdigit.VDigitError.DbExecute(), wxdigit.VDigitError.DbLink(), wxdigit.VDigitError.DeadLine(), wxdigit.VDigitError.Driver(), wxdigit.VDigitError.FeatureType(), colorrules.RulesPanel.LoadRules(), wxdigit.VDigitError.NoMap(), mapwindow.GLWindow.OnLeftUp(), mapwindow.BufferedWindow.OnLeftUp(), frame.PsMapBufferedWindow.OnLeftUp(), toolbars.VDigitToolbar.OnSelectMap(), toolbars.LMNvizToolbar.OnSettings(), toolbars.VDigitToolbar.OnSettings(), toolbars.BaseToolbar.OnTool(), toolbars.VDigitToolbar.OnZBulk(), wxdigit.VDigitError.ReadLine(), toolbars.VDigitToolbar.StopEditing(), colorrules.VectorColorTable.UpdateColorColumn(), mapwindow.BufferedWindow.UpdateMap(), and wxdigit.VDigitError.WriteLine().
mapdisp.MapFrameBase.toolbars |
Definition at line 73 of file mapdisp.py.
Referenced by frame.MapFrame.AddNviz(), mapdisplay.MapFrame.AddToolbar(), frame.MapFrame.AddToolbar(), mapdisplay.MapFrame.GetMapToolbar(), frame.MapFrame.GetMapToolbar(), frame.MapFrame.GetMapWindow(), mapdisp.MapFrameBase.GetToolbar(), frame.MapFrame.OnCloseWindow(), frame.MapFrame.OnFlyThrough(), mapdisplay.MapFrame.OnPan(), mapdisplay.MapFrame.OnPointer(), frame.MapFrame.OnPointer(), frame.MapFrame.OnQuery(), frame.MapFrame.OnRotate(), mapdisplay.MapFrame.OnZoomIn(), mapdisplay.MapFrame.OnZoomOut(), frame.MapFrame.RemoveNviz(), and frame.MapFrame.RemoveToolbar().