Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
layoutwidget.py41 linesDownload Raw Back to console
1from typing import ClassVar2 3 4class LayoutWidget:5    """6    All top-level layout widgets and all widgets that may be set in an7    overlay must comply with this API.8    """9 10    # Title is only required for windows, not overlay components11    title = ""12    keyctx: ClassVar[str] = ""13 14    def key_responder(self):15        """16        Returns the object responding to key input. Usually self, but may be17        a wrapped object.18        """19        return self20 21    def focus_changed(self):22        """23        The view focus has changed. Layout objects should implement the API24        rather than directly subscribing to events.25        """26 27    def view_changed(self):28        """29        The view list has changed.30        """31 32    def layout_popping(self):33        """34        We are just about to pop a window off the stack, or exit an overlay.35        """36 37    def layout_pushed(self, prev):38        """39        We have just pushed a window onto the stack.40        """41