#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.
References __get_gtk_manager__().
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.
Referenced by root_figure::properties::remove_child(), and figure::properties::set_integerhandle().
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(), get_object(), octave_value::is_defined(), octave_value::isempty(), and restore_gcbo().
|
inline |
Definition at line 150 of file gh-manager.h.
References graphics_object::get(), and graphics_object::valid_object().
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 graphics_event::create_callback_event(), execute_callback(), and post_event().
Referenced by base_property::run_listeners().
|
inline |
Definition at line 131 of file gh-manager.h.
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 ceil(), base_properties::delete_children(), error(), base_properties::execute_deletefcn(), base_properties::get_deletefcn(), get_object(), base_properties::is_beingdeleted(), isfigure(), octave_handle::ok(), graphics_object::remove_child(), base_properties::set_beingdeleted(), graphics_object::valid_object(), 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.
References ceil().
Referenced by make_graphics_handle(), and figure::properties::set_integerhandle().
|
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 figure::properties::adopt(), axes::properties::adopt(), hggroup::properties::adopt(), uibuttongroup::properties::adopt(), base_graphics_object::build_user_defaults_map(), calc_dimensions(), delete_graphics_object(), handle_property::do_set(), 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(), base_graphics_toolkit::finalize(), free(), Freset(), Fset(), text::properties::get___fontsize_points__(), graphics_object::get_ancestor(), axes::properties::get_boundingbox(), uicontrol::properties::get_boundingbox(), uibuttongroup::properties::get_boundingbox(), uipanel::properties::get_boundingbox(), uitable::properties::get_boundingbox(), get_children_limits(), base_properties::get_children_of_type(), base_graphics_object::get_default(), figure::get_default(), axes::get_default(), uitoolbar::get_default(), patch::properties::get_do_lighting(), surface::properties::get_do_lighting(), uicontrol::properties::get_extent(), uitable::properties::get_extent(), axes::properties::get_extent(), base_graphics_object::get_factory_default(), get_property_from_handle(), base_properties::get_toolkit(), base_graphics_toolkit::initialize(), isfigure(), make_graphics_handle(), base_properties::mark_modified(), base_properties::override_defaults(), post_callback(), figure::properties::remove_child(), axes::properties::remove_child(), hggroup::properties::remove_child(), base_graphics_object::reset_default_properties(), base_property::set(), figure::properties::set_integerhandle(), base_properties::set_parent(), set_property_in_handle(), uibuttongroup::properties::set_selectedobject(), uicontrol::properties::set_style(), base_graphics_toolkit::update(), base_properties::update_autopos(), base_graphics_object::update_axis_limits(), base_properties::update_axis_limits(), base_properties::update_boundingbox(), base_properties::update_contextmenu(), axes::properties::update_font(), uicontrol::properties::update_text_extent(), uicontrol::properties::update_units(), axes::properties::update_units(), uibuttongroup::properties::update_units(), uipanel::properties::update_units(), uitable::properties::update_units(), base_graphics_object::value_as_string(), base_graphics_object::values_as_string(), base_graphics_object::values_as_struct(), xget(), 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(), get_property_from_handle(), set_property_in_handle(), and text::properties::update_text_extent().
|
inline |
Definition at line 107 of file gh-manager.h.
Referenced by F__go_handles__().
|
inline |
Definition at line 189 of file gh-manager.h.
References graphics_object::is_handle_visible(), and graphics_object::valid_object().
|
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.
References isnan().
Referenced by calc_dimensions(), close_all_figures(), delete_graphics_object(), handle_property::do_set(), F__go_delete__(), F__go_execute_callback__(), F__go_figure__(), F__go_post_callback__(), F__show_figure__(), F__zoom__(), Faddlistener(), Faddproperty(), Fdellistener(), Fdrawnow(), base_properties::get_children_of_type(), and base_properties::set_parent().
graphics_handle gh_manager::make_figure_handle | ( | double | val, |
bool | notify_toolkit = true |
||
) |
Definition at line 299 of file gh-manager.cc.
References graphics_object::initialize(), and graphics_object::override_defaults().
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(), base_properties::execute_createfcn(), get_handle(), get_object(), base_graphics_object::get_properties(), graphics_object::get_properties(), axes::properties::get_title(), axes::properties::get_xlabel(), axes::properties::get_ylabel(), axes::properties::get_zlabel(), graphics_object::initialize(), make_graphics_object_from_type(), and graphics_object::override_defaults().
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(), and root_figure::properties::remove_child().
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 base_graphics_event::CANCEL, graphics_event::create_callback_event(), graphics_event::create_mcode_event(), base_properties::get_busyaction(), get_object(), graphics_object::get_properties(), base_graphics_event::INTERRUPT, graphics_object::isa(), post_event(), base_graphics_event::QUEUE, and graphics_object::valid_object().
Referenced by F__go_post_callback__(), uibuttongroup::properties::set_position(), uipanel::properties::set_position(), and figure::properties::set_position().
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 graphics_event::create_function_event(), and 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 graphics_event::create_set_event(), and post_event().
int gh_manager::process_events | ( | bool | force = false | ) |
Definition at line 548 of file gh-manager.cc.
References base_graphics_event::CANCEL, graphics_event::execute(), graphics_object::get_properties(), base_graphics_event::INTERRUPT, base_properties::is_interruptible(), graphics_event::ok(), and Vdrawnow_requested.
Referenced by F__get_frame__(), Fdrawnow(), and octave::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 ceil(), error(), and octave_handle::value().
Referenced by figure::properties::set_integerhandle().
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 octave::sleep().