MenuClass

Report errors, omissions, etc. regarding the AmigaOS Documentation Wiki here.
Post Reply
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

MenuClass

Post by chris »

The MenuClass page is missing any information on how to set a menu item as MENUTOGGLE and MX. It only describes how to read/set the currently selected state.
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: MenuClass

Post by ssolie »

ExecSG Team Lead
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: MenuClass

Post by chris »

Not really, as that doesn't explain how to set the items as selectable. Something akin to the notes in the includes would suffice:

Code: Select all

#define MA_Toggle       (MA_Dummy + 9)
    /* (BOOL) If TRUE, the item represents an option which can be switched on
     * or off. The user will be able to toggle the state of the item between
     * checked (on) and unchecked (off), and the item will have a checkmark
     * symbol at its left side indicating its state. The actual state of the
     * item can be read at any time via the MA_Selected attribute or with the
     * MM_GETSTATE method. Defaults to FALSE.
     */

#define MA_MX           (MA_Dummy + 10)
    /* (uint32) If non-zero, the item represents an option which is mutually
     * exclusive with certain other options, that are therefore switched off
     * when this one gets switched on. The attribute's value is a bit mask
     * indicating what other items in the same menu or sub-menu panel must be
     * excluded (i.e. unselected) when the item is selected. Bit 0 represents
     * the first item, bit 1 the second one, and so on. A typical value for
     * MA_MX is ~(1 << N), with N being the bit number of the item itself:
     * that means "exclude all items except this one". A mutual exclude item
     * will have a special symbol (usually resembling a radio button) at its
     * left side indicating its state. The actual state of the item can be
     * read at any time via the MA_Selected attribute or with the MM_GETSTATE
     * method. Defaults to zero, i.e. no mutual exclusion at all.
     */
Possibly with an MX example as that can be a little confusing if you've not used it before.
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: MenuClass

Post by ssolie »

chris wrote:
ssolie wrote:Something akin to the notes in the includes would suffice...
If it is already documented in the includes then I think that is enough. The wiki is not meant to replace the includes.
ExecSG Team Lead
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: MenuClass

Post by chris »

I don't see what the point of the wiki is, then, if it's only going to half-document something? I see why you'd want to keep the more esoteric features out of the wiki, but toggle and MX features are pretty standard. At the moment, you have to go to a different file completely to get this information, which isn't helpful if you don't have the SDK in front of you (as I didn't when I was looking for this myself).
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: MenuClass

Post by ssolie »

chris wrote:I don't see what the point of the wiki is...
The point of the wiki is to explain what is not already explained in the includes and autodocs. Ideally, there would be direct links to the includes and autodocs but that isn't done yet.
ExecSG Team Lead
Post Reply