draw-ui 0.1.0__py3-none-any.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.
Draw/__init__.py ADDED
@@ -0,0 +1,192 @@
1
+ """
2
+ Draw - A simple UI library built on PySide6
3
+ Part 1: Window Management
4
+ Part 2: Shapes
5
+ Part 3: Panel (mini-windows inside a window)
6
+ Part 4: Checkpoint (scene state management)
7
+ """
8
+
9
+ import importlib
10
+
11
+ from Draw._app import get_app
12
+ from Draw._window import window
13
+ from Draw._shapes import shapes, shapes as shape, hitbox, container, image, video
14
+ from Draw._text import text, lineedit, textedit
15
+ from Draw._layout import table, set as set_layout
16
+
17
+ __version__ = "0.1.0"
18
+
19
+ quit = window.quit
20
+ close_all = window.close_all
21
+
22
+ onwindow = "onwindow"
23
+ onscreen = "onscreen"
24
+ onip = "onip"
25
+
26
+ _LAZY_IMPORTS = {
27
+ "graph": ("Draw._graph", "graph"),
28
+ "turtle": ("Draw._turtle", "turtle"),
29
+ "point": ("Draw._point", "point"),
30
+ "connectors": ("Draw._connectors", "connectors"),
31
+ "senses": ("Draw._connectors", "senses"),
32
+ "calculator": ("Draw._calculator", "calculator"),
33
+ "calculater": ("Draw._calculator", "calculater"),
34
+ "motion": ("Draw._motion", "motion"),
35
+ "custom": ("Draw._motion", "custom"),
36
+ "timeline": ("Draw._motion", "timeline"),
37
+ "scroller": ("Draw._scroller", "scroller"),
38
+ "calc": ("Draw._align", "calc"),
39
+ "panel": ("Draw._panel", "panel"),
40
+ "screen": ("Draw._screen", "screen"),
41
+ "checkpoint": ("Draw._checkpoint", "checkpoint"),
42
+ "after": ("Draw._schedule", "after"),
43
+ "every": ("Draw._schedule", "every"),
44
+ "simulate": ("Draw._simulate", "simulate"),
45
+ "optimize": ("Draw._optimize", "optimize"),
46
+ "performance_mode": ("Draw._optimize", "performance_mode"),
47
+ "set_performance_mode": ("Draw._optimize", "set_performance_mode"),
48
+ "performance_info": ("Draw._optimize", "performance_info"),
49
+ "colour": ("Draw._colour", "colour"),
50
+ "color": ("Draw._colour", "color"),
51
+ "save_tokens": ("Draw._colour", "save_tokens"),
52
+ "load_tokens": ("Draw._colour", "load_tokens"),
53
+ "super": ("Draw._super", "super_engine"),
54
+ "super_mode": ("Draw._super", "super_mode"),
55
+ "debug": ("Draw.debug", "debug"),
56
+ "live": ("Draw._live", "live"),
57
+ "input_field": ("Draw._live", "input"),
58
+ "loader": ("Draw._loader", "loader"),
59
+ "filetree": ("Draw._file_tree", "filetree"),
60
+ "widget": ("Draw._native", "widget"),
61
+ "box": ("Draw._native", "box"),
62
+ "slider": ("Draw._native", "slider"),
63
+ "button": ("Draw._native", "button"),
64
+ "combobox": ("Draw._native", "combobox"),
65
+ "checkbox": ("Draw._native", "checkbox"),
66
+ "clipboard": ("Draw._clipboard", None),
67
+ "filedialog": ("Draw._filedialog", None),
68
+ "tools": ("Draw._tools", None),
69
+ "grid": ("Draw._widget", "generate_grid_items"),
70
+ "room": ("Draw._room", "room"),
71
+ "profiler": ("Draw._profiler", "profiler"),
72
+ "veo": ("Draw._veo", "veo"),
73
+ "voe": ("Draw._voe", "voe"),
74
+ "dust_remover": ("Draw._veo", "dust_remover"),
75
+ }
76
+
77
+ _IMPORTING = set()
78
+
79
+ def __getattr__(name):
80
+ if name.startswith("__") or name in _IMPORTING:
81
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
82
+ if name in _LAZY_IMPORTS:
83
+ module_path, attr_name = _LAZY_IMPORTS[name]
84
+ module = importlib.import_module(module_path)
85
+ if attr_name is None:
86
+ attr = module
87
+ else:
88
+ attr = getattr(module, attr_name)
89
+ globals()[name] = attr
90
+ return attr
91
+ _IMPORTING.add(name)
92
+ try:
93
+ submod = importlib.import_module(f".{name}", __name__)
94
+ globals()[name] = submod
95
+ return submod
96
+ except (ModuleNotFoundError, ImportError, AttributeError):
97
+ pass
98
+ finally:
99
+ _IMPORTING.discard(name)
100
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
101
+
102
+
103
+ __all__ = [
104
+ # window
105
+ "__version__",
106
+ "window",
107
+ "get_app",
108
+ "quit",
109
+ "close_all",
110
+ # layout
111
+ "table",
112
+ "set_layout",
113
+ "grid",
114
+ # shapes
115
+ "shape",
116
+ "shapes",
117
+ "hitbox",
118
+ "container",
119
+ "image",
120
+ "video",
121
+ "loader",
122
+ "text",
123
+ "lineedit",
124
+ "textedit",
125
+ "filetree",
126
+ "widget",
127
+ "box",
128
+ "slider",
129
+ "button",
130
+ "combobox",
131
+ "checkbox",
132
+ # graph / point
133
+ "graph",
134
+ "point",
135
+ "turtle",
136
+ # connectivity
137
+ "connectors",
138
+ "senses",
139
+ # math
140
+ "calculater",
141
+ "calculator",
142
+ "clipboard",
143
+ "filedialog",
144
+ "tools",
145
+ # live / input
146
+ "live",
147
+ "input_field",
148
+ # motion
149
+ "motion",
150
+ "custom",
151
+ "timeline",
152
+ # scroller
153
+ "scroller",
154
+ # calculation engine
155
+ "calc",
156
+ # colour
157
+ "colour",
158
+ "color",
159
+ "save_tokens",
160
+ "load_tokens",
161
+ # room (relative layout)
162
+ "room",
163
+ # panel
164
+ "panel",
165
+ # screen (live display)
166
+ "screen",
167
+ # checkpoint
168
+ "checkpoint",
169
+ # scheduling
170
+ "after",
171
+ "every",
172
+ # input simulation (testing/automation)
173
+ "simulate",
174
+ # performance / optimization / opengl engine
175
+ "optimize",
176
+ "performance_mode",
177
+ "set_performance_mode",
178
+ "performance_info",
179
+ "super",
180
+ "super_mode",
181
+ # constants
182
+ "onwindow",
183
+ "onscreen",
184
+ "onip",
185
+ # debug system
186
+ "debug",
187
+ "profiler",
188
+ # visibility optimization engine
189
+ "veo",
190
+ "voe",
191
+ "dust_remover",
192
+ ]