1 /*
2  * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_BASE_VIEW_ABSTRACT_MODEL_NG_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_BASE_VIEW_ABSTRACT_MODEL_NG_H
18 
19 #include <optional>
20 #include <utility>
21 
22 #include "base/geometry/dimension_offset.h"
23 #include "base/geometry/ng/vector.h"
24 #include "base/geometry/offset.h"
25 #include "base/geometry/rect.h"
26 #include "base/memory/ace_type.h"
27 #include "base/utils/noncopyable.h"
28 #include "base/utils/utils.h"
29 #include "core/components/common/layout/position_param.h"
30 #include "core/components/common/properties/alignment.h"
31 #include "core/components/common/properties/border_image.h"
32 #include "core/components_ng/base/modifier.h"
33 #include "core/components_ng/base/view_abstract.h"
34 #include "core/components_ng/base/view_abstract_model.h"
35 #include "core/components_ng/base/view_stack_processor.h"
36 #include "core/components_ng/event/gesture_event_hub.h"
37 #include "core/components_ng/pattern/menu/menu_pattern.h"
38 #include "core/components_ng/property/border_property.h"
39 #include "core/components_ng/property/calc_length.h"
40 #include "core/components_ng/property/measure_property.h"
41 #include "core/components_ng/property/overlay_property.h"
42 #include "core/components_ng/property/property.h"
43 #include "core/image/image_source_info.h"
44 #include "core/pipeline_ng/pipeline_context.h"
45 
46 namespace OHOS::Ace::NG {
47 class ACE_EXPORT ViewAbstractModelNG : public ViewAbstractModel {
48 public:
49     ~ViewAbstractModelNG() override = default;
50 
SetWidth(const CalcDimension & width)51     void SetWidth(const CalcDimension& width) override
52     {
53         if (width.Unit() == DimensionUnit::CALC) {
54             ViewAbstract::SetWidth(NG::CalcLength(width.CalcValue()));
55         } else {
56             ViewAbstract::SetWidth(NG::CalcLength(width));
57         }
58     }
59 
SetHeight(const CalcDimension & height)60     void SetHeight(const CalcDimension& height) override
61     {
62         if (height.Unit() == DimensionUnit::CALC) {
63             ViewAbstract::SetHeight(NG::CalcLength(height.CalcValue()));
64         } else {
65             ViewAbstract::SetHeight(NG::CalcLength(height));
66         }
67     }
68 
ClearWidthOrHeight(bool isWidth)69     void ClearWidthOrHeight(bool isWidth) override
70     {
71         ViewAbstract::ClearWidthOrHeight(isWidth);
72     }
ResetMinSize(bool resetWidth)73     void ResetMinSize(bool resetWidth) override
74     {
75         ViewAbstract::ResetMinSize(resetWidth);
76     }
ResetMaxSize(bool resetWidth)77     void ResetMaxSize(bool resetWidth) override
78     {
79         ViewAbstract::ResetMaxSize(resetWidth);
80     }
81 
SetMinWidth(const CalcDimension & minWidth)82     void SetMinWidth(const CalcDimension& minWidth) override
83     {
84         if (minWidth.Unit() == DimensionUnit::CALC) {
85             ViewAbstract::SetMinWidth(NG::CalcLength(minWidth.CalcValue()));
86         } else {
87             ViewAbstract::SetMinWidth(NG::CalcLength(minWidth));
88         }
89     }
90 
SetMinHeight(const CalcDimension & minHeight)91     void SetMinHeight(const CalcDimension& minHeight) override
92     {
93         if (minHeight.Unit() == DimensionUnit::CALC) {
94             ViewAbstract::SetMinHeight(NG::CalcLength(minHeight.CalcValue()));
95         } else {
96             ViewAbstract::SetMinHeight(NG::CalcLength(minHeight));
97         }
98     }
99 
SetMaxWidth(const CalcDimension & maxWidth)100     void SetMaxWidth(const CalcDimension& maxWidth) override
101     {
102         if (maxWidth.Unit() == DimensionUnit::CALC) {
103             ViewAbstract::SetMaxWidth(NG::CalcLength(maxWidth.CalcValue()));
104         } else {
105             ViewAbstract::SetMaxWidth(NG::CalcLength(maxWidth));
106         }
107     }
108 
SetMaxHeight(const CalcDimension & maxHeight)109     void SetMaxHeight(const CalcDimension& maxHeight) override
110     {
111         if (maxHeight.Unit() == DimensionUnit::CALC) {
112             ViewAbstract::SetMaxHeight(NG::CalcLength(maxHeight.CalcValue()));
113         } else {
114             ViewAbstract::SetMaxHeight(NG::CalcLength(maxHeight));
115         }
116     }
117 
SetBackgroundColor(const Color & color)118     void SetBackgroundColor(const Color& color) override
119     {
120         ViewAbstract::SetBackgroundColor(color);
121     }
122 
SetBackgroundImage(const ImageSourceInfo & src,RefPtr<ThemeConstants> themeConstant)123     void SetBackgroundImage(const ImageSourceInfo& src, RefPtr<ThemeConstants> themeConstant) override
124     {
125         ViewAbstract::SetBackgroundImage(src);
126     }
127 
SetBackgroundImageRepeat(const ImageRepeat & imageRepeat)128     void SetBackgroundImageRepeat(const ImageRepeat& imageRepeat) override
129     {
130         ViewAbstract::SetBackgroundImageRepeat(imageRepeat);
131     }
132 
SetBackgroundImageSize(const BackgroundImageSize & bgImgSize)133     void SetBackgroundImageSize(const BackgroundImageSize& bgImgSize) override
134     {
135         ViewAbstract::SetBackgroundImageSize(bgImgSize);
136     }
137 
SetBackgroundImagePosition(const BackgroundImagePosition & bgImgPosition)138     void SetBackgroundImagePosition(const BackgroundImagePosition& bgImgPosition) override
139     {
140         ViewAbstract::SetBackgroundImagePosition(bgImgPosition);
141     }
142 
SetBackgroundBlurStyle(const BlurStyleOption & bgBlurStyle)143     void SetBackgroundBlurStyle(const BlurStyleOption& bgBlurStyle) override
144     {
145         ViewAbstract::SetBackgroundBlurStyle(bgBlurStyle);
146     }
147 
SetBackgroundEffect(const EffectOption & effectOption)148     void SetBackgroundEffect(const EffectOption& effectOption) override
149     {
150         ViewAbstract::SetBackgroundEffect(effectOption);
151     }
152 
SetBackgroundImageResizableSlice(const ImageResizableSlice & slice)153     void SetBackgroundImageResizableSlice(const ImageResizableSlice& slice) override
154     {
155         ViewAbstract::SetBackgroundImageResizableSlice(slice);
156     }
157 
SetForegroundBlurStyle(const BlurStyleOption & fgBlurStyle)158     void SetForegroundBlurStyle(const BlurStyleOption& fgBlurStyle) override
159     {
160         ViewAbstract::SetForegroundBlurStyle(fgBlurStyle);
161     }
162 
SetSphericalEffect(double radio)163     void SetSphericalEffect(double radio) override
164     {
165         ViewAbstract::SetSphericalEffect(radio);
166     }
SetPixelStretchEffect(PixStretchEffectOption & option)167     void SetPixelStretchEffect(PixStretchEffectOption& option) override
168     {
169         ViewAbstract::SetPixelStretchEffect(option);
170     }
SetLightUpEffect(double radio)171     void SetLightUpEffect(double radio) override
172     {
173         ViewAbstract::SetLightUpEffect(radio);
174     }
175 
SetDisallowDropForcedly(bool isDisallowDropForcedly)176     void SetDisallowDropForcedly(bool isDisallowDropForcedly) override
177     {
178         ViewAbstract::SetDisallowDropForcedly(isDisallowDropForcedly);
179     }
180 
SetVisualEffect(const OHOS::Rosen::VisualEffect * visualEffect)181     void SetVisualEffect(const OHOS::Rosen::VisualEffect* visualEffect) override
182     {
183         ViewAbstract::SetVisualEffect(visualEffect);
184     }
185 
SetBackgroundFilter(const OHOS::Rosen::Filter * backgroundFilter)186     void SetBackgroundFilter(const OHOS::Rosen::Filter* backgroundFilter) override
187     {
188         ViewAbstract::SetBackgroundFilter(backgroundFilter);
189     }
190 
SetForegroundFilter(const OHOS::Rosen::Filter * foregroundFilter)191     void SetForegroundFilter(const OHOS::Rosen::Filter* foregroundFilter) override
192     {
193         ViewAbstract::SetForegroundFilter(foregroundFilter);
194     }
195 
SetCompositingFilter(const OHOS::Rosen::Filter * compositingFilter)196     void SetCompositingFilter(const OHOS::Rosen::Filter* compositingFilter) override
197     {
198         ViewAbstract::SetCompositingFilter(compositingFilter);
199     }
200 
SetPadding(const CalcDimension & value)201     void SetPadding(const CalcDimension& value) override
202     {
203         if (value.Unit() == DimensionUnit::CALC) {
204             // padding must great or equal zero.
205             ViewAbstract::SetPadding(
206                 NG::CalcLength(value.IsNonNegative() ? value.CalcValue() : CalcDimension().CalcValue()));
207         } else {
208             // padding must great or equal zero.
209             ViewAbstract::SetPadding(NG::CalcLength(value.IsNonNegative() ? value : CalcDimension()));
210         }
211     }
212 
SetPaddings(const std::optional<CalcDimension> & top,const std::optional<CalcDimension> & bottom,const std::optional<CalcDimension> & left,const std::optional<CalcDimension> & right)213     void SetPaddings(const std::optional<CalcDimension>& top, const std::optional<CalcDimension>& bottom,
214         const std::optional<CalcDimension>& left, const std::optional<CalcDimension>& right) override
215     {
216         NG::PaddingProperty paddings = NG::ConvertToCalcPaddingProperty(top, bottom, left, right);
217         ViewAbstract::SetPadding(paddings);
218     }
219 
SetPaddings(const NG::PaddingProperty & paddings)220     void SetPaddings(const NG::PaddingProperty& paddings) override
221     {
222         ViewAbstract::SetPadding(paddings);
223     }
224 
ResetSafeAreaPadding()225     void ResetSafeAreaPadding() override
226     {
227         ViewAbstract::ResetSafeAreaPadding();
228     }
229 
SetSafeAreaPadding(const CalcDimension & value)230     void SetSafeAreaPadding(const CalcDimension& value) override
231     {
232         if (value.Unit() == DimensionUnit::CALC) {
233             ViewAbstract::SetSafeAreaPadding(NG::CalcLength(value.CalcValue()));
234         } else {
235             // padding must great or equal zero.
236             ViewAbstract::SetSafeAreaPadding(NG::CalcLength(value.IsNonNegative() ? value : CalcDimension()));
237         }
238     }
239 
SetSafeAreaPaddings(const NG::PaddingProperty & paddings)240     void SetSafeAreaPaddings(const NG::PaddingProperty& paddings) override
241     {
242         ViewAbstract::SetSafeAreaPadding(paddings);
243     }
244 
SetSafeAreaPaddings(const std::optional<CalcDimension> & top,const std::optional<CalcDimension> & bottom,const std::optional<CalcDimension> & left,const std::optional<CalcDimension> & right)245     void SetSafeAreaPaddings(const std::optional<CalcDimension>& top, const std::optional<CalcDimension>& bottom,
246         const std::optional<CalcDimension>& left, const std::optional<CalcDimension>& right) override
247     {
248         NG::PaddingProperty paddings = NG::ConvertToCalcPaddingProperty(top, bottom, left, right);
249         ViewAbstract::SetSafeAreaPadding(paddings);
250     }
251 
SetMargin(const CalcDimension & value)252     void SetMargin(const CalcDimension& value) override
253     {
254         if (value.Unit() == DimensionUnit::CALC) {
255             ViewAbstract::SetMargin(NG::CalcLength(value.CalcValue()));
256         } else {
257             ViewAbstract::SetMargin(NG::CalcLength(value));
258         }
259     }
260 
SetMargins(const std::optional<CalcDimension> & top,const std::optional<CalcDimension> & bottom,const std::optional<CalcDimension> & left,const std::optional<CalcDimension> & right)261     void SetMargins(const std::optional<CalcDimension>& top, const std::optional<CalcDimension>& bottom,
262         const std::optional<CalcDimension>& left, const std::optional<CalcDimension>& right) override
263     {
264         NG::MarginProperty margins;
265         if (top.has_value()) {
266             if (top.value().Unit() == DimensionUnit::CALC) {
267                 margins.top = NG::CalcLength(top.value().CalcValue());
268             } else {
269                 margins.top = NG::CalcLength(top.value());
270             }
271         }
272         if (bottom.has_value()) {
273             if (bottom.value().Unit() == DimensionUnit::CALC) {
274                 margins.bottom = NG::CalcLength(bottom.value().CalcValue());
275             } else {
276                 margins.bottom = NG::CalcLength(bottom.value());
277             }
278         }
279         if (left.has_value()) {
280             if (left.value().Unit() == DimensionUnit::CALC) {
281                 margins.left = NG::CalcLength(left.value().CalcValue());
282             } else {
283                 margins.left = NG::CalcLength(left.value());
284             }
285         }
286         if (right.has_value()) {
287             if (right.value().Unit() == DimensionUnit::CALC) {
288                 margins.right = NG::CalcLength(right.value().CalcValue());
289             } else {
290                 margins.right = NG::CalcLength(right.value());
291             }
292         }
293         ViewAbstract::SetMargin(margins);
294     }
295 
SetMargins(const NG::MarginProperty & margins)296     void SetMargins(const NG::MarginProperty& margins) override
297     {
298         ViewAbstract::SetMargin(margins);
299     }
300 
SetBorderRadius(const Dimension & value)301     void SetBorderRadius(const Dimension& value) override
302     {
303         ViewAbstract::SetBorderRadius(value);
304     }
305 
SetBorderRadius(const std::optional<Dimension> & radiusTopLeft,const std::optional<Dimension> & radiusTopRight,const std::optional<Dimension> & radiusBottomLeft,const std::optional<Dimension> & radiusBottomRight)306     void SetBorderRadius(const std::optional<Dimension>& radiusTopLeft, const std::optional<Dimension>& radiusTopRight,
307         const std::optional<Dimension>& radiusBottomLeft, const std::optional<Dimension>& radiusBottomRight) override
308     {
309         NG::BorderRadiusProperty borderRadius;
310         borderRadius.radiusTopLeft = radiusTopLeft;
311         borderRadius.radiusTopRight = radiusTopRight;
312         borderRadius.radiusBottomLeft = radiusBottomLeft;
313         borderRadius.radiusBottomRight = radiusBottomRight;
314         borderRadius.multiValued = true;
315         ViewAbstract::SetBorderRadius(borderRadius);
316     }
317 
SetBorderRadius(const NG::BorderRadiusProperty & borderRadius)318     void SetBorderRadius(const NG::BorderRadiusProperty& borderRadius) override
319     {
320         ViewAbstract::SetBorderRadius(borderRadius);
321     }
322 
SetBorderColor(const Color & value)323     void SetBorderColor(const Color& value) override
324     {
325         ViewAbstract::SetBorderColor(value);
326     }
SetBorderColor(const std::optional<Color> & colorLeft,const std::optional<Color> & colorRight,const std::optional<Color> & colorTop,const std::optional<Color> & colorBottom)327     void SetBorderColor(const std::optional<Color>& colorLeft, const std::optional<Color>& colorRight,
328         const std::optional<Color>& colorTop, const std::optional<Color>& colorBottom) override
329     {
330         NG::BorderColorProperty borderColors;
331         borderColors.leftColor = colorLeft;
332         borderColors.rightColor = colorRight;
333         borderColors.topColor = colorTop;
334         borderColors.bottomColor = colorBottom;
335         borderColors.multiValued = true;
336         ViewAbstract::SetBorderColor(borderColors);
337     }
338 
SetBorderColor(const NG::BorderColorProperty & borderColors)339     void SetBorderColor(const NG::BorderColorProperty& borderColors) override
340     {
341         ViewAbstract::SetBorderColor(borderColors);
342     }
343 
SetBorderWidth(const Dimension & value)344     void SetBorderWidth(const Dimension& value) override
345     {
346         ViewAbstract::SetBorderWidth(value);
347     }
348 
SetBorderWidth(const std::optional<Dimension> & left,const std::optional<Dimension> & right,const std::optional<Dimension> & top,const std::optional<Dimension> & bottom)349     void SetBorderWidth(const std::optional<Dimension>& left, const std::optional<Dimension>& right,
350         const std::optional<Dimension>& top, const std::optional<Dimension>& bottom) override
351     {
352         NG::BorderWidthProperty borderWidth;
353         borderWidth.leftDimen = left;
354         borderWidth.rightDimen = right;
355         borderWidth.topDimen = top;
356         borderWidth.bottomDimen = bottom;
357         borderWidth.multiValued = true;
358         ViewAbstract::SetBorderWidth(borderWidth);
359     }
360 
SetBorderWidth(const std::optional<Dimension> & start,const std::optional<Dimension> & end,const std::optional<Dimension> & top,const std::optional<Dimension> & bottom,bool isLocalized)361     void SetBorderWidth(const std::optional<Dimension>& start, const std::optional<Dimension>& end,
362         const std::optional<Dimension>& top, const std::optional<Dimension>& bottom, bool isLocalized) override
363     {
364         if (!isLocalized) {
365             return;
366         }
367         NG::BorderWidthProperty borderWidth {
368             .topDimen = top, .bottomDimen = bottom, .startDimen = start, .endDimen = end, .multiValued = true
369         };
370         ViewAbstract::SetBorderWidth(borderWidth);
371     }
372 
SetBorderStyle(const BorderStyle & value)373     void SetBorderStyle(const BorderStyle& value) override
374     {
375         ViewAbstract::SetBorderStyle(value);
376     }
377 
SetBorderStyle(const std::optional<BorderStyle> & styleLeft,const std::optional<BorderStyle> & styleRight,const std::optional<BorderStyle> & styleTop,const std::optional<BorderStyle> & styleBottom)378     void SetBorderStyle(const std::optional<BorderStyle>& styleLeft, const std::optional<BorderStyle>& styleRight,
379         const std::optional<BorderStyle>& styleTop, const std::optional<BorderStyle>& styleBottom) override
380     {
381         NG::BorderStyleProperty borderStyles;
382         borderStyles.styleLeft = styleLeft.value_or(BorderStyle::SOLID);
383         borderStyles.styleRight = styleRight.value_or(BorderStyle::SOLID);
384         borderStyles.styleTop = styleTop.value_or(BorderStyle::SOLID);
385         borderStyles.styleBottom = styleBottom.value_or(BorderStyle::SOLID);
386         borderStyles.multiValued = true;
387         ViewAbstract::SetBorderStyle(borderStyles);
388     }
389 
SetDashGap(const Dimension & value)390     void SetDashGap(const Dimension& value) override
391     {
392         ViewAbstract::SetDashGap(value);
393     }
394 
SetDashGap(const std::optional<Dimension> & left,const std::optional<Dimension> & right,const std::optional<Dimension> & top,const std::optional<Dimension> & bottom)395     void SetDashGap(const std::optional<Dimension>& left, const std::optional<Dimension>& right,
396         const std::optional<Dimension>& top, const std::optional<Dimension>& bottom) override
397     {
398         NG::BorderWidthProperty dashGap;
399         dashGap.leftDimen = left;
400         dashGap.rightDimen = right;
401         dashGap.topDimen = top;
402         dashGap.bottomDimen = bottom;
403         dashGap.multiValued = true;
404         ViewAbstract::SetDashGap(dashGap);
405     }
406 
SetDashWidth(const Dimension & value)407     void SetDashWidth(const Dimension& value) override
408     {
409         ViewAbstract::SetDashWidth(value);
410     }
411 
SetDashWidth(const std::optional<Dimension> & left,const std::optional<Dimension> & right,const std::optional<Dimension> & top,const std::optional<Dimension> & bottom)412     void SetDashWidth(const std::optional<Dimension>& left, const std::optional<Dimension>& right,
413         const std::optional<Dimension>& top, const std::optional<Dimension>& bottom) override
414     {
415         NG::BorderWidthProperty dashWidth;
416         dashWidth.leftDimen = left;
417         dashWidth.rightDimen = right;
418         dashWidth.topDimen = top;
419         dashWidth.bottomDimen = bottom;
420         dashWidth.multiValued = true;
421         ViewAbstract::SetDashWidth(dashWidth);
422     }
423 
SetOuterBorderRadius(const Dimension & value)424     void SetOuterBorderRadius(const Dimension& value) override
425     {
426         ViewAbstract::SetOuterBorderRadius(value);
427     }
428 
SetOuterBorderRadius(const std::optional<Dimension> & radiusTopLeft,const std::optional<Dimension> & radiusTopRight,const std::optional<Dimension> & radiusBottomLeft,const std::optional<Dimension> & radiusBottomRight)429     void SetOuterBorderRadius(const std::optional<Dimension>& radiusTopLeft,
430         const std::optional<Dimension>& radiusTopRight, const std::optional<Dimension>& radiusBottomLeft,
431         const std::optional<Dimension>& radiusBottomRight) override
432     {
433         NG::BorderRadiusProperty borderRadius;
434         borderRadius.radiusTopLeft = radiusTopLeft;
435         borderRadius.radiusTopRight = radiusTopRight;
436         borderRadius.radiusBottomLeft = radiusBottomLeft;
437         borderRadius.radiusBottomRight = radiusBottomRight;
438         borderRadius.multiValued = true;
439         ViewAbstract::SetOuterBorderRadius(borderRadius);
440     }
441 
SetOuterBorderRadius(const NG::BorderRadiusProperty & borderRadius)442     void SetOuterBorderRadius(const NG::BorderRadiusProperty& borderRadius) override
443     {
444         ViewAbstract::SetOuterBorderRadius(borderRadius);
445     }
446 
SetOuterBorderColor(const Color & value)447     void SetOuterBorderColor(const Color& value) override
448     {
449         ViewAbstract::SetOuterBorderColor(value);
450     }
SetOuterBorderColor(const std::optional<Color> & colorLeft,const std::optional<Color> & colorRight,const std::optional<Color> & colorTop,const std::optional<Color> & colorBottom)451     void SetOuterBorderColor(const std::optional<Color>& colorLeft, const std::optional<Color>& colorRight,
452         const std::optional<Color>& colorTop, const std::optional<Color>& colorBottom) override
453     {
454         NG::BorderColorProperty borderColors;
455         borderColors.leftColor = colorLeft;
456         borderColors.rightColor = colorRight;
457         borderColors.topColor = colorTop;
458         borderColors.bottomColor = colorBottom;
459         borderColors.multiValued = true;
460         ViewAbstract::SetOuterBorderColor(borderColors);
461     }
462 
SetOuterBorderColor(const NG::BorderColorProperty & borderColors)463     void SetOuterBorderColor(const NG::BorderColorProperty& borderColors) override
464     {
465         ViewAbstract::SetOuterBorderColor(borderColors);
466     }
467 
SetOuterBorderWidth(const Dimension & value)468     void SetOuterBorderWidth(const Dimension& value) override
469     {
470         ViewAbstract::SetOuterBorderWidth(value);
471     }
472 
SetOuterBorderWidth(const std::optional<Dimension> & left,const std::optional<Dimension> & right,const std::optional<Dimension> & top,const std::optional<Dimension> & bottom)473     void SetOuterBorderWidth(const std::optional<Dimension>& left, const std::optional<Dimension>& right,
474         const std::optional<Dimension>& top, const std::optional<Dimension>& bottom) override
475     {
476         NG::BorderWidthProperty borderWidth;
477         borderWidth.leftDimen = left;
478         borderWidth.rightDimen = right;
479         borderWidth.topDimen = top;
480         borderWidth.bottomDimen = bottom;
481         borderWidth.multiValued = true;
482         ViewAbstract::SetOuterBorderWidth(borderWidth);
483     }
484 
SetOuterBorderStyle(const BorderStyle & value)485     void SetOuterBorderStyle(const BorderStyle& value) override
486     {
487         ViewAbstract::SetOuterBorderStyle(value);
488     }
489 
SetOuterBorderStyle(const std::optional<BorderStyle> & styleLeft,const std::optional<BorderStyle> & styleRight,const std::optional<BorderStyle> & styleTop,const std::optional<BorderStyle> & styleBottom)490     void SetOuterBorderStyle(const std::optional<BorderStyle>& styleLeft, const std::optional<BorderStyle>& styleRight,
491         const std::optional<BorderStyle>& styleTop, const std::optional<BorderStyle>& styleBottom) override
492     {
493         NG::BorderStyleProperty borderStyles;
494         borderStyles.styleLeft = styleLeft.value_or(BorderStyle::SOLID);
495         borderStyles.styleRight = styleRight.value_or(BorderStyle::SOLID);
496         borderStyles.styleTop = styleTop.value_or(BorderStyle::SOLID);
497         borderStyles.styleBottom = styleBottom.value_or(BorderStyle::SOLID);
498         borderStyles.multiValued = true;
499         ViewAbstract::SetOuterBorderStyle(borderStyles);
500     }
501 
SetBorderImage(const RefPtr<BorderImage> & borderImage,uint8_t bitset)502     void SetBorderImage(const RefPtr<BorderImage>& borderImage, uint8_t bitset) override
503     {
504         CHECK_NULL_VOID(borderImage);
505         if (bitset & BorderImage::SOURCE_BIT) {
506             ViewAbstract::SetBorderImageSource(
507                 borderImage->GetSrc(), borderImage->GetBundleName(), borderImage->GetModuleName());
508         }
509         if (bitset & BorderImage::OUTSET_BIT) {
510             ViewAbstract::SetHasBorderImageOutset(true);
511         }
512         if (bitset & BorderImage::SLICE_BIT) {
513             ViewAbstract::SetHasBorderImageSlice(true);
514         }
515         if (bitset & BorderImage::REPEAT_BIT) {
516             ViewAbstract::SetHasBorderImageRepeat(true);
517         }
518         if (bitset & BorderImage::WIDTH_BIT) {
519             ViewAbstract::SetHasBorderImageWidth(true);
520         }
521         ViewAbstract::SetBorderImage(borderImage);
522     }
523 
SetBorderImageGradient(const NG::Gradient & gradient)524     void SetBorderImageGradient(const NG::Gradient& gradient) override
525     {
526         ViewAbstract::SetBorderImageGradient(gradient);
527     }
528 
SetLayoutPriority(int32_t priority)529     void SetLayoutPriority(int32_t priority) override {}
530 
SetLayoutWeight(float value)531     void SetLayoutWeight(float value) override
532     {
533         ViewAbstract::SetLayoutWeight(value);
534     }
535 
SetLayoutWeight(const LayoutWeightPair & value)536     void SetLayoutWeight(const LayoutWeightPair& value) override
537     {
538         ViewAbstract::SetLayoutWeight(value);
539     }
540 
SetPixelRound(uint16_t value)541     void SetPixelRound(uint16_t value) override
542     {
543         ViewAbstract::SetPixelRound(value);
544     }
545 
SetLayoutDirection(TextDirection value)546     void SetLayoutDirection(TextDirection value) override
547     {
548         ViewAbstract::SetLayoutDirection(value);
549     }
550 
SetAspectRatio(float ratio)551     void SetAspectRatio(float ratio) override
552     {
553         ViewAbstract::SetAspectRatio(ratio);
554     }
555 
ResetAspectRatio()556     void ResetAspectRatio() override
557     {
558         ViewAbstract::ResetAspectRatio();
559     }
560 
SetAlign(const Alignment & alignment)561     void SetAlign(const Alignment& alignment) override
562     {
563         ViewAbstract::SetAlign(alignment);
564     }
565 
SetAlignRules(const std::map<AlignDirection,AlignRule> & alignRules)566     void SetAlignRules(const std::map<AlignDirection, AlignRule>& alignRules) override
567     {
568         ViewAbstract::SetAlignRules(alignRules);
569     }
570 
SetChainStyle(const ChainInfo & chainInfo)571     void SetChainStyle(const ChainInfo& chainInfo) override
572     {
573         ViewAbstract::SetChainStyle(chainInfo);
574     }
575 
SetBias(const BiasPair & biasPair)576     void SetBias(const BiasPair& biasPair) override
577     {
578         ViewAbstract::SetBias(biasPair);
579     }
580 
SetUseAlign(AlignDeclarationPtr declaration,AlignDeclaration::Edge edge,const std::optional<Dimension> & offset)581     void SetUseAlign(
582         AlignDeclarationPtr declaration, AlignDeclaration::Edge edge, const std::optional<Dimension>& offset) override
583     {}
584 
585     void SetGrid(std::optional<uint32_t> span, std::optional<int32_t> offset,
586         GridSizeType type = GridSizeType::UNDEFINED) override
587     {
588         ViewAbstract::SetGrid(span, offset, type);
589     }
590 
SetZIndex(int32_t value)591     void SetZIndex(int32_t value) override
592     {
593         ViewAbstract::SetZIndex(value);
594     }
595 
SetPosition(const Dimension & x,const Dimension & y)596     void SetPosition(const Dimension& x, const Dimension& y) override
597     {
598         ViewAbstract::SetPosition({ x, y });
599     }
600 
SetPositionEdges(const EdgesParam & value)601     void SetPositionEdges(const EdgesParam& value) override
602     {
603         ViewAbstract::SetPositionEdges(value);
604     }
605 
ResetPosition()606     void ResetPosition() override
607     {
608         ViewAbstract::ResetPosition();
609     }
610 
SetOffset(const Dimension & x,const Dimension & y)611     void SetOffset(const Dimension& x, const Dimension& y) override
612     {
613         ViewAbstract::SetOffset({ x, y });
614     }
615 
SetOffsetEdges(const EdgesParam & value)616     void SetOffsetEdges(const EdgesParam& value) override
617     {
618         ViewAbstract::SetOffsetEdges(value);
619     }
620 
MarkAnchor(const Dimension & x,const Dimension & y)621     void MarkAnchor(const Dimension& x, const Dimension& y) override
622     {
623         ViewAbstract::MarkAnchor({ x, y });
624     }
625 
626     void SetScale(float x, float y, float z) override;
627 
628     void SetPivot(const Dimension& x, const Dimension& y, const Dimension& z) override;
629 
SetTranslate(const Dimension & x,const Dimension & y,const Dimension & z)630     void SetTranslate(const Dimension& x, const Dimension& y, const Dimension& z) override
631     {
632         ViewAbstract::SetTranslate(TranslateOptions(x, y, z));
633     }
634 
635     void SetRotate(float x, float y, float z, float angle, float perspective = 0.0f) override
636     {
637         ViewAbstract::SetRotate(NG::Vector5F(x, y, z, angle, perspective));
638     }
639 
SetTransformMatrix(const std::vector<float> & matrix)640     void SetTransformMatrix(const std::vector<float>& matrix) override
641     {
642         NG::ViewAbstract::SetTransformMatrix(
643             Matrix4(matrix[0], matrix[4], matrix[8], matrix[12], matrix[1], matrix[5], matrix[9], matrix[13], matrix[2],
644                 matrix[6], matrix[10], matrix[14], matrix[3], matrix[7], matrix[11], matrix[15]));
645     }
646 
647     void SetOpacity(double opacity, bool passThrough = false) override
648     {
649         ViewAbstract::SetOpacity(opacity);
650     }
651 
652     void SetTransition(const NG::TransitionOptions& transitionOptions, bool passThrough = false) override
653     {
654         ViewAbstract::SetTransition(transitionOptions);
655     }
656 
CleanTransition()657     void CleanTransition() override
658     {
659         ViewAbstract::CleanTransition();
660     }
661 
662     void SetChainedTransition(const RefPtr<NG::ChainedTransitionEffect>& effect,
663         NG::TransitionFinishCallback&& finishCallback = nullptr) override
664     {
665         ViewAbstract::SetChainedTransition(effect, std::move(finishCallback));
666     }
667 
SetOverlay(const std::string & text,std::function<void ()> && buildFunc,const RefPtr<NG::FrameNode> & contentNode,const std::optional<Alignment> & align,const std::optional<Dimension> & offsetX,const std::optional<Dimension> & offsetY,NG::OverlayType type)668     void SetOverlay(const std::string& text, std::function<void()>&& buildFunc,
669         const RefPtr<NG::FrameNode>& contentNode, const std::optional<Alignment>& align,
670         const std::optional<Dimension>& offsetX, const std::optional<Dimension>& offsetY, NG::OverlayType type) override
671     {
672         if (type == NG::OverlayType::BUILDER) {
673             ViewAbstract::SetOverlayBuilder(std::move(buildFunc), align, offsetX, offsetY);
674         } else if (type == NG::OverlayType::COMPONENT_CONTENT) {
675             ViewAbstract::SetOverlayComponentContent(contentNode, align, offsetX, offsetY);
676         } else {
677             NG::OverlayOptions overlay;
678             overlay.content = text;
679             overlay.align = align.value_or(Alignment::TOP_LEFT);
680             if (offsetX.has_value()) {
681                 overlay.x = offsetX.value();
682             }
683             if (offsetY.has_value()) {
684                 overlay.y = offsetY.value();
685             }
686             ViewAbstract::SetOverlay(overlay);
687             if (type == NG::OverlayType::RESET) {
688                 ViewAbstract::SetOverlayBuilder(nullptr, align, offsetX, offsetY);
689             }
690         }
691     }
692 
SetVisibility(VisibleType visible,std::function<void (int32_t)> && changeEventFunc)693     void SetVisibility(VisibleType visible, std::function<void(int32_t)>&& changeEventFunc) override
694     {
695         ViewAbstract::SetVisibility(visible);
696     }
697 
SetSharedTransition(const std::string & shareId,const std::shared_ptr<SharedTransitionOption> & option)698     void SetSharedTransition(const std::string& shareId, const std::shared_ptr<SharedTransitionOption>& option) override
699     {
700         ViewAbstract::SetSharedTransition(shareId, option);
701     }
702 
703     void SetGeometryTransition(const std::string& id,
704         bool followWithoutTransition = false, bool doRegisterSharedTransition = true) override
705     {
706         ViewAbstract::SetGeometryTransition(id, followWithoutTransition, doRegisterSharedTransition);
707     }
708 
SetMotionPath(const MotionPathOption & option)709     void SetMotionPath(const MotionPathOption& option) override
710     {
711         ViewAbstract::SetMotionPath(option);
712     }
713 
SetRenderGroup(bool isRenderGroup)714     void SetRenderGroup(bool isRenderGroup) override
715     {
716         ViewAbstract::SetRenderGroup(isRenderGroup);
717     }
718 
SetRenderFit(RenderFit renderFit)719     void SetRenderFit(RenderFit renderFit) override
720     {
721         ViewAbstract::SetRenderFit(renderFit);
722     }
723 
SetFlexBasis(const Dimension & value)724     void SetFlexBasis(const Dimension& value) override
725     {
726         ViewAbstract::SetFlexBasis(value);
727     }
728 
SetAlignSelf(FlexAlign value)729     void SetAlignSelf(FlexAlign value) override
730     {
731         ViewAbstract::SetAlignSelf(value);
732     }
733 
SetFlexShrink(float value)734     void SetFlexShrink(float value) override
735     {
736         ViewAbstract::SetFlexShrink(value);
737     }
738 
ResetFlexShrink()739     void ResetFlexShrink() override
740     {
741         ViewAbstract::ResetFlexShrink();
742     }
743 
SetFlexGrow(float value)744     void SetFlexGrow(float value) override
745     {
746         ViewAbstract::SetFlexGrow(value);
747     }
748 
SetDisplayIndex(int32_t value)749     void SetDisplayIndex(int32_t value) override
750     {
751         ViewAbstract::SetDisplayIndex(value);
752     }
753 
SetLinearGradient(const NG::Gradient & gradient)754     void SetLinearGradient(const NG::Gradient& gradient) override
755     {
756         ViewAbstract::SetLinearGradient(gradient);
757     }
758 
SetSweepGradient(const NG::Gradient & gradient)759     void SetSweepGradient(const NG::Gradient& gradient) override
760     {
761         ViewAbstract::SetSweepGradient(gradient);
762     }
763 
SetRadialGradient(const NG::Gradient & gradient)764     void SetRadialGradient(const NG::Gradient& gradient) override
765     {
766         ViewAbstract::SetRadialGradient(gradient);
767     }
768 
SetClipShape(const RefPtr<BasicShape> & basicShape)769     void SetClipShape(const RefPtr<BasicShape>& basicShape) override
770     {
771         ViewAbstract::SetClipShape(basicShape);
772     }
773 
SetClipEdge(bool isClip)774     void SetClipEdge(bool isClip) override
775     {
776         ViewAbstract::SetClipEdge(isClip);
777     }
778 
SetMask(const RefPtr<BasicShape> & shape)779     void SetMask(const RefPtr<BasicShape>& shape) override
780     {
781         ViewAbstract::SetMask(shape);
782     }
783 
SetProgressMask(const RefPtr<NG::ProgressMaskProperty> & progress)784     void SetProgressMask(const RefPtr<NG::ProgressMaskProperty>& progress) override
785     {
786         ViewAbstract::SetProgressMask(progress);
787     }
788 
SetBackdropBlur(const Dimension & radius,const BlurOption & blurOption)789     void SetBackdropBlur(const Dimension& radius, const BlurOption& blurOption) override
790     {
791         ViewAbstract::SetBackdropBlur(radius, blurOption);
792     }
793 
SetLinearGradientBlur(NG::LinearGradientBlurPara blurPara)794     void SetLinearGradientBlur(NG::LinearGradientBlurPara blurPara) override
795     {
796         ViewAbstract::SetLinearGradientBlur(blurPara);
797     }
798 
SetDynamicDim(float DimDegree)799     void SetDynamicDim(float DimDegree) override
800     {
801         ViewAbstract::SetDynamicDim(DimDegree);
802     }
SetDynamicLightUp(float rate,float lightUpDegree)803     void SetDynamicLightUp(float rate, float lightUpDegree) override
804     {
805         ViewAbstract::SetDynamicLightUp(rate, lightUpDegree);
806     }
807 
SetBgDynamicBrightness(const BrightnessOption & brightnessOption)808     void SetBgDynamicBrightness(const BrightnessOption& brightnessOption) override
809     {
810         ViewAbstract::SetBgDynamicBrightness(brightnessOption);
811     }
812 
SetFgDynamicBrightness(const BrightnessOption & brightnessOption)813     void SetFgDynamicBrightness(const BrightnessOption& brightnessOption) override
814     {
815         ViewAbstract::SetFgDynamicBrightness(brightnessOption);
816     }
817 
SetBrightnessBlender(const OHOS::Rosen::BrightnessBlender * brightnessBlender)818     void SetBrightnessBlender(const OHOS::Rosen::BrightnessBlender* brightnessBlender) override
819     {
820         ViewAbstract::SetBrightnessBlender(brightnessBlender);
821     }
822 
SetFrontBlur(const Dimension & radius,const BlurOption & blurOption)823     void SetFrontBlur(const Dimension& radius, const BlurOption& blurOption) override
824     {
825         ViewAbstract::SetFrontBlur(radius, blurOption);
826     }
827 
SetMotionBlur(const MotionBlurOption & motionBlurOption)828     void SetMotionBlur(const MotionBlurOption& motionBlurOption) override
829     {
830         ViewAbstract::SetMotionBlur(motionBlurOption);
831     }
832 
SetBackShadow(const std::vector<Shadow> & shadows)833     void SetBackShadow(const std::vector<Shadow>& shadows) override
834     {
835         if (!shadows.empty()) {
836             ViewAbstract::SetBackShadow(shadows[0]);
837         }
838     }
839 
SetBlendMode(BlendMode blendMode)840     void SetBlendMode(BlendMode blendMode) override
841     {
842         ViewAbstract::SetBlendMode(blendMode);
843     }
844 
SetBlendApplyType(BlendApplyType blendApplyType)845     void SetBlendApplyType(BlendApplyType blendApplyType) override
846     {
847         ViewAbstract::SetBlendApplyType(blendApplyType);
848     }
849 
SetColorBlend(const Color & value)850     void SetColorBlend(const Color& value) override
851     {
852         ViewAbstract::SetColorBlend(value);
853     }
854 
SetWindowBlur(float progress,WindowBlurStyle blurStyle)855     void SetWindowBlur(float progress, WindowBlurStyle blurStyle) override {}
856 
SetBrightness(const Dimension & value)857     void SetBrightness(const Dimension& value) override
858     {
859         ViewAbstract::SetBrightness(value);
860     }
861 
SetGrayScale(const Dimension & value)862     void SetGrayScale(const Dimension& value) override
863     {
864         ViewAbstract::SetGrayScale(value);
865     }
866 
SetContrast(const Dimension & value)867     void SetContrast(const Dimension& value) override
868     {
869         ViewAbstract::SetContrast(value);
870     }
871 
SetSaturate(const Dimension & value)872     void SetSaturate(const Dimension& value) override
873     {
874         ViewAbstract::SetSaturate(value);
875     }
876 
SetSepia(const Dimension & value)877     void SetSepia(const Dimension& value) override
878     {
879         ViewAbstract::SetSepia(value);
880     }
881 
SetInvert(const InvertVariant & value)882     void SetInvert(const InvertVariant& value) override
883     {
884         ViewAbstract::SetInvert(value);
885     }
886 
SetSystemBarEffect(bool systemBarEffect)887     void SetSystemBarEffect(bool systemBarEffect) override
888     {
889         ViewAbstract::SetSystemBarEffect(systemBarEffect);
890     }
891 
SetHueRotate(float value)892     void SetHueRotate(float value) override
893     {
894         ViewAbstract::SetHueRotate(value);
895     }
896 
SetUseEffect(bool useEffect,EffectType effectType)897     void SetUseEffect(bool useEffect, EffectType effectType) override
898     {
899         ViewAbstract::SetUseEffect(useEffect, effectType);
900     }
901 
SetUseShadowBatching(bool useShadowBatching)902     void SetUseShadowBatching(bool useShadowBatching) override
903     {
904         ViewAbstract::SetUseShadowBatching(useShadowBatching);
905     }
906 
SetFreeze(bool freeze)907     void SetFreeze(bool freeze) override
908     {
909         ViewAbstract::SetFreeze(freeze);
910     }
911 
SetClickEffectLevel(const ClickEffectLevel & level,float scaleValue)912     void SetClickEffectLevel(const ClickEffectLevel& level, float scaleValue) override
913     {
914         ViewAbstract::SetClickEffectLevel(level, scaleValue);
915     }
916 
SetOnClick(GestureEventFunc && tapEventFunc,ClickEventFunc && clickEventFunc,double distanceThreshold)917     void SetOnClick(GestureEventFunc&& tapEventFunc, ClickEventFunc&& clickEventFunc, double distanceThreshold) override
918     {
919         ViewAbstract::SetOnClick(std::move(tapEventFunc), distanceThreshold);
920     }
921 
SetOnGestureJudgeBegin(NG::GestureJudgeFunc && gestureJudgeFunc)922     void SetOnGestureJudgeBegin(NG::GestureJudgeFunc&& gestureJudgeFunc) override
923     {
924         ViewAbstract::SetOnGestureJudgeBegin(std::move(gestureJudgeFunc));
925     }
926 
SetOnTouchIntercept(NG::TouchInterceptFunc && touchInterceptFunc)927     void SetOnTouchIntercept(NG::TouchInterceptFunc&& touchInterceptFunc) override
928     {
929         ViewAbstract::SetOnTouchIntercept(std::move(touchInterceptFunc));
930     }
931 
SetShouldBuiltInRecognizerParallelWith(NG::ShouldBuiltInRecognizerParallelWithFunc && shouldBuiltInRecognizerParallelWithFunc)932     void SetShouldBuiltInRecognizerParallelWith(
933         NG::ShouldBuiltInRecognizerParallelWithFunc&& shouldBuiltInRecognizerParallelWithFunc) override
934     {
935         ViewAbstract::SetShouldBuiltInRecognizerParallelWith(std::move(shouldBuiltInRecognizerParallelWithFunc));
936     }
937 
SetOnGestureRecognizerJudgeBegin(NG::GestureRecognizerJudgeFunc && gestureRecognizerJudgeFunc,bool exposeInnerGestureFlag)938     void SetOnGestureRecognizerJudgeBegin(
939         NG::GestureRecognizerJudgeFunc&& gestureRecognizerJudgeFunc, bool exposeInnerGestureFlag) override
940     {
941         ViewAbstract::SetOnGestureRecognizerJudgeBegin(std::move(gestureRecognizerJudgeFunc), exposeInnerGestureFlag);
942     }
943 
SetOnTouch(TouchEventFunc && touchEventFunc)944     void SetOnTouch(TouchEventFunc&& touchEventFunc) override
945     {
946         ViewAbstract::SetOnTouch(std::move(touchEventFunc));
947     }
948 
SetOnKeyEvent(OnKeyConsumeFunc && onKeyCallback)949     void SetOnKeyEvent(OnKeyConsumeFunc&& onKeyCallback) override
950     {
951         ViewAbstract::SetOnKeyEvent(std::move(onKeyCallback));
952     }
953 
SetOnKeyPreIme(OnKeyConsumeFunc && onKeyCallback)954     void SetOnKeyPreIme(OnKeyConsumeFunc&& onKeyCallback) override
955     {
956         auto focusHub = ViewStackProcessor::GetInstance()->GetOrCreateMainFrameNodeFocusHub();
957         CHECK_NULL_VOID(focusHub);
958         focusHub->SetOnKeyPreImeCallback(std::move(onKeyCallback));
959     }
960 
SetOnKeyPreIme(FrameNode * frameNode,OnKeyConsumeFunc && onKeyCallback)961     static void SetOnKeyPreIme(FrameNode* frameNode, OnKeyConsumeFunc&& onKeyCallback)
962     {
963         auto focusHub = frameNode->GetOrCreateFocusHub();
964         CHECK_NULL_VOID(focusHub);
965         focusHub->SetOnKeyPreImeCallback(std::move(onKeyCallback));
966     }
967 
SetOnMouse(OnMouseEventFunc && onMouseEventFunc)968     void SetOnMouse(OnMouseEventFunc&& onMouseEventFunc) override
969     {
970         ViewAbstract::SetOnMouse(std::move(onMouseEventFunc));
971     }
972 
SetOnHover(OnHoverFunc && onHoverEventFunc)973     void SetOnHover(OnHoverFunc&& onHoverEventFunc) override
974     {
975         ViewAbstract::SetOnHover(std::move(onHoverEventFunc));
976     }
977 
SetOnAccessibilityHover(OnAccessibilityHoverFunc && onAccessibilityHoverEventFunc)978     void SetOnAccessibilityHover(OnAccessibilityHoverFunc&& onAccessibilityHoverEventFunc) override
979     {
980         ViewAbstract::SetOnAccessibilityHover(std::move(onAccessibilityHoverEventFunc));
981     }
982 
SetOnDelete(std::function<void ()> && onDeleteCallback)983     void SetOnDelete(std::function<void()>&& onDeleteCallback) override {}
984 
SetOnAppear(std::function<void ()> && onAppearCallback)985     void SetOnAppear(std::function<void()>&& onAppearCallback) override
986     {
987         ViewAbstract::SetOnAppear(std::move(onAppearCallback));
988     }
989 
SetOnAttach(std::function<void ()> && onAttachCallback)990     void SetOnAttach(std::function<void()>&& onAttachCallback) override
991     {
992         ViewAbstract::SetOnAttach(std::move(onAttachCallback));
993     }
994 
SetOnDisAppear(std::function<void ()> && onDisAppearCallback)995     void SetOnDisAppear(std::function<void()>&& onDisAppearCallback) override
996     {
997         ViewAbstract::SetOnDisappear(std::move(onDisAppearCallback));
998     }
999 
SetOnDetach(std::function<void ()> && onDetachCallback)1000     void SetOnDetach(std::function<void()>&& onDetachCallback) override
1001     {
1002         ViewAbstract::SetOnDetach(std::move(onDetachCallback));
1003     }
1004 
SetOnAccessibility(std::function<void (const std::string &)> && onAccessibilityCallback)1005     void SetOnAccessibility(std::function<void(const std::string&)>&& onAccessibilityCallback) override {}
1006 
SetOnRemoteMessage(RemoteCallback && onRemoteCallback)1007     void SetOnRemoteMessage(RemoteCallback&& onRemoteCallback) override {}
1008 
SetOnFocusMove(std::function<void (int32_t)> && onFocusMoveCallback)1009     void SetOnFocusMove(std::function<void(int32_t)>&& onFocusMoveCallback) override {}
1010 
SetOnFocus(OnFocusFunc && onFocusCallback)1011     void SetOnFocus(OnFocusFunc&& onFocusCallback) override
1012     {
1013         ViewAbstract::SetOnFocus(std::move(onFocusCallback));
1014     }
1015 
SetOnBlur(OnBlurFunc && onBlurCallback)1016     void SetOnBlur(OnBlurFunc&& onBlurCallback) override
1017     {
1018         ViewAbstract::SetOnBlur(std::move(onBlurCallback));
1019     }
1020 
SetDraggable(bool draggable)1021     void SetDraggable(bool draggable) override
1022     {
1023         ViewAbstract::SetDraggable(draggable);
1024     }
1025 
SetDragPreviewOptions(const DragPreviewOption & previewOption)1026     void SetDragPreviewOptions(const DragPreviewOption& previewOption) override
1027     {
1028         ViewAbstract::SetDragPreviewOptions(previewOption);
1029     }
1030 
SetOnDragStart(NG::OnDragStartFunc && onDragStart)1031     void SetOnDragStart(NG::OnDragStartFunc&& onDragStart) override
1032     {
1033         auto dragStart = [dragStartFunc = std::move(onDragStart)](const RefPtr<OHOS::Ace::DragEvent>& event,
1034                              const std::string& extraParams) -> DragDropInfo {
1035             auto dragInfo = dragStartFunc(event, extraParams);
1036             DragDropInfo info;
1037             info.extraInfo = dragInfo.extraInfo;
1038             info.pixelMap = dragInfo.pixelMap;
1039             info.customNode = AceType::DynamicCast<UINode>(dragInfo.node);
1040             return info;
1041         };
1042         ViewAbstract::SetOnDragStart(std::move(dragStart));
1043     }
1044 
SetOnDragStart(FrameNode * frameNode,NG::OnDragStartFunc && onDragStart)1045     static void SetOnDragStart(FrameNode* frameNode, NG::OnDragStartFunc&& onDragStart)
1046     {
1047         auto dragStart = [dragStartFunc = std::move(onDragStart)](const RefPtr<OHOS::Ace::DragEvent>& event,
1048                              const std::string& extraParams) -> DragDropInfo {
1049             auto dragInfo = dragStartFunc(event, extraParams);
1050             DragDropInfo info;
1051             info.extraInfo = dragInfo.extraInfo;
1052             info.pixelMap = dragInfo.pixelMap;
1053             info.customNode = AceType::DynamicCast<UINode>(dragInfo.node);
1054             return info;
1055         };
1056         ViewAbstract::SetOnDragStart(frameNode, std::move(dragStart));
1057     }
1058 
SetOnPreDrag(NG::OnPreDragFunc && onPreDrag)1059     void SetOnPreDrag(NG::OnPreDragFunc&& onPreDrag) override
1060     {
1061         ViewAbstract::SetOnPreDrag(std::move(onPreDrag));
1062     }
1063 
SetOnDragEnter(NG::OnDragDropFunc && onDragEnter)1064     void SetOnDragEnter(NG::OnDragDropFunc&& onDragEnter) override
1065     {
1066         ViewAbstract::SetOnDragEnter(std::move(onDragEnter));
1067     }
1068 
SetOnDragEnd(OnNewDragFunc && onDragEnd)1069     void SetOnDragEnd(OnNewDragFunc&& onDragEnd) override
1070     {
1071         ViewAbstract::SetOnDragEnd(std::move(onDragEnd));
1072     }
1073 
SetOnDragLeave(NG::OnDragDropFunc && onDragLeave)1074     void SetOnDragLeave(NG::OnDragDropFunc&& onDragLeave) override
1075     {
1076         ViewAbstract::SetOnDragLeave(std::move(onDragLeave));
1077     }
1078 
SetOnDragMove(NG::OnDragDropFunc && onDragMove)1079     void SetOnDragMove(NG::OnDragDropFunc&& onDragMove) override
1080     {
1081         ViewAbstract::SetOnDragMove(std::move(onDragMove));
1082     }
1083 
SetAllowDrop(const std::set<std::string> & allowDrop)1084     void SetAllowDrop(const std::set<std::string>& allowDrop) override
1085     {
1086         ViewAbstract::SetAllowDrop(allowDrop);
1087     }
1088 
SetDrawModifier(const RefPtr<NG::DrawModifier> & drawModifier)1089     void SetDrawModifier(const RefPtr<NG::DrawModifier>& drawModifier) override
1090     {
1091         ViewAbstract::SetDrawModifier(drawModifier);
1092     }
1093 
SetDragPreview(const NG::DragDropInfo & info)1094     void SetDragPreview(const NG::DragDropInfo& info) override
1095     {
1096         ViewAbstract::SetDragPreview(info);
1097     }
1098 
SetOnVisibleChange(std::function<void (bool,double)> && onVisibleChange,const std::vector<double> & ratios)1099     void SetOnVisibleChange(
1100         std::function<void(bool, double)>&& onVisibleChange, const std::vector<double>& ratios) override
1101     {
1102         ViewAbstract::SetOnVisibleChange(std::move(onVisibleChange), ratios);
1103     }
1104 
SetOnAreaChanged(std::function<void (const Rect & oldRect,const Offset & oldOrigin,const Rect & rect,const Offset & origin)> && onAreaChanged)1105     void SetOnAreaChanged(
1106         std::function<void(const Rect& oldRect, const Offset& oldOrigin, const Rect& rect, const Offset& origin)>&&
1107             onAreaChanged) override
1108     {
1109         auto areaChangeCallback = [areaChangeFunc = std::move(onAreaChanged)](const RectF& oldRect,
1110                                       const OffsetF& oldOrigin, const RectF& rect, const OffsetF& origin) {
1111             areaChangeFunc(Rect(oldRect.GetX(), oldRect.GetY(), oldRect.Width(), oldRect.Height()),
1112                 Offset(oldOrigin.GetX(), oldOrigin.GetY()), Rect(rect.GetX(), rect.GetY(), rect.Width(), rect.Height()),
1113                 Offset(origin.GetX(), origin.GetY()));
1114         };
1115         ViewAbstract::SetOnAreaChanged(std::move(areaChangeCallback));
1116     }
1117 
SetOnSizeChanged(std::function<void (const RectF & oldRect,const RectF & rect)> && onSizeChanged)1118     void SetOnSizeChanged(
1119         std::function<void(const RectF& oldRect, const RectF& rect)>&& onSizeChanged) override
1120     {
1121         ViewAbstract::SetOnSizeChanged(std::move(onSizeChanged));
1122     }
1123 
GetFrameNode()1124     void* GetFrameNode() override
1125     {
1126         return ViewAbstract::GetFrameNode();
1127     }
1128 
SetOnDrop(NG::OnDragDropFunc && onDrop)1129     void SetOnDrop(NG::OnDragDropFunc&& onDrop) override
1130     {
1131         ViewAbstract::SetOnDrop(std::move(onDrop));
1132     }
1133 
SetResponseRegion(const std::vector<DimensionRect> & responseRegion)1134     void SetResponseRegion(const std::vector<DimensionRect>& responseRegion) override
1135     {
1136         ViewAbstract::SetResponseRegion(responseRegion);
1137     }
1138 
SetMouseResponseRegion(const std::vector<DimensionRect> & responseRegion)1139     void SetMouseResponseRegion(const std::vector<DimensionRect>& responseRegion) override
1140     {
1141         ViewAbstract::SetMouseResponseRegion(responseRegion);
1142     }
1143 
SetEnabled(bool enabled)1144     void SetEnabled(bool enabled) override
1145     {
1146         ViewAbstract::SetEnabled(enabled);
1147     }
1148 
SetTouchable(bool touchable)1149     void SetTouchable(bool touchable) override
1150     {
1151         ViewAbstract::SetTouchable(touchable);
1152     }
1153 
SetMonopolizeEvents(bool monopolizeEvents)1154     void SetMonopolizeEvents(bool monopolizeEvents) override
1155     {
1156         ViewAbstract::SetMonopolizeEvents(monopolizeEvents);
1157     }
1158 
SetFocusable(bool focusable)1159     void SetFocusable(bool focusable) override
1160     {
1161         ViewAbstract::SetFocusable(focusable);
1162     }
1163 
SetTabStop(bool tabStop)1164     void SetTabStop(bool tabStop) override
1165     {
1166         ViewAbstract::SetTabStop(tabStop);
1167     }
1168 
SetFocusNode(bool focus)1169     void SetFocusNode(bool focus) override {}
1170 
SetTabIndex(int32_t index)1171     void SetTabIndex(int32_t index) override
1172     {
1173         ViewAbstract::SetTabIndex(index);
1174     }
1175 
SetFocusOnTouch(bool isSet)1176     void SetFocusOnTouch(bool isSet) override
1177     {
1178         ViewAbstract::SetFocusOnTouch(isSet);
1179     }
1180 
SetDefaultFocus(bool isSet)1181     void SetDefaultFocus(bool isSet) override
1182     {
1183         ViewAbstract::SetDefaultFocus(isSet);
1184     }
1185 
SetGroupDefaultFocus(bool isSet)1186     void SetGroupDefaultFocus(bool isSet) override
1187     {
1188         ViewAbstract::SetGroupDefaultFocus(isSet);
1189     }
1190 
SetFocusBoxStyle(const NG::FocusBoxStyle & style)1191     void SetFocusBoxStyle(const NG::FocusBoxStyle& style) override
1192     {
1193         ViewAbstract::SetFocusBoxStyle(style);
1194     }
1195 
SetInspectorId(const std::string & inspectorId)1196     void SetInspectorId(const std::string& inspectorId) override
1197     {
1198         ViewAbstract::SetInspectorId(inspectorId);
1199     }
1200 
SetAutoEventParam(const std::string & param)1201     void SetAutoEventParam(const std::string& param) override
1202     {
1203         ViewAbstract::SetAutoEventParam(param);
1204     }
1205 
SetRestoreId(int32_t restoreId)1206     void SetRestoreId(int32_t restoreId) override
1207     {
1208         ViewAbstract::SetRestoreId(restoreId);
1209     }
1210 
SetDebugLine(const std::string & line)1211     void SetDebugLine(const std::string& line) override
1212     {
1213         ViewAbstract::SetDebugLine(line);
1214     }
1215 
SetHoverEffect(HoverEffectType hoverEffect)1216     void SetHoverEffect(HoverEffectType hoverEffect) override
1217     {
1218         ViewAbstract::SetHoverEffect(hoverEffect);
1219     }
1220 
SetHitTestMode(NG::HitTestMode hitTestMode)1221     void SetHitTestMode(NG::HitTestMode hitTestMode) override
1222     {
1223         ViewAbstract::SetHitTestMode(hitTestMode);
1224     }
1225 
SetOnTouchTestFunc(NG::OnChildTouchTestFunc && onChildTouchTest)1226     void SetOnTouchTestFunc(NG::OnChildTouchTestFunc&& onChildTouchTest) override
1227     {
1228         ViewAbstract::SetOnTouchTestFunc(std::move(onChildTouchTest));
1229     }
SetKeyboardShortcut(const std::string & value,const std::vector<ModifierKey> & keys,std::function<void ()> && onKeyboardShortcutAction)1230     void SetKeyboardShortcut(const std::string& value, const std::vector<ModifierKey>& keys,
1231         std::function<void()>&& onKeyboardShortcutAction) override
1232     {
1233         ViewAbstract::SetKeyboardShortcut(value, keys, std::move(onKeyboardShortcutAction));
1234     }
1235 
SetObscured(const std::vector<ObscuredReasons> & reasons)1236     void SetObscured(const std::vector<ObscuredReasons>& reasons) override
1237     {
1238         ViewAbstract::SetObscured(reasons);
1239     }
1240 
SetPrivacySensitive(bool flag)1241     void SetPrivacySensitive(bool flag) override
1242     {
1243         ViewAbstract::SetPrivacySensitive(flag);
1244     }
1245 
BindPopup(const RefPtr<PopupParam> & param,const RefPtr<AceType> & customNode)1246     void BindPopup(const RefPtr<PopupParam>& param, const RefPtr<AceType>& customNode) override
1247     {
1248         auto targetNode = ViewStackProcessor::GetInstance()->GetMainFrameNode();
1249         ViewAbstract::BindPopup(param, AceType::Claim(targetNode), AceType::DynamicCast<UINode>(customNode));
1250     }
1251 
DismissDialog()1252     void DismissDialog() override
1253     {
1254         ViewAbstract::DismissDialog();
1255     }
1256 
DismissPopup()1257     void DismissPopup() override
1258     {
1259         ViewAbstract::DismissPopup();
1260     }
1261 
1262     void BindBackground(std::function<void()>&& buildFunc, const Alignment& align) override;
1263 
1264     void BindMenuGesture(
1265         std::vector<NG::OptionParam>&& params, std::function<void()>&& buildFunc, const MenuParam& menuParam);
1266 
1267     void BindMenu(
1268         std::vector<NG::OptionParam>&& params, std::function<void()>&& buildFunc, const MenuParam& menuParam) override;
1269 
1270     void BindContextMenu(ResponseType type, std::function<void()>& buildFunc, const MenuParam& menuParam,
1271         std::function<void()>& previewBuildFunc) override;
1272 
1273     void BindDragWithContextMenuParams(const NG::MenuParam& menuParam) override;
1274 
1275     void BindContentCover(bool isShow, std::function<void(const std::string&)>&& callback,
1276         std::function<void()>&& buildFunc, NG::ModalStyle& modalStyle, std::function<void()>&& onAppear,
1277         std::function<void()>&& onDisappear, std::function<void()>&& onWillAppear,
1278         std::function<void()>&& onWillDisappear, const NG::ContentCoverParam& contentCoverParam) override;
1279 
1280     void BindSheet(bool isShow, std::function<void(const std::string&)>&& callback, std::function<void()>&& buildFunc,
1281         std::function<void()>&& titleBuildFunc, NG::SheetStyle& sheetStyle, std::function<void()>&& onAppear,
1282         std::function<void()>&& onDisappear, std::function<void()>&& shouldDismiss,
1283         std::function<void(const int32_t info)>&& onWillDismiss,
1284         std::function<void()>&& onWillAppear, std::function<void()>&& onWillDisappear,
1285         std::function<void(const float)>&& onHeightDidChange,
1286         std::function<void(const float)>&& onDetentsDidChange,
1287         std::function<void(const float)>&& onWidthDidChange,
1288         std::function<void(const float)>&& onTypeDidChange,
1289         std::function<void()>&& sheetSpringBack) override;
1290     RefPtr<PipelineContext> GetSheetContext(NG::SheetStyle& sheetStyle);
1291     void DismissSheet() override;
1292     void DismissContentCover() override;
1293     void SheetSpringBack() override;
1294 
1295     void SetAccessibilityGroup(bool accessible) override;
1296     void SetAccessibilityText(const std::string& text) override;
1297     void SetAccessibilityTextHint(const std::string& text) override;
1298     void SetAccessibilityDescription(const std::string& description) override;
1299     void SetAccessibilityImportance(const std::string& importance) override;
1300     void SetAccessibilityVirtualNode(std::function<void()>&& buildFunc) override;
1301     void SetAccessibilitySelected(bool selected, bool resetValue) override;
1302     void SetAccessibilityChecked(bool checked, bool resetValue) override;
1303     void SetAccessibilityTextPreferred(bool accessibilityTextPreferred) override;
1304 
SetForegroundColor(const Color & color)1305     void SetForegroundColor(const Color& color) override
1306     {
1307         ViewAbstract::SetForegroundColor(color);
1308     }
1309 
SetForegroundColorStrategy(const ForegroundColorStrategy & strategy)1310     void SetForegroundColorStrategy(const ForegroundColorStrategy& strategy) override
1311     {
1312         ViewAbstract::SetForegroundColorStrategy(strategy);
1313     }
1314 
SetForegroundEffect(float radius)1315     void SetForegroundEffect(float radius) override
1316     {
1317         ViewAbstract::SetForegroundEffect(radius);
1318     }
1319 
DisableOnClick()1320     void DisableOnClick() override
1321     {
1322         ViewAbstract::DisableOnClick();
1323     }
1324 
DisableOnTouch()1325     void DisableOnTouch() override
1326     {
1327         ViewAbstract::DisableOnTouch();
1328     }
1329 
DisableOnKeyEvent()1330     void DisableOnKeyEvent() override
1331     {
1332         ViewAbstract::DisableOnKeyEvent();
1333     }
1334 
DisableOnKeyPreIme()1335     void DisableOnKeyPreIme() override
1336     {
1337         auto focusHub = ViewStackProcessor::GetInstance()->GetOrCreateMainFrameNodeFocusHub();
1338         CHECK_NULL_VOID(focusHub);
1339         focusHub->ClearOnKeyPreIme();
1340     }
1341 
DisableOnKeyPreIme(FrameNode * frameNode)1342     static void DisableOnKeyPreIme(FrameNode* frameNode)
1343     {
1344         auto focusHub = frameNode->GetOrCreateFocusHub();
1345         CHECK_NULL_VOID(focusHub);
1346         focusHub->ClearOnKeyPreIme();
1347     }
1348 
DisableOnHover()1349     void DisableOnHover() override
1350     {
1351         ViewAbstract::DisableOnHover();
1352     }
1353 
DisableOnAccessibilityHover()1354     void DisableOnAccessibilityHover() override
1355     {
1356         ViewAbstract::DisableOnAccessibilityHover();
1357     }
1358 
DisableOnMouse()1359     void DisableOnMouse() override
1360     {
1361         ViewAbstract::DisableOnMouse();
1362     }
1363 
DisableOnAppear()1364     void DisableOnAppear() override
1365     {
1366         ViewAbstract::DisableOnAppear();
1367     }
1368 
DisableOnDisAppear()1369     void DisableOnDisAppear() override
1370     {
1371         ViewAbstract::DisableOnDisAppear();
1372     }
1373 
DisableOnAttach()1374     void DisableOnAttach() override
1375     {
1376         ViewAbstract::DisableOnAttach();
1377     }
1378 
DisableOnDetach()1379     void DisableOnDetach() override
1380     {
1381         ViewAbstract::DisableOnDetach();
1382     }
1383 
DisableOnAreaChange()1384     void DisableOnAreaChange() override
1385     {
1386         ViewAbstract::DisableOnAreaChange();
1387     }
1388 
DisableOnFocus()1389     void DisableOnFocus() override
1390     {
1391         ViewAbstract::DisableOnFocus();
1392     }
1393 
DisableOnBlur()1394     void DisableOnBlur() override
1395     {
1396         ViewAbstract::DisableOnBlur();
1397     }
1398 
1399     static void SetAccessibilityText(FrameNode* frameNode, const std::string& text);
1400 
SetLightPosition(const CalcDimension & positionX,const CalcDimension & positionY,const CalcDimension & positionZ)1401     void SetLightPosition(
1402         const CalcDimension& positionX, const CalcDimension& positionY, const CalcDimension& positionZ) override
1403     {
1404         ViewAbstract::SetLightPosition(positionX, positionY, positionZ);
1405     }
1406 
SetLightIntensity(const float value)1407     void SetLightIntensity(const float value) override
1408     {
1409         ViewAbstract::SetLightIntensity(value);
1410     }
1411 
SetLightColor(const Color & value)1412     void SetLightColor(const Color& value) override
1413     {
1414         ViewAbstract::SetLightColor(value);
1415     }
1416 
SetLightIlluminated(const uint32_t value)1417     void SetLightIlluminated(const uint32_t value) override
1418     {
1419         ViewAbstract::SetLightIlluminated(value);
1420     }
1421 
SetIlluminatedBorderWidth(const Dimension & value)1422     void SetIlluminatedBorderWidth(const Dimension& value) override
1423     {
1424         ViewAbstract::SetIlluminatedBorderWidth(value);
1425     }
1426 
SetBloom(const float value)1427     void SetBloom(const float value) override
1428     {
1429         ViewAbstract::SetBloom(value);
1430     }
1431 
SetDragEventStrictReportingEnabled(bool dragEventStrictReportingEnabled)1432     void SetDragEventStrictReportingEnabled(bool dragEventStrictReportingEnabled) override
1433     {
1434         ViewAbstract::SetDragEventStrictReportingEnabled(dragEventStrictReportingEnabled);
1435     }
1436 
SetFocusScopeId(const std::string & focusScopeId,bool isGroup,bool arrowKeyStepOut)1437     void SetFocusScopeId(const std::string& focusScopeId, bool isGroup, bool arrowKeyStepOut) override
1438     {
1439         ViewAbstract::SetFocusScopeId(focusScopeId, isGroup, arrowKeyStepOut);
1440     }
1441 
SetFocusScopePriority(const std::string & focusScopeId,const uint32_t focusPriority)1442     void SetFocusScopePriority(const std::string& focusScopeId, const uint32_t focusPriority) override
1443     {
1444         ViewAbstract::SetFocusScopePriority(focusScopeId, focusPriority);
1445     }
1446 
1447     static void SetAccessibilityGroup(FrameNode* frameNode, bool accessible);
SetUseShadowBatching(FrameNode * frameNode,bool useShadowBatching)1448     static void SetUseShadowBatching(FrameNode* frameNode, bool useShadowBatching)
1449     {
1450         ViewAbstract::SetUseShadowBatching(frameNode, useShadowBatching);
1451     }
SetBlendMode(FrameNode * frameNode,BlendMode blendMode)1452     static void SetBlendMode(FrameNode* frameNode, BlendMode blendMode)
1453     {
1454         ViewAbstract::SetBlendMode(frameNode, blendMode);
1455     }
SetBlendApplyType(FrameNode * frameNode,BlendApplyType blendApplyType)1456     static void SetBlendApplyType(FrameNode* frameNode, BlendApplyType blendApplyType)
1457     {
1458         ViewAbstract::SetBlendApplyType(frameNode, blendApplyType);
1459     }
SetBrightnessBlender(FrameNode * frameNode,const OHOS::Rosen::BrightnessBlender * brightnessBlender)1460     static void SetBrightnessBlender(FrameNode* frameNode, const OHOS::Rosen::BrightnessBlender* brightnessBlender)
1461     {
1462         ViewAbstract::SetBrightnessBlender(brightnessBlender);
1463     }
SetMonopolizeEvents(FrameNode * frameNode,bool monopolizeEvents)1464     static void SetMonopolizeEvents(FrameNode* frameNode, bool monopolizeEvents)
1465     {
1466         ViewAbstract::SetMonopolizeEvents(frameNode, monopolizeEvents);
1467     }
1468 
1469     static void SetAccessibilityImportance(FrameNode* frameNode, const std::string& importance);
1470     static void SetAccessibilityDescription(FrameNode* frameNode, const std::string& description);
1471     static void SetAccessibilitySelected(FrameNode* frameNode, bool selected, bool resetValue);
1472     static void SetAccessibilityChecked(FrameNode* frameNode, bool checked, bool resetValue);
1473     static void SetAccessibilityTextPreferred(FrameNode* frameNode, bool accessibilityTextPreferred);
SetKeyboardShortcut(FrameNode * frameNode,const std::string & value,const std::vector<ModifierKey> & keys,std::function<void ()> && onKeyboardShortcutAction)1474     static void SetKeyboardShortcut(FrameNode* frameNode, const std::string& value,
1475         const std::vector<ModifierKey>& keys, std::function<void()>&& onKeyboardShortcutAction)
1476     {
1477         ViewAbstract::SetKeyboardShortcut(frameNode, value, keys, std::move(onKeyboardShortcutAction));
1478     }
1479 
ClearWidthOrHeight(FrameNode * frameNode,bool isWidth)1480     static void ClearWidthOrHeight(FrameNode* frameNode, bool isWidth)
1481     {
1482         ViewAbstract::ClearWidthOrHeight(frameNode, isWidth);
1483     }
1484 
1485     static bool GetAccessibilityGroup(FrameNode* frameNode);
1486     static std::string GetAccessibilityText(FrameNode* frameNode);
1487     static std::string GetAccessibilityDescription(FrameNode* frameNode);
1488     static std::string GetAccessibilityImportance(FrameNode* frameNode);
1489 
1490 private:
1491     void RegisterContextMenuKeyEvent(
1492         const RefPtr<FrameNode>& targetNode, std::function<void()>& buildFunc, const MenuParam& menuParam);
1493 
CreateAnimatablePropertyFloat(const std::string & propertyName,float value,const std::function<void (float)> & onCallbackEvent)1494     void CreateAnimatablePropertyFloat(
1495         const std::string& propertyName, float value, const std::function<void(float)>& onCallbackEvent) override
1496     {
1497         ViewAbstract::CreateAnimatablePropertyFloat(propertyName, value, onCallbackEvent);
1498     }
1499 
UpdateAnimatablePropertyFloat(const std::string & propertyName,float value)1500     void UpdateAnimatablePropertyFloat(const std::string& propertyName, float value) override
1501     {
1502         ViewAbstract::UpdateAnimatablePropertyFloat(propertyName, value);
1503     }
1504 
CreateAnimatableArithmeticProperty(const std::string & propertyName,RefPtr<CustomAnimatableArithmetic> & value,std::function<void (const RefPtr<CustomAnimatableArithmetic> &)> & onCallbackEvent)1505     void CreateAnimatableArithmeticProperty(const std::string& propertyName, RefPtr<CustomAnimatableArithmetic>& value,
1506         std::function<void(const RefPtr<CustomAnimatableArithmetic>&)>& onCallbackEvent) override
1507     {
1508         ViewAbstract::CreateAnimatableArithmeticProperty(propertyName, value, onCallbackEvent);
1509     }
1510 
UpdateAnimatableArithmeticProperty(const std::string & propertyName,RefPtr<CustomAnimatableArithmetic> & value)1511     void UpdateAnimatableArithmeticProperty(
1512         const std::string& propertyName, RefPtr<CustomAnimatableArithmetic>& value) override
1513     {
1514         ViewAbstract::UpdateAnimatableArithmeticProperty(propertyName, value);
1515     }
1516 
UpdateSafeAreaExpandOpts(const SafeAreaExpandOpts & opts)1517     void UpdateSafeAreaExpandOpts(const SafeAreaExpandOpts& opts) override
1518     {
1519         ViewAbstract::UpdateSafeAreaExpandOpts(opts);
1520     }
1521 
SetPositionLocalizedEdges(bool needLocalized)1522     void SetPositionLocalizedEdges(bool needLocalized) override
1523     {
1524         ViewAbstract::SetPositionLocalizedEdges(needLocalized);
1525     }
1526 
SetLocalizedMarkAnchor(bool needLocalized)1527     void SetLocalizedMarkAnchor(bool needLocalized) override
1528     {
1529         ViewAbstract::SetLocalizedMarkAnchor(needLocalized);
1530     }
1531 
SetOffsetLocalizedEdges(bool needLocalized)1532     void SetOffsetLocalizedEdges(bool needLocalized) override
1533     {
1534         ViewAbstract::SetOffsetLocalizedEdges(needLocalized);
1535     }
1536 };
1537 } // namespace OHOS::Ace::NG
1538 
1539 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_BASE_VIEW_ABSTRACT_MODEL_NG_H
1540