On Apr 4, 2008, at 6:32 AM, Trenton Schulz wrote:

I think the problem is that the macwindows demo probably shouldn't have been built since it's based heavily on Carbon stuff and not ready for Cocoa at all.



Still, it's a damn fine example so please keep it in there or Cocoa- ify it!




I get that, too; notice that the highlighted thing is *opposite* of
what it should be; this is some weird array-indexing problem where
it's going the wrong way through the controls.


This is a known issue in the current alpha, when dispatching mouse events, the global pos is in the "Cocoa" coordinates which has (0, 0) at the bottom left instead of top left.


Ahh, yes... good old Display Postscript!

From the "View Programming Guide for Cocoa":
Specifying that a view subclass uses a flipped coordinate system is done by overriding the isFlipped method. The default implementation of NSView returns NO, which means that the origin of the coordinate system lies at the lower-left corner of the default bounds rectangle, and the y-axis runs from bottom to top. When a subclass overrides this method to returnYES, the view machinery automatically adjusts itself to assume that the upper-left corner is the origin.

And
 QWidget::winId() will return an NSView pointer

Hmm...


To unsubscribe - send "unsubscribe" in the subject to [EMAIL PROTECTED]

Reply via email to