source: sasview/sansguiframe/docs/sphinx/html/api/plugin_base.html @ 0b082f3

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 0b082f3 was bce8148, checked in by Gervaise Alina <gervyh@…>, 13 years ago

sphinx build

  • Property mode set to 100644
File size: 18.6 KB
RevLine 
[96cbb53]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
[bce8148]6
[96cbb53]7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
[bce8148]11    <title>plugin_base &mdash; guiframe 0.1.0 documentation</title>
12   
[96cbb53]13    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
14    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
[bce8148]15   
[96cbb53]16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '../',
19        VERSION:     '0.1.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="../_static/jquery.js"></script>
26    <script type="text/javascript" src="../_static/underscore.js"></script>
27    <script type="text/javascript" src="../_static/doctools.js"></script>
[bce8148]28    <link rel="top" title="guiframe 0.1.0 documentation" href="../index.html" />
[96cbb53]29    <link rel="up" title="Reference" href="index.html" />
30    <link rel="next" title="startup_configuration" href="startup_configuration.html" />
31    <link rel="prev" title="pdfview" href="pdfview.html" /> 
32  </head>
33  <body>
34    <div class="related">
35      <h3>Navigation</h3>
36      <ul>
37        <li class="right" style="margin-right: 10px">
38          <a href="../genindex.html" title="General Index"
39             accesskey="I">index</a></li>
40        <li class="right" >
41          <a href="../py-modindex.html" title="Python Module Index"
42             >modules</a> |</li>
43        <li class="right" >
44          <a href="startup_configuration.html" title="startup_configuration"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
47          <a href="pdfview.html" title="pdfview"
48             accesskey="P">previous</a> |</li>
[bce8148]49        <li><a href="../index.html">guiframe 0.1.0 documentation</a> &raquo;</li>
[96cbb53]50          <li><a href="index.html" accesskey="U">Reference</a> &raquo;</li> 
51      </ul>
52    </div> 
53
54    <div class="document">
55      <div class="documentwrapper">
56        <div class="bodywrapper">
57          <div class="body">
58           
59  <div class="section" id="plugin-base">
60<h1>plugin_base<a class="headerlink" href="#plugin-base" title="Permalink to this headline">¶</a></h1>
[bce8148]61<div class="section" id="sans-guiframe-plugin-base">
62<h2><a class="reference internal" href="#module-sans.guiframe.plugin_base" title="sans.guiframe.plugin_base"><tt class="xref py py-mod docutils literal"><span class="pre">sans.guiframe.plugin_base</span></tt></a><a class="headerlink" href="#sans-guiframe-plugin-base" title="Permalink to this headline">¶</a></h2>
63<span class="target" id="module-sans.guiframe.plugin_base"></span><dl class="class">
[96cbb53]64<dt id="sans.guiframe.plugin_base.PluginBase">
[bce8148]65<em class="property">class </em><tt class="descclassname">sans.guiframe.plugin_base.</tt><tt class="descname">PluginBase</tt><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase" title="Permalink to this definition">¶</a></dt>
[96cbb53]66<dd><p>This class defines the interface for a Plugin class
67that can be used by the gui_manager.</p>
68<p>Plug-ins should be placed in a sub-directory called &#8220;perspectives&#8221;.
69For example, a plug-in called Foo should be place in &#8220;perspectives/Foo&#8221;.
70That directory contains at least two files:</p>
71<blockquote>
72<div><p>perspectives/Foo/__init__.py contains two lines:</p>
73<blockquote>
74<div>PLUGIN_ID = &#8220;Foo plug-in 1.0&#8221;
75from Foo import *</div></blockquote>
76<p>perspectives/Foo/Foo.py contains the definition of the Plugin
77class for the Foo plug-in. The interface of that Plugin class
78should follow the interface of the class you are looking at.</p>
79</div></blockquote>
80<p>See dummyapp.py for a plugin example.</p>
81<dl class="method">
[bce8148]82<dt id="sans.guiframe.plugin_base.PluginBase.__init__">
83<tt class="descname">__init__</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.__init__" title="Permalink to this definition">¶</a></dt>
84<dd><p>Abstract class for gui_manager Plugins.</p>
85</dd></dl>
86
87<dl class="attribute">
88<dt id="sans.guiframe.plugin_base.PluginBase.__module__">
89<tt class="descname">__module__</tt><em class="property"> = 'sans.guiframe.plugin_base'</em><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.__module__" title="Permalink to this definition">¶</a></dt>
90<dd></dd></dl>
91
92<dl class="method">
[96cbb53]93<dt id="sans.guiframe.plugin_base.PluginBase.add_color">
[bce8148]94<tt class="descname">add_color</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.add_color" title="Permalink to this definition">¶</a></dt>
[96cbb53]95<dd><p>Adds color to a plugin</p>
96</dd></dl>
97
98<dl class="method">
99<dt id="sans.guiframe.plugin_base.PluginBase.can_load_data">
100<tt class="descname">can_load_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.can_load_data" title="Permalink to this definition">¶</a></dt>
101<dd><p>if return True, then call handler to laod data</p>
102</dd></dl>
103
104<dl class="method">
105<dt id="sans.guiframe.plugin_base.PluginBase.clear_panel">
106<tt class="descname">clear_panel</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.clear_panel" title="Permalink to this definition">¶</a></dt>
107<dd><p>clear all related panels</p>
108</dd></dl>
109
110<dl class="method">
111<dt id="sans.guiframe.plugin_base.PluginBase.delete_data">
[bce8148]112<tt class="descname">delete_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.delete_data" title="Permalink to this definition">¶</a></dt>
[96cbb53]113<dd><p>Delete all references of data which id are in data_list.</p>
114</dd></dl>
115
116<dl class="method">
[bce8148]117<dt id="sans.guiframe.plugin_base.PluginBase.get_batch_capable">
118<tt class="descname">get_batch_capable</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.get_batch_capable" title="Permalink to this definition">¶</a></dt>
119<dd><p>Check if the plugin has a batch capability</p>
120</dd></dl>
121
122<dl class="method">
[96cbb53]123<dt id="sans.guiframe.plugin_base.PluginBase.get_context_menu">
[bce8148]124<tt class="descname">get_context_menu</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.get_context_menu" title="Permalink to this definition">¶</a></dt>
[96cbb53]125<dd><p>This method is optional.</p>
126<p>When the context menu of a plot is rendered, the
127get_context_menu method will be called to give you a
128chance to add a menu item to the context menu.</p>
129<p>A ref to a plotpanel object is passed so that you can
130investigate the plot content and decide whether you
131need to add items to the context menu.</p>
132<p>This method returns a list of menu items.
133Each item is itself a list defining the text to
134appear in the menu, a tool-tip help text, and a
135call-back method.</p>
136<table class="docutils field-list" frame="void" rules="none">
137<col class="field-name" />
138<col class="field-body" />
139<tbody valign="top">
[bce8148]140<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>graph</strong> &#8211; the Graph object to which we attach the context menu</td>
[96cbb53]141</tr>
[bce8148]142<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a list of menu items with call-back function</td>
[96cbb53]143</tr>
144</tbody>
145</table>
146</dd></dl>
147
148<dl class="method">
149<dt id="sans.guiframe.plugin_base.PluginBase.get_extensions">
150<tt class="descname">get_extensions</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.get_extensions" title="Permalink to this definition">¶</a></dt>
151<dd><p>return state reader and its extensions</p>
152</dd></dl>
153
154<dl class="method">
155<dt id="sans.guiframe.plugin_base.PluginBase.get_panels">
[bce8148]156<tt class="descname">get_panels</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.get_panels" title="Permalink to this definition">¶</a></dt>
[96cbb53]157<dd><p>Create and return the list of wx.Panels for your plug-in.
158Define the plug-in perspective.</p>
159<p>Panels should inherit from DefaultPanel defined below,
160or should present the same interface. They must define
161&#8220;window_caption&#8221; and &#8220;window_name&#8221;.</p>
162<table class="docutils field-list" frame="void" rules="none">
163<col class="field-name" />
164<col class="field-body" />
165<tbody valign="top">
[bce8148]166<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>parent</strong> &#8211; parent window</td>
[96cbb53]167</tr>
[bce8148]168<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of panels</td>
[96cbb53]169</tr>
170</tbody>
171</table>
172</dd></dl>
173
174<dl class="method">
175<dt id="sans.guiframe.plugin_base.PluginBase.get_perspective">
176<tt class="descname">get_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.get_perspective" title="Permalink to this definition">¶</a></dt>
177<dd><p>Get the list of panel names for this perspective</p>
178</dd></dl>
179
180<dl class="method">
181<dt id="sans.guiframe.plugin_base.PluginBase.get_tools">
182<tt class="descname">get_tools</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.get_tools" title="Permalink to this definition">¶</a></dt>
183<dd><p>Returns a set of menu entries for tools</p>
184</dd></dl>
185
186<dl class="method">
187<dt id="sans.guiframe.plugin_base.PluginBase.is_always_active">
188<tt class="descname">is_always_active</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.is_always_active" title="Permalink to this definition">¶</a></dt>
189<dd><p>return True is this plugin is always active and it is local to guiframe
190even if the user is switching between perspectives</p>
191</dd></dl>
192
193<dl class="method">
194<dt id="sans.guiframe.plugin_base.PluginBase.is_in_use">
[bce8148]195<tt class="descname">is_in_use</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.is_in_use" title="Permalink to this definition">¶</a></dt>
[96cbb53]196<dd><dl class="docutils">
197<dt>get a  data id a list of data name if data data is</dt>
198<dd>currently used by the plugin and the name of the plugin</dd>
199</dl>
200<p>data_name = &#8216;None&#8217;
201in_use = False
202example [(data_name, self.sub_menu)]</p>
203</dd></dl>
204
205<dl class="method">
206<dt id="sans.guiframe.plugin_base.PluginBase.load_data">
[bce8148]207<tt class="descname">load_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.load_data" title="Permalink to this definition">¶</a></dt>
[96cbb53]208<dd><p>Load  data</p>
209</dd></dl>
210
211<dl class="method">
212<dt id="sans.guiframe.plugin_base.PluginBase.load_folder">
[bce8148]213<tt class="descname">load_folder</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.load_folder" title="Permalink to this definition">¶</a></dt>
[96cbb53]214<dd><p>Load entire folder</p>
215</dd></dl>
216
217<dl class="method">
218<dt id="sans.guiframe.plugin_base.PluginBase.on_batch_selection">
[bce8148]219<tt class="descname">on_batch_selection</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.on_batch_selection" title="Permalink to this definition">¶</a></dt>
[96cbb53]220<dd><p>need to be overwritten by the derivated class</p>
221</dd></dl>
222
223<dl class="method">
224<dt id="sans.guiframe.plugin_base.PluginBase.on_perspective">
[bce8148]225<tt class="descname">on_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.on_perspective" title="Permalink to this definition">¶</a></dt>
[96cbb53]226<dd><p>Call back function for the perspective menu item.
227We notify the parent window that the perspective
228has changed.</p>
229<table class="docutils field-list" frame="void" rules="none">
230<col class="field-name" />
231<col class="field-body" />
232<tbody valign="top">
[bce8148]233<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>event</strong> &#8211; menu event</td>
[96cbb53]234</tr>
235</tbody>
236</table>
237</dd></dl>
238
239<dl class="method">
240<dt id="sans.guiframe.plugin_base.PluginBase.on_set_state_helper">
[bce8148]241<tt class="descname">on_set_state_helper</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.on_set_state_helper" title="Permalink to this definition">¶</a></dt>
[96cbb53]242<dd><p>update state</p>
243</dd></dl>
244
245<dl class="method">
246<dt id="sans.guiframe.plugin_base.PluginBase.populate_file_menu">
247<tt class="descname">populate_file_menu</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.populate_file_menu" title="Permalink to this definition">¶</a></dt>
248<dd><p>Append menu item under file menu item of the frame</p>
249</dd></dl>
250
251<dl class="method">
252<dt id="sans.guiframe.plugin_base.PluginBase.populate_menu">
[bce8148]253<tt class="descname">populate_menu</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.populate_menu" title="Permalink to this definition">¶</a></dt>
[96cbb53]254<dd><p>Create and return the list of application menu
255items for the plug-in.</p>
256<table class="docutils field-list" frame="void" rules="none">
257<col class="field-name" />
258<col class="field-body" />
259<tbody valign="top">
[bce8148]260<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>parent</strong> &#8211; parent window</td>
[96cbb53]261</tr>
[bce8148]262<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">plug-in menu</td>
[96cbb53]263</tr>
264</tbody>
265</table>
266</dd></dl>
267
268<dl class="method">
269<dt id="sans.guiframe.plugin_base.PluginBase.post_init">
270<tt class="descname">post_init</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.post_init" title="Permalink to this definition">¶</a></dt>
271<dd><p>Post initialization call back to close the loose ends</p>
272</dd></dl>
273
274<dl class="method">
275<dt id="sans.guiframe.plugin_base.PluginBase.set_batch_selection">
[bce8148]276<tt class="descname">set_batch_selection</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.set_batch_selection" title="Permalink to this definition">¶</a></dt>
[96cbb53]277<dd><p>the plugin to its batch state if flag is True</p>
278</dd></dl>
279
280<dl class="method">
281<dt id="sans.guiframe.plugin_base.PluginBase.set_data">
[bce8148]282<tt class="descname">set_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.set_data" title="Permalink to this definition">¶</a></dt>
[96cbb53]283<dd><p>receive a list of data and use it in the current perspective</p>
284</dd></dl>
285
286<dl class="method">
287<dt id="sans.guiframe.plugin_base.PluginBase.set_default_perspective">
288<tt class="descname">set_default_perspective</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.set_default_perspective" title="Permalink to this definition">¶</a></dt>
289<dd><p>Call back method that True to notify the parent that the current plug-in
290can be set as default  perspective.
291when returning False, the plug-in is not candidate for an automatic
292default perspective setting</p>
293</dd></dl>
294
295<dl class="method">
296<dt id="sans.guiframe.plugin_base.PluginBase.set_is_active">
[bce8148]297<tt class="descname">set_is_active</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.set_is_active" title="Permalink to this definition">¶</a></dt>
[96cbb53]298<dd></dd></dl>
299
300<dl class="method">
301<dt id="sans.guiframe.plugin_base.PluginBase.set_state">
[bce8148]302<tt class="descname">set_state</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.set_state" title="Permalink to this definition">¶</a></dt>
[96cbb53]303<dd><p>update state</p>
304</dd></dl>
305
306<dl class="method">
307<dt id="sans.guiframe.plugin_base.PluginBase.set_theory">
[bce8148]308<tt class="descname">set_theory</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.set_theory" title="Permalink to this definition">¶</a></dt>
[96cbb53]309<dd><table class="docutils field-list" frame="void" rules="none">
310<col class="field-name" />
311<col class="field-body" />
312<tbody valign="top">
[bce8148]313<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>theory_list</strong> &#8211; list of information</td>
[96cbb53]314</tr>
315</tbody>
316</table>
[bce8148]317<p>related to available theory state</p>
[96cbb53]318</dd></dl>
319
320<dl class="method">
321<dt id="sans.guiframe.plugin_base.PluginBase.use_data">
322<tt class="descname">use_data</tt><big>(</big><big>)</big><a class="headerlink" href="#sans.guiframe.plugin_base.PluginBase.use_data" title="Permalink to this definition">¶</a></dt>
323<dd><p>return True if these plugin use data</p>
324</dd></dl>
325
326</dd></dl>
327
328</div>
329</div>
330
331
332          </div>
333        </div>
334      </div>
335      <div class="sphinxsidebar">
336        <div class="sphinxsidebarwrapper">
337  <h3><a href="../index.html">Table Of Contents</a></h3>
338  <ul>
339<li><a class="reference internal" href="#">plugin_base</a><ul>
[bce8148]340<li><a class="reference internal" href="#sans-guiframe-plugin-base"><tt class="docutils literal"><span class="pre">sans.guiframe.plugin_base</span></tt></a></li>
[96cbb53]341</ul>
342</li>
343</ul>
344
345  <h4>Previous topic</h4>
346  <p class="topless"><a href="pdfview.html"
347                        title="previous chapter">pdfview</a></p>
348  <h4>Next topic</h4>
349  <p class="topless"><a href="startup_configuration.html"
350                        title="next chapter">startup_configuration</a></p>
351  <h3>This Page</h3>
352  <ul class="this-page-menu">
353    <li><a href="../_sources/api/plugin_base.txt"
354           rel="nofollow">Show Source</a></li>
355  </ul>
356<div id="searchbox" style="display: none">
357  <h3>Quick search</h3>
358    <form class="search" action="../search.html" method="get">
[bce8148]359      <input type="text" name="q" />
[96cbb53]360      <input type="submit" value="Go" />
361      <input type="hidden" name="check_keywords" value="yes" />
362      <input type="hidden" name="area" value="default" />
363    </form>
364    <p class="searchtip" style="font-size: 90%">
365    Enter search terms or a module, class or function name.
366    </p>
367</div>
368<script type="text/javascript">$('#searchbox').show(0);</script>
369        </div>
370      </div>
371      <div class="clearer"></div>
372    </div>
373    <div class="related">
374      <h3>Navigation</h3>
375      <ul>
376        <li class="right" style="margin-right: 10px">
377          <a href="../genindex.html" title="General Index"
378             >index</a></li>
379        <li class="right" >
380          <a href="../py-modindex.html" title="Python Module Index"
381             >modules</a> |</li>
382        <li class="right" >
383          <a href="startup_configuration.html" title="startup_configuration"
384             >next</a> |</li>
385        <li class="right" >
386          <a href="pdfview.html" title="pdfview"
387             >previous</a> |</li>
[bce8148]388        <li><a href="../index.html">guiframe 0.1.0 documentation</a> &raquo;</li>
[96cbb53]389          <li><a href="index.html" >Reference</a> &raquo;</li> 
390      </ul>
391    </div>
392    <div class="footer">
393        &copy; Copyright 2010, sans group.
[bce8148]394      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.
[96cbb53]395    </div>
396  </body>
397</html>
Note: See TracBrowser for help on using the repository browser.