svn: r9582
This commit is contained in:
parent
88af65987e
commit
f17d85c24a
25
collects/mrlib/scribblings/switchable-button.scrbl
Normal file
25
collects/mrlib/scribblings/switchable-button.scrbl
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#lang scribble/doc
|
||||||
|
@(require "common.ss"
|
||||||
|
(for-label mrlib/name-message))
|
||||||
|
|
||||||
|
@title{Switchable Button}
|
||||||
|
|
||||||
|
@defmodule[mrlib/switchable-button]
|
||||||
|
|
||||||
|
@defclass[switchable-button% canvas% ()]{
|
||||||
|
|
||||||
|
A @scheme[switchable-button%] control displays
|
||||||
|
and icon and a string label. It toggles between
|
||||||
|
display of just the icon and a display with the
|
||||||
|
label and the icon side-by-side.
|
||||||
|
|
||||||
|
@defconstructor/auto-super[([label string?][callback (-> (is-a?/c switchable-button%) any/c)] [bitmap (is-a?/c bitmap%)])]{
|
||||||
|
The @scheme[callback] is called when the button
|
||||||
|
is pressed. The @scheme[string] and @scheme[bitmap] are
|
||||||
|
used as discussed above.}
|
||||||
|
|
||||||
|
@defmethod[(set-label-visible [visible? boolean?]) void?]{
|
||||||
|
Sets the visibility of the string part of the label.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user