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


Python wx.EVT_IDLE属性代码示例

本文整理汇总了Python中wx.EVT_IDLE属性的典型用法代码示例。如果您正苦于以下问题:Python wx.EVT_IDLE属性的具体用法?Python wx.EVT_IDLE怎么用?Python wx.EVT_IDLE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.EVT_IDLE属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: draw_idle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def draw_idle(self):
        """
        Delay rendering until the GUI is idle.
        """
        DEBUG_MSG("draw_idle()", 1, self)
        self._isDrawn = False  # Force redraw
        # Create a timer for handling draw_idle requests
        # If there are events pending when the timer is
        # complete, reset the timer and continue.  The
        # alternative approach, binding to wx.EVT_IDLE,
        # doesn't behave as nicely.
        if hasattr(self,'_idletimer'):
            self._idletimer.Restart(IDLE_DELAY)
        else:
            self._idletimer = wx.FutureCall(IDLE_DELAY,self._onDrawIdle)
            # FutureCall is a backwards-compatible alias;
            # CallLater became available in 2.7.1.1. 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:19,代码来源:backend_wx.py

示例2: m_splitter2OnIdle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def m_splitter2OnIdle( self, event ):
#         self.m_splitter2.SetSashPosition( 0 )
        self.m_splitter2.Unbind( wx.EVT_IDLE ) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:5,代码来源:pyResManDialog.py

示例3: m_splitter2OnIdle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def m_splitter2OnIdle( self, event ):
		self.m_splitter2.SetSashPosition( 0 )
		self.m_splitter2.Unbind( wx.EVT_IDLE ) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:5,代码来源:pyResManDialogBase.py

示例4: m_splitter21OnIdle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def m_splitter21OnIdle( self, event ):
		self.m_splitter21.SetSashPosition( 0 )
		self.m_splitter21.Unbind( wx.EVT_IDLE ) 
开发者ID:JavaCardOS,项目名称:pyResMan,代码行数:5,代码来源:pyResManDialogBase.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def __init__(self, parent, wxid=wx.ID_ANY):
        wx.StatusBar.__init__(self, parent, wxid, style=wx.ST_SIZEGRIP|wx.WS_EX_PROCESS_IDLE )
        self.SetFieldsCount(2)
        self.SetStatusWidths([-2, self.status_text_width+32])
##        self.SetFieldsCount(3)
##        self.SetStatusWidths([-2, 24, self.status_text_width+32])
##        self.sizeChanged = False
        self.status_label = StatusLabel()
        self.current_text = ''
##        self.Bind(wx.EVT_SIZE, self.OnSize)
##        # idle events? why?
##        self.Bind(wx.EVT_IDLE, self.OnIdle)
##        self.status_light = StatusLight(self)
##        self.Reposition() 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:16,代码来源:DownloadManager.py

示例6: OnInit

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def OnInit(self):
        sys.stdout = sys.__stdout__
        sys.stderr = sys.__stderr__

        # replace text based exception handler by a graphical exception dialog
        sys.excepthook = self.graphical_exception_handler

        # use graphical implementation to show caught exceptions
        self._exception_orig = logging.exception  # Reference to original implementation of logging.exception()
        logging.exception = self.exception

        # needed for wx >= 2.3.4 to disable wxPyAssertionError exceptions
        if not config.debugging:
            self.SetAssertMode(0)

        common.init_preferences()

        self.locale = wx.Locale(wx.LANGUAGE_DEFAULT)  # avoid PyAssertionErrors
        #compat.wx_ArtProviderPush(wxGladeArtProvider())

        frame = wxGladeFrame()
        self.SetTopWindow(frame)
        self.SetExitOnFrameDelete(True)

        self.Bind(wx.EVT_IDLE, self.OnIdle)

        return True 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:29,代码来源:main.py

示例7: init_gl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def init_gl(self):
		print('creating Frame')
		self.window = wx.Frame ( parent=None, id=wx.ID_ANY, title=self.title,
			style=wx.DEFAULT_FRAME_STYLE|wx.WS_EX_PROCESS_IDLE )
		print('creating GLCanvas')
		self.canvas = glcanvas.GLCanvas ( self.window, glcanvas.WX_GL_RGBA )
		print('creating GLContext')
		self.context = glcanvas.GLContext(self.canvas)
		self.canvas.SetFocus()
		self.window.SetSize ( (self.renderer.window_size[0], self.renderer.window_size[1]) )
		print('showing Frame')
		self.window.Show(True)
		
		print('calling SetTopWindow')
		self.SetTopWindow(self.window)
		
		self.Bind ( wx.EVT_CHAR, self.OnChar )
		self.canvas.Bind ( wx.EVT_SIZE, self.OnCanvasSize )
		self.canvas.Bind ( wx.EVT_PAINT, self.OnCanvasPaint )
		
		wx.IdleEvent.SetMode ( wx.IDLE_PROCESS_SPECIFIED )
		self.Bind ( wx.EVT_IDLE, self.OnIdle )
		
		print('making context current')
		self.canvas.SetCurrent ( self.context )
		self.renderer.init_gl() 
