
The Window Tool Kit
activate-viewport viewport&key :activate-children
deactivate-viewport viewport
activate-viewport makes the specified viewport and all of its ancestors active. If the:activate-children keyword argument has a non-nil value, all of the viewport's descendants are also made active.
deactivate-viewport makes the specified viewport and all of its descendants inactive. The viewport viewport maintains its position in the display stack of its siblings. However, the viewport and its descendants do not appear on the screen until they are reactivated.
deactivate-viewport tries to deactivate a viewport that is already inactive, nothing happens.
activate-viewport tries to activate a viewport that is already active, nothing happens.
active-region-bitmap active-region
active-region-bitmap returns the bitmap to which the argument active-region is attached. If active-region is not attached to a bitmap, it returnsnil.
active-region-method active-region event-name
active-region-method accesses the method that is called when a mouse event occurs inside an active region or when the mouse enters or leaves an active region. The function returnsnil if no method is associated with the event.
:mouse-click,:mouse-transition,:mouse-moved,:mouse-enter-region, or:mouse-exit-region.
setf method for this function updates the appropriate method. If you set the value tonil, no method is called when the corresponding mouse event occurs.
:mouse-exit-region, the x-coordinate and y-coordinate arguments specify a position inside the active region. For:mouse-exit-region, the specified position lies outside the active region; it can also lie outside the bitmap.
active-region-mouse-documentation region
active-region-mouse-documentation returns a function that takes an active region as a single argument and returns the mouse documentation for a specified active region.
setf with this function to alter the mouse documentation associated with an active region.
active-region-p object
active-region-p tests whether its object argument is an active region. It is true if object is an active region.
active-region-user-data active-region
active-region-user-data returns the information that is specified in the:user-data keyword argument tomake-active-region.
setf with this function to alter the contents of the:user-data argument.
make-active-region
allocate-color
deallocate-color color-sequence
allocate-color allocates and returns a single entry in the system color map if a free entry exists. The returned entry will be in the range from 0 to(1- (color-map-size)) inclusive. If there are no more free entries in the color map,allocate-color returnsnil.
deallocate-color deallocates the specified color or color number previously allocated by the functionallocate-color.
deallocate-color can contain a single color or color number, or a sequence of either. If the color number is successfully deallocated, the color number is returned. If the color number has not been previously allocated and thus cannot be deallocated,nil is returned.
> (allocate-color) 22attach-active-region Function> (deallocate-color 22) 22
bitmap-active-regions Function
clear-bitmap-active-regions Function
attach-active-region bitmap active-region
detach-active-region active-region
bitmap-active-regions bitmap
clear-bitmap-active-regions bitmap
attach-active-region attaches an active region to a bitmap.detach-active-region detaches an active region from its bitmap.bitmap-active-regions returns a list of all the active regions that are attached to a bitmap.clear-bitmap-active-regions detaches all active regions that are attached to a bitmap.
detach-active-region is called with an active region that is not attached to a bitmap, nothing happens.
bitblt source-bitmap source-x source-y destination-bitmap destination-x destination-y width height operation&key :clipping-region :foreground :background :pixel-map
bitblt-position source-bitmap source-position destination-bitmap destination-position width height operation&key :clipping-region :foreground :background :pixel-map
bitblt-region source-bitmap source-region destination-bitmap destination-region operation&key :foreground :background :pixel-map
bitblt copies regions from one bitmap to another.bitblt-position is similar tobitblt, except that the locations in each bitmap are expressed as positions rather than as x- and y-coordinates.bitblt-region is similar tobitblt, except that the arguments explicitly specify the source and destination regions.:pixel-map keyword argument.
bitblt. The source-x and source-y arguments specify the x- and y-coordinates respectively of the region's origin. The width and height arguments specify the region's width and height respectively.bitblt-position. The source-position argument specifies the position of the region's origin. The width and height arguments specify the region's width and height respectively.bitblt-region.
bitblt. The destination-x and destination-y arguments specify the x- and y-coordinates respectively of the region's origin. The width and height arguments specify the region's width and height respectively.bitblt-position. The destination-position argument specifies the position of the region's origin. The width and height arguments specify the region's width and height respectively.bitblt-region.boole is applied to these three arguments: the operation argument, the value of the bit at the source bitmap position, and the value of the bit at the destination bitmap position.
boole-1.
:clipping-regionbitblt-region does not use this keyword option.
:foreground,:background:pixel-map keyword argument when source-bitmap has a single plane and destination-bitmap has multiple planes.
:pixel-map(expt 2 (bitmap-depth source-bitmap)) integer entries in the range from 0 to(expt 2 (bitmap-depth destination-bitmap)) inclusive. If possible, it should be an array of typesimple-vector to optimize mapping speed.
:pixel-map keyword argument or with the:foreground and:background arguments, the functionbitblt first determines the correct value for each source pixel in source-bitmap by using the mapping described by the:pixel-map keyword argument. It then combines the source pixel and destination pixel using the specified operation to determine the new destination pixel.
:pixel-map keyword argument requires per-pixel access, so mapping from a multiplane source-bitmap to any destination-bitmap is generally slow.
bitblt-region are different widths, the width of the region that is actually copied is the smaller of the two. Similarly, if the source-region and destination-region arguments have different heights, the height of the region that is copied is the smaller of the two.
bitmap-depth bitmap
bitmap-depth returns the depth, or number of planes, of the specified bitmap.
> (setq *bitmap1* (make-bitmap :width 10 :height 10)) #<Bitmap 10x10x1 E664EB>bitmap-height Function> (bitmap-depth *bitmap1*) 1
> (setq *bitmap2* (make-bitmap :width 10 :height 10 :depth (display-depth))) #<Bitmap 10x10x8 E67D0B>
> (bitmap-depth *bitmap2*) 8
bitmap-height bitmap
bitmap-width bitmap
bitmap-height returns the height of a bitmap.
bitmap-width returns the width of a bitmap.
setf with these functions. Increasing the width or height of a bitmap causes new area to appear at its boundaries. Decreasing the width or height can cause loss of data.
> (setq my-bitmap (make-bitmap :width 100 :height 200)) #<Bitmap 100x200x1 25F391>bitmap-foreground-pixel Function> (bitmap-height my-bitmap) 200
> (bitmap-width my-bitmap) 100
bitmap-background-pixel Function
bitmap-foreground-pixel bitmap
bitmap-background-pixel bitmap
bitmap-foreground-pixel returns the current foreground pixel value for the given bitmap. Any graphic or text output operations on the bitmap use thebitmap-foreground-pixel value if no other color is specified.
bitmap-background-pixel returns the current background pixel value for the given bitmap. Any graphic or text output operations on the bitmap use thebitmap-background-pixel value if no other color is specified.
setf with these functions to specify a new default foreground or background pixel for a bitmap.
> (bitmap-foreground-pixel *bitmap*) 0bitmap-output-stream-P Function> (bitmap-background-pixel *bitmap*) 7
> (setf (bitmap-foreground-pixel *bitmap*) 1) 1
> (bitmap-foreground-pixel *bitmap*) 1
bitmap-output-stream-p object
bitmap-output-stream-p tests whether its object argument is a bitmap output stream. It is true if object is a bitmap output stream.
> (bitmap-output-stream-p (make-bitmap-output-stream)) Tbitmap-p Function> (bitmap-output-stream-p 7) NIL
bitmap-p object
bitmap-p tests whether its object argument is a bitmap. It is true if object is a bitmap.
> (bitmap-p (make-bitmap :height 100 :width 200)) Tbitmap-user-data Function> (bitmap-p 7) NIL
bitmap-user-data bitmap
bitmap-user-data returns the information that is specified in the:user-data keyword argument tomake-bitmap andinitialize-bitmap.
setf with this function to alter the contents of the:user-data argument.
initialize-bitmap, make-bitmap
bitmap-value bitmap x y
bitmap-value returns the value of a bitmap's point at a given x-y coordinate.
bitmap-value returns the pixel value at the location in the bitmap specified by the x and y arguments. The returned pixel value is an integer in the range from 0 to(1- (expt 2 (bitmap-depth bitmap))) inclusive.
setf with this function to set the value of a point in a bitmap.
;; Create a 100x200 bitmap. > (setq bmp (make-bitmap :width 100 :height 200)) #<Bitmap 100x200x1 AEC25B>charblt Function;; Look at the value of a point. > (bitmap-value bmp 23 56) 0
;; Set the point to one. > (setf (bitmap-value bmp 23 56) 1) 1
;; Look at the value of that point. > (bitmap-value bmp 23 56) 1
charblt bitmap position font char&key :operation :foreground :background
stringblt bitmap position font string&key :operation :foreground :background :start :end
charblt paints a character image from a font onto a bitmap.
stringblt paints a string of character images from a font onto a bitmap.
find-font is called to find the font named by the string or symbol.
:operationboole to these three arguments: the:operation argument, the value of the font's bit, and the value of the destination bitmap position.
:operation keyword argument must either be a single boolean constant or a sequence of boolean constants of length equal to the depth of the destination bitmap; the default value is the boolean constantboole-1. This default value causes the bits of the font's bitmap to overwrite whatever was previously on the bitmap. If the value of the:operation argument is a sequence, the associated operation for each plane of the destination bitmap is used to combine the source pixel with the destination pixel.
:foreground,:background
stringblt, the:start and:end keyword arguments take integer values that specify offsets into the string. These arguments restrict the output operation to a substring of the original string:
:start keyword argument marks the beginning position of the substring. The default value is 0.:end keyword argument marks the position following the last element of the substring. The default value is the length of the string.:operation keyword argument.
stringblt cannot handle tabs and other characters that have an ambiguous print representation. It can handle newline and space characters.
bitblt
char-height char font
char-width char font
max-char-width font
char-height andchar-width return the height and width respectively of the specified character in the given font.
max-char-width returns the maximum character width that is allowed by the specified font.
clear-bitmap bitmap&optional region background
clear-bitmap clears a bitmap. That is, the value of every point in the bitmap is set to 0.
;; Create a 10x10 bitmap. > (setq btmp (make-bitmap :width 10 :height 10)) #<Bitmap 10x10x1 596D5D>color-available-p Function;; Put ones on the diagonal of the bitmap. > (dotimes (i 10) (setf (bitmap-value btmp i i) 1)) NIL
;; A point on the diagonal has a value of one. > (bitmap-value btmp 3 3) 1
;; A point not on the diagonal has a value of zero. > (bitmap-value btmp 3 2) 0
;; Clear a region of the bitmap. > (clear-bitmap btmp (make-region :x 2 :y 2 :height 3 :width 3)) #<Bitmap 10x10x1 596D5D>
;; Look at a diagonal point that was cleared. > (bitmap-value btmp 3 3) 0
;; Look at a diagonal point that was not cleared. > (bitmap-value btmp 9 9) 1
color-available-p &key :display
color-available-p checks whether the current display supports graphics and color functionality. If the display supports both graphics and color, this function returns the display depth and the color-map size respectively. Otherwise, it returns one of two sets of values:nil nilcolor-available-p cannot determine whether the server supports color.
:display keyword argument specifies the display used for Window Tool Kit interactions. It must be a string of one of the following forms:
"host"
"host:display-number"
DISPLAY.
> (color-available-p) 8 256color-map-size Function
color-map-size
color-map-size returns the total number of entries in the color map associated with the current system display.
color-map-size does not necessarily reflect the number of available entries in the system color map.
> (display-depth) 8color-registry-size Function> (color-map-size) 255
color-registry-size
color-registry-size returns the total number of entries that have already been allocated in the color registry.
color-registry-size does not necessarily reflect the number of used or unavailable entries in the system color map.
> (color-registry-size) 22copy-bitmap Function
copy-bitmap bitmap
copy-bitmap copies a bitmap.
;; Create a 100x200 bitmap. > (make-bitmap :height 100 :width 200) #<Bitmap 200x100x1 5D95EE>;; Make a copy of the bitmap. > (copy-bitmap *) #<Bitmap 200x100x1 5D9937>
store-bitmap
copy-font font new-name
copy-font copies a font and stores the new font in the font registry under the name new-name.
find-font is called to find the font named by the string or symbol.
> *default-font* #<Fixed-Width-Font ROMAN 4FB3CE>;; Create a copy of the default font. Call it "NEWROMAN". > (copy-font *default-font* 'newroman) #<Fixed-Width-Font NEWROMAN 5DA2C3>
find-font, store-font
current-mouse-cursor
current-mouse-cursor returns the mouse cursor object that is currently tracking the mouse on the display screen.
setf with this function to modify the mouse cursor object that is tracking the mouse.
make-mouse-cursor
*current-screen*
*current-screen* contains a Liquid Common Lisp screen structure that holds all of the machine-specific hooks.
*default-font*
*default-font* is a font that is used by default by the functionsmake-bitmap-output-stream andmake-window.
*default-font* is the font whose name is"ROMAN".
;; Create a bitmap output stream. ;; Do not give an :initial-font keyword argument. > (make-bitmap-output-stream :width 100 :height 200) #<Output-Stream to #<Bitmap 100x200x1 1A45D8> 1A49E0>;; Check to see that the stream's font is *default-font*. > (eq (stream-current-font *) *default-font*) T
find-font
default-font-code-limit Constant
default-font-baseline
default-font-code-limit
default-font-height
default-font-baseline is the default value for the baseline height of every character in a font.default-font-height is the default value for the height of every character in a font.default-code-limit is the default value for the number of characters in a font.
*default-pop-up-menu-font*
*default-pop-up-menu-font* is a font that the Window Tool Kit uses by default to display pop-up menus.
setq to change the value of this variable, whose initial value is the font returned by the expression(find-font "ITALIC").
delete-color name
delete-color deletes a previously registered color entry of the specified name from the color registry and returnsnil.
> (register-color "PINK" :red max-mic-value
:green (round (* max-mic-value .4))
:blue (round (* max-mic-value .65)))
"PINK"
> (delete-color "PINK")
"PINK" unregistered.
NIL
delete-font Function
delete-font font
delete-font deletes a font from the font registry.
find-font is called to convert the argument to a font.
find-font no longer recognizes its name.
delete-root-viewport root-viewport
delete-root-viewport deletes the specified viewport. It returnsnil.
leave-window-system.
leave-window-system
display-depth
display-depth returns the number of planes in the current system screen display.
> (display-depth) 8draw-circle Function
draw-circle bitmap center radius&key :width :operation :foreground :start-theta :angle
:width defines the line width that is used for drawing the line segments and circles. The border is drawn so that its outer edge is at the specified radius; the width must be less than or equal to the radius. If the:width keyword argument is omitted ornil, the default value is 1.
:operation and:foreground are as fordraw-line.
:start-theta and:angle correspond to the arguments angle1 and angle2 of the internal CLX functiondraw-arc, whichdraw-circle calls to draw the circle. The angles are signed integers in radians, with positive indicating counterclockwise motion and negative indicating clockwise motion. The start of the arc is specified by:start-theta, and the path and extent of the arc is specified by:angle, relative to the start of the arc. If the magnitude of:angle is greater than 360 degrees, it is truncated to 360 degrees. The default value of:start-theta is 0.0; the default value of:angle is(* 2 pi)).
draw-line bitmap start end&key :width :operation :foreground
draw-polyline bitmap positions&key :width :operation :foreground
draw-polypoint bitmap positions&key :width :operation :foreground
draw-line draws a line segment from the position start to the position end.draw-polyline takes the sequence of positions positions and connects each adjacent pair.draw-polypoint takes the sequence of positions positions and draws a dot at each one.:widthdraw-polypoint, the:width argument specifies the diameter of the dot. If the:width keyword argument is omitted ornil, the default value is 1.
:operationboole-1; this default value causes the values that are being written onto the bitmap to overwrite whatever was already on the bitmap.
:foregroundnil, the default value is the default foreground of the specified bitmap.
:foreground or the:operation argument, but not both.
draw-rectangle bitmap x y&key :width :height :corner-x :corner-y :operation :foreground
draw-rectangle draws a rectangle on the specified bitmap.
draw-rectangle::width,:heightnil, its default value is 0.
:corner-x,:corner-y
:width and:height or the keyword arguments:corner-x and:corner-y, but not both pairs.
:operationboole-1.
:foreground(1- (expt 2 (bitmap-depth bitmap))) inclusive.
:foreground or the:operation argument, but not both. If you do not specify either keyword argument, the default foreground pixel of bitmap is used.
draw-rectangle does not accept a foreground color; it does accept a boolean constant for the:operation keyword argument.
> (setq *window*
(make-window :width 100 :height 100 :depth (display-depth)))
#<Window 100x100x8 at (0,0) E95ED3>
> (draw-rectangle
*window* 10 10 :width 20 :height 20 :foreground "RED")
NIL
> (draw-rectangle
*window* 10 30 :corner-x 30 :corner-y 50 :foreground "GREEN")
NIL
draw-circle, draw-line, draw-polyline, draw-polyline
expose-viewport viewport
hide-viewport viewport
expose-viewport moves a viewport to the top of its sibling stack. Nothing happens if the viewport is already at the top of the stack.
hide-viewport moves a viewport to the bottom of its sibling stack. Nothing happens if the viewport is already at the bottom of the stack.
expose-viewport cannot place the viewport on the screen unoccluded because it can be occluded by its children, or because its parent can be occluded.
viewport-children
find-color&key :color :mdc :red :green :blue
find-color-number&key :color :mdc :red :green :blue
find-color returns the color string that is associated with a color.
find-color-number returns the color number that is associated with a color. If the specified color is not registered,nil is returned.
:color
:mdcfind-mdc.
:red,:green,:bluemin-mic-value tomax-mic-value inclusive.
> (find-color :color "RED") "RED"> (find-color :color 1) "RED"
> (find-color-number :color "RED") 1
> (find-color-number :red max-mic-value :blue min-mic-value :green min-mic-value) 1
> (find-color-number :mdc (find-mdc :color "RED")) 1
find-mdc, min-mic-value, max-mic-value
find-font name
find-font finds and returns the font of the specified name. It returnsnil if it cannot find a font with that name.
"ROMAN","BOLD-ROMAN", and"ITALIC".
copy-font, delete-font, load-font, rename-font, store-font
find-mdc&key:color :red :green :blue
find-mic&key:color :mdc
find-mdc returns the machine-dependent color that is associated with a color. If the specified color is not registered and the keyword arguments:red,:green, and:blue are given, a new machine-dependent color is generated; otherwise,nil is returned.
find-mic returns the red, green, and blue values that are associated with a color. If the specified color is not registered,nil is returned.
:color keyword argument is a string, symbol, or color number.
find-mdc, the:red,:green, and:blue keyword arguments must be in the appropriate range frommin-mic-value tomax-mic-value inclusive.
find-mic, the:mdc keyword argument is a previously registered machine-dependent color obtained with the functionfind-mdc.
> (find-mdc :color "RED") #(255 0 0)> (find-mdc :red max-mic-value :blue min-mic-value :green min-mic-value) #(255 0 0)
> (find-mic :color "RED") 65535 0 0
> (find-mic :mdc (find-mdc :color "RED")) 65535 0 0
min-mic-value, max-mic-value
find-root-viewport-from-viewport viewport
find-root-viewport-from-viewport returns the root viewport that is the ancestor of the specified viewport or window.
follow-mouse min-x min-y max-x max-y function
follow-mouse tracks the movement of the mouse in the specified area during the execution of the specified function.
font-baseline font
font-height font
font-fixed-width font
font-baseline returns the baseline height of a font, which is the baseline height of every character in the font.font-height returns the height of a font, which is the height of every character in the font.font-fixed-width returns the width of every character in a font if the font is a fixed-width font; otherwise, it returnsnil.find-font is called to find the font named by the string or symbol.
default-font-baseline, default-font-height, find-font
font-bitmap font
font-code-limit font
font-name font
font-bitmap returns the underlying bitmap in which a font stores its character images.font-code-limit returns the number of character images that can be stored in a font.font-name returns the name of a font.find-font is called to find the font named by the string or symbol.
default-font-code-limit, find-font, rename-font
fontp object
fontp tests whether its object argument is a font. It is true if object is a font.
> (fontp *default-font*) Tget-screen-point-from-user Function> (fontp 7) NIL
get-screen-point-from-user &key :function :mouse-documentation
get-screen-point-from-user prompts for a screen position. It returns the x- and y-location that is specified by a right click, if any. You can abort the operation by pressing the middle mouse button; in this case, the function returnsnil.
:function keyword argument is a function that gets called with four arguments every time that the user moves the mouse::mouse-documentation keyword argument is a string or a function that takes an active region as a single argument and returns a string. The string is printed in the who window and describes what actions the mouse can perform when in the given active region. If you do not specify a value for this argument, a default documentation string is used.
get-screen-region-from-user &key :minimum-width :minimum-height &allow-other-keys
get-screen-region-from-user prompts for a screen region. It returns the region that was selected, if any. You can abort the operation by pressing the middle mouse button; in this case, the function returnsnil.
:minimum-width and:minimum-height keyword arguments specify the minimum width and height of the region respectively.
make-region.
make-region
initialize-bitmap bitmap&key :width :height :user-data :depth :foreground :background
initialize-bitmap takes a bitmap structure and initializes or reinitializes it to have the shape and size described by the specified arguments. This function is useful whenever you create a new bitmap type that includes the Window Tool Kit bitmap structure and you wish to initialize the portion of it defined by the Window Tool Kit.
initialize-bitmap::width,:height
:user-data
:depth
:foreground,:background:foreground keyword argument is the color number of the registered color"BLACK"; the default value of the:background keyword argument is the color number of the registered color"WHITE".
> (defstruct (my-bitmap (:include bitmap)
(:constructor new-my-bitmap))
my-new-slot ; This is a new slot.
)
MY-BITMAP
> (defun make-my-bitmap (&key width height my-new-slot-value)
(let ((new-my-bitmap
(new-my-bitmap :my-new-slot my-new-slot-value)))
(initialize-bitmap new-my-bitmap :width width
:height height)))
MAKE-MY-BITMAP
make-bitmap
initialize-viewport viewport &key :x :y :width :height :parent :activate :bitmap :bitmap-x :bitmap-y :depth :user-data :pixel-map :viewport-foreground :viewport-background
initialize-viewport takes a viewport structure and initializes or reinitializes it to have the shape and size described by the specified arguments. This function is useful whenever you create a new viewport type that includes the Window Tool Kit viewport structure and you wish to initialize the portion of it defined by the Window Tool Kit.
initialize-viewport::x,:y
:width,:heightnil, its default value is 0.
:width and:height if:bitmap is omitted ornil.
:parent
:activatenil, the viewport is active. If it is specified andnil, the viewport is inactive.
:bitmap(display-depth). If this keyword argument is omitted ornil, a new bitmap is created of depth(display-depth).
:bitmap-x,:bitmap-ynil, its default value is 0.
:depth
:user-data
:pixel-map:pixel-map is the value of the foreground pixel, and the second entry is the value of the background pixel. You can use this keyword argument instead of the keyword arguments:viewport-foreground and:viewport-background.
:viewport-foreground,:viewport-background:viewport-foreground keyword argument is the color number of the registered color"BLACK"; the default value of the:viewport-background keyword argument is the color number of the registered color"WHITE".
make-viewport
initialize-window window &key :x :y :width :height :inside-x :inside-y :inside-width :inside-height :inner-border-width :outer-border-width :user-data :bitmap :bitmap-x :bitmap-y :depth :parent :scroll :vertical-scroll :horizontal-scroll :calculate-vertical-scroll-ratio :calculate-horizontal-scroll-ratio :initial-font :operation :title :title-font :foreground :background
initialize-window takes a window structure and initializes or reinitializes it to have the shape and size described by the specified arguments. This function is useful whenever you create a new window type that includes the Window Tool Kit window structure and you wish to initialize the portion of it defined by the Window Tool Kit.
initialize-window::x,:ynil, its default value is 0.
:width,:heightnil, its default value is the width or height of the root viewport.
:inside-x,:inside-ynil and the default values for:inner-border-width and:outer-border-width are used, its default value is 3.
:inside-width,:inside-heightnil, its default value is the inside width or height of the root viewport minus the combined widths of either the vertical or the horizontal borders of the specified window.
:user-data
:inner-border-width,:outer-border-width:inner-border-width is omitted ornil, its default value is 1. If:outer-border-width is omitted ornil, its default value is 2.
:bitmap(display-depth). If this keyword argument is omitted ornil, a new bitmap is created of depth(display-depth).
:bitmap-x,:bitmap-ynil, its default value is 0.
:depth
:parentt, the new window is a child of the current root viewport; this value is the default.nil, the new window is a new root viewport.:scrollt, the window can have scroll bars when the dimensions of the window's bitmap are greater than those of its viewport. Thus, when the bitmap is wider than the viewport, a scroll bar appears on the window's right border; when the bitmap is longer than the viewport, a scroll bar appears on the window's bottom border. If this argument is omitted ornil, the window is made without scroll bars. Do not give this keyword any value other thant ornil.
:vertical-scroll,:horizontal-scrollnil, its default value is the default method for vertical or horizontal scrolling. The default methods move the window's bitmap clipping region over the window's bitmap to a degree that corresponds to the movement of the bubble on the scroll bar.
:calculate-vertical-scroll-ratio,:calculate-horizontal-scroll-rationil. If either keyword argument is omitted ornil, its default value is the default method for calculating the vertical or horizontal scroll ratio. The default method defines the current scroll ratio as that of the degree to which the window has been scrolled to the maximum degree to which it can be scrolled; thus, if a window has been scrolled to one-third of the possible horizontal scrolling distance, the horizontal scroll ratio is 1/3.
setf with these keyword arguments to set the respective scroll ratios.
:initial-fontnil, its default value is the value of the variable*default-font*.
:operationboole. If this argument is omitted ornil, its default value is the value of the constantboole-xor.
:titlenil, the window has no title.
:title-fontnil, its default value is the value of the:initial-font keyword argument.
:foreground,:background:foreground keyword argument is the color number of the registered color"BLACK"; the default value of the:background keyword argument is the color number of the registered color"WHITE".
:foreground,:background, and:operation, any drawing function that you invoke will use the window's foreground and background colors, not the values you specified, as defaults, unless you specify a color to the drawing function. In addition, the drawing function will assume a default operation ofboole-1.
make-window
initialize-windows &key :height :width :screen-x :screen-y :label :no-wholine :icon-x :icon-y :icon-image :icon-label :display
initialize-windows initializes the Window Tool Kit.
initialize-windows to initialize the window system.
initialize-windows::height,:width
:screen-x,:screen-y
:label
:no-wholinenil value, the primary root viewport is created without a who window. If the value of this keyword argument isnil, the primary root viewport is created with a who window for displaying information about the state of the mouse; this value is the default.
make-new-who-window creates a new who window.
:icon-x,:icon-y
:icon-image
:icon-label
:display
"host"
"host:display-number"
DISPLAY.
Window system already initialized
disksave is invoked, the window environment is temporarily suspended. Once thedisksave function has saved the Lisp image on disk, the windows on the running Lisp image are restored automatically to the state they were in before thedisksave function call. To restore the state of the window environment in the newly saved image, callinitialize-windows ored with no arguments. See Chapter 1, "Restoring windows in a saved image" for more information.
> (initialize-windows :display "applesauce:0")
leave-window-system, make-new-who-window
keyboard-input &optional root-viewport
keyboard-input returns the stream that receives keyboard input. Any character typed at the keyboard is sent to the mouse input stream that is the value of this function.
setf with this function to change the stream that receives keyboard input; the second argument tosetf must be a mouse input stream. By default,(setf (keyboard-input)) sets the keyboard input stream for the current root viewport. Use the root-viewport argument to change the keyboard input stream for a specific root viewport. However, if the stream that you specify as a second argument tosetf is also a window and you do not supply a root-viewport argument, the window's root viewport is used. You can set the value ofkeyboard-input to any stream or window, even if the root viewport for the stream or window is different from the root-viewport argument.
mouse-input.
leave-window-system
leave-window-system exits the Window Tool Kit.
leave-window-system, you cannot return to it. If you wish to use the Window Tool Kit after calling this function, you must set up new windows by invokinged orinitialize-windows.
initialize-windows
listen-any &optional mouse-input-stream
listen-any is true if a character or mouse event structure can be read from the given mouse input stream; otherwise, it is false.
nil, the mouse input stream that is the value of the functionmouse-input is used. If the value of the mouse-input-stream argument is non-nil, the mouse input stream that is the value of the functionkeyboard-input is used.
keyboard-input, mouse-input, peek-any, read-any, read-any-no-hang
load-bitmap file-name
store-bitmap bitmap file-name
load-bitmap reads in a bitmap from the specified file and returns the bitmap.
store-bitmap stores a bitmap in the specified file.
;; Create a 10x10 bitmap with a random value at each point. > (setq bitmap (make-bitmap :width 10 :height 10)) #<Bitmap 10x10 4B3F2B>> (dotimes (i 10) (dotimes (j 10) (setf (bitmap-value bitmap i j) (random 2)))) NIL > (progn ;; Store the bitmap in a file named "temp" (store-bitmap bitmap "temp") ;; Read the bitmap back in (setq new-bitmap (load-bitmap "temp"))) #<Bitmap 10x10 4B65BB>
;; Print a message if the two bitmaps differ at any point. > (dotimes (i 10) (dotimes (j 10) (if (/= (bitmap-value bitmap i j) (bitmap-value new-bitmap i j)) (format t "values differ at ~D ~D~%" i j)))) NIL
copy-bitmap
load-color-registry pathname &optional destructive-load-p
store-color-registry pathname
load-color-registry loads the color entries from the file specified by the pathname argument. The color entries must have been previously stored by the functionstore-color-registry.
store-color-registry stores the color registry entries in the file specified by the pathname argument.
load-color-registry has a non-nil value, the current system is reinitialized before the color entries in the specified file are loaded.
> (store-color-registry "colreg") NILload-font Function> (load-color-registry "colreg") NIL
load-font font-name&key :foreign-font-type
store-font font file-name
load-font loads and returns the specified font. The type of font that is loaded depends on whether the Window Tool Kit has been initialized and on the value of the:foreign-font-type keyword argument.
store-font stores a font in the specified file.
load-font is invoked, it looks first for the X11 font specified by the font-name argument. If it cannot find such a font, the function searches for a Window Tool Kit font file. If neither type of font is available, an error is signaled.
:foreign-font-type keyword argument has a non-nil value,load-font attempts to load an X11 font even when the Window Tool Kit is not initialized.
(load-font "-X-font" :foreign-font-type t)
:foreign-font-type keyword argument isnil and the Window Tool Kit is not initialized,load-font interprets the font-name argument as a pathname for a file containing a Window Tool Kit font. It reads the file and returns the font. The default value of this argument isnil.
store-font must be a font, a string, or a symbol. If the argument is a string or a symbol, the functionfind-font is called to find the font named by the string or symbol. The information stored bystore-font includes the font's name.
load-font::foreign-font-type
:foreign-font-name
copy-font, find-font
make-active-region region&key :bitmap :mouse-click :mouse-transition :mouse-moved :mouse-enter-region :mouse-exit-region :mouse-documentation :user-data
make-active-region creates an active region for the specified region; as an option it can attach that active region to a bitmap.
:bitmap keyword argument.
make-active-region::bitmapnil, the active region is not attached to any bitmap. Later it can be attached to a bitmap by using the functionattach-active-region.
:mouse-click,:mouse-transition,:mouse-moved,:mouse-still,:mouse-enter-region,:mouse-exit-region
nil, no method is associated with the mouse event, and no function is called when the mouse event occurs inside the created active region.
:mouse-exit-region, the x-coordinate and y-coordinate arguments specify a position inside the active region. For:mouse-exit-region, the specified position lies outside the active region; it can also lie outside the bitmap.
:mouse-documentation
:user-data
make-active-region are supported for compatibility with previous releases of Liquid Common Lisp::mouse-left-down,:mouse-left-up,mouse-middle-down,:mouse-middle-up,:mouse-right-down, and:mouse-right-up.
attach-active-region
make-bitmap&key :width :height :user-data :depth :foreground :background
make-bitmap creates a bitmap.
make-bitmap::width,:height
:user-data
:depth
:foreground keyword argument is the color number of the registered color"BLACK"; the default value of the:background keyword argument is the color number of the registered color"WHITE".
> (make-bitmap :height 100 :width 200) #<Bitmap 200x100x1 856EE6>make-bitmap-output-stream Function
make-bitmap-output-stream &key :bitmap :width :height :operation :initial-font
make-bitmap-output-stream creates a bitmap output stream. The bitmap output stream can be attached to an already existing bitmap, or it can be attached to a new bitmap created by this function.
make-bitmap-output-stream::bitmap(display-depth). If this keyword argument is omitted ornil, a new bitmap is created of depth 1.
:width,:height
:operationboole-1; otherwise, the default operation isboole-xor.
:initial-fontfind-font is called to find the font named by the string or symbol. The default value is the value of*default-font*.
;; Create a 100x200 bitmap, and attach a bitmap output stream to ;; that bitmap. > (make-bitmap-output-stream :width 100 :height 200) #<Output-Stream to #<Bitmap 100x200x1 854AF5> 854EFD>;; Check that the stream's current font is *default-font*. > (eq (stream-current-font *) *default-font*) T
;; Create another 100x200 bitmap. > (setq btmp (make-bitmap :width 100 :height 200)) #<Bitmap 100x200x1 85603A>
;; Create a bitmap output stream that writes onto that bitmap. > (make-bitmap-output-stream :bitmap btmp) #<Output-Stream to #<Bitmap 100x200x1 85603A> 85646A>
find-font
make-boole-op-sequence planes background foreground&key :mask :op-sequence
make-boole-op-sequence returns a sequence of boolean constants that are equivalent to the combination of the color arguments background and foreground and either of the keyword arguments:mask or:op-sequence. The sequence that is returned can be given as an operation sequence to other graphics output functions.
:mask or:op-sequence, but not both.:mask(1- (expt 2 planes)) inclusive. A 1 in any bit position of the mask indicates that the corresponding plane should be affected; a 0 indicates that the corresponding plane should not be affected.
:op-sequence:op-sequence is the boolean constantboole-1.
make-boole-op-sequence is useful when graphic or text output is drawn by using a mix of colors and boolean operations or by using a mix of colors and masking.
> (make-boole-op-sequence (display-depth)
(find-color-number :color "BLACK")
(find-color-number :color "WHITE")
:mask 1)
#(5 3 3 3 3 3 3 3)
> (make-boole-op-sequence (display-depth)
(find-color-number :color "BLACK")
(find-color-number :color "WHITE")
:op-sequence boole-1)
#(5 5 5 0 0 0 0 0)
> (setq *op-sequence*
(make-boole-op-sequence (display-depth)
(find-color-number :color "BLACK")
(find-color-number :color "WHITE")
:op-sequence
(list boole-1 boole-1 boole-xor
boole-xor boole-xor boole-xor
boole-clr boole-clr)))
#(5 5 6 3 3 3 0 0)
> (draw-line *window*
(make-position 0 0)
(make-position 100 100) :operation *op-sequence*)
NIL
make-mouse-cursor Functionmaximum-cursor-height Function
make-mouse-cursor bitmap&key :x-offset :y-offset :operation
maximum-cursor-height
maximum-cursor-width
make-mouse-cursor creates a mouse cursor object.
maximum-cursor-height andmaximum-cursor-width are hardware constraints on the maximum height and width respectively of a mouse cursor.
make-mouse-cursor is a bitmap that contains an image of the cursor.
make-mouse-cursor::x-offset,:y-offsetnil, the default value is 0.
:operationboole-1.
(bitmap-height bitmap) must be less than or equal tomaximum-cursor-height.
(bitmap-width bitmap) must be less than or equal tomaximum-cursor-width.
make-mouse-cursor and the constantsmaximum-cursor-height andmaximum-cursor-width are Liquid extensions to Common Lisp.
current-mouse-cursor
make-mouse-input-stream&key :queue-mouse-events-p :viewport
make-mouse-input-stream creates a mouse input stream. A mouse input stream is identical to a Common Lisp input stream except that a mouse input stream can queue both characters and mouse event structures.
make-mouse-input-stream::queue-mouse-events-pnil, which means that only characters are queued on the newly created mouse input stream.
:viewportnil, the mouse input stream is associated with the root viewport.
listen-any, mouse-input-stream-queue-mouse-events-p, peek-any, read-any, unread-any
make-new-who-window&key :parent :x :y :width :height :border-width
make-new-who-window makes a new who window.
make-new-who-window::parent
t, the new window is the child of the current root viewport. This value is the default.nil, the new who window has no parent and is a top-level window on the screen.:x,:y:parent keyword argument isnil, the position specified is relative to the screen.
:width,:height
:border-width
make-pop-up-menu choice-list&optional default-value font foreground background
make-pop-up-menu creates a pop-up menu object.
pop-up-menu-choose displays the pop-up menu. If chosen, the element is returned as the value ofpop-up-menu-choose.
pop-up-menu-choose is the cdr of the cons.
nil.
*default-pop-up-menu-font* specifies the default font.
*default-pop-up-menu-font*, pop-up-menu-choose
make-position&optional x y
make-position creates a position whose coordinates are specified by the x and y arguments.
> (make-position) #<Position (0,0) 855C2D>make-region Function> (make-position 100 200) #<Position (100,200) 855C3E>
make-region&key :region :x :y :width :height :corner-x :corner-y
make-region creates a new region.
:regionmake-region.
:x,:y
:width,:height
:corner-x,:corner-y
make-viewport&key :x :y :width :height :parent :activate :bitmap :bitmap-x :bitmap-y :depth :user-data :pixel-map :viewport-foreground :viewport-background
make-viewport creates a viewport. The viewport is attached to an already existing bitmap or to a newly created bitmap.
make-viewport::x,:y
:width,:heightnil, its default value is 0.
:width and:height if:bitmap is omitted ornil.
:parent
:activatenil, the viewport is active. If it is specified andnil, the viewport is inactive.
:bitmap(display-depth). If this keyword argument is omitted ornil, a new bitmap is created of depth(display-depth).
:bitmap-x,:bitmap-ynil, its default value is 0.
:depth
:user-data
:pixel-map:pixel-map is the value of the foreground pixel, and the second entry is the value of the background pixel. You can use this keyword argument instead of the:viewport-foreground and:viewport-background keyword arguments.
:viewport-foreground,:viewport-background:viewport-foreground keyword argument is the color number of the registered color"BLACK"; the default value of the:viewport-background keyword argument is the color number of the registered color"WHITE".
;;; To run this example, you must have already initialized the ;;; Window Tool Kit. ;; Create a bitmap and a viewport onto that bitmap. > (make-viewport :width 100 :height 200) #<Viewport 100x200x1 at (0,0) onto #<Bitmap 100x200x1 85516A> 855572> #<Bitmap 100x200x1 85516A>make-window Function;; Create another bitmap. > (setq btmp (make-bitmap :width 100 :height 200)) #<Bitmap 100x200x1 85560C>
;; Create a viewport onto that bitmap. Note that the bitmap ;; is returned as the second value. > (make-viewport :bitmap btmp) #<Viewport 100x200x1 at (0,0) onto #<Bitmap 100x200x1 85560C> 855A2A> #<Bitmap 100x200x1 85560C>
make-window&key :x :y :width :height :inside-x :inside-y :inside-width :inside-height :user-data :inner-border-width :outer-border-width :bitmap :bitmap-x :bitmap-y :depth :parent :scroll :vertical-scroll :horizontal-scroll :calculate-vertical-scroll-ratio :calculate-horizontal-scroll-ratio :initial-font :operation :title :title-font :activate:foreground :background
make-window creates and returns a window.
make-window::x,:ynil, its default value is 0.
:width,:heightnil and the value of the:scroll keyword argument isnil, the default size is the size of the root viewport's inside region; if the value of:scroll ist, the default size is the size of the underlying bitmap. Thus, to make a scrollable window fit in the root viewport, you must explicitly specify its dimensions.
:inside-x,:inside-ynil and the default values for:inner-border-width and:outer-border-width are used, its default value is 3.
:inside-width,:inside-heightnil, its default value is the inside width or height of the root viewport minus the combined widths of either the vertical or the horizontal borders of the specified window.
:user-data
:inner-border-width,:outer-border-width:inner-border-width is omitted ornil, its default value is 1. If:outer-border-width is omitted ornil, its default value is 2.
:bitmap(display-depth). If this keyword argument is omitted ornil, a new bitmap is created of depth(display-depth).
:bitmap-x,:bitmap-ynil, its default value is 0.
:depth
:parentt, the new window is a child of the current root viewport; this value is the default.nil, the new window is a new root viewport.:scrollt, the window can have scroll bars when the dimensions of the window's bitmap are greater than those of its viewport. Thus, when the bitmap is wider than the viewport, a scroll bar appears on the window's right border; when the bitmap is longer than the viewport, a scroll bar appears on the window's bottom border. If this argument is omitted ornil, the window is made without scroll bars. Do not give this keyword argument any value other thant ornil.
nil, its default value is the default method for vertical or horizontal scrolling. The default methods move the window's bitmap clipping region over the window's bitmap to a degree that corresponds to the movement of the bubble on the scroll bar.
:calculate-vertical-scroll-ratio,:calculate-horizontal-scroll-rationil. If either keyword argument is omitted ornil, its default value is the default method for calculating the vertical or horizontal scroll ratio. The default method defines the current scroll ratio as that of the degree to which the window has been scrolled to the maximum degree to which it can be scrolled; thus, if a window has been scrolled to one-third of the possible horizontal scrolling distance, the horizontal scroll ratio is 1/3.
setf with these keyword arguments to set the respective scroll ratios.
:initial-fontnil, its default value is the value of the variable*default-font*.
:operationboole. If this argument is omitted ornil, its default value is the value of the constantboole-1.
:titlenil, the window has no title.
nil, its default value is the value of the:initial-font keyword argument.
:activatenil, the viewport is active; if it isnil, the viewport is inactive.
:foreground,:background:foreground keyword argument is the color number of the registered color"BLACK"; the default value of the:background keyword argument is the color number of the registered color"WHITE".
:foreground,:background, and:operation, any drawing function that you invoke will use the window's foreground and background colors, not the values you specified, as defaults, unless you specify a color to the drawing function. In addition, the drawing function will assume a default operation ofboole-1.
;;; To run this example, you must have already initialized the ;;; Window Tool Kit. > (setq w (make-window :width 100 :height 200 :title "hello")) #<Window 100x200x1 at (0,0) 8D1FF3>> (windowp w) T
window-vertical-scroll-ratio, window-horizontal-scroll, window-calculate-vertical-scroll-ratio, window-calculate-horizontal-scroll-ratio
map-color-registry function
map-color-registry iterates over the color entries in the color registry and applies the specified function to each entry.
> (map-color-registry
#'(lambda (color-name color-number red green blue)
(format t "~S~20T~A red: ~A, green: ~A, blue: ~A~%"
color-name color-number red green blue)))
"YELLOW" 5 red: 65535, green: 65535, blue: 0
"BLACK" 0 red: 0, green: 0, blue: 0
"WHITE" 7 red: 65535, green: 65535, blue: 65535
"CYAN" 4 red: 0, green: 65535, blue: 65535
"BLUE" 3 red: 0, green: 0, blue: 65535
"RED" 1 red: 65535, green: 0, blue: 0
"MAGENTA" 6 red: 65535, green: 0, blue: 65535
"GREEN" 2 red: 0, green: 65535, blue: 0
NIL
map-fonts Function
map-fonts function
map-fonts iterates over the fonts in the font registry and applies the specified function to each entry.
> (map-fonts #'(lambda (fontname font)
(format t "~S~20T~A~%" fontname font)))
"ROMAN" #<Fixed-Width-Font ROMAN C00E3A46>
"ITALIC" #<Fixed-Width-Font ITALIC C00E679E>
"BOLD-ROMAN" #<Fixed-Width-Font BOLD-ROMAN C00E517E>
NIL
max-mic-value Constant
max-mic-value
min-mic-value
max-mic-value is the maximum value for specifying the color intensity of red, green, or blue when registering a color or setting a color in the color map.
min-mic-value is the minimum value for specifying the color intensity of red, green, or blue when registering a color or setting a color in the color map.
max-mic-value, the resulting color is white. If red, green, and blue are each set tomin-mic-value, the resulting color is black. The value ofmin-mic-value is 0, and the value ofmax-mic-value is 65535.
> max-mic-value 65535menu-mouse-buttons Function> min-mic-value 0
menu-mouse-buttons
menu-mouse-buttons returns a list of keywords that indicate which mouse buttons select menu items.
menu-mouse-buttons is(:left :middle :right).
setf with this function to set the mouse buttons that select menu items.
mouse-buttons
mouse-x
mouse-y
mouse-buttons returns an integer in the range 0 to 7. This integer encodes the mouse buttons that are currently depressed.
mouse-x andmouse-y return the current x- and y-coordinates of the mouse. These positions are relative to the root viewport.
mouse-x andmouse-y return coordinates of the mouse relative to the current root viewport.
mouse-buttons.
mouse-buttons, *mouse-x*, *mouse-y*, mouse-event-buttons, mouse-event-x, mouse-event-y, move-mouse
*mouse-buttons*
*mouse-x*
*mouse-buttons* contains an integer in the range 0 to 7. This integer encodes the mouse buttons that are currently depressed.
*mouse-x* and*mouse-y* contain the current x- and y-coordinates of the mouse. These positions are relative to the root viewport.
mouse-buttons,mouse-x, andmouse-y in most instances.
mouse-buttons, mouse-event-buttons, mouse-event-x, mouse-event-y, mouse-x, mouse-y, move-mouse
mouse-cursor-x-offset Function
mouse-cursor-y-offset Function
mouse-cursor-operation Function
mouse-cursor-bitmap mouse-cursor-object
mouse-cursor-x-offset mouse-cursor-object
mouse-cursor-y-offset mouse-cursor-object
mouse-cursor-operation mouse-cursor-object
mouse-cursor-bitmap returns a mouse cursor object's bitmap.mouse-cursor-x-offset returns a mouse cursor object's x-offset.mouse-cursor-y-offset returns a mouse cursor object's y-offset.mouse-cursor-operation returns the boolean constant that is used to write the mouse cursor object onto the display screen.setf with these functions to modify a mouse cursor object.
mouse-cursor-p object
mouse-cursor-p tests whether its object argument is a mouse cursor object. It is true if object is a mouse cursor object.
*mouse-leaves-window-system* Variable
*mouse-enters-window-system*
*mouse-leaves-window-system*
*mouse-enters-window-system* contains a list of functions to be called whenever the mouse enters the root viewport.
*mouse-leaves-window-system* contains a list of functions to be called whenever the mouse leaves the root viewport.
mouse-event-p object
mouse-event-p tests whether its object argument is a mouse event structure. It is true if object is a mouse event structure.
mouse-event-char mouse-event
mouse-event-x mouse-event-structure
mouse-event-y mouse-event-structure
mouse-event-buttons mouse-event-structure
mouse-event-char returns a mouse event character that describes the mouse action of the specified mouse event.mouse-event-x andmouse-event-y give the x- and y-coordinates of the mouse when the mouse event occurred that created the mouse event structure. These coordinates are relative to the viewport that owns the mouse input stream on which the mouse event structure was read.mouse-event-buttons returns the value of the variable*mouse-buttons* at the time the mouse event occurred.
mouse-input
mouse-input determines where mouse input is sent.
mouse-input is examined when a mouse event occurs. If the expression
(mouse-input-stream-queue-mouse-events-p (mouse-input))
nil, an object encoding the mouse event is appended to the mouse input stream that is the value of the expression(mouse-input).
setf with this function to change the stream to which mouse input is sent. The second argument tosetf must be a mouse input stream.
mouse-input-stream-interrupt-char mouse-input-stream char
mouse-input-stream-interrupt-char returns the function that is called when the given character is typed to a mouse input stream.
mouse-input-stream-interrupt-char takes two arguments: mouse-input-stream and char. The function is called as soon as char is typed to mouse-input-stream.
nil. If the character causes the Debugger to be entered, the function returns the keyword value:debugger.
setf to modify a character's interrupt handler. If you set the function value tonil, char is no longer an interrupt character on mouse-input-stream. If you set the function value to a function of two arguments, char becomes an interrupt character, and the function is called when char is typed. If you set the function value to the keyword value:debugger, typing this character causes the Debugger to be entered.
mouse-input-stream-p object
mouse-input-stream-p tests whether its object argument is a mouse input stream. It is true if object is a mouse input stream.
mouse-input-stream-queue-mouse-events-p mouse-input-stream
mouse-input-stream-queue-mouse-events-p is called on the mouse input stream that is the value of the functionmouse-input. If the value returned is non-nil, a mouse event structure encoding the mouse event is queued on the mouse input stream that is the value of the functionmouse-input.
setf with this function to cause a mouse input stream to start or stop queueing mouse event structures.
make-mouse-input-stream with the:queue-mouse-events-p keyword argument.
make-mouse-input-stream, read-any
mouse-input-stream-viewport mouse-input-stream
mouse-input-stream-viewport returns the viewport that is associated with a mouse input stream.
move-mouse x y
move-mouse moves the mouse cursor from its current position to the position specified by the x and y arguments.
;;; Warning: MOVE-MOUSE timed out waiting for kernel to move mouse
move-mouse involves requesting the mouse to move and then waiting for the movement to take place. Therefore, you should not invokemove-mouse from the window input process.
mouse-x, mouse-y, *mouse-x*, *mouse-y*
move-viewport viewport x y
move-viewport moves a viewport's origin so that its top-left corner is at the point whose screen coordinates are specified by the x and y arguments.
outline-box-on-screen viewport x1 y1 delta-x delta-y&optional foreground op
outline-box-on-screen outlines a box directly on the screen on top of all other windows or viewports.
boole-c2.
peek-any&optional peek-type mouse-input-stream eof-error-p eof-value recursive-p mouse-event
peek-any peeks at and returns the next character or mouse event in a mouse input stream without reading it. The character or mouse event is read at a later time.
peek-any for skipping over characters and mouse events in the input stream until a particular character is encountered.
nil, the mouse input stream that is the value of the functionmouse-input is used. If the value of the mouse-input-stream argument is non-nil, the mouse input stream that is the value of the functionkeyboard-input is used.
read-char andread-char-no-hang and are ignored.
peek-any comes from within some function that itself has been called fromread or a similar input function, the recursive-p argument must have a non-nil value. If this argument is omitted, the default value isnil.
nil,t, or a character:nil,peek-any looks at and returns the next character or mouse event structure in the mouse input stream without reading it from the stream. This value is the default.t,peek-any reads and discards any whitespace characters at the front of the mouse input stream and returns the first mouse event structure or character that is not white space without reading it from the stream. Comments are not discarded.peek-any discards characters and mouse event structures from the front of the input stream until it encounters a character that is equal to (char=) the peek-type argument. That character is returned without being read from the stream.
keyboard-input, listen-any, mouse-event-p, mouse-input, read-any, read-any-no-hang
pop-up-menu-choose pop-up-menu-object
pop-up-menu-choose displays a pop-up menu specified by the pop-up-menu-object argument. The menu appears on the display screen near the current position of the mouse. You can choose one of the objects on the menu by clicking the right button on top of the selected item, or you can move the mouse off the menu.
nil are returned; if the menu does not have a default value, both of the values returned arenil.
make-pop-up-menu
pop-up-menu-p object
pop-up-menu-p tests whether its object argument is a pop-up menu. It is true if object is a pop-up menu.
position-x position
position-y position
position-x andposition-y return the x- and y-coordinates respectively of a position.
setf with these functions to set the x- and y-coordinates of a position.
> (setq pos (make-position 100 200)) #<Position (100,200) 595ba3>positionp> (position-x pos) 100
> (setf (position-y pos) 300) 300
> pos #<Position (100,300) 595ba3>
positionp object
positionp tests whether its object argument is a position. It is true if object is a position.
> (positionp (make-position 100 200)) Tprint-color-registry Function> (positionp 7) NIL
print-color-registry &key :percentage-values
print-color-registry displays the contents of the color registry on the stream that is the value of the Common Lisp variable*standard-output*.
:percentage-values keyword argument has a non-nil value, the red, green, and blue values in the registry are shown as percentages of the maximum saturation, which is the value returned by the functionmax-mic-value; otherwise, the red, green, and blue values are integers between 0 and 65535, which reflect the absolute saturation. The default value of this argument isnil.
> (print-color-registry) Color Registry 'YELLOW' Color-No: 5 Red: 65535 Green: 65535 Blue: 0 count: 1 'BLACK' Color-No: 0 Red: 0 Green: 0 Blue: 0 count: 1 'WHITE' Color-No: 7 Red: 65535 Green: 65535 Blue: 65535 count: 1 'CYAN' Color-No: 4 Red: 0 Green: 65535 Blue: 65535 count: 1 'BLUE' Color-No: 3 Red: 0 Green: 0 Blue: 65535 count: 1 'RED' Color-No: 1 Red: 65535 Green: 0 Blue: 0 count: 1 'MAGENTA' Color-No: 6 Red: 65535 Green: 0 Blue: 65535 count: 1 'GREEN' Color-No: 2 Red: 0 Green: 65535 Blue: 0 count: 1 NIL
max-mic-value
print-fonts
print-fonts displays all of the fonts currently in the font registry.
;; Assume that the font registry contains a roman and an italic
;; font.
> (print-fonts)
Code
Fontname Font Width Height Baseline Limit
ROMAN #<Fixed-Width-Font ROMAN C00E3A46> 8 16 11 128
ITALIC #<Fixed-Width-Font ITALIC C00E679E> 8 16 11 128
NIL
find-font
read-any&optional mouse-input-stream eof-error-p eof-value recursive-p mouse-event
read-any-no-hang&optional mouse-input-stream eof-error-p eof-value recursive-p mouse-event
read-any andread-any-no-hang read either a single character or a single mouse event structure from a mouse input stream.
nil, the mouse input stream that is the value of the functionmouse-input is used. If the value ist, the mouse input stream that is the value of the functionkeyboard-input is used. Otherwise, the specified mouse input stream is used.
read-any waits until a character is typed to the stream or a mouse event occurs on the stream mouse-input-stream. In this same situation, the functionread-any-no-hang returns the valuenil without waiting.
read-char andread-char-no-hang and are ignored.
read-any orread-any-no-hang comes from within some function that itself has been called fromread or a similar input function, the recursive-p argument must have a non-nil value. If this argument is omitted, the default value isnil.
keyboard-input, listen-any, make-mouse-input-stream, mouse-event-p, mouse-input, mouse-input-stream-queue-mouse-events-p, peek-any, unread-any
region-contains-position-p Predicate
region-contains-point-p region x y
region-contains-position-p region position
region-contains-point-p is true if the position whose coordinates are specified by the x and y arguments is in the given region.
region-contains-position-p is true when the specified position is in the given region.
;; Create a region whose origin is (100,100) and whose corner is (400,300). > (setq reg (make-region :x 100 :y 100 :width 300 :height 200)) #<Region 300x200 at (100,100) 596507>region-corner Function> (region-contains-point-p reg 150 299) T
> (region-contains-position-p reg (make-position 150 300)) NIL
region-corner region&optional result-position
region-corner-x region
region-corner-y region
region-height region
region-width region
region-origin region&optional result-position
region-origin-x region
region-origin-y region
region-size region
setf with all of these functions. If a result-position argument is given forregion-corner andregion-origin, that position is modified to the region's corner position or origin position and returned. Otherwise, a new position is created and returned.
;; Create a region whose origin is (400,500) and whose corner ;; is (480,590). > (setq r (make-region :x 400 :y 500 :width 80 :height 90)) #<Region 80x90 at (400,500) ada243>region-intersection Function> (region-corner r) #<Position (480,590) ada2e3>
> (region-corner-x r) 480
> (region-corner-y r) 590
> (region-height r) 90
> (region-width r) 80 >>> Undefined macro: \guideject
> (region-origin r) #<Position (400,500) adb1db>
> (region-origin-x r) 400
> (region-origin-y r) 500
> (region-size r) #<Extent 80x90 adb253>
region-intersection region region&rest regions
region-union region region&rest regions
region-intersection returns the region covered in common by all of the given regions. If there is no intersection, it returnsnil.
region-union returns the smallest region that contains all of the supplied regions.
> (setq r1 (make-region :x 0 :y 0 :width 100 :height 200)) #<Region 100x200 at (0,0) 5AC098>region< Function> (setq r2 (make-region :x 50 :y 150 :width 100 :height 100)) #<Region 100x100 at (50,150) 5AC0BD>
> (region-union r1 r2) #<Region 150x250 at (0,0) 5AC0CE>
> (region-intersection r1 r2) #<Region 50x50 at (50,150) 5AC0E3>
region< region region&rest regions
region<= region region&rest regions
region= region region&rest regions
region/= region region&rest regions
region> region region&rest regions
region>= region region&rest regions
region< is true if each argument except the last is contained in the following argument.region<= is true if each argument except the last is contained in or equals the following argument.region= is true if every argument is the same region.region/= is true if no two arguments are the same region.region> is true if each argument except the last contains the argument that follows it.region>= is true if each argument except the last contains or is equal to the argument that follows it.
> (setq region1 (make-region :x 0 :y 0 :corner-x 100 :corner-y 100)
region2 (make-region :x 0 :y 0 :corner-x 100 :corner-y 101)
region3 (make-region :x 50 :y 50 :corner-x 200 :corner-y 300)
region4 (make-region :x 200 :y 300 :corner-x 500 :corner-y 700)
region5 (make-region :x 150 :y 299 :corner-x 500 :corner-y 701)
region6 (make-region :x 150 :y 299 :corner-x 500 :corner-y 700))
#<Region 350x401 at (150,299) 4850CB>
> (region< region1 region2)
T
> (region< region1 region1)
NIL
> (region<= region1 region2)
T
> (region<= region1 region1)
T
> (region> region2 region1)
T
> (region> region2 region2)
NIL
> (region>= region2 region1)
T
> (region>= region2 region2)
T
;; For region/= to be true, all of the regions must be different.
> (region/= region1 region2 region3 region4 region5 region6)
T
> (region/= region1 region2 region3 region4 region5 region6 region1)
NIL
> (region= region1 region1 region1 region1 region1)
T
> (region= region1 region2)
NIL
regionp Predicate
regionp object
regionp tests whether its object argument is a region. It is true if object is a region.
> (regionp (make-region :x 0 :y 0 :width 100 :height 200)) Tregister-color Function> (regionp 8) NIL
register-color name&key :red :green :blue :delta-red :delta-green :delta-blue :new-p :starting-color-number
register-color registers the specified color in the color registry and returns the name symbol of the color as a string. If the color is already registered,nil is returned. You can remove the registered color with the functiondelete-color.
register-color::red,:green,:bluemin-mic-value tomax-mic-value inclusive; their default value ismin-mic-value.
:delta-red,:delta-green,:delta-blue:red,:green and:blue is allowed. These arguments default to 0, or no variation. If you specify variations and the:red,:green, and:blue values are close, an existing color entry in the system color map can be used for the new color to save space in the system color map.
:new-pnil value, the registered color is registered with a new system color map entry even if another registered color has a color map entry that is within the specified variation for the red, green, and blue values.
:starting-color-numberregister-color attempts to associate the registered color with the system color map entry number. This number must be in the range from 0 to(1- (color-map-size)) inclusive. If the requested system color map entry number is already in use, the succeeding map entry numbers are searched for an available number. It is not an error to request an entry number that is already in use.
> (register-color "MINT" :red (round (* max-mic-value .50))
:green (round (* .80 max-mic-value))
:blue (round (* .60 max-mic-value)))
"MINT"
> (register-color 'my-black :new-p t)
"MY-BLACK"
> (register-color 'my-black :new-p t)
NIL
delete-color, min-mic-value, max-mic-value
rename-color old-name new-name
rename-color changes the name of the registered color specified by the old-name argument to be the name specified by the new-name argument. The color's new name is returned as a string.
> (rename-color "BLACK" "OLDBLACK") "OLDBLACK"rename-font Function> (rename-color 'oldblack 'newblack) "NEWBLACK"
> (rename-color 'newblack "BLACK") "BLACK"
rename-font font new-name
rename-font changes the name of the specified font to the name new-name. The name of the font is also changed in the font registry.
find-font is called to find the font named by the string or symbol.
font-name
reset-color-registry &key :confirm
reset-color-registry restores the color registry entries to the values that were registered when the Window Tool Kit was initialized; that is, it deletes all colors from the registry except the default values,'BLACK and'WHITE.
:confirm keyword argument has a non-nil value, you are queried before the color registry is restored; this value is the default.
reset-color-registry can change any system color map entry, you can destructively change the color intensity of registered colors and thus change the appearance of the screen immediately. You should use this function with caution. Any entries added to the color registry since the Window Tool Kit was initialized are destructively removed.
> (reset-color-registry :confirm nil) 8reshape-viewport Function> (print-color-registry) Color Registry 'WHITE' Color-No: 0 Red: 65535 Green: 65535 Blue: 65535 count: 1 'BLACK' Color-No: 255 Red: 0 Green: 0 Blue: 0 count: 1 NIL
reshape-viewport viewport&key :region :x :y :width :height :corner-x :corner-y
reshape-viewport moves and reshapes the specified viewport so that its screen region is the region specified by the keyword arguments.
reshape-viewport. You must specify enough keyword arguments to identify the region uniquely.:regionmake-region.
:x,:y
:corner-x,:corner-y
:width,:height
root-viewport-p object
root-viewport-p is true if its argument is a root viewport.
root-viewport, root-viewports
root-viewport
root-viewports
root-viewport returns the current root viewport. The current root viewport is the viewport that receives all window system input and output.
root-viewports returns a list of all of the root viewports that are currently active.
setf with the functionroot-viewport to change the current root viewport.
root-viewport-under-mouse
root-viewport-under-mouse returns the root viewport that is currently under the mouse.
nil.
set-color-map-mic color-number red green blue
set-color-map-mdc color-number mdc
set-color-map-mic andset-color-map-mdc set the specified system color map entry to the specified color intensity values. The specified color number is not entered in the color registry but is set directly into the system color map. Both functions return the system color map entry or the first entry that is set.
(1- (color-map-size)) inclusive.
min-mic-value tomax-mic-value inclusive; they can be sequences of integers in the appropriate range. If red, green, and blue are sequences, the color-number argument and each successive system color map entry is set to the corresponding values in each sequence.
find-mdc.
> (set-color-map-mic (allocate-color) 100 1000 10000) 23> (set-color-map-mdc (allocate-color) (find-mdc :color 0)) 24
find-mdc, min-mic-value, max-mic-value
setup-color-library&key :primary-colors :extended-colors :use-existing-primaries
"BLACK" and"WHITE". This function registers the additional six primary colors"RED","GREEN","BLUE","YELLOW","MAGENTA", and"CYAN", and possibly other color library shades.
setup-color-library::primary-colorsnil value, the function registers the primary colors in the color registry. If the current display is not a color display, the primary colors are not set in the system color map but are registered so that they can be used in normal color code. The default value ist.
:extended-colorsnil value, the function registers the extended library colors in the color registry. If the current display is not a color display, the extended colors are not set in the system color map but are registered so that they can be used in normal color code. The default value isnil
:use-existing-primariesnil value, the primary colors"RED","GREEN","BLUE","CYAN","MAGENTA", and"YELLOW" are registered if they already exist in the system color map. They must have been entered into the system color map before the root-viewport window is initialized.
nil.
"WHITE" is displayed as"BLACK" on a monochrome display.
delete-color, print-color-registry, register-color, reset-color-registry
stream-current-font bitmap-output-stream
stream-current-font returns the current font of a bitmap output stream.
setf to modify the stream's current font. The second argument tosetf must be a font, a string, or a symbol. If the argument is a string or a symbol, the functionfind-font is called to find the font named by the string or symbol. Changing a stream's current font does not modify the stream's linefeed distance.
;; Create a 100x200 bitmap. > (setq btmp (make-bitmap :height 100 :width 200)) #<Bitmap 200x100x1 5ACEC3>;; Create a bitmap output stream to that bitmap. > (setq b-o-s (make-bitmap-output-stream :bitmap btmp)) #<Output-Stream to #<Bitmap 200x100x1 5ACEC3> 5AD21D>
;; The bitmap output stream's current font is *default-font*. > (eq (stream-current-font *) *default-font*) T
stream-linefeed-distance
stream-draw-circle bitmap-output-stream radius&key :width :operation :foreground
stream-draw-line bitmap-output-stream end&key :width :operation :foreground
stream-draw-polyline bitmap-output-stream positions&key :width :operation :foreground
stream-draw-circle draws a circle of radius radius around a bitmap output stream's current position.stream-draw-line draws a line segment from a bitmap output stream's current position to the position end. The bitmap output stream's new current position becomes the position end.stream-draw-polyline draws a series of connected line segments, starting at a bitmap output stream's current position and then going through each position in a sequence of positions. The current position of the bitmap output stream is left at the final position.:widthstream-draw-circle, the border is drawn so that its outer edge is at the specified radius; the width must be less than or equal to the radius. If this keyword argument is omitted ornil, the default value is 1.
:operationnil, the bitmap output stream's operation is used. You can find that operation by using the functionstream-operation.
:foregroundnil, the default value is the default foreground of the specified bitmap.
:foreground or the:operation argument, but not both.
draw-circle, draw-line, draw-polyline, stream-operation
stream-linefeed-distance bitmap-output-stream
stream-linefeed-distance accesses the linefeed distance of a bitmap output stream.
setf with this function to modify a bitmap output stream's linefeed distance. When a bitmap output stream is created, its linefeed distance is the height of the initial font.
stream-operation bitmap-output-stream
stream-operation returns a bitmap output stream's defaultbitblt operation, which is used in writing characters or figures to the bitmap output stream's bitmap.
setf with this function to set a new value. The new value must be an acceptable first argument to the Common Lisp functionboole.
;; Create a bitmap. > (setq x (make-bitmap :height 100 :width 200)) #<Bitmap 200x100x1 AD476B>stream-position Function;; Create a bitmap output stream to that bitmap. Specify ;; an operation. > (setq b-o-s (make-bitmap-output-stream :bitmap x :operation boole-1)) #<Output-Stream to #<Bitmap 200x100x1 AD476B> AD54B3>
;; The stream operation of b-o-s is the specified operation. > (eql (stream-operation b-o-s) boole-1) T
stream-position bitmap-output-stream&optional result-position
stream-x-position bitmap-output-stream
stream-y-position bitmap-output-stream
stream-position returns a position.stream-x-position returns the x-coordinate of the position.stream-y-position returns the y-coordinate of the position.stream-position, that position is modified to the output position and then returned. Otherwise, a new position is created and returned.
setf with these functions to modify a bitmap output stream's position.
;; Create a bitmap and a bitmap output stream. > (setq b-o-s (make-bitmap-output-stream :width 100 :height 200)) #<Output-Stream to #<Bitmap 100x200x1 AD75BB> AD8463>string-width Function;; Check the initial value. > (and (= 0 (stream-x-position b-o-s)) (= (font-baseline *default-font*) (stream-y-position b-o-s))) T
;; Set the x position to a new value. > (setf (stream-x-position b-o-s) 50) 50
string-width string font
string-width determines the width in bits of the specified string when printed in the specified font.
find-font is called to find the font named by the string or symbol.
unread-any char-or-mouse-event&optional mouse-input-stream
unread-any returns a character or mouse event structure to the front of a mouse input stream's queue. The character or mouse event structure must be the same object that was last read from the queue.
nil, the mouse input stream that is the value of the functionmouse-input is used. If the value of the mouse-input-stream argument is non-nil, the mouse input stream that is the value of the functionkeyboard-input is used.
keyboard-input, mouse-input, read-any
viewport-active-p viewport
viewport-active-p determines if the specified viewport or window is active.
activate-viewport makes a viewport active.
activate-viewport, deactivate-viewport
viewport-at-point x y
viewport-at-position position
viewport-at-point interprets its x and y arguments as the coordinates of a point on the screen. It returns as its value the viewport that is displayed at that point.
viewport-at-position is identical toviewport-at-point except that it is passed a single position argument rather than x- and y-coordinates.
viewport-bitmap viewport
viewport-bitmap returns a viewport's underlying bitmap.
viewport-bitmap-x-offset Function
viewport-bitmap-y-offset Function
viewport-bitmap-offset viewport&optional result-position
viewport-bitmap-x-offset viewport
viewport-bitmap-y-offset viewport
viewport-bitmap-offset returns the position that represents the offset of the viewport's origin.viewport-bitmap-x-offset andviewport-bitmap-y-offset return the x- and y-coordinates of the offset respectively.viewport-bitmap-offset, that position is modified to the viewport's offset and returned. Otherwise, a new position containing the viewport's offset is created and returned.
setf with these functions to change the viewport's offset. Modifyingviewport-bitmap-y causes vertical scrolling. However, if the bitmap is the same size as the viewport, changing the offset withsetf has no effect.
viewport-screen-region Function
viewport-bitmap-region viewport&optional result-region
viewport-screen-region viewport&optional result-region
viewport-bitmap-region returns a copy of a viewport's bitmap clipping region.
viewport-screen-region returns a copy of the entire screen region occupied by the specified viewport or window.
viewport-children viewport
viewport-parent viewport
viewport-children returns a list of the current root viewport's children. The list is in the same order as the children's sibling stack.
viewport-parent returns a viewport's parent.
setf withviewport-parent to change a viewport's parent. You can only change a viewport's parent when the viewport is inactive. The viewport is put at the top of the sibling stack of its new parent's children.
setf withviewport-children to change a viewport's children. The second argument tosetf must be a list of inactive viewports. All of the viewport argument's children must also be inactive. The viewport argument's list of children is modified to be the second argument tosetf; children in the sibling stack will appear in the same order as in the viewport list. Any viewport in the viewport list whose parent was not the viewport argument is modified so that its parent becomes the viewport argument. Any viewport whose parent was formerly the viewport argument but that is not in the viewport list becomes detached from the tree.
viewport-background-pixel Function
viewport-foreground-pixel viewport
viewport-background-pixel viewport
viewport-foreground-pixel andviewport-background-pixel return the pixel values for the specified viewport that map bits of a depth 1 bitmap onto pixel values for a screen of depth greater than 1.
setf with these functions to specify a new default viewport foreground pixel or viewport background pixel for a bitmap.
;;; Register primary colors. > (setup-color-library) NILviewportp> (setq *viewport* (make-viewport :bitmap (make-bitmap :width 20 :height 20 :depth 1) :viewport-foreground "BLUE" :viewport-background "GREEN")) #<Viewport 20x20 at (0,0) onto #<Bitmap 20x20x1 F34E23> F34F83>
> (viewport-foreground-pixel *viewport*) 3
> (viewport-background-pixel *viewport*) 2
> (setf (viewport-foreground-pixel *viewport*) "RED") 1
> (viewport-foreground-pixel *viewport*) 1
viewportp object
viewportp tests whether its object argument is a viewport. It is true if object is a viewport.
;;; To run this example, you must have already initialized the
;;; Window Tool Kit.
;; Create a 10x10 bitmap and a viewport onto that bitmap.
;; Note that make-viewport returns two values, the viewport and
;; the bitmap.
> (multiple-value-setq (vwpt btmp)
(make-viewport :width 10 :height 10))
#Viewport 10x10x1 at (0,0) onto #<Bitmap 10x10x1 40D4E5> 40D51D>
> (viewportp vwpt)
T
> (viewportp btmp)
NIL
viewport-user-data Function
viewport-user-data viewport
viewport-user-data returns the information that is specified in the:user-data keyword argument tomake-viewport andinitialize-viewport.
setf with this function to alter the contents of the:user-data argument.
initialize-viewport, make-viewport
who-window
who-window returns the window that is currently being used for output by the who process.
setf to modify this window. You can use the functionmake-new-who-window to change the window of the who process.
make-new-who-window
window-calculate-vertical-scroll-ratio Function
window-calculate-horizontal-scroll-ratio window
window-calculate-vertical-scroll-ratio window
window-calculate-horizontal-scroll-ratio andwindow-calculate-vertical-scroll-ratio calculate the horizontal and vertical scroll ratios respectively for the specified window.
setf with these functions to modify the values of the:calculate-horizontal-scroll-ratio and:calculate-vertical-scroll-ratio keyword options tomake-window for the specified window.
make-window, window-horizontal-scroll-ratio, window-calculate-vertical-scroll-ratio
window-frame window
window-frame returns the window frame that is associated with a given window.
setf with this function.
window-vertical-scroll Function
window-horizontal-scroll window
window-vertical-scroll window
window-horizontal-scroll andwindow-vertical-scroll return the scroll method used by a specified window.
> (window-horizontal-scroll test-window) #<Compiled-Function WINDOWS::DEFAULT-HORIZONTAL-SCROLL-METHOD 36BD27>window-inner-border-width Function
window-outer-border-width Function
window-inner-border-width window
window-outer-border-width window
window-inner-border-width returns the width of the inner border of the window.
window-outer-border-width returns the width of the outer border of the window.
setf macro can be used with these functions to modify the widths of the inner and outer borders of a window.
window-inside-region window&optional region
window-inside-region returns the region inside the specified windows borders. The region is in screen coordinates.
window-title window
window-title-font window
window-title returns the title of a window as a string.
window-title-font returns the font in which a window's title is displayed.
setf with the functionwindow-title to modify the title of a window. The second argument tosetf must be a string.
setf withwindow-title-font to redraw the title of a window in a new font. The second argument tosetf must be a font, a string, or a symbol. If the argument is a string or a symbol, the functionfind-font is called to find the font named by the string or symbol.
;;; To run this example, you must have already initialized the ;;; Window Tool Kit. ;; Create a window with the title "hello". > (setq w (make-window :width 100 :height 200 :title "hello")) #<Window 100x200x1 at (0,0) 19C513>window-user-data Function> (window-title w) "hello" ;; Note that the title font is *default-font*.
> (eq (window-title-font w) *default-font*) T ;; Modify the title.
> (setf (window-title w) "new-name") "new-name"
> (window-title w) "new-name"
window-user-data window
window-user-data returns the information that is specified in the:user-data keyword argument tomake-window andinitialize-window.
setf with this function to alter the contents of the:user-data argument.
initialize-window, make-window
window-horizontal-scroll-ratio Function
window-vertical-scroll-ratio window
window-horizontal-scroll-ratio window
window-vertical-scroll-ratio andwindow-horizontal-scroll-ratio return the vertical and horizontal scroll ratio respectively of a given window.
setf with these functions to specify a vertical or horizontal ratio for the given window. If the value of the ratio is set tonil, the window cannot scroll and the scroll bars disappear.
make-window, window-calculate-horizontal-scroll-ratio, window-calculate-vertical-scroll-ratio
windowp object
windowp tests whether its object argument is a window. It is true if object is a window.
;;; To run this example, you must have already initialized the ;;; Window Tool Kit. > (setq w (make-window :width 100 :height 200 :title "hello")) #<Window 100x200x1 at (0,0) 87F32E>windows-available-p Function> (windowp w) T
> (windowp 7) NIL
windows-available-p &key :display
windows-available-p checks the Lisp environment for a window system that is capable of supporting the Window Tool Kit.
windows-available-p returns as values the display width in pixels, the display height in pixels, and the number of display planes if a Window System can be run from the current process; otherwise, the function returnsnil. The returned display parameters can be used in subsequent calls toinitialize-windows.
:display keyword argument specifies the display used for Window Tool Kit interactions. It must be a string of one of the following forms:
DISPLAY.
initialize-windows
with-fast-drawing-environment {form}*
with-fast-drawing-environment groups display operations. Overhead operations that are required to produce output are executed only once rather than for every display operation in the group.
with-mouse-documentation string-or-function {form}*
with-mouse-documentation replaces any mouse documentation and executes the specified forms. Upon exit, the mouse documentation is restored to its original value.
with-mouse-methods-preempted-globally Macro
with-mouse-methods-preempted bitmap {form}*
with-mouse-methods-preempted-globally region {form}*
with-mouse-methods-preempted evaluates each of its form arguments. While these forms are being evaluated, any active region that is not attached to the bitmap argument is disabled. Its methods are not called even if a mouse event occurs inside it.
with-mouse-methods-preempted-globally disables all active regions in the current root viewport except the active region of interest. A mouse event in any area of the current root viewport is treated as though it happened in the specified region.
with-mouse-methods-preempted can be a bitmap, an active region, ornil. If the value isnil, all active regions are disabled.
with-mouse-methods-preempted-globally must be an active region.
with-mouse-methods-preempted andwith-mouse-methods-preempted-globally.
with-root-viewport root-viewport {form}*
with-root-viewport allows you to temporarily use the specified root viewport instead of the current one during the execution of the form arguments.

Generated with Harlequin WebMaker