def __init__(self): if "wxMac" in wx.PlatformInfo: # use 16X16 cursors for wxMac self.HandCursor = wx.CursorFromImage(Resources.getHand16Image()) self.GrabHandCursor = wx.CursorFromImage( Resources.getGrabHand16Image()) img = Resources.getMagPlus16Image() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6) self.MagPlusCursor = wx.CursorFromImage(img) img = Resources.getMagMinus16Image() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6) self.MagMinusCursor = wx.CursorFromImage(img) else: # use 24X24 cursors for GTK and Windows self.HandCursor = wx.CursorFromImage(Resources.getHandImage()) self.GrabHandCursor = wx.CursorFromImage( Resources.getGrabHandImage()) img = Resources.getMagPlusImage() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 9) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 9) self.MagPlusCursor = wx.CursorFromImage(img) img = Resources.getMagMinusImage() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 9) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 9) self.MagMinusCursor = wx.CursorFromImage(img)
def OnSelect(self, panel,event): panel.statusBar.SetStatusText(self.defaultStatusText,0); zoomImg = self.ScaleBitmap(self.handBmp, 16*self.panel.scale, 25*self.panel.scale) cursor = wx.CursorFromImage(zoomImg) self.panel.SetCursor(cursor) return True
def load_mscur(self, name): stream = utils.get_resource_stream( os.path.join(self.icon_dir, "%s.cur" % name)) if not stream is None: return wx.CursorFromImage( wx.ImageFromStream(wx.InputStream(stream), wx.BITMAP_TYPE_CUR)) return wx.NullCursor
def _RegisterImage(self, name, image, maskcolor='white', hotx=None, hoty=None): """ Register a wx.Image as a cursor. """ if sys.platform == 'win32': #cursors fixed size 32,32 xratio = image.GetWidth() / 32 yratio = image.GetHeight() / 32 else: xratio = yratio = 1 if not image.HasMask(): c = colordb.convert_color(maskcolor) image.SetMaskColour(c[0], c[1], c[2]) if not hotx: hotx = image.GetWidth() / 2 hotx = hotx / xratio image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotx) if not hoty: hoty = image.GetHeight() / 2 hoty = hoty / yratio image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hoty) self.custom[name] = wx.CursorFromImage(image)
def OnChooseCursor(self, evt): # clear the dots self.win.Refresh() choice = self.cb.GetStringSelection() self.log.write("Selecting the %s cursor\n" % choice) cnum = cursors[choice] if cnum == CUSTOMID: image = images.Pointy.GetImage() # since this image didn't come from a .cur file, tell it where the hotspot is image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 1) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 1) # make the image into a cursor cursor = wx.CursorFromImage(image) else: # create one of the stock (built-in) cursors cursor = wx.StockCursor(cnum) # set the cursor for the window self.win.SetCursor(cursor)
def __init__(self, parent):#{{{ """ Axes3D window where the u, v and x, y, z axis are displayed. The user has a drag acces to these axis to define his own line-of-sight axis interactively. parent --- parent object of the Axes3D window. """ WID = wid() wx.Window.__init__(self, parent, WID.LOS_A3D, style=wx.WANTS_CHARS, size=(200,200)) self.SetBackgroundColour(wx.WHITE) self.Bind(wx.EVT_PAINT, self.OnPaint) # Cursors img = wx.Image(get_icon("rotate_2D.png"), type=wx.BITMAP_TYPE_PNG) img.ConvertAlphaToMask() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 10) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 10) self.rot_2D_cursor = wx.CursorFromImage(img) self.cursor_sizing = wx.StockCursor(wx.CURSOR_SIZING) self.cursor_hand = wx.StockCursor(wx.CURSOR_HAND) # Pens self.redPen = wx.Pen("RED") self.blackPen = wx.Pen("BLACK") self.bluePen = wx.Pen('#0099f7') self.preview_image = None
def __init__(self, parent): wx.Panel.__init__(self, parent, -1) #NumButtons = Len(CursorList) NumColumns = 5.0 #NumRows = math.ceil(NumButtons/NumColumns) Sizer = wx.GridSizer(0, NumColumns) self.Cursors = {} for name, Cursor in StockCursors: print Cursor try: self.Cursors[name] = wx.StockCursor(Cursor) B = wx.Button(self, -1, name) B.Bind(wx.EVT_BUTTON, self.OnButton) Sizer.Add(B, 1, wx.GROW | wx.ALL, 2) except: print "Cursor:", name, "Doesn't exist." for name, filename in MyCursors: self.Cursors[name] = wx.CursorFromImage(wx.Image(filename)) B = wx.Button(self, -1, name) B.Bind(wx.EVT_BUTTON, self.OnButton) Sizer.Add(B, 1, wx.GROW | wx.ALL, 2) self.SetSizerAndFit(Sizer) self.ParentFrame = parent
def addCursor(self, name, img, hotspot=None): ''' Adds a cursor to our inventory ''' if hotspot is not None: img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotspot[0]) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hotspot[1]) img.ConvertAlphaToMask() self.cursors[name] = cursor = wx.CursorFromImage(img) return cursor
def _DROP_ICON(self, filename): # This macro from wxWidgets is going to be in wxPython soon. img = wx.GetApp().GetRawImage(filename) if img is None: return None if wx.Platform == '__WXGTK__': return wx.IconFromBitmap(wx.BitmapFromImage(img)) else: return wx.CursorFromImage(img)
def SetDynaCursor(self, iconfile=""): """Set the cursor for zoom, pan or rotate.""" if iconfile: img = wx.Bitmap(iconfile) img_mask = wx.Mask(img, wx.Colour(255, 0, 255)) img.SetMask(img_mask) cursor = wx.CursorFromImage(wx.ImageFromBitmap(img)) else: cursor = wx.StockCursor(wx.CURSOR_DEFAULT) self.SetCursor(cursor)
def __init__(self, parent, startFunc, endFunc): self.startFunc = startFunc self.endFunc = endFunc self.text = eg.plugins.Window.FindWindow.text wx.PyWindow.__init__(self, parent, -1, style=wx.SIMPLE_BORDER) self.SetBackgroundColour( wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW) ) self.lastTarget = None # load images self.dragBoxBitmap = GetInternalBitmap("findert") image = GetInternalImage('findertc') image.SetMaskColour(255, 0, 0) # since this image didn't come from a .cur file, tell it where the # hotspot is image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 15) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 16) # make the image into a cursor self.cursor = wx.CursorFromImage(image) # the image of the drag target dragBoxImage = wx.StaticBitmap(self, -1, self.dragBoxBitmap) dragBoxImage.SetMinSize(self.dragBoxBitmap.GetSize()) dragBoxImage.Bind(wx.EVT_LEFT_DOWN, self.OnDragboxClick) self.dragBoxImage = dragBoxImage # some description for the drag target dragBoxText = wx.StaticText( self, -1, self.text.drag2, style=wx.ALIGN_CENTRE ) x1, y1 = dragBoxText.GetBestSize() dragBoxText.SetLabel(self.text.drag1) x2, y2 = dragBoxText.GetBestSize() dragBoxText.SetMinSize((max(x1, x2), max(y1, y2))) #dragBoxText.Bind(wx.EVT_LEFT_DOWN, self.OnDragboxClick) self.dragBoxText = dragBoxText self.Bind(wx.EVT_SIZE, self.OnSize) # put our drag target together sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(dragBoxImage, 0, wx.ALIGN_CENTER_VERTICAL) sizer.Add(dragBoxText, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) self.SetSizer(sizer) self.SetAutoLayout(True) sizer.Fit(self) self.SetMinSize(self.GetSize()) wx.CallAfter(self.dragBoxImage.SetBitmap, self.dragBoxBitmap)
def __init__(self, conteneur): wx.ScrolledWindow.__init__(self, parent=conteneur, style=wx.SUNKEN_BORDER) self.parent = conteneur self.bmp = None self.image = self self.ratio = 100 self.panel = wx.Panel(self) self.cursor_normal = wx.CursorFromImage(wx.Image(r"Images\normal.cur")) self.cursor_take = wx.CursorFromImage(wx.Image(r"Images\take.ani")) self.InitBuffer() self.panel.Bind(wx.EVT_PAINT, self.OnPaint) self.panel.Bind(wx.EVT_MOTION, self.OnMouseMove) self.SetVirtualSize((1000, 1000))
def InitializeCursor(self): """Initialize cursors.""" # get cursor image bmp = wx.BitmapFromXPMData(cursor_move) image = wx.ImageFromBitmap(bmp) # since this image didn't come from a .cur file, tell it where the hotspot is image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 8) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 8) # make the image into a cursor self._cursormove = wx.CursorFromImage(image)
def MakeCursor(self, img, hotspot_x, hotspot_y): phoenix = wx.__version__[0] == '4' if phoenix: # Options can be set to an integer as well as to a string value with SetOption(). # There is no SetOptionInt() anymore. img.SetOption(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotspot_x) img.SetOption(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hotspot_y) return wx.Cursor(img) else: # wxPython classic, integer value options must be set via SetOptionInt(). img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotspot_x) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hotspot_y) return wx.CursorFromImage(img)
def get_closed_grab(): '''Get the "closed grab" cursor.''' file_name = 'closed_grab.png' hotspot = (8, 8) stream = pkg_resources.resource_stream(images_package, file_name) image = wx.ImageFromStream(stream, wx.BITMAP_TYPE_ANY) if hotspot is not None: image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotspot[0]) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hotspot[1]) cursor = wx.CursorFromImage(image) return cursor
def CreateCursorFromXPMData(xpmdata, hotspot): """Return a wx.Cursor from a vectorized image.""" # get cursor image bmp = wx.BitmapFromXPMData(xpmdata) image = wx.ImageFromBitmap(bmp) # since this image didn't come from a .cur file, # tell it where the hotspot is image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotspot) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hotspot) # make the image into a cursor return wx.CursorFromImage(image)
def __MakeCursor(data): img = wx.EmptyImage(16, 16) img.SetMaskColour(255, 0, 0) for px in range(len(data)): for py in range(len(data[px])): val = data[px][py] if val == 2: img.SetRGB(px, py, 255, 0, 0) elif val == 1: img.SetRGB(px, py, 0, 0, 0) elif val == 0: img.SetRGB(px, py, 255, 255, 255) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 8) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 8) return wx.CursorFromImage(img)
def OnMouseMotion(self, evt): """Process mouse motion events and pass to the appropriate handler.""" if evt.LeftIsDown(): self.OnLeftIsDown(evt) self.SetCursor(wx.Cursor(wx.CURSOR_SIZING)) elif evt.RightIsDown(): self.OnRightIsDown(evt) # Custom cursors with > 2 colors only works on Windows currently if guiutil.IsMSWindows(): image = wx.Image(util.GetResourcePath('contrast_high.png')) self.SetCursor(wx.CursorFromImage(image)) # Update the positon and values of the mouse cursor self.mousepos = evt.GetPosition() self.OnUpdatePositionValues(evt)
def SetScale(self, newscale, pos): if newscale != self.panel.scale: # Update scale for panel self.panel.scale = newscale # TODO: scroll wrong??? scrollx, scrolly = self.panel.GetScrollPixelsPerUnit(); size = self.panel.GetClientSize() self.panel.Scroll((pos[0]*newscale - size.x/2)/scrollx, (pos[1]*newscale - size.y/2)/scrolly) # multiply by scale because I am converting from scaled to screen coordinates self.panel.Refresh() zoomImg = self.ScaleBitmap(self.handBmp, 16*newscale, 16*newscale) cursor = wx.CursorFromImage(zoomImg) self.panel.SetCursor(cursor)
def get_open_grab(): '''Get the "open grab" cursor.''' name = 'open_grab' file_name = 'open_grab.png' hotspot = (8, 8) if name in cached_cursors: return cached_cursors[name] stream = pkg_resources.resource_stream(images_package, file_name) image = wx.ImageFromStream(stream, wx.BITMAP_TYPE_ANY) if hotspot is not None: image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotspot[0]) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, hotspot[1]) cursor = wx.CursorFromImage(image) cached_cursors[name] = cursor return cursor
def OnEnter(self, evt): ## image=wx.Image("imageicons/pencilicon.png", type=wx.BITMAP_TYPE_PNG) ## cursor = wx.CursorFromImage(image) ## self.SetCursor(cursor) if self.GetParent().toolSelect == "imageicons/freehandicon2.png": image = wx.Image("imageicons/pencilicon2.png", type=wx.BITMAP_TYPE_PNG) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 1) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 31) #imask= image.ConvertToBitmap() #mask= wx.Mask(imask) image.SetMask(True) image.SetMaskColour(255, 255, 255) cursor = wx.CursorFromImage(image) self.SetCursor(cursor) #self.SetCursor(wx.StockCursor(wx.CURSOR_PENCIL)) else: self.SetCursor(wx.StockCursor(wx.CURSOR_CROSS))
def __init__(self, redirect=False, filename=None): wx.App.__init__(self, redirect, filename) self.mainFrame = wx.Frame(None, wx.ID_ANY, title='eBarnamala', pos=(0, 0), size=(800, 600)) self.mainFrame.SetIcon( wx.Icon(join(config.iconsPath, 'eBarnamalaIcon.ico'), wx.BITMAP_TYPE_ICO)) self.mainFrame.SetBackgroundColour(config.backgroundColour) if wx.Platform != "__WXGTK__": cursorImg = wx.Bitmap(join(config.cursorPath, 'basicArrow.png'), wx.BITMAP_TYPE_PNG) cursorImg = cursorImg.ConvertToImage() cursorImg.ConvertAlphaToMask(220) cursor = wx.CursorFromImage(cursorImg) self.mainFrame.SetCursor(cursor) else: cursor = wx.StockCursor(wx.CURSOR_ARROW) self.mainFrame.SetCursor(cursor) self.mainPanel = wx.Panel(self.mainFrame, wx.ID_ANY, (0, 0), (800, 600)) self.mainPanel.SetBackgroundColour(config.backgroundColour) learnLettersImg = wx.Bitmap( join(config.buttonsPath, 'learnLetters.png'), wx.BITMAP_TYPE_PNG) self.learnLettersButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, learnLettersImg, (40, 368), style=wx.NO_BORDER) self.learnLettersButton.SetBackgroundColour(config.backgroundColour) self.learnLettersButton.Bind(wx.EVT_BUTTON, self.OnLearnLetters, id=self.learnLettersButton.GetId()) learnTimeImg = wx.Bitmap(join(config.buttonsPath, 'learnTime.png'), wx.BITMAP_TYPE_PNG) self.learnTimeButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, learnTimeImg, (40, 316), style=wx.NO_BORDER) self.learnTimeButton.SetBackgroundColour(config.backgroundColour) self.learnTimeButton.Bind(wx.EVT_BUTTON, self.OnLearnTime, id=self.learnTimeButton.GetId()) learnAnimalsImg = wx.Bitmap( join(config.buttonsPath, 'learnAnimals.png'), wx.BITMAP_TYPE_PNG) self.learnAnimalsButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, learnAnimalsImg, (40, 264), style=wx.NO_BORDER) self.learnAnimalsButton.SetBackgroundColour(config.backgroundColour) self.learnAnimalsButton.Bind(wx.EVT_BUTTON, self.OnLearnAnimals, id=self.learnAnimalsButton.GetId()) learnTrafficSignsImg = wx.Bitmap( join(config.buttonsPath, 'trafficSigns.png'), wx.BITMAP_TYPE_PNG) self.learnTrafficSignsButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, learnTrafficSignsImg, (40, 212), style=wx.NO_BORDER) self.learnTrafficSignsButton.SetBackgroundColour( config.backgroundColour) self.learnTrafficSignsButton.Bind( wx.EVT_BUTTON, self.OnLearnTrafficSigns, id=self.learnTrafficSignsButton.GetId()) learnColoursImg = wx.Bitmap(join(config.buttonsPath, 'colours.png'), wx.BITMAP_TYPE_PNG) self.learnColoursButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, learnColoursImg, (40, 160), style=wx.NO_BORDER) self.learnColoursButton.SetBackgroundColour(config.backgroundColour) self.learnColoursButton.Bind(wx.EVT_BUTTON, self.OnLearnColours, id=self.learnColoursButton.GetId()) learnMoneyImg = wx.Bitmap(join(config.buttonsPath, 'learnMoney.png'), wx.BITMAP_TYPE_PNG) self.learnMoneyButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, learnMoneyImg, (40, 110), style=wx.NO_BORDER) self.learnMoneyButton.SetBackgroundColour(config.backgroundColour) self.learnMoneyButton.Bind(wx.EVT_BUTTON, self.OnLearnMoney, id=self.learnMoneyButton.GetId()) arithmeticImg = wx.Bitmap(join(config.buttonsPath, 'arithmetic.png'), wx.BITMAP_TYPE_PNG) self.arithmeticButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, arithmeticImg, (40, 60), style=wx.NO_BORDER) self.arithmeticButton.SetBackgroundColour(config.backgroundColour) self.arithmeticButton.Bind(wx.EVT_BUTTON, self.OnLearnArithmetic, id=self.arithmeticButton.GetId()) numberActivitiesImg = wx.Bitmap( join(config.buttonsPath, 'playNumbers.png'), wx.BITMAP_TYPE_PNG) self.numberActivitiesButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, numberActivitiesImg, (220, 368), style=wx.NO_BORDER) self.numberActivitiesButton.SetBackgroundColour( config.backgroundColour) self.numberActivitiesButton.Bind( wx.EVT_BUTTON, self.OnNumberActivities, id=self.numberActivitiesButton.GetId()) sworActivitiesImg = wx.Bitmap(join(config.buttonsPath, 'playSwor.png'), wx.BITMAP_TYPE_PNG) self.sworActivitiesButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, sworActivitiesImg, (220, 316), style=wx.NO_BORDER) self.sworActivitiesButton.SetBackgroundColour(config.backgroundColour) self.sworActivitiesButton.Bind(wx.EVT_BUTTON, self.OnSworActivities, id=self.sworActivitiesButton.GetId()) byanjanActivitiesImg = wx.Bitmap( join(config.buttonsPath, 'playByanjan.png'), wx.BITMAP_TYPE_PNG) self.byanjanActivitiesButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, byanjanActivitiesImg, (220, 264), style=wx.NO_BORDER) self.byanjanActivitiesButton.SetBackgroundColour( config.backgroundColour) self.byanjanActivitiesButton.Bind( wx.EVT_BUTTON, self.OnByanjanActivities, id=self.byanjanActivitiesButton.GetId()) timeActivitiesImg = wx.Bitmap(join(config.buttonsPath, 'time.png'), wx.BITMAP_TYPE_PNG) self.timeActivitiesButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, timeActivitiesImg, (220, 212), style=wx.NO_BORDER) self.timeActivitiesButton.SetBackgroundColour(config.backgroundColour) self.timeActivitiesButton.Bind(wx.EVT_BUTTON, self.OnTimeActivities, id=self.timeActivitiesButton.GetId()) colourActivitiesImg = wx.Bitmap( join(config.buttonsPath, 'playColours.png'), wx.BITMAP_TYPE_PNG) self.colourActivitiesButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, colourActivitiesImg, (220, 160), style=wx.NO_BORDER) self.colourActivitiesButton.SetBackgroundColour( config.backgroundColour) self.colourActivitiesButton.Bind( wx.EVT_BUTTON, self.OnColourActivities, id=self.colourActivitiesButton.GetId()) animalActivitiesImg = wx.Bitmap( join(config.buttonsPath, 'playAnimals.png'), wx.BITMAP_TYPE_PNG) self.animalActivitiesButton = wx.BitmapButton(self.mainPanel, wx.ID_ANY, animalActivitiesImg, (220, 110), style=wx.NO_BORDER) self.animalActivitiesButton.SetBackgroundColour( config.backgroundColour) self.animalActivitiesButton.Bind( wx.EVT_BUTTON, self.OnAnimalActivities, id=self.animalActivitiesButton.GetId()) splashImg = wx.Bitmap(config.splashImage, wx.BITMAP_TYPE_PNG) self.splashImage = wx.StaticBitmap( self.mainPanel, wx.ID_ANY, splashImg, (420, 110), (splashImg.GetWidth(), splashImg.GetHeight())) bottomMenu.bottomMenu([self.mainPanel], self.mainFrame, self.mainPanel, 'oneButton') self.mainFrame.Show(True)
def _DROP_ICON(self, filename): # This macro from wxWidgets is going to be in wxPython soon. img = wx.GetApp().GetRawImage(filename, copy=False) if img is None: return None return wx.CursorFromImage(img)
def getCursorFromFile(filename, (x, y)): return NSCursor.alloc().initWithImage_hotSpot_( NSImage.imageNamed_(filename), (x, y), ) else: import wx import os def getCursorFromFile(filename, (x, y)): image = wx.Image(os.path.join(resourcesDir, filename)) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, x) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, y) return wx.CursorFromImage(image) arrow = None bucket = None closedHand = None cross = None openHand = None zoomIn = None zoomOut = None def initCursors(): global arrow, bucket, closedHand, cross, openHand, zoomIn, zoomOut if usePyObjC:
Note that this can only be imported after a wx.App() has been created. This approach was inpired by Christian Blouin, who also wrote the initial version of the code. """ import wx ## fixme: events should live in their own module, so all of FloatCanvas ## wouldn't have to be imported here. import FloatCanvas, Resources import numpy as N ## create all the Cursors, so they don't need to be created each time. if "wxMac" in wx.PlatformInfo: # use 16X16 cursors for wxMac HandCursor = wx.CursorFromImage(Resources.getHand16Image()) GrabHandCursor = wx.CursorFromImage(Resources.getGrabHand16Image()) img = Resources.getMagPlus16Image() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6) MagPlusCursor = wx.CursorFromImage(img) img = Resources.getMagMinus16Image() img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6) img.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 6) MagMinusCursor = wx.CursorFromImage(img) else: # use 24X24 cursors for GTK and Windows HandCursor = wx.CursorFromImage(Resources.getHandImage()) GrabHandCursor = wx.CursorFromImage(Resources.getGrabHandImage())
def __init__(self, parent, **kw): RenderPane.RenderPane.__init__(self, parent, **kw) self._index = 0 if 'index' in kw: self._index = kw['index'] else: logging.error("MicroViewRenderPane requires an image index!") # The 'tracked' sliceplane is what gets displayed in the lower right of # each self._tracked_sliceplane_index = 2 # viewport self._pane_name = kw['name'] # keep reference to parent object self._parent = parent # what style of coordinate system? self._coordinate_system = CoordinateSystem.CoordinateSystem.vtk_coords # create an VTK event object self._eventObject = vtk.vtkObject() # keep a reference to OrthoPlanes self.__orthoPlanes = None self._lastActorFactory = None # keep track of whether mouse moved during right click events self._right_click_x = None self._right_click_y = None self._stockicons = StockItems.StockIconFactory() # button-1 action binding self._B1Action = 'rotate' # create some default cursors self._cursors = { 'winlev': wx.StockCursor(wx.CURSOR_ARROW), 'rotate': wx.StockCursor(wx.CURSOR_ARROW), 'zoom': wx.StockCursor(wx.CURSOR_MAGNIFIER), 'pan': wx.StockCursor(wx.CURSOR_HAND), 'slice': wx.StockCursor(wx.CURSOR_ARROW), 'spin': wx.StockCursor(wx.CURSOR_ARROW), } # override some of the default with cursor if we find them on disk for action in ('pan', 'winlev', 'zoom', 'slice', 'spin'): filename = os.path.join('Cursors', '%s.gif' % action) if os.path.exists(filename): try: image = wx.Image(filename) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 1) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 1) self._cursors[action] = wx.CursorFromImage(image) except: logging.exception("MicroViewRenderPane") self._use_dicom_coordinates = False # ------------------------------------------------------------------------------------ # Set up some zope event handlers # --------------------------------------------------------------------- component.provideHandler(self.OnConfigModified)
def loadImages(): """Load images from lib.""" # load image library if wx.Platform == '__WXMAC__': import images_lib_mac as images_lib elif wx.Platform == '__WXMSW__': import images_lib_msw as images_lib else: import images_lib_gtk as images_lib # common lib['icon16'] = images_lib.getIcon16Icon() lib['icon32'] = images_lib.getIcon32Icon() lib['icon48'] = images_lib.getIcon48Icon() lib['icon128'] = images_lib.getIcon128Icon() lib['icon256'] = images_lib.getIcon256Icon() lib['icon512'] = images_lib.getIcon512Icon() lib['iconAbout'] = images_lib.getIconAboutBitmap() lib['iconError'] = images_lib.getIconErrorBitmap() lib['iconDlg'] = images_lib.getIconDlgBitmap() # singles lib['stopper'] = images_lib.getStopperBitmap() # cursors cursors = images_lib.getCursorsBitmap() image = cursors.GetSubBitmap(wx.Rect(0, 0, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) lib['cursorsArrow'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(16, 0, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) lib['cursorsArrowMeasure'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(32, 0, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) lib['cursorsArrowPeak'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(48, 0, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) lib['cursorsArrowPoint'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(64, 0, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) lib['cursorsArrowDelete'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(80, 0, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) lib['cursorsArrowOffset'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(0, 16, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7) lib['cursorsCross'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(16, 16, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7) lib['cursorsCrossMeasure'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(32, 16, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7) lib['cursorsCrossPeak'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(48, 16, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7) lib['cursorsCrossPoint'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(64, 16, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7) lib['cursorsCrossDelete'] = wx.CursorFromImage(image) image = cursors.GetSubBitmap(wx.Rect(80, 16, 16, 16)).ConvertToImage() image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7) image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7) lib['cursorsCrossOffset'] = wx.CursorFromImage(image) # arrows arrows = images_lib.getArrowsBitmap() lib['arrowsUp'] = arrows.GetSubBitmap(wx.Rect(0, 0, 11, 11)) lib['arrowsRight'] = arrows.GetSubBitmap(wx.Rect(11, 0, 11, 11)) lib['arrowsDown'] = arrows.GetSubBitmap(wx.Rect(22, 0, 11, 11)) lib['arrowsLeft'] = arrows.GetSubBitmap(wx.Rect(33, 0, 11, 11)) # backgrounds lib['bgrToolbar'] = images_lib.getBgrToolbarBitmap() lib['bgrToolbarNoBorder'] = images_lib.getBgrToolbarNoBorderBitmap() lib['bgrControlbar'] = images_lib.getBgrControlbarBitmap() lib['bgrControlbarBorder'] = images_lib.getBgrControlbarBorderBitmap() lib['bgrControlbarDouble'] = images_lib.getBgrControlbarDoubleBitmap() lib['bgrBottombar'] = images_lib.getBgrBottombarBitmap() lib['bgrPeakEditor'] = images_lib.getBgrPeakEditorBitmap() # bullets bulletsOn = images_lib.getBulletsOnBitmap() bulletsOff = images_lib.getBulletsOffBitmap() lib['bulletsDocument'] = bulletsOn.GetSubBitmap(wx.Rect(0, 0, 13, 12)) lib['bulletsAnnotationsOn'] = bulletsOn.GetSubBitmap(wx.Rect( 13, 0, 13, 12)) lib['bulletsAnnotationsOff'] = bulletsOff.GetSubBitmap( wx.Rect(13, 0, 13, 12)) lib['bulletsSequenceOn'] = bulletsOn.GetSubBitmap(wx.Rect(26, 0, 13, 12)) lib['bulletsSequenceOff'] = bulletsOff.GetSubBitmap(wx.Rect(26, 0, 13, 12)) lib['bulletsNotationOn'] = bulletsOn.GetSubBitmap(wx.Rect(39, 0, 13, 12)) lib['bulletsNotationOff'] = bulletsOff.GetSubBitmap(wx.Rect(39, 0, 13, 12)) # tools if wx.Platform == '__WXMAC__': tools = images_lib.getToolsBitmap() lib['toolsProcessing'] = tools.GetSubBitmap(wx.Rect(0, 5, 32, 23)) lib['toolsCalibration'] = tools.GetSubBitmap(wx.Rect(32, 5, 32, 23)) lib['toolsSequence'] = tools.GetSubBitmap(wx.Rect(64, 5, 32, 23)) lib['toolsMassCalculator'] = tools.GetSubBitmap(wx.Rect(96, 5, 32, 23)) lib['toolsCompoundsSearch'] = tools.GetSubBitmap( wx.Rect(128, 5, 32, 23)) lib['toolsPeakDifferences'] = tools.GetSubBitmap( wx.Rect(160, 5, 32, 23)) lib['toolsComparePeaklists'] = tools.GetSubBitmap( wx.Rect(192, 5, 32, 23)) lib['toolsMascot'] = tools.GetSubBitmap(wx.Rect(224, 5, 32, 23)) lib['toolsProfound'] = tools.GetSubBitmap(wx.Rect(256, 5, 32, 23)) lib['toolsDocumentInfo'] = tools.GetSubBitmap(wx.Rect(288, 5, 32, 23)) lib['toolsDocumentReport'] = tools.GetSubBitmap(wx.Rect( 320, 5, 32, 23)) lib['toolsDocumentExport'] = tools.GetSubBitmap(wx.Rect( 352, 5, 32, 23)) lib['toolsMassFilter'] = tools.GetSubBitmap(wx.Rect(384, 5, 32, 23)) lib['toolsSpectrumGenerator'] = tools.GetSubBitmap( wx.Rect(416, 5, 32, 23)) lib['toolsEnvelopeFit'] = tools.GetSubBitmap(wx.Rect(448, 5, 32, 23)) lib['toolsMassToFormula'] = tools.GetSubBitmap(wx.Rect(480, 5, 32, 23)) lib['toolsPeriodicTable'] = tools.GetSubBitmap(wx.Rect(512, 5, 32, 23)) lib['toolsMassDefectPlot'] = tools.GetSubBitmap(wx.Rect( 544, 5, 32, 23)) lib['toolsPresets'] = tools.GetSubBitmap(wx.Rect(0, 37, 32, 22)) lib['toolsLibrary'] = tools.GetSubBitmap(wx.Rect(32, 37, 32, 22)) else: tools = images_lib.getToolsBitmap() lib['toolsOpen'] = tools.GetSubBitmap(wx.Rect(0, 0, 22, 22)) lib['toolsSave'] = tools.GetSubBitmap(wx.Rect(22, 0, 22, 22)) lib['toolsPrint'] = tools.GetSubBitmap(wx.Rect(44, 0, 22, 22)) lib['toolsProcessing'] = tools.GetSubBitmap(wx.Rect(66, 0, 22, 22)) lib['toolsCalibration'] = tools.GetSubBitmap(wx.Rect(88, 0, 22, 22)) lib['toolsSequence'] = tools.GetSubBitmap(wx.Rect(110, 0, 22, 22)) lib['toolsMassCalculator'] = tools.GetSubBitmap(wx.Rect( 132, 0, 22, 22)) lib['toolsCompoundsSearch'] = tools.GetSubBitmap( wx.Rect(154, 0, 22, 22)) lib['toolsPeakDifferences'] = tools.GetSubBitmap( wx.Rect(176, 0, 22, 22)) lib['toolsComparePeaklists'] = tools.GetSubBitmap( wx.Rect(198, 0, 22, 22)) lib['toolsMascot'] = tools.GetSubBitmap(wx.Rect(220, 0, 22, 22)) lib['toolsProfound'] = tools.GetSubBitmap(wx.Rect(242, 0, 22, 22)) lib['toolsDocumentInfo'] = tools.GetSubBitmap(wx.Rect(264, 0, 22, 22)) lib['toolsDocumentReport'] = tools.GetSubBitmap(wx.Rect( 286, 0, 22, 22)) lib['toolsDocumentExport'] = tools.GetSubBitmap(wx.Rect( 308, 0, 22, 22)) lib['toolsPresets'] = tools.GetSubBitmap(wx.Rect(330, 0, 22, 22)) lib['toolsMassFilter'] = tools.GetSubBitmap(wx.Rect(352, 0, 22, 22)) lib['toolsSpectrumGenerator'] = tools.GetSubBitmap( wx.Rect(374, 0, 22, 22)) lib['toolsEnvelopeFit'] = tools.GetSubBitmap(wx.Rect(396, 0, 22, 22)) lib['toolsLibrary'] = tools.GetSubBitmap(wx.Rect(418, 0, 22, 22)) lib['toolsMassToFormula'] = tools.GetSubBitmap(wx.Rect(440, 0, 22, 22)) lib['toolsPeriodicTable'] = tools.GetSubBitmap(wx.Rect(462, 0, 22, 22)) lib['toolsMassDefectPlot'] = tools.GetSubBitmap(wx.Rect( 484, 0, 22, 22)) # bottombars bottombarsOn = images_lib.getBottombarsOnBitmap() bottombarsOff = images_lib.getBottombarsOffBitmap() lib['documentsAdd'] = bottombarsOff.GetSubBitmap(wx.Rect(0, 0, 29, 22)) lib['documentsDelete'] = bottombarsOff.GetSubBitmap(wx.Rect(29, 0, 29, 22)) lib['peaklistAdd'] = bottombarsOff.GetSubBitmap(wx.Rect(0, 22, 29, 22)) lib['peaklistDelete'] = bottombarsOff.GetSubBitmap(wx.Rect(29, 22, 29, 22)) lib['peaklistAnnotate'] = bottombarsOff.GetSubBitmap( wx.Rect(58, 22, 29, 22)) lib['peaklistEditorOn'] = bottombarsOn.GetSubBitmap(wx.Rect( 87, 22, 29, 22)) lib['peaklistEditorOff'] = bottombarsOff.GetSubBitmap( wx.Rect(87, 22, 29, 22)) lib['spectrumLabelsOn'] = bottombarsOn.GetSubBitmap(wx.Rect(0, 44, 29, 22)) lib['spectrumLabelsOff'] = bottombarsOff.GetSubBitmap( wx.Rect(0, 44, 29, 22)) lib['spectrumTicksOn'] = bottombarsOn.GetSubBitmap(wx.Rect(29, 44, 29, 22)) lib['spectrumTicksOff'] = bottombarsOff.GetSubBitmap( wx.Rect(29, 44, 29, 22)) lib['spectrumNotationsOn'] = bottombarsOn.GetSubBitmap( wx.Rect(58, 44, 29, 22)) lib['spectrumNotationsOff'] = bottombarsOff.GetSubBitmap( wx.Rect(58, 44, 29, 22)) lib['spectrumLabelAngleOn'] = bottombarsOn.GetSubBitmap( wx.Rect(87, 44, 29, 22)) lib['spectrumLabelAngleOff'] = bottombarsOff.GetSubBitmap( wx.Rect(87, 44, 29, 22)) lib['spectrumPosBarsOn'] = bottombarsOn.GetSubBitmap( wx.Rect(116, 44, 29, 22)) lib['spectrumPosBarsOff'] = bottombarsOff.GetSubBitmap( wx.Rect(116, 44, 29, 22)) lib['spectrumGelOn'] = bottombarsOn.GetSubBitmap(wx.Rect(145, 44, 29, 22)) lib['spectrumGelOff'] = bottombarsOff.GetSubBitmap(wx.Rect( 145, 44, 29, 22)) lib['spectrumTrackerOn'] = bottombarsOn.GetSubBitmap( wx.Rect(174, 44, 29, 22)) lib['spectrumTrackerOff'] = bottombarsOff.GetSubBitmap( wx.Rect(174, 44, 29, 22)) lib['spectrumAutoscaleOn'] = bottombarsOn.GetSubBitmap( wx.Rect(203, 44, 29, 22)) lib['spectrumAutoscaleOff'] = bottombarsOff.GetSubBitmap( wx.Rect(203, 44, 29, 22)) lib['spectrumNormalizeOn'] = bottombarsOn.GetSubBitmap( wx.Rect(232, 44, 29, 22)) lib['spectrumNormalizeOff'] = bottombarsOff.GetSubBitmap( wx.Rect(232, 44, 29, 22)) lib['spectrumRulerOn'] = bottombarsOn.GetSubBitmap(wx.Rect(0, 66, 29, 22)) lib['spectrumRulerOff'] = bottombarsOff.GetSubBitmap(wx.Rect( 0, 66, 29, 22)) lib['spectrumLabelPeakOn'] = bottombarsOn.GetSubBitmap( wx.Rect(29, 66, 29, 22)) lib['spectrumLabelPeakOff'] = bottombarsOff.GetSubBitmap( wx.Rect(29, 66, 29, 22)) lib['spectrumLabelPointOn'] = bottombarsOn.GetSubBitmap( wx.Rect(58, 66, 29, 22)) lib['spectrumLabelPointOff'] = bottombarsOff.GetSubBitmap( wx.Rect(58, 66, 29, 22)) lib['spectrumLabelEnvelopeOn'] = bottombarsOn.GetSubBitmap( wx.Rect(87, 66, 29, 22)) lib['spectrumLabelEnvelopeOff'] = bottombarsOff.GetSubBitmap( wx.Rect(87, 66, 29, 22)) lib['spectrumDeleteLabelOn'] = bottombarsOn.GetSubBitmap( wx.Rect(116, 66, 29, 22)) lib['spectrumDeleteLabelOff'] = bottombarsOff.GetSubBitmap( wx.Rect(116, 66, 29, 22)) lib['spectrumOffsetOn'] = bottombarsOn.GetSubBitmap( wx.Rect(145, 66, 29, 22)) lib['spectrumOffsetOff'] = bottombarsOff.GetSubBitmap( wx.Rect(145, 66, 29, 22)) # toolbars toolbarsOn = images_lib.getToolbarsOnBitmap() toolbarsOff = images_lib.getToolbarsOffBitmap() lib['compoundsSearchCompoundsOn'] = toolbarsOn.GetSubBitmap( wx.Rect(0, 0, 29, 22)) lib['compoundsSearchCompoundsOff'] = toolbarsOff.GetSubBitmap( wx.Rect(0, 0, 29, 22)) lib['compoundsSearchFormulaOn'] = toolbarsOn.GetSubBitmap( wx.Rect(29, 0, 29, 22)) lib['compoundsSearchFormulaOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 0, 29, 22)) lib['calibrationReferencesOn'] = toolbarsOn.GetSubBitmap( wx.Rect(0, 22, 29, 22)) lib['calibrationReferencesOff'] = toolbarsOff.GetSubBitmap( wx.Rect(0, 22, 29, 22)) lib['calibrationErrorsOn'] = toolbarsOn.GetSubBitmap( wx.Rect(29, 22, 29, 22)) lib['calibrationErrorsOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 22, 29, 22)) lib['documentExportImageOn'] = toolbarsOn.GetSubBitmap( wx.Rect(0, 44, 29, 22)) lib['documentExportImageOff'] = toolbarsOff.GetSubBitmap( wx.Rect(0, 44, 29, 22)) lib['documentExportPeaklistOn'] = toolbarsOn.GetSubBitmap( wx.Rect(29, 44, 29, 22)) lib['documentExportPeaklistOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 44, 29, 22)) lib['documentExportSpectrumOn'] = toolbarsOn.GetSubBitmap( wx.Rect(58, 44, 29, 22)) lib['documentExportSpectrumOff'] = toolbarsOff.GetSubBitmap( wx.Rect(58, 44, 29, 22)) lib['documentInfoSummaryOn'] = toolbarsOn.GetSubBitmap( wx.Rect(0, 66, 29, 22)) lib['documentInfoSummaryOff'] = toolbarsOff.GetSubBitmap( wx.Rect(0, 66, 29, 22)) lib['documentInfoSpectrumOn'] = toolbarsOn.GetSubBitmap( wx.Rect(29, 66, 29, 22)) lib['documentInfoSpectrumOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 66, 29, 22)) lib['documentInfoNotesOn'] = toolbarsOn.GetSubBitmap( wx.Rect(58, 66, 29, 22)) lib['documentInfoNotesOff'] = toolbarsOff.GetSubBitmap( wx.Rect(58, 66, 29, 22)) lib['mascotPMFOn'] = toolbarsOn.GetSubBitmap(wx.Rect(0, 88, 29, 22)) lib['mascotPMFOff'] = toolbarsOff.GetSubBitmap(wx.Rect(0, 88, 29, 22)) lib['mascotMISOn'] = toolbarsOn.GetSubBitmap(wx.Rect(29, 88, 29, 22)) lib['mascotMISOff'] = toolbarsOff.GetSubBitmap(wx.Rect(29, 88, 29, 22)) lib['mascotSQOn'] = toolbarsOn.GetSubBitmap(wx.Rect(58, 88, 29, 22)) lib['mascotSQOff'] = toolbarsOff.GetSubBitmap(wx.Rect(58, 88, 29, 22)) lib['mascotQueryOn'] = toolbarsOn.GetSubBitmap(wx.Rect(87, 88, 29, 22)) lib['mascotQueryOff'] = toolbarsOff.GetSubBitmap(wx.Rect(87, 88, 29, 22)) lib['massCalculatorSummaryOn'] = toolbarsOn.GetSubBitmap( wx.Rect(0, 110, 29, 22)) lib['massCalculatorSummaryOff'] = toolbarsOff.GetSubBitmap( wx.Rect(0, 110, 29, 22)) lib['massCalculatorIonSeriesOn'] = toolbarsOn.GetSubBitmap( wx.Rect(29, 110, 29, 22)) lib['massCalculatorIonSeriesOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 110, 29, 22)) lib['massCalculatorPatternOn'] = toolbarsOn.GetSubBitmap( wx.Rect(58, 110, 29, 22)) lib['massCalculatorPatternOff'] = toolbarsOff.GetSubBitmap( wx.Rect(58, 110, 29, 22)) lib['processingMathOn'] = toolbarsOn.GetSubBitmap(wx.Rect(0, 132, 29, 22)) lib['processingMathOff'] = toolbarsOff.GetSubBitmap(wx.Rect( 0, 132, 29, 22)) lib['processingCropOn'] = toolbarsOn.GetSubBitmap(wx.Rect(29, 132, 29, 22)) lib['processingCropOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 132, 29, 22)) lib['processingBaselineOn'] = toolbarsOn.GetSubBitmap( wx.Rect(58, 132, 29, 22)) lib['processingBaselineOff'] = toolbarsOff.GetSubBitmap( wx.Rect(58, 132, 29, 22)) lib['processingSmoothingOn'] = toolbarsOn.GetSubBitmap( wx.Rect(87, 132, 29, 22)) lib['processingSmoothingOff'] = toolbarsOff.GetSubBitmap( wx.Rect(87, 132, 29, 22)) lib['processingPeakpickingOn'] = toolbarsOn.GetSubBitmap( wx.Rect(116, 132, 29, 22)) lib['processingPeakpickingOff'] = toolbarsOff.GetSubBitmap( wx.Rect(116, 132, 29, 22)) lib['processingDeisotopingOn'] = toolbarsOn.GetSubBitmap( wx.Rect(145, 132, 29, 22)) lib['processingDeisotopingOff'] = toolbarsOff.GetSubBitmap( wx.Rect(145, 132, 29, 22)) lib['processingDeconvolutionOn'] = toolbarsOn.GetSubBitmap( wx.Rect(174, 132, 29, 22)) lib['processingDeconvolutionOff'] = toolbarsOff.GetSubBitmap( wx.Rect(174, 132, 29, 22)) lib['processingBatchOn'] = toolbarsOn.GetSubBitmap( wx.Rect(203, 132, 29, 22)) lib['processingBatchOff'] = toolbarsOff.GetSubBitmap( wx.Rect(203, 132, 29, 22)) lib['sequenceEditorOn'] = toolbarsOn.GetSubBitmap(wx.Rect(0, 154, 29, 22)) lib['sequenceEditorOff'] = toolbarsOff.GetSubBitmap(wx.Rect( 0, 154, 29, 22)) lib['sequenceModificationsOn'] = toolbarsOn.GetSubBitmap( wx.Rect(29, 154, 29, 22)) lib['sequenceModificationsOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 154, 29, 22)) lib['sequenceDigestOn'] = toolbarsOn.GetSubBitmap(wx.Rect(58, 154, 29, 22)) lib['sequenceDigestOff'] = toolbarsOff.GetSubBitmap( wx.Rect(58, 154, 29, 22)) lib['sequenceFragmentOn'] = toolbarsOn.GetSubBitmap( wx.Rect(87, 154, 29, 22)) lib['sequenceFragmentOff'] = toolbarsOff.GetSubBitmap( wx.Rect(87, 154, 29, 22)) lib['sequenceSearchOn'] = toolbarsOn.GetSubBitmap(wx.Rect( 116, 154, 29, 22)) lib['sequenceSearchOff'] = toolbarsOff.GetSubBitmap( wx.Rect(116, 154, 29, 22)) lib['profoundPMFOn'] = toolbarsOn.GetSubBitmap(wx.Rect(0, 176, 29, 22)) lib['profoundPMFOff'] = toolbarsOff.GetSubBitmap(wx.Rect(0, 176, 29, 22)) lib['profoundQueryOn'] = toolbarsOn.GetSubBitmap(wx.Rect(58, 176, 29, 22)) lib['profoundQueryOff'] = toolbarsOff.GetSubBitmap(wx.Rect( 58, 176, 29, 22)) lib['prospectorMSFitOn'] = toolbarsOn.GetSubBitmap(wx.Rect(0, 176, 29, 22)) lib['prospectorMSFitOff'] = toolbarsOff.GetSubBitmap( wx.Rect(0, 176, 29, 22)) lib['prospectorMSTagOn'] = toolbarsOn.GetSubBitmap(wx.Rect(29, 88, 29, 22)) lib['prospectorMSTagOff'] = toolbarsOff.GetSubBitmap( wx.Rect(29, 88, 29, 22)) lib['prospectorQueryOn'] = toolbarsOn.GetSubBitmap(wx.Rect( 58, 176, 29, 22)) lib['prospectorQueryOff'] = toolbarsOff.GetSubBitmap( wx.Rect(58, 176, 29, 22)) lib['matchErrorsOn'] = toolbarsOn.GetSubBitmap(wx.Rect(0, 198, 29, 22)) lib['matchErrorsOff'] = toolbarsOff.GetSubBitmap(wx.Rect(0, 198, 29, 22)) lib['matchSummaryOn'] = toolbarsOn.GetSubBitmap(wx.Rect(29, 198, 29, 22)) lib['matchSummaryOff'] = toolbarsOff.GetSubBitmap(wx.Rect(29, 198, 29, 22)) # periodic table ptableOn = images_lib.getPtableOnBitmap() ptableOff = images_lib.getPtableOffBitmap() ptableSel = images_lib.getPtableSelBitmap() lib['periodicTableConnection'] = ptableOn.GetSubBitmap( wx.Rect(48, 183, 24, 72)) lib['periodicTableHOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 0, 25, 27)) lib['periodicTableHeOn'] = ptableOn.GetSubBitmap(wx.Rect(408, 0, 25, 27)) lib['periodicTableLiOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 26, 25, 27)) lib['periodicTableBeOn'] = ptableOn.GetSubBitmap(wx.Rect(24, 26, 25, 27)) lib['periodicTableBOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 26, 25, 27)) lib['periodicTableCOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 26, 25, 27)) lib['periodicTableNOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 26, 25, 27)) lib['periodicTableOOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 26, 25, 27)) lib['periodicTableFOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 26, 25, 27)) lib['periodicTableNeOn'] = ptableOn.GetSubBitmap(wx.Rect(408, 26, 25, 27)) lib['periodicTableNaOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 52, 25, 27)) lib['periodicTableMgOn'] = ptableOn.GetSubBitmap(wx.Rect(24, 52, 25, 27)) lib['periodicTableAlOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 52, 25, 27)) lib['periodicTableSiOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 52, 25, 27)) lib['periodicTablePOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 52, 25, 27)) lib['periodicTableSOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 52, 25, 27)) lib['periodicTableClOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 52, 25, 27)) lib['periodicTableArOn'] = ptableOn.GetSubBitmap(wx.Rect(408, 52, 25, 27)) lib['periodicTableKOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 78, 25, 27)) lib['periodicTableCaOn'] = ptableOn.GetSubBitmap(wx.Rect(24, 78, 25, 27)) lib['periodicTableScOn'] = ptableOn.GetSubBitmap(wx.Rect(48, 78, 25, 27)) lib['periodicTableTiOn'] = ptableOn.GetSubBitmap(wx.Rect(72, 78, 25, 27)) lib['periodicTableVOn'] = ptableOn.GetSubBitmap(wx.Rect(96, 78, 25, 27)) lib['periodicTableCrOn'] = ptableOn.GetSubBitmap(wx.Rect(120, 78, 25, 27)) lib['periodicTableMnOn'] = ptableOn.GetSubBitmap(wx.Rect(144, 78, 25, 27)) lib['periodicTableFeOn'] = ptableOn.GetSubBitmap(wx.Rect(168, 78, 25, 27)) lib['periodicTableCoOn'] = ptableOn.GetSubBitmap(wx.Rect(192, 78, 25, 27)) lib['periodicTableNiOn'] = ptableOn.GetSubBitmap(wx.Rect(216, 78, 25, 27)) lib['periodicTableCuOn'] = ptableOn.GetSubBitmap(wx.Rect(240, 78, 25, 27)) lib['periodicTableZnOn'] = ptableOn.GetSubBitmap(wx.Rect(264, 78, 25, 27)) lib['periodicTableGaOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 78, 25, 27)) lib['periodicTableGeOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 78, 25, 27)) lib['periodicTableAsOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 78, 25, 27)) lib['periodicTableSeOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 78, 25, 27)) lib['periodicTableBrOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 78, 25, 27)) lib['periodicTableKrOn'] = ptableOn.GetSubBitmap(wx.Rect(408, 78, 25, 27)) lib['periodicTableRbOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 104, 25, 27)) lib['periodicTableSrOn'] = ptableOn.GetSubBitmap(wx.Rect(24, 104, 25, 27)) lib['periodicTableYOn'] = ptableOn.GetSubBitmap(wx.Rect(48, 104, 25, 27)) lib['periodicTableZrOn'] = ptableOn.GetSubBitmap(wx.Rect(72, 104, 25, 27)) lib['periodicTableNbOn'] = ptableOn.GetSubBitmap(wx.Rect(96, 104, 25, 27)) lib['periodicTableMoOn'] = ptableOn.GetSubBitmap(wx.Rect(120, 104, 25, 27)) lib['periodicTableTcOn'] = ptableOn.GetSubBitmap(wx.Rect(144, 104, 25, 27)) lib['periodicTableRuOn'] = ptableOn.GetSubBitmap(wx.Rect(168, 104, 25, 27)) lib['periodicTableRhOn'] = ptableOn.GetSubBitmap(wx.Rect(192, 104, 25, 27)) lib['periodicTablePdOn'] = ptableOn.GetSubBitmap(wx.Rect(216, 104, 25, 27)) lib['periodicTableAgOn'] = ptableOn.GetSubBitmap(wx.Rect(240, 104, 25, 27)) lib['periodicTableCdOn'] = ptableOn.GetSubBitmap(wx.Rect(264, 104, 25, 27)) lib['periodicTableInOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 104, 25, 27)) lib['periodicTableSnOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 104, 25, 27)) lib['periodicTableSbOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 104, 25, 27)) lib['periodicTableTeOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 104, 25, 27)) lib['periodicTableIOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 104, 25, 27)) lib['periodicTableXeOn'] = ptableOn.GetSubBitmap(wx.Rect(408, 104, 25, 27)) lib['periodicTableCsOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 130, 25, 27)) lib['periodicTableBaOn'] = ptableOn.GetSubBitmap(wx.Rect(24, 130, 25, 27)) lib['periodicTableLaOn'] = ptableOn.GetSubBitmap(wx.Rect(48, 130, 25, 27)) lib['periodicTableHfOn'] = ptableOn.GetSubBitmap(wx.Rect(72, 130, 25, 27)) lib['periodicTableTaOn'] = ptableOn.GetSubBitmap(wx.Rect(96, 130, 25, 27)) lib['periodicTableWOn'] = ptableOn.GetSubBitmap(wx.Rect(120, 130, 25, 27)) lib['periodicTableReOn'] = ptableOn.GetSubBitmap(wx.Rect(144, 130, 25, 27)) lib['periodicTableOsOn'] = ptableOn.GetSubBitmap(wx.Rect(168, 130, 25, 27)) lib['periodicTableIrOn'] = ptableOn.GetSubBitmap(wx.Rect(192, 130, 25, 27)) lib['periodicTablePtOn'] = ptableOn.GetSubBitmap(wx.Rect(216, 130, 25, 27)) lib['periodicTableAuOn'] = ptableOn.GetSubBitmap(wx.Rect(240, 130, 25, 27)) lib['periodicTableHgOn'] = ptableOn.GetSubBitmap(wx.Rect(264, 130, 25, 27)) lib['periodicTableTlOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 130, 25, 27)) lib['periodicTablePbOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 130, 25, 27)) lib['periodicTableBiOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 130, 25, 27)) lib['periodicTablePoOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 130, 25, 27)) lib['periodicTableAtOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 130, 25, 27)) lib['periodicTableRnOn'] = ptableOn.GetSubBitmap(wx.Rect(408, 130, 25, 27)) lib['periodicTableFrOn'] = ptableOn.GetSubBitmap(wx.Rect(0, 156, 25, 27)) lib['periodicTableRaOn'] = ptableOn.GetSubBitmap(wx.Rect(24, 156, 25, 27)) lib['periodicTableAcOn'] = ptableOn.GetSubBitmap(wx.Rect(48, 156, 25, 27)) lib['periodicTableCeOn'] = ptableOn.GetSubBitmap(wx.Rect(72, 202, 25, 27)) lib['periodicTablePrOn'] = ptableOn.GetSubBitmap(wx.Rect(96, 202, 25, 27)) lib['periodicTableNdOn'] = ptableOn.GetSubBitmap(wx.Rect(120, 202, 25, 27)) lib['periodicTablePmOn'] = ptableOn.GetSubBitmap(wx.Rect(144, 202, 25, 27)) lib['periodicTableSmOn'] = ptableOn.GetSubBitmap(wx.Rect(168, 202, 25, 27)) lib['periodicTableEuOn'] = ptableOn.GetSubBitmap(wx.Rect(192, 202, 25, 27)) lib['periodicTableGdOn'] = ptableOn.GetSubBitmap(wx.Rect(216, 202, 25, 27)) lib['periodicTableTbOn'] = ptableOn.GetSubBitmap(wx.Rect(240, 202, 25, 27)) lib['periodicTableDyOn'] = ptableOn.GetSubBitmap(wx.Rect(264, 202, 25, 27)) lib['periodicTableHoOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 202, 25, 27)) lib['periodicTableErOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 202, 25, 27)) lib['periodicTableTmOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 202, 25, 27)) lib['periodicTableYbOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 202, 25, 27)) lib['periodicTableLuOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 202, 25, 27)) lib['periodicTableThOn'] = ptableOn.GetSubBitmap(wx.Rect(72, 228, 25, 27)) lib['periodicTablePaOn'] = ptableOn.GetSubBitmap(wx.Rect(96, 228, 25, 27)) lib['periodicTableUOn'] = ptableOn.GetSubBitmap(wx.Rect(120, 228, 25, 27)) lib['periodicTableNpOn'] = ptableOn.GetSubBitmap(wx.Rect(144, 228, 25, 27)) lib['periodicTablePuOn'] = ptableOn.GetSubBitmap(wx.Rect(168, 228, 25, 27)) lib['periodicTableAmOn'] = ptableOn.GetSubBitmap(wx.Rect(192, 228, 25, 27)) lib['periodicTableCmOn'] = ptableOn.GetSubBitmap(wx.Rect(216, 228, 25, 27)) lib['periodicTableBkOn'] = ptableOn.GetSubBitmap(wx.Rect(240, 228, 25, 27)) lib['periodicTableCfOn'] = ptableOn.GetSubBitmap(wx.Rect(264, 228, 25, 27)) lib['periodicTableEsOn'] = ptableOn.GetSubBitmap(wx.Rect(288, 228, 25, 27)) lib['periodicTableFmOn'] = ptableOn.GetSubBitmap(wx.Rect(312, 228, 25, 27)) lib['periodicTableMdOn'] = ptableOn.GetSubBitmap(wx.Rect(336, 228, 25, 27)) lib['periodicTableNoOn'] = ptableOn.GetSubBitmap(wx.Rect(360, 228, 25, 27)) lib['periodicTableLrOn'] = ptableOn.GetSubBitmap(wx.Rect(384, 228, 25, 27)) lib['periodicTableHOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 0, 25, 27)) lib['periodicTableHeOff'] = ptableOff.GetSubBitmap(wx.Rect(408, 0, 25, 27)) lib['periodicTableLiOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 26, 25, 27)) lib['periodicTableBeOff'] = ptableOff.GetSubBitmap(wx.Rect(24, 26, 25, 27)) lib['periodicTableBOff'] = ptableOff.GetSubBitmap(wx.Rect(288, 26, 25, 27)) lib['periodicTableCOff'] = ptableOff.GetSubBitmap(wx.Rect(312, 26, 25, 27)) lib['periodicTableNOff'] = ptableOff.GetSubBitmap(wx.Rect(336, 26, 25, 27)) lib['periodicTableOOff'] = ptableOff.GetSubBitmap(wx.Rect(360, 26, 25, 27)) lib['periodicTableFOff'] = ptableOff.GetSubBitmap(wx.Rect(384, 26, 25, 27)) lib['periodicTableNeOff'] = ptableOff.GetSubBitmap(wx.Rect( 408, 26, 25, 27)) lib['periodicTableNaOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 52, 25, 27)) lib['periodicTableMgOff'] = ptableOff.GetSubBitmap(wx.Rect(24, 52, 25, 27)) lib['periodicTableAlOff'] = ptableOff.GetSubBitmap(wx.Rect( 288, 52, 25, 27)) lib['periodicTableSiOff'] = ptableOff.GetSubBitmap(wx.Rect( 312, 52, 25, 27)) lib['periodicTablePOff'] = ptableOff.GetSubBitmap(wx.Rect(336, 52, 25, 27)) lib['periodicTableSOff'] = ptableOff.GetSubBitmap(wx.Rect(360, 52, 25, 27)) lib['periodicTableClOff'] = ptableOff.GetSubBitmap(wx.Rect( 384, 52, 25, 27)) lib['periodicTableArOff'] = ptableOff.GetSubBitmap(wx.Rect( 408, 52, 25, 27)) lib['periodicTableKOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 78, 25, 27)) lib['periodicTableCaOff'] = ptableOff.GetSubBitmap(wx.Rect(24, 78, 25, 27)) lib['periodicTableScOff'] = ptableOff.GetSubBitmap(wx.Rect(48, 78, 25, 27)) lib['periodicTableTiOff'] = ptableOff.GetSubBitmap(wx.Rect(72, 78, 25, 27)) lib['periodicTableVOff'] = ptableOff.GetSubBitmap(wx.Rect(96, 78, 25, 27)) lib['periodicTableCrOff'] = ptableOff.GetSubBitmap(wx.Rect( 120, 78, 25, 27)) lib['periodicTableMnOff'] = ptableOff.GetSubBitmap(wx.Rect( 144, 78, 25, 27)) lib['periodicTableFeOff'] = ptableOff.GetSubBitmap(wx.Rect( 168, 78, 25, 27)) lib['periodicTableCoOff'] = ptableOff.GetSubBitmap(wx.Rect( 192, 78, 25, 27)) lib['periodicTableNiOff'] = ptableOff.GetSubBitmap(wx.Rect( 216, 78, 25, 27)) lib['periodicTableCuOff'] = ptableOff.GetSubBitmap(wx.Rect( 240, 78, 25, 27)) lib['periodicTableZnOff'] = ptableOff.GetSubBitmap(wx.Rect( 264, 78, 25, 27)) lib['periodicTableGaOff'] = ptableOff.GetSubBitmap(wx.Rect( 288, 78, 25, 27)) lib['periodicTableGeOff'] = ptableOff.GetSubBitmap(wx.Rect( 312, 78, 25, 27)) lib['periodicTableAsOff'] = ptableOff.GetSubBitmap(wx.Rect( 336, 78, 25, 27)) lib['periodicTableSeOff'] = ptableOff.GetSubBitmap(wx.Rect( 360, 78, 25, 27)) lib['periodicTableBrOff'] = ptableOff.GetSubBitmap(wx.Rect( 384, 78, 25, 27)) lib['periodicTableKrOff'] = ptableOff.GetSubBitmap(wx.Rect( 408, 78, 25, 27)) lib['periodicTableRbOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 104, 25, 27)) lib['periodicTableSrOff'] = ptableOff.GetSubBitmap(wx.Rect( 24, 104, 25, 27)) lib['periodicTableYOff'] = ptableOff.GetSubBitmap(wx.Rect(48, 104, 25, 27)) lib['periodicTableZrOff'] = ptableOff.GetSubBitmap(wx.Rect( 72, 104, 25, 27)) lib['periodicTableNbOff'] = ptableOff.GetSubBitmap(wx.Rect( 96, 104, 25, 27)) lib['periodicTableMoOff'] = ptableOff.GetSubBitmap( wx.Rect(120, 104, 25, 27)) lib['periodicTableTcOff'] = ptableOff.GetSubBitmap( wx.Rect(144, 104, 25, 27)) lib['periodicTableRuOff'] = ptableOff.GetSubBitmap( wx.Rect(168, 104, 25, 27)) lib['periodicTableRhOff'] = ptableOff.GetSubBitmap( wx.Rect(192, 104, 25, 27)) lib['periodicTablePdOff'] = ptableOff.GetSubBitmap( wx.Rect(216, 104, 25, 27)) lib['periodicTableAgOff'] = ptableOff.GetSubBitmap( wx.Rect(240, 104, 25, 27)) lib['periodicTableCdOff'] = ptableOff.GetSubBitmap( wx.Rect(264, 104, 25, 27)) lib['periodicTableInOff'] = ptableOff.GetSubBitmap( wx.Rect(288, 104, 25, 27)) lib['periodicTableSnOff'] = ptableOff.GetSubBitmap( wx.Rect(312, 104, 25, 27)) lib['periodicTableSbOff'] = ptableOff.GetSubBitmap( wx.Rect(336, 104, 25, 27)) lib['periodicTableTeOff'] = ptableOff.GetSubBitmap( wx.Rect(360, 104, 25, 27)) lib['periodicTableIOff'] = ptableOff.GetSubBitmap(wx.Rect( 384, 104, 25, 27)) lib['periodicTableXeOff'] = ptableOff.GetSubBitmap( wx.Rect(408, 104, 25, 27)) lib['periodicTableCsOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 130, 25, 27)) lib['periodicTableBaOff'] = ptableOff.GetSubBitmap(wx.Rect( 24, 130, 25, 27)) lib['periodicTableLaOff'] = ptableOff.GetSubBitmap(wx.Rect( 48, 130, 25, 27)) lib['periodicTableHfOff'] = ptableOff.GetSubBitmap(wx.Rect( 72, 130, 25, 27)) lib['periodicTableTaOff'] = ptableOff.GetSubBitmap(wx.Rect( 96, 130, 25, 27)) lib['periodicTableWOff'] = ptableOff.GetSubBitmap(wx.Rect( 120, 130, 25, 27)) lib['periodicTableReOff'] = ptableOff.GetSubBitmap( wx.Rect(144, 130, 25, 27)) lib['periodicTableOsOff'] = ptableOff.GetSubBitmap( wx.Rect(168, 130, 25, 27)) lib['periodicTableIrOff'] = ptableOff.GetSubBitmap( wx.Rect(192, 130, 25, 27)) lib['periodicTablePtOff'] = ptableOff.GetSubBitmap( wx.Rect(216, 130, 25, 27)) lib['periodicTableAuOff'] = ptableOff.GetSubBitmap( wx.Rect(240, 130, 25, 27)) lib['periodicTableHgOff'] = ptableOff.GetSubBitmap( wx.Rect(264, 130, 25, 27)) lib['periodicTableTlOff'] = ptableOff.GetSubBitmap( wx.Rect(288, 130, 25, 27)) lib['periodicTablePbOff'] = ptableOff.GetSubBitmap( wx.Rect(312, 130, 25, 27)) lib['periodicTableBiOff'] = ptableOff.GetSubBitmap( wx.Rect(336, 130, 25, 27)) lib['periodicTablePoOff'] = ptableOff.GetSubBitmap( wx.Rect(360, 130, 25, 27)) lib['periodicTableAtOff'] = ptableOff.GetSubBitmap( wx.Rect(384, 130, 25, 27)) lib['periodicTableRnOff'] = ptableOff.GetSubBitmap( wx.Rect(408, 130, 25, 27)) lib['periodicTableFrOff'] = ptableOff.GetSubBitmap(wx.Rect(0, 156, 25, 27)) lib['periodicTableRaOff'] = ptableOff.GetSubBitmap(wx.Rect( 24, 156, 25, 27)) lib['periodicTableAcOff'] = ptableOff.GetSubBitmap(wx.Rect( 48, 156, 25, 27)) lib['periodicTableCeOff'] = ptableOff.GetSubBitmap(wx.Rect( 72, 202, 25, 27)) lib['periodicTablePrOff'] = ptableOff.GetSubBitmap(wx.Rect( 96, 202, 25, 27)) lib['periodicTableNdOff'] = ptableOff.GetSubBitmap( wx.Rect(120, 202, 25, 27)) lib['periodicTablePmOff'] = ptableOff.GetSubBitmap( wx.Rect(144, 202, 25, 27)) lib['periodicTableSmOff'] = ptableOff.GetSubBitmap( wx.Rect(168, 202, 25, 27)) lib['periodicTableEuOff'] = ptableOff.GetSubBitmap( wx.Rect(192, 202, 25, 27)) lib['periodicTableGdOff'] = ptableOff.GetSubBitmap( wx.Rect(216, 202, 25, 27)) lib['periodicTableTbOff'] = ptableOff.GetSubBitmap( wx.Rect(240, 202, 25, 27)) lib['periodicTableDyOff'] = ptableOff.GetSubBitmap( wx.Rect(264, 202, 25, 27)) lib['periodicTableHoOff'] = ptableOff.GetSubBitmap( wx.Rect(288, 202, 25, 27)) lib['periodicTableErOff'] = ptableOff.GetSubBitmap( wx.Rect(312, 202, 25, 27)) lib['periodicTableTmOff'] = ptableOff.GetSubBitmap( wx.Rect(336, 202, 25, 27)) lib['periodicTableYbOff'] = ptableOff.GetSubBitmap( wx.Rect(360, 202, 25, 27)) lib['periodicTableLuOff'] = ptableOff.GetSubBitmap( wx.Rect(384, 202, 25, 27)) lib['periodicTableThOff'] = ptableOff.GetSubBitmap(wx.Rect( 72, 228, 25, 27)) lib['periodicTablePaOff'] = ptableOff.GetSubBitmap(wx.Rect( 96, 228, 25, 27)) lib['periodicTableUOff'] = ptableOff.GetSubBitmap(wx.Rect( 120, 228, 25, 27)) lib['periodicTableNpOff'] = ptableOff.GetSubBitmap( wx.Rect(144, 228, 25, 27)) lib['periodicTablePuOff'] = ptableOff.GetSubBitmap( wx.Rect(168, 228, 25, 27)) lib['periodicTableAmOff'] = ptableOff.GetSubBitmap( wx.Rect(192, 228, 25, 27)) lib['periodicTableCmOff'] = ptableOff.GetSubBitmap( wx.Rect(216, 228, 25, 27)) lib['periodicTableBkOff'] = ptableOff.GetSubBitmap( wx.Rect(240, 228, 25, 27)) lib['periodicTableCfOff'] = ptableOff.GetSubBitmap( wx.Rect(264, 228, 25, 27)) lib['periodicTableEsOff'] = ptableOff.GetSubBitmap( wx.Rect(288, 228, 25, 27)) lib['periodicTableFmOff'] = ptableOff.GetSubBitmap( wx.Rect(312, 228, 25, 27)) lib['periodicTableMdOff'] = ptableOff.GetSubBitmap( wx.Rect(336, 228, 25, 27)) lib['periodicTableNoOff'] = ptableOff.GetSubBitmap( wx.Rect(360, 228, 25, 27)) lib['periodicTableLrOff'] = ptableOff.GetSubBitmap( wx.Rect(384, 228, 25, 27)) lib['periodicTableHSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 0, 25, 27)) lib['periodicTableHeSel'] = ptableSel.GetSubBitmap(wx.Rect(408, 0, 25, 27)) lib['periodicTableLiSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 26, 25, 27)) lib['periodicTableBeSel'] = ptableSel.GetSubBitmap(wx.Rect(24, 26, 25, 27)) lib['periodicTableBSel'] = ptableSel.GetSubBitmap(wx.Rect(288, 26, 25, 27)) lib['periodicTableCSel'] = ptableSel.GetSubBitmap(wx.Rect(312, 26, 25, 27)) lib['periodicTableNSel'] = ptableSel.GetSubBitmap(wx.Rect(336, 26, 25, 27)) lib['periodicTableOSel'] = ptableSel.GetSubBitmap(wx.Rect(360, 26, 25, 27)) lib['periodicTableFSel'] = ptableSel.GetSubBitmap(wx.Rect(384, 26, 25, 27)) lib['periodicTableNeSel'] = ptableSel.GetSubBitmap(wx.Rect( 408, 26, 25, 27)) lib['periodicTableNaSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 52, 25, 27)) lib['periodicTableMgSel'] = ptableSel.GetSubBitmap(wx.Rect(24, 52, 25, 27)) lib['periodicTableAlSel'] = ptableSel.GetSubBitmap(wx.Rect( 288, 52, 25, 27)) lib['periodicTableSiSel'] = ptableSel.GetSubBitmap(wx.Rect( 312, 52, 25, 27)) lib['periodicTablePSel'] = ptableSel.GetSubBitmap(wx.Rect(336, 52, 25, 27)) lib['periodicTableSSel'] = ptableSel.GetSubBitmap(wx.Rect(360, 52, 25, 27)) lib['periodicTableClSel'] = ptableSel.GetSubBitmap(wx.Rect( 384, 52, 25, 27)) lib['periodicTableArSel'] = ptableSel.GetSubBitmap(wx.Rect( 408, 52, 25, 27)) lib['periodicTableKSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 78, 25, 27)) lib['periodicTableCaSel'] = ptableSel.GetSubBitmap(wx.Rect(24, 78, 25, 27)) lib['periodicTableScSel'] = ptableSel.GetSubBitmap(wx.Rect(48, 78, 25, 27)) lib['periodicTableTiSel'] = ptableSel.GetSubBitmap(wx.Rect(72, 78, 25, 27)) lib['periodicTableVSel'] = ptableSel.GetSubBitmap(wx.Rect(96, 78, 25, 27)) lib['periodicTableCrSel'] = ptableSel.GetSubBitmap(wx.Rect( 120, 78, 25, 27)) lib['periodicTableMnSel'] = ptableSel.GetSubBitmap(wx.Rect( 144, 78, 25, 27)) lib['periodicTableFeSel'] = ptableSel.GetSubBitmap(wx.Rect( 168, 78, 25, 27)) lib['periodicTableCoSel'] = ptableSel.GetSubBitmap(wx.Rect( 192, 78, 25, 27)) lib['periodicTableNiSel'] = ptableSel.GetSubBitmap(wx.Rect( 216, 78, 25, 27)) lib['periodicTableCuSel'] = ptableSel.GetSubBitmap(wx.Rect( 240, 78, 25, 27)) lib['periodicTableZnSel'] = ptableSel.GetSubBitmap(wx.Rect( 264, 78, 25, 27)) lib['periodicTableGaSel'] = ptableSel.GetSubBitmap(wx.Rect( 288, 78, 25, 27)) lib['periodicTableGeSel'] = ptableSel.GetSubBitmap(wx.Rect( 312, 78, 25, 27)) lib['periodicTableAsSel'] = ptableSel.GetSubBitmap(wx.Rect( 336, 78, 25, 27)) lib['periodicTableSeSel'] = ptableSel.GetSubBitmap(wx.Rect( 360, 78, 25, 27)) lib['periodicTableBrSel'] = ptableSel.GetSubBitmap(wx.Rect( 384, 78, 25, 27)) lib['periodicTableKrSel'] = ptableSel.GetSubBitmap(wx.Rect( 408, 78, 25, 27)) lib['periodicTableRbSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 104, 25, 27)) lib['periodicTableSrSel'] = ptableSel.GetSubBitmap(wx.Rect( 24, 104, 25, 27)) lib['periodicTableYSel'] = ptableSel.GetSubBitmap(wx.Rect(48, 104, 25, 27)) lib['periodicTableZrSel'] = ptableSel.GetSubBitmap(wx.Rect( 72, 104, 25, 27)) lib['periodicTableNbSel'] = ptableSel.GetSubBitmap(wx.Rect( 96, 104, 25, 27)) lib['periodicTableMoSel'] = ptableSel.GetSubBitmap( wx.Rect(120, 104, 25, 27)) lib['periodicTableTcSel'] = ptableSel.GetSubBitmap( wx.Rect(144, 104, 25, 27)) lib['periodicTableRuSel'] = ptableSel.GetSubBitmap( wx.Rect(168, 104, 25, 27)) lib['periodicTableRhSel'] = ptableSel.GetSubBitmap( wx.Rect(192, 104, 25, 27)) lib['periodicTablePdSel'] = ptableSel.GetSubBitmap( wx.Rect(216, 104, 25, 27)) lib['periodicTableAgSel'] = ptableSel.GetSubBitmap( wx.Rect(240, 104, 25, 27)) lib['periodicTableCdSel'] = ptableSel.GetSubBitmap( wx.Rect(264, 104, 25, 27)) lib['periodicTableInSel'] = ptableSel.GetSubBitmap( wx.Rect(288, 104, 25, 27)) lib['periodicTableSnSel'] = ptableSel.GetSubBitmap( wx.Rect(312, 104, 25, 27)) lib['periodicTableSbSel'] = ptableSel.GetSubBitmap( wx.Rect(336, 104, 25, 27)) lib['periodicTableTeSel'] = ptableSel.GetSubBitmap( wx.Rect(360, 104, 25, 27)) lib['periodicTableISel'] = ptableSel.GetSubBitmap(wx.Rect( 384, 104, 25, 27)) lib['periodicTableXeSel'] = ptableSel.GetSubBitmap( wx.Rect(408, 104, 25, 27)) lib['periodicTableCsSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 130, 25, 27)) lib['periodicTableBaSel'] = ptableSel.GetSubBitmap(wx.Rect( 24, 130, 25, 27)) lib['periodicTableLaSel'] = ptableSel.GetSubBitmap(wx.Rect( 48, 130, 25, 27)) lib['periodicTableHfSel'] = ptableSel.GetSubBitmap(wx.Rect( 72, 130, 25, 27)) lib['periodicTableTaSel'] = ptableSel.GetSubBitmap(wx.Rect( 96, 130, 25, 27)) lib['periodicTableWSel'] = ptableSel.GetSubBitmap(wx.Rect( 120, 130, 25, 27)) lib['periodicTableReSel'] = ptableSel.GetSubBitmap( wx.Rect(144, 130, 25, 27)) lib['periodicTableOsSel'] = ptableSel.GetSubBitmap( wx.Rect(168, 130, 25, 27)) lib['periodicTableIrSel'] = ptableSel.GetSubBitmap( wx.Rect(192, 130, 25, 27)) lib['periodicTablePtSel'] = ptableSel.GetSubBitmap( wx.Rect(216, 130, 25, 27)) lib['periodicTableAuSel'] = ptableSel.GetSubBitmap( wx.Rect(240, 130, 25, 27)) lib['periodicTableHgSel'] = ptableSel.GetSubBitmap( wx.Rect(264, 130, 25, 27)) lib['periodicTableTlSel'] = ptableSel.GetSubBitmap( wx.Rect(288, 130, 25, 27)) lib['periodicTablePbSel'] = ptableSel.GetSubBitmap( wx.Rect(312, 130, 25, 27)) lib['periodicTableBiSel'] = ptableSel.GetSubBitmap( wx.Rect(336, 130, 25, 27)) lib['periodicTablePoSel'] = ptableSel.GetSubBitmap( wx.Rect(360, 130, 25, 27)) lib['periodicTableAtSel'] = ptableSel.GetSubBitmap( wx.Rect(384, 130, 25, 27)) lib['periodicTableRnSel'] = ptableSel.GetSubBitmap( wx.Rect(408, 130, 25, 27)) lib['periodicTableFrSel'] = ptableSel.GetSubBitmap(wx.Rect(0, 156, 25, 27)) lib['periodicTableRaSel'] = ptableSel.GetSubBitmap(wx.Rect( 24, 156, 25, 27)) lib['periodicTableAcSel'] = ptableSel.GetSubBitmap(wx.Rect( 48, 156, 25, 27)) lib['periodicTableCeSel'] = ptableSel.GetSubBitmap(wx.Rect( 72, 202, 25, 27)) lib['periodicTablePrSel'] = ptableSel.GetSubBitmap(wx.Rect( 96, 202, 25, 27)) lib['periodicTableNdSel'] = ptableSel.GetSubBitmap( wx.Rect(120, 202, 25, 27)) lib['periodicTablePmSel'] = ptableSel.GetSubBitmap( wx.Rect(144, 202, 25, 27)) lib['periodicTableSmSel'] = ptableSel.GetSubBitmap( wx.Rect(168, 202, 25, 27)) lib['periodicTableEuSel'] = ptableSel.GetSubBitmap( wx.Rect(192, 202, 25, 27)) lib['periodicTableGdSel'] = ptableSel.GetSubBitmap( wx.Rect(216, 202, 25, 27)) lib['periodicTableTbSel'] = ptableSel.GetSubBitmap( wx.Rect(240, 202, 25, 27)) lib['periodicTableDySel'] = ptableSel.GetSubBitmap( wx.Rect(264, 202, 25, 27)) lib['periodicTableHoSel'] = ptableSel.GetSubBitmap( wx.Rect(288, 202, 25, 27)) lib['periodicTableErSel'] = ptableSel.GetSubBitmap( wx.Rect(312, 202, 25, 27)) lib['periodicTableTmSel'] = ptableSel.GetSubBitmap( wx.Rect(336, 202, 25, 27)) lib['periodicTableYbSel'] = ptableSel.GetSubBitmap( wx.Rect(360, 202, 25, 27)) lib['periodicTableLuSel'] = ptableSel.GetSubBitmap( wx.Rect(384, 202, 25, 27)) lib['periodicTableThSel'] = ptableSel.GetSubBitmap(wx.Rect( 72, 228, 25, 27)) lib['periodicTablePaSel'] = ptableSel.GetSubBitmap(wx.Rect( 96, 228, 25, 27)) lib['periodicTableUSel'] = ptableSel.GetSubBitmap(wx.Rect( 120, 228, 25, 27)) lib['periodicTableNpSel'] = ptableSel.GetSubBitmap( wx.Rect(144, 228, 25, 27)) lib['periodicTablePuSel'] = ptableSel.GetSubBitmap( wx.Rect(168, 228, 25, 27)) lib['periodicTableAmSel'] = ptableSel.GetSubBitmap( wx.Rect(192, 228, 25, 27)) lib['periodicTableCmSel'] = ptableSel.GetSubBitmap( wx.Rect(216, 228, 25, 27)) lib['periodicTableBkSel'] = ptableSel.GetSubBitmap( wx.Rect(240, 228, 25, 27)) lib['periodicTableCfSel'] = ptableSel.GetSubBitmap( wx.Rect(264, 228, 25, 27)) lib['periodicTableEsSel'] = ptableSel.GetSubBitmap( wx.Rect(288, 228, 25, 27)) lib['periodicTableFmSel'] = ptableSel.GetSubBitmap( wx.Rect(312, 228, 25, 27)) lib['periodicTableMdSel'] = ptableSel.GetSubBitmap( wx.Rect(336, 228, 25, 27)) lib['periodicTableNoSel'] = ptableSel.GetSubBitmap( wx.Rect(360, 228, 25, 27)) lib['periodicTableLrSel'] = ptableSel.GetSubBitmap( wx.Rect(384, 228, 25, 27))