[7e4a6ff] | 1 | |
---|
| 2 | |
---|
| 3 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 4 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 5 | |
---|
| 6 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 7 | <head> |
---|
| 8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
| 9 | |
---|
| 10 | <title>invariant — invariantview v0.1.0 documentation</title> |
---|
| 11 | <link rel="stylesheet" href="../_static/default.css" type="text/css" /> |
---|
| 12 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
| 13 | <script type="text/javascript"> |
---|
| 14 | var DOCUMENTATION_OPTIONS = { |
---|
| 15 | URL_ROOT: '../', |
---|
| 16 | VERSION: '0.1.0', |
---|
| 17 | COLLAPSE_INDEX: false, |
---|
| 18 | FILE_SUFFIX: '.html', |
---|
| 19 | HAS_SOURCE: true |
---|
| 20 | }; |
---|
| 21 | </script> |
---|
| 22 | <script type="text/javascript" src="../_static/jquery.js"></script> |
---|
| 23 | <script type="text/javascript" src="../_static/underscore.js"></script> |
---|
| 24 | <script type="text/javascript" src="../_static/doctools.js"></script> |
---|
| 25 | <link rel="top" title="invariantview v0.1.0 documentation" href="../index.html" /> |
---|
| 26 | <link rel="up" title="Reference" href="index.html" /> |
---|
| 27 | <link rel="prev" title="invariant_widgets" href="invariant_widgets.html" /> |
---|
| 28 | </head> |
---|
| 29 | <body> |
---|
| 30 | <div class="related"> |
---|
| 31 | <h3>Navigation</h3> |
---|
| 32 | <ul> |
---|
| 33 | <li class="right" style="margin-right: 10px"> |
---|
| 34 | <a href="../genindex.html" title="General Index" |
---|
| 35 | accesskey="I">index</a></li> |
---|
| 36 | <li class="right" > |
---|
| 37 | <a href="../py-modindex.html" title="Python Module Index" |
---|
| 38 | >modules</a> |</li> |
---|
| 39 | <li class="right" > |
---|
| 40 | <a href="invariant_widgets.html" title="invariant_widgets" |
---|
| 41 | accesskey="P">previous</a> |</li> |
---|
| 42 | <li><a href="../index.html">invariantview v0.1.0 documentation</a> »</li> |
---|
| 43 | <li><a href="index.html" accesskey="U">Reference</a> »</li> |
---|
| 44 | </ul> |
---|
| 45 | </div> |
---|
| 46 | |
---|
| 47 | <div class="document"> |
---|
| 48 | <div class="documentwrapper"> |
---|
| 49 | <div class="bodywrapper"> |
---|
| 50 | <div class="body"> |
---|
| 51 | |
---|
| 52 | <div class="section" id="invariant"> |
---|
| 53 | <h1>invariant<a class="headerlink" href="#invariant" title="Permalink to this headline">¶</a></h1> |
---|
| 54 | <div class="section" id="module-sans.perspectives.invariant.invariant"> |
---|
| 55 | <span id="sans-perspectives-invariant-invariant"></span><h2><a class="reference internal" href="#module-sans.perspectives.invariant.invariant"><tt class="xref py py-mod docutils literal"><span class="pre">sans.perspectives.invariant.invariant</span></tt></a><a class="headerlink" href="#module-sans.perspectives.invariant.invariant" title="Permalink to this headline">¶</a></h2> |
---|
| 56 | <dl class="class"> |
---|
| 57 | <dt id="sans.perspectives.invariant.invariant.Plugin"> |
---|
| 58 | <em class="property">class </em><tt class="descclassname">sans.perspectives.invariant.invariant.</tt><tt class="descname">Plugin</tt><big>(</big><em>standalone=False</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin" title="Permalink to this definition">¶</a></dt> |
---|
| 59 | <dd><p>This class defines the interface for invariant Plugin class |
---|
| 60 | that can be used by the gui_manager.</p> |
---|
| 61 | <dl class="method"> |
---|
| 62 | <dt id="sans.perspectives.invariant.invariant.Plugin.copy_data"> |
---|
| 63 | <tt class="descname">copy_data</tt><big>(</big><em>item</em>, <em>dy=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.copy_data" title="Permalink to this definition">¶</a></dt> |
---|
| 64 | <dd>receive a data 1D and the list of errors on dy |
---|
| 65 | and create a new data1D data</dd></dl> |
---|
| 66 | |
---|
| 67 | <dl class="method"> |
---|
| 68 | <dt id="sans.perspectives.invariant.invariant.Plugin.get_context_menu"> |
---|
| 69 | <tt class="descname">get_context_menu</tt><big>(</big><em>graph=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_context_menu" title="Permalink to this definition">¶</a></dt> |
---|
| 70 | <dd><p>This method is optional.</p> |
---|
| 71 | <p>When the context menu of a plot is rendered, the |
---|
| 72 | get_context_menu method will be called to give you a |
---|
| 73 | chance to add a menu item to the context menu.</p> |
---|
| 74 | <p>A ref to a Graph object is passed so that you can |
---|
| 75 | investigate the plot content and decide whether you |
---|
| 76 | need to add items to the context menu.</p> |
---|
| 77 | <p>This method returns a list of menu items. |
---|
| 78 | Each item is itself a list defining the text to |
---|
| 79 | appear in the menu, a tool-tip help text, and a |
---|
| 80 | call-back method.</p> |
---|
| 81 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 82 | <col class="field-name" /> |
---|
| 83 | <col class="field-body" /> |
---|
| 84 | <tbody valign="top"> |
---|
| 85 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 86 | <li><strong>graph</strong> – the Graph object to which we attach the context menu</li> |
---|
| 87 | </ul> |
---|
| 88 | </td> |
---|
| 89 | </tr> |
---|
| 90 | <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list of menu items with call-back function</p> |
---|
| 91 | </td> |
---|
| 92 | </tr> |
---|
| 93 | </tbody> |
---|
| 94 | </table> |
---|
| 95 | </dd></dl> |
---|
| 96 | |
---|
| 97 | <dl class="method"> |
---|
| 98 | <dt id="sans.perspectives.invariant.invariant.Plugin.get_panels"> |
---|
| 99 | <tt class="descname">get_panels</tt><big>(</big><em>parent</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_panels" title="Permalink to this definition">¶</a></dt> |
---|
| 100 | <dd><p>Create and return the list of wx.Panels for your plug-in. |
---|
| 101 | Define the plug-in perspective.</p> |
---|
| 102 | <p>Panels should inherit from DefaultPanel defined below, |
---|
| 103 | or should present the same interface. They must define |
---|
| 104 | “window_caption” and “window_name”.</p> |
---|
| 105 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 106 | <col class="field-name" /> |
---|
| 107 | <col class="field-body" /> |
---|
| 108 | <tbody valign="top"> |
---|
| 109 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 110 | <li><strong>parent</strong> – parent window</li> |
---|
| 111 | </ul> |
---|
| 112 | </td> |
---|
| 113 | </tr> |
---|
| 114 | <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list of panels</p> |
---|
| 115 | </td> |
---|
| 116 | </tr> |
---|
| 117 | </tbody> |
---|
| 118 | </table> |
---|
| 119 | </dd></dl> |
---|
| 120 | |
---|
| 121 | <dl class="method"> |
---|
| 122 | <dt id="sans.perspectives.invariant.invariant.Plugin.get_perspective"> |
---|
| 123 | <tt class="descname">get_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_perspective" title="Permalink to this definition">¶</a></dt> |
---|
| 124 | <dd>Get the list of panel names for this perspective</dd></dl> |
---|
| 125 | |
---|
| 126 | <dl class="method"> |
---|
| 127 | <dt id="sans.perspectives.invariant.invariant.Plugin.get_tools"> |
---|
| 128 | <tt class="descname">get_tools</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.get_tools" title="Permalink to this definition">¶</a></dt> |
---|
| 129 | <dd>Returns a set of menu entries for tools</dd></dl> |
---|
| 130 | |
---|
| 131 | <dl class="method"> |
---|
| 132 | <dt id="sans.perspectives.invariant.invariant.Plugin.help"> |
---|
| 133 | <tt class="descname">help</tt><big>(</big><em>evt</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.help" title="Permalink to this definition">¶</a></dt> |
---|
| 134 | <dd>Show a general help dialog.</dd></dl> |
---|
| 135 | |
---|
| 136 | <dl class="method"> |
---|
| 137 | <dt id="sans.perspectives.invariant.invariant.Plugin.on_perspective"> |
---|
| 138 | <tt class="descname">on_perspective</tt><big>(</big><em>event</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.on_perspective" title="Permalink to this definition">¶</a></dt> |
---|
| 139 | <dd><p>Call back function for the perspective menu item. |
---|
| 140 | We notify the parent window that the perspective |
---|
| 141 | has changed.</p> |
---|
| 142 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 143 | <col class="field-name" /> |
---|
| 144 | <col class="field-body" /> |
---|
| 145 | <tbody valign="top"> |
---|
| 146 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 147 | <li><strong>event</strong> – menu event</li> |
---|
| 148 | </ul> |
---|
| 149 | </td> |
---|
| 150 | </tr> |
---|
| 151 | </tbody> |
---|
| 152 | </table> |
---|
| 153 | </dd></dl> |
---|
| 154 | |
---|
| 155 | <dl class="method"> |
---|
| 156 | <dt id="sans.perspectives.invariant.invariant.Plugin.plot_data"> |
---|
| 157 | <tt class="descname">plot_data</tt><big>(</big><em>scale</em>, <em>background</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.plot_data" title="Permalink to this definition">¶</a></dt> |
---|
| 158 | <dd>replot the current data if the user enters a new scale or background</dd></dl> |
---|
| 159 | |
---|
| 160 | <dl class="method"> |
---|
| 161 | <dt id="sans.perspectives.invariant.invariant.Plugin.plot_theory"> |
---|
| 162 | <tt class="descname">plot_theory</tt><big>(</big><em>data=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.plot_theory" title="Permalink to this definition">¶</a></dt> |
---|
| 163 | <dd><p>Receive a data set and post a NewPlotEvent to parent.</p> |
---|
| 164 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 165 | <col class="field-name" /> |
---|
| 166 | <col class="field-body" /> |
---|
| 167 | <tbody valign="top"> |
---|
| 168 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
---|
| 169 | <li><strong>data</strong> – extrapolated data to be plotted</li> |
---|
| 170 | <li><strong>name</strong> – Data’s name to use for the legend</li> |
---|
| 171 | </ul> |
---|
| 172 | </td> |
---|
| 173 | </tr> |
---|
| 174 | </tbody> |
---|
| 175 | </table> |
---|
| 176 | </dd></dl> |
---|
| 177 | |
---|
| 178 | <dl class="method"> |
---|
| 179 | <dt id="sans.perspectives.invariant.invariant.Plugin.populate_menu"> |
---|
| 180 | <tt class="descname">populate_menu</tt><big>(</big><em>id</em>, <em>parent</em><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.populate_menu" title="Permalink to this definition">¶</a></dt> |
---|
| 181 | <dd><p>Create and return the list of application menu |
---|
| 182 | items for the plug-in.</p> |
---|
| 183 | <table class="docutils field-list" frame="void" rules="none"> |
---|
| 184 | <col class="field-name" /> |
---|
| 185 | <col class="field-body" /> |
---|
| 186 | <tbody valign="top"> |
---|
| 187 | <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
---|
| 188 | <li><strong>id</strong> – deprecated. Un-used.</li> |
---|
| 189 | <li><strong>parent</strong> – parent window</li> |
---|
| 190 | </ul> |
---|
| 191 | </td> |
---|
| 192 | </tr> |
---|
| 193 | <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">plug-in menu</p> |
---|
| 194 | </td> |
---|
| 195 | </tr> |
---|
| 196 | </tbody> |
---|
| 197 | </table> |
---|
| 198 | </dd></dl> |
---|
| 199 | |
---|
| 200 | <dl class="method"> |
---|
| 201 | <dt id="sans.perspectives.invariant.invariant.Plugin.post_init"> |
---|
| 202 | <tt class="descname">post_init</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.post_init" title="Permalink to this definition">¶</a></dt> |
---|
| 203 | <dd>Post initialization call back to close the loose ends</dd></dl> |
---|
| 204 | |
---|
| 205 | <dl class="method"> |
---|
| 206 | <dt id="sans.perspectives.invariant.invariant.Plugin.set_default_perspective"> |
---|
| 207 | <tt class="descname">set_default_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.perspectives.invariant.invariant.Plugin.set_default_perspective" title="Permalink to this definition">¶</a></dt> |
---|
| 208 | <dd>Call back method that True to notify the parent that the current plug-in |
---|
| 209 | can be set as default perspective. |
---|
| 210 | when returning False, the plug-in is not candidate for an automatic |
---|
| 211 | default perspective setting</dd></dl> |
---|
| 212 | |
---|
| 213 | </dd></dl> |
---|
| 214 | |
---|
| 215 | </div> |
---|
| 216 | </div> |
---|
| 217 | |
---|
| 218 | |
---|
| 219 | </div> |
---|
| 220 | </div> |
---|
| 221 | </div> |
---|
| 222 | <div class="sphinxsidebar"> |
---|
| 223 | <div class="sphinxsidebarwrapper"> |
---|
| 224 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
| 225 | <ul> |
---|
| 226 | <li><a class="reference internal" href="#">invariant</a><ul> |
---|
| 227 | <li><a class="reference internal" href="#module-sans.perspectives.invariant.invariant"><tt class="docutils literal"><span class="pre">sans.perspectives.invariant.invariant</span></tt></a></li> |
---|
| 228 | </ul> |
---|
| 229 | </li> |
---|
| 230 | </ul> |
---|
| 231 | |
---|
| 232 | <h4>Previous topic</h4> |
---|
| 233 | <p class="topless"><a href="invariant_widgets.html" |
---|
| 234 | title="previous chapter">invariant_widgets</a></p> |
---|
| 235 | <h3>This Page</h3> |
---|
| 236 | <ul class="this-page-menu"> |
---|
| 237 | <li><a href="../_sources/api/invariant.txt" |
---|
| 238 | rel="nofollow">Show Source</a></li> |
---|
| 239 | </ul> |
---|
| 240 | <div id="searchbox" style="display: none"> |
---|
| 241 | <h3>Quick search</h3> |
---|
| 242 | <form class="search" action="../search.html" method="get"> |
---|
| 243 | <input type="text" name="q" size="18" /> |
---|
| 244 | <input type="submit" value="Go" /> |
---|
| 245 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
| 246 | <input type="hidden" name="area" value="default" /> |
---|
| 247 | </form> |
---|
| 248 | <p class="searchtip" style="font-size: 90%"> |
---|
| 249 | Enter search terms or a module, class or function name. |
---|
| 250 | </p> |
---|
| 251 | </div> |
---|
| 252 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
| 253 | </div> |
---|
| 254 | </div> |
---|
| 255 | <div class="clearer"></div> |
---|
| 256 | </div> |
---|
| 257 | <div class="related"> |
---|
| 258 | <h3>Navigation</h3> |
---|
| 259 | <ul> |
---|
| 260 | <li class="right" style="margin-right: 10px"> |
---|
| 261 | <a href="../genindex.html" title="General Index" |
---|
| 262 | >index</a></li> |
---|
| 263 | <li class="right" > |
---|
| 264 | <a href="../py-modindex.html" title="Python Module Index" |
---|
| 265 | >modules</a> |</li> |
---|
| 266 | <li class="right" > |
---|
| 267 | <a href="invariant_widgets.html" title="invariant_widgets" |
---|
| 268 | >previous</a> |</li> |
---|
| 269 | <li><a href="../index.html">invariantview v0.1.0 documentation</a> »</li> |
---|
| 270 | <li><a href="index.html" >Reference</a> »</li> |
---|
| 271 | </ul> |
---|
| 272 | </div> |
---|
| 273 | <div class="footer"> |
---|
| 274 | © Copyright 2010, sans group. |
---|
| 275 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0b1. |
---|
| 276 | </div> |
---|
| 277 | </body> |
---|
| 278 | </html> |
---|