GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::command_editor Class Referenceabstract

#include "cmd-edit.h"

Inheritance diagram for octave::command_editor:
Collaboration diagram for octave::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) (void)
 
typedef int(* pre_input_hook_fcn) (void)
 
typedef std::string(* quoting_fcn) (const std::string &, int, char)
 
typedef int(* startup_hook_fcn) (void)
 
typedef void(* user_accept_line_fcn) (const std::string &)
 

Public Member Functions

 command_editor (const command_editor &)=delete
 
virtual ~command_editor (void)=default
 
command_editoroperator= (const command_editor &)=delete
 

Static Public Member Functions

static void accept_line (void)
 
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 (void)
 
static int current_command_number (void)
 
static std::string decode_prompt_string (const std::string &s)
 
static bool erase_empty_line (bool flag)
 
static bool filename_completion_desired (bool)
 
static bool filename_quoting_desired (bool)
 
static void force_default_editor (void)
 
static string_vector generate_filename_completions (const std::string &text)
 
static char_is_quoted_fcn get_char_is_quoted_function (void)
 
static completion_fcn get_completion_function (void)
 
static std::string get_current_line (void)
 
static dequoting_fcn get_dequoting_function (void)
 
static FILE * get_input_stream (void)
 
static std::string get_line_buffer (void)
 
static FILE * get_output_stream (void)
 
static char get_prev_char (int)
 
static quoting_fcn get_quoting_function (void)
 
static user_accept_line_fcn get_user_accept_line_function (void)
 
static void increment_current_command_number (void)
 
static int insert_initial_input (void)
 
static void insert_text (const std::string &text)
 
static bool interrupt (bool=true)
 
static void kill_full_line (void)
 
static void newline (void)
 
static bool prefer_env_winsize (bool)
 
static void re_read_init_file (void)
 
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 (void)
 
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 (void)
 
static void restore_terminal_state (void)
 
static void run_event_hooks (void)
 
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 (void)
 
static int terminal_rows (void)
 
static bool undo (void)
 

Protected Member Functions

 command_editor (void)
 
virtual void do_accept_line (void)=0
 
virtual void do_blink_matching_paren (bool)
 
virtual void do_clear_screen (bool)
 
virtual void do_clear_undo_list (void)
 
virtual std::string do_decode_prompt_string (const std::string &)
 
virtual bool do_erase_empty_line (bool)
 
virtual bool do_filename_completion_desired (bool)
 
virtual bool do_filename_quoting_desired (bool)
 
virtual string_vector do_generate_filename_completions (const std::string &text)=0
 
virtual char_is_quoted_fcn do_get_char_is_quoted_function (void) const
 
virtual completion_fcn do_get_completion_function (void) const
 
virtual std::string do_get_current_line (void) const =0
 
virtual dequoting_fcn do_get_dequoting_function (void) const
 
virtual FILE * do_get_input_stream (void)=0
 
virtual std::string do_get_line_buffer (void) const =0
 
virtual FILE * do_get_output_stream (void)=0
 
virtual char do_get_prev_char (int) const =0
 
virtual quoting_fcn do_get_quoting_function (void) const
 
virtual user_accept_line_fcn do_get_user_accept_line_function (void) const
 
virtual void do_handle_interrupt_signal (void)
 
int do_insert_initial_input (void)
 
virtual void do_insert_text (const std::string &text)=0
 
virtual void do_interrupt (bool)
 
virtual void do_kill_full_line (void)=0
 
virtual void do_newline (void)=0
 
virtual bool do_prefer_env_winsize (bool)
 
virtual void do_re_read_init_file (void)
 
virtual void do_read_init_file (const std::string &)
 
std::string do_readline (const std::string &prompt)
 
virtual std::string do_readline (const std::string &, bool &)=0
 
virtual void do_redisplay (void)
 
virtual void do_replace_line (const std::string &text, bool clear_undo)=0
 
virtual void do_resize_terminal (void)
 
virtual void do_restore_terminal_state (void)
 
virtual void do_set_basic_quote_characters (const std::string &)
 
virtual void do_set_basic_word_break_characters (const std::string &)
 
