#NEWLINE# def __init__( self , parent = None , create_default_actions = True ) : #NEWLINE# #INDENT# '\n        :param parent: Parent widget\n\n        :param create_default_actions: True to create the action for the\n            standard shortcuts (copy, paste, delete, undo, redo,...).\n            Non-standard actions will always get created. If you would like\n            to prevent the context menu from showing, just set the\n            :attr:`show_menu_enabled` to False.\n        ' #NEWLINE# super ( CodeEdit , self ) . __init__ ( parent ) #NEWLINE# self . installEventFilter ( self ) #NEWLINE# self . clones = [ ] #NEWLINE# self . _show_ctx_mnu = True #NEWLINE# self . _default_font_size = 10 #NEWLINE# self . _backend = BackendManager ( self ) #NEWLINE# self . _file = FileManager ( self ) #NEWLINE# self . _modes = ModesManager ( self ) #NEWLINE# self . _panels = PanelsManager ( self ) #NEWLINE# self . _decorations = TextDecorationsManager ( self ) #NEWLINE# self . document ( ) . modificationChanged . connect ( self . _emit_dirty_changed ) #NEWLINE# self . _word_separators = [ '~' , '!' , '@' , '#' , '$' , '%' , '^' , '&' , '*' , '(' , ')' , '+' , '{' , '}' , '|' , ':' , '"' , "'" , '<' , '>' , '?' , ',' , '.' , '/' , ';' , '[' , ']' , '\\' , '\n' , '\t' , '=' , '-' , ' ' ] #NEWLINE# self . _save_on_focus_out = False #NEWLINE# self . _use_spaces_instead_of_tabs = True #NEWLINE# self . _whitespaces_foreground = None #NEWLINE# self . _sel_background = None #NEWLINE# self . _show_whitespaces = False #NEWLINE# self . _foreground = None #NEWLINE# self . _sel_foreground = None #NEWLINE# self . _tab_length = 4 #NEWLINE# self . _zoom_level = 0 #NEWLINE# self . _font_size = 10 #NEWLINE# self . _background = None #NEWLINE# QtGui . QFontDatabase . addApplicationFont ( ':/fonts/rc/SourceCodePro-Regular.ttf' ) #NEWLINE# QtGui . QFontDatabase . addApplicationFont ( ':/fonts/rc/SourceCodePro-Bold.ttf' ) #NEWLINE# self . _font_family = self . _DEFAULT_FONT #NEWLINE# self . _mimetypes = [ ] #NEWLINE# self . _select_line_on_copy_empty = True #NEWLINE# self . _last_mouse_pos = QtCore . QPoint ( 0 , 0 ) #NEWLINE# self . _modified_lines = set ( ) #NEWLINE# self . _cleaning = False #NEWLINE# self . _visible_blocks = [ ] #NEWLINE# self . _tooltips_runner = DelayJobRunner ( delay = 700 ) #NEWLINE# self . _prev_tooltip_block_nbr = ( - 1 ) #NEWLINE# self . _original_text = '' #NEWLINE# self . _dirty = False #NEWLINE# self . _actions = [ ] #NEWLINE# self . _menus = [ ] #NEWLINE# self . _init_actions ( create_default_actions ) #NEWLINE# self . setContextMenuPolicy ( QtCore . Qt . CustomContextMenu ) #NEWLINE# self . customContextMenuRequested . connect ( self . _show_context_menu ) #NEWLINE# self . _mnu = None #NEWLINE# self . _init_settings ( ) #NEWLINE# self . _init_style ( ) #NEWLINE# self . textChanged . connect ( self . _on_text_changed ) #NEWLINE# self . blockCountChanged . connect ( self . update ) #NEWLINE# self . cursorPositionChanged . connect ( self . update ) #NEWLINE# self . selectionChanged . connect ( self . update ) #NEWLINE# self . setMouseTracking ( True ) #NEWLINE# self . setCenterOnScroll ( True ) #NEWLINE# self . setLineWrapMode ( self . NoWrap ) #NEWLINE# self . setCursorWidth ( 2 )