#NEWLINE# def onMarginClick( self , e ) : #NEWLINE# #INDENT# if ( e . GetMargin ( ) == 2 ) : #NEWLINE# #INDENT# if ( e . GetShift ( ) and e . GetControl ( ) ) : #NEWLINE# #INDENT# self . foldAll ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# lineClicked = self . LineFromPosition ( e . GetPosition ( ) ) #NEWLINE# if ( self . GetFoldLevel ( lineClicked ) & stc . STC_FOLDLEVELHEADERFLAG ) : #NEWLINE# #INDENT# if e . GetShift ( ) : #NEWLINE# #INDENT# self . SetFoldexpanded ( lineClicked , True ) #NEWLINE# self . expand ( lineClicked , True , True , 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if e . GetControl ( ) : #NEWLINE# #INDENT# if self . GetFoldexpanded ( lineClicked ) : #NEWLINE# #INDENT# self . SetFoldexpanded ( lineClicked , False ) #NEWLINE# self . expand ( lineClicked , False , True , 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . SetFoldexpanded ( lineClicked , True ) #NEWLINE# self . expand ( e , True , True , 100 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . ToggleFold ( lineClicked )