GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
command_editor Class Referenceabstract

#include "cmd-edit.h"

Inherited by 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 Member Functions

 command_editor ()
 
virtual void do_accept_line ()=0
 
virtual void do_blink_matching_paren (bool)
 
virtual void do_clear_screen (bool)
 
virtual void do_clear_undo_list ()
 
virtual std::string do_decode_prompt_string (const std::string &)
 
virtual bool do_erase_empty_line (bool)
 
bool do_event_loop_interrupted () const
 
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 () const
 
virtual completion_fcn do_get_completion_function () const
 
virtual std::string do_get_current_line () const =0
 
virtual dequoting_fcn do_get_dequoting_function () const
 
virtual FILE * do_get_input_stream ()=0
 
virtual std::string do_get_line_buffer () const =0
 
virtual FILE * do_get_output_stream ()=0
 
virtual char do_get_prev_char (int) const =0
 
virtual quoting_fcn do_get_quoting_function () const
 
virtual user_accept_line_fcn do_get_user_accept_line_function () const
 
virtual void do_handle_interrupt_signal ()
 
int do_insert_initial_input ()
 
virtual void do_insert_text (const std::string &text)=0
 
virtual void do_interrupt (bool)
 
void do_interrupt_event_loop (bool arg)
 
virtual void do_kill_full_line ()=0
 
virtual void do_newline ()=0
 
virtual bool do_prefer_env_winsize (bool)
 
virtual void do_re_read_init_file ()
 
virtual void do_read_init_file (const std::string &)
 
virtual std::string do_readline (const std::string &, bool &)=0
 
std::string do_readline (const std::string &prompt)
 
virtual void do_redisplay ()
 
virtual void do_replace_line (const std::string &text, bool clear_undo)=0
 
virtual void do_resize_terminal ()
 
virtual void do_restore_terminal_state ()
 
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 ht, int wd)
 
virtual void do_set_user_accept_line_function (user_accept_line_fcn)
 
virtual int do_terminal_cols ()
 
virtual int do_terminal_rows ()
 
virtual bool do_undo ()
 
void error (const std::string &)
 
void error (int)
 
virtual std::string newline_chars ()
 
int read_octal (const std::string &s)
 
virtual void restore_event_hook ()
 
virtual void restore_pre_input_hook ()
 
virtual void restore_startup_hook ()
 
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 m_cols
 
int m_command_number
 
std::string m_initial_input
 
bool m_interrupt_event_loop
 
bool m_interrupted
 
int m_rows
 

Detailed Description

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

Member Typedef Documentation

◆ char_is_quoted_fcn

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

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

◆ completion_fcn

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

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

◆ completion_hook_fcn

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

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

◆ dequoting_fcn

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

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

◆ event_hook_fcn

typedef int(* command_editor::event_hook_fcn) ()

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

◆ pre_input_hook_fcn

typedef int(* command_editor::pre_input_hook_fcn) ()

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

◆ quoting_fcn

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

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

◆ startup_hook_fcn

typedef int(* command_editor::startup_hook_fcn) ()

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

◆ user_accept_line_fcn

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

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

Constructor & Destructor Documentation

◆ command_editor()

command_editor::command_editor ( )
inlineprotected

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

◆ ~command_editor()

virtual command_editor::~command_editor ( )
virtualdefault

Member Function Documentation

◆ accept_line()

void command_editor::accept_line ( )
static

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

References do_accept_line().

◆ add_event_hook()

void command_editor::add_event_hook ( event_hook_fcn  f)
static

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

References f.

Referenced by event_manager::event_manager(), and input_system::initialize().

◆ add_pre_input_hook()

void command_editor::add_pre_input_hook ( pre_input_hook_fcn  f)
static

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

References f, and set_pre_input_hook().

Referenced by readline().

◆ add_startup_hook()

void command_editor::add_startup_hook ( startup_hook_fcn  f)
static

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

