Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLSoftButton Class Reference

Section Contents

Overview

Describes an on-screen button which may be presented in various contexts, e.g. templates or alerts

-initWithHandler:

Undocumented

Objective-C

- (instancetype)initWithHandler:(nullable SDLRPCButtonNotificationHandler)handler;

Swift

init(handler: SDLRPCButtonNotificationHandler? = nil)

-initWithType:text:image:highlighted:buttonId:systemAction:handler:

Undocumented

Objective-C

- (instancetype)initWithType:(SDLSoftButtonType)type text:(nullable NSString *)text image:(nullable SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(nullable SDLSystemAction)systemAction handler:(nullable SDLRPCButtonNotificationHandler)handler;

Swift

init(type: SDLSoftButtonType, text: String?, image: SDLImage?, highlighted: Bool, buttonId: UInt16, systemAction: SDLSystemAction?, handler: SDLRPCButtonNotificationHandler? = nil)

handler

Undocumented

Objective-C

@property (copy, nonatomic) SDLRPCButtonNotificationHandler handler

Swift

var handler: SDLRPCButtonNotificationHandler { get set }

type

Describes whether this soft button displays only text, only an image, or both

Required

Objective-C

@property (readwrite, strong, nonatomic) SDLSoftButtonType _Nonnull type;

Swift

var type: SDLSoftButtonType { get set }

text

Optional text to display (if defined as TEXT or BOTH type)

Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSString *text;

Swift

var text: String? { get set }

image

Optional image struct for SoftButton (if defined as IMAGE or BOTH type)

Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLImage *image;

Swift

var image: SDLImage? { get set }

isHighlighted

Displays in an alternate mode, e.g. with a colored background or foreground. Depends on the IVI system.

Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *isHighlighted;

Swift

var isHighlighted: (NSNumber & SDLBool)? { get set }

softButtonID

Value which is returned via OnButtonPress / OnButtonEvent

Required

Objective-C

@property (readwrite, strong, nonatomic) NSNumber<SDLInt> *_Nonnull softButtonID;

Swift

var softButtonID: NSNumber & SDLInt { get set }

systemAction

Parameter indicating whether selecting a SoftButton shall call a specific system action. This is intended to allow Notifications to bring the callee into full / focus; or in the case of persistent overlays, the overlay can persist when a SoftButton is pressed.

Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLSystemAction systemAction;

Swift

var systemAction: SDLSystemAction? { get set }
View on GitHub.com
Previous Section Next Section