# The Python API of feather_tk: generated from the bindings by nanobind's # stubgen, with each description taken from the C++ headers. Do not edit: # see docs/pythonstubs.py. Import it as "import feather_tk". """ feather-tk is a lightweight toolkit for building professional tools for film, VFX, and animation. """ from collections.abc import Callable, Mapping, Sequence import datetime import enum import os import pathlib from typing import overload class IBaseSystem: """Base class for systems.""" @property def context(self) -> Context: """Get the context.""" @property def name(self) -> str: """Get the system name.""" def tick(self) -> None: """Tick the system.""" @property def tickTime(self) -> datetime.timedelta: """Get the system tick time interval.""" class ISystem(IBaseSystem): """Base class for systems.""" pass class ObserverAction(enum.Enum): """Observer actions.""" Trigger = 0 Suppress = 1 class IntObserver: """Value observer.""" def __init__(self, observable: IObservableInt, callback: Callable[[int], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableInt: """Base class for observable values.""" def get(self) -> int: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableInt(IObservableInt): """Observable value.""" def __init__(self, arg: int, /) -> None: ... def setAlways(self, arg: int, /) -> None: """Set the value.""" def setIfChanged(self, arg: int, /) -> bool: """Set the value only if it has changed.""" def get(self) -> int: """Get the value.""" class FloatObserver: """Value observer.""" def __init__(self, observable: IObservableFloat, callback: Callable[[float], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableFloat: """Base class for observable values.""" def get(self) -> float: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableFloat(IObservableFloat): """Observable value.""" def __init__(self, arg: float, /) -> None: ... def setAlways(self, arg: float, /) -> None: """Set the value.""" def setIfChanged(self, arg: float, /) -> bool: """Set the value only if it has changed.""" def get(self) -> float: """Get the value.""" class DoubleObserver: """Value observer.""" def __init__(self, observable: IObservableDouble, callback: Callable[[float], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableDouble: """Base class for observable values.""" def get(self) -> float: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableDouble(IObservableDouble): """Observable value.""" def __init__(self, arg: float, /) -> None: ... def setAlways(self, arg: float, /) -> None: """Set the value.""" def setIfChanged(self, arg: float, /) -> bool: """Set the value only if it has changed.""" def get(self) -> float: """Get the value.""" class BoolObserver: """Value observer.""" def __init__(self, observable: IObservableBool, callback: Callable[[bool], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableBool: """Base class for observable values.""" def get(self) -> bool: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableBool(IObservableBool): """Observable value.""" def __init__(self, arg: bool, /) -> None: ... def setAlways(self, arg: bool, /) -> None: """Set the value.""" def setIfChanged(self, arg: bool, /) -> bool: """Set the value only if it has changed.""" def get(self) -> bool: """Get the value.""" class StringObserver: """Value observer.""" def __init__(self, observable: IObservableString, callback: Callable[[str], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableString: """Base class for observable values.""" def get(self) -> str: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableString(IObservableString): """Observable value.""" def __init__(self, arg: str, /) -> None: ... def setAlways(self, arg: str, /) -> None: """Set the value.""" def setIfChanged(self, arg: str, /) -> bool: """Set the value only if it has changed.""" def get(self) -> str: """Get the value.""" class SizeTObserver: """Value observer.""" def __init__(self, observable: IObservableSizeT, callback: Callable[[int], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableSizeT: """Base class for observable values.""" def get(self) -> int: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableSizeT(IObservableSizeT): """Observable value.""" def __init__(self, arg: int, /) -> None: ... def setAlways(self, arg: int, /) -> None: """Set the value.""" def setIfChanged(self, arg: int, /) -> bool: """Set the value only if it has changed.""" def get(self) -> int: """Get the value.""" class RangeIObserver: """Value observer.""" def __init__(self, observable: IObservableRangeI, callback: Callable[[RangeI], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableRangeI: """Base class for observable values.""" def get(self) -> RangeI: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableRangeI(IObservableRangeI): """Observable value.""" def __init__(self, arg: RangeI, /) -> None: ... def setAlways(self, arg: RangeI, /) -> None: """Set the value.""" def setIfChanged(self, arg: RangeI, /) -> bool: """Set the value only if it has changed.""" def get(self) -> RangeI: """Get the value.""" class RangeFObserver: """Value observer.""" def __init__(self, observable: IObservableRangeF, callback: Callable[[RangeF], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableRangeF: """Base class for observable values.""" def get(self) -> RangeF: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableRangeF(IObservableRangeF): """Observable value.""" def __init__(self, arg: RangeF, /) -> None: ... def setAlways(self, arg: RangeF, /) -> None: """Set the value.""" def setIfChanged(self, arg: RangeF, /) -> bool: """Set the value only if it has changed.""" def get(self) -> RangeF: """Get the value.""" class RangeDObserver: """Value observer.""" def __init__(self, observable: IObservableRangeD, callback: Callable[[RangeD], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableRangeD: """Base class for observable values.""" def get(self) -> RangeD: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableRangeD(IObservableRangeD): """Observable value.""" def __init__(self, arg: RangeD, /) -> None: ... def setAlways(self, arg: RangeD, /) -> None: """Set the value.""" def setIfChanged(self, arg: RangeD, /) -> bool: """Set the value only if it has changed.""" def get(self) -> RangeD: """Get the value.""" class V2IObserver: """Value observer.""" def __init__(self, observable: IObservableV2I, callback: Callable[[V2I], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableV2I: """Base class for observable values.""" def get(self) -> V2I: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableV2I(IObservableV2I): """Observable value.""" def __init__(self, arg: V2I, /) -> None: ... def setAlways(self, arg: V2I, /) -> None: """Set the value.""" def setIfChanged(self, arg: V2I, /) -> bool: """Set the value only if it has changed.""" def get(self) -> V2I: """Get the value.""" class StringMapObserver: """Map observer.""" def __init__(self, observable: IObservableStringMap, callback: Callable[[Mapping[str, str]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableStringMap: """Base class for observable maps.""" def get(self) -> dict[str, str]: """Get the map.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableStringMap(IObservableStringMap): """Observable map.""" def __init__(self, arg: Mapping[str, str], /) -> None: ... def setAlways(self, arg: Mapping[str, str], /) -> None: """Set the map.""" def setIfChanged(self, arg: Mapping[str, str], /) -> bool: """Set the map only if it has changed.""" def get(self) -> dict[str, str]: """Get the map.""" class IntListObserver: """List observer.""" def __init__(self, observableList: IObservableIntList, callback: Callable[[Sequence[int]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableIntList: """Base class for observable lists.""" pass class ObservableIntList(IObservableIntList): """Observable list.""" def __init__(self, arg: Sequence[int], /) -> None: ... def setAlways(self, arg: Sequence[int], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[int], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: int) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: int) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: int, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[int], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: int) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[int]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[int]) -> None: """Replace a range of items.""" def get(self) -> list[int]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> int: """Get a list item.""" def contains(self, arg: int, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: int, /) -> int: """Get the index of the given item.""" class FloatListObserver: """List observer.""" def __init__(self, observableList: IObservableFloatList, callback: Callable[[Sequence[float]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableFloatList: """Base class for observable lists.""" pass class ObservableFloatList(IObservableFloatList): """Observable list.""" def __init__(self, arg: Sequence[float], /) -> None: ... def setAlways(self, arg: Sequence[float], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[float], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: float) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: float) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: float, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[float], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: float) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[float]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[float]) -> None: """Replace a range of items.""" def get(self) -> list[float]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> float: """Get a list item.""" def contains(self, arg: float, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: float, /) -> int: """Get the index of the given item.""" class DoubleListObserver: """List observer.""" def __init__(self, observableList: IObservableDoubleList, callback: Callable[[Sequence[float]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableDoubleList: """Base class for observable lists.""" pass class ObservableDoubleList(IObservableDoubleList): """Observable list.""" def __init__(self, arg: Sequence[float], /) -> None: ... def setAlways(self, arg: Sequence[float], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[float], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: float) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: float) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: float, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[float], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: float) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[float]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[float]) -> None: """Replace a range of items.""" def get(self) -> list[float]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> float: """Get a list item.""" def contains(self, arg: float, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: float, /) -> int: """Get the index of the given item.""" class BoolListObserver: """List observer.""" def __init__(self, observableList: IObservableBoolList, callback: Callable[[Sequence[bool]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableBoolList: """Base class for observable lists.""" pass class ObservableBoolList(IObservableBoolList): """Observable list.""" def __init__(self, arg: Sequence[bool], /) -> None: ... def setAlways(self, arg: Sequence[bool], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[bool], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: bool) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: bool) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: bool, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[bool], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: bool) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[bool]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[bool]) -> None: """Replace a range of items.""" def get(self) -> list[bool]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> bool: """Get a list item.""" def contains(self, arg: bool, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: bool, /) -> int: """Get the index of the given item.""" class StringListObserver: """List observer.""" def __init__(self, observableList: IObservableStringList, callback: Callable[[Sequence[str]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableStringList: """Base class for observable lists.""" pass class ObservableStringList(IObservableStringList): """Observable list.""" def __init__(self, arg: Sequence[str], /) -> None: ... def setAlways(self, arg: Sequence[str], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[str], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: str) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: str) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: str, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[str], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: str) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[str]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[str]) -> None: """Replace a range of items.""" def get(self) -> list[str]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> str: """Get a list item.""" def contains(self, arg: str, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: str, /) -> int: """Get the index of the given item.""" class StringIntMapObserver: """Map observer.""" def __init__(self, observableMap: IObservableStringIntMap, callback: Callable[[Mapping[str, int]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableStringIntMap: """Base class for observable maps.""" pass class ObservableStringIntMap(IObservableStringIntMap): """Observable map.""" def __init__(self, arg: Mapping[str, int], /) -> None: ... def setAlways(self, arg: Mapping[str, int], /) -> None: """Set the map.""" def setIfChanged(self, arg: Mapping[str, int], /) -> bool: """Set the map only if it has changed.""" def get(self) -> dict[str, int]: """Get the map.""" class Box2I: """Two-dimensional box.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: V2I, arg1: V2I, /) -> None: ... @overload def __init__(self, arg0: V2I, arg1: Size2I, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, arg2: int, arg3: int, /) -> None: ... @property def min(self) -> V2I: ... @min.setter def min(self, arg: V2I, /) -> None: ... @property def max(self) -> V2I: ... @max.setter def max(self, arg: V2I, /) -> None: ... @property def x(self) -> int: ... @property def y(self) -> int: ... @property def size(self) -> Size2I: ... @property def w(self) -> int: ... @property def h(self) -> int: ... @property def valid(self) -> bool: ... def __eq__(self, arg: Box2I, /) -> bool: ... def __ne__(self, arg: Box2I, /) -> bool: ... def __repr__(self) -> str: ... class Box2F: """Two-dimensional box.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: V2F, arg1: V2F, /) -> None: ... @overload def __init__(self, arg0: V2F, arg1: Size2F, /) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, /) -> None: ... @property def min(self) -> V2F: ... @min.setter def min(self, arg: V2F, /) -> None: ... @property def max(self) -> V2F: ... @max.setter def max(self, arg: V2F, /) -> None: ... @property def x(self) -> float: ... @property def y(self) -> float: ... @property def size(self) -> Size2F: ... @property def w(self) -> float: ... @property def h(self) -> float: ... @property def valid(self) -> bool: ... def __eq__(self, arg: Box2F, /) -> bool: ... def __ne__(self, arg: Box2F, /) -> bool: ... def __repr__(self) -> str: ... class Box3F: """Three-dimensional box.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: V3F, arg1: V3F, /) -> None: ... @overload def __init__(self, arg0: V3F, arg1: Size3F, /) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, /) -> None: ... @property def min(self) -> V3F: ... @min.setter def min(self, arg: V3F, /) -> None: ... @property def max(self) -> V3F: ... @max.setter def max(self, arg: V3F, /) -> None: ... @property def x(self) -> float: ... @property def y(self) -> float: ... @property def z(self) -> float: ... @property def size(self) -> Size3F: ... @property def w(self) -> float: ... @property def h(self) -> float: ... @property def d(self) -> float: ... @property def valid(self) -> bool: ... def __eq__(self, arg: Box3F, /) -> bool: ... def __ne__(self, arg: Box3F, /) -> bool: ... def __repr__(self) -> str: ... @overload def center(arg: Box2I, /) -> V2I: """Get the center of a box.""" @overload def center(arg: Box2F, /) -> V2F: """Get the center of a box.""" @overload def center(arg: Box3F, /) -> V3F: """Get the center of a box.""" @overload def area(arg: Box2I, /) -> float: """Get the area of a box. Get the area of the given size. """ @overload def area(arg: Box2F, /) -> float: """Get the area of a box. Get the area of the given size. """ @overload def area(arg: Size2I, /) -> float: """Get the area of a box. Get the area of the given size. """ @overload def area(arg: Size2F, /) -> float: """Get the area of a box. Get the area of the given size. """ @overload def volume(arg: Box3F, /) -> float: """Get the volume of a box. Get the volume of the given size. """ @overload def volume(arg: Size3F, /) -> float: """Get the volume of a box. Get the volume of the given size. """ @overload def move(arg0: Box2I, arg1: V2I, /) -> Box2I: """Move a box.""" @overload def move(arg0: Box2F, arg1: V2F, /) -> Box2F: """Move a box.""" @overload def move(arg0: Box3F, arg1: V3F, /) -> Box3F: """Move a box.""" @overload def contains(arg0: Box2I, arg1: Box2I, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: Box2F, arg1: Box2F, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: Box2I, arg1: V2I, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: Box2F, arg1: V2F, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: RangeI, arg1: int, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: RangeI64, arg1: int, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: RangeF, arg1: float, /) -> bool: """Do the settings contain the given value?""" @overload def contains(arg0: RangeD, arg1: float, /) -> bool: """Do the settings contain the given value?""" @overload def intersects(arg0: Box2I, arg1: Box2I, /) -> bool: """Does a box intersect another box? Does the range interset the given range? """ @overload def intersects(arg0: Box2F, arg1: Box2F, /) -> bool: """Does a box intersect another box? Does the range interset the given range? """ @overload def intersects(arg0: RangeI, arg1: RangeI, /) -> bool: """Does a box intersect another box? Does the range interset the given range? """ @overload def intersects(arg0: RangeI64, arg1: RangeI64, /) -> bool: """Does a box intersect another box? Does the range interset the given range? """ @overload def intersects(arg0: RangeF, arg1: RangeF, /) -> bool: """Does a box intersect another box? Does the range interset the given range? """ @overload def intersects(arg0: RangeD, arg1: RangeD, /) -> bool: """Does a box intersect another box? Does the range interset the given range? """ @overload def intersect(arg0: Box2I, arg1: Box2I, /) -> Box2I: """Get the intersection of the boxes.""" @overload def intersect(arg0: Box2F, arg1: Box2F, /) -> Box2F: """Get the intersection of the boxes.""" @overload def expand(arg0: Box2I, arg1: Box2I, /) -> Box2I: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: Box2F, arg1: Box2F, /) -> Box2F: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: Box2I, arg1: V2I, /) -> Box2I: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: Box2F, arg1: V2F, /) -> Box2F: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: RangeI, arg1: int, /) -> RangeI: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: RangeI64, arg1: int, /) -> RangeI64: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: RangeF, arg1: float, /) -> RangeF: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def expand(arg0: RangeD, arg1: float, /) -> RangeD: """Expand a box with another box. Expand a box with a vector. Expand the range to include the given number. Expand the range to include the given range. """ @overload def margin(arg0: Box2I, arg1: V2I, /) -> Box2I: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Box2F, arg1: V2F, /) -> Box2F: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Box2I, arg1: int, /) -> Box2I: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Box2F, arg1: float, /) -> Box2F: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Box2I, arg1: int, arg2: int, arg3: int, arg4: int, /) -> Box2I: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Box2F, arg1: float, arg2: float, arg3: float, arg4: float, /) -> Box2F: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Size2I, arg1: int, /) -> Size2I: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Size2F, arg1: float, /) -> Size2F: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Size2I, arg1: int, arg2: int, /) -> Size2I: """Add a margin to a box. Add a margin to a size. """ @overload def margin(arg0: Size2F, arg1: float, arg2: float, /) -> Size2F: """Add a margin to a box. Add a margin to a size. """ @overload def bbox(arg: Sequence[Box2I], /) -> Box2I: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def bbox(arg: Sequence[Box2F], /) -> Box2F: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def bbox(arg: Sequence[Box3F], /) -> Box3F: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def bbox(arg: Sequence[V2I], /) -> Box2I: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def bbox(arg: Sequence[V2F], /) -> Box2F: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def bbox(arg: Sequence[V3F], /) -> Box3F: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def bbox(arg: TriMesh3F, /) -> Box3F: """Get the bounding box. Compute the bounding box of a mesh. """ @overload def points(arg: Box2I, /) -> list[V2I]: """Get the points of a box.""" @overload def points(arg: Box2F, /) -> list[V2F]: """Get the points of a box.""" @overload def points(arg: Box3F, /) -> list[V3F]: """Get the points of a box.""" @overload def convert(arg: Box2I, /) -> Box2F: """Convert box types. Convert command line arguments. Convert vector types. """ @overload def convert(arg: V2I, /) -> V2F: """Convert box types. Convert command line arguments. Convert vector types. """ @overload def to_string(arg: Box2I, /) -> str: """Convert to a string.""" @overload def to_string(arg: Box2F, /) -> str: """Convert to a string.""" @overload def to_string(arg: Box3F, /) -> str: """Convert to a string.""" @overload def to_string(arg: FontType, /) -> str: """Convert to a string.""" @overload def to_string(arg: ImageType, /) -> str: """Convert to a string.""" @overload def to_string(arg: VideoLevels, /) -> str: """Convert to a string.""" @overload def to_string(arg: YUVCoefficients, /) -> str: """Convert to a string.""" @overload def to_string(arg: LogType, /) -> str: """Convert to a string.""" @overload def to_string(arg: Endian, /) -> str: """Convert to a string.""" @overload def to_string(arg: UserPath, /) -> str: """Convert to a string.""" @overload def to_string(arg: DirListSort, /) -> str: """Convert to a string.""" @overload def to_string(arg: ChannelDisplay, /) -> str: """Convert to a string.""" @overload def to_string(arg: InputVideoLevels, /) -> str: """Convert to a string.""" @overload def to_string(arg: AlphaBlend, /) -> str: """Convert to a string.""" @overload def to_string(arg: ImageFilter, /) -> str: """Convert to a string.""" @overload def to_string(arg: Size2I, /) -> str: """Convert to a string.""" @overload def to_string(arg: Size2F, /) -> str: """Convert to a string.""" @overload def to_string(arg: Size3F, /) -> str: """Convert to a string.""" @overload def to_string(arg: V2I, /) -> str: """Convert to a string.""" @overload def to_string(arg: V2F, /) -> str: """Convert to a string.""" @overload def to_string(arg: V3F, /) -> str: """Convert to a string.""" @overload def to_string(arg: V4F, /) -> str: """Convert to a string.""" @overload def to_string(arg: TextureType, /) -> str: """Convert to a string.""" @overload def to_string(arg: SizeRole, /) -> str: """Convert to a string.""" @overload def to_string(arg: ColorRole, /) -> str: """Convert to a string.""" @overload def to_string(arg: MouseButton, /) -> str: """Convert to a string.""" @overload def to_string(arg: KeyModifier, /) -> str: """Convert to a string.""" @overload def to_string(arg: Key, /) -> str: """Convert to a string.""" @overload def to_string(arg: Orientation, /) -> str: """Convert to a string.""" @overload def to_string(arg: Stretch, /) -> str: """Convert to a string.""" @overload def to_string(arg: HAlign, /) -> str: """Convert to a string.""" @overload def to_string(arg: VAlign, /) -> str: """Convert to a string.""" @overload def to_string(arg: DialogSize, /) -> str: """Convert to a string.""" @overload def to_string(arg: ActionGroupType, /) -> str: """Convert to a string.""" @overload def to_string(arg: ColorStyle, /) -> str: """Convert to a string.""" @overload def to_string(arg: Renderer, /) -> str: """Convert to a string.""" @overload def to_string(arg: ButtonGroupType, /) -> str: """Convert to a string.""" @overload def to_string(arg: FileBrowserMode, /) -> str: """Convert to a string.""" @overload def to_string(arg: MDIResize, /) -> str: """Convert to a string.""" @overload def to_string(arg: ScrollType, /) -> str: """Convert to a string.""" @overload def from_string(arg0: str, arg1: Box2I, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Box2F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Box3F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: FontType, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ImageType, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: VideoLevels, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: YUVCoefficients, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: LogType, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Endian, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: UserPath, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: DirListSort, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ChannelDisplay, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: InputVideoLevels, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: AlphaBlend, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ImageFilter, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Size2I, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Size2F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Size3F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: V2I, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: V2F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: V3F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: V4F, /) -> None: """Convert from a string.""" @overload def from_string(arg0: str, arg1: TextureType, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: SizeRole, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ColorRole, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: MouseButton, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Key, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Orientation, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Stretch, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: HAlign, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: VAlign, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: DialogSize, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ActionGroupType, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ColorStyle, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: Renderer, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ButtonGroupType, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: FileBrowserMode, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: MDIResize, /) -> bool: """Convert from a string.""" @overload def from_string(arg0: str, arg1: ScrollType, /) -> bool: """Convert from a string.""" class ICmdLineOption: """Base class for command line options.""" @property def names(self) -> list[str]: """Get the names.""" @property def hasValue(self) -> bool: """Get whether the option takes a value.""" @property def help(self) -> str: """Get the help: the names, whether a value follows, and the text.""" @property def helpText(self) -> str: """Get the help text alone, without the names.""" @property def group(self) -> str: """Get the group.""" @property def found(self) -> bool: """Get whether the option was found.""" @property def matchedName(self) -> str: """Get the option name that was matched.""" class CmdLineFlag(ICmdLineOption): """Command line flag.""" def __init__(self, names: Sequence[str], help: str, group: str = '') -> None: ... class CmdLineOptionI(ICmdLineOption): def __init__(self, names: Sequence[str], help: str, group: str = '', defaultValue: int | None = None, possibleValues: str = '') -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> int: ... class CmdLineOptionF(ICmdLineOption): def __init__(self, names: Sequence[str], help: str, group: str = '', defaultValue: float | None = None, possibleValues: str = '') -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> float: ... class CmdLineOptionD(ICmdLineOption): def __init__(self, names: Sequence[str], help: str, group: str = '', defaultValue: float | None = None, possibleValues: str = '') -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> float: ... class CmdLineOptionBool(ICmdLineOption): def __init__(self, names: Sequence[str], help: str, group: str = '', defaultValue: bool | None = None, possibleValues: str = '') -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> bool: ... class CmdLineOptionString(ICmdLineOption): def __init__(self, names: Sequence[str], help: str, group: str = '', defaultValue: str | None = None, possibleValues: str = '') -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> str: ... class CmdLineListOptionString(ICmdLineOption): def __init__(self, names: Sequence[str], help: str, group: str = '') -> None: ... @property def list(self) -> list[str]: ... class ICmdLineArg: """Base class for command line arguments.""" pass class CmdLineArgI(ICmdLineArg): def __init__(self, name: str, help: str, optional: bool = False) -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> int: ... class CmdLineArgF(ICmdLineArg): def __init__(self, name: str, help: str, optional: bool = False) -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> float: ... class CmdLineArgD(ICmdLineArg): def __init__(self, name: str, help: str, optional: bool = False) -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> float: ... class CmdLineArgBool(ICmdLineArg): def __init__(self, name: str, help: str, optional: bool = False) -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> bool: ... class CmdLineArgString(ICmdLineArg): def __init__(self, name: str, help: str, optional: bool = False) -> None: ... @property def hasValue(self) -> bool: ... @property def value(self) -> str: ... class CmdLineListArgString(ICmdLineArg): def __init__(self, name: str, help: str, optional: bool = False) -> None: ... @property def list(self) -> list[str]: ... class Color1F: """One channel color (luminance).""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def l(self) -> float: """The luminance.""" @l.setter def l(self, arg: float, /) -> None: ... def __eq__(self, arg: Color1F, /) -> bool: ... def __ne__(self, arg: Color1F, /) -> bool: ... def __repr__(self) -> str: ... class Color2F: """Two channel color (luminance and alpha).""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg: float, /) -> None: ... @overload def __init__(self, arg0: float, arg1: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def l(self) -> float: """The luminance.""" @l.setter def l(self, arg: float, /) -> None: ... @property def a(self) -> float: """The alpha.""" @a.setter def a(self, arg: float, /) -> None: ... def __eq__(self, arg: Color2F, /) -> bool: ... def __ne__(self, arg: Color2F, /) -> bool: ... def __repr__(self) -> str: ... class Color3F: """Three channel color (RGB).""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def r(self) -> float: """The red channel.""" @r.setter def r(self, arg: float, /) -> None: ... @property def g(self) -> float: """The green channel.""" @g.setter def g(self, arg: float, /) -> None: ... @property def b(self) -> float: """The blue channel.""" @b.setter def b(self, arg: float, /) -> None: ... def __eq__(self, arg: Color3F, /) -> bool: ... def __ne__(self, arg: Color3F, /) -> bool: ... def __repr__(self) -> str: ... class Color4F: """Four channel color (RGBA).""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, /) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def r(self) -> float: """The red channel.""" @r.setter def r(self, arg: float, /) -> None: ... @property def g(self) -> float: """The green channel.""" @g.setter def g(self, arg: float, /) -> None: ... @property def b(self) -> float: """The blue channel.""" @b.setter def b(self, arg: float, /) -> None: ... @property def a(self) -> float: """The alpha.""" @a.setter def a(self, arg: float, /) -> None: ... def __eq__(self, arg: Color4F, /) -> bool: ... def __ne__(self, arg: Color4F, /) -> bool: ... def __repr__(self) -> str: ... class ICommand: """Base class for commands.""" def __init__(self) -> None: ... def exec(self) -> None: """Execute the command. A command stack calls this when the command is pushed, and again when it is redone. """ def undo(self) -> None: """Undo the command.""" class CommandStack: """Command stack.""" def __init__(self) -> None: """Create a new command stack.""" def push(self, command: ICommand) -> None: """Execute a command and push it onto the stack.""" def clear(self) -> None: """Clear the stack.""" def undo(self) -> None: """Undo a command.""" def redo(self) -> None: """Redo a command.""" def observeHasUndo(self) -> IObservableBool: """Observer whether the stack can undo a command.""" def observeHasRedo(self) -> IObservableBool: """Observer whether the stack can redo a command.""" class Context: """ The systems an application runs on: logging, fonts, I/O, audio and whatever else is added. Everything made from a context is updated by tick(). """ def __init__(self) -> None: """Create a new context.""" def addSystem(self, arg: IBaseSystem, /) -> None: """Add a system.""" @property def systems(self) -> list[IBaseSystem]: """Get the systems.""" def getSystemByName(self, arg: str, /) -> IBaseSystem: """Get a system by name.""" def tick(self) -> None: """ Run the systems once: results from other threads are taken in, a player's current frame and time move on, and observers are called. Nothing changes between calls, so a script without an application's event loop calls this in its own loop, for as long as it is waiting for something. It does not wait itself: it takes in only what has finished, so sleep a few milliseconds between calls. A loop of bare calls can run a thousand times before the first frame is decoded. """ class DiagFormat: """How a sample is turned into the number its format string expects. Samples are integers, which is right for counting things and wrong for timing them: the resolution wanted for a graph and the unit wanted for reading are not the same. Sample in microseconds, divide by a thousand and show one decimal, and the graph keeps its detail while the label says milliseconds. """ def __init__(self) -> None: ... @property def divisor(self) -> float: """What a sample is divided by before it is formatted. It is only used when the precision is zero or more. """ @divisor.setter def divisor(self, arg: float, /) -> None: ... @property def precision(self) -> int: """Decimal places. Below zero formats the sample as the integer it is. """ @precision.setter def precision(self, arg: int, /) -> None: ... def diagText(format: str, diagFormat: DiagFormat, value: int) -> str: """Apply a sampler's format to a sample.""" class DiagSystem(ISystem): """Diagnostics system.""" def __init__(self, context: Context) -> None: """Create a new system.""" def addSampler(self, id: str, sampler: Callable[[], int], format: DiagFormat = ...) -> None: """Add a sampler function. The id is the group and then the name, "Group/Name: {0}", the name being the format string for the readout. An id already added is left as it is. """ def getFormat(self, id: str) -> DiagFormat: """Get how a sampler's value should be formatted.""" @property def groups(self) -> list[str]: """The sampler groups, in the order they are shown.""" @property def groupOrder(self) -> list[str]: """ The groups shown first, in order; the rest follow in the order they were added. """ @groupOrder.setter def groupOrder(self, arg: Sequence[str], /) -> None: ... def getNames(self, group: str) -> list[str]: """Get the sampler names in a group.""" def hasSampler(self, id: str) -> bool: """Get whether the sampler exists.""" @property def samplesMax(self) -> int: """Get the maximum number of samples.""" @samplesMax.setter def samplesMax(self, arg: int, /) -> None: ... def observeSamplesMax(self) -> IObservableSizeT: """Observe the maximum number of samples.""" @property def samples(self) -> dict[str, list[int]]: """Get the samples.""" @property def tickTime(self) -> datetime.timedelta: """Get the system tick time interval.""" @tickTime.setter def tickTime(self, arg: datetime.timedelta, /) -> None: ... class FileLogSystem(ISystem): """File logging system.""" def __init__(self, context: Context, path: str | os.PathLike) -> None: """Create a new system.""" class FontType(enum.Enum): """Font types.""" Regular = 0 Bold = 1 Mono = 2 Symbols = 3 def getFontTypeEnums() -> list[FontType]: """Get every value of FontType.""" @overload def getLabel(arg: FontType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ImageType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: VideoLevels, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: YUVCoefficients, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: LogType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: LogType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: Endian, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: UserPath, /) -> str: """Get a composition's label.""" @overload def getLabel(seq: Sequence[FrameSeq], pad: int = 0) -> str: """Get a composition's label.""" @overload def getLabel(arg: DirListSort, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ChannelDisplay, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: InputVideoLevels, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: AlphaBlend, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ImageFilter, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: TextureType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: SizeRole, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ColorRole, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: MouseButton, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: Key, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: Orientation, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: Stretch, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: HAlign, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: VAlign, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: DialogSize, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ActionGroupType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ColorStyle, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: Renderer, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ButtonGroupType, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: FileBrowserMode, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: MDIResize, /) -> str: """Get a composition's label.""" @overload def getLabel(arg: ScrollType, /) -> str: """Get a composition's label.""" class FontInfo: """Font information.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: str, arg1: int, /) -> None: ... @property def name(self) -> str: """The font name: a built-in font (see getDefaultFont()) or one added to the font system. A name the font system does not have is drawn with the default regular font. """ @name.setter def name(self, arg: str, /) -> None: ... @property def size(self) -> int: """The font size, in pixels.""" @size.setter def size(self, arg: int, /) -> None: ... def __eq__(self, arg: FontInfo, /) -> bool: ... def __ne__(self, arg: FontInfo, /) -> bool: ... def __lt__(self, arg: FontInfo, /) -> bool: ... class FontMetrics: """Font metrics.""" @property def ascender(self) -> int: """The distance from the baseline up to the top of the font, in pixels. """ @ascender.setter def ascender(self, arg: int, /) -> None: ... @property def descender(self) -> int: """The distance from the baseline to the bottom of the font, in pixels. It is below the baseline, so it is usually negative. """ @descender.setter def descender(self, arg: int, /) -> None: ... @property def lineHeight(self) -> int: """The distance from one baseline to the next, in pixels.""" @lineHeight.setter def lineHeight(self, arg: int, /) -> None: ... class GlyphInfo: """Font glyph information.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: int, arg1: FontInfo, /) -> None: ... @property def code(self) -> int: """The Unicode code point.""" @code.setter def code(self, arg: int, /) -> None: ... @property def fontInfo(self) -> FontInfo: """The font.""" @fontInfo.setter def fontInfo(self, arg: FontInfo, /) -> None: ... def __eq__(self, arg: GlyphInfo, /) -> bool: ... def __ne__(self, arg: GlyphInfo, /) -> bool: ... def __lt__(self, arg: GlyphInfo, /) -> bool: ... class Glyph: """Font glyph.""" @property def info(self) -> GlyphInfo: """The code point and font the glyph is for.""" @info.setter def info(self, arg: GlyphInfo, /) -> None: ... @property def image(self) -> Image: """The rendered glyph: one channel of 8-bit coverage. Null when no font has the glyph or it cannot be rendered. """ @image.setter def image(self, arg: Image, /) -> None: ... @property def offset(self) -> V2I: """Where the top left of the image is from the pen position on the baseline, in pixels, with y up. """ @offset.setter def offset(self, arg: V2I, /) -> None: ... @property def advance(self) -> int: """How far the pen moves on to the next glyph, in pixels.""" @advance.setter def advance(self, arg: int, /) -> None: ... @property def lsbDelta(self) -> int: """The change hinting made to the left side bearing, in 64ths of a pixel. Text layout compares it with the previous glyph's rsbDelta and moves the glyph a pixel when they differ by more than about half a pixel. """ @lsbDelta.setter def lsbDelta(self, arg: int, /) -> None: ... @property def rsbDelta(self) -> int: """The change hinting made to the right side bearing, in 64ths of a pixel. """ @rsbDelta.setter def rsbDelta(self, arg: int, /) -> None: ... class FontSystem(ISystem): """Font system. Add text elide functionality. Add support for gamma correction? - https://www.freetype.org/freetype2/docs/text-rendering-general.html Use a text-shaping library. """ def __init__(self, context: Context) -> None: """Create a new system.""" @property def fonts(self) -> list[str]: """Get the names of the fonts.""" def addFont(self, name: str, fileName: str) -> bool: """Add a font from a file, under the given name. Add a font from data in memory, which is copied, under the given name. Returns whether the font could be read. """ @property def glyphCacheSize(self) -> int: """Get the number of glyphs in the cache. It is updated once a second. """ def observeGlyphCacheSize(self) -> IObservableSizeT: """Observe the number of glyphs in the cache.""" @property def glyphCachePercentage(self) -> float: """Get how full the glyph cache is, as a percentage of its maximum. It is updated once a second. """ def getMetrics(self, fontInfo: FontInfo) -> FontMetrics: """Get font metrics.""" def getSize(self, text: str, fontInfo: FontInfo, maxLineWidth: int = 0) -> Size2I: """Get the size of the given string.""" def getBoxes(self, text: str, fontInfo: FontInfo, maxLineWidth: int = 0) -> list[Box2I]: """Get the character boxes for the given string.""" def getGlyphs(self, text: str, fontInfo: FontInfo) -> list[Glyph]: """Get the glyphs for the given string.""" class IApp: """Base class for applications.""" @property def exeName(self) -> str: """Get the executable file name.""" @property def context(self) -> Context: """Get the context.""" @property def name(self) -> str: """Get the application name.""" @property def summary(self) -> str: """Get the application summary.""" @property def hasCmdLineHelp(self) -> bool: """Get whether the command line help is shown.""" class IRender: """Base class for renderers.""" def begin(self, size: Size2I, options: RenderOptions) -> None: """Begin a render.""" def end(self) -> None: """Finish a render.""" @property def renderSize(self) -> Size2I: """Get the render size.""" @renderSize.setter def renderSize(self, arg: Size2I, /) -> None: ... @property def viewport(self) -> Box2I: """Get the viewport.""" @viewport.setter def viewport(self, arg: Box2I, /) -> None: ... def clearViewport(self, arg: Color4F, /) -> None: """Clear the viewport.""" @property def clipRectEnabled(self) -> bool: """Get whether the clipping rectangle is enabled.""" @clipRectEnabled.setter def clipRectEnabled(self, arg: bool, /) -> None: ... @property def clipRect(self) -> Box2I: """Get the clipping rectangle.""" @clipRect.setter def clipRect(self, arg: Box2I, /) -> None: ... @overload def drawRect(self, rect: Box2F, color: Color4F = ...) -> None: """Draw a filled rectangle.""" @overload def drawRect(self, rect: Box2I, color: Color4F = ...) -> None: """Draw a filled rectangle.""" @overload def drawText(self, glyphs: Sequence[Glyph], fontMetrics: FontMetrics, position: V2F, color: Color4F = ...) -> None: """Draw text.""" @overload def drawText(self, glyphs: Sequence[Glyph], fontMetrics: FontMetrics, position: V2I, color: Color4F = ...) -> None: """Draw text.""" class ImageType(enum.Enum): """Image types.""" L_U8 = 1 L_U16 = 2 L_U32 = 3 L_F16 = 4 L_F32 = 5 LA_U8 = 6 LA_U16 = 7 LA_U32 = 8 LA_F16 = 9 LA_F32 = 10 RGB_U8 = 11 RGB_U10 = 12 RGB_U16 = 13 RGB_U32 = 14 RGB_F16 = 15 RGB_F32 = 16 RGBA_U8 = 17 RGBA_U16 = 18 RGBA_U32 = 19 RGBA_F16 = 20 RGBA_F32 = 21 YUV_420P_U8 = 22 YUV_422P_U8 = 23 YUV_444P_U8 = 24 YUV_420P_U16 = 25 YUV_422P_U16 = 26 YUV_444P_U16 = 27 YUV_420SP_U8 = 28 """Semi-planar 4:2:0 8-bit (e.g. hardware-decoded NV12)""" YUV_420SP_U16 = 29 """Semi-planar 4:2:0 16-bit (e.g. hardware-decoded P010)""" RGB_F16_P = 30 """Planar three channel half float: red, then green, then blue, each its own plane. The same bytes as RGB_F16 in a different order, uploaded as three single channel textures rather than one three channel one. There is no three channel half format on Metal, so a RGB_F16 texture is backed by a four channel one and every upload of it is widened by the driver; three single channel textures are each a format that does exist, so nothing is widened. Added at the end deliberately: the shaders carry these values as literals, so inserting one anywhere else renumbers them. """ def getImageTypeEnums() -> list[ImageType]: """Get every value of ImageType.""" class ImageTypeObserver: """Value observer.""" def __init__(self, observable: IObservableImageType, callback: Callable[[ImageType], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableImageType: """Base class for observable values.""" def get(self) -> ImageType: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableImageType(IObservableImageType): """Observable value.""" def __init__(self, arg: ImageType, /) -> None: ... def setAlways(self, arg: ImageType, /) -> None: """Set the value.""" def setIfChanged(self, arg: ImageType, /) -> bool: """Set the value only if it has changed.""" def get(self) -> ImageType: """Get the value.""" def getChannelCount(arg: ImageType, /) -> int: """Get the number of channels for the given image type.""" def getBitDepth(arg: ImageType, /) -> int: """Get the bit-depth for the given image type.""" class VideoLevels(enum.Enum): """Video levels.""" FullRange = 0 LegalRange = 1 def getVideoLevelsEnums() -> list[VideoLevels]: """Get every value of VideoLevels.""" class YUVCoefficients(enum.Enum): """YUV coefficients.""" REC709 = 0 BT2020 = 1 BT601 = 2 def getYUVCoefficientsEnums() -> list[YUVCoefficients]: """Get every value of YUVCoefficients.""" def getYUVCoefficients(arg: YUVCoefficients, /) -> V4F: """Get YUV coefficients.""" class ImageMirror: """Image mirroring.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: bool, arg1: bool, /) -> None: ... @property def x(self) -> bool: """Whether the image is mirrored horizontally: each row is stored right to left. """ @x.setter def x(self, arg: bool, /) -> None: ... @property def y(self) -> bool: """Whether the image is mirrored vertically: the rows are stored top down. By default they are stored bottom up, the first row in memory being the bottom of the image. """ @y.setter def y(self, arg: bool, /) -> None: ... def __eq__(self, arg: ImageMirror, /) -> bool: ... def __ne__(self, arg: ImageMirror, /) -> bool: ... class ImageLayout: """Image data layout.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: ImageMirror, arg1: int, arg2: Endian, /) -> None: ... @property def mirror(self) -> ImageMirror: """How the data is mirrored.""" @mirror.setter def mirror(self, arg: ImageMirror, /) -> None: ... @property def alignment(self) -> int: """The row alignment, in bytes: each row of data is padded to a multiple of it. The planar YUV types are not padded. """ @alignment.setter def alignment(self, arg: int, /) -> None: ... @property def endian(self) -> Endian: """The byte order of samples larger than a byte. The default is the machine's own. """ @endian.setter def endian(self, arg: Endian, /) -> None: ... def __eq__(self, arg: ImageLayout, /) -> bool: ... def __ne__(self, arg: ImageLayout, /) -> bool: ... class ImageInfo: """Image information.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: Size2I, arg1: ImageType, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, arg2: ImageType, /) -> None: ... @property def name(self) -> str: """The image name, such as the name of the layer it was read from.""" @name.setter def name(self, arg: str, /) -> None: ... @property def size(self) -> Size2I: """The size, in pixels.""" @size.setter def size(self, arg: Size2I, /) -> None: ... @property def type(self) -> ImageType: """The pixel type. The information is not valid while it is None.""" @type.setter def type(self, arg: ImageType, /) -> None: ... @property def pixelAspectRatio(self) -> float: """The pixel aspect ratio: the width of a pixel over its height.""" @pixelAspectRatio.setter def pixelAspectRatio(self, arg: float, /) -> None: ... @property def videoLevels(self) -> VideoLevels: """The range the samples use. The renderers expand legal range to full, unless ImageOptions::videoLevels says otherwise. """ @videoLevels.setter def videoLevels(self, arg: VideoLevels, /) -> None: ... @property def yuvCoefficients(self) -> YUVCoefficients: """The coefficients the YUV types are converted to RGB with.""" @yuvCoefficients.setter def yuvCoefficients(self, arg: YUVCoefficients, /) -> None: ... @property def depth(self) -> int: """The bits in each sample when fewer than the type holds: 10 or 12-bit video kept in 16-bit words with its value in the low bits, as decoders hand it over. Zero is the type's own depth. The renderers scale such samples up; see getSampleScale(). """ @depth.setter def depth(self, arg: int, /) -> None: ... @property def layout(self) -> ImageLayout: """The data layout: mirroring, row alignment, and byte order.""" @layout.setter def layout(self, arg: ImageLayout, /) -> None: ... @property def valid(self) -> bool: """Is the information valid?""" @property def aspect(self) -> float: """Get the aspect ratio.""" @property def byteCount(self) -> int: """Get the number of bytes used to store an image.""" def __eq__(self, arg: ImageInfo, /) -> bool: ... def __ne__(self, arg: ImageInfo, /) -> bool: ... class Image: """Image.""" @overload def __init__(self, arg: ImageInfo, /) -> None: ... @overload def __init__(self, arg0: Size2I, arg1: ImageType, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, arg2: ImageType, /) -> None: ... @property def info(self) -> ImageInfo: """Get the image information.""" @property def size(self) -> Size2I: """Get the image size.""" @property def width(self) -> int: """Get the image width.""" @property def height(self) -> int: """Get the image height.""" @property def aspect(self) -> float: """Get the aspect ratio.""" @property def type(self) -> ImageType: """Get the image type.""" @property def valid(self) -> bool: """Is the image valid?""" @property def tags(self) -> dict[str, str]: """Get the image tags.""" @tags.setter def tags(self, arg: Mapping[str, str], /) -> None: ... @property def byteCount(self) -> int: """Get the number of bytes used to store the image data.""" def zero(self) -> None: """Zero the image data.""" @property def data(self) -> memoryview: """ The pixels as a memoryview of (height, width, channels) over the image's own memory, row zero at the top whatever the layout's mirror. Writing to it writes the image. """ def __array__(self, dtype: object | None = None, copy: object | None = None) -> object: ... class LogType(enum.Enum): """Log types.""" Message = 0 Warning = 1 Error = 2 def getLogTypeEnums() -> list[LogType]: """Get every value of LogType.""" class LogItem: """Log item.""" def __init__(self) -> None: ... @property def time(self) -> datetime.datetime: """When the item was logged. Wall clock rather than time since the application started: a log is read after the fact, and lining an entry up with when something happened is the whole point of it. """ @time.setter def time(self, arg: datetime.datetime | datetime.date | datetime.time, /) -> None: ... @property def prefix(self) -> str: """What logged the item, such as "ftk::FontSystem".""" @prefix.setter def prefix(self, arg: str, /) -> None: ... @property def message(self) -> str: """The message.""" @message.setter def message(self, arg: str, /) -> None: ... @property def type(self) -> LogType: """Whether the item is a message, a warning, or an error.""" @type.setter def type(self, arg: LogType, /) -> None: ... def __eq__(self, arg: LogItem, /) -> bool: ... def __ne__(self, arg: LogItem, /) -> bool: ... class LogItemListObserver: """List observer.""" def __init__(self, observableList: IObservableLogItemList, callback: Callable[[Sequence[LogItem]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableLogItemList: """Base class for observable lists.""" pass class ObservableLogItemList(IObservableLogItemList): """Observable list.""" def __init__(self, arg: Sequence[LogItem], /) -> None: ... def setAlways(self, arg: Sequence[LogItem], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[LogItem], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: LogItem) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: LogItem) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: LogItem, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[LogItem], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: LogItem) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[LogItem]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[LogItem]) -> None: """Replace a range of items.""" def get(self) -> list[LogItem]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> LogItem: """Get a list item.""" def contains(self, arg: LogItem, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: LogItem, /) -> int: """Get the index of the given item.""" class LogSystem(IBaseSystem): """Log system.""" def __init__(self, context: Context) -> None: """Create a new system.""" def print(self, arg0: str, arg1: str, arg2: LogType, /) -> None: """Print to the log.""" @property def observeLogItems(self) -> IObservableLogItemList: """Observe the log items.""" pi: float = 3.1415927410125732 pi2: float = 6.2831854820251465 def deg2rad(arg: float, /) -> float: """Convert degrees to radians.""" def rad2deg(arg: float, /) -> float: """Convert radians to degrees.""" @overload def clamp(arg0: int, arg1: int, arg2: int, /) -> int: """Clamp a value.""" @overload def clamp(arg0: float, arg1: float, arg2: float, /) -> float: """Clamp a value.""" @overload def lerp(arg0: float, arg1: int, arg2: int, /) -> int: """Linear interpolation.""" @overload def lerp(arg0: float, arg1: float, arg2: float, /) -> float: """Linear interpolation.""" def smoothStep(arg0: float, arg1: float, arg2: float, /) -> float: """Smooth step function.""" def digits(arg: int, /) -> int: """Count the number of digits.""" @overload def fuzzyCompare(arg0: float, arg1: float, /) -> bool: """Fuzzy double comparison. Fuzzy float comparison. """ @overload def fuzzyCompare(arg0: float, arg1: float, arg2: float, /) -> bool: """Fuzzy double comparison. Fuzzy float comparison. """ class M33F: """3x3 matrix.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float, /) -> None: ... def get(self, arg0: int, arg1: int, /) -> float: ... def set(self, arg0: int, arg1: int, arg2: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @overload def __mul__(self, arg: M33F, /) -> M33F: ... @overload def __mul__(self, arg: V2F, /) -> V2F: ... def __eq__(self, arg: M33F, /) -> bool: ... def __ne__(self, arg: M33F, /) -> bool: ... def __repr__(self) -> str: ... class M44F: """4x4 matrix.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float, arg9: float, arg10: float, arg11: float, arg12: float, arg13: float, arg14: float, arg15: float, /) -> None: ... def get(self, arg0: int, arg1: int, /) -> float: ... def set(self, arg0: int, arg1: int, arg2: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @overload def __mul__(self, arg: M44F, /) -> M44F: ... @overload def __mul__(self, arg: V3F, /) -> V3F: ... @overload def __mul__(self, arg: V4F, /) -> V4F: ... def __eq__(self, arg: M44F, /) -> bool: ... def __ne__(self, arg: M44F, /) -> bool: ... def __repr__(self) -> str: ... @overload def translate(arg: V2F, /) -> M33F: """Create a translation matrix.""" @overload def translate(arg: V3F, /) -> M44F: """Create a translation matrix.""" def rotateX(arg: float, /) -> M44F: """Create a X rotation matrix.""" def rotateY(arg: float, /) -> M44F: """Create a Y rotation matrix.""" def rotateZ(arg: float, /) -> M44F: """Create a Z rotation matrix.""" def rotate(arg0: float, arg1: V3F, /) -> M44F: """Create a rotation matrix about an arbitrary axis. The axis is normalized; a zero-length one gives the identity. """ def rotateXYZ(arg: V3F, /) -> M44F: """Create a rotation matrix from angles about the X, Y and Z axes, applied in that order. """ def getRotateXYZ(arg0: M44F, arg1: V3F, /) -> V3F: """Get angles rotateXYZ() builds the given rotation from. Two sets of angles describe any rotation, and each of those has more versions of itself whole turns apart, so which one to return cannot be derived -- it has to be asked for. The one returned is whichever is nearest nearAngles. A manipulator dragging a rotation passes the angles its last move wrote. That is what keeps a gesture round and round winding past a full turn rather than starting again at zero, and what stops a drag crossing the pose where the Y angle folds back from taking the long way round to describe it. Somewhere with no previous answer to be near -- reading a matrix that arrived from elsewhere -- can pass zero. Straight up or straight down the Y axis, the X and Z rotations are about the same axis and only their sum is decided; it is given to Z. """ def scale(arg: V3F, /) -> M44F: """Create a scale matrix.""" def ortho(arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, /) -> M44F: """Create an orthographic matrix.""" def perspective(arg0: float, arg1: float, arg2: float, arg3: float, /) -> M44F: """Create a perspective matrix.""" def invert(arg0: M44F, arg1: M44F, /) -> bool: """Invert a matrix.""" kilobyte: int = 1024 megabyte: int = 1048576 gigabyte: int = 1073741824 terabyte: int = 1099511627776 class Endian(enum.Enum): """Endian type.""" MSB = 0 """Most siginificant byte first""" LSB = 1 """Least significant byte first""" def getEndianEnums() -> list[Endian]: """Get every value of Endian.""" def getEndian() -> Endian: """Get the current endian.""" def oppositeEndian(arg: Endian, /) -> Endian: ... class Vertex2: """Two-dimensional vertex.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg: int, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, arg2: int, /) -> None: ... @property def v(self) -> int: ... @v.setter def v(self, arg: int, /) -> None: ... @property def t(self) -> int: ... @t.setter def t(self, arg: int, /) -> None: ... @property def c(self) -> int: ... @c.setter def c(self, arg: int, /) -> None: ... class Vertex3: """Three-dimensional vertex.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg: int, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, arg2: int, /) -> None: ... @overload def __init__(self, arg0: int, arg1: int, arg2: int, arg3: int, /) -> None: ... @property def v(self) -> int: ... @v.setter def v(self, arg: int, /) -> None: ... @property def t(self) -> int: ... @t.setter def t(self, arg: int, /) -> None: ... @property def n(self) -> int: ... @n.setter def n(self, arg: int, /) -> None: ... @property def c(self) -> int: ... @c.setter def c(self, arg: int, /) -> None: ... class Triangle2: """Two-dimensional triangle.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: Vertex2, arg1: Vertex2, arg2: Vertex2, /) -> None: ... @property def v(self) -> list[Vertex2]: ... @v.setter def v(self, arg: Sequence[Vertex2], /) -> None: ... class Triangle3: """Three-dimensional triangle.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: Vertex3, arg1: Vertex3, arg2: Vertex3, /) -> None: ... @property def v(self) -> list[Vertex3]: ... @v.setter def v(self, arg: Sequence[Vertex3], /) -> None: ... class TriMesh2F: """Two-dimensional triangle mesh.""" def __init__(self) -> None: ... @property def v(self) -> list[V2F]: ... @v.setter def v(self, arg: Sequence[V2F], /) -> None: ... @property def c(self) -> list[V4F]: ... @c.setter def c(self, arg: Sequence[V4F], /) -> None: ... @property def t(self) -> list[V2F]: ... @t.setter def t(self, arg: Sequence[V2F], /) -> None: ... @property def triangles(self) -> list[Triangle2]: ... @triangles.setter def triangles(self, arg: Sequence[Triangle2], /) -> None: ... def getByteCount(self) -> int: ... class TriMesh3F: """Three-dimensional triangle mesh.""" def __init__(self) -> None: ... @property def v(self) -> list[V3F]: ... @v.setter def v(self, arg: Sequence[V3F], /) -> None: ... @property def c(self) -> list[V4F]: ... @c.setter def c(self, arg: Sequence[V4F], /) -> None: ... @property def t(self) -> list[V2F]: ... @t.setter def t(self, arg: Sequence[V2F], /) -> None: ... @property def n(self) -> list[V3F]: ... @n.setter def n(self, arg: Sequence[V3F], /) -> None: ... @property def triangles(self) -> list[Triangle3]: ... @triangles.setter def triangles(self, arg: Sequence[Triangle3], /) -> None: ... def getByteCount(self) -> int: ... def edge(arg0: V2F, arg1: V2F, arg2: V2F, /) -> float: """Edge function.""" @overload def mesh(arg: Box2I, /) -> TriMesh2F: """Create a mesh from a box.""" @overload def mesh(arg0: Box2I, arg1: bool, /) -> TriMesh2F: """Create a mesh from a box.""" @overload def mesh(arg: Box2F, /) -> TriMesh2F: """Create a mesh from a box.""" @overload def mesh(arg0: Box2F, arg1: bool, /) -> TriMesh2F: """Create a mesh from a box.""" def checkers(arg0: Box2I, arg1: Color4F, arg2: Color4F, arg3: Size2I, /) -> TriMesh2F: """Create a mesh for drawing checkers.""" def sphere(arg0: float, arg1: int, arg2: int, /) -> TriMesh3F: """Create a sphere triangle mesh.""" class Noise: """Noise References: - https://mrl.cs.nyu.edu/~perlin/noise/ """ def __init__(self) -> None: ... def get(self, x: float, y: float, z: float) -> float: """Get the noise at a point, roughly between -1 and 1. It is zero where x, y and z are all whole numbers, and repeats every 256 units on each axis. Every Noise gives the same values. """ def openURL(url: str) -> None: """Open a URL in an external application.""" class SysInfo: """Operating system information.""" @property def name(self) -> str: """The operating system name and version.""" @name.setter def name(self, arg: str, /) -> None: ... @property def cpu(self) -> str: """The CPU name.""" @cpu.setter def cpu(self, arg: str, /) -> None: ... @property def cores(self) -> int: """The number of hardware threads, or zero when it is not known.""" @cores.setter def cores(self, arg: int, /) -> None: ... @property def ram(self) -> int: """The amount of RAM, in bytes.""" @ram.setter def ram(self, arg: int, /) -> None: ... @property def ramGB(self) -> int: """The amount of RAM in gigabytes (1024^3 bytes), rounded up.""" @ramGB.setter def ramGB(self, arg: int, /) -> None: ... @property def desktop(self) -> str: """The desktop, on Linux: the desktop environment or compositor, and whether the session is Wayland or X11. Empty elsewhere. It says what the video driver alone does not: that an application on X11 is running through XWayland on a Wayland desktop. """ @desktop.setter def desktop(self, arg: str, /) -> None: ... def getSysInfo() -> SysInfo: """Get operating system information.""" def isDotFile(arg: str, /) -> bool: """Does the file name start with a dot?""" def split(arg: str, /) -> list[str]: """Split a path. Split a string. """ def getDrives() -> list[str]: """Get the list of file system drives.""" class UserPath(enum.Enum): """User paths.""" Home = 0 Desktop = 1 Documents = 2 Downloads = 3 Config = 4 """Where an application keeps its own files -- settings, logs, recovery state: "Application Support" on macOS, the roaming AppData directory on Windows, XDG_CONFIG_HOME or ~/.config elsewhere. Not Documents, which cloud drives sync and macOS gates behind a permission prompt; a log rewritten on every launch trips over both. """ def getUserPathEnums() -> list[UserPath]: """Get every value of UserPath.""" def getUserPath(arg: UserPath, /) -> str: """Get a user path.""" def toString(frame: int, pad: int = 0) -> str: """Convert a frame number to a string.""" class PathOptions: """File path options.""" def __init__(self) -> None: ... @property def seqNegative(self) -> bool: """Whether a minus in front of a frame number makes it negative. A minus in front of a number padded with zeros is part of the base name. """ @seqNegative.setter def seqNegative(self, arg: bool, /) -> None: ... @property def seqMaxDigits(self) -> int: """The most digits a frame number can have. A longer run of digits is not taken for a frame number. """ @seqMaxDigits.setter def seqMaxDigits(self, arg: int, /) -> None: ... def __eq__(self, arg: PathOptions, /) -> bool: ... def __ne__(self, arg: PathOptions, /) -> bool: ... class FrameSeq: """Frame sequence.""" @overload def __init__(self) -> None: ... @overload def __init__(self, range: RangeI64, inc: int = 1) -> None: ... @overload def __init__(self, min: int, max: int, inc: int = 1) -> None: ... @overload def __init__(self, frame: int) -> None: ... @property def range(self) -> RangeI64: """The first and last frames.""" @range.setter def range(self, arg: RangeI64, /) -> None: ... @property def inc(self) -> int: """The step between frames: 1 for every frame, 2 for every other one. """ @inc.setter def inc(self, arg: int, /) -> None: ... def __eq__(self, arg: FrameSeq, /) -> bool: ... def __ne__(self, arg: FrameSeq, /) -> bool: ... def toFrameSeq(frames: Sequence[int]) -> list[FrameSeq]: """Convert frames to frame sequences.""" def toFrames(seq: Sequence[FrameSeq]) -> list[int]: """Convert a frame sequence to frames. Convert frame sequences to frames. """ def addFrame(seq: Sequence[FrameSeq], frame: int) -> list[FrameSeq]: """Add a frame to a list of frame sequences, which is kept sorted and merged. Frames already in the list are ignored. Adding frames in order gives the same result as toFrameSeq(); frames added out of order may be split into a different set of sequences that covers the same frames. """ def getFrameCount(seq: Sequence[FrameSeq]) -> int: """Get the number of frames in a frame sequence. Get the number of frames in a list of frame sequences. """ def getRange(seq: Sequence[FrameSeq]) -> RangeI64 | None: """Get the range the value is kept within.""" def getStep(seq: Sequence[FrameSeq]) -> int: """Get the step: how much the up and down arrow keys, the increment buttons, and the scroll wheel change the value by. """ def getMissingCount(seq: Sequence[FrameSeq]) -> int: """Get how many frames are missing from a list of frame sequences: the frames at its step, between its first and last, that it does not have. Frames 1, 3, 7 and 9 are missing one, frame 5. """ def getMissing(seq: Sequence[FrameSeq]) -> list[FrameSeq]: """Get the frames missing from a list of frame sequences, as getMissingCount() counts them: for frames 1, 3, 7 and 9, frame 5. """ class Path: """File path. Example: file:///tmp/render.0001.exr?user=foo;password=bar * protocol: file:// * dir: /tmp/ * base: render. * number: 0001 * padding: 4 * extension: .exr * request: ?user=foo;password=bar * file name: render.0001.exr """ @overload def __init__(self) -> None: ... @overload def __init__(self, arg: str, /) -> None: ... @overload def __init__(self, arg0: str, arg1: str, /) -> None: ... @overload def __init__(self, arg0: str, arg1: PathOptions, /) -> None: ... def get(self) -> str: """Get the path as a string.""" @property def isEmpty(self) -> bool: """Get whether the path is empty.""" @property def hasProtocol(self) -> bool: """Get whether the path has a protocol.""" @property def hasSeqWildcard(self) -> bool: """Get whether this has a sequence wildcard ('#').""" @property def hasDir(self) -> bool: """Get whether the path has a directory.""" @property def hasBase(self) -> bool: """Get whether the path has a base name.""" @property def hasNum(self) -> bool: """Get whether the path has a frame number, or a "#" wildcard.""" @property def hasExt(self) -> bool: """Get whether the path has an extension.""" @property def hasRequest(self) -> bool: """Get whether the path has a request.""" @property def protocol(self) -> str: """Get the protocol, such as "file://".""" @protocol.setter def protocol(self, arg: str, /) -> None: ... @property def dir(self) -> str: """Get the directory, with its trailing separator, such as "/tmp/".""" @dir.setter def dir(self, arg: str, /) -> None: ... @property def base(self) -> str: """Get the base name: what comes before the frame number and the extension, such as "render.". """ @base.setter def base(self, arg: str, /) -> None: ... @property def num(self) -> str: """Get the frame number as it is written, such as "0001", or the "#" wildcard. """ @num.setter def num(self, arg: str, /) -> None: ... @property def pad(self) -> int: """Get the frame number padding: the number of digits when the number starts with a zero or is a wildcard, and zero otherwise. """ @pad.setter def pad(self, arg: int, /) -> None: ... @property def ext(self) -> str: """Get the extension, with its dot, such as ".exr".""" @ext.setter def ext(self, arg: str, /) -> None: ... @property def request(self) -> str: """Get the request, with its question mark, such as "?user=foo".""" @request.setter def request(self, arg: str, /) -> None: ... @property def fileName(self) -> str: """Get the file name: the base name, frame number and extension, after the directory when dir is true. The protocol and the request are left out. """ @fileName.setter def fileName(self, arg: str, /) -> None: ... def getFileName(self, dir: bool = False) -> str: """Get the file name: the base name, frame number and extension, after the directory when dir is true. The protocol and the request are left out. """ @property def frames(self) -> RangeI64 | None: """Get the range spanned by the sequence. This is the range from the first to the last frame, which for a partial sequence includes frames that are missing; use getSeq() for the frames themselves. """ @frames.setter def frames(self, arg: RangeI64, /) -> None: ... @property def frameSeq(self) -> list[FrameSeq]: """Get the frames in the sequence.""" @frameSeq.setter def frameSeq(self, arg: Sequence[FrameSeq], /) -> None: ... @property def seqSize(self) -> int: """Get the number of frames in the sequence.""" @property def isSeq(self) -> bool: """Get whether this is a sequence.""" @property def isPartialSeq(self) -> bool: """Get whether this sequence is missing frames within its range.""" def getFrame(self, frame: int, dir: bool = False) -> str: """Get a file name with the given frame number.""" def getFrameRange(self, count: bool = False) -> str: """Get the frame range string. When count is true a sequence that is missing frames says how many, e.g. "0001-0020 (8 missing)", and one on a step with none missing says the step, e.g. "0001-0019 (step 2)" -- what a file browser shows, so that a broken render is seen before it is opened. """ def seq(self, path: Path) -> bool: """Get whether a path is part of this sequence.""" def addSeq(self, path: Path) -> bool: """Add a path to this sequence.""" @property def isAbs(self) -> bool: """Get whether the path is absolute.""" def testExt(self, arg: Sequence[str], /) -> bool: """Test whether this extension matches one in the given list.""" def getNumbers() -> str: """Get the characters a frame number is made of: the digits and "#".""" def getPathSeparators() -> str: """Get the characters that separate directories: forward slash and backslash. """ def __eq__(self, arg: Path, /) -> bool: ... def __ne__(self, arg: Path, /) -> bool: ... class DirListSort(enum.Enum): """Directory list sorting.""" Name = 0 Extension = 1 Size = 2 Time = 3 def getDirListSortEnums() -> list[DirListSort]: """Get every value of DirListSort.""" class DirListOptions: """Directory list options.""" def __init__(self) -> None: ... @property def sort(self) -> DirListSort: """How the entries are sorted. Directories come first whatever the sort. """ @sort.setter def sort(self, arg: DirListSort, /) -> None: ... @property def sortReverse(self) -> bool: """Whether the sort is reversed.""" @sortReverse.setter def sortReverse(self, arg: bool, /) -> None: ... @property def filter(self) -> str: """Case-insensitive match against the file name: a substring, or a wildcard pattern when it contains "*" or "?". A directory that is entered is exempt from the filter -- it is the route to the files, not what is being looked for -- while one at the last level is subject to it like anything else. """ @filter.setter def filter(self, arg: str, /) -> None: ... @property def filterFiles(self) -> bool: """Whether to leave the files out, listing only directories.""" @filterFiles.setter def filterFiles(self, arg: bool, /) -> None: ... @property def filterExt(self) -> list[str]: """The extensions of the files to list, lower case with the dot, such as ".exr". Empty lists every file. Directories are not filtered. """ @filterExt.setter def filterExt(self, arg: Sequence[str], /) -> None: ... @property def seq(self) -> bool: """Whether numbered files are grouped into sequences, each listed as one entry. """ @seq.setter def seq(self, arg: bool, /) -> None: ... @property def seqExts(self) -> list[str]: """The extensions of the files that are grouped into sequences, lower case with the dot. Empty groups any file. """ @seqExts.setter def seqExts(self, arg: Sequence[str], /) -> None: ... @property def seqNegative(self) -> bool: """Whether a minus in front of a frame number makes it negative; see PathOptions::seqNegative. """ @seqNegative.setter def seqNegative(self, arg: bool, /) -> None: ... @property def seqMaxDigits(self) -> int: """The most digits a frame number can have; see PathOptions::seqMaxDigits. """ @seqMaxDigits.setter def seqMaxDigits(self, arg: int, /) -> None: ... @property def hidden(self) -> bool: """Whether to list the files and directories whose names start with a dot. """ @hidden.setter def hidden(self, arg: bool, /) -> None: ... @property def depth(self) -> int: """How many directory levels to list: 1 is the directory alone. Deeper levels follow their directory's entry, each listed with these same options, so the order is deterministic. Directory links are listed but never entered, which also keeps a cycle of links from listing forever. """ @depth.setter def depth(self, arg: int, /) -> None: ... def __eq__(self, arg: DirListOptions, /) -> bool: ... def __ne__(self, arg: DirListOptions, /) -> bool: ... class DirEntry: """Directory list entry.""" @property def path(self) -> Path: """The path. For a sequence it names the first frame and holds the frames found. """ @path.setter def path(self, arg: Path, /) -> None: ... @property def isDir(self) -> bool: """Whether the entry is a directory.""" @isDir.setter def isDir(self, arg: bool, /) -> None: ... @property def size(self) -> int: """The size, in bytes: for a sequence the total of its files, and zero for a directory. """ @size.setter def size(self, arg: int, /) -> None: ... @property def time(self) -> datetime.datetime: """When the entry was last written. For a sequence, the latest of its files. """ @time.setter def time(self, arg: datetime.datetime | datetime.date | datetime.time, /) -> None: ... def __eq__(self, arg: DirEntry, /) -> bool: ... def __ne__(self, arg: DirEntry, /) -> bool: ... def dirList(path: str, options: DirListOptions = ...) -> list[DirEntry]: """How the directory is listed: the sort order, sequences and hidden files. """ def expandSeq(path: Path, pathOptions: PathOptions = ...) -> Path: """Expand a file sequence. This function will search the directory for other frames that match the given file name. """ class Random: """Random numbers.""" def __init__(self) -> None: ... @overload def getF(self) -> float: """Get a random number between zero and one. Get a random number between zero and the given value. Get a random number between two values. """ @overload def getF(self, arg: float, /) -> float: """Get a random number between zero and one. Get a random number between zero and the given value. Get a random number between two values. """ @overload def getF(self, min: float, max: float) -> float: """Get a random number between zero and one. Get a random number between zero and the given value. Get a random number between two values. """ @overload def getI(self, arg: int, /) -> int: """Get a random number between zero and the given value. Get a random number between two values. """ @overload def getI(self, min: int, max: int) -> int: """Get a random number between zero and the given value. Get a random number between two values. """ @overload def setSeed(self, arg: int, /) -> None: """Seed the random value generator. Seed the random value generator with the current time. """ @overload def setSeed(self) -> None: """Seed the random value generator. Seed the random value generator with the current time. """ class RangeI: """Numeric range.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: int, arg1: int, /) -> None: ... @property def min(self) -> int: ... @property def max(self) -> int: ... @property def equal(self) -> bool: ... def __eq__(self, arg: RangeI, /) -> bool: ... def __ne__(self, arg: RangeI, /) -> bool: ... def __lt__(self, arg: RangeI, /) -> bool: ... def __repr__(self) -> str: ... class RangeI64: """Numeric range.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: int, arg1: int, /) -> None: ... @property def min(self) -> int: ... @property def max(self) -> int: ... @property def equal(self) -> bool: ... def __eq__(self, arg: RangeI64, /) -> bool: ... def __ne__(self, arg: RangeI64, /) -> bool: ... def __lt__(self, arg: RangeI64, /) -> bool: ... def __repr__(self) -> str: ... class RangeF: """Numeric range.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, /) -> None: ... @property def min(self) -> float: ... @property def max(self) -> float: ... @property def equal(self) -> bool: ... def __eq__(self, arg: RangeF, /) -> bool: ... def __ne__(self, arg: RangeF, /) -> bool: ... def __lt__(self, arg: RangeF, /) -> bool: ... def __repr__(self) -> str: ... class RangeD: """Numeric range.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, /) -> None: ... @property def min(self) -> float: ... @property def max(self) -> float: ... @property def equal(self) -> bool: ... def __eq__(self, arg: RangeD, /) -> bool: ... def __ne__(self, arg: RangeD, /) -> bool: ... def __lt__(self, arg: RangeD, /) -> bool: ... def __repr__(self) -> str: ... class RenderOptions: """Render options.""" def __init__(self) -> None: ... @property def clear(self) -> bool: """Clear the canvas before rendering.""" @clear.setter def clear(self, arg: bool, /) -> None: ... @property def clearColor(self) -> Color4F: """Clear color.""" @clearColor.setter def clearColor(self, arg: Color4F, /) -> None: ... @property def texturePoolByteCount(self) -> int: """Texture pool byte count (enough for two 4K RGBA 16-bit frames). The GPU renderer counts an entry with its transfer buffers and holds the pool to this at the end of each frame, by the entries that frame did not draw with. """ @texturePoolByteCount.setter def texturePoolByteCount(self, arg: int, /) -> None: ... @property def textureCacheByteCount(self) -> int: """Texture cache byte count.""" @textureCacheByteCount.setter def textureCacheByteCount(self, arg: int, /) -> None: ... @property def glyphAtlasSize(self) -> int: """Glyph texture atlas size. Zero is the renderer's own choice: smaller where the graphics API is the more constrained one. """ @glyphAtlasSize.setter def glyphAtlasSize(self, arg: int, /) -> None: ... @property def log(self) -> bool: """Enable logging.""" @log.setter def log(self, arg: bool, /) -> None: ... def __eq__(self, arg: RenderOptions, /) -> bool: ... def __ne__(self, arg: RenderOptions, /) -> bool: ... class LineOptions: """Line drawing options.""" def __init__(self) -> None: ... @property def width(self) -> float: """The line width, in pixels.""" @width.setter def width(self, arg: float, /) -> None: ... def __eq__(self, arg: LineOptions, /) -> bool: ... def __ne__(self, arg: LineOptions, /) -> bool: ... class ChannelDisplay(enum.Enum): """Channel display.""" Color = 0 Red = 1 Green = 2 Blue = 3 Alpha = 4 def getChannelDisplayEnums() -> list[ChannelDisplay]: """Get every value of ChannelDisplay.""" class InputVideoLevels(enum.Enum): """Input video levels.""" FromFile = 0 FullRange = 1 LegalRange = 2 def getInputVideoLevelsEnums() -> list[InputVideoLevels]: """Get every value of InputVideoLevels.""" class AlphaBlend(enum.Enum): """Alpha channel blending. References: - https://microsoft.github.io/Win2D/html/PremultipliedAlpha.htm """ Straight = 1 Premultiplied = 2 def getAlphaBlendEnums() -> list[AlphaBlend]: """Get every value of AlphaBlend.""" class ImageFilter(enum.Enum): """Image filtering.""" Nearest = 0 Linear = 1 HighQuality = 2 """A separable two pass resample with a wide kernel, rather than the four texels Linear reads. What it is for is minification: scaling an image down far enough that Linear misses most of it, which is what a thumbnail does and what the view does when it is zoomed out. """ def getImageFilterEnums() -> list[ImageFilter]: """Get every value of ImageFilter.""" class ImageFilters: """Image filters.""" def __init__(self) -> None: ... @property def minify(self) -> ImageFilter: """The filter for drawing an image smaller than it is.""" @minify.setter def minify(self, arg: ImageFilter, /) -> None: ... @property def magnify(self) -> ImageFilter: """The filter for drawing an image larger than it is.""" @magnify.setter def magnify(self, arg: ImageFilter, /) -> None: ... def __eq__(self, arg: ImageFilters, /) -> bool: ... def __ne__(self, arg: ImageFilters, /) -> bool: ... class ImageOptions: """Image options.""" def __init__(self) -> None: ... @property def channelDisplay(self) -> ChannelDisplay: """Which channels are shown: the color, or one channel alone.""" @channelDisplay.setter def channelDisplay(self, arg: ChannelDisplay, /) -> None: ... @property def videoLevels(self) -> InputVideoLevels: """The video levels the image is taken to have. FromFile uses the image's own, ImageInfo::videoLevels. """ @videoLevels.setter def videoLevels(self, arg: InputVideoLevels, /) -> None: ... @property def alphaBlend(self) -> AlphaBlend: """How the image is blended with what is under it. None draws it opaque. """ @alphaBlend.setter def alphaBlend(self, arg: AlphaBlend, /) -> None: ... @property def imageFilters(self) -> ImageFilters: """The filters for drawing the image smaller or larger than it is.""" @imageFilters.setter def imageFilters(self, arg: ImageFilters, /) -> None: ... @property def cache(self) -> bool: """Whether the image's textures are kept in the texture cache, so that drawing the same image again does not copy it again. Off, they come from a pool shared by images of the same size and type, and the image is copied each time it is drawn unless reuse is on. """ @cache.setter def cache(self, arg: bool, /) -> None: ... def __eq__(self, arg: ImageOptions, /) -> bool: ... def __ne__(self, arg: ImageOptions, /) -> bool: ... class Size2I: """Two-dimensional size.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: int, arg1: int, /) -> None: ... def __setitem__(self, arg0: int, arg1: int, /) -> None: ... def __getitem__(self, arg: int, /) -> int: ... @property def w(self) -> int: ... @w.setter def w(self, arg: int, /) -> None: ... @property def h(self) -> int: ... @h.setter def h(self, arg: int, /) -> None: ... @property def valid(self) -> bool: ... def __add__(self, arg: int, /) -> Size2I: ... def __sub__(self, arg: int, /) -> Size2I: ... def __mul__(self, arg: int, /) -> Size2I: ... def __truediv__(self, arg: int, /) -> Size2I: ... def __eq__(self, arg: Size2I, /) -> bool: ... def __ne__(self, arg: Size2I, /) -> bool: ... def __repr__(self) -> str: ... class Size2F: """Two-dimensional size.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def w(self) -> float: ... @w.setter def w(self, arg: int, /) -> None: ... @property def h(self) -> float: ... @h.setter def h(self, arg: int, /) -> None: ... @property def valid(self) -> bool: ... def __add__(self, arg: float, /) -> Size2F: ... def __sub__(self, arg: float, /) -> Size2F: ... def __mul__(self, arg: float, /) -> Size2F: ... def __truediv__(self, arg: float, /) -> Size2F: ... def __eq__(self, arg: Size2F, /) -> bool: ... def __ne__(self, arg: Size2F, /) -> bool: ... def __repr__(self) -> str: ... class Size3F: """Three-dimensional size.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def w(self) -> float: ... @w.setter def w(self, arg: int, /) -> None: ... @property def h(self) -> float: ... @h.setter def h(self, arg: int, /) -> None: ... @property def d(self) -> float: ... @d.setter def d(self, arg: int, /) -> None: ... @property def valid(self) -> bool: ... def __add__(self, arg: float, /) -> Size3F: ... def __sub__(self, arg: float, /) -> Size3F: ... def __mul__(self, arg: float, /) -> Size3F: ... def __truediv__(self, arg: float, /) -> Size3F: ... def __eq__(self, arg: Size3F, /) -> bool: ... def __ne__(self, arg: Size3F, /) -> bool: ... def __repr__(self) -> str: ... @overload def aspectRatio(arg: Size2I, /) -> float: """Get the aspect ratio of the given size.""" @overload def aspectRatio(arg: Size2F, /) -> float: """Get the aspect ratio of the given size.""" class ElideMode(enum.Enum): """Which end of an elided string to keep.""" Right = 0 """Keep the beginning: "ViewLayer.Combi...\"""" Left = 1 """Keep the end, for names that differ where they finish, such as a path or a layer: "...yer.Combined\" """ Middle = 2 """Keep both ends: "ViewLa...bined\"""" def elide(value: str, max: int = 32, mode: ElideMode = ElideMode.Right) -> str: """Elide a string to at most the given number of characters, not counting the ellipsis. """ @overload def getLoremIpsum() -> list[str]: """Get filler text.""" @overload def getLoremIpsum(lineCount: int) -> str: """Get filler text.""" @overload def sleep(arg: datetime.timedelta, /) -> None: """Sleep for a given time.""" @overload def sleep(arg0: datetime.timedelta, arg1: datetime.timedelta, arg2: datetime.timedelta, /) -> None: """Sleep up to the given time.""" def toRational(arg: float, /) -> tuple[int, int]: """Convert a floating point rate to a rational.""" class Timer: """Timer.""" def __init__(self, context: Context) -> None: """Create a new timer.""" @property def repeating(self) -> bool: """Does the timer repeat?""" @repeating.setter def repeating(self, arg: bool, /) -> None: ... def start(self, arg0: float, arg1: Callable[[], None], /) -> None: """Start the timer.""" def stop(self) -> None: """Stop the timer.""" @property def active(self) -> bool: """Is the timer active?""" @property def timeout(self) -> datetime.timedelta: """Get the timeout.""" class V2I: """Two-dimensional vector.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: int, arg1: int, /) -> None: ... def __setitem__(self, arg0: int, arg1: int, /) -> None: ... def __getitem__(self, arg: int, /) -> int: ... @property def x(self) -> int: ... @x.setter def x(self, arg: int, /) -> None: ... @property def y(self) -> int: ... @y.setter def y(self, arg: int, /) -> None: ... @overload def __add__(self, arg: V2I, /) -> V2I: ... @overload def __add__(self, arg: int, /) -> V2I: ... @overload def __sub__(self, arg: V2I, /) -> V2I: ... @overload def __sub__(self, arg: int, /) -> V2I: ... def __mul__(self, arg: int, /) -> V2I: ... def __truediv__(self, arg: int, /) -> V2I: ... def __eq__(self, arg: V2I, /) -> bool: ... def __ne__(self, arg: V2I, /) -> bool: ... def __repr__(self) -> str: ... class V2F: """Two-dimensional vector.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def x(self) -> float: ... @x.setter def x(self, arg: float, /) -> None: ... @property def y(self) -> float: ... @y.setter def y(self, arg: float, /) -> None: ... @overload def __add__(self, arg: V2F, /) -> V2F: ... @overload def __add__(self, arg: float, /) -> V2F: ... @overload def __sub__(self, arg: V2F, /) -> V2F: ... @overload def __sub__(self, arg: float, /) -> V2F: ... def __mul__(self, arg: float, /) -> V2F: ... def __truediv__(self, arg: float, /) -> V2F: ... def __eq__(self, arg: V2F, /) -> bool: ... def __ne__(self, arg: V2F, /) -> bool: ... def __repr__(self) -> str: ... class V3F: """Three-dimensional vector.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def x(self) -> float: ... @x.setter def x(self, arg: float, /) -> None: ... @property def y(self) -> float: ... @y.setter def y(self, arg: float, /) -> None: ... @property def z(self) -> float: ... @z.setter def z(self, arg: float, /) -> None: ... @overload def __add__(self, arg: V3F, /) -> V3F: ... @overload def __add__(self, arg: float, /) -> V3F: ... @overload def __sub__(self, arg: V3F, /) -> V3F: ... @overload def __sub__(self, arg: float, /) -> V3F: ... def __mul__(self, arg: float, /) -> V3F: ... def __truediv__(self, arg: float, /) -> V3F: ... def __eq__(self, arg: V3F, /) -> bool: ... def __ne__(self, arg: V3F, /) -> bool: ... def __repr__(self) -> str: ... class V4F: """Four-dimensional vector.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, /) -> None: ... def __setitem__(self, arg0: int, arg1: float, /) -> None: ... def __getitem__(self, arg: int, /) -> float: ... @property def x(self) -> float: ... @x.setter def x(self, arg: float, /) -> None: ... @property def y(self) -> float: ... @y.setter def y(self, arg: float, /) -> None: ... @property def z(self) -> float: ... @z.setter def z(self, arg: float, /) -> None: ... @property def w(self) -> float: ... @w.setter def w(self, arg: float, /) -> None: ... @overload def __add__(self, arg: V4F, /) -> V4F: ... @overload def __add__(self, arg: float, /) -> V4F: ... @overload def __sub__(self, arg: V4F, /) -> V4F: ... @overload def __sub__(self, arg: float, /) -> V4F: ... def __mul__(self, arg: float, /) -> V4F: ... def __truediv__(self, arg: float, /) -> V4F: ... def __eq__(self, arg: V4F, /) -> bool: ... def __ne__(self, arg: V4F, /) -> bool: ... def __repr__(self) -> str: ... @overload def length(arg: V2I, /) -> int: """Get the length of a vector.""" @overload def length(arg: V2F, /) -> float: """Get the length of a vector.""" @overload def length(arg: V3F, /) -> float: """Get the length of a vector.""" @overload def length(arg: V4F, /) -> float: """Get the length of a vector.""" @overload def normalize(arg: V2F, /) -> V2F: """Normalize the given vector.""" @overload def normalize(arg: V3F, /) -> V3F: """Normalize the given vector.""" @overload def normalize(arg: V4F, /) -> V4F: """Normalize the given vector.""" @overload def dot(arg0: V2F, arg1: V2F, /) -> float: """Get the vector dot product.""" @overload def dot(arg0: V3F, arg1: V3F, /) -> float: """Get the vector dot product.""" @overload def dot(arg0: V4F, arg1: V4F, /) -> float: """Get the vector dot product.""" def cross(arg0: V3F, arg1: V3F, /) -> V3F: """Get the vector cross product.""" @overload def perpCW(arg: V2I, /) -> V2I: """Get a vector perpindicular to the given vector in the clockwise direction. """ @overload def perpCW(arg: V2F, /) -> V2F: """Get a vector perpindicular to the given vector in the clockwise direction. """ @overload def perpCCW(arg: V2I, /) -> V2I: """Get a vector perpindicular to the given vector in the counter-clockwise direction. """ @overload def perpCCW(arg: V2F, /) -> V2F: """Get a vector perpindicular to the given vector in the counter-clockwise direction. """ def round(arg: V2F, /) -> V2F: """Round vector components.""" def floor(arg: V2F, /) -> V2F: """Round vector components.""" def ceil(arg: V2F, /) -> V2F: """Round vector components.""" VERSION_MAJOR: int = 0 VERSION_MINOR: int = 21 VERSION_PATCH: int = 0 VERSION_DEV: str = '-dev' VERSION_FULL: str = '0.21.0-dev' def uiInit(context: Context) -> None: """Initialize the library.""" def widgetDump(widget: IWidget) -> str: """Serialize a widget tree as JSON for inspection.""" def widgetLoad(context: Context, json: str, parent: IWidget | None = None) -> tuple[IWidget, list[str]]: """ Create a widget tree from JSON; returns the widget and a list of errors. """ def findWidget(widget: IWidget, id: str) -> IWidget: """Find a widget by the id it was given in the JSON.""" class TextureType(enum.Enum): """OpenGL texture types.""" L_U8 = 1 L_U16 = 2 L_U32 = 3 L_F16 = 4 L_F32 = 5 LA_U8 = 6 LA_U16 = 7 LA_U32 = 8 LA_F16 = 9 LA_F32 = 10 RGB_U8 = 11 RGB_U10 = 12 RGB_U16 = 13 RGB_U32 = 14 RGB_F16 = 15 RGB_F32 = 16 RGBA_U8 = 17 RGBA_U16 = 18 RGBA_U32 = 19 RGBA_F16 = 20 RGBA_F32 = 21 def getTextureTypeEnums() -> list[TextureType]: """Get every value of TextureType.""" class TextureTypeObserver: """Value observer.""" def __init__(self, observable: IObservableTextureType, callback: Callable[[TextureType], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableTextureType: """Base class for observable values.""" def get(self) -> TextureType: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableTextureType(IObservableTextureType): """Observable value.""" def __init__(self, arg: TextureType, /) -> None: ... def setAlways(self, arg: TextureType, /) -> None: """Set the value.""" def setIfChanged(self, arg: TextureType, /) -> bool: """Set the value only if it has changed.""" def get(self) -> TextureType: """Get the value.""" class SizeRole(enum.Enum): """Size roles.""" Margin = 1 MarginSmall = 2 MarginLarge = 3 MarginInside = 4 MarginDialog = 5 Spacing = 6 SpacingSmall = 7 SpacingLarge = 8 SpacingTool = 9 Icon = 10 Thumbnail = 11 Border = 12 KeyFocus = 13 LabelPad = 14 ScrollArea = 15 ScrollAreaSmall = 16 Slider = 17 Handle = 18 Swatch = 19 SwatchLarge = 20 Shadow = 21 DragLength = 22 CornerRadius = 23 def getSizeRoleEnums() -> list[SizeRole]: """Get every value of SizeRole.""" class ColorRole(enum.Enum): """Color roles.""" Window = 1 Base = 2 Well = 3 Header = 4 Button = 5 Text = 6 TextDisabled = 7 Border = 8 Hover = 9 Pressed = 10 Checked = 11 KeyFocus = 12 Overlay = 13 TooltipWindow = 14 TooltipText = 15 Arrow = 16 Red = 17 Green = 18 Blue = 19 Cyan = 20 Magenta = 21 Yellow = 22 def getColorRoleEnums() -> list[ColorRole]: """Get every value of ColorRole.""" class ChildAddEvent: """Child added event.""" def __init__(self, arg: IWidget, /) -> None: ... @property def child(self) -> IWidget: """The child that was added, now the last of the parent's children.""" @child.setter def child(self, arg: IWidget, /) -> None: ... class ChildRemoveEvent: """Child removed event.""" def __init__(self, arg0: IWidget, arg1: int, /) -> None: ... @property def child(self) -> IWidget: """The child that was removed.""" @child.setter def child(self, arg: IWidget, /) -> None: ... @property def index(self) -> int: """The index the child had among the parent's children.""" @index.setter def index(self, arg: int, /) -> None: ... class TickEvent: """Tick event.""" pass class StyleEvent: """Style event.""" @property def displayScaleChange(self) -> bool: """Whether the display scale has changed.""" @displayScaleChange.setter def displayScaleChange(self, arg: bool, /) -> None: ... @property def sizeRoleChange(self) -> bool: """Whether the style's size roles have changed.""" @sizeRoleChange.setter def sizeRoleChange(self, arg: bool, /) -> None: ... @property def colorRoleChange(self) -> bool: """Whether the style's color roles have changed.""" @colorRoleChange.setter def colorRoleChange(self, arg: bool, /) -> None: ... @property def fontChange(self) -> bool: """Whether the style's fonts have changed.""" @fontChange.setter def fontChange(self, arg: bool, /) -> None: ... class SizeHintEvent: """Size hint event.""" def __init__(self, arg0: FontSystem, arg1: IconSystem, arg2: float, arg3: Style, /) -> None: ... @property def fontSystem(self) -> FontSystem: """The font system, for measuring text.""" @fontSystem.setter def fontSystem(self, arg: FontSystem, /) -> None: ... @property def iconSystem(self) -> IconSystem: """The icon system, for getting icon images by name.""" @iconSystem.setter def iconSystem(self, arg: IconSystem, /) -> None: ... @property def displayScale(self) -> float: """The display scale to size the widget for.""" @displayScale.setter def displayScale(self, arg: float, /) -> None: ... @property def style(self) -> Style: """The style, for the size roles, color roles and fonts.""" @style.setter def style(self, arg: Style, /) -> None: ... class DrawEvent: """Draw event.""" def __init__(self, arg0: FontSystem, arg1: IconSystem, arg2: float, arg3: Style, arg4: IRender, /) -> None: ... @property def fontSystem(self) -> FontSystem: """The font system, for the text to draw.""" @fontSystem.setter def fontSystem(self, arg: FontSystem, /) -> None: ... @property def iconSystem(self) -> IconSystem: """The icon system, for getting icon images by name.""" @iconSystem.setter def iconSystem(self, arg: IconSystem, /) -> None: ... @property def displayScale(self) -> float: """The display scale to draw the widget at.""" @displayScale.setter def displayScale(self, arg: float, /) -> None: ... @property def style(self) -> Style: """The style, for the size roles, color roles and fonts.""" @style.setter def style(self, arg: Style, /) -> None: ... @property def render(self) -> IRender: """The renderer to draw with.""" @render.setter def render(self, arg: IRender, /) -> None: ... class IDragDropData: """Base class for drag and drop data.""" pass class MouseEnterEvent: """Mouse enter event.""" def __init__(self, arg: V2I, /) -> None: ... @property def pos(self) -> V2I: """The cursor position, in pixels from the top left of the window: the coordinates widget geometry is in. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def accept(self) -> bool: """Set by the widget to take the hover: it is then sent the mouse moves, and a leave event when the cursor goes. Left unset, the widgets it is inside are asked in turn. """ @accept.setter def accept(self, arg: bool, /) -> None: ... class MouseMoveEvent: """Mouse move event.""" def __init__(self, arg0: V2I, arg1: V2I, /) -> None: ... @property def pos(self) -> V2I: """The cursor position, in pixels from the top left of the window: the coordinates widget geometry is in. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def prev(self) -> V2I: """The cursor position before the move, in the same coordinates.""" @prev.setter def prev(self, arg: V2I, /) -> None: ... @property def accept(self) -> bool: """Set by a widget that handles the move. The window does not read it: a move goes to the pressed widget, or else to the hovered one, whatever this says. """ @accept.setter def accept(self, arg: bool, /) -> None: ... @property def dragDropData(self) -> IDragDropData: """Set by the pressed widget, as it is sent a move, to start a drag and drop of this data. The widget is then sent a release and a leave, and the widgets under the cursor are sent the drag events until the button is released. """ @dragDropData.setter def dragDropData(self, arg: IDragDropData, /) -> None: ... @property def dragDropCursor(self) -> Image: """An image drawn at the cursor while the drag and drop lasts, set with the data. """ @dragDropCursor.setter def dragDropCursor(self, arg: Image, /) -> None: ... @property def dragDropCursorHotspot(self) -> V2I: """The point in the cursor image that is put at the cursor, in pixels of the image. """ @dragDropCursorHotspot.setter def dragDropCursorHotspot(self, arg: V2I, /) -> None: ... class MouseButton(enum.Enum): """Mouse buttons.""" Left = 1 Middle = 2 Right = 3 Extra1 = 4 Extra2 = 5 def getMouseButtonEnums() -> list[MouseButton]: """Get every value of MouseButton.""" class KeyModifier(enum.Enum): """Keyboard modifiers. Note: This is a bitfield enum and is not compatible with FTK_ENUM, which requires a contiguous Count member. See to_string/from_string below for serialization support. """ Shift = 1 Control = 2 Alt = 4 Super = 8 commandKeyModifier: KeyModifier = KeyModifier.Super def getKeyModifierLabel(arg: int, /) -> str: """Get a keyboard modifiers label.""" class MouseClickEvent: """Mouse click event.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: MouseButton, arg1: int, arg2: V2I, /) -> None: ... @property def button(self) -> MouseButton: """The button pressed or released.""" @button.setter def button(self, arg: MouseButton, /) -> None: ... @property def modifiers(self) -> int: """The keyboard modifiers held, as KeyModifier flags.""" @modifiers.setter def modifiers(self, arg: int, /) -> None: ... @property def pos(self) -> V2I: """The cursor position, in pixels from the top left of the window: the coordinates widget geometry is in. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def accept(self) -> bool: """Set by a widget to take the press: it becomes the pressed widget, which is sent the mouse moves and the release wherever the cursor goes. Left unset, the widgets under the cursor are asked in turn, deepest first, and if none takes it a right button can open a context menu. The release does not read it. """ @accept.setter def accept(self, arg: bool, /) -> None: ... @property def cancel(self) -> bool: """The press was taken away before it was released: a touch gesture started, or a finger rested long enough to be the right button (longPress). The release ends it without acting on it, so a button under the first finger does not click. """ @cancel.setter def cancel(self, arg: bool, /) -> None: ... class ScrollEvent: """Scroll event (mouse wheel or touch pad).""" def __init__(self, arg0: V2F, arg1: int, arg2: V2I, /) -> None: ... @property def value(self) -> V2F: """The amount scrolled, in mouse wheel steps rather than pixels: x across and y up and down. """ @value.setter def value(self, arg: V2F, /) -> None: ... @property def modifiers(self) -> int: """The keyboard modifiers held, as KeyModifier flags.""" @modifiers.setter def modifiers(self, arg: int, /) -> None: ... @property def pos(self) -> V2I: """The cursor position, in pixels from the top left of the window: the coordinates widget geometry is in. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def accept(self) -> bool: """Set by a widget that takes the scroll. Left unset, the widgets under the cursor are asked in turn, deepest first, as far as a dialog. """ @accept.setter def accept(self, arg: bool, /) -> None: ... class GestureEvent: """Touch gesture event: two fingers dragging and pinching.""" def __init__(self, arg0: V2I, arg1: V2F, arg2: float, /) -> None: ... @property def pos(self) -> V2I: """The point between the fingers.""" @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def pan(self) -> V2F: """How far that point moved since the last event.""" @pan.setter def pan(self, arg: V2F, /) -> None: ... @property def zoom(self) -> float: """How much the distance between the fingers changed since the last event, as a ratio. """ @zoom.setter def zoom(self, arg: float, /) -> None: ... @property def accept(self) -> bool: """Set by a widget to take the gesture as it starts: the rest of it goes to that widget, wherever the fingers go. Left unset, the widgets under the fingers are asked in turn, deepest first, as far as a dialog. """ @accept.setter def accept(self, arg: bool, /) -> None: ... class Key(enum.Enum): """Keys.""" Unknown = 0 Return = 1 Escape = 2 Backspace = 3 Tab = 4 Space = 5 Exclaim = 6 DoubleQuote = 7 Hash = 8 Percent = 9 Dollar = 10 Ampersand = 11 SingleQuote = 12 LeftParen = 13 RightParen = 14 Asterisk = 15 Plus = 16 Comma = 17 Minus = 18 Period = 19 Slash = 20 Colon = 31 Semicolon = 32 Less = 33 Equals = 34 Greater = 35 Question = 36 At = 37 LeftBracket = 38 Backslash = 39 RightBracket = 40 Caret = 41 Underscore = 42 BackQuote = 43 A = 44 B = 45 C = 46 D = 47 E = 48 F = 49 G = 50 H = 51 I = 52 J = 53 K = 54 L = 55 M = 56 N = 57 O = 58 P = 59 Q = 60 R = 61 S = 62 T = 63 U = 64 V = 65 W = 66 X = 67 Y = 68 Z = 69 CapsLock = 70 F1 = 71 F2 = 72 F3 = 73 F4 = 74 F5 = 75 F6 = 76 F7 = 77 F8 = 78 F9 = 79 F10 = 80 F11 = 81 F12 = 82 F13 = 83 F14 = 84 F15 = 85 F16 = 86 F17 = 87 F18 = 88 F19 = 89 F20 = 90 F21 = 91 F22 = 92 F23 = 93 F24 = 94 PrintScreen = 95 ScrollLock = 96 Pause = 97 Insert = 98 Home = 99 PageUp = 100 Delete = 101 End = 102 PageDown = 103 Right = 104 Left = 105 Down = 106 Up = 107 NumLock = 108 KeypadDivide = 109 KeypadMultiply = 110 KeypadMinus = 111 KeypadPlus = 112 Keypad1 = 113 Keypad2 = 114 Keypad3 = 115 Keypad4 = 116 Keypad5 = 117 Keypad6 = 118 Keypad7 = 119 Keypad8 = 120 Keypad9 = 121 Keypad0 = 122 KeypadPeriod = 123 KeypadEquals = 124 def getKeyEnums() -> list[Key]: """Get every value of Key.""" def getShortcutLabel(key: Key, modifiers: int) -> str: """Get a keyboard shortcut label.""" class KeyEvent: """Key event.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg0: Key, arg1: int, arg2: V2I, /) -> None: ... @property def key(self) -> Key: """The key.""" @key.setter def key(self, arg: Key, /) -> None: ... @property def modifiers(self) -> int: """The keyboard modifiers held, as KeyModifier flags.""" @modifiers.setter def modifiers(self, arg: int, /) -> None: ... @property def pos(self) -> V2I: """The cursor position, in pixels from the top left of the window: the coordinates widget geometry is in. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def accept(self) -> bool: """Set by a widget that takes the key: it is sent the release, and no other widget is asked. Left unset, the key focus widget and its parents are asked in turn, as far as a dialog, then the widgets under the cursor, deepest first; a Tab that none takes moves the key focus. """ @accept.setter def accept(self, arg: bool, /) -> None: ... class TextEvent: """Text event.""" def __init__(self, arg: str, /) -> None: ... @property def text(self) -> str: """The text entered, in UTF-8.""" @text.setter def text(self, arg: str, /) -> None: ... @property def accept(self) -> bool: """Set by a widget that takes the text. The text goes to the key focus widget and, while this is unset, on to its parents in turn. """ @accept.setter def accept(self, arg: bool, /) -> None: ... class DragDropTextData(IDragDropData): """Drag and drop text data.""" def __init__(self, arg: Sequence[str], /) -> None: ... @property def text(self) -> list[str]: """Get the text. For files dropped on the application from outside, their paths. """ class DragDropEvent: """Drag and drop event.""" def __init__(self, arg0: V2I, arg1: V2I, arg2: IDragDropData, /) -> None: ... @property def pos(self) -> V2I: """The cursor position, in pixels from the top left of the window: the coordinates widget geometry is in. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def prev(self) -> V2I: """The previous cursor position, in the same coordinates; for files dropped from outside the application, the same as pos. """ @prev.setter def prev(self, arg: V2I, /) -> None: ... @property def data(self) -> IDragDropData: """The data being dragged.""" @data.setter def data(self, arg: IDragDropData, /) -> None: ... @property def accept(self) -> bool: """Set by a widget, as it is sent the drag enter event, to be the drop target: it is then sent the drag moves, the drop and a leave. For files dropped from outside the application, set in the drop event to stop the widgets further out being asked. """ @accept.setter def accept(self, arg: bool, /) -> None: ... class Orientation(enum.Enum): """Orientation.""" Horizontal = 0 Vertical = 1 def getOrientationEnums() -> list[Orientation]: """Get every value of Orientation.""" class Stretch(enum.Enum): """Layout stretch.""" Fixed = 0 Expanding = 1 def getStretchEnums() -> list[Stretch]: """Get every value of Stretch.""" class HAlign(enum.Enum): """Horizontal alignment.""" Fill = 0 Left = 1 Center = 2 Right = 3 def getHAlignEnums() -> list[HAlign]: """Get every value of HAlign.""" class VAlign(enum.Enum): """Vertical alignment.""" Fill = 0 Top = 1 Center = 2 Bottom = 3 def getVAlignEnums() -> list[VAlign]: """Get every value of VAlign.""" class IWidget: """Base class for widgets.""" def __init__(self, context: Context, objectName: str, parent: IWidget | None = None) -> None: ... @property def context(self) -> Context: """Get the context.""" @property def objectName(self) -> str: """Get the object name. Widgets are given their class name when they are made, e.g. "ftk::PushButton". """ @objectName.setter def objectName(self, arg: str, /) -> None: ... @property def objectPath(self) -> str: """Get the object path: the object names of the widget's parents and the widget, joined by "/". """ @property def backgroundRole(self) -> ColorRole: """Get the background role.""" @backgroundRole.setter def backgroundRole(self, arg: ColorRole, /) -> None: ... @property def parent(self) -> IWidget: """Get the parent widget.""" @parent.setter def parent(self, value: IWidget | None) -> None: ... def getChildren(self) -> list[IWidget]: """Get the children widgets.""" def moveToFront(self, arg: IWidget, /) -> None: """Move the child widget to the front of the drawing order.""" def moveToBack(self, arg: IWidget, /) -> None: """Move the child widget to the back of the drawing order.""" @property def window(self) -> IWindow: """Get the window.""" def getSizeHint(self) -> Size2I: """Get the size hint.""" @property def hStretch(self) -> Stretch: """Get the horizontal layout stretch.""" @hStretch.setter def hStretch(self, arg: Stretch, /) -> None: ... @property def vStretch(self) -> Stretch: """Get the vertical layout stretch.""" @vStretch.setter def vStretch(self, arg: Stretch, /) -> None: ... @overload def setStretch(self, horizontal: Stretch, vertical: Stretch) -> None: """Set the horizontal and vertical layout stretch.""" @overload def setStretch(self, arg: Stretch, /) -> None: """Set the horizontal and vertical layout stretch.""" @property def hAlign(self) -> HAlign: """Get the horizontal layout alignment.""" @hAlign.setter def hAlign(self, arg: HAlign, /) -> None: ... @property def vAlign(self) -> VAlign: """Get the vertical layout alignment.""" @vAlign.setter def vAlign(self, arg: VAlign, /) -> None: ... def setAlign(self, horizontal: HAlign, vertical: VAlign) -> None: """Set the horizontal and vertical layout alignment.""" def setGeometry(self, arg: Box2I, /) -> None: """Set the geometry. If this method is overridden the base method should be called. """ @property def geometry(self) -> Box2I: """Get the geometry.""" def setPos(self, arg: V2I, /) -> None: """Set the position.""" def setSize(self, arg: Size2I, /) -> None: """Set the size.""" def isVisible(self, andParentsVisible: bool = True) -> bool: """Is the widget visible?""" def setVisible(self, arg: bool, /) -> None: """Set whether the widget is visible. If this method is overridden the base method should be called. """ def show(self) -> None: """Show the widget.""" def hide(self) -> None: """Hide the widget.""" @property def clipped(self) -> bool: """Is the widget clipped?""" @property def clipChildren(self) -> bool: """Does the widget clip its children?""" @clipChildren.setter def clipChildren(self, arg: bool, /) -> None: ... @property def childrenClipRect(self) -> Box2I: """Get the clipping rect applied to the child widgets. By default this is the same as the widget geometry. """ @property def enabled(self) -> bool: """Is the widget enabled?""" @enabled.setter def enabled(self, arg: bool, /) -> None: ... def isEnabled(self, andParentsEnabled: bool = True) -> bool: """Is the widget enabled?""" @property def acceptsKeyFocus(self) -> bool: """Does this widget accept key focus?""" @acceptsKeyFocus.setter def acceptsKeyFocus(self, arg: bool, /) -> None: ... def moveToIndex(self, arg0: IWidget, arg1: int, /) -> None: """Move the child widget to the given index in the drawing order.""" @property def keyFocus(self) -> bool: """Does this widget have key focus?""" def takeKeyFocus(self) -> None: """Take the key focus.""" def releaseKeyFocus(self) -> None: """Release the key focus.""" @property def tooltip(self) -> str: """Get the tooltip.""" @tooltip.setter def tooltip(self, arg: str, /) -> None: ... def setContextMenuCallback(self, arg: Callable[[], Menu], /) -> None: """Set the context menu callback. The callback is invoked when the widget is clicked with the right mouse button, and should return the menu to show, or null for no menu. Widgets without a callback pass the click to their parent. The click is offered to the widgets under the cursor first, so a widget that uses the right button for something else keeps it by accepting the press; only an unclaimed button opens a menu. The menu is created on demand rather than stored so that widgets only pay for it when it is used, and so that it can reflect the current state, for example disabling paste when the clipboard is empty. """ def childAddEvent(self, event: ChildAddEvent) -> None: """Child add event.""" def childRemoveEvent(self, event: ChildRemoveEvent) -> None: """Child remove event.""" def tickEvent(self, parentsVisible: bool, parentsEnabled: bool, event: TickEvent) -> None: """Tick event. If this method is overridden the base method should be called. """ def styleEvent(self, event: StyleEvent) -> None: """Style event.""" def sizeHintEvent(self, event: SizeHintEvent) -> None: """Size hint event.""" def clipEvent(self, clipRect: Box2I, clipped: bool) -> None: """Clip event. If this method is overridden the base method should be called. """ def drawEvent(self, drawRect: Box2I, event: DrawEvent) -> None: """Draw event. This runs before the children are drawn, so anything drawn here is behind them; use drawOverlayEvent() to draw over them. """ def drawOverlayEvent(self, drawRect: Box2I, event: DrawEvent) -> None: """Draw overlay event. This runs after the children are drawn, which is where a border or a highlight belongs when the children fill the widget. """ def mouseEnterEvent(self, arg: MouseEnterEvent, /) -> None: """Mouse enter event.""" def mouseLeaveEvent(self) -> None: """Mouse leave event.""" def mouseMoveEvent(self, event: MouseMoveEvent) -> None: """Mouse move event.""" def mousePressEvent(self, event: MouseClickEvent) -> None: """Mouse press event.""" def mouseReleaseEvent(self, event: MouseClickEvent) -> None: """Mouse release event.""" def scrollEvent(self, event: ScrollEvent) -> None: """Scroll event.""" def gestureEvent(self, event: GestureEvent) -> None: """Touch gesture event. The widget that accepts the first event of a gesture receives the rest of it. """ def keyFocusEvent(self, focus: bool) -> None: """Key focus event. If this method is overridden the base method should be called. """ def keyPressEvent(self, event: KeyEvent) -> None: """Key press event.""" def keyReleaseEvent(self, event: KeyEvent) -> None: """Key release event.""" def textEvent(self, event: TextEvent) -> None: """Text event.""" def setSizeUpdate(self, value: bool = True) -> None: """Set a size update. The sizeHintEvent() and setGeometry() methods will be called the next tick of the event loop. """ def setDrawUpdate(self, value: bool = True) -> None: """Set a draw update. The drawEvent() method will be called the next tick of the event loop. """ def dragEnterEvent(self, event: DragDropEvent) -> None: """Drag enter event.""" def dragLeaveEvent(self, event: DragDropEvent) -> None: """Drag leave event.""" def dragMoveEvent(self, event: DragDropEvent) -> None: """Drag move event.""" def dropEvent(self, event: DragDropEvent) -> None: """Drop event.""" class IContainer(IWidget): """Base class for widgets that are one child filling them. Most composite widgets are a layout, or a scroll area, or a tab widget, given the whole of the parent. Written by hand that is the same two methods every time: Size2I X::getSizeHint() const { return _layout->getSizeHint(); } void X::setGeometry(const Box2I& v) { IWidget::setGeometry(v); _layout->setGeometry(v); } Deriving from this and calling _setWidget() instead says the same thing once. Widgets that lay their children out themselves derive from IWidget as before; this is only for the ones that hand everything to one child. """ def __init__(self, context: Context, objectName: str, parent: IWidget | None = None) -> None: ... @property def widget(self) -> IWidget: """Get the child filling this widget.""" class WindowBufferType(enum.Enum): """Window offscreen buffer types.""" U8 = 0 F16 = 1 F32 = 2 class WindowBufferTypeObserver: """Value observer.""" def __init__(self, observable: IObservableWindowBufferType, callback: Callable[[WindowBufferType], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableWindowBufferType: """Base class for observable values.""" def get(self) -> WindowBufferType: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableWindowBufferType(IObservableWindowBufferType): """Observable value.""" def __init__(self, arg: WindowBufferType, /) -> None: ... def setAlways(self, arg: WindowBufferType, /) -> None: """Set the value.""" def setIfChanged(self, arg: WindowBufferType, /) -> bool: """Set the value only if it has changed.""" def get(self) -> WindowBufferType: """Get the value.""" class IWindow(IWidget): """Base class for windows.""" @property def app(self) -> App: """Get the application.""" @property def windowID(self) -> int: """Get the window ID.""" @property def screen(self) -> int: """Get which screen the window is on.""" @property def title(self) -> str: """Get the window title.""" @title.setter def title(self, arg: str, /) -> None: ... @property def size(self) -> Size2I: """Get the window size, in the units the window system sizes windows in, which are not pixels everywhere; see getPixelDensity(). """ @size.setter def size(self, arg: Size2I, /) -> None: ... @property def minSize(self) -> Size2I: """Get the minimum window size, in the same units.""" @minSize.setter def minSize(self, arg: Size2I, /) -> None: ... @property def fullScreen(self) -> bool: """Get whether the window has been set to full screen with setFullScreen(). """ @fullScreen.setter def fullScreen(self, arg: bool, /) -> None: ... @property def observeFullScreen(self) -> IObservableBool: """Observe whether the window has been set to full screen.""" @property def floatOnTop(self) -> bool: """Get whether the window is set to float on top of the other windows. """ @floatOnTop.setter def floatOnTop(self, arg: bool, /) -> None: ... @property def observeFloatOnTop(self) -> IObservableBool: """Observe whether the window floats on top.""" def getWindowInfo(self) -> list[tuple[str, str]]: """Get the window information.""" @property def bufferSize(self) -> Size2I: """Get the size of the window's buffer, in pixels: what the widgets are laid out and drawn in. """ @property def bufferType(self) -> WindowBufferType: """Get the type of the offscreen buffer the window is drawn into.""" @bufferType.setter def bufferType(self, arg: WindowBufferType, /) -> None: ... @property def observeBufferType(self) -> IObservableWindowBufferType: """Observe the offscreen buffer type.""" @property def contentScale(self) -> float: """Get the ratio of the buffer size to the window size, or zero before the window has a size. """ @property def displayScale(self) -> float: """Get the display scale the window's widgets are sized and drawn at. The application sets it; see App::getWindowDisplayScale(). """ @displayScale.setter def displayScale(self, arg: float, /) -> None: ... @property def observeDisplayScale(self) -> IObservableFloat: """Observe the display scale.""" @property def keyFocus(self) -> IWidget: """Get the widget with the key focus, or null for none.""" @keyFocus.setter def keyFocus(self, arg: IWidget, /) -> None: ... def getNextKeyFocus(self, arg: IWidget, /) -> IWidget: """Get the widget after the given one in the order Tab moves the key focus in: the enabled widgets that accept the focus, in the window's last child, the one on top. It wraps around, gives the first widget for one not in the order, and null when the order is empty. """ def getPrevKeyFocus(self, arg: IWidget, /) -> IWidget: """Get the widget before the given one in the key focus order; see getNextKeyFocus(). It gives the last widget for one not in the order. """ @property def tooltipsEnabled(self) -> bool: """Get whether tooltips are shown in the window.""" @tooltipsEnabled.setter def tooltipsEnabled(self, arg: bool, /) -> None: ... @property def cursorPos(self) -> V2I: """Get the cursor position.""" @property def dragDropActive(self) -> bool: """Get whether a drag and drop is in progress. Drag events only reach the widget under the cursor, so a widget that reacts to a drag being anywhere near it -- a scroll area moving a drop target into reach -- asks here. """ def layout(self, size: Size2I) -> None: """Lay the window out at a size, as a resize from the window system would. Until this happens the window and everything in it has an empty geometry, and nothing is under the cursor -- so a test that reads a geometry, or aims at one, is reading and aiming at nothing. It does not fail; it passes, having checked nothing. """ def click(self, pos: V2I, button: MouseButton = MouseButton.Left, modifiers: int = 0) -> None: """Move the cursor there, then press and release a mouse button.""" def drag(self, path: Sequence[V2I], modifiers: int = 0, release: bool = True, holdModifiers: int = 0) -> None: """Press at the first point, move through the rest, release. Moved in steps between the points rather than jumped, because a widget that treats a drag as one gesture and a widget that treats every move as a separate edit look identical from a single move -- and the difference between them is the whole question for undo. Points beyond the second are how a drag that goes somewhere and comes back is written. """ def setTouchInput(self, value: bool) -> None: """Make the mouse events that follow a finger's, or a mouse's again, for the widgets that treat a fingertip differently. """ def cancelPress(self) -> None: """Let go of what press() holds, cancelled rather than released, the way a second finger landing takes a press away. """ def keyPress(self, key: Key, modifiers: int = 0) -> None: """Press a key and release it.""" def text(self, text: str) -> None: """Enter text, the way typing does after the key events: letters reach a widget as text input, not as key presses. """ def textEditing(self, text: str, cursor: int = 0) -> None: """Send an input method composition, the way an IME does while text is being composed; committing is text(). """ def setIcon(self, arg: Image, /) -> None: """Set the window icon. Icon images should be of type ImageType::RGBA_U8, with no mirroring, memory alignment of one, and LSB memory endian. Window icons are not supported on macOS. """ def screenshot(self, arg: Box2I, /) -> Image: """Capture a screenshot.""" def close(self) -> None: """Close the window.""" def setCloseCallback(self, arg: Callable[[], None], /) -> None: """Set the window close callback.""" def setFullScreenCallback(self, arg: Callable[[bool], None], /) -> None: """Set a function called once the window has entered or left full screen. On macOS the change animates, and setFullScreen() is only its start: what is drawn during the animation is a snapshot of the window stretched to the screen. """ class IMouseWidget(IWidget): """Base class for widgets with simple mouse interactions.""" def __init__(self, context: Context, objectName: str, parent: IWidget | None = None) -> None: ... class IPopup(IWidget): """Base class for popups.""" def close(self) -> None: """Close the popup.""" class DialogSize(enum.Enum): """How a dialog is sized in the window it opens in. Never larger than the window, whichever it is. """ Fit = 0 """As big as its content asks for, or across the window in a direction the content's stretch expands in. For messages, questions and settings. """ Text = 1 """A column of text: as wide as the text width, or as the content if that is wider, and the height of the window. For agreements, notes and help, which are read rather than glanced at, and whose lines are hard to follow when they run across a wide window. """ Full = 2 """The window, less the dialog margin. For lists and reports, which use whatever room there is. """ def getDialogSizeEnums() -> list[DialogSize]: """Get every value of DialogSize.""" class IDialog(IPopup): """Base class for dialog widgets.""" def open(self, arg: IWindow, /) -> None: """Open the dialog. Should setVisible() be used instead of open() and close()? """ def isOpen(self) -> bool: """Get whether the dialog is open.""" def setCloseCallback(self, arg: Callable[[], None], /) -> None: """Set the close callback.""" @property def dialogSize(self) -> DialogSize: """Get how the dialog is sized.""" @property def textWidth(self) -> int: """Get the width of a DialogSize::Text dialog, in characters.""" def setDialogSize(self, size: DialogSize, textWidth: int = 100) -> None: """Set how the dialog is sized, and for DialogSize::Text, how many characters wide it is, measured as a label's wrap width is. Fit, the default, is what the content's stretch says. Text and Full decide the size themselves, whatever the content's stretch, so their content should fill the room it is given: labels in it wrapping to fit, a scroll widget expanding. """ class MenuPopup(enum.Enum): """Menu popup type.""" Menu = 0 SubMenu = 1 class IMenuPopup(IPopup): """Base class for popup menus.""" @overload def open(self, window: IWindow, buttonGeometry: Box2I) -> None: """Open the popup. Should setVisible() be used instead of open() and close()? Open the popup at a position, for example at the cursor for a context menu. """ @overload def open(self, window: IWindow, pos: V2I) -> None: """Open the popup. Should setVisible() be used instead of open() and close()? Open the popup at a position, for example at the cursor for a context menu. """ def isOpen(self) -> bool: """Get whether the popup is open.""" def setCloseCallback(self, callback: Callable[[], None]) -> None: """Set the close callback.""" def setPopup(self, type: MenuPopup) -> None: """Set the popup type.""" def setPopupRole(self, role: ColorRole) -> None: """Set the popup color role.""" def setWidget(self, widget: IWidget) -> None: """Set the popup widget.""" class IWidgetPopup(IPopup): """Base class for popup widgets.""" def open(self, window: IWindow, buttonGeometry: Box2I, widgetGeometry: Box2I | None = None) -> None: """Open the popup. Should setVisible() be used instead of open() and close()? """ @property def isOpen(self) -> bool: """Get whether the popup is open.""" def setCloseCallback(self, arg: Callable[[], None], /) -> None: """Set the close callback.""" @property def widget(self) -> IWidget: """Get the widget.""" @widget.setter def widget(self, arg: IWidget, /) -> None: ... @property def popupRole(self) -> ColorRole: """Get the popup color role.""" @popupRole.setter def popupRole(self, arg: ColorRole, /) -> None: ... class IButton(IWidget): """Base class for buttons.""" @property def checkable(self) -> bool: """Get whether the button is checkable.""" @checkable.setter def checkable(self, arg: bool, /) -> None: ... @property def checked(self) -> bool: """Get whether the button is checked.""" @checked.setter def checked(self, arg: bool, /) -> None: ... @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... @property def icon(self) -> str: """Get the icon.""" @icon.setter def icon(self, arg: str, /) -> None: ... @property def checkedIcon(self) -> str: """Get the checked icon.""" @checkedIcon.setter def checkedIcon(self, arg: str, /) -> None: ... @property def buttonRole(self) -> ColorRole: """Get the button color role.""" @buttonRole.setter def buttonRole(self, arg: ColorRole, /) -> None: ... @property def checkedRole(self) -> ColorRole: """Get the checked color role.""" @checkedRole.setter def checkedRole(self, arg: ColorRole, /) -> None: ... def setHoveredCallback(self, arg: Callable[[bool], None], /) -> None: """Set the hovered callback.""" def setPressedCallback(self, arg: Callable[[], None], /) -> None: """Set the pressed callback.""" @property def repeatClick(self) -> bool: """Get whether the button repeats clicks when pressed.""" @repeatClick.setter def repeatClick(self, arg: bool, /) -> None: ... def setClickedCallback(self, arg: Callable[[], None], /) -> None: """Set the clicked callback.""" def setCheckedCallback(self, arg: Callable[[bool], None], /) -> None: """Set the checked callback.""" def getSettingsPath(directory: str, fileName: str) -> pathlib.Path: """Get a settings path.""" class Settings: """Settings.""" def __init__(self, context: Context, path: str | os.PathLike, reset: bool = False) -> None: """Create new settings.""" @property def path(self) -> pathlib.Path: """Get the settings path.""" def save(self) -> None: """Save the settings. The settings are also saved on destruction.""" def contains(self, key: str) -> bool: """Do the settings contain the given value?""" def getBool(self, arg: str, /) -> tuple: ... def getInt(self, arg: str, /) -> tuple: ... def getDouble(self, arg: str, /) -> tuple: ... def getString(self, arg: str, /) -> tuple: ... def getStringList(self, arg: str, /) -> tuple: ... def getJSON(self, arg: str, /) -> tuple: ... def setBool(self, key: str, value: bool) -> None: ... def setInt(self, key: str, value: int) -> None: ... def setDouble(self, key: str, value: float) -> None: ... def setString(self, key: str, value: str) -> None: ... def setStringList(self, key: str, value: Sequence[str]) -> None: ... def setJSON(self, arg0: str, arg1: str, /) -> None: ... class Window(IWindow): """Window.""" def __init__(self, context: Context, app: App, name: str, size: Size2I = ...) -> None: ... @property def pos(self) -> V2I: """Get the window position, in screen coordinates; zero where the platform keeps it to itself. """ @pos.setter def pos(self, arg: V2I, /) -> None: ... @property def maximized(self) -> bool: """Get whether the window is maximized.""" @maximized.setter def maximized(self, arg: bool, /) -> None: ... @property def normalGeometry(self) -> Box2I: """Get the position and size the window has when it is neither maximized nor full screen: what to remember it by. """ class ActionCheckType(enum.Enum): """How an action carries a checked state.""" Check = 1 """A switch. Picking it turns something on or off.""" Radio = 2 """One of several. Picking it selects; picking the one already selected leaves it selected, because there is no such thing as none of them. Set by ActionGroup rather than by hand: an action is one of many only in the company of the others. """ class ActionCheckTypeObserver: """Value observer.""" def __init__(self, observable: IObservableActionCheckType, callback: Callable[[ActionCheckType], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableActionCheckType: """Base class for observable values.""" def get(self) -> ActionCheckType: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableActionCheckType(IObservableActionCheckType): """Observable value.""" def __init__(self, arg: ActionCheckType, /) -> None: ... def setAlways(self, arg: ActionCheckType, /) -> None: """Set the value.""" def setIfChanged(self, arg: ActionCheckType, /) -> bool: """Set the value only if it has changed.""" def get(self) -> ActionCheckType: """Get the value.""" class KeyShortcut: """Keyboard shortcut.""" @overload def __init__(self) -> None: ... @overload def __init__(self, key: Key, modifier: KeyModifier) -> None: ... @overload def __init__(self, key: Key, modifier: KeyModifier, modifier2: KeyModifier) -> None: ... @overload def __init__(self, key: Key, modifier: KeyModifier, modifier2: KeyModifier, modifier3: KeyModifier) -> None: ... @overload def __init__(self, key: Key, modifiers: int = 0) -> None: ... @property def key(self) -> Key: """The key, or Unknown for none.""" @key.setter def key(self, arg: Key, /) -> None: ... @property def modifiers(self) -> int: """The keyboard modifiers held, as KeyModifier flags.""" @modifiers.setter def modifiers(self, arg: int, /) -> None: ... class Action: """Action.""" @overload def __init__(self, text: str, callback: Callable[[], None]) -> None: ... @overload def __init__(self, text: str, icon: str, callback: Callable[[], None]) -> None: ... @overload def __init__(self, text: str, shortcut: KeyShortcut, callback: Callable[[], None]) -> None: ... @overload def __init__(self, text: str, icon: str, shortcut: KeyShortcut, callback: Callable[[], None]) -> None: ... @overload def __init__(self, text: str, checkedCallback: Callable[[bool], None]) -> None: ... @overload def __init__(self, text: str, icon: str, checkedCallback: Callable[[bool], None]) -> None: ... @overload def __init__(self, text: str, shortcut: KeyShortcut, checkedCallback: Callable[[bool], None]) -> None: ... @overload def __init__(self, text: str, icon: str, shortcut: KeyShortcut, checkedCallback: Callable[[bool], None]) -> None: ... @property def text(self) -> str: """Get the text, shown in menus and on buttons.""" @text.setter def text(self, arg: str, /) -> None: ... @property def observeText(self) -> IObservableString: """Observe the text.""" @property def icon(self) -> str: """Get the name of the icon; empty for none.""" @icon.setter def icon(self, arg: str, /) -> None: ... @property def observeIcon(self) -> IObservableString: """Observe the icon.""" @property def checkedIcon(self) -> str: """Get the name of the icon shown while the action is checked; empty to show the other icon. """ @checkedIcon.setter def checkedIcon(self, arg: str, /) -> None: ... @property def observeCheckedIcon(self) -> IObservableString: """Observe the checked icon.""" @property def shortcuts(self) -> list[KeyShortcut]: """Get the keyboard shortcuts. An action made without one has a single shortcut with no key. """ @shortcuts.setter def shortcuts(self, arg: Sequence[KeyShortcut], /) -> None: ... def doCallback(self) -> None: """Call the callback, if the action has one. Menus and tool buttons call it when the action is picked, checkable or not. """ @property def checkType(self) -> ActionCheckType: """Get how the action carries a checked state: Check when it was made with a checked callback, None otherwise. An ActionGroup sets it for the actions added to it. """ @checkType.setter def checkType(self, arg: ActionCheckType, /) -> None: ... @property def checkable(self) -> bool: """Whether the action carries a checked state at all.""" @property def checked(self) -> bool: """Get whether the action is checked.""" @checked.setter def checked(self, arg: bool, /) -> None: ... @property def observeCheckType(self) -> IObservableActionCheckType: """Observe the check type.""" @property def observeChecked(self) -> IObservableBool: """Observe whether the action is checked.""" def doCheckedCallback(self, arg: bool, /) -> None: """Call the checked callback with the given state, if the action has one. The checked state is not changed; see setChecked(). """ @property def enabled(self) -> bool: """Get whether the action is enabled. The menus and buttons showing it follow it, and the shortcut of a disabled action does nothing. """ @enabled.setter def enabled(self, arg: bool, /) -> None: ... @property def observeEnabled(self) -> IObservableBool: """Observe whether the action is enabled.""" @property def tooltip(self) -> str: """Get the tooltip.""" @tooltip.setter def tooltip(self, arg: str, /) -> None: ... @property def observeTooltip(self) -> IObservableString: """Observe the tooltip.""" class ActionGroupType(enum.Enum): """Action group type.""" Click = 0 Check = 1 Radio = 2 Toggle = 3 def getActionGroupTypeEnums() -> list[ActionGroupType]: """Get every value of ActionGroupType.""" class ActionGroup: """A group of related actions. ButtonGroup does this for widgets, and cannot be used for actions: a menu makes its own buttons, so the application never sees them, and one action commonly drives several -- the same action is a menu item and a tool bar button at once. Relatedness belongs where identity is, which is the action rather than the widget. Radio is the case worth having. Without it an application writes, for every set of mutually exclusive actions, an observer that walks the set calling setChecked(this one == the current one), and creates the actions with a plain callback so that picking one cannot un-pick it. That works and is not discoverable from anything. """ def __init__(self, type: ActionGroupType) -> None: """Create a new group.""" @property def actions(self) -> list[Action]: """Get the actions.""" def addAction(self, arg: Action, /) -> None: """Add an action. The group sets its check type.""" def clear(self) -> None: """Remove every action, leaving them as they are.""" @property def checked(self) -> int: """Get the index of the checked action, or -1 for none. Only a radio group keeps it as the actions are picked. """ @checked.setter def checked(self, arg: int, /) -> None: ... def observeChecked(self) -> IObservableInt: """Observe the index of the checked action.""" def setCheckedCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the callback. The index is which action, the bool its new state; for a radio group the bool is always true, since picking one is the only thing that can happen. """ class ColorStyle(enum.Enum): """Color style.""" Dark = 0 Light = 1 def getColorStyleEnums() -> list[ColorStyle]: """Get every value of ColorStyle.""" class Renderer(enum.Enum): """What an application's windows are drawn with.""" OpenGL = 0 GPU = 1 """The GPU renderer, Metal or Vulkan, where it is built and a device can be made for it, and OpenGL otherwise. """ def getRendererEnums() -> list[Renderer]: """Get every value of Renderer.""" class ColorControls: """Color controls.""" def __init__(self) -> None: ... @property def brightness(self) -> float: """The brightness the color roles are given, as a multiplier; one leaves them as they are. """ @brightness.setter def brightness(self, arg: float, /) -> None: ... @property def contrast(self) -> float: """The contrast the color roles are given; one leaves them as they are. """ @contrast.setter def contrast(self, arg: float, /) -> None: ... @property def disabledAlpha(self) -> float: """Alpha multiplier applied by getColorRole(ColorRole, bool enabled) when a widget is disabled. Since widgets are alpha-composited, this dims toward the underlying surface. """ @disabledAlpha.setter def disabledAlpha(self, arg: float, /) -> None: ... def __eq__(self, arg: ColorControls, /) -> bool: ... def __ne__(self, arg: ColorControls, /) -> bool: ... class Style: """Style.""" @property def colorControls(self) -> ColorControls: """Get the color controls: the brightness and contrast of the color roles, and the alpha of disabled widgets. """ @colorControls.setter def colorControls(self, arg: ColorControls, /) -> None: ... @property def fonts(self) -> dict[FontType, str]: """Get the font names, by font type.""" @fonts.setter def fonts(self, arg: Mapping[FontType, str], /) -> None: ... def getSizeRole(self, role: SizeRole, scale: float) -> int: """Get a size role in pixels at the given display scale; zero for a role the style has no size for. """ def getColorRole(self, role: ColorRole) -> Color4F: """Get a color role for a widget state. When enabled is false the color's alpha is multiplied by ColorControls::disabledAlpha, dimming it toward the surface it is drawn over. """ class ColorStyleObserver: """Value observer.""" def __init__(self, observable: IObservableColorStyle, callback: Callable[[ColorStyle], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableColorStyle: """Base class for observable values.""" def get(self) -> ColorStyle: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableColorStyle(IObservableColorStyle): """Observable value.""" def __init__(self, arg: ColorStyle, /) -> None: ... def setAlways(self, arg: ColorStyle, /) -> None: """Set the value.""" def setIfChanged(self, arg: ColorStyle, /) -> bool: """Set the value only if it has changed.""" def get(self) -> ColorStyle: """Get the value.""" class MonitorInfo: """Monitor information.""" @property def name(self) -> str: """The monitor's name.""" @name.setter def name(self, arg: str, /) -> None: ... @property def size(self) -> Size2I: """The size of the monitor's current display mode.""" @size.setter def size(self, arg: Size2I, /) -> None: ... @property def refreshRate(self) -> float: """The refresh rate of the current display mode, in hertz; zero where it is not known. """ @refreshRate.setter def refreshRate(self, arg: float, /) -> None: ... @property def dpi(self) -> V2F: """The horizontal and vertical dots per inch. Not set in SDL3 builds, where it is zero. """ @dpi.setter def dpi(self, arg: V2F, /) -> None: ... @property def bounds(self) -> Box2I: """The monitor's area of the desktop, in screen coordinates.""" @bounds.setter def bounds(self, arg: Box2I, /) -> None: ... def __eq__(self, arg: MonitorInfo, /) -> bool: ... def __ne__(self, arg: MonitorInfo, /) -> bool: ... class MonitorInfoListObserver: """List observer.""" def __init__(self, observableList: IObservableMonitorInfoList, callback: Callable[[Sequence[MonitorInfo]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableMonitorInfoList: """Base class for observable lists.""" pass class ObservableMonitorInfoList(IObservableMonitorInfoList): """Observable list.""" def __init__(self, arg: Sequence[MonitorInfo], /) -> None: ... def setAlways(self, arg: Sequence[MonitorInfo], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[MonitorInfo], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: MonitorInfo) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: MonitorInfo) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: MonitorInfo, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[MonitorInfo], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: MonitorInfo) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[MonitorInfo]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[MonitorInfo]) -> None: """Replace a range of items.""" def get(self) -> list[MonitorInfo]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> MonitorInfo: """Get a list item.""" def contains(self, arg: MonitorInfo, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: MonitorInfo, /) -> int: """Get the index of the given item.""" class AppFiles: """Where an application keeps its per-user files: the settings and the log. Left empty, no files are kept and the application is responsible for its own. A suite of applications gives them all the same directory and tells them apart by the base name, so that one directory holds the settings and logs of all of them rather than one directory apiece. """ def __init__(self, dirName: str = '', baseName: str = '', version: int = 0) -> None: ... @property def dirName(self) -> str: """Directory under the user's documents. Empty keeps no files.""" @dirName.setter def dirName(self, arg: str, /) -> None: ... @property def baseName(self) -> str: """Base name for the settings and log files. Empty uses the application name. """ @baseName.setter def baseName(self, arg: str, /) -> None: ... @property def version(self) -> int: """Appended to the base name when greater than zero, so that two major versions of an application do not read each other's settings. """ @version.setter def version(self, arg: int, /) -> None: ... class App(IApp): """Base class for user interface applications.""" def __init__(self, context: Context, argv: Sequence[str], name: str, summary: str, cmdLineArgs: Sequence[ICmdLineArg] = [], cmdLineOptions: Sequence[ICmdLineOption] = [], appFiles: AppFiles = ...) -> None: ... @property def settings(self) -> Settings: """Get the settings. Null when no AppFiles was given.""" @property def settingsPath(self) -> pathlib.Path: """Get the settings file path. Empty when no AppFiles was given.""" @property def logFilePath(self) -> pathlib.Path: """Get the log file path. Empty when no AppFiles was given.""" @property def windows(self) -> list[IWindow]: """Get the windows.""" @property def observeMonitors(self) -> IObservableMonitorInfoList: """Observe the monitors.""" @property def fontSystem(self) -> FontSystem: """Get the font system.""" @property def iconSystem(self) -> IconSystem: """Get the icon system.""" @property def style(self) -> Style: """Get the style.""" @property def colorStyle(self) -> ColorStyle: """Get the color style. Dark unless the -colorStyle command line option or setColorStyle() says otherwise. """ @colorStyle.setter def colorStyle(self, arg: ColorStyle, /) -> None: ... @property def renderer(self) -> Renderer: """Get the renderer that is set, which is OpenGL unless the other is asked for. What draws is said by gpu::isEnabled(): this is what is kept with the settings, and where the GPU renderer cannot draw OpenGL does whatever was asked. """ @renderer.setter def renderer(self, arg: Renderer, /) -> None: ... @property def observeRenderer(self) -> "ftk::IObservable": """Observe the renderer that is set.""" @property def observeColorStyle(self) -> IObservableColorStyle: """Observe the color style.""" @property def defaultDisplayScale(self) -> float: """Get the display scale found at startup: the first display's, or the -displayScale command line option's, and never less than one. """ @property def autoDisplayScale(self) -> float: """Get the display scale that setDisplayScale(0) gives: the window's once there is one, else the display's. """ @property def displayScale(self) -> float: """Get the display scale. A window on a display of another scale can draw at that one instead; see getWindowDisplayScale(). """ @displayScale.setter def displayScale(self, arg: float, /) -> None: ... @property def observeDisplayScale(self) -> IObservableFloat: """Observe the display scale.""" @property def tooltipsEnabled(self) -> bool: """Get whether tooltips are shown. On by default, for every window.""" @tooltipsEnabled.setter def tooltipsEnabled(self, arg: bool, /) -> None: ... @property def observeTooltipsEnabled(self) -> IObservableBool: """Observe whether tooltips are shown.""" @staticmethod def setOffscreenDefault(value: bool) -> None: """Set whether applications start offscreen, before any of them exist. For test runners and batch tools. An application that is not there to be looked at should not be putting windows over whatever the person at the keyboard is doing -- and a window that can be clicked while something drives it is a run that can be interfered with, which is worse than untidy. Static because the decision belongs to whoever started the process rather than to any one application in it, and a test suite makes dozens. """ def writeScreenshot(self, path: str | os.PathLike) -> bool: """Write a screenshot of the first window. Returns false when there is no window, when the offscreen buffer is not ready, or when the file cannot be written; the reason is logged. Only useful once the event loop has run: that is what realizes and sizes the window and leaves a buffer behind to read. """ def writeWidgetDump(self, path: str | os.PathLike) -> bool: """Write the first window's widget tree as JSON; see widgetDump(). Returns false when there is no window or the file cannot be written; the reason is logged. Only useful once the event loop has run and laid the window out. """ def exit(self) -> None: """Exit the application.""" def run(self) -> None: """Run the application.""" def tick(self) -> None: """Tick the event loop. If this method is overridden the base method should be called. """ class Bellows(IContainer): """Bellows widget.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... @property def widget(self) -> IWidget: """Get the widget.""" @widget.setter def widget(self, arg: IWidget, /) -> None: ... @property def open(self) -> bool: """Get whether the bellows is open.""" @open.setter def open(self, arg: bool, /) -> None: ... @property def checkWidget(self) -> IWidget: """Get the check widget.""" @checkWidget.setter def checkWidget(self, arg: IWidget, /) -> None: ... @property def toolWidget(self) -> IWidget: """Get the tool widget.""" @toolWidget.setter def toolWidget(self, arg: IWidget, /) -> None: ... def setOpenCallback(self, arg: Callable[[bool], None], /) -> None: """Set the open callback.""" class ButtonGroupType(enum.Enum): """Button group type.""" Click = 0 Check = 1 Radio = 2 Toggle = 3 def getButtonGroupTypeEnums() -> list[ButtonGroupType]: """Get every value of ButtonGroupType.""" class ButtonGroup: """Button group.""" def __init__(self, context: Context, type: ButtonGroupType) -> None: """Create a new button group.""" def getButtons(self) -> list[IButton]: """Get the buttons in the group.""" def addButton(self, arg: IButton, /) -> None: """Add a button to the group.""" def clearButtons(self) -> None: """Clear the buttons in the group.""" def setChecked(self, index: int, checked: bool) -> None: """Set whether the button is checked.""" def setClickedCallback(self, arg: Callable[[int], None], /) -> None: """Set the clicked callback.""" def setCheckedCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the checked callback.""" class CheckBox(IButton): """Check box.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... class ClipboardSystem(ISystem): """Clipboard system.""" def __init__(self, context: Context) -> None: """Create a new system.""" @property def text(self) -> str: """Get the clipboard text.""" @text.setter def text(self, arg: str, /) -> None: ... def observeText(self) -> IObservableString: """Observe the clipboard text.""" class ColorPopup(IWidgetPopup): """Color popup.""" def __init__(self, context: Context, color: Color4F, parent: IWidget | None = None) -> None: """Create a new popup.""" def setCallback(self, arg: Callable[[Color4F], None], /) -> None: """Set the callback.""" def setPressedCallback(self, arg: Callable[[Color4F, bool], None], /) -> None: """Set the callback with a flag for whether the widget is pressed.""" class ColorDot(IWidget): """Color dot: a small round color swatch for tight rows, subtle where the square swatch is loud. When editable it opens the color popup. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def color(self) -> Color4F: """Get the color.""" @color.setter def color(self, arg: Color4F, /) -> None: ... @property def editable(self) -> bool: """Get whether the dot is editable.""" @editable.setter def editable(self, arg: bool, /) -> None: ... def setCallback(self, arg: Callable[[Color4F], None], /) -> None: """Set the callback.""" class ColorSwatch(IWidget): """Color swatch widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def color(self) -> Color4F: """Get the color.""" @color.setter def color(self, arg: Color4F, /) -> None: ... @property def border(self) -> bool: """Get whether a border is shown.""" @border.setter def border(self, arg: bool, /) -> None: ... @property def editable(self) -> bool: """Get whether the color is editable.""" @editable.setter def editable(self, arg: bool, /) -> None: ... def setCallback(self, arg: Callable[[Color4F], None], /) -> None: """Set the callback.""" def setPressedCallback(self, arg: Callable[[Color4F, bool], None], /) -> None: """Set the callback with a flag for whether the widget is pressed.""" @property def sizeRole(self) -> SizeRole: """Get the size role.""" @sizeRole.setter def sizeRole(self, arg: SizeRole, /) -> None: ... class ColorWidget(IContainer): """Color widget. Add support for displaying pixel types like U8, U16, etc.? """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def color(self) -> Color4F: """Get the color.""" @color.setter def color(self, arg: Color4F, /) -> None: ... def setCallback(self, arg: Callable[[Color4F], None], /) -> None: """Set the callback.""" def setPressedCallback(self, arg: Callable[[Color4F, bool], None], /) -> None: """Set the callback with a flag for whether the widget is pressed.""" class ComboBoxItem: """Combo box item.""" @overload def __init__(self) -> None: ... @overload def __init__(self, text: str, icon: str = '') -> None: ... @property def text(self) -> str: """The text shown for the item.""" @text.setter def text(self, arg: str, /) -> None: ... @property def icon(self) -> str: """The name of the item's icon; empty for none.""" @icon.setter def icon(self, arg: str, /) -> None: ... def __eq__(self, arg: ComboBoxItem, /) -> bool: ... def __ne__(self, arg: ComboBoxItem, /) -> bool: ... class ComboBox(IWidget): """Combo box.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, items: Sequence[ComboBoxItem], parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, items: Sequence[str], parent: IWidget | None = None) -> None: ... def getItems(self) -> list[ComboBoxItem]: """Get the items.""" @overload def setItems(self, arg: Sequence[ComboBoxItem], /) -> None: """Set the items.""" @overload def setItems(self, arg: Sequence[str], /) -> None: """Set the items.""" @property def currentIndex(self) -> int: """Get the current index.""" @currentIndex.setter def currentIndex(self, arg: int, /) -> None: ... def setElide(self, max: int, mode: ElideMode = ElideMode.Right) -> None: """Set the number of characters shown when the box is closed, and which end of a longer item to keep. Zero, the default, shows the whole of the longest item, which is what makes the box as wide as its longest item however short the current one is. The menu is never elided, so the whole of each item can still be read when choosing. """ def setIndexCallback(self, arg: Callable[[int], None], /) -> None: """Set the current index callback.""" def setItemCallback(self, arg: Callable[[ComboBoxItem], None], /) -> None: """Set the current item callback.""" @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class ConfirmDialog(IDialog): """Confirmation dialog.""" def __init__(self, context: Context, title: str, text: str, confirm: str = 'OK', cancel: str = 'Cancel', parent: IWidget | None = None) -> None: """Create a new widget.""" def setCallback(self, arg: Callable[[bool], None], /) -> None: """Set the callback.""" class ChoiceDialog(IDialog): """Choice dialog: a question answered by one of several buttons, e.g. save, discard, or cancel. The last choice is the safe one -- it takes the key focus, so the key that takes the dialog at face value is the one that changes nothing. """ def __init__(self, context: Context, title: str, text: str, choices: Sequence[str], parent: IWidget | None = None) -> None: """Create a new widget.""" def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback. It is given the index of the chosen button; dismissing the dialog chooses nothing and the callback does not run. """ class InputDialog(IDialog): """Text input dialog.""" def __init__(self, context: Context, title: str, text: str, value: str, confirm: str = 'OK', cancel: str = 'Cancel', parent: IWidget | None = None) -> None: """Create a new widget.""" def setCallback(self, arg: Callable[[str], None], /) -> None: """Set the callback. It is called once, when the input is accepted with the confirm button or the Return key; cancelling closes the dialog without calling it. """ class ItemButton(IButton): """A button that draws the list item states around a widget, for list rows built from more than a line of text. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def widget(self) -> IWidget: """Get the widget.""" @widget.setter def widget(self, arg: IWidget, /) -> None: ... def setFocusCallback(self, arg: Callable[[bool], None], /) -> None: """Set a callback for when the item gains or loses the key focus.""" def setDragDropDataCallback(self, arg: Callable[[], IDragDropData], /) -> None: """Set the drag and drop data the item offers. Setting it makes the item draggable: a press that moves past the drag length starts a drag instead of a click. """ def setDragDropCursorCallback(self, arg: Callable[[], Image], /) -> None: """Set the image shown under the cursor while the item is dragged.""" class ItemControls(IMouseWidget): """A group of controls inside an item row: the mouse stops here, so the gaps between the controls go quiet instead of hovering the item underneath, and a click that misses a control does nothing rather than acting as a click on the item. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def widget(self) -> IWidget: """Get the widget.""" @widget.setter def widget(self, arg: IWidget, /) -> None: ... class DiagWidget(IContainer): """Diagnostics widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... class DialogSystem(ISystem): """Dialog system.""" def __init__(self, context: Context) -> None: """Create a new system.""" def message(self, title: str, text: str, window: IWindow) -> MessageDialog: """Open a message dialog.""" def choice(self, title: str, text: str, choices: Sequence[str], window: IWindow, callback: Callable[[int], None]) -> ChoiceDialog: """Open a choice dialog. The callback is given the index of the chosen button; dismissing the dialog chooses nothing. """ def input(self, title: str, text: str, value: str, window: IWindow, callback: Callable[[str], None]) -> InputDialog: """Open a text input dialog. The callback is called when the input is accepted; cancelling closes the dialog without it. """ def confirm(self, title: str, text: str, window: IWindow, callback: Callable[[bool], None], confirm: str = 'OK', cancel: str = 'Cancel') -> ConfirmDialog: """Open a confirmation dialog.""" class Divider(IWidget): """Divider widget.""" def __init__(self, context: Context, orientation: Orientation, parent: IWidget | None = None) -> None: """Create a new widget.""" def updateDividers(parent: IWidget) -> None: """Show each divider among a widget's children only between visible children, and one between any two: a divider beside a group that is hidden would stand at the end of the row, or next to another. Call it when the children's visibility changes. """ class IDocument: """Base class for documents.""" def __init__(self) -> None: ... class IDocumentObserver: """Value observer.""" def __init__(self, observable: IObservableIDocument, callback: Callable[[IDocument], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableIDocument: """Base class for observable values.""" def get(self) -> IDocument: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableIDocument(IObservableIDocument): """Observable value.""" def __init__(self, value: IDocument | None) -> None: ... def setAlways(self, value: IDocument | None) -> None: """Set the value.""" def setIfChanged(self, value: IDocument | None) -> bool: """Set the value only if it has changed.""" def get(self) -> IDocument: """Get the value.""" class IObservableWeakIDocument: """Base class for observable values.""" def get(self) -> IDocument | None: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class WeakIDocumentObserver: """Value observer.""" def __init__(self, observable: IObservableWeakIDocument, callback: Callable[[IDocument | None], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IDocumentListObserver: """List observer.""" def __init__(self, observableList: IObservableIDocumentList, callback: Callable[[Sequence[IDocument]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableIDocumentList: """Base class for observable lists.""" pass class ObservableIDocumentList(IObservableIDocumentList): """Observable list.""" def __init__(self, arg: Sequence[IDocument], /) -> None: ... def setAlways(self, arg: Sequence[IDocument], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[IDocument], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: IDocument) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: IDocument) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: IDocument, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[IDocument], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: IDocument) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[IDocument]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[IDocument]) -> None: """Replace a range of items.""" def get(self) -> list[IDocument]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> IDocument: """Get a list item.""" def contains(self, arg: IDocument, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: IDocument, /) -> int: """Get the index of the given item.""" class DocumentModel: """Document model.""" def __init__(self, context: Context) -> None: """Create a new document model.""" def getList(self) -> list[IDocument]: """Get the documents.""" def observeList(self) -> IObservableIDocumentList: """Observe the documents.""" def add(self, document: IDocument) -> None: """Add a document. It becomes the current document.""" def observeAdd(self) -> IObservableWeakIDocument: """Observe the documents as they are added.""" def close(self, index: int) -> None: """Close the document at the given index; an index out of range is ignored. Closing the current document makes the next one current, or the last one when it was the last. """ def closeAll(self) -> None: """Close all of the documents. This sends observeCloseAll(), not observeClose() for each. """ def observeClose(self) -> IObservableWeakIDocument: """Observe the documents as close() closes them: each one is sent before it is removed. """ def observeCloseAll(self) -> IObservableBool: """Observe closeAll(): true is sent each time it is called.""" def getCurrent(self) -> IDocument: """Get the current document, or null for none.""" @property def currentIndex(self) -> int: """Get the index of the current document, or -1 for none. An index set is clamped to the documents. """ @currentIndex.setter def currentIndex(self, arg: int, /) -> None: ... def observeCurrent(self) -> IObservableIDocument: """Observe the current document.""" def observeCurrentIndex(self) -> IObservableInt: """Observe the index of the current document.""" class DoubleModel: """Double precision floating point value model.""" def __init__(self) -> None: """Create a new model.""" @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setValueSoft(self, arg: float, /) -> None: """Set the value, extending a soft range to admit it. This is for values the user typed; interactive changes such as dragging use setValue(), which always clamps, so they cannot run the range away. """ def observeValue(self) -> IObservableDouble: """Observe the value.""" @property def range(self) -> RangeD: """Get the range the value is kept within. The default is 0 to 1.""" @range.setter def range(self, arg: RangeD, /) -> None: ... def observeRange(self) -> IObservableRangeD: """Observe the range.""" @property def rangeSoft(self) -> bool: """Get whether the range is soft. A value given to setValueSoft() beyond a soft range extends the range instead of being clamped. """ @rangeSoft.setter def rangeSoft(self, arg: bool, /) -> None: ... @property def step(self) -> float: """Get the step, the amount a step increments or decrements the value by. The default is 0.1. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step, the amount a large step increments or decrements the value by. The default is 1. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... def stepInc(self) -> None: """Increment the value by a step.""" def stepDec(self) -> None: """Decrement the value by a step.""" def largeStepInc(self) -> None: """Increment the value by a large step.""" def largeStepDec(self) -> None: """Decrement the value by a large step.""" @property def hasDefault(self) -> bool: """Get whether there is a default value.""" def observeHasDefault(self) -> IObservableBool: """Observe whether there is a default value.""" @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def observeDefault(self) -> IObservableDouble: """Observe the default value.""" def setDefault(self) -> None: """Set the default value. Set the value to the default value. """ def clearDefault(self) -> None: """Clear the default value.""" class DoubleEdit(IContainer): """Double precision floating point value editor.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: DoubleModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from setValue() and from other widgets that share the model. Typed text is applied when Enter is pressed or the key focus is lost. """ @property def range(self) -> RangeD: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeD, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the up and down arrow keys, the increment buttons, and the scroll wheel change the value by. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> DoubleModel: """Get the model.""" @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font, the monospace font by default.""" @font.setter def font(self, arg: FontType, /) -> None: ... @property def borderRole(self) -> ColorRole: """Get the border role.""" @borderRole.setter def borderRole(self, arg: ColorRole, /) -> None: ... class DoubleEditSlider(IContainer): """Double precision floating point value editor and slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: DoubleModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ @property def range(self) -> RangeD: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeD, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the arrow keys, the increment buttons, and the scroll wheel change the value by. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> DoubleModel: """Get the model.""" def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class DoubleEditShuttle(IContainer): """Double precision floating point value editor and shuttle.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: DoubleModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every notch while the shuttle is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the shuttle is pressed. """ @property def range(self) -> RangeD: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeD, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the up and down arrow keys, the increment buttons, the scroll wheel, and each notch of the shuttle change the value by. With Control held the shuttle moves by a tenth of it. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel or the shuttle with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> DoubleModel: """Get the model.""" @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class IDoubleSlider(IMouseWidget): """Base class for double precision floating point sliders.""" @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeD: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeD, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the arrow keys and the scroll wheel change the value by. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> DoubleModel: """Get the model.""" class DoubleSlider(IDoubleSlider): """Double precision floating point slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: DoubleModel, parent: IWidget | None = None) -> None: ... class FileSystemPathListObserver: """List observer.""" def __init__(self, observableList: IObservableFileSystemPathList, callback: Callable[[Sequence[str | os.PathLike]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableFileSystemPathList: """Base class for observable lists.""" pass class ObservableFileSystemPathList(IObservableFileSystemPathList): """Observable list.""" def __init__(self, arg: Sequence[str | os.PathLike], /) -> None: ... def setAlways(self, arg: Sequence[str | os.PathLike], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[str | os.PathLike], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: str | os.PathLike) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: str | os.PathLike) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: str | os.PathLike, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[str | os.PathLike], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: str | os.PathLike) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[str | os.PathLike]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[str | os.PathLike]) -> None: """Replace a range of items.""" def get(self) -> list[pathlib.Path]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> pathlib.Path: """Get a list item.""" def contains(self, arg: str | os.PathLike, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: str | os.PathLike, /) -> int: """Get the index of the given item.""" class DrivesModel: """File system drives model.""" def __init__(self, context: Context) -> None: """Create a new model.""" def observeDrives(self) -> IObservableFileSystemPathList: """Observe the list of drives.""" class FileBrowserMode(enum.Enum): """File browser mode.""" Open = 0 Save = 1 Dir = 2 def getFileBrowserModeEnums() -> list[FileBrowserMode]: """Get every value of FileBrowserMode.""" class FileSystemPathObserver: """Value observer.""" def __init__(self, observable: IObservableFileSystemPath, callback: Callable[[str | os.PathLike], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableFileSystemPath: """Base class for observable values.""" def get(self) -> pathlib.Path: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableFileSystemPath(IObservableFileSystemPath): """Observable value.""" def __init__(self, arg: str | os.PathLike, /) -> None: ... def setAlways(self, arg: str | os.PathLike, /) -> None: """Set the value.""" def setIfChanged(self, arg: str | os.PathLike, /) -> bool: """Set the value only if it has changed.""" def get(self) -> pathlib.Path: """Get the value.""" class FileBrowserOpenOptions: """File browser open options.""" def __init__(self) -> None: ... @property def title(self) -> str: """The title of the browser.""" @title.setter def title(self, arg: str, /) -> None: ... @property def path(self) -> pathlib.Path: """The directory to open at. Empty stays wherever the browser was last left. """ @path.setter def path(self, arg: str | os.PathLike, /) -> None: ... @property def mode(self) -> FileBrowserMode: """Whether a file is opened or saved, or a directory chosen.""" @mode.setter def mode(self, arg: FileBrowserMode, /) -> None: ... @property def fileName(self) -> str: """A suggested file name for saving.""" @fileName.setter def fileName(self, arg: str, /) -> None: ... @property def extensions(self) -> list[str]: """Restrict the listing to these extensions, e.g. { ".djvr" }. Empty shows every file. """ @extensions.setter def extensions(self, arg: Sequence[str], /) -> None: ... @property def extensionsLabel(self) -> str: """Names the group of extensions: the filter group in the native dialog, and the entry shown in place of "*.*" in the built-in one. """ @extensionsLabel.setter def extensionsLabel(self, arg: str, /) -> None: ... @property def multiple(self) -> bool: """Allow more than one file to be chosen. Only meaningful when opening; there is one file to save to and one directory to pick. """ @multiple.setter def multiple(self, arg: bool, /) -> None: ... class FileBrowserOptions: """File browser options.""" def __init__(self) -> None: ... @property def dirList(self) -> DirListOptions: """How the directory is listed: the sort order, sequences and hidden files. """ @dirList.setter def dirList(self, arg: DirListOptions, /) -> None: ... @property def panel(self) -> bool: """Whether the side panel is shown, with the drives, shortcuts, recent directories and settings. """ @panel.setter def panel(self, arg: bool, /) -> None: ... @property def pathEditable(self) -> bool: """Whether the path is shown as text to edit rather than as a button for each directory. """ @pathEditable.setter def pathEditable(self, arg: bool, /) -> None: ... @property def bellows(self) -> dict[str, bool]: """Which sections of the side panel are open, by name.""" @bellows.setter def bellows(self, arg: Mapping[str, bool], /) -> None: ... def __eq__(self, arg: FileBrowserOptions, /) -> bool: ... def __ne__(self, arg: FileBrowserOptions, /) -> bool: ... class FileBrowserOptionsObserver: """Value observer.""" def __init__(self, observable: IObservableFileBrowserOptions, callback: Callable[[FileBrowserOptions], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableFileBrowserOptions: """Base class for observable values.""" def get(self) -> FileBrowserOptions: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableFileBrowserOptions(IObservableFileBrowserOptions): """Observable value.""" def __init__(self, arg: FileBrowserOptions, /) -> None: ... def setAlways(self, arg: FileBrowserOptions, /) -> None: """Set the value.""" def setIfChanged(self, arg: FileBrowserOptions, /) -> bool: """Set the value only if it has changed.""" def get(self) -> FileBrowserOptions: """Get the value.""" class FileBrowserExtGroup: """A group of file extensions offered as one choice, e.g. "Images".""" @overload def __init__(self) -> None: ... @overload def __init__(self, label: str, exts: Sequence[str]) -> None: ... @property def label(self) -> str: """The name the group is offered under, e.g. "Images".""" @label.setter def label(self, arg: str, /) -> None: ... @property def exts(self) -> list[str]: """The extensions in the group, e.g. ".png".""" @exts.setter def exts(self, arg: Sequence[str], /) -> None: ... def __eq__(self, arg: FileBrowserExtGroup, /) -> bool: ... def __ne__(self, arg: FileBrowserExtGroup, /) -> bool: ... class FileBrowserExtGroupListObserver: """List observer.""" def __init__(self, observableList: IObservableFileBrowserExtGroupList, callback: Callable[[Sequence[FileBrowserExtGroup]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableFileBrowserExtGroupList: """Base class for observable lists.""" pass class ObservableFileBrowserExtGroupList(IObservableFileBrowserExtGroupList): """Observable list.""" def __init__(self, arg: Sequence[FileBrowserExtGroup], /) -> None: ... def setAlways(self, arg: Sequence[FileBrowserExtGroup], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[FileBrowserExtGroup], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: FileBrowserExtGroup) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: FileBrowserExtGroup) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: FileBrowserExtGroup, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[FileBrowserExtGroup], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: FileBrowserExtGroup) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[FileBrowserExtGroup]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[FileBrowserExtGroup]) -> None: """Replace a range of items.""" def get(self) -> list[FileBrowserExtGroup]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> FileBrowserExtGroup: """Get a list item.""" def contains(self, arg: FileBrowserExtGroup, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: FileBrowserExtGroup, /) -> int: """Get the index of the given item.""" class FileBrowserModel: """File browser model: the current path and its history, the options and the extensions. """ def __init__(self, context: Context) -> None: """Create a new model.""" @property def path(self) -> pathlib.Path: """Get the current path.""" @path.setter def path(self, arg: str | os.PathLike, /) -> None: ... @property def observePath(self) -> IObservableFileSystemPath: """Observe the current path.""" def forward(self) -> None: """Go forward to the next path.""" @property def observeHasForward(self) -> IObservableBool: """Observe whether there is a next path.""" def back(self) -> None: """Go back to the previous path.""" @property def observeHasBack(self) -> IObservableBool: """Observe whether there is a previous path.""" @property def options(self) -> FileBrowserOptions: """Get the options.""" @options.setter def options(self, arg: FileBrowserOptions, /) -> None: ... @property def observeOptions(self) -> IObservableFileBrowserOptions: """Observe the options.""" @property def exts(self) -> list[str]: """Get the extensions.""" @exts.setter def exts(self, arg: Sequence[str], /) -> None: ... @property def observeExts(self) -> IObservableStringList: """Observe the extensions.""" @property def ext(self) -> str: """Get the current extension.""" @ext.setter def ext(self, arg: str, /) -> None: ... @property def observeExt(self) -> IObservableString: """Observe the current extension.""" @property def extGroups(self) -> list[FileBrowserExtGroup]: """Get the extension groups.""" @extGroups.setter def extGroups(self, arg: Sequence[FileBrowserExtGroup], /) -> None: ... @property def observeExtGroups(self) -> IObservableFileBrowserExtGroupList: """Observe the extension groups.""" @property def extGroup(self) -> str: """Get the current extension group, by label; empty for none.""" @extGroup.setter def extGroup(self, arg: str, /) -> None: ... @property def observeExtGroup(self) -> IObservableString: """Observe the current extension group.""" class FileBrowserSystem(ISystem): """File browser system.""" def __init__(self, context: Context) -> None: """Create a new system.""" def open(self, window: IWindow, callback: Callable[[Path], None], options: FileBrowserOpenOptions = ...) -> None: """Open the file browser. Open the file browser for more than one file. Set FileBrowserOpenOptions::multiple for the choosing to allow it; without that this reports the one file chosen. """ def openMultiple(self, window: IWindow, callback: Callable[[Sequence[Path]], None], options: FileBrowserOpenOptions = ...) -> None: ... @property def nativeFileDialog(self) -> bool: """Get whether the native file dialog is used.""" @nativeFileDialog.setter def nativeFileDialog(self, arg: bool, /) -> None: ... @property def model(self) -> FileBrowserModel: """Get the file browser model.""" @property def recentDirsModel(self) -> RecentFilesModel: """Get the recent directories model. What the browser's recent list shows. The directory of every choice made in the browser is added to it, whatever the choice was for -- a LUT's as well as a movie's -- and it is a list of its own, apart from an application's recent files, so those choices do not join them. An application that opens files some other way, from the command line or by drag and drop, adds their directories here itself if the browser is to offer them. """ @recentDirsModel.setter def recentDirsModel(self, arg: RecentFilesModel, /) -> None: ... def to_json(arg: FileBrowserOptions, /) -> str: """Serialize a path. The frames a path covers are its own state rather than part of its name, so a path written as its name alone comes back naming one file. This writes them beside it, as data: a sequence has a run for each hole in it, with a step as well as a range, and a name made to carry all of that would have to be parsed back out again. A path whose name already says what it covers -- a single file, or one frame -- is written as that name, so the ordinary case reads and writes as it always did. """ def from_json(arg0: str, arg1: FileBrowserOptions, /) -> None: """Convert from JSON, given as a string, into the given value.""" class FileBrowserPath(IContainer): """File browser path widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def path(self) -> pathlib.Path: """Get the path.""" @path.setter def path(self, arg: str | os.PathLike, /) -> None: ... def setCallback(self, arg: Callable[[str | os.PathLike], None], /) -> None: """Set the callback.""" @property def editable(self) -> bool: """Get whether the path is ediable.""" @editable.setter def editable(self, arg: bool, /) -> None: ... def setEditableCallback(self, arg: Callable[[bool], None], /) -> None: """Set the editable callback.""" class FileBrowserDrives(IContainer): """File browser drives widget.""" def __init__(self, context: Context, model: FileBrowserModel, parent: IWidget | None = None) -> None: """Create a new widget.""" class FileBrowserShortcuts(IContainer): """File browser shortcuts widget.""" def __init__(self, context: Context, model: FileBrowserModel, parent: IWidget | None = None) -> None: """Create a new widget.""" class FileBrowserRecent(IContainer): """File browser recent paths widget.""" def __init__(self, context: Context, model: FileBrowserModel, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def recentFilesModel(self) -> RecentFilesModel: """Get the recent files model.""" @recentFilesModel.setter def recentFilesModel(self, arg: RecentFilesModel, /) -> None: ... class FileBrowserSettings(IContainer): """File browser settings widget.""" def __init__(self, context: Context, model: FileBrowserModel, parent: IWidget | None = None) -> None: """Create a new widget.""" class FileBrowserView(IWidget): """File browser view widget.""" def __init__(self, context: Context, mode: FileBrowserMode, model: FileBrowserModel, parent: IWidget | None = None) -> None: """Create a new widget.""" def reload(self) -> None: """Reload the directory.""" def setCallback(self, arg: Callable[[Sequence[Path]], None], /) -> None: """Set the callback. Carries everything selected, so that opening one of several chosen files opens the ones chosen. """ def hasPaths(self) -> bool: """Get whether a list of files is shown in place of a directory.""" def getPaths(self) -> list[Path]: """Get the list of files shown in place of a directory.""" def setPaths(self, paths: Sequence[Path]) -> None: """Show a list of files in place of the model's directory: recent files, say. They are shown in the order given, each with the directory it is in, and the search filter matches against the whole path. The extensions chosen in the model do not apply. A directory in the list, which is a path ending in a separator, is given to the callback like a file. The file system is not asked about the files, so their sizes are not shown. """ def clearPaths(self) -> None: """Go back to showing the model's directory.""" def setCurrent(self, index: int) -> None: """Set the current item, which selects it: for moving into the list from a search box, say. """ def setSelectCallback(self, arg: Callable[[Sequence[Path]], None], /) -> None: """Set the selection callback. More than one path only when selecting more than one is allowed; empty when nothing is selected. """ @property def multiple(self) -> bool: """Get whether more than one file can be selected.""" @multiple.setter def multiple(self, arg: bool, /) -> None: ... @property def selection(self) -> list[Path]: """Get the selection.""" @property def search(self) -> str: """Get the search filter.""" @search.setter def search(self, arg: str, /) -> None: ... @property def observeCurrent(self) -> IObservableInt: """Observe the current item.""" def getRect(self, arg: int, /) -> Box2I: """Get the rectangle of an item.""" class FileEdit(IContainer): """File edit widget.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, mode: FileBrowserMode, parent: IWidget | None = None) -> None: ... @property def path(self) -> str: """Get the path.""" @path.setter def path(self, arg: str, /) -> None: ... def setCallback(self, arg: Callable[[Path], None], /) -> None: """Set the callback.""" class FloatModel: """Floating point value model.""" def __init__(self) -> None: """Create a new model.""" @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setValueSoft(self, arg: float, /) -> None: """Set the value, extending a soft range to admit it. This is for values the user typed; interactive changes such as dragging use setValue(), which always clamps, so they cannot run the range away. """ def observeValue(self) -> IObservableFloat: """Observe the value.""" @property def range(self) -> RangeF: """Get the range the value is kept within. The default is 0 to 1.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def observeRange(self) -> IObservableRangeF: """Observe the range.""" @property def rangeSoft(self) -> bool: """Get whether the range is soft. A value given to setValueSoft() beyond a soft range extends the range instead of being clamped. """ @rangeSoft.setter def rangeSoft(self, arg: bool, /) -> None: ... @property def step(self) -> float: """Get the step, the amount a step increments or decrements the value by. The default is 0.1. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step, the amount a large step increments or decrements the value by. The default is 1. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... def stepInc(self) -> None: """Increment the value by a step.""" def stepDec(self) -> None: """Decrement the value by a step.""" def largeStepInc(self) -> None: """Increment the value by a large step.""" def largeStepDec(self) -> None: """Decrement the value by a large step.""" @property def hasDefault(self) -> bool: """Get whether there is a default value.""" def observeHasDefault(self) -> IObservableBool: """Observe whether there is a default value.""" @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def observeDefault(self) -> IObservableFloat: """Observe the default value.""" def setDefault(self) -> None: """Set the default value. Set the value to the default value. """ def clearDefault(self) -> None: """Clear the default value.""" class FloatEdit(IContainer): """Floating point value editor.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: FloatModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from setValue() and from other widgets that share the model. Typed text is applied when Enter is pressed or the key focus is lost. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the up and down arrow keys, the increment buttons, and the scroll wheel change the value by. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> FloatModel: """Get the model.""" @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font, the monospace font by default.""" @font.setter def font(self, arg: FontType, /) -> None: ... class FloatEditSlider(IContainer): """Floating point value editor and slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: FloatModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the arrow keys, the increment buttons, and the scroll wheel change the value by. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> FloatModel: """Get the model.""" def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class FloatEditShuttle(IContainer): """Floating point value editor and shuttle.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: FloatModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every notch while the shuttle is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the shuttle is pressed. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the up and down arrow keys, the increment buttons, the scroll wheel, and each notch of the shuttle change the value by. With Control held the shuttle moves by a tenth of it. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel or the shuttle with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> FloatModel: """Get the model.""" @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class IFloatSlider(IMouseWidget): """Base class for floating point sliders.""" @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> float: """Get the step: how much the arrow keys and the scroll wheel change the value by. """ @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def defaultValue(self) -> float: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: float, /) -> None: ... def getModel(self) -> FloatModel: """Get the model.""" class FloatSlider(IFloatSlider): """Floating point slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: FloatModel, parent: IWidget | None = None) -> None: ... class FlowLayout(IWidget): """Flow layout. Children are placed left to right and wrap onto a new line when the next one will not fit. Use this where a horizontal layout would be right if only it always had the room -- a legend, a row of tags, a toolbar in a panel the user can make narrow. The height depends on the width, which the size hint has no way to ask about, so the layout reports the tallest single child until it has been given a geometry, then reports what that width actually needed. Laying one out therefore settles over two passes rather than one. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def spacingRole(self) -> SizeRole: """Get the spacing role.""" @spacingRole.setter def spacingRole(self, arg: SizeRole, /) -> None: ... class FormGroup: """A group of form layouts whose labels share one column width, so that forms in separate sections of a panel line up as one would. The width is that of the widest visible label in any of the forms, and is known when the first of them is sized: a form asks the group, which measures the labels of all of them. A form whose section is closed still counts, so opening a section does not move the others. """ def __init__(self) -> None: """Create a new group.""" def setFormGroup(widget: IWidget, group: FormGroup | None) -> None: """Put every form layout among a widget and its descendants into a group: for a panel assembled from widgets that each hold a form of their own. Forms added to them afterwards are not included. """ class FormLayout(IContainer): """Form layout.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" def addRow(self, text: str, widget: IWidget) -> int: """Add a row.""" @overload def removeRow(self, arg: int, /) -> None: """Remove a row.""" @overload def removeRow(self, arg: IWidget, /) -> None: """Remove a row.""" def clear(self) -> None: """Clear all of the rows.""" @overload def setRowVisible(self, arg0: int, arg1: bool, /) -> None: """Set row visibility.""" @overload def setRowVisible(self, arg0: IWidget, arg1: bool, /) -> None: """Set row visibility.""" @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def spacingRole(self) -> SizeRole: """Get the spacing role.""" @spacingRole.setter def spacingRole(self, arg: SizeRole, /) -> None: ... @overload def addSpacer(self) -> int: """Add a spacer.""" @overload def addSpacer(self, arg: SizeRole, /) -> int: """Add a spacer.""" @property def group(self) -> FormGroup: """Get the group the layout's labels share their width with.""" @group.setter def group(self, value: FormGroup | None) -> None: ... class GraphLabel: """One line on a graph: its color, the format string for its readout, and how the sample is turned into the number that format expects. """ def __init__(self) -> None: ... @property def colorRole(self) -> ColorRole: """The color role the line is drawn in. It also names the line to setSamples() and addSample(). """ @colorRole.setter def colorRole(self, arg: ColorRole, /) -> None: ... @property def text(self) -> str: """The format string for the line's readout, with {0} for the latest sample. """ @text.setter def text(self, arg: str, /) -> None: ... @property def format(self) -> DiagFormat: """How the sample is turned into the number the readout shows.""" @format.setter def format(self, arg: DiagFormat, /) -> None: ... class GraphWidget(IContainer): """Graph widget.""" def __init__(self, context: Context, title: str, labels: Sequence[GraphLabel], parent: IWidget | None = None) -> None: """Create a new widget.""" def setSamples(self, arg0: ColorRole, arg1: Sequence[int], /) -> None: """Set the samples.""" def addSample(self, arg0: ColorRole, arg1: int, /) -> None: """Add a sample.""" class GridLayout(IWidget): """Grid layout.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" def getGridPos(self, arg: IWidget, /) -> tuple[int, int]: """Get the grid position of the given child.""" def getGridRow(self, arg: IWidget, /) -> int: """Get the grid row of the given child.""" def getGridColumn(self, arg: IWidget, /) -> int: """Get the grid column of the given child.""" def setGridPos(self, child: IWidget, row: int, column: int) -> None: """Set a child position within the grid.""" @property def rowBackgroundRole(self) -> ColorRole: """Get the odd rows background role. Get the background role of one row. """ @rowBackgroundRole.setter def rowBackgroundRole(self, arg: ColorRole, /) -> None: ... def getRowBackgroundRole(self, row: int) -> ColorRole: """Get the odd rows background role. Get the background role of one row. """ def setRowBackgroundRole(self, row: int, role: ColorRole) -> None: """Get the odd rows background role. Set a background role for one row, drawn across the width of the layout, margins included, in place of the alternating background: for a row that is a heading over the rows below it. None, the default, leaves the row as the others are. """ @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def spacingRole(self) -> SizeRole: """Get the spacing role.""" @spacingRole.setter def spacingRole(self, arg: SizeRole, /) -> None: ... def setSpacingRole(self, arg0: SizeRole, arg1: SizeRole, /) -> None: """Set the spacing role. Set the spacing role for each direction. The horizontal spacing is between columns and the vertical spacing is between rows. """ def clear(self) -> None: """Remove the children, and the background roles set for single rows. """ class GroupBox(IWidget): """Group box.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... def clear(self) -> None: """Remove all children from the group box.""" class Icon(IWidget): """Icon widget.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, icon: str, parent: IWidget | None = None) -> None: ... @property def icon(self) -> str: """Get the icon.""" @icon.setter def icon(self, arg: str, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... class IconSystem(ISystem): """Icon system.""" def __init__(self, context: Context) -> None: """Create a new system.""" @property def names(self) -> list[str]: """Get the icon names.""" def add(self, name: str, svg: Sequence[int]) -> None: """Add an icon. The icon is stored as an SVG file.""" def get(self, name: str, displayScale: float) -> Image: """Get an icon.""" class ImageWidget(IWidget): """Image widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def image(self) -> Image: """Get the image.""" @image.setter def image(self, arg: Image, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... class IncButton(IButton): """Button for incrementing a value.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" class IncButtons(IWidget): """Buttons for incrementing and decrementing a value.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" def setIncCallback(self, arg: Callable[[], None], /) -> None: """Set the increment callback.""" def setDecCallback(self, arg: Callable[[], None], /) -> None: """Set the decrement callback.""" class IntModel: """Integer value model.""" def __init__(self) -> None: """Create a new model.""" @property def value(self) -> int: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: int, /) -> None: ... def setValueSoft(self, arg: int, /) -> None: """Set the value, extending a soft range to admit it. This is for values the user typed; interactive changes such as dragging use setValue(), which always clamps, so they cannot run the range away. """ def observeValue(self) -> IObservableInt: """Observe the value.""" @property def range(self) -> RangeI: """Get the range the value is kept within. The default is 0 to 100.""" @range.setter def range(self, arg: RangeI, /) -> None: ... def observeRange(self) -> IObservableRangeI: """Observe the range.""" @property def rangeSoft(self) -> bool: """Get whether the range is soft. A value given to setValueSoft() beyond a soft range extends the range instead of being clamped. """ @rangeSoft.setter def rangeSoft(self, arg: bool, /) -> None: ... @property def step(self) -> int: """Get the step, the amount a step increments or decrements the value by. The default is 1. """ @step.setter def step(self, arg: int, /) -> None: ... @property def largeStep(self) -> int: """Get the large step, the amount a large step increments or decrements the value by. The default is 10. """ @largeStep.setter def largeStep(self, arg: int, /) -> None: ... def stepInc(self) -> None: """Increment the value by a step.""" def stepDec(self) -> None: """Decrement the value by a step.""" def largeStepInc(self) -> None: """Increment the value by a large step.""" def largeStepDec(self) -> None: """Decrement the value by a large step.""" @property def hasDefault(self) -> bool: """Get whether there is a default value.""" def observeHasDefault(self) -> IObservableBool: """Observe whether there is a default value.""" @property def defaultValue(self) -> int: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: int, /) -> None: ... def observeDefault(self) -> IObservableInt: """Observe the default value.""" def setDefault(self) -> None: """Set the default value. Set the value to the default value. """ def clearDefault(self) -> None: """Clear the default value.""" class IntEdit(IContainer): """Integer value editor.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: IntModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> int: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback, called with the value whenever it changes, including from setValue() and from other widgets that share the model. Typed text is applied when Enter is pressed or the key focus is lost. """ @property def range(self) -> RangeI: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeI, /) -> None: ... def setRange(self, arg0: int, arg1: int, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> int: """Get the step: how much the up and down arrow keys, the increment buttons, and the scroll wheel change the value by. """ @step.setter def step(self, arg: int, /) -> None: ... @property def largeStep(self) -> int: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: int, /) -> None: ... @property def defaultValue(self) -> int: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: int, /) -> None: ... def getModel(self) -> IntModel: """Get the model.""" @property def font(self) -> FontType: """Get the font, the monospace font by default.""" @font.setter def font(self, arg: FontType, /) -> None: ... class IntEditSlider(IContainer): """Integer value editor and slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: IntModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> int: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ @property def range(self) -> RangeI: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeI, /) -> None: ... def setRange(self, arg0: int, arg1: int, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> int: """Get the step: how much the arrow keys, the increment buttons, and the scroll wheel change the value by. """ @step.setter def step(self, arg: int, /) -> None: ... @property def largeStep(self) -> int: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: int, /) -> None: ... @property def defaultValue(self) -> int: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: int, /) -> None: ... def getModel(self) -> IntModel: """Get the model.""" def setPressedCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class IntEditShuttle(IContainer): """Integer value editor and shuttle.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: IntModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> int: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every notch while the shuttle is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the value callback with a flag for whether the shuttle is pressed. """ @property def range(self) -> RangeI: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeI, /) -> None: ... def setRange(self, arg0: int, arg1: int, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> int: """Get the step: how much the up and down arrow keys, the increment buttons, the scroll wheel, and each notch of the shuttle change the value by. With Control held the shuttle moves by a tenth of it, but at least one. """ @step.setter def step(self, arg: int, /) -> None: ... @property def largeStep(self) -> int: """Get the large step: how much Page Up and Page Down, and the scroll wheel or the shuttle with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: int, /) -> None: ... @property def defaultValue(self) -> int: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: int, /) -> None: ... def getModel(self) -> IntModel: """Get the model.""" @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class IIntSlider(IMouseWidget): """Base class for integer sliders.""" @property def value(self) -> int: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback, called with the value whenever it changes, including on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeI: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeI, /) -> None: ... def setRange(self, arg0: int, arg1: int, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ @property def step(self) -> int: """Get the step: how much the arrow keys and the scroll wheel change the value by. """ @step.setter def step(self, arg: int, /) -> None: ... @property def largeStep(self) -> int: """Get the large step: how much Page Up and Page Down, and the scroll wheel with Shift held, change the value by. """ @largeStep.setter def largeStep(self, arg: int, /) -> None: ... @property def defaultValue(self) -> int: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: int, /) -> None: ... def getModel(self) -> IntModel: """Get the model.""" class IntSlider(IIntSlider): """Integer slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: IntModel, parent: IWidget | None = None) -> None: ... class ColorIntSlider(IIntSlider): """Color integer slider.""" def __init__(self, context: Context, model: IntModel, parent: IWidget | None = None) -> None: """Create a new widget.""" def setColors(self, arg: Sequence[V4F], /) -> None: """Set the colors.""" class ColorIntEditSlider(IContainer): """Color integer editor and slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: IntModel, parent: IWidget | None = None) -> None: ... def getModel(self) -> IntModel: """Get the model.""" def setColors(self, arg: Sequence[V4F], /) -> None: """Set the colors.""" @property def value(self) -> int: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeI: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeI, /) -> None: ... def setRange(self, arg0: int, arg1: int, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ class ColorFloatSlider(IFloatSlider): """Color floating point slider.""" def __init__(self, context: Context, model: FloatModel, parent: IWidget | None = None) -> None: """Create a new widget.""" def setColors(self, arg: Sequence[V4F], /) -> None: """Set the colors.""" class ColorFloatEditSlider(IContainer): """Color floating point editor and slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: FloatModel, parent: IWidget | None = None) -> None: ... def getModel(self) -> FloatModel: """Get the model.""" def setColors(self, arg: Sequence[V4F], /) -> None: """Set the colors.""" @property def value(self) -> float: """Get the value, which is kept within the range.""" @value.setter def value(self, arg: float, /) -> None: ... def setCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edit, on every move while the slider is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[float, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ class Label(IWidget): """Text label.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... @property def textRole(self) -> ColorRole: """Get the text color role.""" @textRole.setter def textRole(self, arg: ColorRole, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role. If the horizontal and vertical margin roles are different the horizontal role is returned. """ @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def hMarginRole(self) -> SizeRole: """Get the horizontal margin role.""" @hMarginRole.setter def hMarginRole(self, arg: SizeRole, /) -> None: ... @property def vMarginRole(self) -> SizeRole: """Get the vertical margin role.""" @vMarginRole.setter def vMarginRole(self, arg: SizeRole, /) -> None: ... def setMarginRole(self, arg0: SizeRole, arg1: SizeRole, /) -> None: """Set the margin role. Set the margin roles. """ @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... @property def fontSize(self) -> int: """Get the font size.""" @fontSize.setter def fontSize(self, arg: int, /) -> None: ... @property def textAlign(self) -> HAlign: """Get the alignment of the text within the label.""" @textAlign.setter def textAlign(self, arg: HAlign, /) -> None: ... @property def wrap(self) -> int: """Get the width the text is wrapped to, in characters.""" @wrap.setter def wrap(self, arg: int, /) -> None: ... @property def wrapToFit(self) -> bool: """Get whether the text is wrapped to the width the label is given.""" @wrapToFit.setter def wrapToFit(self, arg: bool, /) -> None: ... @property def elide(self) -> bool: """Get whether the text is elided to fit the width.""" @property def elideMode(self) -> ElideMode: """Get which end of elided text is kept.""" def setElide(self, elide: bool, mode: ElideMode = ElideMode.Right) -> None: """Set whether the text is elided to fit the width the label is given, and which end of it to keep. The size hint is then only as wide as the ellipsis, so a long text does not widen whatever holds the label; give the label an expanding stretch for it to use the room there is. Turning it on sets the horizontal alignment to fill, since a left aligned widget is laid out at its size hint, and turning it off sets it back to left. The text is measured in its font rather than counted in characters, and a character is never split. """ class LevelsModel: """Color levels model.""" def __init__(self) -> None: """Create a new model.""" @property def value(self) -> RangeF: """Get the value, the minimum and maximum levels, which are kept within the range. The default is 0 to 1. """ @value.setter def value(self, arg: RangeF, /) -> None: ... def observeValue(self) -> IObservableRangeF: """Observe the value.""" @property def range(self) -> RangeF: """Get the range the value is kept within. The default is 0 to 1.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def observeRange(self) -> IObservableRangeF: """Observe the range.""" @property def step(self) -> float: """Get the step. The default is 0.1.""" @step.setter def step(self, arg: float, /) -> None: ... @property def largeStep(self) -> float: """Get the large step. The default is 1.""" @largeStep.setter def largeStep(self, arg: float, /) -> None: ... @property def hasDefault(self) -> bool: """Get whether there is a default value.""" def observeHasDefault(self) -> IObservableBool: """Observe whether there is a default value.""" @property def defaultValue(self) -> RangeF: """Get the default value.""" @defaultValue.setter def defaultValue(self, arg: RangeF, /) -> None: ... def observeDefault(self) -> IObservableRangeF: """Observe the default value.""" def setDefault(self) -> None: """Set the default value. Set the value to the default value. """ def clearDefault(self) -> None: """Clear the default value.""" class LevelsSlider(IMouseWidget): """Color levels slider.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: LevelsModel, parent: IWidget | None = None) -> None: ... @property def value(self) -> RangeF: """Get the value, the minimum and maximum levels, which are kept within the range. Dragging one handle past the other moves the other with it. """ @value.setter def value(self, arg: RangeF, /) -> None: ... def setCallback(self, arg: Callable[[RangeF], None], /) -> None: """Set the callback, called with the value whenever it changes, including on every move while a handle is dragged, from setValue(), and from other widgets that share the model. """ def setPressedCallback(self, arg: Callable[[RangeF, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ def getModel(self) -> LevelsModel: """Get the model.""" class LevelsEditSlider(IContainer): """Color levels editors and slider.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def value(self) -> RangeF: """Get the value, the minimum and maximum levels, which are kept within the range. Dragging or typing one past the other moves the other with it. """ @value.setter def value(self, arg: RangeF, /) -> None: ... def setCallback(self, arg: Callable[[RangeF], None], /) -> None: """Set the callback, called with the value whenever it changes, including from the edits, on every move while a handle is dragged, and from setValue(). """ def setPressedCallback(self, arg: Callable[[RangeF, bool], None], /) -> None: """Set the value callback with a flag for whether the slider is pressed. """ @property def range(self) -> RangeF: """Get the range the value is kept within.""" @range.setter def range(self, arg: RangeF, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range. The value is clamped to the new range. Set the range from its minimum and maximum. """ def getModel(self) -> LevelsModel: """Get the model.""" @property def precision(self) -> int: """Get the display precision.""" @precision.setter def precision(self, arg: int, /) -> None: ... @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... class LineEditSelection: """Line edit selection.""" @overload def __init__(self) -> None: ... @overload def __init__(self, pos: int) -> None: ... @overload def __init__(self, first: int, second: int) -> None: ... @property def first(self) -> int: """The end the selection started from, as a byte offset into the text, or -1 for none. """ @first.setter def first(self, arg: int, /) -> None: ... @property def second(self) -> int: """The end the selection extends to, as a byte offset into the text, or -1 for none. """ @second.setter def second(self, arg: int, /) -> None: ... def isValid(self) -> bool: """Get whether the selection is valid.""" def min(self) -> int: """Get the minimum.""" def max(self) -> int: """Get the maximum.""" def __eq__(self, arg: LineEditSelection, /) -> bool: ... def __ne__(self, arg: LineEditSelection, /) -> bool: ... class LineEditSelectionObserver: """Value observer.""" def __init__(self, observable: IObservableLineEditSelection, callback: Callable[[LineEditSelection], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableLineEditSelection: """Base class for observable values.""" def get(self) -> LineEditSelection: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableLineEditSelection(IObservableLineEditSelection): """Observable value.""" def __init__(self, arg: LineEditSelection, /) -> None: ... def setAlways(self, arg: LineEditSelection, /) -> None: """Set the value.""" def setIfChanged(self, arg: LineEditSelection, /) -> bool: """Set the value only if it has changed.""" def get(self) -> LineEditSelection: """Get the value.""" class LineEditModel: """Line edit model.""" def __init__(self, context: Context, text: str = '') -> None: ... @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... def observeText(self) -> IObservableString: """Observe the text.""" def clearText(self) -> None: """Clear the text. Like setting the text, this also clears the undo history. """ @property def readOnly(self) -> bool: """Get whether the text is read only. Read only text can still be selected and copied, but not edited. """ @readOnly.setter def readOnly(self, arg: bool, /) -> None: ... def observeReadOnly(self) -> IObservableBool: """Observe whether the text is read only.""" @property def cursor(self) -> int: """Get the cursor position, as a byte offset into the text.""" @cursor.setter def cursor(self, arg: int, /) -> None: ... def observeCursor(self) -> IObservableInt: """Observe the cursor position.""" @property def selection(self) -> LineEditSelection: """Get the selection.""" @selection.setter def selection(self, arg: LineEditSelection, /) -> None: ... def observeSelection(self) -> IObservableLineEditSelection: """Observe the selection.""" def selectAll(self) -> None: """Select all of the text.""" def clearSelection(self) -> None: """Clear the selection.""" def undo(self) -> None: """Undo the last edit. Nothing is done while the text is read only.""" def redo(self) -> None: """Redo the last edit that was undone. Nothing is done while the text is read only. """ def cut(self) -> None: """Copy the selection to the clipboard and remove it. Nothing is done while the text is read only. """ def copy(self) -> None: """Copy the selection to the clipboard.""" def paste(self) -> None: """Paste the clipboard's text over the selection, or at the cursor. Text that does not match the regular expression is not pasted, and nothing is done while the text is read only. """ def input(self, text: str) -> None: """Handle text input.""" def key(self, key: Key, modifiers: int = 0) -> bool: """Handle key input.""" @property def regex(self) -> str: """Get the regular expression for allowable input.""" @regex.setter def regex(self, arg: str, /) -> None: ... class LineEdit(IWidget): """Text line edit. Double click to select text. """ @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: LineEditModel, parent: IWidget | None = None) -> None: ... def getModel(self) -> LineEditModel: """Get the model.""" @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... def clearText(self) -> None: """Clear the text.""" def setCallback(self, arg: Callable[[str], None], /) -> None: """Set the callback. The callback is triggered when the enter key is clicked and optionally when key focus is lost. """ @property def hasCallbackOnFocusLost(self) -> bool: """Get whether the callback is triggered when focus is lost.""" def setCallbackOnFocusLost(self, arg: bool, /) -> None: """Set whether the callback is triggered when focus is lost.""" def setTextChangedCallback(self, arg: Callable[[str], None], /) -> None: """Set the text changed callback. This callback is triggered whenever the text is changed. """ @property def format(self) -> str: """Get the formatting text.""" @format.setter def format(self, arg: str, /) -> None: ... def setFocusCallback(self, arg: Callable[[bool], None], /) -> None: """Set the focus callback.""" @property def readOnly(self) -> bool: """Get whether the text is read only. Read only text can still be selected and copied. """ @readOnly.setter def readOnly(self, arg: bool, /) -> None: ... @property def selectAllOnFocus(self) -> bool: """Get whether all of the text is selected when key focus is gained.""" @selectAllOnFocus.setter def selectAllOnFocus(self, arg: bool, /) -> None: ... @property def preedit(self) -> str: """Get the in-progress input method composition. Empty except while text is being composed. """ def selectAll(self) -> None: """Select all of the text.""" def clearSelection(self) -> None: """Clear the selection.""" @property def font(self) -> FontType: """Get the font.""" @font.setter def font(self, arg: FontType, /) -> None: ... @property def borderRole(self) -> ColorRole: """Get the border color role. The key focus color is drawn in its place while the edit has the key focus. """ @borderRole.setter def borderRole(self, arg: ColorRole, /) -> None: ... @property def rightInset(self) -> int: """Get the room kept clear at the right of the text.""" @rightInset.setter def rightInset(self, arg: int, /) -> None: ... class ListItem: """List item.""" @overload def __init__(self) -> None: ... @overload def __init__(self, text: str, tooltip: str = '') -> None: ... @property def text(self) -> str: """The text shown for the item.""" @text.setter def text(self, arg: str, /) -> None: ... @property def tooltip(self) -> str: """The item's tooltip, or empty for none.""" @tooltip.setter def tooltip(self, arg: str, /) -> None: ... def __eq__(self, arg: ListItem, /) -> bool: ... def __ne__(self, arg: ListItem, /) -> bool: ... class ListItemsWidget(IContainer): """List items widget.""" def __init__(self, context: Context, type: ButtonGroupType, parent: IWidget | None = None) -> None: """Create a new widget.""" def getItems(self) -> list[ListItem]: """Get the items.""" @overload def setItems(self, arg: Sequence[ListItem], /) -> None: """Set the items.""" @overload def setItems(self, arg: Sequence[str], /) -> None: """Set the items.""" def getChecked(self, index: int) -> bool: """Get whether an item is checked.""" def setChecked(self, index: int, checked: bool) -> None: """Set whether an item is checked.""" def setCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the callback.""" @property def current(self) -> int: """Get the current item.""" @current.setter def current(self, arg: int, /) -> None: ... def observeCurrent(self) -> IObservableInt: """Observe the current item.""" def observeScrollTo(self) -> IObservableInt: """Observe the item to scroll to.""" @property def search(self) -> str: """Get the search.""" @search.setter def search(self, arg: str, /) -> None: ... def clearSearch(self) -> None: """Clear the search.""" def getRect(self, index: int) -> Box2I: """Get an item rectangle.""" class ListWidget(IContainer): """List widget.""" def __init__(self, context: Context, type: ButtonGroupType, parent: IWidget | None = None) -> None: """Create a new widget.""" def getItems(self) -> list[ListItem]: """Get the items.""" @overload def setItems(self, arg: Sequence[ListItem], /) -> None: """Set the items.""" @overload def setItems(self, arg: Sequence[str], /) -> None: """Set the items.""" def getChecked(self, index: int) -> bool: """Get whether an item is checked.""" def setChecked(self, index: int, checked: bool = True) -> None: """Set the checked item.""" def setCallback(self, arg: Callable[[int, bool], None], /) -> None: """Set the callback.""" @property def current(self) -> int: """Get the current item.""" @current.setter def current(self, arg: int, /) -> None: ... @property def search(self) -> str: """Get the search.""" @search.setter def search(self, arg: str, /) -> None: ... def clearSearch(self) -> None: """Clear the search.""" class MainWindow(Window): """Main window.""" def __init__(self, context: Context, app: App, size: Size2I = ...) -> None: ... @property def menuBar(self) -> MenuBar: """Get the menu bar.""" @menuBar.setter def menuBar(self, value: MenuBar | None) -> None: ... @property def widget(self) -> IWidget: """Get the central widget.""" @widget.setter def widget(self, value: IWidget | None) -> None: ... class MDICanvas(IWidget): """MDI canvas. Add support for maximizing MDI widgets. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new canvas.""" @property def canvasSize(self) -> Size2I: """Get the canvas size.""" @canvasSize.setter def canvasSize(self, arg: Size2I, /) -> None: ... @property def gridSize(self) -> Size2I: """Get the grid size.""" @gridSize.setter def gridSize(self, arg: Size2I, /) -> None: ... def addWidget(self, arg0: str, arg1: V2I, arg2: IWidget, /) -> MDIWidget: """Add a widget to the canvas.""" def setChildGeometryCallback(self, arg: Callable[[Sequence[Box2I]], None], /) -> None: """Set the child geometry callback.""" class MDIMiniMap(IWidget): """MDI mini-map widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" def setScrollInfo(self, arg: ScrollInfo, /) -> None: """Set the scroll information.""" def setCallback(self, arg: Callable[[V2I], None], /) -> None: """Set the callback.""" def setChildGeometry(self, arg: Sequence[Box2I], /) -> None: """Set the child geometry.""" @property def childColorRole(self) -> ColorRole: """Get the child geometry color role.""" @childColorRole.setter def childColorRole(self, arg: ColorRole, /) -> None: ... class MDIResize(enum.Enum): """MDI resize directions.""" North = 1 NorthEast = 2 East = 3 SouthEast = 4 South = 5 SouthWest = 6 West = 7 NorthWest = 8 def getMDIResizeEnums() -> list[MDIResize]: """Get every value of MDIResize.""" class MDIWidget(IWidget): """MDI widget.""" def __init__(self, context: Context, title: str, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def title(self) -> str: """Get the title.""" @title.setter def title(self, arg: str, /) -> None: ... @property def widget(self) -> IWidget: """Get the widget.""" @widget.setter def widget(self, arg: IWidget, /) -> None: ... def setPressCallback(self, arg: Callable[[bool], None], /) -> None: """Set the press callback.""" def setMoveCallback(self, arg: Callable[[V2I], None], /) -> None: """Set the move callback.""" def setResizeCallback(self, arg: Callable[[MDIResize, V2I], None], /) -> None: """Set the resize callback.""" class Menu(IMenuPopup): """Menu.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... def getActions(self) -> list[Action]: """Get the actions.""" def setCurrentCallback(self, callback: Callable[[Action], None]) -> None: """Set a callback for the item the user is on: the item under the cursor -- a disabled item included, the way a tooltip would show for it -- or the current item when navigating by keyboard, announced when the menu opens too. It fires with nothing when the menu closes, and it reaches into the sub menus. """ def setNeighborCallback(self, callback: Callable[[int], None]) -> None: """Set a callback for moving to the menu beside this one, -1 for the one on the left and 1 for the one on the right, when the left and right arrow keys have nothing to do in the menu itself. A menu bar sets it on its menus; a sub menu passes the move to the menu it belongs to. """ def addAction(self, action: Action) -> None: """Add an action to the menu.""" def setChecked(self, action: Action, checked: bool) -> None: """Set whether a menu item is checked. Remove this function and replace it with an observer. """ @overload def setEnabled(self, enabled: bool) -> None: """Set whether a menu item is enabled. Remove this function and replace it with an observer. """ @overload def setEnabled(self, action: Action, enabled: bool) -> None: """Set whether a menu item is enabled. Remove this function and replace it with an observer. """ def getSubMenus(self) -> list[Menu]: """Get the sub menus.""" def addSubMenu(self, text: str) -> Menu: """Add a sub menu.""" def setSubMenuEnabled(self, menu: Menu, enabled: bool) -> None: """Set whether a sub menu is enabled.""" def addDivider(self) -> None: """Add a divider.""" def clear(self) -> None: """Clear the menu.""" def shortcut(self, key: Key, modifiers: int) -> bool: """Handle keyboard shortcuts.""" class MenuBar(IContainer): """Menu bar.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... def setCurrentCallback(self, callback: Callable[[Action], None]) -> None: """Set a callback for the highlighted item's action, across every menu on the bar and their sub menus. It fires with the action when the highlight moves, and with nothing when it leaves. """ @overload def addMenu(self, text: str) -> Menu: """Add a menu.""" @overload def addMenu(self, text: str, menu: Menu) -> None: """Add a menu.""" def getMenu(self, text: str) -> Menu: """Get a menu.""" def clear(self) -> None: """Clear the menus.""" def shortcut(self, key: Key, modifiers: int) -> bool: """Handle keyboard shortcuts.""" class MessageDialog(IDialog): """Message dialog.""" def __init__(self, context: Context, title: str, text: str, parent: IWidget | None = None) -> None: """Create a new widget.""" def setCallback(self, arg: Callable[[], None], /) -> None: """Set the callback.""" class OverlayLayout(IWidget): """Overlay layout.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... class PieChartData: """Pie chart data.""" @overload def __init__(self) -> None: ... @overload def __init__(self, percentage: float, color: Color4F) -> None: ... @property def percentage(self) -> float: """The size of the slice, as a percentage of the whole circle. Slices follow each other clockwise from the top. """ @percentage.setter def percentage(self, arg: float, /) -> None: ... @property def color(self) -> Color4F: """The color of the slice.""" @color.setter def color(self, arg: Color4F, /) -> None: ... def __eq__(self, arg: PieChartData, /) -> bool: ... def __ne__(self, arg: PieChartData, /) -> bool: ... class PieChart(IWidget): """Pie chart widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def data(self) -> list[PieChartData]: """Get the pie chart data.""" @data.setter def data(self, arg: Sequence[PieChartData], /) -> None: ... @property def sizeMult(self) -> int: """Get the size multiplier.""" @sizeMult.setter def sizeMult(self, arg: int, /) -> None: ... class ProgressDialog(IDialog): """Progress dialog.""" def __init__(self, context: Context, title: str, text: str, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... @property def message(self) -> str: """Get the progress message.""" @message.setter def message(self, arg: str, /) -> None: ... @property def range(self) -> RangeD: """Get the range.""" @range.setter def range(self, arg: RangeD, /) -> None: ... def setRange(self, arg0: float, arg1: float, /) -> None: """Set the range.""" @property def value(self) -> float: """Get the value.""" @value.setter def value(self, arg: float, /) -> None: ... class PushButton(IButton): """Push button.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... class RadioButton(IButton): """Radio button.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... class PathListObserver: """List observer.""" def __init__(self, observableList: IObservablePathList, callback: Callable[[Sequence[Path]], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservablePathList: """Base class for observable lists.""" pass class ObservablePathList(IObservablePathList): """Observable list.""" def __init__(self, arg: Sequence[Path], /) -> None: ... def setAlways(self, arg: Sequence[Path], /) -> None: """Set the list.""" def setIfChanged(self, arg: Sequence[Path], /) -> bool: """Set the list only if it has changed.""" def clear(self) -> None: """Clear the list.""" def setItem(self, index: int, value: Path) -> None: """Set an item.""" def setItemOnlyIfChanged(self, index: int, value: Path) -> bool: """Set an item only if it has changed.""" @overload def pushBack(self, arg: Path, /) -> None: """Append an item. Append a range of items. """ @overload def pushBack(self, arg: Sequence[Path], /) -> None: """Append an item. Append a range of items. """ def insertItem(self, index: int, value: Path) -> None: """Insert an item.""" def insertItems(self, index: int, list: Sequence[Path]) -> None: """Insert a range of items.""" def removeItem(self, index: int) -> None: """Remove an item.""" def removeItems(self, start: int, end: int) -> None: """Remove a range of items.""" def replaceItems(self, start: int, end: int, list: Sequence[Path]) -> None: """Replace a range of items.""" def get(self) -> list[Path]: """Get the list.""" def getSize(self) -> int: """Get the list size.""" def isEmpty(self) -> bool: """Get whether the list is empty.""" def getItem(self, arg: int, /) -> Path: """Get a list item.""" def contains(self, arg: Path, /) -> bool: """Does the list contain the given item?""" def indexOf(self, arg: Path, /) -> int: """Get the index of the given item.""" class RecentFilesModel: """Recent files model.""" def __init__(self, context: Context) -> None: """Create a new model.""" @property def recentMax(self) -> int: """Get the maximum number of recent files.""" @recentMax.setter def recentMax(self, arg: int, /) -> None: ... @property def observeRecentMax(self) -> IObservableSizeT: """Observe the maximum number of recent files.""" @property def recent(self) -> list[str]: """Get the list of recent files. Paths rather than file names: a sequence's range is the path's own and is what says whether the entry was one frame or the sequence it sits in, so opening it again opens what it opened before. """ @recent.setter def recent(self, arg: Sequence[str], /) -> None: ... @property def observeRecent(self) -> IObservablePathList: """Observe the list of recent files.""" def addRecent(self, arg: Path, /) -> None: """Add a recent file.""" def removeRecent(self, arg: Path, /) -> None: """Remove a recent file: one that turned out not to open, say.""" class RowMargins: """Row layout margins.""" @overload def __init__(self) -> None: ... @overload def __init__(self, arg: SizeRole, /) -> None: ... @overload def __init__(self, horizontal: SizeRole, vertical: SizeRole) -> None: ... @overload def __init__(self, left: SizeRole, top: SizeRole, right: SizeRole, bottom: SizeRole) -> None: ... @property def left(self) -> SizeRole: """The left margin, as a size role.""" @left.setter def left(self, arg: SizeRole, /) -> None: ... @property def top(self) -> SizeRole: """The top margin, as a size role.""" @top.setter def top(self, arg: SizeRole, /) -> None: ... @property def right(self) -> SizeRole: """The right margin, as a size role.""" @right.setter def right(self, arg: SizeRole, /) -> None: ... @property def bottom(self) -> SizeRole: """The bottom margin, as a size role.""" @bottom.setter def bottom(self, arg: SizeRole, /) -> None: ... class RowLayout(IWidget): """Row layout.""" def __init__(self, context: Context, orientation: Orientation, parent: IWidget | None = None) -> None: """Create a new layout.""" @property def margins(self) -> RowMargins: """Get the margins.""" @margins.setter def margins(self, arg: RowMargins, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def spacingRole(self) -> SizeRole: """Get the spacing role.""" @spacingRole.setter def spacingRole(self, arg: SizeRole, /) -> None: ... @overload def addSpacer(self, stretch: Stretch) -> None: """Add a spacer.""" @overload def addSpacer(self, spacingRole: SizeRole, stretch: Stretch) -> None: """Add a spacer.""" def clear(self) -> None: """Remove all children from the layout.""" class VerticalLayout(RowLayout): """Vertical layout.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" class HorizontalLayout(RowLayout): """Horizontal layout.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" class ItemButtonList(VerticalLayout): """A list of item buttons with one focus and one current item. The list is the focus unit, the file browser's model applied to rows that are widgets: the rows do not take the key focus themselves, the arrows move the current item, Return activates it, and Delete removes it. The current item outlives the focus leaving the list, so a control that acts on it always has a target. A double click on a row is reported on its own, for the second thing a row can do. The rows are the ItemButton children, in order; other children -- dividers, an empty-list label -- are ignored. The caller adds and removes children the way it would with a layout, and sets the current item again after rebuilding them. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def current(self) -> int: """Get the current item, or -1.""" @current.setter def current(self, arg: int, /) -> None: ... def setCurrentCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback for the current item changing from inside the list -- the arrow keys browsing it. """ def setActivateCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback for Return on the current item.""" def setDeleteCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback for Delete on the current item.""" def setDoubleClickCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback for a double click on a row. Counted from the presses rather than the clicks: a callback is free to rebuild the rows, and the release of a row that no longer exists never arrives. """ def setScreenshotTag(widget: IWidget, id: str) -> None: """ Tag a widget so a documentation screenshot tool can find it and emit its bounding box. """ def hasScreenshotTag(widget: IWidget) -> bool: """ Returns true if the widget carries a screenshot tag (including an empty one). """ def getScreenshotTag(widget: IWidget) -> str: """Get a widget's screenshot tag, or an empty string if it has none.""" class ScrollType(enum.Enum): """Scroll type.""" Both = 0 Horizontal = 1 Vertical = 2 Menu = 3 def getScrollTypeEnums() -> list[ScrollType]: """Get every value of ScrollType.""" class ScrollArea(IWidget): """Scroll area.""" def __init__(self, context: Context, type: ScrollType = ScrollType.Both, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def scrollType(self) -> ScrollType: """Get the directions the contents scroll in.""" @scrollType.setter def scrollType(self, arg: ScrollType, /) -> None: ... @property def scrollSize(self) -> Size2I: """Get the size of the scrolled contents.""" def setScrollSizeCallback(self, arg: Callable[[Size2I], None], /) -> None: """Set a callback for when the size of the scrolled contents changes. """ @property def scrollPos(self) -> V2I: """Get the scroll position: how far the contents are scrolled, in pixels. """ @scrollPos.setter def scrollPos(self, arg0: V2I, arg1: bool, /) -> None: ... def setScrollPosCallback(self, arg: Callable[[V2I], None], /) -> None: """Set a callback for when the scroll position changes, including from setScrollPos() and scrollTo(). """ def scrollTo(self, arg: Box2I, /) -> None: """Scroll to make the given box visible.""" @property def areaResizable(self) -> bool: """Get whether the scrolled area is resizable.""" @areaResizable.setter def areaResizable(self, arg: bool, /) -> None: ... @property def sizeHintRole(self) -> SizeRole: """Get the size hint role.""" @sizeHintRole.setter def sizeHintRole(self, arg: SizeRole, /) -> None: ... class ScrollBar(IWidget): """Scroll bar.""" def __init__(self, context: Context, orientation: Orientation, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def scrollSize(self) -> int: """Get the scroll size, the length of the scrolled contents in pixels. """ @scrollSize.setter def scrollSize(self, arg: int, /) -> None: ... @property def scrollPos(self) -> int: """Get the scroll position, in pixels.""" @scrollPos.setter def scrollPos(self, arg: int, /) -> None: ... def setScrollPosCallback(self, arg: Callable[[int], None], /) -> None: """Set a callback for when the scroll position is changed by dragging the handle or clicking the bar. """ class ScrollInfo: """Scroll widget information.""" def __init__(self) -> None: ... @property def viewport(self) -> Box2I: """The geometry of the area the widget is seen through, in window coordinates. """ @viewport.setter def viewport(self, arg: Box2I, /) -> None: ... @property def scrollSize(self) -> Size2I: """The size of the widget being scrolled, in pixels.""" @scrollSize.setter def scrollSize(self, arg: Size2I, /) -> None: ... @property def scrollPos(self) -> V2I: """The scroll position: how far the widget is scrolled, in pixels.""" @scrollPos.setter def scrollPos(self, arg: V2I, /) -> None: ... def __eq__(self, arg: ScrollInfo, /) -> bool: ... def __ne__(self, arg: ScrollInfo, /) -> bool: ... class ScrollWidget(IWidget): """Scroll widget.""" def __init__(self, context: Context, type: ScrollType = ScrollType.Both, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def widget(self) -> IWidget: """Get the widget that is scrolled.""" @widget.setter def widget(self, arg: IWidget, /) -> None: ... @property def scrollType(self) -> ScrollType: """Get which ways the widget scrolls.""" @scrollType.setter def scrollType(self, arg: ScrollType, /) -> None: ... @property def scrollSize(self) -> Size2I: """Get the size of the widget being scrolled, in pixels.""" def setScrollSizeCallback(self, arg: Callable[[Size2I], None], /) -> None: """Set a callback for when the scroll size changes.""" def setScrollPos(self, value: V2I, clamp: bool = True) -> None: """Set the scroll position. With clamp it is kept between zero and the scroll size less the size of the view. """ @property def scrollPos(self) -> V2I: """Get the scroll position, in pixels.""" def setScrollPosCallback(self, arg: Callable[[V2I], None], /) -> None: """Set a callback for when the scroll position changes.""" def scrollTo(self, arg: Box2I, /) -> None: """Scroll to make the given box visible.""" @property def scrollInfo(self) -> ScrollInfo: """Get the scroll information.""" def setScrollInfoCallback(self, arg: Callable[[ScrollInfo], None], /) -> None: """Set the scroll information callback.""" @property def areaResizable(self) -> bool: """Get whether the scrolled area is resizable.""" @areaResizable.setter def areaResizable(self, arg: bool, /) -> None: ... @property def scrollBarsVisible(self) -> bool: """Get whether the scroll bars are visible.""" @scrollBarsVisible.setter def scrollBarsVisible(self, arg: bool, /) -> None: ... @property def scrollBarsAutoHide(self) -> bool: """Get whether the scroll bars auto-hide.""" @scrollBarsAutoHide.setter def scrollBarsAutoHide(self, arg: bool, /) -> None: ... @property def scrollEventsEnabled(self) -> bool: """Get whether scroll events are enabled.""" @scrollEventsEnabled.setter def scrollEventsEnabled(self, arg: bool, /) -> None: ... @property def dragScroll(self) -> bool: """Get whether the widget scrolls when a drag and drop hovers near its edges. """ @dragScroll.setter def dragScroll(self, arg: bool, /) -> None: ... @property def border(self) -> bool: """Get whether the scroll area has a border.""" @border.setter def border(self, arg: bool, /) -> None: ... @property def sizeHintRole(self) -> SizeRole: """Get the size hint role.""" @sizeHintRole.setter def sizeHintRole(self, arg: SizeRole, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def viewportWidget(self) -> IWidget: """Get the viewport widget.""" @viewportWidget.setter def viewportWidget(self, arg: IWidget, /) -> None: ... class SearchBox(IContainer): """Search box widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def text(self) -> str: """Get the text.""" @text.setter def text(self, arg: str, /) -> None: ... def setCallback(self, arg: Callable[[str], None], /) -> None: """Set the callback.""" def setReturnCallback(self, arg: Callable[[], None], /) -> None: """Set the callback for the return key: to act on the first of what was found, say. """ def setEscapeCallback(self, arg: Callable[[], None], /) -> None: """Set the callback for the escape key when there is nothing to search for: to close whatever the search box is in, say. With text in the box the escape key clears it; without this callback and without text, it lets go of the key focus. """ class ShuttleWidget(IMouseWidget): """Shuttle widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def modifiers(self) -> int: """Get the keyboard modifiers held during the drag. Read from within a delta callback by anything that scales what a notch is worth. """ def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the callback, called while the shuttle is dragged with the number of notches it has moved since it was pressed, negative to the left. A notch is a quarter of the widget's height. """ def setDeltaCallback(self, arg: Callable[[int], None], /) -> None: """Set the delta callback, called while the shuttle is dragged with the number of notches it has moved since the last call. """ def setActiveCallback(self, arg: Callable[[bool], None], /) -> None: """Set the active callback, called with true when the shuttle is pressed and false when it is released. """ class Spacer(IWidget): """Spacer widget.""" def __init__(self, context: Context, orientation: Orientation, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def spacingRole(self) -> SizeRole: """Get the spacing role.""" @spacingRole.setter def spacingRole(self, arg: SizeRole, /) -> None: ... class Splitter(IWidget): """Splitter widget.""" def __init__(self, context: Context, orientation: Orientation, parent: IWidget | None = None) -> None: """Create a new widget.""" def setWidgets(self, arg: Sequence[IWidget], /) -> None: """Set the widgets, replacing whatever is there. Building a tree of splitters by parenting each child one at a time means taking the old one apart in the right order first, since a parent owns its children: an old splitter whose only other reference is dropped stays in the tree and goes on drawing. This does the whole thing at once and detaches what it replaces. """ @property def split(self) -> float: """Get the split value.""" @split.setter def split(self, arg: float, /) -> None: ... def setSplitCallback(self, arg: Callable[[float], None], /) -> None: """Set the callback for the split being dragged. What a linked arrangement is built out of -- a four-up whose rows divide together needs each splitter to hear about the other. """ @property def border(self) -> bool: """Get whether the splitter has a border.""" @border.setter def border(self, arg: bool, /) -> None: ... class Splitter2D(IWidget): """A splitter that divides both ways at once, into four. Two splitters ganged together can hold four widgets, but they are still two splitters: the rows divide independently unless something keeps them in step, and the point where the divisions cross belongs to neither of them. Here there is one division each way and one place they cross, and dragging that crossing moves both -- which is the thing a four-up wants and the thing two splitters cannot offer. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" def setWidgets(self, widgets: Sequence[IWidget]) -> None: """Set the widgets, replacing whatever is there. In reading order: top left, top right, bottom left, bottom right. Fewer than four fills as many quadrants as there are and leaves the rest empty; the divisions do not move to suit. """ @property def split(self) -> V2F: """Get where the divisions are, each from zero to one.""" @split.setter def split(self, arg: V2F, /) -> None: ... def setSplitCallback(self, arg: Callable[[V2F], None], /) -> None: """Set the callback for a division being dragged.""" @property def border(self) -> bool: """Get whether the divisions have a border.""" @border.setter def border(self, arg: bool, /) -> None: ... class StackLayout(IWidget): """Stack layout.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new layout.""" @property def currentIndex(self) -> int: """Get the current index.""" @currentIndex.setter def currentIndex(self, arg: int, /) -> None: ... def nextIndex(self) -> None: """Go to the next index.""" @property def observeHasNextIndex(self) -> IObservableBool: """Observe whether there is a next index.""" def prevIndex(self) -> None: """Go to the previous index.""" @property def observeHasPrevIndex(self) -> IObservableBool: """Observe whether there is a previous index.""" def firstIndex(self) -> None: """Go to the first index.""" def lastIndex(self) -> None: """Go to the last index.""" @property def currentWidget(self) -> IWidget: """Get the current widget.""" @currentWidget.setter def currentWidget(self, arg: IWidget, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... def clear(self) -> None: """Remove all children from the layout.""" class SvgWidget(IWidget): """SVG widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def svgData(self) -> list[int]: """Get the SVG data.""" @svgData.setter def svgData(self, arg: Sequence[int], /) -> None: ... @property def svgWidth(self) -> int: """Get the SVG width.""" @svgWidth.setter def svgWidth(self, arg: int, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... class SysLogModel: """System log model. The system log model keeps a buffer of log items for display in the UI. """ def __init__(self, context: Context) -> None: """Create a new model.""" def observeMessages(self) -> IObservableLogItemList: """Observe messages (warnings and errors). The items are unformatted: a status bar wants the message alone, while a list of what has happened wants the time with it, so the choice belongs to whoever is showing them. See getLabel(). """ def clearMessages(self) -> None: """Clear the messages.""" def observeLog(self) -> IObservableStringList: """Observe the log.""" def clearLog(self) -> None: """Clear the log.""" class TabBar(IContainer): """Tab bar widget. Add scrolling for the tab buttons. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def tabs(self) -> list[str]: """Get the tabs.""" @tabs.setter def tabs(self, arg0: Sequence[str], arg1: Sequence[str], /) -> None: ... def addTab(self, arg0: str, arg1: str, /) -> None: """Add a tab.""" def clear(self) -> None: """Clear the tabs.""" @property def current(self) -> int: """Get the current tab.""" @current.setter def current(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the current tab callback.""" def setText(self, index: int, text: str) -> None: """Set the tab text.""" def setTabTooltip(self, index: int, tooltip: str) -> None: """Set the tab tooltip.""" @property def closable(self) -> bool: """Get whether the tabs are closable.""" @closable.setter def closable(self, arg: bool, /) -> None: ... def setTabCloseCallback(self, arg: Callable[[int], None], /) -> None: """Set the tab close callback.""" @property def scrollBarVisible(self) -> bool: """Get whether the scroll bar is visible.""" @scrollBarVisible.setter def scrollBarVisible(self, arg: bool, /) -> None: ... class TabWidget(IContainer): """Tab widget.""" def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def tabs(self) -> list[str]: """Get the tabs.""" def addTab(self, name: str, widget: IWidget, tooltip: str = '') -> None: """Add a tab.""" @overload def removeTab(self, index: int) -> None: """Remove a tab.""" @overload def removeTab(self, widget: IWidget) -> None: """Remove a tab.""" def clear(self) -> None: """Clear the tabs.""" @property def current(self) -> int: """Get the current tab.""" @current.setter def current(self, arg: int, /) -> None: ... def setCallback(self, arg: Callable[[int], None], /) -> None: """Set the current tab callback.""" @property def currentWidget(self) -> IWidget: """Get the current widget.""" @currentWidget.setter def currentWidget(self, arg: IWidget, /) -> None: ... def setWidgetCallback(self, arg: Callable[[IWidget], None], /) -> None: """Set the current widget callback.""" @overload def setTabText(self, arg0: int, arg1: str, /) -> None: ... @overload def setTabText(self, arg0: IWidget, arg1: str, /) -> None: ... @overload def setTabTooltip(self, arg0: int, arg1: str, /) -> None: """Set the tab tooltip.""" @overload def setTabTooltip(self, arg0: IWidget, arg1: str, /) -> None: """Set the tab tooltip.""" @property def closable(self) -> bool: """Get whether the tabs are closable.""" @closable.setter def closable(self, arg: bool, /) -> None: ... def setCloseCallback(self, arg: Callable[[int], None], /) -> None: """Set the tab close callback.""" class TableCell: """Table cell.""" @overload def __init__(self) -> None: ... @overload def __init__(self, text: str, editable: bool = False, colorRole: ColorRole = ColorRole._None) -> None: ... @property def text(self) -> str: """The text shown in the cell.""" @text.setter def text(self, arg: str, /) -> None: ... @property def editable(self) -> bool: """An editable cell highlights under the mouse, can be made current, and calls the table's callback when it is clicked. """ @editable.setter def editable(self, arg: bool, /) -> None: ... @property def colorRole(self) -> ColorRole: """Background color role, drawn as a tint.""" @colorRole.setter def colorRole(self, arg: ColorRole, /) -> None: ... def __eq__(self, arg: TableCell, /) -> bool: ... def __ne__(self, arg: TableCell, /) -> bool: ... class TableRow: """Table row.""" @overload def __init__(self) -> None: ... @overload def __init__(self, cells: Sequence[TableCell], heading: bool = False) -> None: ... @property def cells(self) -> list[TableCell]: """The cells, one for each column.""" @cells.setter def cells(self, arg: Sequence[TableCell], /) -> None: ... @property def heading(self) -> bool: """A heading row is drawn in bold with space above it, and over a band the width of the table, with a line beneath it, or both. """ @heading.setter def heading(self, arg: bool, /) -> None: ... @property def visible(self) -> bool: """Whether the row is shown. A hidden row takes no space and keeps its index. """ @visible.setter def visible(self, arg: bool, /) -> None: ... def __eq__(self, arg: TableRow, /) -> bool: ... def __ne__(self, arg: TableRow, /) -> bool: ... class TableIndex: """Table index.""" @overload def __init__(self) -> None: ... @overload def __init__(self, row: int, column: int) -> None: ... @property def row(self) -> int: """The row, or -1 for none.""" @row.setter def row(self, arg: int, /) -> None: ... @property def column(self) -> int: """The column, or -1 for none.""" @column.setter def column(self, arg: int, /) -> None: ... def isValid(self) -> bool: """Get whether the index is of a cell: the row and the column are both zero or more. """ def __eq__(self, arg: TableIndex, /) -> bool: ... def __ne__(self, arg: TableIndex, /) -> bool: ... class TableWidget(IMouseWidget): """Table widget. The table draws its cells as text. To edit a cell, give the table an editor widget from the callback: it is placed over the cell until it is closed or the key focus leaves it. """ def __init__(self, context: Context, parent: IWidget | None = None) -> None: """Create a new widget.""" @property def rows(self) -> list[TableRow]: """Get the rows.""" @rows.setter def rows(self, arg: Sequence[TableRow], /) -> None: ... @property def columnCount(self) -> int: """Get the number of columns.""" def getColumnStretch(self, column: int) -> bool: """Get whether a column takes a share of the spare width.""" def setColumnStretch(self, column: int, stretch: bool) -> None: """Set whether a column takes a share of the spare width. Columns are otherwise as wide as their widest cell. """ @property def current(self) -> TableIndex: """Get the current cell.""" @current.setter def current(self, arg: TableIndex, /) -> None: ... def setCallback(self, arg: Callable[[TableIndex], None], /) -> None: """Set the callback for when an editable cell is clicked, or the return key is pressed on the current cell. """ def getCellRect(self, index: TableIndex) -> Box2I: """Get a cell rectangle.""" @property def editor(self) -> IWidget: """Get the editor widget.""" @property def editorIndex(self) -> TableIndex: """Get the cell that is being edited.""" def openEditor(self, index: TableIndex, widget: IWidget) -> None: """Open an editor widget over a cell. The editor should take the key focus; it is closed when the key focus leaves it, or when it leaves a press of the return or escape key unaccepted. """ def closeEditor(self) -> None: """Close the editor widget. The editor is removed on the next tick, so this can be called from the editor's own callbacks. """ @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def columnLines(self) -> bool: """Get whether lines are drawn between the columns.""" @columnLines.setter def columnLines(self, arg: bool, /) -> None: ... @property def rowLines(self) -> bool: """Get whether lines are drawn between the rows.""" @rowLines.setter def rowLines(self, arg: bool, /) -> None: ... @property def headingLine(self) -> bool: """Get whether a line is drawn beneath the heading rows.""" @headingLine.setter def headingLine(self, arg: bool, /) -> None: ... @property def headingRole(self) -> ColorRole: """Get the color role of the heading rows.""" @headingRole.setter def headingRole(self, arg: ColorRole, /) -> None: ... class TextEditPos: """Text edit position.""" @overload def __init__(self) -> None: ... @overload def __init__(self, line: int, chr: int) -> None: ... @property def line(self) -> int: """The line, or -1 for none.""" @line.setter def line(self, arg: int, /) -> None: ... @property def chr(self) -> int: """The character, as a byte offset into the line, or -1 for none.""" @chr.setter def chr(self, arg: int, /) -> None: ... def isValid(self) -> bool: """Get whether the position is valid: neither the line nor the character is -1. """ def __eq__(self, arg: TextEditPos, /) -> bool: ... def __ne__(self, arg: TextEditPos, /) -> bool: ... def __lt__(self, arg: TextEditPos, /) -> bool: ... def __gt__(self, arg: TextEditPos, /) -> bool: ... class TextEditSelection: """Text edit selection.""" @overload def __init__(self) -> None: ... @overload def __init__(self, pos: TextEditPos) -> None: ... @overload def __init__(self, first: TextEditPos, second: TextEditPos) -> None: ... @property def first(self) -> TextEditPos: """The end the selection started from.""" @first.setter def first(self, arg: TextEditPos, /) -> None: ... @property def second(self) -> TextEditPos: """The end the selection extends to.""" @second.setter def second(self, arg: TextEditPos, /) -> None: ... def isValid(self) -> bool: """Get whether the selection is valid.""" def min(self) -> TextEditPos: """Get the minimum.""" def max(self) -> TextEditPos: """Get the maximum.""" def __eq__(self, arg: TextEditSelection, /) -> bool: ... def __ne__(self, arg: TextEditSelection, /) -> bool: ... class TextEditModelOptions: """Text edit model options.""" def __init__(self) -> None: ... @property def tabSpaces(self) -> int: """The number of spaces the Tab key inserts, and that it indents or, with Shift held, un-indents the selected lines by. """ @tabSpaces.setter def tabSpaces(self, arg: int, /) -> None: ... def __eq__(self, arg: TextEditModelOptions, /) -> bool: ... def __ne__(self, arg: TextEditModelOptions, /) -> bool: ... class TextEditModelOptionsObserver: """Value observer.""" def __init__(self, observable: IObservableTextEditModelOptions, callback: Callable[[TextEditModelOptions], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableTextEditModelOptions: """Base class for observable values.""" def get(self) -> TextEditModelOptions: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableTextEditModelOptions(IObservableTextEditModelOptions): """Observable value.""" def __init__(self, arg: TextEditModelOptions, /) -> None: ... def setAlways(self, arg: TextEditModelOptions, /) -> None: """Set the value.""" def setIfChanged(self, arg: TextEditModelOptions, /) -> bool: """Set the value only if it has changed.""" def get(self) -> TextEditModelOptions: """Get the value.""" class TextEditPosObserver: """Value observer.""" def __init__(self, observable: IObservableTextEditPos, callback: Callable[[TextEditPos], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableTextEditPos: """Base class for observable values.""" def get(self) -> TextEditPos: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableTextEditPos(IObservableTextEditPos): """Observable value.""" def __init__(self, arg: TextEditPos, /) -> None: ... def setAlways(self, arg: TextEditPos, /) -> None: """Set the value.""" def setIfChanged(self, arg: TextEditPos, /) -> bool: """Set the value only if it has changed.""" def get(self) -> TextEditPos: """Get the value.""" class TextEditSelectionObserver: """Value observer.""" def __init__(self, observable: IObservableTextEditSelection, callback: Callable[[TextEditSelection], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableTextEditSelection: """Base class for observable values.""" def get(self) -> TextEditSelection: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableTextEditSelection(IObservableTextEditSelection): """Observable value.""" def __init__(self, arg: TextEditSelection, /) -> None: ... def setAlways(self, arg: TextEditSelection, /) -> None: """Set the value.""" def setIfChanged(self, arg: TextEditSelection, /) -> bool: """Set the value only if it has changed.""" def get(self) -> TextEditSelection: """Get the value.""" class TextEditModel: """Text edit model.""" def __init__(self, context: Context, text: Sequence[str] = []) -> None: ... @property def text(self) -> list[str]: """Get the text, one string for each line.""" @text.setter def text(self, arg: Sequence[str], /) -> None: ... def observeText(self) -> IObservableStringList: """Observe the text.""" def clearText(self) -> None: """Clear the text, leaving one empty line. Like setting the text, this also clears the undo history. """ @property def readOnly(self) -> bool: """Get whether the text is read only. Read only text can still be selected and copied, but not edited. """ @readOnly.setter def readOnly(self, arg: bool, /) -> None: ... def observeReadOnly(self) -> IObservableBool: """Observe whether the text is read only.""" @property def cursor(self) -> TextEditPos: """Get the cursor position.""" @cursor.setter def cursor(self, arg: TextEditPos, /) -> None: ... def observeCursor(self) -> IObservableTextEditPos: """Observe the cursor position.""" @property def selection(self) -> TextEditSelection: """Get the selection.""" @selection.setter def selection(self, arg: TextEditSelection, /) -> None: ... def observeSelection(self) -> IObservableTextEditSelection: """Observe the selection.""" def selectAll(self) -> None: """Select all of the text.""" def clearSelection(self) -> None: """Clear the selection.""" def undo(self) -> None: """Undo the last edit. Nothing is done while the text is read only.""" def observeHasUndo(self) -> IObservableBool: """Observe whether there is a command to undo.""" def observeHasRedo(self) -> IObservableBool: """Observe whether there is a command to redo.""" def redo(self) -> None: """Redo the last edit that was undone. Nothing is done while the text is read only. """ def cut(self) -> None: """Copy the selection to the clipboard and remove it. Nothing is done while the text is read only. """ def copy(self) -> None: """Copy the selection to the clipboard.""" def paste(self) -> None: """Paste the clipboard's text over the selection, or at the cursor. Nothing is done while the text is read only. """ def input(self, text: str) -> None: """Handle text input.""" def key(self, key: Key, modifiers: int = 0) -> bool: """Handle key input.""" @property def options(self) -> TextEditModelOptions: """Get the options.""" @options.setter def options(self, arg: TextEditModelOptions, /) -> None: ... def observeOptions(self) -> IObservableTextEditModelOptions: """Observe the options.""" def setPageRows(self, rows: int) -> None: """Set the number of rows in a page.""" class TextEditOptions: """Text edit options.""" def __init__(self) -> None: ... @property def fontInfo(self) -> FontInfo: """The font. Its size is scaled by the display scale.""" @fontInfo.setter def fontInfo(self, arg: FontInfo, /) -> None: ... @property def cursorBlink(self) -> float: """How long, in seconds, the cursor is shown and then hidden as it blinks. """ @cursorBlink.setter def cursorBlink(self, arg: float, /) -> None: ... @property def autoScrollTimeout(self) -> float: """The time, in seconds, between the steps of the scrolling while a selection is dragged past the edge. """ @autoScrollTimeout.setter def autoScrollTimeout(self, arg: float, /) -> None: ... def __eq__(self, arg: TextEditOptions, /) -> bool: ... def __ne__(self, arg: TextEditOptions, /) -> bool: ... class TextEditOptionsObserver: """Value observer.""" def __init__(self, observable: IObservableTextEditOptions, callback: Callable[[TextEditOptions], None], action: ObserverAction = ObserverAction.Trigger) -> None: ... class IObservableTextEditOptions: """Base class for observable values.""" def get(self) -> TextEditOptions: """Get the value.""" def getObserversCount(self) -> int: """Get the number of observers.""" class ObservableTextEditOptions(IObservableTextEditOptions): """Observable value.""" def __init__(self, arg: TextEditOptions, /) -> None: ... def setAlways(self, arg: TextEditOptions, /) -> None: """Set the value.""" def setIfChanged(self, arg: TextEditOptions, /) -> bool: """Set the value only if it has changed.""" def get(self) -> TextEditOptions: """Get the value.""" class TextEdit(IWidget): """Text edit widget. Double-click to select text. """ @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, model: TextEditModel, parent: IWidget | None = None) -> None: ... def getModel(self) -> TextEditModel: """Get the model.""" def getScrollWidget(self) -> ScrollWidget: """Get the scroll widget.""" @property def text(self) -> list[str]: """Get the text, one string for each line.""" @text.setter def text(self, arg: Sequence[str], /) -> None: ... def clearText(self) -> None: """Clear the text.""" def setCallback(self, arg: Callable[[Sequence[str]], None], /) -> None: """Set the callback, called with the text whenever it changes: on every edit, and from setting the text. """ def setFocusCallback(self, arg: Callable[[bool], None], /) -> None: """Set a callback for when the editing widget inside gains or loses the key focus. """ @property def readOnly(self) -> bool: """Get whether the text is read only. Read only text can still be selected and copied. """ @readOnly.setter def readOnly(self, arg: bool, /) -> None: ... def selectAll(self) -> None: """Select all of the text.""" def clearSelection(self) -> None: """Clear the selection.""" @property def options(self) -> TextEditOptions: """Get the options.""" @options.setter def options(self, arg: TextEditOptions, /) -> None: ... def observeOptions(self) -> IObservableTextEditOptions: """Observe the options.""" @property def sizeHintRole(self) -> SizeRole: """Get the size hint role, the size the text is given to scroll in. "None" asks for the height of the text instead, so that the edit does not scroll vertically. """ @sizeHintRole.setter def sizeHintRole(self, arg: SizeRole, /) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role, the room kept around the edit outside its border. The default is none. """ @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... class ToolBar(IContainer): """Tool bar.""" def __init__(self, context: Context, orientation: Orientation = Orientation.Horizontal, parent: IWidget | None = None) -> None: ... @property def marginRole(self) -> SizeRole: """Get the margin role.""" @marginRole.setter def marginRole(self, arg: SizeRole, /) -> None: ... @property def spacingRole(self) -> SizeRole: """Get the spacing role.""" @spacingRole.setter def spacingRole(self, arg: SizeRole, /) -> None: ... @property def grouped(self) -> bool: """Get whether the buttons are grouped.""" @grouped.setter def grouped(self, arg: bool, /) -> None: ... def addAction(self, arg: Action, /) -> ToolButton: """Add an action.""" def addWidget(self, arg: IWidget, /) -> None: """Add a widget.""" def clear(self) -> None: """Clear the tool bar.""" class ToolButton(IButton): """Tool button.""" @overload def __init__(self, context: Context, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, text: str, parent: IWidget | None = None) -> None: ... @overload def __init__(self, context: Context, action: Action, parent: IWidget | None = None) -> None: ... @property def popupIcon(self) -> bool: """Get whether the button has a popup icon.""" @popupIcon.setter def popupIcon(self, arg: bool, /) -> None: ... @property def secondaryText(self) -> str: """Get the secondary text.""" @secondaryText.setter def secondaryText(self, arg: str, /) -> None: ... class Tooltip(IPopup): """Tooltip.""" def __init__(self, context: Context, text: str, pos: V2I, window: IWidget) -> None: """Create a new tooltip."""