Home
last modified time | relevance | path

Searched refs:CustomSpan (Results 1 – 23 of 23) sorted by relevance

/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/span/
H A Dspan_object.cpp593 CustomSpan::CustomSpan() : SpanBase(0, 1) {} in CustomSpan() function in OHOS::Ace::CustomSpan
595 CustomSpan::CustomSpan(std::optional<std::function<CustomSpanMetrics(CustomSpanMeasureInfo)>> onMea… in CustomSpan() function in OHOS::Ace::CustomSpan
600 CustomSpan::CustomSpan(std::optional<std::function<CustomSpanMetrics(CustomSpanMeasureInfo)>> onMea… in CustomSpan() function in OHOS::Ace::CustomSpan
605 void CustomSpan::SetOnMeasure(std::function<CustomSpanMetrics(CustomSpanMeasureInfo)> onMeasure) in SetOnMeasure()
610 void CustomSpan::SetOnDraw(std::function<void(NG::DrawingContext&, CustomSpanOptions)> onDraw) in SetOnDraw()
625 RefPtr<SpanBase> CustomSpan::GetSubSpan(int32_t start, int32_t end) in GetSubSpan()
630 RefPtr<SpanBase> spanBase = MakeRefPtr<CustomSpan>(onMeasure_, onDraw_, start, end); in GetSubSpan()
634 SpanType CustomSpan::GetSpanType() const in GetSpanType()
636 return SpanType::CustomSpan; in GetSpanType()
657 std::string CustomSpan::ToString() const in ToString()
[all …]
H A Dspan_string.cpp76 SpanString::SpanString(RefPtr<CustomSpan>& span) : text_(" ") in SpanString()
84 spansMap_[SpanType::CustomSpan].emplace_back(span); in SpanString()
89 auto spanBases = GetSpans(0, GetLength(), SpanType::CustomSpan); in AddCustomSpan()
91 if (spanBase->GetSpanType() != SpanType::CustomSpan) { in AddCustomSpan()
94 auto customSpan = DynamicCast<CustomSpan>(spanBase); in AddCustomSpan()
106 if (spanBase->GetSpanType() != SpanType::CustomSpan) { in RemoveCustomSpan()
109 auto customSpan = DynamicCast<CustomSpan>(spanBase); in RemoveCustomSpan()
319 } else if (type == SpanType::CustomSpan) { in AddSpecialSpan()
320 auto customSpan = AceType::DynamicCast<CustomSpan>(span); in AddSpecialSpan()
496 if (key == SpanType::CustomSpan) { in RemoveSpan()
[all …]
H A Dspan_object.h47 CustomSpan = 400, enumerator
289 class CustomSpan : public SpanBase {
290 DECLARE_ACE_TYPE(CustomSpan, SpanBase);
293 CustomSpan();
294 …explicit CustomSpan(std::optional<std::function<CustomSpanMetrics(CustomSpanMeasureInfo)>> onMeasu…
297 …explicit CustomSpan(std::optional<std::function<CustomSpanMetrics(CustomSpanMeasureInfo)>> onMeasu…
299 virtual ~CustomSpan() override = default;
H A Dmutable_span_string.cpp37 const std::vector<SpanType> specailTypes = { SpanType::Image, SpanType::CustomSpan };
58 if (spanKey != SpanType::CustomSpan && spanKey != SpanType::Image) { in RemoveSpans()
63 if (spanKey != SpanType::CustomSpan && spanKey != SpanType::Image) { in RemoveSpans()
152 …->spanItemType == NG::SpanItemType::IMAGE || (*it)->spanItemType == NG::SpanItemType::CustomSpan) { in HandleSpanOperation()
224 if (spanType == SpanType::Image || spanType == SpanType::CustomSpan) { in ProcessSpanBaseList()
556 …if (spansMap_.find(SpanType::Image) == spansMap_.end() && spansMap_.find(SpanType::CustomSpan) == … in IsInsertAroundSpecialNode()
H A Dspan_string.h41 explicit SpanString(RefPtr<CustomSpan>& span);
111 RefPtr<NG::CustomSpanItem> MakeCustomSpanItem(const RefPtr<CustomSpan>& customSpan);
H A Dmutable_span_string.h35 explicit MutableSpanString(RefPtr<CustomSpan>& span) : SpanString(span) {} in MutableSpanString()
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkui/arkui-ts/
H A Dts-universal-styled-string.md20 constructor(value: string | ImageAttachment | CustomSpan , styles?: Array\<StyleOptions>)
32 …chment](#imageattachment) \| [CustomSpan](#customspan) | 是 | 属性字符串文本内容。<br/>**说明:** <br/>当value值为I…
43 | length | number | 是 | 否 | 属性字符串字符的长度。<br/>**说明:** <br/>当属性字符串中包含图片或者CustomSpan时,其返回的长度按1计算。 |
136 …时,会抛出异常;<br/>当styledKey传入异常值或undefined时,会抛出异常。<br/>当styledKey为CustomSpan时,返回的是创建CustomSpan时传入的样式对象…
504 | [CustomSpan](#customspan) | 自定义绘制Span样式。 |
852 ## CustomSpan section
880 … | 自定义绘制Span的尺寸信息。<br/>**说明:** <br/>最终的CustomSpan的高度是由当前Text组件的行高所决定的。当height不传值,则默认取Text组件的fontSi…
903 主动刷新使用CustomSpan的Text组件。
1818 该示例通过CustomSpan接口实现属性字符串设置自定义绘制Span。
1825 class MyCustomSpan extends CustomSpan {
[all …]
H A Dts-basic-components-text.md69 …tAlign属性生效;在文本可滚动时,设置textAlign属性不生效。在跑马灯模式下,Text组件clip属性默认为true。属性字符串的[CustomSpan](ts-universal-st…
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/style_string/
H A Djs_span_string.cpp166 RefPtr<CustomSpan> customSpan = JSSpanString::ParseJsCustomSpan(args); in Constructor()
302 } else if (type == SpanType::CustomSpan) { in CreateJsSpanObject()
423 if (type == SpanType::CustomSpan) { in ParseJsSpanBaseWithoutSpecialSpan()
676 if (type == SpanType::Image || type == SpanType::CustomSpan) { in ParseJsSpanBaseVector()
714 RefPtr<CustomSpan> JSSpanString::ParseJsCustomSpan(const JSCallbackInfo& args) in ParseJsCustomSpan()
905 RefPtr<CustomSpan> customSpan = JSSpanString::ParseJsCustomSpan(args); in Constructor()
1009 return mutableSpanString->IsSpeicalNode(location, SpanType::CustomSpan); in IsCustomSpanNode()
1063 if (type == SpanType::CustomSpan && !VerifyCustomSpanParameters(start, length)) { in ReplaceSpan()
1112 if (type == SpanType::CustomSpan && !VerifyCustomSpanParameters(start, length)) { in AddSpan()
1129 } else if (type == SpanType::CustomSpan) { in AddSpan()
[all …]
H A Djs_span_object.h307 class JSCustomSpan : public CustomSpan {
308 DECLARE_ACE_TYPE(JSCustomSpan, CustomSpan)
H A Djs_span_string.h82 static RefPtr<CustomSpan> ParseJsCustomSpan(const JSCallbackInfo& args);
H A Djs_span_object.cpp992 CustomSpan::SetOnMeasure(onMeasureFunc); in JSCustomSpan()
998 CustomSpan::SetOnDraw(onDrawFunc); in JSCustomSpan()
1009 : CustomSpan(onMeasure, onDraw, start, end), customSpanObj_(customSpanObj) in JSCustomSpan()
/ohos5.0/docs/en/application-dev/reference/apis-arkui/arkui-ts/
H A Dts-universal-styled-string.md20 constructor(value: string | ImageAttachment | CustomSpan , styles?: Array\<StyleOptions>)
30 …hment) \| [CustomSpan](#customspan) | Yes| Text of the styled string.<br>**NOTE**<br>If this param…
79 … except for the event configured, they are the same.<br>In comparing **CustomSpan** objects, addre…
483 …tyle | ImageAttachment | ParagraphStyle | LineHeightStyle | UrlStyle | CustomSpan | UserDataSpan |…
502 | [CustomSpan](#customspan) | Custom span style.|
850 ## CustomSpan section
901 Manually triggers a refresh of the **Text** component that uses this **CustomSpan**.
1028 | CUSTOM_SPAN | Custom span key, applicable to [CustomSpan](./ts-universal-styled-string.md#customs…
1816 This example shows how to set custom spans within styled strings using the **CustomSpan** API.
1823 class MyCustomSpan extends CustomSpan {
[all …]
H A Dts-basic-components-text.md69 …to **true** by default. **TextOverflow.MARQUEE** is not available for [CustomSpan](ts-universal-st…
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/rich_editor/
H A Drich_editor_content_modifier_test_ng.cpp121 auto customSpan = AceType::MakeRefPtr<CustomSpan>(); in CreateCustomSpanStyledString()
H A Drich_editor_styled_string_test_ng.cpp117 auto customSpan = AceType::MakeRefPtr<CustomSpan>(); in CreateCustomSpanStyledString()
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/text/
H A Dspan_string_test_ng.cpp341 auto customSpan = AceType::MakeRefPtr<CustomSpan>();
345 auto span = AceType::DynamicCast<CustomSpan>(spans[0]);
354 auto span0 = AceType::DynamicCast<CustomSpan>(spans[0]);
359 auto span1 = AceType::DynamicCast<CustomSpan>(spans[1]);
383 auto customSpan = AceType::MakeRefPtr<CustomSpan>();
1393 auto customSpan = AceType::MakeRefPtr<CustomSpan>();
/ohos5.0/docs/zh-cn/application-dev/ui/
H A Darkts-styled-string.md5 属性字符串提供多种类型样式对象,涵盖各种常见的文本样式格式,例如文本装饰线样式、文本行高样式、文本阴影样式等。也可以自行创建CustomSpan,以应用自定义样式。
493 class MyCustomSpan extends CustomSpan {
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/
H A Dspan_node.h153 enum class SpanItemType { NORMAL = 0, IMAGE = 1, CustomSpan = 2, SYMBOL = 3 }; enumerator
694 this->spanItemType = SpanItemType::CustomSpan; in CustomSpanItem()
H A Dtext_pattern.cpp2310 if (span->spanItemType == SpanItemType::CustomSpan) { in GetSubComponentInfosForSpans()
/ohos5.0/docs/en/application-dev/ui/
H A Darkts-styled-string.md5 …decorative lines, line height, and text shadows. You can also create **CustomSpan** objects to app…
488 class MyCustomSpan extends CustomSpan {
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/rich_editor/
H A Drich_editor_pattern.cpp448 if (spanType == SpanType::Image || spanType == SpanType::CustomSpan) { in BeforeStyledStringChange()
1068 spanItem->spanItemType = SpanItemType::CustomSpan; in AddPlaceholderSpan()
1785 if (style && style->GetSpanType() == SpanType::CustomSpan) { in IsCustomSpanInCaretPos()
4138 case SpanItemType::CustomSpan: { in InitPlaceholderSpansMap()
11023 auto customSpan = MakeRefPtr<CustomSpan>(); in OnBackPressed()
11075 case SpanItemType::CustomSpan: in OnBackPressed()
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/
H A DjsEnumStyle.js3313 class CustomSpan extends NativeCustomSpan { class