GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
gh_manager Class Reference

#include "graphics.in.h"

Collaboration diagram for gh_manager:

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_objectm_callback_objects
 
int m_event_processing
 
std::list< graphics_eventm_event_queue
 
std::list< graphics_handlem_figure_list
 
octave::mutex m_graphics_lock
 
std::set< graphics_handlem_handle_free_list
 
std::map< graphics_handle, graphics_objectm_handle_map
 
octave::interpreterm_interpreter
 
double m_next_handle
 

Detailed Description

Definition at line 6230 of file graphics.in.h.

Member Typedef Documentation

◆ const_figure_list_iterator

Definition at line 6408 of file graphics.in.h.

◆ const_free_list_iterator

Definition at line 6405 of file graphics.in.h.

◆ const_iterator

Definition at line 6402 of file graphics.in.h.

◆ figure_list_iterator

Definition at line 6407 of file graphics.in.h.

◆ free_list_iterator

Definition at line 6404 of file graphics.in.h.

◆ iterator

Definition at line 6400 of file graphics.in.h.

Constructor & Destructor Documentation

◆ gh_manager()

gh_manager::gh_manager ( octave::interpreter interp)

Member Function Documentation

◆ close_all_figures()

void gh_manager::close_all_figures ( void  )

◆ current_figure()

graphics_handle gh_manager::current_figure ( void  ) const
inline

Definition at line 6285 of file graphics.in.h.

Referenced by root_figure::properties::remove_child().

◆ enable_event_processing()

void gh_manager::enable_event_processing ( bool  enable = true)

◆ execute_callback() [1/2]

◆ execute_callback() [2/2]

void gh_manager::execute_callback ( const graphics_handle h,
const std::string &  name,
const octave_value data = Matrix () 
)
inline

◆ execute_listener()

void gh_manager::execute_listener ( const graphics_handle h,
const octave_value l 
)

◆ figure_handle_list()

Matrix gh_manager::figure_handle_list ( bool  show_hidden = false)
inline

Definition at line 6322 of file graphics.in.h.

Referenced by F__go_figure_handles__(), and Fdrawnow().

◆ free()

◆ get_handle()

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().

◆ get_object() [1/2]

graphics_object gh_manager::get_object ( const graphics_handle h) const
inline

Definition at line 6265 of file graphics.in.h.

◆ get_object() [2/2]

graphics_object gh_manager::get_object ( double  val) const
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().

◆ graphics_lock()

octave::mutex gh_manager::graphics_lock ( void  )
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().

◆ handle_list()

Matrix gh_manager::handle_list ( bool  show_hidden = false)
inline

Definition at line 6298 of file graphics.in.h.

Referenced by F__go_handles__().

◆ is_handle_visible()

bool gh_manager::is_handle_visible ( const graphics_handle h) const
inline

Definition at line 6375 of file graphics.in.h.

Referenced by children_property::do_get_children(), and is_handle_visible().

◆ lock()

void gh_manager::lock ( void  )
inline

Definition at line 6316 of file graphics.in.h.

Referenced by Fdrawnow().

◆ lookup() [1/2]

graphics_handle gh_manager::lookup ( const octave_value val) const
inline

Definition at line 6254 of file graphics.in.h.

◆ lookup() [2/2]

◆ make_figure_handle()

graphics_handle gh_manager::make_figure_handle ( double  val,
bool  notify_toolkit = true 
)

◆ make_graphics_handle()

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 
)

◆ pop_figure()

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().

◆ post_callback()

◆ post_event()

void gh_manager::post_event ( const graphics_event e)

◆ post_function()

void gh_manager::post_function ( graphics_event::event_fcn  fcn,
void *  fcn_data = nullptr 
)

◆ post_set()

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 
)

◆ process_events()

◆ push_figure()

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__().

◆ renumber_figure()

void gh_manager::renumber_figure ( const graphics_handle old_gh,
const graphics_handle new_gh 
)

◆ restore_gcbo()

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().

◆ try_lock()

bool gh_manager::try_lock ( void  )
inline

Definition at line 6318 of file graphics.in.h.

◆ unlock()

void gh_manager::unlock ( void  )
inline

Member Data Documentation

◆ m_callback_objects

std::list<graphics_object> gh_manager::m_callback_objects
private

Definition at line 6432 of file graphics.in.h.

Referenced by execute_callback(), process_events(), and restore_gcbo().

◆ m_event_processing

int gh_manager::m_event_processing
private

Definition at line 6435 of file graphics.in.h.

Referenced by enable_event_processing(), and process_events().

◆ m_event_queue

std::list<graphics_event> gh_manager::m_event_queue
private

Definition at line 6429 of file graphics.in.h.

Referenced by enable_event_processing(), post_event(), and process_events().

◆ m_figure_list

std::list<graphics_handle> gh_manager::m_figure_list
private

Definition at line 6423 of file graphics.in.h.

Referenced by pop_figure(), and push_figure().

◆ m_graphics_lock

◆ m_handle_free_list

std::set<graphics_handle> gh_manager::m_handle_free_list
private

Definition at line 6416 of file graphics.in.h.

◆ m_handle_map

std::map<graphics_handle, graphics_object> gh_manager::m_handle_map
private

Definition at line 6413 of file graphics.in.h.

Referenced by gh_manager(), make_figure_handle(), and make_graphics_handle().

◆ m_interpreter

octave::interpreter& gh_manager::m_interpreter
private

Definition at line 6410 of file graphics.in.h.

Referenced by execute_callback(), and process_events().

◆ m_next_handle

double gh_manager::m_next_handle
private

Definition at line 6419 of file graphics.in.h.


The documentation for this class was generated from the following files: