Re: LispWorks Interface Builder
Hi Yuji
To use Interface Builder, you first need to understand the CAPI class
library.
Read the CAPI User Guide and browse the CAPI Reference Manual, then come
back and ask questions (you *will* have questions :-). CAPI is powerful,
but takes a while to get your head around[1].
When you bring up I.B., you get two windows - one with tabs (the
controller / builder) and a blank window (a prototype of what you've got
so far).
In the controller, the "LAYOUTS" tab shows you a graph of the GUI you
are composing. You select a CAPI class from the button bar at the
bottom, and an instance is attached to the current graph node. You can
click on nodes to make them "current".
The Menus tab is for composing menus for the GUI.
The Code tab shows you the CL code created thus far. Sometimes, you can
manually change the code in the Code tab and it will be reflected in the
prototype (and, sometimes, not :-).
Remember to hit "Refresh" on the prototype once in a while, to keep
things in synch.
I use I.B. to rough out my interfaces, then I save the code. (It appears
to save in a dribble file manner - your latest version of the GUI (/
Interface) is at the bottom, iirc).
Once I start annotating the code with actual callbacks, etc., I continue
to work only with the code and ignore I.B.
If you double-click on a graph node, you get a property sheet for the
"pane" (refer to CAPI documentation to understand each of the properties).
Here's a trivial example:
Click on layouts.
Click on column layout.
Click on Buttons.
Click on Push Button.
You should see a graph of Interface1->Column-Layout-1->Push-Button-1 and
the prototype should look like a small window containing a single button.
Double-click on the Push-Button-1 graph node. Scroll down to the "Text"
property and overwrite the text with "Hello". When you hit OK, the
prototype button should say Hello and the button will shrink-to-fit
around the text. (All of that behaviour can be controlled by adjusting
properties of the layout / button / etc).
Fool with it, look at the generated code. Look at the manuals. Ask more
questions.
pt
[1] The part that took me a LONG time to understand is that CAPI is a
class library (CLOS). You can create your own widgets by subclassing
CAPI widgets, then adding behaviour. Much of the power comes from that
aspect. Define-Interface is just a macro that helps you compose CAPI
widgets together into a whole. I.B. lets you define Define-Interfaces
and reminds you what doo-dads are available.
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html