#NEWLINE# def toggle_checkbox( self , edit , region , checked = None , recurse_up = False , recurse_down = False ) : #NEWLINE# #INDENT# view = self . view #NEWLINE# checkbox = self . get_checkbox ( region ) #NEWLINE# if ( not checkbox ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( checked is None ) : #NEWLINE# #INDENT# checked = ( not self . is_checked ( checkbox ) ) #NEWLINE# #UNINDENT# view . replace ( edit , checkbox , ( '[%s]' % ( 'X' if checked else ' ' ) ) ) #NEWLINE# if recurse_down : #NEWLINE# #INDENT# children = self . find_children ( region ) #NEWLINE# for child in children : #NEWLINE# #INDENT# self . toggle_checkbox ( edit , child , checked , recurse_down = True ) #NEWLINE# #UNINDENT# #UNINDENT# if recurse_up : #NEWLINE# #INDENT# parent = self . find_parent ( region ) #NEWLINE# if parent : #NEWLINE# #INDENT# self . update_line ( edit , parent )