from ..fontfamily import MONOSPACE as MONOSPACE
from ..qt import QAbstractScrollArea as QAbstractScrollArea, QPainter as QPainter, QPoint as QPoint, QRect as QRect, QRectF as QRectF, QTextOption as QTextOption, QTimer as QTimer, Qt as Qt, Signal as Signal
from ..scrollbar import QScrollDelegate as QScrollDelegate
from .scheme import DARK as DARK, LIGHT as LIGHT, QCodeScheme as QCodeScheme
from _typeshed import Incomplete

class QHexDocument:
    def __init__(self, bytes: bytearray) -> None: ...
    def setBytes(self, bytes: bytearray): ...
    def bytes(self) -> bytes: ...
    def length(self) -> int: ...
    def read(self, offset: int, length: int) -> bytes: ...
    def write(self, offset: int, data: bytes) -> bool: ...
    def insert(self, offset: int, data: bytes) -> bool: ...
    def delete(self, offset: int, length: int) -> bool: ...

class HexEditCommand:
    offset: Incomplete
    oldData: Incomplete
    newData: Incomplete
    def __init__(self, offset: int, oldData: bytes, newData: bytes) -> None: ...
    def undo(self, doc: QHexDocument): ...
    def redo(self, doc: QHexDocument): ...

class QHexEditor(QAbstractScrollArea):
    cursorPositionChanged: Incomplete
    selectionChanged: Incomplete
    redoAvailable: Incomplete
    undoAvailable: Incomplete
    contentChanged: Incomplete
    def __init__(self, parent=None) -> None: ...
    def cursorPos(self) -> tuple[int, int]: ...
    def setCursorPos(self, byte: int, nibble: 0 | 1 | 2, keepAnchor: bool = False): ...
    def anchorPos(self) -> tuple[int, int]: ...
    def setCursorWidth(self, width: int): ...
    def cursorWidth(self) -> int: ...
    def setScheme(self, scheme: QCodeScheme): ...
    def scheme(self): ...
    def setColumnCount(self, columns: 8 | 16 | 32 | 64): ...
    def columnCount(self) -> int: ...
    def setBytes(self, bytes: bytearray): ...
    def bytes(self) -> bytes: ...
    def rowCount(self) -> int: ...
    def isReadOnly(self) -> bool: ...
    def setReadOnly(self, ro: bool): ...
    def resizeEvent(self, e) -> None: ...
    def hasSelection(self) -> bool: ...
    def byteSelection(self) -> tuple[int, int] | None: ...
    def nibbleSelection(self) -> tuple[int, int] | None: ...
    def isNibbleSelected(self, byte: int, nibble: 0 | 1) -> bool: ...
    def isByteSelected(self, byte: int) -> bool: ...
    def visibleRowsRange(self) -> tuple[int, int]: ...
    def paintEvent(self, e) -> None: ...
    def focusInEvent(self, e) -> None: ...
    def focusOutEvent(self, e) -> None: ...
    def cursorForPosition(self, pos: QPoint) -> tuple[int, int]: ...
    def mousePressEvent(self, e) -> None: ...
    def mouseMoveEvent(self, e) -> None: ...
    def mouseReleaseEvent(self, e) -> None: ...
    def keyPressEvent(self, e) -> None: ...
