本文整理汇总了Python中wx.NullCursor方法的典型用法代码示例。如果您正苦于以下问题:Python wx.NullCursor方法的具体用法?Python wx.NullCursor怎么用?Python wx.NullCursor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.NullCursor方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_drop_widget
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def on_drop_widget(self, event, reset=None):
"""replaces self with a widget in self.sizer. This method is called
to add every non-toplevel widget or sizer, and in turn calls the
appropriate builder function (found in the ``common.widgets'' dict)"""
if not common.adding_widget: # widget focused/selecte
misc.set_focused_widget(self)
if self.widget:
self.widget.Refresh()
self.widget.SetFocus()
return
if common.adding_sizer and self.parent.CHILDREN != 1 and not self.IS_SLOT:
return
if self.widget:
self.widget.SetCursor(wx.NullCursor)
common.adding_window = event and event.GetEventObject().GetTopLevelParent() or None
# call the appropriate builder
new_widget = common.widgets[common.widget_to_add](self.parent, self.index)
if new_widget is None: return
misc.rebuild_tree(new_widget)
if reset is False: return
if event is None or not misc.event_modifier_copy(event):
common.adding_widget = common.adding_sizer = False
common.widget_to_add = None
示例2: OnLeftUp
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def OnLeftUp(self, event, dc, scaling):
"""
Called when mouse is release from Viewer. Erase the current edited
rubberband bounding box
@param event: Mouse event
@param dc: Device Context of Viewer
@param scaling: PLCOpen scaling applied on Viewer
"""
# Change viewer mouse cursor to default
self.DrawingSurface.SetCursor(wx.NullCursor)
# Save the last edited bounding box
self.LastBBox = self.CurrentBBox
self.CurrentBBox = None
self.Redraw()
示例3: SetMode
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [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: OnMouseEvent
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def OnMouseEvent(self, e):
if e.Moving():
self.SetCursor(wx.Cursor(wx.CURSOR_HAND))
self.SetFont(self.font1)
elif e.LeftUp():
OpenWith(self.openWith, self.url)
else:
self.SetCursor(wx.NullCursor)
self.SetFont(self.font2)
e.Skip()
示例5: SetHandler
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def SetHandler(self, w, h=None):
if h:
w.SetEventHandler(h)
w.SetCursor(wx.CROSS_CURSOR)
else:
w.SetEventHandler(w)
w.SetCursor(wx.NullCursor)
for ch in w.GetChildren():
self.SetHandler(ch, h)
示例6: drop_sizer
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def drop_sizer(self, event=None, reset=None):
if self.children or not common.adding_sizer:
self.on_set_focus(event) # default behaviour: call show_properties
return
if self.widget: self.widget.SetCursor(wx.NullCursor)
new_widget = common.widgets[common.widget_to_add](self, None)
if new_widget is None: return
misc.rebuild_tree(new_widget)
if reset is False: return
if event is None or not misc.event_modifier_copy(event):
common.adding_widget = common.adding_sizer = False
common.widget_to_add = None
示例7: ShowCursor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def ShowCursor(self, event):
self.SetCursor(wx.NullCursor)
if self.timer:
self.timer.cancel()
self.timer = Timer(2.0, self.HideCursor)
self.timer.start()
event.Skip()
示例8: ShowCursor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def ShowCursor(self, event):
self.staticBitmap.SetCursor(wx.NullCursor)
self.timer.cancel()
self.timer = Timer(2.0, self.HideCursor)
self.timer.start()
event.Skip()
示例9: ResetCursors
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [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)]
示例10: OnLeave
# 需要导入模块: import wx [as 别名]
# 或者: from wx import NullCursor [as 别名]
def OnLeave(self, event):
"""
Function called when mouse leave Viewer
@param event: wx.MouseEvent
"""
# If Viewer is not resizing, reset resize highlight
if self.CanvasStartSize is None:
self.SetHighlight(HIGHLIGHT_NONE)
self.SetCursor(wx.NullCursor)
DebugVariableViewer.OnLeave(self, event)
else:
event.Skip()