Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

draw-cell-focus

Arguments: grid-row grid-column stream cell-box

Draws something in a grid cell to indicate that that cell currently has the keyboard focus (and so a keypress will result in a call to cell-key-down for that row and column). The default method draws a one-pixel thick line at the outer edge of the cell's interior.

Applications should not call this function, which is called automatically, but may add methods to override the default focus drawing style.

This function is called once to draw the focus and again in the same way to erase it. The paint-operation of the stream is always temporarily set to po-invert when draw-cell-focus is called, so that drawing the same thing a second time will erase what was drawn. This means that a draw-cell-focus method should never set the paint-operation to something else, as this would prevent the erasure from working. It is also probably not useful to set the foreground-color in a draw-cell-focus method, as it is not feasible to predict the color that will result when the official foreground color is combined with the current screen colors via the po-invert operation.

grid-row and grid-column indicate the cell in which focus is to be drawn. stream is the stream on which the drawing should be done, and cell-box is the box on stream that encompasses the interior of the cell. The method may modify the box if desired. A draw-cell-focus method may draw outside this box, but the clipping-box of stream is set to the grid section that contains the cell when this function is called, so that any drawing outside the whole section will be clipped.

Here is the default method:

(defmethod draw-cell-focus ((row grid-row)(column grid-column)
                            stream cell-box)
  (decf (box-right cell-box))
  (decf (box-bottom cell-box))
  (with-line-width (stream 1)
    (draw-box stream cell-box)))

See also draw-cell.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version