2 from typing import Any, Tuple
3 from typing_extensions import Literal
5 WINDOW: Literal["window"]
7 STATUS: Literal["status"]
8 IMMEDIATE: Literal["immediate"]
9 IMAGE: Literal["image"]
10 IMAGETEXT: Literal["imagetext"]
11 BALLOON: Literal["balloon"]
13 ACROSSTOP: Literal["acrosstop"]
15 ASCII: Literal["ascii"]
17 COLUMN: Literal["column"]
18 DECREASING: Literal["decreasing"]
19 INCREASING: Literal["increasing"]
20 INTEGER: Literal["integer"]
25 S_REGION: Literal["s-region"]
26 X_REGION: Literal["x-region"]
27 Y_REGION: Literal["y-region"]
29 # These should be kept in sync with _tkinter constants, except TCL_ALL_EVENTS which doesn't match ALL_EVENTS
30 TCL_DONT_WAIT: Literal[2]
31 TCL_WINDOW_EVENTS: Literal[4]
32 TCL_FILE_EVENTS: Literal[8]
33 TCL_TIMER_EVENTS: Literal[16]
34 TCL_IDLE_EVENTS: Literal[32]
35 TCL_ALL_EVENTS: Literal[0]
38 def tix_addbitmapdir(self, directory: str) -> None: ...
39 def tix_cget(self, option: str) -> Any: ...
40 def tix_configure(self, cnf: dict[str, Any] | None = ..., **kw: Any) -> Any: ...
41 def tix_filedialog(self, dlgclass: str | None = ...) -> str: ...
42 def tix_getbitmap(self, name: str) -> str: ...
43 def tix_getimage(self, name: str) -> str: ...
44 def tix_option_get(self, name: str) -> Any: ...
45 def tix_resetoptions(self, newScheme: str, newFontSet: str, newScmPrio: str | None = ...) -> None: ...
47 class Tk(tkinter.Tk, tixCommand):
48 def __init__(self, screenName: str | None = ..., baseName: str | None = ..., className: str = ...): ...
50 class TixWidget(tkinter.Widget):
53 master: tkinter.Misc | None = ...,
54 widgetName: str | None = ...,
55 static_options: list[str] | None = ...,
56 cnf: dict[str, Any] = ...,
57 kw: dict[str, Any] = ...,
59 def __getattr__(self, name: str) -> Any: ...
60 def set_silent(self, value: str) -> None: ...
61 def subwidget(self, name: str) -> tkinter.Widget: ...
62 def subwidgets_all(self) -> list[tkinter.Widget]: ...
63 def config_all(self, option: Any, value: Any) -> None: ...
64 def image_create(self, imgtype: str, cnf: dict[str, Any] = ..., master: tkinter.Widget | None = ..., **kw: Any) -> None: ...
65 def image_delete(self, imgname: str) -> None: ...
67 class TixSubWidget(TixWidget):
69 self, master: tkinter.Widget, name: str, destroy_physically: int = ..., check_intermediate: int = ...
73 def __init__(self, itemtype: str, cnf: dict[str, Any] = ..., *, master: tkinter.Widget | None = ..., **kw: Any) -> None: ...
74 def __getitem__(self, key: str) -> Any: ...
75 def __setitem__(self, key: str, value: Any) -> None: ...
76 def delete(self) -> None: ...
77 def config(self, cnf: dict[str, Any] = ..., **kw: Any) -> Any: ...
79 class Balloon(TixWidget):
80 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
81 def bind_widget(self, widget: tkinter.Widget, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
82 def unbind_widget(self, widget: tkinter.Widget) -> None: ...
84 class ButtonBox(TixWidget):
85 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
86 def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
87 def invoke(self, name: str) -> None: ...
89 class ComboBox(TixWidget):
90 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
91 def add_history(self, str: str) -> None: ...
92 def append_history(self, str: str) -> None: ...
93 def insert(self, index: int, str: str) -> None: ...
94 def pick(self, index: int) -> None: ...
96 class Control(TixWidget):
97 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
98 def decrement(self) -> None: ...
99 def increment(self) -> None: ...
100 def invoke(self) -> None: ...
102 class LabelEntry(TixWidget):
103 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
105 class LabelFrame(TixWidget):
106 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
108 class Meter(TixWidget):
109 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
111 class OptionMenu(TixWidget):
112 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
113 def add_command(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
114 def add_separator(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
115 def delete(self, name: str) -> None: ...
116 def disable(self, name: str) -> None: ...
117 def enable(self, name: str) -> None: ...
119 class PopupMenu(TixWidget):
120 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
121 def bind_widget(self, widget: tkinter.Widget) -> None: ...
122 def unbind_widget(self, widget: tkinter.Widget) -> None: ...
123 def post_widget(self, widget: tkinter.Widget, x: int, y: int) -> None: ...
125 class Select(TixWidget):
126 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
127 def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
128 def invoke(self, name: str) -> None: ...
130 class StdButtonBox(TixWidget):
131 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
132 def invoke(self, name: str) -> None: ...
134 class DirList(TixWidget):
135 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
136 def chdir(self, dir: str) -> None: ...
138 class DirTree(TixWidget):
139 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
140 def chdir(self, dir: str) -> None: ...
142 class DirSelectDialog(TixWidget):
143 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
144 def popup(self) -> None: ...
145 def popdown(self) -> None: ...
147 class DirSelectBox(TixWidget):
148 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
150 class ExFileSelectBox(TixWidget):
151 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
152 def filter(self) -> None: ...
153 def invoke(self) -> None: ...
155 class FileSelectBox(TixWidget):
156 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
157 def apply_filter(self) -> None: ...
158 def invoke(self) -> None: ...
160 class FileEntry(TixWidget):
161 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
162 def invoke(self) -> None: ...
163 def file_dialog(self) -> None: ...
165 class HList(TixWidget, tkinter.XView, tkinter.YView):
166 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
167 def add(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
168 def add_child(self, parent: str | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
169 def anchor_set(self, entry: str) -> None: ...
170 def anchor_clear(self) -> None: ...
171 # FIXME: Overload, certain combos return, others don't
172 def column_width(self, col: int = ..., width: int | None = ..., chars: int | None = ...) -> int | None: ...
173 def delete_all(self) -> None: ...
174 def delete_entry(self, entry: str) -> None: ...
175 def delete_offsprings(self, entry: str) -> None: ...
176 def delete_siblings(self, entry: str) -> None: ...
177 def dragsite_set(self, index: int) -> None: ...
178 def dragsite_clear(self) -> None: ...
179 def dropsite_set(self, index: int) -> None: ...
180 def dropsite_clear(self) -> None: ...
181 def header_create(self, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
182 def header_configure(self, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
183 def header_cget(self, col: int, opt: Any) -> Any: ...
184 def header_exists(self, col: int) -> bool: ...
185 def header_exist(self, col: int) -> bool: ...
186 def header_delete(self, col: int) -> None: ...
187 def header_size(self, col: int) -> int: ...
188 def hide_entry(self, entry: str) -> None: ...
189 def indicator_create(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
190 def indicator_configure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
191 def indicator_cget(self, entry: str, opt: Any) -> Any: ...
192 def indicator_exists(self, entry: str) -> bool: ...
193 def indicator_delete(self, entry: str) -> None: ...
194 def indicator_size(self, entry: str) -> int: ...
195 def info_anchor(self) -> str: ...
196 def info_bbox(self, entry: str) -> tuple[int, int, int, int]: ...
197 def info_children(self, entry: str | None = ...) -> Tuple[str, ...]: ...
198 def info_data(self, entry: str) -> Any: ...
199 def info_dragsite(self) -> str: ...
200 def info_dropsite(self) -> str: ...
201 def info_exists(self, entry: str) -> bool: ...
202 def info_hidden(self, entry: str) -> bool: ...
203 def info_next(self, entry: str) -> str: ...
204 def info_parent(self, entry: str) -> str: ...
205 def info_prev(self, entry: str) -> str: ...
206 def info_selection(self) -> Tuple[str, ...]: ...
207 def item_cget(self, entry: str, col: int, opt: Any) -> Any: ...
208 def item_configure(self, entry: str, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
209 def item_create(self, entry: str, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
210 def item_exists(self, entry: str, col: int) -> bool: ...
211 def item_delete(self, entry: str, col: int) -> None: ...
212 def entrycget(self, entry: str, opt: Any) -> Any: ...
213 def entryconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
214 def nearest(self, y: int) -> str: ...
215 def see(self, entry: str) -> None: ...
216 def selection_clear(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
217 def selection_includes(self, entry: str) -> bool: ...
218 def selection_set(self, first: str, last: str | None = ...) -> None: ...
219 def show_entry(self, entry: str) -> None: ...
221 class CheckList(TixWidget):
222 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
223 def autosetmode(self) -> None: ...
224 def close(self, entrypath: str) -> None: ...
225 def getmode(self, entrypath: str) -> str: ...
226 def open(self, entrypath: str) -> None: ...
227 def getselection(self, mode: str = ...) -> Tuple[str, ...]: ...
228 def getstatus(self, entrypath: str) -> str: ...
229 def setstatus(self, entrypath: str, mode: str = ...) -> None: ...
231 class Tree(TixWidget):
232 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
233 def autosetmode(self) -> None: ...
234 def close(self, entrypath: str) -> None: ...
235 def getmode(self, entrypath: str) -> str: ...
236 def open(self, entrypath: str) -> None: ...
237 def setmode(self, entrypath: str, mode: str = ...) -> None: ...
239 class TList(TixWidget, tkinter.XView, tkinter.YView):
240 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
241 def active_set(self, index: int) -> None: ...
242 def active_clear(self) -> None: ...
243 def anchor_set(self, index: int) -> None: ...
244 def anchor_clear(self) -> None: ...
245 def delete(self, from_: int, to: int | None = ...) -> None: ...
246 def dragsite_set(self, index: int) -> None: ...
247 def dragsite_clear(self) -> None: ...
248 def dropsite_set(self, index: int) -> None: ...
249 def dropsite_clear(self) -> None: ...
250 def insert(self, index: int, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
251 def info_active(self) -> int: ...
252 def info_anchor(self) -> int: ...
253 def info_down(self, index: int) -> int: ...
254 def info_left(self, index: int) -> int: ...
255 def info_right(self, index: int) -> int: ...
256 def info_selection(self) -> Tuple[int, ...]: ...
257 def info_size(self) -> int: ...
258 def info_up(self, index: int) -> int: ...
259 def nearest(self, x: int, y: int) -> int: ...
260 def see(self, index: int) -> None: ...
261 def selection_clear(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
262 def selection_includes(self, index: int) -> bool: ...
263 def selection_set(self, first: int, last: int | None = ...) -> None: ...
265 class PanedWindow(TixWidget):
266 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
267 def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
268 def delete(self, name: str) -> None: ...
269 def forget(self, name: str) -> None: ... # type: ignore
270 def panecget(self, entry: str, opt: Any) -> Any: ...
271 def paneconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
272 def panes(self) -> list[tkinter.Widget]: ...
274 class ListNoteBook(TixWidget):
275 def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
276 def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
277 def page(self, name: str) -> tkinter.Widget: ...
278 def pages(self) -> list[tkinter.Widget]: ...
279 def raise_page(self, name: str) -> None: ...
281 class NoteBook(TixWidget):
282 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
283 def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
284 def delete(self, name: str) -> None: ...
285 def page(self, name: str) -> tkinter.Widget: ...
286 def pages(self) -> list[tkinter.Widget]: ...
287 def raise_page(self, name: str) -> None: ...
288 def raised(self) -> bool: ...
290 class InputOnly(TixWidget):
291 def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
294 def __setitem__(self, key: str, value: Any) -> None: ...
295 def config(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
296 def form(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
297 def check(self) -> bool: ...
298 def forget(self) -> None: ...
299 def grid(self, xsize: int = ..., ysize: int = ...) -> tuple[int, int] | None: ...
300 def info(self, option: str | None = ...) -> Any: ...
301 def slaves(self) -> list[tkinter.Widget]: ...