2008-04-24 14:49:12 +02:00
|
|
|
/***************************************************************************
|
|
|
|
|
2011-12-31 03:39:20 +01:00
|
|
|
CDrawingArea.cpp
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2013-08-03 17:38:01 +02:00
|
|
|
(c) 2000-2013 Benoît Minisini <gambas@users.sourceforge.net>
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2011-12-31 03:39:20 +01:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2011-12-31 03:39:20 +01:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2011-12-31 03:39:20 +01:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#define __CDRAWINGAREA_CPP
|
|
|
|
|
2008-05-01 01:08:02 +02:00
|
|
|
#include <QApplication>
|
2008-04-24 14:49:12 +02:00
|
|
|
#include <QPaintEvent>
|
|
|
|
#include <QPixmap>
|
2008-05-01 01:08:02 +02:00
|
|
|
#include <QPainter>
|
2011-12-19 17:33:09 +01:00
|
|
|
#include <QX11Info>
|
2011-12-27 02:09:08 +01:00
|
|
|
#include <QColormap>
|
2012-01-28 04:11:55 +01:00
|
|
|
#include <QTimer>
|
2014-09-09 08:59:03 +02:00
|
|
|
#include <QEvent>
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-07-12 23:49:13 +02:00
|
|
|
#include "CDraw.h"
|
2009-12-28 02:19:27 +01:00
|
|
|
#include "cpaint_impl.h"
|
2014-07-01 00:14:21 +02:00
|
|
|
#include "CColor.h"
|
2009-07-12 23:49:13 +02:00
|
|
|
#include "CDrawingArea.h"
|
|
|
|
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2008-04-24 14:49:12 +02:00
|
|
|
#ifndef NO_X_WINDOW
|
2008-04-29 15:40:55 +02:00
|
|
|
#include <QX11Info>
|
2008-04-24 14:49:12 +02:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#endif
|
|
|
|
|
2014-09-09 08:59:03 +02:00
|
|
|
#ifdef FontChange
|
|
|
|
#undef FontChange
|
|
|
|
#endif
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
2014-09-09 08:59:03 +02:00
|
|
|
|
2011-01-24 15:37:11 +01:00
|
|
|
DECLARE_EVENT(EVENT_Draw);
|
2014-09-09 08:59:03 +02:00
|
|
|
DECLARE_EVENT(EVENT_Font);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
class MyDrawingArea
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
2009-09-01 03:14:13 +02:00
|
|
|
MyDrawingArea::MyDrawingArea(QWidget *parent) : MyContainer(parent)
|
2008-04-24 14:49:12 +02:00
|
|
|
{
|
|
|
|
drawn = 0;
|
2010-02-25 13:04:34 +01:00
|
|
|
cache = 0;
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2011-12-19 17:33:09 +01:00
|
|
|
_background = (Qt::HANDLE)0;
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
2009-01-03 23:24:02 +01:00
|
|
|
_frozen = false;
|
|
|
|
_event_mask = 0;
|
2012-04-21 16:04:23 +02:00
|
|
|
_set_background = true;
|
2010-02-25 04:27:10 +01:00
|
|
|
_cached = false;
|
2010-12-22 19:31:44 +01:00
|
|
|
_no_background = false;
|
2011-02-27 20:55:29 +01:00
|
|
|
_in_draw_event = false;
|
2011-01-24 15:37:11 +01:00
|
|
|
_draw_event = EVENT_Draw;
|
2010-02-25 04:27:10 +01:00
|
|
|
|
2008-04-29 15:40:55 +02:00
|
|
|
setAttribute(Qt::WA_KeyCompression, false);
|
2011-12-19 17:33:09 +01:00
|
|
|
setAttribute(Qt::WA_PaintOnScreen, false);
|
|
|
|
setAttribute(Qt::WA_OpaquePaintEvent, false);
|
|
|
|
setAttribute(Qt::WA_StaticContents, false);
|
|
|
|
|
|
|
|
setAllowFocus(false);
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MyDrawingArea::~MyDrawingArea()
|
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
deleteBackground();
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
2012-01-28 04:11:55 +01:00
|
|
|
void MyDrawingArea::setVisible(bool visible)
|
|
|
|
{
|
|
|
|
MyContainer::setVisible(visible);
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2012-01-28 04:11:55 +01:00
|
|
|
if (_cached)
|
|
|
|
{
|
|
|
|
if (visible)
|
|
|
|
QTimer::singleShot(10, this, SLOT(setBackground()));
|
|
|
|
else
|
|
|
|
parentWidget()->update();
|
|
|
|
}
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
2012-01-28 04:11:55 +01:00
|
|
|
}
|
|
|
|
|
2008-04-24 14:49:12 +02:00
|
|
|
void MyDrawingArea::setAllowFocus(bool f)
|
|
|
|
{
|
|
|
|
if (f)
|
|
|
|
{
|
2010-10-15 02:23:11 +02:00
|
|
|
void *_object = CWidget::getReal(this);
|
|
|
|
setFocusPolicy(GB.CanRaise(THIS, EVENT_MouseWheel) ? Qt::WheelFocus : Qt::StrongFocus);
|
2009-01-03 23:24:02 +01:00
|
|
|
setAttribute(Qt::WA_InputMethodEnabled, true);
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
else
|
2008-05-01 01:08:02 +02:00
|
|
|
{
|
2008-04-24 14:49:12 +02:00
|
|
|
setFocusPolicy(Qt::NoFocus);
|
2008-05-01 01:08:02 +02:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void MyDrawingArea::setFrozen(bool f)
|
|
|
|
{
|
2009-01-03 23:24:02 +01:00
|
|
|
if (f == _frozen)
|
|
|
|
return;
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
|
|
|
#ifndef NO_X_WINDOW
|
2010-01-21 17:46:21 +01:00
|
|
|
XWindowAttributes attr;
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
if (f)
|
|
|
|
{
|
|
|
|
//setBackgroundMode(Qt::NoBackground);
|
|
|
|
XGetWindowAttributes(QX11Info::display(), winId(), &attr);
|
|
|
|
_event_mask = attr.your_event_mask;
|
|
|
|
XSelectInput(QX11Info::display(), winId(), ExposureMask);
|
|
|
|
//clearWFlags(Qt::WPaintClever);
|
|
|
|
//qDebug("frozen");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//setBackgroundMode(Qt::PaletteBackground);
|
|
|
|
XSelectInput(QX11Info::display(), winId(), _event_mask);
|
|
|
|
//qDebug("unfrozen");
|
|
|
|
}
|
2012-04-01 20:40:48 +02:00
|
|
|
XFlush(QX11Info::display());
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
|
|
|
#endif
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
_frozen = f;
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
2012-02-25 02:35:55 +01:00
|
|
|
static void cleanup_drawing(intptr_t _object)
|
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
PAINT_end();
|
2012-02-25 02:35:55 +01:00
|
|
|
}
|
|
|
|
|
2010-03-08 03:37:53 +01:00
|
|
|
void MyDrawingArea::redraw(QRect &r, bool frame)
|
|
|
|
{
|
|
|
|
QPainter *p;
|
2011-01-24 15:37:11 +01:00
|
|
|
void *_object = CWidget::get(this);
|
2012-11-27 19:42:24 +01:00
|
|
|
int fw;
|
|
|
|
GB_COLOR bg;
|
2012-02-25 02:35:55 +01:00
|
|
|
GB_RAISE_HANDLER handler;
|
2010-03-08 03:37:53 +01:00
|
|
|
|
|
|
|
if (!_object)
|
|
|
|
return;
|
|
|
|
|
2011-01-24 15:37:11 +01:00
|
|
|
//qDebug("paint: %d %d %d %d", r.x(), r.y(), r.width(), r.height());
|
2010-03-08 03:37:53 +01:00
|
|
|
|
2011-02-27 20:55:29 +01:00
|
|
|
_in_draw_event = true;
|
|
|
|
|
2012-11-27 19:42:24 +01:00
|
|
|
PAINT_begin(THIS);
|
|
|
|
p = PAINT_get_current();
|
2010-03-08 03:37:53 +01:00
|
|
|
|
2010-04-27 23:05:15 +02:00
|
|
|
/*if (!isTransparent())
|
2010-03-08 03:37:53 +01:00
|
|
|
{
|
|
|
|
p->translate(-r.x(), -r.y());
|
2010-04-27 23:05:15 +02:00
|
|
|
}*/
|
2010-03-08 03:37:53 +01:00
|
|
|
|
2011-01-08 02:17:55 +01:00
|
|
|
//p->save();
|
2010-12-09 04:15:42 +01:00
|
|
|
|
2011-02-24 13:21:27 +01:00
|
|
|
fw = frameWidth();
|
|
|
|
|
2012-02-19 22:13:50 +01:00
|
|
|
bg = CWIDGET_get_background((CWIDGET *)THIS);
|
|
|
|
if (bg != COLOR_DEFAULT)
|
2011-02-24 13:21:27 +01:00
|
|
|
{
|
2014-09-09 08:59:03 +02:00
|
|
|
p->fillRect(fw, fw, width() - fw * 2, height() - fw * 2, TO_QCOLOR(bg));
|
2011-02-24 13:21:27 +01:00
|
|
|
}
|
|
|
|
|
2012-11-27 19:42:24 +01:00
|
|
|
PAINT_clip(r.x(), r.y(), r.width(), r.height());
|
2010-03-08 03:37:53 +01:00
|
|
|
|
|
|
|
//p->setClipRegion(event->region().intersect(contentsRect()));
|
|
|
|
//p->setBrushOrigin(-r.x(), -r.y());
|
2012-02-25 02:35:55 +01:00
|
|
|
|
|
|
|
handler.callback = cleanup_drawing;
|
|
|
|
handler.data = (intptr_t)THIS;
|
2010-03-08 03:37:53 +01:00
|
|
|
|
2012-02-25 02:35:55 +01:00
|
|
|
GB.RaiseBegin(&handler);
|
|
|
|
GB.Raise(THIS, _draw_event, 0);
|
|
|
|
GB.RaiseEnd(&handler);
|
|
|
|
|
2011-01-08 02:17:55 +01:00
|
|
|
//p->restore();
|
2010-03-08 03:37:53 +01:00
|
|
|
|
|
|
|
if (frame)
|
|
|
|
{
|
2011-01-19 04:15:09 +01:00
|
|
|
QPainter pf(this);
|
|
|
|
pf.setClipping(false);
|
|
|
|
pf.initFrom(this);
|
|
|
|
pf.setRenderHint(QPainter::Antialiasing, false);
|
|
|
|
drawFrame(&pf);
|
2010-03-08 03:37:53 +01:00
|
|
|
}
|
|
|
|
|
2012-11-27 19:42:24 +01:00
|
|
|
PAINT_end();
|
2011-02-27 20:55:29 +01:00
|
|
|
|
|
|
|
_in_draw_event = false;
|
2010-03-08 03:37:53 +01:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2011-12-19 17:33:09 +01:00
|
|
|
void MyDrawingArea::createBackground(int w, int h)
|
|
|
|
{
|
2012-05-22 11:15:26 +02:00
|
|
|
void *_object = CWidget::get(this);
|
2011-12-19 17:33:09 +01:00
|
|
|
QPixmap p;
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
|
|
|
QX11Info xinfo = x11Info();
|
2011-12-19 17:33:09 +01:00
|
|
|
Qt::HANDLE old = _background;
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef QT5
|
2011-12-19 17:33:09 +01:00
|
|
|
_background = (Qt::HANDLE)XCreatePixmap(QX11Info::display(), RootWindow(QX11Info::display(), xinfo.screen()), w, h, xinfo.depth());
|
2012-06-09 22:46:11 +02:00
|
|
|
_background_pixmap = QPixmap::fromX11Pixmap(_background, QPixmap::ExplicitlyShared);
|
2015-05-08 19:40:28 +02:00
|
|
|
#else
|
|
|
|
_background_pixmap = QPixmap(w, h);
|
|
|
|
#endif
|
2011-12-19 17:33:09 +01:00
|
|
|
_background_w = w;
|
|
|
|
_background_h = h;
|
2011-12-27 02:09:08 +01:00
|
|
|
|
|
|
|
//qDebug("createBackground: %d x %d : %d -> %08X / winId = %08X", w, h, xinfo.depth(), (int)_background, (int)winId());
|
|
|
|
//p = QPixmap::fromX11Pixmap(_background, QPixmap::ExplicitlyShared);
|
|
|
|
//qDebug("color = %06X -> %06X", palette().color(backgroundRole()).rgb(), QColormap::instance().pixel((unsigned long)palette().color(backgroundRole()).rgb()));
|
|
|
|
|
2014-07-01 00:14:21 +02:00
|
|
|
#if 0
|
2011-12-27 02:09:08 +01:00
|
|
|
gc = XCreateGC(QX11Info::display(), _background, 0, 0);
|
2012-05-22 11:15:26 +02:00
|
|
|
//XSetForeground(QX11Info::display(), gc, QColormap::instance().pixel((unsigned long)palette().color(backgroundRole()).rgb()));
|
|
|
|
XSetForeground(QX11Info::display(), gc, QColormap::instance().pixel(CWIDGET_get_real_background((CWIDGET *)THIS)));
|
2011-12-27 02:09:08 +01:00
|
|
|
XFillRectangle(QX11Info::display(), _background, gc, 0, 0, w, h);
|
|
|
|
XFreeGC(QX11Info::display(), gc);
|
2014-07-01 00:14:21 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
_background_pixmap.fill(CCOLOR_make(CWIDGET_get_real_background((CWIDGET *)THIS)));
|
2011-12-27 02:09:08 +01:00
|
|
|
|
2012-01-28 04:11:55 +01:00
|
|
|
//qDebug("XSetWindowBackgroundPixmap: %08X %08X", (int)winId(), (int)_background);
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2011-12-19 17:33:09 +01:00
|
|
|
XSetWindowBackgroundPixmap(QX11Info::display(), winId(), _background);
|
2011-12-27 02:09:08 +01:00
|
|
|
XClearArea(QX11Info::display(), winId(), 0, 0, 0, 0, True);
|
|
|
|
|
2011-12-19 17:33:09 +01:00
|
|
|
if (old)
|
|
|
|
XFreePixmap(QX11Info::display(), (Pixmap)old);
|
2012-04-01 20:40:48 +02:00
|
|
|
|
|
|
|
XFlush(QX11Info::display());
|
2015-05-08 19:40:28 +02:00
|
|
|
#else
|
|
|
|
update();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
_cached = true;
|
2011-12-19 17:33:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void MyDrawingArea::deleteBackground()
|
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
if (hasCacheBackground())
|
2011-12-19 17:33:09 +01:00
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2012-01-28 04:11:55 +01:00
|
|
|
//qDebug("XSetWindowBackgroundPixmap: %08X None", (int)winId());
|
2011-12-19 17:33:09 +01:00
|
|
|
XSetWindowBackgroundPixmap(QX11Info::display(), winId(), None);
|
|
|
|
XFreePixmap(QX11Info::display(), (Pixmap)_background);
|
2012-04-01 20:40:48 +02:00
|
|
|
XFlush(QX11Info::display());
|
2011-12-19 17:33:09 +01:00
|
|
|
_background = 0;
|
2015-05-08 19:40:28 +02:00
|
|
|
#else
|
|
|
|
_background_pixmap = QPixmap();
|
|
|
|
#endif
|
|
|
|
_cached = false;
|
|
|
|
_background_w = _background_h = 0;
|
2011-12-19 17:33:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap *MyDrawingArea::getBackgroundPixmap()
|
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
if (!hasCacheBackground())
|
2011-12-19 17:33:09 +01:00
|
|
|
return NULL;
|
2012-06-09 22:46:11 +02:00
|
|
|
else
|
|
|
|
return &_background_pixmap;
|
2011-12-19 17:33:09 +01:00
|
|
|
}
|
|
|
|
|
2008-04-24 14:49:12 +02:00
|
|
|
void MyDrawingArea::paintEvent(QPaintEvent *event)
|
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
if (_cached)
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
|
|
|
#ifndef NO_X_WINDOW
|
2010-02-04 17:00:01 +01:00
|
|
|
if (_set_background)
|
|
|
|
{
|
2012-01-28 04:11:55 +01:00
|
|
|
//qDebug("XSetWindowBackgroundPixmap: %08X %08X (paint)", (int)winId(), (int)_background);
|
2011-12-19 17:33:09 +01:00
|
|
|
XSetWindowBackgroundPixmap(QX11Info::display(), winId(), _background);
|
2012-04-01 20:40:48 +02:00
|
|
|
XFlush(QX11Info::display());
|
2010-02-04 17:00:01 +01:00
|
|
|
_set_background = false;
|
|
|
|
}
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
|
|
|
#endif
|
2012-04-01 20:40:48 +02:00
|
|
|
|
|
|
|
QPainter p(this);
|
2015-05-08 19:40:28 +02:00
|
|
|
|
|
|
|
#ifdef QT5
|
|
|
|
p.drawPixmap(0, 0, _background_pixmap);
|
|
|
|
#endif
|
2012-04-01 20:40:48 +02:00
|
|
|
|
|
|
|
if (frameWidth())
|
|
|
|
{
|
|
|
|
QRegion r(0, 0, width(), height());
|
|
|
|
r = r.subtracted(QRegion(frameWidth(), frameWidth(), width() - frameWidth() * 2, height() - frameWidth() * 2));
|
|
|
|
p.setClipRegion(r);
|
|
|
|
p.setClipping(true);
|
|
|
|
//p.drawPixmap(0, 0, *getBackgroundPixmap());
|
|
|
|
}
|
|
|
|
|
|
|
|
drawFrame(&p);
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-04-29 14:54:45 +02:00
|
|
|
//QPainter paint( this );
|
2009-01-03 23:24:02 +01:00
|
|
|
QRect r;
|
|
|
|
|
2015-05-08 19:40:28 +02:00
|
|
|
r = event->rect().intersected(contentsRect());
|
2009-01-03 23:24:02 +01:00
|
|
|
if (r.isValid())
|
|
|
|
{
|
2010-04-27 23:05:15 +02:00
|
|
|
/*if (!isTransparent())
|
2010-02-25 13:04:34 +01:00
|
|
|
{
|
|
|
|
cache = new QPixmap(r.width(), r.height());
|
|
|
|
cache->fill(this, r.x(), r.y());
|
2010-04-27 23:05:15 +02:00
|
|
|
}*/
|
2009-07-18 04:30:07 +02:00
|
|
|
|
2010-03-08 03:37:53 +01:00
|
|
|
redraw(r, true);
|
|
|
|
|
2010-04-27 23:05:15 +02:00
|
|
|
/*if (!isTransparent())
|
2010-02-25 13:04:34 +01:00
|
|
|
{
|
|
|
|
paint.drawPixmap(r.x(), r.y(), *cache);
|
|
|
|
delete cache;
|
|
|
|
cache = 0;
|
2010-04-27 23:05:15 +02:00
|
|
|
}*/
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void MyDrawingArea::setBackground()
|
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2011-12-19 17:33:09 +01:00
|
|
|
if (_cached)
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2012-04-01 20:40:48 +02:00
|
|
|
XSetWindowBackgroundPixmap(QX11Info::display(), winId(), _background);
|
|
|
|
XFlush(QX11Info::display());
|
2010-02-04 17:00:01 +01:00
|
|
|
refreshBackground();
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
2015-05-08 19:40:28 +02:00
|
|
|
#endif
|
2010-02-04 17:00:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void MyDrawingArea::refreshBackground()
|
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
if (_cached)
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2010-02-04 17:00:01 +01:00
|
|
|
int fw = frameWidth();
|
2012-01-28 04:11:55 +01:00
|
|
|
XClearArea(QX11Info::display(), winId(), fw, fw, width() - fw * 2, height() - fw * 2, False);
|
2012-04-01 20:40:48 +02:00
|
|
|
XFlush(QX11Info::display());
|
2015-05-08 19:40:28 +02:00
|
|
|
#else
|
|
|
|
update();
|
|
|
|
#endif
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MyDrawingArea::clearBackground()
|
|
|
|
{
|
2014-10-10 21:23:44 +02:00
|
|
|
if (drawn)
|
|
|
|
{
|
|
|
|
GB.Error("DrawingArea is being painted");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-12-19 17:33:09 +01:00
|
|
|
if (_cached)
|
2014-10-10 21:23:44 +02:00
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
createBackground(width(), height());
|
2014-10-10 21:23:44 +02:00
|
|
|
}
|
2011-12-27 02:09:08 +01:00
|
|
|
else
|
2012-04-01 20:40:48 +02:00
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2011-12-27 02:09:08 +01:00
|
|
|
XClearArea(QX11Info::display(), winId(), 0, 0, 0, 0, True);
|
2012-04-01 20:40:48 +02:00
|
|
|
XFlush(QX11Info::display());
|
2015-05-08 19:40:28 +02:00
|
|
|
#else
|
|
|
|
update();
|
|
|
|
#endif
|
2012-04-01 20:40:48 +02:00
|
|
|
}
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2010-01-11 00:00:31 +01:00
|
|
|
void MyDrawingArea::resizeEvent(QResizeEvent *e)
|
|
|
|
{
|
|
|
|
MyContainer::resizeEvent(e);
|
|
|
|
updateBackground();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MyDrawingArea::updateBackground()
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
int w, h;
|
|
|
|
#ifndef QT5
|
|
|
|
int wb, hb;
|
|
|
|
#endif
|
2009-01-03 23:24:02 +01:00
|
|
|
|
|
|
|
if (drawn)
|
|
|
|
{
|
|
|
|
GB.Error("DrawingArea is being drawn");
|
2010-01-11 00:00:31 +01:00
|
|
|
return;
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
|
|
|
|
2011-12-19 17:33:09 +01:00
|
|
|
if (_cached)
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
w = qMax(width(), 1);
|
|
|
|
h = qMax(height(), 1);
|
2010-12-23 01:23:58 +01:00
|
|
|
|
2011-12-19 17:33:09 +01:00
|
|
|
if (w != _background_w || h != _background_h)
|
|
|
|
{
|
2015-05-08 19:40:28 +02:00
|
|
|
#ifndef QT5
|
2011-12-19 17:33:09 +01:00
|
|
|
Qt::HANDLE old = _background;
|
|
|
|
|
2015-05-08 19:40:28 +02:00
|
|
|
wb = qMin(w, _background_w);
|
|
|
|
hb = qMin(h, _background_h);
|
2009-01-03 23:24:02 +01:00
|
|
|
|
2011-12-26 13:59:17 +01:00
|
|
|
_background = 0;
|
2011-12-19 17:33:09 +01:00
|
|
|
createBackground(w, h);
|
2009-01-03 23:24:02 +01:00
|
|
|
|
2011-12-19 17:33:09 +01:00
|
|
|
GC gc = XCreateGC(QX11Info::display(), old, 0, 0);
|
|
|
|
XCopyArea(QX11Info::display(), old, _background, gc, 0, 0, wb, hb, 0, 0);
|
|
|
|
XFreeGC(QX11Info::display(), gc);
|
|
|
|
|
|
|
|
XFreePixmap(QX11Info::display(), old);
|
2015-05-08 19:40:28 +02:00
|
|
|
#else
|
|
|
|
QPixmap old = _background_pixmap;
|
|
|
|
createBackground(w, h);
|
|
|
|
QPainter p(&_background_pixmap);
|
|
|
|
p.drawPixmap(0, 0, old);
|
|
|
|
p.end();
|
|
|
|
#endif
|
2009-01-03 23:24:02 +01:00
|
|
|
|
2010-01-11 00:00:31 +01:00
|
|
|
setBackground();
|
|
|
|
}
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2010-03-08 03:37:53 +01:00
|
|
|
void MyDrawingArea::setStaticContents(bool on)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-25 04:27:10 +01:00
|
|
|
void MyDrawingArea::updateCache()
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
//qDebug("updateCache: %d %08X", _cached, (int)winId());
|
2009-01-03 23:24:02 +01:00
|
|
|
|
2010-04-27 23:05:15 +02:00
|
|
|
if (_cached) // && !_transparent)
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
setAttribute(Qt::WA_DontCreateNativeAncestors, true);
|
|
|
|
setAttribute(Qt::WA_NativeWindow, true);
|
2012-01-28 04:11:55 +01:00
|
|
|
|
2009-09-24 01:21:08 +02:00
|
|
|
setAttribute(Qt::WA_PaintOnScreen, true);
|
2010-03-07 02:38:15 +01:00
|
|
|
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
2010-02-04 17:00:01 +01:00
|
|
|
setAttribute(Qt::WA_StaticContents, true);
|
2011-12-19 17:33:09 +01:00
|
|
|
createBackground(width(), height());
|
|
|
|
setBackground();
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
2010-02-25 04:27:10 +01:00
|
|
|
else //if (_background)
|
2009-01-03 23:24:02 +01:00
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
deleteBackground();
|
2009-09-24 01:21:08 +02:00
|
|
|
setAttribute(Qt::WA_PaintOnScreen, false);
|
2010-03-07 02:38:15 +01:00
|
|
|
setAttribute(Qt::WA_OpaquePaintEvent, false);
|
2009-09-24 01:21:08 +02:00
|
|
|
setAttribute(Qt::WA_StaticContents, false);
|
2010-12-23 04:55:24 +01:00
|
|
|
#ifdef NO_X_WINDOW
|
|
|
|
setBackgroundMode(Qt::NoBackground);
|
|
|
|
#else
|
2011-12-19 17:33:09 +01:00
|
|
|
//XClearArea(QX11Info::display(), winId(), 0, 0, 0, 0, True);
|
2015-05-08 19:40:28 +02:00
|
|
|
//repaint();
|
|
|
|
update();
|
2010-12-23 04:55:24 +01:00
|
|
|
#endif
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
2010-12-22 19:31:44 +01:00
|
|
|
|
|
|
|
updateNoBackground();
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
|
|
|
|
2010-02-25 04:27:10 +01:00
|
|
|
void MyDrawingArea::setCached(bool c)
|
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
if (c == _cached)
|
|
|
|
return;
|
|
|
|
|
2010-02-25 04:27:10 +01:00
|
|
|
_cached = c;
|
|
|
|
updateCache();
|
|
|
|
}
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
void MyDrawingArea::setPalette(const QPalette &pal)
|
|
|
|
{
|
2011-12-27 02:09:08 +01:00
|
|
|
if (_cached)
|
|
|
|
return;
|
2009-09-01 03:14:13 +02:00
|
|
|
MyContainer::setPalette(pal);
|
2015-05-08 19:40:28 +02:00
|
|
|
update();
|
2009-01-03 23:24:02 +01:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2010-12-22 19:31:44 +01:00
|
|
|
void MyDrawingArea::updateNoBackground()
|
2010-02-25 04:27:10 +01:00
|
|
|
{
|
2010-12-22 19:31:44 +01:00
|
|
|
setAttribute(Qt::WA_NoSystemBackground, _no_background);
|
|
|
|
if (_cached)
|
|
|
|
setBackground();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MyDrawingArea::setNoBackground(bool on)
|
|
|
|
{
|
|
|
|
_no_background = on;
|
|
|
|
updateNoBackground();
|
|
|
|
}
|
2010-02-25 04:27:10 +01:00
|
|
|
|
2010-03-08 03:37:53 +01:00
|
|
|
void MyDrawingArea::hideEvent(QHideEvent *e)
|
|
|
|
{
|
2011-12-19 17:33:09 +01:00
|
|
|
if (_cached)
|
2010-03-08 03:37:53 +01:00
|
|
|
_set_background = true;
|
|
|
|
MyContainer::hideEvent(e);
|
|
|
|
}
|
2010-02-25 04:27:10 +01:00
|
|
|
|
2014-09-09 08:59:03 +02:00
|
|
|
void MyDrawingArea::changeEvent(QEvent *e)
|
|
|
|
{
|
|
|
|
if (e->type() == QEvent::FontChange)
|
|
|
|
{
|
|
|
|
MyContainer::changeEvent(e);
|
|
|
|
void *_object = CWidget::get(this);
|
|
|
|
GB.Raise(THIS, EVENT_Font, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-24 14:49:12 +02:00
|
|
|
/***************************************************************************
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
DrawingArea
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
BEGIN_METHOD(CDRAWINGAREA_new, GB_OBJECT parent)
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
MyDrawingArea *wid = new MyDrawingArea(QCONTAINER(VARG(parent)));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
//THIS->widget.background = QColorGroup::Base;
|
|
|
|
THIS->container = wid;
|
2011-02-24 13:21:27 +01:00
|
|
|
THIS->widget.flag.noBackground = true;
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
CWIDGET_new(wid, (void *)_object);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_PROPERTY(CDRAWINGAREA_cached)
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
if (READ_PROPERTY)
|
|
|
|
GB.ReturnBoolean(WIDGET->isCached());
|
|
|
|
else
|
2011-12-27 02:09:08 +01:00
|
|
|
{
|
2012-11-27 19:42:24 +01:00
|
|
|
GB_COLOR bg = CWIDGET_get_background((CWIDGET *)THIS);
|
|
|
|
GB_COLOR fg = CWIDGET_get_foreground((CWIDGET *)THIS);
|
2012-02-19 22:13:50 +01:00
|
|
|
|
|
|
|
if (bg == COLOR_DEFAULT)
|
2011-12-27 02:09:08 +01:00
|
|
|
{
|
2012-05-22 11:15:26 +02:00
|
|
|
CWIDGET_set_color((CWIDGET *)THIS, WIDGET->palette().color(WIDGET->backgroundRole()).rgb() & 0xFFFFFF, fg);
|
2011-12-27 02:09:08 +01:00
|
|
|
WIDGET->clearBackground();
|
|
|
|
}
|
2009-01-03 23:24:02 +01:00
|
|
|
WIDGET->setCached(VPROP(GB_BOOLEAN));
|
2011-12-27 02:09:08 +01:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
|
|
|
|
2010-07-22 02:29:53 +02:00
|
|
|
DECLARE_METHOD(Control_Background);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
BEGIN_METHOD_VOID(CDRAWINGAREA_clear)
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
WIDGET->clearBackground();
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
2011-02-24 13:21:27 +01:00
|
|
|
BEGIN_PROPERTY(DrawingArea_Background)
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2010-07-22 02:29:53 +02:00
|
|
|
Control_Background(_object, _param);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
if (!READ_PROPERTY)
|
|
|
|
WIDGET->clearBackground();
|
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
2010-12-22 19:31:44 +01:00
|
|
|
|
|
|
|
BEGIN_PROPERTY(DrawingArea_NoBackground)
|
|
|
|
|
|
|
|
if (READ_PROPERTY)
|
|
|
|
GB.ReturnBoolean(WIDGET->hasNoBackground());
|
|
|
|
else
|
|
|
|
WIDGET->setNoBackground(VPROP(GB_BOOLEAN));
|
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
BEGIN_PROPERTY(CDRAWINGAREA_border)
|
|
|
|
|
2012-02-12 17:24:59 +01:00
|
|
|
Container_Border(_object, _param);
|
2009-01-03 23:24:02 +01:00
|
|
|
|
|
|
|
if (!READ_PROPERTY)
|
2010-12-09 04:15:42 +01:00
|
|
|
{
|
2009-01-03 23:24:02 +01:00
|
|
|
WIDGET->clearBackground();
|
2010-12-09 04:15:42 +01:00
|
|
|
}
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
|
|
|
BEGIN_PROPERTY(CDRAWINGAREA_enabled)
|
|
|
|
|
2010-07-22 02:29:53 +02:00
|
|
|
Control_Enabled(_object, _param);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
if (!READ_PROPERTY)
|
|
|
|
WIDGET->setFrozen(!VPROP(GB_BOOLEAN));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
|
|
|
BEGIN_PROPERTY(CDRAWINGAREA_focus)
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
if (READ_PROPERTY)
|
2012-08-16 18:37:03 +02:00
|
|
|
GB.ReturnBoolean(CWIDGET_get_allow_focus(THIS));
|
2009-01-03 23:24:02 +01:00
|
|
|
else
|
2012-08-16 18:37:03 +02:00
|
|
|
CWIDGET_set_allow_focus(THIS, VPROP(GB_BOOLEAN));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
2009-12-29 02:21:39 +01:00
|
|
|
BEGIN_PROPERTY(CDRAWINGAREA_painted)
|
2009-12-28 02:19:27 +01:00
|
|
|
|
2012-11-27 19:42:24 +01:00
|
|
|
static bool deprecated = false;
|
|
|
|
|
|
|
|
if (!deprecated)
|
|
|
|
{
|
|
|
|
deprecated = true;
|
|
|
|
GB.Deprecated("gb.qt4", "DrawingArea.Painted", NULL);
|
|
|
|
}
|
|
|
|
|
2009-12-28 02:19:27 +01:00
|
|
|
if (READ_PROPERTY)
|
2012-11-27 19:42:24 +01:00
|
|
|
GB.ReturnBoolean(true);
|
2009-12-28 02:19:27 +01:00
|
|
|
|
|
|
|
END_PROPERTY
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2010-04-27 23:05:15 +02:00
|
|
|
#if 0
|
2010-02-25 04:27:10 +01:00
|
|
|
BEGIN_PROPERTY(CDRAWINGAREA_transparent)
|
|
|
|
|
|
|
|
if (READ_PROPERTY)
|
|
|
|
GB.ReturnBoolean(WIDGET->isTransparent());
|
|
|
|
else
|
|
|
|
{
|
|
|
|
WIDGET->setTransparent(VPROP(GB_BOOLEAN));
|
2010-02-25 13:04:34 +01:00
|
|
|
//THIS->widget.flag.fillBackground = !WIDGET->isTransparent();
|
|
|
|
//CWIDGET_reset_color((CWIDGET *)THIS);
|
2010-02-25 04:27:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
END_PROPERTY
|
2010-04-27 23:05:15 +02:00
|
|
|
#endif
|
2010-02-25 04:27:10 +01:00
|
|
|
|
2010-03-08 03:37:53 +01:00
|
|
|
BEGIN_METHOD(DrawingArea_Refresh, GB_INTEGER x; GB_INTEGER y; GB_INTEGER w; GB_INTEGER h)
|
|
|
|
|
2011-08-31 01:50:38 +02:00
|
|
|
int x, y, w, h;
|
|
|
|
|
2011-12-23 02:05:51 +01:00
|
|
|
/*if (WIDGET->isCached())
|
2010-03-08 03:37:53 +01:00
|
|
|
{
|
|
|
|
QRect r;
|
|
|
|
|
|
|
|
if (!MISSING(x) && !MISSING(y))
|
|
|
|
r.setRect(VARG(x), VARG(y), VARGOPT(w, WIDGET->width()), VARGOPT(h, WIDGET->height()));
|
|
|
|
else
|
|
|
|
r.setRect(0, 0, WIDGET->width(), WIDGET->height());
|
|
|
|
|
|
|
|
WIDGET->redraw(r, false);
|
2011-12-23 02:05:51 +01:00
|
|
|
}*/
|
2010-03-08 03:37:53 +01:00
|
|
|
|
2011-08-31 01:50:38 +02:00
|
|
|
if (!MISSING(x) && !MISSING(y))
|
|
|
|
{
|
|
|
|
x = VARG(x);
|
|
|
|
y = VARG(y);
|
|
|
|
w = VARGOPT(w, QWIDGET(_object)->width());
|
|
|
|
h = VARGOPT(h, QWIDGET(_object)->height());
|
|
|
|
WIDGET->update(x, y, w, h);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
WIDGET->update();
|
|
|
|
}
|
|
|
|
|
2010-03-08 03:37:53 +01:00
|
|
|
END_METHOD
|
|
|
|
|
2012-08-17 17:53:52 +02:00
|
|
|
BEGIN_PROPERTY(DrawingArea_Tablet)
|
2012-08-10 01:39:29 +02:00
|
|
|
|
|
|
|
if (READ_PROPERTY)
|
|
|
|
GB.ReturnBoolean(THIS->widget.flag.use_tablet);
|
|
|
|
else
|
|
|
|
THIS->widget.flag.use_tablet = VPROP(GB_BOOLEAN);
|
|
|
|
|
|
|
|
END_PROPERTY
|
|
|
|
|
2008-04-24 14:49:12 +02:00
|
|
|
GB_DESC CDrawingAreaDesc[] =
|
|
|
|
{
|
2009-01-03 23:24:02 +01:00
|
|
|
GB_DECLARE("DrawingArea", sizeof(CDRAWINGAREA)), GB_INHERITS("Container"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
GB_METHOD("_new", NULL, CDRAWINGAREA_new, "(Parent)Container;"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
GB_PROPERTY("Cached", "b", CDRAWINGAREA_cached),
|
|
|
|
|
2012-02-12 17:24:59 +01:00
|
|
|
GB_PROPERTY("Arrangement", "i", Container_Arrangement),
|
|
|
|
GB_PROPERTY("AutoResize", "b", Container_AutoResize),
|
|
|
|
GB_PROPERTY("Spacing", "b", Container_Spacing),
|
|
|
|
GB_PROPERTY("Margin", "b", Container_Margin),
|
|
|
|
GB_PROPERTY("Padding", "i", Container_Padding),
|
|
|
|
GB_PROPERTY("Indent", "b", Container_Indent),
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_PROPERTY("Invert", "b", Container_Invert),
|
2010-10-08 23:27:53 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
GB_PROPERTY("Border", "i", CDRAWINGAREA_border),
|
2010-12-22 19:31:44 +01:00
|
|
|
GB_PROPERTY("NoBackground", "b", DrawingArea_NoBackground),
|
2011-02-24 13:21:27 +01:00
|
|
|
GB_PROPERTY("Background", "i", DrawingArea_Background),
|
2009-01-03 23:24:02 +01:00
|
|
|
|
|
|
|
GB_PROPERTY("Focus", "b", CDRAWINGAREA_focus),
|
|
|
|
GB_PROPERTY("Enabled", "b", CDRAWINGAREA_enabled),
|
2009-12-29 02:21:39 +01:00
|
|
|
GB_PROPERTY("Painted", "b", CDRAWINGAREA_painted),
|
2012-08-17 17:53:52 +02:00
|
|
|
GB_PROPERTY("Tablet", "b", DrawingArea_Tablet),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
GB_METHOD("Clear", NULL, CDRAWINGAREA_clear, NULL),
|
2010-03-08 03:37:53 +01:00
|
|
|
GB_METHOD("Refresh", NULL, DrawingArea_Refresh, "[(X)i(Y)i(Width)i(Height)i]"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2011-01-24 15:37:11 +01:00
|
|
|
GB_EVENT("Draw", NULL, NULL, &EVENT_Draw),
|
2014-09-09 08:59:03 +02:00
|
|
|
GB_EVENT("Font", NULL, NULL, &EVENT_Font),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-11-27 19:42:24 +01:00
|
|
|
//GB_INTERFACE("Draw", &DRAW_Interface),
|
2009-12-28 02:19:27 +01:00
|
|
|
GB_INTERFACE("Paint", &PAINT_Interface),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
DRAWINGAREA_DESCRIPTION,
|
|
|
|
|
2009-01-03 23:24:02 +01:00
|
|
|
GB_END_DECLARE
|
2008-04-24 14:49:12 +02:00
|
|
|
};
|