[Cuis-dev] PluggableButton

H. Fernandes hilaire at drgeo.eu
Tue Apr 5 04:20:16 PDT 2022


Hi Juan, 

Checkout the latest ButtonMorph .cs file I sent. I also need an optional actionArgument to use with the actionSelector. I have some use case in the DrGeo Script builder dialog. 

Thanks 

Hilaire 

Dr. Geo -- http://drgeo.eu 

----- Mail original -----

> On 4/2/2022 4:15 AM, Hilaire Fernandes via Cuis-dev wrote:
> > I contributed the ButtonMorph in Cuis-Smalltalk-UI, in the
> > UI-Widgets
> > package. It adds the behaviors I need for DrGeo.
> 

> > you can check it out
> 
> > Hilaire
> 

> > Le 01/04/2022 à 20:23, Juan Vuletich a écrit :
> 

> > > I think it is best to avoid another button class. Please hack
> > > PluggableButton as much as needed to get the color / border and
> > > hover behavior as you need, and email me the change set. I'll
> > > review
> > > it, and maybe I'll make the option a flag in Theme, or maybe a
> > > preference, to include it in base Cuis.
> > 
> 

> > --
> 
> > GNU Dr. Geo http://drgeo.eu http://blog.drgeo.eu
> 
> Please try #5097 attached. This cs breaks your ButtonMorph, for it to
> work again, use attached unsavedChanges...

> I slightly changed some of your selectors. I tried like this.

> -----Workspace1---- ButtonMorph
> b := ButtonMorph new.
> b openInWorld.
> b morphPosition: 100 at 100 extent: 200 at 100.
> b color: Color yellow darker.
> b borderWidth: 5; borderColor: Color green.

> b icon: Theme current closeIcon.
> b selectedColor: Color tan.
> b argument: false.
> b model: [ :b | b print. b ] stateGetter: #value: action: #print
> label: nil.

> b argument: true. b redrawNeeded.
> b argument: false. b redrawNeeded.
> b disable.
> b enable.
> b adoptWidgetsColor: Color pink.
> -------------------------

> ---- Workspace 2 ---- PluggableButtonMorph
> b := PluggableButtonMorph new.
> b openInWorld.
> b morphPosition: 400 at 100 extent: 200 at 100.
> b color: Color yellow darker.
> b borderWidth: 5; borderColor: Color green.

> b roundButtonStyle: false.
> b magnifiedIcon: Theme current closeIcon.
> b mouseOverColor: Color tan.
> b model: [ :b | b print. b ] stateGetter: #value:
> stateGetterArgument: false action: #print label: nil.

> b stateGetterArgument: true. b redrawNeeded.
> b stateGetterArgument: false. b redrawNeeded.
> b disable.
> b enable.
> b adoptWidgetsColor: Color pink.
> -------------------

> If you think this is ok, I'll integrate it.

> Cheers,
> --
> Juan Vuletich www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> https://independent.academia.edu/JuanVuletich
> https://www.researchgate.net/profile/Juan-Vuletich
> https://patents.justia.com/inventor/juan-manuel-vuletich
> https://twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220405/dae38c6d/attachment.htm>


More information about the Cuis-dev mailing list