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
|
.. 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.utils.topictreeprinter
.. highlight:: python
.. _wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter:
==========================================================================================================================================
|phoenix_title| **wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter**
==========================================================================================================================================
Example topic tree visitor that prints a prettified representation
of topic tree by doing a depth-first traversal of topic tree and
print information at each (topic) node of tree. Extra info to be
printed is specified via the 'extra' kwarg. Its value must be a
list of characters, the order determines output order:
- D: print description of topic
- a: print kwarg names only
- A: print topic kwargs and their description
- L: print listeners currently subscribed to topic
E.g. TopicTreePrinter(extra='LaDA') would print, for each topic,
the list of subscribed listeners, the topic's list of kwargs, the
topic description, and the description for each kwarg,
>>> Topic "delTopic"
>> Listeners:
> listener1_2880 (from yourModule)
> listener2_3450 (from yourModule)
>> Names of Message arguments:
> arg1
> arg2
>> Description: whenever a topic is deleted
>> Descriptions of Message arguments:
> arg1: (required) its description
> arg2: some other description
|
|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>TopicTreePrinter</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.utils.topictreeprinter.TopicTreePrinter_inheritance.png" alt="Inheritance diagram of TopicTreePrinter" 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.utils.topictreeprinter.TopicTreePrinter.html" title="wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter" alt="" coords="14,83,356,112"/> <area shape="rect" id="node2" href="wx.lib.pubsub.core.topictreetraverser.ITopicTreeVisitor.html" title="wx.lib.pubsub.core.topictreetraverser.ITopicTreeVisitor" alt="" coords="5,5,365,35"/> </map>
</p>
|
|super_classes| Known Superclasses
==================================
:class:`wx.lib.pubsub.core.topictreetraverser.ITopicTreeVisitor`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter.__init__` Topic tree printer will print listeners for each topic only
:meth:`~wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter.getOutput`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: TopicTreePrinter(ITopicTreeVisitor)
Example topic tree visitor that prints a prettified representation
of topic tree by doing a depth-first traversal of topic tree and
print information at each (topic) node of tree. Extra info to be
printed is specified via the 'extra' kwarg. Its value must be a
list of characters, the order determines output order:
- D: print description of topic
- a: print kwarg names only
- A: print topic kwargs and their description
- L: print listeners currently subscribed to topic
E.g. TopicTreePrinter(extra='LaDA') would print, for each topic,
the list of subscribed listeners, the topic's list of kwargs, the
topic description, and the description for each kwarg,
>>> Topic "delTopic"
>> Listeners:
> listener1_2880 (from yourModule)
> listener2_3450 (from yourModule)
>> Names of Message arguments:
> arg1
> arg2
>> Description: whenever a topic is deleted
>> Descriptions of Message arguments:
> arg1: (required) its description
> arg2: some other description
.. method:: __init__(self, extra=None, width=70, indentStep=4, bulletTopic='\\--', bulletTopicItem='|==', bulletTopicArg='-', fileObj=None)
Topic tree printer will print listeners for each topic only
if printListeners is True. The width will be used to limit
the width of text output, while indentStep is the number of
spaces added each time the text is indented further. The
three bullet parameters define the strings used for each
item (topic, topic items, and kwargs).
.. method:: getOutput(self)
|