// SDLAddSubMenu.h #import "SDLRPCRequest.h" #import "SDLMenuLayout.h" @class SDLImage; /** * Add a SDLSubMenu to the Command Menu *

* A SDLSubMenu can only be added to the Top Level Menu (i.e.a SDLSubMenu cannot be * added to a SDLSubMenu), and may only contain commands as children *

*

* HMILevel needs to be FULL, LIMITED or BACKGROUD *

* * Since SmartDeviceLink 1.0
* see SDLDeleteSubMenu SDLAddCommand SDLDeleteCommand */ NS_ASSUME_NONNULL_BEGIN @interface SDLAddSubMenu : SDLRPCRequest /// Convenience init for creating an add submenu /// /// @param menuId A menu id /// @param menuName The menu name /// @return An SDLAddSubMenu object - (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName; /// Convenience init for creating an add submenu /// /// @param menuId A menu id /// @param menuName The menu name /// @param position The position within the menu to add /// @return An SDLAddSubMenu object - (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName position:(UInt8)position __deprecated_msg("Use initWithId:menuName:menuLayout:menuIcon:position: instead"); /// Convenience init for creating an add submenu /// /// @param menuId A menu id /// @param menuName The menu name /// @param icon The icon to show on the menu item /// @param position The position within the menu to add /// @return An SDLAddSubMenu object - (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuIcon:(nullable SDLImage *)icon position:(UInt8)position __deprecated_msg("Use initWithId:menuName:menuLayout:menuIcon:position: instead"); /// Convenience init for creating an add submenu with all properties. /// /// @param menuId A menu id /// @param menuName The menu name /// @param menuLayout The sub-menu layout /// @param icon The icon to show on the menu item /// @param position The position within the menu to add /// @return An SDLAddSubMenu object - (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuLayout:(nullable SDLMenuLayout)menuLayout menuIcon:(nullable SDLImage *)icon position:(UInt8)position; /** * a Menu ID that identifies a sub menu * @discussion This value is used in * SDLAddCommand to which SDLSubMenu is the parent of the command being added *

*/ @property (strong, nonatomic) NSNumber *menuID; /** * a position of menu * @discussion An NSNumber pointer representing the position within the items * of the top level Command Menu. 0 will insert at the front, 1 * will insert after the first existing element, etc. Position of * any submenu will always be located before the return and exit * options *

* Notes:
*

*/ @property (strong, nonatomic, nullable) NSNumber *position; /** * a menuName which is displayed representing this submenu item * @discussion NSString which will be displayed representing this submenu item */ @property (strong, nonatomic) NSString *menuName; /** An image that is displayed alongside this submenu item */ @property (strong, nonatomic, nullable) SDLImage *menuIcon; /** The sub-menu layout. See available menu layouts on SDLWindowCapability.menuLayoutsAvailable. Defaults to LIST. */ @property (strong, nonatomic, nullable) SDLMenuLayout menuLayout; @end NS_ASSUME_NONNULL_END