19#include "kis_canvas.h"
20#include "kis_opengl_canvas.h"
21#include "kis_opengl_canvas_painter.h"
24KisOpenGLCanvasWidget::KisOpenGLCanvasWidget(TQWidget *parent,
const char *name, TQGLWidget *sharedContextWidget)
25 : TQGLWidget(KisOpenGLCanvasFormat, parent, name, sharedContextWidget)
28 kdDebug(41001) <<
"Created TQGLWidget with sharing\n";
30 kdDebug(41001) <<
"Created TQGLWidget with no sharing\n";
34KisOpenGLCanvasWidget::~KisOpenGLCanvasWidget()
38void KisOpenGLCanvasWidget::paintEvent(TQPaintEvent *e)
40 TQGLWidget::paintEvent(e);
42 widgetGotPaintEvent(e);
45void KisOpenGLCanvasWidget::mousePressEvent(TQMouseEvent *e)
47 widgetGotMousePressEvent(e);
50void KisOpenGLCanvasWidget::mouseReleaseEvent(TQMouseEvent *e)
52 widgetGotMouseReleaseEvent(e);
55void KisOpenGLCanvasWidget::mouseDoubleClickEvent(TQMouseEvent *e)
57 widgetGotMouseDoubleClickEvent(e);
60void KisOpenGLCanvasWidget::mouseMoveEvent(TQMouseEvent *e)
62 widgetGotMouseMoveEvent(e);
65void KisOpenGLCanvasWidget::tabletEvent(TQTabletEvent *e)
67 widgetGotTabletEvent(e);
70void KisOpenGLCanvasWidget::enterEvent(TQEvent *e)
72 widgetGotEnterEvent(e);
75void KisOpenGLCanvasWidget::leaveEvent(TQEvent *e)
77 widgetGotLeaveEvent(e);
80void KisOpenGLCanvasWidget::wheelEvent(TQWheelEvent *e)
82 widgetGotWheelEvent(e);
85void KisOpenGLCanvasWidget::keyPressEvent(TQKeyEvent *e)
87 widgetGotKeyPressEvent(e);
90void KisOpenGLCanvasWidget::keyReleaseEvent(TQKeyEvent *e)
92 widgetGotKeyReleaseEvent(e);
95void KisOpenGLCanvasWidget::dragEnterEvent(TQDragEnterEvent *e)
97 widgetGotDragEnterEvent(e);
100void KisOpenGLCanvasWidget::dropEvent(TQDropEvent *e)
102 widgetGotDropEvent(e);
107bool KisOpenGLCanvasWidget::x11Event(XEvent *event)
109 return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0)));
114KisCanvasWidgetPainter *KisOpenGLCanvasWidget::createPainter()
116 return new KisOpenGLCanvasPainter(
this);
119#if defined(EXTENDED_X11_TABLET_SUPPORT)
120void KisOpenGLCanvasWidget::selectTabletDeviceEvents()
122 KisCanvasWidget::selectTabletDeviceEvents(
this);