![]() | XCII. Newt Functions简介This is a PHP language extension for RedHat Newt library, a terminal-based window and widget library for writing applications with user friendly interface. Once this extension is enabled in PHP it will provide the use of Newt widgets, such as windows, buttons, checkboxes, radiobuttons, labels, editboxes, scrolls, textareas, scales, etc. Use of this extension if very similar to the original Newt API of C programming language. 需求This module uses the functions of the RedHat Newt library. You need libnewt version >= 0.51.0. 安装本 PECL 扩展未绑定于 PHP 中。 进一步信息例如新版本,下载,源程序,维护者信息以及更新日志可以在此找到: http://pecl.html.net/package/newt. 在 PHP 4 中本 PECL 扩展的源程序位于 PHP 源程序中的 ext/ 目录下或者在上面的 PECL 连接中。 In order to use these functions you must compile CGI or CLI PHP with newt support by using the --with-newt[=DIR] configure option.
资源类型This extension uses two resource types: "newt component" and "newt grid". Resource type "newt component" is returned by functions, which create common newt widgets (for example: newt_button()) Resource type "newt grid" is a special link identifier for components, returned by newt grid factory functions (for example: newt_create_grid()) 预定义常量以下常量由本扩展模块定义,因此只有在本扩展模块被编译到 PHP 中,或者在运行时被动态加载后才有效。 Newt form exit reasons表格 1. Newt form exit reasons
Newt colorsets表格 2. Newt colorsets
Newt Components Flags表格 5. Newt Components Flags
Newt Keys表格 12. Newt Keys
范例This example is a PHP port of RedHat 'setup' utility dialog, executed in text mode.
| ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||