Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / simulator / pgu-0.18 / docs / gui.button.html
1 <html>
2 <head>
3 <title>gui.button</title>
4 <style type='text/css'><!--
5 .sections { 
6         border: 1px solid black;
7         background: #fef790;
8         margin-left: 8px;
9         }
10         
11 .sections th {
12         background: #fde42d; 
13         }
14         
15 .sections .h1 {
16         padding: 2px;
17         padding-left: 0px;
18         }
19 .sections .h2 {
20         padding: 2px;
21         padding-left: 16px;
22         }
23 .sections .h3 {
24         padding: 2px;
25         padding-left: 32px;
26         }
27 .sections .h4 {
28         padding: 2px;
29         padding-left: 48px;
30         }
31         
32 .sections .h5 {
33         padding: 2px;
34         padding-left: 64px;
35         }
36 .sections .h6 {
37         padding: 2px;
38         padding-left: 72px;
39         }
40
41 .wiki h1, .wiki h2, .wiki h3, .wiki h4, .wiki h5, .wiki h6 {
42         border: 0px;
43         padding: 0px;
44         background: none;
45         border-bottom: 1px solid #bbbbbb;
46
47         }
48         
49 .wiki div.h1 {
50     }
51 .wiki div.h2 {
52     }
53     
54 .wiki dt {
55     font-style: italic;
56     }
57     
58 .wiki dd,dd,p.dd {
59     font-style: normal;
60     margin-left: 48px;
61     margin-top: 0px;
62     margin-bottom: 8px;
63     display: block;
64     }
65     
66 .wiki h3 {
67     margin-left: 48px; 
68     }
69 .wiki div.h3 {
70     margin-left: 48px;
71     }
72         
73 .wiki code, .wiki pre {
74     background: #eeeeee;
75     padding: 4px;
76     border: 1px dashed #888888;
77     }
78     
79     
80 .wiki table {
81     border-top: 1px solid #888888;
82     border-left: 1px solid #888888;
83     border-spacing: 0px; border-collapse: collapse;
84     }
85 .wiki td {
86     border-bottom: 1px solid #888888;
87     border-right: 1px solid #888888;
88     padding: 3px;
89     }
90 .wiki th {
91     background: #eeeeee;
92     border-bottom: 1px solid #888888;
93     border-right: 1px solid #888888;
94     padding: 3px;
95     }
96
97 -->
98 </style>
99
100 </head>
101 <body>
102 <div align='center'>
103
104 <table cellpadding=8><tr><td>
105 <a href='http://www.imitationpickles.org/pgu/'><img src='skin/logo.gif' alt="Phil's pyGame Utilities" border=0></a>
106 <td style='font-size:48px'>Documentation
107 </table>
108
109 </div>
110
111 <hr width=500 align=center>
112
113 <table width='100%'><tr><td valign=top width=120 style='padding-right:6px;border-right: 1px solid black;'>
114 <a href='index.html'>Overview</a><br><br>
115 <strong>Scripts</strong><br>
116 <a href="tileedit.html">tileedit</a>
117  | <a href="leveledit.html">leveledit</a>
118  | <a href="tganew.html">tganew</a>
119  | <a href="levelfancy.html">levelfancy</a>
120 <br><br>
121 <strong>Reference</strong><br>
122 <a href="algo.html">algo</a>
123  | <a href="ani.html">ani</a>
124  | <a href="engine.html">engine</a>
125  | <a href="fonts.html">fonts</a>
126  | <a href="high.html">high</a>
127  | <a href="html.html">html</a>
128  | <a href="layout.html">layout</a>
129  | <a href="text.html">text</a>
130  | <a href="timer.html">timer</a>
131  | <a href="vid.html">vid</a>
132 <br><br>
133 <strong>Tutorials</strong><br>
134 <a href="tilevid1.html">1</a>
135  | <a href="tilevid2.html">2</a>
136  | <a href="tilevid3.html">3</a>
137  | <a href="tilevid4.html">4</a>
138  | <a href="tilevid5.html">5</a>
139 <br><br>
140 <strong>GUI&nbsp;Ref.</strong><br>
141 <a href="gui.theme.html">theme</a>
142  | <a href="gui.style.html">style</a>
143  | <a href="gui.widget.html">widget</a>
144  | <a href="gui.surface.html">surface</a>
145  | <a href="gui.const.html">const</a>
146 <br><br>
147 <strong>Containers</strong><br>
148 <a href="gui.container.html">container</a>
149  | <a href="gui.app.html">app</a>
150  | <a href="gui.table.html">table</a>
151  | <a href="gui.document.html">document</a>
152  | <a href="gui.area.html">area</a>
153 <br><br>
154 <strong>Forms</strong><br>
155 <a href="gui.form.html">form</a>
156  | <a href="gui.group.html">group</a>
157 <br><br>
158 <strong>Widgets</strong><br>
159 <a href="gui.basic.html">basic</a>
160  | <a href="gui.button.html">button</a>
161  | <a href="gui.input.html">input</a>
162  | <a href="gui.keysym.html">keysym</a>
163  | <a href="gui.slider.html">slider</a>
164  | <a href="gui.select.html">select</a>
165  | <a href="gui.misc.html">misc</a>
166 <br><br>
167 <strong>Other</strong><br>
168 <a href="gui.menus.html">menus</a>
169  | <a href="gui.dialog.html">dialog</a>
170 <br><br>
171 <strong>Tutorials</strong><br>
172 <a href="gui1.html">1</a>
173  | <a href="gui2.html">2</a>
174  | <a href="gui3.html">3</a>
175  | <a href="gui4.html">4</a>
176  | <a href="gui5.html">5</a>
177  | <a href="gui6.html">6</a>
178  | <a href="gui7.html">7</a>
179  | <a href="gui8.html">8</a>
180  | <a href="gui9.html">9</a>
181  | <a href="gui10.html">10</a>
182 <br><br>
183
184 <td valign=top style='padding-left:6px;'>
185
186 <h1>gui.button</h1>
187 <table class='sections' align=right>
188 <tr><th>sections</th>
189 <tr><td class='h1'><a href='#Button'>Button</a>
190 <tr><td class='h2'><a href='#Button.__init__'>Button.__init__</a>
191 <tr><td class='h1'><a href='#Switch'>Switch</a>
192 <tr><td class='h1'><a href='#Checkbox'>Checkbox</a>
193 <tr><td class='h2'><a href='#Checkbox.__init__'>Checkbox.__init__</a>
194 <tr><td class='h1'><a href='#Radio'>Radio</a>
195 <tr><td class='h2'><a href='#Radio.__init__'>Radio.__init__</a>
196 <tr><td class='h1'><a href='#Tool'>Tool</a>
197 <tr><td class='h2'><a href='#Tool.__init__'>Tool.__init__</a>
198 <tr><td class='h1'><a href='#Icon'>Icon</a>
199 <tr><td class='h1'><a href='#Link'>Link</a>
200 </table>
201
202 <div class='wiki'>
203 <a name="">
204 <div class="h1">
205 Contains various types of button widgets.
206 </div>
207 <a name="Button">
208 <h2>Button</h2>
209 <div class="h2">
210 A button, buttons can be clicked, they are usually used to set up callbacks.
211
212 Example:
213     w = gui.Button("Click Me")
214     w.connect(gui.CLICK, fnc, value)
215
216
217 </div>
218 <a name="Button.__init__">
219 <h3>Button.__init__</h3>
220 <div class="h3">
221 Button constructor, which takes either a string label or widget.
222
223 See Widget documentation for additional style parameters.
224
225
226 </div>
227 <a name="Switch">
228 <h2>Switch</h2>
229 <div class="h2">
230 A switch can have two states, on or off.
231 </div>
232 <a name="Checkbox">
233 <h2>Checkbox</h2>
234 <div class="h2">
235 A type of switch that can be grouped with other checkboxes.
236
237 Example:
238     # The 'value' parameter indicates which checkboxes are on by default
239     g = gui.Group(name='colors',value=['r','b'])
240
241     t = gui.Table()
242     t.tr()
243     t.td(gui.Label('Red'))
244     t.td(gui.Checkbox(g,'r'))
245     t.tr()
246     t.td(gui.Label('Green'))
247     t.td(gui.Checkbox(g,'g'))
248     t.tr()
249     t.td(gui.Label('Blue'))
250     t.td(gui.Checkbox(g,'b'))
251
252
253 </div>
254 <a name="Checkbox.__init__">
255 <h3>Checkbox.__init__</h3>
256 <div class="h3">
257 Checkbox constructor.
258
259 Keyword arguments:
260     group -- the Group that this checkbox belongs to
261     value -- the initial value (True or False)
262
263 See Widget documentation for additional style parameters.
264
265
266 </div>
267 <a name="Radio">
268 <h2>Radio</h2>
269 <div class="h2">
270 A type of switch that can be grouped with other radio buttons, except
271 that only one radio button can be active at a time.
272
273 Example:
274     g = gui.Group(name='colors',value='g')
275
276     t = gui.Table()
277     t.tr()
278     t.td(gui.Label('Red'))
279     t.td(gui.Radio(g,'r'))
280     t.tr()
281     t.td(gui.Label('Green'))
282     t.td(gui.Radio(g,'g'))
283     t.tr()
284     t.td(gui.Label('Blue'))
285     t.td(gui.Radio(g,'b'))
286
287
288 </div>
289 <a name="Radio.__init__">
290 <h3>Radio.__init__</h3>
291 <div class="h3">
292 Radio constructor.
293
294 Keyword arguments:
295     group -- the Group this radio button belongs to
296     value -- the initial value (True or False)
297
298
299 </div>
300 <a name="Tool">
301 <h2>Tool</h2>
302 <div class="h2">
303 Within a Group of Tool widgets only one may be selected at a time.
304
305 Example:
306     g = gui.Group(name='colors',value='g')
307
308     t = gui.Table()
309     t.tr()
310     t.td(gui.Tool(g,'Red','r'))
311     t.tr()
312     t.td(gui.Tool(g,'Green','g'))
313     t.tr()
314     t.td(gui.Tool(g,'Blue','b'))
315
316
317 </div>
318 <a name="Tool.__init__">
319 <h3>Tool.__init__</h3>
320 <div class="h3">
321 Tool constructor.
322
323 Keyword arguments:
324     group -- a gui.Group for the Tool to belong to
325     widget -- a widget to appear on the Tool (similar to a Button)
326     value -- the value
327
328
329 </div>
330 <a name="Icon">
331 <h2>Icon</h2>
332 <div class="h2">
333 TODO - might be deprecated
334
335 </div>
336 <a name="Link">
337 <h2>Link</h2>
338 <div class="h2">
339 A link, links can be clicked, they are usually used to set up callbacks.
340 Basically the same as the button widget, just text only with a different cls.
341 Made for convenience.
342
343 Example:
344     w = gui.Link("Click Me")
345     w.connect(gui.CLICK,fnc,value)
346
347
348 </div>
349
350 </div>
351
352 </table>
353
354 <hr width=500 align=center>
355 <div align='center'>all content (c) 2006 Phil Hassey - <a href='http://www.imitationpickles.org/pgu/'>Phil's pyGame Utilities</a></div>
356 </body>
357 </html>

UCC git Repository :: git.ucc.asn.au