内容表

  • curses.panel — 用于 Curses 的面板堆栈扩展
    • 函数
    • Panel Objects

上一话题

curses.ascii — 用于 ASCII 字符的实用程序

下一话题
就业培训     下载中心     Wiki     联络
登录   注册

Log
  1. 首页
  2. Python 3.12.4
  3. 索引
  4. 模块
  5. 下一
  6. 上一
  7. Python 标准库
  8. 一般操作系统服务
  9. curses.panel — 用于 Curses 的面板堆栈扩展

curses.panel — 用于 Curses 的面板堆栈扩展 ¶


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.

函数 ¶

模块 curses.panel 定义了下列函数:

curses.panel. bottom_panel ( ) ¶

Returns the bottom panel in the panel stack.

curses.panel. new_panel ( win ) ¶

Returns a panel object, associating it with the given window win . 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.

curses.panel. top_panel ( ) ¶

Returns the top panel in the panel stack.

curses.panel. update_panels ( ) ¶

Updates the virtual screen after changes in the panel stack. This does not call curses.doupdate() , so you’ll have to do this yourself.

Panel Objects ¶

Panel objects, as returned by new_panel() 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.

Panel objects have the following methods:

Panel. above ( ) ¶

Returns the panel above the current panel.

Panel. below ( ) ¶

Returns the panel below the current panel.

Panel. bottom ( ) ¶

Push the panel to the bottom of the stack.

Panel. hidden ( ) ¶

返回 True if the panel is hidden (not visible), False 否则。

Panel. hide ( ) ¶

Hide the panel. This does not delete the object, it just makes the window on screen invisible.

Panel. move ( y , x ) ¶

Move the panel to the screen coordinates (y, x) .

Panel. replace ( win ) ¶

Change the window associated with the panel to the window win .

Panel. set_userptr ( obj ) ¶

Set the panel’s user pointer to obj . This is used to associate an arbitrary piece of data with the panel, and can be any Python object.

Panel. show ( ) ¶

Display the panel (which might have been hidden).

Panel. top ( ) ¶

Push panel to the top of the stack.

Panel. userptr ( ) ¶

Returns the user pointer for the panel. This might be any Python object.

Panel. window ( ) ¶

Returns the window object associated with the panel.

内容表

  • curses.panel — 用于 Curses 的面板堆栈扩展
    • 函数
    • Panel Objects

上一话题

curses.ascii — 用于 ASCII 字符的实用程序

下一话题

platform — 访问底层平台的标识数据

本页

  • 报告 Bug
  • 展示源

快速搜索

键入搜索术语或模块、类、函数名称。

  1. 首页
  2. Python 3.12.4
  3. 索引
  4. 模块
  5. 下一
  6. 上一
  7. Python 标准库
  8. 一般操作系统服务
  9. curses.panel — 用于 Curses 的面板堆栈扩展

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1