GNU Octave  4.4.1
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:

Classes

class  auto_lock
 

Static Public Member Functions

static void cleanup_instance (void)
 
static void close_all_figures (void)
 
static void create_instance (void)
 
static graphics_handle current_figure (void)
 
static void enable_event_processing (bool enable=true)
 
static void execute_callback (const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
 
static void execute_callback (const graphics_handle &h, const octave_value &cb, const octave_value &data=Matrix())
 
static void execute_listener (const graphics_handle &h, const octave_value &l)
 
static Matrix figure_handle_list (bool show_hidden=false)
 
static int flush_events (void)
 
static void free (const graphics_handle &h)
 
static graphics_handle get_handle (bool integer_figure_handle)
 
static graphics_object get_object (double val)
 
static graphics_object get_object (const graphics_handle &h)
 
static Matrix handle_list (bool show_hidden=false)
 
static bool instance_ok (void)
 
static bool is_handle_visible (const graphics_handle &h)
 
static void lock (void)
 
static graphics_handle lookup (double val)
 
static graphics_handle lookup (const octave_value &val)
 
static graphics_handle make_figure_handle (double val, bool do_notify_toolkit=true)
 
static graphics_handle make_graphics_handle (const std::string &go_name, const graphics_handle &parent, bool integer_figure_handle=false, bool do_createfcn=true, bool do_notify_toolkit=true)
 
static void pop_figure (const graphics_handle &h)
 
static void post_callback (const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
 
static void post_function (graphics_event::event_fcn fcn, void *data=nullptr)
 
static void post_set (const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true)
 
static int process_events (void)
 
static void push_figure (const graphics_handle &h)
 
static void renumber_figure (const graphics_handle &old_gh, const graphics_handle &new_gh)
 
static bool try_lock (void)
 
static void unlock (void)
 

Protected Member Functions

 gh_manager (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 Member Functions

void do_close_all_figures (void)
 
graphics_handle do_current_figure (void) const
 
void do_enable_event_processing (bool enable=true)
 
void do_execute_callback (const graphics_handle &h, const octave_value &cb, const octave_value &data)
 
void do_execute_listener (const graphics_handle &h, const octave_value &l)
 
Matrix do_figure_handle_list (bool show_hidden)
 
void do_free (const graphics_handle &h)
 
graphics_handle do_get_handle (bool integer_figure_handle)
 
graphics_object do_get_object (const graphics_handle &h)
 
Matrix do_handle_list (bool show_hidden)
 
void do_lock (void)
 
graphics_handle do_lookup (double val)
 
graphics_handle do_make_figure_handle (double val, bool do_notify_toolkit)
 
graphics_handle do_make_graphics_handle (const std::string &go_name, const graphics_handle &p, bool integer_figure_handle, bool do_createfcn, bool do_notify_toolkit)
 
void do_pop_figure (const graphics_handle &h)
 
void do_post_callback (const graphics_handle &h, const std::string &name, const octave_value &data)
 
void do_post_event (const graphics_event &e)
 
void do_post_function (graphics_event::event_fcn fcn, void *fcn_data)
 
void do_post_set (const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true)
 
int do_process_events (bool force=false)
 
void do_push_figure (const graphics_handle &h)
 
void do_renumber_figure (const graphics_handle &old_gh, const graphics_handle &new_gh)
 
void do_restore_gcbo (void)
 
bool do_try_lock (void)
 
void do_unlock (void)
 

Static Private Member Functions

static void restore_gcbo (void)
 

Private Attributes

std::list< graphics_objectcallback_objects
 
int event_processing
 
std::list< graphics_eventevent_queue
 
std::list< graphics_handlefigure_list
 
octave::mutex graphics_lock
 
std::set< graphics_handlehandle_free_list
 
std::map< graphics_handle, graphics_objecthandle_map
 
double next_handle
 

Static Private Attributes

static gh_managerinstance = nullptr
 

Detailed Description

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

Member Typedef Documentation

◆ const_figure_list_iterator

◆ const_free_list_iterator

◆ const_iterator

◆ figure_list_iterator

◆ free_list_iterator

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

◆ iterator

Constructor & Destructor Documentation

◆ gh_manager()

gh_manager::gh_manager ( void  )
protected

Member Function Documentation

◆ cleanup_instance()

static void gh_manager::cleanup_instance ( void  )
inlinestatic

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

Referenced by create_instance().

◆ close_all_figures()

static void gh_manager::close_all_figures ( void  )
inlinestatic

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

◆ create_instance()

void gh_manager::create_instance ( void  )
static

◆ current_figure()

static graphics_handle gh_manager::current_figure ( void  )
inlinestatic

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

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

◆ do_close_all_figures()

void gh_manager::do_close_all_figures ( void  )
private

Definition at line 2865 of file graphics.cc.

References close_figure(), force_close_figure(), h, i, lookup(), Array< T >::numel(), and warning().

◆ do_current_figure()

graphics_handle gh_manager::do_current_figure ( void  ) const
inlineprivate

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

◆ do_enable_event_processing()

void gh_manager::do_enable_event_processing ( bool  enable = true)
private

◆ do_execute_callback()

◆ do_execute_listener()

void gh_manager::do_execute_listener ( const graphics_handle h,
const octave_value l 
)
private

◆ do_figure_handle_list()

Matrix gh_manager::do_figure_handle_list ( bool  show_hidden)
inlineprivate

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

◆ do_free()

void gh_manager::do_free ( const graphics_handle h)
private

◆ do_get_handle()

graphics_handle gh_manager::do_get_handle ( bool  integer_figure_handle)
private

Definition at line 2603 of file graphics.cc.

References octave::math::ceil(), make_handle_fraction(), p, and retval.

◆ do_get_object()

graphics_object gh_manager::do_get_object ( const graphics_handle h)
inlineprivate

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

◆ do_handle_list()

Matrix gh_manager::do_handle_list ( bool  show_hidden)
inlineprivate

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

◆ do_lock()

void gh_manager::do_lock ( void  )
inlineprivate

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

◆ do_lookup()

graphics_handle gh_manager::do_lookup ( double  val)
inlineprivate

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

◆ do_make_figure_handle()

graphics_handle gh_manager::do_make_figure_handle ( double  val,
bool  do_notify_toolkit 
)
private

◆ do_make_graphics_handle()

graphics_handle gh_manager::do_make_graphics_handle ( const std::string go_name,
const graphics_handle p,
bool  integer_figure_handle,
bool  do_createfcn,
bool  do_notify_toolkit 
)
private

◆ do_pop_figure()

void gh_manager::do_pop_figure ( const graphics_handle h)
private

Definition at line 10051 of file graphics.cc.

References figure_list, and h.

Referenced by do_push_figure().

◆ do_post_callback()

◆ do_post_event()

void gh_manager::do_post_event ( const graphics_event e)
private

◆ do_post_function()

void gh_manager::do_post_function ( graphics_event::event_fcn  fcn,
void *  fcn_data 
)
private

Definition at line 10387 of file graphics.cc.

References graphics_event::create_function_event(), do_post_event(), and fcn.

◆ do_post_set()

void gh_manager::do_post_set ( const graphics_handle h,
const std::string name,
const octave_value value,
bool  notify_toolkit = true 
)
private

Definition at line 10395 of file graphics.cc.

References graphics_event::create_set_event(), do_post_event(), h, name, and value.

◆ do_process_events()

◆ do_push_figure()

void gh_manager::do_push_figure ( const graphics_handle h)
private

Definition at line 10043 of file graphics.cc.

References do_pop_figure(), figure_list, and h.

◆ do_renumber_figure()

void gh_manager::do_renumber_figure ( const graphics_handle old_gh,
const graphics_handle new_gh 
)
private

◆ do_restore_gcbo()

void gh_manager::do_restore_gcbo ( void  )
private

Definition at line 10207 of file graphics.cc.

References callback_objects, and xset_gcbo().

◆ do_try_lock()

bool gh_manager::do_try_lock ( void  )
inlineprivate

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

◆ do_unlock()

void gh_manager::do_unlock ( void  )
inlineprivate

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

◆ enable_event_processing()

static void gh_manager::enable_event_processing ( bool  enable = true)
inlinestatic

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

Referenced by QtHandles::__init__(), and QtHandles::__shutdown__().

◆ execute_callback() [1/2]

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

◆ execute_callback() [2/2]

static void gh_manager::execute_callback ( const graphics_handle h,
const octave_value cb,
const octave_value data = Matrix () 
)
inlinestatic

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

◆ execute_listener()

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

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

Referenced by base_property::run_listeners().

◆ figure_handle_list()

static Matrix gh_manager::figure_handle_list ( bool  show_hidden = false)
inlinestatic

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

◆ flush_events()

static int gh_manager::flush_events ( void  )
inlinestatic

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

◆ free()

static void gh_manager::free ( const graphics_handle h)
inlinestatic

◆ get_handle()

static graphics_handle gh_manager::get_handle ( bool  integer_figure_handle)
inlinestatic

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

Referenced by do_make_graphics_handle().

◆ get_object() [1/2]

static graphics_object gh_manager::get_object ( double  val)
inlinestatic

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

Referenced by adopt(), figure::properties::adopt(), base_graphics_object::build_user_defaults_map(), axes::properties::calc_tightbox(), QtHandles::Container::canvas(), QtHandles::Canvas::canvasAutoAxes(), QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasToggleAxes(), QtHandles::Canvas::canvasToggleGrid(), QtHandles::Canvas::canvasWheelEvent(), convert_cdata(), convert_text_position(), QtHandles::ObjectFactory::createObject(), delete_graphics_object(), axes::properties::delete_text_child(), do_cleanup_waitfor_listener(), children_property::do_delete_children(), do_execute_callback(), children_property::do_get_children(), QtHandles::GLCanvas::do_getPixels(), do_make_graphics_handle(), do_post_callback(), QtHandles::GLCanvas::do_print(), handle_property::do_set(), octave::opengl_renderer::draw(), QtHandles::GLCanvas::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(), set_event::execute(), QtHandles::ContextMenu::executeAt(), F__get_frame__(), F__zoom__(), Fget(), base_graphics_toolkit::finalize(), finalize_r(), for(), Freset(), G__osmesa_print__(), 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(), get_children_limits(), axes::properties::get_colormap(), base_graphics_object::get_default(), figure::get_default(), axes::get_default(), uitoolbar::get_default(), axes::properties::get_extent(), base_graphics_object::get_factory_default(), get_graphics_object_type(), base_properties::get_toolkit(), QtHandles::hasUiControlChildren(), QtHandles::hasUiMenuChildren(), if(), base_graphics_toolkit::initialize(), initialize_r(), is_figure(), base_properties::mark_modified(), base_properties::override_defaults(), QtHandles::Object::parentObject(), QtHandles::Utils::properties(), figure::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(), axes::properties::set_text_child(), QtHandles::ButtonControl::update(), QtHandles::ButtonGroup::update(), base_graphics_toolkit::update(), base_properties::update_autopos(), base_properties::update_axis_limits(), base_graphics_object::update_axis_limits(), base_properties::update_boundingbox(), axes::properties::update_font(), text::properties::update_fontunits(), axes::properties::update_handlevisibility(), axes::properties::update_title_position(), base_properties::update_uicontextmenu(), axes::properties::update_units(), uicontrol::properties::update_units(), uibuttongroup::properties::update_units(), axes::properties::update_xlabel_position(), axes::properties::update_ylabel_position(), axes::properties::update_zlabel_position(), QtHandles::Figure::updateBoundingBoxHelper(), 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(), xset_gcbo(), and uicontextmenu::~uicontextmenu().

◆ get_object() [2/2]

static graphics_object gh_manager::get_object ( const graphics_handle h)
inlinestatic

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

◆ handle_list()

static Matrix gh_manager::handle_list ( bool  show_hidden = false)
inlinestatic

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

◆ instance_ok()

static bool gh_manager::instance_ok ( void  )
inlinestatic

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

◆ is_handle_visible()

static bool gh_manager::is_handle_visible ( const graphics_handle h)
inlinestatic

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

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

◆ lock()

static void gh_manager::lock ( void  )
inlinestatic

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

◆ lookup() [1/2]

◆ lookup() [2/2]

static graphics_handle gh_manager::lookup ( const octave_value val)
inlinestatic

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

◆ make_figure_handle()

static graphics_handle gh_manager::make_figure_handle ( double  val,
bool  do_notify_toolkit = true 
)
inlinestatic

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

◆ make_graphics_handle()

static graphics_handle gh_manager::make_graphics_handle ( const std::string go_name,
const graphics_handle parent,
bool  integer_figure_handle = false,
bool  do_createfcn = true,
bool  do_notify_toolkit = true 
)
inlinestatic

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

Referenced by axes::properties::delete_text_child().

◆ pop_figure()

static void gh_manager::pop_figure ( const graphics_handle h)
inlinestatic

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

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

◆ post_callback()

◆ post_function()

static void gh_manager::post_function ( graphics_event::event_fcn  fcn,
void *  data = nullptr 
)
inlinestatic

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

Referenced by QtHandles::Figure::updateBoundingBox().

◆ post_set()

◆ process_events()

static int gh_manager::process_events ( void  )
inlinestatic

◆ push_figure()

static void gh_manager::push_figure ( const graphics_handle h)
inlinestatic

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

◆ renumber_figure()

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

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

◆ restore_gcbo()

static void gh_manager::restore_gcbo ( void  )
inlinestaticprivate

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

Referenced by do_execute_callback().

◆ try_lock()

static bool gh_manager::try_lock ( void  )
inlinestatic

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

◆ unlock()

static void gh_manager::unlock ( void  )
inlinestatic

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

Member Data Documentation

◆ callback_objects

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

◆ event_processing

int gh_manager::event_processing
private

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

Referenced by do_enable_event_processing(), and do_process_events().

◆ event_queue

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

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

Referenced by do_enable_event_processing(), do_post_event(), and do_process_events().

◆ figure_list

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

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

Referenced by do_pop_figure(), and do_push_figure().

◆ graphics_lock

octave::mutex gh_manager::graphics_lock
private

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

◆ handle_free_list

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

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

◆ handle_map

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

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

Referenced by do_make_figure_handle(), do_make_graphics_handle(), and gh_manager().

◆ instance

gh_manager * gh_manager::instance = nullptr
staticprivate

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

Referenced by create_instance().

◆ next_handle

double gh_manager::next_handle
private

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


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