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
|
<span id="curses-panel-a-panel-stack-extension-for-curses"></span><h1>curses.panel — A panel stack extension for curses</h1> <p>Panels are windows with the added feature of depth, so they can be stacked on top of each other, and only the visible portions of each window will be displayed. Panels can be added, moved up or down in the stack, and removed.</p> <section id="functions"> <span id="cursespanel-functions"></span><h2>Functions</h2> <p>The module <a class="reference internal" href="#module-curses.panel" title="curses.panel: A panel stack extension that adds depth to curses windows."><code>curses.panel</code></a> defines the following functions:</p> <dl class="py function"> <dt class="sig sig-object py" id="curses.panel.bottom_panel">
<code>curses.panel.bottom_panel()</code> </dt> <dd>
<p>Returns the bottom panel in the panel stack.</p> </dd>
</dl> <dl class="py function"> <dt class="sig sig-object py" id="curses.panel.new_panel">
<code>curses.panel.new_panel(win)</code> </dt> <dd>
<p>Returns a panel object, associating it with the given window <em>win</em>. Be aware that you need to keep the returned panel object referenced explicitly. If you don’t, the panel object is garbage collected and removed from the panel stack.</p> </dd>
</dl> <dl class="py function"> <dt class="sig sig-object py" id="curses.panel.top_panel">
<code>curses.panel.top_panel()</code> </dt> <dd>
<p>Returns the top panel in the panel stack.</p> </dd>
</dl> <dl class="py function"> <dt class="sig sig-object py" id="curses.panel.update_panels">
<code>curses.panel.update_panels()</code> </dt> <dd>
<p>Updates the virtual screen after changes in the panel stack. This does not call <a class="reference internal" href="curses#curses.doupdate" title="curses.doupdate"><code>curses.doupdate()</code></a>, so you’ll have to do this yourself.</p> </dd>
</dl> </section> <section id="panel-objects"> <span id="curses-panel-objects"></span><h2>Panel Objects</h2> <p>Panel objects, as returned by <a class="reference internal" href="#curses.panel.new_panel" title="curses.panel.new_panel"><code>new_panel()</code></a> above, are windows with a stacking order. There’s always a window associated with a panel which determines the content, while the panel methods are responsible for the window’s depth in the panel stack.</p> <p>Panel objects have the following methods:</p> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.above">
<code>Panel.above()</code> </dt> <dd>
<p>Returns the panel above the current panel.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.below">
<code>Panel.below()</code> </dt> <dd>
<p>Returns the panel below the current panel.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.bottom">
<code>Panel.bottom()</code> </dt> <dd>
<p>Push the panel to the bottom of the stack.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.hidden">
<code>Panel.hidden()</code> </dt> <dd>
<p>Returns <code>True</code> if the panel is hidden (not visible), <code>False</code> otherwise.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.hide">
<code>Panel.hide()</code> </dt> <dd>
<p>Hide the panel. This does not delete the object, it just makes the window on screen invisible.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.move">
<code>Panel.move(y, x)</code> </dt> <dd>
<p>Move the panel to the screen coordinates <code>(y, x)</code>.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.replace">
<code>Panel.replace(win)</code> </dt> <dd>
<p>Change the window associated with the panel to the window <em>win</em>.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.set_userptr">
<code>Panel.set_userptr(obj)</code> </dt> <dd>
<p>Set the panel’s user pointer to <em>obj</em>. This is used to associate an arbitrary piece of data with the panel, and can be any Python object.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.show">
<code>Panel.show()</code> </dt> <dd>
<p>Display the panel (which might have been hidden).</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.top">
<code>Panel.top()</code> </dt> <dd>
<p>Push panel to the top of the stack.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.userptr">
<code>Panel.userptr()</code> </dt> <dd>
<p>Returns the user pointer for the panel. This might be any Python object.</p> </dd>
</dl> <dl class="py method"> <dt class="sig sig-object py" id="curses.panel.Panel.window">
<code>Panel.window()</code> </dt> <dd>
<p>Returns the window object associated with the panel.</p> </dd>
</dl> </section> <div class="_attribution">
<p class="_attribution-p">
© 2001–2023 Python Software Foundation<br>Licensed under the PSF License.<br>
<a href="https://docs.python.org/3.12/library/curses.panel.html" class="_attribution-link">https://docs.python.org/3.12/library/curses.panel.html</a>
</p>
</div>
|