#
#   Test user-defined views.
#

from GUI import Window, View, application
from GUI.StdColors import red

class View1(View):

    def draw(self, c):
        print "View1.draw"
        c.set_forecolor(red)
        c.fill_rect(self.viewed_rect())


def main():
    win = Window(size = (500, 400))
    view1 = View1(position = (10, 10), size = (200, 100))
    win.add(view1)
    win.show()
    application().run()

main()
