Fresco/Fresco-Python-demos/src demo.py,1.15,1.16 frame.py,1.10,1.11 graphictest,1.7,1.8 menutest,1.17,1.18 primitivetest,1.7,1.8 refcount.py,1.4,1.5 terminal.py,1.5,1.6 transform.py,1.9,1.10 unicode.py,1.2,1.3 unidraw,1.5,1.6 viewport,1.4,1.5
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Fresco-Python-demos/src
In directory purcel:/tmp/cvs-serv9638
Modified Files:
demo.py frame.py graphictest menutest primitivetest
refcount.py terminal.py transform.py unicode.py unidraw
viewport
Log Message:
cleanup
Index: demo.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/demo.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- demo.py 28 Jan 2003 03:34:31 -0000 1.15
+++ demo.py 18 Feb 2003 01:52:03 -0000 1.16
@@ -3,11 +3,11 @@
import sys, time
import string
-# Import berlin client lib
-import berlin, Fresco
-from berlin import Label, Callback, nullAny
+# Import Fresco client lib
+import Fresco
+from Fresco import Label, Callback, nullAny
-class DemoApp (berlin.App):
+class DemoApp (Fresco.App):
def run(self):
# Create a pixmap
pixmap = kits.figure.pixmap(kits.image.create_raster("berlin-128.png"))
@@ -22,8 +22,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = DemoApp()
app.run()
Index: frame.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/frame.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- frame.py 10 Oct 2002 06:36:56 -0000 1.10
+++ frame.py 18 Feb 2003 01:52:03 -0000 1.11
@@ -3,14 +3,10 @@
import sys, time
import string
-# Import the Fresco stubs
+# Import Fresco stubs and client lib
import Fresco
-# Import berlin client lib
-import berlin
-from berlin import Label, Callback, nullAny
-
-class DemoApp (berlin.App):
+class DemoApp (Fresco.App):
def mk_frame(self, color):
spec = Fresco.ToolKit.FrameSpec(
Fresco.ToolKit.colored, apply(Fresco.Color, color))
@@ -89,8 +85,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = DemoApp()
app.run()
Index: graphictest
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/graphictest,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- graphictest 6 Nov 2002 01:38:51 -0000 1.7
+++ graphictest 18 Feb 2003 01:52:03 -0000 1.8
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Python Berlin client that implements a client-side Graphic
+# Python Fresco client that implements a client-side Graphic
# Copyright (c) 2000 by Stephen Davies
# This file is licensed for use under the GPL.
#
@@ -9,13 +9,10 @@
import sys, string, time, math, thread, threading
from omniORB import CORBA
-# Import berlin client lib
-import berlin
-from berlin import Label, Callback, nullAny
-
-# Import the Fresco stubs
+# Import the Fresco stubs and client lib
import Fresco, Unidraw
import Fresco__POA
+from Fresco import Label, Callback, nullAny
# Import Fresco lib
import pyfresco
@@ -136,7 +133,7 @@
self._curr_rot = 0.
print "ClockController started."
print "Drag the clock face around its middle!"
- print "Press a key (in the berlin window) to reset the angle"
+ print "Press a key (in the Fresco window) to reset the angle"
def traverse(self, traversal):
pyfresco.PyController.traverse(self, traversal)
@@ -184,7 +181,7 @@
self.clock.need_redraw()
self.clock._lock.release()
-class GraphicApp (berlin.App):
+class GraphicApp (Fresco.App):
def run(self):
clock = ClockController()._this()
clock_group = kits.tool.group(clock)
@@ -197,8 +194,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = GraphicApp()
app.run()
Index: menutest
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/menutest,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- menutest 6 Nov 2002 01:38:51 -0000 1.17
+++ menutest 18 Feb 2003 01:52:03 -0000 1.18
@@ -1,24 +1,21 @@
#!/usr/bin/env python
-# Python Berlin client that implements a client-side menu
+# Python Fresco client that implements a client-side menu
# Copyright (c) 2000 by Stephen Davies
# This file is licensed for use under the GPL.
#
# Tabstop is 8, SoftTabStop is 4, ShiftWidth is 4 (as per last line)
#
# Note that the menu api implemented here resembles more traditional
-# state-heavy guis, rather than berlin's lightweight graphic model.
+# state-heavy guis, rather than Fresco's lightweight graphic model.
# Disclaimer: This is just an experiment :)
import sys, string, os
from omniORB import CORBA, PortableServer
-# Import Berlin module
-import berlin
-from berlin import Label, Callback, nullAny
-
-# Import the Fresco stubs
+# Import the Fresco stubs and client lib
import Fresco, Layout
import Fresco__POA
+from Fresco import Label, Callback, nullAny
# Import Python client lib
import pyfresco
@@ -348,7 +345,7 @@
print "Failed"
sys.exit(0)
-class MenuApp (berlin.App):
+class MenuApp (Fresco.App):
def run(self):
def add(menu, items):
for item in items:
@@ -421,8 +418,8 @@
def main():
# Create the singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = MenuApp()
app.run()
Index: primitivetest
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/primitivetest,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- primitivetest 6 Nov 2002 01:38:51 -0000 1.7
+++ primitivetest 18 Feb 2003 01:52:03 -0000 1.8
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Python Berlin client that implements a client-side Graphic
+# Python Fresco client that implements a client-side Graphic
# Copyright (c) 2000 by Stephen Davies
# This file is licensed for use under the GPL.
#
@@ -9,13 +9,10 @@
import sys, string, time, math, thread, threading
from omniORB import CORBA
-# Import berlin client lib
-import berlin
-from berlin import Label, Callback, nullAny
-
-# Import the Fresco stubs
+# Import the Fresco stubs and client lib
import Fresco, Unidraw
import Fresco__POA
+from Fresco import Label, Callback, nullAny
# Import Fresco lib
import pyfresco
@@ -91,7 +88,7 @@
dk.draw_mesh(self.__mesh)
dk.restore()
-class GraphicApp (berlin.App):
+class GraphicApp (Fresco.App):
def run(self):
vbox = kits.layout.vbox()
phi = kits.command.bvalue(0., 360., 0., 1., 10.)
@@ -138,8 +135,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = GraphicApp()
app.run()
Index: refcount.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/refcount.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- refcount.py 7 Apr 2001 07:44:42 -0000 1.4
+++ refcount.py 18 Feb 2003 01:52:03 -0000 1.5
@@ -3,14 +3,14 @@
import sys, time
import string
-# Import berlin client lib
-import berlin
-from berlin import Label, Callback, nullAny
+# Import Fresco client lib
+import Fresco
+from Fresco import Label, Callback, nullAny
-class RefCountApp (berlin.App):
+class RefCountApp (Fresco.App):
def run(self):
# Create a pixmap
- raster = kits.image.create("../etc/PNG/berlin-48.png")
+ raster = kits.image.create("berlin-48.png")
pixmap = kits.figure.pixmap(raster)
wrapper1 = kits.layout.margin(pixmap, 50)
pixmap.decrement()
@@ -28,8 +28,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = RefCountApp()
app.run()
Index: terminal.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/terminal.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- terminal.py 10 Oct 2002 06:36:56 -0000 1.5
+++ terminal.py 18 Feb 2003 01:52:03 -0000 1.6
@@ -3,14 +3,10 @@
import sys, time
import string
-# Import Fresco generated stuff
+# Import Fresco client lib
import Fresco
-# Import berlin client lib
-import berlin
-from berlin import Label, Callback, nullAny
-
-class DemoApp (berlin.App):
+class DemoApp (Fresco.App):
def run(self):
terminal = kits.widget.terminal()
scrollable = kits.widget.scrollable(kits.tool.rgb(terminal, 0., 0., 0.))
@@ -26,8 +22,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = DemoApp()
app.run()
Index: transform.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/transform.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- transform.py 10 Oct 2002 06:36:56 -0000 1.9
+++ transform.py 18 Feb 2003 01:52:03 -0000 1.10
@@ -3,15 +3,11 @@
import sys, time
import string
-# Import Fresco generated interface
-import Fresco
-import Figure
-
-# Import berlin client lib
-import berlin
-from berlin import Label, Callback, nullAny
+# Import Fresco generated interface and client lib
+import Fresco, Figure
+from Fresco import Label, Callback, nullAny
-class DemoApp (berlin.App):
+class DemoApp (Fresco.App):
def run(self):
vbox = kits.layout.vbox();
adjustable1 = kits.command.bvalue(0., 90., 0., 10., 10.)
@@ -43,8 +39,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = DemoApp()
app.run()
Index: unicode.py
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/unicode.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- unicode.py 10 Oct 2002 06:36:56 -0000 1.2
+++ unicode.py 18 Feb 2003 01:52:03 -0000 1.3
@@ -4,13 +4,10 @@
import string
import curses
-# Import Fresco Stubs
+# Import Fresco stubs and client lib
import Fresco
import Fresco__POA
-# Import berlin client lib
-import berlin
-
class TextBufferObserver (Fresco__POA.Observer):
"A simple Observer for a textbuffer."
def __init__(self, buffer, window, name):
@@ -83,7 +80,7 @@
return '#'
-def to_berlin(s):
+def to_Fresco(s):
if ord(s) in range(ord('A'), ord('Z')):
return ord(s) - ord('A') + 0x05D0 # transform into hebrew
elif s == '/':
@@ -97,10 +94,10 @@
return
if (len(s) == 1):
sys.stderr.write("inserting a single char (" + s[0] + ")\n")
- current.insert_char(to_berlin(s[0]))
+ current.insert_char(to_Fresco(s[0]))
else:
sys.stderr.write("inserting a string.\n")
- current.insert_string(map(to_berlin, s))
+ current.insert_string(map(to_Fresco, s))
def stringify(s):
output = ''
@@ -123,8 +120,8 @@
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
# Get TextBuffers
buffer = kits.command.text()
Index: unidraw
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/unidraw,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- unidraw 10 Oct 2002 06:36:56 -0000 1.5
+++ unidraw 18 Feb 2003 01:52:03 -0000 1.6
@@ -10,9 +10,7 @@
# Import the Fresco stubs
import Fresco, Unidraw
-import berlin
-
-class DemoApp (berlin.App):
+class DemoApp (Fresco.App):
def run(self):
# FIXME: This is bitrotted
editor = kits.unidraw.create_editor()
@@ -22,8 +20,8 @@
def main():
# Create singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = DemoApp()
app.run()
Index: viewport
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/viewport,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- viewport 6 Nov 2002 01:38:51 -0000 1.4
+++ viewport 18 Feb 2003 01:52:03 -0000 1.5
@@ -1,23 +1,16 @@
#!/usr/bin/env python
-# Python Berlin client that implements a pulldown panner
+# Python Fresco client that implements a pulldown panner
# Copyright (c) 2001 by Stefan Seefeld
# This file is licensed for use under the GPL.
#
# Tabstop is 8, SoftTabStop is 4, ShiftWidth is 4 (as per last line)
-#
-# Note that the menu api implemented here resembles more traditional
-# state-heavy guis, rather than berlin's lightweight graphic model.
-# Disclaimer: This is just an experiment :)
import sys, string, os
from omniORB import CORBA, PortableServer
-# Import Berlin module
-import berlin
-from berlin import Label, Callback, nullAny
-
-# Import the Fresco stubs
+# Import the Fresco stubs and client lib
import Fresco, Unidraw, Layout
+from Fresco import Label, Callback, nullAny
import Fresco__POA
# Import Python client lib
@@ -41,10 +34,10 @@
def release(self, pickTraversal, input_event):
print "Release"
-class ViewportApp (berlin.App):
+class ViewportApp (Fresco.App):
def run(self):
- berlin.App.__init__(self)
- kits = berlin.get_kits()
+ Fresco.App.__init__(self)
+ kits = Fresco.get_kits()
pixmap = kits.figure.pixmap(kits.image.create("landscape.png"))
viewport = kits.layout.scrollable(pixmap)
xscroller = kits.widget.scrollbar(viewport.adjustment(Fresco.xaxis), Fresco.xaxis)
@@ -71,8 +64,8 @@
def main():
# Create the singletons
global app, kits, connection
- connection = berlin.get_connection()
- kits = berlin.get_kits()
+ connection = Fresco.get_connection()
+ kits = Fresco.get_kits()
app = ViewportApp()
app.run()