forked from urwid/urwid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
222 lines (211 loc) · 4.79 KB
/
__init__.py
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
#!/usr/bin/python
#
# Urwid __init__.py - all the stuff you're likely to care about
#
# Copyright (C) 2004-2012 Ian Ward
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Urwid web site: https://urwid.org/
from __future__ import annotations
from urwid.canvas import (
BlankCanvas,
Canvas,
CanvasCache,
CanvasCombine,
CanvasError,
CanvasJoin,
CanvasOverlay,
CompositeCanvas,
SolidCanvas,
TextCanvas,
)
from urwid.command_map import (
ACTIVATE,
CURSOR_DOWN,
CURSOR_LEFT,
CURSOR_MAX_LEFT,
CURSOR_MAX_RIGHT,
CURSOR_PAGE_DOWN,
CURSOR_PAGE_UP,
CURSOR_RIGHT,
CURSOR_UP,
REDRAW_SCREEN,
CommandMap,
command_map,
)
from urwid.container import (
Columns,
ColumnsError,
Frame,
FrameError,
GridFlow,
GridFlowError,
Overlay,
OverlayError,
Pile,
PileError,
WidgetContainerMixin,
)
from urwid.decoration import (
AttrMap,
AttrMapError,
AttrWrap,
BoxAdapter,
BoxAdapterError,
Filler,
FillerError,
Padding,
PaddingError,
WidgetDecoration,
WidgetDisable,
WidgetPlaceholder,
)
from urwid.font import (
Font,
FontRegistry,
HalfBlock5x4Font,
HalfBlock6x5Font,
HalfBlock7x7Font,
HalfBlockHeavy6x5Font,
Thin3x3Font,
Thin4x3Font,
Thin6x6Font,
get_all_fonts,
)
from urwid.graphics import (
BarGraph,
BarGraphError,
BarGraphMeta,
BigText,
GraphVScale,
LineBox,
ProgressBar,
scale_bar_values,
)
from urwid.listbox import ListBox, ListBoxError, ListWalker, ListWalkerError, SimpleFocusListWalker, SimpleListWalker
from urwid.event_loop import EventLoop, AsyncioEventLoop, ExitMainLoop, MainLoop, SelectEventLoop
from urwid.monitored_list import MonitoredFocusList, MonitoredList
from urwid.signals import MetaSignals, Signals, connect_signal, disconnect_signal, emit_signal, register_signal
from urwid.version import __version__, __version_tuple__
from urwid.widget import (
ANY,
BOTTOM,
BOX,
CENTER,
CLIP,
ELLIPSIS,
FIXED,
FLOW,
GIVEN,
LEFT,
MIDDLE,
PACK,
RELATIVE,
RELATIVE_100,
RIGHT,
SPACE,
TOP,
WEIGHT,
BoxWidget,
Divider,
Edit,
EditError,
FixedWidget,
FlowWidget,
IntEdit,
SolidFill,
Text,
TextError,
Widget,
WidgetError,
WidgetMeta,
WidgetWrap,
WidgetWrapError,
delegate_to_widget_mixin,
fixed_size,
)
from urwid.wimp import Button, CheckBox, CheckBoxError, PopUpLauncher, PopUpTarget, RadioButton, SelectableIcon
from urwid import raw_display
from urwid.display_common import (
BLACK,
BROWN,
DARK_BLUE,
DARK_CYAN,
DARK_GRAY,
DARK_GREEN,
DARK_MAGENTA,
DARK_RED,
DEFAULT,
LIGHT_BLUE,
LIGHT_CYAN,
LIGHT_GRAY,
LIGHT_GREEN,
LIGHT_MAGENTA,
LIGHT_RED,
UPDATE_PALETTE_ENTRY,
WHITE,
YELLOW,
AttrSpec,
AttrSpecError,
BaseScreen,
RealTerminal,
ScreenError,
)
from urwid.text_layout import LayoutSegment, StandardTextLayout, TextLayout, default_layout
from urwid.treetools import ParentNode, TreeListBox, TreeNode, TreeWalker, TreeWidget, TreeWidgetError
from urwid.util import (
MetaSuper,
TagMarkupException,
apply_target_encoding,
calc_text_pos,
calc_trim_text,
calc_width,
decompose_tagmarkup,
detected_encoding,
get_encoding_mode,
int_scale,
is_mouse_event,
is_wide_char,
move_next_char,
move_prev_char,
set_encoding,
supports_unicode,
within_double_byte,
)
from urwid.vterm import TermCanvas, TermCharset, Terminal, TermModes, TermScroller
# Optional event loops with external dependencies
try:
from urwid.event_loop import TornadoEventLoop
except ImportError:
pass
try:
from urwid.event_loop import GLibEventLoop
except ImportError:
pass
try:
from urwid.event_loop import TwistedEventLoop
except ImportError:
pass
try:
from urwid.event_loop import TrioEventLoop
except ImportError:
pass
try:
from urwid.event_loop import ZMQEventLoop
except ImportError:
pass
# Backward compatibility
VERSION = __version_tuple__