# Path: androguard/gui/TextDecorators.py
# class RangePen(PageDecorator):
#     def __init__(self, decorated, a, b, pen, ignoreHighlights=True):
#         super().__init__(decorated)
# 
#         self.dataModel = decorated.getDataModel()
#         self.decorated = decorated
#         self.a = a
#         self.b = b
#         self.pen = pen
#         self.already = False
#         self.ignoreHighlights = ignoreHighlights
# 
#     def decorate(self, pageOffset=None):
#         self.page = self.decorated.decorate(pageOffset)
#         self.PenInterval = self.decorated.PenInterval
#         self.brushMap = self.decorated.brushMap
#         self.penMap = self.decorated.penMap
# 
#         if not self.already:
#             self.addPenInterval(self.a, self.b, self.ignoreHighlights, self.pen)
#             self.already = True
# 
#         return self.page
# 
# Path: androguard/gui/cemu.py
# class Cursor:
# class ConsoleEmulator:
#     def __init__(self, x, y):
#     def move(self, dx, dy):
#     def moveAbsolute(self, x, y):
#     def getPosition(self):
# def enum(**enums):
#     def __init__(self, qp, rows, cols):
#     def incrementPosition(self):
#     def newLine(self):
#     def LF(self):
#     def CR(self):
#     def _validatePosition(self, x, y):
#     def write(self, s, noBackgroudOnSpaces=False):
#     def write_c(self, c, noBackgroudOnSpaces=False):
#     def getXY(self):
#     def writeAt(self, x, y, s, noBackgroudOnSpaces=False):
#     def writeAt_c(self, x, y, c, noBackgroudOnSpaces=False):
#     def writeLn(self):
#     def gotoXY(self, x, y):


import string
import logging
from time import time
from PyQt5 import QtGui, QtCore
from androguard.gui.TextDecorators import RangePen
from androguard.gui.ViewMode import ViewMode
from androguard.gui.cemu import ConsoleEmulator, Directions
from androguard.gui import TextSelection
        for t in self.Ops:
            if len(t) == 1:
                t[0]()

            else:
                t[0](*t[1:])

        self.Ops = []

        if not self.newPix:
            self.draw()

        return self.newPix

    def resize(self, width, height):
        self.width = width - width % self.fontWidth
        self.height = height - height % self.fontHeight
        self.computeTextArea()
        self.qpix = self._getNewPixmap(self.width, self.height + self.SPACER)
        self.refresh = True

    def drawTextMode(self, qp, row=0, howMany=1):
        # draw background
        qp.fillRect(0, row * self.fontHeight, self.COLUMNS * self.fontWidth, howMany * self.fontHeight + self.SPACER,
                    self.backgroundBrush)

        # set text pen&font
        qp.setFont(self.font)
        qp.setPen(self.textPen)


# Path: androguard/gui/TextDecorators.py
# class RangePen(PageDecorator):
#     def __init__(self, decorated, a, b, pen, ignoreHighlights=True):
#         super().__init__(decorated)
# 
#         self.dataModel = decorated.getDataModel()
#         self.decorated = decorated
#         self.a = a
#         self.b = b
#         self.pen = pen
#         self.already = False
#         self.ignoreHighlights = ignoreHighlights
# 
#     def decorate(self, pageOffset=None):
#         self.page = self.decorated.decorate(pageOffset)
#         self.PenInterval = self.decorated.PenInterval
#         self.brushMap = self.decorated.brushMap
#         self.penMap = self.decorated.penMap
# 
#         if not self.already:
#             self.addPenInterval(self.a, self.b, self.ignoreHighlights, self.pen)
#             self.already = True
# 
#         return self.page
# 
# Path: androguard/gui/cemu.py
# class Cursor:
# class ConsoleEmulator:
#     def __init__(self, x, y):
#     def move(self, dx, dy):
#     def moveAbsolute(self, x, y):
#     def getPosition(self):
# def enum(**enums):
#     def __init__(self, qp, rows, cols):
#     def incrementPosition(self):
#     def newLine(self):
#     def LF(self):
#     def CR(self):
#     def _validatePosition(self, x, y):
#     def write(self, s, noBackgroudOnSpaces=False):
#     def write_c(self, c, noBackgroudOnSpaces=False):
#     def getXY(self):
#     def writeAt(self, x, y, s, noBackgroudOnSpaces=False):
#     def writeAt_c(self, x, y, c, noBackgroudOnSpaces=False):
#     def writeLn(self):
#     def gotoXY(self, x, y):


# Path: androguard/gui/BinViewMode.py
import string
import logging
from time import time
from PyQt5 import QtGui, QtCore
from androguard.gui.TextDecorators import RangePen
from androguard.gui.ViewMode import ViewMode
from androguard.gui.cemu import ConsoleEmulator, Directions
from androguard.gui import TextSelection

        for t in self.Ops:
            if len(t) == 1:
                t[0]()

            else:
                t[0](*t[1:])

        self.Ops = []

        if not self.newPix:
            self.draw()

        return self.newPix

    def resize(self, width, height):
        self.width = width - width % self.fontWidth
        self.height = height - height % self.fontHeight
        self.computeTextArea()
        self.qpix = self._getNewPixmap(self.width, self.height + self.SPACER)
        self.refresh = True

    def drawTextMode(self, qp, row=0, howMany=1):
        # draw background
        qp.fillRect(0, row * self.fontHeight, self.COLUMNS * self.fontWidth, howMany * self.fontHeight + self.SPACER,
                    self.backgroundBrush)

        # set text pen&font
        qp.setFont(self.font)
        qp.setPen(self.textPen)


        cemu = ConsoleEmulator(qp, self.ROWS, self.COLUMNS)