* 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
{ IconView1 IconView
MoveScaled(2,6,42,31)
Mouse = Mouse.Cross
Expand = True
Mode = Select.Multiple
Editable = True

View File

@ -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())

View File

@ -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