def testMapWindowDistance(self, giface, map_): self.frame = wx.Frame( parent=None, title=_("Map window distance measurement test frame")) panel = wx.Panel(parent=self.frame, id=wx.ID_ANY) sizer = wx.BoxSizer(wx.VERTICAL) mapWindowProperties = MapWindowProperties() mapWindowProperties.setValuesFromUserSettings() mapWindowProperties.showRegion = True width, height = self.frame.GetClientSize() copyOfInitMap(map_, width, height) window = BufferedMapWindow(parent=panel, giface=giface, Map=map_, properties=mapWindowProperties) giface.mapWindow = window sizer.Add(window, proportion=1, flag=wx.EXPAND | wx.ALL, border=5) panel.SetSizer(sizer) panel.Layout() window.ZoomToWind() self._listenToAllMapWindowSignals(window) self.frame.Show() from mapwin.analysis import MeasureDistanceController self.controller = MeasureDistanceController(giface, window) self.controller.Start()
def __init__( self, parent=None, id=wx.ID_ANY, title="", auimgr=None, name="", **kwargs, ): """ .. warning:: Use \a auimgr parameter only if you know what you are doing. :param parent: gui parent :param id: wx id :param title: window title :param toolbars: array of activated toolbars, e.g. ['map', 'digit'] :param auimgr: AUI manager (if \c None, wx.aui.AuiManager is used) :param name: panel name :param kwargs: arguments passed to \c wx.Panel """ self.parent = parent wx.Panel.__init__(self, parent, id, name=name, **kwargs) # toolbars self.toolbars = {} self.iconsize = (16, 16) # properties are shared in other objects, so defining here self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() # update statusbar when user-defined projection changed self.mapWindowProperties.useDefinedProjectionChanged.connect( self.StatusbarUpdate) # # Fancy gui # if auimgr is None: from wx.aui import AuiManager self._mgr = AuiManager(self) else: self._mgr = auimgr # handles switching between tools in different toolbars self._toolSwitcher = ToolSwitcher() self._toolSwitcher.toggleToolChanged.connect(self._onToggleTool) # set accelerator table self.shortcuts_table = [ (self.OnCloseWindow, wx.ACCEL_CTRL, ord("W")), (self.OnRender, wx.ACCEL_CTRL, ord("R")), (self.OnRender, wx.ACCEL_NORMAL, wx.WXK_F5), ] self._initShortcuts()
def testMapWindowApi(self, giface, map_): self.frame = wx.Frame(parent=None, title=_("Map window API test frame")) panel = wx.Panel(parent=self.frame, id=wx.ID_ANY) sizer = wx.BoxSizer(wx.VERTICAL) mapWindowProperties = MapWindowProperties() mapWindowProperties.setValuesFromUserSettings() mapWindowProperties.showRegion = True width, height = self.frame.GetClientSize() copyOfInitMap(map_, width, height) window = BufferedMapWindow(parent=panel, giface=giface, Map=map_, properties=mapWindowProperties) giface.mapWindow = window sizer.Add(window, proportion=1, flag=wx.EXPAND | wx.ALL, border=5) panel.SetSizer(sizer) panel.Layout() window.ZoomToWind() self.frame.Show()
def testMapWindowProfile(self, giface, map_): self.frame = wx.Frame(parent=None, title=_("Map window profile tool test frame")) panel = wx.Panel(parent=self.frame, id=wx.ID_ANY) sizer = wx.BoxSizer(wx.VERTICAL) mapWindowProperties = MapWindowProperties() mapWindowProperties.setValuesFromUserSettings() mapWindowProperties.showRegion = True width, height = self.frame.GetClientSize() copyOfInitMap(map_, width, height) window = BufferedMapWindow(parent=panel, giface=giface, Map=map_, properties=mapWindowProperties) giface.mapWindow = window sizer.Add(window, proportion=1, flag=wx.EXPAND | wx.ALL, border=5) panel.SetSizer(sizer) panel.Layout() window.ZoomToWind() self._listenToAllMapWindowSignals(window) self.frame.Show() from mapwin.analysis import ProfileController self.controller = ProfileController(giface, window) self.controller.Start() rasters = [] for layer in giface.GetLayerList().GetSelectedLayers(): if layer.maplayer.GetType() == "raster": rasters.append(layer.maplayer.GetName()) from wxplot.profile import ProfileFrame profileWindow = ProfileFrame( parent=self.frame, giface=giface, controller=self.controller, units=map_.projinfo["units"], rasterList=rasters, ) profileWindow.CentreOnParent() profileWindow.Show() # Open raster select dialog to make sure that a raster (and # the desired raster) is selected to be profiled profileWindow.OnSelectRaster(None)
def __init__(self, parent=None, giface=None, title=_("GRASS GIS Map Swipe"), name="swipe", **kwargs): DoubleMapFrame.__init__(self, parent=parent, title=title, name=name, firstMap=Map(), secondMap=Map(), **kwargs) Debug.msg(1, "SwipeMapFrame.__init__()") # # Add toolbars # self.AddToolbars() self._giface = giface # # create widgets # self.splitter = MapSplitter(parent=self, id=wx.ID_ANY) self.sliderH = wx.Slider(self, id=wx.ID_ANY, style=wx.SL_HORIZONTAL) self.sliderV = wx.Slider(self, id=wx.ID_ANY, style=wx.SL_VERTICAL) self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() self.mapWindowProperties.autoRenderChanged.connect( self.OnAutoRenderChanged) self.firstMapWindow = SwipeBufferedWindow( parent=self.splitter, giface=self._giface, properties=self.mapWindowProperties, Map=self.firstMap) self.secondMapWindow = SwipeBufferedWindow( parent=self.splitter, giface=self._giface, properties=self.mapWindowProperties, Map=self.secondMap) # bind query signal self.firstMapWindow.mapQueried.connect(self.Query) self.secondMapWindow.mapQueried.connect(self.Query) # bind tracking cursosr to mirror it self.firstMapWindow.Bind( wx.EVT_MOTION, lambda evt: self.TrackCursor(evt)) self.secondMapWindow.Bind( wx.EVT_MOTION, lambda evt: self.TrackCursor(evt)) self.MapWindow = self.firstMapWindow # current by default self.firstMapWindow.zoomhistory = self.secondMapWindow.zoomhistory self.SetBindRegions(True) self._mode = 'swipe' self._addPanes() self._bindWindowsActivation() self._setUpMapWindow(self.firstMapWindow) self._setUpMapWindow(self.secondMapWindow) self._mgr.GetPane('sliderV').Hide() self._mgr.GetPane('sliderH').Show() self.slider = self.sliderH self.InitStatusbar() self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_IDLE, self.OnIdle) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.SetSize((800, 600)) self._mgr.Update() self.rasters = {'first': None, 'second': None} self._inputDialog = None self._preferencesDialog = None self._queryDialog = None # default action in map toolbar self.GetMapToolbar().SelectDefault() self.resize = False wx.CallAfter(self.CallAfterInit)
def __init__(self, parent, samplingType, icon=None, map_=None): wx.Panel.__init__(self, parent=parent) self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() giface = StandaloneGrassInterface() self.samplingtype = samplingType self.parent = parent if map_: self.map_ = map_ else: self.map_ = Map() self.map_.region = self.map_.GetRegion() self._mgr = wx.aui.AuiManager(self) self.mapWindow = BufferedMapWindow(parent=self, giface=giface, Map=self.map_, properties=self.mapWindowProperties) self._mgr.AddPane(self.mapWindow, wx.aui.AuiPaneInfo().CentrePane(). Dockable(True).BestSize((-1, -1)).Name('mapwindow'). CloseButton(False).DestroyOnClose(True). Layer(0)) self._toolSwitcher = ToolSwitcher() self._toolSwitcher.toggleToolChanged.connect(self._onToolChanged) self.toolbar = RLiSetupToolbar(self, self._toolSwitcher) self.catId = 1 self._mgr.AddPane(self.toolbar, wx.aui.AuiPaneInfo(). Name("maptoolbar").Caption(_("Map Toolbar")). ToolbarPane().Left().Name('mapToolbar'). CloseButton(False).Layer(1).Gripper(False). BestSize((self.toolbar.GetBestSize()))) self._mgr.Update() if self.samplingtype == SamplingType.REGIONS: self.afterRegionDrawn = Signal('RLiSetupMapPanel.afterRegionDrawn') self._registeredGraphics = self.mapWindow.RegisterGraphicsToDraw( graphicsType='line') elif self.samplingtype in [SamplingType.MUNITSR, SamplingType.MMVWINR]: self.sampleFrameChanged = Signal( 'RLiSetupMapPanel.sampleFrameChanged') self._registeredGraphics = self.mapWindow.RegisterGraphicsToDraw( graphicsType='rectangle') elif self.samplingtype in [SamplingType.MUNITSC, SamplingType.MMVWINC]: self.afterCircleDrawn = Signal('RLiSetupMapPanel.afterCircleDrawn') self._registeredGraphics = self.mapWindow.RegisterGraphicsToDraw( graphicsType='line') else: self.sampleFrameChanged = Signal( 'RLiSetupMapPanel.sampleFrameChanged') self._registeredGraphics = self.mapWindow.RegisterGraphicsToDraw( graphicsType='rectangle') self._registeredGraphics.AddPen('rlisetup', wx.Pen(wx.GREEN, width=2, style=wx.SOLID)) self._registeredGraphics.AddItem(coords=[[0, 0], [0, 0]], penName='rlisetup', hide=True) if self.samplingtype != SamplingType.VECT: self.toolbar.SelectDefault()
def __init__( self, parent, giface, title=_( "GRASS GIS Manage Location of Tick Points on a Scanned Photo"), toolbars=["gcpdisp"], Map=None, auimgr=None, name='GCPMapWindow', **kwargs): """Main map display window with toolbars, statusbar and DrawWindow :param giface: GRASS interface instance :param title: window title :param toolbars: array of activated toolbars, e.g. ['map', 'digit'] :param map: instance of render.Map :param auimgs: AUI manager :param kwargs: wx.Frame attribures """ SingleMapFrame.__init__(self, parent=parent, giface=giface, title=title, Map=Map, auimgr=auimgr, name=name, **kwargs) self._giface = giface # properties are shared in other objects, so defining here self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() self.mapWindowProperties.alignExtent = True # # Add toolbars # for toolb in toolbars: self.AddToolbar(toolb) self.activemap = self.toolbars['gcpdisp'].togglemap self.activemap.SetSelection(0) self.SrcMap = self.grwiz.SrcMap # instance of render.Map self.TgtMap = self.grwiz.TgtMap # instance of render.Map self._mgr.SetDockSizeConstraint(0.5, 0.5) # # Add statusbar # # items for choice self.statusbarItems = [ sb.SbCoordinates, sb.SbRegionExtent, sb.SbCompRegionExtent, sb.SbShowRegion, sb.SbResolution, sb.SbDisplayGeometry, sb.SbMapScale, sb.SbProjection, sbgcp.SbGoToGCP, sbgcp.SbRMSError ] # create statusbar and its manager statusbar = self.CreateStatusBar(number=4, style=0) statusbar.SetStatusWidths([-5, -2, -1, -1]) self.statusbarManager = sb.SbManager(mapframe=self, statusbar=statusbar) # fill statusbar manager self.statusbarManager.AddStatusbarItemsByClass(self.statusbarItems, mapframe=self, statusbar=statusbar) self.statusbarManager.AddStatusbarItem( sb.SbMask(self, statusbar=statusbar, position=2)) self.statusbarManager.AddStatusbarItem( sb.SbRender(self, statusbar=statusbar, position=3)) self.statusbarManager.SetMode(8) # goto GCP # # Init map display (buffered DC & set default cursor) # self.grwiz.SwitchEnv('source') self.SrcMapWindow = BufferedMapWindow( parent=self, giface=self._giface, id=wx.ID_ANY, properties=self.mapWindowProperties, Map=self.SrcMap) self.grwiz.SwitchEnv('target') self.TgtMapWindow = BufferedMapWindow( parent=self, giface=self._giface, id=wx.ID_ANY, properties=self.mapWindowProperties, Map=self.TgtMap) self.MapWindow = self.SrcMapWindow self.Map = self.SrcMap self._setUpMapWindow(self.SrcMapWindow) self._setUpMapWindow(self.TgtMapWindow) self.SrcMapWindow.SetNamedCursor('cross') self.TgtMapWindow.SetNamedCursor('cross') # used to switch current map (combo box in toolbar) self.SrcMapWindow.mouseEntered.connect( lambda: self._setActiveMapWindow(self.SrcMapWindow)) self.TgtMapWindow.mouseEntered.connect( lambda: self._setActiveMapWindow(self.TgtMapWindow)) # # initialize region values # self._initMap(Map=self.SrcMap) self._initMap(Map=self.TgtMap) self.GetMapToolbar().SelectDefault() # # Bind various events # self.activemap.Bind(wx.EVT_CHOICE, self.OnUpdateActive) self.Bind(wx.EVT_SIZE, self.OnSize) # # Update fancy gui style # # AuiManager wants a CentrePane, workaround to get two equally sized # windows self.list = self.CreateGCPList() #self.SrcMapWindow.SetSize((300, 300)) #self.TgtMapWindow.SetSize((300, 300)) self.list.SetSize((100, 150)) self._mgr.AddPane( self.list, wx.aui.AuiPaneInfo().Name("gcplist").Caption( _("GCP List")).LeftDockable(False).RightDockable( False).PinButton().FloatingSize((600, 200)).CloseButton( False).DestroyOnClose(True).Top().Layer(1).MinSize( (200, 100))) self._mgr.AddPane( self.SrcMapWindow, wx.aui.AuiPaneInfo().Name("source").Caption( _("Source Display")).Dockable(False).CloseButton( False).DestroyOnClose(True).Floatable(False).Centre()) self._mgr.AddPane( self.TgtMapWindow, wx.aui.AuiPaneInfo().Name("target").Caption( _("Target Display")).Dockable(False).CloseButton(False). DestroyOnClose(True).Floatable(False).Right().Layer(0)) srcwidth, srcheight = self.SrcMapWindow.GetSize() tgtwidth, tgtheight = self.TgtMapWindow.GetSize() srcwidth = (srcwidth + tgtwidth) / 2 self._mgr.GetPane("target").Hide() self._mgr.Update() self._mgr.GetPane("source").BestSize((srcwidth, srcheight)) self._mgr.GetPane("target").BestSize((srcwidth, srcheight)) if self.show_target: self._mgr.GetPane("target").Show() else: self.activemap.Enable(False) # needed by Mac OS, does not harm on Linux, breaks display on Windows if platform.system() != 'Windows': self._mgr.Update() # # Init print module and classes # self.printopt = PrintOptions(self, self.MapWindow) # # Initialization of digitization tool # self.digit = None # set active map self.MapWindow = self.SrcMapWindow self.Map = self.SrcMap # do not init zoom history here, that happens when zooming to map(s) # # Re-use dialogs # self.dialogs = {} self.dialogs['attributes'] = None self.dialogs['category'] = None self.dialogs['barscale'] = None self.dialogs['legend'] = None self.decorationDialog = None # decoration/overlays # doing nice things in statusbar when other things are ready self.statusbarManager.Update()
def __init__( self, parent, giface, title=_("Example Tool"), toolbars=["MiscToolbar", "MapToolbar", "MainToolbar"], size=(800, 600), name="exampleWindow", **kwargs, ): """!Map Frame constructor @param parent (no parent is expected) @param title window title @param toolbars list of active toolbars (default value represents all toolbars) @param size default size """ SingleMapFrame.__init__( self, parent=parent, title=title, name=name, Map=Map(), **kwargs ) # Place debug message where appropriate # and set debug level from 1 to 5 (higher to lower level functions). # To enable debug mode write: # > g.gisenv set=WX_DEBUG=5 Debug.msg(1, "ExampleMapFrame.__init__()") # # Add toolbars to aui manager # toolbarsCopy = toolbars[:] # workaround to have the same toolbar order on all platforms if sys.platform == "win32": toolbarsCopy.reverse() for toolbar in toolbarsCopy: self.AddToolbar(toolbar) self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() self.mapWindowProperties.autoRenderChanged.connect( lambda value: self.OnRender(None) if value else None ) # # Add statusbar # # choose items in statusbar choice, which makes sense for your application self.statusbarItems = [ sb.SbCoordinates, sb.SbRegionExtent, sb.SbCompRegionExtent, sb.SbShowRegion, sb.SbAlignExtent, sb.SbResolution, sb.SbDisplayGeometry, sb.SbMapScale, sb.SbGoTo, sb.SbProjection, ] # create statusbar and its manager statusbar = self.CreateStatusBar(number=4, style=0) statusbar.SetStatusWidths([-5, -2, -1, -1]) self.statusbarManager = sb.SbManager(mapframe=self, statusbar=statusbar) # fill statusbar manager self.statusbarManager.AddStatusbarItemsByClass( self.statusbarItems, mapframe=self, statusbar=statusbar ) self.statusbarManager.AddStatusbarItem( sb.SbMask(self, statusbar=statusbar, position=2) ) self.statusbarManager.AddStatusbarItem( sb.SbRender(self, statusbar=statusbar, position=3) ) self.statusbarManager.Update() # create map window self.MapWindow = BufferedMapWindow( parent=self, Map=self.GetMap(), properties=self.mapWindowProperties, giface=self, ) self._setUpMapWindow(self.MapWindow) self.MapWindow.InitZoomHistory() # create whatever you want, here it is a widget for displaying raster info self.info = ExampleInfoTextManager(self) # add map window (and other widgets) to aui manager self._addPanes() self._mgr.Update() # initialize variables related to your application functionality self.InitVariables() # default action self.GetMapToolbar().SelectDefault() self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.SetSize(size)
def __init__( self, parent, giface, title=_("GRASS GIS Manage Ground Control Points"), toolbars=["gcpdisp"], Map=None, auimgr=None, name="GCPMapWindow", **kwargs, ): """Main map display window with toolbars, statusbar and DrawWindow :param giface: GRASS interface instance :param title: window title :param toolbars: array of activated toolbars, e.g. ['map', 'digit'] :param map: instance of render.Map :param auimgs: AUI manager :param kwargs: wx.Frame attribures """ SingleMapFrame.__init__( self, parent=parent, giface=giface, title=title, Map=Map, auimgr=auimgr, name=name, **kwargs, ) self._giface = giface # properties are shared in other objects, so defining here self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() self.mapWindowProperties.alignExtent = True # # Add toolbars # for toolb in toolbars: self.AddToolbar(toolb) self.activemap = self.toolbars["gcpdisp"].togglemap self.activemap.SetSelection(0) self.SrcMap = self.grwiz.SrcMap # instance of render.Map self.TgtMap = self.grwiz.TgtMap # instance of render.Map self._mgr.SetDockSizeConstraint(0.5, 0.5) # # Add statusbar # # items for choice statusbarItems = [ sb.SbCoordinates, sb.SbRegionExtent, sb.SbCompRegionExtent, sb.SbShowRegion, sb.SbResolution, sb.SbDisplayGeometry, sb.SbMapScale, sb.SbProjection, sbgcp.SbGoToGCP, sbgcp.SbRMSError, ] # create statusbar and its manager self.statusbar = self.CreateStatusbar(statusbarItems) self.statusbarManager.SetMode(8) # goto GCP # # Init map display (buffered DC & set default cursor) # self.grwiz.SwitchEnv("source") self.SrcMapWindow = BufferedMapWindow( parent=self, giface=self._giface, id=wx.ID_ANY, properties=self.mapWindowProperties, Map=self.SrcMap, ) self.grwiz.SwitchEnv("target") self.TgtMapWindow = BufferedMapWindow( parent=self, giface=self._giface, id=wx.ID_ANY, properties=self.mapWindowProperties, Map=self.TgtMap, ) self.MapWindow = self.SrcMapWindow self.Map = self.SrcMap self._setUpMapWindow(self.SrcMapWindow) self._setUpMapWindow(self.TgtMapWindow) self.SrcMapWindow.SetNamedCursor("cross") self.TgtMapWindow.SetNamedCursor("cross") # used to switch current map (combo box in toolbar) self.SrcMapWindow.mouseEntered.connect( lambda: self._setActiveMapWindow(self.SrcMapWindow)) self.TgtMapWindow.mouseEntered.connect( lambda: self._setActiveMapWindow(self.TgtMapWindow)) # # initialize region values # self._initMap(Map=self.SrcMap) self._initMap(Map=self.TgtMap) self.GetMapToolbar().SelectDefault() # # Bind various events # self.activemap.Bind(wx.EVT_CHOICE, self.OnUpdateActive) self.Bind(wx.EVT_SIZE, self.OnSize) # # Update fancy gui style # # AuiManager wants a CentrePane, workaround to get two equally sized # windows self.list = self.CreateGCPList() # self.SrcMapWindow.SetSize((300, 300)) # self.TgtMapWindow.SetSize((300, 300)) self.list.SetSize((100, 150)) self._addPanes() srcwidth, srcheight = self.SrcMapWindow.GetSize() tgtwidth, tgtheight = self.TgtMapWindow.GetSize() srcwidth = (srcwidth + tgtwidth) / 2 self._mgr.GetPane("target").Hide() self._mgr.Update() self._mgr.GetPane("source").BestSize((srcwidth, srcheight)) self._mgr.GetPane("target").BestSize((srcwidth, srcheight)) if self.show_target: self._mgr.GetPane("target").Show() else: self.activemap.Enable(False) # needed by Mac OS, does not harm on Linux, breaks display on Windows if platform.system() != "Windows": self._mgr.Update() # # Init print module and classes # self.printopt = PrintOptions(self, self.MapWindow) # # Initialization of digitization tool # self.digit = None # set active map self.MapWindow = self.SrcMapWindow self.Map = self.SrcMap # do not init zoom history here, that happens when zooming to map(s) # # Re-use dialogs # self.dialogs = {} self.dialogs["attributes"] = None self.dialogs["category"] = None self.dialogs["barscale"] = None self.dialogs["legend"] = None self.decorationDialog = None # decoration/overlays # doing nice things in statusbar when other things are ready self.statusbarManager.Update()
def __init__(self, parent=None, giface=None, title=_("Map Swipe"), name="swipe", **kwargs): DoubleMapPanel.__init__( self, parent=parent, title=title, name=name, firstMap=Map(), secondMap=Map(), **kwargs, ) Debug.msg(1, "SwipeMapPanel.__init__()") # # Add toolbars # for name in ("swipeMain", "swipeMap", "swipeMisc"): self.AddToolbar(name) self._mgr.Update() self._giface = giface # # create widgets # self.splitter = MapSplitter(parent=self, id=wx.ID_ANY) self.sliderH = Slider(self, id=wx.ID_ANY, style=wx.SL_HORIZONTAL) self.sliderV = Slider(self, id=wx.ID_ANY, style=wx.SL_VERTICAL) self.mapWindowProperties = MapWindowProperties() self.mapWindowProperties.setValuesFromUserSettings() self.mapWindowProperties.autoRenderChanged.connect( self.OnAutoRenderChanged) self.firstMapWindow = SwipeBufferedWindow( parent=self.splitter, giface=self._giface, properties=self.mapWindowProperties, Map=self.firstMap, ) self.secondMapWindow = SwipeBufferedWindow( parent=self.splitter, giface=self._giface, properties=self.mapWindowProperties, Map=self.secondMap, ) # bind query signal self.firstMapWindow.mapQueried.connect(self.Query) self.secondMapWindow.mapQueried.connect(self.Query) # bind tracking cursosr to mirror it self.firstMapWindow.Bind(wx.EVT_MOTION, lambda evt: self.TrackCursor(evt)) self.secondMapWindow.Bind(wx.EVT_MOTION, lambda evt: self.TrackCursor(evt)) self.MapWindow = self.firstMapWindow # current by default self.firstMapWindow.zoomhistory = self.secondMapWindow.zoomhistory self.SetBindRegions(True) self._mode = "swipe" # statusbar items statusbarItems = [ sb.SbCoordinates, sb.SbRegionExtent, sb.SbCompRegionExtent, sb.SbShowRegion, sb.SbAlignExtent, sb.SbResolution, sb.SbDisplayGeometry, sb.SbMapScale, sb.SbGoTo, sb.SbProjection, ] self.statusbar = self.CreateStatusbar(statusbarItems) self._addPanes() self._bindWindowsActivation() self._setUpMapWindow(self.firstMapWindow) self._setUpMapWindow(self.secondMapWindow) self._mgr.GetPane("sliderV").Hide() self._mgr.GetPane("sliderH").Show() self.slider = self.sliderH self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_IDLE, self.OnIdle) self.SetSize((800, 600)) self._mgr.Update() self.rasters = {"first": None, "second": None} self._inputDialog = None self._preferencesDialog = None self._queryDialog = None # default action in map toolbar self.GetMapToolbar().SelectDefault() self.resize = False wx.CallAfter(self.CallAfterInit)