python-cui 1.4.0.6__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cui/__init__.py +87 -0
- cui/__init__.pyi +757 -0
- cui/_api.cp313-win_amd64.pyd +0 -0
- cui/_api.pyi +425 -0
- cui/_cui.cp313-win_amd64.pyd +0 -0
- cui/_cui.pyi +160 -0
- cui/_gen/COVERAGE.md +151 -0
- cui/_gen/__init__.py +1 -0
- cui/_gen/constants.py +813 -0
- cui/_gen/model.py +202 -0
- cui/_types.py +287 -0
- cui/py.typed +0 -0
- cui/ui.py +606 -0
- python_cui-1.4.0.6.dist-info/METADATA +221 -0
- python_cui-1.4.0.6.dist-info/RECORD +16 -0
- python_cui-1.4.0.6.dist-info/WHEEL +5 -0
|
Binary file
|
cui/_api.pyi
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
"""Type stubs for the generated wrapper layer.
|
|
2
|
+
|
|
3
|
+
GENERATED FILE: produced by tools/gen_cui.py; do not edit by hand.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from typing import Any, Sequence
|
|
7
|
+
|
|
8
|
+
from ._cui import Context
|
|
9
|
+
from ._types import Color, Date, Rect, Size, Vec2
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Candle: ...
|
|
13
|
+
class Choice: ...
|
|
14
|
+
class Command: ...
|
|
15
|
+
class CurveKey: ...
|
|
16
|
+
class FlameSpan: ...
|
|
17
|
+
class GradientStop: ...
|
|
18
|
+
class GridColumn: ...
|
|
19
|
+
class MarkdownResult: ...
|
|
20
|
+
class Model: ...
|
|
21
|
+
class PlanStep: ...
|
|
22
|
+
class PresenceUser: ...
|
|
23
|
+
class PromptSuggestion: ...
|
|
24
|
+
class SankeyLink: ...
|
|
25
|
+
class Source: ...
|
|
26
|
+
class SpeedAction: ...
|
|
27
|
+
class SwipeAction: ...
|
|
28
|
+
class TabBarItem: ...
|
|
29
|
+
class TableColumn: ...
|
|
30
|
+
class TickerItem: ...
|
|
31
|
+
class TocItem: ...
|
|
32
|
+
class TourStep: ...
|
|
33
|
+
class VizItem: ...
|
|
34
|
+
class DateRange:
|
|
35
|
+
def __init__(self) -> None: ...
|
|
36
|
+
class DiffRange:
|
|
37
|
+
def __init__(self) -> None: ...
|
|
38
|
+
class DiffRow:
|
|
39
|
+
def __init__(self) -> None: ...
|
|
40
|
+
class ImageView:
|
|
41
|
+
def __init__(self) -> None: ...
|
|
42
|
+
class KanbanMove:
|
|
43
|
+
def __init__(self) -> None: ...
|
|
44
|
+
class KvPair:
|
|
45
|
+
def __init__(self) -> None: ...
|
|
46
|
+
class LogBuffer:
|
|
47
|
+
def __init__(self) -> None: ...
|
|
48
|
+
class NodeView:
|
|
49
|
+
def __init__(self) -> None: ...
|
|
50
|
+
class NowPlaying:
|
|
51
|
+
def __init__(self) -> None: ...
|
|
52
|
+
class RegexMatch:
|
|
53
|
+
def __init__(self) -> None: ...
|
|
54
|
+
class TerminalBuffer:
|
|
55
|
+
def __init__(self) -> None: ...
|
|
56
|
+
|
|
57
|
+
def viewport_size(ctx: Context) -> Vec2: ...
|
|
58
|
+
def dpi_scale(ctx: Context) -> float: ...
|
|
59
|
+
def input_mouse_move(ctx: Context, x: float, y: float) -> None: ...
|
|
60
|
+
def input_mouse_button(ctx: Context, button: int, down: bool) -> None: ...
|
|
61
|
+
def input_mouse_leave(ctx: Context) -> None: ...
|
|
62
|
+
def input_scroll(ctx: Context, dx: float, dy: float) -> None: ...
|
|
63
|
+
def input_key(ctx: Context, key: int, down: bool, mods: int) -> None: ...
|
|
64
|
+
def input_text(ctx: Context, utf8: str | None) -> None: ...
|
|
65
|
+
def input_focus(ctx: Context, window_focused: bool) -> None: ...
|
|
66
|
+
def input_file_hover(ctx: Context, hovering: bool, x: float, y: float) -> None: ...
|
|
67
|
+
def input_file_drop(ctx: Context, paths: Sequence[str], x: float, y: float) -> None: ...
|
|
68
|
+
def dropped_file_count(ctx: Context) -> int: ...
|
|
69
|
+
def dropped_file(ctx: Context, index: int) -> str | None: ...
|
|
70
|
+
def file_drag_active(ctx: Context) -> bool: ...
|
|
71
|
+
def get_cursor(ctx: Context) -> int: ...
|
|
72
|
+
def key_pressed(ctx: Context, key: int) -> bool: ...
|
|
73
|
+
def key_down(ctx: Context, key: int) -> bool: ...
|
|
74
|
+
def shortcut(ctx: Context, mods: int, key: int) -> bool: ...
|
|
75
|
+
def key_mods(ctx: Context) -> int: ...
|
|
76
|
+
def mouse_pos(ctx: Context) -> Vec2: ...
|
|
77
|
+
def mouse_down(ctx: Context, b: int) -> bool: ...
|
|
78
|
+
def mouse_clicked(ctx: Context, b: int) -> bool: ...
|
|
79
|
+
def wants_keyboard(ctx: Context) -> bool: ...
|
|
80
|
+
def wants_mouse(ctx: Context) -> bool: ...
|
|
81
|
+
def set_theme(ctx: Context, mode: int) -> None: ...
|
|
82
|
+
def get_theme_mode(ctx: Context) -> int: ...
|
|
83
|
+
def set_accent(ctx: Context, accent: int) -> None: ...
|
|
84
|
+
def get_accent(ctx: Context) -> int: ...
|
|
85
|
+
def set_reduced_motion(ctx: Context, reduced: bool) -> None: ...
|
|
86
|
+
def color_of(ctx: Context, c: Color) -> Color: ...
|
|
87
|
+
def token_color(ctx: Context, token: int) -> Color: ...
|
|
88
|
+
def accent_name(accent: int) -> str | None: ...
|
|
89
|
+
def oklch(l: float, c: float, h_degrees: float, alpha: float) -> Color: ...
|
|
90
|
+
def mix(a: Color, b: Color, t: float) -> Color: ...
|
|
91
|
+
def alpha(c: Color, alpha_multiplier: float) -> Color: ...
|
|
92
|
+
def font_load_memory(ctx: Context, data: bytes | None, copy: bool) -> int: ...
|
|
93
|
+
def font_load_file(ctx: Context, path: str | None) -> int: ...
|
|
94
|
+
def font_set_role(ctx: Context, role: int, font: int) -> None: ...
|
|
95
|
+
def font_add_fallback(ctx: Context, font: int, fallback: int) -> None: ...
|
|
96
|
+
def box_begin(ctx: Context, *, id: str | None = ..., dir: int = ..., width: Size | None = ..., height: Size | None = ..., min_width: float = ..., max_width: float = ..., min_height: float = ..., max_height: float = ..., pad: float = ..., pad_x: float = ..., pad_y: float = ..., pad_top: float = ..., pad_right: float = ..., pad_bottom: float = ..., pad_left: float = ..., gap: float = ..., columns: int = ..., min_column_width: float = ..., wrap: bool = ..., align: int = ..., justify: int = ..., bg: Color | None = ..., border_color: Color | None = ..., border: float = ..., radius: float = ..., radius_tl: float = ..., radius_tr: float = ..., radius_br: float = ..., radius_bl: float = ..., elevation: int = ..., scroll_x: bool = ..., scroll_y: bool = ..., clip: bool = ..., opacity: float = ..., direction: int = ...) -> int: ...
|
|
97
|
+
def box_end(ctx: Context) -> None: ...
|
|
98
|
+
def row_begin(ctx: Context, *, id: str | None = ..., dir: int = ..., width: Size | None = ..., height: Size | None = ..., min_width: float = ..., max_width: float = ..., min_height: float = ..., max_height: float = ..., pad: float = ..., pad_x: float = ..., pad_y: float = ..., pad_top: float = ..., pad_right: float = ..., pad_bottom: float = ..., pad_left: float = ..., gap: float = ..., columns: int = ..., min_column_width: float = ..., wrap: bool = ..., align: int = ..., justify: int = ..., bg: Color | None = ..., border_color: Color | None = ..., border: float = ..., radius: float = ..., radius_tl: float = ..., radius_tr: float = ..., radius_br: float = ..., radius_bl: float = ..., elevation: int = ..., scroll_x: bool = ..., scroll_y: bool = ..., clip: bool = ..., opacity: float = ..., direction: int = ...) -> int: ...
|
|
99
|
+
def column_begin(ctx: Context, *, id: str | None = ..., dir: int = ..., width: Size | None = ..., height: Size | None = ..., min_width: float = ..., max_width: float = ..., min_height: float = ..., max_height: float = ..., pad: float = ..., pad_x: float = ..., pad_y: float = ..., pad_top: float = ..., pad_right: float = ..., pad_bottom: float = ..., pad_left: float = ..., gap: float = ..., columns: int = ..., min_column_width: float = ..., wrap: bool = ..., align: int = ..., justify: int = ..., bg: Color | None = ..., border_color: Color | None = ..., border: float = ..., radius: float = ..., radius_tl: float = ..., radius_tr: float = ..., radius_br: float = ..., radius_bl: float = ..., elevation: int = ..., scroll_x: bool = ..., scroll_y: bool = ..., clip: bool = ..., opacity: float = ..., direction: int = ...) -> int: ...
|
|
100
|
+
def spacer(ctx: Context) -> None: ...
|
|
101
|
+
def gap(ctx: Context, size: float) -> None: ...
|
|
102
|
+
def separator(ctx: Context) -> None: ...
|
|
103
|
+
def card_begin(ctx: Context, *, id: str | None = ..., width: Size | None = ..., height: Size | None = ..., min_width: float = ..., max_width: float = ..., pad: float = ..., pad_x: float = ..., pad_y: float = ..., gap: float = ..., dir: int = ..., align: int = ..., wrap: bool = ..., hoverable: bool = ..., muted: bool = ..., selected: bool = ...) -> bool: ...
|
|
104
|
+
def card_end(ctx: Context) -> None: ...
|
|
105
|
+
def scroll_begin(ctx: Context, *, id: str | None = ..., width: Size | None = ..., height: Size | None = ..., horizontal: bool = ..., pad: float = ..., gap: float = ..., fade_edges: bool = ..., fade_color: Color | None = ...) -> None: ...
|
|
106
|
+
def scroll_end(ctx: Context) -> None: ...
|
|
107
|
+
def scroll_to(ctx: Context, scroll_id: str | None, y: float) -> None: ...
|
|
108
|
+
def text(ctx: Context, text: str | None, *, font: int = ..., size: float = ..., color: Color | None = ..., align: int = ..., nowrap: bool = ..., tabular: bool = ..., selectable: bool = ..., width: Size | None = ..., line_height: float = ..., direction: int = ...) -> None: ...
|
|
109
|
+
def heading(ctx: Context, text: str | None, level: int) -> None: ...
|
|
110
|
+
def label(ctx: Context, text: str | None) -> None: ...
|
|
111
|
+
def secondary(ctx: Context, text: str | None) -> None: ...
|
|
112
|
+
def muted(ctx: Context, text: str | None) -> None: ...
|
|
113
|
+
def code(ctx: Context, text: str | None) -> None: ...
|
|
114
|
+
def kbd(ctx: Context, keys: str | None) -> None: ...
|
|
115
|
+
def link(ctx: Context, text: str | None) -> bool: ...
|
|
116
|
+
def icon(ctx: Context, icon: str | None, size: float, color: Color) -> None: ...
|
|
117
|
+
def button(ctx: Context, label: str | None, *, variant: int = ..., size: int = ..., icon: str | None = ..., icon_right: str | None = ..., disabled: bool = ..., loading: bool = ..., full_width: bool = ..., selected: bool = ..., tooltip: str | None = ..., shortcut: str | None = ..., width: Size | None = ..., color: Color | None = ...) -> bool: ...
|
|
118
|
+
def icon_button(ctx: Context, icon: str | None, *, variant: int = ..., size: int = ..., icon_right: str | None = ..., disabled: bool = ..., loading: bool = ..., full_width: bool = ..., selected: bool = ..., tooltip: str | None = ..., shortcut: str | None = ..., width: Size | None = ..., color: Color | None = ...) -> bool: ...
|
|
119
|
+
def segmented(ctx: Context, id: str | None, items: Sequence[str], index: Any = ..., *, size: int = ..., full_width: bool = ..., icons: Sequence[str] | None = ...) -> tuple[bool, Any]: ...
|
|
120
|
+
def checkbox(ctx: Context, label: str | None, value: Any = ..., *, description: str | None = ..., disabled: bool = ..., indeterminate: bool = ...) -> tuple[bool, Any]: ...
|
|
121
|
+
def switch(ctx: Context, label: str | None, value: Any = ..., *, description: str | None = ..., disabled: bool = ..., indeterminate: bool = ...) -> tuple[bool, Any]: ...
|
|
122
|
+
def radio(ctx: Context, label: str | None, option: int, value: Any = ..., *, description: str | None = ..., disabled: bool = ..., indeterminate: bool = ...) -> tuple[bool, Any]: ...
|
|
123
|
+
def radio_group(ctx: Context, id: str | None, items: Sequence[str], index: Any = ...) -> tuple[bool, Any]: ...
|
|
124
|
+
def slider(ctx: Context, label: str | None, min: float, max: float, value: Any = ..., *, step: float = ..., show_value: bool = ..., format: str | None = ..., disabled: bool = ..., width: Size | None = ...) -> tuple[bool, Any]: ...
|
|
125
|
+
def range_slider(ctx: Context, label: str | None, min: float, max: float, lo: Any = ..., hi: Any = ...) -> tuple[bool, Any, Any]: ...
|
|
126
|
+
def rating(ctx: Context, id: str | None, max: int, value: Any = ...) -> tuple[bool, Any]: ...
|
|
127
|
+
def chip(ctx: Context, label: str | None, selected: Any = ..., *, icon: str | None = ..., disabled: bool = ...) -> tuple[bool, Any]: ...
|
|
128
|
+
def input(ctx: Context, id: str | None, text: str = ..., *, label: str | None = ..., placeholder: str | None = ..., icon: str | None = ..., hint: str | None = ..., error: str | None = ..., password: bool = ..., disabled: bool = ..., clearable: bool = ..., autofocus: bool = ..., read_only: bool = ..., size: int = ..., width: Size | None = ..., height: float = ..., prefix: str | None = ..., suffix: str | None = ...) -> TextResult: ...
|
|
129
|
+
def textarea(ctx: Context, id: str | None, text: str = ..., *, label: str | None = ..., placeholder: str | None = ..., icon: str | None = ..., hint: str | None = ..., error: str | None = ..., password: bool = ..., disabled: bool = ..., clearable: bool = ..., autofocus: bool = ..., read_only: bool = ..., size: int = ..., width: Size | None = ..., height: float = ..., prefix: str | None = ..., suffix: str | None = ...) -> TextResult: ...
|
|
130
|
+
def search(ctx: Context, id: str | None, text: str = ..., *, label: str | None = ..., placeholder: str | None = ..., icon: str | None = ..., hint: str | None = ..., error: str | None = ..., password: bool = ..., disabled: bool = ..., clearable: bool = ..., autofocus: bool = ..., read_only: bool = ..., size: int = ..., width: Size | None = ..., height: float = ..., prefix: str | None = ..., suffix: str | None = ...) -> TextResult: ...
|
|
131
|
+
def number(ctx: Context, id: str | None, min: float, max: float, value: Any = ..., *, label: str | None = ..., step: float = ..., decimals: int = ..., disabled: bool = ..., width: Size | None = ..., suffix: str | None = ...) -> tuple[bool, Any]: ...
|
|
132
|
+
def select(ctx: Context, id: str | None, items: Sequence[str], index: Any = ..., *, label: str | None = ..., placeholder: str | None = ..., icons: Sequence[str] | None = ..., searchable: bool = ..., disabled: bool = ..., width: Size | None = ...) -> tuple[bool, Any]: ...
|
|
133
|
+
def date_today() -> Date: ...
|
|
134
|
+
def calendar(ctx: Context, id: str | None, value: Date = ...) -> tuple[bool, Date]: ...
|
|
135
|
+
def date_picker(ctx: Context, id: str | None, value: Date = ..., *, label: str | None = ..., placeholder: str | None = ..., width: Size | None = ...) -> tuple[bool, Date]: ...
|
|
136
|
+
def color_picker(ctx: Context, id: str | None, value: Color = ...) -> tuple[bool, Color]: ...
|
|
137
|
+
def tabs(ctx: Context, id: str | None, items: Sequence[str], index: Any = ..., *, variant: int = ..., icons: Sequence[str] | None = ..., full_width: bool = ...) -> tuple[bool, Any]: ...
|
|
138
|
+
def nav_item(ctx: Context, label: str | None, *, icon: str | None = ..., badge: str | None = ..., selected: bool = ..., group: str | None = ...) -> bool: ...
|
|
139
|
+
def nav_section(ctx: Context, title: str | None) -> None: ...
|
|
140
|
+
def breadcrumb(ctx: Context, items: Sequence[str]) -> int: ...
|
|
141
|
+
def pagination(ctx: Context, id: str | None, page_count: int, page: Any = ...) -> tuple[bool, Any]: ...
|
|
142
|
+
def stepper(ctx: Context, steps: Sequence[str], current: int) -> None: ...
|
|
143
|
+
def popover_begin(ctx: Context, id: str | None, *, placement: int = ..., width: float = ..., pad: float = ..., gap: float = ...) -> bool: ...
|
|
144
|
+
def popover_end(ctx: Context) -> None: ...
|
|
145
|
+
def tour(ctx: Context, id: str | None, steps: Sequence[TourStep], step: Any = ..., *, width: float = ..., padding: float = ..., block_target: bool = ..., next_label: str | None = ..., back_label: str | None = ..., done_label: str | None = ..., count_format: str | None = ...) -> tuple[int, Any]: ...
|
|
146
|
+
def popover_open(ctx: Context, id: str | None) -> None: ...
|
|
147
|
+
def popover_close(ctx: Context, id: str | None) -> None: ...
|
|
148
|
+
def popover_toggle(ctx: Context, id: str | None) -> None: ...
|
|
149
|
+
def popover_is_open(ctx: Context, id: str | None) -> bool: ...
|
|
150
|
+
def menu_begin(ctx: Context, label: str | None, *, icon: str | None = ..., variant: int = ..., placement: int = ..., width: float = ..., icon_only: bool = ...) -> bool: ...
|
|
151
|
+
def menu_end(ctx: Context) -> None: ...
|
|
152
|
+
def context_menu_begin(ctx: Context, id: str | None) -> bool: ...
|
|
153
|
+
def context_menu_end(ctx: Context) -> None: ...
|
|
154
|
+
def menu_item(ctx: Context, label: str | None, *, icon: str | None = ..., shortcut: str | None = ..., danger: bool = ..., disabled: bool = ..., checked: bool = ...) -> bool: ...
|
|
155
|
+
def menu_separator(ctx: Context) -> None: ...
|
|
156
|
+
def menu_label(ctx: Context, text: str | None) -> None: ...
|
|
157
|
+
def tooltip(ctx: Context, text: str | None) -> None: ...
|
|
158
|
+
def dialog_begin(ctx: Context, title: str | None, open: Any = ..., *, description: str | None = ..., width: float = ..., no_close_button: bool = ..., persistent: bool = ...) -> tuple[bool, Any]: ...
|
|
159
|
+
def dialog_end(ctx: Context) -> None: ...
|
|
160
|
+
def dialog_footer_begin(ctx: Context) -> None: ...
|
|
161
|
+
def dialog_footer_end(ctx: Context) -> None: ...
|
|
162
|
+
def sheet_begin(ctx: Context, title: str | None, open: Any = ..., *, side: int = ..., size: float = ..., description: str | None = ...) -> tuple[bool, Any]: ...
|
|
163
|
+
def sheet_end(ctx: Context) -> None: ...
|
|
164
|
+
def toast(ctx: Context, title: str | None, *, description: str | None = ..., tone: int = ..., duration: float = ..., action: str | None = ..., show_timer: bool = ...) -> int: ...
|
|
165
|
+
def toast_action_clicked(ctx: Context, handle: int) -> bool: ...
|
|
166
|
+
def toast_dismiss(ctx: Context, handle: int) -> None: ...
|
|
167
|
+
def alert(ctx: Context, title: str | None, *, description: str | None = ..., tone: int = ..., icon: str | None = ..., dismissible: bool = ...) -> bool: ...
|
|
168
|
+
def progress(ctx: Context, value: float, *, indeterminate: bool = ..., tone: int = ..., height: float = ..., label: str | None = ..., show_value: bool = ..., width: Size | None = ...) -> None: ...
|
|
169
|
+
def spinner(ctx: Context, size: float) -> None: ...
|
|
170
|
+
def skeleton(ctx: Context, width: Size, height: float) -> None: ...
|
|
171
|
+
def badge(ctx: Context, text: str | None, *, tone: int = ..., dot: bool = ..., solid: bool = ..., icon: str | None = ..., size: int = ...) -> None: ...
|
|
172
|
+
def avatar(ctx: Context, name: str | None, *, size: float = ..., image: int = ..., status: str | None = ..., square: bool = ...) -> None: ...
|
|
173
|
+
def avatar_group(ctx: Context, names: Sequence[str], max_visible: int, size: float) -> None: ...
|
|
174
|
+
def empty_state(ctx: Context, title: str | None, *, icon: str | None = ..., description: str | None = ..., action: str | None = ...) -> bool: ...
|
|
175
|
+
def metric(ctx: Context, label: str | None, value: str | None, *, delta: float = ..., delta_label: str | None = ..., spark: Any = ..., spark_count: int = ..., icon: str | None = ..., width: Size | None = ..., lower_is_better: bool = ...) -> None: ...
|
|
176
|
+
def meter(ctx: Context, label: str | None, used: float, total: float, unit: str | None) -> None: ...
|
|
177
|
+
def accordion_begin(ctx: Context, title: str | None, open: Any = ...) -> tuple[bool, Any]: ...
|
|
178
|
+
def accordion_end(ctx: Context) -> None: ...
|
|
179
|
+
def tree_begin(ctx: Context, label: str | None, open: Any = ..., *, icon: str | None = ..., leaf: bool = ..., selected: bool = ...) -> tuple[bool, Any]: ...
|
|
180
|
+
def tree_end(ctx: Context) -> None: ...
|
|
181
|
+
def tree_clicked(ctx: Context) -> bool: ...
|
|
182
|
+
def list_item(ctx: Context, title: str | None, *, icon: str | None = ..., subtitle: str | None = ..., trailing: str | None = ..., selected: bool = ..., avatar: str | None = ...) -> bool: ...
|
|
183
|
+
def virtual_list_begin(ctx: Context, id: str | None, count: int, row_height: float, height: Size, first: Any = ..., last: Any = ...) -> tuple[Any, Any]: ...
|
|
184
|
+
def virtual_list_end(ctx: Context) -> None: ...
|
|
185
|
+
def table_begin(ctx: Context, id: str | None, columns: Sequence[TableColumn], *, sort: Any = ..., height: Size | None = ..., striped: bool = ..., compact: bool = ..., selectable: bool = ...) -> bool: ...
|
|
186
|
+
def table_row(ctx: Context, selected: bool) -> bool: ...
|
|
187
|
+
def table_cell(ctx: Context) -> None: ...
|
|
188
|
+
def table_cell_text(ctx: Context, text: str | None) -> None: ...
|
|
189
|
+
def table_end(ctx: Context) -> None: ...
|
|
190
|
+
def sparkline(ctx: Context, values: Sequence[float], width: Size, height: float, color: Color) -> None: ...
|
|
191
|
+
def gauge(ctx: Context, label: str | None, value: float, size: float) -> None: ...
|
|
192
|
+
def image_create(ctx: Context, w: int, h: int, rgba: bytes | None) -> int: ...
|
|
193
|
+
def image_load(ctx: Context, path: str | None, w: Any = ..., h: Any = ...) -> tuple[int, Any, Any]: ...
|
|
194
|
+
def image_destroy(ctx: Context, tex: int) -> None: ...
|
|
195
|
+
def image(ctx: Context, tex: int, *, width: Size | None = ..., height: Size | None = ..., radius: float = ..., tint: Color | None = ...) -> None: ...
|
|
196
|
+
def image_viewer(ctx: Context, id: str | None, tex: int, image_w: int, image_h: int, view: ImageView, *, width: Size | None = ..., height: Size | None = ..., max_zoom: float = ..., no_toolbar: bool = ..., checkerboard: bool = ...) -> bool: ...
|
|
197
|
+
def cropper(ctx: Context, id: str | None, tex: int, image_w: int, image_h: int, crop: Rect = ..., *, width: Size | None = ..., height: Size | None = ..., aspect: float = ..., round: bool = ..., min_size: float = ...) -> tuple[bool, Rect]: ...
|
|
198
|
+
def command_palette(ctx: Context, commands: Sequence[Command], open: Any = ...) -> tuple[int, Any]: ...
|
|
199
|
+
def radio_cards(ctx: Context, id: str | None, choices: Sequence[Choice], index: Any = ..., *, columns: int = ...) -> tuple[bool, Any]: ...
|
|
200
|
+
def tag_input(ctx: Context, id: str | None, text: str = ..., *, label: str | None = ..., placeholder: str | None = ..., max_tags: int = ..., width: Size | None = ...) -> TextResult: ...
|
|
201
|
+
def otp_input(ctx: Context, id: str | None, code: str | None, length: int) -> bool: ...
|
|
202
|
+
def button_group_begin(ctx: Context) -> None: ...
|
|
203
|
+
def button_group_end(ctx: Context) -> None: ...
|
|
204
|
+
def copy_button(ctx: Context, id: str | None, text: str | None) -> bool: ...
|
|
205
|
+
def hold_button(ctx: Context, label: str | None, *, duration: float = ..., icon: str | None = ..., variant: int = ...) -> bool: ...
|
|
206
|
+
def password_strength(ctx: Context, password: str | None) -> int: ...
|
|
207
|
+
def timeline_item(ctx: Context, title: str | None, *, time: str | None = ..., description: str | None = ..., icon: str | None = ..., tone: int = ..., last: bool = ...) -> None: ...
|
|
208
|
+
def reorder_begin(ctx: Context, id: str | None, count: int, order: Any = ...) -> Any: ...
|
|
209
|
+
def reorder_end(ctx: Context) -> bool: ...
|
|
210
|
+
def reorder_item_begin(ctx: Context, position: int) -> None: ...
|
|
211
|
+
def reorder_item_end(ctx: Context) -> None: ...
|
|
212
|
+
def progress_ring(ctx: Context, label: str | None, value: float, size: float) -> None: ...
|
|
213
|
+
def split_button(ctx: Context, label: str | None, items: Sequence[str], *, variant: int = ..., size: int = ..., icon: str | None = ..., item_icons: Sequence[str] | None = ..., disabled: bool = ...) -> int: ...
|
|
214
|
+
def toggle_group(ctx: Context, id: str | None, labels: Sequence[str], values: Any = ..., *, icons: Sequence[str] | None = ..., exclusive: bool = ..., icon_only: bool = ..., size: int = ...) -> tuple[bool, Any]: ...
|
|
215
|
+
def confirm_button(ctx: Context, label: str | None, *, confirm_label: str | None = ..., icon: str | None = ..., variant: int = ..., size: int = ..., timeout: float = ...) -> bool: ...
|
|
216
|
+
def status_button(ctx: Context, label: str | None, status: int, *, busy_label: str | None = ..., success_label: str | None = ..., error_label: str | None = ..., icon: str | None = ..., variant: int = ..., size: int = ...) -> bool: ...
|
|
217
|
+
def speed_dial(ctx: Context, id: str | None, actions: Sequence[SpeedAction], *, icon: str | None = ..., placement: int = ..., tooltip: str | None = ...) -> int: ...
|
|
218
|
+
def theme_switcher(ctx: Context, with_system: bool, mode: Any = ...) -> tuple[bool, Any]: ...
|
|
219
|
+
def theme_toggle(ctx: Context) -> bool: ...
|
|
220
|
+
def user_menu_begin(ctx: Context, name: str | None, *, detail: str | None = ..., status: str | None = ..., avatar: int = ..., compact: bool = ..., placement: int = ..., width: float = ...) -> bool: ...
|
|
221
|
+
def user_menu_end(ctx: Context) -> None: ...
|
|
222
|
+
def swipe_item_begin(ctx: Context, id: str | None, left: Sequence[SwipeAction], right: Sequence[SwipeAction]) -> None: ...
|
|
223
|
+
def swipe_item_end(ctx: Context) -> int: ...
|
|
224
|
+
def data_grid_begin(ctx: Context, id: str | None, columns: Sequence[GridColumn], row_count: int, first: Any = ..., last: Any = ..., *, width: Size | None = ..., height: Size | None = ..., row_height: float = ..., selected: Any = ..., sort: Any = ..., striped: bool = ..., cursor: Any = ..., hide_checkboxes: bool = ..., anchor: Any = ...) -> tuple[bool, Any, Any]: ...
|
|
225
|
+
def data_grid_row(ctx: Context, row: int) -> bool: ...
|
|
226
|
+
def data_grid_cell(ctx: Context) -> None: ...
|
|
227
|
+
def data_grid_cell_text(ctx: Context, text: str | None) -> None: ...
|
|
228
|
+
def data_grid_cell_edit(ctx: Context, text: str = ...) -> TextResult: ...
|
|
229
|
+
def data_grid_edit(ctx: Context, text: str = ...) -> TextResult: ...
|
|
230
|
+
def data_grid_end(ctx: Context) -> None: ...
|
|
231
|
+
def tree_cell(ctx: Context, label: str | None, depth: int, has_children: bool, icon: str | None, open: Any = ...) -> tuple[bool, Any]: ...
|
|
232
|
+
def tree_table_row(ctx: Context) -> int: ...
|
|
233
|
+
def tree_table_name(ctx: Context, label: str | None, icon: str | None) -> None: ...
|
|
234
|
+
def tree_table_depth(ctx: Context) -> int: ...
|
|
235
|
+
def path_bar_menu_begin(ctx: Context, id: str | None, segment: Any = ...) -> tuple[bool, Any]: ...
|
|
236
|
+
def path_bar_menu_end(ctx: Context) -> None: ...
|
|
237
|
+
def file_picker(ctx: Context, id: str | None, open: Any = ..., text: str = ..., *, title: str | None = ..., save: bool = ..., folders: bool = ..., start: str | None = ..., name: str | None = ..., filter: str | None = ..., filter_label: str | None = ..., list: Any = ..., list_user: Any = ...) -> tuple[TextResult, Any]: ...
|
|
238
|
+
def code_block(ctx: Context, id: str | None, code: str | None, *, lang: str | None = ..., title: str | None = ..., line_numbers: bool = ..., highlight_from: int = ..., highlight_to: int = ..., max_height: float = ..., size: float = ..., no_header: bool = ...) -> None: ...
|
|
239
|
+
def json_view(ctx: Context, id: str | None, json: str | None, *, expand_depth: int = ..., max_height: float = ...) -> bool: ...
|
|
240
|
+
def markdown_apply_task(text: str | None, result: Sequence[MarkdownResult]) -> bool: ...
|
|
241
|
+
def code_editor_goto(ctx: Context, id: str | None, line: int, column: int) -> None: ...
|
|
242
|
+
def code_editor_select(ctx: Context, id: str | None, anchor: int, cursor: int) -> None: ...
|
|
243
|
+
def code_editor_find(ctx: Context, id: str | None, query: str | None) -> None: ...
|
|
244
|
+
def diff_view_rows(ctx: Context, id: str | None, first: int, cap: int, rows: DiffRow) -> int: ...
|
|
245
|
+
def diff_words(old_line: str | None, old_len: int, new_line: str | None, new_len: int, cap: int, old_ranges: DiffRange, old_count: Any = ..., new_ranges: DiffRange, new_count: Any = ...) -> tuple[bool, Any, Any]: ...
|
|
246
|
+
def chat_message(ctx: Context, text: str | None, *, mine: bool = ..., author: str | None = ..., time: str | None = ..., status: str | None = ..., grouped: bool = ..., last_in_group: bool = ..., avatar: int = ..., markdown: bool = ..., markdown_result: Any = ...) -> None: ...
|
|
247
|
+
def chat_divider(ctx: Context, label: str | None) -> None: ...
|
|
248
|
+
def typing_indicator(ctx: Context, name: str | None) -> None: ...
|
|
249
|
+
def comment(ctx: Context, id: str | None, author: str | None, text: str | None, *, time: str | None = ..., depth: int = ..., likes: Any = ..., liked: Any = ..., edited: bool = ..., badge: str | None = ...) -> int: ...
|
|
250
|
+
def presence(ctx: Context, id: str | None, users: Sequence[PresenceUser], max_visible: int, size: float) -> None: ...
|
|
251
|
+
def carousel_begin(ctx: Context, id: str | None, count: int, index: Any = ..., *, height: float = ..., auto_advance: float = ..., gap: float = ..., no_arrows: bool = ..., no_dots: bool = ..., loop: bool = ...) -> tuple[bool, Any]: ...
|
|
252
|
+
def carousel_slide_begin(ctx: Context) -> None: ...
|
|
253
|
+
def carousel_slide_end(ctx: Context) -> None: ...
|
|
254
|
+
def carousel_end(ctx: Context) -> None: ...
|
|
255
|
+
def image_compare(ctx: Context, id: str | None, before: int, after: int, pos: Any = ..., *, width: Size | None = ..., height: float = ..., before_label: str | None = ..., after_label: str | None = ..., aspect: float = ...) -> tuple[bool, Any]: ...
|
|
256
|
+
def card_stack_begin(ctx: Context, id: str | None, count: int, *, width: Size | None = ..., height: float = ..., visible: int = ...) -> None: ...
|
|
257
|
+
def card_stack_item_begin(ctx: Context, depth: int) -> None: ...
|
|
258
|
+
def card_stack_item_end(ctx: Context) -> None: ...
|
|
259
|
+
def card_stack_end(ctx: Context) -> int: ...
|
|
260
|
+
def counter(ctx: Context, id: str | None, value: float, *, format: str | None = ..., size: float = ..., font: int = ..., color: Color | None = ..., group_thousands: bool = ...) -> None: ...
|
|
261
|
+
def ticker(ctx: Context, id: str | None, items: Sequence[TickerItem], *, speed: float = ..., height: float = ...) -> None: ...
|
|
262
|
+
def heatmap(ctx: Context, id: str | None, rows: int, cols: int, values: Any = ..., *, row_labels: Sequence[str] | None = ..., col_labels: Sequence[str] | None = ..., cell: float = ..., min: float = ..., max: float = ..., color: Color | None = ..., format: str | None = ..., width: Size | None = ...) -> tuple[int, Any]: ...
|
|
263
|
+
def calendar_heatmap(ctx: Context, id: str | None, start: Date, days: int, values: Any = ..., *, cell: float = ..., color: Color | None = ..., format: str | None = ..., unit: str | None = ...) -> tuple[int, Any]: ...
|
|
264
|
+
def treemap(ctx: Context, id: str | None, items: Sequence[VizItem], *, width: Size | None = ..., height: float = ..., format: str | None = ...) -> int: ...
|
|
265
|
+
def funnel(ctx: Context, id: str | None, stages: Sequence[VizItem], *, width: Size | None = ..., height: float = ..., format: str | None = ..., color: Color | None = ...) -> int: ...
|
|
266
|
+
def sankey(ctx: Context, id: str | None, nodes: Sequence[str], links: Sequence[SankeyLink], *, width: Size | None = ..., height: float = ..., format: str | None = ..., node_width: float = ...) -> int: ...
|
|
267
|
+
def waffle(ctx: Context, id: str | None, items: Sequence[VizItem], *, cell: float = ..., columns: int = ..., rows: int = ..., format: str | None = ...) -> int: ...
|
|
268
|
+
def split_bar(ctx: Context, id: str | None, items: Sequence[VizItem], *, width: Size | None = ..., height: float = ..., format: str | None = ..., no_legend: bool = ...) -> int: ...
|
|
269
|
+
def bar_list(ctx: Context, id: str | None, items: Sequence[VizItem], *, width: Size | None = ..., format: str | None = ..., max_rows: int = ..., keep_order: bool = ..., color: Color | None = ...) -> int: ...
|
|
270
|
+
def activity_rings(ctx: Context, id: str | None, rings: Sequence[VizItem], *, size: float = ..., thickness: float = ..., center: str | None = ..., caption: str | None = ..., legend: bool = ...) -> int: ...
|
|
271
|
+
def radial_gauge(ctx: Context, id: str | None, value: float, min: float, max: float, *, label: str | None = ..., format: str | None = ..., unit: str | None = ..., size: float = ..., sweep: float = ..., bands: Any = ..., band_count: int = ..., ticks: int = ..., target: float = ..., show_target: bool = ..., no_needle: bool = ...) -> None: ...
|
|
272
|
+
def candlestick(ctx: Context, id: str | None, candles: Sequence[Candle], *, width: Size | None = ..., height: float = ..., labels: Sequence[str] | None = ..., format: str | None = ..., overlays: Any = ..., overlay_count: int = ..., no_volume: bool = ..., ohlc: bool = ..., up: Color | None = ..., down: Color | None = ...) -> int: ...
|
|
273
|
+
def shimmer_text(ctx: Context, text: str | None, *, font: int = ..., size: float = ..., color: Color | None = ..., width: Size | None = ..., nowrap: bool = ..., speed: float = ..., delay: float = ..., caret: bool = ...) -> None: ...
|
|
274
|
+
def typewriter(ctx: Context, id: str | None, text: str | None, *, font: int = ..., size: float = ..., color: Color | None = ..., width: Size | None = ..., nowrap: bool = ..., speed: float = ..., delay: float = ..., caret: bool = ...) -> bool: ...
|
|
275
|
+
def text_reveal(ctx: Context, id: str | None, text: str | None, *, font: int = ..., size: float = ..., color: Color | None = ..., width: Size | None = ..., nowrap: bool = ..., speed: float = ..., delay: float = ..., caret: bool = ...) -> None: ...
|
|
276
|
+
def word_rotate(ctx: Context, id: str | None, words: Sequence[str], interval: float, *, font: int = ..., size: float = ..., color: Color | None = ..., width: Size | None = ..., nowrap: bool = ..., speed: float = ..., delay: float = ..., caret: bool = ...) -> None: ...
|
|
277
|
+
def number_roll(ctx: Context, id: str | None, text: str | None, *, font: int = ..., size: float = ..., color: Color | None = ..., width: Size | None = ..., nowrap: bool = ..., speed: float = ..., delay: float = ..., caret: bool = ...) -> None: ...
|
|
278
|
+
def gradient_text(ctx: Context, text: str | None, *, font: int = ..., size: float = ..., from_: Color | None = ..., to: Color | None = ..., animate: bool = ..., width: Size | None = ...) -> None: ...
|
|
279
|
+
def spotlight_begin(ctx: Context, id: str | None, *, width: Size | None = ..., height: Size | None = ..., pad: float = ..., gap: float = ..., color: Color | None = ..., beam: bool = ...) -> None: ...
|
|
280
|
+
def spotlight_end(ctx: Context) -> None: ...
|
|
281
|
+
def loader(ctx: Context, *, style: int = ..., size: float = ..., color: Color | None = ...) -> None: ...
|
|
282
|
+
def dock_begin(ctx: Context, id: str | None, *, size: float = ..., magnify: float = ...) -> None: ...
|
|
283
|
+
def dock_item(ctx: Context, icon: str | None, label: str | None, *, color: Color | None = ..., running: bool = ..., badge: int = ...) -> bool: ...
|
|
284
|
+
def dock_separator(ctx: Context) -> None: ...
|
|
285
|
+
def dock_end(ctx: Context) -> None: ...
|
|
286
|
+
def tab_bar(ctx: Context, id: str | None, items: Sequence[TabBarItem], selected: Any = ..., *, width: Size | None = ..., labels_on_selected_only: bool = ...) -> tuple[bool, Any]: ...
|
|
287
|
+
def control_tile(ctx: Context, label: str | None, on: Any = ..., *, icon: str | None = ..., detail: str | None = ..., color: Color | None = ..., width: Size | None = ..., wide: bool = ...) -> tuple[bool, Any]: ...
|
|
288
|
+
def waveform(ctx: Context, id: str | None, peaks: Sequence[float], progress: Any = ..., *, width: Size | None = ..., height: float = ..., bar: float = ..., gap: float = ..., color: Color | None = ...) -> tuple[bool, Any]: ...
|
|
289
|
+
def now_playing(ctx: Context, id: str | None, np: NowPlaying, *, width: Size | None = ..., compact: bool = ...) -> int: ...
|
|
290
|
+
def reasoning_begin(ctx: Context, id: str | None, *, thinking: bool = ..., seconds: float = ..., title: str | None = ...) -> bool: ...
|
|
291
|
+
def reasoning_end(ctx: Context) -> None: ...
|
|
292
|
+
def tool_call(ctx: Context, id: str | None, name: str | None, *, status: int = ..., icon: str | None = ..., detail: str | None = ..., input: str | None = ..., output: str | None = ..., seconds: float = ...) -> None: ...
|
|
293
|
+
def agent_plan(ctx: Context, id: str | None, steps: Sequence[PlanStep], *, title: str | None = ...) -> int: ...
|
|
294
|
+
def agent_status(ctx: Context, text: str | None, *, status: int = ..., seconds: float = ..., icon: str | None = ...) -> None: ...
|
|
295
|
+
def source_list(ctx: Context, id: str | None, sources: Sequence[Source]) -> int: ...
|
|
296
|
+
def citation(ctx: Context, number: int, source: Sequence[Source]) -> bool: ...
|
|
297
|
+
def context_meter(ctx: Context, id: str | None, used: float, limit: float, *, parts: Any = ..., part_count: int = ..., unit: str | None = ...) -> None: ...
|
|
298
|
+
def response_actions(ctx: Context, id: str | None, *, copy_text: str | None = ..., vote: Any = ..., no_regenerate: bool = ..., no_share: bool = ...) -> int: ...
|
|
299
|
+
def prompt_suggestions(ctx: Context, id: str | None, items: Sequence[PromptSuggestion], *, columns: int = ...) -> int: ...
|
|
300
|
+
def model_picker(ctx: Context, id: str | None, models: Sequence[Model], selected: Any = ..., *, ghost: bool = ..., placement: int = ...) -> tuple[bool, Any]: ...
|
|
301
|
+
def chat_composer(ctx: Context, id: str | None, text: str = ..., *, placeholder: str | None = ..., busy: bool = ..., attachments: Sequence[str] | None = ..., attachment_count: int = ..., removed: Any = ..., models: Any = ..., model_count: int = ..., model: Any = ..., max_lines: int = ..., width: Size | None = ...) -> TextResult: ...
|
|
302
|
+
def voice_orb(ctx: Context, id: str | None, state: int, level: float, *, size: float = ..., color: Color | None = ...) -> bool: ...
|
|
303
|
+
def kanban_begin(ctx: Context, id: str | None) -> None: ...
|
|
304
|
+
def kanban_column_begin(ctx: Context, title: str | None, card_count: int, *, dot: Color | None = ..., limit: int = ..., width: float = ...) -> bool: ...
|
|
305
|
+
def kanban_card_begin(ctx: Context, card_id: int) -> bool: ...
|
|
306
|
+
def kanban_card_end(ctx: Context) -> None: ...
|
|
307
|
+
def kanban_column_end(ctx: Context) -> None: ...
|
|
308
|
+
def kanban_end(ctx: Context, move: KanbanMove) -> bool: ...
|
|
309
|
+
def hover_card_begin(ctx: Context, id: str | None, *, placement: int = ..., width: float = ..., delay: float = ...) -> bool: ...
|
|
310
|
+
def hover_card_end(ctx: Context) -> None: ...
|
|
311
|
+
def confirm_popover(ctx: Context, id: str | None, *, title: str | None = ..., description: str | None = ..., confirm_label: str | None = ..., cancel_label: str | None = ..., danger: bool = ..., placement: int = ...) -> bool: ...
|
|
312
|
+
def expandable_text(ctx: Context, id: str | None, text: str | None, *, lines: int = ..., size: float = ..., color: Color | None = ..., fade_to: Color | None = ...) -> bool: ...
|
|
313
|
+
def expandable_card_begin(ctx: Context, title: str | None, open: Any = ..., *, description: str | None = ..., icon: str | None = ..., badge: str | None = ..., badge_tone: int = ...) -> tuple[bool, Any]: ...
|
|
314
|
+
def expandable_card_end(ctx: Context) -> None: ...
|
|
315
|
+
def toc(ctx: Context, scroll_id: str | None, items: Sequence[TocItem]) -> int: ...
|
|
316
|
+
def toc_anchor(ctx: Context, anchor: str | None) -> None: ...
|
|
317
|
+
def banner(ctx: Context, text: str | None, open: Any = ..., *, tone: int = ..., icon: str | None = ..., action: str | None = ..., dismissible: bool = ...) -> tuple[bool, Any]: ...
|
|
318
|
+
def countdown(ctx: Context, id: str | None, seconds_left: float, *, hide_days: bool = ..., compact: bool = ...) -> None: ...
|
|
319
|
+
def multi_select(ctx: Context, id: str | None, items: Sequence[str], selected: Any = ..., *, label: str | None = ..., placeholder: str | None = ..., icons: Sequence[str] | None = ..., searchable: bool = ..., max_chips: int = ..., width: Size | None = ...) -> tuple[bool, Any]: ...
|
|
320
|
+
def range_calendar(ctx: Context, id: str | None, months: int, range: DateRange) -> bool: ...
|
|
321
|
+
def date_range_picker(ctx: Context, id: str | None, range: DateRange, *, label: str | None = ..., placeholder: str | None = ..., width: Size | None = ..., no_presets: bool = ...) -> bool: ...
|
|
322
|
+
def date_to_days(d: Date) -> int: ...
|
|
323
|
+
def date_from_days(days: int) -> Date: ...
|
|
324
|
+
def time_picker(ctx: Context, id: str | None, hour: Any = ..., minute: Any = ..., *, label: str | None = ..., twelve_hour: bool = ..., minute_step: int = ..., width: Size | None = ...) -> tuple[bool, Any, Any]: ...
|
|
325
|
+
def wheel_picker(ctx: Context, id: str | None, items: Sequence[str], index: Any = ..., *, rows: int = ..., width: Size | None = ..., loop: bool = ..., join_left: bool = ..., join_right: bool = ...) -> tuple[bool, Any]: ...
|
|
326
|
+
def time_dial(ctx: Context, id: str | None, size: float, hour: Any = ..., minute: Any = ...) -> tuple[bool, Any, Any]: ...
|
|
327
|
+
def ruler_slider(ctx: Context, label: str | None, min: float, max: float, value: Any = ..., *, step: float = ..., major_every: int = ..., spacing: float = ..., format: str | None = ..., unit: str | None = ..., width: Size | None = ...) -> tuple[bool, Any]: ...
|
|
328
|
+
def histogram_slider(ctx: Context, label: str | None, bins: Sequence[float], min: float, max: float, lo: Any = ..., hi: Any = ..., *, height: float = ..., format: str | None = ...) -> tuple[bool, Any, Any]: ...
|
|
329
|
+
def knob(ctx: Context, id: str | None, min: float, max: float, value: Any = ..., *, label: str | None = ..., format: str | None = ..., unit: str | None = ..., size: float = ..., step: float = ..., reset: float = ..., bipolar: bool = ..., log_scale: bool = ..., hide_value: bool = ..., disabled: bool = ..., color: Color | None = ...) -> tuple[bool, Any]: ...
|
|
330
|
+
def fader(ctx: Context, id: str | None, min: float, max: float, value: Any = ..., *, label: str | None = ..., format: str | None = ..., unit: str | None = ..., length: float = ..., horizontal: bool = ..., step: float = ..., reset: float = ..., ticks: Any = ..., tick_count: int = ..., meter: Any = ..., meter_channels: int = ..., hide_value: bool = ..., disabled: bool = ...) -> tuple[bool, Any]: ...
|
|
331
|
+
def level_meter(ctx: Context, id: str | None, channels: int, levels: Any = ..., *, min_db: float = ..., max_db: float = ..., length: float = ..., thickness: float = ..., horizontal: bool = ..., scale: bool = ..., segmented: bool = ..., hold: float = ..., decay: float = ...) -> tuple[bool, Any]: ...
|
|
332
|
+
def signature_pad(ctx: Context, id: str | None, *, width: Size | None = ..., height: float = ..., placeholder: str | None = ..., ink: Color | None = ...) -> bool: ...
|
|
333
|
+
def signature_clear(ctx: Context, id: str | None) -> None: ...
|
|
334
|
+
def dropzone(ctx: Context, id: str | None, *, title: str | None = ..., description: str | None = ..., icon: str | None = ..., accept: str | None = ..., height: float = ..., width: Size | None = ..., compact: bool = ...) -> int: ...
|
|
335
|
+
def path_has_extension(path: str | None, accept: str | None) -> bool: ...
|
|
336
|
+
def avatar_upload(ctx: Context, id: str | None, name: str | None, size: float, image: Any = ...) -> tuple[int, Any]: ...
|
|
337
|
+
def inline_edit(ctx: Context, id: str | None, text: str = ..., *, font: int = ..., size: float = ..., placeholder: str | None = ..., width: Size | None = ...) -> TextResult: ...
|
|
338
|
+
def scrub(ctx: Context, label: str | None, min: float, max: float, value: Any = ..., *, step: float = ..., format: str | None = ..., suffix: str | None = ..., icon: str | None = ..., width: Size | None = ...) -> tuple[bool, Any]: ...
|
|
339
|
+
def money_input(ctx: Context, id: str | None, value: Any = ..., *, label: str | None = ..., symbol: str | None = ..., code: str | None = ..., decimals: int = ..., width: Size | None = ..., hint: str | None = ...) -> tuple[bool, Any]: ...
|
|
340
|
+
def shortcut_recorder(ctx: Context, id: str | None, combo: KeyCombo = ..., *, placeholder: str | None = ..., width: Size | None = ...) -> tuple[bool, KeyCombo]: ...
|
|
341
|
+
def shortcut_label(ctx: Context, combo: KeyCombo) -> str | None: ...
|
|
342
|
+
def key_name(key: int) -> str | None: ...
|
|
343
|
+
def node_editor_begin(ctx: Context, id: str | None, view: NodeView, *, width: Size | None = ..., height: Size | None = ..., min_zoom: float = ..., max_zoom: float = ..., no_grid: bool = ..., minimap: bool = ...) -> bool: ...
|
|
344
|
+
def node_editor_end(ctx: Context) -> None: ...
|
|
345
|
+
def node_begin(ctx: Context, node_id: int, title: str | None, x: Any = ..., y: Any = ..., *, width: float = ..., icon: str | None = ...) -> tuple[bool, Any, Any]: ...
|
|
346
|
+
def node_end(ctx: Context) -> None: ...
|
|
347
|
+
def node_input(ctx: Context, pin_id: int, label: str | None, *, type: int = ...) -> bool: ...
|
|
348
|
+
def node_output(ctx: Context, pin_id: int, label: str | None, *, type: int = ...) -> bool: ...
|
|
349
|
+
def node_content_begin(ctx: Context) -> None: ...
|
|
350
|
+
def node_content_end(ctx: Context) -> None: ...
|
|
351
|
+
def node_link(ctx: Context, link_id: int, from_pin: int, to_pin: int) -> bool: ...
|
|
352
|
+
def node_link_created(ctx: Context, from_pin: Any = ..., to_pin: Any = ...) -> tuple[bool, Any, Any]: ...
|
|
353
|
+
def node_link_removed(ctx: Context, link_id: Any = ...) -> tuple[bool, Any]: ...
|
|
354
|
+
def node_deleted(ctx: Context, node_id: Any = ...) -> tuple[bool, Any]: ...
|
|
355
|
+
def menu_bar_begin(ctx: Context, id: str | None, *, no_border: bool = ...) -> None: ...
|
|
356
|
+
def menu_bar_end(ctx: Context) -> None: ...
|
|
357
|
+
def menu_bar_menu_begin(ctx: Context, label: str | None, *, mnemonic: Any = ..., width: float = ..., disabled: bool = ...) -> bool: ...
|
|
358
|
+
def menu_bar_menu_end(ctx: Context) -> None: ...
|
|
359
|
+
def toolbar_begin(ctx: Context, id: str | None, *, no_border: bool = ...) -> None: ...
|
|
360
|
+
def toolbar_end(ctx: Context) -> None: ...
|
|
361
|
+
def toolbar_button(ctx: Context, icon: str | None, *, label: str | None = ..., tooltip: str | None = ..., shortcut: str | None = ..., toggle: Any = ..., disabled: bool = ...) -> bool: ...
|
|
362
|
+
def toolbar_separator(ctx: Context) -> None: ...
|
|
363
|
+
def toolbar_spacer(ctx: Context) -> None: ...
|
|
364
|
+
def status_bar_begin(ctx: Context, id: str | None, *, no_border: bool = ...) -> None: ...
|
|
365
|
+
def status_bar_end(ctx: Context) -> None: ...
|
|
366
|
+
def status_bar_spacer(ctx: Context) -> None: ...
|
|
367
|
+
def status_bar_text(ctx: Context, text: str | None, *, icon: str | None = ..., tone: int = ..., tooltip: str | None = ..., disabled: bool = ...) -> None: ...
|
|
368
|
+
def status_bar_item(ctx: Context, label: str | None, *, icon: str | None = ..., tone: int = ..., tooltip: str | None = ..., disabled: bool = ...) -> bool: ...
|
|
369
|
+
def status_bar_progress(ctx: Context, value: float, *, label: str | None = ..., indeterminate: bool = ..., width: float = ...) -> None: ...
|
|
370
|
+
def dockspace_begin(ctx: Context, id: str | None, *, layout: str | None = ..., width: Size | None = ..., height: Size | None = ..., min_panel_width: float = ..., min_panel_height: float = ..., shortcuts: bool = ...) -> None: ...
|
|
371
|
+
def dockspace_end(ctx: Context) -> None: ...
|
|
372
|
+
def dock_panel_begin(ctx: Context, title: str | None, open: Any = ..., *, icon: str | None = ..., dirty: bool = ...) -> tuple[bool, Any]: ...
|
|
373
|
+
def dock_panel_end(ctx: Context) -> None: ...
|
|
374
|
+
def dock_save(ctx: Context, id: str | None, text: str = ...) -> TextResult: ...
|
|
375
|
+
def dock_load(ctx: Context, id: str | None, text: str | None) -> bool: ...
|
|
376
|
+
def inspector_begin(ctx: Context, id: str | None, *, width: Size | None = ..., label_width: float = ...) -> bool: ...
|
|
377
|
+
def inspector_end(ctx: Context) -> None: ...
|
|
378
|
+
def inspector_group(ctx: Context, title: str | None, open: Any = ...) -> tuple[bool, Any]: ...
|
|
379
|
+
def prop_float(ctx: Context, label: str | None, value: Any = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> tuple[bool, Any]: ...
|
|
380
|
+
def prop_int(ctx: Context, label: str | None, value: Any = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> tuple[bool, Any]: ...
|
|
381
|
+
def prop_text(ctx: Context, label: str | None, text: str = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> TextResult: ...
|
|
382
|
+
def prop_bool(ctx: Context, label: str | None, value: Any = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> tuple[bool, Any]: ...
|
|
383
|
+
def prop_enum(ctx: Context, label: str | None, items: Sequence[str], index: Any = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> tuple[bool, Any]: ...
|
|
384
|
+
def prop_color(ctx: Context, label: str | None, value: Color = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> tuple[bool, Color]: ...
|
|
385
|
+
def prop_vec(ctx: Context, label: str | None, components: int, value: Any = ..., *, min: float = ..., max: float = ..., step: float = ..., format: str | None = ..., suffix: str | None = ..., placeholder: str | None = ..., tooltip: str | None = ..., disabled: bool = ..., checkbox: bool = ...) -> tuple[bool, Any]: ...
|
|
386
|
+
def log_append_text(level: int, time: float, text: str | None, len: int, buf: LogBuffer) -> None: ...
|
|
387
|
+
def log_clear(buf: LogBuffer) -> None: ...
|
|
388
|
+
def log_view(ctx: Context, id: str | None, buf: LogBuffer, *, width: Size | None = ..., height: float = ..., timestamps: bool = ..., no_toolbar: bool = ..., size: float = ...) -> None: ...
|
|
389
|
+
def terminal_write(data: str | None, len: int, t: TerminalBuffer) -> None: ...
|
|
390
|
+
def terminal_clear(t: TerminalBuffer) -> None: ...
|
|
391
|
+
def emoji_font_load_file(ctx: Context, path: str | None) -> bool: ...
|
|
392
|
+
def emoji_font_load_memory(ctx: Context, data: bytes | None, copy: bool) -> bool: ...
|
|
393
|
+
def emoji_font_load_system(ctx: Context) -> bool: ...
|
|
394
|
+
def emoji_supported(ctx: Context, utf8: str | None, len: int) -> bool: ...
|
|
395
|
+
def draw_emoji(ctx: Context, utf8: str | None, len: int, r: Rect) -> None: ...
|
|
396
|
+
def emoji(ctx: Context, utf8: str | None, size: float) -> None: ...
|
|
397
|
+
def emoji_picker(ctx: Context, id: str | None, *, width: Size | None = ..., height: float = ..., size: float = ..., recent: str | None = ..., recent_cap: int = ..., tone: Any = ..., placeholder: str | None = ..., empty_text: str | None = ..., hint: str | None = ..., group_names: Sequence[str] | None = ..., no_search: bool = ..., no_preview: bool = ..., no_tone: bool = ...) -> str | None: ...
|
|
398
|
+
def hex_view_goto(ctx: Context, id: str | None, offset: int) -> None: ...
|
|
399
|
+
def flame_span_rect(ctx: Context, flame: int, span: Sequence[FlameSpan]) -> Rect: ...
|
|
400
|
+
def curve_eval(keys: Sequence[CurveKey], x: float) -> float: ...
|
|
401
|
+
def gradient_eval(stops: Sequence[GradientStop], t: float) -> Color: ...
|
|
402
|
+
def kv_editor(ctx: Context, id: str | None, capacity: int, pairs: KvPair, count: Any = ..., *, key_placeholder: str | None = ..., value_placeholder: str | None = ..., no_toggles: bool = ..., no_secrets: bool = ..., read_only: bool = ..., width: Size | None = ...) -> tuple[bool, Any]: ...
|
|
403
|
+
def query_op_name(type: int, op: int) -> str | None: ...
|
|
404
|
+
def cron_next(cron: str | None, after: int, utc_offset: int, next: Any = ...) -> tuple[bool, Any]: ...
|
|
405
|
+
def cron_describe(ctx: Context, cron: str | None) -> str | None: ...
|
|
406
|
+
def regex_search(pattern: str | None, flags: int, text: str | None, len: int, from_: int, m: RegexMatch, error: str | None = ...) -> tuple[int, str | None]: ...
|
|
407
|
+
def response_status(ctx: Context, status: int, seconds: float, bytes: float) -> None: ...
|
|
408
|
+
def http_reason(status: int) -> str | None: ...
|
|
409
|
+
def http_method_name(method: int) -> str | None: ...
|
|
410
|
+
def readout(ctx: Context, label: str | None, value: str | None, *, unit: str | None = ..., detail: str | None = ..., size: int = ..., tone: int = ..., accent: bool = ..., align: int = ..., width: Size | None = ...) -> None: ...
|
|
411
|
+
def dot_display(ctx: Context, text: str | None, *, pitch: float = ..., color: Color | None = ..., accent: bool = ..., no_dim: bool = ..., marquee: bool = ..., align: int = ..., width: Size | None = ...) -> None: ...
|
|
412
|
+
def draw_rect(ctx: Context, r: Rect, radius: Corners, fill: Color) -> None: ...
|
|
413
|
+
def draw_rect_border(ctx: Context, r: Rect, radius: Corners, fill: Color, border: Color, border_width: float) -> None: ...
|
|
414
|
+
def draw_rect_gradient(ctx: Context, r: Rect, radius: Corners, top: Color, bottom: Color) -> None: ...
|
|
415
|
+
def draw_shadow(ctx: Context, r: Rect, radius: Corners, blur: float, spread: float, offset: Vec2, color: Color) -> None: ...
|
|
416
|
+
def draw_line(ctx: Context, a: Vec2, b: Vec2, thickness: float, color: Color) -> None: ...
|
|
417
|
+
def draw_circle(ctx: Context, center: Vec2, radius: float, color: Color) -> None: ...
|
|
418
|
+
def draw_arc(ctx: Context, center: Vec2, radius: float, a0: float, a1: float, thickness: float, color: Color) -> None: ...
|
|
419
|
+
def draw_text(ctx: Context, font: int, size: float, pos: Vec2, color: Color, text: str | None, len: int) -> None: ...
|
|
420
|
+
def draw_icon(ctx: Context, icon: str | None, r: Rect, size: float, color: Color) -> None: ...
|
|
421
|
+
def draw_image(ctx: Context, tex: int, r: Rect, uv: Rect, radius: Corners, tint: Color) -> None: ...
|
|
422
|
+
def push_clip(ctx: Context, r: Rect) -> None: ...
|
|
423
|
+
def pop_clip(ctx: Context) -> None: ...
|
|
424
|
+
def animate(ctx: Context, id: int, target: float) -> float: ...
|
|
425
|
+
def animate_spring(ctx: Context, id: int, target: float, duration: float, bounce: float) -> float: ...
|
|
Binary file
|
cui/_cui.pyi
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"""Type stubs for the hand-written Cython core."""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Callable
|
|
4
|
+
|
|
5
|
+
from ._types import (
|
|
6
|
+
CanvasResult,
|
|
7
|
+
ChartAnnotation,
|
|
8
|
+
Color,
|
|
9
|
+
Date,
|
|
10
|
+
DotChartResult,
|
|
11
|
+
DotSeries,
|
|
12
|
+
EventTrackResult,
|
|
13
|
+
Rect,
|
|
14
|
+
Series,
|
|
15
|
+
Size,
|
|
16
|
+
Vec2,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__version__: str
|
|
20
|
+
CUI_VERSION: str
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class SoftwareRenderer:
|
|
24
|
+
def __init__(self) -> None: ...
|
|
25
|
+
def set_threads(self, threads: int) -> None: ...
|
|
26
|
+
def render(self, draw_data: DrawData, fmt: str = ...) -> bytes: ...
|
|
27
|
+
def render_to(self, draw_data: DrawData, buffer: Any, fmt: str = ...) -> Any: ...
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DrawData:
|
|
31
|
+
@property
|
|
32
|
+
def width_px(self) -> int: ...
|
|
33
|
+
@property
|
|
34
|
+
def height_px(self) -> int: ...
|
|
35
|
+
@property
|
|
36
|
+
def vertex_count(self) -> int: ...
|
|
37
|
+
@property
|
|
38
|
+
def index_count(self) -> int: ...
|
|
39
|
+
@property
|
|
40
|
+
def command_count(self) -> int: ...
|
|
41
|
+
@property
|
|
42
|
+
def font_atlas(self) -> int: ...
|
|
43
|
+
def clear_color(self) -> Color: ...
|
|
44
|
+
def write_png(self, path: str) -> None: ...
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Context:
|
|
48
|
+
@classmethod
|
|
49
|
+
def create(
|
|
50
|
+
cls,
|
|
51
|
+
renderer: SoftwareRenderer | None = ...,
|
|
52
|
+
theme: int = ...,
|
|
53
|
+
accent: int = ...,
|
|
54
|
+
no_default_fonts: bool = ...,
|
|
55
|
+
direction: int = ...,
|
|
56
|
+
) -> Context: ...
|
|
57
|
+
def destroy(self) -> None: ...
|
|
58
|
+
def set_viewport(self, width: float, height: float, scale: float = ...) -> None: ...
|
|
59
|
+
def begin_frame(self, dt: float = ...) -> None: ...
|
|
60
|
+
def end_frame(self) -> None: ...
|
|
61
|
+
@property
|
|
62
|
+
def width(self) -> float: ...
|
|
63
|
+
@property
|
|
64
|
+
def height(self) -> float: ...
|
|
65
|
+
@property
|
|
66
|
+
def scale(self) -> float: ...
|
|
67
|
+
@property
|
|
68
|
+
def size(self) -> tuple[float, float]: ...
|
|
69
|
+
@property
|
|
70
|
+
def dpi_scale(self) -> float: ...
|
|
71
|
+
@property
|
|
72
|
+
def time(self) -> float: ...
|
|
73
|
+
@property
|
|
74
|
+
def delta_time(self) -> float: ...
|
|
75
|
+
@property
|
|
76
|
+
def frame_count(self) -> int: ...
|
|
77
|
+
def needs_redraw(self) -> bool: ...
|
|
78
|
+
def next_wakeup(self) -> float: ...
|
|
79
|
+
def request_redraw(self) -> None: ...
|
|
80
|
+
def request_wakeup(self, seconds: float) -> None: ...
|
|
81
|
+
def draw_data(self) -> DrawData: ...
|
|
82
|
+
def render(self, renderer: SoftwareRenderer | None = ..., fmt: str = ...) -> bytes: ...
|
|
83
|
+
def screenshot(self, path: str) -> DrawData: ...
|
|
84
|
+
def canvas(self, id: str, width: Size | float, height: Size | float, paint: Callable[[Rect], None]) -> CanvasResult: ...
|
|
85
|
+
def split_begin(self, id: str, ratio: float = ..., **opts: Any) -> float: ...
|
|
86
|
+
def split_next(self) -> None: ...
|
|
87
|
+
def split_end(self) -> float: ...
|
|
88
|
+
def draw_polyline(self, points: Any, thickness: float, color: Color, closed: bool = ...) -> None: ...
|
|
89
|
+
def draw_polygon(self, points: Any, color: Color) -> None: ...
|
|
90
|
+
def line_chart(self, id: str, series: Any, **opts: Any) -> None: ...
|
|
91
|
+
def bar_chart(self, id: str, series: Any, **opts: Any) -> None: ...
|
|
92
|
+
def donut_chart(self, id: str, values: Any, labels: Any = ..., **opts: Any) -> None: ...
|
|
93
|
+
def dot_chart(self, id: str, series: Any, count: int = ..., **opts: Any) -> DotChartResult: ...
|
|
94
|
+
def event_track(
|
|
95
|
+
self,
|
|
96
|
+
id: str,
|
|
97
|
+
times: Any,
|
|
98
|
+
capacity: int,
|
|
99
|
+
minimum: float,
|
|
100
|
+
maximum: float,
|
|
101
|
+
selected: int = ...,
|
|
102
|
+
**opts: Any,
|
|
103
|
+
) -> EventTrackResult: ...
|
|
104
|
+
@property
|
|
105
|
+
def font_scale(self) -> float: ...
|
|
106
|
+
@font_scale.setter
|
|
107
|
+
def font_scale(self, value: float) -> None: ...
|
|
108
|
+
def make_id(self, value: str) -> int: ...
|
|
109
|
+
def push_id(self, value: str | int) -> None: ...
|
|
110
|
+
def pop_id(self) -> None: ...
|
|
111
|
+
def push_disabled(self, disabled: bool = ...) -> None: ...
|
|
112
|
+
def pop_disabled(self) -> None: ...
|
|
113
|
+
@property
|
|
114
|
+
def last_id(self) -> int: ...
|
|
115
|
+
@property
|
|
116
|
+
def last_hovered(self) -> bool: ...
|
|
117
|
+
@property
|
|
118
|
+
def disabled(self) -> bool: ...
|
|
119
|
+
def get_rect(self, id: int) -> tuple[float, float, float, float]: ...
|
|
120
|
+
def last_rect(self) -> tuple[float, float, float, float]: ...
|
|
121
|
+
def text(self, text: str) -> None: ...
|
|
122
|
+
def heading(self, text: str, level: int = ...) -> None: ...
|
|
123
|
+
def label(self, text: str) -> None: ...
|
|
124
|
+
def secondary(self, text: str) -> None: ...
|
|
125
|
+
def muted(self, text: str) -> None: ...
|
|
126
|
+
def code(self, text: str) -> None: ...
|
|
127
|
+
def kbd(self, keys: str) -> None: ...
|
|
128
|
+
def link(self, text: str) -> bool: ...
|
|
129
|
+
def separator(self) -> None: ...
|
|
130
|
+
def spacer(self) -> None: ...
|
|
131
|
+
def gap(self, size: float) -> None: ...
|
|
132
|
+
def measure_text(self, text: str, font: int = ..., size: float = ...) -> tuple[float, float, float, float, float]: ...
|
|
133
|
+
def begin_box(self, direction: int = ..., **opts: Any) -> int: ...
|
|
134
|
+
def begin_row(self, **opts: Any) -> int: ...
|
|
135
|
+
def begin_column(self, **opts: Any) -> int: ...
|
|
136
|
+
def end_box(self) -> None: ...
|
|
137
|
+
def _bind_ptr(self, address: int) -> None: ...
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class App:
|
|
141
|
+
def __init__(self) -> None: ...
|
|
142
|
+
@property
|
|
143
|
+
def context(self) -> Context: ...
|
|
144
|
+
@property
|
|
145
|
+
def backend(self) -> str: ...
|
|
146
|
+
@property
|
|
147
|
+
def is_software(self) -> bool: ...
|
|
148
|
+
def create(self, **desc: Any) -> App: ...
|
|
149
|
+
def frame(self) -> bool: ...
|
|
150
|
+
def run(self, frame: Callable[[Context], None], **desc: Any) -> int: ...
|
|
151
|
+
def quit(self) -> None: ...
|
|
152
|
+
def set_title(self, title: str) -> None: ...
|
|
153
|
+
def set_size(self, width: int, height: int) -> None: ...
|
|
154
|
+
def file_dialog(self, **opts: Any) -> str | None: ...
|
|
155
|
+
@property
|
|
156
|
+
def size(self) -> tuple[float, float]: ...
|
|
157
|
+
def close(self) -> None: ...
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def file_dialog(**opts: Any) -> str | None: ...
|