当前位置: 首页>>代码示例>>Python>>正文


Python wx.StockCursor方法代码示例

本文整理汇总了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) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:21,代码来源:HtmlWindow.py

示例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() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:22,代码来源:RubberBand.py

示例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 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:19,代码来源:Viewer.py

示例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() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:18,代码来源:CustomStyledTextCtrl.py

示例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 ) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:5,代码来源:backend_wx.py

示例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 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:5,代码来源:DropTarget.py

示例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)) 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:4,代码来源:DropTarget.py

示例8: OnLeave

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def OnLeave(self):
        self.window.SetCursor(wx.StockCursor(wx.CURSOR_ARROW)) 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:4,代码来源:DropTarget.py

示例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) 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:6,代码来源:DropTarget.py

示例10: SetCursor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def SetCursor(window, cursor):
        window.SetCursor(wx.StockCursor(cursor)) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:4,代码来源:compat.py

示例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)) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:13,代码来源:__init__.py

示例12: HideCursor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def HideCursor(self):
        wx.CallAfter(self.SetCursor, wx.StockCursor(wx.CURSOR_BLANK)) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:4,代码来源:__init__.py

示例13: HideCursor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StockCursor [as 别名]
def HideCursor(self):
        wx.CallAfter(
            self.staticBitmap.SetCursor,
            wx.StockCursor(wx.CURSOR_BLANK)
        ) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:7,代码来源:__init__.py

示例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)) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:8,代码来源:__init__.py

示例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)] 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:11,代码来源:Viewer.py


注:本文中的wx.StockCursor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。