Provides threadsafe access to octave. More...
#include "event-manager.h"
Public Types | |
typedef std::list< std::pair< std::string, std::string > > | filter_list |
Public Member Functions | |
event_manager (interpreter &interp) | |
virtual | ~event_manager () |
void | append_history (const std::string &hist_entry) |
bool | apply_preferences () |
void | clear_history () |
void | clear_workspace () |
void | close_gui () |
bool | confirm_shutdown () |
void | connect_link (const std::shared_ptr< interpreter_events > &obj) |
bool | copy_image_to_clipboard (const std::string &file) |
int | debug_cd_or_addpath_error (const std::string &file, const std::string &dir, bool addpath_option) |
void | directory_changed (const std::string &dir) |
bool | disable () |
void | discard_events () |
bool | display_exception (const execution_exception &ee, bool beep=false) |
bool | edit_file (const std::string &file) |
bool | edit_variable (const std::string &name, const octave_value &val) |
bool | enable () |
bool | enabled () const |
void | enter_debugger_event (const std::string &fcn_name, const std::string &fcn_file_name, int line) |
void | execute_command_in_terminal (const std::string &command) |
void | execute_in_debugger_event (const std::string &file, int line) |
void | exit_debugger_event () |
std::list< std::string > | file_dialog (const filter_list &filter, const std::string &title, const std::string &filename, const std::string &dirname, const std::string &multimode) |
void | file_remove (const std::string &old_name, const std::string &new_name) |
void | file_renamed (bool load_new) |
virtual void | focus_window (const std::string win_name) |
uint8NDArray | get_named_icon (const std::string &icon_name) |
std::string | gui_preference (const std::string &key, const std::string &value) |
bool | gui_status_update (const std::string &feature, const std::string &status) |
bool | have_dialogs () const |
std::list< std::string > | input_dialog (const std::list< std::string > &prompt, const std::string &title, const std::list< float > &nr, const std::list< float > &nc, const std::list< std::string > &defaults) |
void | install_qt_event_handlers (const std::shared_ptr< interpreter_events > &obj) |
void | interpreter_interrupted () |
bool | interpreter_output (const std::string &msg) |
std::pair< std::list< int >, int > | list_dialog (const std::list< std::string > &list, const std::string &mode, int width, int height, const std::list< int > &initial_value, const std::string &name, const std::list< std::string > &prompt, const std::string &ok_string, const std::string &cancel_string) |
void | pop_event_queue () |
void | post_event (const fcn_callback &fcn) |
void | post_event (const meth_callback &meth) |
void | post_input_event () |
void | pre_input_event () |
void | process_events (bool disable=false) |
bool | prompt_new_edit_file (const std::string &file) |
void | push_event_queue () |
std::shared_ptr< interpreter_events > | qt_event_handlers () const |
std::string | question_dialog (const std::string &msg, const std::string &title, const std::string &btn1, const std::string &btn2, const std::string &btn3, const std::string &btndef) |
bool | register_documentation (const std::string &file) |
void | set_history () |
void | set_history (const string_vector &hist) |
void | set_workspace () |
void | set_workspace (bool top_level, const symbol_info_list &syminfo, bool update_variable_editor=true) |
void | show_command_history () |
void | show_community_news (int serial=-1) |
bool | show_documentation (const std::string &file) |
void | show_file_browser () |
bool | show_preferences () |
void | show_release_notes () |
void | show_terminal_window () |
void | show_workspace () |
void | start_gui (bool gui_app=false) |
bool | unregister_documentation (const std::string &file) |
void | update_breakpoint (bool insert, const std::string &file, int line, const std::string &cond="") |
bool | update_gui_lexer () |
void | update_path_dialog () |
void | update_prompt (const std::string &prompt) |
Protected Attributes | |
bool | m_debugging |
mutex * | m_event_queue_mutex |
std::stack< std::shared_ptr< event_queue > > | m_gui_event_queue |
bool | m_link_enabled |
Provides threadsafe access to octave.
This class provides thread-safe communication between the interpreter and a GUI.
Definition at line 291 of file event-manager.h.
typedef std::list<std::pair<std::string, std::string> > event_manager::filter_list |
Definition at line 387 of file event-manager.h.
event_manager::event_manager | ( | interpreter & | interp | ) |
Definition at line 68 of file event-manager.cc.
References command_editor::add_event_hook(), and push_event_queue().
|
virtual |
Definition at line 78 of file event-manager.cc.
References m_event_queue_mutex.
|
inline |
Definition at line 695 of file event-manager.h.
Referenced by history_system::write_timestamp().
|
inline |
Definition at line 457 of file event-manager.h.
Referenced by octave::F__event_manager_apply_preferences__().
|
inline |
Definition at line 701 of file event-manager.h.
Referenced by history_system::do_history().
|
inline |
Definition at line 675 of file event-manager.h.
|
inline |
Definition at line 374 of file event-manager.h.
|
inline |
Definition at line 525 of file event-manager.h.
Referenced by interpreter::quit().
void event_manager::connect_link | ( | const std::shared_ptr< interpreter_events > & | obj | ) |
Definition at line 90 of file event-manager.cc.
References disable().
|
inline |
Definition at line 561 of file event-manager.h.
Referenced by octave::F__event_manager_copy_image_to_clipboard__().
|
inline |
Definition at line 540 of file event-manager.h.
Referenced by load_path::contains_file_in_dir().
|
inline |
Definition at line 646 of file event-manager.h.
Referenced by interpreter::chdir().
|
inline |
Definition at line 312 of file event-manager.h.
Referenced by connect_link(), and process_events().
void event_manager::discard_events | ( | ) |
Definition at line 128 of file event-manager.cc.
References enabled(), mutex::lock(), m_event_queue_mutex, m_gui_event_queue, and mutex::unlock().
|
inline |
Definition at line 612 of file event-manager.h.
Referenced by error_system::display_exception().
|
inline |
Definition at line 509 of file event-manager.h.
Referenced by octave::F__event_manager_edit_file__().
|
inline |
Definition at line 514 of file event-manager.h.
Referenced by octave::Fopenvar().
bool event_manager::enable | ( | ) |
Definition at line 99 of file event-manager.cc.
References m_link_enabled, and warning().
|
inline |
Definition at line 319 of file event-manager.h.
Referenced by discard_events(), octave::F__event_manager_enabled__(), post_event(), process_events(), set_history(), and set_workspace().
|
inline |
Definition at line 719 of file event-manager.h.
|
inline |
Definition at line 573 of file event-manager.h.
|
inline |
Definition at line 730 of file event-manager.h.
|
inline |
Definition at line 736 of file event-manager.h.
|
inline |
Definition at line 390 of file event-manager.h.
References dirname(), and filter().
Referenced by octave::F__event_manager_file_dialog__().
|
inline |
Definition at line 653 of file event-manager.h.
References application::is_gui_running().
Referenced by octave::F__event_manager_file_remove__(), octave::Frename(), and octave::Funlink().
|
inline |
Definition at line 659 of file event-manager.h.
References application::is_gui_running().
Referenced by octave::F__event_manager_file_renamed__(), octave::Frename(), and octave::Funlink().
|
inlinevirtual |
Definition at line 566 of file event-manager.h.
Referenced by octave::Fcommandhistory(), octave::Fcommandwindow(), octave::Ffilebrowser(), and octave::Fworkspace().
|
inline |
Definition at line 549 of file event-manager.h.
Referenced by octave::F__event_manager_named_icon__().
|
inline |
Definition at line 555 of file event-manager.h.
Referenced by octave::F__event_manager_gui_preference__().
|
inline |
Definition at line 623 of file event-manager.h.
Referenced by octave::F__event_manager_gui_status_update__(), and F__profiler_enable__().
|
inline |
Definition at line 382 of file event-manager.h.
Referenced by octave::F__event_manager_have_dialogs__().
|
inline |
Definition at line 401 of file event-manager.h.
Referenced by octave::F__event_manager_input_dialog__().
|
inline |
Definition at line 329 of file event-manager.h.
|
inline |
Definition at line 753 of file event-manager.h.
Referenced by interpreter::recover_from_exception().
|
inline |
Definition at line 601 of file event-manager.h.
|
inline |
Definition at line 413 of file event-manager.h.
Referenced by octave::F__event_manager_list_dialog__().
void event_manager::pop_event_queue | ( | ) |
Definition at line 148 of file event-manager.cc.
References m_gui_event_queue.
void event_manager::post_event | ( | const fcn_callback & | fcn | ) |
Definition at line 164 of file event-manager.cc.
References enabled(), and m_gui_event_queue.
void event_manager::post_event | ( | const meth_callback & | meth | ) |
Definition at line 174 of file event-manager.cc.
References enabled(), and m_gui_event_queue.
|
inline |
Definition at line 713 of file event-manager.h.
|
inline |
Definition at line 707 of file event-manager.h.
void event_manager::process_events | ( | bool | disable = false | ) |
Definition at line 112 of file event-manager.cc.
References disable(), enabled(), mutex::lock(), m_event_queue_mutex, m_gui_event_queue, and mutex::unlock().
|
inline |
Definition at line 535 of file event-manager.h.
Referenced by octave::F__event_manager_edit_file__().
void event_manager::push_event_queue | ( | ) |
Definition at line 141 of file event-manager.cc.
References m_gui_event_queue.
Referenced by event_manager().
|
inline |
Definition at line 335 of file event-manager.h.
|
inline |
Definition at line 430 of file event-manager.h.
Referenced by octave::F__event_manager_question_dialog__().
|
inline |
Definition at line 579 of file event-manager.h.
Referenced by octave::F__event_manager_register_documentation__().
void event_manager::set_history | ( | ) |
Definition at line 196 of file event-manager.cc.
References enabled(), and command_history::list().
Referenced by history_system::do_history(), and history_system::initialize().
|
inline |
Definition at line 689 of file event-manager.h.
void event_manager::set_workspace | ( | ) |
Definition at line 184 of file event-manager.cc.
References tree_evaluator::at_top_level(), enabled(), interpreter::get_evaluator(), tree_evaluator::get_symbol_info(), and m_debugging.
|
inline |
Definition at line 667 of file event-manager.h.
|
inline |
Definition at line 485 of file event-manager.h.
Referenced by octave::F__event_manager_show_command_history__().
|
inline |
Definition at line 497 of file event-manager.h.
Referenced by octave::F__event_manager_show_community_news__().
|
inline |
Definition at line 474 of file event-manager.h.
Referenced by octave::F__event_manager_show_documentation__().
|
inline |
Definition at line 479 of file event-manager.h.
Referenced by octave::F__event_manager_show_file_browser__().
|
inline |
Definition at line 446 of file event-manager.h.
Referenced by octave::F__event_manager_show_preferences__().
|
inline |
Definition at line 503 of file event-manager.h.
Referenced by octave::F__event_manager_show_release_notes__().
|
inline |
Definition at line 468 of file event-manager.h.
Referenced by octave::F__event_manager_show_terminal_window__().
|
inline |
Definition at line 491 of file event-manager.h.
Referenced by octave::F__event_manager_show_workspace__().
|
inline |
Definition at line 368 of file event-manager.h.
Referenced by interpreter::execute(), and octave::Fdesktop().
|
inline |
Definition at line 590 of file event-manager.h.
Referenced by octave::F__event_manager_unregister_documentation__().
|
inline |
Definition at line 746 of file event-manager.h.
Referenced by tree_statement_list::add_breakpoint(), tree_statement_list::remove_all_breakpoints(), and bp_table::remove_breakpoints_from_function().
|
inline |
Definition at line 635 of file event-manager.h.
Referenced by octave::F__event_manager_update_gui_lexer__().
|
inline |
Definition at line 440 of file event-manager.h.
References application::is_gui_running().
Referenced by load_path::rehash().
|
inline |
Definition at line 681 of file event-manager.h.
|
protected |
Definition at line 776 of file event-manager.h.
Referenced by set_workspace().
|
protected |
Definition at line 762 of file event-manager.h.
Referenced by ~event_manager(), discard_events(), and process_events().
|
protected |
Definition at line 774 of file event-manager.h.
Referenced by discard_events(), pop_event_queue(), post_event(), process_events(), and push_event_queue().
|
protected |
Definition at line 777 of file event-manager.h.
Referenced by enable().