virtual void do_set_char_is_quoted_function (char_is_quoted_fcn)
 
virtual void do_set_completer_quote_characters (const std::string &)
 
virtual void do_set_completer_word_break_characters (const std::string &)
 
virtual void do_set_completer_word_break_hook (completion_hook_fcn)
 
virtual void do_set_completion_append_character (char)
 
virtual void do_set_completion_function (completion_fcn)
 
virtual void do_set_dequoting_function (dequoting_fcn)
 
virtual void do_set_filename_quote_characters (const std::string &)
 
virtual void do_set_input_stream (FILE *)=0
 
virtual void do_set_name (const std::string &)
 
virtual void do_set_output_stream (FILE *)=0
 
virtual void do_set_quoting_function (quoting_fcn)
 
virtual void do_set_screen_size (int, int)
 
virtual void do_set_user_accept_line_function (user_accept_line_fcn)
 
virtual int do_terminal_cols (void)
 
virtual int do_terminal_rows (void)
 
virtual bool do_undo (void)
 
void error (int)
 
void error (const std::string &)
 
virtual std::string newline_chars (void)
 
int read_octal (const std::string &s)
 
virtual void restore_event_hook (void)
 
virtual void restore_pre_input_hook (void)
 
virtual void restore_startup_hook (void)
 
virtual void set_event_hook (event_hook_fcn)
 
virtual void set_pre_input_hook (pre_input_hook_fcn)
 
virtual void set_startup_hook (startup_hook_fcn)
 

Protected Attributes

int command_number
 
std::string initial_input
 
bool interrupted
 

Static Private Member Functions

static void cleanup_instance (void)
 
static int event_handler (void)
 
static void handle_interrupt_signal (void)
 
static bool instance_ok (void)
 
static void make_command_editor (void)
 
static int pre_input_handler (void)
 
static int startup_handler (void)
 

Static Private Attributes

static std::set< event_hook_fcnevent_hook_set
 
static command_editorinstance = nullptr
 
static std::set< pre_input_hook_fcnpre_input_hook_set
 
static std::set< startup_hook_fcnstartup_hook_set
 

Detailed Description

Definition at line 37 of file cmd-edit.h.

Member Typedef Documentation

◆ char_is_quoted_fcn

typedef int(* octave::command_editor::char_is_quoted_fcn) (const std::string &, int)

Definition at line 62 of file cmd-edit.h.

◆ completion_fcn

typedef std::string(* octave::command_editor::completion_fcn) (const std::string &, int)

Definition at line 54 of file cmd-edit.h.

◆ completion_hook_fcn

typedef char*(* octave::command_editor::completion_hook_fcn) ()

Definition at line 56 of file cmd-edit.h.

◆ dequoting_fcn

typedef std::string(* octave::command_editor::dequoting_fcn) (const std::string &, int)

Definition at line 60 of file cmd-edit.h.

◆ event_hook_fcn

typedef int(* octave::command_editor::event_hook_fcn) (void)

Definition at line 52 of file cmd-edit.h.

◆ pre_input_hook_fcn

typedef int(* octave::command_editor::pre_input_hook_fcn) (void)

Definition at line 50 of file cmd-edit.h.

◆ quoting_fcn

typedef std::string(* octave::command_editor::quoting_fcn) (const std::string &, int, char)

Definition at line 58 of file cmd-edit.h.

◆ startup_hook_fcn

typedef int(* octave::command_editor::startup_hook_fcn) (void)

Definition at line 48 of file cmd-edit.h.

◆ user_accept_line_fcn

typedef void(* octave::command_editor::user_accept_line_fcn) (const std::string &)

Definition at line 64 of file cmd-edit.h.

Constructor & Destructor Documentation

◆ command_editor() [1/2]

octave::command_editor::command_editor ( void  )
inlineprotected

Definition at line 43 of file cmd-edit.h.

◆ command_editor() [2/2]

octave::command_editor::command_editor ( const command_editor )
delete

◆ ~command_editor()

virtual octave::command_editor::~command_editor ( void  )
virtualdefault

Member Function Documentation

◆ accept_line()

