XCI. Newt Functions

Introduzione

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.

Requisiti

This module uses the functions of the RedHat Newt library. You need libnewt version >= 0.51.0.

Installazione

This PECL extension is not bundled with PHP. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: http://pecl.php.net/package/newt.

In PHP 4 this PECL extensions source can be found in the ext/ directory within the PHP source or at the PECL link above. In order to use these functions you must compile CGI or CLI PHP with newt support by using the --with-newt[=DIR] configure option.

Nota: This extension is not available for Windows platform.

You may need also curses and slang libraries, in order to compile this extension. To specify locations of these libraries, use the followin configuration options: --with-curses-dir=/path/to/libcurses --with-slang-dir=/path/to/libslang

Tipi di risorse

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())

Costanti predefinite

Queste costanti sono definite da questa estensione e sono disponibili solo se l'estensione è stata compilata nel PHP o se è stata caricata dinamicamente a runtime.

NEWT_COLORSET_ROOT (integer)

NEWT_COLORSET_BORDER (integer)

NEWT_COLORSET_WINDOW (integer)

NEWT_COLORSET_SHADOW (integer)

NEWT_COLORSET_TITLE (integer)

NEWT_COLORSET_BUTTON (integer)

NEWT_COLORSET_ACTBUTTON (integer)

NEWT_COLORSET_CHECKBOX (integer)

NEWT_COLORSET_ACTCHECKBOX (integer)

NEWT_COLORSET_ENTRY (integer)

NEWT_COLORSET_LABEL (integer)

NEWT_COLORSET_LISTBOX (integer)

NEWT_COLORSET_ACTLISTBOX (integer)

NEWT_COLORSET_TEXTBOX (integer)

NEWT_COLORSET_ACTTEXTBOX (integer)

NEWT_COLORSET_HELPLINE (integer)

NEWT_COLORSET_ROOTTEXT (integer)

NEWT_COLORSET_EMPTYSCALE (integer)

NEWT_COLORSET_FULLSCALE (integer)

NEWT_COLORSET_DISENTRY (integer)

NEWT_COLORSET_COMPACTBUTTON (integer)

NEWT_COLORSET_ACTSELLISTBOX (integer)

NEWT_COLORSET_SELLISTBOX (integer)

NEWT_ARG_LAST (integer)

NEWT_ARG_APPEND (integer)

NEWT_FLAGS_SET (integer)

NEWT_FLAGS_RESET (integer)

NEWT_FLAGS_TOGGLE (integer)

NEWT_FLAG_RETURNEXIT (integer)

NEWT_FLAG_HIDDEN (integer)

NEWT_FLAG_SCROLL (integer)

NEWT_FLAG_DISABLED (integer)

NEWT_FLAG_BORDER (integer)

NEWT_FLAG_WRAP (integer)

NEWT_FLAG_NOF12 (integer)

NEWT_FLAG_MULTIPLE (integer)

NEWT_FLAG_SELECTED (integer)

NEWT_FLAG_CHECKBOX (integer)

NEWT_FLAG_PASSWORD (integer)

NEWT_FLAG_SHOWCURSOR (integer)

NEWT_FD_READ (integer)

NEWT_FD_WRITE (integer)

NEWT_FD_EXCEPT (integer)

NEWT_CHECKBOXTREE_UNSELECTABLE (integer)

NEWT_CHECKBOXTREE_HIDE_BOX (integer)

NEWT_CHECKBOXTREE_COLLAPSED (integer)

NEWT_CHECKBOXTREE_EXPANDED (integer)

NEWT_CHECKBOXTREE_UNSELECTED (integer)

NEWT_CHECKBOXTREE_SELECTED (integer)

NEWT_LISTBOX_RETURNEXIT (integer)

NEWT_ENTRY_SCROLL (integer)

NEWT_ENTRY_HIDDEN (integer)

NEWT_ENTRY_RETURNEXIT (integer)

NEWT_ENTRY_DISABLED (integer)

NEWT_TEXTBOX_WRAP (integer)

NEWT_TEXTBOX_SCROLL (integer)

NEWT_FORM_NOF12 (integer)

NEWT_EXIT_HOTKEY (integer)

NEWT_EXIT_COMPONENT (integer)

NEWT_EXIT_FDREADY (integer)

NEWT_EXIT_TIMER (integer)

NEWT_KEY_TAB (integer)

NEWT_KEY_ENTER (integer)

NEWT_KEY_SUSPEND (integer)

NEWT_KEY_ESCAPE (integer)

NEWT_KEY_RETURN (integer)

NEWT_KEY_EXTRA_BASE (integer)

NEWT_KEY_UP (integer)

NEWT_KEY_DOWN (integer)

NEWT_KEY_LEFT (integer)

NEWT_KEY_RIGHT (integer)

NEWT_KEY_BKSPC (integer)

NEWT_KEY_DELETE (integer)

NEWT_KEY_HOME (integer)

NEWT_KEY_END (integer)

NEWT_KEY_UNTAB (integer)

NEWT_KEY_PGUP (integer)

NEWT_KEY_PGDN (integer)

NEWT_KEY_INSERT (integer)

NEWT_KEY_F1 (integer)

NEWT_KEY_F2 (integer)

NEWT_KEY_F3 (integer)

