https://github.com/spektom/php-newt
PHP extension for newt programming library (console based widget toolkit)
https://github.com/spektom/php-newt
newt php php-extension php-newt
Last synced: 2 months ago
JSON representation
PHP extension for newt programming library (console based widget toolkit)
- Host: GitHub
- URL: https://github.com/spektom/php-newt
- Owner: spektom
- Created: 2011-09-15T08:43:13.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-02T08:10:52.000Z (over 11 years ago)
- Last Synced: 2025-01-20T16:53:27.677Z (4 months ago)
- Topics: newt, php, php-extension, php-newt
- Language: C
- Homepage: http://pecl.php.net/newt
- Size: 152 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PHP newt
==========
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.Example
--------
Source code:
```php
newt_init ();
newt_cls ();
newt_draw_root_text (0, 0, "Test Mode Setup Utility 1.12");
newt_push_help_line (null);
newt_draw_root_text (-30, 0, "(c) 1999-2002 RedHat, Inc");newt_get_screen_size (&$rows, &$cols);
newt_open_window ($rows/2-17, $cols/2-10, 34, 17, "Choose a Tool");$form = newt_form ();
$list = newt_listbox (3, 2, 10);
foreach (array (
"Authentication configuration",
"Firewall configuration",
"Mouse configuration",
"Network configuration",
"Printer configuration",
"System services") as $l_item)
{
newt_listbox_add_entry ($list, $l_item, $l_item);
}$b1 = newt_button (5, 12, "Run Tool");
$b2 = newt_button (21, 12, "Quit");
newt_form_add_component ($form, $list);
newt_form_add_components ($form, array($b1, $b2));newt_refresh ();
newt_run_form ($form);newt_form_destroy ($f);
newt_pop_window ();
newt_finished ();
?>
```Documentation
--------------
For documentation please refer to [PHP.net](http://php.net/newt)