void octave::command_editor::accept_line ( void  )
static

◆ add_event_hook()

void octave::command_editor::add_event_hook ( event_hook_fcn  f)
static

◆ add_pre_input_hook()

void octave::command_editor::add_pre_input_hook ( pre_input_hook_fcn  f)
static

Definition at line 1528 of file cmd-edit.cc.

References f.

◆ add_startup_hook()

void octave::command_editor::add_startup_hook ( startup_hook_fcn  f)
static

Definition at line 1502 of file cmd-edit.cc.

References f.

◆ blink_matching_paren()

void octave::command_editor::blink_matching_paren ( bool  flag)
static

Definition at line 1302 of file cmd-edit.cc.

◆ cleanup_instance()

static void octave::command_editor::cleanup_instance ( void  )
inlinestaticprivate

Definition at line 221 of file cmd-edit.h.

◆ clear_screen()

void octave::command_editor::clear_screen ( bool  skip_redisplay = false)
static

Definition at line 1246 of file cmd-edit.cc.

Referenced by octave::main_window::clear_command_window_callback(), and Fclc().

◆ clear_undo_list()

void octave::command_editor::clear_undo_list ( void  )
static

Definition at line 1495 of file cmd-edit.cc.

◆ current_command_number()

int octave::command_editor::current_command_number ( void  )
static

Definition at line 1274 of file cmd-edit.cc.

◆ decode_prompt_string()

std::string octave::command_editor::decode_prompt_string ( const std::string s)
static

Definition at line 1267 of file cmd-edit.cc.

References s.

Referenced by octave::tree_evaluator::echo_code(), and octave::base_reader::octave_gets().

◆ do_accept_line()

virtual void octave::command_editor::do_accept_line ( void  )
protectedpure virtual

◆ do_blink_matching_paren()

virtual void octave::command_editor::do_blink_matching_paren ( bool  )
inlineprotectedvirtual

Definition at line 268 of file cmd-edit.h.

◆ do_clear_screen()

virtual void octave::command_editor::do_clear_screen ( bool  )
inlineprotectedvirtual

Definition at line 256 of file cmd-edit.h.

◆ do_clear_undo_list()

virtual void octave::command_editor::do_clear_undo_list ( void  )
inlineprotectedvirtual

Definition at line 329 of file cmd-edit.h.

◆ do_decode_prompt_string()

std::string octave::command_editor::do_decode_prompt_string ( const std::string s)
protectedvirtual

◆ do_erase_empty_line()

virtual bool octave::command_editor::do_erase_empty_line ( bool  )
inlineprotectedvirtual

Definition at line 270 of file cmd-edit.h.

◆ do_filename_completion_desired()

virtual bool octave::command_editor::do_filename_completion_desired ( bool  )
inlineprotectedvirtual

Definition at line 347 of file cmd-edit.h.

◆ do_filename_quoting_desired()

virtual bool octave::command_editor::do_filename_quoting_desired ( bool  )
inlineprotectedvirtual

Definition at line 349 of file cmd-edit.h.

◆ do_generate_filename_completions()

virtual string_vector octave::command_editor::do_generate_filename_completions ( const std::string text)
protectedpure virtual

◆ do_get_char_is_quoted_function()

virtual char_is_quoted_fcn octave::command_editor::do_get_char_is_quoted_function ( void  ) const
inlineprotectedvirtual

Definition at line 302 of file cmd-edit.h.

◆ do_get_completion_function()

virtual completion_fcn octave::command_editor::do_get_completion_function ( void  ) const
inlineprotectedvirtual

Definition at line 296 of file cmd-edit.h.

◆ do_get_current_line()

virtual std::string octave::command_editor::do_get_current_line ( void  ) const
protectedpure virtual

◆ do_get_dequoting_function()

virtual dequoting_fcn octave::command_editor::do_get_dequoting_function ( void  ) const
inlineprotectedvirtual

Definition at line 300 of file cmd-edit.h.

◆ do_get_input_stream()

virtual FILE* octave::command_editor::do_get_input_stream ( void  )
protectedpure virtual

◆ do_get_line_buffer()

