Python wx.StockCursor() Examples
The following are 20
code examples of wx.StockCursor().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: CustomStyledTextCtrl.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
def OnMotion(self, event): if wx.Platform == '__WXMSW__': if not event.Dragging(): x, _y = event.GetPosition() margin_width = reduce( lambda x, y: x + y, [self.GetMarginWidth(i) for i in xrange(3)], 0) if x <= margin_width: self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) else: self.SetCursor(wx.StockCursor(wx.CURSOR_IBEAM)) else: event.Skip() else: event.Skip()
Example #2
Source File: Viewer.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
def SetMode(self, mode): if self.Mode != mode or mode == MODE_SELECTION: if self.Mode == MODE_MOTION: wx.CallAfter(self.Editor.SetCursor, wx.NullCursor) self.Mode = mode self.SavedMode = False else: self.SavedMode = True # Reset selection if self.Mode != MODE_SELECTION and self.SelectedElement: self.SelectedElement.SetSelected(False) self.SelectedElement = None if self.Mode == MODE_MOTION: wx.CallAfter(self.Editor.SetCursor, wx.StockCursor(wx.CURSOR_HAND)) self.SavedMode = True # Return current drawing mode
Example #3
Source File: DropTarget.py From BitTorrent with GNU General Public License v3.0 | 6 votes |
def OnLeave(self): self.window.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
Example #4
Source File: DropTarget.py From BitTorrent with GNU General Public License v3.0 | 6 votes |
def OnDropFiles(self, x, y, filenames): self.window.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) for file in filenames: self.callback(file)
Example #5
Source File: RubberBand.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
def OnLeftDown(self, event, dc, scaling): """ Called when left mouse is pressed on Viewer. Starts to edit a new rubberband bounding box @param event: Mouse event @param dc: Device Context of Viewer @param scaling: PLCOpen scaling applied on Viewer """ # Save the point where mouse was pressed in Viewer unit, position may # be modified by scroll and zoom applied on viewer self.StartPoint = GetScaledEventPosition(event, dc, scaling) # Initialize rubberband bounding box self.CurrentBBox = wx.Rect(self.StartPoint.x, self.StartPoint.y, 0, 0) # Change viewer mouse cursor to reflect a rubberband bounding box is # edited self.DrawingSurface.SetCursor(wx.StockCursor(wx.CURSOR_CROSS)) self.Redraw()
Example #6
Source File: HtmlWindow.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def __init__( self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=HW_DEFAULT_STYLE, name="htmlWindow" ): wxHtmlWindow.__init__(self, parent, id, pos, size, style, name) self.SetForegroundColour(parent.GetForegroundColour()) self.SetBackgroundColour(parent.GetBackgroundColour()) #if wx.html.HW_NO_SELECTION & style: # self.Bind(wx.EVT_MOTION, self.OnIdle) # self.handCursor = wx.StockCursor(wx.CURSOR_HAND) # self.x1, self.y1 = self.GetScrollPixelsPerUnit() # self.isSet = False self.Bind(EVT_HTML_LINK_CLICKED, self.OnHtmlLinkClicked)
Example #7
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def SetDrawing(self, drawFunc, args): self.drawing = drawFunc d = GetMonitorDimensions()[self.displayNum] self.SetDimensions(d.x, d.y, d.width, d.height) self._buffer = wx.EmptyBitmap(d.width, d.height) dc = wx.BufferedDC(wx.ClientDC(self), self._buffer) self.drawing(dc, *args) #self.Refresh(eraseBackground=False) wx.Frame.Show(self, True) BringHwndToFront(self.GetHandle(), False) self.SetCursor(wx.StockCursor(wx.CURSOR_BLANK))
Example #8
Source File: pyslip.py From dials with BSD 3-Clause "New" or "Revised" License | 5 votes |
def OnRightDown(self, event): """Right mouse button down. Prepare for right select (no drag).""" click_posn = event.GetPositionTuple() if WX3 else event.GetPosition() if event.ShiftDown(): self.is_box_select = True self.SetCursor(wx.StockCursor(wx.CURSOR_CROSS)) (self.sbox_w, self.sbox_h) = (0, 0) (self.sbox_1_x, self.sbox_1_y) = click_posn event.Skip()
Example #9
Source File: pyslip.py From dials with BSD 3-Clause "New" or "Revised" License | 5 votes |
def OnLeftDown(self, event): """Left mouse button down. Prepare for possible drag.""" click_posn = event.GetPositionTuple() if WX3 else event.GetPosition() if event.ShiftDown(): self.is_box_select = True self.SetCursor(wx.StockCursor(wx.CURSOR_CROSS)) (self.sbox_w, self.sbox_h) = (0, 0) (self.sbox_1_x, self.sbox_1_y) = click_posn else: self.is_box_select = False self.SetCursor(wx.StockCursor(wx.CURSOR_HAND)) (self.last_drag_x, self.last_drag_y) = click_posn event.Skip()
Example #10
Source File: Viewer.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
def ResetCursors(): global CURSORS if CURSORS is None: CURSORS = [wx.NullCursor, wx.StockCursor(wx.CURSOR_HAND), wx.StockCursor(wx.CURSOR_SIZENWSE), wx.StockCursor(wx.CURSOR_SIZENESW), wx.StockCursor(wx.CURSOR_SIZEWE), wx.StockCursor(wx.CURSOR_SIZENS)]
Example #11
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def OnShowMe(self): self.Show() BringHwndToFront(self.GetHandle()) self.Raise() self.Update() self.staticBitmap.SetCursor(wx.StockCursor(wx.CURSOR_BLANK))
Example #12
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def HideCursor(self): wx.CallAfter( self.staticBitmap.SetCursor, wx.StockCursor(wx.CURSOR_BLANK) )
Example #13
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def HideCursor(self): wx.CallAfter(self.SetCursor, wx.StockCursor(wx.CURSOR_BLANK))
Example #14
Source File: backend_wx.py From Computable with MIT License | 5 votes |
def set_cursor(self, cursor): cursor =wx.StockCursor(cursord[cursor]) self.canvas.SetCursor( cursor )
Example #15
Source File: compat.py From wxGlade with MIT License | 5 votes |
def SetCursor(window, cursor): window.SetCursor(wx.StockCursor(cursor))
Example #16
Source File: DropTarget.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def OnEnter(self, x, y, d): self.window.SetCursor(wx.StockCursor(wx.CURSOR_COPY_ARROW))
Example #17
Source File: DropTarget.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def OnDragOver(self, a, b, c): self.window.SetCursor(wx.StockCursor(wx.CURSOR_COPY_ARROW)) return wx.DragCopy
Example #18
Source File: backend_wx.py From ImageFusion with MIT License | 5 votes |
def set_cursor(self, cursor): cursor =wx.StockCursor(cursord[cursor]) self.canvas.SetCursor( cursor )
Example #19
Source File: backend_wx.py From neural-network-animation with MIT License | 5 votes |
def set_cursor(self, cursor): cursor =wx.StockCursor(cursord[cursor]) self.canvas.SetCursor( cursor )
Example #20
Source File: backend_wx.py From matplotlib-4-abaqus with MIT License | 5 votes |
def set_cursor(self, cursor): cursor =wx.StockCursor(cursord[cursor]) self.canvas.SetCursor( cursor )