#include "cmd-edit.h"
Inherited by octave::default_command_editor.
Public Types | |
typedef int(* | char_is_quoted_fcn) (const std::string &, int) |
typedef std::string(* | completion_fcn) (const std::string &, int) |
typedef char *(* | completion_hook_fcn) () |
typedef std::string(* | dequoting_fcn) (const std::string &, int) |
typedef int(* | event_hook_fcn) () |
typedef int(* | pre_input_hook_fcn) () |
typedef std::string(* | quoting_fcn) (const std::string &, int, char) |
typedef int(* | startup_hook_fcn) () |
typedef void(* | user_accept_line_fcn) (const std::string &) |
Public Member Functions | |
virtual | ~command_editor ()=default |
Static Public Member Functions | |
static void | accept_line () |
static void | add_event_hook (event_hook_fcn f) |
static void | add_pre_input_hook (pre_input_hook_fcn f) |
static void | add_startup_hook (startup_hook_fcn f) |
static void | blink_matching_paren (bool flag) |
static void | clear_screen (bool skip_redisplay=false) |
static void | clear_undo_list () |
static int | current_command_number () |
static std::string | decode_prompt_string (const std::string &s) |
static bool | erase_empty_line (bool flag) |
static bool | event_loop_interrupted () |
static bool | filename_completion_desired (bool) |
static bool | filename_quoting_desired (bool) |
static void | force_default_editor () |
static string_vector | generate_filename_completions (const std::string &text) |
static char_is_quoted_fcn | get_char_is_quoted_function () |
static completion_fcn | get_completion_function () |
static std::string | get_current_line () |
static dequoting_fcn | get_dequoting_function () |
static FILE * | get_input_stream () |
static std::string | get_line_buffer () |
static FILE * | get_output_stream () |
static char | get_prev_char (int) |
static quoting_fcn | get_quoting_function () |
static user_accept_line_fcn | get_user_accept_line_function () |
static void | increment_current_command_number () |
static int | insert_initial_input () |
static void | insert_text (const std::string &text) |
static bool | interrupt (bool=true) |
static void | interrupt_event_loop (bool flag=true) |
static void | kill_full_line () |
static void | newline () |
static bool | prefer_env_winsize (bool) |
static void | re_read_init_file () |
static void | read_init_file (const std::string &file="") |
static std::string | readline (const std::string &prompt) |
static std::string | readline (const std::string &prompt, bool &eof) |
static void | redisplay () |
static void | remove_event_hook (event_hook_fcn f) |
static void | remove_pre_input_hook (pre_input_hook_fcn f) |
static void | remove_startup_hook (startup_hook_fcn f) |
static void | replace_line (const std::string &text, bool clear_undo=true) |
static void | reset_current_command_number (int n) |
static void | resize_terminal () |
static void | restore_terminal_state () |
static void | run_event_hooks () |
static void | set_basic_quote_characters (const std::string &s) |
static void | set_basic_word_break_characters (const std::string &s) |
static void | set_char_is_quoted_function (char_is_quoted_fcn f) |
static void | set_completer_quote_characters (const std::string &s) |
static void | set_completer_word_break_characters (const std::string &s) |
static void | set_completion_append_character (char c) |
static void | set_completion_function (completion_fcn f) |
static void | set_dequoting_function (dequoting_fcn f) |
static void | set_filename_quote_characters (const std::string &s) |
static void | set_initial_input (const std::string &text) |
static void | set_input_stream (FILE *f) |
static void | set_name (const std::string &n) |
static void | set_output_stream (FILE *f) |
static void | set_quoting_function (quoting_fcn f) |
static void | set_screen_size (int ht, int wd) |
static void | set_user_accept_line_function (user_accept_line_fcn f) |
static int | terminal_cols () |
static int | terminal_rows () |
static bool | undo () |
Protected Attributes | |
int | m_cols |
int | m_command_number |
std::string | m_initial_input |
bool | m_interrupt_event_loop |
bool | m_interrupted |
int | m_rows |
Definition at line 40 of file cmd-edit.h.
typedef int(* command_editor::char_is_quoted_fcn) (const std::string &, int) |
Definition at line 67 of file cmd-edit.h.
typedef std::string(* command_editor::completion_fcn) (const std::string &, int) |
Definition at line 59 of file cmd-edit.h.
typedef char*(* command_editor::completion_hook_fcn) () |
Definition at line 61 of file cmd-edit.h.
typedef std::string(* command_editor::dequoting_fcn) (const std::string &, int) |
Definition at line 65 of file cmd-edit.h.
typedef int(* command_editor::event_hook_fcn) () |
Definition at line 57 of file cmd-edit.h.
typedef int(* command_editor::pre_input_hook_fcn) () |
Definition at line 55 of file cmd-edit.h.
typedef std::string(* command_editor::quoting_fcn) (const std::string &, int, char) |
Definition at line 63 of file cmd-edit.h.
typedef int(* command_editor::startup_hook_fcn) () |
Definition at line 53 of file cmd-edit.h.
typedef void(* command_editor::user_accept_line_fcn) (const std::string &) |
Definition at line 69 of file cmd-edit.h.
|
inlineprotected |
Definition at line 46 of file cmd-edit.h.
|
virtualdefault |
|
static |
Definition at line 1486 of file cmd-edit.cc.
References do_accept_line().
|
static |
Definition at line 1558 of file cmd-edit.cc.
Referenced by event_manager::event_manager().
|
static |
Definition at line 1532 of file cmd-edit.cc.
References f, and set_pre_input_hook().
Referenced by readline().
|
static |
Definition at line 1506 of file cmd-edit.cc.
References f, and set_startup_hook().
|
static |
Definition at line 1308 of file cmd-edit.cc.
References do_blink_matching_paren().
Referenced by interpreter::execute().
|
static |
Definition at line 1254 of file cmd-edit.cc.
References do_clear_screen().
Referenced by octave::Fclc().
|
static |
Definition at line 1499 of file cmd-edit.cc.
References do_clear_undo_list().
|
static |
Definition at line 1281 of file cmd-edit.cc.
References m_command_number.
|
static |
Definition at line 1275 of file cmd-edit.cc.
References do_decode_prompt_string().
Referenced by lexer::fill_flex_buffer(), tree_evaluator::get_line_and_eval(), and push_parser::run().
|
protectedpure virtual |
Referenced by accept_line().
|
inlineprotectedvirtual |
Definition at line 281 of file cmd-edit.h.
Referenced by blink_matching_paren().
|
inlineprotectedvirtual |
Definition at line 265 of file cmd-edit.h.
Referenced by clear_screen().
|
inlineprotectedvirtual |
Definition at line 346 of file cmd-edit.h.
Referenced by clear_undo_list().
|
protectedvirtual |
Definition at line 1688 of file cmd-edit.cc.
References command_history::current_number(), m_command_number, n, newline_chars(), octave_geteuid_wrapper(), octave_rl_prompt_end_ignore(), octave_rl_prompt_start_ignore(), and read_octal().
Referenced by decode_prompt_string().
|
inlineprotectedvirtual |
Definition at line 283 of file cmd-edit.h.
Referenced by erase_empty_line().
|
inlineprotected |
Definition at line 376 of file cmd-edit.h.
Referenced by event_loop_interrupted().
|
inlineprotectedvirtual |
Definition at line 364 of file cmd-edit.h.
Referenced by filename_completion_desired().
|
inlineprotectedvirtual |
Definition at line 366 of file cmd-edit.h.
Referenced by filename_quoting_desired().
|
protectedpure virtual |
Referenced by generate_filename_completions().
|
inlineprotectedvirtual |
Definition at line 318 of file cmd-edit.h.
Referenced by get_char_is_quoted_function().
|
inlineprotectedvirtual |
Definition at line 309 of file cmd-edit.h.
Referenced by get_completion_function().
|
protectedpure virtual |
Referenced by get_current_line().
|
inlineprotectedvirtual |
Definition at line 315 of file cmd-edit.h.
Referenced by get_dequoting_function().
|
protectedpure virtual |
Referenced by get_input_stream().
|
protectedpure virtual |
Referenced by get_line_buffer().
|
protectedpure virtual |
Referenced by get_output_stream().
|
protectedpure virtual |
Referenced by get_prev_char().
|
inlineprotectedvirtual |
Definition at line 312 of file cmd-edit.h.
Referenced by get_quoting_function().
|
inlineprotectedvirtual |
Definition at line 321 of file cmd-edit.h.
Referenced by get_user_accept_line_function().
|
inlineprotectedvirtual |
Definition at line 372 of file cmd-edit.h.
|
protected |
Definition at line 1915 of file cmd-edit.cc.
Referenced by insert_initial_input().
|
protectedpure virtual |
Referenced by insert_text().
|
inlineprotectedvirtual |
Definition at line 370 of file cmd-edit.h.
Referenced by interrupt().
|
inlineprotected |
Definition at line 374 of file cmd-edit.h.
Referenced by interrupt_event_loop().
|
protectedpure virtual |
Referenced by kill_full_line().
|
protectedpure virtual |
Referenced by newline().
|
inlineprotectedvirtual |
Definition at line 368 of file cmd-edit.h.
Referenced by prefer_env_winsize().
|
inlineprotectedvirtual |
Definition at line 362 of file cmd-edit.h.
Referenced by re_read_init_file().
|
inlineprotectedvirtual |
Definition at line 360 of file cmd-edit.h.
Referenced by read_init_file().
|
protectedpure virtual |
|
inlineprotected |
Definition at line 242 of file cmd-edit.h.
Referenced by readline().
|
inlineprotectedvirtual |
Definition at line 259 of file cmd-edit.h.
Referenced by redisplay().
|
protectedpure virtual |
Referenced by replace_line().
|
inlineprotectedvirtual |
Definition at line 267 of file cmd-edit.h.
Referenced by resize_terminal().
|
inlineprotectedvirtual |
Definition at line 279 of file cmd-edit.h.
Referenced by restore_terminal_state().
|
inlineprotectedvirtual |
Definition at line 291 of file cmd-edit.h.
Referenced by set_basic_quote_characters().
|
inlineprotectedvirtual |
Definition at line 285 of file cmd-edit.h.
Referenced by set_basic_word_break_characters().
|
inlineprotectedvirtual |
Definition at line 305 of file cmd-edit.h.
Referenced by set_char_is_quoted_function().
|
inlineprotectedvirtual |
Definition at line 295 of file cmd-edit.h.
Referenced by set_completer_quote_characters().
|
inlineprotectedvirtual |
Definition at line 287 of file cmd-edit.h.
Referenced by set_completer_word_break_characters().
|
inlineprotectedvirtual |
Definition at line 289 of file cmd-edit.h.
|
inlineprotectedvirtual |
Definition at line 297 of file cmd-edit.h.
Referenced by set_completion_append_character().
|
inlineprotectedvirtual |
Definition at line 299 of file cmd-edit.h.
Referenced by set_completion_function().
|
inlineprotectedvirtual |
Definition at line 303 of file cmd-edit.h.
Referenced by set_dequoting_function().
|
inlineprotectedvirtual |
Definition at line 293 of file cmd-edit.h.
Referenced by set_filename_quote_characters().
|
protectedpure virtual |
Referenced by set_input_stream().
|
inlineprotectedvirtual |
Definition at line 240 of file cmd-edit.h.
Referenced by set_name().
|
protectedpure virtual |
Referenced by set_output_stream().
|
inlineprotectedvirtual |
Definition at line 301 of file cmd-edit.h.
Referenced by set_quoting_function().
|
inlineprotectedvirtual |
Definition at line 269 of file cmd-edit.h.
Referenced by set_screen_size().
|
inlineprotectedvirtual |
Definition at line 307 of file cmd-edit.h.
Referenced by set_user_accept_line_function().
|
inlineprotectedvirtual |
Definition at line 263 of file cmd-edit.h.
Referenced by terminal_cols().
|
inlineprotectedvirtual |
Definition at line 261 of file cmd-edit.h.
Referenced by terminal_rows().
|
inlineprotectedvirtual |
Definition at line 344 of file cmd-edit.h.
Referenced by undo().
|
static |
Definition at line 1315 of file cmd-edit.cc.
References do_erase_empty_line().
|
protected |
Definition at line 1961 of file cmd-edit.cc.
|
protected |
Definition at line 1955 of file cmd-edit.cc.
|
static |
Definition at line 1649 of file cmd-edit.cc.
References do_event_loop_interrupted().
Referenced by action_container::run().
|
static |
Definition at line 1602 of file cmd-edit.cc.
References do_filename_completion_desired().
|
static |
Definition at line 1609 of file cmd-edit.cc.
References do_filename_quoting_desired().
|
static |
Definition at line 1103 of file cmd-edit.cc.
|
static |
Definition at line 1430 of file cmd-edit.cc.
References do_generate_filename_completions().
|
static |
Definition at line 1416 of file cmd-edit.cc.
References do_get_char_is_quoted_function().
|
static |
Definition at line 1398 of file cmd-edit.cc.
References do_get_completion_function().
|
static |
Definition at line 1444 of file cmd-edit.cc.
References do_get_current_line().
|
static |
Definition at line 1410 of file cmd-edit.cc.
References do_get_dequoting_function().
|
static |
Definition at line 1216 of file cmd-edit.cc.
References do_get_input_stream().
|
static |
Definition at line 1438 of file cmd-edit.cc.
References do_get_line_buffer().
|
static |
Definition at line 1229 of file cmd-edit.cc.
References do_get_output_stream().
|
static |
Definition at line 1452 of file cmd-edit.cc.
References do_get_prev_char().
|
static |
Definition at line 1404 of file cmd-edit.cc.
References do_get_quoting_function().
|
static |
Definition at line 1423 of file cmd-edit.cc.
References do_get_user_accept_line_function().
|
static |
Definition at line 1294 of file cmd-edit.cc.
References m_command_number.
Referenced by tree_evaluator::repl().
|
static |
Definition at line 1117 of file cmd-edit.cc.
References do_insert_initial_input().
Referenced by readline().
|
static |
Definition at line 1472 of file cmd-edit.cc.
References do_insert_text().
|
static |
Definition at line 1622 of file cmd-edit.cc.
References do_interrupt(), and m_interrupted.
|
static |
Definition at line 1642 of file cmd-edit.cc.
References do_interrupt_event_loop().
Referenced by action_container::run().
|
static |
Definition at line 1465 of file cmd-edit.cc.
References do_kill_full_line().
|
static |
Definition at line 1479 of file cmd-edit.cc.
References do_newline().
|
inlineprotectedvirtual |
Definition at line 277 of file cmd-edit.h.
Referenced by do_decode_prompt_string().
|
static |
Definition at line 1616 of file cmd-edit.cc.
References do_prefer_env_winsize().
|
static |
Definition at line 1595 of file cmd-edit.cc.
References do_re_read_init_file().
|
static |
Definition at line 1584 of file cmd-edit.cc.
References do_read_init_file(), and octave::sys::file_ops::tilde_expand().
|
protected |
Definition at line 1933 of file cmd-edit.cc.
Referenced by do_decode_prompt_string().
|
static |
Definition at line 1185 of file cmd-edit.cc.
|
static |
Definition at line 1193 of file cmd-edit.cc.
References add_pre_input_hook(), do_readline(), insert_initial_input(), and m_initial_input.
|
static |
Definition at line 1235 of file cmd-edit.cc.
References do_redisplay().
|
static |
Definition at line 1566 of file cmd-edit.cc.
|
static |
Definition at line 1543 of file cmd-edit.cc.
References f, and restore_pre_input_hook().
|
static |
Definition at line 1517 of file cmd-edit.cc.
References f, and restore_startup_hook().
|
static |
Definition at line 1458 of file cmd-edit.cc.
References do_replace_line().
|
static |
Definition at line 1287 of file cmd-edit.cc.
References m_command_number, and n.
|
static |
Definition at line 1261 of file cmd-edit.cc.
References do_resize_terminal().
|
inlineprotectedvirtual |
Definition at line 358 of file cmd-edit.h.
|
inlineprotectedvirtual |
Definition at line 354 of file cmd-edit.h.
Referenced by remove_pre_input_hook().
|
inlineprotectedvirtual |
Definition at line 350 of file cmd-edit.h.
Referenced by remove_startup_hook().
|
static |
Definition at line 1301 of file cmd-edit.cc.
References do_restore_terminal_state().
|
static |
Definition at line 1578 of file cmd-edit.cc.
Referenced by tree_evaluator::server_loop().
|
static |
Definition at line 1335 of file cmd-edit.cc.
References do_set_basic_quote_characters().
|
static |
Definition at line 1321 of file cmd-edit.cc.
References do_set_basic_word_break_characters().
|
static |
Definition at line 1384 of file cmd-edit.cc.
References do_set_char_is_quoted_function(), and f.
|
static |
Definition at line 1349 of file cmd-edit.cc.
References do_set_completer_quote_characters().
|
static |
Definition at line 1328 of file cmd-edit.cc.
References do_set_completer_word_break_characters().
|
static |
Definition at line 1356 of file cmd-edit.cc.
References do_set_completion_append_character().
|
static |
Definition at line 1363 of file cmd-edit.cc.
References do_set_completion_function(), and f.
|
static |
Definition at line 1377 of file cmd-edit.cc.
References do_set_dequoting_function(), and f.
|
inlineprotectedvirtual |
Definition at line 356 of file cmd-edit.h.
|
static |
Definition at line 1342 of file cmd-edit.cc.
References do_set_filename_quote_characters().
|
static |
Definition at line 1110 of file cmd-edit.cc.
References m_initial_input.
|
static |
Definition at line 1209 of file cmd-edit.cc.
References do_set_input_stream(), and f.
|
static |
Definition at line 1178 of file cmd-edit.cc.
References do_set_name(), and n.
|
static |
Definition at line 1222 of file cmd-edit.cc.
References do_set_output_stream(), and f.
|
inlineprotectedvirtual |
Definition at line 352 of file cmd-edit.h.
Referenced by add_pre_input_hook().
|
static |
Definition at line 1370 of file cmd-edit.cc.
References do_set_quoting_function(), and f.
|
static |
Definition at line 1268 of file cmd-edit.cc.
References do_set_screen_size().
Referenced by octave::Fterminal_size().
|
inlineprotectedvirtual |
Definition at line 348 of file cmd-edit.h.
Referenced by add_startup_hook().
|
static |
Definition at line 1391 of file cmd-edit.cc.
References do_set_user_accept_line_function(), and f.
|
static |
Definition at line 1248 of file cmd-edit.cc.
References do_terminal_cols().
Referenced by octave::Fterminal_size().
|
static |
Definition at line 1242 of file cmd-edit.cc.
References do_terminal_rows().
Referenced by octave::Fterminal_size().
|
static |
Definition at line 1493 of file cmd-edit.cc.
References do_undo().
|
protected |
Definition at line 391 of file cmd-edit.h.
|
protected |
Definition at line 388 of file cmd-edit.h.
Referenced by current_command_number(), do_decode_prompt_string(), increment_current_command_number(), and reset_current_command_number().
|
protected |
Definition at line 397 of file cmd-edit.h.
Referenced by readline(), and set_initial_input().
|
protected |
Definition at line 395 of file cmd-edit.h.
|
protected |
Definition at line 393 of file cmd-edit.h.
Referenced by interrupt().
|
protected |
Definition at line 390 of file cmd-edit.h.