virtual std::string octave::command_editor::do_get_line_buffer ( void  ) const
protectedpure virtual

◆ do_get_output_stream()

virtual FILE* octave::command_editor::do_get_output_stream ( void  )
protectedpure virtual

◆ do_get_prev_char()

virtual char octave::command_editor::do_get_prev_char ( int  ) const
protectedpure virtual

◆ do_get_quoting_function()

virtual quoting_fcn octave::command_editor::do_get_quoting_function ( void  ) const
inlineprotectedvirtual

Definition at line 298 of file cmd-edit.h.

◆ do_get_user_accept_line_function()

virtual user_accept_line_fcn octave::command_editor::do_get_user_accept_line_function ( void  ) const
inlineprotectedvirtual

Definition at line 305 of file cmd-edit.h.

◆ do_handle_interrupt_signal()

virtual void octave::command_editor::do_handle_interrupt_signal ( void  )
inlineprotectedvirtual

Definition at line 355 of file cmd-edit.h.

◆ do_insert_initial_input()

int octave::command_editor::do_insert_initial_input ( void  )
protected

Definition at line 1899 of file cmd-edit.cc.

References input, and string.

◆ do_insert_text()

virtual void octave::command_editor::do_insert_text ( const std::string text)
protectedpure virtual

◆ do_interrupt()

virtual void octave::command_editor::do_interrupt ( bool  )
inlineprotectedvirtual

Definition at line 353 of file cmd-edit.h.

◆ do_kill_full_line()

virtual void octave::command_editor::do_kill_full_line ( void  )
protectedpure virtual

◆ do_newline()

virtual void octave::command_editor::do_newline ( void  )
protectedpure virtual

◆ do_prefer_env_winsize()

virtual bool octave::command_editor::do_prefer_env_winsize ( bool  )
inlineprotectedvirtual

Definition at line 351 of file cmd-edit.h.

◆ do_re_read_init_file()

virtual void octave::command_editor::do_re_read_init_file ( void  )
inlineprotectedvirtual

Definition at line 345 of file cmd-edit.h.

◆ do_read_init_file()

virtual void octave::command_editor::do_read_init_file ( const std::string )
inlineprotectedvirtual

Definition at line 343 of file cmd-edit.h.

◆ do_readline() [1/2]

std::string octave::command_editor::do_readline ( const std::string prompt)
inlineprotected

Definition at line 233 of file cmd-edit.h.

◆ do_readline() [2/2]

virtual std::string octave::command_editor::do_readline ( const std::string ,
bool  
)
protectedpure virtual

◆ do_redisplay()

virtual void octave::command_editor::do_redisplay ( void  )
inlineprotectedvirtual

Definition at line 250 of file cmd-edit.h.

◆ do_replace_line()

virtual void octave::command_editor::do_replace_line ( const std::string text,
bool  clear_undo 
)
protectedpure virtual

◆ do_resize_terminal()

virtual void octave::command_editor::do_resize_terminal ( void  )
inlineprotectedvirtual

Definition at line 258 of file cmd-edit.h.

◆ do_restore_terminal_state()

virtual void octave::command_editor::do_restore_terminal_state ( void  )
inlineprotectedvirtual

Definition at line 266 of file cmd-edit.h.

◆ do_set_basic_quote_characters()

virtual void octave::command_editor::do_set_basic_quote_characters ( const std::string )
inlineprotectedvirtual

Definition at line 278 of file cmd-edit.h.

◆ do_set_basic_word_break_characters()

virtual void octave::command_editor::do_set_basic_word_break_characters ( const std::string )
inlineprotectedvirtual

Definition at line 272 of file cmd-edit.h.

◆ do_set_char_is_quoted_function()

virtual void octave::command_editor::do_set_char_is_quoted_function ( char_is_quoted_fcn  )
inlineprotectedvirtual

Definition at line 292 of file cmd-edit.h.

◆ do_set_completer_quote_characters()

virtual void octave::command_editor::do_set_completer_quote_characters ( const std::string )
inlineprotectedvirtual

Definition at line 282 of file cmd-edit.h.

