#include "gh-manager.h"
Public Types | |
typedef std::pair< uint8NDArray, std::string > | latex_data |
Public Member Functions | |
gh_manager (octave::interpreter &interp) | |
void | close_all_figures () |
graphics_handle | current_figure () const |
void | enable_event_processing (bool enable=true) |
void | execute_callback (const graphics_handle &h, const octave_value &cb, const octave_value &data=Matrix()) |
void | execute_callback (const graphics_handle &h, const std::string &name, const octave_value &data=Matrix()) |
void | execute_listener (const graphics_handle &h, const octave_value &l) |
Matrix | figure_handle_list (bool show_hidden=false) |
void | free (const graphics_handle &h, bool from_root=false) |
graphics_handle | get_handle (bool integer_figure_handle) |
latex_data | get_latex_data (const std::string &key) const |
graphics_object | get_object (const graphics_handle &h) const |
graphics_object | get_object (double val) const |
octave::mutex | graphics_lock () |
Matrix | handle_list (bool show_hidden=false) |
bool | is_handle_visible (const graphics_handle &h) const |
void | lock () |
graphics_handle | lookup (const octave_value &val) const |
graphics_handle | lookup (double val) const |
graphics_handle | make_figure_handle (double val, bool notify_toolkit=true) |
graphics_handle | make_graphics_handle (const std::string &go_name, const graphics_handle &p, bool integer_figure_handle=false, bool call_createfcn=true, bool notify_toolkit=true) |
void | pop_figure (const graphics_handle &h) |
void | post_callback (const graphics_handle &h, const std::string &name, const octave_value &data=Matrix()) |
void | post_event (const graphics_event &e) |
void | post_function (graphics_event::event_fcn fcn, void *fcn_data=nullptr) |
void | post_set (const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true, bool redraw_figure=false) |
int | process_events (bool force=false) |
void | push_figure (const graphics_handle &h) |
void | renumber_figure (const graphics_handle &old_gh, const graphics_handle &new_gh) |
void | restore_gcbo () |
void | set_latex_data (const std::string &key, latex_data val) |
bool | try_lock () |
void | unlock () |
Definition at line 36 of file gh-manager.h.
typedef std::pair<uint8NDArray , std::string > gh_manager::latex_data |
Definition at line 40 of file gh-manager.h.
gh_manager::gh_manager | ( | octave::interpreter & | interp | ) |
Definition at line 228 of file gh-manager.cc.
void gh_manager::close_all_figures | ( | ) |
Definition at line 183 of file gh-manager.cc.
References close_figure(), figure_handle_list(), force_close_figure(), lookup(), Array< T, Alloc >::numel(), octave_handle::ok(), and warning().
|
inline |
Definition at line 94 of file gh-manager.h.
void gh_manager::enable_event_processing | ( | bool | enable = true | ) |
Definition at line 686 of file gh-manager.cc.
void gh_manager::execute_callback | ( | const graphics_handle & | h, |
const octave_value & | cb, | ||
const octave_value & | data = Matrix () |
||
) |
Definition at line 376 of file gh-manager.cc.
References octave_handle::as_octave_value(), octave_value::cell_value(), octave_value::class_name(), octave_value::columns(), error(), Fdrawnow(), octave_value::function_value(), get_object(), octave_value::is_defined(), octave_value::is_function(), octave_value::is_function_handle(), octave_value::is_string(), octave_value::iscell(), octave_value::isempty(), octave_value::length(), Array< T, Alloc >::numel(), restore_gcbo(), octave_value::rows(), octave_value::string_value(), and Vdrawnow_requested.
|
inline |
Definition at line 150 of file gh-manager.h.
Referenced by close_figure(), execute_listener(), and F__go_execute_callback__().
void gh_manager::execute_listener | ( | const graphics_handle & | h, |
const octave_value & | l | ||
) |
Definition at line 363 of file gh-manager.cc.
References execute_callback(), and post_event().
Definition at line 131 of file gh-manager.h.
References Matrix::resize().
Referenced by close_all_figures(), F__go_figure_handles__(), and Fdrawnow().
void gh_manager::free | ( | const graphics_handle & | h, |
bool | from_root = false |
||
) |
Definition at line 91 of file gh-manager.cc.
References error(), get_object(), isfigure(), octave_handle::ok(), and octave_handle::value().
Referenced by delete_graphics_object().
graphics_handle gh_manager::get_handle | ( | bool | integer_figure_handle | ) |
Definition at line 50 of file gh-manager.cc.
Referenced by make_graphics_handle().
|
inline |
Definition at line 212 of file gh-manager.h.
|
inline |
Definition at line 73 of file gh-manager.h.
References octave_handle::ok().
|
inline |
Definition at line 68 of file gh-manager.h.
References lookup().
Referenced by calc_dimensions(), delete_graphics_object(), opengl_renderer::draw(), opengl_renderer::draw_scatter(), execute_callback(), F__calc_dimensions__(), F__get__(), F__get_frame__(), F__get_position__(), F__go_figure__(), F__image_pixel_size__(), F__show_figure__(), F__update_normals__(), F__zoom__(), Faddlistener(), Faddproperty(), Fdellistener(), Fdrawnow(), Fget(), base_graphics_toolkit::finalize(), free(), Freset(), Fset(), Fwaitfor(), get_children_limits(), get_property_from_handle(), base_graphics_toolkit::initialize(), isfigure(), make_graphics_handle(), post_callback(), reparent(), set_property_in_handle(), base_graphics_toolkit::update(), xget(), xset(), and xset().
|
inline |
Definition at line 207 of file gh-manager.h.
Referenced by F__calc_dimensions__(), F__get__(), F__go_delete__(), F__go_figure__(), F__go_figure_handles__(), F__go_handles__(), F__update_normals__(), F__zoom__(), Faddlistener(), Faddproperty(), Favailable_graphics_toolkits(), Fdellistener(), Fdrawnow(), Fget(), Fishghandle(), Floaded_graphics_toolkits(), Fregister_graphics_toolkit(), Fset(), Fwaitfor(), get_property_from_handle(), and set_property_in_handle().
Definition at line 107 of file gh-manager.h.
References Matrix::resize(), and octave_handle::value().
Referenced by F__go_handles__().
|
inline |
Definition at line 189 of file gh-manager.h.
|
inline |
Definition at line 125 of file gh-manager.h.
Referenced by Fdrawnow().
|
inline |
Definition at line 62 of file gh-manager.h.
References octave_value::double_value(), octave_value::is_real_scalar(), and lookup().
|
inline |
Definition at line 54 of file gh-manager.h.
Referenced by calc_dimensions(), close_all_figures(), delete_graphics_object(), F__go_delete__(), F__go_execute_callback__(), F__go_figure__(), F__go_post_callback__(), F__show_figure__(), F__zoom__(), Faddlistener(), Faddproperty(), Fdellistener(), Fdrawnow(), Fwaitfor(), and reparent().
graphics_handle gh_manager::make_figure_handle | ( | double | val, |
bool | notify_toolkit = true |
||
) |
Definition at line 299 of file gh-manager.cc.
Referenced by F__go_figure__().
graphics_handle gh_manager::make_graphics_handle | ( | const std::string & | go_name, |
const graphics_handle & | p, | ||
bool | integer_figure_handle = false , |
||
bool | call_createfcn = true , |
||
bool | notify_toolkit = true |
||
) |
Definition at line 243 of file gh-manager.cc.
References error(), get_handle(), get_object(), and make_graphics_object_from_type().
Referenced by F__go_figure__().
void gh_manager::pop_figure | ( | const graphics_handle & | h | ) |
Definition at line 326 of file gh-manager.cc.
Referenced by push_figure().
void gh_manager::post_callback | ( | const graphics_handle & | h, |
const std::string & | name, | ||
const octave_value & | data = Matrix () |
||
) |
Definition at line 494 of file gh-manager.cc.
References get_object(), and post_event().
Referenced by F__go_post_callback__().
void gh_manager::post_event | ( | const graphics_event & | e | ) |
Definition at line 486 of file gh-manager.cc.
Referenced by execute_listener(), post_callback(), post_function(), and post_set().
void gh_manager::post_function | ( | graphics_event::event_fcn | fcn, |
void * | fcn_data = nullptr |
||
) |
Definition at line 529 of file gh-manager.cc.
References post_event().
void gh_manager::post_set | ( | const graphics_handle & | h, |
const std::string & | name, | ||
const octave_value & | value, | ||
bool | notify_toolkit = true , |
||
bool | redraw_figure = false |
||
) |
Definition at line 537 of file gh-manager.cc.
References post_event().
Definition at line 548 of file gh-manager.cc.
References Fdrawnow(), and Vdrawnow_requested.
Referenced by F__get_frame__(), Fdrawnow(), and sleep().
void gh_manager::push_figure | ( | const graphics_handle & | h | ) |
Definition at line 318 of file gh-manager.cc.
References pop_figure().
Referenced by F__go_figure__().
void gh_manager::renumber_figure | ( | const graphics_handle & | old_gh, |
const graphics_handle & | new_gh | ||
) |
Definition at line 154 of file gh-manager.cc.
References error(), and octave_handle::value().
void gh_manager::restore_gcbo | ( | ) |
Definition at line 352 of file gh-manager.cc.
Referenced by execute_callback().
|
inline |
Definition at line 224 of file gh-manager.h.
|
inline |
Definition at line 127 of file gh-manager.h.
|
inline |
Definition at line 129 of file gh-manager.h.
Referenced by Fdrawnow(), and sleep().