如何使用 ncurses 创建选项按钮

How to create options button with ncurses

EHLO

我很喜欢 C 和 ncurses Linux 来创建安装程序,我对此有点陌生。我已经看到 linux(尤其是 Anaconda)的安装程序可以显示 windows,带有 "OK""NEXT""BACK" 这样的按钮 link https://hurley.files.wordpress.com/2008/01/snack-popcorn-snapshot.png?w=500 我需要一些关于它的信息,我找到了菜单示例,但没有太多关于我称之为 "buttons" 的信息。

您好。

显示的示例来自基于俚语的应用程序之一,例如 whiptail。 Anaconda 使用 python 脚本加载 newt library and run those. As far as I know, there is essentially no documentation for any of those (other than source code), and that is a longstanding issue, for instance this comment, and this.

Whiptail 是一个应用程序 "like" 对话框,但更简单。 dialog 是一个基于 curses 的应用程序,可以 运行 使用 shell 脚本(例如 bash)。您可以在 homepage.

上找到有关对话框的更多信息

好的,谢谢大家。

我去阅读了一些 newt 文档,它很神奇,实际上非常简单,官方文档非常直接而且有效,所以我最好继续使用 newt 而不是 ncurses 安装程序。