◆ do_set_completer_word_break_characters()

virtual void octave::command_editor::do_set_completer_word_break_characters ( const std::string )
inlineprotectedvirtual

Definition at line 274 of file cmd-edit.h.

◆ do_set_completer_word_break_hook()

virtual void octave::command_editor::do_set_completer_word_break_hook ( completion_hook_fcn  )
inlineprotectedvirtual

Definition at line 276 of file cmd-edit.h.

◆ do_set_completion_append_character()

virtual void octave::command_editor::do_set_completion_append_character ( char  )
inlineprotectedvirtual

Definition at line 284 of file cmd-edit.h.

◆ do_set_completion_function()

virtual void octave::command_editor::do_set_completion_function ( completion_fcn  )
inlineprotectedvirtual

Definition at line 286 of file cmd-edit.h.

◆ do_set_dequoting_function()

virtual void octave::command_editor::do_set_dequoting_function ( dequoting_fcn  )
inlineprotectedvirtual

Definition at line 290 of file cmd-edit.h.

◆ do_set_filename_quote_characters()

virtual void octave::command_editor::do_set_filename_quote_characters ( const std::string )
inlineprotectedvirtual

Definition at line 280 of file cmd-edit.h.

◆ do_set_input_stream()

virtual void octave::command_editor::do_set_input_stream ( FILE *  )
protectedpure virtual

◆ do_set_name()

virtual void octave::command_editor::do_set_name ( const std::string )
inlineprotectedvirtual

Definition at line 231 of file cmd-edit.h.

◆ do_set_output_stream()

virtual void octave::command_editor::do_set_output_stream ( FILE *  )
protectedpure virtual

◆ do_set_quoting_function()

virtual void octave::command_editor::do_set_quoting_function ( quoting_fcn  )
inlineprotectedvirtual

Definition at line 288 of file cmd-edit.h.

◆ do_set_screen_size()

virtual void octave::command_editor::do_set_screen_size ( int  ,
int   
)
inlineprotectedvirtual

Definition at line 260 of file cmd-edit.h.

◆ do_set_user_accept_line_function()

virtual void octave::command_editor::do_set_user_accept_line_function ( user_accept_line_fcn  )
inlineprotectedvirtual

Definition at line 294 of file cmd-edit.h.

◆ do_terminal_cols()

virtual int octave::command_editor::do_terminal_cols ( void  )
inlineprotectedvirtual

Definition at line 254 of file cmd-edit.h.

◆ do_terminal_rows()

virtual int octave::command_editor::do_terminal_rows ( void  )
inlineprotectedvirtual

Definition at line 252 of file cmd-edit.h.

◆ do_undo()

virtual bool octave::command_editor::do_undo ( void  )
inlineprotectedvirtual

Definition at line 327 of file cmd-edit.h.

◆ erase_empty_line()

bool octave::command_editor::erase_empty_line ( bool  flag)
static

Definition at line 1309 of file cmd-edit.cc.

◆ error() [1/2]

void octave::command_editor::error ( int  err_num)
protected

Definition at line 1939 of file cmd-edit.cc.

◆ error() [2/2]

void octave::command_editor::error ( const std::string s)
protected

Definition at line 1945 of file cmd-edit.cc.

References s.

◆ event_handler()

int octave::command_editor::event_handler ( void  )
staticprivate

◆ filename_completion_desired()

bool octave::command_editor::filename_completion_desired ( bool  arg)
static

Definition at line 1598 of file cmd-edit.cc.

References arg.

◆ filename_quoting_desired()

bool octave::command_editor::filename_quoting_desired ( bool  arg)
static

Definition at line 1605 of file cmd-edit.cc.

References arg.

◆ force_default_editor()

void octave::command_editor::force_default_editor ( void  )
static

Definition at line 1101 of file cmd-edit.cc.

◆ generate_filename_completions()

string_vector octave::command_editor::generate_filename_completions ( const std::string text)
static

Definition at line 1427 of file cmd-edit.cc.

Referenced by generate_completion().

◆ get_char_is_quoted_function()

command_editor::char_is_quoted_fcn octave::command_editor::get_char_is_quoted_function ( void  )
static

