/* * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file * @kit ArkUI */ /** * Provides the method of switching the cursor position. * * @extends TextContentControllerBase * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Provides the method of switching the cursor position. * * @extends TextContentControllerBase * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Provides the method of switching the cursor position. * * @extends TextContentControllerBase * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare class SearchController extends TextContentControllerBase { /** * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ constructor(); /** * Called when the position of the insertion cursor is set. * * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Called when the position of the insertion cursor is set. * * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the position of the insertion cursor is set. * * @param { number } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ caretPosition(value: number): void; /** * Exit edit state. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Exit edit state. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ stopEditing(): void; /** * Text selection is achieved by specifying the start and end positions of the text. * * @param { number } selectionStart - The start position of the selected text. * @param { number } selectionEnd - The end position of the selected text. * @param { SelectionOptions } [options] - Indicates the options of the text selection. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; } /** * Enum for the style of cancel button * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Enum for the style of cancel button * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare enum CancelButtonStyle { /** * The value of button style constant * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The value of button style constant * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ CONSTANT, /** * The value of button style invisible * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The value of button style invisible * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ INVISIBLE, /** * The value of button style input * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The value of button style input * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ INPUT } /** * Declare the type of search input box * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Declare the type of search input box * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare enum SearchType { /** * Basic input mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Basic input mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ NORMAL = 0, /** * Pure digital input mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Pure digital input mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ NUMBER = 2, /** * Phone number entry mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Phone number entry mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ PHONE_NUMBER = 3, /** * E-mail address input mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * E-mail address input mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ EMAIL = 5, /** * Number decimal entry mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ NUMBER_DECIMAL = 12, /** * URL entry mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ URL = 13, } /** * Options used to construct the search. * * Anonymous Object Rectification. * @typedef SearchOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ declare interface SearchOptions { /** * Text input in the search text box. * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Text input in the search text box. * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** * Text input in the search text box. * * Anonymous Object Rectification. * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ value?: string; /** * Text displayed when there is no input. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Text displayed when there is no input. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Text displayed when there is no input. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** * Text displayed when there is no input. * * Anonymous Object Rectification. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ placeholder?: ResourceStr; /** * Path to the search icon. * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Path to the search icon. * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** * Path to the search icon. * * Anonymous Object Rectification. * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ icon?: string; /** * Controller of the component. * * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Controller of the component. * * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 */ /** * Controller of the component. * * Anonymous Object Rectification. * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ controller?: SearchController; } /** * The construct function of search * * @interface SearchInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The construct function of search * * @interface SearchInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The construct function of search * * @interface SearchInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ interface SearchInterface { /** * The options of SearchInterface * * @param { object } options * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The options of SearchInterface * * @param { object } options * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The options of SearchInterface * * @param { object } options * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * The options of SearchInterface. * * Anonymous Object Rectification. * @param { SearchOptions } [options] - Search options. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ (options?: SearchOptions): SearchAttribute; } /** * Defines the icon options * * @interface IconOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines the icon options * * @interface IconOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ interface IconOptions { /** * Set the icon size * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the icon size * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ size?: Length; /** * Set the icon color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the icon color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ color?: ResourceColor; /** * Set the icon resource * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the icon resource * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ src?: ResourceStr; } /** * Defines the SearchButton options * * @interface SearchButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines the SearchButton options * * @interface SearchButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ interface SearchButtonOptions { /** * Set the SearchButton fontSize * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the SearchButton fontSize * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ fontSize?: Length; /** * Set the SearchButton fontColor * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the SearchButton fontColor * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ fontColor?: ResourceColor; /** * Automatically disables the search button before the user enters text * * @type { ?Boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ autoDisable?: Boolean; } /** * Defines the CancelButton options * * @interface CancelButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ interface CancelButtonOptions { /** * Set the CancelButton style * * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ style?: CancelButtonStyle; /** * Set the CancelButton icon * * @type { ?IconOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ icon?: IconOptions; } /** * Defines the CancelButton symbol options * * @interface CancelButtonSymbolOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ interface CancelButtonSymbolOptions { /** * Set the CancelButton style * * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ style?: CancelButtonStyle; /** * Set the CancelButton symbol icon * * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ icon?: SymbolGlyphModifier; } /** * Declare the event listener callback of the enter key. * * @typedef { function } SearchSubmitCallback * @param { string } searchContent - The submitted content of search. * @param { SubmitEvent } [event] - Provides the method of keeping Search editable state when submitted. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; /** * The attribute function of search * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The attribute function of search * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The attribute function of search * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare class SearchAttribute extends CommonMethod { /** * Set the search button text * * @param { string } value - indicates the text of the search button. * @param { SearchButtonOption } option * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Set the search button text, fontSize and fontColor * * @param { string } value - indicates the text of the search button. * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the search button text, fontSize and fontColor * * @param { string } value - indicates the text of the search button. * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ searchButton(value: string, option?: SearchButtonOptions): SearchAttribute; /** * Set the text Color * * @param { ResourceColor } value - indicates the color of the text. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the text Color * * @param { ResourceColor } value - indicates the color of the text. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ fontColor(value: ResourceColor): SearchAttribute; /** * Set the search icon style * * @param { IconOptions } value - indicates the style of the search icon. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the search icon style * * @param { IconOptions } value - indicates the style of the search icon. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Set the search icon style * * @param { IconOptions | SymbolGlyphModifier } value - indicates the style of the search icon. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute; /** * Set the cancel button style * * @param { object } value - indicates the style of the cancel button. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the cancel button style * * @param { object } value - indicates the style of the cancel button. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Set the cancel button style * * @param { CancelButtonOptions | CancelButtonSymbolOptions } value - indicates the style of the cancel button. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute; /** * Specify the indentation of the first line in a text-block. * * @param { Dimension } value - The length of text indent. * @returns { SearchAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ textIndent(value: Dimension): SearchAttribute; /** * Called when the inputFilter of text is set. * * @param { ResourceStr } value * @param { Callback } error * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ inputFilter(value: ResourceStr, error?: Callback): SearchAttribute; /** * Called when judging whether the text editing change finished. * * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onEditChange(callback: Callback): SearchAttribute; /** * Define the text selected background color of the text input. * * @param { ResourceColor } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ selectedBackgroundColor(value: ResourceColor): SearchAttribute; /** * Set the cursor style * * @param { CaretStyle } value - indicates the style of the cursor. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the cursor style * * @param { CaretStyle } value - indicates the style of the cursor. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ caretStyle(value: CaretStyle): SearchAttribute; /** * Set the place hold text color * * @param { ResourceColor } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Set the place hold text color * * @param { ResourceColor } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the place hold text color * * @param { ResourceColor } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ placeholderColor(value: ResourceColor): SearchAttribute; /** * Set the font used for place holder text * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Set the font used for place holder text * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the font used for place holder text * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ placeholderFont(value?: Font): SearchAttribute; /** * Set the font used for input text * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Set the font used for input text * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the font used for input text * * @param { Font } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ textFont(value?: Font): SearchAttribute; /** * Set enter key type of soft keyboard * * @param { EnterKeyType } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ enterKeyType(value: EnterKeyType): SearchAttribute; /** * Call the function when clicked the search button * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Call the function when clicked the search button * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Call the function when clicked the search button * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Call the function when clicked the search button. * * Anonymous Object Rectification. * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ onSubmit(callback: Callback): SearchAttribute; /** * Call the function when clicked the search button. * * @param { SearchSubmitCallback } callback - callback of the listened event. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 14 */ onSubmit(callback: SearchSubmitCallback): SearchAttribute; /** * Call the function when editing the input text * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Call the function when editing the input text * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Call the function when editing the input text * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Call the function when editing the input text * * @param { EditableTextOnChangeCallback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onChange(callback: EditableTextOnChangeCallback): SearchAttribute; /** * Called when the text selection changes. * * @param { function } callback - callback of the listened event. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the text selection changes. * * @param { function } callback - callback of the listened event. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Called when the text selection changes. * * Anonymous Object Rectification. * @param { OnTextSelectionChangeCallback } callback - Callback of the listened event. * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute; /** * Called when the content scrolls. * * @param { function } callback - callback of the listened event. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the content scrolls. * * @param { function } callback - callback of the listened event. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Called when the content scrolls. * * Anonymous Object Rectification. * @param { OnContentScrollCallback } callback - Callback of the listened event. * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ onContentScroll(callback: OnContentScrollCallback): SearchAttribute; /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Called when using the Clipboard menu. * * Anonymous Object Rectification. * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ onCopy(callback: Callback): SearchAttribute; /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Called when using the Clipboard menu. * * Anonymous Object Rectification. * @param { Callback } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ onCut(callback: Callback): SearchAttribute; /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Called when using the Clipboard menu * * @param { function } callback * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when using the Clipboard menu * * @param { function } callback * Executed when a paste operation is performed. * { string } value - The text content to be pasted. * { PasteEvent } event - The user-defined paste event. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Called when using the Clipboard menu. * * Anonymous Object Rectification. * @param { OnPasteCallback } callback - Executed when a paste operation is performed. * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ onPaste(callback: OnPasteCallback): SearchAttribute; /** * Called when the copy option is set. * * @param { CopyOptions } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Called when the copy option is set. * * @param { CopyOptions } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the copy option is set. * * @param { CopyOptions } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ copyOption(value: CopyOptions): SearchAttribute; /** * Called when the input of maximum text length is set. * * @param { number } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * crossplatform * @since 11 */ /** * Called when the input of maximum text length is set. * * @param { number } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * crossplatform * @atomicservice * @since 12 */ maxLength(value: number): SearchAttribute; /** * Called when the text align is set. * * @param { TextAlign } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Called when the text align is set. * * @param { TextAlign } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the text align is set. * * @param { TextAlign } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ textAlign(value: TextAlign): SearchAttribute; /** * Sets whether request keyboard or not when on focus. * * @param { boolean } value * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets whether request keyboard or not when on focus. * * @param { boolean } value * @returns { SearchAttribute } Returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ enableKeyboardOnFocus(value: boolean): SearchAttribute; /** * Controls whether the selection menu pops up. * * @param { boolean } value * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Controls whether the selection menu pops up. * * @param { boolean } value * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ selectionMenuHidden(value: boolean): SearchAttribute; /** * Called when the minimum font size of the font is set. * * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ minFontSize(value: number | string | Resource): SearchAttribute; /** * Called when the maximum font size of the font is set. * * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ maxFontSize(value: number | string | Resource): SearchAttribute; /** * Called when the minimum font scale of the font is set. * * @param { Optional } scale * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ minFontScale(scale: Optional): SearchAttribute; /** * Called when the maximum font scale of the font is set. * * @param { Optional } scale * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ maxFontScale(scale: Optional): SearchAttribute; /** * Define custom keyboard. * * @param { CustomBuilder } value * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Define custom keyboard. * * @param { CustomBuilder } value * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Define custom keyboard. * * @param { CustomBuilder } value - Set up a custom keyboard of Search * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of Search * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; /** * Called when the text decoration of the text is set. * * @param { TextDecorationOptions } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ decoration(value: TextDecorationOptions): SearchAttribute; /** * Called when the distance between text fonts is set. * * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ letterSpacing(value: number | string | Resource): SearchAttribute; /** * Called when the line height of the font is set. * * @param { number | string | Resource } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ lineHeight(value: number | string | Resource): SearchAttribute; /** * Called when the search type is set. * * @param { SearchType } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Called when the search type is set. * * @param { SearchType } value * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ type(value: SearchType): SearchAttribute; /** * Set font feature. * * @param { string } value - The fontFeature. * normal | , * where = [ | on | off ], like: "ss01" 0 * the values of reference to doc of search component * number of can be single or multiple, and separated by comma ','. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ fontFeature(value: string): SearchAttribute; /** * Get text value information when about to input. * * @param { Callback } callback - The triggered function when text content is about to insert. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onWillInsert(callback: Callback): SearchAttribute; /** * Get text value information when completed input. * * @param { Callback } callback - The triggered function when text content has been inserted. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onDidInsert(callback: Callback): SearchAttribute; /** * Get text value information when about to delete. * * @param { Callback } callback - The triggered function when text content is about to delete. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onWillDelete(callback: Callback): SearchAttribute; /** * Get text value information when the deletion has been completed * * @param { Callback } callback - The triggered function when text content has been deleted. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onDidDelete(callback: Callback): SearchAttribute; /** * Set the custom text menu. * * @param { EditMenuOptions } editMenu - Customize text menu options. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): SearchAttribute; /** * Define the preview text mode of the text input. * * @param { boolean } enable - Indicates the preview text mode. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ enablePreviewText(enable: boolean): SearchAttribute; /** * Enable or disable haptic feedback. * * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 13 */ enableHapticFeedback(isEnabled: boolean): SearchAttribute; /** * Set the text with half leading. * * @param { Optional } halfLeading * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ halfLeading(halfLeading: Optional): SearchAttribute; /** * Set whether stop backPressed callback event or not. * * @param { Optional } isStopped - Default value is true, set false to trigger the latest callback event. * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 15 */ stopBackPress(isStopped: Optional): SearchAttribute; /** * Get text value information when about to change. * * @param { Callback } callback - The triggered function when text content is about to change. * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 15 */ onWillChange(callback: Callback): SearchAttribute; /** * Set the keyboard appearance. * * @param { Optional } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 15 */ keyboardAppearance(appearance: Optional): SearchAttribute; } /** * Defines Search Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Defines Search Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines Search Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare const Search: SearchInterface; /** * Defines Search Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Defines Search Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines Search Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare const SearchInstance: SearchAttribute;