comparison light8/panels.py @ 69:ab0be21b549b

result of 7.9.2002 rehearsal
author dmcc
date Thu, 11 Jul 2002 00:17:02 +0000
parents 57b3c454465a
children 2dfae9ed1cda
comparison
equal deleted inserted replaced
68:57b3c454465a 69:ab0be21b549b
76 self.channel_levels = channel_levels 76 self.channel_levels = channel_levels
77 # channel_levels is an output - changelevel will use it to access 77 # channel_levels is an output - changelevel will use it to access
78 # these labels 78 # these labels
79 79
80 class Subpanels: 80 class Subpanels:
81 def __init__(self, scenesparent, effectsparent, lightboard, 81 def __init__(self, scenesparent, effectsparent, scenes, lightboard,
82 scalelevels, Subs, xfader, 82 scalelevels, Subs, xfader,
83 changelevel, subediting, longestname): 83 changelevel, subediting, longestname):
84 84
85 sublist = Subs.subs.items() 85 sublist = Subs.subs.items()
86 sublist.sort() 86 sublist.sort()
87 87
88 for p in scenesparent,effectsparent: 88 for p in scenesparent,effectsparent,scenes:
89 sw = ScrolledWindow(p) 89 sw = ScrolledWindow(p)
90 for but,units in ( (4,-4),(5,4) ): 90 for but,units in ( (4,-4),(5,4) ):
91 sw.window.bind("<ButtonPress-%s>"%but,lambda ev,s=sw.vsb,u=units: s.tk.call('tkScrollByUnits',s,'hv',u)) 91 sw.window.bind("<ButtonPress-%s>"%but,lambda ev,s=sw.vsb,u=units: s.tk.call('tkScrollByUnits',s,'hv',u))
92 92
93 sw.pack(expand=1,fill=BOTH) 93 sw.pack(expand=1,fill=BOTH)
94 if p==scenesparent: 94 if p==scenesparent:
95 scenesparent = sw.window 95 scenesparent = sw.window
96 elif p==effectsparent:
97 effectsparent = sw.window
96 else: 98 else:
97 effectsparent = sw.window 99 scenes=sw.window
98 100
99 for name, sub in sublist: 101 for name, sub in sublist:
100 # choose one of the sub panels to add to 102 # choose one of the sub panels to add to
101 if sub.is_effect: 103 if sub.is_effect:
102 parent=effectsparent 104 parent=effectsparent
104 side2='left' 106 side2='left'
105 orient1='vert' 107 orient1='vert'
106 end1=0 108 end1=0
107 end2=1 109 end2=1
108 width1=len(name) 110 width1=len(name)
111 elif name.startswith("*") and name[1].isdigit():
112 parent=scenes
113 side1='right'
114 side2='top'
115 orient1='horiz'
116 end1=1
117 end2=0
118 width1=longestname
109 else: 119 else:
110 parent=scenesparent 120 parent=scenesparent
111 side1='right' 121 side1='right'
112 side2='top' 122 side2='top'
113 orient1='horiz' 123 orient1='horiz'