Mercurial > hg > octave-lyh
diff liboctave/cmd-edit.h @ 6913:f779c83d6ccf
[project @ 2007-09-18 18:58:12 by jwe]
author | jwe |
---|---|
date | Tue, 18 Sep 2007 18:58:13 +0000 |
parents | 143b556ce725 |
children | 2883ea1c5c18 |
line wrap: on
line diff
--- a/liboctave/cmd-edit.h +++ b/liboctave/cmd-edit.h @@ -26,6 +26,7 @@ #include <cstdio> +#include <set> #include <string> #include "str-vec.h" @@ -97,13 +98,13 @@ static void clear_undo_list (void); - static void set_startup_hook (startup_hook_fcn f); + static void add_startup_hook (startup_hook_fcn f); - static void restore_startup_hook (void); + static void remove_startup_hook (startup_hook_fcn f); - static void set_event_hook (event_hook_fcn f); + static void add_event_hook (event_hook_fcn f); - static void restore_event_hook (void); + static void remove_event_hook (event_hook_fcn f); static void read_init_file (const std::string& file = std::string ()); @@ -127,6 +128,20 @@ static void make_command_editor (void); + static int startup_handler (void); + + static int event_handler (void); + + static std::set<startup_hook_fcn> startup_hook_set; + + static std::set<event_hook_fcn> event_hook_set; + + typedef std::set<startup_hook_fcn>::iterator startup_hook_set_iterator; + typedef std::set<startup_hook_fcn>::const_iterator startup_hook_set_const_iterator; + + typedef std::set<event_hook_fcn>::iterator event_hook_set_iterator; + typedef std::set<event_hook_fcn>::const_iterator event_hook_set_const_iterator; + // The real thing. static command_editor *instance; @@ -191,13 +206,13 @@ virtual void do_clear_undo_list (void) { } - virtual void do_set_startup_hook (startup_hook_fcn) { } + virtual void set_startup_hook (startup_hook_fcn) { } - virtual void do_restore_startup_hook (void) { } + virtual void restore_startup_hook (void) { } - virtual void do_set_event_hook (event_hook_fcn) { } + virtual void set_event_hook (startup_hook_fcn) { } - virtual void do_restore_event_hook (void) { } + virtual void restore_event_hook (void) { } virtual void do_read_init_file (const std::string&) { }