MenuClass

Report errors, omissions, etc. regarding the AmigaOS Documentation Wiki here.

MenuClass

Postby chris » Mon Jan 09, 2017 1:39 pm

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.
chris
 
Posts: 544
Joined: Sat Jun 18, 2011 12:05 pm

Re: MenuClass

Postby ssolie » Mon Jan 09, 2017 7:06 pm

AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 998
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada

Re: MenuClass

Postby chris » Mon Jan 09, 2017 7:29 pm



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.
chris
 
Posts: 544
Joined: Sat Jun 18, 2011 12:05 pm

Re: MenuClass

Postby ssolie » Tue Jan 10, 2017 6:56 pm

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.
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 998
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada

Re: MenuClass

Postby chris » Tue Jan 10, 2017 7:38 pm

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).
chris
 
Posts: 544
Joined: Sat Jun 18, 2011 12:05 pm

Re: MenuClass

Postby ssolie » Fri Jan 13, 2017 1:19 am

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.
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 998
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada


Return to AmigaOS Documentation Wiki

Who is online

Users browsing this forum: No registered users and 1 guest

cron