blob: 02a5d636b8dbc7d07003438ed04a09b72459ed76 [file] [log] [blame]
Barry Warsaw987fb921998-09-28 15:59:21 +00001class Switchboard:
Barry Warsawfda3ace1998-09-29 20:04:19 +00002 def __init__(self, colordb):
Barry Warsaw987fb921998-09-28 15:59:21 +00003 self.__views = []
Barry Warsawfda3ace1998-09-29 20:04:19 +00004 self.__colordb = colordb
Barry Warsaw987fb921998-09-28 15:59:21 +00005
6 def add_view(self, view):
7 self.__views.append(view)
8
Barry Warsaw1ac18cd1998-09-28 23:41:12 +00009 def update_views(self, red, green, blue):
Barry Warsaw987fb921998-09-28 15:59:21 +000010 for v in self.__views:
Barry Warsaw1ac18cd1998-09-28 23:41:12 +000011 v.update_yourself(red, green, blue)
Barry Warsawfda3ace1998-09-29 20:04:19 +000012
13 def colordb(self):
14 return self.__colordb