Mercurial > code > home > repos > light9
comparison bin/keyboardcomposer @ 275:c7bba03ddc36
keyboardcomposer has 'All to Zero' aka blackout
author | David McClosky <dmcc@bigasterisk.com> |
---|---|
date | Fri, 17 Jun 2005 18:11:45 +0000 |
parents | 54774cba50c9 |
children | d20fda03a041 |
comparison
equal
deleted
inserted
replaced
274:9bf9685f5aae | 275:c7bba03ddc36 |
---|---|
12 from light9.Fadable import Fadable | 12 from light9.Fadable import Fadable |
13 from light9.Submaster import Submasters, sub_maxes | 13 from light9.Submaster import Submasters, sub_maxes |
14 from light9.subclient import SubClient | 14 from light9.subclient import SubClient |
15 from light9 import dmxclient, showconfig, networking | 15 from light9 import dmxclient, showconfig, networking |
16 from light9.uihelpers import toplevelat | 16 from light9.uihelpers import toplevelat |
17 | |
18 | 17 |
19 nudge_keys = { | 18 nudge_keys = { |
20 'up' : list('qwertyuiop'), | 19 'up' : list('qwertyuiop'), |
21 'down' : list('asdfghjkl') | 20 'down' : list('asdfghjkl') |
22 } | 21 } |
85 self.highlight_row(self.current_row) | 84 self.highlight_row(self.current_row) |
86 self.rows[self.current_row].focus() | 85 self.rows[self.current_row].focus() |
87 | 86 |
88 self.buttonframe = Frame(self, bg='black') | 87 self.buttonframe = Frame(self, bg='black') |
89 self.buttonframe.pack(side=BOTTOM) | 88 self.buttonframe.pack(side=BOTTOM) |
89 self.alltozerobutton = Button(self.buttonframe, text="All to Zero", | |
90 command=self.alltozero, bg='black', fg='white') | |
91 self.alltozerobutton.pack(side='left') | |
90 self.refreshbutton = Button(self.buttonframe, text="Refresh", | 92 self.refreshbutton = Button(self.buttonframe, text="Refresh", |
91 command=self.refresh, bg='black', fg='white') | 93 command=self.refresh, bg='black', fg='white') |
92 self.refreshbutton.pack(side=LEFT) | 94 self.refreshbutton.pack(side=LEFT) |
93 self.save_stage_button = Button(self.buttonframe, text="Save", | 95 self.save_stage_button = Button(self.buttonframe, text="Save", |
94 command=lambda: self.save_current_stage(self.sub_name.get()), | 96 command=lambda: self.save_current_stage(self.sub_name.get()), |
236 r.destroy() | 238 r.destroy() |
237 self.keyhints.destroy() | 239 self.keyhints.destroy() |
238 self.buttonframe.destroy() | 240 self.buttonframe.destroy() |
239 self.draw_ui() | 241 self.draw_ui() |
240 | 242 |
243 def alltozero(self): | |
244 for name, subtk in self.name_to_subtk.items(): | |
245 if subtk.scale.scale_var.get() != 0: | |
246 subtk.scale.fade(value=0.0, length=0) | |
247 | |
241 class LevelServer(xmlrpc.XMLRPC): | 248 class LevelServer(xmlrpc.XMLRPC): |
242 def __init__(self,name_to_subtk): | 249 def __init__(self,name_to_subtk): |
243 self.name_to_subtk = name_to_subtk | 250 self.name_to_subtk = name_to_subtk |
244 | 251 |
245 def xmlrpc_fadesub(self,subname,level,secs): | 252 def xmlrpc_fadesub(self,subname,level,secs): |
249 ret='ok' | 256 ret='ok' |
250 except Exception,e: | 257 except Exception,e: |
251 ret=str(e) | 258 ret=str(e) |
252 return ret | 259 return ret |
253 | 260 |
254 | |
255 if __name__ == "__main__": | 261 if __name__ == "__main__": |
256 s = Submasters() | 262 s = Submasters() |
257 | 263 |
258 root = Tk() | 264 root = Tk() |
259 tl = toplevelat("Keyboard Composer", existingtoplevel=root) | 265 tl = toplevelat("Keyboard Composer", existingtoplevel=root) |