#include "graphics.in.h"
Public Member Functions | |
gh_manager (octave::interpreter &interp) | |
void | close_all_figures (void) |
graphics_handle | current_figure (void) 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) |
graphics_object | get_object (const graphics_handle &h) const |
graphics_object | get_object (double val) const |
octave::mutex | graphics_lock (void) |
Matrix | handle_list (bool show_hidden=false) |
bool | is_handle_visible (const graphics_handle &h) const |
void | lock (void) |
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) |
bool | try_lock (void) |
void | unlock (void) |
Private Types | |
typedef std::list< graphics_handle >::const_iterator | const_figure_list_iterator |
typedef std::set< graphics_handle >::const_iterator | const_free_list_iterator |
typedef std::map< graphics_handle, graphics_object >::const_iterator | const_iterator |
typedef std::list< graphics_handle >::iterator | figure_list_iterator |
typedef std::set< graphics_handle >::iterator | free_list_iterator |
typedef std::map< graphics_handle, graphics_object >::iterator | iterator |
Private Attributes | |
std::list< graphics_object > | m_callback_objects |
int | m_event_processing |
std::list< graphics_event > | m_event_queue |
std::list< graphics_handle > | m_figure_list |
octave::mutex | m_graphics_lock |
std::set< graphics_handle > | m_handle_free_list |
std::map< graphics_handle, graphics_object > | m_handle_map |
octave::interpreter & | m_interpreter |
double | m_next_handle |
Definition at line 6230 of file graphics.in.h.
|
private |
Definition at line 6408 of file graphics.in.h.
|
private |
Definition at line 6405 of file graphics.in.h.
|
private |
Definition at line 6402 of file graphics.in.h.
|
private |
Definition at line 6407 of file graphics.in.h.
|
private |
Definition at line 6404 of file graphics.in.h.
|
private |
Definition at line 6400 of file graphics.in.h.
gh_manager::gh_manager | ( | octave::interpreter & | interp | ) |
Definition at line 11722 of file graphics.cc.
References octave::__get_gtk_manager__(), octave::gtk_manager::default_toolkit(), and m_handle_map.
void gh_manager::close_all_figures | ( | void | ) |
Definition at line 3089 of file graphics.cc.
References close_figure(), force_close_figure(), lookup(), Array< T >::numel(), octave_handle::ok(), and warning().
|
inline |
Definition at line 6285 of file graphics.in.h.
Referenced by root_figure::properties::remove_child().
void gh_manager::enable_event_processing | ( | bool | enable = true | ) |
Definition at line 12406 of file graphics.cc.
References octave::command_editor::add_event_hook(), m_event_processing, m_event_queue, m_graphics_lock, process_graphics_events(), and octave::command_editor::remove_event_hook().
Referenced by octave::graphics_init().
void gh_manager::execute_callback | ( | const graphics_handle & | h, |
const octave_value & | cb, | ||
const octave_value & | data = Matrix () |
||
) |
Definition at line 12095 of file graphics.cc.
References octave::action_container::add_method(), octave_handle::as_octave_value(), octave_value::cell_value(), octave_value::class_name(), octave_value::columns(), error(), octave::interpreter::eval_string(), Fdrawnow(), octave::feval(), octave_value::function_value(), get_object(), graphics_object::get_properties(), base_properties::graphics_object_name(), octave::interpreter::handle_exception(), 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(), m_callback_objects, m_graphics_lock, m_interpreter, Array< T >::numel(), restore_gcbo(), octave_value::rows(), octave_value::string_value(), Vdrawnow_requested, and xset_gcbo().
|
inline |
Definition at line 6340 of file graphics.in.h.
Referenced by close_figure(), callback_property::execute(), callback_event::execute(), mcode_event::execute(), execute_listener(), and F__go_execute_callback__().
void gh_manager::execute_listener | ( | const graphics_handle & | h, |
const octave_value & | l | ||
) |
Definition at line 12082 of file graphics.cc.
References graphics_event::create_callback_event(), execute_callback(), octave::thread::is_thread(), m_graphics_lock, and post_event().
Referenced by base_property::run_listeners().
|
inline |
Definition at line 6322 of file graphics.in.h.
Referenced by F__go_figure_handles__(), and Fdrawnow().
void gh_manager::free | ( | const graphics_handle & | h, |
bool | from_root = false |
||
) |
Definition at line 2843 of file graphics.cc.
References octave::math::ceil(), base_properties::delete_children(), error(), isfigure(), make_handle_fraction(), octave_handle::ok(), graphics_object::remove_child(), base_properties::set_beingdeleted(), graphics_object::valid_object(), and octave_handle::value().
Referenced by delete_graphics_object(), axes::properties::delete_text_child(), children_property::do_delete_children(), and axes::properties::set_text_child().
graphics_handle gh_manager::get_handle | ( | bool | integer_figure_handle | ) |
Definition at line 2792 of file graphics.cc.
References octave::math::ceil(), make_handle_fraction(), and retval.
Referenced by make_graphics_handle().
|
inline |
Definition at line 6265 of file graphics.in.h.
|
inline |
Definition at line 6260 of file graphics.in.h.
Referenced by figure::properties::adopt(), axes::properties::adopt(), hggroup::properties::adopt(), uibuttongroup::properties::adopt(), adopt(), base_graphics_object::build_user_defaults_map(), calc_dimensions(), QtHandles::Container::canvas(), QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasKeyReleaseEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasWheelEvent(), convert_cdata(), convert_text_position(), QtHandles::qt_graphics_toolkit::create_object(), delete_graphics_object(), axes::properties::delete_text_child(), device_pixel_ratio(), do_cleanup_waitfor_listener(), children_property::do_delete_children(), children_property::do_get_children(), QtHandles::GLCanvas::do_getPixels(), QtHandles::GLCanvas::do_print(), handle_property::do_set(), QtHandles::GLCanvas::draw(), octave::opengl_renderer::draw(), octave::opengl_renderer::draw_all_lights(), octave::opengl_renderer::draw_axes_x_grid(), octave::opengl_renderer::draw_axes_y_grid(), octave::opengl_renderer::draw_axes_z_grid(), QtHandles::Figure::eventNotifyBefore(), mcode_event::execute(), set_event::execute(), execute_callback(), QtHandles::ContextMenu::executeAt(), F__calc_dimensions__(), F__get__(), F__get_frame__(), F__go_figure__(), F__image_pixel_size__(), F__show_figure__(), F__update_normals__(), F__zoom__(), Faddlistener(), Faddproperty(), Fdellistener(), Fdrawnow(), Fget(), octave::base_graphics_toolkit::finalize(), finalize_r(), Freset(), Fset(), Fwaitfor(), 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(), axes::properties::get_extent(), base_graphics_object::get_factory_default(), get_graphics_object_type(), get_property_from_handle(), base_properties::get_toolkit(), octave::base_graphics_toolkit::initialize(), initialize_r(), isfigure(), make_graphics_handle(), base_properties::mark_modified(), base_properties::override_defaults(), QtHandles::Object::parentObject(), octave::opengl_renderer::points_to_pixels(), post_callback(), figure::properties::remove_child(), axes::properties::remove_child(), hggroup::properties::remove_child(), reparent(), base_graphics_object::reset_default_properties(), screen_size_pixels(), QtHandles::Canvas::select_object(), base_property::set(), axes::properties::set_defaults(), base_properties::set_parent(), set_property_in_handle(), axes::properties::set_text_child(), octave::base_graphics_toolkit::update(), QtHandles::ButtonControl::update(), QtHandles::ButtonGroup::update(), base_properties::update_autopos(), base_graphics_object::update_axis_limits(), base_properties::update_axis_limits(), uicontextmenu::properties::update_beingdeleted(), base_properties::update_boundingbox(), axes::properties::update_font(), text::properties::update_fontunits(), axes::properties::update_handlevisibility(), hggroup::properties::update_limits(), update_text_pos(), axes::properties::update_title_position(), base_properties::update_uicontextmenu(), axes::properties::update_units(), uicontrol::properties::update_units(), axes::properties::update_xlabel_position(), axes::properties::update_ylabel_position(), axes::properties::update_zlabel_position(), QtHandles::Canvas::updateCurrentPoint(), base_graphics_object::value_as_string(), base_graphics_object::values_as_string(), base_graphics_object::values_as_struct(), waitfor_listener(), xcreatefcn(), xget(), xinitialize(), xreset_default_properties(), xset(), and xset_gcbo().
|
inline |
Definition at line 6393 of file graphics.in.h.
Referenced by QtHandles::Object::Object(), QtHandles::autoscale_axes(), QtHandles::ButtonGroup::buttonClicked(), QtHandles::ButtonGroup::buttonToggled(), QtHandles::Container::canvas(), QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasKeyReleaseEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasPaintEvent(), QtHandles::Canvas::canvasWheelEvent(), QtHandles::Table::checkBoxClicked(), QtHandles::Table::comboBoxCurrentIndexChanged(), QtHandles::qt_graphics_toolkit::create_object(), do_cleanup_waitfor_listener(), QtHandles::GLCanvas::do_print(), QtHandles::GLCanvas::draw(), QtHandles::BaseControl::eventFilter(), QtHandles::ButtonGroup::eventFilter(), QtHandles::Panel::eventFilter(), QtHandles::Table::eventFilter(), QtHandles::Figure::eventNotifyAfter(), set_event::execute(), QtHandles::ContextMenu::executeAt(), 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(), QtHandles::Figure::figureWindowShown(), QtHandles::Figure::fileName(), Fishghandle(), Floaded_graphics_toolkits(), Fregister_graphics_toolkit(), Fset(), Fwaitfor(), get_property_from_handle(), octave::graphics_init(), QtHandles::Table::itemChanged(), QtHandles::Figure::mouseMode(), QtHandles::Object::object(), QtHandles::Object::parentObject(), QtHandles::Container::resizeEvent(), QtHandles::Figure::screenChanged(), set_property_in_handle(), QtHandles::Figure::setFileName(), QtHandles::Object::slotFinalize(), QtHandles::Figure::slotGetPixels(), QtHandles::Object::slotPrint(), QtHandles::Object::slotRedraw(), QtHandles::Object::slotShow(), QtHandles::Object::slotUpdate(), QtHandles::ButtonControl::toggled(), QtHandles::ButtonGroup::update(), QtHandles::Figure::update(), axes::properties::update_font(), text::properties::update_font(), axes::properties::update_handlevisibility(), text::properties::update_text_extent(), QtHandles::Canvas::updateCurrentPoint(), QtHandles::Figure::updateFigureHeight(), QtHandles::SliderControl::valueChanged(), and waitfor_listener().
|
inline |
Definition at line 6298 of file graphics.in.h.
Referenced by F__go_handles__().
|
inline |
Definition at line 6375 of file graphics.in.h.
Referenced by children_property::do_get_children(), and is_handle_visible().
|
inline |
Definition at line 6316 of file graphics.in.h.
Referenced by Fdrawnow().
|
inline |
Definition at line 6254 of file graphics.in.h.
|
inline |
Definition at line 6246 of file graphics.in.h.
Referenced by calc_dimensions(), delete_graphics_object(), do_cleanup_waitfor_listener(), 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(), Fwaitfor(), base_properties::get_children_of_type(), is_handle_visible(), ishghandle(), make_graphics_object(), reparent(), base_properties::set_parent(), axes::properties::set_text_child(), and waitfor_listener().
graphics_handle gh_manager::make_figure_handle | ( | double | val, |
bool | notify_toolkit = true |
||
) |
Definition at line 11793 of file graphics.cc.
References graphics_object::initialize(), m_handle_map, 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 11737 of file graphics.cc.
References error(), get_handle(), get_object(), base_graphics_object::get_properties(), graphics_object::get_properties(), graphics_object::initialize(), m_handle_map, make_graphics_object_from_type(), and graphics_object::override_defaults().
Referenced by axes::properties::delete_text_child(), F__go_figure__(), make_graphics_handle(), and make_graphics_object().
void gh_manager::pop_figure | ( | const graphics_handle & | h | ) |
Definition at line 11820 of file graphics.cc.
References m_figure_list.
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 12214 of file graphics.cc.
References base_graphics_event::CANCEL, graphics_event::create_callback_event(), graphics_event::create_mcode_event(), get_object(), graphics_object::get_properties(), base_graphics_event::INTERRUPT, graphics_object::isa(), m_graphics_lock, name, post_event(), base_graphics_event::QUEUE, and graphics_object::valid_object().
Referenced by F__go_post_callback__(), QtHandles::qt_graphics_toolkit::gh_callback_event(), and figure::properties::set_position().
void gh_manager::post_event | ( | const graphics_event & | e | ) |
Definition at line 12206 of file graphics.cc.
References octave::command_editor::add_event_hook(), m_event_queue, and process_graphics_events().
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 12249 of file graphics.cc.
References graphics_event::create_function_event(), m_graphics_lock, 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 12257 of file graphics.cc.
References graphics_event::create_set_event(), m_graphics_lock, name, and post_event().
Referenced by QtHandles::qt_graphics_toolkit::gh_set_event().
int gh_manager::process_events | ( | bool | force = false | ) |
Definition at line 12268 of file graphics.cc.
References base_graphics_event::CANCEL, graphics_event::execute(), Fdrawnow(), octave::flush_stdout(), graphics_object::get_properties(), base_graphics_event::INTERRUPT, m_callback_objects, m_event_processing, m_event_queue, m_graphics_lock, m_interpreter, graphics_event::ok(), process_graphics_events(), octave::command_editor::remove_event_hook(), and Vdrawnow_requested.
Referenced by F__get_frame__(), Fdrawnow(), process_graphics_events(), octave::sleep(), and QtHandles::Figure::slotGetPixels().
void gh_manager::push_figure | ( | const graphics_handle & | h | ) |
Definition at line 11812 of file graphics.cc.
References m_figure_list, and 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 2906 of file graphics.cc.
References octave::math::ceil(), error(), make_handle_fraction(), and octave_handle::value().
void gh_manager::restore_gcbo | ( | void | ) |
Definition at line 12071 of file graphics.cc.
References m_callback_objects, m_graphics_lock, and xset_gcbo().
Referenced by execute_callback().
|
inline |
Definition at line 6318 of file graphics.in.h.
|
inline |
Definition at line 6320 of file graphics.in.h.
Referenced by Fdrawnow(), QtHandles::qt_graphics_toolkit::finalize(), QtHandles::qt_graphics_toolkit::initialize(), and octave::sleep().
|
private |
Definition at line 6432 of file graphics.in.h.
Referenced by execute_callback(), process_events(), and restore_gcbo().
|
private |
Definition at line 6435 of file graphics.in.h.
Referenced by enable_event_processing(), and process_events().
|
private |
Definition at line 6429 of file graphics.in.h.
Referenced by enable_event_processing(), post_event(), and process_events().
|
private |
Definition at line 6423 of file graphics.in.h.
Referenced by pop_figure(), and push_figure().
|
private |
Definition at line 6426 of file graphics.in.h.
Referenced by enable_event_processing(), execute_callback(), execute_listener(), post_callback(), post_function(), post_set(), process_events(), and restore_gcbo().
|
private |
Definition at line 6416 of file graphics.in.h.
|
private |
Definition at line 6413 of file graphics.in.h.
Referenced by gh_manager(), make_figure_handle(), and make_graphics_handle().
|
private |
Definition at line 6410 of file graphics.in.h.
Referenced by execute_callback(), and process_events().
|
private |
Definition at line 6419 of file graphics.in.h.