[squeak-dev] PluggableSlider? PluggableCanvas?

karl ramberg karlramberg at gmail.com
Fri Mar 17 16:53:34 UTC 2023


I don't think we have any pluggable sliders or pluggable canvases

Best,
Karl

On Sat, Mar 11, 2023 at 4:38 PM Eduardo Ochs <eduardoochs at gmail.com> wrote:

> Hi list,
>
> I'm trying to implement in Squeak something like this demo of sliders
> in Geogebra:
>
>   https://www.youtube.com/watch?v=Q9p-Oz8OyfY#t=4m55s
>
> note the "#t=4m55s" in the link; it should open the video in the part
> in which the presenter shows that two of the sliders control the
> coordinates of the center of the circle and the third one controls its
> radius or the circle.
>
> I was able to write a class with very stripped-down versions of these
> methods,
>
>   HelpBrowser >> #buildWith:
>   Browser >> #buildDefaultBrowserWith:
>
> in which all the subwindows were replaced by instances of "builder
> pluggableListSpec new". Its layout should be easy to change, and I
> will try to change its pluggableLists by other objects in a series of
> small steps.
>
> QUESTION: how do I replace one of its subwindows by a horizontal
> slider that is always visible and another of its subwindows by a
> canvas? Are there "PluggableSlider"s and "PluggableCanvas"es? Which
> classes use them? Pointers, please?...
>
> My code is both copied below and attached. It mentions a class "See"
> in its comments; if anyone wants to take a look at that, the
> instructions are just:
>
>   1. Download and "fileIn" this .st file:
>
>      http://anggtwu.net/SQUEAK/Category-Edrx.st
>      http://anggtwu.net/SQUEAK/Category-Edrx.st.html
>
>   2. Run "See see".
>
> Thanks in advance!
>   Eduardo Ochs
>   http://anggtwu.net/eev-squeak.html
>
> Here is the code:
> --snip--snip--
>
> 'From Squeak6.0 of 23 January 2023 [latest update: #22121] on 11 March
> 2023 at 12:10:28 pm'!
> Model subclass: #TestWindowSpec
>         instanceVariableNames: ''
>         classVariableNames: ''
>         poolDictionaries: ''
>         category: 'Category-Edrx'!
> !TestWindowSpec commentStamp: 'Edrx 3/11/2023 02:09' prior: 0!
> Try: See edrxGuide: #windowSpecs.!
>
>
> !TestWindowSpec methodsFor: 'as yet unclassified' stamp: 'Edrx 3/11/2023
> 03:10'!
> buildCodePaneWith: builder
>         | listSpec |
>         listSpec := builder pluggableListSpec new.
>         ^ listSpec.
> ! !
>
> !TestWindowSpec methodsFor: 'as yet unclassified' stamp: 'Edrx 3/11/2023
> 03:10'!
> buildMessageCategoryListWith: builder
>         | listSpec |
>         listSpec := builder pluggableListSpec new.
>         ^ listSpec.
> ! !
>
> !TestWindowSpec methodsFor: 'as yet unclassified' stamp: 'Edrx 3/11/2023
> 03:10'!
> buildMessageListWith: builder
>         | listSpec |
>         listSpec := builder pluggableListSpec new.
>         ^ listSpec.
> ! !
>
> !TestWindowSpec methodsFor: 'as yet unclassified' stamp: 'Edrx 3/11/2023
> 03:10'!
> buildSystemCategoryListWith: builder
>         | listSpec |
>         listSpec := builder pluggableListSpec new.
>         ^ listSpec.
> ! !
>
> !TestWindowSpec methodsFor: 'as yet unclassified' stamp: 'Edrx 3/11/2023
> 12:10'!
> buildWith: builder
>   "See:
>      See edrxGuide: #windowSpecs.
>      See cm: (HelpBrowser >> #buildWith:).
>      See cm: (Browser >> #buildDefaultBrowserWith:).
>    Tests:
>      See haltAt: #buildBrowser.
>      See see.
>
>      self halt.
>      ToolBuilder open: (TestWindowSpec new).
>   "
>         | max windowSpec |
>         max := 0.42.
>         windowSpec := self buildWindowWith: builder specs: {
>                 (0 at 0 corner: 0.25 at max) -> [self
> buildSystemCategoryListWith: builder].
>                 (0.5 at 0 corner: 0.75 at max) -> [self
> buildMessageCategoryListWith: builder].
>                 (0.75 at 0 corner: 1 at max) -> [self buildMessageListWith:
> builder].
>                 (0 at max corner: 1 at 1) -> [self buildCodePaneWith: builder].
>         }.
>         windowSpec defaultFocus: #systemCategoryList.
>
>         ^builder build: windowSpec
> ! !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230317/de0f0972/attachment.html>


More information about the Squeak-dev mailing list