本文整理汇总了Python中wx.StockCursor方法的典型用法代码示例。如果您正苦于以下问题:Python wx.StockCursor方法的具体用法?Python wx.StockCursor怎么用?Python wx.StockCursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.StockCursor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
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)
示例2: OnLeftDown
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
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()
示例3: SetMode
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
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
示例4: OnMotion
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
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()
示例5: set_cursor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def set_cursor(self, cursor):
cursor =wx.StockCursor(cursord[cursor])
self.canvas.SetCursor( cursor )
示例6: OnDragOver
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def OnDragOver(self, a, b, c):
self.window.SetCursor(wx.StockCursor(wx.CURSOR_COPY_ARROW))
return wx.DragCopy
示例7: OnEnter
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def OnEnter(self, x, y, d):
self.window.SetCursor(wx.StockCursor(wx.CURSOR_COPY_ARROW))
示例8: OnLeave
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def OnLeave(self):
self.window.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
示例9: OnDropFiles
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def OnDropFiles(self, x, y, filenames):
self.window.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
for file in filenames:
self.callback(file)
示例10: SetCursor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def SetCursor(window, cursor):
window.SetCursor(wx.StockCursor(cursor))
示例11: SetDrawing
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
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))
示例12: HideCursor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def HideCursor(self):
wx.CallAfter(self.SetCursor, wx.StockCursor(wx.CURSOR_BLANK))
示例13: HideCursor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def HideCursor(self):
wx.CallAfter(
self.staticBitmap.SetCursor,
wx.StockCursor(wx.CURSOR_BLANK)
)
示例14: OnShowMe
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def OnShowMe(self):
self.Show()
BringHwndToFront(self.GetHandle())
self.Raise()
self.Update()
self.staticBitmap.SetCursor(wx.StockCursor(wx.CURSOR_BLANK))
示例15: ResetCursors
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
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)]