By dave | November 15, 2020

Action menu items represent a menu item that does nothing more than run the callback when it is selected. There is no hard requirement for it to have a callback, but one without a callback would have no purpose.

Type information for ActionMenuItem

Creating an object from the designer

Choose to add a new menu item, and from the dialog choose Float item, once created the properties panel will look similar to:

image showing the action editor

Action Editor UI

For action items there are no special fields over and above the ones for all menu items.

Accessing action menu items from code

There are no specific functions for action items.

Creating an action menu item manually

In nearly all cases it’s better to create items using the designer. However, this is how you create an additional action item manually should it be required.

const ActionMenuInfo minfoActionItem = { "Action Item", myId, 0xFFFF,
                                         0, myCallback };
ActionMenuItem menuActionItem(&minfoActionItem, &nextMenuItem);

Above we create an action item along with it’s associated info structure. myId should be replaced with the unique ID for the item, myCallback will be called when the item is selected.

Other pages within this category

comments powered by Disqus

We use cookies to analyse traffic and to personalise content. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Please see our privacy policy should you need more information or wish to adjust your settings.

Send a message

This message will be securely transmitted to Nutricherry LTD servers.