References f, and set_startup_hook().

◆ blink_matching_paren()

void command_editor::blink_matching_paren ( bool  flag)
static

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

References do_blink_matching_paren().

Referenced by interpreter::execute().

◆ clear_screen()

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

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

References do_clear_screen().

Referenced by Fclc().

◆ clear_undo_list()

void command_editor::clear_undo_list ( )
static

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

References do_clear_undo_list().

◆ current_command_number()

int command_editor::current_command_number ( )
static

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

References m_command_number.

◆ decode_prompt_string()

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

◆ do_accept_line()

virtual void command_editor::do_accept_line ( )
protectedpure virtual

◆ do_blink_matching_paren()

virtual void command_editor::do_blink_matching_paren ( bool  )
inlineprotectedvirtual

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

Referenced by blink_matching_paren(), and do_completer_word_break_hook().

◆ do_clear_screen()

virtual void command_editor::do_clear_screen ( bool  )
inlineprotectedvirtual

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

Referenced by clear_screen(), and do_completer_word_break_hook().

◆ do_clear_undo_list()

virtual void command_editor::do_clear_undo_list ( )
inlineprotectedvirtual

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

Referenced by clear_undo_list(), and do_completer_word_break_hook().

◆ do_decode_prompt_string()

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

◆ do_erase_empty_line()

