1use crate::ArkUICommonFontAttribute;
4
5impl ArkUICommonFontAttribute for super::TextArea {}
6
7impl super::TextArea {
9 pub fn set_text_area_placeholder<T: Into<crate::ArkUINodeAttributeItem>>(
10 &self,
11 value: T,
12 ) -> crate::ArkUIResult<()> {
13 <Self as crate::ArkUICommonAttribute>::set_attribute(
14 self,
15 crate::ArkUINodeAttributeType::TextAreaPlaceholder,
16 value.into(),
17 )
18 }
19
20 pub fn get_text_area_placeholder(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
21 <Self as crate::ArkUICommonAttribute>::get_attribute(
22 self,
23 crate::ArkUINodeAttributeType::TextAreaPlaceholder,
24 )
25 }
26
27 pub fn set_text_area_text<T: Into<crate::ArkUINodeAttributeItem>>(
28 &self,
29 value: T,
30 ) -> crate::ArkUIResult<()> {
31 <Self as crate::ArkUICommonAttribute>::set_attribute(
32 self,
33 crate::ArkUINodeAttributeType::TextAreaText,
34 value.into(),
35 )
36 }
37
38 pub fn get_text_area_text(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
39 <Self as crate::ArkUICommonAttribute>::get_attribute(
40 self,
41 crate::ArkUINodeAttributeType::TextAreaText,
42 )
43 }
44
45 pub fn set_text_area_max_length<T: Into<crate::ArkUINodeAttributeItem>>(
46 &self,
47 value: T,
48 ) -> crate::ArkUIResult<()> {
49 <Self as crate::ArkUICommonAttribute>::set_attribute(
50 self,
51 crate::ArkUINodeAttributeType::TextAreaMaxLength,
52 value.into(),
53 )
54 }
55
56 pub fn get_text_area_max_length(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
57 <Self as crate::ArkUICommonAttribute>::get_attribute(
58 self,
59 crate::ArkUINodeAttributeType::TextAreaMaxLength,
60 )
61 }
62
63 pub fn set_text_area_placeholder_color<T: Into<crate::ArkUINodeAttributeItem>>(
64 &self,
65 value: T,
66 ) -> crate::ArkUIResult<()> {
67 <Self as crate::ArkUICommonAttribute>::set_attribute(
68 self,
69 crate::ArkUINodeAttributeType::TextAreaPlaceholderColor,
70 value.into(),
71 )
72 }
73
74 pub fn get_text_area_placeholder_color(
75 &self,
76 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
77 <Self as crate::ArkUICommonAttribute>::get_attribute(
78 self,
79 crate::ArkUINodeAttributeType::TextAreaPlaceholderColor,
80 )
81 }
82
83 pub fn set_text_area_placeholder_font<T: Into<crate::ArkUINodeAttributeItem>>(
84 &self,
85 value: T,
86 ) -> crate::ArkUIResult<()> {
87 <Self as crate::ArkUICommonAttribute>::set_attribute(
88 self,
89 crate::ArkUINodeAttributeType::TextAreaPlaceholderFont,
90 value.into(),
91 )
92 }
93
94 pub fn get_text_area_placeholder_font(
95 &self,
96 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
97 <Self as crate::ArkUICommonAttribute>::get_attribute(
98 self,
99 crate::ArkUINodeAttributeType::TextAreaPlaceholderFont,
100 )
101 }
102
103 pub fn set_text_area_caret_color<T: Into<crate::ArkUINodeAttributeItem>>(
104 &self,
105 value: T,
106 ) -> crate::ArkUIResult<()> {
107 <Self as crate::ArkUICommonAttribute>::set_attribute(
108 self,
109 crate::ArkUINodeAttributeType::TextAreaCaretColor,
110 value.into(),
111 )
112 }
113
114 pub fn get_text_area_caret_color(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
115 <Self as crate::ArkUICommonAttribute>::get_attribute(
116 self,
117 crate::ArkUINodeAttributeType::TextAreaCaretColor,
118 )
119 }
120
121 pub fn set_text_area_editing<T: Into<crate::ArkUINodeAttributeItem>>(
122 &self,
123 value: T,
124 ) -> crate::ArkUIResult<()> {
125 <Self as crate::ArkUICommonAttribute>::set_attribute(
126 self,
127 crate::ArkUINodeAttributeType::TextAreaEditing,
128 value.into(),
129 )
130 }
131
132 pub fn get_text_area_editing(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
133 <Self as crate::ArkUICommonAttribute>::get_attribute(
134 self,
135 crate::ArkUINodeAttributeType::TextAreaEditing,
136 )
137 }
138
139 pub fn set_text_area_type<T: Into<crate::ArkUINodeAttributeItem>>(
140 &self,
141 value: T,
142 ) -> crate::ArkUIResult<()> {
143 <Self as crate::ArkUICommonAttribute>::set_attribute(
144 self,
145 crate::ArkUINodeAttributeType::TextAreaType,
146 value.into(),
147 )
148 }
149
150 pub fn get_text_area_type(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
151 <Self as crate::ArkUICommonAttribute>::get_attribute(
152 self,
153 crate::ArkUINodeAttributeType::TextAreaType,
154 )
155 }
156
157 pub fn set_text_area_show_counter<T: Into<crate::ArkUINodeAttributeItem>>(
158 &self,
159 value: T,
160 ) -> crate::ArkUIResult<()> {
161 <Self as crate::ArkUICommonAttribute>::set_attribute(
162 self,
163 crate::ArkUINodeAttributeType::TextAreaShowCounter,
164 value.into(),
165 )
166 }
167
168 pub fn get_text_area_show_counter(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
169 <Self as crate::ArkUICommonAttribute>::get_attribute(
170 self,
171 crate::ArkUINodeAttributeType::TextAreaShowCounter,
172 )
173 }
174
175 pub fn set_text_area_selection_menu_hidden<T: Into<crate::ArkUINodeAttributeItem>>(
176 &self,
177 value: T,
178 ) -> crate::ArkUIResult<()> {
179 <Self as crate::ArkUICommonAttribute>::set_attribute(
180 self,
181 crate::ArkUINodeAttributeType::TextAreaSelectionMenuHidden,
182 value.into(),
183 )
184 }
185
186 pub fn get_text_area_selection_menu_hidden(
187 &self,
188 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
189 <Self as crate::ArkUICommonAttribute>::get_attribute(
190 self,
191 crate::ArkUINodeAttributeType::TextAreaSelectionMenuHidden,
192 )
193 }
194
195 pub fn set_text_area_blur_on_submit<T: Into<crate::ArkUINodeAttributeItem>>(
196 &self,
197 value: T,
198 ) -> crate::ArkUIResult<()> {
199 <Self as crate::ArkUICommonAttribute>::set_attribute(
200 self,
201 crate::ArkUINodeAttributeType::TextAreaBlurOnSubmit,
202 value.into(),
203 )
204 }
205
206 pub fn get_text_area_blur_on_submit(
207 &self,
208 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
209 <Self as crate::ArkUICommonAttribute>::get_attribute(
210 self,
211 crate::ArkUINodeAttributeType::TextAreaBlurOnSubmit,
212 )
213 }
214
215 pub fn set_text_area_input_filter<T: Into<crate::ArkUINodeAttributeItem>>(
216 &self,
217 value: T,
218 ) -> crate::ArkUIResult<()> {
219 <Self as crate::ArkUICommonAttribute>::set_attribute(
220 self,
221 crate::ArkUINodeAttributeType::TextAreaInputFilter,
222 value.into(),
223 )
224 }
225
226 pub fn get_text_area_input_filter(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
227 <Self as crate::ArkUICommonAttribute>::get_attribute(
228 self,
229 crate::ArkUINodeAttributeType::TextAreaInputFilter,
230 )
231 }
232
233 pub fn set_text_area_selected_background_color<T: Into<crate::ArkUINodeAttributeItem>>(
234 &self,
235 value: T,
236 ) -> crate::ArkUIResult<()> {
237 <Self as crate::ArkUICommonAttribute>::set_attribute(
238 self,
239 crate::ArkUINodeAttributeType::TextAreaSelectedBackgroundColor,
240 value.into(),
241 )
242 }
243
244 pub fn get_text_area_selected_background_color(
245 &self,
246 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
247 <Self as crate::ArkUICommonAttribute>::get_attribute(
248 self,
249 crate::ArkUINodeAttributeType::TextAreaSelectedBackgroundColor,
250 )
251 }
252
253 pub fn set_text_area_enter_key_type<T: Into<crate::ArkUINodeAttributeItem>>(
254 &self,
255 value: T,
256 ) -> crate::ArkUIResult<()> {
257 <Self as crate::ArkUICommonAttribute>::set_attribute(
258 self,
259 crate::ArkUINodeAttributeType::TextAreaEnterKeyType,
260 value.into(),
261 )
262 }
263
264 pub fn get_text_area_enter_key_type(
265 &self,
266 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
267 <Self as crate::ArkUICommonAttribute>::get_attribute(
268 self,
269 crate::ArkUINodeAttributeType::TextAreaEnterKeyType,
270 )
271 }
272
273 pub fn set_text_area_enable_keyboard_on_focus<T: Into<crate::ArkUINodeAttributeItem>>(
274 &self,
275 value: T,
276 ) -> crate::ArkUIResult<()> {
277 <Self as crate::ArkUICommonAttribute>::set_attribute(
278 self,
279 crate::ArkUINodeAttributeType::TextAreaEnableKeyboardOnFocus,
280 value.into(),
281 )
282 }
283
284 pub fn get_text_area_enable_keyboard_on_focus(
285 &self,
286 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
287 <Self as crate::ArkUICommonAttribute>::get_attribute(
288 self,
289 crate::ArkUINodeAttributeType::TextAreaEnableKeyboardOnFocus,
290 )
291 }
292
293 pub fn set_text_area_caret_offset<T: Into<crate::ArkUINodeAttributeItem>>(
294 &self,
295 value: T,
296 ) -> crate::ArkUIResult<()> {
297 <Self as crate::ArkUICommonAttribute>::set_attribute(
298 self,
299 crate::ArkUINodeAttributeType::TextAreaCaretOffset,
300 value.into(),
301 )
302 }
303
304 pub fn get_text_area_caret_offset(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
305 <Self as crate::ArkUICommonAttribute>::get_attribute(
306 self,
307 crate::ArkUINodeAttributeType::TextAreaCaretOffset,
308 )
309 }
310
311 pub fn set_text_area_content_rect<T: Into<crate::ArkUINodeAttributeItem>>(
312 &self,
313 value: T,
314 ) -> crate::ArkUIResult<()> {
315 <Self as crate::ArkUICommonAttribute>::set_attribute(
316 self,
317 crate::ArkUINodeAttributeType::TextAreaContentRect,
318 value.into(),
319 )
320 }
321
322 pub fn get_text_area_content_rect(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
323 <Self as crate::ArkUICommonAttribute>::get_attribute(
324 self,
325 crate::ArkUINodeAttributeType::TextAreaContentRect,
326 )
327 }
328
329 pub fn set_text_area_content_line_count<T: Into<crate::ArkUINodeAttributeItem>>(
330 &self,
331 value: T,
332 ) -> crate::ArkUIResult<()> {
333 <Self as crate::ArkUICommonAttribute>::set_attribute(
334 self,
335 crate::ArkUINodeAttributeType::TextAreaContentLineCount,
336 value.into(),
337 )
338 }
339
340 pub fn get_text_area_content_line_count(
341 &self,
342 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
343 <Self as crate::ArkUICommonAttribute>::get_attribute(
344 self,
345 crate::ArkUINodeAttributeType::TextAreaContentLineCount,
346 )
347 }
348
349 pub fn set_text_area_text_selection<T: Into<crate::ArkUINodeAttributeItem>>(
350 &self,
351 value: T,
352 ) -> crate::ArkUIResult<()> {
353 <Self as crate::ArkUICommonAttribute>::set_attribute(
354 self,
355 crate::ArkUINodeAttributeType::TextAreaTextSelection,
356 value.into(),
357 )
358 }
359
360 pub fn get_text_area_text_selection(
361 &self,
362 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
363 <Self as crate::ArkUICommonAttribute>::get_attribute(
364 self,
365 crate::ArkUINodeAttributeType::TextAreaTextSelection,
366 )
367 }
368
369 pub fn set_text_area_enable_auto_fill<T: Into<crate::ArkUINodeAttributeItem>>(
370 &self,
371 value: T,
372 ) -> crate::ArkUIResult<()> {
373 <Self as crate::ArkUICommonAttribute>::set_attribute(
374 self,
375 crate::ArkUINodeAttributeType::TextAreaEnableAutoFill,
376 value.into(),
377 )
378 }
379
380 pub fn get_text_area_enable_auto_fill(
381 &self,
382 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
383 <Self as crate::ArkUICommonAttribute>::get_attribute(
384 self,
385 crate::ArkUINodeAttributeType::TextAreaEnableAutoFill,
386 )
387 }
388
389 pub fn set_text_area_content_type<T: Into<crate::ArkUINodeAttributeItem>>(
390 &self,
391 value: T,
392 ) -> crate::ArkUIResult<()> {
393 <Self as crate::ArkUICommonAttribute>::set_attribute(
394 self,
395 crate::ArkUINodeAttributeType::TextAreaContentType,
396 value.into(),
397 )
398 }
399
400 pub fn get_text_area_content_type(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
401 <Self as crate::ArkUICommonAttribute>::get_attribute(
402 self,
403 crate::ArkUINodeAttributeType::TextAreaContentType,
404 )
405 }
406
407 pub fn set_text_area_show_keyboard_on_focus<T: Into<crate::ArkUINodeAttributeItem>>(
408 &self,
409 value: T,
410 ) -> crate::ArkUIResult<()> {
411 <Self as crate::ArkUICommonAttribute>::set_attribute(
412 self,
413 crate::ArkUINodeAttributeType::TextAreaShowKeyboardOnFocus,
414 value.into(),
415 )
416 }
417
418 pub fn get_text_area_show_keyboard_on_focus(
419 &self,
420 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
421 <Self as crate::ArkUICommonAttribute>::get_attribute(
422 self,
423 crate::ArkUINodeAttributeType::TextAreaShowKeyboardOnFocus,
424 )
425 }
426
427 pub fn set_text_area_number_of_lines<T: Into<crate::ArkUINodeAttributeItem>>(
428 &self,
429 value: T,
430 ) -> crate::ArkUIResult<()> {
431 <Self as crate::ArkUICommonAttribute>::set_attribute(
432 self,
433 crate::ArkUINodeAttributeType::TextAreaNumberOfLines,
434 value.into(),
435 )
436 }
437
438 pub fn get_text_area_number_of_lines(
439 &self,
440 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
441 <Self as crate::ArkUICommonAttribute>::get_attribute(
442 self,
443 crate::ArkUINodeAttributeType::TextAreaNumberOfLines,
444 )
445 }
446
447 #[cfg(feature = "api-22")]
448 pub fn set_text_area_bar_state<T: Into<crate::ArkUINodeAttributeItem>>(
449 &self,
450 value: T,
451 ) -> crate::ArkUIResult<()> {
452 <Self as crate::ArkUICommonAttribute>::set_attribute(
453 self,
454 crate::ArkUINodeAttributeType::TextAreaBarState,
455 value.into(),
456 )
457 }
458
459 #[cfg(feature = "api-22")]
460 pub fn get_text_area_bar_state(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
461 <Self as crate::ArkUICommonAttribute>::get_attribute(
462 self,
463 crate::ArkUINodeAttributeType::TextAreaBarState,
464 )
465 }
466
467 #[cfg(feature = "api-22")]
468 pub fn set_text_area_custom_keyboard<T: Into<crate::ArkUINodeAttributeItem>>(
469 &self,
470 value: T,
471 ) -> crate::ArkUIResult<()> {
472 <Self as crate::ArkUICommonAttribute>::set_attribute(
473 self,
474 crate::ArkUINodeAttributeType::TextAreaCustomKeyboard,
475 value.into(),
476 )
477 }
478
479 #[cfg(feature = "api-22")]
480 pub fn get_text_area_custom_keyboard(
481 &self,
482 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
483 <Self as crate::ArkUICommonAttribute>::get_attribute(
484 self,
485 crate::ArkUINodeAttributeType::TextAreaCustomKeyboard,
486 )
487 }
488
489 #[cfg(feature = "api-15")]
490 pub fn set_text_area_enable_preview_text<T: Into<crate::ArkUINodeAttributeItem>>(
491 &self,
492 value: T,
493 ) -> crate::ArkUIResult<()> {
494 <Self as crate::ArkUICommonAttribute>::set_attribute(
495 self,
496 crate::ArkUINodeAttributeType::TextAreaEnablePreviewText,
497 value.into(),
498 )
499 }
500
501 #[cfg(feature = "api-15")]
502 pub fn get_text_area_enable_preview_text(
503 &self,
504 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
505 <Self as crate::ArkUICommonAttribute>::get_attribute(
506 self,
507 crate::ArkUINodeAttributeType::TextAreaEnablePreviewText,
508 )
509 }
510
511 #[cfg(feature = "api-22")]
512 pub fn set_text_area_enable_selected_data_detector<T: Into<crate::ArkUINodeAttributeItem>>(
513 &self,
514 value: T,
515 ) -> crate::ArkUIResult<()> {
516 <Self as crate::ArkUICommonAttribute>::set_attribute(
517 self,
518 crate::ArkUINodeAttributeType::TextAreaEnableSelectedDataDetector,
519 value.into(),
520 )
521 }
522
523 #[cfg(feature = "api-22")]
524 pub fn get_text_area_enable_selected_data_detector(
525 &self,
526 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
527 <Self as crate::ArkUICommonAttribute>::get_attribute(
528 self,
529 crate::ArkUINodeAttributeType::TextAreaEnableSelectedDataDetector,
530 )
531 }
532
533 #[cfg(feature = "api-18")]
534 pub fn set_text_area_half_leading<T: Into<crate::ArkUINodeAttributeItem>>(
535 &self,
536 value: T,
537 ) -> crate::ArkUIResult<()> {
538 <Self as crate::ArkUICommonAttribute>::set_attribute(
539 self,
540 crate::ArkUINodeAttributeType::TextAreaHalfLeading,
541 value.into(),
542 )
543 }
544
545 #[cfg(feature = "api-18")]
546 pub fn get_text_area_half_leading(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
547 <Self as crate::ArkUICommonAttribute>::get_attribute(
548 self,
549 crate::ArkUINodeAttributeType::TextAreaHalfLeading,
550 )
551 }
552
553 #[cfg(feature = "api-15")]
554 pub fn set_text_area_keyboard_appearance<T: Into<crate::ArkUINodeAttributeItem>>(
555 &self,
556 value: T,
557 ) -> crate::ArkUIResult<()> {
558 <Self as crate::ArkUICommonAttribute>::set_attribute(
559 self,
560 crate::ArkUINodeAttributeType::TextAreaKeyboardAppearance,
561 value.into(),
562 )
563 }
564
565 #[cfg(feature = "api-15")]
566 pub fn get_text_area_keyboard_appearance(
567 &self,
568 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
569 <Self as crate::ArkUICommonAttribute>::get_attribute(
570 self,
571 crate::ArkUINodeAttributeType::TextAreaKeyboardAppearance,
572 )
573 }
574
575 #[cfg(feature = "api-15")]
576 pub fn set_text_area_letter_spacing<T: Into<crate::ArkUINodeAttributeItem>>(
577 &self,
578 value: T,
579 ) -> crate::ArkUIResult<()> {
580 <Self as crate::ArkUICommonAttribute>::set_attribute(
581 self,
582 crate::ArkUINodeAttributeType::TextAreaLetterSpacing,
583 value.into(),
584 )
585 }
586
587 #[cfg(feature = "api-15")]
588 pub fn get_text_area_letter_spacing(
589 &self,
590 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
591 <Self as crate::ArkUICommonAttribute>::get_attribute(
592 self,
593 crate::ArkUINodeAttributeType::TextAreaLetterSpacing,
594 )
595 }
596
597 #[cfg(feature = "api-20")]
598 pub fn set_text_area_line_height<T: Into<crate::ArkUINodeAttributeItem>>(
599 &self,
600 value: T,
601 ) -> crate::ArkUIResult<()> {
602 <Self as crate::ArkUICommonAttribute>::set_attribute(
603 self,
604 crate::ArkUINodeAttributeType::TextAreaLineHeight,
605 value.into(),
606 )
607 }
608
609 #[cfg(feature = "api-20")]
610 pub fn get_text_area_line_height(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
611 <Self as crate::ArkUICommonAttribute>::get_attribute(
612 self,
613 crate::ArkUINodeAttributeType::TextAreaLineHeight,
614 )
615 }
616
617 #[cfg(feature = "api-20")]
618 pub fn set_text_area_line_spacing<T: Into<crate::ArkUINodeAttributeItem>>(
619 &self,
620 value: T,
621 ) -> crate::ArkUIResult<()> {
622 <Self as crate::ArkUICommonAttribute>::set_attribute(
623 self,
624 crate::ArkUINodeAttributeType::TextAreaLineSpacing,
625 value.into(),
626 )
627 }
628
629 #[cfg(feature = "api-20")]
630 pub fn get_text_area_line_spacing(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
631 <Self as crate::ArkUICommonAttribute>::get_attribute(
632 self,
633 crate::ArkUINodeAttributeType::TextAreaLineSpacing,
634 )
635 }
636
637 #[cfg(feature = "api-20")]
638 pub fn set_text_area_max_lines<T: Into<crate::ArkUINodeAttributeItem>>(
639 &self,
640 value: T,
641 ) -> crate::ArkUIResult<()> {
642 <Self as crate::ArkUICommonAttribute>::set_attribute(
643 self,
644 crate::ArkUINodeAttributeType::TextAreaMaxLines,
645 value.into(),
646 )
647 }
648
649 #[cfg(feature = "api-20")]
650 pub fn get_text_area_max_lines(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
651 <Self as crate::ArkUICommonAttribute>::get_attribute(
652 self,
653 crate::ArkUINodeAttributeType::TextAreaMaxLines,
654 )
655 }
656
657 #[cfg(feature = "api-20")]
658 pub fn set_text_area_max_lines_with_scroll<T: Into<crate::ArkUINodeAttributeItem>>(
659 &self,
660 value: T,
661 ) -> crate::ArkUIResult<()> {
662 <Self as crate::ArkUICommonAttribute>::set_attribute(
663 self,
664 crate::ArkUINodeAttributeType::TextAreaMaxLinesWithScroll,
665 value.into(),
666 )
667 }
668
669 #[cfg(feature = "api-20")]
670 pub fn get_text_area_max_lines_with_scroll(
671 &self,
672 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
673 <Self as crate::ArkUICommonAttribute>::get_attribute(
674 self,
675 crate::ArkUINodeAttributeType::TextAreaMaxLinesWithScroll,
676 )
677 }
678
679 #[cfg(feature = "api-20")]
680 pub fn set_text_area_min_lines<T: Into<crate::ArkUINodeAttributeItem>>(
681 &self,
682 value: T,
683 ) -> crate::ArkUIResult<()> {
684 <Self as crate::ArkUICommonAttribute>::set_attribute(
685 self,
686 crate::ArkUINodeAttributeType::TextAreaMinLines,
687 value.into(),
688 )
689 }
690
691 #[cfg(feature = "api-20")]
692 pub fn get_text_area_min_lines(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
693 <Self as crate::ArkUICommonAttribute>::get_attribute(
694 self,
695 crate::ArkUINodeAttributeType::TextAreaMinLines,
696 )
697 }
698
699 #[cfg(feature = "api-22")]
700 pub fn set_text_area_scroll_bar_color<T: Into<crate::ArkUINodeAttributeItem>>(
701 &self,
702 value: T,
703 ) -> crate::ArkUIResult<()> {
704 <Self as crate::ArkUICommonAttribute>::set_attribute(
705 self,
706 crate::ArkUINodeAttributeType::TextAreaScrollBarColor,
707 value.into(),
708 )
709 }
710
711 #[cfg(feature = "api-22")]
712 pub fn get_text_area_scroll_bar_color(
713 &self,
714 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
715 <Self as crate::ArkUICommonAttribute>::get_attribute(
716 self,
717 crate::ArkUINodeAttributeType::TextAreaScrollBarColor,
718 )
719 }
720}
721impl super::TextArea {
724 pub fn on_text_area_change<T: Fn(String) + 'static>(&mut self, cb: T) {
725 crate::ArkUIEvent::on_event(self, crate::NodeEventType::TextAreaOnChange, move |event| {
726 cb(event.async_string().unwrap_or_default());
727 });
728 }
729
730 pub fn on_text_area_paste<T: Fn(String) + 'static>(&mut self, cb: T) {
731 crate::ArkUIEvent::on_event(self, crate::NodeEventType::TextAreaOnPaste, move |event| {
732 cb(event.async_string().unwrap_or_default());
733 });
734 }
735
736 pub fn on_text_area_selection_change<T: Fn(i32, i32) + 'static>(&mut self, cb: T) {
737 crate::ArkUIEvent::on_event(
738 self,
739 crate::NodeEventType::TextAreaOnTextSelectionChange,
740 move |event| {
741 cb(
742 event.i32_value(0).unwrap_or_default(),
743 event.i32_value(1).unwrap_or_default(),
744 );
745 },
746 );
747 }
748
749 pub fn on_text_area_input_filter_error<T: Fn(String) + 'static>(&mut self, cb: T) {
750 crate::ArkUIEvent::on_event(
751 self,
752 crate::NodeEventType::TextAreaOnInputFilterError,
753 move |event| {
754 cb(event.async_string().unwrap_or_default());
755 },
756 );
757 }
758
759 pub fn on_text_area_content_scroll<T: Fn(i32, i32) + 'static>(&mut self, cb: T) {
760 crate::ArkUIEvent::on_event(
761 self,
762 crate::NodeEventType::TextAreaOnContentScroll,
763 move |event| {
764 cb(
765 event.i32_value(0).unwrap_or_default(),
766 event.i32_value(1).unwrap_or_default(),
767 );
768 },
769 );
770 }
771
772 pub fn on_text_area_edit_change<T: Fn(bool) + 'static>(&mut self, cb: T) {
773 crate::ArkUIEvent::on_event(
774 self,
775 crate::NodeEventType::TextAreaOnEditChange,
776 move |event| {
777 cb(event.i32_value(0).unwrap_or_default() != 0);
778 },
779 );
780 }
781
782 pub fn on_text_area_submit<T: Fn(i32) + 'static>(&mut self, cb: T) {
783 crate::ArkUIEvent::on_event(self, crate::NodeEventType::TextAreaOnSubmit, move |event| {
784 cb(event.i32_value(0).unwrap_or_default());
785 });
786 }
787
788 pub fn on_text_area_content_size_change<T: Fn(f32, f32) + 'static>(&mut self, cb: T) {
789 crate::ArkUIEvent::on_event(
790 self,
791 crate::NodeEventType::TextAreaOnContentSizeChange,
792 move |event| {
793 cb(
794 event.f32_value(0).unwrap_or_default(),
795 event.f32_value(1).unwrap_or_default(),
796 );
797 },
798 );
799 }
800
801 pub fn on_text_area_will_insert<T: Fn(f32, String) -> bool + 'static>(&mut self, cb: T) {
802 crate::ArkUIEvent::on_event(
803 self,
804 crate::NodeEventType::TextAreaOnWillInsert,
805 move |event| {
806 let should_insert = cb(
807 event.f32_value(0).unwrap_or_default(),
808 event.string_value(0).unwrap_or_default(),
809 );
810 let _ = event.set_return_bool(should_insert);
811 },
812 );
813 }
814
815 pub fn on_text_area_did_insert<T: Fn(f32, String) + 'static>(&mut self, cb: T) {
816 crate::ArkUIEvent::on_event(
817 self,
818 crate::NodeEventType::TextAreaOnDidInsert,
819 move |event| {
820 cb(
821 event.f32_value(0).unwrap_or_default(),
822 event.string_value(0).unwrap_or_default(),
823 );
824 },
825 );
826 }
827
828 pub fn on_text_area_will_delete<T: Fn(f32, i32, String) -> bool + 'static>(&mut self, cb: T) {
829 crate::ArkUIEvent::on_event(
830 self,
831 crate::NodeEventType::TextAreaOnWillDelete,
832 move |event| {
833 let should_delete = cb(
834 event.f32_value(0).unwrap_or_default(),
835 event.i32_value(1).unwrap_or_default(),
836 event.string_value(0).unwrap_or_default(),
837 );
838 let _ = event.set_return_bool(should_delete);
839 },
840 );
841 }
842
843 pub fn on_text_area_did_delete<T: Fn(f32, i32, String) + 'static>(&mut self, cb: T) {
844 crate::ArkUIEvent::on_event(
845 self,
846 crate::NodeEventType::TextAreaOnDidDelete,
847 move |event| {
848 cb(
849 event.f32_value(0).unwrap_or_default(),
850 event.i32_value(1).unwrap_or_default(),
851 event.string_value(0).unwrap_or_default(),
852 );
853 },
854 );
855 }
856
857 #[cfg(feature = "api-15")]
858 pub fn on_text_area_change_with_preview_text<T: Fn(crate::TextChangeEventData) + 'static>(
859 &mut self,
860 cb: T,
861 ) {
862 crate::ArkUIEvent::on_event(
863 self,
864 crate::NodeEventType::TextAreaOnChangeWithPreviewText,
865 move |event| {
866 if let Some(data) = event.text_change() {
867 cb(data);
868 }
869 },
870 );
871 }
872
873 #[cfg(feature = "api-20")]
874 pub fn on_text_area_will_change<T: Fn(crate::TextChangeEventData) + 'static>(&mut self, cb: T) {
875 crate::ArkUIEvent::on_event(
876 self,
877 crate::NodeEventType::TextAreaOnWillChange,
878 move |event| {
879 if let Some(data) = event.text_change() {
880 cb(data);
881 }
882 },
883 );
884 }
885}