changeset 19:6284a812da50

makefile - add link to ../Widgets/FlyingFader.py makefile - add link to ../Widgets/FlyingFader.py panels.py - use above link, incorporate FlyingFaders. some layout issues, nothing too borked rsn.py - focus follows mouse so that FFaders get keystrokes
author dmcc
date Sun, 07 Jul 2002 06:53:32 +0000
parents 053889940418
children 6eafd86930b5
files light8/Makefile light8/panels.py light8/rsn.py
diffstat 3 files changed, 16 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/light8/Makefile	Sun Jul 07 06:48:57 2002 +0000
+++ b/light8/Makefile	Sun Jul 07 06:53:32 2002 +0000
@@ -1,6 +1,7 @@
 LIB=/usr/local/lib
 
 go: parportmodule.so
+	ln -s ../Widgets/FlyingFader.py
 	sudo python pypar
 
 parportmodule.so: parport_wrap.c
@@ -10,4 +11,4 @@
 	swig -python parport.i
 
 clean:
-	rm -f parport_wrap.c *.o *.so
\ No newline at end of file
+	rm -f parport_wrap.c *.o *.so
--- a/light8/panels.py	Sun Jul 07 06:48:57 2002 +0000
+++ b/light8/panels.py	Sun Jul 07 06:53:32 2002 +0000
@@ -3,6 +3,7 @@
 from Tkinter import *
 from uihelpers import *
 import Patch
+from FlyingFader import FlyingFader
 
 stdfont = ('Arial', 8)
 monofont = ('Courier', 8)
@@ -62,7 +63,8 @@
         # channel_levels is an output - changelevel will use it to access these labels
 
 class Subpanels:
-    def __init__(self,scenesparent,effectsparent,scalelevels,Subs,xfader,changelevel):
+    def __init__(self, scenesparent, effectsparent, scalelevels, Subs, xfader,
+        changelevel):
         
         sublist = Subs.subs.items()
         sublist.sort()
@@ -84,28 +86,26 @@
             scaleopts = {}
             if sub.color:
                 scaleopts['troughcolor'] = sub.color
-            s=Scale(f,command=lambda l,name=name: changelevel(name,l),showvalue=0,
-                    length=300-17,variable=scalelevels[name],width=20,
-                    to=0,res=.001,from_=1,bd=1, **scaleopts)
-            l=Label(f,text=str(name), font=stdfont, padx=0, pady=0)
-            v=Label(f,textvariable=scalelevels[name], font=stdfont, padx=0, pady=0)
-            l.pack(side='bottom')
-            v.pack(side='bottom')
+
+            s = FlyingFader(f, label=str(name), variable=scalelevels[name],
+                    showvalue=0, length=300-17,
+                    width=20, to=0,res=.001,from_=1,bd=1, font=stdfont,
+                    **scaleopts)
 
             for axis in ('y','x'):
                 cvar=IntVar()
-                cb=Checkbutton(f,text=axis,variable=cvar,font=stdfont, padx=0, pady=0, bd=1)
+                cb=Checkbutton(f,text=axis,variable=cvar,font=stdfont, padx=0, 
+                               pady=0, bd=1)
                 button = ('Alt','Control')[axis=='y'] # unused?
-    #            s.bind('<Key-%s>'%axis, lambda ev,cb=cb: cb.invoke)
+                # s.bind('<Key-%s>'%axis, lambda ev,cb=cb: cb.invoke)
                 cb.pack(side='bottom',fill='both', padx=0, pady=0)
                 xfader.registerbutton(name,axis,cvar)
 
             s.pack(side='left')
-            s.bind('<3>', lambda evt, v=scalelevels[name]: toggle_slider(v))\
+            s.bind('<3>', 
+                lambda evt, v=scalelevels[name]: toggle_slider(v))
 
             # effects frame?
             sframe = Frame(f,bd=2,relief='groove')
             sub.draw_tk(sframe)
             sframe.pack(side='left',fill='y')
-
-    
--- a/light8/rsn.py	Sun Jul 07 06:48:57 2002 +0000
+++ b/light8/rsn.py	Sun Jul 07 06:53:32 2002 +0000
@@ -24,6 +24,7 @@
 root = Tk()
 root.wm_title(window_title)
 root.wm_geometry('+447+373')
+root.tk_focusFollowsMouse()
 
 import Subs, Patch