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


Python wx.PyEvent方法代码示例

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


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

示例1: OnInit

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def OnInit(self):
        self.running = True
        if profile:
            try:
                os.unlink(prof_file_name)
            except:
                pass
            self.prof = Profiler()
            self.prof.enable()
        
        wx.the_app = self
        self._DoIterationId = wx.NewEventType()
        self.Connect(-1, -1, self._DoIterationId, self._doIteration)
        self.evt = wx.PyEvent()
        self.evt.SetEventType(self._DoIterationId)
        self.event_queue = []

        # this breaks TreeListCtrl, and I'm too lazy to figure out why
        #wx.IdleEvent_SetMode(wx.IDLE_PROCESS_SPECIFIED)
        # this fixes 24bit-color toolbar buttons
        wx.SystemOptions_SetOptionInt("msw.remap", 0)
        icon_path = os.path.join(image_root, 'bittorrent.ico')
        self.icon = wx.Icon(icon_path, wx.BITMAP_TYPE_ICO)
        return True 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:26,代码来源:__init__.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, eventType, **kwargs):
        wx.PyEvent.__init__(self)
        self.SetEventType(EVENT_THREAD)
        self.type = eventType
        self.data = kwargs 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:7,代码来源:events.py

示例3: _PyEvent_Clone

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def _PyEvent_Clone(self):
    """
    Make a new instance of the event that is a copy of self.  
    
    Through the magic of Python this implementation should work for
    this and all derived classes.
    """
    # Create a new instance
    import copy
    clone = copy.copy(self)
    # and then invoke the C++ copy constructor to copy the C++ bits too.
    wx.PyEvent.__init__(clone, self)
    return clone 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:15,代码来源:core.py

示例4: CallAfter

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def CallAfter(callableObj, *args, **kw):
    """
    Call the specified function after the current and pending event
    handlers have been completed.  This is also good for making GUI
    method calls from non-GUI threads.  Any extra positional or
    keyword args are passed on to the callable when it is called.
    
    :param PyObject callableObj: the callable object
    :param args: arguments to be passed to the callable object
    :param kw: keywords to be passed to the callable object
    
    .. seealso::
        :class:`CallLater`
    """
    assert callable(callableObj), "callableObj is not callable"
    app = wx.GetApp()
    assert app is not None, 'No wx.App created yet'
    
    if not hasattr(app, "_CallAfterId"):
        app._CallAfterId = wx.NewEventType()
        app.Connect(-1, -1, app._CallAfterId,
                    lambda event: event.callable(*event.args, **event.kw) )
    evt = wx.PyEvent()
    evt.SetEventType(app._CallAfterId)
    evt.callable = callableObj
    evt.args = args
    evt.kw = kw
    wx.PostEvent(app, evt) 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:30,代码来源:core.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, event, data):
        wx.PyEvent.__init__(self)

        self.SetEventType(event)
        self.data = data

# A singleton class for event passing between
# different modules of GoSync 
开发者ID:hschauhan,项目名称:gosync,代码行数:10,代码来源:GoSyncEvents.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, linkinfo):
            wx.PyEvent.__init__(self)
            self.SetEventType(EVT_HTML_URL_CLICK)
            self.linkinfo = (linkinfo.GetHref(), linkinfo.GetTarget()) 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:6,代码来源:objdictedit.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, counter):
        wx.PyEvent.__init__(self)
        self.SetEventType(ID_BUTTON_PARSE_EVENT)
        self.counter = counter




# app = wx.App()
# frame_main = FrameParser(None)
# wx.TextEntryDialog(frame_main, 'a', 'as').ShowModal()
# frame_main.Show()
# app.MainLoop() 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:15,代码来源:frame_parser.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, data):
        wx.PyEvent.__init__(self)
        self.SetEventType(EVT_DLLOG_APPEND)
        self.data = data


# app = wx.App()
# # # frame_main = FrameParser(None)
# # #
# DialogCopyLink(None).Show()
# # # frame_main.Show()
# app.MainLoop() 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:14,代码来源:dialog_dllog.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, text):
        wx.PyEvent.__init__(self)
        self.SetEventType(EVT_OUTPUT_APPEND)
        self.text = text 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:6,代码来源:frame_merger.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self,func,args,kwds):
        wx.PyEvent.__init__(self)
        self.SetEventType(_EVT_INVOKE_METHOD)
        self.func = func
        self.args = args
        self.kwds = kwds
        self.event = threading.Event() 
开发者ID:xesscorp,项目名称:KiCost,代码行数:9,代码来源:wxAnyThread.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, linkinfo):
        wx.PyEvent.__init__(self)
        self.SetEventType(EVT_HTML_URL_CLICK)
        self.linkinfo = (linkinfo.GetHref(), linkinfo.GetTarget()) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:6,代码来源:dochtml.py

示例12: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import PyEvent [as 别名]
def __init__(self, data=None, recenter=False):
        wx.PyEvent.__init__(self)
        self.data = data
        self.recenter = recenter
        self.SetEventType(VIEWER_UPDATE_ID) 
开发者ID:dials,项目名称:dials,代码行数:7,代码来源:wx_viewer.py


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