wxPython/wxGlade-0.9.1/codegen/__init__.py
def generate_code_event_handler(self, code_obj, is_new, tab, prev_src, event_handlers):
        """Generate the event handler stubs for 'code_obj'

         is_new:         Indicates if previous source code exists;
         prev_src:       Previous source code event_handlers; SourceFileContent instance
         event_handlers: List of event handlers (str,str,str)"""
        code_lines = []
        write = code_lines.append

        if prev_src and not is_new:
            already_there = prev_src.event_handlers.get(code_obj.klass, {})
        else:
            already_there = {}

        for win_id, event, handler, unused in event_handlers:
            # don't create handler twice
            if handler in already_there:
                continue

            # add an empty line for;  TODO: Remove later
            if self.language in ('python', 'lisp') and not (prev_src and not is_new):
                write('\n')
            write(self.tmpl_func_event_stub % {'tab': tab, 'klass': self.cn_class(code_obj.klass), 'handler': handler })
            already_there[handler] = 1

        return code_lines
Generate the event handler stubs for 'code_obj'

         is_new:         Indicates if previous source code exists;
         prev_src:       Previous source code event_handlers; SourceFileContent instance
         event_handlers: List of event handlers (str,str,str)
Generate the event handler stubs for 'code_obj'
is_new:         Indicates if previous source code exists;
prev_src:       Previous source code event_handlers; SourceFileContent instance
event_handlers: List of event handlers (str,str,str)
Generate the event handler stubs for ' code_obj ' is_new : Indicates if previous source code exists ; prev_src : Previous source code event_handlers ; SourceFileContent instance event_handlers : List of event handlers ( str str str )
def generate_code_event_handler(self, code_obj, is_new, tab, prev_src, event_handlers):
        code_lines = []
        write = code_lines.append
        if prev_src and not is_new:
            already_there = prev_src.event_handlers.get(code_obj.klass, {})
        else:
            already_there = {}
        for win_id, event, handler, unused in event_handlers:
            if handler in already_there:
                continue
            if self.language in ('python', 'lisp') and not (prev_src and not is_new):
                write('\n')
            write(self.tmpl_func_event_stub % {'tab': tab, 'klass': self.cn_class(code_obj.klass), 'handler': handler })
            already_there[handler] = 1
        return code_lines
def generate_code_event_handler ( self , code_obj , is_new , tab , prev_src , event_handlers ) : code_lines = [ ] write = code_lines . append if prev_src and not is_new : already_there = prev_src . event_handlers . get ( code_obj . klass , { } ) else : already_there = { } for win_id , event , handler , unused in event_handlers : if handler in already_there : continue if self . language in ( 'python' , 'lisp' ) and not ( prev_src and not is_new ) : write ( '\n' ) write ( self . tmpl_func_event_stub % { 'tab' : tab , 'klass' : self . cn_class ( code_obj . klass ) , 'handler' : handler } ) already_there [ handler ] = 1 return code_lines
Generate the event handler stubs for 'code_obj'
is_new:         Indicates if previous source code exists;
prev_src:       Previous source code event_handlers; SourceFileContent instance
event_handlers: List of event handlers (str,str,str)
Generate the event handler stubs for ' code_obj ' is_new : Indicates if previous source code exists ; prev_src : Previous source code event_handlers ; SourceFileContent instance event_handlers : List of event handlers ( str str str )
"""Generate the event handler stubs for 'code_obj'

         is_new:         Indicates if previous source code exists;
         prev_src:       Previous source code event_handlers; SourceFileContent instance
         event_handlers: List of event handlers (str,str,str)""" # don't create handler twice # add an empty line for;  TODO: Remove later
self
code_obj
is_new
tab
prev_src
event_handlers