diff --git a/collects/mrlib/scribblings/switchable-button.scrbl b/collects/mrlib/scribblings/switchable-button.scrbl index 792fda4e..a3f45485 100644 --- a/collects/mrlib/scribblings/switchable-button.scrbl +++ b/collects/mrlib/scribblings/switchable-button.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "common.ss" - (for-label mrlib/name-message)) + (for-label mrlib/switchable-button)) @title{Switchable Button} @@ -30,5 +30,10 @@ If it is not supplied, both modes show the same bitmap. @defmethod[(set-label-visible [visible? boolean?]) void?]{ Sets the visibility of the string part of the label. } + +@defmethod[(command) void?]{ + +Calls the button's callback function.} + } diff --git a/collects/mrlib/switchable-button.ss b/collects/mrlib/switchable-button.ss index bc605ac0..1c2d4c80 100644 --- a/collects/mrlib/switchable-button.ss +++ b/collects/mrlib/switchable-button.ss @@ -96,6 +96,10 @@ (refresh)] [(send evt moving?) (update-in evt)])) + + (define/public (command) + (callback this) + (void)) (define float-window #f) (inherit get-width get-height) @@ -234,7 +238,7 @@ (min-width (+ w w-circle-space margin margin)) (min-height (+ h h-circle-space margin margin)))) - (super-new [style '(transparent)]) + (super-new [style '(transparent no-focus)]) (send (get-dc) set-smoothing 'aligned) (inherit stretchable-width stretchable-height)