GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Abstract map display window class. More...
Public Member Functions | |
def | __init__ |
def | RegisterMouseEventHandler |
Binds event handler. More... | |
def | UnregisterMouseEventHandler |
Unbinds event handler a restores previous state. More... | |
def | Pixel2Cell |
def | Cell2Pixel |
def | OnMotion |
Tracks mouse motion and update statusbar. More... | |
def | GetLastEN |
Returns last coordinates of mouse cursor. More... | |
def | GetLayerByName |
Get layer from layer tree by nam. More... | |
def | GetSelectedLayer |
Get selected layer from layer tree. More... | |
Data Fields | |
parent | |
Map | |
tree | |
lmgr | |
mouse | |
lastEN | |
Abstract map display window class.
Superclass for BufferedWindow class (2D display mode), and GLWindow (3D display mode).
Subclasses have to define
Definition at line 23 of file gui_core/mapwindow.py.
def mapwindow.MapWindow.__init__ | ( | self, | |
parent, | |||
id = wx.ID_ANY , |
|||
Map = None , |
|||
tree = None , |
|||
lmgr = None , |
|||
kwargs | |||
) |
Definition at line 36 of file gui_core/mapwindow.py.
def mapwindow.MapWindow.Cell2Pixel | ( | self, | |
east, | |||
north | |||
) |
Definition at line 137 of file gui_core/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DrawLines(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), and mapwindow.VDigitWindow.OnLeftUpModifyLine().
def mapwindow.MapWindow.GetLastEN | ( | self | ) |
Returns last coordinates of mouse cursor.
Definition at line 162 of file gui_core/mapwindow.py.
References mapwindow.MapWindow.lastEN.
def mapwindow.MapWindow.GetLayerByName | ( | self, | |
name, | |||
mapType, | |||
dataType = 'layer' |
|||
) |
Get layer from layer tree by nam.
name | layer name |
type | 'item' / 'layer' / 'nviz' |
Definition at line 169 of file gui_core/mapwindow.py.
References workspace.ProcessWorkspaceFile.tree, mapwindow.MapWindow.tree, menudata.MenuData.tree, mapdisplay.MapFrame.tree, and model.ProcessModelFile.tree.
def mapwindow.MapWindow.GetSelectedLayer | ( | self, | |
type = 'layer' , |
|||
multi = False |
|||
) |
Get selected layer from layer tree.
type | 'item' / 'layer' / 'nviz' |
multi | return first selected layer or all |
Definition at line 196 of file gui_core/mapwindow.py.
References workspace.ProcessWorkspaceFile.tree, mapwindow.MapWindow.tree, menudata.MenuData.tree, mapdisplay.MapFrame.tree, and model.ProcessModelFile.tree.
Referenced by mapwindow.GLWindow.DoPaint(), mapwindow.GLWindow.LoadRaster3d(), mapwindow.GLWindow.LoadVector(), mapwindow.GLWindow.OnLeftUp(), mapwindow.BufferedWindow.OnLeftUp(), and mapwindow.BufferedWindow.ZoomToMap().
def mapwindow.MapWindow.OnMotion | ( | self, | |
event | |||
) |
Tracks mouse motion and update statusbar.
Definition at line 140 of file gui_core/mapwindow.py.
References mapwindow.VDigitWindow._onMotion(), mapwindow.MapWindow.lastEN, and mapwindow.MapWindow.Pixel2Cell().
Referenced by mapwindow.GLWindow.StopTimer().
def mapwindow.MapWindow.Pixel2Cell | ( | self, | |
x, | |||
y | |||
) |
Definition at line 134 of file gui_core/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Distance(), mapwindow.BufferedWindow.OnLeftDown(), mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownDisplayCA(), mapwindow.VDigitWindow.OnLeftDownEditLine(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), mapwindow.VDigitWindow.OnLeftUpCopyLine(), mapwindow.VDigitWindow.OnLeftUpModifyLine(), mapwindow.VDigitWindow.OnLeftUpVarious(), mapwindow.MapWindow.OnMotion(), and mapwindow.BufferedWindow.Zoom().
def mapwindow.MapWindow.RegisterMouseEventHandler | ( | self, | |
event, | |||
handler, | |||
cursor = None |
|||
) |
Binds event handler.
Call event.Skip() in handler to allow default processing in MapWindow.
event | one of mouse events |
handler | function to handle event |
cursor | cursor which temporary overrides current cursor |
Definition at line 56 of file gui_core/mapwindow.py.
References mapwindow.MapWindow._overriddenCursor, and mapwindow.MapWindow.mouse.
def mapwindow.MapWindow.UnregisterMouseEventHandler | ( | self, | |
event | |||
) |
Unbinds event handler a restores previous state.
You should unbind to restore normal MapWindow behaviour. Note that this operation will unbind any other external (non-MapWindow) handlers.
event | event to unbind |
Definition at line 105 of file gui_core/mapwindow.py.
References mapwindow.BufferedWindow._bindMouseEvents(), mapwindow.GLWindow._bindMouseEvents(), mapwindow.MapWindow._overriddenCursor, and mapwindow.MapWindow.mouse.
mapwindow.MapWindow.lastEN |
Definition at line 51 of file gui_core/mapwindow.py.
Referenced by mapwindow.MapWindow.GetLastEN(), and mapwindow.MapWindow.OnMotion().
mapwindow.MapWindow.lmgr |
Definition at line 40 of file gui_core/mapwindow.py.
Referenced by mapwindow.GLWindow.DoPaint(), mapwindow.GLWindow.DoZoom(), mapwindow.GLWindow.LoadRaster3d(), mapwindow.GLWindow.LoadVector(), toolbars.LMNvizToolbar.OnHelp(), layertree.LayerTree.OnKeyUp(), layertree.LayerTree.OnStopEditing(), and mapwindow.GLWindow.UnloadRaster3d().
mapwindow.MapWindow.Map |
Definition at line 38 of file gui_core/mapwindow.py.
Referenced by frame.MapFrame.AddNviz(), frame.MapFrame.AddToolbar(), layertree.LayerTree.GetMap(), frame.MapFrame.GetMapWindow(), and mapwindow.BufferedWindow.OnMouseEnter().
mapwindow.MapWindow.mouse |
Definition at line 44 of file gui_core/mapwindow.py.
Referenced by frame.PsMapBufferedWindow.ComputeZoom(), mapwindow.GLWindow.DragItem(), mapwindow.GLWindow.FocusPanning(), mapwindow.GLWindow.HorizontalPanning(), mapwindow.BufferedWindow.MouseDraw(), frame.PsMapFrame.OnAddMap(), mapwindow.BufferedWindow.OnButtonDClick(), frame.PsMapBufferedWindow.OnButtonDClick(), mapwindow.GLWindow.OnDClick(), mapwindow.GLWindow.OnDragging(), mapwindow.BufferedWindow.OnDragging(), frame.PsMapBufferedWindow.OnDragging(), mapwindow.GLWindow.OnKeyDown(), mapwindow.GLWindow.OnKeyUp(), mapwindow.GLWindow.OnLeftDown(), mapwindow.BufferedWindow.OnLeftDown(), frame.PsMapBufferedWindow.OnLeftDown(), mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownDisplayCA(), mapwindow.VDigitWindow.OnLeftDownEditLine(), mapwindow.VDigitWindow.OnLeftDownUndo(), mapwindow.GLWindow.OnLeftUp(), mapwindow.BufferedWindow.OnLeftUp(), frame.PsMapBufferedWindow.OnLeftUp(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), mapwindow.VDigitWindow.OnLeftUpCopyLine(), mapwindow.VDigitWindow.OnLeftUpModifyLine(), mapwindow.VDigitWindow.OnLeftUpVarious(), mapwindow.BufferedWindow.OnMiddleDown(), frame.PsMapBufferedWindow.OnMiddleDown(), mapwindow.BufferedWindow.OnMiddleUp(), mapwindow.BufferedWindow.OnMouseMoving(), frame.PsMapBufferedWindow.OnMouseMoving(), frame.PsMapBufferedWindow.OnMouseWheel(), frame.PsMapFrame.OnPan(), frame.PsMapFrame.OnPointer(), mapwindow.BufferedWindow.OnRightDown(), mapwindow.BufferedWindow.OnRightUp(), mapwindow.GLWindow.OnTimerFly(), frame.PsMapFrame.OnZoomIn(), frame.PsMapFrame.OnZoomOut(), mapwindow.MapWindow.RegisterMouseEventHandler(), mapwindow.MapWindow.UnregisterMouseEventHandler(), and mapwindow.BufferedWindow.UpdateMap().
mapwindow.MapWindow.parent |
Definition at line 37 of file gui_core/mapwindow.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().
mapwindow.MapWindow.tree |
Definition at line 39 of file gui_core/mapwindow.py.
Referenced by frame.MapFrame.AddNviz(), mapwindow.MapWindow.GetLayerByName(), frame.MapFrame.GetMapWindow(), mapwindow.MapWindow.GetSelectedLayer(), mapwindow.GLWindow.LoadDataLayers(), mapwindow.GLWindow.UnloadDataLayers(), and mapwindow.BufferedWindow.UpdateMap().