''' Created on 31-jul.-2014 @author: Simon ''' from PIL import Image, ImageTk import Tkinter as tk import atexit from sccd.runtime.statecharts_core import Event class SCCDWidget: controller = None def __init__(self, configure_later=False): if not configure_later: self.set_bindable_and_tagorid(None, None) def set_bindable_and_tagorid(self, bindable=None, tagorid=None): if bindable is None: bindable = self self.bindable = bindable self.mytagorid = tagorid if isinstance(self, tk.Toplevel): self.protocol("WM_DELETE_WINDOW", self.window_close) if tagorid is not None: if not isinstance(tagorid, list): tagorid = [tagorid] for t in tagorid: self.bindable.tag_bind(t, "