File: tix.pyi

package info (click to toggle)
typeshed 0.0~git20241223.ea91db2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 28,756 kB
  • sloc: python: 7,741; makefile: 20; sh: 18
file content (299 lines) | stat: -rw-r--r-- 14,375 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
import tkinter
from _typeshed import Incomplete
from typing import Any, Final

WINDOW: Final = "window"
TEXT: Final = "text"
STATUS: Final = "status"
IMMEDIATE: Final = "immediate"
IMAGE: Final = "image"
IMAGETEXT: Final = "imagetext"
BALLOON: Final = "balloon"
AUTO: Final = "auto"
ACROSSTOP: Final = "acrosstop"

ASCII: Final = "ascii"
CELL: Final = "cell"
COLUMN: Final = "column"
DECREASING: Final = "decreasing"
INCREASING: Final = "increasing"
INTEGER: Final = "integer"
MAIN: Final = "main"
MAX: Final = "max"
REAL: Final = "real"
ROW: Final = "row"
S_REGION: Final = "s-region"
X_REGION: Final = "x-region"
Y_REGION: Final = "y-region"

# These should be kept in sync with _tkinter constants, except TCL_ALL_EVENTS which doesn't match ALL_EVENTS
TCL_DONT_WAIT: Final = 2
TCL_WINDOW_EVENTS: Final = 4
TCL_FILE_EVENTS: Final = 8
TCL_TIMER_EVENTS: Final = 16
TCL_IDLE_EVENTS: Final = 32
TCL_ALL_EVENTS: Final = 0

class tixCommand:
    def tix_addbitmapdir(self, directory: str) -> None: ...
    def tix_cget(self, option: str) -> Any: ...
    def tix_configure(self, cnf: dict[str, Any] | None = None, **kw: Any) -> Any: ...
    def tix_filedialog(self, dlgclass: str | None = None) -> str: ...
    def tix_getbitmap(self, name: str) -> str: ...
    def tix_getimage(self, name: str) -> str: ...
    def tix_option_get(self, name: str) -> Any: ...
    def tix_resetoptions(self, newScheme: str, newFontSet: str, newScmPrio: str | None = None) -> None: ...

class Tk(tkinter.Tk, tixCommand):
    def __init__(self, screenName: str | None = None, baseName: str | None = None, className: str = "Tix") -> None: ...

class TixWidget(tkinter.Widget):
    def __init__(
        self,
        master: tkinter.Misc | None = None,
        widgetName: str | None = None,
        static_options: list[str] | None = None,
        cnf: dict[str, Any] = {},
        kw: dict[str, Any] = {},
    ) -> None: ...
    def __getattr__(self, name: str): ...
    def set_silent(self, value: str) -> None: ...
    def subwidget(self, name: str) -> tkinter.Widget: ...
    def subwidgets_all(self) -> list[tkinter.Widget]: ...
    def config_all(self, option: Any, value: Any) -> None: ...
    def image_create(self, imgtype: str, cnf: dict[str, Any] = {}, master: tkinter.Widget | None = None, **kw) -> None: ...
    def image_delete(self, imgname: str) -> None: ...

class TixSubWidget(TixWidget):
    def __init__(self, master: tkinter.Widget, name: str, destroy_physically: int = 1, check_intermediate: int = 1) -> None: ...

class DisplayStyle:
    def __init__(self, itemtype: str, cnf: dict[str, Any] = {}, *, master: tkinter.Widget | None = None, **kw) -> None: ...
    def __getitem__(self, key: str): ...
    def __setitem__(self, key: str, value: Any) -> None: ...
    def delete(self) -> None: ...
    def config(self, cnf: dict[str, Any] = {}, **kw): ...

