Clozure community,<br><br>Attached is a file (ccl-simple-view.lisp) that might be useful for anyone that's migrated from MCL to CCL, and has old MCL GUI code that they'd like to get running on CCL.<br><br>ccl-simple-view is a partial implementation of the GUI portion of MCL's specification for CCL. A copy of that spec is located <a href="http://mcl.googlecode.com/hg/Macintosh%20Common%20Lisp%20Ref.pdf">here</a>. The goal of the project is to allow Common Lisp task environments written for MCL to work with CCL, with little to no code modifications (no modifications being the ideal target). <br>
<br>ccl-simple-view is largely an extension of Clozure's easygui package, which in turn uses the Objective C bridge to interface with the Cocoa framework. <br><br>You'll find implementations of things like (make-instance 'window), (make-dialog-item ...), (with-focused-view ...), view-draw-contents, window-null-event-handler, paint-rect, get-string-from-user, etc.<br>
<br>This is only a partial implementation of the specification because only the pieces that are necessary to get the task environments written for Dr. Byrne's (Rice University) laboratory are currently implemented. That said, there are multiple task environments in the lab, using various pieces of MCL's original GUI spec, so I think that a good portion of the spec is implemented, or at least the commonly-used portion.<br>
<br>Enough of the spec is implemented that you can use MCL's original Interface Builder (I've tested this using RMCL on Snow Leopard), add various buttons/text/text entry fields/dropdowns, then print the source for the window and views, and then load that source code in CCL without changing anything.<br>
<br>However, there are portions of ccl-simple-view that I'm not entirely happy with yet, as they either don't implement the spec correctly, or the implementation has limitations / could be improved. For example, the view-(key|click)-event-handlers are present, but they don't have as much control over blocking/relaying events as they do in MCL. Also the implementation of window-null-event-handler could be improved, as it doesn't scale well to large (>50) numbers of visible windows.<br>
<br>But for the portion of the spec that is implemented, the code is tested and stable. So you may find it useful, either to load up old MCL GUI code, or possibly use as a Cocoa interface for new CCL GUI code (if you prefer the original MCL spec).<br>
<br>To be clear though, this code is being offered <i>without any warranty or support whatsoever</i>. But I hope still that this code is useful for the Clozure community.<br><br>-Clayton<br><br><br><br><br>