company logo

ActionItem :: addSubItem - Add subitem

The function is typically used for updating dynamic menus during run-time (e.h. for displaying last recently opened files).

In order to create or expand the list of sub items for an action item (e.g. sub menu o short cuts), sub items may be added by item and action name. Further properties might be set calling action property functions as image(), label() or plainText().

Return value:  Position in collection ( int32  )

The position of an entry in a collection or list is the number of the entry in the collection beginning with 0 for the first entry.

Implementation overview

Implementation details

  1. Add subitem by name
    int32 ActionItem  :: addSubItem ( odaba::String &sName, odaba::String &sAction )

    The function appends a sub item with the name passed in sName. The name for the action to be called is passed in sAction.

    • sName - Resource or entity name

      The name refers to a design or GUI resource.

    • sAction - Action name
  2. to list
  3. Insert subitem at position
    int32 ActionItem  :: addSubItem ( odaba::String &sName, odaba::String &sAction, int32 iPosition )

    The function inserted a sub item with the name passed in sName at position passed in iPosition. The name for the action to be called is passed in sAction.

    • sName - Resource or entity name

      The name refers to a design or GUI resource.

    • sAction - Action name
    • iPosition - Position in collection

      The position of an entry in a collection or list is the number of the entry in the collection beginning with 0 for the first entry.

  4. to list