#NEWLINE# def CanvasOverlay( top_c , bottom_c , left , top ) : #NEWLINE# #INDENT# '\n    Overlay canvas top_c onto bottom_c at position (left, top).\n    ' #NEWLINE# overlayed_canvas = CompositeCanvas ( bottom_c ) #NEWLINE# overlayed_canvas . overlay ( top_c , left , top ) #NEWLINE# overlayed_canvas . children = [ ( top , top , top_c , None ) , ( 0 , 0 , bottom_c , None ) ] #NEWLINE# overlayed_canvas . shortcuts = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for shortcut in top_c . shortcuts . keys ( ) : #NEWLINE# #INDENT# overlayed_canvas . shortcuts [ shortcut ] = 'fg' #NEWLINE# #UNINDENT# return overlayed_canvas