#NEWLINE# def dispatch_departure( self , node ) : #NEWLINE# #INDENT# cls = node . __class__ #NEWLINE# if ( cls is nodes . document ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . section ) : #NEWLINE# #INDENT# self . section -= 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . title ) : #NEWLINE# #INDENT# assert isinstance ( self . current , RstTitle ) #NEWLINE# if ( not self . title ) : #NEWLINE# #INDENT# self . title = self . text #NEWLINE# #UNINDENT# self . set_text ( self . current , 'title' ) #NEWLINE# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . Text ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . paragraph ) : #NEWLINE# #INDENT# self . do_strip_text = False #NEWLINE# assert isinstance ( self . current , RstParagraph ) #NEWLINE# self . set_text ( self . current , 'paragraph' ) #NEWLINE# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . literal_block ) : #NEWLINE# #INDENT# assert isinstance ( self . current , RstLiteralBlock ) #NEWLINE# self . set_text ( self . current . content , 'literal_block' ) #NEWLINE# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . emphasis ) : #NEWLINE# #INDENT# self . text += '[/i]' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . strong ) : #NEWLINE# #INDENT# self . text += '[/b]' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . literal ) : #NEWLINE# #INDENT# self . text += '[/font]' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . block_quote ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . enumerated_list ) : #NEWLINE# #INDENT# self . idx_list = None #NEWLINE# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . bullet_list ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . list_item ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . system_message ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . warning ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . note ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . definition_list ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . term ) : #NEWLINE# #INDENT# assert isinstance ( self . current , RstTerm ) #NEWLINE# self . set_text ( self . current , 'term' ) #NEWLINE# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . definition ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . field_list ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . field_name ) : #NEWLINE# #INDENT# assert isinstance ( self . current , RstFieldName ) #NEWLINE# self . set_text ( self . current , 'field_name' ) #NEWLINE# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . field_body ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . table ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . colspec ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . entry ) : #NEWLINE# #INDENT# self . pop ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is nodes . reference ) : #NEWLINE# #INDENT# self . text += '[/color][/ref]' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is role_doc ) : #NEWLINE# #INDENT# docname = anchor . text [ self . doc_index : ] #NEWLINE# rst_docname = docname #NEWLINE# if rst_docname . endswith ( '.rst' ) : #NEWLINE# #INDENT# docname = docname [ : ( - 4 ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# rst_docname += '.rst' #NEWLINE# #UNINDENT# filename = self . root . resolve_path ( rst_docname ) #NEWLINE# self . root . preload ( filename ) #NEWLINE# title = docname #NEWLINE# if ( filename in self . root . toctrees ) : #NEWLINE# #INDENT# toctree = self . root . toctrees [ filename ] #NEWLINE# if len ( toctree ) : #NEWLINE# #INDENT# title = toctree [ 0 ] [ 'title' ] #NEWLINE# #UNINDENT# #UNINDENT# text = ( '[ref=%s]%s[/ref]' % ( rst_docname , self . colorize ( title , 'link' ) ) ) #NEWLINE# self . text = ( self . text [ : self . doc_index ] + text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cls is role_video ) : #NEWLINE# #INDENT# width = ( node [ 'width' ] if ( 'width' in node . attlist ( ) ) else 400 ) #NEWLINE# height = ( node [ 'height' ] if ( 'height' in node . attlist ( ) ) else 300 ) #NEWLINE# uri = node [ 'source' ] #NEWLINE# if ( uri . startswith ( '/' ) and self . root . document_root ) : #NEWLINE# #INDENT# uri = join ( self . root . document_root , uri [ 1 : ] ) #NEWLINE# #UNINDENT# video = RstVideoPlayer ( source = uri , size_hint = ( None , None ) , size = ( width , height ) ) #NEWLINE# anchor = AnchorLayout ( size_hint_y = None , height = ( height + 20 ) ) #NEWLINE# anchor . add_widget ( video ) #NEWLINE# self . current . add_widget ( anchor )