UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
Label Class Reference

A class representing a label for TSPL. More...

#include <Label.h>

Inheritance diagram for Label:
<ILabel>

Instance Methods

(instancetype) - initWithName:
 Initializes a new instance of the Label class with the specified name.
 
(void) - addObject:
 Adds an object that can be converted to printer language syntax to the label.
 
(void) - addRawContent:
 Adds raw content to the label for cases where custom content needs to be added.
 
(NSString *) - description
 Returns a string that can be sent to the printer.
 
(void) - SetName:
 Sets the name of the label.
 

Properties

TsplFormform
 The form associated with the label.
 
Scalescale
 The scale associated with the label.
 
NSString * name
 The name of the label.
 
- Properties inherited from <ILabel>
NSString * name
 Name of label that may be used to identify it from other labels.
 

Detailed Description

A class representing a label for TSPL.

This class implements the ILabel protocol and provides functionality for initializing, adding objects and raw content, and describing labels in TSPL.

Method Documentation

◆ addObject:

- (void) addObject: (id) addObject

Adds an object that can be converted to printer language syntax to the label.

Parameters
addObjectThe object to be added to the label.

Reimplemented from <ILabel>.

◆ addRawContent:

- (void) addRawContent: (NSString *) rawContent

Adds raw content to the label for cases where custom content needs to be added.

Adding raw content allows the addition of printer language commands or other features that may not be available. No formatting of the content is done; the caller is responsible for making sure the content follows printer language syntax.

Parameters
rawContentThe raw content to be added to the label.

Reimplemented from <ILabel>.

◆ description

- (NSString *) description

Returns a string that can be sent to the printer.

This method generates a string representation of the Label instance that is formatted and ready to be sent to a printer. The string includes all the necessary commands and data required for printing in TSPL.

Returns
A string description of the Label instance.

Reimplemented from <ILabel>.

◆ initWithName:

- (instancetype) initWithName: (NSString *) name

Initializes a new instance of the Label class with the specified name.

Parameters
nameThe name of the label.
Returns
A new instance of Label.

◆ SetName:

- (void) SetName: (NSString *) name

Sets the name of the label.

Parameters
nameThe new name for the label.

Property Documentation

◆ form

- (TsplForm*) form
readwritenonatomicstrong

The form associated with the label.

◆ name

- (NSString*) name
readwritenonatomicstrong

The name of the label.

◆ scale

- (Scale*) scale
readwritenonatomicstrong

The scale associated with the label.


The documentation for this class was generated from the following file: