Skip to content

hkb_editor.gui.widgets.dpg_item

DpgItem

Base class for Dear PyGui widget wrappers.

Parameters:

Name Type Description Default
tag int or str

Unique identifier; auto-generated if 0.

0
width int

Pixel width of the widget.

required

destroy_tree staticmethod

destroy_tree(tag: str | int) -> None

Call destroy() on every DpgItem at or below tag.

Popups, windows and handler registries are root level containers and may keep other objects alive through closures. Rather than have every widget report its items for cleanup, we walk the dpg tree and let the items clean up after themselves.

instances classmethod

instances() -> list[DpgItem]

All DpgItems currently alive, newest last.

Ko-fi donations