[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] menu_popup() ideas

Selon Odd Skancke <ozk@atari.org>:

> Hi list,
>  I have looked at the MENU structure used for menu_popup() call and have
> found that there are inconsitencies in the documentation. The 'scroll'
> element is in some documentation said to be enabled when it is set to
> -1, while other says a value of 1 enabled scroll. However,  I think that
> the correct (and this is how n.aes act) is that a value of -1 enables
> the popup scroll when it contains more than 8 entries. It has come to my
> attention that early official documentation from Atari also states 1 as
> the enable-value, but was changed to -1 in later revisions.

According to Atari documentation:
mn_scroll: The scroll field status of the menu:
                    0: The menu not scroll
                    !0: The menu will scroll if the number of menu items exceed
the menu scroll height. The non-zero value is the object at which scrolling will
begin. This will allow one to have a menu in which the scrollable region is only
a part of the whole menu. The value must be a menu item in the menu.

>  After doing some tests, mainly by Lonny, it turns out that N.AES
> enables scroll when 'scroll' is set to -1, which is correct. Any other
> value turns scrolling off. XaAES, when only checking for a non-zero
> value (either 1 or -1), to turn scrolling on/off gave aMail popup (the
> popup that appears when you click to open 'To:' popup in the send
> dialog). This does not happen under N.AES. This leads me to the
> conclusion that as of now, only a 'scroll' value of -1 should enable
> scroll when more than 8 entries are present.
>  Now for the extention I want to propose;
>  1. If ('scroll' == -1), enable scrolling when entries > 8
Agree if NAES do it we should do it too, this is not incompatible with Atari
documentation because if refer to this an application should not use it!.
>  2. If ('scroll' > 1), enable scrolling when
>     entries > ('scroll' < 8 ? 8 : 'scroll')
Why would you restrict to max 8, application should perhaps prefer 10 or other,
in fact it should be restrict to max possible scroll item that AES can redraw
on screen.
And probably it is possible to have scroll==1 with only 1 object display

>  3. If ('scroll' >= 0 && 'scroll' < 2) then disable scroll.

>  This should not break any existing apps, since I think most apps
> actually use -1 to enable popup, while offering a way to set the number
> of entries to the app.
>  This implementation is present in XaAES as of next cvs checkin from me,
> but if there are strong objections I will remove it again. Ideas?
> Comments?
My point of view, I never test it at this time, perhaps I'm wrong.

If I look TOS 4.04 AES code this look something like this.
>  Best Regards
> Odd Skancke