NTTextStyleBuilder
@interface NTTextStyleBuilder : NTLabelStyleBuilder
A builder class for TextStyle.
-
Constructs a TextStyleBuilder object with all parameters set to defaults.
Declaration
Objective-C
- (id)init; -
Returns the font name for the text label.
Declaration
Objective-C
- (NSString *)getFontName;Return Value
The platform dependent font name for the text label.
-
Sets the font name for the text label.
Declaration
Objective-C
- (void)setFontName:(NSString *)fontName;Parameters
fontNameThe new platform dependent font name for the text label.
-
Returns the text field variable. If not empty, this variable is used to read actual text string from object meta info.
Declaration
Objective-C
- (NSString *)getTextField;Return Value
The current text variable.
-
Sets the text field variable. If not empty, this variable is used to read actual text string from object meta info.
Declaration
Objective-C
- (void)setTextField:(NSString *)field;Parameters
fieldThe text field to use for displaying text from metainfo.
-
Returns the font size for the text label.
Declaration
Objective-C
- (float)getFontSize;Return Value
The font size for the text label in points.
-
Sets the font size for the text label.
Declaration
Objective-C
- (void)setFontSize:(float)size;Parameters
sizeThe new font size for the text label in points.
-
Returns the state of the ‘break lines’ flag.
Declaration
Objective-C
- (BOOL)isBreakLines;Return Value
The state of the ‘break lines’ flag.
-
Sets the state of the ‘break lines’ flag. If enabled, texts containing CR or NL characters are split into multiple lines. By default the flag is false, due to backward compatibility reasons.
Declaration
Objective-C
- (void)setBreakLines:(BOOL)enable; -
Returns the margins for the text.
Declaration
Objective-C
- (NTTextMargins *)getTextMargins;Return Value
The margins for the text.
-
Sets the margins for the text. The margins will determine how much empty space should surround the text. The default is TextMargins(0, 0, 0, 0).
Declaration
Objective-C
- (void)setTextMargins:(NTTextMargins *)textMargins;Parameters
textMarginsThe new margins for the text in dp.
-
Returns the stroke color for the text label.
Declaration
Objective-C
- (NTColor *)getStrokeColor;Return Value
The stroke color for the text label.
-
Sets the stroke color for the text label.
Declaration
Objective-C
- (void)setStrokeColor:(NTColor *)strokeColor;Parameters
strokeColorThe new stroke color for the text label.
-
Returns the stroke width for the text label.
Declaration
Objective-C
- (float)getStrokeWidth;Return Value
The stroke width for the text label in screen density independent pixels.
-
Sets the stroke width for the text label.
Declaration
Objective-C
- (void)setStrokeWidth:(float)strokeWidth;Parameters
strokeWidthThe new stroke width for the text label in screen density independent pixels.
-
Returns the border color for the text label.
Declaration
Objective-C
- (NTColor *)getBorderColor;Return Value
The border color for the text label.
-
Sets the border color for the text label.
Declaration
Objective-C
- (void)setBorderColor:(NTColor *)borderColor;Parameters
borderColorThe new border color for the text label. By default the border color is transparent.
-
Returns the border width for the text label.
Declaration
Objective-C
- (float)getBorderWidth;Return Value
The border width for the text label in screen density independent pixels.
-
Sets the border width for the text label.
Declaration
Objective-C
- (void)setBorderWidth:(float)borderWidth;Parameters
borderWidthThe new border width for the text label in screen density independent pixels. By default the border width is 0.
-
Returns the background color for the text label.
Declaration
Objective-C
- (NTColor *)getBackgroundColor;Return Value
The background color for the text label.
-
Sets the background color for the text label.
Declaration
Objective-C
- (void)setBackgroundColor:(NTColor *)backgroundColor;Parameters
backgroundColorThe new background color for the text label. By default the background color is transparent.
-
Builds a new instance of the TextStyle object using previously set parameters.
Declaration
Objective-C
- (NTTextStyle *)buildStyle;Return Value
A new TextStyle object.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;
View on GitHub
NTTextStyleBuilder Class Reference