1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.pubsub.core.notificationmgr
.. highlight:: python
.. _wx.lib.pubsub.core.notificationmgr.NotificationMgr:
==========================================================================================================================================
|phoenix_title| **wx.lib.pubsub.core.notificationmgr.NotificationMgr**
==========================================================================================================================================
Manages notifications for tracing pubsub activity. When pubsub takes a
certain action such as sending a message or creating a topic, and
the notification flag for that activity is True, all registered
notification handlers get corresponding method called with information
about the activity, such as which listener subscribed to which topic.
See INotificationHandler for which method gets called for each activity.
If more than one notification handler has been registered, the order in
which they are notified is unspecified (do not rely on it).
Note that this manager automatically unregisters all handlers when
the Python interpreter exits, to help avoid NoneType exceptions during
shutdown. This "shutdown" starts when the last line of app "main" has
executed; the Python interpreter then starts cleaning up, garbage
collecting everything, which could lead to various pubsub notifications
-- by then they should be of no interest -- such as dead
listeners, etc.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>NotificationMgr</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.pubsub.core.notificationmgr.NotificationMgr_inheritance.png" alt="Inheritance diagram of NotificationMgr" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.pubsub.core.notificationmgr.NotificationMgr.html" title="wx.lib.pubsub.core.notificationmgr.NotificationMgr" alt="" coords="5,5,344,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.__init__`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.addHandler`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.clearHandlers`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.getFlagStates` Return state of each notification flag, as a dict.
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.getHandlers`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.notifyDeadListener`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.notifyDelTopic`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.notifyNewTopic`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.notifySend`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.notifySubscribe`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.notifyUnsubscribe`
:meth:`~wx.lib.pubsub.core.notificationmgr.NotificationMgr.setFlagStates` Set the notification flag on/off for various aspects of pubsub.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: NotificationMgr
Manages notifications for tracing pubsub activity. When pubsub takes a
certain action such as sending a message or creating a topic, and
the notification flag for that activity is True, all registered
notification handlers get corresponding method called with information
about the activity, such as which listener subscribed to which topic.
See INotificationHandler for which method gets called for each activity.
If more than one notification handler has been registered, the order in
which they are notified is unspecified (do not rely on it).
Note that this manager automatically unregisters all handlers when
the Python interpreter exits, to help avoid NoneType exceptions during
shutdown. This "shutdown" starts when the last line of app "main" has
executed; the Python interpreter then starts cleaning up, garbage
collecting everything, which could lead to various pubsub notifications
-- by then they should be of no interest -- such as dead
listeners, etc.
.. method:: __init__(self, notificationHandler = None)
.. method:: addHandler(self, handler)
.. method:: clearHandlers(self)
.. method:: getFlagStates(self)
Return state of each notification flag, as a dict.
.. method:: getHandlers(self)
.. method:: notifyDeadListener(self, \*args, \*\*kwargs)
.. method:: notifyDelTopic(self, \*args, \*\*kwargs)
.. method:: notifyNewTopic(self, \*args, \*\*kwargs)
.. method:: notifySend(self, \*args, \*\*kwargs)
.. method:: notifySubscribe(self, \*args, \*\*kwargs)
.. method:: notifyUnsubscribe(self, \*args, \*\*kwargs)
.. method:: setFlagStates(self, subscribe=None, unsubscribe=None, deadListener=None, sendMessage=None, newTopic=None, delTopic=None, all=None)
Set the notification flag on/off for various aspects of pubsub.
The kwargs that are None are left at their current value. The 'all',
if not None, is set first. E.g.
mgr.setFlagStates(all=True, delTopic=False)
will toggle all notifications on, but will turn off the 'delTopic'
notification.
|