* 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
This commit is contained in:
Benoît Minisini 2011-03-29 00:40:58 +00:00
parent 859ab8256f
commit e93c43ad9f
3 changed files with 29 additions and 2 deletions

View File

@ -7,6 +7,7 @@
Margin = True Margin = True
{ IconView1 IconView { IconView1 IconView
MoveScaled(2,6,42,31) MoveScaled(2,6,42,31)
Mouse = Mouse.Cross
Expand = True Expand = True
Mode = Select.Multiple Mode = Select.Multiple
Editable = True Editable = True

View File

@ -703,17 +703,29 @@ void gControl::setFont(gFont *ft)
int gControl::mouse() int gControl::mouse()
{ {
return mous; if (_proxy)
return _proxy->mouse();
else
return mous;
} }
gCursor* gControl::cursor() gCursor* gControl::cursor()
{ {
if (_proxy)
return _proxy->cursor();
if (!curs) return NULL; if (!curs) return NULL;
return new gCursor(curs); return new gCursor(curs);
} }
void gControl::setCursor(gCursor *vl) void gControl::setCursor(gCursor *vl)
{ {
if (_proxy)
{
_proxy->setCursor(vl);
return;
}
if (curs) { delete curs; curs=NULL;} if (curs) { delete curs; curs=NULL;}
if (!vl) if (!vl)
{ {
@ -740,6 +752,12 @@ void gControl::setMouse(int m)
GdkPixmap *pix; GdkPixmap *pix;
GdkColor col = {0,0,0,0}; GdkColor col = {0,0,0,0};
if (_proxy)
{
_proxy->setMouse(m);
return;
}
mous = m; mous = m;
if (gApplication::isBusy()) if (gApplication::isBusy())

View File

@ -1056,9 +1056,14 @@ END_METHOD
BEGIN_PROPERTY(Control_Mouse) BEGIN_PROPERTY(Control_Mouse)
QWidget *wid = QWIDGET(_object); QWidget *wid;
int shape; int shape;
while (THIS->proxy)
_object = THIS->proxy;
wid = QWIDGET(_object);
if (READ_PROPERTY) if (READ_PROPERTY)
{ {
if (wid->testAttribute(Qt::WA_SetCursor)) if (wid->testAttribute(Qt::WA_SetCursor))
@ -1080,6 +1085,9 @@ END_METHOD
BEGIN_PROPERTY(Control_Cursor) BEGIN_PROPERTY(Control_Cursor)
while (THIS->proxy)
_object = THIS->proxy;
if (READ_PROPERTY) if (READ_PROPERTY)
GB.ReturnObject(THIS->cursor); GB.ReturnObject(THIS->cursor);
else else