# OHOS::TextAdapter ## **Overview** **Related Modules:** [Graphic](Graphic.md) **Description:** Defines a text adapter, which implements [UILabel](OHOS-UILabel.md) instance construction and supports text data and continuous integer data. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions
TextAdapter () |
A constructor used to create a UILabel instance. |
~TextAdapter () |
A destructor used to delete the UILabel instance. |
UIView * Obtains a UILabel instance to convert adapter data into another UILabel instance. |
|
Sets the UILabel adapter data, which is a string linked list. |
|
SetData (int16_t start, int16_t end) |
Sets continuously increasing data. For example, if you need to set data 0, 1, 2, 3, 4, use this function to set start to 0 and end to 4. |
SetFontId (uint8_t fontId) |
|
GetFontId () const |
|
SetFont (const char *name, uint8_t size) |
|
GetStyle () |
Style & Obtains the UILabel adapter style. |
GetCount () override |
Obtains the data size of the UILabel adapter. |
SetWidth (int16_t width) |
Sets the width of UILabel constructed by the adapter. |
SetDirect (UITextLanguageDirect direct) |
Sets the direction of the UILabel constructed by the adapter. |
SetHeight (int16_t height) |
Sets the height of the UILabel constructed by the adapter. |
SetLineBreakMode (const uint8_t lineBreakMode) |
Sets the LineBreakMode attribute of UILabel constructed by the adapter. For details about the values of LineBreakMode, see LINE_BREAK_ADAPT, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS, and LINE_BREAK_MARQUEE. |
SetOnClickListener (UIView::OnClickListener *clickListener) |
Sets the callback function to be invoked upon a click event. |
SetTextFormatter (TextFormatter *formatter) |
|
A constructor used to create an AbstractAdapter instance. |
|
A destructor used to delete the AbstractAdapter instance. |
|
operator new (size_t size) |
|
operator delete (void *p) |