Definition at line 1413 of file cmd-edit.cc.

◆ get_completion_function()

command_editor::completion_fcn octave::command_editor::get_completion_function ( void  )
static

Definition at line 1392 of file cmd-edit.cc.

◆ get_current_line()

std::string octave::command_editor::get_current_line ( void  )
static

◆ get_dequoting_function()

command_editor::dequoting_fcn octave::command_editor::get_dequoting_function ( void  )
static

Definition at line 1406 of file cmd-edit.cc.

◆ get_input_stream()

FILE * octave::command_editor::get_input_stream ( void  )
static

Definition at line 1204 of file cmd-edit.cc.

Referenced by get_input_from_stdin().

◆ get_line_buffer()

std::string octave::command_editor::get_line_buffer ( void  )
static

Definition at line 1434 of file cmd-edit.cc.

Referenced by find_indexed_expression(), and is_completing_dirfns().

◆ get_output_stream()

FILE * octave::command_editor::get_output_stream ( void  )
static

Definition at line 1218 of file cmd-edit.cc.

◆ get_prev_char()

char octave::command_editor::get_prev_char ( int  offset)
static

Definition at line 1448 of file cmd-edit.cc.

Referenced by generate_completion(), and generate_possible_completions().

◆ get_quoting_function()

command_editor::quoting_fcn octave::command_editor::get_quoting_function ( void  )
static

Definition at line 1399 of file cmd-edit.cc.

◆ get_user_accept_line_function()

command_editor::user_accept_line_fcn octave::command_editor::get_user_accept_line_function ( void  )
static

Definition at line 1420 of file cmd-edit.cc.

◆ handle_interrupt_signal()

void octave::command_editor::handle_interrupt_signal ( void  )
staticprivate

Definition at line 1639 of file cmd-edit.cc.

◆ increment_current_command_number()

void octave::command_editor::increment_current_command_number ( void  )
static

Definition at line 1288 of file cmd-edit.cc.

◆ insert_initial_input()

int octave::command_editor::insert_initial_input ( void  )
static

Definition at line 1115 of file cmd-edit.cc.

◆ insert_text()

void octave::command_editor::insert_text ( const std::string text)
static

Definition at line 1468 of file cmd-edit.cc.

◆ instance_ok()

bool octave::command_editor::instance_ok ( void  )
staticprivate

Definition at line 1067 of file cmd-edit.cc.

References singleton_cleanup_list::add(), and retval.

◆ interrupt()

bool octave::command_editor::interrupt ( bool  arg = true)
static

Definition at line 1619 of file cmd-edit.cc.

References arg, and retval.

Referenced by octave::octave_cmd_debug::execute().

◆ kill_full_line()

void octave::command_editor::kill_full_line ( void  )
static

Definition at line 1461 of file cmd-edit.cc.

Referenced by octave::main_window::clear_command_window_callback().

◆ make_command_editor()

void octave::command_editor::make_command_editor ( void  )
staticprivate

Definition at line 1091 of file cmd-edit.cc.

References gnu_readline().

◆ newline()

void octave::command_editor::newline ( void  )
static

Definition at line 1475 of file cmd-edit.cc.

◆ newline_chars()

virtual std::string octave::command_editor::newline_chars ( void  )
inlineprotectedvirtual

Definition at line 264 of file cmd-edit.h.

◆ operator=()

command_editor& octave::command_editor::operator= ( const command_editor )
delete

◆ pre_input_handler()

int octave::command_editor::pre_input_handler ( void  )
staticprivate

Definition at line 1133 of file cmd-edit.cc.

References f.

◆ prefer_env_winsize()

bool octave::command_editor::prefer_env_winsize ( bool  arg)
static

Definition at line 1612 of file cmd-edit.cc.

References arg.

◆ re_read_init_file()

void octave::command_editor::re_read_init_file ( void  )
static

Definition at line 1591 of file cmd-edit.cc.

◆ read_init_file()

void octave::command_editor::read_init_file ( const std::string file = "")
static

Definition at line 1580 of file cmd-edit.cc.

