From e93c43ad9f064c2431913ac5a1115689b7af725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Tue, 29 Mar 2011 00:40:58 +0000 Subject: [PATCH] [GB.GTK] * NEW: The Control.Mouse and Control.Cursor properties now take the proxy into account. [GB.QT4] * NEW: The Control.Mouse and Control.Cursor properties now take the proxy into account. git-svn-id: svn://localhost/gambas/trunk@3703 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.form/.src/Test/FIconView.form | 1 + gb.gtk/src/gcontrol.cpp | 20 +++++++++++++++++++- gb.qt4/src/CWidget.cpp | 10 +++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/comp/src/gb.form/.src/Test/FIconView.form b/comp/src/gb.form/.src/Test/FIconView.form index b505492b3..721012044 100644 --- a/comp/src/gb.form/.src/Test/FIconView.form +++ b/comp/src/gb.form/.src/Test/FIconView.form @@ -7,6 +7,7 @@ Margin = True { IconView1 IconView MoveScaled(2,6,42,31) + Mouse = Mouse.Cross Expand = True Mode = Select.Multiple Editable = True diff --git a/gb.gtk/src/gcontrol.cpp b/gb.gtk/src/gcontrol.cpp index 0e595eb4d..d49b34129 100644 --- a/gb.gtk/src/gcontrol.cpp +++ b/gb.gtk/src/gcontrol.cpp @@ -703,17 +703,29 @@ void gControl::setFont(gFont *ft) int gControl::mouse() { - return mous; + if (_proxy) + return _proxy->mouse(); + else + return mous; } gCursor* gControl::cursor() { + if (_proxy) + return _proxy->cursor(); + if (!curs) return NULL; return new gCursor(curs); } void gControl::setCursor(gCursor *vl) { + if (_proxy) + { + _proxy->setCursor(vl); + return; + } + if (curs) { delete curs; curs=NULL;} if (!vl) { @@ -740,6 +752,12 @@ void gControl::setMouse(int m) GdkPixmap *pix; GdkColor col = {0,0,0,0}; + if (_proxy) + { + _proxy->setMouse(m); + return; + } + mous = m; if (gApplication::isBusy()) diff --git a/gb.qt4/src/CWidget.cpp b/gb.qt4/src/CWidget.cpp index 210ad446d..1ab687272 100644 --- a/gb.qt4/src/CWidget.cpp +++ b/gb.qt4/src/CWidget.cpp @@ -1056,9 +1056,14 @@ END_METHOD BEGIN_PROPERTY(Control_Mouse) - QWidget *wid = QWIDGET(_object); + QWidget *wid; int shape; + while (THIS->proxy) + _object = THIS->proxy; + + wid = QWIDGET(_object); + if (READ_PROPERTY) { if (wid->testAttribute(Qt::WA_SetCursor)) @@ -1080,6 +1085,9 @@ END_METHOD BEGIN_PROPERTY(Control_Cursor) + while (THIS->proxy) + _object = THIS->proxy; + if (READ_PROPERTY) GB.ReturnObject(THIS->cursor); else