Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version


Arguments: dialog-item

The value returned by the generic function can be nil, t, or a plist (a list of conses). The setf of this function may be called to change the pressed colors of a dialog-item at any time. The value controls how the appearance of a picture-button or multi-picture-button control changes when pressed.

If the value of this property is nil, then no color change occurs when the button is pressed.

If the value is a plist, then the first element of the conses in the plist is the color before pressing, and the second element is the color after pressing. The after pressing colors replace the before pressing colors while the button is pressed. For example, the following form will return the default pressed-color-mapper, which would cause a pressed picture-button to display white pixels where it normally displays light-gray pixels and so on.

(list (cons light-gray white)
      (cons gray light-gray)
      (cons dark-gray  gray))

Alternately, the value of this property may simply be the symbol t to "reverse" all of the colors of the pixmap when the button is pressed. This option effectively draws the pixmap such that every bit in each pixel value is reversed. The effect of this depends on the nature of the pixmap. For a true-color pixmap, where the pixel value denotes a color directly, this will always result in the hue that would be on the opposite side of a color wheel, and an opposite lightness as well; so a dark red, for example, would become a light cyan. For a non-true-color pixmap, where the pixel value is an index into a vector of colors, this will select the color that happens to be at the "opposite position" in the color vector (as if the order of all of the colors were reversed). The colors in the default-pixmap-color-vector are arranged with opposite colors at opposite positions, and so any pixmap that uses this particular color vector as the value of its colors property will reverse all of its colors just as a true-color pixmap would.

pressed-color-mapper is a property of the multi-picture-button and picture-button classes.

GTK Note

This property is currently supported only by multi-picture-button, and will have no effect on other widgets. We would need to implement picture-button a different way to support this property on GTK.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version