References file, string, and octave::sys::file_ops::tilde_expand().

◆ read_octal()

int octave::command_editor::read_octal ( const std::string s)
protected

Definition at line 1917 of file cmd-edit.cc.

References i, result, and s.

◆ readline() [1/2]

std::string octave::command_editor::readline ( const std::string prompt)
static

Definition at line 1173 of file cmd-edit.cc.

Referenced by gnu_readline().

◆ readline() [2/2]

std::string octave::command_editor::readline ( const std::string prompt,
bool eof 
)
static

Definition at line 1181 of file cmd-edit.cc.

References retval, and string.

◆ redisplay()

void octave::command_editor::redisplay ( void  )
static

◆ remove_event_hook()

void octave::command_editor::remove_event_hook ( event_hook_fcn  f)
static

Definition at line 1562 of file cmd-edit.cc.

References octave::event_hook_lock, f, and p.

Referenced by gh_manager::do_enable_event_processing(), and gh_manager::do_process_events().

◆ remove_pre_input_hook()

void octave::command_editor::remove_pre_input_hook ( pre_input_hook_fcn  f)
static

Definition at line 1539 of file cmd-edit.cc.

References f, and p.

◆ remove_startup_hook()

void octave::command_editor::remove_startup_hook ( startup_hook_fcn  f)
static

Definition at line 1513 of file cmd-edit.cc.

References f, and p.

◆ replace_line()

void octave::command_editor::replace_line ( const std::string text,
bool  clear_undo = true 
)
static

◆ reset_current_command_number()

void octave::command_editor::reset_current_command_number ( int  n)
static

Definition at line 1281 of file cmd-edit.cc.

◆ resize_terminal()

void octave::command_editor::resize_terminal ( void  )
static

Definition at line 1253 of file cmd-edit.cc.

Referenced by octave::main_window::resize_command_window_callback().

◆ restore_event_hook()

virtual void octave::command_editor::restore_event_hook ( void  )
inlineprotectedvirtual

Definition at line 341 of file cmd-edit.h.

◆ restore_pre_input_hook()

virtual void octave::command_editor::restore_pre_input_hook ( void  )
inlineprotectedvirtual

Definition at line 337 of file cmd-edit.h.

◆ restore_startup_hook()

virtual void octave::command_editor::restore_startup_hook ( void  )
inlineprotectedvirtual

Definition at line 333 of file cmd-edit.h.

◆ restore_terminal_state()

void octave::command_editor::restore_terminal_state ( void  )
static

Definition at line 1295 of file cmd-edit.cc.

◆ run_event_hooks()

void octave::command_editor::run_event_hooks ( void  )
static

Definition at line 1574 of file cmd-edit.cc.

Referenced by while().

◆ set_basic_quote_characters()

void octave::command_editor::set_basic_quote_characters ( const std::string s)
static

Definition at line 1329 of file cmd-edit.cc.

References s.

Referenced by initialize_command_input().

◆ set_basic_word_break_characters()

void octave::command_editor::set_basic_word_break_characters ( const std::string s)
static

Definition at line 1315 of file cmd-edit.cc.

References s.

Referenced by initialize_command_input().

◆ set_char_is_quoted_function()

void octave::command_editor::set_char_is_quoted_function ( char_is_quoted_fcn  f)
static

Definition at line 1378 of file cmd-edit.cc.

References f.

◆ set_completer_quote_characters()

void octave::command_editor::set_completer_quote_characters ( const std::string s)
static

Definition at line 1343 of file cmd-edit.cc.

References s.

Referenced by initialize_command_input().

◆ set_completer_word_break_characters()

void octave::command_editor::set_completer_word_break_characters ( const std::string s)
static

Definition at line 1322 of file cmd-edit.cc.

References s.

Referenced by initialize_command_input().

◆ set_completion_append_character()

void octave::command_editor::set_completion_append_character ( char  c)
static

Definition at line 1350 of file cmd-edit.cc.

References c.

Referenced by generate_completion().

◆ set_completion_function()

void octave::command_editor::set_completion_function ( completion_fcn  f)
static

Definition at line 1357 of file cmd-edit.cc.

