Search code examples
cocoalayoutcappuccino

How does Cappuccino manages to layout views like in Cocoa?


How does the layout support of Cappuccino work? For example the centering and the automatik resizing.


Solution

  • The autoresizing masks are more or less implemented in this method: http://github.com/280north/cappuccino/blob/master/AppKit/CPView.j#L987

    On a more conceptual level, all views in Cappuccino are absolutely positioned. By not relying on the browser to lay things out, we always know exactly where everything is, and can make decisions accordingly.