► |  | Embedded GUI: Widgets within editor<%>

1 | Containers
2 | Controls
3 | Control Snips
4 | Helpers
5 | Snip Functions

▼ | 3 | Control Snips

3.1 | snip-wrapper%
3.2 | text-button-snip%
3.3 | button-snip%
3.4 | toggle-button-snip%

top← prev up next →

button-snip% : class?
superclass: snip%

A clickable button with a bitmap label.

(new button-snip% |  | [images images] |
|  | [callback callback]) |

→ (is-a?/c button-snip%)
images : (cons/c path-string? path-string?)
callback : ((is-a?/c button-snip%) (is-a?/c event%) . -> . void?)

The images argument is a pair filenames to be load as the button-label image, where the first is the image for when the button is at rest, and the second is the image for the button while its pressed.

The callback is called when the button is clicked.
top← prev up next →