References f.

Referenced by initialize_command_input().

◆ set_dequoting_function()

void octave::command_editor::set_dequoting_function ( dequoting_fcn  f)
static

Definition at line 1371 of file cmd-edit.cc.

References f.

◆ set_event_hook()

virtual void octave::command_editor::set_event_hook ( event_hook_fcn  )
inlineprotectedvirtual

Definition at line 339 of file cmd-edit.h.

◆ set_filename_quote_characters()

void octave::command_editor::set_filename_quote_characters ( const std::string s)
static

Definition at line 1336 of file cmd-edit.cc.

References s.

Referenced by initialize_command_input().

◆ set_initial_input()

void octave::command_editor::set_initial_input ( const std::string text)
static

Definition at line 1108 of file cmd-edit.cc.

References text.

Referenced by octave::octave_cmd_exec::execute(), and octave::octave_cmd_eval::execute().

◆ set_input_stream()

void octave::command_editor::set_input_stream ( FILE *  f)
static

Definition at line 1197 of file cmd-edit.cc.

References f.

Referenced by get_input_from_stdin().

◆ set_name()

void octave::command_editor::set_name ( const std::string n)
static

Definition at line 1166 of file cmd-edit.cc.

Referenced by initialize_command_input().

◆ set_output_stream()

void octave::command_editor::set_output_stream ( FILE *  f)
static

Definition at line 1211 of file cmd-edit.cc.

References f.

◆ set_pre_input_hook()

virtual void octave::command_editor::set_pre_input_hook ( pre_input_hook_fcn  )
inlineprotectedvirtual

Definition at line 335 of file cmd-edit.h.

◆ set_quoting_function()

void octave::command_editor::set_quoting_function ( quoting_fcn  f)
static

Definition at line 1364 of file cmd-edit.cc.

References f.

Referenced by initialize_command_input().

◆ set_screen_size()

void octave::command_editor::set_screen_size ( int  ht,
int  wd 
)
static

Definition at line 1260 of file cmd-edit.cc.

Referenced by octave::main_window::set_screen_size_callback().

◆ set_startup_hook()

virtual void octave::command_editor::set_startup_hook ( startup_hook_fcn  )
inlineprotectedvirtual

Definition at line 331 of file cmd-edit.h.

◆ set_user_accept_line_function()

void octave::command_editor::set_user_accept_line_function ( user_accept_line_fcn  f)
static

Definition at line 1385 of file cmd-edit.cc.

References f.

◆ startup_handler()

int octave::command_editor::startup_handler ( void  )
staticprivate

Definition at line 1121 of file cmd-edit.cc.

References f.

◆ terminal_cols()

◆ terminal_rows()

int octave::command_editor::terminal_rows ( void  )
static

Definition at line 1232 of file cmd-edit.cc.

Referenced by more_than_a_screenful().

◆ undo()

bool octave::command_editor::undo ( void  )
static

Definition at line 1489 of file cmd-edit.cc.

Referenced by octave::main_window::command_window_undo_callback().

Member Data Documentation

◆ command_number

int octave::command_editor::command_number
protected

Definition at line 366 of file cmd-edit.h.

◆ event_hook_set

std::set< command_editor::event_hook_fcn > octave::command_editor::event_hook_set
staticprivate

Definition at line 216 of file cmd-edit.h.

◆ initial_input

std::string octave::command_editor::initial_input
protected

Definition at line 370 of file cmd-edit.h.

◆ instance

command_editor * octave::command_editor::instance = nullptr
staticprivate

Definition at line 219 of file cmd-edit.h.

◆ interrupted

bool octave::command_editor::interrupted
protected

Definition at line 368 of file cmd-edit.h.

◆ pre_input_hook_set

std::set< command_editor::pre_input_hook_fcn > octave::command_editor::pre_input_hook_set
staticprivate

Definition at line 214 of file cmd-edit.h.

◆ startup_hook_set

std::set< command_editor::startup_hook_fcn > octave::command_editor::startup_hook_set
staticprivate

Definition at line 212 of file cmd-edit.h.


The documentation for this class was generated from the following files: