Tool Flap

Alain Plantec alain.plantec at univ-brest.fr
Mon Mar 17 08:49:47 UTC 2003


Tim Will wrote:

> Newbie question,
>
> I recently downloaded Whisker Browser and use it most of the time. It 
> would be a big help if I could add it to the Tool Flap like the other 
> browsers. I like the behavior of the iconic button where you can drag 
> an instance of the browser out onto the desktop. What I really need is 
> a recipe for how to do this. I have used the Maker Button for many 
> things to put into the flaps but still would like to know how those 
> Tool Flaps are done.
>
> Thanks, Tim
>
you can look at the SmaCCParserGenerator class for exemple.
You will see two class methods named flapButton and openFlapButton :

flapButton
    | tuple |
    tuple _ {self name asSymbol. #prototypicalToolWindow. 'SmaCC parser 
generator'. 'UI of squeak SmaCC'}.
    ^ IconicButton new
        initializeWithThumbnail: (PartsBin thumbnailForQuad: tuple)
        withLabel: tuple third
        andSend: tuple second
        to: (Smalltalk at: tuple first)


openFlapButton
    ^ self flapButton openInWorld


openFlapButton open a button that you can drop in a user flap.

alain plantec





More information about the Squeak-dev mailing list