diff options
author | Victor Lazzarini <Victor.Lazzarini@nuim.ie> | 2008-03-24 10:28:46 (GMT) |
---|---|---|
committer | Victor Lazzarini <Victor.Lazzarini@nuim.ie> | 2008-03-24 10:28:46 (GMT) |
commit | 41bc68526711ca62beba9cc02ba57b06308e1ad2 (patch) | |
tree | a12ed2f49aa024ed18cc6a287ef5ab21876a263b | |
parent | 257e63fde492f46f3826dccb06259d7d721a0664 (diff) |
added reference in html from PyDoc
-rw-r--r-- | csndsugui.html | 443 | ||||
-rwxr-xr-x | csndsugui.py | 14 |
2 files changed, 449 insertions, 8 deletions
diff --git a/csndsugui.html b/csndsugui.html new file mode 100644 index 0000000..e4bbe82 --- /dev/null +++ b/csndsugui.html @@ -0,0 +1,443 @@ + +<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html><head><title>Python: module csndsugui</title> +</head><body bgcolor="#f0f0f8"> + +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> +<tr bgcolor="#7799ee"> +<td valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>csndsugui</strong></big></big></font></td +><td align=right valign=bottom +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/victor/csndsugui/csndsugui.py">/home/victor/csndsugui/csndsugui.py</a></font></td></tr></table> + <p><tt># sugar-aware GUI classes<br> +# with boxes, sliders, spinbuttons, buttons, etc<br> +#<br> +# (c) Victor Lazzarini, 2006-08<br> +# <br> +# This library is free software; you can redistribute it<br> +# and/or modify it under the terms of the GNU Lesser General Public<br> +# License as published by the Free Software Foundation; either<br> +# version 2.1 of the License, or (at your option) any later version.<br> +#<br> +# csndsugui is distributed in the hope that it will be useful,<br> +# but WITHOUT ANY WARRANTY; without even the implied warranty of<br> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br> +# GNU Lesser General Public License for more details.<br> +#<br> +# You should have received a copy of the GNU Lesser General Public<br> +# License along with csndsugui; if not, write to the Free Software<br> +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA<br> +# 02111-1307 USA<br> +#<br> +# As a special exception, if other files instantiate templates or<br> +# use macros or inline functions from this file, this file does not<br> +# by itself cause the resulting executable or library to be covered<br> +# by the GNU Lesser General Public License. This exception does not<br> +# however invalidate any other reasons why the library or executable<br> +# file might be covered by the GNU Lesser General Public License.<br> +#<br> +#<br> +# version 0.1.2 18/03/08</tt></p> +<p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#aa55cc"> +<td colspan=3 valign=bottom> <br> +<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> + +<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="sugar.activity.activity.html">sugar.activity.activity</a><br> +<a href="csnd.html">csnd</a><br> +<a href="gtk.html">gtk</a><br> +</td><td width="25%" valign=top><a href="locale.html">locale</a><br> +<a href="math.html">math</a><br> +<a href="os.html">os</a><br> +</td><td width="25%" valign=top><a href="pygtk.html">pygtk</a><br> +<a href="sugar.html">sugar</a><br> +<a href="sys.html">sys</a><br> +</td><td width="25%" valign=top><a href="time.html">time</a><br> +</td></tr></table></td></tr></table><p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ee77aa"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> + +<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> +<td width="100%"><dl> +<dt><font face="helvetica, arial"><a href="csndsugui.html#BasicGUI">BasicGUI</a> +</font></dt><dd> +<dl> +<dt><font face="helvetica, arial"><a href="csndsugui.html#CsoundGUI">CsoundGUI</a> +</font></dt></dl> +</dd> +</dl> + <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="BasicGUI">class <strong>BasicGUI</strong></a></font></td></tr> + +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> +<td colspan=2><tt>Basic GUI with boxes, sliders, spins, buttons etc<br> +using pygtk/sugar, from which GUI classes<br> +can be derived for Csound use.<br> </tt></td></tr> +<tr><td> </td> +<td width="100%">Methods defined here:<br> +<dl><dt><a name="BasicGUI-__init__"><strong>__init__</strong></a>(self, act, colour<font color="#909090">=(-1, -1, -1)</font>, vert<font color="#909090">=True</font>, toolbox<font color="#909090">=None</font>)</dt><dd><tt>Constructor<br> +act: activity object<br> +colour: bg colour RGB tuple (R,G, B)<br> +vert: True for vertical topmost arrangement, horiz. otherwise<br> +toolbox: activity toolbox object, if None (default) a<br> + standard toolbox will be supplied</tt></dd></dl> + +<dl><dt><a name="BasicGUI-box"><strong>box</strong></a>(self, vert<font color="#909090">=True</font>, parent<font color="#909090">=None</font>, padding<font color="#909090">=5</font>)</dt><dd><tt>creates a box <br> +vert: True, creates a vertical box; horiz.<br> + otherwise<br> +parent: parent box, None if this is a toplevel box<br> +padding: box padding<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-buttcallback"><strong>buttcallback</strong></a>(self, widget, data<font color="#909090">=None</font>)</dt></dl> + +<dl><dt><a name="BasicGUI-button"><strong>button</strong></a>(self, box, title<font color="#909090">=''</font>, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a button (on/off)<br> +box: parent box<br> +title: if given, the button name,<br> + which will also be the bus channel<br> + name. Otherwise a default name is<br> + given, BN, where N is button number<br> + in order of creation.<br> +label: if given, an alternative button name,<br> + which will be displayed instead of title<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-buttonbank"><strong>buttonbank</strong></a>(self, items, box)</dt><dd><tt>Creates a button bank <br> +items: number of sliders<br> +box: parent box.</tt></dd></dl> + +<dl><dt><a name="BasicGUI-cbbutton"><strong>cbbutton</strong></a>(self, box, callback, title<font color="#909090">=''</font>)</dt><dd><tt>Creates a callbackbutton<br> +box: parent box<br> +callback: click callback<br> +title: if given, the button name<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-channels_reinit"><strong>channels_reinit</strong></a>(self)</dt><dd><tt>resets channel to current widget values</tt></dd></dl> + +<dl><dt><a name="BasicGUI-delete_event"><strong>delete_event</strong></a>(self, widget, event, data<font color="#909090">=None</font>)</dt></dl> + +<dl><dt><a name="BasicGUI-destroy_chooser"><strong>destroy_chooser</strong></a>(self, widget)</dt></dl> + +<dl><dt><a name="BasicGUI-fbuttcallback"><strong>fbuttcallback</strong></a>(self, widget, data<font color="#909090">=None</font>)</dt><dd><tt># internal callback</tt></dd></dl> + +<dl><dt><a name="BasicGUI-filecallback"><strong>filecallback</strong></a>(self, widget)</dt></dl> + +<dl><dt><a name="BasicGUI-filechooser"><strong>filechooser</strong></a>(self, box, title, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a filechooser button<br> +title: button name, also file bus channel name<br> +box: parent box<br> +label: if given, alternative name, for display purposes only<br> + otherwise button will display its title.</tt></dd></dl> + +<dl><dt><a name="BasicGUI-focus_back"><strong>focus_back</strong></a>(self, widget, event)</dt></dl> + +<dl><dt><a name="BasicGUI-focus_connect"><strong>focus_connect</strong></a>(self)</dt></dl> + +<dl><dt><a name="BasicGUI-focus_disconnect"><strong>focus_disconnect</strong></a>(self)</dt></dl> + +<dl><dt><a name="BasicGUI-focus_in"><strong>focus_in</strong></a>(self, widget, event)</dt></dl> + +<dl><dt><a name="BasicGUI-focus_out"><strong>focus_out</strong></a>(self, widget, event)</dt></dl> + +<dl><dt><a name="BasicGUI-framebox"><strong>framebox</strong></a>(self, name, vert<font color="#909090">=True</font>, parent<font color="#909090">=None</font>, colour<font color="#909090">=(0, 0, 0)</font>, padding<font color="#909090">=5</font>)</dt><dd><tt>Creates a frame box<br> +name: text label<br> +vert: vertical (True) box, else horiz.<br> +parent: parent box, if None, this is a toplevel box<br> +colour: RGB values in a tuple (R,G,B) <br> +padding: padding space<br> +returns the box widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-get_button"><strong>get_button</strong></a>(self, name)</dt><dd><tt>returns the button widget instance<br> +name: button name</tt></dd></dl> + +<dl><dt><a name="BasicGUI-get_button_value"><strong>get_button_value</strong></a>(self, name)</dt><dd><tt>returns the button value (0 or 1)<br> +name: button name (which should also be the attached bus channel name)</tt></dd></dl> + +<dl><dt><a name="BasicGUI-get_slider"><strong>get_slider</strong></a>(self, name)</dt><dd><tt>returns the slider widget instance<br> +name: slider name</tt></dd></dl> + +<dl><dt><a name="BasicGUI-get_slider_value"><strong>get_slider_value</strong></a>(self, name)</dt><dd><tt>returns the slider value<br> +name: slider name (which should also be the attached bus channel name</tt></dd></dl> + +<dl><dt><a name="BasicGUI-get_toolbox"><strong>get_toolbox</strong></a>(self)</dt><dd><tt>Returns the Activity toolbox</tt></dd></dl> + +<dl><dt><a name="BasicGUI-hsliderbank"><strong>hsliderbank</strong></a>(self, items, init, start, end, x, y, box)</dt><dd><tt>Creates a horizontal slider bank <br> +items: number of sliders<br> +init: initial value<br> +start, end: start and end of slider range<br> +x, y: x and y sizes of slider<br> +box: parent box</tt></dd></dl> + +<dl><dt><a name="BasicGUI-mbuttcallback"><strong>mbuttcallback</strong></a>(self, widget, data<font color="#909090">=None</font>)</dt></dl> + +<dl><dt><a name="BasicGUI-mbutton"><strong>mbutton</strong></a>(self, box, mess, title<font color="#909090">=''</font>)</dt><dd><tt>Creates a mbutton (for sending a message)<br> +box: parent box<br> +title: if given, the button name, otherwise a default name is<br> + given, BN, where N is button number<br> + in order of creation.<br> +mess: message to be sent when button is clicked<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-nofocus"><strong>nofocus</strong></a>(self)</dt></dl> + +<dl><dt><a name="BasicGUI-set_channel"><strong>set_channel</strong></a>(self, name, val)</dt><dd><tt>basic bus channel setting method,<br> +should be overriden for full-functionality.</tt></dd></dl> + +<dl><dt><a name="BasicGUI-set_filechannel"><strong>set_filechannel</strong></a>(self, chan, name)</dt><dd><tt>basic filename channel setting method<br> +should be overriden for full-functionality.</tt></dd></dl> + +<dl><dt><a name="BasicGUI-set_focus"><strong>set_focus</strong></a>(self)</dt><dd><tt>called whenever the focus changes</tt></dd></dl> + +<dl><dt><a name="BasicGUI-set_message"><strong>set_message</strong></a>(self, mess)</dt><dd><tt>basic message setting method<br> +should be overriden for full-functionality.</tt></dd></dl> + +<dl><dt><a name="BasicGUI-slidcallback"><strong>slidcallback</strong></a>(self, adj, widget)</dt></dl> + +<dl><dt><a name="BasicGUI-slider"><strong>slider</strong></a>(self, init, start, end, x, y, box, title<font color="#909090">=''</font>, vert<font color="#909090">=True</font>, linear<font color="#909090">=True</font>, dwid<font color="#909090">=100</font>, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a slider<br> +init: initial value<br> +start, end: start and end of slider range<br> +x, y: x and y sizes of slider<br> +box: parent box<br> +title: if given, the slider name,<br> + which will also be the bus channel<br> + name. Otherwise a default name is<br> + given, SN, where N is slider number<br> + in order of creation.<br> +vert: vertical slider (True), else horiz.<br> +linear: linear response (True), else exponential (zero or negative<br> + ranges are not allowed)<br> +dwid: display width in pixels<br> +label: if given, the alternative slider name, for display only <br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-spin"><strong>spin</strong></a>(self, init, start, end, step, page, box, accel<font color="#909090">=0</font>, title<font color="#909090">=''</font>, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a spin button<br> +init: initial value<br> +start, end: start and end of slider range<br> +step, page: small and large step sizes<br> +box: parent box<br> +accel: acceleration or 'climb rate' (0.0-1.0)<br> +title: if given, the spin button name,<br> + which will also be the bus channel<br> + name. Otherwise a default name is<br> + given, SPN, where N is spin number<br> + in order of creation.<br> +label: if given, the alternative name for the widget, for display only.<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-spincallback"><strong>spincallback</strong></a>(self, adj, widget)</dt></dl> + +<dl><dt><a name="BasicGUI-text"><strong>text</strong></a>(self, name, box<font color="#909090">=None</font>, colour<font color="#909090">=(0, 0, 0)</font>)</dt><dd><tt>Creates a static text label<br> +name: text label<br> +box: parent box, None if text is to be placed toplevel<br> +colour: RGB values in a tuple (R,G,B)<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="BasicGUI-vsliderbank"><strong>vsliderbank</strong></a>(self, items, init, start, end, x, y, box)</dt><dd><tt>Creates a vertical slider bank <br> +items: number of sliders<br> +init: initial value<br> +start, end: start and end of slider range<br> +x, y: x and y sizes of slider<br> +box: parent box</tt></dd></dl> + +</td></tr></table> <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="CsoundGUI">class <strong>CsoundGUI</strong></a>(<a href="csndsugui.html#BasicGUI">BasicGUI</a>)</font></td></tr> + +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> +<td colspan=2><tt>A class inheriting from <a href="#BasicGUI">BasicGUI</a> containing a Csound instance and a performance <br> +thread instance.<br> </tt></td></tr> +<tr><td> </td> +<td width="100%">Methods defined here:<br> +<dl><dt><a name="CsoundGUI-__init__"><strong>__init__</strong></a>(self, act, colour<font color="#909090">=(-1, -1, -1)</font>, vert<font color="#909090">=True</font>)</dt><dd><tt>constructor<br> +act: activity object<br> +colour: bg colour RGB tuple (R,G, B)<br> +vert: True for vertical topmost arrangement, horiz. otherwise.</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-close"><strong>close</strong></a>(self, event)</dt></dl> + +<dl><dt><a name="CsoundGUI-compile"><strong>compile</strong></a>(self, name<font color="#909090">=None</font>, args<font color="#909090">=[]</font>)</dt><dd><tt>Compiles Csound code.<br> +name: CSD filename if given<br> +args: list of arguments (as strings)<br> +returns 0 if successful , non-zero if not.</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-csd"><strong>csd</strong></a>(self, name)</dt><dd><tt>Sets the source CSD and compiles it.<br> +name: CSD filename<br> +returns zero if successful</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-pause"><strong>pause</strong></a>(self)</dt><dd><tt>Pauses a performance.</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-play"><strong>play</strong></a>(self)</dt><dd><tt>Starts a performance.</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-recompile"><strong>recompile</strong></a>(self)</dt><dd><tt>Recompiles the set CSD.<br> +returns zero if successful</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-reset"><strong>reset</strong></a>(self)</dt><dd><tt>Resets Csound, ready for a new CSD</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-set_channel"><strong>set_channel</strong></a>(self, name, val)</dt><dd><tt>overrides the base method.<br> +sets the bus channel value, called by the widget callbacks<br> +channel names 'play', 'pause' and<br> +'reset' are reserved for these respective uses</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-set_filechannel"><strong>set_filechannel</strong></a>(self, chan, name)</dt><dd><tt>overrides the base method, setting the channel string</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-set_focus"><strong>set_focus</strong></a>(self)</dt><dd><tt>overrides the base class method, resetting/recompiling Csound</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-set_message"><strong>set_message</strong></a>(self, mess)</dt><dd><tt>overrides the base method, sends a score message</tt></dd></dl> + +<hr> +Methods inherited from <a href="csndsugui.html#BasicGUI">BasicGUI</a>:<br> +<dl><dt><a name="CsoundGUI-box"><strong>box</strong></a>(self, vert<font color="#909090">=True</font>, parent<font color="#909090">=None</font>, padding<font color="#909090">=5</font>)</dt><dd><tt>creates a box <br> +vert: True, creates a vertical box; horiz.<br> + otherwise<br> +parent: parent box, None if this is a toplevel box<br> +padding: box padding<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-buttcallback"><strong>buttcallback</strong></a>(self, widget, data<font color="#909090">=None</font>)</dt></dl> + +<dl><dt><a name="CsoundGUI-button"><strong>button</strong></a>(self, box, title<font color="#909090">=''</font>, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a button (on/off)<br> +box: parent box<br> +title: if given, the button name,<br> + which will also be the bus channel<br> + name. Otherwise a default name is<br> + given, BN, where N is button number<br> + in order of creation.<br> +label: if given, an alternative button name,<br> + which will be displayed instead of title<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-buttonbank"><strong>buttonbank</strong></a>(self, items, box)</dt><dd><tt>Creates a button bank <br> +items: number of sliders<br> +box: parent box.</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-cbbutton"><strong>cbbutton</strong></a>(self, box, callback, title<font color="#909090">=''</font>)</dt><dd><tt>Creates a callbackbutton<br> +box: parent box<br> +callback: click callback<br> +title: if given, the button name<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-channels_reinit"><strong>channels_reinit</strong></a>(self)</dt><dd><tt>resets channel to current widget values</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-delete_event"><strong>delete_event</strong></a>(self, widget, event, data<font color="#909090">=None</font>)</dt></dl> + +<dl><dt><a name="CsoundGUI-destroy_chooser"><strong>destroy_chooser</strong></a>(self, widget)</dt></dl> + +<dl><dt><a name="CsoundGUI-fbuttcallback"><strong>fbuttcallback</strong></a>(self, widget, data<font color="#909090">=None</font>)</dt><dd><tt># internal callback</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-filecallback"><strong>filecallback</strong></a>(self, widget)</dt></dl> + +<dl><dt><a name="CsoundGUI-filechooser"><strong>filechooser</strong></a>(self, box, title, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a filechooser button<br> +title: button name, also file bus channel name<br> +box: parent box<br> +label: if given, alternative name, for display purposes only<br> + otherwise button will display its title.</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-focus_back"><strong>focus_back</strong></a>(self, widget, event)</dt></dl> + +<dl><dt><a name="CsoundGUI-focus_connect"><strong>focus_connect</strong></a>(self)</dt></dl> + +<dl><dt><a name="CsoundGUI-focus_disconnect"><strong>focus_disconnect</strong></a>(self)</dt></dl> + +<dl><dt><a name="CsoundGUI-focus_in"><strong>focus_in</strong></a>(self, widget, event)</dt></dl> + +<dl><dt><a name="CsoundGUI-focus_out"><strong>focus_out</strong></a>(self, widget, event)</dt></dl> + +<dl><dt><a name="CsoundGUI-framebox"><strong>framebox</strong></a>(self, name, vert<font color="#909090">=True</font>, parent<font color="#909090">=None</font>, colour<font color="#909090">=(0, 0, 0)</font>, padding<font color="#909090">=5</font>)</dt><dd><tt>Creates a frame box<br> +name: text label<br> +vert: vertical (True) box, else horiz.<br> +parent: parent box, if None, this is a toplevel box<br> +colour: RGB values in a tuple (R,G,B) <br> +padding: padding space<br> +returns the box widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-get_button"><strong>get_button</strong></a>(self, name)</dt><dd><tt>returns the button widget instance<br> +name: button name</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-get_button_value"><strong>get_button_value</strong></a>(self, name)</dt><dd><tt>returns the button value (0 or 1)<br> +name: button name (which should also be the attached bus channel name)</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-get_slider"><strong>get_slider</strong></a>(self, name)</dt><dd><tt>returns the slider widget instance<br> +name: slider name</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-get_slider_value"><strong>get_slider_value</strong></a>(self, name)</dt><dd><tt>returns the slider value<br> +name: slider name (which should also be the attached bus channel name</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-get_toolbox"><strong>get_toolbox</strong></a>(self)</dt><dd><tt>Returns the Activity toolbox</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-hsliderbank"><strong>hsliderbank</strong></a>(self, items, init, start, end, x, y, box)</dt><dd><tt>Creates a horizontal slider bank <br> +items: number of sliders<br> +init: initial value<br> +start, end: start and end of slider range<br> +x, y: x and y sizes of slider<br> +box: parent box</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-mbuttcallback"><strong>mbuttcallback</strong></a>(self, widget, data<font color="#909090">=None</font>)</dt></dl> + +<dl><dt><a name="CsoundGUI-mbutton"><strong>mbutton</strong></a>(self, box, mess, title<font color="#909090">=''</font>)</dt><dd><tt>Creates a mbutton (for sending a message)<br> +box: parent box<br> +title: if given, the button name, otherwise a default name is<br> + given, BN, where N is button number<br> + in order of creation.<br> +mess: message to be sent when button is clicked<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-nofocus"><strong>nofocus</strong></a>(self)</dt></dl> + +<dl><dt><a name="CsoundGUI-slidcallback"><strong>slidcallback</strong></a>(self, adj, widget)</dt></dl> + +<dl><dt><a name="CsoundGUI-slider"><strong>slider</strong></a>(self, init, start, end, x, y, box, title<font color="#909090">=''</font>, vert<font color="#909090">=True</font>, linear<font color="#909090">=True</font>, dwid<font color="#909090">=100</font>, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a slider<br> +init: initial value<br> +start, end: start and end of slider range<br> +x, y: x and y sizes of slider<br> +box: parent box<br> +title: if given, the slider name,<br> + which will also be the bus channel<br> + name. Otherwise a default name is<br> + given, SN, where N is slider number<br> + in order of creation.<br> +vert: vertical slider (True), else horiz.<br> +linear: linear response (True), else exponential (zero or negative<br> + ranges are not allowed)<br> +dwid: display width in pixels<br> +label: if given, the alternative slider name, for display only <br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-spin"><strong>spin</strong></a>(self, init, start, end, step, page, box, accel<font color="#909090">=0</font>, title<font color="#909090">=''</font>, label<font color="#909090">=''</font>)</dt><dd><tt>Creates a spin button<br> +init: initial value<br> +start, end: start and end of slider range<br> +step, page: small and large step sizes<br> +box: parent box<br> +accel: acceleration or 'climb rate' (0.0-1.0)<br> +title: if given, the spin button name,<br> + which will also be the bus channel<br> + name. Otherwise a default name is<br> + given, SPN, where N is spin number<br> + in order of creation.<br> +label: if given, the alternative name for the widget, for display only.<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-spincallback"><strong>spincallback</strong></a>(self, adj, widget)</dt></dl> + +<dl><dt><a name="CsoundGUI-text"><strong>text</strong></a>(self, name, box<font color="#909090">=None</font>, colour<font color="#909090">=(0, 0, 0)</font>)</dt><dd><tt>Creates a static text label<br> +name: text label<br> +box: parent box, None if text is to be placed toplevel<br> +colour: RGB values in a tuple (R,G,B)<br> +returns the widget instance</tt></dd></dl> + +<dl><dt><a name="CsoundGUI-vsliderbank"><strong>vsliderbank</strong></a>(self, items, init, start, end, x, y, box)</dt><dd><tt>Creates a vertical slider bank <br> +items: number of sliders<br> +init: initial value<br> +start, end: start and end of slider range<br> +x, y: x and y sizes of slider<br> +box: parent box</tt></dd></dl> + +</td></tr></table></td></tr></table> +</body></html>
\ No newline at end of file diff --git a/csndsugui.py b/csndsugui.py index 8281b19..ffcb2a8 100755 --- a/csndsugui.py +++ b/csndsugui.py @@ -26,7 +26,7 @@ # file might be covered by the GNU Lesser General Public License.
#
#
-# version 0.1.2 18/03/08
+# version 0.1.2 24/03/08
import pygtk
pygtk.require('2.0')
@@ -48,18 +48,18 @@ class BasicGUI: def set_channel(self,name, val):
"""basic bus channel setting method,
should be overriden for full-functionality."""
- print "channel:%s, value:%.1f" % (name,val)
+ self.logger.debug("channel:%s, value:%.1f" % (name,val))
def set_filechannel(self,chan,name):
"""basic filename channel setting method
should be overriden for full-functionality."""
- print "channel:%s, filename:%s" % (chan,name)
+ self.logger.debug("channel:%s, filename:%s" % (chan,name))
def set_message(self, mess):
"""basic message setting method
should be overriden for full-functionality."""
- print mess
+ self.logger.debug(mess)
def get_slider_value(self,name):
"""returns the slider value
@@ -96,7 +96,7 @@ class BasicGUI: def set_focus(self):
""" called whenever the focus changes """
- print self.focus
+ self.logger.debug(self.focus)
def focus_out(self, widget, event):
if(self.focus):
@@ -163,8 +163,6 @@ class BasicGUI: def destroy_chooser(self,widget):
self.curfile[0].destroy()
-
- # internal callback
def fbuttcallback(self, widget, data=None):
self.focus_disconnect()
self.fback = self.window.connect('focus_in_event', self.focus_back)
@@ -472,7 +470,7 @@ class BasicGUI: if(j[1] != "play"):
if(j[1] != "reset"):
self.set_channel(j[1],j[2])
- self.logger.debug(j[1])
+
def nofocus(self):
pass
|