<s> class EventHandlerMixIn ( object ) : <EOL> """<STR_LIT>""" <EOL> def emit_event ( self , comp , kind , data = None ) : <EOL> event = kind ( data , source = [ self ] ) <EOL> return comp . answer ( event ) <EOL> def handle_event ( self , comp , event ) : <EOL> local_res = None <EOL> local_handler = getattr ( self , '<STR_LIT>' , None ) <EOL> if local_handler : <EOL> local_res = local_handler ( comp , event ) <EOL> event . append ( self ) <EOL> upper_res = comp . answer ( event ) <EOL> return local_res or upper_res <EOL> class Event ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , data , source = [ ] ) : <EOL> """<STR_LIT>""" <EOL> self . _source = source <EOL> self . data = data <EOL> @ property <EOL> def source ( self ) : <EOL> return self . _source . copy ( ) <EOL> @ property <EOL> def emitter ( self ) : <EOL> return self . _source [ <NUM_LIT:0> ] <EOL> @ property <EOL> def last_relay ( self ) : <EOL> return self . _source [ - <NUM_LIT:1> ] <EOL> def is_ ( self , kind ) : <EOL> return type ( self ) is kind <EOL> def is_kind_of ( self , kind ) : <EOL> return isinstance ( self , kind ) <EOL> def append ( self , relay ) : <EOL> self . _source . append ( relay ) <EOL> def cast_as ( self , sub_kind ) : <EOL> return sub_kind ( self . data , self . _source ) <EOL> class ColumnDeleted ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class CardClicked ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class PopinClosed ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class CardEditorClosed ( PopinClosed ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class CardArchived ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class SearchIndexUpdated ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class CardDisplayed ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class BoardAccessChanged ( Event ) : <EOL> """<STR_LIT>""" <EOL> class BoardDeleted ( BoardAccessChanged ) : <EOL> """<STR_LIT>""" <EOL> class BoardArchived ( BoardAccessChanged ) : <EOL> """<STR_LIT>""" <EOL> class BoardRestored ( BoardAccessChanged ) : <EOL> """<STR_LIT>""" <EOL> class BoardLeft ( BoardAccessChanged ) : <EOL> """<STR_LIT>""" <EOL> class ParentTitleNeeded ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class NewTemplateRequested ( Event ) : <EOL> """<STR_LIT>""" <EOL> pass </s>
