PHP Newt Functions
EditRocket provides the following information on Newt functions in the PHP source code builder.
void newt_bell ( void ) - This function sends a beep to the terminal.
resource newt_button ( int $left , int $top , string $text ) - Creates a new button.
resource newt_button_bar ( array &$buttons ) - This function returns a grid containing the buttons created.
int newt_centered_window ( int $width , int $height [, string $title ] ) - Open a centered window of the specified size.
resource newt_checkbox ( int $left , int $top , string $text , string $def_value [, string $seq ] ) -
string newt_checkbox_get_value ( resource $checkbox ) - This function returns the character in the sequence which indicates the current value of the checkbox.
void newt_checkbox_set_flags ( resource $checkbox , int $flags , int $sense ) - This function allows to set various flags on checkbox resource.
void newt_checkbox_set_value ( resource $checkbox , string $value ) - This function allows to set the current value of the checkbox resource.
resource newt_checkbox_tree ( int $left , int $top , int $height [, int $flags ] ) -
void newt_checkbox_tree_add_item ( resource $checkboxtree , string $text , mixed $data , int $flags , int $index [, int $... ] ) - This function allows to add new item to the checkbox tree.
array newt_checkbox_tree_find_item ( resource $checkboxtree , mixed $data ) - Finds an item in the checkbox tree by item's data.
mixed newt_checkbox_tree_get_current ( resource $checkboxtree ) - This method returns checkbox tree selected tem.
string newt_checkbox_tree_get_entry_value ( resource $checkboxtree , mixed $data ) -
array newt_checkbox_tree_get_multi_selection ( resource $checkboxtree , string $seqnum ) -
array newt_checkbox_tree_get_selection ( resource $checkboxtree ) -
resource newt_checkbox_tree_multi ( int $left , int $top , int $height , string $seq [, int $flags ] ) -
void newt_checkbox_tree_set_current ( resource $checkboxtree , mixed $data ) -
void newt_checkbox_tree_set_entry ( resource $checkboxtree , mixed $data , string $text ) -
void newt_checkbox_tree_set_entry_value ( resource $checkboxtree , mixed $data , string $value ) -
void newt_checkbox_tree_set_width ( resource $checkbox_tree , int $width ) -
void newt_clear_key_buffer ( void ) - Discards the contents of the terminal's input buffer without waiting for additional input.
void newt_cls ( void ) -
resource newt_compact_button ( int $left , int $top , string $text ) -
void newt_component_add_callback ( resource $component , mixed $func_name , mixed $data ) -
void newt_component_takes_focus ( resource $component , bool $takes_focus ) -
resource newt_create_grid ( int $cols , int $rows ) -
void newt_cursor_off ( void ) -
void newt_cursor_on ( void ) -
void newt_delay ( int $microseconds ) -
void newt_draw_form ( resource $form ) -
void newt_draw_root_text ( int $left , int $top , string $text ) - Displays the string text at the position indicated.
resource newt_entry ( int $left , int $top , int $width [, string $init_value [, int $flags ]] ) -
string newt_entry_get_value ( resource $entry ) -
void newt_entry_set ( resource $entry , string $value [, bool $cursor_at_end ] ) -
void newt_entry_set_filter ( resource $entry , callback $filter , mixed $data ) -
void newt_entry_set_flags ( resource $entry , int $flags , int $sense ) -
int newt_finished ( void ) - Uninitializes newt interface. This function be called, when program is ready to exit.
resource newt_form ([ resource $vert_bar [, string $help [, int $flags ]]] ) - Create a new form.
void newt_form_add_component ( resource $form , resource $component ) - Adds a single component to the form.
void newt_form_add_components ( resource $form , array $components ) - Adds several components to the form.
void newt_form_add_hot_key ( resource $form , int $key ) -
void newt_form_destroy ( resource $form ) - This function frees the memory resources used by the form and all of the components which have been added to the form (including those components which are on subforms). Once a form has been destroyed, none of the form's components can be used.
resource newt_form_get_current ( resource $form ) -
void newt_form_run ( resource $form , array &$exit_struct ) - This function runs the form passed to it.
void newt_form_set_background ( resource $from , int $background ) -
void newt_form_set_height ( resource $form , int $height ) -
void newt_form_set_size ( resource $form ) -
void newt_form_set_timer ( resource $form , int $milliseconds ) -
void newt_form_set_width ( resource $form , int $width ) -
void newt_form_watch_fd ( resource $form , resource $stream [, int $flags ] ) -
void newt_get_screen_size ( int &$cols , int &$rows ) - Fills in the passed references with the current size of the terminal.
void newt_grid_add_components_to_form ( resource $grid , resource $form , bool $recurse ) -
resource newt_grid_basic_window ( resource $text , resource $middle , resource $buttons ) -
void newt_grid_free ( resource $grid , bool $recurse ) -
void newt_grid_get_size ( resouce $grid , int &$width , int &$height ) -
resource newt_grid_h_close_stacked ( int $element1_type , resource $element1 [, int $... [, resource $... ]] ) -
resource newt_grid_h_stacked ( int $element1_type , resource $element1 [, int $... [, resource $... ]] ) -
void newt_grid_place ( resource $grid , int $left , int $top ) -
void newt_grid_set_field ( resource $grid , int $col , int $row , int $type , resource $val , int $pad_left , int $pad_top , int $pad_right , int $pad_bottom , int $anchor [, int $flags ] ) -
resource newt_grid_simple_window ( resource $text , resource $middle , resource $buttons ) -
resource newt_grid_v_close_stacked ( int $element1_type , resource $element1 [, int $... [, resource $... ]] ) -
resource newt_grid_v_stacked ( int $element1_type , resource $element1 [, int $... [, resource $... ]] ) -
void newt_grid_wrapped_window ( resource $grid , string $title ) -
void newt_grid_wrapped_window_at ( resource $grid , string $title , int $left , int $top ) -
int newt_init ( void ) - Initializes the newt interface. This function must be called before any other newt function.
resource newt_label ( int $left , int $top , string $text ) -
void newt_label_set_text ( resource $label , string $text ) -
resource newt_listbox ( int $left , int $top , int $height [, int $flags ] ) -
void newt_listbox_append_entry ( resource $listbox , string $text , mixed $data ) -
void newt_listbox_clear ( resource $listobx ) -
void newt_listbox_clear_selection ( resource $listbox ) -
void newt_listbox_delete_entry ( resource $listbox , mixed $key ) -
string newt_listbox_get_current ( resource $listbox ) -
array newt_listbox_get_selection ( resource $listbox ) -
void newt_listbox_insert_entry ( resource $listbox , string $text , mixed $data , mixed $key ) -
int newt_listbox_item_count ( resource $listbox ) -
void newt_listbox_select_item ( resource $listbox , mixed $key , int $sense ) -
void newt_listbox_set_current ( resource $listbox , int $num ) -
void newt_listbox_set_current_by_key ( resource $listbox , mixed $key ) -
void newt_listbox_set_data ( resource $listbox , int $num , mixed $data ) -
void newt_listbox_set_entry ( resource $listbox , int $num , string $text ) -
void newt_listbox_set_width ( resource $listbox , int $width ) -
resource newt_listitem ( int $left , int $top , string $text , bool $is_default , resouce $prev_item , mixed $data [, int $flags ] ) -
mixed newt_listitem_get_data ( resource $item ) -
void newt_listitem_set ( resource $item , string $text ) -
int newt_open_window ( int $left , int $top , int $width , int $height [, string $title ] ) - Open a window of the specified size and position.
void newt_pop_help_line ( void ) - Replaces the current help line with the one from the stack.
void newt_pop_window ( void ) - Removes the top window from the display, and redraws the display areas which the window overwrote.
void newt_push_help_line ([ string $text ] ) - Saves the current help line on a stack, and displays the new line.
resource newt_radio_get_current ( resource $set_member ) -
resource newt_radiobutton ( int $left , int $top , string $text , bool $is_default [, resource $prev_button ] ) -
void newt_redraw_help_line ( void ) -
string newt_reflow_text ( string $text , int $width , int $flex_down , int $flex_up , int &$actual_width , int &$actual_height ) -
void newt_refresh ( void ) - To increase performance, newt only updates the display when it needs to, not when the program tells it to write to the terminal. Applications can force newt to immediately update modified portions of the screen by calling this function.
void newt_resize_screen ([ bool $redraw ] ) -
void newt_resume ( void ) -
resource newt_run_form ( resource $form ) - This function runs the form passed to it.
resource newt_scale ( int $left , int $top , int $width , int $full_value ) -
void newt_scale_set ( resource $scale , int $amount ) -
void newt_scrollbar_set ( resource $scrollbar , int $where , int $total ) -
void newt_set_help_callback ( mixed $function ) -
void newt_set_suspend_callback ( callback $function , mixed $data ) - Set a callback function which gets invoked when user presses the suspend key (normally ^Z). If no suspend callback is registered, the suspend keystroke is ignored.
void newt_suspend ( void ) - Tells newt to return the terminal to its initial state. Once this is done, the application can suspend itself (by sending itself a SIGTSTP, fork a child program, or do whatever else it likes).
resource newt_textbox ( int $left , int $top , int $width , int $height [, int $flags ] ) -
int newt_textbox_get_num_lines ( resource $textbox ) -
resource newt_textbox_reflowed ( int $left , int $top , char $*text , int $width , int $flex_down , int $flex_up [, int $flags ] ) -
void newt_textbox_set_height ( resource $textbox , int $height ) -
void newt_textbox_set_text ( resource $textbox , string $text ) -
resource newt_vertical_scrollbar ( int $left , int $top , int $height [, int $normal_colorset [, int $thumb_colorset ]] ) -
void newt_wait_for_key ( void ) - This function doesn't return until a key has been pressed. The keystroke is then ignored. If a key is already in the terminal's buffer, this function discards a keystroke and returns immediately.
int newt_win_choice ( string $title , string $button1_text , string $button2_text , string $format [, mixed $args [, mixed $... ]] ) -
int newt_win_entries ( string $title , string $text , int $suggested_width , int $flex_down , int $flex_up , int $data_width , array &$items , string $button1 [, string $... ] ) -
int newt_win_menu ( string $title , string $text , int $suggestedWidth , int $flexDown , int $flexUp , int $maxListHeight , array $items , int &$listItem [, string $button1 [, string $... ]] ) -
void newt_win_message ( string $title , string $button_text , string $format [, mixed $args [, mixed $... ]] ) -
void newt_win_messagev ( string $title , string $button_text , string $format , array $args ) -
int newt_win_ternary ( string $title , string $button1_text , string $button2_text , string $button3_text , string $format [, mixed $args [, mixed $... ]] ) -