26 #if ! defined (octave_Canvas_h)
27 #define octave_Canvas_h 1
63 void redraw (
bool sync =
false);
66 void print (
const QString& file_cmd,
const QString& term)
76 QImage cdata,
Matrix hotspot);
81 create (octave::base_qobject& oct_qobj, octave::interpreter& interp,
83 const std::string& name);
108 virtual void drawZoomBox (
const QPoint& p1,
const QPoint& p2) = 0;
109 virtual void resize (
int x,
int y,
int width,
int height) = 0;
111 const QPoint& pt) = 0;
113 virtual void do_print (
const QString& file_cmd,
const QString& term,
117 Canvas (octave::base_qobject& oct_qobj, octave::interpreter& interp,
142 const graphics_object& obj, QMouseEvent *event);
144 const graphics_object& obj);
147 graphics_object& currentObj, graphics_object& axesObj,
148 bool axes_only =
false,
149 std::vector<std::string> omit = std::vector<std::string> ());
157 QCursor
make_cursor (
const QString& name,
int hot_x = -1,
int hot_y = -1);
void print(const QString &file_cmd, const QString &term)
void select_object(graphics_object obj, QMouseEvent *event, graphics_object ¤tObj, graphics_object &axesObj, bool axes_only=false, std::vector< std::string > omit=std::vector< std::string >())
static Canvas * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle, QWidget *parent, const std::string &name)
QCursor make_cursor(const QString &name, int hot_x=-1, int hot_y=-1)
Canvas(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle)
virtual uint8NDArray do_getPixels(const graphics_handle &handle)=0
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit, bool redraw_figure)
virtual ~Canvas(void)=default
void canvasToggleGrid(const graphics_handle &handle)
void canvasAutoAxes(const graphics_handle &handle)
octave::base_qobject & m_octave_qobj
void canvasMouseReleaseEvent(QMouseEvent *event)
void clearEventMask(int m)
octave::interpreter & m_interpreter
virtual uint8NDArray getPixels(void)
void interpreter_event(const octave::meth_callback &meth)
void canvasPaintEvent(void)
void canvasMouseDoubleClickEvent(QMouseEvent *event)
bool canvasKeyReleaseEvent(QKeyEvent *event)
virtual void draw(const graphics_handle &handle)=0
virtual void resize(int x, int y, int width, int height)=0
virtual void do_print(const QString &file_cmd, const QString &term, const graphics_handle &handle)=0
void redraw(bool sync=false)
void blockRedraw(bool block=true)
void gh_callback_event(const graphics_handle &h, const std::string &name, const octave_value &data)
void interpreter_event(const octave::fcn_callback &fcn)
virtual void drawZoomBox(const QPoint &p1, const QPoint &p2)=0
void canvasWheelEvent(QWheelEvent *event)
void setCursor(MouseMode mode, std::string fallback, QImage cdata, Matrix hotspot)
graphics_handle m_mouseAxes
void canvasToggleAxes(const graphics_handle &handle)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
void gh_callback_event(const graphics_handle &h, const std::string &name)
virtual graphics_object selectFromAxes(const graphics_object &ax, const QPoint &pt)=0
void updateCurrentPoint(const graphics_object &fig, const graphics_object &obj, QMouseEvent *event)
virtual QWidget * qWidget(void)=0
void canvasMousePressEvent(QMouseEvent *event)
void canvasMouseMoveEvent(QMouseEvent *event)
bool canvasKeyPressEvent(QKeyEvent *event)
Base class for Octave interfaces that use Qt.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::function< void(void)> fcn_callback
std::function< void(interpreter &)> meth_callback
F77_RET_T const F77_DBLE * x