11.01.2015 Views

CLIM 2 User Guide

CLIM 2 User Guide

CLIM 2 User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Generally, a black square is used to indicate a new topic in the description. Note the following about these<br />

definitions:<br />

Packages<br />

Unless otherwise specified, all symbols naming objects are in the clim package. Most of the example code<br />

have a clim: package qualifier but some do not. If you enter example code, be sure that the clim package<br />

is used or that the clim: qualifier is present. The clim-user package uses the clim package and also<br />

the common-lisp package, so all common-lisp and clim symbols can be referenced without qualifiers<br />

when the current package is clim-user. clim-user does not use excl (the package containing<br />

many of the Allegro CL extensions). The excl package has no symbol conflicts with clim-user so you<br />

can use excl when in clim-user if you wish.<br />

Keyword arguments<br />

In other Allegro CL manuals, keyword arguments are named with a keyword in formal argument lists and<br />

are referred to as ‘the value of the :xxx keyword argument’ in the text. In this manual, we use a different<br />

method. Keyword arguments do not have a preceding : in the argument list (but they do follow &key); and<br />

the argument is referred to in the text in argument notation (again, without a :). Thus for example:<br />

accept-from-string<br />

[Function]<br />

Arguments: type string &key view default default-type<br />

activation-gestures additional-activation-gestures<br />

delimiter-gestures additional-delimiter-gestures<br />

(start 0) end<br />

■ Reads the printed representation of an object of type type from string. This function is like<br />

accept, except that the input is taken from string, starting at the position start and ending at<br />

end. view, default, and default-type are as in accept.<br />

■ [...]<br />

In this example, there are many keyword arguments. One is start, which defaults to 0. If you want to<br />

specify a value for start in a call to accept-from-string, you would do it as follows:<br />

(accept-from-string symbol "ab var1" string :start 3)<br />

Type faces<br />

Type faces are used to distinguish between symbols naming functions and other operators, symbols naming<br />

other things (like constants, variables, etc.), printed forms, and examples.<br />

• Function and other operator names are printed in bold Courier.<br />

• Arguments (and other placeholders) are in slant Courier.<br />

• Symbols naming other things are printed in plain Courier. That face is thus used for<br />

constants (such as #\A and nil) and special symbols (such as *package*) and keywords<br />

and lambda-list keywords (such as :test and &optional, respectively).<br />

• Printed forms and examples are printed in Courier, typically with user input in plain and<br />

what the system prints in bold.<br />

• Longer examples sometimes are printed in a reduced size, so that all 80 characters in a line are<br />

printed on the same line.<br />

We have tried to be careful to break symbol names at a hyphen in the symbol name. Thus, drawrectangle<br />

will be broken at the hyphen or not at all.<br />

12 <strong>CLIM</strong> 2.2 <strong>User</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!