ARGH
[matches/honours.git] / research / transmission_spectroscopy / simulator / pgu-0.18 / examples / html2.py
1 """<title>an example of html within gui</title>"""
2 import pygame
3 from pygame.locals import *
4
5 # the following line is not needed if pgu is installed
6 import sys; sys.path.insert(0, "..")
7
8 from pgu import gui
9 from pgu import html
10
11 app = gui.Desktop(width=780,height=500)
12
13 data = """
14 <h1>header 1</h1>
15 <h2>header 2</h2>
16 <h3>header 3</h3>
17 <p>this is normal <b>this is bold</b> <i>this is italic</i> <u>this is underline</u></p>
18
19 <table border=1 bgcolor='yellow' width=200 align=center>
20     <tr>
21     <th bgcolor='#ffffee'>pgu
22     <th bgcolor='red'>red
23     <th bgcolor='green'>green
24     <th bgcolor='blue'>blue
25     
26     <tr>
27     <td bgcolor='white' border=1><img src='logo.gif'>
28     <td border=1 style='padding:4px'>things:<br>apples,<br>fire trucks,<br>crabs,<br>and cherries
29     <td border=1 style='padding:4px'>things: <ul>
30         <li>grass
31         <li>trees
32         <li>snakes
33         <li>scum
34         </ul>
35     <td border=1 style='padding:4px'>things: <ol>
36         <li>water
37         <li>sky
38         <li>goats
39         <li>pizza
40         </ol>
41 </table>
42     
43 <pre>    
44 class Desktop(App):
45     def __init__(self,**params):
46         params.setdefault('cls','desktop')
47         App.__init__(self,**params)
48 </pre>
49
50 <div style='margin: 8px; padding: 8px; border: 1px; border-color: #88ffff; background: #eeffff;' width=700><img src='cuzco.png' align=right>cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. cuzco is my goat. </div>"""
51
52 ##this example just uses the HTML widget
53 ##::
54 doc = html.HTML(data)
55 ##
56
57 app.connect(gui.QUIT,app.quit,None)
58 app.run(doc)

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