Rajat Gogri wrote:
Hello All,
When I debug and see mouse event Structure there are 2 parameters.
I'm not really sure why you're using a debugger; it's somewhat helpful
for debugging Mozilla code, but I can't imagine it being very useful for
your own code. (the DOM Inspector and Venkman are usually much better
for Javascript) I'm sure you have your reasons, though.
1) point
2) refPoint
point is place where mouse was clicked. those coordinates I am able to
understand. can anyone tell me what is refPoint???
refPoint is quite simple to understand: it's just coordinates of the
event relative to the widget which received the event, in device pixels.
point is actually a lot more complicated; its meaning varies depending
on where exactly you're talking about. Sometimes it's relative to the
current event frame, sometimes it's relative to the nearest view to the
current event frame, sometimes it's relative to the view the event got
dispatched against, sometimes it's relative to the widget the event got
dispatched against. The relevant code is mostly in nsViewManager.cpp
and PresShell::HandleEvent.
Note that on the trunk the point member is gone because it was too
confusing to keep track of; the coordinates are computed from refPoint
when needed.
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout