comparison libinterp/corefcn/graphics.in.h @ 26520:278ae90567a7 stable

Don't use C++ callback to notify close request from Qt Figures (bug #54187) * Figure.h/cc (Figure::close_figure_callback): Remove callback. (Figure::eventNotifyBefore): Use gh_manager::post_callback rather than octave_link::post_event to notify that a figure should be closed. * graphics.in.h (graphics_event::create_mcode_event): New static function. * graphics.cc (mcode_event): New class to handle direct mcode evaluation. (gh_manager::do_post_callback): For "closerequestfcn" callback, create an mcode_event and use the "close" function to make the figure current before evaluating the actual closerequestfcn.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Fri, 11 Jan 2019 18:14:41 +0100
parents bf835b1d04b1
children 8b0c9dc0799a 3c7c5b7c3044
comparison
equal deleted inserted replaced
26519:9ed51ca68352 26520:278ae90567a7
6159 const octave_value& cb, 6159 const octave_value& cb,
6160 const octave_value& data = Matrix (), 6160 const octave_value& data = Matrix (),
6161 int busyaction = base_graphics_event::QUEUE); 6161 int busyaction = base_graphics_event::QUEUE);
6162 6162
6163 static graphics_event 6163 static graphics_event
6164 create_mcode_event (const graphics_handle& h, const std::string& cmd,
6165 int busyaction);
6166
6167 static graphics_event
6164 create_function_event (event_fcn fcn, void *data = nullptr); 6168 create_function_event (event_fcn fcn, void *data = nullptr);
6165 6169
6166 static graphics_event 6170 static graphics_event
6167 create_set_event (const graphics_handle& h, const std::string& name, 6171 create_set_event (const graphics_handle& h, const std::string& name,
6168 const octave_value& value, bool notify_toolkit = true, 6172 const octave_value& value, bool notify_toolkit = true,