virtual bool command_editor::do_erase_empty_line ( bool  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and erase_empty_line().

◆ do_event_loop_interrupted()

bool command_editor::do_event_loop_interrupted ( ) const
inlineprotected

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

Referenced by event_loop_interrupted().

◆ do_filename_completion_desired()

virtual bool command_editor::do_filename_completion_desired ( bool  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and filename_completion_desired().

◆ do_filename_quoting_desired()

virtual bool command_editor::do_filename_quoting_desired ( bool  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and filename_quoting_desired().

◆ do_generate_filename_completions()

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

◆ do_get_char_is_quoted_function()

virtual char_is_quoted_fcn command_editor::do_get_char_is_quoted_function ( ) const
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and get_char_is_quoted_function().

◆ do_get_completion_function()

virtual completion_fcn command_editor::do_get_completion_function ( ) const
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and get_completion_function().

◆ do_get_current_line()

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

◆ do_get_dequoting_function()

virtual dequoting_fcn command_editor::do_get_dequoting_function ( ) const
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and get_dequoting_function().

◆ do_get_input_stream()

virtual FILE * command_editor::do_get_input_stream ( )
protectedpure virtual

◆ do_get_line_buffer()

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

◆ do_get_output_stream()

virtual FILE * command_editor::do_get_output_stream ( )
protectedpure virtual

◆ do_get_prev_char()

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

◆ do_get_quoting_function()

virtual quoting_fcn command_editor::do_get_quoting_function ( ) const
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and get_quoting_function().

◆ do_get_user_accept_line_function()

virtual user_accept_line_fcn command_editor::do_get_user_accept_line_function ( ) const
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and get_user_accept_line_function().

◆ do_handle_interrupt_signal()

virtual void command_editor::do_handle_interrupt_signal ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook().

◆ do_insert_initial_input()

int command_editor::do_insert_initial_input ( )
protected

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

References do_insert_text(), do_redisplay(), and m_initial_input.

Referenced by insert_initial_input().

◆ do_insert_text()

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

◆ do_interrupt()

virtual void command_editor::do_interrupt ( bool  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and interrupt().

◆ do_interrupt_event_loop()

void command_editor::do_interrupt_event_loop ( bool  arg)
inlineprotected

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

Referenced by interrupt_event_loop().

◆ do_kill_full_line()

virtual void command_editor::do_kill_full_line ( )
protectedpure virtual

◆ do_newline()

virtual void command_editor::do_newline ( )
protectedpure virtual

◆ do_prefer_env_winsize()

virtual bool command_editor::do_prefer_env_winsize ( bool  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and prefer_env_winsize().

◆ do_re_read_init_file()

virtual void command_editor::do_re_read_init_file ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and re_read_init_file().

◆ do_read_init_file()

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

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

Referenced by do_completer_word_break_hook(), and read_init_file().

◆ do_readline() [1/2]

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

◆ do_readline() [2/2]

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

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

Referenced by do_completer_word_break_hook(), and readline().

◆ do_redisplay()

virtual void command_editor::do_redisplay ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), do_insert_initial_input(), and redisplay().

◆ do_replace_line()

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

◆ do_resize_terminal()

virtual void command_editor::do_resize_terminal ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and resize_terminal().

◆ do_restore_terminal_state()

virtual void command_editor::do_restore_terminal_state ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and restore_terminal_state().

◆ do_set_basic_quote_characters()

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

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

Referenced by do_completer_word_break_hook(), and set_basic_quote_characters().

◆ do_set_basic_word_break_characters()

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

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

Referenced by do_completer_word_break_hook(), and set_basic_word_break_characters().

◆ do_set_char_is_quoted_function()

virtual void command_editor::do_set_char_is_quoted_function ( char_is_quoted_fcn  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_char_is_quoted_function().

◆ do_set_completer_quote_characters()

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

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

Referenced by do_completer_word_break_hook(), and set_completer_quote_characters().

◆ do_set_completer_word_break_characters()

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

◆ do_set_completer_word_break_hook()

virtual void command_editor::do_set_completer_word_break_hook ( completion_hook_fcn  )
inlineprotectedvirtual

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

◆ do_set_completion_append_character()

virtual void command_editor::do_set_completion_append_character ( char  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_completion_append_character().

◆ do_set_completion_function()

virtual void command_editor::do_set_completion_function ( completion_fcn  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_completion_function().

◆ do_set_dequoting_function()

virtual void command_editor::do_set_dequoting_function ( dequoting_fcn  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_dequoting_function().

◆ do_set_filename_quote_characters()

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

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

Referenced by do_completer_word_break_hook(), and set_filename_quote_characters().

◆ do_set_input_stream()

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

◆ do_set_name()

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

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

Referenced by do_completer_word_break_hook(), and set_name().

◆ do_set_output_stream()

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

◆ do_set_quoting_function()

virtual void command_editor::do_set_quoting_function ( quoting_fcn  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_quoting_function().

◆ do_set_screen_size()

virtual void command_editor::do_set_screen_size ( int  ht,
int  wd 
)
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_screen_size().

◆ do_set_user_accept_line_function()

virtual void command_editor::do_set_user_accept_line_function ( user_accept_line_fcn  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and set_user_accept_line_function().

◆ do_terminal_cols()

virtual int command_editor::do_terminal_cols ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and terminal_cols().

◆ do_terminal_rows()

virtual int command_editor::do_terminal_rows ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and terminal_rows().

◆ do_undo()

virtual bool command_editor::do_undo ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and undo().

◆ erase_empty_line()

bool command_editor::erase_empty_line ( bool  flag)
static

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

References do_erase_empty_line().

◆ error() [1/2]

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

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

◆ error() [2/2]

void command_editor::error ( int  err_num)
protected

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

◆ event_loop_interrupted()

bool command_editor::event_loop_interrupted ( )
static

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

References do_event_loop_interrupted().

Referenced by action_container::run().

◆ filename_completion_desired()

bool command_editor::filename_completion_desired ( bool  arg)
static

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

References do_filename_completion_desired().

◆ filename_quoting_desired()

bool command_editor::filename_quoting_desired ( bool  arg)
static

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

References do_filename_quoting_desired().

◆ force_default_editor()

void command_editor::force_default_editor ( )
static

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

Referenced by input_system::initialize().

◆ generate_filename_completions()

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

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

References do_generate_filename_completions().

◆ get_char_is_quoted_function()

command_editor::char_is_quoted_fcn command_editor::get_char_is_quoted_function ( )
static

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

References do_get_char_is_quoted_function().

◆ get_completion_function()

command_editor::completion_fcn command_editor::get_completion_function ( )
static

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

References do_get_completion_function().

◆ get_current_line()

std::string command_editor::get_current_line ( )
static

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

References do_get_current_line().

◆ get_dequoting_function()

command_editor::dequoting_fcn command_editor::get_dequoting_function ( )
static

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

References do_get_dequoting_function().

◆ get_input_stream()

FILE * command_editor::get_input_stream ( )
static

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

References do_get_input_stream().

◆ get_line_buffer()

std::string command_editor::get_line_buffer ( )
static

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

References do_get_line_buffer().

◆ get_output_stream()

FILE * command_editor::get_output_stream ( )
static

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

References do_get_output_stream().

◆ get_prev_char()

char command_editor::get_prev_char ( int  offset)
static

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

References do_get_prev_char().

◆ get_quoting_function()

command_editor::quoting_fcn command_editor::get_quoting_function ( )
static

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

References do_get_quoting_function().

◆ get_user_accept_line_function()

command_editor::user_accept_line_fcn command_editor::get_user_accept_line_function ( )
static

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

References do_get_user_accept_line_function().

◆ increment_current_command_number()

void command_editor::increment_current_command_number ( )
static

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

References m_command_number.

Referenced by tree_evaluator::parse_and_execute(), and tree_evaluator::repl().

◆ insert_initial_input()

int command_editor::insert_initial_input ( )
static

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

References do_insert_initial_input().

Referenced by readline().

◆ insert_text()

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

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

References do_insert_text().

◆ interrupt()

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

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

References do_interrupt(), and m_interrupted.

◆ interrupt_event_loop()

void command_editor::interrupt_event_loop ( bool  flag = true)
static

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

References do_interrupt_event_loop().

Referenced by action_container::run().

◆ kill_full_line()

void command_editor::kill_full_line ( )
static

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

References do_kill_full_line().

◆ newline()

void command_editor::newline ( )
static

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

References do_newline().

◆ newline_chars()

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

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

Referenced by do_completer_word_break_hook(), and do_decode_prompt_string().

◆ prefer_env_winsize()

bool command_editor::prefer_env_winsize ( bool  arg)
static

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

References do_prefer_env_winsize().

◆ re_read_init_file()

void command_editor::re_read_init_file ( )
static

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

References do_re_read_init_file().

◆ read_init_file()

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

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

References do_read_init_file().

◆ read_octal()

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

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

Referenced by do_decode_prompt_string().

◆ readline() [1/2]

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

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

References readline().

Referenced by readline().

◆ readline() [2/2]

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

◆ redisplay()

void command_editor::redisplay ( )
static

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

References do_redisplay().

◆ remove_event_hook()

void command_editor::remove_event_hook ( event_hook_fcn  f)
static

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

References f.

◆ remove_pre_input_hook()

void command_editor::remove_pre_input_hook ( pre_input_hook_fcn  f)
static

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

References f, and restore_pre_input_hook().

◆ remove_startup_hook()

void command_editor::remove_startup_hook ( startup_hook_fcn  f)
static

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

References f, and restore_startup_hook().

◆ replace_line()

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

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

References do_replace_line().

◆ reset_current_command_number()

void command_editor::reset_current_command_number ( int  n)
static

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

References m_command_number.

◆ resize_terminal()

void command_editor::resize_terminal ( )
static

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

References do_resize_terminal().

◆ restore_event_hook()

virtual void command_editor::restore_event_hook ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook().

◆ restore_pre_input_hook()

virtual void command_editor::restore_pre_input_hook ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and remove_pre_input_hook().

◆ restore_startup_hook()

virtual void command_editor::restore_startup_hook ( )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook(), and remove_startup_hook().

◆ restore_terminal_state()

void command_editor::restore_terminal_state ( )
static

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

References do_restore_terminal_state().

◆ run_event_hooks()

void command_editor::run_event_hooks ( )
static

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

Referenced by tree_evaluator::server_loop().

◆ set_basic_quote_characters()

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

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

References do_set_basic_quote_characters().

Referenced by input_system::initialize().

◆ set_basic_word_break_characters()

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

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

References do_set_basic_word_break_characters().

Referenced by input_system::initialize().

◆ set_char_is_quoted_function()

void command_editor::set_char_is_quoted_function ( char_is_quoted_fcn  f)
static

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

References do_set_char_is_quoted_function(), and f.

◆ set_completer_quote_characters()

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

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

References do_set_completer_quote_characters().

Referenced by input_system::initialize().

◆ set_completer_word_break_characters()

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

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

References do_set_completer_word_break_characters().

Referenced by input_system::initialize().

◆ set_completion_append_character()

void command_editor::set_completion_append_character ( char  c)
static

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

References do_set_completion_append_character().

◆ set_completion_function()

void command_editor::set_completion_function ( completion_fcn  f)
static

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

References do_set_completion_function(), and f.

Referenced by input_system::initialize().

◆ set_dequoting_function()

void command_editor::set_dequoting_function ( dequoting_fcn  f)
static

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

References do_set_dequoting_function(), and f.

◆ set_event_hook()

virtual void command_editor::set_event_hook ( event_hook_fcn  )
inlineprotectedvirtual

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

Referenced by do_completer_word_break_hook().

◆ set_filename_quote_characters()

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

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

References do_set_filename_quote_characters().

Referenced by input_system::initialize().

◆ set_initial_input()

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

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

References m_initial_input.

◆ set_input_stream()

void command_editor::set_input_stream ( FILE *  f)
static

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

References do_set_input_stream(), and f.

◆ set_name()

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

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

References do_set_name().

Referenced by input_system::initialize().

◆ set_output_stream()

void command_editor::set_output_stream ( FILE *  f)
static

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

References do_set_output_stream(), and f.

◆ set_pre_input_hook()

virtual void command_editor::set_pre_input_hook ( pre_input_hook_fcn  )
inlineprotectedvirtual

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

Referenced by add_pre_input_hook(), and do_completer_word_break_hook().

◆ set_quoting_function()

void command_editor::set_quoting_function ( quoting_fcn  f)
static

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

References do_set_quoting_function(), and f.

Referenced by input_system::initialize().

◆ set_screen_size()

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

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

References do_set_screen_size().

Referenced by Fterminal_size().

◆ set_startup_hook()

virtual void command_editor::set_startup_hook ( startup_hook_fcn  )
inlineprotectedvirtual

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

Referenced by add_startup_hook(), and do_completer_word_break_hook().

◆ set_user_accept_line_function()

void command_editor::set_user_accept_line_function ( user_accept_line_fcn  f)
static

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

References do_set_user_accept_line_function(), and f.

◆ terminal_cols()

int command_editor::terminal_cols ( )
static

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

References do_terminal_cols().

Referenced by Fterminal_size().

◆ terminal_rows()

int command_editor::terminal_rows ( )
static

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

References do_terminal_rows().

Referenced by Fterminal_size().

◆ undo()

bool command_editor::undo ( )
static

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

References do_undo().

Member Data Documentation

◆ m_cols

int command_editor::m_cols
protected

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

◆ m_command_number

int command_editor::m_command_number
protected

◆ m_initial_input

std::string command_editor::m_initial_input
protected

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

Referenced by do_insert_initial_input(), readline(), and set_initial_input().

◆ m_interrupt_event_loop

bool command_editor::m_interrupt_event_loop
protected

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

◆ m_interrupted

bool command_editor::m_interrupted
protected

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

Referenced by interrupt().

◆ m_rows

int command_editor::m_rows
protected

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


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