MSFTextStyleBuilder
Objective-C
@interface MSFTextStyleBuilder : MSFLabelStyleBuilder
Swift
class MSFTextStyleBuilder : MSFLabelStyleBuilder
A builder class for TextStyle.
-
Constructs a TextStyleBuilder object with all parameters set to defaults.
Declaration
Objective-C
- (id)init;Swift
init!() -
Returns the font name for the text label.
Declaration
Objective-C
- (NSString *)getFontName;Swift
func getFontName() -> String!Return Value
The platform dependent font name for the text label.
-
Sets the font name for the text label. Accepts a CSS-like list, the most preferred name first, entries optionally tagged with the platform they are for (“android:Roboto, ios:Helvetica Neue, sans-serif”). A name the device has no font for is skipped; generic names (“sans-serif”, “serif”, “monospace”, “Arial”, …) map to the platform font.
Declaration
Objective-C
- (void)setFontName:(NSString *)fontName;Swift
func setFontName(_ fontName: String!)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;Swift
func getTextField() -> String!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;Swift
func setTextField(_ field: String!)Parameters
fieldThe text field to use for displaying text from metainfo.
-
Returns the font size for the text label.
Declaration
Objective-C
- (float)getFontSize;Swift
func getFontSize() -> FloatReturn 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;Swift
func setFontSize(_ size: Float)Parameters
sizeThe new font size for the text label in points.
-
Returns the state of the ‘break lines’ flag.
Declaration
Objective-C
- (BOOL)isBreakLines;Swift
func isBreakLines() -> BoolReturn 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;Swift
func setBreakLines(_ enable: Bool) -
Returns the margins for the text.
Declaration
Objective-C
- (MSFTextMargins *)getTextMargins;Swift
func getTextMargins() -> MSFTextMargins!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:(MSFTextMargins *)textMargins;Swift
func setTextMargins(_ textMargins: MSFTextMargins!)Parameters
textMarginsThe new margins for the text in dp.
-
Returns the stroke width for the text label.
Declaration
Objective-C
- (float)getStrokeWidth;Swift
func getStrokeWidth() -> FloatReturn 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;Swift
func setStrokeWidth(_ strokeWidth: Float)Parameters
strokeWidthThe new stroke width for the text label in screen density independent pixels.
-
Returns the border width for the text label.
Declaration
Objective-C
- (float)getBorderWidth;Swift
func getBorderWidth() -> FloatReturn 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;Swift
func setBorderWidth(_ borderWidth: Float)Parameters
borderWidthThe new border width for the text label in screen density independent pixels. By default the border width is 0.
-
Sets the background color for the text label.
Declaration
Objective-C
- (void)setBackgroundColor:(MSFColor *)backgroundColor;Swift
func setBackgroundColor(_ backgroundColor: MSFColor!)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.
Return Value
A new TextStyle object.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()