26 #if ! defined (octave_Canvas_h)
27 #define octave_Canvas_h 1
67 void redraw (
bool sync =
false);
70 void print (
const QString& file_cmd,
const QString& term)
80 QImage cdata,
Matrix hotspot);
87 const std::string&
name);
112 virtual void drawZoomBox (
const QPoint& p1,
const QPoint& p2) = 0;
113 virtual void resize (
int x,
int y,
int width,
int height) = 0;
115 const QPoint& pt) = 0;
117 virtual void do_print (
const QString& file_cmd,
const QString& term,
152 bool axes_only =
false,
153 std::vector<std::string> omit = std::vector<std::string> ());
161 QCursor
make_cursor (
const QString&
name,
int hot_x = -1,
int hot_y = -1);
static Canvas * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle, QWidget *parent, const std::string &name)
void print(const QString &file_cmd, const QString &term)
void canvasMousePressEvent(QMouseEvent *event)
virtual QWidget * qWidget(void)=0
virtual void draw(const graphics_handle &handle)=0
void setCursor(MouseMode mode, std::string fallback, QImage cdata, Matrix hotspot)
bool canvasKeyReleaseEvent(QKeyEvent *event)
void canvasMouseReleaseEvent(QMouseEvent *event)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit)
bool canvasKeyPressEvent(QKeyEvent *event)
void canvasAutoAxes(const graphics_handle &handle)
void updateCurrentPoint(const graphics_object &fig, const graphics_object &obj, QMouseEvent *event)
void clearEventMask(int m)
void canvasToggleGrid(const graphics_handle &handle)
virtual void do_print(const QString &file_cmd, const QString &term, const graphics_handle &handle)=0
void canvasMouseDoubleClickEvent(QMouseEvent *event)
void canvasPaintEvent(void)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
graphics_handle m_mouseAxes
virtual void drawZoomBox(const QPoint &p1, const QPoint &p2)=0
virtual uint8NDArray getPixels(void)
Canvas(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle)
void interpreter_event(const octave::meth_callback &meth)
void redraw(bool sync=false)
octave::interpreter & m_interpreter
virtual graphics_object selectFromAxes(const graphics_object &ax, const QPoint &pt)=0
virtual uint8NDArray do_getPixels(const graphics_handle &handle)=0
void gh_callback_event(const graphics_handle &h, const std::string &name)
virtual ~Canvas(void)=default
void canvasMouseMoveEvent(QMouseEvent *event)
QCursor make_cursor(const QString &name, int hot_x=-1, int hot_y=-1)
void blockRedraw(bool block=true)
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 >())
void canvasToggleAxes(const graphics_handle &handle)
virtual void resize(int x, int y, int width, int height)=0
void gh_callback_event(const graphics_handle &h, const std::string &name, const octave_value &data)
void canvasWheelEvent(QWheelEvent *event)
octave::base_qobject & m_octave_qobj
void interpreter_event(const octave::fcn_callback &fcn)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit, bool redraw_figure)
Base class for Octave interfaces that use Qt.
F77_RET_T const F77_DBLE * x
std::function< void(octave::interpreter &)> meth_callback
std::function< void(void)> fcn_callback