class Balloon(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def bind_widget(self, widget: tkinter.Widget, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def unbind_widget(self, widget: tkinter.Widget) -> None: ...

class ButtonBox(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ...
    def invoke(self, name: str) -> None: ...

class ComboBox(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add_history(self, str: str) -> None: ...
    def append_history(self, str: str) -> None: ...
    def insert(self, index: int, str: str) -> None: ...
    def pick(self, index: int) -> None: ...

class Control(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def decrement(self) -> None: ...
    def increment(self) -> None: ...
    def invoke(self) -> None: ...

class LabelEntry(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...

class LabelFrame(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...

class Meter(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...

class OptionMenu(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add_command(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add_separator(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def delete(self, name: str) -> None: ...
    def disable(self, name: str) -> None: ...
    def enable(self, name: str) -> None: ...

class PopupMenu(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def bind_widget(self, widget: tkinter.Widget) -> None: ...
    def unbind_widget(self, widget: tkinter.Widget) -> None: ...
    def post_widget(self, widget: tkinter.Widget, x: int, y: int) -> None: ...

class Select(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ...
    def invoke(self, name: str) -> None: ...

class StdButtonBox(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def invoke(self, name: str) -> None: ...

class DirList(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def chdir(self, dir: str) -> None: ...

class DirTree(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def chdir(self, dir: str) -> None: ...

class DirSelectDialog(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def popup(self) -> None: ...
    def popdown(self) -> None: ...

class DirSelectBox(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...

class ExFileSelectBox(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def filter(self) -> None: ...
    def invoke(self) -> None: ...

class FileSelectBox(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def apply_filter(self) -> None: ...
    def invoke(self) -> None: ...

class FileEntry(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def invoke(self) -> None: ...
    def file_dialog(self) -> None: ...

class HList(TixWidget, tkinter.XView, tkinter.YView):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ...
    def add_child(self, parent: str | None = None, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ...
    def anchor_set(self, entry: str) -> None: ...
    def anchor_clear(self) -> None: ...
    # FIXME: Overload, certain combos return, others don't
    def column_width(self, col: int = 0, width: int | None = None, chars: int | None = None) -> int | None: ...
    def delete_all(self) -> None: ...
    def delete_entry(self, entry: str) -> None: ...
    def delete_offsprings(self, entry: str) -> None: ...
    def delete_siblings(self, entry: str) -> None: ...
    def dragsite_set(self, index: int) -> None: ...
    def dragsite_clear(self) -> None: ...
    def dropsite_set(self, index: int) -> None: ...
    def dropsite_clear(self) -> None: ...
    def header_create(self, col: int, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def header_configure(self, col: int, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ...
    def header_cget(self, col: int, opt): ...
    def header_exists(self, col: int) -> bool: ...
    def header_exist(self, col: int) -> bool: ...
    def header_delete(self, col: int) -> None: ...
    def header_size(self, col: int) -> int: ...
    def hide_entry(self, entry: str) -> None: ...
    def indicator_create(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def indicator_configure(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ...
    def indicator_cget(self, entry: str, opt): ...
    def indicator_exists(self, entry: str) -> bool: ...
    def indicator_delete(self, entry: str) -> None: ...
    def indicator_size(self, entry: str) -> int: ...
    def info_anchor(self) -> str: ...
    def info_bbox(self, entry: str) -> tuple[int, int, int, int]: ...
    def info_children(self, entry: str | None = None) -> tuple[str, ...]: ...
    def info_data(self, entry: str) -> Any: ...
    def info_dragsite(self) -> str: ...
    def info_dropsite(self) -> str: ...
    def info_exists(self, entry: str) -> bool: ...
    def info_hidden(self, entry: str) -> bool: ...
    def info_next(self, entry: str) -> str: ...
    def info_parent(self, entry: str) -> str: ...
    def info_prev(self, entry: str) -> str: ...
    def info_selection(self) -> tuple[str, ...]: ...
    def item_cget(self, entry: str, col: int, opt): ...
    def item_configure(self, entry: str, col: int, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ...
    def item_create(self, entry: str, col: int, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def item_exists(self, entry: str, col: int) -> bool: ...
    def item_delete(self, entry: str, col: int) -> None: ...
    def entrycget(self, entry: str, opt): ...
    def entryconfigure(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ...
    def nearest(self, y: int) -> str: ...
    def see(self, entry: str) -> None: ...
    def selection_clear(self, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def selection_includes(self, entry: str) -> bool: ...
    def selection_set(self, first: str, last: str | None = None) -> None: ...
    def show_entry(self, entry: str) -> None: ...

class CheckList(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def autosetmode(self) -> None: ...
    def close(self, entrypath: str) -> None: ...
    def getmode(self, entrypath: str) -> str: ...
    def open(self, entrypath: str) -> None: ...
    def getselection(self, mode: str = "on") -> tuple[str, ...]: ...
    def getstatus(self, entrypath: str) -> str: ...
    def setstatus(self, entrypath: str, mode: str = "on") -> None: ...

class Tree(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def autosetmode(self) -> None: ...
    def close(self, entrypath: str) -> None: ...
    def getmode(self, entrypath: str) -> str: ...
    def open(self, entrypath: str) -> None: ...
    def setmode(self, entrypath: str, mode: str = "none") -> None: ...

class TList(TixWidget, tkinter.XView, tkinter.YView):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def active_set(self, index: int) -> None: ...
    def active_clear(self) -> None: ...
    def anchor_set(self, index: int) -> None: ...
    def anchor_clear(self) -> None: ...
    def delete(self, from_: int, to: int | None = None) -> None: ...
    def dragsite_set(self, index: int) -> None: ...
    def dragsite_clear(self) -> None: ...
    def dropsite_set(self, index: int) -> None: ...
    def dropsite_clear(self) -> None: ...
    def insert(self, index: int, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def info_active(self) -> int: ...
    def info_anchor(self) -> int: ...
    def info_down(self, index: int) -> int: ...
    def info_left(self, index: int) -> int: ...
    def info_right(self, index: int) -> int: ...
    def info_selection(self) -> tuple[int, ...]: ...
    def info_size(self) -> int: ...
    def info_up(self, index: int) -> int: ...
    def nearest(self, x: int, y: int) -> int: ...
    def see(self, index: int) -> None: ...
    def selection_clear(self, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def selection_includes(self, index: int) -> bool: ...
    def selection_set(self, first: int, last: int | None = None) -> None: ...

class PanedWindow(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def delete(self, name: str) -> None: ...
    def forget(self, name: str) -> None: ...  # type: ignore[override]
    def panecget(self, entry: str, opt): ...
    def paneconfigure(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ...
    def panes(self) -> list[tkinter.Widget]: ...

class ListNoteBook(TixWidget):
    def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def page(self, name: str) -> tkinter.Widget: ...
    def pages(self) -> list[tkinter.Widget]: ...
    def raise_page(self, name: str) -> None: ...

class NoteBook(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def delete(self, name: str) -> None: ...
    def page(self, name: str) -> tkinter.Widget: ...
    def pages(self) -> list[tkinter.Widget]: ...
    def raise_page(self, name: str) -> None: ...
    def raised(self) -> bool: ...

class InputOnly(TixWidget):
    def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ...

class Form:
    def __setitem__(self, key: str, value: Any) -> None: ...
    def config(self, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def form(self, cnf: dict[str, Any] = {}, **kw) -> None: ...
    def check(self) -> bool: ...
    def forget(self) -> None: ...
    def grid(self, xsize: int = 0, ysize: int = 0) -> tuple[int, int] | None: ...
    def info(self, option: str | None = None): ...
    def slaves(self) -> list[tkinter.Widget]: ...