开发者ID:cmbruns,项目名称:pyopenvr,代码行数:28,代码来源:wx_app.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def __init__(self, parent):
        wx.StatusBar.__init__(self, parent, -1)
        self.sizeChanged = False
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_IDLE, self.OnIdle)
        self.SetFieldsCount(2)
        self.SetStatusWidths([-1, 40])
        self.icons = [
            GetInternalBitmap("Tray1"),
            GetInternalBitmap("Tray3"),
            GetInternalBitmap("Tray2"),
        ]
        self.icon = wx.StaticBitmap(self, -1, self.icons[0], (0, 0), (16, 16))
        rect = self.GetFieldRect(0)

        checkBox = wx.CheckBox(self, -1, eg.text.MainFrame.onlyLogAssigned)
        self.checkBox = checkBox
        colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
        checkBox.SetBackgroundColour(colour)
        self.checkBoxColour = checkBox.GetForegroundColour()
        checkBox.SetValue(eg.config.onlyLogAssigned)
        self.SetCheckBoxColour(eg.config.onlyLogAssigned)
        checkBox.Bind(wx.EVT_CHECKBOX, self.OnCheckBox)
        checkBox.SetPosition((rect.x + 2, rect.y + 2))
        checkBox.SetToolTipString(eg.text.MainFrame.onlyLogAssignedToolTip)

        eg.Bind("ProcessingChange", self.OnProcessingChange)
        self.Reposition() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:30,代码来源:StatusBar.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def __init__(self, objectListView, updatePeriod=0):
        self.objectListView = objectListView # Must not be None
        self.updatePeriod = updatePeriod

        self.objectListView.Bind(wx.EVT_IDLE, self._HandleIdle)

        self.newModelObjects = BatchedUpdate.NOT_SET
        self.objectsToAdd = list()
        self.objectsToRefresh = list()
        self.objectsToRemove = list()
        self.freezeUntil = 0 
开发者ID:JackonYang,项目名称:bookhub,代码行数:13,代码来源:ObjectListView.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def __init__(self, outer_panel, i_bmp_in):
        super(multi_img_scrollable, self).__init__(outer_panel)
        self.parent_panel = outer_panel
        self.lst_2d_bmp = i_bmp_in
        self.SetBackgroundColour(wx.Colour(200, 200, 200))

        self.mainSizer = wx.BoxSizer(wx.VERTICAL)

        self.n_img = 0
        self.img_lst_v_sizer = wx.BoxSizer(wx.VERTICAL)

        self.set_scroll_content()

        self.mainSizer.Add(self.img_lst_v_sizer, 0, wx.CENTER | wx.ALL, 10)
        self.SetSizer(self.mainSizer)

        self.SetupScrolling()
        self.SetScrollRate(1, 1)
        self.Mouse_Pos_x = -1
        self.Mouse_Pos_y = -1
        self.old_Mouse_Pos_x = -1
        self.old_Mouse_Pos_y = -1
        self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)
        self.Bind(wx.EVT_MOTION, self.OnMouseMotion)
        self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftButDown)
        self.Bind(wx.EVT_LEFT_UP, self.OnLeftButUp)
        self.Bind(wx.EVT_IDLE, self.OnIdle)
        self.scroll_rot = 0 
开发者ID:dials,项目名称:dials,代码行数:30,代码来源:viewer_low_level_util.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_IDLE [as 别名]
def __init__(self, parent):
        gridlib.Grid.__init__(self, parent, -1)
        table = PDFTable()             # initialize table
        self.Bind(wx.EVT_IDLE, self.OnIdle)
        self.do_title = False          # idling event: autosize title column
        self.bookmark_page = 0         # idling event: redisplay PDF image
        self.bookmark = -1             # idling event: bookmark position change
        self.bookmark_row = 0          # idling event: row number
#==============================================================================
# announce table to Grid
# 'True' = enable Grid to manage the table (destroy, etc.)
#==============================================================================
        self.SetTable(table, True)
#==============================================================================
# set font, width, alignment in the grid
#==============================================================================
        self.SetDefaultCellFont(wx.Font(wx.NORMAL_FONT.GetPointSize(),
                 70, 90, 90, False, "DejaVu Sans Mono"))

        # center columns (indent level)
        ct_al1 = gridlib.GridCellAttr()
        ct_al1.SetAlignment(wx.ALIGN_CENTER, wx.ALIGN_CENTER)
        self.SetColAttr(0, ct_al1)
        self.SetColAttr(3, ct_al1)
        # page number right aligned
        re_al1 = gridlib.GridCellAttr()
        re_al1.SetAlignment(wx.ALIGN_RIGHT, wx.ALIGN_CENTER)
        self.SetColAttr(2, re_al1)

#==============================================================================
# Enable Row moving
#==============================================================================
        gridmovers.GridRowMover(self)

        self.Bind(gridmovers.EVT_GRID_ROW_MOVE, self.OnRowMove)
        self.Bind(gridlib.EVT_GRID_LABEL_LEFT_DCLICK, self.OnRowDup)
        self.Bind(gridlib.EVT_GRID_LABEL_LEFT_CLICK, self.OnRowDel)
        self.Bind(gridlib.EVT_GRID_CELL_LEFT_DCLICK, self.OnCellDClick)
        self.Bind(gridlib.EVT_GRID_CELL_LEFT_CLICK, self.OnCellClick)
        self.Bind(gridlib.EVT_GRID_CELL_CHANGING, self.OnCellChanging)
        self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)

#==============================================================================
# Event Method: handle key press events - only navigation tasks performed
#============================================================================== 
开发者ID:pymupdf,项目名称:PyMuPDF-Utilities,代码行数:47,代码来源:PDFoutline.py


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