Added interface to get/set colordb

This commit is contained in:
Barry Warsaw 1998-09-29 20:04:19 +00:00
parent a9b45580a3
commit fda3aceb71
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
class Switchboard:
def __init__(self):
def __init__(self, colordb):
self.__views = []
self.__colordb = colordb
def add_view(self, view):
self.__views.append(view)
@ -8,3 +9,6 @@ class Switchboard:
def update_views(self, red, green, blue):
for v in self.__views:
v.update_yourself(red, green, blue)
def colordb(self):
return self.__colordb