當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。