diff options
author | corvid <corvid@lavabit.com> | 2009-10-29 02:21:08 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-10-29 02:21:08 +0000 |
commit | 21f85b39f22ff0f5cd373a4cfedba115ee533e98 (patch) | |
tree | 2f0f83b174694e8bca454480942bc0f1bcdec799 /dw/image.cc | |
parent | 2949961d999576c217bb5be79fd643d53eb6698a (diff) |
move link signal emitter/receiver from Widget to Layout
http://lists.auriga.wearlab.de/pipermail/dillo-dev/2009-October/006936.html
Diffstat (limited to 'dw/image.cc')
-rw-r--r-- | dw/image.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dw/image.cc b/dw/image.cc index 4230d115..d68ef94a 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -229,7 +229,7 @@ void Image::enterNotifyImpl (core::EventCrossing *event) core::style::Tooltip *tooltip = getStyle()->x_tooltip; if (currLink != -1) { - (void) emitLinkEnter (currLink, -1, -1, -1); + (void) layout->emitLinkEnter (this, currLink, -1, -1, -1); } if (tooltip) { tooltip->onEnter(); @@ -243,7 +243,7 @@ void Image::leaveNotifyImpl (core::EventCrossing *event) if (currLink != -1) { currLink = -1; - (void) emitLinkEnter (-1, -1, -1, -1); + (void) layout->emitLinkEnter (this, -1, -1, -1, -1); } if (tooltip) { tooltip->onLeave(); @@ -286,11 +286,11 @@ bool Image::motionNotifyImpl (core::EventMotion *event) /* \todo Using MAP/AREA styles would probably be best */ setCursor(newLink == -1 ? getStyle()->cursor : core::style::CURSOR_POINTER); - (void) emitLinkEnter (newLink, -1, -1, -1); + (void) layout->emitLinkEnter (this, newLink, -1, -1, -1); } } else if (isMap && currLink != -1) { /* server-side image map */ - (void) emitLinkEnter (currLink, -1, x, y); + (void) layout->emitLinkEnter (this, currLink, -1, x, y); } } return true; @@ -303,7 +303,8 @@ bool Image::buttonPressImpl (core::EventButton *event) currLink = mapList? mapList->link (mapKey, contentX(event),contentY(event)): getStyle()->x_link; if (event->button == 3){ - (void)emitLinkPress(currLink, getStyle()->x_img, -1,-1,event); + (void)layout->emitLinkPress(this, currLink, getStyle()->x_img, -1, -1, + event); ret = true; } else if (event->button == 1 || currLink != -1){ clicking = true; @@ -320,7 +321,7 @@ bool Image::buttonReleaseImpl (core::EventButton *event) int x = isMap ? contentX(event) : -1; int y = isMap ? contentY(event) : -1; clicking = false; - emitLinkClick (currLink, getStyle()->x_img, x, y, event); + layout->emitLinkClick (this, currLink, getStyle()->x_img, x, y, event); return true; } return false; |