📄 reference.html
字号:
<br>Class variable no_cache is a list of names of methods to not cache.<br>Class variable ignore_focus if defined and True indicates that this<br>widget is not affected by the focus parameter, so it may be ignored<br>when caching.</tt></dl><a name="Padding"></a><h3>function Padding <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><h3><a name="Padding">class <strong>Padding</strong></a>(Widget) <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><dl><dt>Method resolution order:</dt><dd>Padding</dd><dd>Widget</dd><dd>object</dd></dl><hr>Methods defined here:<br><dl><dt><a name="Padding-__init__"><strong>__init__</strong></a>(self, w, align, width, min_width<font color="#909090">=None</font>)</dt><dd><tt>w -- a box, flow or fixed widget to pad on the left and/or right<br>align -- one of:<br> 'left', 'center', 'right'<br> ('fixed left', columns)<br> ('fixed right', columns)<br> ('relative', percentage 0=left 100=right)<br>width -- one of:<br> number of columns wide <br> ('fixed right', columns) Only if align is 'fixed left'<br> ('fixed left', columns) Only if align is 'fixed right'<br> ('relative', percentage of total width)<br> None to enable clipping mode<br>min_width -- the minimum number of columns for w or None<br> <br>Padding widgets will try to satisfy width argument first by<br>reducing the align amount when necessary. If width still <br>cannot be satisfied it will also be reduced.<br> <br>Clipping Mode:<br>In clipping mode w is treated as a fixed widget and this <br>widget expects to be treated as a flow widget. w will<br>be clipped to fit within the space given. For example,<br>if align is 'left' then w may be clipped on the right.</tt></dd></dl><dl><dt><a name="Padding-get_cursor_coords"><strong>get_cursor_coords</strong></a>(self, size)</dt><dd><tt>Return the (x,y) coordinates of cursor within self.<strong>w</strong>.</tt></dd></dl><dl><dt><a name="Padding-get_pref_col"><strong>get_pref_col</strong></a>(self, size)</dt><dd><tt>Return the preferred column from self.<strong>w</strong>, or None.</tt></dd></dl><dl><dt><a name="Padding-keypress"><strong>keypress</strong></a>(self, size, key)</dt><dd><tt>Pass keypress to self.<strong>w</strong>.</tt></dd></dl><dl><dt><a name="Padding-mouse_event"><strong>mouse_event</strong></a>(self, size, event, button, x, y, focus)</dt><dd><tt>Send mouse event if position is within self.<strong>w</strong>.</tt></dd></dl><dl><dt><a name="Padding-move_cursor_to_coords"><strong>move_cursor_to_coords</strong></a>(self, size, x, y)</dt><dd><tt>Set the cursor position with (x,y) coordinates of self.<strong>w</strong>.<br> <br>Returns True if move succeeded, False otherwise.</tt></dd></dl><dl><dt><a name="Padding-padding_values"><strong>padding_values</strong></a>(self, size, focus)</dt><dd><tt>Return the number of columns to pad on the left and right.<br> <br>Override this method to define custom padding behaviour.</tt></dd></dl><dl><dt><a name="Padding-render"><strong>render</strong></a> = cached_render(self, size, focus<font color="#909090">=False</font>)</dt></dl><dl><dt><a name="Padding-rows"><strong>rows</strong></a> = cached_rows(self, size, focus<font color="#909090">=False</font>)</dt></dl><dl><dt><a name="Padding-selectable"><strong>selectable</strong></a>(self)</dt><dd><tt>Return the selectable value of self.<strong>w</strong>.</tt></dd></dl><hr>Data descriptors inherited from Widget:<br><dl><dt><strong>__dict__</strong></dt><dd><tt>dictionary for instance variables (if defined)</tt></dd></dl><dl><dt><strong>__weakref__</strong></dt><dd><tt>list of weak references to the object (if defined)</tt></dd></dl><hr>Data and other attributes inherited from Widget:<br><dl><dt><strong>__metaclass__</strong> = <class 'urwid.widget.WidgetMeta'><dd><tt>Automatic caching of render and rows methods.<br> <br>Class variable no_cache is a list of names of methods to not cache.<br>Class variable ignore_focus if defined and True indicates that this<br>widget is not affected by the focus parameter, so it may be ignored<br>when caching.</tt></dl><a name="Divider"></a><h3>function Divider <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><h3><a name="Divider">class <strong>Divider</strong></a>(FlowWidget) <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><dl><dt>Method resolution order:</dt><dd>Divider</dd><dd>FlowWidget</dd><dd>Widget</dd><dd>object</dd></dl><hr>Methods defined here:<br><dl><dt><a name="Divider-__init__"><strong>__init__</strong></a>(self, div_char<font color="#909090">=' '</font>, top<font color="#909090">=0</font>, bottom<font color="#909090">=0</font>)</dt><dd><tt>div_char -- character to repeat across line<br>top -- number of blank lines above<br>bottom -- number of blank lines below</tt></dd></dl><dl><dt><a name="Divider-render"><strong>render</strong></a> = cached_render(self, size, focus<font color="#909090">=False</font>)</dt></dl><dl><dt><a name="Divider-rows"><strong>rows</strong></a> = cached_rows(self, size, focus<font color="#909090">=False</font>)</dt></dl><hr>Methods inherited from Widget:<br><dl><dt><a name="Divider-selectable"><strong>selectable</strong></a>(self)</dt></dl><hr>Data descriptors inherited from Widget:<br><dl><dt><strong>__dict__</strong></dt><dd><tt>dictionary for instance variables (if defined)</tt></dd></dl><dl><dt><strong>__weakref__</strong></dt><dd><tt>list of weak references to the object (if defined)</tt></dd></dl><hr>Data and other attributes inherited from Widget:<br><dl><dt><strong>__metaclass__</strong> = <class 'urwid.widget.WidgetMeta'><dd><tt>Automatic caching of render and rows methods.<br> <br>Class variable no_cache is a list of names of methods to not cache.<br>Class variable ignore_focus if defined and True indicates that this<br>widget is not affected by the focus parameter, so it may be ignored<br>when caching.</tt></dl><a name="LineBox"></a><h3>function LineBox <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><h3><a name="LineBox">class <strong>LineBox</strong></a>(WidgetWrap) <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><dl><dt>Method resolution order:</dt><dd>LineBox</dd><dd>WidgetWrap</dd><dd>Widget</dd><dd>object</dd></dl><hr>Methods defined here:<br><dl><dt><a name="LineBox-__init__"><strong>__init__</strong></a>(self, w)</dt><dd><tt>Draw a line around w.</tt></dd></dl><hr>Methods inherited from WidgetWrap:<br><dl><dt><a name="LineBox-__getattr__"><strong>__getattr__</strong></a>(self, name)</dt><dd><tt>Call self.<strong>w</strong> if name is in Widget interface definition.</tt></dd></dl><dl><dt><a name="LineBox-get_w"><strong>get_w</strong></a>(self)</dt></dl><dl><dt><a name="LineBox-render"><strong>render</strong></a> = cached_render(self, size, focus<font color="#909090">=False</font>)</dt></dl><dl><dt><a name="LineBox-selectable"><strong>selectable</strong></a>(self)</dt></dl><dl><dt><a name="LineBox-set_w"><strong>set_w</strong></a>(self, w)</dt></dl><hr>Data descriptors inherited from WidgetWrap:<br><dl><dt><strong>w</strong></dt></dl><hr>Data descriptors inherited from Widget:<br><dl><dt><strong>__dict__</strong></dt><dd><tt>dictionary for instance variables (if defined)</tt></dd></dl><dl><dt><strong>__weakref__</strong></dt><dd><tt>list of weak references to the object (if defined)</tt></dd></dl><hr>Data and other attributes inherited from Widget:<br><dl><dt><strong>__metaclass__</strong> = <class 'urwid.widget.WidgetMeta'><dd><tt>Automatic caching of render and rows methods.<br> <br>Class variable no_cache is a list of names of methods to not cache.<br>Class variable ignore_focus if defined and True indicates that this<br>widget is not affected by the focus parameter, so it may be ignored<br>when caching.</tt></dl><a name="SolidFill"></a><h3>function SolidFill <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><h3><a name="SolidFill">class <strong>SolidFill</strong></a>(BoxWidget) <span style="font-size:small; padding-left: 20px">[<a href="#top">back to top</a>]</span></h3><dl><dt>Method resolution order:</dt><dd>SolidFill</dd><dd>BoxWidget</dd><dd>Widget</dd><dd>object</dd></dl><hr>Meth
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -