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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
|
<!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.3 06/08/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-button_setvalue"><strong>button_setvalue</strong></a>(self, widget, value)</dt></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_load"><strong>channels_load</strong></a>(self, chan_list)</dt><dd><tt>Loads a list with channel names and values into the<br>
current channel list</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-channels_save"><strong>channels_save</strong></a>(self)</dt><dd><tt>Saves a list with channel names and current values.<br>
Returns a list of tuples (channel_name, channel_value)</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></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_channel_metadata"><strong>get_channel_metadata</strong></a>(self)</dt><dd><tt>Retrieves channel data from metadata. Can be called after<br>
widgets have been created to retrieve channel data and <br>
reset widgets</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_channel_metadata"><strong>set_channel_metadata</strong></a>(self)</dt><dd><tt>Saves channel data as metadata. Can be called in<br>
write_file() to save channel/widget data</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>
<dl><dt><a name="BasicGUI-widgets_reset"><strong>widgets_reset</strong></a>(self)</dt><dd><tt>resets widget to channel values</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-button_setvalue"><strong>button_setvalue</strong></a>(self, widget, value)</dt></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_load"><strong>channels_load</strong></a>(self, chan_list)</dt><dd><tt>Loads a list with channel names and values into the<br>
current channel list</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-channels_save"><strong>channels_save</strong></a>(self)</dt><dd><tt>Saves a list with channel names and current values.<br>
Returns a list of tuples (channel_name, channel_value)</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></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_channel_metadata"><strong>get_channel_metadata</strong></a>(self)</dt><dd><tt>Retrieves channel data from metadata. Can be called after<br>
widgets have been created to retrieve channel data and <br>
reset widgets</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-set_channel_metadata"><strong>set_channel_metadata</strong></a>(self)</dt><dd><tt>Saves channel data as metadata. Can be called in<br>
write_file() to save channel/widget data</tt></dd></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>
<dl><dt><a name="CsoundGUI-widgets_reset"><strong>widgets_reset</strong></a>(self)</dt><dd><tt>resets widget to channel values</tt></dd></dl>
</td></tr></table></td></tr></table>
</body></html>
|