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
|
.. 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.callables
.. highlight:: python
.. _wx.lib.pubsub.core.callables.CallArgsInfo:
==========================================================================================================================================
|phoenix_title| **wx.lib.pubsub.core.callables.CallArgsInfo**
==========================================================================================================================================
Represent the "signature" or protocol of a listener in the context of
topics.
|
|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>CallArgsInfo</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.callables.CallArgsInfo_inheritance.png" alt="Inheritance diagram of CallArgsInfo" 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.callables.CallArgsInfo.html" title="wx.lib.pubsub.core.callables.CallArgsInfo" alt="" coords="5,5,283,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.__init__` Inputs
:meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.getAllArgs`
:meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.getOptionalArgs`
:meth:`~wx.lib.pubsub.core.callables.CallArgsInfo.getRequiredArgs` Return a tuple of names indicating which call arguments
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: CallArgsInfo
Represent the "signature" or protocol of a listener in the context of
topics.
.. method:: __init__(self, func, firstArgIdx)
Inputs:
- Args and defaultVals are the complete set of arguments and
default values as obtained form inspect.getargspec();
- The firstArgIdx points to the first item in
args that is of use, so it is typically 0 if listener is a function,
and 1 if listener is a method.
- The acceptsAllKwargs should be true
if the listener has **kwargs in its protocol.
After construction,
- self.allParams will contain the subset of 'args' without first
firstArgIdx items,
- self.numRequired will indicate number of required arguments
(ie self.allParams[:self.numRequired] are the required args names);
- self.acceptsAllKwargs = acceptsAllKwargs
- self.autoTopicArgName will be the name of argument
in which to put the topic object for which pubsub message is
sent, or None. This is identified by the argument that has a
default value of AUTO_TOPIC.
For instance, listener(self, arg1, arg2=AUTO_TOPIC, arg3=None) will
have self.allParams = (arg1, arg2, arg3), self.numRequired=1, and
self.autoTopicArgName = 'arg2', whereas
listener(self, arg1, arg3=None) will have
self.allParams = (arg1, arg3), self.numRequired=1, and
self.autoTopicArgName = None.
.. method:: getAllArgs(self)
.. method:: getOptionalArgs(self)
.. method:: getRequiredArgs(self)
Return a tuple of names indicating which call arguments
are required to be present when pub.sendMessage(...) is called.
|