#NEWLINE# def toggle_overlay( self , overlay , data = None ) : #NEWLINE# #INDENT# "Toggle an overlay (if the overlay is active, remove it, otherwise add it)\n\n\t\t:param overlay: The class name of the layout to toggle\n\t\t:param data: User data to send to the layout's constructor\n\t\t" #NEWLINE# if ( overlay . __class__ . __name__ in self . overlays ) : #NEWLINE# #INDENT# self . remove_overlay ( overlay ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . add_overlay ( overlay , data )