NEWT_KEY_F4 (integer)

NEWT_KEY_F5 (integer)

NEWT_KEY_F6 (integer)

NEWT_KEY_F7 (integer)

NEWT_KEY_F8 (integer)

NEWT_KEY_F9 (integer)

NEWT_KEY_F10 (integer)

NEWT_KEY_F11 (integer)

NEWT_KEY_F12 (integer)

NEWT_KEY_RESIZE (integer)

NEWT_ANCHOR_LEFT (integer)

NEWT_ANCHOR_RIGHT (integer)

NEWT_ANCHOR_TOP (integer)

NEWT_ANCHOR_BOTTOM (integer)

NEWT_GRID_FLAG_GROWX (integer)

NEWT_GRID_FLAG_GROWY (integer)

NEWT_GRID_EMPTY (integer)

NEWT_GRID_COMPONENT (integer)

NEWT_GRID_SUBGRID (integer)

Sommario
newt_bell -- Send a beep to the terminal
newt_button_bar -- 
newt_button -- 
newt_centered_window -- Open a centered window of the specified size
newt_checkbox_get_value -- 
newt_checkbox_set_flags -- 
newt_checkbox_set_value -- 
newt_checkbox_tree_add_item -- *
newt_checkbox_tree_find_item -- 
newt_checkbox_tree_get_current -- 
newt_checkbox_tree_get_entry_value -- 
newt_checkbox_tree_get_multi_selection -- 
newt_checkbox_tree_get_selection -- 
newt_checkbox_tree_multi -- 
newt_checkbox_tree_set_current -- 
newt_checkbox_tree_set_entry_value -- 
newt_checkbox_tree_set_entry -- 
newt_checkbox_tree_set_width -- 
newt_checkbox_tree -- 
newt_checkbox -- 
newt_clear_key_buffer -- Discards the contents of the terminal's input buffer without waiting for additional input
newt_cls -- 
newt_compact_button -- 
newt_component_add_callback -- 
newt_component_takes_focus -- 
newt_create_grid -- 
newt_cursor_off -- 
newt_cursor_on -- 
newt_delay -- 
newt_draw_form -- 
newt_draw_root_text -- Displays the string text at the position indicated
newt_entry_get_value -- 
newt_entry_set_filter -- 
newt_entry_set_flags -- 
newt_entry_set -- 
newt_entry -- 
newt_finished -- Uninitializes newt interface.
newt_form_add_component -- 
newt_form_add_components -- 
newt_form_add_host_key -- 
newt_form_get_current -- 
newt_form_run -- 
newt_form_set_background -- 
newt_form_set_height -- 
newt_form_set_size -- 
newt_form_set_timer -- 
newt_form_set_width -- 
newt_form_watch_fd -- 
newt_form -- 
newt_get_screen_size -- Fills in the passed references with the current size of the terminal
newt_grid_add_components_to_form -- 
newt_grid_basic_window -- 
newt_grid_free -- 
newt_grid_get_size -- 
newt_grid_h_close_stacked -- 
newt_grid_h_stacked -- 
newt_grid_place -- 
newt_grid_set_field -- 
newt_grid_simple_window -- 
newt_grid_v_close_stacked -- 
newt_grid_v_stacked -- 
newt_grid_wrapped_window_at -- 
newt_grid_wrapped_window -- 
newt_init -- Initialize newt
newt_label_set_text -- 
newt_label -- 
newt_listbox_append_entry -- 
newt_listbox_clear_selection -- 
newt_listbox_clear -- 
newt_listbox_delete_entry -- 
newt_listbox_get_current -- 
newt_listbox_get_selection -- 
newt_listbox_insert_entry -- 
newt_listbox_item_count -- 
newt_listbox_select_item -- 
newt_listbox_set_current_by_key -- 
newt_listbox_set_current -- 
newt_listbox_set_data -- 
newt_listbox_set_entry -- 
newt_listbox_set_width -- 
newt_listbox -- 
newt_listitem_get_data -- 
newt_listitem_set -- 
newt_listitem -- 
newt_open_window -- Open a window of the specified size and position
newt_pop_help_line -- Replaces the current help line with the one from the stack
newt_pop_window -- Removes the top window from the display
newt_push_help_line -- Saves the current help line on a stack, and displays the new line
newt_radio_get_current -- 
newt_radiobutton -- 
newt_redraw_help_line -- 
newt_reflow_text -- 
newt_refresh -- Updates modified portions of the screen
newt_resize_screen -- 
newt_resume -- Resume using the newt interface after calling newt_suspend()
newt_run_form -- 
newt_scale_set -- 
newt_scale -- 
newt_scrollbar_set -- 
newt_set_help_callback -- 
newt_set_suspend_callback -- Set a callback function which gets invoked when user presses the suspend key
newt_suspend -- Tells newt to return the terminal to its initial state
newt_texbox_set_text -- 
newt_textbox_get_num_lines -- 
newt_textbox_reflowed -- 
newt_textbox_set_height -- 
newt_textbox -- 
newt_vertical_scrollbar -- 
newt_wait_for_key -- Doesn't return until a key has been pressed
newt_win_choice -- 
newt_win_entries -- 
newt_win_menu -- 
newt_win_message -- 
newt_win_messagev -- 
newt_win_ternary --