def __init__(self, meme_instance, parent=None):
        super(MemeQsciScintilla, self).__init__(parent)
        self.meme_instance = meme_instance

        self.bg_margin_changed  = QColor("#FF9933")
        self.bg_margin_saved =  QColor("#C5CBE3")

        self.CURRENT_LINE_MARKER = 8
        self.CURRENT_RANGE_IND = str(self.indicatorDefine(self.INDIC_DOTBOX))

        self.indicators = {self.CURRENT_RANGE_IND: None}

        # On idez/Editor;
        # select all (ctrl+x,h)
        # cut (ctrl+w)
        # copy (alt+w)
        # paste (ctrl+k


        # Clearing up some default commands
        # as we will rebind them
        ctrl_d = self.standardCommands().find(QsciCommand.SelectionDuplicate)
        ctrl_d.setKey(0)
        ctrl_l = self.standardCommands().find(QsciCommand.LineCut)
        ctrl_l.setKey(0)
        ctrl_x = self.standardCommands().find(QsciCommand.SelectionCut)
        ctrl_x.setKey(0)
        ctrl_c = self.standardCommands().find(QsciCommand.SelectionCopy)
        ctrl_c.setKey(0)
        ctrl_y = self.standardCommands().find(QsciCommand.Redo)
        ctrl_y.setKey(0)
        ctrl_u = self.standardCommands().find(QsciCommand.SelectionLowerCase)
        ctrl_u.setKey(0)
        ctrl__ = self.standardCommands().find(QsciCommand.ZoomOut)
        ctrl__.setKey(0)

        # ctrl_v = self.standardCommands().find(QsciCommand.Paste)
        # ctrl_v.setKey(0)

        self.setIndentationsUseTabs(False)
        self.setIndentationWidth(2)

        # Set the default font
        font = QFont('Monospace',10)
        self.setFont(font)
        self.setMarginsFont(font)

        # Margin 0 is used for line numbers
        fontmetrics = QFontMetrics(font)
        self.setMarginsFont(font)
        self.setMarginWidth(0, fontmetrics.width("000") + 6)
        self.setMarginLineNumbers(0, True)
        self.setMarginsBackgroundColor(self.bg_margin_saved)

        self.markerDefine(QsciScintilla.RightArrow,int(self.CURRENT_LINE_MARKER))
        self.setMarkerBackgroundColor(QColor("blue"),int(self.CURRENT_LINE_MARKER))

        # Brace matching: enable for a brace immediately before or after
        # the current position
        #
        self.setBraceMatching(QsciScintilla.SloppyBraceMatch)

        # Current line visible with special background color
        self.setCaretLineVisible(True)
        self.setCaretLineBackgroundColor(QColor("#F0F1F7"))

        # Set Python lexer
        # Set style for Python comments (style number 1) to a fixed-width
        # courier.
        #
        lexer = QsciLexerMemeScript()
        lexer.setDefaultFont(font)
        self.setLexer(lexer)
        #self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, 1, 'Monospace')

        # Don't want to see the horizontal scrollbar at all
        # Use raw message to Scintilla here (all messages are documented
        # here: http://www.scintilla.org/ScintillaDoc.html)
        self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

        self.installEventFilter(self)
        self.textChanged.connect(self.slot_text_changed)
dataset/ETHPy150Open thiago-silva/memetalk/proto3/scintilla_editor.py/MemeQsciScintilla.__init__/original