IPCMobileDisplayCardConfig
public struct IPCMobileDisplayCardConfig : Equatable
Configuration structure for displaying a “card” or message on an IPCMobile scanner’s screen.
-
The primary message text to be displayed on the card. Defaults to “Message” if an empty string is provided.
Declaration
Swift
public let message: String -
The width of the display card in device-specific units. Must be greater than 0. Default is 1.
Declaration
Swift
public let width: Int -
The height of the display card in device-specific units. Must be greater than 0. Default is 1.
Declaration
Swift
public let height: Int -
The background color of the card, specified as a hex string (e.g., “#004F94” for blue, “#FFFFFF” for white). Defaults to “#004F94” if an empty string is provided.
Declaration
Swift
public let backgroundColor: String -
The font size for the message text. Must be greater than 0. Default is 1.
Declaration
Swift
public let fontSize: Int -
The font color for the message text, specified as a hex string (e.g., “#FFFFFF” for white, “#000000” for black). Default is “#FFFFFF” if an empty string is provided.
Declaration
Swift
public let fontColor: String -
A Boolean value indicating whether the message text should be rendered in a bold font style.
Declaration
Swift
public let isBold: Bool -
A Boolean value indicating whether the message text should be underlined.
Declaration
Swift
public let isUnderline: Bool -
The Y-axis position (vertical offset) for the text on the card. Must be 0 or greater. Default is 0.
Declaration
Swift
public let textYPosition: Int -
A Boolean value indicating whether the device should play a “good scan” sound when this card is displayed.
Declaration
Swift
public let playGoodSound: Bool -
init(message:width: height: backgroundColor: fontSize: fontColor: isBold: isUnderline: textYPosition: playGoodSound: ) Initializes a new display card configuration for an IPCMobile device.
Provides default values for empty or invalid inputs to ensure basic usability.
Declaration
Swift
public init(message: String, width: Int, height: Int, backgroundColor: String, fontSize: Int, fontColor: String, isBold: Bool, isUnderline: Bool, textYPosition: Int, playGoodSound: Bool)Parameters
messageThe text message.
widthCard width.
heightCard height.
backgroundColorBackground color hex string.
fontSizeFont size.
fontColorFont color hex string.
isBoldText bold state.
isUnderlineText underline state.
textYPositionVertical position of the text.
playGoodSoundWhether to play a success sound.