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 BACKGROUND
Since SmartDeviceLink 1.0
see SDLDeleteSubMenu SDLAddCommand SDLDeleteCommand
- (nonnull instancetype)initWithMenuID:(UInt32)menuID
menuName:(nonnull NSString *)menuName;
init(menuID: UInt32, menuName: String)
- @(menuID)
- menuName
A SDLAddSubMenu object
- (nonnull instancetype)initWithMenuID:(UInt32)menuID
menuName:(nonnull NSString *)menuName
position:(nullable NSNumber<SDLUInt> *)position
menuIcon:(nullable SDLImage *)menuIcon
menuLayout:(nullable SDLMenuLayout)menuLayout
parentID:(nullable NSNumber<SDLUInt> *)parentID;
init(menuID: UInt32, menuName: String, position: (NSNumber & SDLUInt)?, menuIcon: SDLImage?, menuLayout: SDLMenuLayout?, parentID: (NSNumber & SDLUInt)?)
- @(menuID)
- menuName
- position
- menuIcon
- menuLayout
- parentID
A SDLAddSubMenu object
- (nonnull instancetype)initWithMenuID:(UInt32)menuID
menuName:(nonnull NSString *)menuName
position:(nullable NSNumber<SDLUInt> *)position
menuIcon:(nullable SDLImage *)menuIcon
menuLayout:(nullable SDLMenuLayout)menuLayout
parentID:(nullable NSNumber<SDLUInt> *)parentID
secondaryText:(nullable NSString *)secondaryText
tertiaryText:(nullable NSString *)tertiaryText
secondaryImage:(nullable SDLImage *)secondaryImage;
init(menuID: UInt32, menuName: String, position: (NSNumber & SDLUInt)?, menuIcon: SDLImage?, menuLayout: SDLMenuLayout?, parentID: (NSNumber & SDLUInt)?, secondaryText: String?, tertiaryText: String?, secondaryImage: SDLImage?)
- @(menuID)
- menuName
- position
- menuIcon
- menuLayout
- parentID
- secondaryText
- tertiaryText
- secondaryImage
A SDLAddSubMenu object
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 (nonatomic, strong) NSNumber<SDLInt> *_Nonnull menuID;
var menuID: NSNumber & SDLInt { get set }
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 (nonatomic, strong, nullable) NSNumber<SDLInt> *position;
var position: (NSNumber & SDLInt)? { get set }
a menuName which is displayed representing this submenu item @discussion NSString which will be displayed representing this submenu item
@property (nonatomic, strong) NSString *_Nonnull menuName;
var menuName: String { get set }
An image that is displayed alongside this submenu item
@property (nonatomic, strong, nullable) SDLImage *menuIcon;
var menuIcon: SDLImage? { get set }
The sub-menu layout. See available menu layouts on SDLWindowCapability.menuLayoutsAvailable. Defaults to LIST.
@property (nonatomic, strong, nullable) SDLMenuLayout menuLayout;
var menuLayout: SDLMenuLayout? { get set }
Unique ID of the sub menu the command will be added to. If not provided or 0, it will be provided to the top level of the in application menu. {“default_value”: 0, “max_value”: 2000000000, “min_value”: 0}
@since SDL 7.0.0
@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *parentID;
var parentID: (NSNumber & SDLUInt)? { get set }
Optional secondary text to display {“string_min_length”: 1, “string_max_length”: 500}
@added in SmartDeviceLink 7.1.0
@property (nonatomic, strong, nullable) NSString *secondaryText;
var secondaryText: String? { get set }
Optional tertiary text to display {“string_min_length”: 1, “string_max_length”: 500}
@added in SmartDeviceLink 7.1.0
@property (nonatomic, strong, nullable) NSString *tertiaryText;
var tertiaryText: String? { get set }
Optional secondary image struct for sub-menu cell
@added in SmartDeviceLink 7.1.0
@property (nonatomic, strong, nullable) SDLImage *secondaryImage;
var secondaryImage: SDLImage? { get set }