# Graphic ## **Overview** Defines a lightweight graphics system that provides basic UI and container views, including buttons, images, labels, lists, animators, scroll views, swipe views, and layouts. This system also provides the Design for X \(DFX\) capability to implement features such as view rendering, animation, and input event distribution. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Files

File Name

Description

animator.h

Defines the attributes and common functions of the animator module.

easing_equation.h

Defines the attributes and functions of the animation easing module.

interpolation.h

Defines the functions for calculating the interpolation in computer graphics.

color.h

Defines color attributes for the graphics system and implements common color functions.

image.h

Declares basic image attributes, including the image type and path.

screen.h

Declares the screen information.

task.h

Declares the Task class of the graphics module, which provides functions for setting the running period and time of a task.

text.h

Declares the Text class that provides functions to set basic text attributes, such as the text direction and alignment mode.

abstract_adapter.h

Defines the base class for adapters.

root_view.h

Manages a root view.

text_adapter.h

Defines a text adapter that is used to construct UILabel instances.

ui_abstract_clock.h

Declares the UIAbstractClock class that provides the functions related to clocks.

ui_abstract_progress.h

Defines the base class attributes and common functions of a progress bar.

ui_abstract_scroll.h

Declares the base class used to define the attributes of a scroll. The UIList, UIScrollView, and UISwipeView inherit from this class.

ui_analog_clock.h

Declares an analog clock.

ui_arc_label.h

Defines the attributes of an arc label.

ui_axis.h

Defines the attributes and functions of the x- and y-axises. This class is used in UIChart.

ui_box_progress.h

Defines the attributes and common functions of a linear progress bar.

ui_button.h

Defines the attributes and common functions of a button.

ui_canvas.h

Defines the attributes of the canvas component and provides functions for drawing rectangles, circles, and others.

ui_chart.h

Defines the attributes of the chart component and provides functions for adding and deleting data sets to display a chart.

ui_checkbox.h

Defines the attributes and common functions of a check box.

ui_circle_progress.h

Defines the attributes and common functions of a circular progress bar.

ui_dialog.h

Declares the UIDialog class that defines the dialog box component.

ui_digital_clock.h

Declares a digital clock.

ui_image_animator.h

Defines the attributes and functions of an image animator.

ui_image_view.h

Declares an image view.

ui_label.h

Declares a UILabel class that represents a label.

ui_label_button.h

Declares a label button.

ui_list.h

Declares a scrollable list in the vertical or horizontal direction. * This scrollable list can be used with the adapter AbstractAdapter to implement scrolling, inertial scrolling, automatic alignment, and invoking of a callback when a child view at the preset position is selected as this list scrolls. It is used when there is a large number of child views with a fixed format.

ui_picker.h

Defines the attributes and functions of the UIPicker class.

ui_radiobutton.h

Defines the attributes and common functions of a radio button.

ui_scroll_view.h

Declares a view group that allows its child views to be displayed as scroll events occur.

ui_slider.h

Defines the attributes and common functions of a slider.

ui_surface_view.h

Declares the surface view that interacts with the multimedia to achieve camera preview and video playback.

ui_swipe_view.h

Defines the attributes and common functions of a swipe view.

ui_texture_mapper.h

Defines the attributes and functions of a texture mapper.

ui_time_picker.h

Defines the attributes and functions of the UITimePicker class.

ui_toggle_button.h

Defines the attributes and common functions of a toggle button.

ui_view.h

Declares the base class of a view, providing basic view attributes and operations. All views are derived from this class.

ui_view_group.h

Declares a view group.

event_injector.h

Declares the function for simulating input events.

ui_dump_dom_tree.h

Declares a function for exporting information about a Document Object Model (DOM) tree or DOM node.

ui_screenshot.h

Declares the screenshot function.

aod_callback.h

Defines the callback for the touch event notification in screen-off mode.

cancel_event.h

Declares a cancel event, which usually occurs when the target view changes due to user sliding. For example, this event is triggered if you, after pressing a button, does not release the button but slides.

click_event.h

Declares a click event, which indicates that a finger is pressed on the screen and then lifted within 1 second.

drag_event.h

Declares a drag event, which indicates a certain movement (more than 10 pixels) after a view is pressed.

event.h

Declares the base class of a user input event and provides functions to record information such as the event position and timestamp.

key_event.h

Declares a key event, which indicates that a physical button is pressed or released.

long_press_event.h

Declares a long-press event, which indicates that the finger is not raised or moved within 1 second after a view is pressed.

press_event.h

Declares a touch event, which indicates that the touchscreen or mouse is pressed.

release_event.h

Declares a release event, which indicates that the touchscreen or mouse is released.

virtual_device_event.h

Declares a virtual device event, which is used to receive a customized input event and call back the listening function registered.

geometry2d.h

Defines attributes of 2D geometries (including points, lines, rectangles, and polygons) of the lightweight graphics system and provides functions for performing operations on the geometries.

graphic_assert.h

Declares the assertion utility for the graphics module.

graphic_config.h

Provides configuration items required for graphics.

graphic_math.h

Defines mathematical operation functions and types, including trigonometric functions, two-dimensional vectors, three-dimensional vectors, and matrices.

graphic_types.h

Defines the common data types for the graphics system.

heap_base.h

Declares the functions for overriding the new and delete functions.

image_info.h

Defines image information.

flex_layout.h

Declares a flexible layout container. You can perform simple adaptive layout on child views that the container holds, for example, to evenly arrange all child views in the same row or column.

grid_layout.h

Declares a grid layout container. You can perform simple grid layout on child views that the container holds.

layout.h

Declares the base class of the layout, which indicates the basic data types and operations that may be used in the layout.

list.h

Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list.

mem_api.h

Defines the functions for memory application and release. You can implement the malloc and free functions to manage the memory.

rect.h

Defines a rectangle, including the position data of the four boundaries of the rectangle, and provides functions for rectangle inclusion, intersection, and aggregation.

style.h

Defines the attributes and common functions of style.

sys_info.h

Declares the system information about the graphics module, including the function to obtain the information about FPS, which needs to be enabled by the ENABLE_FPS_SUPPORT macro.

theme.h

Declares the base class used to define the functions related to the styles of different components.

theme_manager.h

Declares the singleton class used to manage the current screen theme of an application.

transform.h

Provides functions to transform components, points, and line segments, including rotation and scaling.

version.h

Declares the version number control for the graphics module. This file defines functions to obtain the version number and library description.

## Data Structures

Data Structure Name

Description

OHOS::AnimatorCallback

Represents the animator callback.

OHOS::Animator

Represents an animator.

OHOS::AnimatorManager

Represents the animator manager.

OHOS::EasingEquation

Defines functions for specifying the velocity of an animation.

OHOS::Interpolation

Calculates the Bezier interpolation.

OHOS::Color16

Defines the color attribute when the color depth is 16.

OHOS::Color24

Defines the color attribute when the color depth is 24.

OHOS::Color32

Defines the color attribute when the color depth is 32.

OHOS::Color

Converts colors in different formats and defines common colors.

OHOS::Image

Represents basic image attributes, including the image type and path.

OHOS::Screen

Represents the screen info of the device.

OHOS::Task

Represents the Task class of the graphics module. This class provides functions for setting the running period and time of a task.

OHOS::Text

Represents the base class of Text, providing the text attribute setting and text drawing capabilities for components that require font display.

OHOS::AbstractAdapter

Defines the base class for adapters. You can derive AbstractAdapter based on actual requirements and use the GetView() and GetCount() functions to implement adapters of different data types. For details, see TextAdapter.

OHOS::RootView::OnKeyActListener

Represents the listener for monitoring physical key events.

OHOS::RootView::OnVirtualDeviceEventListener

Listens for the input events triggered by a virtual device other than human touching or physical pressing.

OHOS::RootView

Defines the functions related to a root view which contains its child views and represents the root node in a tree structure.

OHOS::TextFormatter

Defines a text formatter. You can inherit this class and implement the Format() function.

OHOS::TextAdapter

Defines a text adapter, which implements UILabel instance construction and supports text data and continuous integer data.

OHOS::UIAbstractClock

An abstract class that contains functions for converting units of time (hour, minute, and second), setting and obtaining the time.

OHOS::UIAbstractProgress

Represents the abstract base class which provides functions related to the progress bar.

OHOS::UIAbstractScroll

Defines the attributes of a scroll, including the scroll direction, blank size of a scroll view, velocity and effects of a scroll animation.

OHOS::UIAnalogClock::Hand

Defines the basic attributes of the analog clock hands. This is an inner class of UIAbstractClock.

OHOS::UIAnalogClock

Provides the functions related to an analog clock.

OHOS::UIArcLabel::ArcTextInfo

Stores the attribute information about this arc text to draw.

OHOS::UIArcLabel

Defines functions related to an arc label.

OHOS::UIAxis

Represents the coordinate axis base class, which defines the basic attributes of coordinate axis, sets whether a coordinate axis is visible, and sets the number of scales on a coordinate axis. This class is used in UIChart.

OHOS::UIXAxis

Defines the unique attributes and functions for the x-axis. This class is used in UIChart.

OHOS::UIYAxis

Defines the unique attributes and functions for the y-axis. This class is used in UIChart.

OHOS::UIBoxProgress

Represents a linear progress bar.

OHOS::UIButton

Represents a button.

OHOS::Paint

Defines the basic styles of graphs drawn on canvases.

OHOS::UICanvas::FontStyle

Defines the font style.

OHOS::UICanvas

Defines a canvas, which is used to draw multiple types of 2D graphs.

OHOS::UIChartDataSerial::PointStyle

Defines the style for the top, bottom, and frontmost points in a line chart.

OHOS::UIChartDataSerial

Defines a data set and provides functions such as adding and deleting data points.

OHOS::UIChart

Defines the chart class and provides functions such as adding and deleting data sets to display a chart.

OHOS::UIChartPillar

Provides special functions for implementing a bar chart.

OHOS::UIChartPolyline

Provides special functions for implementing a polyline.

OHOS::UICheckBox::OnChangeListener

Represents a listener for changes of a check box.

OHOS::UICheckBox

Represents a check box.

OHOS::UICircleProgress

Represents a circular progress bar.

OHOS::UIDialog

Represents a dialog box.

OHOS::UIDigitalClock

Displays time digitally.

OHOS::ImageAnimatorInfo

Provides information about the images.

OHOS::UIImageAnimatorView::AnimatorStopListener

Represents a listener that contains a callback to be invoked when this animator stops.

OHOS::UIImageAnimatorView

Represents an image animator.

OHOS::UIImageView

Defines the functions related to an image view.

OHOS::UILabel

Defines the functions for presenting a label in a specified area, setting the style and background color of a label, and setting the display mode of a long label text.

OHOS::UILabelButton

Provides the functions related to a label button.

OHOS::ListScrollListener

Represents a listener that contains a callback to be invoked when the scroll state changes or when a new child view is selected at the preset position as this list scrolls. The scroll state can be {} or SCROLL_STATE_MOVE}.

OHOS::UIList

Represents a scrollable list which is used with the adapter AbstractAdapter to implement scrolling, inertial scrolling, automatic alignment, and invoking of a callback when a child view is selected at the preset position as this list scrolls.

OHOS::UIPicker::SelectedListener

Defines the listener used by a picker. This listener is triggered when an item is selected after sliding stops.

OHOS::UIPicker

Defines a picker. Multiple texts or numbers can be put into a sliding list for selection. The selected text or numbers are highlighted.

OHOS::UIRadioButton

Represents a radio button.

OHOS::UIRepeatButton

Represents a repeat button.

OHOS::UIScrollView::OnScrollListener

Represents a listener that contains a callback to be invoked upon scroll state changes. The state can either be SCROLL_STATE_STOP or SCROLL_STATE_MOVE.

OHOS::UIScrollView

Supports horizontal or vertical scroll of child views. This class is inherited from UIAbstractScroll.

OHOS::UISlider::UISliderEventListener

Represents the listener for a slider change.

OHOS::UISlider

Represents a slider.

OHOS::UISurfaceView

Represents a surface view that interacts with the multimedia to achieve camera preview and video playback.

OHOS::UISwipeView::OnSwipeListener

Represents a listener for changes of the swipe view.

OHOS::UISwipeView

Represents a swipe view.

OHOS::UITextureMapper::AnimatorStopListener

Represents a listener that contains a callback to be invoked when this animator stops.

OHOS::UITextureMapper

Rotates and scales images.

OHOS::UITimePicker::SelectedListener

Defines the listener used by the time picker. This listener is triggered when an item is selected after sliding stops.

OHOS::UITimePicker

Defines the time picker. The time is in the format of "hour:minute" or "hour:minute:second". The selected time is highlighted.

OHOS::UIToggleButton

Represents a toggle button.

OHOS::UIView::OnClickListener

Defines a click event listener. You need to register this listener with the view to listen to click events.

OHOS::UIView::OnLongPressListener

Defines a long-press event listener. You need to register this listener with the view to listen to long-press events.

OHOS::UIView::OnDragListener

Defines a drag event listener. You need to register this listener with the view to listen to drag events.

OHOS::UIView::OnTouchListener

Defines a touch event listener. You need to register this listener with the view to listen to touch events.

OHOS::UIView

Defines the base class of a view, providing basic view attributes and operations. All views are derived from this class.

OHOS::UIViewGroup

Represents a view group that consists of its child views.

OHOS::UIDumpDomTree

Provides functions for exporting information about a specified DOM node or information about the DOM tree starting from a specified DOM node.

OHOS::CancelEvent

Defines a cancel event, which usually occurs when the target view changes due to user sliding. For example, this event is triggered if you, after pressing a button, does not release the button but slides.

OHOS::ClickEvent

Defines a click event, which indicates that a finger is pressed on the screen and then lifted within 1 second.

OHOS::DragEvent

Defines a drag event, which indicates a certain movement (more than 10 pixels) after a view is pressed.

OHOS::Event

Defines the base class of a user input event and provides functions to record information such as the event position and timestamp.

OHOS::KeyEvent

Defines a key event, which indicates that a physical button is pressed or released.

OHOS::LongPressEvent

Defines a long-press event, which indicates that the finger is not raised or moved within 1 second after a view is pressed.

OHOS::PressEvent

Defines a touch event, which indicates that the touchscreen or mouse is pressed.

OHOS::ReleaseEvent

Defines a release event, which indicates that the touchscreen or mouse is released.

OHOS::VirtualDeviceEvent

Defines a virtual device event, which is used to receive a customized input event and call back the listening function registered.

OHOS::Line

Defines a line, which consists of the start and end points.

OHOS::Polygon

Defines a polygon, including vertex coordinates and the maximum number of vertices (defined by MAX_VERTEX_NUM).

OHOS::Vector2< T >

Defines the two-dimensional vector, and provides basic mathematical operations such as vector assignment, scalar product, cross product, addition, and subtraction.

OHOS::Vector3< T >

Defines the 3-dimensional vector, and provides basic operators such as [] and ==.

OHOS::Matrix3< T >

Defines a 3 x 3 matrix.

OHOS::Point

Defines a point.

OHOS::HeapBase

Defines the base class, overriding the new and delete functions.

OHOS::ImageHeader

Defines image head node information.

OHOS::ImageInfo

Defines image information.

OHOS::FlexLayout

Defines a flexible layout container. You can perform simple adaptive layout on child views that the container holds, for example, to evenly arrange all child views in the same row or column.

OHOS::GridLayout

Defines a grid layout container. You can perform simple grid layout on child views that the container holds.

OHOS::Layout

Defines the base class of the layout, which indicates the basic data types and operations that may be used in the layout.

OHOS::ListNode< T >

Stores linked list data and contains pointers to the previous node and the next node.

OHOS::List< T >

Defines a linked list template class, which implements the data structure of bidirectional linked list and provides basic functions such as adding, deleting, inserting, clearing, popping up, and obtaining the size of the linked list.

OHOS::Rect

Defines a rectangle, including the position data of the four boundaries of the rectangle, and provides functions for rectangle inclusion, intersection, and aggregation.

OHOS::Style

Defines the basic attributes and functions of a style. You can use this class to set different styles.

OHOS::StyleDefault

Define some default style for UIView.

OHOS::SysInfo::OnFPSChangedListener

Called when the FPS changes.

OHOS::SysInfo

Obtains the system information. Currently, the FPS information can be obtained. To enable the FPS feature, enable the ENABLE_FPS_SUPPORT macro.

OHOS::ButtonStyle

Stores styles of a button in its different states.

OHOS::Theme

Defines the theme class used to define the functions related to the styles of different components.

OHOS::ThemeManager

Declares the singleton class used to manage the current screen theme of an application.

OHOS::TransformMap

Transforms a rectangle, including rotation and scaling.

## Macros

Macro Name and Value

Description

VERSION_STANDARD

 

ENABLE_DMA2D    0

DMA2D hardware acceleration, which does not take effect on other platforms.

ENABLE_DMA2D_TEXT    0

DMA2D hardware acceleration for font rendering, which does not take effect on other platforms.

ENABLE_ICU    0

Advanced algorithm for line breaks, which is disabled by default on other platforms.

ENABLE_WINDOW    1

Multi-window, which is enabled by default on other platforms.

ENABLE_FRAME_BUFFER    0

Display buffer for rendering data refresh, which is disabled by default on other platforms.

ENABLE_VECTOR_FONT    1

Vector type font,which is enabled by default on other platforms.

ENABLE_BUFFER_RGBA    1

Graphics bottom-layer RGBA, which is enabled by default.

ENABLE_HARDWARE_ACCELERATION    1

Graphics rendering hardware acceleration, which is enabled by default.

ENABLE_DEBUG    1

Debug mode, which is disabled by default.

ENABLE_MEMORY_HOOKS    0

Memory hook, which is enabled by default. The system memory allocation is taken over after it is enabled.

ENABLE_FPS_SUPPORT    0

Function for monitoring the image refresh frame rate, which is disabled by default.

ENABLE_ANTIALIAS    1

Anti-aliasing, which is enabled by default.

ENABLE_RECT_ANTIALIAS    0

Rectangle anti-aliasing, which is disabled by default.

ENABLE_SPEC_FONT    0

Font color mode, which is disabled by default. After it is enabled, the font color mode is set to 4 to accelerate font rendering.

ENABLE_GRAPHIC_LOG    0

Log function of a graphics subsystem, which is disabled by default.

ENABLE_AOD    0

Function for receiving input events in screen-off mode, which is disabled by default.

GRAPHIC_LOG_LEVEL    5

Defines the log level. A smaller value indicates a higher priority. Logs whose priorities are higher than a specified level can be recorded. Log levels: NONE: disabling logs FATAL: fatal level ERROR: error level WARN: warning level INFO: info level DEBUG: debugging level.

COLOR_DEPTH    32

Defines the color depth of graphics rendering. The default value is 32 bits. The value can be 16 or 32.

DEFAULT_VECTOR_FONT_FILENAME    "SourceHanSansSC-Regular.otf"

Defines the file name of default vector font.

MATH_MAX (a, b)   ((a) > (b) ? (a) : (b))

Larger of a and b.

MATH_MIN (a, b)   ((a) < (b) ? (a) : (b))

Smaller of a and b.

MATH_ABS (x)   ((x) > 0 ? (x) : (-(x)))

Absolute value of x.

MATH_MINUS (a, b)   ((a) < (b) ? ((b) - (a)) : ((a) - (b)))

Difference between a and b.

## Typedefs

Typedef Name

Description

OHOS::EasingFunc) (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

typedef int16_t(* 

Calculates the value for the current time of an animation.

## Enumerations

Enumeration Name

Description

: uint8_t { OHOS::Animator::STOP, OHOS::Animator::START, OHOS::Animator::PAUSE, OHOS::Animator::RUNNING }

Enumerates the states of this animator.

{ OHOS::OPA_TRANSPARENT = 0, OHOS::OPA_OPAQUE = 255 }

Enumerates opacity values.

OHOS::UITextLanguageAlignment : uint8_t {   OHOS::TEXT_ALIGNMENT_LEFT = 0, OHOS::TEXT_ALIGNMENT_RIGHT, OHOS::TEXT_ALIGNMENT_CENTER, OHOS::TEXT_ALIGNMENT_TOP,   OHOS::TEXT_ALIGNMENT_BOTTOM }

Enumerates text alignment modes.

OHOS::UITextLanguageDirect : uint8_t { OHOS::TEXT_DIRECT_LTR = 0, OHOS::TEXT_DIRECT_RTL }

Enumerates text directions.

OHOS::UIAbstractClock::WorkMode { OHOS::UIAbstractClock::ALWAYS_ON, OHOS::UIAbstractClock::NORMAL }

Enumerates the working modes of this clock.

OHOS::UIAnalogClock::HandType { OHOS::UIAnalogClock::HandType::HOUR_HAND, OHOS::UIAnalogClock::HandType::MINUTE_HAND, OHOS::UIAnalogClock::HandType::SECOND_HAND }

Enumerates the clock hand types.

OHOS::UIAnalogClock::DrawType { OHOS::UIAnalogClock::DrawType::DRAW_LINE, OHOS::UIAnalogClock::DrawType::DRAW_IMAGE }

Enumerates the drawing types of a clock hand.

OHOS::UIArcLabel::TextOrientation : uint8_t { OHOS::UIArcLabel::TextOrientation::INSIDE, OHOS::UIArcLabel::TextOrientation::OUTSIDE }

Enumerates text orientations.

OHOS::UIBoxProgress::Direction : uint8_t { OHOS::UIBoxProgress::Direction::DIR_LEFT_TO_RIGHT, OHOS::UIBoxProgress::Direction::DIR_RIGHT_TO_LEFT, OHOS::UIBoxProgress::Direction::DIR_TOP_TO_BOTTOM, OHOS::UIBoxProgress::Direction::DIR_BOTTOM_TO_TOP }

Enumerates the directions of the progress bar.

OHOS::UIButton::ButtonImageSrc : uint8_t

Enumerates the images for different button states.

OHOS::UIButton::ButtonState : uint8_t

Enumerates the states of this button.

OHOS::Paint::PaintStyle { OHOS::Paint::STROKE_STYLE = 1, OHOS::Paint::FILL_STYLE, OHOS::Paint::STROKE_FILL_STYLE }

Enumerates paint styles of a closed graph. The styles are invalid for non-closed graphs.

OHOS::UICheckBox::UICheckBoxState : uint8_t

Enumerates the states of a check box.

OHOS::UIDialog::DialogButtonType { OHOS::UIDialog::DialogButtonType::BUTTON1, OHOS::UIDialog::DialogButtonType::BUTTON2, OHOS::UIDialog::DialogButtonType::BUTTON3 }

Enumerates buttons in a dialog box.

OHOS::UIDigitalClock::DisplayMode { OHOS::UIDigitalClock::DISPLAY_12_HOUR_NO_SECONDS, OHOS::UIDigitalClock::DISPLAY_24_HOUR_NO_SECONDS, OHOS::UIDigitalClock::DISPLAY_12_HOUR, OHOS::UIDigitalClock::DISPLAY_24_HOUR }

Enumerates the display modes of this digital clock.

OHOS::UIDigitalClock::TimeElement { OHOS::UIDigitalClock::HOUR_ELEMENT, OHOS::UIDigitalClock::MINUTE_ELEMENT, OHOS::UIDigitalClock::SECOND_ELEMENT }

Enumerates the time elements of this digital clock.

OHOS::UILabel::LineBreakMode : uint8_t {   OHOS::UILabel::LINE_BREAK_ADAPT = 0, OHOS::UILabel::LINE_BREAK_STRETCH, OHOS::UILabel::LINE_BREAK_WRAP, OHOS::UILabel::LINE_BREAK_ELLIPSIS,   OHOS::UILabel::LINE_BREAK_MARQUEE, OHOS::UILabel::LINE_BREAK_CLIP, OHOS::UILabel::LINE_BREAK_MAX }

Enumerates the display modes of a long text.

OHOS::VirtualDeviceEvent::DeviceType

Enumerates virtual device types.

OHOS::ColorMode : uint8_t {   OHOS::ARGB8888 = 0, OHOS::RGB888, OHOS::RGB565, OHOS::ARGB1555,   OHOS::ARGB4444, OHOS::AL44, OHOS::AL88, OHOS::L1,   OHOS::L2, OHOS::L4, OHOS::L8, OHOS::A1,   OHOS::A2, OHOS::A4, OHOS::A8, OHOS::UNKNOW }

colormode of image and font.

: uint8_t {   OHOS::STYLE_BACKGROUND_COLOR, OHOS::STYLE_BACKGROUND_OPA, OHOS::STYLE_BORDER_RADIUS, OHOS::STYLE_BORDER_COLOR,   OHOS::STYLE_BORDER_OPA, OHOS::STYLE_BORDER_WIDTH, OHOS::STYLE_PADDING_LEFT, OHOS::STYLE_PADDING_RIGHT,   OHOS::STYLE_PADDING_TOP, OHOS::STYLE_PADDING_BOTTOM, OHOS::STYLE_MARGIN_LEFT, OHOS::STYLE_MARGIN_RIGHT,   OHOS::STYLE_MARGIN_TOP, OHOS::STYLE_MARGIN_BOTTOM, OHOS::STYLE_IMAGE_OPA, OHOS::STYLE_TEXT_COLOR,   OHOS::STYLE_TEXT_FONT, OHOS::STYLE_LETTER_SPACE, OHOS::STYLE_LINE_SPACE, OHOS::STYLE_TEXT_OPA,   OHOS::STYLE_LINE_COLOR, OHOS::STYLE_LINE_WIDTH, OHOS::STYLE_LINE_OPA, OHOS::STYLE_LINE_CAP }

Enumerates keys of styles.

OHOS::CapType : uint8_t { OHOS::CAP_NONE, OHOS::CAP_ROUND }

Enumerates cap styles.

OHOS::SysInfo::FPSCalculateType { OHOS::SysInfo::FPS_CT_FIXED_TIME, OHOS::SysInfo::FPS_CT_AVERAGE_SAMPLING, OHOS::SysInfo::FPS_CT_PRECISE_SAMPLING }

Enumerates the FPS capture types.

## Functions

Function Name

Description

OHOS::AnimatorCallback::Callback (UIView *view)=0

virtual void 

Called when each frame starts. This is a pure virtual function, which needs your inheritance and implementation.

OHOS::AnimatorCallback::OnStop (UIView &view)

virtual void 

Called when an animator stops. This is a pure virtual function, which needs your inheritance and implementation.

OHOS::AnimatorCallback::~AnimatorCallback ()

virtual 

A default destructor used to delete an AnimatorCallback instance.

OHOS::Animator::Animator ()

 

A default constructor used to create an Animator instance.

OHOS::Animator::Animator (AnimatorCallback *callback, UIView *view, uint32_t time, bool repeat)

 

A constructor used to create an Animator instance.

OHOS::Animator::~Animator ()

virtual 

A destructor used to delete the Animator instance.

OHOS::Animator::Start ()

void 

Starts this animator.

OHOS::Animator::Stop ()

void 

Stops this animator.

OHOS::Animator::Pause ()

void 

Pauses this animator.

OHOS::Animator::Resume ()

void 

Resumes this animator from where it was paused.

OHOS::Animator::GetState () const

uint8_t 

Obtains the current state of this animator.

OHOS::Animator::SetState (uint8_t state)

void 

Sets the current state for this animator.

OHOS::Animator::GetTime () const

uint32_t 

Obtains the total duration of this animator.

OHOS::Animator::SetTime (uint32_t time)

void 

Sets the total duration for this animator.

OHOS::Animator::GetRunTime () const

uint32_t 

Obtains the running time of this animator.

OHOS::Animator::SetRunTime (uint32_t runTime)

void 

Sets the running time for this animator.

OHOS::Animator::IsRepeat () const

bool 

Checks whether this animator is repeated.

OHOS::AnimatorManager::GetInstance ()

static AnimatorManager

Obtains the AnimatorManager instance.

OHOS::AnimatorManager::Init () override

void 

Initializes this task.

OHOS::AnimatorManager::Add (Animator *animator)

void 

Adds the Animator instance to the AnimatorManager linked list for management, so that the Run function of the Animator class is called once for each frame.

OHOS::AnimatorManager::Remove (const Animator *animator)

void 

Removes the Animator instance from the AnimatorManager linked list.

OHOS::AnimatorManager::Callback () override

void 

Called when this task is executed.

OHOS::EasingEquation::SetBackOvershoot (double overshoot)

static void 

Sets the parameter s in the equation (s+1)*t^3 - s*t^2 for a back easing.

OHOS::EasingEquation::BackEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in with an overshoot.

OHOS::EasingEquation::BackEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases out with an overshoot.

OHOS::EasingEquation::BackEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in and then out with an overshoot.

OHOS::EasingEquation::CircEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in shaping like a circular curve.

OHOS::EasingEquation::CircEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases out shaping like a circular curve.

OHOS::EasingEquation::CircEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in and then out shaping like a circular curve.

OHOS::EasingEquation::CubicEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in shaping like a cubic curve.

OHOS::EasingEquation::CubicEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases out shaping like a cubic curve.

OHOS::EasingEquation::CubicEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in and then out shaping like a cubic curve.

OHOS::EasingEquation::LinearEaseNone (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Displays no linear easing effects.

OHOS::EasingEquation::QuadEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in shaping like a quadratic curve.

OHOS::EasingEquation::QuadEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases out shaping like a quadratic curve.

OHOS::EasingEquation::QuadEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in and then out shaping like a quadratic curve.

OHOS::EasingEquation::QuintEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in shaping like a quintic curve.

OHOS::EasingEquation::QuintEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases out shaping like a quintic curve.

OHOS::EasingEquation::QuintEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in and then out shaping like a quintic curve.

OHOS::EasingEquation::SineEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in shaping like a sinusoidal curve.

OHOS::EasingEquation::SineEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases out shaping like a sinusoidal curve.

OHOS::EasingEquation::SineEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime)

static int16_t 

Eases in and then out shaping like a sinusoidal curve.

OHOS::Interpolation::GetBezierInterpolation (int16_t t, int16_t u0, int16_t u1, int16_t u2, int16_t u3)

static int16_t 

Obtains the value calculated by the cubic Bezier equation.

OHOS::Color::GetMixColor (ColorType c1, ColorType c2, uint8_t mix)

static ColorType 

Mixes two colors (color 1 and color 2) based on a specified opacity.

OHOS::Color::GetColorFromRGB (uint8_t r8, uint8_t g8, uint8_t b8)

static ColorType 

Obtains the color based on the RGB color value.

OHOS::Color::GetColorFromRGBA (uint8_t r8, uint8_t g8, uint8_t b8, uint8_t alpha)

static ColorType 

Obtains the color based on the RGBA color value.

OHOS::Color::ColorTo32 (ColorType color)

static uint32_t 

Converts color data into the RGBA8888 format.

OHOS::Color::ColorTo32 (Color16 color, uint8_t alpha)

static uint32_t 

Converts color data with the 16-bit color depth into the RGBA8888 format.

OHOS::Color::ColorTo16 (Color32 color)

static uint16_t 

Converts color data from the RGBA8888 format into the RGB565 format.

OHOS::Color::White ()

static ColorType 

Obtains the color data of white.

OHOS::Color::Silver ()

static ColorType 

Obtains the color data of silver.

OHOS::Color::Gray ()

static ColorType 

Obtains the color data of gray.

OHOS::Color::Black ()

static ColorType 

Obtains the color data of black.

OHOS::Color::Red ()

static ColorType 

Obtains the color data of red.

OHOS::Color::Maroon ()

static ColorType 

Obtains the color data of maroon.

OHOS::Color::Yellow ()

static ColorType 

Obtains the color data of yellow.

OHOS::Color::Olive ()

static ColorType 

Obtains the color data of olive.

OHOS::Color::Lime ()

static ColorType 

Obtains the color data of lime.

OHOS::Color::Green ()

static ColorType 

Obtains the color data of green.

OHOS::Color::Cyan ()

static ColorType 

Obtains the color data of cyan.

OHOS::Color::Aqua ()

static ColorType 

Obtains the color data of aqua.

OHOS::Color::Teal ()

static ColorType 

Obtains the color data of teal.

OHOS::Color::Blue ()

static ColorType 

Obtains the color data of blue.

OHOS::Color::Navy ()

static ColorType 

Obtains the color data of navy.

OHOS::Color::Magenta ()

static ColorType 

Obtains the color data of magenta.

OHOS::Color::Purple ()

static ColorType 

Obtains the color data of purple.

OHOS::Color::Orange ()

static ColorType 

Obtains the color data of orange.

OHOS::Image::Image ()

 

A constructor used to create an Image instance. You can use this constructor when a component requires a map.

OHOS::Image::~Image ()

virtual 

A destructor used to delete the Image instance.

OHOS::Image::GetImageInfo () const

const ImageInfo

Obtains the image information in an array.

OHOS::Image::GetPath () const

const char * 

Obtains the image path in binary.

OHOS::Image::GetHeader (ImageHeader &header) const

void 

Obtains the basic image information, including the image format, width, and height.

OHOS::Image::GetSrcType () const

uint8_t 

Obtains the image type.

OHOS::Image::SetSrc (const char *src)

bool 

Sets the image path.

OHOS::Image::SetSrc (const ImageInfo *src)

bool 

Sets the image information.

OHOS::Screen::GetInstance ()

static Screen

Obtains a singleton Screen instance.

OHOS::Screen::GetWidth ()

uint16_t 

Obtains the width of this screen.

OHOS::Screen::GetHeight ()

uint16_t 

Obtains the height of this screen.

OHOS::Task::Task ()

 

A constructor used to create a Task instance.

OHOS::Task::Task (uint32_t period)

 

A constructor used to create a Task instance with the specified running period.

OHOS::Task::~Task ()

virtual 

A destructor used to delete the Task instance.

OHOS::Task::SetPeriod (uint32_t period)

void 

Sets the running period for this task.

OHOS::Task::SetLastRun (uint32_t lastRun)

void 

Sets the end time for this task.

OHOS::Task::GetPeriod () const

uint32_t 

Obtains the running period of this task.

OHOS::Task::GetLastRun () const

uint32_t 

Obtains the end time of this task.

OHOS::Task::TaskExecute ()

void 

Executes this task.

OHOS::Task::Callback ()=0

virtual void 

Called when this task is executed.

OHOS::Task::Init ()

virtual void 

Initializes this task.

OHOS::Text::Text ()

 

A constructor used to create a Text instance.

OHOS::Text::~Text ()

virtual 

A destructor used to delete the Text instance.

OHOS::Text::SetText (const char *text)

void 

Sets the content for this text.

OHOS::Text::GetText () const

const char * 

Obtains the content of this text.

OHOS::Text::SetFont (const char *name, uint8_t size)

void 

Sets the font name and size.

OHOS::Text::SetFontId (uint8_t fontId)

void 

Sets the font ID.

OHOS::Text::GetFontId () const

uint8_t 

Obtains the font ID.

OHOS::Text::SetDirect (UITextLanguageDirect direct)

void 

Sets the direction for this text.

OHOS::Text::GetDirect () const

UITextLanguageDirect 

Obtains the direction of this text.

OHOS::Text::SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

void 

Sets the alignment mode for this text.

OHOS::Text::GetHorAlign () const

UITextLanguageAlignment 

Obtains the horizontal alignment mode.

OHOS::Text::GetVerAlign () const

UITextLanguageAlignment 

Obtains the vertical alignment mode.

OHOS::Text::SetTextRotation (LabelRotateDegree angle)

void 

Sets the clockwise rotation angle for this text.

OHOS::Text::GetTextRotation () const

LabelRotateDegree 

Obtains the clockwise rotation degree of this text.

OHOS::Text::GetTextRotateDegree () const

uint16_t 

Obtains the number of text rotation degrees.

OHOS::Text::GetTextSize () const

Point 

Obtains the size of this text.

OHOS::Text::SetExpandWidth (bool expand)

void 

Sets whether to adapt the component width to this text.

OHOS::Text::IsExpandWidth () const

bool 

Checks whether the component width adapts to this text.

OHOS::Text::SetExpandHeight (bool expand)

void 

Sets whether to adapt the component height to this text.

OHOS::Text::IsExpandHeight () const

bool 

Checks whether the component height adapts to this text.

OHOS::Text::GetEllipsisIndex (const Rect &textRect, const Style &style)

uint16_t 

Obtains the index of the character from where text will be replaced by ellipses based on the text rectangle and style.

OHOS::AbstractAdapter::AbstractAdapter ()

 

A constructor used to create an AbstractAdapter instance.

OHOS::AbstractAdapter::~AbstractAdapter ()

virtual 

A destructor used to delete the AbstractAdapter instance.

OHOS::AbstractAdapter::GetCount ()=0

virtual uint16_t 

Obtains the number of adapter data items.

OHOS::AbstractAdapter::GetView (UIView *inView, int16_t index)=0

virtual UIView

Obtains a UIView instance to convert adapter data into another UIView instance.

OHOS::RootView::GetInstance ()

static RootView

Obtains a singleton RootView instance.

OHOS::RootView::OnKeyActListener::OnKeyAct (UIView &view, const KeyEvent &event)=0

virtual bool 

Responds to a physical key event.

OHOS::RootView::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::RootView::OnKeyEvent (const KeyEvent &event)

virtual void 

Executes a physical key event.

OHOS::RootView::SetOnKeyActListener (OnKeyActListener *onKeyActListener)

void 

Sets the listener that contains a callback to be invoked upon a physical key event.

OHOS::RootView::ClearOnKeyActListener ()

void 

Clears the listener for monitoring physical key events.

OHOS::RootView::OnVirtualDeviceEventListener::OnVirtualDeviceEvent (UIView &view, VirtualDeviceEvent event)=0

virtual bool 

Responds to an input event triggered by a virtual device.

OHOS::RootView::OnVirtualDeviceEvent (const VirtualDeviceEvent &event)

virtual void 

Executes an input event triggered by a virtual device.

OHOS::RootView::SetOnVirtualDeviceEventListener (OnVirtualDeviceEventListener *onVirtualDeviceEventListener)

void 

Sets a listener for monitoring the input events of a virtual device.

OHOS::RootView::ClearOnVirtualDeviceEventListener ()

void 

Clears the listener for monitoring the input events of a virtual device.

OHOS::RootView::FindSubView (const UIView &parentView, const UIView *subView)

static bool 

Checks whether the target view is one of the child views of the specified parent view.

OHOS::TextFormatter::Format (int16_t value, char *outText, uint16_t textLen)

virtual bool 

Converts the input integer into a character string for output.

OHOS::TextAdapter::TextAdapter ()

 

A constructor used to create a UILabel instance.

OHOS::TextAdapter::~TextAdapter ()

virtual 

A destructor used to delete the UILabel instance.

OHOS::TextAdapter::GetView (UIView *inView, int16_t index) override

UIView

Obtains a UILabel instance to convert adapter data into another UILabel instance.

OHOS::TextAdapter::SetData (List< const char * > *data)

void 

Sets the UILabel adapter data, which is a string linked list.

OHOS::TextAdapter::SetData (int16_t start, int16_t end)

void 

Sets continuously increasing data. For example, if you need to set data 0, 1, 2, 3, 4, use this function to set start to 0 and end to 4.

OHOS::TextAdapter::SetFontId (uint8_t fontId)

void 

Sets font ID.

OHOS::TextAdapter::GetFontId () const

uint8_t 

Obtains font ID.

OHOS::TextAdapter::SetFont (const char *name, uint8_t size)

void 

Sets the font.

OHOS::TextAdapter::GetStyle ()

Style

Obtains the UILabel adapter style.

OHOS::TextAdapter::GetCount () override

virtual uint16_t 

Obtains the data size of the UILabel adapter.

OHOS::TextAdapter::SetWidth (int16_t width)

void 

Sets the width of UILabel constructed by the adapter.

OHOS::TextAdapter::SetDirect (UITextLanguageDirect direct)

void 

Sets the direction of the UILabel constructed by the adapter.

OHOS::TextAdapter::SetHeight (int16_t height)

void 

Sets the height of the UILabel constructed by the adapter.

OHOS::TextAdapter::SetLineBreakMode (const uint8_t lineBreakMode)

void 

Sets the LineBreakMode attribute of UILabel constructed by the adapter. For details about the values of LineBreakMode, see LINE_BREAK_ADAPT, LINE_BREAK_WRAP, LINE_BREAK_ELLIPSIS, and LINE_BREAK_MARQUEE.

OHOS::TextAdapter::SetOnClickListener (UIView::OnClickListener *clickListener)

void 

Sets the callback function to be invoked upon a click event.

OHOS::TextAdapter::SetTextFormatter (TextFormatter *formatter)

void 

Sets the text formatter.

OHOS::UIAbstractClock::UIAbstractClock ()

 

A default constructor used to create a UIAbstractClock instance.

OHOS::UIAbstractClock::UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second)

 

A constructor used to create a UIAbstractClock instance with time elements (hour, minute and second).

OHOS::UIAbstractClock::~UIAbstractClock ()

virtual 

A destructor used to delete the UIAbstractClock instance.

OHOS::UIAbstractClock::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIAbstractClock::SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

void 

Sets the time in 24-hour format.

OHOS::UIAbstractClock::SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

void 

Sets the time in 12-hour format.

OHOS::UIAbstractClock::GetCurrentHour () const

uint8_t 

Obtains the current number of hours.

OHOS::UIAbstractClock::GetCurrentMinute () const

uint8_t 

Obtains the current number of minutes.

OHOS::UIAbstractClock::GetCurrentSecond () const

uint8_t 

Obtains the current number of seconds.

OHOS::UIAbstractClock::IncOneSecond ()

void 

Increases the time by one second.

OHOS::UIAbstractClock::UpdateClock (bool clockInit)

virtual void 

Updates this clock.

OHOS::UIAbstractClock::SetWorkMode (WorkMode newMode)

virtual void 

Sets the working mode for this clock.

OHOS::UIAbstractClock::GetWorkMode () const

virtual WorkMode 

Obtains the working mode of this clock.

OHOS::UIAbstractProgress::UIAbstractProgress ()

 

A constructor used to create a UIAbstractProgress instance.

OHOS::UIAbstractProgress::~UIAbstractProgress ()

virtual 

A destructor used to delete the UIAbstractProgress instance.

OHOS::UIAbstractProgress::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UIAbstractProgress::EnableBackground (bool enable)

void 

Sets whether the background of the progress bar is visible.

OHOS::UIAbstractProgress::SetValue (int16_t value)

void 

Sets the current value for this progress bar.

OHOS::UIAbstractProgress::GetValue () const

int16_t 

Obtains the current value of this progress bar.

OHOS::UIAbstractProgress::SetRange (int16_t rangeMax, int16_t rangeMin)

void 

Sets the range for this progress bar.

OHOS::UIAbstractProgress::GetRangeMin () const

int16_t 

Obtains the minimum value of this progress bar.

OHOS::UIAbstractProgress::GetRangeMax () const

int16_t 

Obtains the maximum value of this progress bar.

OHOS::UIAbstractProgress::SetImage (const char *foregroundImage, const char *backgroundImage=nullptr)

void 

Sets the image for this progress bar.

OHOS::UIAbstractProgress::SetImage (const ImageInfo *foregroundImage, const ImageInfo *backgroundImage=nullptr)

void 

Sets the image as a pixel map for this progress bar.

OHOS::UIAbstractProgress::SetStep (uint16_t step)

void 

Sets the step for this progress bar.

OHOS::UIAbstractProgress::GetStep () const

uint16_t 

Obtains the current step of this progress bar.

OHOS::UIAbstractProgress::SetBackgroundStyle (const Style &style)

void 

Sets the background style for this progress bar.

OHOS::UIAbstractProgress::SetBackgroundStyle (uint8_t key, int64_t value)

void 

Sets a background style for this progress bar.

OHOS::UIAbstractProgress::GetBackgroundStyle () const

const Style

Obtains the background style of this progress bar.

OHOS::UIAbstractProgress::GetBackgroundStyle (uint8_t key) const

int64_t 

Obtains the value of a background style of this progress bar.

OHOS::UIAbstractProgress::SetForegroundStyle (const Style &style)

void 

Sets the foreground style for this progress bar.

OHOS::UIAbstractProgress::SetForegroundStyle (uint8_t key, int64_t value)

void 

Sets a foreground style for this progress bar.

OHOS::UIAbstractProgress::GetForegroundStyle () const

const Style

Obtains the foreground style of this progress bar.

OHOS::UIAbstractProgress::GetForegroundStyle (uint8_t key) const

int64_t 

Obtains the value of a foreground style of this progress bar.

OHOS::UIAbstractProgress::SetCapType (CapType cap)

void 

Sets the type of caps on the background and foreground of the progress bar.

OHOS::UIAbstractScroll::UIAbstractScroll ()

 

A constructor used to create a UIAbstractScroll instance.

OHOS::UIAbstractScroll::~UIAbstractScroll ()

virtual 

A destructor used to delete the UIAbstractScroll instance.

OHOS::UIAbstractScroll::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIAbstractScroll::GetDirection () const

uint8_t 

Obtains the scroll direction.

OHOS::UIAbstractScroll::SetScrollBlankSize (uint16_t size)

void 

Sets the blank size for this scroll view.

OHOS::UIAbstractScroll::SetMaxScrollDistance (uint16_t distance)

void 

Sets the maximum scroll distance after a finger lifts the screen.

OHOS::UIAbstractScroll::SetReboundSize (uint16_t size)

void 

Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar.

OHOS::UIAbstractScroll::GetMaxScrollDistance () const

uint16_t 

Obtains the maximum scroll distance after a finger lifts the screen.

OHOS::UIAbstractScroll::SetDragFunc (EasingFunc func)

void 

Sets the easing function that specifies a scroll animation after a finger lifts the screen.

OHOS::UIAbstractScroll::SetThrowDrag (bool throwDrag)

void 

Sets whether to continue scrolling after a finger lifts the screen.

OHOS::UIAbstractScroll::MoveChildByOffset (int16_t offsetX, int16_t offsetY) override

void 

Moves the position of all child views.

OHOS::UIAbstractScroll::SetDragACCLevel (uint16_t value)

void 

Sets the drag acceleration.

OHOS::UIAbstractScroll::GetDragACCLevel () const

uint8_t 

Obtains the drag acceleration.

OHOS::UIAbstractScroll::SetSwipeACCLevel (uint16_t value)

void 

Sets the compensation distance after a finger lifts the screen.

OHOS::UIAbstractScroll::GetSwipeACCLevel () const

uint8_t 

Obtains the compensation distance after a finger lifts the screen.

OHOS::UIAnalogClock::UIAnalogClock ()

 

A default constructor used to create a UIAnalogClock instance.

OHOS::UIAnalogClock::~UIAnalogClock ()

virtual 

A destructor used to delete the UIAnalogClock instance.

OHOS::UIAnalogClock::Hand::Hand ()

 

A default constructor used to create a Hand instance.

OHOS::UIAnalogClock::Hand::~Hand ()

virtual 

A destructor used to delete the Hand instance.

OHOS::UIAnalogClock::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIAnalogClock::SetHandImage (HandType type, const UIImageView &img, Point position, Point center)

void 

Sets the image used to draw a clock hand.

OHOS::UIAnalogClock::SetHandLine (HandType type, Point position, Point center, ColorType color, uint16_t width, uint16_t height, OpacityType opacity)

void 

Sets the line used to draw a clock hand.

OHOS::UIAnalogClock::GetHandRotateCenter (HandType type) const

Point 

Obtains the rotation center of a specified clock hand.

OHOS::UIAnalogClock::GetHandPosition (HandType type) const

Point 

Obtains the position of a specified clock hand.

OHOS::UIAnalogClock::GetHandInitAngle (HandType type) const

uint16_t 

Obtains the initial rotation angle of the specified clock hand.

OHOS::UIAnalogClock::GetHandCurrentAngle (HandType type) const

uint16_t 

Obtains the current rotation angle of the specified clock hand.

OHOS::UIAnalogClock::SetInitTime24Hour (uint8_t hour, uint8_t minute, uint8_t second)

void 

Sets the initial time in the 24-hour format.

OHOS::UIAnalogClock::SetInitTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am)

void 

Sets the initial time in the 12-hour format.

OHOS::UIAnalogClock::OnDraw (const Rect &invalidatedArea) override

void 

Draws an analog clock.

OHOS::UIAnalogClock::OnPostDraw (const Rect &invalidatedArea) override

virtual void 

Performs the operations needed after the drawing.

OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y) override

void 

Sets the position for this analog clock.

OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) override

void 

Sets the position and size for this analog clock.

OHOS::UIAnalogClock::SetWorkMode (WorkMode newMode) override

void 

Sets the working mode for this analog clock.

OHOS::UIAnalogClock::UpdateClock (bool clockInit) override

void 

Updates the time of this analog clock.

OHOS::UIArcLabel::UIArcLabel ()

 

A default constructor used to create a UIArcLabel instance.

OHOS::UIArcLabel::~UIArcLabel ()

virtual 

A destructor used to delete the UIArcLabel instance.

OHOS::UIArcLabel::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIArcLabel::GetWidth () override

int16_t 

Obtains the width of this arc text.

OHOS::UIArcLabel::GetHeight () override

int16_t 

Obtains the height of this arc text.

OHOS::UIArcLabel::SetText (const char *text)

void 

Sets the text content for this arc label.

OHOS::UIArcLabel::GetText () const

const char * 

Obtains the text of this arc label.

OHOS::UIArcLabel::SetAlign (UITextLanguageAlignment horizontalAlign)

void 

Sets the alignment mode for this text.

OHOS::UIArcLabel::GetHorAlign () const

UITextLanguageAlignment 

Obtains the horizontal alignment mode.

OHOS::UIArcLabel::GetDirect ()

UITextLanguageDirect 

Obtains the direction of this text.

OHOS::UIArcLabel::SetFontId (uint8_t fontId)

void 

Sets the font ID for this arc label.

OHOS::UIArcLabel::GetFontId () const

uint8_t 

Obtains the font ID composed of font name and size.

OHOS::UIArcLabel::SetFont (const char *name, uint8_t size)

void 

Sets the font for this arc label.

OHOS::UIArcLabel::SetArcTextCenter (int16_t x, int16_t y)

void 

Sets the center position for this arc text.

OHOS::UIArcLabel::GetArcTextCenter () const

Point 

Obtains the center position of this arc text.

OHOS::UIArcLabel::SetArcTextRadius (uint16_t radius)

void 

Sets the radius for this arc text.

OHOS::UIArcLabel::GetArcTextRadius () const

uint16_t 

Obtains the radius of this arc text.

OHOS::UIArcLabel::SetArcTextAngle (int16_t startAngle, int16_t endAngle)

void 

Sets the start angle and end angle for this arc text.

OHOS::UIArcLabel::GetArcTextStartAngle () const

int16_t 

Obtains the start angle of this arc text.

OHOS::UIArcLabel::GetArcTextEndAngle () const

int16_t 

Obtains the end angle of this arc text.

OHOS::UIArcLabel::SetArcTextOrientation (TextOrientation orientation)

void 

Sets the orientation for this arc text.

OHOS::UIArcLabel::GetArcTextOrientation () const

TextOrientation 

Obtains the orientation of this arc text.

OHOS::UIArcLabel::OnDraw (const Rect &invalidatedArea) override

virtual void 

Draws an arc text.

OHOS::UIAxis::UIAxis ()

 

A constructor used to create a UIAxis instance.

OHOS::UIAxis::~UIAxis ()

virtual 

A destructor used to delete the UIAxis instance.

OHOS::UIAxis::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIAxis::SetDataRange (uint16_t min, uint16_t max)=0

virtual bool 

Sets the value range of a coordinate axis.

OHOS::UIAxis::SetMarkNum (uint16_t count)=0

virtual void 

Sets the number of scales on a coordinate axis.

OHOS::UIAxis::SetLineColor (const ColorType &color)

void 

Sets the line color of the coordinate axis.

OHOS::UIAxis::OnDraw (const Rect &invalidatedArea) override

void 

Called when a view is drawn.

OHOS::UIAxis::OnPreDraw (const Rect &invalidatedArea) override

bool 

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

OHOS::UIAxis::TranslateToPixel (int16_t &value)=0

virtual void 

Translates data into pixel coordinates.

OHOS::UIXAxis::UIXAxis ()

 

A constructor used to create a UIXAxis instance.

OHOS::UIXAxis::~UIXAxis ()

virtual 

A destructor used to delete the UIXAxis instance.

OHOS::UIXAxis::TranslateToPixel (int16_t &value) override

void 

Translates data into the x coordinate of a pixel.

OHOS::UIXAxis::SetDataRange (uint16_t min, uint16_t max) override

bool 

Sets the value range of the X axis.

OHOS::UIXAxis::SetMarkNum (uint16_t count) override

void 

Sets the number of scales on the x-axis.

OHOS::UIYAxis::UIYAxis ()

 

A constructor used to create a UIYAxis instance.

OHOS::UIYAxis::~UIYAxis ()

virtual 

A destructor used to delete the UIYAxis instance.

OHOS::UIYAxis::TranslateToPixel (int16_t &value) override

void 

Translates data into the y coordinate of a pixel.

OHOS::UIYAxis::SetDataRange (uint16_t min, uint16_t max) override

bool 

Sets the value range of the y-axis.

OHOS::UIYAxis::SetMarkNum (uint16_t count) override

void 

Sets the number of scales on the Y axis.

OHOS::UIBoxProgress::UIBoxProgress ()

 

A constructor used to create a UIBoxProgress instance.

OHOS::UIBoxProgress::~UIBoxProgress ()

virtual 

A destructor used to delete the UIBoxProgress instance.

OHOS::UIBoxProgress::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIBoxProgress::SetWidth (int16_t width) override

void 

Sets the width for the view holding this progress bar.

OHOS::UIBoxProgress::SetHeight (int16_t height) override

void 

Sets the height for this view.

OHOS::UIBoxProgress::SetDirection (const Direction &direction)

void 

Sets the direction for this progress bar.

OHOS::UIBoxProgress::GetDirection () const

Direction 

Obtains the direction of this progress bar.

OHOS::UIBoxProgress::SetValidWidth (int16_t width)

void 

Sets the actual width for this progress bar.

OHOS::UIBoxProgress::GetValidWidth () const

int16_t 

Obtains the actual width of this progress bar.

OHOS::UIBoxProgress::SetValidHeight (int16_t height)

void 

Sets the actual height for this progress bar.

OHOS::UIBoxProgress::GetValidHeight () const

int16_t 

Obtains the actual height of this progress bar.

OHOS::UIBoxProgress::OnDraw (const Rect &invalidatedArea) override

void 

Called when a view is drawn.

OHOS::UIButton::UIButton ()

 

A constructor used to create a UIButton instance.

OHOS::UIButton::UIButton (const char *id)

 

A constructor used to create a UIButton instance based on the button ID.

OHOS::UIButton::~UIButton ()

virtual 

A destructor used to delete the UIButton instance.

OHOS::UIButton::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UIButton::OnPreDraw (const Rect &invalidatedArea) override

bool 

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

OHOS::UIButton::OnDraw (const Rect &invalidatedArea) override

void 

Executes the draw action.

OHOS::UIButton::OnPressEvent (const PressEvent &event) override

void 

Executes the press event action.

OHOS::UIButton::OnReleaseEvent (const ReleaseEvent &event) override

void 

Executes the press release event action.

OHOS::UIButton::OnCancelEvent (const CancelEvent &event) override

void 

Executes the cancel event action.

OHOS::UIButton::SetImageSrc (const char *defaultImgSrc, const char *triggeredImgSrc)

void 

Sets the image for this button.

OHOS::UIButton::SetImageSrc (const ImageInfo *defaultImgSrc, const ImageInfo *triggeredImgSrc)

void 

Sets the image for this button.

OHOS::UIButton::SetImagePosition (const int16_t x, const int16_t y)

void 

Sets the position for this image.

OHOS::UIButton::GetImageX () const

int16_t 

Obtains the x-coordinate of this image.

OHOS::UIButton::GetImageY () const

int16_t 

Obtains the y-coordinate of this image.

OHOS::UIButton::GetCurImageSrc () const

const Image

Obtains the image for the current button state.

OHOS::UIButton::GetWidth () override

int16_t 

Obtains the width of this image.

OHOS::UIButton::GetHeight () override

int16_t 

Obtains the height of this image.

OHOS::UIButton::SetWidth (int16_t width) override

void 

Sets the width for this image.

OHOS::UIButton::SetHeight (int16_t height) override

void 

Sets the height for this image.

OHOS::UIButton::GetContentRect () override

virtual Rect 

Obtains a rectangular area that contains coordinate information.

OHOS::UIButton::GetStyle (uint8_t key) const override

int64_t 

Obtains the value of a style.

OHOS::UIButton::SetStyle (uint8_t key, int64_t value) override

void 

Sets a style.

OHOS::UIButton::GetStyleForState (uint8_t key, ButtonState state) const

int64_t 

Obtains the style of a button in a specific state.

OHOS::UIButton::SetStyleForState (uint8_t key, int64_t value, ButtonState state)

void 

Sets the style for a button in a specific state.

OHOS::UIButton::Disable ()

void 

Disables this button.

OHOS::UIButton::Enable ()

void 

Enables this button.

OHOS::UIButton::SetStateForStyle (ButtonState state)

void 

Sets the state for a button. After the setting, calling SetStyle will change the style of this button, but not its state.

OHOS::Paint::Paint ()

 

A constructor used to create a Paint instance.

OHOS::Paint::~Paint ()

virtual 

A destructor used to delete the Paint instance.

OHOS::Paint::SetStyle (PaintStyle style)

void 

Sets the paint style of a closed graph.

OHOS::Paint::GetStyle () const

PaintStyle 

Obtains the paint style of a closed graph.

OHOS::Paint::SetStrokeWidth (uint16_t width)

void 

Sets the width of a line or border.

OHOS::Paint::GetStrokeWidth () const

uint16_t 

Obtains the width of a line or border.

OHOS::Paint::SetStrokeColor (ColorType color)

void 

Sets the color of a line or border.

OHOS::Paint::GetStrokeColor () const

ColorType 

Obtains the color of a line or border.

OHOS::Paint::SetFillColor (ColorType color)

void 

Sets fill color.

OHOS::Paint::GetFillColor () const

ColorType 

Obtains the fill color.

OHOS::Paint::SetOpacity (uint8_t opacity)

void 

Sets the opacity.

OHOS::Paint::GetOpacity () const

uint8_t 

Obtains the opacity.

OHOS::UICanvas::UICanvas ()

 

A constructor used to create a UICanvas instance.

OHOS::UICanvas::~UICanvas ()

virtual 

A destructor used to delete the UICanvas instance.

OHOS::UICanvas::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UICanvas::Clear ()

void 

Clears the entire canvas.

OHOS::UICanvas::SetStartPosition (const Point &startPoint)

void 

Sets the coordinates of the start point for drawing a line. For example, if startPoint is set to {50, 50}, the line is drawn from this set of coordinates on the canvas.

OHOS::UICanvas::GetStartPosition () const

const Point

Obtains the coordinates of the start point of a line.

OHOS::UICanvas::DrawLine (const Point &endPoint, const Paint &paint)

void 

Draws a straight line.

OHOS::UICanvas::DrawLine (const Point &startPoint, const Point &endPoint, const Paint &paint)

void 

Draws a straight line from the coordinates of the start point.

OHOS::UICanvas::DrawCurve (const Point &control1, const Point &control2, const Point &endPoint, const Paint &paint)

void 

Draws a cubic Bezier curve.

OHOS::UICanvas::DrawCurve (const Point &startPoint, const Point &control1, const Point &control2, const Point &endPoint, const Paint &paint)

void 

Draws a cubic Bezier curve from the start point coordinates.

OHOS::UICanvas::DrawRect (const Point &startPoint, int16_t height, int16_t width, const Paint &paint)

void 

Draws a rectangle.

OHOS::UICanvas::DrawCircle (const Point &center, uint16_t radius, const Paint &paint)

void 

Draws a circle.

OHOS::UICanvas::DrawSector (const Point &center, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint)

void 

Draws a sector.

OHOS::UICanvas::DrawArc (const Point &center, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint)

void 

Draws an arc.

OHOS::UICanvas::DrawImage (const Point &startPoint, const char *image, const Paint &paint)

void 

Draws an image.

OHOS::UICanvas::DrawLabel (const Point &startPoint, const char *text, uint16_t maxWidth, const FontStyle &fontStyle, const Paint &paint)

void 

Draws text.

OHOS::UICanvas::OnDraw (const Rect &invalidatedArea) override

virtual void 

Called when a view is drawn.

OHOS::UIChartDataSerial::UIChartDataSerial ()

 

A constructor used to create a UIChartDataSerial instance.

OHOS::UIChartDataSerial::~UIChartDataSerial ()

virtual 

A destructor used to delete the UIChartDataSerial instance.

OHOS::UIChartDataSerial::SetMaxDataCount (uint16_t maxCount)

bool 

Sets the maximum number of data points that can be stored in a data set.

OHOS::UIChartDataSerial::ModifyPoint (uint16_t index, const Point &point)

bool 

Modifies the value of a data point in the data set.

OHOS::UIChartDataSerial::GetPoint (uint16_t index, Point &point)

bool 

Obtains the coordinates in the chart for a data point in the data set.

OHOS::UIChartDataSerial::AddPoints (const Point *data, uint16_t count)

bool 

Adds data points.

OHOS::UIChartDataSerial::ClearData ()

void 

Clears all data points.

OHOS::UIChartDataSerial::GetDataCount () const

uint16_t 

Obtains the number of data points available in the data set.

OHOS::UIChartDataSerial::EnableSmooth (bool smooth)

void 

Sets whether to smooth a polyline.

OHOS::UIChartDataSerial::IsSmooth () const

bool 

Checks whether smoothing is performed on a polyline.

OHOS::UIChartDataSerial::EnableGradient (bool enable)

void 

Enables the fill color of a line chart.

OHOS::UIChartDataSerial::IsGradient () const

bool 

Checks whether a polyline has a fill color.

OHOS::UIChartDataSerial::GetPeakIndex () const

uint16_t 

Obtains the index of the top point in the data set.

OHOS::UIChartDataSerial::GetLatestIndex () const

uint16_t 

Obtains the index of the frontmost point (the latest added or modified data point in a data set).

OHOS::UIChartDataSerial::GetValleyIndex () const

uint16_t 

Obtains the index of the bottom point in a data set.

OHOS::UIChartDataSerial::GetPeakData () const

int16_t 

Obtains the Y value of the top point in a data set.

OHOS::UIChartDataSerial::GetValleyData () const

int16_t 

Obtains the Y value of the bottom point in a data set.

OHOS::UIChartDataSerial::GetLineColor () const

ColorType 

Obtains the polyline color of the data set in a line chart.

OHOS::UIChartDataSerial::GetFillColor () const

ColorType 

Obtains the fill color of the data set.

OHOS::UIChartDataSerial::SetFillColor (const ColorType &color)

void 

Sets the fill color of the data set.

OHOS::UIChartDataSerial::SetLineColor (const ColorType &color)

void 

Sets the polyline color of the data set in the line chart.

OHOS::UIChartDataSerial::HidePoint (uint16_t index, uint16_t count)

void 

Hides some points in the data set.

OHOS::UIChartDataSerial::GetHideIndex () const

uint16_t 

Obtains the index from which the data set starts to hide.

OHOS::UIChartDataSerial::GetHideCount () const

uint16_t 

Obtains the number of hidden points in the data set.

OHOS::UIChartDataSerial::SetHeadPointStyle (const PointStyle &style)

void 

Sets the style of the frontmost point on a polyline.

OHOS::UIChartDataSerial::SetTopPointStyle (const PointStyle &style)

void 

Sets the style of the top point of a polyline.

OHOS::UIChartDataSerial::SetBottomPointStyle (const PointStyle &style)

void 

Sets the style of the bottom point of a polyline.

OHOS::UIChartDataSerial::GetHeadPointStyle () const

const PointStyle

Obtains the style of the frontmost point on a polyline.

OHOS::UIChartDataSerial::GetTopPointStyle () const

const PointStyle

Obtains the style of the top point of a polyline.

OHOS::UIChartDataSerial::GetBottomPointStyle () const

const PointStyle

Obtains the style of the bottom point of a polyline.

OHOS::UIChartDataSerial::EnableHeadPoint (bool enable)

void 

Enables the feature of drawing the frontmost point on a polyline.

OHOS::UIChartDataSerial::EnableTopPoint (bool enable)

void 

Enables the feature of drawing the top point of a polyline. If there are multiple top points, only the first one is drawn.

OHOS::UIChartDataSerial::EnableBottomPoint (bool enable)

void 

Enables the feature of drawing the bottom point of a polyline. If there are multiple bottom points, only the first one is drawn.

OHOS::UIChart::UIChart ()

 

A constructor used to create a UIChart instance.

OHOS::UIChart::~UIChart ()

virtual 

A destructor used to delete the UIChart instance.

OHOS::UIChart::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIChart::SetHeight (int16_t height) override

void 

Sets the height for this component.

OHOS::UIChart::SetWidth (int16_t width) override

void 

Sets the width for this component.

OHOS::UIChart::OnPreDraw (const Rect &invalidatedArea) override

bool 

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

OHOS::UIChart::OnDraw (const Rect &invalidatedArea) override

void 

Called when a view is drawn.

OHOS::UIChart::AddDataSerial (UIChartDataSerial *dataSerial)

virtual bool 

Adds a data set.

OHOS::UIChart::DeleteDataSerial (UIChartDataSerial *dataSerial)

virtual bool 

Deletes a data set.

OHOS::UIChart::ClearDataSerial ()

virtual void 

Clears all data sets.

OHOS::UIChart::RefreshChart ()=0

virtual void 

Refreshes a chart and redraws the dirty region.

OHOS::UIChart::GetXAxis ()

UIXAxis

Obtains the x-axis instance.

OHOS::UIChart::GetYAxis ()

UIYAxis

Obtains the y-axis instance.

OHOS::UIChart::EnableReverse (bool enable)

void 

Enables chart reverse.

OHOS::UIChartPillar::UIChartPillar ()

 

A constructor used to create a UIChartPillar instance.

OHOS::UIChartPillar::~UIChartPillar ()

virtual 

A destructor used to delete the UIChartPillar instance.

OHOS::UIChartPillar::RefreshChart () override

void 

Refreshes a bar chart and redraws the dirty region.

OHOS::UIChartPolyline::UIChartPolyline ()

 

A constructor used to create a UIChartPolyline instance.

OHOS::UIChartPolyline::~UIChartPolyline ()

virtual 

A destructor used to delete the UIChartPolyline instance.

OHOS::UIChartPolyline::RefreshChart () override

void 

Refreshes a line chart and redraws the dirty region.

OHOS::UIChartPolyline::SetGradientOpacity (uint8_t minOpa, uint8_t maxOpa)

void 

Sets the opacity range of the fill color gradient.

OHOS::UIChartPolyline::SetGradientBottom (uint16_t bottom)

void 

Sets the distance between the bottom edge of the fill color range and the x-axis.

OHOS::UICheckBox::UICheckBox ()

 

A constructor used to create a UICheckBox instance.

OHOS::UICheckBox::~UICheckBox ()

virtual 

A destructor used to delete the UICheckBox instance.

OHOS::UICheckBox::OnChangeListener::OnChange (UICheckBoxState state)=0

virtual bool 

Called when the state of this check box is switched. This is a virtual function, which needs your implementation.

OHOS::UICheckBox::OnChangeListener::~OnChangeListener ()

virtual 

A destructor used to delete the OnChangeListener instance.

OHOS::UICheckBox::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UICheckBox::SetOnChangeListener (OnChangeListener *onStateChangeListener)

void 

Sets the listener for this check box.

OHOS::UICheckBox::OnPreDraw (const Rect &invalidatedArea) override

bool 

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

OHOS::UICheckBox::OnDraw (const Rect &invalidatedArea) override

void 

Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox.

OHOS::UICheckBox::OnClickEvent (const ClickEvent &event) override

void 

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

OHOS::UICheckBox::SetImages (const char *selectedImageSrc, const char *unselectedImageSrc)

virtual void 

Sets the images for this check box.

OHOS::UICheckBox::SetImages (const ImageInfo *selectedImageSrc, const ImageInfo *unselectedImageSrc)

virtual void 

Sets the images for this check box.

OHOS::UICheckBox::GetState () const

UICheckBoxState 

Obtains the state of this check box.

OHOS::UICheckBox::SetState (UICheckBoxState state)

void 

Sets the state for this check box.

OHOS::UICircleProgress::UICircleProgress ()

 

A constructor used to create a UICircleProgress instance.

OHOS::UICircleProgress::~UICircleProgress ()

virtual 

A destructor used to delete the UICircleProgress instance.

OHOS::UICircleProgress::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UICircleProgress::OnPreDraw (const Rect &invalidatedArea) override

bool 

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

OHOS::UICircleProgress::OnDraw (const Rect &invalidatedArea) override

void 

Called when a view is drawn.

OHOS::UICircleProgress::SetCenterPosition (int16_t x, int16_t y)

void 

Sets the coordinates of the center point for this circular progress bar.

OHOS::UICircleProgress::GetCenterPosition () const

Point 

Obtains the coordinates of the center point for this circular progress bar.

OHOS::UICircleProgress::SetRadius (uint16_t radius)

void 

Sets the outer radius for this circular progress bar.

OHOS::UICircleProgress::GetRadius () const

uint16_t 

Obtains the outer radius of this circular progress bar.

OHOS::UICircleProgress::SetStartAngle (int16_t startAngle)

void 

Sets the start angle.

OHOS::UICircleProgress::GetStartAngle () const

int16_t 

Obtains the start angle.

OHOS::UICircleProgress::SetEndAngle (int16_t endAngle)

void 

Sets the end angle.

OHOS::UICircleProgress::GetEndAngle () const

int16_t 

Obtains the end angle.

OHOS::UICircleProgress::SetProgressImagePosition (int16_t x, int16_t y)

void 

Sets the coordinates of the foreground image for this progress bar relative to the view.

OHOS::UICircleProgress::SetBackgroundImagePosition (int16_t x, int16_t y)

void 

Sets the coordinates of the background image for this progress bar relative to the view.

OHOS::UICircleProgress::SetLineColor (ColorType color)

void 

Sets the foreground color for this progress bar.

OHOS::UIDialog::UIDialog ()

 

A constructor used to create a UIDialog instance.

OHOS::UIDialog::~UIDialog ()

virtual 

A destructor used to delete the UIDialog instance.

OHOS::UIDialog::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIDialog::SetTitle (const char *title)

void 

Sets the title for this dialog box.

OHOS::UIDialog::SetText (const char *text)

void 

Sets the text for this dialog box.

OHOS::UIDialog::OnPreDraw (const Rect &invalidatedArea) override

bool 

Checks whether this label needs to be covered before drawing it.

OHOS::UIDialog::SetButton (DialogButtonType buttonType, const char *text, OnClickListener *listener)

void 

Sets a button for this dialog box.

OHOS::UIDialog::SetVisible (bool visible) override

void 

Sets whether a dialog box is visible.

OHOS::UIDigitalClock::UIDigitalClock ()

 

A default constructor used to create a UIDigitalClock instance.

OHOS::UIDigitalClock::~UIDigitalClock ()

virtual 

A destructor used to delete the UIDigitalClock instance.

OHOS::UIDigitalClock::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIDigitalClock::SetFontId (uint8_t fontId)

void 

Sets the dynamic font ID for this digital clock.

OHOS::UIDigitalClock::SetFont (const char *name, uint8_t size)

void 

Sets the dynamic font for this digital clock.

OHOS::UIDigitalClock::SetColor (ColorType color)

void 

Sets the font color for this digital clock.

OHOS::UIDigitalClock::SetDisplayMode (DisplayMode dm)

void 

Sets the display mode for this digital clock.

OHOS::UIDigitalClock::GetDisplayMode () const

DisplayMode 

Obtains the display mode of this digital clock.

OHOS::UIDigitalClock::DisplayLeadingZero (bool displayLeadingZero)

void 

Sets whether to add 0 before the hour of this digital clock.

OHOS::UIDigitalClock::SetOpacity (uint8_t opacity)

void 

Sets the opacity for this digital clock.

OHOS::UIDigitalClock::GetOpacity () const

uint8_t 

Obtains the opacity of this digital clock.

OHOS::UIDigitalClock::UpdateClock (bool clockInit) override

void 

Updates this digital clock.

OHOS::UIImageAnimatorView::UIImageAnimatorView ()

 

A constructor used to create a UIImageAnimatorView instance.

OHOS::UIImageAnimatorView::~UIImageAnimatorView ()

virtual 

A destructor used to delete the UIImageAnimatorView instance.

OHOS::UIImageAnimatorView::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char *imageSrc, uint8_t imageNum, uint16_t timeOfUpdate)

void 

Sets the images and speed for this animator.

OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char *imageSrc, uint8_t imageNum)

void 

Sets the images for this animator.

OHOS::UIImageAnimatorView::SetTimeOfUpdate (uint16_t timeOfUpdate)

void 

Sets the speed for this animator.

OHOS::UIImageAnimatorView::GetTimeOfUpdate () const

uint16_t 

Obtains the speed of this animator.

OHOS::UIImageAnimatorView::SetTimeOfPause (uint16_t timeOfPause)

void 

Sets the interval between two playbacks of an infinitely repeated animator.

OHOS::UIImageAnimatorView::GetTimeOfPause () const

uint16_t 

Obtains the interval between two playbacks of an infinitely repeated animator.

OHOS::UIImageAnimatorView::GetImageAnimatorSrc () const

const ImageAnimatorInfo

Obtains the image array of this frame animator.

OHOS::UIImageAnimatorView::GetImageAnimatorImageNum () const

uint8_t 

Obtains the number of images.

OHOS::UIImageAnimatorView::SetSizeFixed (bool fixed)

void 

Sets whether the image size is fixed to the view size.

OHOS::UIImageAnimatorView::IsSizeFixed () const

bool 

Checks whether the image size is fixed to the view size.

OHOS::UIImageAnimatorView::SetRepeat (bool repeat)

void 

Sets whether to play this animator for infinite times.

OHOS::UIImageAnimatorView::IsRepeat () const

bool 

Checks whether this animator is played for infinite times.

OHOS::UIImageAnimatorView::SetRepeatTimes (uint32_t times)

void 

Sets the playback times for this animator.

OHOS::UIImageAnimatorView::GetRepeatTimes () const

uint32_t 

Obtains the playback times.

OHOS::UIImageAnimatorView::GetState () const

uint8_t 

Obtains the current state of this animator.

OHOS::UIImageAnimatorView::SetReverse (bool reverse)

void 

Sets the playback sequence for this animator.

OHOS::UIImageAnimatorView::IsReverse () const

bool 

Obtains the playback sequence of this animator.

OHOS::UIImageAnimatorView::Start ()

void 

Starts this animator.

OHOS::UIImageAnimatorView::Stop (bool needReset=true)

void 

Stops this animator.

OHOS::UIImageAnimatorView::Pause ()

void 

Pauses this animator at the current image.

OHOS::UIImageAnimatorView::Resume ()

void 

Resumes this animator from the current image.

OHOS::UIImageAnimatorView::AnimatorStopListener::~AnimatorStopListener ()

virtual 

A destructor used to delete an AnimatorStopListener instance.

OHOS::UIImageAnimatorView::AnimatorStopListener::OnAnimatorStop (UIView &view)

virtual void 

Called when this animator stops.

OHOS::UIImageAnimatorView::SetAnimatorStopListener (AnimatorStopListener *listener)

void 

Sets the listener for the stop of this animator.

OHOS::UIImageView::UIImageView ()

 

A default constructor used to create a UIImageView instance.

OHOS::UIImageView::~UIImageView ()

virtual 

A destructor used to delete the UIImageView instance.

OHOS::UIImageView::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIImageView::GetWidth () override

int16_t 

Obtains the width of this image view.

OHOS::UIImageView::GetHeight () override

int16_t 

Obtains the height of this image view.

OHOS::UIImageView::OnPreDraw (const Rect &invalidatedArea) override

bool 

Checks whether this image view needs to be covered to optimize the drawing process.

OHOS::UIImageView::OnDraw (const Rect &invalidatedArea) override

void 

Draws this image view.

OHOS::UIImageView::SetSrc (const char *src)

void 

Sets the image path.

OHOS::UIImageView::SetSrc (const ImageInfo *src)

void 

Sets the image information.

OHOS::UIImageView::SetAutoEnable (bool enable)

void 

Sets whether the image view size needs to be adaptive to the image size.

OHOS::UIImageView::SetBlurLevel (BlurLevel level)

void 

Sets the blur level for this image when it is rotated or scaled.

OHOS::UIImageView::GetBlurLevel () const

BlurLevel 

Obtains the blur level of this image when it is rotated or scaled.

OHOS::UIImageView::SetTransformAlgorithm (TransformAlgorithm algorithm)

void 

Sets the algorithm used for image rotation and scaling.

OHOS::UIImageView::GetTransformAlgorithm () const

TransformAlgorithm 

Obtains the algorithm used for image rotation and scaling.

OHOS::UIImageView::GetPath () const

const char * 

获取图片路径

OHOS::UIImageView::GetImageInfo () const

const ImageInfo

获取图片信息

OHOS::UIImageView::GetSrcType () const

uint8_t 

获取图片类型

OHOS::UILabel::UILabel ()

 

A constructor used to create a UILabel instance.

OHOS::UILabel::~UILabel ()

virtual 

A destructor used to delete the UILabel instance.

OHOS::UILabel::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UILabel::GetWidth () override

int16_t 

Obtains the width of this label.

OHOS::UILabel::GetHeight () override

int16_t 

Obtains the height of this label.

OHOS::UILabel::OnPreDraw (const Rect &invalidatedArea) override

bool 

Checks whether this label needs to be covered before drawing it.

OHOS::UILabel::OnDraw (const Rect &invalidatedArea) override

void 

Draws this label.

OHOS::UILabel::SetText (const char *text)

void 

Sets the text content for this label.

OHOS::UILabel::GetText () const

const char * 

Obtains the text of this label.

OHOS::UILabel::SetLineBreakMode (const uint8_t lineBreakMode)

void 

Sets the line break mode for this text.

OHOS::UILabel::GetLineBreakMode () const

uint8_t 

Obtains the line break mode of this text.

OHOS::UILabel::SetTextColor (ColorType color)

void 

Sets the color for this text.

OHOS::UILabel::GetTextColor () const

ColorType 

Obtains the color of this text.

OHOS::UILabel::SetAlign (UITextLanguageAlignment horizontalAlign, UITextLanguageAlignment verticalAlign=TEXT_ALIGNMENT_TOP)

void 

Sets the alignment mode for this text.

OHOS::UILabel::GetHorAlign () const

UITextLanguageAlignment 

Obtains the horizontal alignment mode.

OHOS::UILabel::GetVerAlign () const

UITextLanguageAlignment 

Obtains the vertical alignment mode.

OHOS::UILabel::SetDirect (UITextLanguageDirect direct)

void 

Sets the direction for this text.

OHOS::UILabel::GetDirect () const

UITextLanguageDirect 

Obtains the direction of this text.

OHOS::UILabel::SetFontId (uint8_t fontId)

void 

Sets the font ID for this label.

OHOS::UILabel::GetFontId () const

uint8_t 

Obtains the font ID composed of font name and size.

OHOS::UILabel::SetFont (const char *name, uint8_t size)

void 

Sets the font for this label.

OHOS::UILabel::SetRollSpeed (uint16_t speed)

void 

Sets the scroll speed for this text.

OHOS::UILabel::GetTextWidth ()

uint16_t 

Obtains the width of this text.

OHOS::UILabel::GetTextHeight ()

uint16_t 

Obtains the height of this text.

OHOS::UILabel::SetRollStartPos (int16_t pos)

void 

Sets the position where this text starts to roll.

OHOS::UILabel::GetRollStartPos () const

int16_t 

Obtains the position where this text starts to roll.

OHOS::UILabel::SetWidth (int16_t width) override

void 

Sets the width for this label.

OHOS::UILabel::SetHeight (int16_t height) override

void 

Sets the height for this label.

OHOS::UILabel::SetTextRotation (LabelRotateDegree angle)

void 

Sets the clockwise rotation angle for this text.

OHOS::UILabel::GetTextRotation () const

LabelRotateDegree 

Obtains the clockwise rotation degree of this text.

OHOS::UILabel::GetTextRotateDegree () const

uint16_t 

Obtains the number of text rotation degrees.

OHOS::UILabelButton::UILabelButton ()

 

A constructor used to create a UILabelButton instance.

OHOS::UILabelButton::~UILabelButton ()

virtual 

A destructor used to delete the UILabelButton instance.

OHOS::UILabelButton::OnDraw (const Rect &invalidatedArea) override

void 

Draws a label button.

OHOS::UILabelButton::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UILabelButton::SetText (const char *text)

void 

Sets the text for this label button.

OHOS::UILabelButton::GetText () const

const char * 

Obtains the text of this label button.

OHOS::UILabelButton::SetLablePosition (int16_t x, int16_t y)

void 

Sets the position for this label relative to the button holding it.

OHOS::UILabelButton::GetLabelPosition () const

Point 

Obtains the position of this label relative to the button holding it.

OHOS::UILabelButton::SetAlign (UITextLanguageAlignment align)

void 

Sets the alignment mode for this text.

OHOS::UILabelButton::GetAlign () const

UITextLanguageAlignment 

Obtains the alignment mode of this text.

OHOS::UILabelButton::SetDirect (UITextLanguageDirect direct)

void 

Sets the direction for this text.

OHOS::UILabelButton::GetDirect () const

UITextLanguageDirect 

Obtains the direction of this text.

OHOS::UILabelButton::SetLabelStyle (Style &labelStyle)

void 

Sets the style for this label.

OHOS::UILabelButton::SetLabelStyle (uint8_t key, int64_t value)

void 

Sets a style for this label.

OHOS::UILabelButton::GetLabelStyle () const

const Style

Obtains the style of this label.

OHOS::UILabelButton::GetLabelStyle (uint8_t key) const

int64_t 

Obtains the value of a style of this label.

OHOS::UILabelButton::SetTextColor (ColorType color)

void 

Sets the color for this text.

OHOS::UILabelButton::SetFont (const char *name, uint8_t size)

void 

Sets the font for this text.

OHOS::UILabelButton::SetFontId (uint8_t fontId)

void 

Sets the font ID.

OHOS::UILabelButton::GetFontId () const

uint8_t 

Obtains the font ID.

OHOS::ListScrollListener::ListScrollListener ()

 

A constructor used to create a ListScrollListener instance with the default state SCROLL_STATE_STOP.

OHOS::ListScrollListener::~ListScrollListener ()

virtual 

A destructor used to delete the ListScrollListener instance.

OHOS::ListScrollListener::OnScrollStart (int16_t index, UIView *view)

virtual void 

Called when a scroll starts.

OHOS::ListScrollListener::OnScrollEnd (int16_t index, UIView *view)

virtual void 

Called when a scroll ends.

OHOS::ListScrollListener::OnItemSelected (int16_t index, UIView *view)

virtual void 

Called when a new child view is selected at the preset position as this list scrolls. For details about how to set the position, see SetSelectPosition.

OHOS::ListScrollListener::GetScrollState () const

uint8_t 

Obtains the scroll state of this list.

OHOS::UIList::UIList ()

 

A constructor used to create a UIList instance in the vertical direction.

OHOS::UIList::UIList (uint8_t direction)

 

A constructor used to create a UIList instance in the specified direction.

OHOS::UIList::~UIList ()

virtual 

A destructor used to delete the UIList instance.

OHOS::UIList::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIList::OnDragEvent (const DragEvent &event) override

bool 

Called when the view is being dragged.

OHOS::UIList::OnDragEndEvent (const DragEvent &event) override

bool 

Called when the view stops dragging.

OHOS::UIList::OnPressEvent (const PressEvent &event) override

void 

Called when the view is pressed.

OHOS::UIList::SetAdapter (AbstractAdapter *adapter)

void 

Sets the adapter for this list. The content of this list is initialized when the adapter is set.

OHOS::UIList::MoveChildByOffset (int16_t x, int16_t y) override

virtual void 

Moves the position of all child views.

OHOS::UIList::ScrollTo (uint16_t index)

void 

Scrolls to change the index of the first row or column of the current view.

OHOS::UIList::ScrollBy (int16_t distance)

void 

Scrolls the content in this list.

OHOS::UIList::SetStartIndex (uint16_t index)

void 

Sets the start index for this list.

OHOS::UIList::GetStartIndex () const

uint16_t 

Obtains the start index of this list. The default value is 0.

OHOS::UIList::SetLoopState (bool state)

void 

Sets the loop state for this list, in which a loop scroll is possible since the top and bottom of the list are connected together.

OHOS::UIList::GetLoopState () const

bool 

Checks whether this list is in a loop state.

OHOS::UIList::SetSelectPosition (uint16_t position)

void 

Sets the position where a child view is selected as this list scrolls.

OHOS::UIList::GetSelectView ()

UIView

Obtains the child view being selected at the preset position.

OHOS::UIList::SetScrollStateListener (ListScrollListener *scrollListener)

void 

Sets the listener that contains a callback to be invoked when a child view is selected as this list scrolls.

OHOS::UIList::RefreshList ()

void 

Refreshes this list. The number of child views in the current view is fixed and the positions of those reserved child views as this list scrolls remain unchanged.

OHOS::UIList::EnableAutoAlign (bool state)

void 

Sets the automatic alignment state for this list. When a scroll stops, a child view is selected and its position is automatically aligned with the preset position.

OHOS::UIList::RemoveAll () override

void 

Removes all child views.

OHOS::UIPicker::UIPicker ()

 

A constructor used to create a UIPicker instance.

OHOS::UIPicker::~UIPicker ()

virtual 

A destructor used to delete the UIPicker instance.

OHOS::UIPicker::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIPicker::OnPreDraw (const Rect &invalidatedArea) override

bool 

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

OHOS::UIPicker::SetValues (const char *value[], uint16_t count)

bool 

Sets dynamic text data in the picker by using a string array.

OHOS::UIPicker::SetValues (int16_t start, int16_t end)

bool 

Sets the numeric data in the picker by using a given numeric range.

OHOS::UIPicker::ClearValues ()

virtual void 

Clears all values in the picker.

OHOS::UIPicker::SetFontId (uint8_t backgroundFontId, uint8_t highlightFontId)

void 

Sets the font IDs of dynamic text, which is the string array set through SetValues.

OHOS::UIPicker::GetBackgroundFontId () const

uint16_t 

Obtains the font ID of the background text.

OHOS::UIPicker::GetHighlightFontId () const

uint16_t 

Obtains the font ID of the highlighted text.

OHOS::UIPicker::SetTextColor (ColorType backgroundColor, ColorType highlightColor)

void 

Sets the text color.

OHOS::UIPicker::GetBackgroundTextColor () const

ColorType 

Obtains the color of the background text.

OHOS::UIPicker::GetHighlightTextColor () const

ColorType 

Obtains the color of the highlighted text.

OHOS::UIPicker::SetSelected (uint16_t index)

bool 

Sets the index of the item currently selected in the picker.

OHOS::UIPicker::GetSelected () const

uint16_t 

Obtains the index of the item currently selected in the picker.

OHOS::UIPicker::SetItemHeight (int16_t height)

void 

Sets the height of each item in the picker.

OHOS::UIPicker::SetWidth (int16_t width) override

void 

Sets the width for this component.

OHOS::UIPicker::SetHeight (int16_t height) override

void 

Sets the height for this component.

OHOS::UIPicker::SetLoopState (bool state)

void 

Sets whether a picker can slide cyclically.

OHOS::UIPicker::SelectedListener::SelectedListener ()

 

A constructor used to create a SelectedListener instance.

OHOS::UIPicker::SelectedListener::~SelectedListener ()

virtual 

A destructor used to delete the SelectedListener instance.

OHOS::UIPicker::SelectedListener::OnPickerStoped (UIPicker &picker)

virtual void 

Called when an item is selected after sliding stops. This function is implemented by applications.

OHOS::UIPicker::RegisterSelectedListener (SelectedListener *pickerListener)

void 

Registers a listener for a selected event.

OHOS::UIPicker::SetDirect (UITextLanguageDirect direct)

void 

Sets the text direction.

OHOS::UIPicker::SetTextFormatter (TextFormatter *formatter)

void 

Sets the text formatter.

OHOS::UIRadioButton::UIRadioButton ()

 

A constructor used to create a UIRadioButton instance.

OHOS::UIRadioButton::UIRadioButton (const char *name)

 

Default constructor.

OHOS::UIRadioButton::~UIRadioButton ()

virtual 

A destructor used to delete the UIRadioButton instance.

OHOS::UIRadioButton::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UIRadioButton::OnPreDraw (const Rect &invalidatedArea) override

bool 

Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly.

OHOS::UIRadioButton::OnClickEvent (const ClickEvent &event) override

void 

Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken.

OHOS::UIRadioButton::SetName (const char *name)

void 

Sets the name for this radio button.

OHOS::UIRadioButton::GetName () const

const char * 

Obtains the name of this radio button.

OHOS::UIRepeatButton::UIRepeatButton ()

 

A constructor used to create a UIRepeatButton instance.

OHOS::UIRepeatButton::~UIRepeatButton ()

virtual 

A destructor used to delete the UIRepeatButton instance.

OHOS::UIRepeatButton::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UIRepeatButton::SetInterval (uint16_t interval)

virtual void 

Sets the interval between two consecutive click events.

OHOS::UIRepeatButton::GetInterval () const

virtual uint16_t 

Obtains the interval between two consecutive click events.

OHOS::UIRepeatButton::OnClickEvent (const ClickEvent &event) override

virtual void 

The action of click event.

OHOS::UIRepeatButton::OnReleaseEvent (const ReleaseEvent &event) override

virtual void 

The action of release event.

OHOS::UIRepeatButton::OnLongPressEvent (const LongPressEvent &event) override

virtual bool 

The action of long press event.

OHOS::UIRepeatButton::HandleTickEvent ()

void 

handle the event of long pressing.

OHOS::UIScrollView::OnScrollListener::OnScrollListener ()

 

A constructor used to create an OnScrollListener instance with the default scroll state SCROLL_STATE_STOP.

OHOS::UIScrollView::OnScrollListener::~OnScrollListener ()

virtual 

A destructor used to delete the OnScrollListener instance.

OHOS::UIScrollView::OnScrollListener::OnScrollStart ()

virtual void 

Called when a scroll starts.

OHOS::UIScrollView::OnScrollListener::OnScrollEnd ()

virtual void 

Called when a scroll ends.

OHOS::UIScrollView::OnScrollListener::GetScrollState () const

uint8_t 

Obtains the scroll state of this view.

OHOS::UIScrollView::UIScrollView ()

 

A constructor used to create a UIScrollView instance, with both horizontal and vertical scrolls supported.

OHOS::UIScrollView::~UIScrollView ()

virtual 

A destructor used to delete the UIScrollView instance.

OHOS::UIScrollView::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIScrollView::OnPostDraw (const Rect &invalidatedArea) override

void 

Called after a view is drawn.

OHOS::UIScrollView::OnDragEvent (const DragEvent &event) override

bool 

Called when the view is being dragged.

OHOS::UIScrollView::OnDragEndEvent (const DragEvent &event) override

bool 

Called when the view stops dragging.

OHOS::UIScrollView::OnPressEvent (const PressEvent &event) override

void 

Called when the view is pressed.

OHOS::UIScrollView::ScrollBy (int16_t xDistance, int16_t yDistance)

void 

Scrolls the content of this view.

OHOS::UIScrollView::SetScrollbarWidth (uint8_t width)

void 

Sets the width for this scroll bar.

OHOS::UIScrollView::SetHorizontalScrollState (bool state)

void 

Sets whether a horizontal scroll is enabled.

OHOS::UIScrollView::GetHorizontalScrollState () const

bool 

Checks whether a horizontal scroll is enabled.

OHOS::UIScrollView::SetVerticalScrollState (bool state)

void 

Sets whether a vertical scroll is enabled.

OHOS::UIScrollView::GetVerticalScrollState () const

bool 

Checks whether a vertical scroll is enabled.

OHOS::UIScrollView::SetXScrollBarVisible (bool state)

void 

Sets whether the horizontal scroll bar is visible.

OHOS::UIScrollView::SetYScrollBarVisible (bool state)

void 

Sets whether the vertical scroll bar is visible.

OHOS::UIScrollView::RegisterScrollListener (OnScrollListener *scrollListener)

void 

Registers a listener that contains a callback to be invoked upon scroll state changes.

OHOS::UISlider::UISlider ()

 

A constructor used to create a UISlider instance.

OHOS::UISlider::~UISlider ()

virtual 

A destructor used to delete the UISlider instance.

OHOS::UISlider::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UISlider::SetKnobWidth (int16_t width)

void 

Sets the width for this knob.

OHOS::UISlider::GetKnobWidth ()

int16_t 

Obtains the knob width.

OHOS::UISlider::SetImage (const ImageInfo *backgroundImage, const ImageInfo *foregroundImage, const ImageInfo *knobImage)

void 

Sets the images as pixel maps for this slider, including the background, foreground, and knob images.

OHOS::UISlider::SetImage (const char *backgroundImage, const char *foregroundImage, const char *knobImage)

void 

Sets the images for this slider, including the background, foreground, and knob images.

OHOS::UISlider::SetSliderColor (const ColorType backgroundColor, const ColorType foregroundColor, const ColorType knobColor)

void 

Sets the colors for this slider, including the background, foreground, and knob colors.

OHOS::UISlider::SetSliderRadius (int16_t backgroundRadius, int16_t foregroundRadius, int16_t knobRadius)

void 

Sets the corner radiuses for this slider, including the background, foreground, and knob corner radiuses.

OHOS::UISlider::SetKnobStyle (const Style &style)

void 

Sets the knob style.

OHOS::UISlider::SetKnobStyle (uint8_t key, int64_t value)

void 

Sets a knob style.

OHOS::UISlider::GetKnobStyle () const

const Style

Obtains the knob style.

OHOS::UISlider::GetKnobStyle (uint8_t key) const

int64_t 

Obtains the value of a knob style.

OHOS::UISlider::OnClickEvent (const ClickEvent &event) override

void 

Called when the view is clicked.

OHOS::UISlider::OnDragEvent (const DragEvent &event) override

bool 

Called when the view is being dragged.

OHOS::UISlider::OnDragEndEvent (const DragEvent &event) override

bool 

Called when the view stops dragging.

OHOS::UISlider::OnPreDraw (const Rect &invalidatedArea) override

bool 

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

OHOS::UISlider::OnDraw (const Rect &invalidatedArea) override

void 

Called when a view is drawn.

OHOS::UISlider::UISliderEventListener::~UISliderEventListener ()

virtual 

A destructor used to delete the UISliderEventListener instance.

OHOS::UISlider::UISliderEventListener::OnChange (int16_t value)

virtual void 

Called when the slider is dragged or clicked. This is a virtual function, which needs your implementation.

OHOS::UISlider::UISliderEventListener::OnRelease (int16_t value)

virtual void 

Called when the slider is released. This is a virtual function, which needs your implementation.

OHOS::UISlider::SetSliderEventListener (UISliderEventListener *listener)

void 

Sets the listener for a slider change.

OHOS::UISurfaceView::UISurfaceView ()

 

A constructor used to create a UISurfaceView instance.

OHOS::UISurfaceView::~UISurfaceView ()

 

A destructor used to delete the UISurfaceView instance.

OHOS::UISurfaceView::GetSurface () const

Surface

Obtains the surface, which should be used together with the camera and video modules.

OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y) override

void 

Sets the position for this view.

OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) override

void 

Sets the position and size for this view.

OHOS::UISurfaceView::Resize (int16_t width, int16_t height) override

void 

Adjusts the size of this view.

OHOS::UISurfaceView::SetX (int16_t x) override

void 

Sets the x-coordinate for this view.

OHOS::UISurfaceView::SetY (int16_t y) override

void 

Sets the y-coordinate for this view.

OHOS::UISurfaceView::SetWidth (int16_t width) override

void 

Sets the width for this view.

OHOS::UISurfaceView::SetHeight (int16_t height) override

void 

Sets the height for this view.

OHOS::UISurfaceView::SetVisible (bool visible) override

void 

Sets whether this view is visible.

OHOS::UISurfaceView::OnPreDraw (const Rect &invalidatedArea) override

bool 

Called before this view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so that the drawing process is optimized.

OHOS::UISurfaceView::OnDraw (const Rect &invalidatedArea) override

void 

Called when this view is drawn.

OHOS::UISwipeView::UISwipeView (uint8_t direction=HORIZONTAL)

 

A constructor used to create a UISwipeView instance.

OHOS::UISwipeView::~UISwipeView ()

virtual 

A destructor used to delete the UISwipeView instance.

OHOS::UISwipeView::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UISwipeView::SetDirection (uint8_t direction)

void 

Sets the dragging direction.

OHOS::UISwipeView::GetDirection () const

uint8_t 

Obtains the dragging direction.

OHOS::UISwipeView::Add (UIView *view) override

void 

Adds a view.

OHOS::UISwipeView::Insert (UIView *prevView, UIView *insertView) override

void 

Inserts a view.

OHOS::UISwipeView::Remove (UIView *view) override

virtual void 

Deletes a view.

OHOS::UISwipeView::SetCurrentPage (uint16_t index, bool needAnimator=false)

void 

Sets the index for the current tab.

OHOS::UISwipeView::GetCurrentPage () const

uint16_t 

Obtains the current tab index.

OHOS::UISwipeView::GetCurrentView () const

UIView

Obtains the current view.

OHOS::UISwipeView::SetBlankSize (uint16_t size)

void 

Sets a blank size, as defined in DEFAULT_BLANK_SIZE.

OHOS::UISwipeView::OnDragEvent (const DragEvent &event) override

bool 

revice drag event, Switch to specified view when drag

OHOS::UISwipeView::OnDragEndEvent (const DragEvent &event) override

bool 

Called when the view stops dragging.

OHOS::UISwipeView::SetAnimatorTime (uint16_t time)

void 

Sets the time for the page being animated. The page will go beyond the blank during this time.

OHOS::UISwipeView::SetLoopState (bool loop)

void 

Sets whether the swipe view supports a cycle swipe.

OHOS::UISwipeView::GetViewByIndex (uint16_t index) const

UIView

Obtains a view based on its index.

OHOS::UISwipeView::GetOnSwipeListener ()

OnSwipeListener *& 

Obtains the listener set for swipe events.

OHOS::UISwipeView::SetOnSwipeListener (OnSwipeListener *onSwipeListener)

void 

Sets the listener that contains a callback to be invoked upon a swipe event.

OHOS::UISwipeView::MoveChildByOffset (int16_t xOffset, int16_t yOffset) override

void 

Moves the position of all child views.

OHOS::UITextureMapper::UITextureMapper ()

 

A constructor used to create a UITextureMapper instance.

OHOS::UITextureMapper::~UITextureMapper ()

virtual 

A destructor used to delete the UITextureMapper instance.

OHOS::UITextureMapper::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UITextureMapper::Start ()

void 

Starts this animator.

OHOS::UITextureMapper::SetRotateStart (int16_t start)

void 

Sets the start angle of rotation for this image.

OHOS::UITextureMapper::SetRotateEnd (int16_t end)

void 

Sets the end angle of rotation for this image.

OHOS::UITextureMapper::SetScaleStart (float start)

void 

Sets the start ratio for scaling this image.

OHOS::UITextureMapper::SetScaleEnd (float end)

void 

Sets the end ratio for scaling this image.

OHOS::UITextureMapper::SetDurationTime (uint16_t durationTime)

void 

Sets the duration for this animator, in milliseconds.

OHOS::UITextureMapper::SetDelayTime (uint16_t delayTime)

void 

Sets the delay time for this animator, in milliseconds.

OHOS::UITextureMapper::SetEasingFunc (EasingFunc easingFunc)

void 

Sets the easing function for this animator.

OHOS::UITextureMapper::Cancel ()

void 

Cancels this animator.

OHOS::UITextureMapper::Reset ()

void 

Displays the original image.

OHOS::UITextureMapper::SetPivot (int16_t x, int16_t y)

void 

Sets the coordinates of the rotation and scaling pivots for this image.

OHOS::UITextureMapper::AnimatorStopListener::~AnimatorStopListener ()

virtual 

A destructor used to delete an AnimatorStopListener instance.

OHOS::UITextureMapper::AnimatorStopListener::OnAnimatorStop (UIView &view)=0

virtual void 

Called when this animator stops. This is a pure virtual function, which needs your inheritance and implementation.

OHOS::UITextureMapper::SetAnimatorStopListener (AnimatorStopListener *listener)

void 

Sets the listener for the stop of this animator.

OHOS::UITimePicker::UITimePicker ()

 

A constructor used to create a UITimePicker instance.

OHOS::UITimePicker::~UITimePicker ()

virtual 

A destructor used to delete the UITimePicker instance.

OHOS::UITimePicker::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UITimePicker::SetSelected (const char *value)

bool 

Sets the time currently selected in the time picker.

OHOS::UITimePicker::GetSelectValue ()

const char * 

Obtains the time currently selected in the time picker.

OHOS::UITimePicker::GetSelectHour () const

const char * 

Obtains the hour currently selected in the time picker.

OHOS::UITimePicker::GetSelectMinute () const

const char * 

Obtains the minute currently selected in the time picker.

OHOS::UITimePicker::GetSelectSecond () const

const char * 

Obtains the second currently selected in the time picker.

OHOS::UITimePicker::SetItemHeight (int16_t height)

void 

Sets the height of each item in the time picker.

OHOS::UITimePicker::EnableSecond (bool state)

void 

Sets whether to enable seconds in the time picker.

OHOS::UITimePicker::SetTextStyle (uint8_t backgroundFontId, uint8_t highlightFontId, ColorType backgroundColor, ColorType highlightColor)

void 

Sets the text format in the time picker, including the font ID and color.

OHOS::UITimePicker::SetWidth (int16_t width) override

void 

Sets the width for the time picker.

OHOS::UITimePicker::SetHeight (int16_t height) override

void 

Sets the height for the time picker.

OHOS::UITimePicker::SelectedListener::SelectedListener ()

 

A constructor used to create a SelectedListener instance.

OHOS::UITimePicker::SelectedListener::~SelectedListener ()

 

A destructor used to delete the SelectedListener instance.

OHOS::UITimePicker::SelectedListener::OnTimePickerStoped (UITimePicker &picker)

virtual void 

Called when an item is selected after sliding stops. This function is implemented by applications.

OHOS::UITimePicker::RegisterSelectedListener (SelectedListener *timePickerListener)

void 

Registers a listener for a selected event.

OHOS::UIToggleButton::UIToggleButton ()

 

A constructor used to create a UIToggleButton instance.

OHOS::UIToggleButton::~UIToggleButton ()

virtual 

A destructor used to delete the UIToggleButton instance.

OHOS::UIToggleButton::GetViewType () const override

UIViewType 

Obtains the component type.

OHOS::UIToggleButton::SetState (bool state)

void 

Sets the state for this toggle button.

OHOS::UIToggleButton::GetState () const

bool 

Obtains the state of this toggle button.

OHOS::UIView::OnClickListener::OnClick (UIView &view, const ClickEvent &event)

virtual bool 

Called when a view is clicked.

OHOS::UIView::OnClickListener::~OnClickListener ()

virtual 

A destructor used to delete the OnClickListener instance.

OHOS::UIView::OnLongPressListener::OnLongPress (UIView &view, const LongPressEvent &event)

virtual bool 

Called when a view is long pressed.

OHOS::UIView::OnLongPressListener::~OnLongPressListener ()

virtual 

A destructor used to delete the OnLongPressListener instance.

OHOS::UIView::OnDragListener::OnDragStart (UIView &view, const DragEvent &event)

virtual bool 

Called when a view starts to drag.

OHOS::UIView::OnDragListener::OnDrag (UIView &view, const DragEvent &event)

virtual bool 

Called when a view is being dragged.

OHOS::UIView::OnDragListener::OnDragEnd (UIView &view, const DragEvent &event)

virtual bool 

Called when a view stops dragging.

OHOS::UIView::OnDragListener::~OnDragListener ()

virtual 

A destructor used to delete the OnDragListener instance.

OHOS::UIView::OnTouchListener::OnPress (UIView &view, const PressEvent &event)

virtual bool 

Called when a view is pressed.

OHOS::UIView::OnTouchListener::OnRelease (UIView &view, const ReleaseEvent &event)

virtual bool 

Called when a view is released.

OHOS::UIView::OnTouchListener::OnCancel (UIView &view, const CancelEvent &event)

virtual bool 

Called when a click event on a view is canceled.

OHOS::UIView::OnTouchListener::~OnTouchListener ()

virtual 

A destructor used to delete the OnTouchListener instance.

OHOS::UIView::UIView ()

 

A default constructor used to create an UIView instance.

OHOS::UIView::UIView (const char *id)

 

A constructor used to create an UIView instance.

OHOS::UIView::~UIView ()

virtual 

A destructor used to delete the UIView instance.

OHOS::UIView::OnPreDraw (const Rect &invalidatedArea)

virtual bool 

Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process.

OHOS::UIView::OnDraw (const Rect &invalidatedArea)

virtual void 

Called when a view is drawn.

OHOS::UIView::OnPostDraw (const Rect &invalidatedArea)

virtual void 

Called after a view is drawn.

OHOS::UIView::ReMeasure ()

virtual void 

Remeasures the view size.

OHOS::UIView::Invalidate ()

void 

Refreshes the invalidated area of the view.

OHOS::UIView::InvalidateRect (const Rect &invalidatedArea)

void 

Refreshes a view in a specified invalidated area.

OHOS::UIView::OnLongPressEvent (const LongPressEvent &event)

virtual bool 

Called when the view is long pressed.

OHOS::UIView::OnDragStartEvent (const DragEvent &event)

virtual bool 

Called when the view starts to drag.

OHOS::UIView::OnDragEvent (const DragEvent &event)

virtual bool 

Called when the view is being dragged.

OHOS::UIView::OnDragEndEvent (const DragEvent &event)

virtual bool 

Called when the view stops dragging.

OHOS::UIView::OnClickEvent (const ClickEvent &event)

virtual void 

Called when the view is clicked.

OHOS::UIView::OnPressEvent (const PressEvent &event)

virtual void 

Called when the view is pressed.

OHOS::UIView::OnReleaseEvent (const ReleaseEvent &event)

virtual void 

Called when the view is released.

OHOS::UIView::OnCancelEvent (const CancelEvent &event)

virtual void 

Called when a click event on the view is canceled.

OHOS::UIView::SetOnDragListener (OnDragListener *onDragListener)

void 

Sets a drag event listener for the view.

OHOS::UIView::GetOnDragListener ()

OnDragListener *& 

Obtains the drag event listener for the view.

OHOS::UIView::SetOnClickListener (OnClickListener *onClickListener)

void 

Sets a click event listener for the view.

OHOS::UIView::GetOnClickListener ()

OnClickListener *& 

Obtains the click event listener for the view.

OHOS::UIView::SetOnLongPressListener (OnLongPressListener *onLongPressListener)

void 

Sets a long-press event listener for the view.

OHOS::UIView::GetOnLongPressListener ()

OnLongPressListener *& 

Obtains the long-press event listener for the view.

OHOS::UIView::SetOnTouchListener (OnTouchListener *onTouchListener)

void 

Sets a touch event listener for the view.

OHOS::UIView::GetTouchListener ()

OnTouchListener *& 

Obtains the touch event listener for the view.

OHOS::UIView::GetTargetView (const Point &point, UIView **last)

virtual void 

Obtains the top-level view based on specified coordinates.

OHOS::UIView::SetParent (UIView *parent)

void 

Sets the parent view for the view.

OHOS::UIView::GetParent () const

UIView

Obtains the parent view of the view.

OHOS::UIView::SetNextSibling (UIView *sibling)

void 

Sets the next sibling view for the view.

OHOS::UIView::GetNextSibling () const

UIView

Obtains the next sibling view of the view.

OHOS::UIView::SetVisible (bool visible)

virtual void 

Sets whether the view is visible.

OHOS::UIView::IsVisible () const

bool 

Checks whether the view is visible.

OHOS::UIView::SetTouchable (bool touch)

void 

Sets whether the view is touchable.

OHOS::UIView::IsTouchable () const

bool 

Checks whether the view is touchable.

OHOS::UIView::SetDraggable (bool draggable)

void 

Sets whether the view is draggable.

OHOS::UIView::IsDraggable () const

bool 

Checks whether the view is draggable.

OHOS::UIView::SetDragParentInstead (bool dragParentInstead)

void 

Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.

OHOS::UIView::IsDragParentInstead () const

bool 

Obtains whether the view transfers a drag event to the parent view for processing.

OHOS::UIView::GetRect () const

Rect 

Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix.

OHOS::UIView::GetVisibleRect () const

Rect 

Obtains the visible absolute rectangle area of the view.

OHOS::UIView::GetMaskedRect () const

Rect 

Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout.

OHOS::UIView::GetOrigRect () const

Rect 

Obtains the absolute rectangle area of the view.

OHOS::UIView::GetContentRect ()

virtual Rect 

Obtains the content of the absolute rectangle area of the view. This area excludes padding.

OHOS::UIView::GetRelativeRect () const

Rect 

Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view.

OHOS::UIView::ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height)

void 

Adjusts the size of the visible area. This operation may affect the final display size.

OHOS::UIView::SetWidth (int16_t width)

virtual void 

Sets the width for the view.

OHOS::UIView::GetWidth ()

virtual int16_t 

Obtains the width for the view.

OHOS::UIView::SetHeight (int16_t height)

virtual void 

Sets the height for the view.

OHOS::UIView::GetHeight ()

virtual int16_t 

Obtains the height for the view.

OHOS::UIView::Resize (int16_t width, int16_t height)

virtual void 

Adjusts the size of the view.

OHOS::UIView::SetX (int16_t x)

virtual void 

Sets the x-coordinate for the view.

OHOS::UIView::GetX () const

int16_t 

Obtains the x-coordinate for the view.

OHOS::UIView::SetY (int16_t y)

virtual void 

Sets the y-coordinate for the view.

OHOS::UIView::GetY () const

int16_t 

Obtains the y-coordinate for the view.

OHOS::UIView::SetPosition (int16_t x, int16_t y)

virtual void 

Sets the position for the view.

OHOS::UIView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height)

virtual void 

Adjusts the position and size of the view.

OHOS::UIView::IsViewGroup () const

bool 

Checks whether the view is a container view.

OHOS::UIView::SetIntercept (bool isIntercept)

void 

Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing.

OHOS::UIView::SetTransformMap (const TransformMap &transMap)

void 

Sets the affine transformation matrix.

OHOS::UIView::GetTransformMap ()

TransformMap

Obtains an affine transformation matrix.

OHOS::UIView::GetChildById (const char *id) const

virtual UIView

Obtains the child view of a specified ID.

OHOS::UIView::SetViewId (const char *id)

void 

Sets the view ID.

OHOS::UIView::GetViewId () const

const char * 

Obtains the view ID.

OHOS::UIView::SetViewIndex (int16_t index)

void 

Sets the view index.

OHOS::UIView::GetViewIndex () const

int16_t 

Obtains the view index.

OHOS::UIView::GetViewType () const

virtual UIViewType 

Obtains the view type.

OHOS::UIView::LayoutChildren (bool neeInvalidate=false)

virtual void 

Lays out all child views according to the preset arrangement mode.

OHOS::UIView::LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

void 

Lays out the view in the center of the parent view.

OHOS::UIView::LayoutLeftOfParent (int16_t offset=0)

void 

Lays out the view on the left of the parent view.

OHOS::UIView::LayoutRightOfParent (int16_t offset=0)

void 

Lays out the view on the right of the parent view.

OHOS::UIView::LayoutTopOfParent (int16_t offset=0)

void 

Lays out the view on the top of the parent view.

OHOS::UIView::LayoutBottomOfParent (int16_t offset=0)

void 

Lays out the view on the bottom of the parent view.

OHOS::UIView::AlignLeftToSibling (const char *id, int16_t offset=0)

void 

Aligns the view with the left of a sibling view.

OHOS::UIView::AlignRightToSibling (const char *id, int16_t offset=0)

void 

Aligns the view with the right of a sibling view.

OHOS::UIView::AlignTopToSibling (const char *id, int16_t offset=0)

void 

Aligns the view with the top of a sibling view.

OHOS::UIView::AlignBottomToSibling (const char *id, int16_t offset=0)

void 

Aligns the view with the bottom of a sibling view.

OHOS::UIView::AlignHorCenterToSibling (const char *id, int16_t offset=0)

void 

Aligns the view with the center of a sibling view in the x-axis.

OHOS::UIView::AlignVerCenterToSibling (const char *id, int16_t offset=0)

void 

Aligns the view with the center of a sibling view in the y-axis.

OHOS::UIView::LayoutLeftToSibling (const char *id, int16_t offset=0)

void 

Lays out the view on the left of a sibling view.

OHOS::UIView::LayoutRightToSibling (const char *id, int16_t offset=0)

void 

Lays out the view on the right of a sibling view.

OHOS::UIView::LayoutTopToSibling (const char *id, int16_t offset=0)

void 

Lays out the view on the above of a sibling view.

OHOS::UIView::LayoutBottomToSibling (const char *id, int16_t offset=0)

void 

Lays out the view on the below of a sibling view.

OHOS::UIView::SetStyle (Style &style)

virtual void 

Sets the view style.

OHOS::UIView::SetStyle (uint8_t key, int64_t value)

virtual void 

Sets a style.

OHOS::UIView::GetStyle (uint8_t key) const

virtual int64_t 

Obtains the value of a style.

OHOS::UIView::GetStyleConst () const

const Style

Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory.

OHOS::UIViewGroup::UIViewGroup ()

 

A default constructor used to create a UIViewGroup instance.

OHOS::UIViewGroup::~UIViewGroup ()

virtual 

A destructor used to delete the UIViewGroup instance.

OHOS::UIViewGroup::GetViewType () const override

UIViewType 

Obtains the view type.

OHOS::UIViewGroup::Add (UIView *view)

virtual void 

Adds a child view.

OHOS::UIViewGroup::Insert (UIView *prevView, UIView *insertView)

virtual void 

Inserts a new child view behind the current one.

OHOS::UIViewGroup::Remove (UIView *view)

virtual void 

Removes a child view.

OHOS::UIViewGroup::RemoveAll ()

virtual void 

Removes all child views.

OHOS::UIViewGroup::GetTargetView (const Point &point, UIView **last) override

virtual void 

Obtains the target child view that is visible and can respond to touch events based on given coordinates.

OHOS::UIViewGroup::MoveChildByOffset (int16_t x, int16_t y)

virtual void 

Moves all child views.

OHOS::UIViewGroup::GetChildrenHead () const

UIView

Obtains the first child view in this view group.

OHOS::UIViewGroup::GetChildrenTail () const

UIView

Obtains the last child view in this view group.

OHOS::UIViewGroup::SetDisallowIntercept (bool flag)

void 

Sets whether this view group is intercepted upon touch events.

OHOS::UIViewGroup::GetChildById (const char *id) const override

UIView

Obtains the target child view with a specified ID.

OHOS::UIViewGroup::SetAutoSize (bool state)

void 

Sets whether the size of this view group is adaptive to that of all child views.

OHOS::UIViewGroup::GetAllChildRelativeRect () const

Rect 

Obtains the rectangle area of a new view group after being adaptive to the size of all child views.

OHOS::UIViewGroup::OnChildChanged ()

virtual void 

Performs operations needed after a child view is added or removed.

OHOS::UIDumpDomTree::GetInstance ()

static UIDumpDomTree

Obtains an instance in singleton pattern.

OHOS::UIDumpDomTree::DumpDomTree (const char *id, const char *path)

bool 

Exports information about a DOM tree starting from a specified DOM node and saves the information to a specified path.

OHOS::UIDumpDomTree::DumpDomTree (const char *id)

bool 

Exports information about a DOM tree starting from a specified DOM node and saves the information to the default path. The default path is DEFAULT_DUMP_DOM_TREE_PATH.

OHOS::UIDumpDomTree::DumpDomNode (const char *id)

char * 

Exports information about a specified DOM node.

OHOS::CancelEvent::CancelEvent (const Point &pos)

 

A constructor used to create a CancelEvent instance.

OHOS::CancelEvent::~CancelEvent ()

virtual 

A destructor used to delete the CancelEvent instance.

OHOS::ClickEvent::ClickEvent (const Point &pos)

 

A constructor used to create a ClickEvent instance.

OHOS::ClickEvent::~ClickEvent ()

virtual 

A destructor used to delete the ClickEvent instance.

OHOS::DragEvent::DragEvent (const Point &newPos, const Point &lastPos, const Point &totalLen)

 

A constructor used to create a DragEvent instance.

OHOS::DragEvent::~DragEvent ()

virtual 

A destructor used to delete the DragEvent instance.

OHOS::DragEvent::GetLastPoint () const

const Point

Obtains the coordinates of the last position in the drag event.

OHOS::DragEvent::GetStartPoint () const

const Point

Obtains the start coordinates in the drag event.

OHOS::DragEvent::SetPreLastPoint (const Point &preLastPos)

void 

Sets the coordinates of the stay position before the last position in the drag event.

OHOS::DragEvent::GetPreLastPoint () const

const Point

Obtains the coordinates of the stay position before the last position in the drag event.

OHOS::DragEvent::GetDragDirection () const

uint8_t 

Obtains the direction in the drag event.

OHOS::DragEvent::GetDeltaX () const

int16_t 

Obtains the difference between the current position and the last position of the view in the x-axis.

OHOS::DragEvent::GetDeltaY () const

int16_t 

Obtains the difference between the current position and the last position of the view in the y-axis.

OHOS::Event::Event ()

 

A default constructor used to create an Event instance.

OHOS::Event::Event (const Point &curPos)

 

A constructor used to create an Event instance.

OHOS::Event::~Event ()

virtual 

A destructor used to delete the Event instance.

OHOS::Event::GetCurrentPos () const

const Point

Obtains the position where an event occurs.

OHOS::Event::GetTimeStamp () const

const TimeType & 

Obtains the timestamp when an event occurs.

OHOS::Event::SetTimeStamp (const TimeType &timeStamp)

void 

Sets the timestamp when an event occurs.

OHOS::KeyEvent::KeyEvent (uint16_t keyId, uint16_t state)

 

A constructor used to create a KeyEvent instance.

OHOS::KeyEvent::~KeyEvent ()

 

A destructor used to delete the KeyEvent instance.

OHOS::KeyEvent::GetKeyId () const

uint16_t 

Obtains the key ID.

OHOS::KeyEvent::GetState () const

uint16_t 

Obtains the key state.

OHOS::LongPressEvent::LongPressEvent (const Point &pos, const TimeType &timeStamp)

 

A constructor used to create a LongPressEvent instance.

OHOS::LongPressEvent::~LongPressEvent ()

virtual 

A destructor used to delete the LongPressEvent instance.

OHOS::PressEvent::PressEvent (const Point &pos)

 

A constructor used to create a PressEvent instance.

OHOS::PressEvent::~PressEvent ()

virtual 

A destructor used to delete the PressEvent instance.

OHOS::ReleaseEvent::ReleaseEvent (const Point &pos)

 

A constructor used to create a ReleaseEvent instance.

OHOS::ReleaseEvent::~ReleaseEvent ()

virtual 

A destructor used to delete the ReleaseEvent instance.

OHOS::VirtualDeviceEvent::VirtualDeviceEvent (uint16_t type, uint16_t value)

 

A constructor used to create a VirtualDeviceEvent instance.

OHOS::VirtualDeviceEvent::~VirtualDeviceEvent ()

 

A destructor used to delete the VirtualDeviceEvent instance.

OHOS::VirtualDeviceEvent::GetType () const

uint16_t 

Obtains the type of the virtual device.

OHOS::VirtualDeviceEvent::GetState () const

uint16_t 

Obtains the state of the virtual event.

OHOS::Line::Line ()

 

The default constructor used to create a Line instance.

OHOS::Line::Line (const Vector2< int16_t > &a, const Vector2< int16_t > &b)

 

A constructor used to create a Line instance.

OHOS::Line::Line (int16_t x1, int16_t y1, int16_t x2, int16_t y2)

 

A constructor used to create a Line instance.

OHOS::Line::~Line ()

 

A destructor used to delete the Line instance.

OHOS::Line::operator[] (uint8_t index)

Vector2< int16_t > & 

Obtains the start or end point of the line based on the value of index.

OHOS::Line::operator[] (uint8_t index) const

const Vector2< int16_t > 

Obtains the start or end point of the line based on the value of index.

OHOS::Polygon::Polygon ()

 

The default constructor used to create a Polygon instance.

OHOS::Polygon::Polygon (const Rect &rect)

 

A constructor used to construct a Polygon instance based on a rectangle.

OHOS::Polygon::Polygon (const Vector2< int16_t > *vertexes, const uint8_t vertexNum)

 

A constructor used to create a Polygon instance based on the vertex coordinates and the number of coordinates.

OHOS::Polygon::~Polygon ()

 

A destructor used to delete the Polygon instance.

OHOS::Polygon::MakeAABB () const

Rect 

Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle.

OHOS::Polygon::GetVertexNum () const

uint8_t 

Obtains the number of vertices of the polygon.

OHOS::Polygon::SetVertexNum (uint8_t vertexNum)

void 

Sets the number of vertices of a polygon.

OHOS::Intersect (const Line &a, const Line &b, Vector2< int16_t > &out)

bool 

Checks whether line segment a and line segment b intersect, and returns the intersection point (if available).

OHOS::IsIntersect (const Line &a, const Line &b)

bool 

Chekcs whether line segment a and line segment b intersect.

OHOS::Clip (Polygon &poly, const Line &line)

void 

Clips a polygon by using a line segment.

OHOS::SuthHodgClip (const Rect &clipRect, const Polygon &polygon)

Polygon 

Implements Sutherland-Hodgman, an algorithm used for clipping polygons.

OHOS::Clip (const Line &line, const Polygon &poly, Vector2< int16_t > *pOut, uint8_t *pNum)

void 

Clips a polygon by using a line segment and obtains the intersections.

OHOS::Vector2< T >::Vector2 ()

 

A constructor used to create a Vector2 instance.

OHOS::Vector2< T >::Vector2 (T x, T y)

 

A constructor used to create a Vector2 instance based on the X and Y coordinates.

OHOS::Vector2< T >::~Vector2 ()

 

A destructor used to delete the Vector2 instance.

OHOS::Vector2< T >::Dot (const Vector2< T > &other) const

Calculates the scalar product of the two-dimensional vector and another two-dimensional vector.

OHOS::Vector2< T >::Cross (const Vector2< T > &other) const

Calculates the cross product of the two-dimensional vector and another two-dimensional vector.

OHOS::Vector3< T >::Vector3 ()

 

A constructor used to create a Vector3 instance.

OHOS::Vector3< T >::Vector3 (T x, T y, T z)

 

Defines a Vector3 instance and initializes the values of x, y, and z.

OHOS::Vector3< T >::~Vector3 ()

 

A destructor used to delete the Vector3 instance.

OHOS::Matrix3< T >::Matrix3 ()

 

Defines a Matrix3 instance and initializes the 3 x 3 matrix data.

OHOS::Matrix3< T >::Matrix3 (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22)

 

Defines a Matrix3 instance and initializes the 3 x 3 matrix data.

OHOS::Matrix3< T >::~Matrix3 ()

 

A destructor used to delete the Matrix3 instance.

OHOS::Matrix3< T >::GetData () const

const T * 

Obtains the 3 x 3 matrix data.

OHOS::Matrix3< T >::Determinant () const

Obtains the determinant of the matrix.

OHOS::Matrix3< T >::Inverse () const

Matrix3 

Obtains the inverse matrix.

OHOS::Matrix3< T >::Rotate (T angle, const Vector2< T > &pivot)

static Matrix3 

Obtains a rotation matrix. After a matrix is rotated, its data is shifted leftwards by 15 bits. Therefore, the result data needs to be shifted rightwards by 15 bits.

OHOS::Matrix3< T >::Scale (const Vector2< T > &scale, const Vector2< T > &fixed)

static Matrix3 

Obtains the scaling matrix. After a matrix is scaled, its data is shifted leftwards by 8 bits. Therefore, the result data needs to be shifted rightwards by 8 bits.

OHOS::Matrix3< T >::Translate (const Vector2< T > &trans)

static Matrix3< T > 

Obtains a matrix translation.

OHOS::HeapBase::operator new (size_t size)

void * 

Overrides the new function.

OHOS::HeapBase::operator delete (void *p)

void 

Overrides the delete function.

OHOS::FlexLayout::FlexLayout ()

 

A default constructor used to create a FlexLayout instance.

OHOS::FlexLayout::~FlexLayout ()

virtual 

A destructor used to delete the FlexLayout instance.

OHOS::FlexLayout::SetMajorAxisAlign (const AlignType &align)

void 

Sets the alignment mode of the primary axis (the axis where the layout direction is located). The child views in the layout are placed in this mode in the direction of the primary axis.

OHOS::FlexLayout::SetSecondaryAxisAlign (const AlignType &align)

void 

Sets the alignment mode of the secondary axis (the axis perpendicular to the set layout direction).

OHOS::FlexLayout::SetFlexWrap (uint8_t wrap)

void 

Sets whether to support word wrap.

OHOS::FlexLayout::LayoutChildren (bool needInvalidate=false) override

virtual void 

Lays out all child views according to the preset arrangement mode.

OHOS::GridLayout::GridLayout ()

 

A default constructor used to create a GridLayout instance.

OHOS::GridLayout::~GridLayout ()

virtual 

A destructor used to delete the GridLayout instance.

OHOS::GridLayout::SetRows (const uint16_t &rows)

void 

Sets the number of rows in a grid.

OHOS::GridLayout::SetCols (const uint16_t &cols)

void 

Sets the number of columns in a grid.

OHOS::GridLayout::LayoutChildren (bool needInvalidate=false) override

virtual void 

Lays out all child views according to the preset arrangement mode.

OHOS::Layout::Layout ()

 

A default constructor used to create a Layout instance.

OHOS::Layout::~Layout ()

virtual 

A destructor used to delete the Layout instance.

OHOS::Layout::SetLayoutDirection (const DirectionType &direction)

void 

Sets the layout direction.

OHOS::List< T >::List ()

 

A default constructor used to create a List instance. The initial size is 0.

OHOS::List< T >::~List ()

virtual 

A destructor used to delete the List instance.

OHOS::List< T >::Front () const

const T 

Obtains the head node data of a linked list.

OHOS::List< T >::Back () const

const T 

Obtains the tail node data of a linked list.

OHOS::List< T >::PushBack (T data)

void 

Inserts data at the end of a linked list.

OHOS::List< T >::PushFront (T data)

void 

Inserts data at the start of a linked list.

OHOS::List< T >::PopBack ()

void 

Pops up a data record at the end of a linked list.

OHOS::List< T >::PopFront ()

void 

Pops up a data record at the start of a linked list.

OHOS::List< T >::Insert (ListNode< T > *node, T data)

void 

Inserts data before a specified node, which follows the inserted data node.

OHOS::List< T >::Remove (ListNode< T > *node)

void 

Deletes a data node.

OHOS::List< T >::Clear ()

void 

Deletes all nodes from a linked list.

OHOS::List< T >::Head () const

ListNode< T > * 

Obtains the head node address of a linked list.

OHOS::List< T >::Tail () const

ListNode< T > * 

Obtains the tail node address of a linked list.

OHOS::List< T >::Begin () const

ListNode< T > * 

Obtains the head node address of a linked list.

OHOS::List< T >::End () const

const ListNode< T > * 

Obtains the end node address of a linked list.

OHOS::List< T >::Next (const ListNode< T > *node) const

ListNode< T > * 

Obtains the address of the node following the specified node.

OHOS::List< T >::IsEmpty () const

bool 

Checks whether a linked list is empty.

OHOS::List< T >::Size () const

uint16_t 

Obtains the size of a linked list.

OHOS::ImageCacheMalloc (ImageInfo &info)

void * 

Applies for the image cache memory. You can customize the memory area when loading image resources.

OHOS::ImageCacheFree (ImageInfo &info)

void 

Releases the image cache memory.

OHOS::UIMalloc (uint32_t size)

void * 

Applies for memory for the graphics module. You can implement this function to override the malloc and new functions.

OHOS::UIFree (void *buffer)

void 

Releases memory for the graphics module. You can implement this function to override the free and delete functions.

OHOS::Rect::Rect ()

 

A constructor used to create a Rect instance.

OHOS::Rect::~Rect ()

 

A destructor used to delete the Rect instance.

OHOS::Rect::Rect (int16_t left, int16_t top, int16_t right, int16_t bottom)

 

A constructor used to create a Rect instance based on the coordinates of the four boundaries.

OHOS::Rect::Rect (const Rect &other)

 

A constructor used to create a Rect instance by copying another rectangle.

OHOS::Rect::Rect (const Rect &&other)

 

A constructor used to create a Rect instance by copying another rectangle.

OHOS::Rect::SetRect (int16_t left, int16_t top, int16_t right, int16_t bottom)

void 

Sets the coordinates of the four boundaries of a rectangle.

OHOS::Rect::GetWidth () const

int16_t 

Obtains the rectangle width.

OHOS::Rect::GetHeight () const

int16_t 

Obtains the rectangle height.

OHOS::Rect::GetX () const

int16_t 

Obtains the left boundary coordinate of the rectangle.

OHOS::Rect::GetY () const

int16_t 

Obtains the top boundary coordinate of the rectangle.

OHOS::Rect::GetLeft () const

int16_t 

Obtains the left boundary coordinate of the rectangle.

OHOS::Rect::GetTop () const

int16_t 

Obtains the top boundary coordinate of the rectangle.

OHOS::Rect::GetRight () const

int16_t 

Obtains the right boundary coordinate of the rectangle.

OHOS::Rect::GetBottom () const

int16_t 

Obtains the bottom boundary coordinate of the rectangle.

OHOS::Rect::SetX (int16_t x)

void 

Changes the left boundary coordinate of the rectangle without changing the rectangle width.

OHOS::Rect::SetY (int16_t y)

void 

Changes the top boundary coordinate of the rectangle without changing the rectangle height.

OHOS::Rect::SetPosition (int16_t x, int16_t y)

void 

Changes the coordinates of the left and top boundaries of the rectangle without changing the rectangle width and height.

OHOS::Rect::SetWidth (int16_t width)

void 

Changes the width of the rectangle without changing the coordinate of the left boundary.

OHOS::Rect::SetHeight (int16_t height)

void 

Changes the height of the rectangle without changing the coordinate of the top boundary.

OHOS::Rect::SetLeft (int16_t left)

void 

Sets the coordinate of the left boundary of a rectangle.

OHOS::Rect::SetTop (int16_t top)

void 

Sets the coordinate of the top boundary of a rectangle.

OHOS::Rect::SetRight (int16_t right)

void 

Sets the coordinate of the right boundary of a rectangle.

OHOS::Rect::SetBottom (int16_t bottom)

void 

Sets the coordinate of the bottom boundary of a rectangle.

OHOS::Rect::Resize (int16_t width, int16_t height)

void 

Sets the width and height of a rectangle.

OHOS::Rect::GetSize () const

uint32_t 

Obtains the area of a rectangle.

OHOS::Rect::Intersect (const Rect &rect1, const Rect &rect2)

bool 

Checks whether two rectangles intersect.

OHOS::Rect::Join (const Rect &rect1, const Rect &rect2)

void 

Obtains the minimum rectangle that contains another two rectangles.

OHOS::Rect::IsContains (const Vector2< int16_t > &point) const

bool 

Checks whether the rectangle contains a coordinate point.

OHOS::Rect::IsContains (const Point &point) const

bool 

Checks whether the rectangle contains a coordinate point.

OHOS::Rect::IsExtends (const Rect &other) const

bool 

Checks whether the rectangle is adjacent to another rectangle horizontally or vertically.

OHOS::Rect::IsIntersect (const Rect &other) const

bool 

Checks whether the rectangle intersects with another rectangle.

OHOS::Rect::IsContains (const Rect &other) const

bool 

Checks whether the rectangle contains another rectangle.

OHOS::Style::Style ()

 

A constructor used to create a Style instance.

OHOS::Style::~Style ()

virtual 

A destructor used to delete the Style instance.

OHOS::Style::SetStyle (uint8_t key, int64_t value)

void 

Sets a style.

OHOS::Style::GetStyle (uint8_t key) const

int64_t 

Obtains the value of a style.

OHOS::StyleDefault::StyleDefault ()

 

A constructor used to create a StyleDefault instance.

OHOS::StyleDefault::~StyleDefault ()

 

A destructor used to delete the StyleDefault instance.

OHOS::StyleDefault::GetDefaultStyle ()

static Style

Obtains the default style.

OHOS::StyleDefault::GetBrightStyle ()

static Style

Obtains the bright style.

OHOS::StyleDefault::GetBrightColorStyle ()

static Style

Obtains the bright color style.

OHOS::StyleDefault::GetButtonPressedStyle ()

static Style

Obtains the button pressed style.

OHOS::StyleDefault::GetButtonReleasedStyle ()

static Style

Obtains the button released style.

OHOS::StyleDefault::GetButtonInactivedStyle ()

static Style

Obtains the button inactived style.

OHOS::StyleDefault::GetLabelStyle ()

static Style

Obtains the label style.

OHOS::StyleDefault::GetBackgroundTransparentStyle ()

static Style

Obtains the background transparent style.

OHOS::StyleDefault::GetProgressBackgroundStyle ()

static Style

Obtains the progress background style.

OHOS::StyleDefault::GetProgressForegroundStyle ()

static Style

Obtains the progress foreground style.

OHOS::StyleDefault::GetSliderKnobStyle ()

static Style

Obtains the slider knob style.

OHOS::StyleDefault::GetPickerBackgroundStyle ()

static Style

Obtains the picker background style.

OHOS::StyleDefault::GetPickerHighlightStyle ()

static Style

Obtains the picker highlight style.

OHOS::SysInfo::OnFPSChangedListener::OnFPSChangedListener ()

 

A constructor used to create an OnFPSChangedListener instance with the default sampling type FPS_CT_FIXED_TIME.

OHOS::SysInfo::OnFPSChangedListener::~OnFPSChangedListener ()

virtual 

A destructor used to delete the OnFPSChangedListener instance.

OHOS::SysInfo::OnFPSChangedListener::OnFPSChanged (float newFPS)=0

virtual void 

Called when the FPS data changes.

OHOS::SysInfo::OnFPSChangedListener::GetFPSCalculateType () const

FPSCalculateType 

Obtains the FPS sampling type.

OHOS::SysInfo::OnFPSChangedListener::SetFPSCalculateType (FPSCalculateType type)

void 

Sets the FPS sampling type.

OHOS::SysInfo::GetFPS ()

static float 

Obtains the FPS data.

OHOS::SysInfo::RegisterFPSChangedListener (OnFPSChangedListener *onFPSChangedListener)

static void 

Registers the listener for notifying the FPS changes.

OHOS::Theme::Theme ()

 

A constructor used to create a Theme instance.

OHOS::Theme::~Theme ()

virtual 

A destructor used to delete the Theme instance.

OHOS::Theme::GetMainStyle ()

Style

Obtains the basic style.

OHOS::Theme::GetButtonStyle ()

ButtonStyle

Obtains the style of this button.

OHOS::Theme::GetLabelStyle ()

Style

Obtains the style of this label.

OHOS::Theme::GetPickerBackgroundStyle ()

Style

Obtains the background style of this picker.

OHOS::Theme::GetPickerHighlightStyle ()

Style

Obtains the highlight style of this picker.

OHOS::Theme::GetProgressBackgroundStyle ()

Style

Obtains the background style of this progress bar.

OHOS::Theme::GetProgressForegroundStyle ()

Style

Obtains the foreground style of this progress bar.

OHOS::Theme::GetSliderKnobStyle ()

Style

Obtains the style of this slider knob.

OHOS::ThemeManager::GetInstance ()

static ThemeManager

Obtains the singleton instance of the ThemeManager class.

OHOS::ThemeManager::SetCurrent (Theme *theme)

void 

Sets the current screen theme for this application.

OHOS::ThemeManager::GetCurrent ()

Theme

Obtains the current screen theme of this application.

OHOS::TransformMap::TransformMap ()

 

The default constructor used to create a TransformMap instance.

OHOS::TransformMap::TransformMap (const Rect &rect)

 

A constructor used to create a TransformMap instance.

OHOS::TransformMap::~TransformMap ()

 

A destructor used to delete the TransformMap instance.

OHOS::TransformMap::GetClockWise () const

bool 

Checks whether the vertex coordinates of a polygon are clockwise.

OHOS::TransformMap::SetPolygon (const Polygon &polygon)

void 

Sets a polygon after rectangle transformation.

OHOS::TransformMap::GetPolygon () const

Polygon 

Obtains the polygon after rectangle transformation.

OHOS::TransformMap::GetPivot () const

Point 

Obtains the pivot for the rotation or scaling operation.

OHOS::TransformMap::IsInvalid () const

bool 

Checks whether the TransformMap instance is invalid. When the vertices are all 0, the TransformMap is invalid.

OHOS::TransformMap::GetBoxRect () const

Rect 

Obtains the minimum rectangle that can contain a polygon. All vertices of the polygon are inside this rectangle.

OHOS::TransformMap::Rotate (int16_t angle, const Vector2< int16_t > &pivot)

void 

Rotates the rectangle.

OHOS::TransformMap::Scale (const Vector2< float > scale, const Vector2< int16_t > &pivot)

void 

Scales the rectangle.

OHOS::Rotate (const Vector2< int16_t > &point, int16_t angle, const Vector2< int16_t > &pivot, Vector2< int16_t > &out)

void 

Rotates a point around the pivot by a certain angle.

OHOS::Rotate (const Line &origLine, int16_t angle, const Vector2< int16_t > &pivot, Line &out)

void 

Rotates a line around the pivot by a certain angle.

OHOS::Rotate (const Rect &origRect, int16_t angle, const Vector2< int16_t > &pivot, Polygon &out)

void 

Rotates a rectangle around the pivot by a certain angle.

OHOS::GetVersion ()

std::string 

Obtains the version number of the graphics module.

OHOS::GetLibDsc ()

std::string 

Obtains the library description of the graphics module.

## **Details** ## **Macro Definition Documentation** ## VERSION\_STANDARD ``` #define VERSION_STANDARD ``` **Description:** Defines three graphics library versions: lightweight, standard, and extended versions. The three versions have different requirements on the memory and hardware. The standard version is enabled by default. The macros of the versions are defined as follows: ## **Typedef Documentation** ## EasingFunc ``` typedef int16_t(* OHOS::EasingFunc) (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime) ``` **Description:** Calculates the value for the current time of an animation. Returns the value for the current time. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
## **Enumeration Type Documentation** ## anonymous enum ``` anonymous enum : uint8_t ``` **Description:** Enumerates the states of this animator.

Enumerator

Description

STOP 

Stop

START 

Start

PAUSE 

Pause

RUNNING 

Running (reserved and not used currently)

## anonymous enum ``` anonymous enum : uint8_t ``` **Description:** Enumerates keys of styles.

Enumerator

Description

STYLE_BACKGROUND_COLOR 

Background color

STYLE_BACKGROUND_OPA 

Background opacity

STYLE_BORDER_RADIUS 

Border radius

STYLE_BORDER_COLOR 

Border color

STYLE_BORDER_OPA 

Border opacity

STYLE_BORDER_WIDTH 

Border width

STYLE_PADDING_LEFT 

Left padding

STYLE_PADDING_RIGHT 

Right padding

STYLE_PADDING_TOP 

Top padding

STYLE_PADDING_BOTTOM 

Bottom padding

STYLE_MARGIN_LEFT 

Left margin

STYLE_MARGIN_RIGHT 

Right margin

STYLE_MARGIN_TOP 

Top margin

STYLE_MARGIN_BOTTOM 

Bottom margin

STYLE_IMAGE_OPA 

Image opacity

STYLE_TEXT_COLOR 

Text color

STYLE_TEXT_FONT 

Text font

STYLE_LETTER_SPACE 

Letter spacing

STYLE_LINE_SPACE 

Line spacing

STYLE_TEXT_OPA 

Text opacity

STYLE_LINE_COLOR 

Line color

STYLE_LINE_WIDTH 

Line width

STYLE_LINE_OPA 

Line opacity

STYLE_LINE_CAP 

Line cap style

## anonymous enum ``` anonymous enum ``` **Description:** Enumerates opacity values.

Enumerator

Description

OPA_TRANSPARENT 

The opacity is 0.

OPA_OPAQUE 

The opacity is 100%.

## ButtonImageSrc ``` enum [OHOS::UIButton::ButtonImageSrc](Graphic.md#gaf9f6c0c373f090e79b9e8d847e186e92) : uint8_t ``` **Description:** Enumerates the images for different button states. You can define a different image for each button state. ## ButtonState ``` enum [OHOS::UIButton::ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) : uint8_t ``` **Description:** Enumerates the states of this button. The button has three states. ## CapType ``` enum [OHOS::CapType](Graphic.md#ga2db3928cdf793f4950245a6841dd43d6) : uint8_t ``` **Description:** Enumerates cap styles.

Enumerator

Description

CAP_NONE 

No cap style

CAP_ROUND 

Round cap style

## ColorMode ``` enum [OHOS::ColorMode](Graphic.md#ga3a3fb04ed2cda4017e6771c66b692141) : uint8_t ``` **Description:** colormode of image and font.

Enumerator

Description

ARGB8888 

ARGB8888 color mode

RGB888 

RGB888 color mode

RGB565 

RGB565 color mode

ARGB1555 

ARGB1555 color mode

ARGB4444 

ARGB4444 color mode

AL44 

AL44 color mode

AL88 

AL88 color mode

L1 

L1 color mode

L2 

L2 color mode

L4 

L4 color mode

L8 

L8 color mode

A1 

A1 color mode

A2 

A2 color mode

A4 

A4 color mode

A8 

A8 color mode

UNKNOW 

unknow color mode

## DeviceType ``` enum [OHOS::VirtualDeviceEvent::DeviceType](Graphic.md#gaf8133740d5a3cb2f88a7f33cb11c6dbd) ``` **Description:** Enumerates virtual device types. ## DialogButtonType ``` enum [OHOS::UIDialog::DialogButtonType](Graphic.md#ga1bfefa0b46fd5a79a28d0c9a75114295) ``` **Description:** Enumerates buttons in a dialog box.

Enumerator

Description

BUTTON1 

First button

BUTTON2 

Second button

BUTTON3 

Third button

## Direction ``` enum [OHOS::UIBoxProgress::Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb) : uint8_t ``` **Description:** Enumerates the directions of the progress bar.

Enumerator

Description

DIR_LEFT_TO_RIGHT 

Filling from left to right

DIR_RIGHT_TO_LEFT 

Filling from right to left

DIR_TOP_TO_BOTTOM 

Filling from top to bottom

DIR_BOTTOM_TO_TOP 

Filling from bottom to top

## DisplayMode ``` enum [OHOS::UIDigitalClock::DisplayMode](Graphic.md#gabe3b64b11e5bf5d7b54e1039e40f306b) ``` **Description:** Enumerates the display modes of this digital clock.

Enumerator

Description

DISPLAY_12_HOUR_NO_SECONDS 

12-hour format, without seconds

DISPLAY_24_HOUR_NO_SECONDS 

24-hour format, without seconds

DISPLAY_12_HOUR 

12-hour format

DISPLAY_24_HOUR 

24-hour format

## DrawType ``` enum [OHOS::UIAnalogClock::DrawType](Graphic.md#ga0a595eeb50ce4e7dfff9ede16098d2db) ``` **Description:** Enumerates the drawing types of a clock hand.

Enumerator

Description

DRAW_LINE 

Using a line to draw a clock hand

DRAW_IMAGE 

Using an image to draw a clock hand

## FPSCalculateType ``` enum [OHOS::SysInfo::FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1) ``` **Description:** Enumerates the FPS capture types.

Enumerator

Description

FPS_CT_FIXED_TIME 

Fixed time sampling: The system collects the number of page refresh times within one second.

FPS_CT_AVERAGE_SAMPLING 

Average sampling: The system collects statistics on the average frame rate of 100 frames. No extra space is required to store the data of each frame. The precision is not as high as that of precise sampling.

FPS_CT_PRECISE_SAMPLING 

Precise sampling: The system collects statistics on the average frame rate of the current 100 frames. Extra space is required to save the data of each frame. The result is more precise than that of average sampling.

## HandType ``` enum [OHOS::UIAnalogClock::HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) ``` **Description:** Enumerates the clock hand types.

Enumerator

Description

HOUR_HAND 

Hour hand

MINUTE_HAND 

Minute hand

SECOND_HAND 

Second hand

## LineBreakMode ``` enum [OHOS::UILabel::LineBreakMode](Graphic.md#gaf2ba9acac6cafffc549781ace0475cd5) : uint8_t ``` **Description:** Enumerates the display modes of a long text.

Enumerator

Description

LINE_BREAK_ADAPT 

The label size is adaptive to the text size.

LINE_BREAK_STRETCH 

The height of this label remains unchanged, and the width is adaptive to the text size.

LINE_BREAK_WRAP 

The width of this label remains unchanged, and the height is adaptive to the text size. The text switches to the next line if the text exceeds the maximum label width.

LINE_BREAK_ELLIPSIS 

The width and height of this label remain unchanged. If this text is too long, ellipsis will be used at the end.

LINE_BREAK_MARQUEE 

The width and height of this label remain unchanged. If this text is too long, it will be rolled to display.

LINE_BREAK_CLIP 

The width and height of this label remain unchanged. If this text is too long, it will be cropped to display.

LINE_BREAK_MAX 

Maximum value of the line break mode, which is used for validity check.

## PaintStyle ``` enum [OHOS::Paint::PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a) ``` **Description:** Enumerates paint styles of a closed graph. The styles are invalid for non-closed graphs.

Enumerator

Description

STROKE_STYLE 

Stroke only

FILL_STYLE 

Fill only

STROKE_FILL_STYLE 

Stroke and fill

## TextOrientation ``` enum [OHOS::UIArcLabel::TextOrientation](Graphic.md#ga0778527bee4a7ddd8d46395585a5cfb9) : uint8_t ``` **Description:** Enumerates text orientations.

Enumerator

Description

INSIDE 

Inside

OUTSIDE 

Outside

## TimeElement ``` enum [OHOS::UIDigitalClock::TimeElement](Graphic.md#gaa6aacc9ecbf5e20f22e50e542a69f472) ``` **Description:** Enumerates the time elements of this digital clock.

Enumerator

Description

HOUR_ELEMENT 

Clock

MINUTE_ELEMENT 

Minute

SECOND_ELEMENT 

Second

## UICheckBoxState ``` enum [OHOS::UICheckBox::UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) : uint8_t ``` **Description:** Enumerates the states of a check box. ## UITextLanguageAlignment ``` enum [OHOS::UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) : uint8_t ``` **Description:** Enumerates text alignment modes.

Enumerator

Description

TEXT_ALIGNMENT_LEFT 

Left-aligned

TEXT_ALIGNMENT_RIGHT 

Right-aligned

TEXT_ALIGNMENT_CENTER 

Centered

TEXT_ALIGNMENT_TOP 

Top-aligned

TEXT_ALIGNMENT_BOTTOM 

Bottom-aligned

## UITextLanguageDirect ``` enum [OHOS::UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) : uint8_t ``` **Description:** Enumerates text directions.

Enumerator

Description

TEXT_DIRECT_LTR 

Left-to-right

TEXT_DIRECT_RTL 

Right-to-left

## WorkMode ``` enum [OHOS::UIAbstractClock::WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) ``` **Description:** Enumerates the working modes of this clock.

Enumerator

Description

ALWAYS_ON 

Always on (drawing not updated)

NORMAL 

Normal (drawing updated with the time change)

## **Function Documentation** ## AbstractAdapter\(\) ``` OHOS::AbstractAdapter::AbstractAdapter () ``` **Description:** A constructor used to create an **[AbstractAdapter](OHOS-AbstractAdapter.md)** instance. ## Add\(\) \[1/3\] ``` void OHOS::AnimatorManager::Add ([Animator](OHOS-Animator.md) * animator) ``` **Description:** Adds the **[Animator](OHOS-Animator.md)** instance to the **[AnimatorManager](OHOS-AnimatorManager.md)** linked list for management, so that the **Run** function of the **[Animator](OHOS-Animator.md)** class is called once for each frame. **Parameters:**

Name

Description

animator Indicates the pointer to the Animator instance to add.
**See also:** [Remove](Graphic.md#ga493d53a9e4a47b79d30c0d37f96a69da) ## Add\(\) \[2/3\] ``` virtual void OHOS::UIViewGroup::Add ([UIView](OHOS-UIView.md) * view) ``` **Description:** Adds a child view. Reimplemented in [OHOS::UISwipeView](Graphic.md#ga1cdc37a33412d6134ed7214300bc1c87). **Parameters:**

Name

Description

view Indicates the pointer to the child view to add.
## Add\(\) \[3/3\] ``` void OHOS::UISwipeView::Add ([UIView](OHOS-UIView.md) * view) ``` **Description:** Adds a view. Reimplemented from [OHOS::UIViewGroup](Graphic.md#gacf5db120308ac7783c493f5437f06cee). **Parameters:**

Name

Description

view Indicates the view to add.
## AddDataSerial\(\) ``` virtual bool OHOS::UIChart::AddDataSerial ([UIChartDataSerial](OHOS-UIChartDataSerial.md) * dataSerial) ``` **Description:** Adds a data set. **Parameters:**

Name

Description

dataSerial Indicates the pointer to the data set class. For details, see UIChartDataSerial.
**Returns:** Returns **true** if the data set is added successfully; returns **false** otherwise. **See also:** [DeleteDataSerial](Graphic.md#ga2af81fbcd6a17ef250bf07e2d7606b8d) ## AddPoints\(\) ``` bool OHOS::UIChartDataSerial::AddPoints (const [Point](OHOS-Point.md) * data, uint16_t count ) ``` **Description:** Adds data points. The new data points are appended to the last added data. No more data points can be added if the maximum number is reached **Parameters:**

Name

Description

data Indicates the pointer to the start address of the data point.
count Indicates the number of data points to add.
**Returns:** Returns **true** if the data points are added successfully; returns **false** otherwise. ## AlignBottomToSibling\(\) ``` void OHOS::UIView::AlignBottomToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Aligns the view with the bottom of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the top, and a negative number indicates the offset to the bottom.
## AlignHorCenterToSibling\(\) ``` void OHOS::UIView::AlignHorCenterToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Aligns the view with the center of a sibling view in the x-axis. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
## AlignLeftToSibling\(\) ``` void OHOS::UIView::AlignLeftToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Aligns the view with the left of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
## AlignRightToSibling\(\) ``` void OHOS::UIView::AlignRightToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Aligns the view with the right of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the left, and a negative number indicates the offset to the right.
## AlignTopToSibling\(\) ``` void OHOS::UIView::AlignTopToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Aligns the view with the top of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
## AlignVerCenterToSibling\(\) ``` void OHOS::UIView::AlignVerCenterToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Aligns the view with the center of a sibling view in the y-axis. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
## Animator\(\) \[1/2\] ``` OHOS::Animator::Animator () ``` **Description:** A default constructor used to create an **[Animator](OHOS-Animator.md)** instance. ## Animator\(\) \[2/2\] ``` OHOS::Animator::Animator ([AnimatorCallback](OHOS-AnimatorCallback.md) * callback, [UIView](OHOS-UIView.md) * view, uint32_t time, bool repeat ) ``` **Description:** A constructor used to create an **[Animator](OHOS-Animator.md)** instance. **Parameters:**

Name

Description

callback Indicates the animator callback for producing animator effects. For details, see AnimatorCallback.
view Indicates the UIView instance bound to an animator, which can be used when invoking the animator callback.
time Indicates the duration of this animator, in milliseconds.
repeat Specifies whether to repeat this animator. true indicates the animator is repeated, and false (default value) indicates the animator is played once.
## Aqua\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Aqua () ``` **Description:** Obtains the color data of aqua. **Returns:** Returns the color data. ## Back\(\) ``` const T [OHOS::List](OHOS-List-T.md)< T >::Back () const ``` **Description:** Obtains the tail node data of a linked list. **Returns:** Returns the tail node data. ## BackEaseIn\(\) ``` static int16_t OHOS::EasingEquation::BackEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in with an overshoot. **\(s+1\)\*t^3 - s\*t^2** is the equation for a back easing. The animation moves back slightly at the beginning and then accelerates towards the end. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [SetBackOvershoot](Graphic.md#gab7cf0e64a0d363d8b448262d719ac97a) | [BackEaseOut](Graphic.md#ga7399f01f7abc33413bf25aa17a99c2f2) | [BackEaseInOut](Graphic.md#gac7c2a9a1dfce384438a3bd9d6c0c2525) ## BackEaseInOut\(\) ``` static int16_t OHOS::EasingEquation::BackEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in and then out with an overshoot. **\(s+1\)\*t^3 - s\*t^2** is the equation for a back easing. The animation slightly moves back at the beginning, goes towards the end, slightly exceeds it and finally comes back. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [SetBackOvershoot](Graphic.md#gab7cf0e64a0d363d8b448262d719ac97a) | [BackEaseIn](Graphic.md#ga4598524b16a33de497fa9321d887d3b1) | [BackEaseOut](Graphic.md#ga7399f01f7abc33413bf25aa17a99c2f2) ## BackEaseOut\(\) ``` static int16_t OHOS::EasingEquation::BackEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases out with an overshoot. **\(s+1\)\*t^3 - s\*t^2** is the equation for a back easing. The animation moves towards the end, slightly exceeds it and finally comes back. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [SetBackOvershoot](Graphic.md#gab7cf0e64a0d363d8b448262d719ac97a) | [BackEaseIn](Graphic.md#ga4598524b16a33de497fa9321d887d3b1) | [BackEaseInOut](Graphic.md#gac7c2a9a1dfce384438a3bd9d6c0c2525) ## Begin\(\) ``` [ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Begin () const ``` **Description:** Obtains the head node address of a linked list. **Returns:** Returns the head node address. ## Black\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Black () ``` **Description:** Obtains the color data of black. **Returns:** Returns the color data. ## Blue\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Blue () ``` **Description:** Obtains the color data of blue. **Returns:** Returns the color data. ## Callback\(\) ``` virtual void OHOS::AnimatorCallback::Callback ([UIView](OHOS-UIView.md) * view) ``` **Description:** Called when each frame starts. This is a pure virtual function, which needs your inheritance and implementation. **Parameters:**

Name

Description

view Indicates the UIView instance, which is added from the constructor of the Animator class.
## Cancel\(\) ``` void OHOS::UITextureMapper::Cancel () ``` **Description:** Cancels this animator. After being cancelled, the animator will stop in the current playback state. ## CancelEvent\(\) ``` OHOS::CancelEvent::CancelEvent (const [Point](OHOS-Point.md) & pos) ``` **Description:** A constructor used to create a **[CancelEvent](OHOS-CancelEvent.md)** instance. **Parameters:**

Name

Description

pos Indicates the position where the cancel event occurs.
## CircEaseIn\(\) ``` static int16_t OHOS::EasingEquation::CircEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in shaping like a circular curve. **sqrt\(1-t^2\)** is the equation for a circular easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a circular curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [CircEaseOut](Graphic.md#gaab8fad8664d648df7e5e224b68ee54ad) | [CircEaseInOut](Graphic.md#ga68c392dad14e1bef192b085aeec6ca9b) ## CircEaseInOut\(\) ``` static int16_t OHOS::EasingEquation::CircEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in and then out shaping like a circular curve. **sqrt\(1-t^2\)** is the equation for a circular easing. The animation accelerates slowly until halfway and decreases slowly towards the end. The acceleration change is similar to a circular curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [CircEaseIn](Graphic.md#ga446c958f14b3d6de24e2c1bab171bba2) | [CircEaseOut](Graphic.md#gaab8fad8664d648df7e5e224b68ee54ad) ## CircEaseOut\(\) ``` static int16_t OHOS::EasingEquation::CircEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases out shaping like a circular curve. **sqrt\(1-t^2\)** is the equation for a circular easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a circular curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [CircEaseIn](Graphic.md#ga446c958f14b3d6de24e2c1bab171bba2) | [CircEaseInOut](Graphic.md#ga68c392dad14e1bef192b085aeec6ca9b) ## Clear\(\) \[1/2\] ``` void [OHOS::List](OHOS-List-T.md)< T >::Clear () ``` **Description:** Deletes all nodes from a linked list. ## Clear\(\) \[2/2\] ``` void OHOS::UICanvas::Clear () ``` **Description:** Clears the entire canvas. ## ClearData\(\) ``` void OHOS::UIChartDataSerial::ClearData () ``` **Description:** Clears all data points. ## ClearDataSerial\(\) ``` virtual void OHOS::UIChart::ClearDataSerial () ``` **Description:** Clears all data sets. ## ClearOnKeyActListener\(\) ``` void OHOS::RootView::ClearOnKeyActListener () ``` **Description:** Clears the listener for monitoring physical key events. ## ClearOnVirtualDeviceEventListener\(\) ``` void OHOS::RootView::ClearOnVirtualDeviceEventListener () ``` **Description:** Clears the listener for monitoring the input events of a virtual device. ## ClearValues\(\) ``` virtual void OHOS::UIPicker::ClearValues () ``` **Description:** Clears all values in the picker. ## ClickEvent\(\) ``` OHOS::ClickEvent::ClickEvent (const [Point](OHOS-Point.md) & pos) ``` **Description:** A constructor used to create a **[ClickEvent](OHOS-ClickEvent.md)** instance. **Parameters:**

Name

Description

pos Indicates the position where the click event occurs.
## Clip\(\) \[1/2\] ``` void OHOS::Clip (const [Line](OHOS-Line.md) & line, const [Polygon](OHOS-Polygon.md) & poly, [Vector2](OHOS-Vector2-T.md)< int16_t > * pOut, uint8_t * pNum ) ``` **Description:** Clips a polygon by using a line segment and obtains the intersections. **Parameters:**

Name

Description

line Indicates the line segment used for clipping.
poly Indicates the polygon to clip.
pOut Indicates the pointer to the intersections.
pNum Indicates the pointer to the number of the intersections.
## Clip\(\) \[2/2\] ``` void OHOS::Clip ([Polygon](OHOS-Polygon.md) & poly, const [Line](OHOS-Line.md) & line ) ``` **Description:** Clips a polygon by using a line segment. **Parameters:**

Name

Description

poly Indicates the polygon to clip.
line Indicates the line segment used for clipping.
## ColorTo16\(\) ``` static uint16_t OHOS::Color::ColorTo16 ([Color32](OHOS-Color32.md) color) ``` **Description:** Converts color data from the RGBA8888 format into the RGB565 format. **Parameters:**

Name

Description

color Indicates the color data with the 32-bit color depth, which is defined by Color32.
**Returns:** Returns the RGB565 color data. ## ColorTo32\(\) \[1/2\] ``` static uint32_t OHOS::Color::ColorTo32 ([Color16](OHOS-Color16.md) color, uint8_t alpha ) ``` **Description:** Converts color data with the 16-bit color depth into the RGBA8888 format. **Parameters:**

Name

Description

color Indicates the color data with the 16-bit color depth, which is defined by Color16.
alpha Indicates the alpha, that is, how opaque each pixel is.
**Returns:** Returns the RGBA8888 color data. ## ColorTo32\(\) \[2/2\] ``` static uint32_t OHOS::Color::ColorTo32 ([ColorType](OHOS-Color32.md) color) ``` **Description:** Converts color data into the RGBA8888 format. The color data definition varies according to the color depth. **Parameters:**

Name

Description

color Indicates the color data, which is defined by ColorType.
**Returns:** Returns the RGBA8888 color data. ## Cross\(\) ``` T [OHOS::Vector2](OHOS-Vector2-T.md)< T >::Cross (const [Vector2](OHOS-Vector2-T.md)< T > & other) const ``` **Description:** Calculates the cross product of the two-dimensional vector and another two-dimensional vector. **Parameters:**

Name

Description

other Indicates the two-dimensional vector to be used for calculation.
**Returns:** Returns the cross product. ## CubicEaseIn\(\) ``` static int16_t OHOS::EasingEquation::CubicEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in shaping like a cubic curve. **t^3** is the equation for a cubic easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a cubic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [CubicEaseOut](Graphic.md#ga529a948d9f6711a5f2726af5f10d7a48) | [CubicEaseInOut](Graphic.md#gad99ea4ed828f274f111f492eea123cb4) ## CubicEaseInOut\(\) ``` static int16_t OHOS::EasingEquation::CubicEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in and then out shaping like a cubic curve. **t^3** is the equation for a cubic easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a cubic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [CubicEaseIn](Graphic.md#ga5c91a83cc424fb7e4e1f40cae6b3be66) | [CubicEaseOut](Graphic.md#ga529a948d9f6711a5f2726af5f10d7a48) ## CubicEaseOut\(\) ``` static int16_t OHOS::EasingEquation::CubicEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases out shaping like a cubic curve. **t^3** is the equation for a cubic easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a cubic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [CubicEaseIn](Graphic.md#ga5c91a83cc424fb7e4e1f40cae6b3be66) | [CubicEaseInOut](Graphic.md#gad99ea4ed828f274f111f492eea123cb4) ## Cyan\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Cyan () ``` **Description:** Obtains the color data of cyan. **Returns:** Returns the color data. ## DeleteDataSerial\(\) ``` virtual bool OHOS::UIChart::DeleteDataSerial ([UIChartDataSerial](OHOS-UIChartDataSerial.md) * dataSerial) ``` **Description:** Deletes a data set. **Parameters:**

Name

Description

dataSerial Indicates the pointer to the data set class. For details, see UIChartDataSerial.
**Returns:** Returns **true** if the data set is deleted successfully; returns **false** otherwise. **See also:** [AddDataSerial](Graphic.md#gafc510047aac4e7eebd5b229e726ef762) ## Determinant\(\) ``` T [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Determinant ``` **Description:** Obtains the determinant of the matrix. **Returns:** Returns the determinant. ## Disable\(\) ``` void OHOS::UIButton::Disable () ``` **Description:** Disables this button. ## DisplayLeadingZero\(\) ``` void OHOS::UIDigitalClock::DisplayLeadingZero (bool displayLeadingZero) ``` **Description:** Sets whether to add **0** before the hour of this digital clock. **Parameters:**

Name

Description

displayLeadingZero Specifies whether to add 0 before the hour of this digital clock. true indicates that 0 is added, and false indicates the opposite case.
## Dot\(\) ``` T [OHOS::Vector2](OHOS-Vector2-T.md)< T >::Dot (const [Vector2](OHOS-Vector2-T.md)< T > & other) const ``` **Description:** Calculates the scalar product of the two-dimensional vector and another two-dimensional vector. **Parameters:**

Name

Description

other Indicates the two-dimensional vector to be used for calculation.
**Returns:** Returns the scalar product. ## DragEvent\(\) ``` OHOS::DragEvent::DragEvent (const [Point](OHOS-Point.md) & newPos, const [Point](OHOS-Point.md) & lastPos, const [Point](OHOS-Point.md) & totalLen ) ``` **Description:** A constructor used to create a **[DragEvent](OHOS-DragEvent.md)** instance. **Parameters:**

Name

Description

newPos Indicates the new position in the drag event.
lastPos Indicates the last position in the drag event.
totalLen Indicates the distance that the view has been dragged, including the movement on the x-axis and y-axis.
## DrawArc\(\) ``` void OHOS::UICanvas::DrawArc (const [Point](OHOS-Point.md) & center, uint16_t radius, int16_t startAngle, int16_t endAngle, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws an arc. Only stroke is supported. When the start angle is smaller than the end angle, the sector is drawn clockwise. Otherwise, the sector is drawn counterclockwise. **Parameters:**

Name

Description

center Indicates the coordinates of the arc's center.
radius Indicates the radius of the arc.
startAngle Indicates the start angle of the arc. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
endAngle Indicates the end angle of the arc. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
paint Indicates the arc style. For details, see Paint.
## DrawCircle\(\) ``` void OHOS::UICanvas::DrawCircle (const [Point](OHOS-Point.md) & center, uint16_t radius, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a circle. **Parameters:**

Name

Description

center Indicates the coordinates of the circle center.
radius Indicates the radius of the circle.
paint Indicates the circle style. For details, see Paint.
## DrawCurve\(\) \[1/2\] ``` void OHOS::UICanvas::DrawCurve (const [Point](OHOS-Point.md) & control1, const [Point](OHOS-Point.md) & control2, const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a cubic Bezier curve. If [SetStartPosition](Graphic.md#gaca35fe1a1d344eab80ecb1425a74a91a) is not used to set the coordinates of the start point of the curve, the drawing starts from the end point of the last line. Currently, the opacity cannot be set, and the maximum line width is **3**. **Parameters:**

Name

Description

control1 Indicates the coordinates of the first control point of the cubic Bezier curve.
control2 Indicates the coordinates of the second control point of the cubic Bezier curve.
endPoint Indicates the coordinates of the end point of the cubic Bezier curve.
paint Indicates the curve style. For details, see Paint.
## DrawCurve\(\) \[2/2\] ``` void OHOS::UICanvas::DrawCurve (const [Point](OHOS-Point.md) & startPoint, const [Point](OHOS-Point.md) & control1, const [Point](OHOS-Point.md) & control2, const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a cubic Bezier curve from the start point coordinates. Currently, the opacity cannot be set, and the maximum line width is **3**. **Parameters:**

Name

Description

startPoint Indicates the coordinates of the start point of the cubic Bezier curve.
control1 Indicates the coordinates of the first control point of the cubic Bezier curve.
control2 Indicates the coordinates of the second control point of the cubic Bezier curve.
endPoint Indicates the coordinates of the end point of the cubic Bezier curve.
paint Indicates the curve style. For details, see Paint.
## DrawImage\(\) ``` void OHOS::UICanvas::DrawImage (const [Point](OHOS-Point.md) & startPoint, const char * image, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws an image. **Parameters:**

Name

Description

startPoint Indicates the coordinates of the start point.
image Indicates the pointer to the image source.
paint Indicates the image style. For details, see Paint.
## DrawLabel\(\) ``` void OHOS::UICanvas::DrawLabel (const [Point](OHOS-Point.md) & startPoint, const char * text, uint16_t maxWidth, const [FontStyle](OHOS-UICanvas-FontStyle.md) & fontStyle, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws text. Only fill is supported. If the text length exceeds the value of **maxWidth**, the text will be truncated. **Parameters:**

Name

Description

startPoint Indicates the coordinates of the start point.
text Indicates the pointer to the text content.
maxWidth Indicates the maximum width of the text that can be displayed. If the maximum width is exceeded, the text is truncated.
fontStyle Indicates the text layout and font style. For details, see FontStyle.
paint Indicates the text style. For details, see Paint.
## DrawLine\(\) \[1/2\] ``` void OHOS::UICanvas::DrawLine (const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a straight line. If [SetStartPosition](Graphic.md#gaca35fe1a1d344eab80ecb1425a74a91a) is not used to set the coordinates of the start point of the line, the drawing starts from the end point of the last line. **Parameters:**

Name

Description

endPoint Indicates the end point of the straight line.
paint Indicates the straight line style. For details, see Paint.
## DrawLine\(\) \[2/2\] ``` void OHOS::UICanvas::DrawLine (const [Point](OHOS-Point.md) & startPoint, const [Point](OHOS-Point.md) & endPoint, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a straight line from the coordinates of the start point. **Parameters:**

Name

Description

startPoint Indicates the coordinates of the start point.
endPoint Indicates the coordinates of the end point.
paint Indicates the straight line style. For details, see Paint.
## DrawRect\(\) ``` void OHOS::UICanvas::DrawRect (const [Point](OHOS-Point.md) & startPoint, int16_t height, int16_t width, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a rectangle. **Parameters:**

Name

Description

startPoint Indicates the coordinates of the point at the upper left corner of the rectangle.
height Indicates the height of the rectangle.
width Indicates the width of the rectangle.
paint Indicates the rectangle style. For details, see Paint.
## DrawSector\(\) ``` void OHOS::UICanvas::DrawSector (const [Point](OHOS-Point.md) & center, uint16_t radius, int16_t startAngle, int16_t endAngle, const [Paint](OHOS-Paint.md) & paint ) ``` **Description:** Draws a sector. When the start angle is smaller than the end angle, the sector is drawn clockwise. Otherwise, the sector is drawn counterclockwise. **Parameters:**

Name

Description

center Indicates the coordinates of the sector's center.
radius Indicates the radius of the sector.
startAngle Indicates the start angle of the sector. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
endAngle Indicates the end angle of the sector. Value 0 indicates the 12-o'clock direction, and 90 indicates the 3-o'clock direction.
paint Indicates the sector style. For details, see Paint.
## DumpDomNode\(\) ``` char* OHOS::UIDumpDomTree::DumpDomNode (const char * id) ``` **Description:** Exports information about a specified DOM node. **Parameters:**

Name

Description

id Indicates the pointer to the DOM node ID.
**Returns:** Returns a character string about the DOM node information. The character string memory is released by invoking **cJSON\_free\(\)**. ## DumpDomTree\(\) \[1/2\] ``` bool OHOS::UIDumpDomTree::DumpDomTree (const char * id) ``` **Description:** Exports information about a DOM tree starting from a specified DOM node and saves the information to the default path. The default path is **DEFAULT\_DUMP\_DOM\_TREE\_PATH**. **Parameters:**

Name

Description

id Indicates the pointer to the DOM node ID.
**Returns:** Returns **true** if the operation is successful; returns **false** otherwise. ## DumpDomTree\(\) \[2/2\] ``` bool OHOS::UIDumpDomTree::DumpDomTree (const char * id, const char * path ) ``` **Description:** Exports information about a DOM tree starting from a specified DOM node and saves the information to a specified path. **Parameters:**

Name

Description

id Indicates the pointer to the DOM node ID.
path Indicates the pointer to the specified path.
**Returns:** Returns **true** if the operation is successful; returns **false** otherwise. ## Enable\(\) ``` void OHOS::UIButton::Enable () ``` **Description:** Enables this button. ## EnableAutoAlign\(\) ``` void OHOS::UIList::EnableAutoAlign (bool state) ``` **Description:** Sets the automatic alignment state for this list. When a scroll stops, a child view is selected and its position is automatically aligned with the preset position. **Parameters:**

Name

Description

state Indicates the automatic alignment state. true indicates this state is enabled, and false indicates the opposite case.
## EnableBackground\(\) ``` void OHOS::UIAbstractProgress::EnableBackground (bool enable) ``` **Description:** Sets whether the background of the progress bar is visible. **Parameters:**

Name

Description

enable Specifies whether the background of the progress bar is visible. true (the default value) indicates that the background is visible, and false indicates the opposite case.
## EnableBottomPoint\(\) ``` void OHOS::UIChartDataSerial::EnableBottomPoint (bool enable) ``` **Description:** Enables the feature of drawing the bottom point of a polyline. If there are multiple bottom points, only the first one is drawn. **Parameters:**

Name

Description

enable Specifies whether to draw the bottom point. Value true means to draw the bottom point, and value false means not to draw the bottom point.
## EnableGradient\(\) ``` void OHOS::UIChartDataSerial::EnableGradient (bool enable) ``` **Description:** Enables the fill color of a line chart. This function applies only to line charts. By default, the area between the polyline and the x-axis is filled. You can use **SetGradientBottom** to modify the filled region. **Parameters:**

Name

Description

enable Specifies whether to enable the fill color. Value true means to enable the fill color, and value false means to disable the fill color. The default value is false.
## EnableHeadPoint\(\) ``` void OHOS::UIChartDataSerial::EnableHeadPoint (bool enable) ``` **Description:** Enables the feature of drawing the frontmost point on a polyline. **Parameters:**

Name

Description

enable Specifies whether to draw the frontmost point. Value true means to draw the frontmost point, and value false means not to draw the frontmost point.
## EnableReverse\(\) ``` void OHOS::UIChart::EnableReverse (bool enable) ``` **Description:** Enables chart reverse. After the chart is reversed, the x-axis aligns with the top of the chart. The pixel position corresponding to the data point remains unchanged. Complementary filling is performed on the chart \(only the part that is not filled previously will be filled\). **Parameters:**

Name

Description

enable Specifies whether to enable chart reverse. Value true means to enable chart reverse, and value false means not to enable chart reverse. The default value is false.
## EnableSecond\(\) ``` void OHOS::UITimePicker::EnableSecond (bool state) ``` **Description:** Sets whether to enable seconds in the time picker. **Parameters:**

Name

Description

state Specifies whether to enable seconds in the time picker. Value true means to enable seconds, and value false means to disable seconds. The default value is false.
## EnableSmooth\(\) ``` void OHOS::UIChartDataSerial::EnableSmooth (bool smooth) ``` **Description:** Sets whether to smooth a polyline. This function applies only to line charts. After the smoothing, some data is discarded. Therefore, the polyline does not pass through all data points. If **smooth** is set to **true**, the filling color, top point, and bottom point of a line chart have deviations. Therefore, you are advised not to use these functions at the same time. **Parameters:**

Name

Description

smooth Specifies whether to smooth a polyline. Value true means to smooth a polyline, and value false means not to smooth a polyline. The default value is false.
## EnableTopPoint\(\) ``` void OHOS::UIChartDataSerial::EnableTopPoint (bool enable) ``` **Description:** Enables the feature of drawing the top point of a polyline. If there are multiple top points, only the first one is drawn. **Parameters:**

Name

Description

enable Specifies whether to draw the top point. Value true means to draw the top point, and value false means not to draw the top point.
## End\(\) ``` const [ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::End () const ``` **Description:** Obtains the end node address of a linked list. **Returns:** Returns the end node address. ## Event\(\) \[1/2\] ``` OHOS::Event::Event () ``` **Description:** A default constructor used to create an **[Event](OHOS-Event.md)** instance. ## Event\(\) \[2/2\] ``` OHOS::Event::Event (const [Point](OHOS-Point.md) & curPos) ``` **Description:** A constructor used to create an **[Event](OHOS-Event.md)** instance. **Parameters:**

Name

Description

pos Indicates the position where the event occurs.
## FindSubView\(\) ``` static bool OHOS::RootView::FindSubView (const [UIView](OHOS-UIView.md) & parentView, const [UIView](OHOS-UIView.md) * subView ) ``` **Description:** Checks whether the target view is one of the child views of the specified parent view. **Parameters:**

Name

Description

parentView Indicates the specified parent view.
subView Indicates the target child view.
**Returns:** Returns **true** if the target view is available; returns ** false** otherwise. ## FlexLayout\(\) ``` OHOS::FlexLayout::FlexLayout () ``` **Description:** A default constructor used to create a **[FlexLayout](OHOS-FlexLayout.md)** instance. ## Format\(\) ``` virtual bool OHOS::TextFormatter::Format (int16_t value, char * outText, uint16_t textLen ) ``` **Description:** Converts the input integer into a character string for output. **Parameters:**

Name

Description

value Indicates the input integer.
outText Indicates the pointer to the converted string.
textLen Indicates the length of the string.
## Front\(\) ``` const T [OHOS::List](OHOS-List-T.md)< T >::Front () const ``` **Description:** Obtains the head node data of a linked list. **Returns:** Returns the head node data. ## GetAlign\(\) ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UILabelButton::GetAlign () const ``` **Description:** Obtains the alignment mode of this text. **Returns:** Returns the text alignment mode, as defined in **UITextLanguageAlignment**. ## GetAllChildRelativeRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::UIViewGroup::GetAllChildRelativeRect () const ``` **Description:** Obtains the rectangle area of a new view group after being adaptive to the size of all child views. **Returns:** Returns the rectangle area of the new view group. ## GetArcTextCenter\(\) ``` [Point](OHOS-Point.md) OHOS::UIArcLabel::GetArcTextCenter () const ``` **Description:** Obtains the center position of this arc text. **Returns:** Returns the center position of this arc text. ## GetArcTextEndAngle\(\) ``` int16_t OHOS::UIArcLabel::GetArcTextEndAngle () const ``` **Description:** Obtains the end angle of this arc text. **Returns:** Returns the end angle of this arc text. ## GetArcTextOrientation\(\) ``` [TextOrientation](Graphic.md#ga0778527bee4a7ddd8d46395585a5cfb9) OHOS::UIArcLabel::GetArcTextOrientation () const ``` **Description:** Obtains the orientation of this arc text. **Returns:** Returns the orientation of this arc text. ## GetArcTextRadius\(\) ``` uint16_t OHOS::UIArcLabel::GetArcTextRadius () const ``` **Description:** Obtains the radius of this arc text. **Returns:** Returns the radius of this arc text. ## GetArcTextStartAngle\(\) ``` int16_t OHOS::UIArcLabel::GetArcTextStartAngle () const ``` **Description:** Obtains the start angle of this arc text. **Returns:** Returns the start angle of this arc text. ## GetBackgroundFontId\(\) ``` uint16_t OHOS::UIPicker::GetBackgroundFontId () const ``` **Description:** Obtains the font ID of the background text. **Returns:** Returns the font ID. ## GetBackgroundStyle\(\) \[1/2\] ``` const [Style](OHOS-Style.md)& OHOS::UIAbstractProgress::GetBackgroundStyle () const ``` **Description:** Obtains the background style of this progress bar. **Returns:** Returns the background style. @See SetBackgroundStyle ## GetBackgroundStyle\(\) \[2/2\] ``` int64_t OHOS::UIAbstractProgress::GetBackgroundStyle (uint8_t key) const ``` **Description:** Obtains the value of a background style of this progress bar. **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetBackgroundTextColor\(\) ``` [ColorType](OHOS-Color32.md) OHOS::UIPicker::GetBackgroundTextColor () const ``` **Description:** Obtains the color of the background text. **Returns:** Returns the color. ## GetBackgroundTransparentStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetBackgroundTransparentStyle () ``` **Description:** Obtains the background transparent style. **Returns:** Returns the background transparent style. ## GetBezierInterpolation\(\) ``` static int16_t OHOS::Interpolation::GetBezierInterpolation (int16_t t, int16_t u0, int16_t u1, int16_t u2, int16_t u3 ) ``` **Description:** Obtains the value calculated by the cubic Bezier equation. Use \[0, 1024\] instead of \[0, 1\] in the standard Bezier equation. The cubic Bezier equation is **B\(t\) = P0\*\(1-t\)^3 + 3\*P1\*t\*\(1-t\)^2 + 3\*P2\*t^2\*\(1-t\) + P3\*t^3**. **Parameters:**

Name

Description

t Indicates the current change rate of the cubic Bezier curve, within [0, 1024].
u0 Indicates the coordinates for the start point of the cubic Bezier curve, within [0, 1024].
u1 Indicates the coordinates for the first control point of the cubic Bezier curve, within [0, 1024].
u2 Indicates the coordinates for the second control point of the cubic Bezier curve, within [0, 1024].
u3 Indicates the coordinates for the end point of the cubic Bezier curve, within [0, 1024].
**Returns:** Returns the coordinates for the current change rate. ## GetBlurLevel\(\) ``` BlurLevel OHOS::UIImageView::GetBlurLevel () const ``` **Description:** Obtains the blur level of this image when it is rotated or scaled. **Returns:** Returns the blur level of this image, as defined in **BlurLevel**. ## GetBottom\(\) ``` int16_t OHOS::Rect::GetBottom () const ``` **Description:** Obtains the bottom boundary coordinate of the rectangle. **Returns:** Returns the bottom boundary coordinate. ## GetBottomPointStyle\(\) ``` const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md)& OHOS::UIChartDataSerial::GetBottomPointStyle () const ``` **Description:** Obtains the style of the bottom point of a polyline. **Returns:** Returns the style of the point. For details, see [PointStyle](OHOS-UIChartDataSerial-PointStyle.md). ## GetBoxRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::TransformMap::GetBoxRect () const ``` **Description:** Obtains the minimum rectangle that can contain a polygon. All vertices of the polygon are inside this rectangle. **Returns:** Returns the minimum rectangle that can contain the polygon. ## GetBrightColorStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetBrightColorStyle () ``` **Description:** Obtains the bright color style. **Returns:** Returns the bright color style. ## GetBrightStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetBrightStyle () ``` **Description:** Obtains the bright style. **Returns:** Returns the bright style. ## GetButtonInactivedStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetButtonInactivedStyle () ``` **Description:** Obtains the button inactived style. **Returns:** Returns the button inactived style. ## GetButtonPressedStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetButtonPressedStyle () ``` **Description:** Obtains the button pressed style. **Returns:** Returns the button pressed style. ## GetButtonReleasedStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetButtonReleasedStyle () ``` **Description:** Obtains the button released style. **Returns:** Returns the button released style. ## GetButtonStyle\(\) ``` [ButtonStyle](OHOS-ButtonStyle.md)& OHOS::Theme::GetButtonStyle () ``` **Description:** Obtains the style of this button. **Returns:** Returns the button style. ## GetCenterPosition\(\) ``` [Point](OHOS-Point.md) OHOS::UICircleProgress::GetCenterPosition () const ``` **Description:** Obtains the coordinates of the center point for this circular progress bar. The coordinates of the center point refer to the position relative to the view. **Returns:** Returns the coordinates of the center point. **See also:** [SetCenterPosition](Graphic.md#ga6cf6b8ab0934ce8c0ea1821da0791317) ## GetChildById\(\) \[1/2\] ``` virtual [UIView](OHOS-UIView.md)* OHOS::UIView::GetChildById (const char * id) const ``` **Description:** Obtains the child view of a specified ID. Reimplemented in [OHOS::UIViewGroup](Graphic.md#gae9f6ddb5819392546463d6371147c486). **Returns:** Returns the pointer to the child view. ## GetChildById\(\) \[2/2\] ``` [UIView](OHOS-UIView.md)* OHOS::UIViewGroup::GetChildById (const char * id) const ``` **Description:** Obtains the target child view with a specified ID. Reimplemented from [OHOS::UIView](Graphic.md#ga0573aa25307c22319db4629781b5cad2). **Parameters:**

Name

Description

id Indicates the pointer to the ID of the target child view.
**Returns:** Returns the target child view if available; returns **nullptr** otherwise. ## GetChildrenHead\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UIViewGroup::GetChildrenHead () const ``` **Description:** Obtains the first child view in this view group. **Returns:** Returns the first child view. ## GetChildrenTail\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UIViewGroup::GetChildrenTail () const ``` **Description:** Obtains the last child view in this view group. **Returns:** Returns the last child view. ## GetClockWise\(\) ``` bool OHOS::TransformMap::GetClockWise () const ``` **Description:** Checks whether the vertex coordinates of a polygon are clockwise. **Returns:** Returns **true** if the vertex coordinates are clockwise; returns **false** otherwise. ## GetColorFromRGB\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::GetColorFromRGB (uint8_t r8, uint8_t g8, uint8_t b8 ) ``` **Description:** Obtains the color based on the RGB color value. **Parameters:**

Name

Description

r8 Indicates the intensity of red.
g8 Indicates the intensity of green.
b8 Indicates the intensity of blue.
**Returns:** Returns the color data generated. ## GetColorFromRGBA\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::GetColorFromRGBA (uint8_t r8, uint8_t g8, uint8_t b8, uint8_t alpha ) ``` **Description:** Obtains the color based on the RGBA color value. **Parameters:**

Name

Description

r8 Indicates the intensity of red.
g8 Indicates the intensity of green.
b8 Indicates the intensity of blue.
alpha Indicates the alpha, that is, how opaque each pixel is.
**Returns:** Returns the color data generated. ## GetContentRect\(\) \[1/2\] ``` virtual [Rect](OHOS-Rect.md) OHOS::UIView::GetContentRect () ``` **Description:** Obtains the content of the absolute rectangle area of the view. This area excludes padding. Reimplemented in [OHOS::UIButton](Graphic.md#ga93994f4d735e4f9a7d3e7d737e2c620c). **Returns:** Returns the content of the absolute rectangle area. ## GetContentRect\(\) \[2/2\] ``` virtual [Rect](OHOS-Rect.md) OHOS::UIButton::GetContentRect () ``` **Description:** Obtains a rectangular area that contains coordinate information. Reimplemented from [OHOS::UIView](Graphic.md#ga9db88eae712676359d02a92be14fa316). **Returns:** Returns the rectangle area. ## GetCount\(\) \[1/2\] ``` virtual uint16_t OHOS::TextAdapter::GetCount () ``` **Description:** Obtains the **data** size of the [UILabel](OHOS-UILabel.md) adapter. Implements [OHOS::AbstractAdapter](Graphic.md#ga67021b360d4097c475d5e24519b5276d). **Returns:** Returns the **data** size of the [UILabel](OHOS-UILabel.md) adapter. ## GetCount\(\) \[2/2\] ``` virtual uint16_t OHOS::AbstractAdapter::GetCount () ``` **Description:** Obtains the number of adapter data items. Implemented in [OHOS::TextAdapter](Graphic.md#gaa8d1098628c391a687b08f4ccdba0a4d). **Returns:** Returns the number of adapter data items. ## GetCurImageSrc\(\) ``` const [Image](OHOS-Image.md)* OHOS::UIButton::GetCurImageSrc () const ``` **Description:** Obtains the image for the current button state. **Returns:** Returns the image for the current button state. ## GetCurrent\(\) ``` [Theme](OHOS-Theme.md)* OHOS::ThemeManager::GetCurrent () ``` **Description:** Obtains the current screen theme of this application. **Returns:** Returns the current theme if available; returns **nullptr** otherwise. ## GetCurrentHour\(\) ``` uint8_t OHOS::UIAbstractClock::GetCurrentHour () const ``` **Description:** Obtains the current number of hours. **Returns:** Returns the current number of hours. ## GetCurrentMinute\(\) ``` uint8_t OHOS::UIAbstractClock::GetCurrentMinute () const ``` **Description:** Obtains the current number of minutes. **Returns:** Returns the current number of minutes. ## GetCurrentPage\(\) ``` uint16_t OHOS::UISwipeView::GetCurrentPage () const ``` **Description:** Obtains the current tab index. **Returns:** Returns the current tab index. ## GetCurrentPos\(\) ``` const [Point](OHOS-Point.md)& OHOS::Event::GetCurrentPos () const ``` **Description:** Obtains the position where an event occurs. **Returns:** Returns the position. ## GetCurrentSecond\(\) ``` uint8_t OHOS::UIAbstractClock::GetCurrentSecond () const ``` **Description:** Obtains the current number of seconds. **Returns:** Returns the current number of seconds. ## GetCurrentView\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UISwipeView::GetCurrentView () const ``` **Description:** Obtains the current view. **Returns:** Returns the current view. ## GetData\(\) ``` const T* [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::GetData () const ``` **Description:** Obtains the 3 x 3 matrix data. **Returns:** Returns the 3 x 3 matrix data. ## GetDataCount\(\) ``` uint16_t OHOS::UIChartDataSerial::GetDataCount () const ``` **Description:** Obtains the number of data points available in the data set. **Returns:** Returns the number of data points. ## GetDefaultStyle\(\) ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetDefaultStyle () ``` **Description:** Obtains the default style. **Returns:** Returns the default style. ## GetDeltaX\(\) ``` int16_t OHOS::DragEvent::GetDeltaX () const ``` **Description:** Obtains the difference between the current position and the last position of the view in the x-axis. **Returns:** Returns the different in the x-aix. ## GetDeltaY\(\) ``` int16_t OHOS::DragEvent::GetDeltaY () const ``` **Description:** Obtains the difference between the current position and the last position of the view in the y-axis. **Returns:** Returns the different in the y-aix. ## GetDirect\(\) \[1/4\] ``` [UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UIArcLabel::GetDirect () ``` **Description:** Obtains the direction of this text. **Returns:** Returns the text direction, as defined in **UITextLanguageDirect**. ## GetDirect\(\) \[2/4\] ``` [UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::Text::GetDirect () const ``` **Description:** Obtains the direction of this text. **Returns:** Returns the text direction, as defined in **UITextLanguageDirect**. ## GetDirect\(\) \[3/4\] ``` [UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UILabelButton::GetDirect () const ``` **Description:** Obtains the direction of this text. **Returns:** Returns the text direction, as defined in **UITextLanguageDirect**. ## GetDirect\(\) \[4/4\] ``` [UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UILabel::GetDirect () const ``` **Description:** Obtains the direction of this text. **Returns:** Returns the text direction, as defined in **UITextLanguageDirect**. ## GetDirection\(\) \[1/3\] ``` uint8_t OHOS::UIAbstractScroll::GetDirection () const ``` **Description:** Obtains the scroll direction. **Returns:** Returns the scroll direction, either **HORIZONTAL** or **VERTICAL**. ## GetDirection\(\) \[2/3\] ``` uint8_t OHOS::UISwipeView::GetDirection () const ``` **Description:** Obtains the dragging direction. **Returns:** Returns the dragging direction. ## GetDirection\(\) \[3/3\] ``` [Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb) OHOS::UIBoxProgress::GetDirection () const ``` **Description:** Obtains the direction of this progress bar. **Returns:** Returns the direction of this progress bar, as defined in [Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb). **See also:** [SetDirection](Graphic.md#ga3e2e7d0c37b4945a3f4f456c20cb0177) ## GetDisplayMode\(\) ``` [DisplayMode](Graphic.md#gabe3b64b11e5bf5d7b54e1039e40f306b) OHOS::UIDigitalClock::GetDisplayMode () const ``` **Description:** Obtains the display mode of this digital clock. **Returns:** Returns the display mode of this digital clock. ## GetDragACCLevel\(\) ``` uint8_t OHOS::UIAbstractScroll::GetDragACCLevel () const ``` **Description:** Obtains the drag acceleration. **Returns:** Returns the drag acceleration. ## GetDragDirection\(\) ``` uint8_t OHOS::DragEvent::GetDragDirection () const ``` **Description:** Obtains the direction in the drag event. **Returns:** Returns the direction. Available values are as follows: **0** indicates dragging from left to right. **1** indicates dragging from right to left. **2** indicates dragging from top to bottom. **3** indicates dragging from bottom to top. ## GetEllipsisIndex\(\) ``` uint16_t OHOS::Text::GetEllipsisIndex (const [Rect](OHOS-Rect.md) & textRect, const [Style](OHOS-Style.md) & style ) ``` **Description:** Obtains the index of the character from where text will be replaced by ellipses based on the text rectangle and style. **Parameters:**

Name

Description

textRect Indicates the text rectangle.
style Indicates the text style.
## GetEndAngle\(\) ``` int16_t OHOS::UICircleProgress::GetEndAngle () const ``` **Description:** Obtains the end angle. **Returns:** Returns the end angle. **See also:** [SetEndAngle](Graphic.md#ga831186bf208f8236b006b13cc122c82c) ## GetFillColor\(\) \[1/2\] ``` [ColorType](OHOS-Color32.md) OHOS::Paint::GetFillColor () const ``` **Description:** Obtains the fill color. **Returns:** Returns the fill color. **See also:** [SetFillColor](Graphic.md#gab1b0e3a5e21ce2ec8454311ed31956ae) ## GetFillColor\(\) \[2/2\] ``` [ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::GetFillColor () const ``` **Description:** Obtains the fill color of the data set. **Returns:** Returns the fill color. **See also:** [SetFillColor](Graphic.md#gac620b9878a5e28d066dffbcd6145539c) ## GetFontId\(\) \[1/5\] ``` uint8_t OHOS::TextAdapter::GetFontId () const ``` **Description:** Obtains font ID. **Returns:** Returns the font ID. For details, see **UITextLanguageFontId**. ## GetFontId\(\) \[2/5\] ``` uint8_t OHOS::Text::GetFontId () const ``` **Description:** Obtains the font ID. **Returns:** Returns the front ID. ## GetFontId\(\) \[3/5\] ``` uint8_t OHOS::UIArcLabel::GetFontId () const ``` **Description:** Obtains the font ID composed of font name and size. **Returns:** Returns the front ID of this arc label. ## GetFontId\(\) \[4/5\] ``` uint8_t OHOS::UILabelButton::GetFontId () const ``` **Description:** Obtains the font ID. **Returns:** Returns the front ID composed of the font name and size. ## GetFontId\(\) \[5/5\] ``` uint8_t OHOS::UILabel::GetFontId () const ``` **Description:** Obtains the font ID composed of font name and size. **Returns:** Returns the front ID of this label. ## GetForegroundStyle\(\) \[1/2\] ``` const [Style](OHOS-Style.md)& OHOS::UIAbstractProgress::GetForegroundStyle () const ``` **Description:** Obtains the foreground style of this progress bar. **Returns:** Returns the foreground style. @See SetForegroundStyle ## GetForegroundStyle\(\) \[2/2\] ``` int64_t OHOS::UIAbstractProgress::GetForegroundStyle (uint8_t key) const ``` **Description:** Obtains the value of a foreground style of this progress bar. **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetFPS\(\) ``` static float OHOS::SysInfo::GetFPS () ``` **Description:** Obtains the FPS data. **Returns:** Returns the FPS data. ## GetFPSCalculateType\(\) ``` [FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1) OHOS::SysInfo::OnFPSChangedListener::GetFPSCalculateType () const ``` **Description:** Obtains the FPS sampling type. **Returns:** Returns the FPS sampling type. For details, see [FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1). ## GetHandCurrentAngle\(\) ``` uint16_t OHOS::UIAnalogClock::GetHandCurrentAngle ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const ``` **Description:** Obtains the current rotation angle of the specified clock hand. **Parameters:**

Name

Description

type Indicates the clock hand type, as enumerated in HandType.
**Returns:** Returns the current rotation angle of this specified clock hand. ## GetHandInitAngle\(\) ``` uint16_t OHOS::UIAnalogClock::GetHandInitAngle ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const ``` **Description:** Obtains the initial rotation angle of the specified clock hand. **Parameters:**

Name

Description

type Indicates the clock hand type, as enumerated in HandType.
**Returns:** Returns the initial rotation angle of this specified clock hand. ## GetHandPosition\(\) ``` [Point](OHOS-Point.md) OHOS::UIAnalogClock::GetHandPosition ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const ``` **Description:** Obtains the position of a specified clock hand. **Parameters:**

Name

Description

type Indicates the clock hand type, as enumerated in HandType.
**Returns:** Returns the position of this specified clock hand. ## GetHandRotateCenter\(\) ``` [Point](OHOS-Point.md) OHOS::UIAnalogClock::GetHandRotateCenter ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type) const ``` **Description:** Obtains the rotation center of a specified clock hand. **Parameters:**

Name

Description

type Indicates the clock hand type, as enumerated in HandType.
**Returns:** Returns the rotation center. ## GetHeader\(\) ``` void OHOS::Image::GetHeader ([ImageHeader](OHOS-ImageHeader.md) & header) const ``` **Description:** Obtains the basic image information, including the image format, width, and height. **Parameters:**

Name

Description

header Indicates the basic image information.
## GetHeadPointStyle\(\) ``` const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md)& OHOS::UIChartDataSerial::GetHeadPointStyle () const ``` **Description:** Obtains the style of the frontmost point on a polyline. **Returns:** Returns the style of the point. For details, see [PointStyle](OHOS-UIChartDataSerial-PointStyle.md). ## GetHeight\(\) \[1/7\] ``` uint16_t OHOS::Screen::GetHeight () ``` **Description:** Obtains the height of this screen. **Returns:** Returns the screen height. ## GetHeight\(\) \[2/7\] ``` virtual int16_t OHOS::UIView::GetHeight () ``` **Description:** Obtains the height for the view. Reimplemented in [OHOS::UIButton](Graphic.md#ga1f8015706cfc73728696bf2bbd3e833b), [OHOS::UILabel](Graphic.md#ga148f6d32ed06364dbee0190f6ff77b59), [OHOS::UIArcLabel](Graphic.md#ga37dbe21b6a8206460136b18a2d0e3f65), and [OHOS::UIImageView](Graphic.md#gaddc6e68c67782eaad40977c6c2256cdd). **Returns:** Returns the view height. ## GetHeight\(\) \[3/7\] ``` int16_t OHOS::Rect::GetHeight () const ``` **Description:** Obtains the rectangle height. **Returns:** Returns the rectangle height. ## GetHeight\(\) \[4/7\] ``` int16_t OHOS::UIImageView::GetHeight () ``` **Description:** Obtains the height of this image view. Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). **Returns:** Returns the height of this image view. ## GetHeight\(\) \[5/7\] ``` int16_t OHOS::UIArcLabel::GetHeight () ``` **Description:** Obtains the height of this arc text. Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). **Returns:** Returns the height of this arc text. ## GetHeight\(\) \[6/7\] ``` int16_t OHOS::UILabel::GetHeight () ``` **Description:** Obtains the height of this label. Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). **Returns:** Returns the label height. ## GetHeight\(\) \[7/7\] ``` int16_t OHOS::UIButton::GetHeight () ``` **Description:** Obtains the height of this image. Reimplemented from [OHOS::UIView](Graphic.md#ga9b35f4603a561c7a9a29b023a022ac97). **Returns:** Returns the image height. ## GetHideCount\(\) ``` uint16_t OHOS::UIChartDataSerial::GetHideCount () const ``` **Description:** Obtains the number of hidden points in the data set. **Returns:** Returns the number of hidden points. **See also:** [HidePoint](Graphic.md#ga02cb658da66c73863ac2a49849e23b24) ## GetHideIndex\(\) ``` uint16_t OHOS::UIChartDataSerial::GetHideIndex () const ``` **Description:** Obtains the index from which the data set starts to hide. **Returns:** Returns the index. **See also:** [HidePoint](Graphic.md#ga02cb658da66c73863ac2a49849e23b24) ## GetHighlightFontId\(\) ``` uint16_t OHOS::UIPicker::GetHighlightFontId () const ``` **Description:** Obtains the font ID of the highlighted text. **Returns:** Returns the font ID. ## GetHighlightTextColor\(\) ``` [ColorType](OHOS-Color32.md) OHOS::UIPicker::GetHighlightTextColor () const ``` **Description:** Obtains the color of the highlighted text. **Returns:** Returns the color of the highlighted text. ## GetHorAlign\(\) \[1/3\] ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UIArcLabel::GetHorAlign () const ``` **Description:** Obtains the horizontal alignment mode. **Returns:** Returns the horizontal alignment mode. ## GetHorAlign\(\) \[2/3\] ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::Text::GetHorAlign () const ``` **Description:** Obtains the horizontal alignment mode. **Returns:** Returns the horizontal alignment mode. ## GetHorAlign\(\) \[3/3\] ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UILabel::GetHorAlign () const ``` **Description:** Obtains the horizontal alignment mode. **Returns:** Returns the horizontal alignment mode. ## GetHorizontalScrollState\(\) ``` bool OHOS::UIScrollView::GetHorizontalScrollState () const ``` **Description:** Checks whether a horizontal scroll is enabled. **Returns:** Returns **true** if a horizontal scroll is enabled; returns **false** otherwise. ## GetImageAnimatorImageNum\(\) ``` uint8_t OHOS::UIImageAnimatorView::GetImageAnimatorImageNum () const ``` **Description:** Obtains the number of images. **Returns:** Returns the number of images. ## GetImageAnimatorSrc\(\) ``` const [ImageAnimatorInfo](OHOS-ImageAnimatorInfo.md)* OHOS::UIImageAnimatorView::GetImageAnimatorSrc () const ``` **Description:** Obtains the image array of this frame animator. **Returns:** Returns a pointer to the [ImageAnimatorInfo](OHOS-ImageAnimatorInfo.md) array if the operation is successful; returns **nullptr** otherwise. ## GetImageInfo\(\) \[1/2\] ``` const [ImageInfo](OHOS-ImageInfo.md)* OHOS::Image::GetImageInfo () const ``` **Description:** Obtains the image information in an array. **Returns:** Returns the pointer to the image information. ## GetImageInfo\(\) \[2/2\] ``` const [ImageInfo](OHOS-ImageInfo.md)* OHOS::UIImageView::GetImageInfo () const ``` **Description:** 获取图片信息 **Returns:** 图片信息 ## GetImageX\(\) ``` int16_t OHOS::UIButton::GetImageX () const ``` **Description:** Obtains the x-coordinate of this image. **Returns:** Returns the x-coordinate of this image. ## GetImageY\(\) ``` int16_t OHOS::UIButton::GetImageY () const ``` **Description:** Obtains the y-coordinate of this image. **Returns:** Returns the y-coordinate of this image. ## GetInstance\(\) \[1/5\] ``` static [Screen](OHOS-Screen.md)& OHOS::Screen::GetInstance () ``` **Description:** Obtains a singleton **[Screen](OHOS-Screen.md)** instance. **Returns:** Returns the **[Screen](OHOS-Screen.md)** instance. ## GetInstance\(\) \[2/5\] ``` static [ThemeManager](OHOS-ThemeManager.md)& OHOS::ThemeManager::GetInstance () ``` **Description:** Obtains the singleton instance of the **[ThemeManager](OHOS-ThemeManager.md)** class. **Returns:** Returns the singleton instance of the **[ThemeManager](OHOS-ThemeManager.md)** class. ## GetInstance\(\) \[3/5\] ``` static [RootView](OHOS-RootView.md)* OHOS::RootView::GetInstance () ``` **Description:** Obtains a singleton **[RootView](OHOS-RootView.md)** instance. **Returns:** Returns the singleton **[RootView](OHOS-RootView.md)** instance. ## GetInstance\(\) \[4/5\] ``` static [UIDumpDomTree](OHOS-UIDumpDomTree.md)* OHOS::UIDumpDomTree::GetInstance () ``` **Description:** Obtains an instance in singleton pattern. **Returns:** Returns the function instance for exporting DOM information. ## GetInstance\(\) \[5/5\] ``` static [AnimatorManager](OHOS-AnimatorManager.md)* OHOS::AnimatorManager::GetInstance () ``` **Description:** Obtains the **[AnimatorManager](OHOS-AnimatorManager.md)** instance. **Returns:** Returns the **[AnimatorManager](OHOS-AnimatorManager.md)** instance. ## GetInterval\(\) ``` virtual uint16_t OHOS::UIRepeatButton::GetInterval () const ``` **Description:** Obtains the interval between two consecutive click events. **Returns:** Returns the interval between two consecutive click events. ## GetKeyId\(\) ``` uint16_t OHOS::KeyEvent::GetKeyId () const ``` **Description:** Obtains the key ID. ## GetKnobStyle\(\) \[1/2\] ``` const [Style](OHOS-Style.md)& OHOS::UISlider::GetKnobStyle () const ``` **Description:** Obtains the knob style. **Returns:** Returns the knob style. ## GetKnobStyle\(\) \[2/2\] ``` int64_t OHOS::UISlider::GetKnobStyle (uint8_t key) const ``` **Description:** Obtains the value of a knob style. **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetKnobWidth\(\) ``` int16_t OHOS::UISlider::GetKnobWidth () ``` **Description:** Obtains the knob width. **Returns:** Returns the knob width. **See also:** [SetKnobWidth](Graphic.md#gaf0de71e2d767ccfc3cb41679185a5529) ## GetLabelPosition\(\) ``` [Point](OHOS-Point.md) OHOS::UILabelButton::GetLabelPosition () const ``` **Description:** Obtains the position of this label relative to the button holding it. **Returns:** Returns the position of this label. ## GetLabelStyle\(\) \[1/4\] ``` [Style](OHOS-Style.md)& OHOS::Theme::GetLabelStyle () ``` **Description:** Obtains the style of this label. **Returns:** Returns the label style. ## GetLabelStyle\(\) \[2/4\] ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetLabelStyle () ``` **Description:** Obtains the label style. **Returns:** Returns the label style. ## GetLabelStyle\(\) \[3/4\] ``` const [Style](OHOS-Style.md)& OHOS::UILabelButton::GetLabelStyle () const ``` **Description:** Obtains the style of this label. **Returns:** Returns the label style. ## GetLabelStyle\(\) \[4/4\] ``` int64_t OHOS::UILabelButton::GetLabelStyle (uint8_t key) const ``` **Description:** Obtains the value of a style of this label. **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetLastPoint\(\) ``` const [Point](OHOS-Point.md)& OHOS::DragEvent::GetLastPoint () const ``` **Description:** Obtains the coordinates of the last position in the drag event. **Returns:** Returns the coordinates of the last position. ## GetLastRun\(\) ``` uint32_t OHOS::Task::GetLastRun () const ``` **Description:** Obtains the end time of this task. **Returns:** Returns the end time. ## GetLatestIndex\(\) ``` uint16_t OHOS::UIChartDataSerial::GetLatestIndex () const ``` **Description:** Obtains the index of the frontmost point \(the latest added or modified data point in a data set\). **Returns:** Returns the index of the frontmost point. ## GetLeft\(\) ``` int16_t OHOS::Rect::GetLeft () const ``` **Description:** Obtains the left boundary coordinate of the rectangle. **Returns:** Returns the left boundary coordinate. ## GetLibDsc\(\) ``` std::string OHOS::GetLibDsc () ``` **Description:** Obtains the library description of the graphics module. **Returns:** Returns the library description of the graphics module. ## GetLineBreakMode\(\) ``` uint8_t OHOS::UILabel::GetLineBreakMode () const ``` **Description:** Obtains the line break mode of this text. **Returns:** Returns the line break mode. ## GetLineColor\(\) ``` [ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::GetLineColor () const ``` **Description:** Obtains the polyline color of the data set in a line chart. **Returns:** Returns the polyline color of the data set. **See also:** [SetLineColor](Graphic.md#ga94beac0c71885b8546996271c876f999) ## GetLoopState\(\) ``` bool OHOS::UIList::GetLoopState () const ``` **Description:** Checks whether this list is in a loop state. **Returns:** Returns if the list is in the loop state; returns **false** if the list is in the common state. ## GetMainStyle\(\) ``` [Style](OHOS-Style.md)& OHOS::Theme::GetMainStyle () ``` **Description:** Obtains the basic style. **Returns:** Returns the basic style. ## GetMaskedRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::UIView::GetMaskedRect () const ``` **Description:** Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout. **Returns:** Returns the valid absolute rectangle area. ## GetMaxScrollDistance\(\) ``` uint16_t OHOS::UIAbstractScroll::GetMaxScrollDistance () const ``` **Description:** Obtains the maximum scroll distance after a finger lifts the screen. **Returns:** Returns the maximum scroll distance. The default value is **0**, indicating that the scroll distance is not limited. ## GetMixColor\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::GetMixColor ([ColorType](OHOS-Color32.md) c1, [ColorType](OHOS-Color32.md) c2, uint8_t mix ) ``` **Description:** Mixes two colors \(color 1 and color 2\) based on a specified opacity. **Parameters:**

Name

Description

c1 Indicates color 1.
c2 Indicates color 2.
mix Indicates the alpha, that is, how opaque each pixel is.
**Returns:** Returns the color data after mixing. ## GetName\(\) ``` const char* OHOS::UIRadioButton::GetName () const ``` **Description:** Obtains the name of this radio button. **Returns:** Returns the name of this radio button, which is a defined character string. Radio buttons sharing the same name are in the same batch from which only one can be selected. ## GetNextSibling\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UIView::GetNextSibling () const ``` **Description:** Obtains the next sibling view of the view. **Returns:** Returns the pointer to the next sibling view. ## GetOnClickListener\(\) ``` [OnClickListener](OHOS-UIView-OnClickListener.md)*& OHOS::UIView::GetOnClickListener () ``` **Description:** Obtains the click event listener for the view. **Returns:** Returns the click event listener. ## GetOnDragListener\(\) ``` [OnDragListener](OHOS-UIView-OnDragListener.md)*& OHOS::UIView::GetOnDragListener () ``` **Description:** Obtains the drag event listener for the view. **Returns:** Returns the drag event listener. ## GetOnLongPressListener\(\) ``` [OnLongPressListener](OHOS-UIView-OnLongPressListener.md)*& OHOS::UIView::GetOnLongPressListener () ``` **Description:** Obtains the long-press event listener for the view. **Returns:** Returns the long-press event listener. ## GetOnSwipeListener\(\) ``` [OnSwipeListener](OHOS-UISwipeView-OnSwipeListener.md)*& OHOS::UISwipeView::GetOnSwipeListener () ``` **Description:** Obtains the listener set for swipe events. **Returns:** Returns the swipe event listener. ## GetOpacity\(\) \[1/2\] ``` uint8_t OHOS::UIDigitalClock::GetOpacity () const ``` **Description:** Obtains the opacity of this digital clock. **Returns:** Returns the opacity of this digital clock, within \[0, 255\]. ## GetOpacity\(\) \[2/2\] ``` uint8_t OHOS::Paint::GetOpacity () const ``` **Description:** Obtains the opacity. **Returns:** Returns the opacity. **See also:** [SetOpacity](Graphic.md#gacd329fb89bbf6f0e3fd4f9a61f4ce60f) ## GetOrigRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::UIView::GetOrigRect () const ``` **Description:** Obtains the absolute rectangle area of the view. **Returns:** Returns the absolute rectangle area. ## GetParent\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UIView::GetParent () const ``` **Description:** Obtains the parent view of the view. **Returns:** Returns the pointer to the parent view. ## GetPath\(\) \[1/2\] ``` const char* OHOS::Image::GetPath () const ``` **Description:** Obtains the image path in binary. **Returns:** Returns the pointer to the image path. ## GetPath\(\) \[2/2\] ``` const char* OHOS::UIImageView::GetPath () const ``` **Description:** 获取图片路径 **Returns:** 图片路径 ## GetPeakData\(\) ``` int16_t OHOS::UIChartDataSerial::GetPeakData () const ``` **Description:** Obtains the Y value of the top point in a data set. The Y value is the data added by users, not the pixel coordinate. **Returns:** Returns the Y value. ## GetPeakIndex\(\) ``` uint16_t OHOS::UIChartDataSerial::GetPeakIndex () const ``` **Description:** Obtains the index of the top point in the data set. **Returns:** Returns the index of the top point. If there are multiple top points, the first one is returned. ## GetPeriod\(\) ``` uint32_t OHOS::Task::GetPeriod () const ``` **Description:** Obtains the running period of this task. **Returns:** Returns the running period. ## GetPickerBackgroundStyle\(\) \[1/2\] ``` [Style](OHOS-Style.md)& OHOS::Theme::GetPickerBackgroundStyle () ``` **Description:** Obtains the background style of this picker. **Returns:** Returns the background style of this picker. ## GetPickerBackgroundStyle\(\) \[2/2\] ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetPickerBackgroundStyle () ``` **Description:** Obtains the picker background style. **Returns:** Returns the picker background style. ## GetPickerHighlightStyle\(\) \[1/2\] ``` [Style](OHOS-Style.md)& OHOS::Theme::GetPickerHighlightStyle () ``` **Description:** Obtains the highlight style of this picker. **Returns:** Returns the highlight style of this picker. ## GetPickerHighlightStyle\(\) \[2/2\] ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetPickerHighlightStyle () ``` **Description:** Obtains the picker highlight style. **Returns:** Returns the picker highlight style. ## GetPivot\(\) ``` [Point](OHOS-Point.md) OHOS::TransformMap::GetPivot () const ``` **Description:** Obtains the pivot for the rotation or scaling operation. **Returns:** Returns the pivot. ## GetPoint\(\) ``` bool OHOS::UIChartDataSerial::GetPoint (uint16_t index, [Point](OHOS-Point.md) & point ) ``` **Description:** Obtains the coordinates in the chart for a data point in the data set. **Parameters:**

Name

Description

index Indicates the index of the data point to obtain.
point Indicates the obtained coordinates. If the data set is not added to the chart, the original value of the data point is printed.
**Returns:** Returns **true** if the operation is successful; returns **false** otherwise. ## GetPolygon\(\) ``` [Polygon](OHOS-Polygon.md) OHOS::TransformMap::GetPolygon () const ``` **Description:** Obtains the polygon after rectangle transformation. **Returns:** Returns the polygon. ## GetPreLastPoint\(\) ``` const [Point](OHOS-Point.md)& OHOS::DragEvent::GetPreLastPoint () const ``` **Description:** Obtains the coordinates of the stay position before the last position in the drag event. **Returns:** Returns the coordinates of the stay position. ## GetProgressBackgroundStyle\(\) \[1/2\] ``` [Style](OHOS-Style.md)& OHOS::Theme::GetProgressBackgroundStyle () ``` **Description:** Obtains the background style of this progress bar. **Returns:** Returns the background style of this progress bar. ## GetProgressBackgroundStyle\(\) \[2/2\] ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetProgressBackgroundStyle () ``` **Description:** Obtains the progress background style. **Returns:** Returns the progress background style. ## GetProgressForegroundStyle\(\) \[1/2\] ``` [Style](OHOS-Style.md)& OHOS::Theme::GetProgressForegroundStyle () ``` **Description:** Obtains the foreground style of this progress bar. **Returns:** Returns the foreground style of this progress bar. ## GetProgressForegroundStyle\(\) \[2/2\] ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetProgressForegroundStyle () ``` **Description:** Obtains the progress foreground style. **Returns:** Returns the progress foreground style. ## GetRadius\(\) ``` uint16_t OHOS::UICircleProgress::GetRadius () const ``` **Description:** Obtains the outer radius of this circular progress bar. **Returns:** Returns the outer radius. **See also:** [SetRadius](Graphic.md#ga80377fb579f6698cefd5fcf74d0cde46) ## GetRangeMax\(\) ``` int16_t OHOS::UIAbstractProgress::GetRangeMax () const ``` **Description:** Obtains the maximum value of this progress bar. **Returns:** Returns the maximum value of this progress bar. **See also:** [SetRange](Graphic.md#ga089e3875453011499ad33ed89a44a699) | [GetRangeMin](Graphic.md#ga68ab733afcf4224a799ccad2092d1d23) ## GetRangeMin\(\) ``` int16_t OHOS::UIAbstractProgress::GetRangeMin () const ``` **Description:** Obtains the minimum value of this progress bar. **Returns:** Returns the minimum value of this progress bar. **See also:** [SetRange](Graphic.md#ga089e3875453011499ad33ed89a44a699) | [GetRangeMax](Graphic.md#ga1840199f22d5d3e4ef58e41ac8f4febc) ## GetRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::UIView::GetRect () const ``` **Description:** Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix. **Returns:** Returns the absolute rectangle area. ## GetRelativeRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::UIView::GetRelativeRect () const ``` **Description:** Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view. **Returns:** Returns the rectangle area relative to the parent view. ## GetRepeatTimes\(\) ``` uint32_t OHOS::UIImageAnimatorView::GetRepeatTimes () const ``` **Description:** Obtains the playback times. **Returns:** Returns the playback times. **See also:** [SetRepeatTimes](Graphic.md#ga8d0a02c46af6bea17323c715620b6212) ## GetRight\(\) ``` int16_t OHOS::Rect::GetRight () const ``` **Description:** Obtains the right boundary coordinate of the rectangle. **Returns:** Returns the right boundary coordinate. ## GetRollStartPos\(\) ``` int16_t OHOS::UILabel::GetRollStartPos () const ``` **Description:** Obtains the position where this text starts to roll. **Returns:** Returns the position where this text starts to roll. ## GetRunTime\(\) ``` uint32_t OHOS::Animator::GetRunTime () const ``` **Description:** Obtains the running time of this animator. **Returns:** Returns the running time. **See also:** [SetRunTime](Graphic.md#ga4d5ff5057df28da1bc99d08070312f24) ## GetScrollState\(\) \[1/2\] ``` uint8_t OHOS::UIScrollView::OnScrollListener::GetScrollState () const ``` **Description:** Obtains the scroll state of this view. **Returns:** Returns the scroll state, either **SCROLL\_STATE\_STOP** or **SCROLL\_STATE\_MOVE**. ## GetScrollState\(\) \[2/2\] ``` uint8_t OHOS::ListScrollListener::GetScrollState () const ``` **Description:** Obtains the scroll state of this list. **Returns:** Returns the scroll state, either **SCROLL\_STATE\_STOP** or **SCROLL\_STATE\_MOVE**. ## GetSelected\(\) ``` uint16_t OHOS::UIPicker::GetSelected () const ``` **Description:** Obtains the index of the item currently selected in the picker. **Returns:** Returns the index. ## GetSelectHour\(\) ``` const char* OHOS::UITimePicker::GetSelectHour () const ``` **Description:** Obtains the hour currently selected in the time picker. **Returns:** Returns a string representing the selected hour, for example, 10. ## GetSelectMinute\(\) ``` const char* OHOS::UITimePicker::GetSelectMinute () const ``` **Description:** Obtains the minute currently selected in the time picker. **Returns:** Returns a string representing the selected minute, for example, 12. ## GetSelectSecond\(\) ``` const char* OHOS::UITimePicker::GetSelectSecond () const ``` **Description:** Obtains the second currently selected in the time picker. **Returns:** Returns a string representing the selected second, for example, 50. ## GetSelectValue\(\) ``` const char* OHOS::UITimePicker::GetSelectValue () ``` **Description:** Obtains the time currently selected in the time picker. **Returns:** Returns a string representing the selected time. The time is in the format of "hour:minute:second", for example, 10:12:50. The second is optional and depends on the setting of [EnableSecond](Graphic.md#gaa2402a0538f08fb4d6857c356be7699c). ## GetSelectView\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UIList::GetSelectView () ``` **Description:** Obtains the child view being selected at the preset position. **Returns:** Returns the child view if available; returns **NULL** if no child view is selected or no position is set. ## GetSize\(\) ``` uint32_t OHOS::Rect::GetSize () const ``` **Description:** Obtains the area of a rectangle. **Returns:** Returns the area of the rectangle. ## GetSliderKnobStyle\(\) \[1/2\] ``` [Style](OHOS-Style.md)& OHOS::Theme::GetSliderKnobStyle () ``` **Description:** Obtains the style of this slider knob. **Returns:** Returns the style of this slider knob. ## GetSliderKnobStyle\(\) \[2/2\] ``` static [Style](OHOS-Style.md)& OHOS::StyleDefault::GetSliderKnobStyle () ``` **Description:** Obtains the slider knob style. **Returns:** Returns the slider knob style. ## GetSrcType\(\) \[1/2\] ``` uint8_t OHOS::Image::GetSrcType () const ``` **Description:** Obtains the image type. **Returns:** Returns **IMG\_SRC\_VARIABLE** for image information in an array; returns **IMG\_SRC\_FILE** for an image path in binary. ## GetSrcType\(\) \[2/2\] ``` uint8_t OHOS::UIImageView::GetSrcType () const ``` **Description:** 获取图片类型 **Returns:** 图片类型 ## GetStartAngle\(\) ``` int16_t OHOS::UICircleProgress::GetStartAngle () const ``` **Description:** Obtains the start angle. **Returns:** Returns the start angle. **See also:** [SetStartAngle](Graphic.md#gae27e30bd77b83bc55ecc9f2a5643943a) ## GetStartIndex\(\) ``` uint16_t OHOS::UIList::GetStartIndex () const ``` **Description:** Obtains the start index of this list. The default value is **0**. **Returns:** Returns the start index. ## GetStartPoint\(\) ``` const [Point](OHOS-Point.md)& OHOS::DragEvent::GetStartPoint () const ``` **Description:** Obtains the start coordinates in the drag event. **Returns:** Returns the start coordinates. ## GetStartPosition\(\) ``` const [Point](OHOS-Point.md)& OHOS::UICanvas::GetStartPosition () const ``` **Description:** Obtains the coordinates of the start point of a line. **Returns:** Returns the coordinates of the start point. **See also:** [SetStartPosition](Graphic.md#gaca35fe1a1d344eab80ecb1425a74a91a) ## GetState\(\) \[1/6\] ``` uint16_t OHOS::KeyEvent::GetState () const ``` **Description:** Obtains the key state. ## GetState\(\) \[2/6\] ``` uint16_t OHOS::VirtualDeviceEvent::GetState () const ``` **Description:** Obtains the state of the virtual event. **Returns:** Returns the state. ## GetState\(\) \[3/6\] ``` bool OHOS::UIToggleButton::GetState () const ``` **Description:** Obtains the state of this toggle button. **Returns:** Returns **true** if the image for **On** is displayed; returns **false** if the image is displayed for **Off**. ## GetState\(\) \[4/6\] ``` uint8_t OHOS::Animator::GetState () const ``` **Description:** Obtains the current state of this animator. **Returns:** Returns the current animator state, which can be [START](Graphic.md#gga7b892afa4e88ab11bf96dbd67653f134a49f9e652157f467df5de3be9e8758f91), [STOP](Graphic.md#gga7b892afa4e88ab11bf96dbd67653f134a6618a5c1c0e9e4be3acba1aaee15cb8d), or [PAUSE](Graphic.md#gga7b892afa4e88ab11bf96dbd67653f134ae5db6c9a921eec21a2990d73400ff507). **See also:** [SetState](Graphic.md#gab8ec3815f5e42605a51a328c1b0857dd) ## GetState\(\) \[5/6\] ``` [UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) OHOS::UICheckBox::GetState () const ``` **Description:** Obtains the state of this check box. **Returns:** Returns the state of this check box, as defined in [UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d). ## GetState\(\) \[6/6\] ``` uint8_t OHOS::UIImageAnimatorView::GetState () const ``` **Description:** Obtains the current state of this animator. **Returns:** Returns the current state, which can be **START**, **STOP**, or **PAUSE**. For details, see [Animator](OHOS-Animator.md). ## GetStep\(\) ``` uint16_t OHOS::UIAbstractProgress::GetStep () const ``` **Description:** Obtains the current step of this progress bar. **Returns:** Returns the current step. **See also:** [SetStep](Graphic.md#ga747a29652b441a06d09a97a297aae9bb) ## GetStrokeColor\(\) ``` [ColorType](OHOS-Color32.md) OHOS::Paint::GetStrokeColor () const ``` **Description:** Obtains the color of a line or border. **Returns:** Returns the line color if a line is drawn or the border color if a closed graph is drawn. **See also:** [SetStrokeWidth](Graphic.md#gad56b6b014e1d061ba93ba8e6c135b90a) ## GetStrokeWidth\(\) ``` uint16_t OHOS::Paint::GetStrokeWidth () const ``` **Description:** Obtains the width of a line or border. **Returns:** Returns the line width if a line is drawn or the border width if a closed graph is drawn. **See also:** [SetStrokeWidth](Graphic.md#gad56b6b014e1d061ba93ba8e6c135b90a) ## GetStyle\(\) \[1/5\] ``` [Style](OHOS-Style.md)& OHOS::TextAdapter::GetStyle () ``` **Description:** Obtains the [UILabel](OHOS-UILabel.md) adapter style. **Returns:** Returns the [UILabel](OHOS-UILabel.md) adapter style. ## GetStyle\(\) \[2/5\] ``` [PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a) OHOS::Paint::GetStyle () const ``` **Description:** Obtains the paint style of a closed graph. **Returns:** Returns the paint style. For details, see [PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a). **See also:** [SetStyle](Graphic.md#gab93dc15f466a656150e62d7620d34333) ## GetStyle\(\) \[3/5\] ``` int64_t OHOS::Style::GetStyle (uint8_t key) const ``` **Description:** Obtains the value of a style. **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetStyle\(\) \[4/5\] ``` virtual int64_t OHOS::UIView::GetStyle (uint8_t key) const ``` **Description:** Obtains the value of a style. Reimplemented in [OHOS::UIButton](Graphic.md#ga37736a82bec6a01bc5a880e1d01ccccd). **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetStyle\(\) \[5/5\] ``` int64_t OHOS::UIButton::GetStyle (uint8_t key) const ``` **Description:** Obtains the value of a style. Reimplemented from [OHOS::UIView](Graphic.md#ga4ea19bc9f4b487946c9e29e63b54a0e6). **Parameters:**

Name

Description

key Indicates the key of the style.
**Returns:** Returns the value of the style. ## GetStyleConst\(\) ``` const [Style](OHOS-Style.md)& OHOS::UIView::GetStyleConst () const ``` **Description:** Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory. **Returns:** Returns the view style. ## GetStyleForState\(\) ``` int64_t OHOS::UIButton::GetStyleForState (uint8_t key, [ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) state ) const ``` **Description:** Obtains the style of a button in a specific state. **Parameters:**

Name

Description

key Indicates the key of the style.
state Indicates the button state, as enumerated in ButtonState.
**Returns:** Returns the style of the button in the specific state. ## GetSurface\(\) ``` [Surface](OHOS-Surface.md)* OHOS::UISurfaceView::GetSurface () const ``` **Description:** Obtains the surface, which should be used together with the camera and video modules. **Returns:** Returns the surface. ## GetSwipeACCLevel\(\) ``` uint8_t OHOS::UIAbstractScroll::GetSwipeACCLevel () const ``` **Description:** Obtains the compensation distance after a finger lifts the screen. **Returns:** Returns the compensation distance. ## GetTargetView\(\) \[1/2\] ``` virtual void OHOS::UIView::GetTargetView (const [Point](OHOS-Point.md) & point, [UIView](OHOS-UIView.md) ** last ) ``` **Description:** Obtains the top-level view based on specified coordinates. Reimplemented in [OHOS::UIViewGroup](Graphic.md#ga7ea54fc6ef3a8b7dec1bf88ab189f7c7). **Parameters:**

Name

Description

point Indicates the coordinates to specify.
last Indicates the double pointer to the view that contains the specified coordinates.
## GetTargetView\(\) \[2/2\] ``` virtual void OHOS::UIViewGroup::GetTargetView (const [Point](OHOS-Point.md) & point, [UIView](OHOS-UIView.md) ** last ) ``` **Description:** Obtains the target child view that is visible and can respond to touch events based on given coordinates. Reimplemented from [OHOS::UIView](Graphic.md#gaea9f334f2481e1c03a2cd8f3078d7c72). **Parameters:**

Name

Description

point Indicates the given coordinates.
last Indicates the double pointer to the target view. nullptr indicates that the target view is not available.
## GetText\(\) \[1/4\] ``` const char* OHOS::UILabelButton::GetText () const ``` **Description:** Obtains the text of this label button. **Returns:** Returns the text. ## GetText\(\) \[2/4\] ``` const char* OHOS::Text::GetText () const ``` **Description:** Obtains the content of this text. **Returns:** Returns the text content. ## GetText\(\) \[3/4\] ``` const char* OHOS::UIArcLabel::GetText () const ``` **Description:** Obtains the text of this arc label. **Returns:** Returns the text. ## GetText\(\) \[4/4\] ``` const char* OHOS::UILabel::GetText () const ``` **Description:** Obtains the text of this label. **Returns:** Returns the text. ## GetTextColor\(\) ``` [ColorType](OHOS-Color32.md) OHOS::UILabel::GetTextColor () const ``` **Description:** Obtains the color of this text. **Returns:** Returns the text color. ## GetTextHeight\(\) ``` uint16_t OHOS::UILabel::GetTextHeight () ``` **Description:** Obtains the height of this text. **Returns:** Returns the text height. ## GetTextRotateDegree\(\) \[1/2\] ``` uint16_t OHOS::Text::GetTextRotateDegree () const ``` **Description:** Obtains the number of text rotation degrees. **Returns:** Returns the number of text rotation degrees. ## GetTextRotateDegree\(\) \[2/2\] ``` uint16_t OHOS::UILabel::GetTextRotateDegree () const ``` **Description:** Obtains the number of text rotation degrees. **Returns:** Returns the number of text rotation degrees. ## GetTextRotation\(\) \[1/2\] ``` LabelRotateDegree OHOS::Text::GetTextRotation () const ``` **Description:** Obtains the clockwise rotation degree of this text. **Returns:** Returns the rotation degree, as defined in **LabelRotateDegree**. ## GetTextRotation\(\) \[2/2\] ``` LabelRotateDegree OHOS::UILabel::GetTextRotation () const ``` **Description:** Obtains the clockwise rotation degree of this text. **Returns:** Returns the rotation degree, as defined in **LabelRotateDegree**. ## GetTextSize\(\) ``` [Point](OHOS-Point.md) OHOS::Text::GetTextSize () const ``` **Description:** Obtains the size of this text. **Returns:** Returns the text size. ## GetTextWidth\(\) ``` uint16_t OHOS::UILabel::GetTextWidth () ``` **Description:** Obtains the width of this text. **Returns:** Returns the text width. ## GetTime\(\) ``` uint32_t OHOS::Animator::GetTime () const ``` **Description:** Obtains the total duration of this animator. **Returns:** Returns the total duration. **See also:** [SetTime](Graphic.md#ga5a2bfa5fb257b2116d08ad5ae254327c) ## GetTimeOfPause\(\) ``` uint16_t OHOS::UIImageAnimatorView::GetTimeOfPause () const ``` **Description:** Obtains the interval between two playbacks of an infinitely repeated animator. **Returns:** Returns the interval between two playbacks, in milliseconds. **See also:** [SetTimeOfPause](Graphic.md#gad4bd7aaf1100aac86a2cde8728ae8ee0) ## GetTimeOfUpdate\(\) ``` uint16_t OHOS::UIImageAnimatorView::GetTimeOfUpdate () const ``` **Description:** Obtains the speed of this animator. **Returns:** Returns the interval for updating images, in milliseconds. **See also:** [SetTimeOfUpdate](Graphic.md#ga0ee52a2ca252957199034c1234dc4f64) ## GetTimeStamp\(\) ``` const TimeType& OHOS::Event::GetTimeStamp () const ``` **Description:** Obtains the timestamp when an event occurs. **Returns:** Returns the timestamp. ## GetTop\(\) ``` int16_t OHOS::Rect::GetTop () const ``` **Description:** Obtains the top boundary coordinate of the rectangle. **Returns:** Returns the top boundary coordinate. ## GetTopPointStyle\(\) ``` const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md)& OHOS::UIChartDataSerial::GetTopPointStyle () const ``` **Description:** Obtains the style of the top point of a polyline. **Returns:** Returns the style of the point. For details, see [PointStyle](OHOS-UIChartDataSerial-PointStyle.md). ## GetTouchListener\(\) ``` [OnTouchListener](OHOS-UIView-OnTouchListener.md)*& OHOS::UIView::GetTouchListener () ``` **Description:** Obtains the touch event listener for the view. **Returns:** Returns the touch event listener. ## GetTransformAlgorithm\(\) ``` TransformAlgorithm OHOS::UIImageView::GetTransformAlgorithm () const ``` **Description:** Obtains the algorithm used for image rotation and scaling. **Returns:** Returns the image transform algorithm, as defined in **TransformAlgorithm**. ## GetTransformMap\(\) ``` [TransformMap](OHOS-TransformMap.md)& OHOS::UIView::GetTransformMap () ``` **Description:** Obtains an affine transformation matrix. **Returns:** Returns the transform matrix. ## GetType\(\) ``` uint16_t OHOS::VirtualDeviceEvent::GetType () const ``` **Description:** Obtains the type of the virtual device. **Returns:** Returns the type. ## GetValidHeight\(\) ``` int16_t OHOS::UIBoxProgress::GetValidHeight () const ``` **Description:** Obtains the actual height of this progress bar. **Returns:** Returns the actual height of this progress bar. **See also:** [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) ## GetValidWidth\(\) ``` int16_t OHOS::UIBoxProgress::GetValidWidth () const ``` **Description:** Obtains the actual width of this progress bar. **Returns:** Returns the actual width of this progress bar. **See also:** [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) ## GetValleyData\(\) ``` int16_t OHOS::UIChartDataSerial::GetValleyData () const ``` **Description:** Obtains the Y value of the bottom point in a data set. The Y value is the data added by users, not the pixel coordinate. **Returns:** Returns the Y value. ## GetValleyIndex\(\) ``` uint16_t OHOS::UIChartDataSerial::GetValleyIndex () const ``` **Description:** Obtains the index of the bottom point in a data set. **Returns:** Returns the index of the bottom point. If there are multiple bottom points, the first one is returned. ## GetValue\(\) ``` int16_t OHOS::UIAbstractProgress::GetValue () const ``` **Description:** Obtains the current value of this progress bar. **Returns:** Returns the current value of this progress bar. **See also:** [SetValue](Graphic.md#ga5f65014431a6489ffa1d4949f9c4449b) ## GetVerAlign\(\) \[1/2\] ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::Text::GetVerAlign () const ``` **Description:** Obtains the vertical alignment mode. **Returns:** Returns the vertical alignment mode. ## GetVerAlign\(\) \[2/2\] ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UILabel::GetVerAlign () const ``` **Description:** Obtains the vertical alignment mode. **Returns:** Returns the vertical alignment mode. ## GetVersion\(\) ``` std::string OHOS::GetVersion () ``` **Description:** Obtains the version number of the graphics module. **Returns:** Returns the version number of the graphics module. ## GetVertexNum\(\) ``` uint8_t OHOS::Polygon::GetVertexNum () const ``` **Description:** Obtains the number of vertices of the polygon. **Returns:** Returns the number of vertices. ## GetVerticalScrollState\(\) ``` bool OHOS::UIScrollView::GetVerticalScrollState () const ``` **Description:** Checks whether a vertical scroll is enabled. **Returns:** Returns **true** if a vertical scroll is enabled, returns **false** otherwise. ## GetView\(\) \[1/2\] ``` [UIView](OHOS-UIView.md)* OHOS::TextAdapter::GetView ([UIView](OHOS-UIView.md) * inView, int16_t index ) ``` **Description:** Obtains a **[UILabel](OHOS-UILabel.md)** instance to convert adapter data into another **[UILabel](OHOS-UILabel.md)** instance. Implements [OHOS::AbstractAdapter](Graphic.md#gab155b2f4a6d8fd97755dcd1e6d3d8361). **Parameters:**

Name

Description

inView Indicates the pointer to the reusable instance. If this parameter is not NULL, a reusable UILabel instance is available. In this case, this function does not need to create a new UILabel instance, just resusing the instance specified by inView to update the inView data. If this parameter is NULL, there is no resuable UIView instance. In this case, this function needs to create a new UILabel instance.
index Indicates the adapter data index.
**Returns:** Returns the address of the **[UILabel](OHOS-UILabel.md)** instance constructed by the adapter. ## GetView\(\) \[2/2\] ``` virtual [UIView](OHOS-UIView.md)* OHOS::AbstractAdapter::GetView ([UIView](OHOS-UIView.md) * inView, int16_t index ) ``` **Description:** Obtains a **[UIView](OHOS-UIView.md)** instance to convert adapter data into another **[UIView](OHOS-UIView.md)** instance. Implemented in [OHOS::TextAdapter](Graphic.md#ga733211ca13eccff628bb2712c27b885e). **Parameters:**

Name

Description

inView Indicates the pointer to the reusable instance. If this parameter is not NULL, a reusable UIView instance is available. In this case, this function does not need to create a new UIView instance, just reusing the instance specified by inView to update the inView data. If this parameter is NULL, there is no reusable UIView instance. In this case, this function needs to create a new UIView instance.
index Indicates the adapter data index.
**Returns:** [UIView](OHOS-UIView.md) Returns the pointer to the **[UIView](OHOS-UIView.md)** instance constructed by the adapter. ## GetViewByIndex\(\) ``` [UIView](OHOS-UIView.md)* OHOS::UISwipeView::GetViewByIndex (uint16_t index) const ``` **Description:** Obtains a view based on its index. **Parameters:**

Name

Description

Indicates the index of a view.
**Returns:** Returns the view. ## GetViewId\(\) ``` const char* OHOS::UIView::GetViewId () const ``` **Description:** Obtains the view ID. **Returns:** Returns the pointer to the view ID. ## GetViewIndex\(\) ``` int16_t OHOS::UIView::GetViewIndex () const ``` **Description:** Obtains the view index. **Returns:** Returns the view index. ## GetViewType\(\) \[1/31\] ``` virtual UIViewType OHOS::UIView::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented in [OHOS::UIChart](Graphic.md#gaea65298b6e4a71a2de65c13e1b14ed7b), [OHOS::UICanvas](Graphic.md#ga467faebb78b4c4a753eaa44b772f0905), [OHOS::UIAnalogClock](Graphic.md#ga2f5123df8cbcc4f55c5192acbe30ba0d), [OHOS::UIList](Graphic.md#ga6e11e5de67f87ed6cf6c44f60b7d4096), [OHOS::UIScrollView](Graphic.md#ga1feefd393c568a12ec4e877e207d598c), [OHOS::RootView](Graphic.md#ga7b96c15cdbe0edd5045e479b3b2fe1eb), [OHOS::UICheckBox](Graphic.md#ga6820cef1fb685db5796670ca56b6aace), [OHOS::UILabel](Graphic.md#gaebb514dc68a761c444af0e0e89dfcb6f), [OHOS::UIAbstractClock](Graphic.md#ga8f7edc9e099688b4fd2b3ed3171eac58), [OHOS::UISwipeView](Graphic.md#ga71ae0dd892d8d9b8d277ba2b5572182d), [OHOS::UIDialog](Graphic.md#gac0b18fe28ee4ad44814d3897d3cd5c05), [OHOS::UIBoxProgress](Graphic.md#gaa2d380d48776748583f51297715af0b5), [OHOS::UIImageAnimatorView](Graphic.md#ga831167c9f5000af808638eac56d6ec19), [OHOS::UIButton](Graphic.md#gad19f55fb0de64f3f39485292d0629dc7), [OHOS::UIRadioButton](Graphic.md#ga2efe6a87345903726c721fc7a9ed4365), [OHOS::UIArcLabel](Graphic.md#ga2ebe9b09e69cd04b00db686dbec8c32c), [OHOS::UILabelButton](Graphic.md#ga7064f161dbf0e539bd089db62339cad8), [OHOS::UIToggleButton](Graphic.md#gaeb2bf2bfa7b5f229a151bec4fd046b40), [OHOS::UIRepeatButton](Graphic.md#gac391336aedd68659b7f76bee59eba521), [OHOS::UISlider](Graphic.md#gac2070526833718284148689678c542a9), [OHOS::UIViewGroup](Graphic.md#gad5756764839a844ee9bee0c186798029), [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65), [OHOS::UIAxis](Graphic.md#ga2f46b702f1543c5076a8957a94a780d3), [OHOS::UICircleProgress](Graphic.md#gab1d8fc06d4a73db344efd271d68a62e6), [OHOS::UIDigitalClock](Graphic.md#ga567a8195e8520b74b682de697cfe1d90), [OHOS::UITextureMapper](Graphic.md#ga5cb1566d1fdd815004a37349dc458203), [OHOS::UIAbstractProgress](Graphic.md#ga79885b87d1935947f6980ae56f139083), [OHOS::UIImageView](Graphic.md#ga5dc99855271c582e960e0952cca8227c), [OHOS::UIPicker](Graphic.md#ga926337be55785de0b32ad57d7ee85c5c), and [OHOS::UITimePicker](Graphic.md#gaf4770cfad2f6368b22e9ea581b12aefa). **Returns:** Returns the view type. ## GetViewType\(\) \[2/31\] ``` UIViewType OHOS::UITimePicker::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type. For details, see **UIViewType**. ## GetViewType\(\) \[3/31\] ``` UIViewType OHOS::UIImageView::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). Reimplemented in [OHOS::UITextureMapper](Graphic.md#ga5cb1566d1fdd815004a37349dc458203). **Returns:** Returns **UI\_IMAGE\_VIEW**, as defined in **UIViewType**. ## GetViewType\(\) \[4/31\] ``` UIViewType OHOS::UIPicker::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type. For details, see **UIViewType**. ## GetViewType\(\) \[5/31\] ``` UIViewType OHOS::UIAbstractProgress::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). Reimplemented in [OHOS::UIBoxProgress](Graphic.md#gaa2d380d48776748583f51297715af0b5), [OHOS::UISlider](Graphic.md#gac2070526833718284148689678c542a9), and [OHOS::UICircleProgress](Graphic.md#gab1d8fc06d4a73db344efd271d68a62e6). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[6/31\] ``` UIViewType OHOS::UIDigitalClock::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIAbstractClock](Graphic.md#ga8f7edc9e099688b4fd2b3ed3171eac58). **Returns:** Returns **UI\_DIGITAL\_CLOCK**, as defined in **UIViewType**. ## GetViewType\(\) \[7/31\] ``` UIViewType OHOS::UIAxis::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type. For details, see **UIViewType**. ## GetViewType\(\) \[8/31\] ``` UIViewType OHOS::UIAbstractScroll::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). Reimplemented in [OHOS::UIList](Graphic.md#ga6e11e5de67f87ed6cf6c44f60b7d4096), [OHOS::UIScrollView](Graphic.md#ga1feefd393c568a12ec4e877e207d598c), and [OHOS::UISwipeView](Graphic.md#ga71ae0dd892d8d9b8d277ba2b5572182d). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[9/31\] ``` UIViewType OHOS::UITextureMapper::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIImageView](Graphic.md#ga5dc99855271c582e960e0952cca8227c). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[10/31\] ``` UIViewType OHOS::UICircleProgress::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIAbstractProgress](Graphic.md#ga79885b87d1935947f6980ae56f139083). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[11/31\] ``` UIViewType OHOS::UIViewGroup::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns **UI\_VIEW\_GROUP**, as defined in **UIViewType**. ## GetViewType\(\) \[12/31\] ``` UIViewType OHOS::UIRepeatButton::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UIButton](Graphic.md#gad19f55fb0de64f3f39485292d0629dc7). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[13/31\] ``` UIViewType OHOS::UISlider::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIBoxProgress](Graphic.md#gaa2d380d48776748583f51297715af0b5). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[14/31\] ``` UIViewType OHOS::UIToggleButton::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UICheckBox](Graphic.md#ga6820cef1fb685db5796670ca56b6aace). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[15/31\] ``` UIViewType OHOS::UILabelButton::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIButton](Graphic.md#gad19f55fb0de64f3f39485292d0629dc7). **Returns:** Returns **UI\_LABEL\_BUTTON**, as defined in **UIViewType**. ## GetViewType\(\) \[16/31\] ``` UIViewType OHOS::UIArcLabel::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns **UI\_ARC\_LABEL**, as defined in \{link UIViewType\}. ## GetViewType\(\) \[17/31\] ``` UIViewType OHOS::UIRadioButton::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UICheckBox](Graphic.md#ga6820cef1fb685db5796670ca56b6aace). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[18/31\] ``` UIViewType OHOS::UIButton::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). Reimplemented in [OHOS::UILabelButton](Graphic.md#ga7064f161dbf0e539bd089db62339cad8), and [OHOS::UIRepeatButton](Graphic.md#gac391336aedd68659b7f76bee59eba521). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[19/31\] ``` UIViewType OHOS::UIImageAnimatorView::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[20/31\] ``` UIViewType OHOS::UIBoxProgress::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIAbstractProgress](Graphic.md#ga79885b87d1935947f6980ae56f139083). Reimplemented in [OHOS::UISlider](Graphic.md#gac2070526833718284148689678c542a9). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[21/31\] ``` UIViewType OHOS::UIDialog::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[22/31\] ``` UIViewType OHOS::UISwipeView::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[23/31\] ``` UIViewType OHOS::UIAbstractClock::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga2f5123df8cbcc4f55c5192acbe30ba0d), and [OHOS::UIDigitalClock](Graphic.md#ga567a8195e8520b74b682de697cfe1d90). **Returns:** Returns **UI\_ABSTRACT\_CLOCK**, as defined in **UIViewType**. ## GetViewType\(\) \[24/31\] ``` UIViewType OHOS::UILabel::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns **UI\_LABEL**, as defined in **UIViewType**. ## GetViewType\(\) \[25/31\] ``` UIViewType OHOS::UICheckBox::GetViewType () const ``` **Description:** Obtains the component type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). Reimplemented in [OHOS::UIRadioButton](Graphic.md#ga2efe6a87345903726c721fc7a9ed4365), and [OHOS::UIToggleButton](Graphic.md#gaeb2bf2bfa7b5f229a151bec4fd046b40). **Returns:** Returns the component type, as defined in **UIViewType**. ## GetViewType\(\) \[26/31\] ``` UIViewType OHOS::RootView::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns **UI\_ROOT\_VIEW**, as defined in **UIViewType**. ## GetViewType\(\) \[27/31\] ``` UIViewType OHOS::UIScrollView::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[28/31\] ``` UIViewType OHOS::UIList::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#gaeb9e84901b38ef75fa650fc5a27ffc65). **Returns:** Returns the view type, as defined in **UIViewType**. ## GetViewType\(\) \[29/31\] ``` UIViewType OHOS::UIAnalogClock::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIAbstractClock](Graphic.md#ga8f7edc9e099688b4fd2b3ed3171eac58). **Returns:** Returns **UI\_ANALOG\_CLOCK**, as defined in **UIViewType**. ## GetViewType\(\) \[30/31\] ``` UIViewType OHOS::UICanvas::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type. For details, see **UIViewType**. ## GetViewType\(\) \[31/31\] ``` UIViewType OHOS::UIChart::GetViewType () const ``` **Description:** Obtains the view type. Reimplemented from [OHOS::UIView](Graphic.md#ga6d23780da1faa1071197b716bca365e0). **Returns:** Returns the view type. For details, see **UIViewType**. ## GetVisibleRect\(\) ``` [Rect](OHOS-Rect.md) OHOS::UIView::GetVisibleRect () const ``` **Description:** Obtains the visible absolute rectangle area of the view. **Returns:** Returns the visible absolute rectangle area. ## GetWidth\(\) \[1/7\] ``` uint16_t OHOS::Screen::GetWidth () ``` **Description:** Obtains the width of this screen. **Returns:** Returns the screen width. ## GetWidth\(\) \[2/7\] ``` virtual int16_t OHOS::UIView::GetWidth () ``` **Description:** Obtains the width for the view. Reimplemented in [OHOS::UIButton](Graphic.md#ga8cb74b23f740091e59ad350a8dea436b), [OHOS::UILabel](Graphic.md#ga95bc777cda044ada4401d9c5900226c6), [OHOS::UIArcLabel](Graphic.md#gae2348ef2f06893325ca3366856657199), and [OHOS::UIImageView](Graphic.md#ga20ea7dd2d8ddb16cf9750ccdcc2a2803). **Returns:** Returns the view width. ## GetWidth\(\) \[3/7\] ``` int16_t OHOS::Rect::GetWidth () const ``` **Description:** Obtains the rectangle width. **Returns:** Returns the rectangle width. ## GetWidth\(\) \[4/7\] ``` int16_t OHOS::UIImageView::GetWidth () ``` **Description:** Obtains the width of this image view. Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). **Returns:** Returns the width of this image view. ## GetWidth\(\) \[5/7\] ``` int16_t OHOS::UIArcLabel::GetWidth () ``` **Description:** Obtains the width of this arc text. Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). **Returns:** Returns the width of this arc text. ## GetWidth\(\) \[6/7\] ``` int16_t OHOS::UILabel::GetWidth () ``` **Description:** Obtains the width of this label. Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). **Returns:** Returns the label width. ## GetWidth\(\) \[7/7\] ``` int16_t OHOS::UIButton::GetWidth () ``` **Description:** Obtains the width of this image. Reimplemented from [OHOS::UIView](Graphic.md#ga90cf8cffb98d71c30d6fc1d118442dbd). **Returns:** Returns the image width. ## GetWorkMode\(\) ``` virtual [WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) OHOS::UIAbstractClock::GetWorkMode () const ``` **Description:** Obtains the working mode of this clock. **Returns:** Returns the working mode, as defined in [WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98). ## GetX\(\) \[1/2\] ``` int16_t OHOS::Rect::GetX () const ``` **Description:** Obtains the left boundary coordinate of the rectangle. **Returns:** Returns the left boundary coordinate. ## GetX\(\) \[2/2\] ``` int16_t OHOS::UIView::GetX () const ``` **Description:** Obtains the x-coordinate for the view. **Returns:** Returns the x-coordinate. ## GetXAxis\(\) ``` [UIXAxis](OHOS-UIXAxis.md)& OHOS::UIChart::GetXAxis () ``` **Description:** Obtains the x-axis instance. **Returns:** Returns the x-axis instance. ## GetY\(\) \[1/2\] ``` int16_t OHOS::Rect::GetY () const ``` **Description:** Obtains the top boundary coordinate of the rectangle. **Returns:** Returns the top boundary coordinate. ## GetY\(\) \[2/2\] ``` int16_t OHOS::UIView::GetY () const ``` **Description:** Obtains the y-coordinate for the view. **Returns:** Returns the y-coordinate. ## GetYAxis\(\) ``` [UIYAxis](OHOS-UIYAxis.md)& OHOS::UIChart::GetYAxis () ``` **Description:** Obtains the y-axis instance. **Returns:** Returns the y-axis instance. ## Gray\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Gray () ``` **Description:** Obtains the color data of gray. **Returns:** Returns the color data. ## Green\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Green () ``` **Description:** Obtains the color data of green. **Returns:** Returns the color data. ## GridLayout\(\) ``` OHOS::GridLayout::GridLayout () ``` **Description:** A default constructor used to create a **[GridLayout](OHOS-GridLayout.md)** instance. ## Hand\(\) ``` OHOS::UIAnalogClock::Hand::Hand () ``` **Description:** A default constructor used to create a **[Hand](OHOS-UIAnalogClock-Hand.md)** instance. ## Head\(\) ``` [ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Head () const ``` **Description:** Obtains the head node address of a linked list. **Returns:** Returns the head node address. ## HidePoint\(\) ``` void OHOS::UIChartDataSerial::HidePoint (uint16_t index, uint16_t count ) ``` **Description:** Hides some points in the data set. This function applies only to line charts. After the points are hidden, the line connected by the points is not displayed. The top and bottom points may appear in the hidden region. If this method is enabled, you are not advised to enable the display of the top and bottom points. **Parameters:**

Name

Description

index Indicates the point from which the hide starts.
count Indicates the number of points to hide.
## Image\(\) ``` OHOS::Image::Image () ``` **Description:** A constructor used to create an **[Image](OHOS-Image.md)** instance. You can use this constructor when a component requires a map. ## ImageCacheFree\(\) ``` void OHOS::ImageCacheFree ([ImageInfo](OHOS-ImageInfo.md) & info) ``` **Description:** Releases the image cache memory. **Parameters:**

Name

Description

info Indicates the image information. For details, see ImageInfo.
## ImageCacheMalloc\(\) ``` void* OHOS::ImageCacheMalloc ([ImageInfo](OHOS-ImageInfo.md) & info) ``` **Description:** Applies for the image cache memory. You can customize the memory area when loading image resources. **Parameters:**

Name

Description

info Indicates the image information. For details, see ImageInfo.
## IncOneSecond\(\) ``` void OHOS::UIAbstractClock::IncOneSecond () ``` **Description:** Increases the time by one second. ## Insert\(\) \[1/3\] ``` void [OHOS::List](OHOS-List-T.md)< T >::Insert ([ListNode](OHOS-ListNode-T.md)< T > * node, T data ) ``` **Description:** Inserts data before a specified node, which follows the inserted data node. **Parameters:**

Name

Description

node Indicates the pointer to the node holding the inserted data.
data Indicates the data to insert.
## Insert\(\) \[2/3\] ``` virtual void OHOS::UIViewGroup::Insert ([UIView](OHOS-UIView.md) * prevView, [UIView](OHOS-UIView.md) * insertView ) ``` **Description:** Inserts a new child view behind the current one. Reimplemented in [OHOS::UISwipeView](Graphic.md#ga154efaf952ba1db65e53efdd29f0027b). **Parameters:**

Name

Description

prevView Indicates the pointer to the current child view, previous to the new child view to insert.
view Indicates the pointer to the new child view to insert.
## Insert\(\) \[3/3\] ``` void OHOS::UISwipeView::Insert ([UIView](OHOS-UIView.md) * prevView, [UIView](OHOS-UIView.md) * insertView ) ``` **Description:** Inserts a view. Reimplemented from [OHOS::UIViewGroup](Graphic.md#ga84195a993bfe50d8302435ababb63966). **Parameters:**

Name

Description

prevView Indicates the previous view.
insertView Indicates the view to insert.
## Intersect\(\) \[1/2\] ``` bool OHOS::Intersect (const [Line](OHOS-Line.md) & a, const [Line](OHOS-Line.md) & b, [Vector2](OHOS-Vector2-T.md)< int16_t > & out ) ``` **Description:** Checks whether line segment a and line segment b intersect, and returns the intersection point \(if available\). **Parameters:**

Name

Description

a Indicates line segment a.
b Indicates line segment b.
out Indicates the intersection point.
**Returns:** Returns **true** if the two line segments intersect; returns **false** otherwise. ## Intersect\(\) \[2/2\] ``` bool OHOS::Rect::Intersect (const [Rect](OHOS-Rect.md) & rect1, const [Rect](OHOS-Rect.md) & rect2 ) ``` **Description:** Checks whether two rectangles intersect. **Parameters:**

Name

Description

rect1 Indicates the first rectangle to check.
rect2 Indicates the second rectangle to check.
**Returns:** Returns **true** if the two rectangles intersect; returns **false** otherwise. ## Invalidate\(\) ``` void OHOS::UIView::Invalidate () ``` **Description:** Refreshes the invalidated area of the view. ## InvalidateRect\(\) ``` void OHOS::UIView::InvalidateRect (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Refreshes a view in a specified invalidated area. **Parameters:**

Name

Description

invalidatedArea Indicates the area to refresh.
## Inverse\(\) ``` [Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Inverse ``` **Description:** Obtains the inverse matrix. **Returns:** Returns the inverse matrix. ## IsContains\(\) \[1/3\] ``` bool OHOS::Rect::IsContains (const [Point](OHOS-Point.md) & point) const ``` **Description:** Checks whether the rectangle contains a coordinate point. **Parameters:**

Name

Description

point Indicates the coordinate point.
**Returns:** Returns **true** if the input coordinate point is contained; returns **false** otherwise. ## IsContains\(\) \[2/3\] ``` bool OHOS::Rect::IsContains (const [Rect](OHOS-Rect.md) & other) const ``` **Description:** Checks whether the rectangle contains another rectangle. **Parameters:**

Name

Description

other Indicates the rectangle to be used for check.
**Returns:** Returns **true** if the input rectangle is contained; returns **false** otherwise. ## IsContains\(\) \[3/3\] ``` bool OHOS::Rect::IsContains (const [Vector2](OHOS-Vector2-T.md)< int16_t > & point) const ``` **Description:** Checks whether the rectangle contains a coordinate point. **Parameters:**

Name

Description

point Indicates the coordinate point.
**Returns:** Returns **true** if the input coordinate point is contained; returns **false** otherwise. ## IsDraggable\(\) ``` bool OHOS::UIView::IsDraggable () const ``` **Description:** Checks whether the view is draggable. **Returns:** Returns **true** if the view is draggable; returns **false** otherwise. ## IsDragParentInstead\(\) ``` bool OHOS::UIView::IsDragParentInstead () const ``` **Description:** Obtains whether the view transfers a drag event to the parent view for processing. **Returns:** Returns **true** if the view transfers the event to the parent view for processing; returns **false** otherwise. ## IsEmpty\(\) ``` bool [OHOS::List](OHOS-List-T.md)< T >::IsEmpty () const ``` **Description:** Checks whether a linked list is empty. **Returns:** Returns **true** if the linked list is empty; returns **false** otherwise. ## IsExpandHeight\(\) ``` bool OHOS::Text::IsExpandHeight () const ``` **Description:** Checks whether the component height adapts to this text. **Returns:** Returns **true** if the component height adapts to this text; returns **false** otherwise. ## IsExpandWidth\(\) ``` bool OHOS::Text::IsExpandWidth () const ``` **Description:** Checks whether the component width adapts to this text. **Returns:** Returns **true** if the component width adapts to this text; returns **false** otherwise. ## IsExtends\(\) ``` bool OHOS::Rect::IsExtends (const [Rect](OHOS-Rect.md) & other) const ``` **Description:** Checks whether the rectangle is adjacent to another rectangle horizontally or vertically. **Parameters:**

Name

Description

other Indicates the rectangle to be used for check.
**Returns:** Returns **true** if the rectangle is adjacent to the input rectangle; returns **false** otherwise. ## IsGradient\(\) ``` bool OHOS::UIChartDataSerial::IsGradient () const ``` **Description:** Checks whether a polyline has a fill color. **Returns:** Returns **true** if there is a fill color; returns **false** otherwise. ## IsIntersect\(\) \[1/2\] ``` bool OHOS::IsIntersect (const [Line](OHOS-Line.md) & a, const [Line](OHOS-Line.md) & b ) ``` **Description:** Chekcs whether line segment a and line segment b intersect. **Parameters:**

Name

Description

a Indicates line segment a.
b Indicates line segment b.
**Returns:** Returns **true** if the two line segments intersect; returns **false** otherwise. ## IsIntersect\(\) \[2/2\] ``` bool OHOS::Rect::IsIntersect (const [Rect](OHOS-Rect.md) & other) const ``` **Description:** Checks whether the rectangle intersects with another rectangle. **Parameters:**

Name

Description

other Indicates the rectangle to be used for check.
**Returns:** Returns **true** if the two rectangles intersect; returns **false** otherwise. ## IsInvalid\(\) ``` bool OHOS::TransformMap::IsInvalid () const ``` **Description:** Checks whether the **[TransformMap](OHOS-TransformMap.md)** instance is invalid. When the vertices are all 0, the **[TransformMap](OHOS-TransformMap.md)** is invalid. **Returns:** Returns **true** if **[TransformMap](OHOS-TransformMap.md)** is invalid; returns **false** otherwise. ## IsRepeat\(\) \[1/2\] ``` bool OHOS::UIImageAnimatorView::IsRepeat () const ``` **Description:** Checks whether this animator is played for infinite times. **Returns:** Returns **true** if this animator is played for infinite times, returns **false** if the animator is played a specified number of times. **See also:** [SetRepeat](Graphic.md#ga0368d596c01e1a6093d7476fce548a38) ## IsRepeat\(\) \[2/2\] ``` bool OHOS::Animator::IsRepeat () const ``` **Description:** Checks whether this animator is repeated. **Returns:** Returns **true** if the animator is repeated; returns **false** if the animator is played once. ## IsReverse\(\) ``` bool OHOS::UIImageAnimatorView::IsReverse () const ``` **Description:** Obtains the playback sequence of this animator. **Returns:** Returns **true** if a reverse playback is performed; returns **false** if a forward playback is performed. **See also:** [SetReverse](Graphic.md#ga38a53936c930f4d75ccd9d9c6a5b9afa) ## IsSizeFixed\(\) ``` bool OHOS::UIImageAnimatorView::IsSizeFixed () const ``` **Description:** Checks whether the image size is fixed to the view size. **Returns:** Returns **true** if the image size is fixed to the view size; returns **false** if the image size is set independently. **See also:** [SetSizeFixed](Graphic.md#ga0e41547fd9d55ff85d6b800e59957370) ## IsSmooth\(\) ``` bool OHOS::UIChartDataSerial::IsSmooth () const ``` **Description:** Checks whether smoothing is performed on a polyline. **Returns:** Returns **true** if smooth processing is performed on the polyline; returns **false** otherwise. ## IsTouchable\(\) ``` bool OHOS::UIView::IsTouchable () const ``` **Description:** Checks whether the view is touchable. **Returns:** Returns **true** if the view is touchable; returns **false** otherwise. ## IsViewGroup\(\) ``` bool OHOS::UIView::IsViewGroup () const ``` **Description:** Checks whether the view is a container view. **Returns:** Returns **true** if the view is a container view; returns **false** otherwise. ## IsVisible\(\) ``` bool OHOS::UIView::IsVisible () const ``` **Description:** Checks whether the view is visible. **Returns:** Returns **true** if the view is visible; returns **false** otherwise. ## Join\(\) ``` void OHOS::Rect::Join (const [Rect](OHOS-Rect.md) & rect1, const [Rect](OHOS-Rect.md) & rect2 ) ``` **Description:** Obtains the minimum rectangle that contains another two rectangles. **Parameters:**

Name

Description

rect1 Indicates the first rectangle to contain.
rect2 Indicates the second rectangle to contain.
## KeyEvent\(\) ``` OHOS::KeyEvent::KeyEvent (uint16_t keyId, uint16_t state ) ``` **Description:** A constructor used to create a **[KeyEvent](OHOS-KeyEvent.md)** instance. **Parameters:**

Name

Description

keyId Indicates the key ID.
state Indicates the key state.
## Layout\(\) ``` OHOS::Layout::Layout () ``` **Description:** A default constructor used to create a **[Layout](OHOS-Layout.md)** instance. ## LayoutBottomOfParent\(\) ``` void OHOS::UIView::LayoutBottomOfParent (int16_t offset = [/topic/body/section/screen/code {""}) 0 (code]) ``` **Description:** Lays out the view on the bottom of the parent view. **Parameters:**

Name

Description

offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the top, and a negative number indicates the offset to the bottom.
## LayoutBottomToSibling\(\) ``` void OHOS::UIView::LayoutBottomToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Lays out the view on the below of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
## LayoutCenterOfParent\(\) ``` void OHOS::UIView::LayoutCenterOfParent (int16_t xOffSet = [/topic/body/section/screen/code {""}) 0 (code], int16_t yOffset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Lays out the view in the center of the parent view. **Parameters:**

Name

Description

xOffset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
yOffset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
## LayoutChildren\(\) \[1/3\] ``` virtual void OHOS::GridLayout::LayoutChildren (bool needInvalidate = [/topic/body/section/screen/code {""}) false (code]) ``` **Description:** Lays out all child views according to the preset arrangement mode. Reimplemented from [OHOS::UIView](Graphic.md#gaca871fa2f8219e7ea9388e212d1f1e69). **Parameters:**

Name

Description

needInvalidate Specifies whether to refresh the invalidated area after the layout is complete. Value true means to refresh the invalidated area after the layout is complete, and false means the opposite.
## LayoutChildren\(\) \[2/3\] ``` virtual void OHOS::FlexLayout::LayoutChildren (bool needInvalidate = [/topic/body/section/screen/code {""}) false (code]) ``` **Description:** Lays out all child views according to the preset arrangement mode. Reimplemented from [OHOS::UIView](Graphic.md#gaca871fa2f8219e7ea9388e212d1f1e69). **Parameters:**

Name

Description

needInvalidate Specifies whether to refresh the invalidated area after the layout is complete. Value true means to refresh the invalidated area after the layout is complete, and false means the opposite.
## LayoutChildren\(\) \[3/3\] ``` virtual void OHOS::UIView::LayoutChildren (bool neeInvalidate = [/topic/body/section/screen/code {""}) false (code]) ``` **Description:** Lays out all child views according to the preset arrangement mode. Reimplemented in [OHOS::FlexLayout](Graphic.md#ga976abe5b006bef9018dd0d8ee2380526), and [OHOS::GridLayout](Graphic.md#ga449c17a9fa3898aac9ac68a2c48363a3). **Parameters:**

Name

Description

needInvalidate Specifies whether to refresh the invalidated area after the layout is complete. Value true means to refresh the invalidated area after the layout is complete, and false means the opposite.
## LayoutLeftOfParent\(\) ``` void OHOS::UIView::LayoutLeftOfParent (int16_t offset = [/topic/body/section/screen/code {""}) 0 (code]) ``` **Description:** Lays out the view on the left of the parent view. **Parameters:**

Name

Description

offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
## LayoutLeftToSibling\(\) ``` void OHOS::UIView::LayoutLeftToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Lays out the view on the left of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the left, and a negative number indicates the offset to the right.
## LayoutRightOfParent\(\) ``` void OHOS::UIView::LayoutRightOfParent (int16_t offset = [/topic/body/section/screen/code {""}) 0 (code]) ``` **Description:** Lays out the view on the right of the parent view. **Parameters:**

Name

Description

offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the left, and a negative number indicates the offset to the right.
## LayoutRightToSibling\(\) ``` void OHOS::UIView::LayoutRightToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Lays out the view on the right of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates the offset to the right, and a negative number indicates the offset to the left.
## LayoutTopOfParent\(\) ``` void OHOS::UIView::LayoutTopOfParent (int16_t offset = [/topic/body/section/screen/code {""}) 0 (code]) ``` **Description:** Lays out the view on the top of the parent view. **Parameters:**

Name

Description

offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the bottom, and a negative number indicates the offset to the top.
## LayoutTopToSibling\(\) ``` void OHOS::UIView::LayoutTopToSibling (const char * id, int16_t offset = [/topic/body/section/screen/code {""}) 0 (code] ) ``` **Description:** Lays out the view on the above of a sibling view. **Parameters:**

Name

Description

id Indicates the pointer to the ID of the sibling view.
offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates the offset to the top, and a negative number indicates the offset to the bottom.
## Lime\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Lime () ``` **Description:** Obtains the color data of lime. **Returns:** Returns the color data. ## Line\(\) \[1/3\] ``` OHOS::Line::Line () ``` **Description:** The default constructor used to create a **[Line](OHOS-Line.md)** instance. ## Line\(\) \[2/3\] ``` OHOS::Line::Line (const [Vector2](OHOS-Vector2-T.md)< int16_t > & a, const [Vector2](OHOS-Vector2-T.md)< int16_t > & b ) ``` **Description:** A constructor used to create a **[Line](OHOS-Line.md)** instance. **Parameters:**

Name

Description

a Indicates the start point of the line.
b Indicates the end point of the line.
## Line\(\) \[3/3\] ``` OHOS::Line::Line (int16_t x1, int16_t y1, int16_t x2, int16_t y2 ) ``` **Description:** A constructor used to create a **[Line](OHOS-Line.md)** instance. **Parameters:**

Name

Description

x1 Indicates the X coordinate of the line's start point.
y1 Indicates the Y coordinate of the line's start point.
x2 Indicates the X coordinate of the line's end point.
y2 Indicates the Y coordinate of the line's end point.
## LinearEaseNone\(\) ``` static int16_t OHOS::EasingEquation::LinearEaseNone (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Displays no linear easing effects. **t** is the equation for a linear easing. The animation progresses at a constant velocity towards the end. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** LinearEaseIn | LinearEaseOut | LinearEaseInOut ## List\(\) ``` [OHOS::List](OHOS-List-T.md)< T >::[List](OHOS-List-T.md) () ``` **Description:** A default constructor used to create a **[List](OHOS-List-T.md)** instance. The initial size is **0**. ## ListScrollListener\(\) ``` OHOS::ListScrollListener::ListScrollListener () ``` **Description:** A constructor used to create a **[ListScrollListener](OHOS-ListScrollListener.md)** instance with the default state **SCROLL\_STATE\_STOP**. ## LongPressEvent\(\) ``` OHOS::LongPressEvent::LongPressEvent (const [Point](OHOS-Point.md) & pos, const TimeType & timeStamp ) ``` **Description:** A constructor used to create a **[LongPressEvent](OHOS-LongPressEvent.md)** instance. **Parameters:**

Name

Description

pos Indicates the position where the long-press event occurs.
timeStamp Indicates the time stamp when the long-press event occurs.
## Magenta\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Magenta () ``` **Description:** Obtains the color data of magenta. **Returns:** Returns the color data. ## MakeAABB\(\) ``` [Rect](OHOS-Rect.md) OHOS::Polygon::MakeAABB () const ``` **Description:** Obtains the minimum rectangle that can contain the polygon. All vertices of the polygon are inside this rectangle. **Returns:** Returns the minimum rectangle that contains the polygon. ## Maroon\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Maroon () ``` **Description:** Obtains the color data of maroon. **Returns:** Returns the color data. ## Matrix3\(\) \[1/2\] ``` [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::[Matrix3](OHOS-Matrix3-T.md) ``` **Description:** Defines a **[Matrix3](OHOS-Matrix3-T.md)** instance and initializes the 3 x 3 matrix data. ## Matrix3\(\) \[2/2\] ``` [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::[Matrix3](OHOS-Matrix3-T.md) (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22 ) ``` **Description:** Defines a **[Matrix3](OHOS-Matrix3-T.md)** instance and initializes the 3 x 3 matrix data. **Parameters:**

Name

Description

m00 Indicates the element in row 1 and column 1 of the matrix.
m01 Indicates the element in row 1 and column 2 of the matrix.
m02 Indicates the element in row 1 and column 3 of the matrix.
m10 Indicates the element in row 2 and column 1 of the matrix.
m11 Indicates the element in row 2 and column 2 of the matrix.
m12 Indicates the element in row 2 and column 3 of the matrix.
m20 Indicates the element in row 3 and column 1 of the matrix.
m21 Indicates the element in row 3 and column 2 of the matrix.
m22 Indicates the element in row 3 and column 3 of the matrix.
## ModifyPoint\(\) ``` bool OHOS::UIChartDataSerial::ModifyPoint (uint16_t index, const [Point](OHOS-Point.md) & point ) ``` **Description:** Modifies the value of a data point in the data set. **Parameters:**

Name

Description

index Indicates the index of the data point to modify.
point Indicates the new value of the data point.
**Returns:** Returns **true** if the operation is successful; returns **false** otherwise. ## MoveChildByOffset\(\) \[1/4\] ``` void OHOS::UIAbstractScroll::MoveChildByOffset (int16_t offsetX, int16_t offsetY ) ``` **Description:** Moves the position of all child views. Reimplemented from [OHOS::UIViewGroup](Graphic.md#ga776c6c1640cb88b537af227fa5eb0725). Reimplemented in [OHOS::UISwipeView](Graphic.md#ga4db88368bb4908ee05aa1137982b6d0e), and [OHOS::UIList](Graphic.md#gafe121e0cc150122486049dcaf83f3c26). **Parameters:**

Name

Description

offsetX Indicates the offset distance by which a child view is moved on the x-axis.
offsetY Indicates the offset distance by which a child view is moved on the y-axis.
## MoveChildByOffset\(\) \[2/4\] ``` virtual void OHOS::UIViewGroup::MoveChildByOffset (int16_t x, int16_t y ) ``` **Description:** Moves all child views. Reimplemented in [OHOS::UISwipeView](Graphic.md#ga4db88368bb4908ee05aa1137982b6d0e), [OHOS::UIList](Graphic.md#gafe121e0cc150122486049dcaf83f3c26), and [OHOS::UIAbstractScroll](Graphic.md#ga5013215d3075616ae081849ef52bb57a). **Parameters:**

Name

Description

x Indicates the offset distance by which this view group is moved on the x-axis.
y Indicates the offset distance by which this view group is moved on the y-axis.
## MoveChildByOffset\(\) \[3/4\] ``` virtual void OHOS::UIList::MoveChildByOffset (int16_t x, int16_t y ) ``` **Description:** Moves the position of all child views. Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#ga5013215d3075616ae081849ef52bb57a). **Parameters:**

Name

Description

offsetX Indicates the offset distance by which a child view is moved on the x-axis.
offsetY Indicates the offset distance by which a child view is moved on the y-axis.
## MoveChildByOffset\(\) \[4/4\] ``` void OHOS::UISwipeView::MoveChildByOffset (int16_t offsetX, int16_t offsetY ) ``` **Description:** Moves the position of all child views. Reimplemented from [OHOS::UIAbstractScroll](Graphic.md#ga5013215d3075616ae081849ef52bb57a). **Parameters:**

Name

Description

offsetX Indicates the offset distance by which a child view is moved on the x-axis.
offsetY Indicates the offset distance by which a child view is moved on the y-axis.
## Navy\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Navy () ``` **Description:** Obtains the color data of navy. **Returns:** Returns the color data. ## Next\(\) ``` [ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Next (const [ListNode](OHOS-ListNode-T.md)< T > * node) const ``` **Description:** Obtains the address of the node following the specified **node**. **Parameters:**

Name

Description

node Indicates the pointer to the data node in the linked list.
**Returns:** Returns the address of the node following **node**. ## Olive\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Olive () ``` **Description:** Obtains the color data of olive. **Returns:** Returns the color data. ## OnAnimatorStop\(\) \[1/2\] ``` virtual void OHOS::UIImageAnimatorView::AnimatorStopListener::OnAnimatorStop ([UIView](OHOS-UIView.md) & view) ``` **Description:** Called when this animator stops. You need to inherit from the ** [AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md)** class and implement this function. **Parameters:**

Name

Description

view Indicates the instance of this view.
## OnAnimatorStop\(\) \[2/2\] ``` virtual void OHOS::UITextureMapper::AnimatorStopListener::OnAnimatorStop ([UIView](OHOS-UIView.md) & view) ``` **Description:** Called when this animator stops. This is a pure virtual function, which needs your inheritance and implementation. **Parameters:**

Name

Description

view Indicates the instance of this view.
## OnCancel\(\) ``` virtual bool OHOS::UIView::OnTouchListener::OnCancel ([UIView](OHOS-UIView.md) & view, const [CancelEvent](OHOS-CancelEvent.md) & event ) ``` **Description:** Called when a click event on a view is canceled. **Parameters:**

Name

Description

view Indicates the view on which a click event is canceled.
event Indicates the cancel event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnCancelEvent\(\) \[1/2\] ``` virtual void OHOS::UIView::OnCancelEvent (const [CancelEvent](OHOS-CancelEvent.md) & event) ``` **Description:** Called when a click event on the view is canceled. Reimplemented in [OHOS::UIButton](Graphic.md#ga4f481e0ce91f87c6b70f6e0190e4f34f). **Parameters:**

Name

Description

event Indicates the cancel event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnCancelEvent\(\) \[2/2\] ``` void OHOS::UIButton::OnCancelEvent (const [CancelEvent](OHOS-CancelEvent.md) & event) ``` **Description:** Executes the cancel event action. Reimplemented from [OHOS::UIView](Graphic.md#ga8f01ff25a33b20df0758f564148e579d). **Parameters:**

Name

Description

[in] event The cancel event.
## OnChange\(\) \[1/2\] ``` virtual void OHOS::UISlider::UISliderEventListener::OnChange (int16_t value) ``` **Description:** Called when the slider is dragged or clicked. This is a virtual function, which needs your implementation. **Parameters:**

Name

Description

value Indicates the current value of the slider.
## OnChange\(\) \[2/2\] ``` virtual bool OHOS::UICheckBox::OnChangeListener::OnChange ([UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) state) ``` **Description:** Called when the state of this check box is switched. This is a virtual function, which needs your implementation. **Parameters:**

Name

Description

state Indicates the current state of this check box. For details, see UICheckBoxState.
## OnChildChanged\(\) ``` virtual void OHOS::UIViewGroup::OnChildChanged () ``` **Description:** Performs operations needed after a child view is added or removed. ## OnClick\(\) ``` virtual bool OHOS::UIView::OnClickListener::OnClick ([UIView](OHOS-UIView.md) & view, const [ClickEvent](OHOS-ClickEvent.md) & event ) ``` **Description:** Called when a view is clicked. **Parameters:**

Name

Description

view Indicates the view clicked.
event Indicates the click event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnClickEvent\(\) \[1/5\] ``` virtual void OHOS::UIView::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) ``` **Description:** Called when the view is clicked. Reimplemented in [OHOS::UISlider](Graphic.md#ga05029e55d4ccb50cd45f1cd2a53917e4), [OHOS::UICheckBox](Graphic.md#ga31d4f10f4c32b0fb284645450875ae0c), [OHOS::UIRadioButton](Graphic.md#ga7b6849c94b9d8b90cbbe890790fedf1e), and [OHOS::UIRepeatButton](Graphic.md#gaca17d1cfa9daa35a88d387ebc1d9352c). **Parameters:**

Name

Description

event Indicates the click event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnClickEvent\(\) \[2/5\] ``` void OHOS::UIRepeatButton::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) ``` **Description:** The action of click event. Reimplemented from [OHOS::UIView](Graphic.md#gad08697a29aae4c58267f494b66b9a547). **Parameters:**

Name

Description

[in] event click event.
## OnClickEvent\(\) \[3/5\] ``` void OHOS::UIRadioButton::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) ``` **Description:** Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken. Reimplemented from [OHOS::UICheckBox](Graphic.md#ga31d4f10f4c32b0fb284645450875ae0c). **Parameters:**

Name

Description

[in] event The event that passed when OnClickEvent is invoked.
## OnClickEvent\(\) \[4/5\] ``` void OHOS::UICheckBox::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) ``` **Description:** Executes the click event action OnClickEvent will reverse the selected state of checkbox. Example: If the check box is selected, the checkbox status is changed to Unselected after the click action is taken. Reimplemented from [OHOS::UIView](Graphic.md#gad08697a29aae4c58267f494b66b9a547). Reimplemented in [OHOS::UIRadioButton](Graphic.md#ga7b6849c94b9d8b90cbbe890790fedf1e). **Parameters:**

Name

Description

[in] event The event that passed when OnClickEvent is invoked.
## OnClickEvent\(\) \[5/5\] ``` void OHOS::UISlider::OnClickEvent (const [ClickEvent](OHOS-ClickEvent.md) & event) ``` **Description:** Called when the view is clicked. Reimplemented from [OHOS::UIView](Graphic.md#gad08697a29aae4c58267f494b66b9a547). **Parameters:**

Name

Description

event Indicates the click event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDrag\(\) ``` virtual bool OHOS::UIView::OnDragListener::OnDrag ([UIView](OHOS-UIView.md) & view, const [DragEvent](OHOS-DragEvent.md) & event ) ``` **Description:** Called when a view is being dragged. **Parameters:**

Name

Description

view Indicates the view dragged.
event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEnd\(\) ``` virtual bool OHOS::UIView::OnDragListener::OnDragEnd ([UIView](OHOS-UIView.md) & view, const [DragEvent](OHOS-DragEvent.md) & event ) ``` **Description:** Called when a view stops dragging. **Parameters:**

Name

Description

view Indicates the view dragged.
event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEndEvent\(\) \[1/5\] ``` virtual bool OHOS::UIView::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view stops dragging. Reimplemented in [OHOS::UISwipeView](Graphic.md#gab57d973cea1186dd90eec91cd27da1fb), [OHOS::UISlider](Graphic.md#gae9136559779057065708312fb62304bb), [OHOS::UIList](Graphic.md#ga225e59d60271c9012a017136d2aab0d6), and [OHOS::UIScrollView](Graphic.md#ga05e30354bc97373fbd30f8c045dbbeea). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEndEvent\(\) \[2/5\] ``` bool OHOS::UIScrollView::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view stops dragging. Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEndEvent\(\) \[3/5\] ``` bool OHOS::UIList::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view stops dragging. Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEndEvent\(\) \[4/5\] ``` bool OHOS::UISlider::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view stops dragging. Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEndEvent\(\) \[5/5\] ``` bool OHOS::UISwipeView::OnDragEndEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view stops dragging. Reimplemented from [OHOS::UIView](Graphic.md#ga1799d33be73f64ed2066f50d7e65468d). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEvent\(\) \[1/5\] ``` virtual bool OHOS::UIView::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view is being dragged. Reimplemented in [OHOS::UISwipeView](Graphic.md#ga888ec9a6ddaa4051e7c2e5d76832565c), [OHOS::UISlider](Graphic.md#ga4481d4453dbf06cc808e4848a814ed7e), [OHOS::UIList](Graphic.md#ga7e99d1fb891879195c19c211c6de6600), and [OHOS::UIScrollView](Graphic.md#ga2fde4511d743ccc257308d9a0c035076). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEvent\(\) \[2/5\] ``` bool OHOS::UIScrollView::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view is being dragged. Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEvent\(\) \[3/5\] ``` bool OHOS::UIList::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view is being dragged. Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEvent\(\) \[4/5\] ``` bool OHOS::UISlider::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view is being dragged. Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragEvent\(\) \[5/5\] ``` void OHOS::UISwipeView::OnDragEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** revice drag event, Switch to specified view when drag Reimplemented from [OHOS::UIView](Graphic.md#ga46249c8caf06b81590d9450e30a31147). **Parameters:**

Name

Description

event The drag event
## OnDragStart\(\) ``` virtual bool OHOS::UIView::OnDragListener::OnDragStart ([UIView](OHOS-UIView.md) & view, const [DragEvent](OHOS-DragEvent.md) & event ) ``` **Description:** Called when a view starts to drag. **Parameters:**

Name

Description

view Indicates the view dragged.
event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDragStartEvent\(\) ``` virtual bool OHOS::UIView::OnDragStartEvent (const [DragEvent](OHOS-DragEvent.md) & event) ``` **Description:** Called when the view starts to drag. **Parameters:**

Name

Description

event Indicates the drag event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnDraw\(\) \[1/15\] ``` virtual void OHOS::UIView::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented in [OHOS::UIChart](Graphic.md#ga5c101948cb2cfb8394af0bcb56f65efb), [OHOS::UICanvas](Graphic.md#gac6122967d3e1f0d312eebed2f93a1369), [OHOS::UIArcLabel](Graphic.md#ga9f3b69ad5511a4bd8f3aede212f3f374), [OHOS::UIAnalogClock](Graphic.md#ga6c943119bd89a863ec5f05722a1fd146), [OHOS::UIBoxProgress](Graphic.md#ga3321d9b9b156423bdc0abcb8e99efb0d), [OHOS::UISlider](Graphic.md#gad6bd59e05d77868e595d087fd2de5d00), [OHOS::UISurfaceView](Graphic.md#ga30a99c506c6d8d8fc0e0bd81d52e2d52), [OHOS::UICheckBox](Graphic.md#ga8e75f8411fb25e564c82573a12773189), [OHOS::UILabel](Graphic.md#ga911199741bf792b5de00789b4c8d780d), [OHOS::UIAxis](Graphic.md#ga5360803f425055de52af5f7fa1081cfe), [OHOS::UIImageView](Graphic.md#ga565cecb8ac66f2009dc4783da9bdc699), [OHOS::UIButton](Graphic.md#gae69843b87be9fcdab3e4ac776547f3bc), [OHOS::UICircleProgress](Graphic.md#ga611f2f03c22499c428d1de3392ee4861), and [OHOS::UILabelButton](Graphic.md#ga159c536c3f826165c26fdabdc87f498a). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[2/15\] ``` void OHOS::UILabelButton::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Draws a label button. Reimplemented from [OHOS::UIButton](Graphic.md#gae69843b87be9fcdab3e4ac776547f3bc). ## OnDraw\(\) \[3/15\] ``` void OHOS::UICircleProgress::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[4/15\] ``` void OHOS::UIButton::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Executes the draw action. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). Reimplemented in [OHOS::UILabelButton](Graphic.md#ga159c536c3f826165c26fdabdc87f498a). **Parameters:**

Name

Description

[in] invalidatedArea The rectangle to draw, with coordinates relative to this drawable..
## OnDraw\(\) \[5/15\] ``` void OHOS::UIImageView::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Draws this image view. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[6/15\] ``` void OHOS::UIAxis::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[7/15\] ``` void OHOS::UILabel::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Draws this label. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[8/15\] ``` void OHOS::UICheckBox::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Executes the draw action Ondraw invokes the rendering function provided by the underlying layer to draw pictures based on the selected status of the checkbox. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

[in] invalidatedArea The invalidated area.
## OnDraw\(\) \[9/15\] ``` void OHOS::UISurfaceView::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when this view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[10/15\] ``` void OHOS::UISlider::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented from [OHOS::UIBoxProgress](Graphic.md#ga3321d9b9b156423bdc0abcb8e99efb0d). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[11/15\] ``` void OHOS::UIBoxProgress::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). Reimplemented in [OHOS::UISlider](Graphic.md#gad6bd59e05d77868e595d087fd2de5d00). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[12/15\] ``` void OHOS::UIAnalogClock::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Draws an analog clock. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[13/15\] ``` virtual void OHOS::UIArcLabel::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Draws an arc text. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[14/15\] ``` virtual void OHOS::UICanvas::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnDraw\(\) \[15/15\] ``` void OHOS::UIChart::OnDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called when a view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#ga9a5f43bdc03cde30323b570bfb7ae425). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnFPSChanged\(\) ``` virtual void OHOS::SysInfo::OnFPSChangedListener::OnFPSChanged (float newFPS) ``` **Description:** Called when the FPS data changes. **Parameters:**

Name

Description

newFPS Indicates the FPS data.
## OnFPSChangedListener\(\) ``` OHOS::SysInfo::OnFPSChangedListener::OnFPSChangedListener () ``` **Description:** A constructor used to create an **[OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md)** instance with the default sampling type **FPS\_CT\_FIXED\_TIME**. ## OnItemSelected\(\) ``` virtual void OHOS::ListScrollListener::OnItemSelected (int16_t index, [UIView](OHOS-UIView.md) * view ) ``` **Description:** Called when a new child view is selected at the preset position as this list scrolls. For details about how to set the position, see **SetSelectPosition**. **Parameters:**

Name

Description

index Indicates the index of the child view being selected at the preset position. This parameter should be set to NULL_SELECT_INDEX if no child view is selected or no position is preset.
view Indicates the child view being selected at the preset position. This parameter should be set to NULL if no child view is selected or no position is preset.
## OnKeyAct\(\) ``` virtual bool OHOS::RootView::OnKeyActListener::OnKeyAct ([UIView](OHOS-UIView.md) & view, const [KeyEvent](OHOS-KeyEvent.md) & event ) ``` **Description:** Responds to a physical key event. **Parameters:**

Name

Description

view Indicates the view displayed upon a physical key event.
event Indicates the physical key event to respond to.
**Returns:** Returns **true** if the view is normally displayed upon a physical key event; returns ** false** otherwise. ## OnKeyEvent\(\) ``` virtual void OHOS::RootView::OnKeyEvent (const [KeyEvent](OHOS-KeyEvent.md) & event) ``` **Description:** Executes a physical key event. **Parameters:**

Name

Description

event Indicates the physical key event to execute.
## OnLongPress\(\) ``` virtual bool OHOS::UIView::OnLongPressListener::OnLongPress ([UIView](OHOS-UIView.md) & view, const [LongPressEvent](OHOS-LongPressEvent.md) & event ) ``` **Description:** Called when a view is long pressed. **Parameters:**

Name

Description

view Indicates the view long pressed.
event Indicates the long-press event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnLongPressEvent\(\) \[1/2\] ``` virtual bool OHOS::UIView::OnLongPressEvent (const [LongPressEvent](OHOS-LongPressEvent.md) & event) ``` **Description:** Called when the view is long pressed. Reimplemented in [OHOS::UIRepeatButton](Graphic.md#ga33de0d99700bd1c289d967458477606f). **Parameters:**

Name

Description

event Indicates the long-press event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnLongPressEvent\(\) \[2/2\] ``` void OHOS::UIRepeatButton::OnLongPressEvent (const [LongPressEvent](OHOS-LongPressEvent.md) & event) ``` **Description:** The action of long press event. Reimplemented from [OHOS::UIView](Graphic.md#gac311aa47301d727c35fc31f8630d016e). **Parameters:**

Name

Description

[in] event long press event.
## OnPickerStoped\(\) ``` virtual void OHOS::UIPicker::SelectedListener::OnPickerStoped ([UIPicker](OHOS-UIPicker.md) & picker) ``` **Description:** Called when an item is selected after sliding stops. This function is implemented by applications. **Parameters:**

Name

Description

picker Indicates the picker instance.
## OnPostDraw\(\) \[1/3\] ``` virtual void OHOS::UIView::OnPostDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called after a view is drawn. Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga1366a4ca45babb67f3103279a2bbc0bf), and [OHOS::UIScrollView](Graphic.md#ga8a7764e5a85e40b497a67fdf54a1b4c8). **Parameters:**

Name

Description

invalidatedArea Indicates the area in which the view is drawn.
## OnPostDraw\(\) \[2/3\] ``` void OHOS::UIScrollView::OnPostDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called after a view is drawn. Reimplemented from [OHOS::UIView](Graphic.md#gab70473cd0d8fe7c9d4bb817caeee9153). **Parameters:**

Name

Description

invalidatedArea Indicates the area in which the view is drawn.
## OnPostDraw\(\) \[3/3\] ``` virtual void OHOS::UIAnalogClock::OnPostDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Performs the operations needed after the drawing. Reimplemented from [OHOS::UIView](Graphic.md#gab70473cd0d8fe7c9d4bb817caeee9153). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
## OnPreDraw\(\) \[1/13\] ``` virtual bool OHOS::UIView::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. Reimplemented in [OHOS::UIChart](Graphic.md#ga9a8287a522f00bb3dbe60af8f242054a), [OHOS::UISlider](Graphic.md#gaf0483e605613ee1789332e67f00f5e2d), [OHOS::UISurfaceView](Graphic.md#gaeb15d1fb86ad2e2aabddc9c36676894a), [OHOS::UICheckBox](Graphic.md#ga53cc6c8f18b90c3abd96a791c8921010), [OHOS::UILabel](Graphic.md#gaac293fb7f318e1855fba21b740147061), [OHOS::UIAxis](Graphic.md#gad1bf4d83270c0a4ba04f3cffbc67bb97), [OHOS::UIDialog](Graphic.md#ga6b3cf14760fc07e38f51d366a8e5fdb9), [OHOS::UIImageView](Graphic.md#ga5d79816831f61406c1c8bd300da9973e), [OHOS::UIButton](Graphic.md#gaf64d9ec1744ab9c7385dd64d30a786e4), [OHOS::UIRadioButton](Graphic.md#gade9069f6e553c6c43f7684e835b584e5), [OHOS::UICircleProgress](Graphic.md#ga98bc4ea99629e4d5c7ca5ca4b43e8e96), and [OHOS::UIPicker](Graphic.md#ga3e2a703a10017c789366029b297969ab). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPreDraw\(\) \[2/13\] ``` bool OHOS::UIPicker::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPreDraw\(\) \[3/13\] ``` bool OHOS::UICircleProgress::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPreDraw\(\) \[4/13\] ``` bool OHOS::UIRadioButton::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly. Reimplemented from [OHOS::UICheckBox](Graphic.md#ga53cc6c8f18b90c3abd96a791c8921010). **Parameters:**

Name

Description

[in] invalidate area.
**Returns:** True if need cover. ## OnPreDraw\(\) \[5/13\] ``` bool OHOS::UIButton::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

[in] invalidate area.
**Returns:** True if need cover. ## OnPreDraw\(\) \[6/13\] ``` bool OHOS::UIImageView::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Checks whether this image view needs to be covered to optimize the drawing process. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if this image view needs to be covered; returns ** false** otherwise. ## OnPreDraw\(\) \[7/13\] ``` bool OHOS::UIDialog::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Checks whether this label needs to be covered before drawing it. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if this label needs to be covered; returns ** false** otherwise. ## OnPreDraw\(\) \[8/13\] ``` bool OHOS::UIAxis::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPreDraw\(\) \[9/13\] ``` bool OHOS::UILabel::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Checks whether this label needs to be covered before drawing it. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if this label needs to be covered; returns ** false** otherwise. ## OnPreDraw\(\) \[10/13\] ``` bool OHOS::UICheckBox::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Do something before draw, this function will be invoked mainly to check if this view need to cover invalidate area so render manager can decide which layer to draw firstly. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). Reimplemented in [OHOS::UIRadioButton](Graphic.md#gade9069f6e553c6c43f7684e835b584e5). **Parameters:**

Name

Description

[in] invalidate area.
**Returns:** True if need cover. ## OnPreDraw\(\) \[11/13\] ``` bool OHOS::UISurfaceView::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before this view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so that the drawing process is optimized. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPreDraw\(\) \[12/13\] ``` bool OHOS::UISlider::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPreDraw\(\) \[13/13\] ``` bool OHOS::UIChart::OnPreDraw (const [Rect](OHOS-Rect.md) & invalidatedArea) ``` **Description:** Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. Reimplemented from [OHOS::UIView](Graphic.md#gac295fe4851eed72f48e9a63771416d71). **Parameters:**

Name

Description

invalidatedArea Indicates the area to draw.
**Returns:** Returns **true** if the parent view needs to be redrawn; returns **false** otherwise. ## OnPress\(\) ``` virtual bool OHOS::UIView::OnTouchListener::OnPress ([UIView](OHOS-UIView.md) & view, const [PressEvent](OHOS-PressEvent.md) & event ) ``` **Description:** Called when a view is pressed. **Parameters:**

Name

Description

view Indicates the view pressed.
event Indicates the press event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnPressEvent\(\) \[1/4\] ``` virtual void OHOS::UIView::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) ``` **Description:** Called when the view is pressed. Reimplemented in [OHOS::UIList](Graphic.md#gaa6ba86e78d4a12ea47b6aaa8dd88f882), [OHOS::UIScrollView](Graphic.md#ga54572308575db6d19997343c65d72fbb), and [OHOS::UIButton](Graphic.md#ga1d887720c89170abd3c8a400a791765d). **Parameters:**

Name

Description

event Indicates the press event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnPressEvent\(\) \[2/4\] ``` void OHOS::UIButton::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) ``` **Description:** Executes the press event action. Reimplemented from [OHOS::UIView](Graphic.md#gafa544ff2d27785a9410a80689f1ad3b1). **Parameters:**

Name

Description

[in] event The press event, contain press position.
## OnPressEvent\(\) \[3/4\] ``` void OHOS::UIScrollView::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) ``` **Description:** Called when the view is pressed. Reimplemented from [OHOS::UIView](Graphic.md#gafa544ff2d27785a9410a80689f1ad3b1). **Parameters:**

Name

Description

event Indicates the press event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnPressEvent\(\) \[4/4\] ``` void OHOS::UIList::OnPressEvent (const [PressEvent](OHOS-PressEvent.md) & event) ``` **Description:** Called when the view is pressed. Reimplemented from [OHOS::UIView](Graphic.md#gafa544ff2d27785a9410a80689f1ad3b1). **Parameters:**

Name

Description

event Indicates the press event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnRelease\(\) \[1/2\] ``` virtual void OHOS::UISlider::UISliderEventListener::OnRelease (int16_t value) ``` **Description:** Called when the slider is released. This is a virtual function, which needs your implementation. **Parameters:**

Name

Description

value Indicates the current value of the slider.
## OnRelease\(\) \[2/2\] ``` virtual bool OHOS::UIView::OnTouchListener::OnRelease ([UIView](OHOS-UIView.md) & view, const [ReleaseEvent](OHOS-ReleaseEvent.md) & event ) ``` **Description:** Called when a view is released. **Parameters:**

Name

Description

view Indicates the view released.
event Indicates the release event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnReleaseEvent\(\) \[1/3\] ``` virtual void OHOS::UIView::OnReleaseEvent (const [ReleaseEvent](OHOS-ReleaseEvent.md) & event) ``` **Description:** Called when the view is released. Reimplemented in [OHOS::UIButton](Graphic.md#gadb9492eb82ff23f91f9263fc748f24de), and [OHOS::UIRepeatButton](Graphic.md#gadd5891c03d95d07d127558b5bc9a7bd7). **Parameters:**

Name

Description

event Indicates the release event.
**Returns:** Returns **true** if the event is consumed; returns **false** otherwise. \(If an event is consumed, it is not transferred to the parent view. If an event is not consumed, it is transferred to the parent view after local processing is complete.\) ## OnReleaseEvent\(\) \[2/3\] ``` void OHOS::UIRepeatButton::OnReleaseEvent (const [ReleaseEvent](OHOS-ReleaseEvent.md) & event) ``` **Description:** The action of release event. Reimplemented from [OHOS::UIButton](Graphic.md#gadb9492eb82ff23f91f9263fc748f24de). **Parameters:**

Name

Description

[in] event release event.
## OnReleaseEvent\(\) \[3/3\] ``` void OHOS::UIButton::OnReleaseEvent (const [ReleaseEvent](OHOS-ReleaseEvent.md) & event) ``` **Description:** Executes the press release event action. Reimplemented from [OHOS::UIView](Graphic.md#ga7bd1a74563b059b03fbf66f9add53ee3). Reimplemented in [OHOS::UIRepeatButton](Graphic.md#gadd5891c03d95d07d127558b5bc9a7bd7). **Parameters:**

Name

Description

[in] event The press release event.
## OnScrollEnd\(\) \[1/2\] ``` virtual void OHOS::UIScrollView::OnScrollListener::OnScrollEnd () ``` **Description:** Called when a scroll ends. ## OnScrollEnd\(\) \[2/2\] ``` virtual void OHOS::ListScrollListener::OnScrollEnd (int16_t index, [UIView](OHOS-UIView.md) * view ) ``` **Description:** Called when a scroll ends. **Parameters:**

Name

Description

index Indicates the index of the child view being selected at the preset position. This parameter should be set to NULL_SELECT_INDEX if no child view is selected or no position is preset.
view Indicates the child view being selected at the preset position. This parameter should be set to NULL if no child view is selected or no position is preset.
## OnScrollListener\(\) ``` OHOS::UIScrollView::OnScrollListener::OnScrollListener () ``` **Description:** A constructor used to create an **[OnScrollListener](OHOS-UIScrollView-OnScrollListener.md)** instance with the default scroll state **SCROLL\_STATE\_STOP**. ## OnScrollStart\(\) \[1/2\] ``` virtual void OHOS::UIScrollView::OnScrollListener::OnScrollStart () ``` **Description:** Called when a scroll starts. ## OnScrollStart\(\) \[2/2\] ``` virtual void OHOS::ListScrollListener::OnScrollStart (int16_t index, [UIView](OHOS-UIView.md) * view ) ``` **Description:** Called when a scroll starts. **Parameters:**

Name

Description

index Indicates the index of the child view being selected at the preset position. This parameter should be set to NULL_SELECT_INDEX if no child view is selected or no position is preset.
view Indicates the child view being selected at the preset position. This parameter should be set to NULL if no child view is selected or no position is preset.
## OnStop\(\) ``` virtual void OHOS::AnimatorCallback::OnStop ([UIView](OHOS-UIView.md) & view) ``` **Description:** Called when an animator stops. This is a pure virtual function, which needs your inheritance and implementation. **Parameters:**

Name

Description

view Indicates the UIView instance, which is added from the constructor of the Animator class.
## OnTimePickerStoped\(\) ``` virtual void OHOS::UITimePicker::SelectedListener::OnTimePickerStoped ([UITimePicker](OHOS-UITimePicker.md) & picker) ``` **Description:** Called when an item is selected after sliding stops. This function is implemented by applications. **Parameters:**

Name

Description

picker Indicates the time picker instance.
## OnVirtualDeviceEvent\(\) \[1/2\] ``` virtual void OHOS::RootView::OnVirtualDeviceEvent (const [VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md) & event) ``` **Description:** Executes an input event triggered by a virtual device. **Parameters:**

Name

Description

event Indicates the input event to respond to.
## OnVirtualDeviceEvent\(\) \[2/2\] ``` virtual bool OHOS::RootView::OnVirtualDeviceEventListener::OnVirtualDeviceEvent ([UIView](OHOS-UIView.md) & view, [VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md) event ) ``` **Description:** Responds to an input event triggered by a virtual device. **Parameters:**

Name

Description

view Indicates the view displayed upon an input event triggered by a virtual device.
event Indicates the input event to respond to.
**Returns:** Returns **true** if this view is normally displayed upon an input event triggered by a virtual device; returns ** false** otherwise. ## operator delete\(\) ``` void OHOS::HeapBase::operator delete (void * p) ``` **Description:** Overrides the **delete** function. **Parameters:**

Name

Description

p Indicates the pointer to the memory to be released.
## operator new\(\) ``` void* OHOS::HeapBase::operator new (size_t size) ``` **Description:** Overrides the **new** function. **Parameters:**

Name

Description

size Indicates the size of the memory to be allocated.
## operator\[\]\(\) \[1/2\] ``` [Vector2](OHOS-Vector2-T.md)& OHOS::Line::operator[] (uint8_t index) ``` **Description:** Obtains the start or end point of the line based on the value of **index**. **Parameters:**

Name

Description

index Indicates the start or end point to obtain. The value 0 indicates that the start point is to be obtained, and 1 indicates that the end point is to be obtained.
**Returns:** Returns the start or end point of the line. ## operator\[\]\(\) \[2/2\] ``` const [Vector2](OHOS-Vector2-T.md) OHOS::Line::operator[] (uint8_t index) const ``` **Description:** Obtains the start or end point of the line based on the value of **index**. **Parameters:**

Name

Description

index Indicates the start or end point to obtain. The value 0 indicates that the start point is to be obtained, and 1 indicates that the end point is to be obtained.
**Returns:** Returns the start or end point of the line. ## Orange\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Orange () ``` **Description:** Obtains the color data of orange. **Returns:** Returns the color data. ## Paint\(\) ``` OHOS::Paint::Paint () ``` **Description:** A constructor used to create a **[Paint](OHOS-Paint.md)** instance. ## Pause\(\) \[1/2\] ``` void OHOS::Animator::Pause () ``` **Description:** Pauses this animator. **See also:** [Resume](Graphic.md#ga645bbd33356bd708636a94c3d95c282d) ## Pause\(\) \[2/2\] ``` void OHOS::UIImageAnimatorView::Pause () ``` **Description:** Pauses this animator at the current image. **See also:** [Resume](Graphic.md#ga051f03136d8c00295162f53acbe6da97) ## Polygon\(\) \[1/3\] ``` OHOS::Polygon::Polygon () ``` **Description:** The default constructor used to create a **[Polygon](OHOS-Polygon.md)** instance. ## Polygon\(\) \[2/3\] ``` OHOS::Polygon::Polygon (const [Rect](OHOS-Rect.md) & rect) ``` **Description:** A constructor used to construct a **[Polygon](OHOS-Polygon.md)** instance based on a rectangle. **Parameters:**

Name

Description

rect Indicates the rectangle used to construct the polygon.
## Polygon\(\) \[3/3\] ``` OHOS::Polygon::Polygon (const [Vector2](OHOS-Vector2-T.md)< int16_t > * vertexes, const uint8_t vertexNum ) ``` **Description:** A constructor used to create a **[Polygon](OHOS-Polygon.md)** instance based on the vertex coordinates and the number of coordinates. The number of vertex coordinates cannot exceed the value of [MAX\_VERTEX\_NUM](Graphic.md#gafff78acb69e2b147b6f33d68e570ef54). **Parameters:**

Name

Description

vertexes Indicates the pointer to the vertex coordinates.
vertexNum Indicates the number of vertices.
## PopBack\(\) ``` void [OHOS::List](OHOS-List-T.md)< T >::PopBack () ``` **Description:** Pops up a data record at the end of a linked list. ## PopFront\(\) ``` void [OHOS::List](OHOS-List-T.md)< T >::PopFront () ``` **Description:** Pops up a data record at the start of a linked list. ## PressEvent\(\) ``` OHOS::PressEvent::PressEvent (const [Point](OHOS-Point.md) & pos) ``` **Description:** A constructor used to create a **[PressEvent](OHOS-PressEvent.md)** instance. **Parameters:**

Name

Description

pos Indicates the position where the press event occurs.
## Purple\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Purple () ``` **Description:** Obtains the color data of purple. **Returns:** Returns the color data. ## PushBack\(\) ``` void [OHOS::List](OHOS-List-T.md)< T >::PushBack (T data) ``` **Description:** Inserts data at the end of a linked list. **Parameters:**

Name

Description

data Indicates the data to insert.
## PushFront\(\) ``` void [OHOS::List](OHOS-List-T.md)< T >::PushFront (T data) ``` **Description:** Inserts data at the start of a linked list. **Parameters:**

Name

Description

data Indicates the data to insert.
## QuadEaseIn\(\) ``` static int16_t OHOS::EasingEquation::QuadEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in shaping like a quadratic curve. **t^2** is the equation for a quadratic easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a quadratic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [QuadEaseOut](Graphic.md#ga0c9cd2781e17f7077b4c9d5847eb90c8) | [QuadEaseInOut](Graphic.md#ga8f62ddc3f1b2b33904845601108d6f64) ## QuadEaseInOut\(\) ``` static int16_t OHOS::EasingEquation::QuadEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in and then out shaping like a quadratic curve. **t^2** is the equation for a quadratic easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a quadratic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [QuadEaseIn](Graphic.md#ga72a9b93086c8466767942863a7d5cb78) | [QuadEaseOut](Graphic.md#ga0c9cd2781e17f7077b4c9d5847eb90c8) ## QuadEaseOut\(\) ``` static int16_t OHOS::EasingEquation::QuadEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases out shaping like a quadratic curve. **t^2** is the equation for a quadratic easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a quadratic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [QuadEaseIn](Graphic.md#ga72a9b93086c8466767942863a7d5cb78) | [QuadEaseInOut](Graphic.md#ga8f62ddc3f1b2b33904845601108d6f64) ## QuintEaseIn\(\) ``` static int16_t OHOS::EasingEquation::QuintEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in shaping like a quintic curve. **t^5** is the equation for a quintic easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a quintic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [QuintEaseOut](Graphic.md#gaa61e26b2bff3f69edced36d0c0d17a45) | [QuintEaseInOut](Graphic.md#ga8bea02f98d26a97072f32369370a421b) ## QuintEaseInOut\(\) ``` static int16_t OHOS::EasingEquation::QuintEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in and then out shaping like a quintic curve. **t^5** is the equation for a quintic easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a quintic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [QuintEaseIn](Graphic.md#ga9ddf5221cdde5f6a37096300847a50ac) | [QuintEaseOut](Graphic.md#gaa61e26b2bff3f69edced36d0c0d17a45) ## QuintEaseOut\(\) ``` static int16_t OHOS::EasingEquation::QuintEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases out shaping like a quintic curve. **t^5** is the equation for a quintic easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a quintic curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [QuintEaseIn](Graphic.md#ga9ddf5221cdde5f6a37096300847a50ac) | [QuintEaseInOut](Graphic.md#ga8bea02f98d26a97072f32369370a421b) ## Rect\(\) \[1/4\] ``` OHOS::Rect::Rect () ``` **Description:** A constructor used to create a **[Rect](OHOS-Rect.md)** instance. ## Rect\(\) \[2/4\] ``` OHOS::Rect::Rect (const [Rect](OHOS-Rect.md) && other) ``` **Description:** A constructor used to create a **[Rect](OHOS-Rect.md)** instance by copying another rectangle. **Parameters:**

Name

Description

other Indicates the rectangle to copy.
## Rect\(\) \[3/4\] ``` OHOS::Rect::Rect (const [Rect](OHOS-Rect.md) & other) ``` **Description:** A constructor used to create a **[Rect](OHOS-Rect.md)** instance by copying another rectangle. **Parameters:**

Name

Description

other Indicates the rectangle to copy.
## Rect\(\) \[4/4\] ``` OHOS::Rect::Rect (int16_t left, int16_t top, int16_t right, int16_t bottom ) ``` **Description:** A constructor used to create a **[Rect](OHOS-Rect.md)** instance based on the coordinates of the four boundaries. **Parameters:**

Name

Description

left Indicates the coordinate of the left boundary.
top Indicates the coordinate of the top boundary.
right Indicates the coordinate of the right boundary.
bottom Indicates the coordinate of the bottom boundary.
## Red\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Red () ``` **Description:** Obtains the color data of red. **Returns:** Returns the color data. ## RefreshChart\(\) \[1/3\] ``` void OHOS::UIChartPillar::RefreshChart () ``` **Description:** Refreshes a bar chart and redraws the dirty region. Only the parts that need to be redrawn are refreshed, for example, new data points. This function provides better performance than [Invalidate](Graphic.md#ga2a9a38b8450fbb196277238a51fbbf99). Implements [OHOS::UIChart](Graphic.md#gaaab35011c82308c770cf5c15641fe21c). ## RefreshChart\(\) \[2/3\] ``` void OHOS::UIChartPolyline::RefreshChart () ``` **Description:** Refreshes a line chart and redraws the dirty region. Only the parts that need to be redrawn are refreshed, for example, new data points. This function provides better performance than [Invalidate](Graphic.md#ga2a9a38b8450fbb196277238a51fbbf99). Implements [OHOS::UIChart](Graphic.md#gaaab35011c82308c770cf5c15641fe21c). ## RefreshChart\(\) \[3/3\] ``` virtual void OHOS::UIChart::RefreshChart () ``` **Description:** Refreshes a chart and redraws the dirty region. Only the parts that need to be redrawn are refreshed, for example, new data points. This function provides better performance than [Invalidate](Graphic.md#ga2a9a38b8450fbb196277238a51fbbf99). Implemented in [OHOS::UIChartPolyline](Graphic.md#ga53594e65076b8588bcc48d4c69fbe8fd), and [OHOS::UIChartPillar](Graphic.md#ga0c6028474577ce99caa6d3eafaef1573). ## RefreshList\(\) ``` void OHOS::UIList::RefreshList () ``` **Description:** Refreshes this list. The number of child views in the current view is fixed and the positions of those reserved child views as this list scrolls remain unchanged. ## RegisterFPSChangedListener\(\) ``` static void OHOS::SysInfo::RegisterFPSChangedListener ([OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md) * onFPSChangedListener) ``` **Description:** Registers the listener for notifying the FPS changes. **Parameters:**

Name

Description

onFPSChangedListener Indicates the pointer to the FPS change notification function. For details, see OnFPSChangedListener.
## RegisterScrollListener\(\) ``` void OHOS::UIScrollView::RegisterScrollListener ([OnScrollListener](OHOS-UIScrollView-OnScrollListener.md) * scrollListener) ``` **Description:** Registers a listener that contains a callback to be invoked upon scroll state changes. **Parameters:**

Name

Description

scrollListener Indicates the listener to register. For details, see OnScrollListener.
## RegisterSelectedListener\(\) \[1/2\] ``` void OHOS::UIPicker::RegisterSelectedListener ([SelectedListener](OHOS-UIPicker-SelectedListener.md) * pickerListener) ``` **Description:** Registers a listener for a selected event. **Parameters:**

Name

Description

pickerListener Indicates the listener for a selected event in the picker. For details, see SelectedListener.
## RegisterSelectedListener\(\) \[2/2\] ``` void OHOS::UITimePicker::RegisterSelectedListener ([SelectedListener](OHOS-UITimePicker-SelectedListener.md) * timePickerListener) ``` **Description:** Registers a listener for a selected event. **Parameters:**

Name

Description

timePickerListener Indicates the listener to register. For details, see SelectedListener.
## ReleaseEvent\(\) ``` OHOS::ReleaseEvent::ReleaseEvent (const [Point](OHOS-Point.md) & pos) ``` **Description:** A constructor used to create a **[ReleaseEvent](OHOS-ReleaseEvent.md)** instance. **Parameters:**

Name

Description

pos Indicates the position where the release event occurs.
## ReMeasure\(\) ``` virtual void OHOS::UIView::ReMeasure () ``` **Description:** Remeasures the view size. ## Remove\(\) \[1/4\] ``` void OHOS::AnimatorManager::Remove (const [Animator](OHOS-Animator.md) * animator) ``` **Description:** Removes the **[Animator](OHOS-Animator.md)** instance from the **[AnimatorManager](OHOS-AnimatorManager.md)** linked list. **Parameters:**

Name

Description

animator Indicates the pointer to the Animator instance to remove.
**See also:** [Add](Graphic.md#ga8b60ed045dc2a3370498a3e6922d5400) ## Remove\(\) \[2/4\] ``` void [OHOS::List](OHOS-List-T.md)< T >::Remove ([ListNode](OHOS-ListNode-T.md)< T > * node) ``` **Description:** Deletes a data node. **Parameters:**

Name

Description

node Indicates the pointer to the node to delete.
## Remove\(\) \[3/4\] ``` virtual void OHOS::UIViewGroup::Remove ([UIView](OHOS-UIView.md) * view) ``` **Description:** Removes a child view. Reimplemented in [OHOS::UISwipeView](Graphic.md#ga2a4f70938a7d2298a318dff6dff95e85). **Parameters:**

Name

Description

view Indicates the pointer to the child view to remove.
## Remove\(\) \[4/4\] ``` virtual void OHOS::UISwipeView::Remove ([UIView](OHOS-UIView.md) * view) ``` **Description:** Deletes a view. Reimplemented from [OHOS::UIViewGroup](Graphic.md#ga25523928b24d6692f18aed31edb07006). **Parameters:**

Name

Description

view Indicates the view to delete.
## RemoveAll\(\) \[1/2\] ``` virtual void OHOS::UIViewGroup::RemoveAll () ``` **Description:** Removes all child views. Reimplemented in [OHOS::UIList](Graphic.md#gaa55aae2e8066fecc5941e021a7f30d7e). ## RemoveAll\(\) \[2/2\] ``` void OHOS::UIList::RemoveAll () ``` **Description:** Removes all child views. Reimplemented from [OHOS::UIViewGroup](Graphic.md#gaf3ee08173d92932687809049e3c11e9b). ## Reset\(\) ``` void OHOS::UITextureMapper::Reset () ``` **Description:** Displays the original image. The configured parameters are reserved and will not be reset. ## Resize\(\) \[1/3\] ``` void OHOS::Rect::Resize (int16_t width, int16_t height ) ``` **Description:** Sets the width and height of a rectangle. **Parameters:**

Name

Description

width Indicates the width of the rectangle.
height Indicates the height of the rectangle.
## Resize\(\) \[2/3\] ``` virtual void OHOS::UIView::Resize (int16_t width, int16_t height ) ``` **Description:** Adjusts the size of the view. Reimplemented in [OHOS::UISurfaceView](Graphic.md#gaa860971513d96f553be4e251f25c0262). **Parameters:**

Name

Description

width Indicates the new width.
height Indicates the new height.
## Resize\(\) \[3/3\] ``` void OHOS::UISurfaceView::Resize (int16_t width, int16_t height ) ``` **Description:** Adjusts the size of this view. Reimplemented from [OHOS::UIView](Graphic.md#gae985b607d2f0701911778bf20d640ccd). **Parameters:**

Name

Description

width Indicates the new width.
height Indicates the new height.
## ResizeVisibleArea\(\) ``` void OHOS::UIView::ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height ) ``` **Description:** Adjusts the size of the visible area. This operation may affect the final display size. **Parameters:**

Name

Description

x Indicates the new x-coordinate.
y Indicates the new y-coordinate.
width Indicates the new width.
height Indicates the new height.
## Resume\(\) \[1/2\] ``` void OHOS::Animator::Resume () ``` **Description:** Resumes this animator from where it was paused. **See also:** [Pause](Graphic.md#ga4dd9d23ebff1359bd1145fd2f26e1be2) ## Resume\(\) \[2/2\] ``` void OHOS::UIImageAnimatorView::Resume () ``` **Description:** Resumes this animator from the current image. **See also:** [Pause](Graphic.md#gab8af32245cdf31fcc0a9d0a5d681774c) ## Rotate\(\) \[1/5\] ``` void OHOS::Rotate (const [Line](OHOS-Line.md) & origLine, int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot, [Line](OHOS-Line.md) & out ) ``` **Description:** Rotates a line around the pivot by a certain angle. **Parameters:**

Name

Description

origLine Indicates the line segment to rotate.
angle Indicates the angle to rotate.
pivot Indicates the rotation pivot.
out Indicates the line generated after rotation.
## Rotate\(\) \[2/5\] ``` void OHOS::Rotate (const [Rect](OHOS-Rect.md) & origRect, int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot, [Polygon](OHOS-Polygon.md) & out ) ``` **Description:** Rotates a rectangle around the pivot by a certain angle. **Parameters:**

Name

Description

origRect Indicates the rectangle to rotate.
angle Indicates the angle to rotate.
pivot Indicates the rotation pivot.
out Indicates the polygon generated after the rectangle is rotated.
## Rotate\(\) \[3/5\] ``` void OHOS::Rotate (const [Vector2](OHOS-Vector2-T.md)< int16_t > & point, int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot, [Vector2](OHOS-Vector2-T.md)< int16_t > & out ) ``` **Description:** Rotates a point around the pivot by a certain angle. **Parameters:**

Name

Description

point Indicates the point to rotate.
angle Indicates the angle to rotate.
pivot Indicates the rotation pivot.
out Indicates the point generated after rotation.
## Rotate\(\) \[4/5\] ``` void OHOS::TransformMap::Rotate (int16_t angle, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot ) ``` **Description:** Rotates the rectangle. **Parameters:**

Name

Description

angle Indicates the angle to rotate.
pivot Indicates the rotation pivot.
## Rotate\(\) \[5/5\] ``` [Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Rotate (T angle, const [Vector2](OHOS-Vector2-T.md)< T > & pivot ) ``` **Description:** Obtains a rotation matrix. After a matrix is rotated, its data is shifted leftwards by 15 bits. Therefore, the result data needs to be shifted rightwards by 15 bits. **Parameters:**

Name

Description

angle Indicates the angle to rotate.
pivot Indicates the rotation pivot.
**Returns:** Returns the matrix after rotation. ## Scale\(\) \[1/2\] ``` void OHOS::TransformMap::Scale (const [Vector2](OHOS-Vector2-T.md)< float > scale, const [Vector2](OHOS-Vector2-T.md)< int16_t > & pivot ) ``` **Description:** Scales the rectangle. **Parameters:**

Name

Description

scale Indicates the scaling factors of the x-axis and y-axis.
pivot Indicates the pivot for scaling.
## Scale\(\) \[2/2\] ``` [Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Scale (const [Vector2](OHOS-Vector2-T.md)< T > & scale, const [Vector2](OHOS-Vector2-T.md)< T > & fixed ) ``` **Description:** Obtains the scaling matrix. After a matrix is scaled, its data is shifted leftwards by 8 bits. Therefore, the result data needs to be shifted rightwards by 8 bits. **Parameters:**

Name

Description

scale Indicates the scaling factors of the x-axis and y-axis.
fixed Indicates the fixed scaling point.
**Returns:** Returns the matrix after scaling. ## ScrollBy\(\) \[1/2\] ``` void OHOS::UIList::ScrollBy (int16_t distance) ``` **Description:** Scrolls the content in this list. **Parameters:**

Name

Description

distance Indicates the distance by which the content is scrolled.
## ScrollBy\(\) \[2/2\] ``` void OHOS::UIScrollView::ScrollBy (int16_t xDistance, int16_t yDistance ) ``` **Description:** Scrolls the content of this view. **Parameters:**

Name

Description

xDistance Indicates the offset distance by which the content is scrolled on the x-axis.
yDistance Indicates the offset distance by which the content is scrolled on the y-axis.
## ScrollTo\(\) ``` void OHOS::UIList::ScrollTo (uint16_t index) ``` **Description:** Scrolls to change the index of the first row or column of the current view. **Parameters:**

Name

Description

index Indicates the new index of the first row or column of the current view.
## SelectedListener\(\) \[1/2\] ``` OHOS::UITimePicker::SelectedListener::SelectedListener () ``` **Description:** A constructor used to create a **[SelectedListener](OHOS-UITimePicker-SelectedListener.md)** instance. ## SelectedListener\(\) \[2/2\] ``` OHOS::UIPicker::SelectedListener::SelectedListener () ``` **Description:** A constructor used to create a **[SelectedListener](OHOS-UIPicker-SelectedListener.md)** instance. ## SetAdapter\(\) ``` void OHOS::UIList::SetAdapter ([AbstractAdapter](OHOS-AbstractAdapter.md) * adapter) ``` **Description:** Sets the adapter for this list. The content of this list is initialized when the adapter is set. **Parameters:**

Name

Description

adapter Indicates the adapter to set. For details, see AbstractAdapter.
## SetAlign\(\) \[1/4\] ``` void OHOS::UILabelButton::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) align) ``` **Description:** Sets the alignment mode for this text. **Parameters:**

Name

Description

align Indicates the text alignment mode to set, as defined in UITextLanguageAlignment.
## SetAlign\(\) \[2/4\] ``` void OHOS::UIArcLabel::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) horizontalAlign) ``` **Description:** Sets the alignment mode for this text. **Parameters:**

Name

Description

horizontalAlign Indicates the horizontal alignment mode to set, which can be TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_RIGHT.
## SetAlign\(\) \[3/4\] ``` void OHOS::Text::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) horizontalAlign, [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) verticalAlign = [/topic/body/section/screen/code {""}) TEXT_ALIGNMENT_TOP (code] ) ``` **Description:** Sets the alignment mode for this text. **Parameters:**

Name

Description

horizontalAlign Indicates the horizontal alignment mode to set, which can be TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_RIGHT.
verticalAlign Indicates the vertical alignment mode to set, which can be TEXT_ALIGNMENT_TOP (default mode), TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_BOTTOM.
## SetAlign\(\) \[4/4\] ``` void OHOS::UILabel::SetAlign ([UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) horizontalAlign, [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) verticalAlign = [/topic/body/section/screen/code {""}) TEXT_ALIGNMENT_TOP (code] ) ``` **Description:** Sets the alignment mode for this text. **Parameters:**

Name

Description

horizontalAlign Indicates the horizontal alignment mode to set, which can be TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_RIGHT.
verticalAlign Indicates the vertical alignment mode to set, which can be TEXT_ALIGNMENT_TOP (default mode), TEXT_ALIGNMENT_CENTER, or TEXT_ALIGNMENT_BOTTOM.
## SetAnimatorStopListener\(\) \[1/2\] ``` void OHOS::UITextureMapper::SetAnimatorStopListener ([AnimatorStopListener](OHOS-UITextureMapper-AnimatorStopListener.md) * listener) ``` **Description:** Sets the listener for the stop of this animator. **Parameters:**

Name

Description

listener Indicates the listener to set. For details, see AnimatorStopListener.
## SetAnimatorStopListener\(\) \[2/2\] ``` void OHOS::UIImageAnimatorView::SetAnimatorStopListener ([AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md) * listener) ``` **Description:** Sets the listener for the stop of this animator. **Parameters:**

Name

Description

listener Indicates the listener to set. For details, see AnimatorStopListener.
## SetAnimatorTime\(\) ``` void OHOS::UISwipeView::SetAnimatorTime (uint16_t time) ``` **Description:** Sets the time for the page being animated. The page will go beyond the blank during this time. **Parameters:**

Name

Description

time Indicates the time of the page being animated.
## SetArcTextAngle\(\) ``` void OHOS::UIArcLabel::SetArcTextAngle (int16_t startAngle, int16_t endAngle ) ``` **Description:** Sets the start angle and end angle for this arc text. The angle in 12 o'clock direction is 0 degrees, and the value increases clockwise. The text direction is clockwise when the end angle is greater than the start angle, and the text direction is counterclockwise otherwise. **Parameters:**

Name

Description

startAngle Indicates the start angle to set.
endAngle Indicates the end angle to set.
## SetArcTextCenter\(\) ``` void OHOS::UIArcLabel::SetArcTextCenter (int16_t x, int16_t y ) ``` **Description:** Sets the center position for this arc text. **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
## SetArcTextOrientation\(\) ``` void OHOS::UIArcLabel::SetArcTextOrientation ([TextOrientation](Graphic.md#ga0778527bee4a7ddd8d46395585a5cfb9) orientation) ``` **Description:** Sets the orientation for this arc text. **Parameters:**

Name

Description

orientation Indicates the text orientation to set.
## SetArcTextRadius\(\) ``` void OHOS::UIArcLabel::SetArcTextRadius (uint16_t radius) ``` **Description:** Sets the radius for this arc text. **Parameters:**

Name

Description

radius Indicates the radius to set.
## SetAutoEnable\(\) ``` void OHOS::UIImageView::SetAutoEnable (bool enable) ``` **Description:** Sets whether the image view size needs to be adaptive to the image size. **Parameters:**

Name

Description

enable Specifies whether the image view size needs to be adaptive to the image size. true indicates that automatic adaption is enabled, and false indicates the opposite case.
## SetAutoSize\(\) ``` void OHOS::UIViewGroup::SetAutoSize (bool state) ``` **Description:** Sets whether the size of this view group is adaptive to that of all child views. **Parameters:**

Name

Description

state Specifies whether the size of this view group is adaptive to that of all child views. true indicates automatic adaption is enabled, and false indicates the opposite case.
## SetBackgroundImagePosition\(\) ``` void OHOS::UICircleProgress::SetBackgroundImagePosition (int16_t x, int16_t y ) ``` **Description:** Sets the coordinates of the background image for this progress bar relative to the view. **Parameters:**

Name

Description

x Indicates the x-coordinate to set. The default value is 0.
y Indicates the y-coordinate to set. The default value is 0.
**See also:** [SetProgressImagePosition](Graphic.md#ga62b71500ccc75673be297d2e114c0c1b) ## SetBackgroundStyle\(\) \[1/2\] ``` void OHOS::UIAbstractProgress::SetBackgroundStyle (const [Style](OHOS-Style.md) & style) ``` **Description:** Sets the background style for this progress bar. **Parameters:**

Name

Description

style Indicates the background style of the progress bar. For details, see Style.
**See also:** [SetForegroundStyle](Graphic.md#gaccebcfa35f98f9bc6be4bb8cc53eb11c) | [GetBackgroundStyle](Graphic.md#gac2ca1212c23c11405b12ae0a46c7eff1) ## SetBackgroundStyle\(\) \[2/2\] ``` void OHOS::UIAbstractProgress::SetBackgroundStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a background style for this progress bar. **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetBackOvershoot\(\) ``` static void OHOS::EasingEquation::SetBackOvershoot (double overshoot) ``` **Description:** Sets the parameter **s** in the equation **\(s+1\)\*t^3 - s\*t^2** for a back easing. A larger **s** indicates a larger degree of overshoot. The default value is 1.7. You are advised to set this parameter to a value ranging from 1 to 4. The setting takes effect for all the back-ease animations. **Parameters:**

Name

Description

overshoot Indicates the overshoot s in the equation to set.
**See also:** [BackEaseIn](Graphic.md#ga4598524b16a33de497fa9321d887d3b1) | [BackEaseOut](Graphic.md#ga7399f01f7abc33413bf25aa17a99c2f2) | [BackEaseInOut](Graphic.md#gac7c2a9a1dfce384438a3bd9d6c0c2525) ## SetBlankSize\(\) ``` void OHOS::UISwipeView::SetBlankSize (uint16_t size) ``` **Description:** Sets a blank size, as defined in [DEFAULT\_BLANK\_SIZE](Graphic.md#ga81883a607d2cb3356560fc0f8f84cf74). **Parameters:**

Name

Description

size Indicates the blank size to set.
## SetBlurLevel\(\) ``` void OHOS::UIImageView::SetBlurLevel (BlurLevel level) ``` **Description:** Sets the blur level for this image when it is rotated or scaled. **Parameters:**

Name

Description

level Indicates the blur level to set. For details, see BlurLevel.
## SetBottom\(\) ``` void OHOS::Rect::SetBottom (int16_t bottom) ``` **Description:** Sets the coordinate of the bottom boundary of a rectangle. **Parameters:**

Name

Description

bottom Indicates the coordinate of the bottom boundary.
## SetBottomPointStyle\(\) ``` void OHOS::UIChartDataSerial::SetBottomPointStyle (const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md) & style) ``` **Description:** Sets the style of the bottom point of a polyline. **Parameters:**

Name

Description

style Indicates the style to set. For details, see PointStyle.
## SetButton\(\) ``` void OHOS::UIDialog::SetButton ([DialogButtonType](Graphic.md#ga1bfefa0b46fd5a79a28d0c9a75114295) buttonType, const char * text, [OnClickListener](OHOS-UIView-OnClickListener.md) * listener ) ``` **Description:** Sets a button for this dialog box. **Parameters:**

Name

Description

buttonType Indicates the button position.
text Indicates the pointer to the button text.
listener Indicates the pointer to the listener registered for the button.
## SetCapType\(\) ``` void OHOS::UIAbstractProgress::SetCapType ([CapType](Graphic.md#ga2db3928cdf793f4950245a6841dd43d6) cap) ``` **Description:** Sets the type of caps on the background and foreground of the progress bar. **Parameters:**

Name

Description

cap Indicates the cap type. For details, see CapType.
## SetCenterPosition\(\) ``` void OHOS::UICircleProgress::SetCenterPosition (int16_t x, int16_t y ) ``` **Description:** Sets the coordinates of the center point for this circular progress bar. The coordinates of the center point refer to the position relative to the view. **Parameters:**

Name

Description

x Indicates the x-coordinate to set. The default value is 0.
y Indicates the y-coordinate to set. The default value is 0.
**See also:** [GetCenterPosition](Graphic.md#ga706ac374a1383cef01dfc59c5257e480) ## SetColor\(\) ``` void OHOS::UIDigitalClock::SetColor ([ColorType](OHOS-Color32.md) color) ``` **Description:** Sets the font color for this digital clock. **Parameters:**

Name

Description

color Indicates the front color to set.
## SetCols\(\) ``` void OHOS::GridLayout::SetCols (const uint16_t & cols) ``` **Description:** Sets the number of columns in a grid. **Parameters:**

Name

Description

cols Indicates the number of columns to set.
## SetCurrent\(\) ``` void OHOS::ThemeManager::SetCurrent ([Theme](OHOS-Theme.md) * theme) ``` **Description:** Sets the current screen theme for this application. **Parameters:**

Name

Description

theme Indicates the theme to set.
## SetCurrentPage\(\) ``` void OHOS::UISwipeView::SetCurrentPage (uint16_t index, bool needAnimator = [/topic/body/section/screen/code {""}) false (code] ) ``` **Description:** Sets the index for the current tab. **Parameters:**

Name

Description

index Indicates the index of a view.
needAnimator Specifies whether a flip animation is needed. false (default value) indicates a flip animation is not needed, and true indicates the opposite case.
## SetData\(\) \[1/2\] ``` void OHOS::TextAdapter::SetData (int16_t start, int16_t end ) ``` **Description:** Sets continuously increasing data. For example, if you need to set data **0**, **1**, **2**, **3**, **4**, use this function to set **start** to 0 and **end** to 4. **Parameters:**

Name

Description

start Indicates the start value of the integer data.
end Indicates the end value of the integer data.
## SetData\(\) \[2/2\] ``` void OHOS::TextAdapter::SetData ([List](OHOS-List-T.md)< const char * > * data) ``` **Description:** Sets the [UILabel](OHOS-UILabel.md) adapter data, which is a string linked list. **Parameters:**

Name

Description

data Indicates the string linked list data.
## SetDataRange\(\) \[1/3\] ``` bool OHOS::UIXAxis::SetDataRange (uint16_t min, uint16_t max ) ``` **Description:** Sets the value range of the X axis. The maximum value must be greater than the minimum value. Otherwise, the setting fails. Implements [OHOS::UIAxis](Graphic.md#gabb486419e729add9ff85a24371253bf8). **Parameters:**

Name

Description

min Indicates the minimum value to set.
max Indicates the maximum value to set.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetDataRange\(\) \[2/3\] ``` bool OHOS::UIYAxis::SetDataRange (uint16_t min, uint16_t max ) ``` **Description:** Sets the value range of the y-axis. The maximum value must be greater than the minimum value. Otherwise, the setting fails. Implements [OHOS::UIAxis](Graphic.md#gabb486419e729add9ff85a24371253bf8). **Parameters:**

Name

Description

min Indicates the minimum value to set.
max Indicates the maximum value to set.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetDataRange\(\) \[3/3\] ``` virtual bool OHOS::UIAxis::SetDataRange (uint16_t min, uint16_t max ) ``` **Description:** Sets the value range of a coordinate axis. The maximum value must be greater than the minimum value. Otherwise, the setting fails. Implemented in [OHOS::UIYAxis](Graphic.md#gae635d27e0a4eba30002e3607c42b914a), and [OHOS::UIXAxis](Graphic.md#ga2181796eef584a71a5db9186399720aa). **Parameters:**

Name

Description

min Indicates the minimum value to set.
max Indicates the maximum value to set.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetDelayTime\(\) ``` void OHOS::UITextureMapper::SetDelayTime (uint16_t delayTime) ``` **Description:** Sets the delay time for this animator, in milliseconds. The delays of image scaling and rotation are the same and cannot be set separately. **Parameters:**

Name

Description

delayTime Indicates the delay time to set.
## SetDirect\(\) \[1/5\] ``` void OHOS::Text::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) ``` **Description:** Sets the direction for this text. **Parameters:**

Name

Description

direct Indicates the text direction, as defined in UITextLanguageDirect.
## SetDirect\(\) \[2/5\] ``` void OHOS::UILabelButton::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) ``` **Description:** Sets the direction for this text. **Parameters:**

Name

Description

direct Indicates the text direction to set, as defined in UITextLanguageDirect.
## SetDirect\(\) \[3/5\] ``` void OHOS::TextAdapter::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) ``` **Description:** Sets the direction of the [UILabel](OHOS-UILabel.md) constructed by the adapter. **Parameters:**

Name

Description

direct Indicates the direction of the UILabel constructed by the adapter.
## SetDirect\(\) \[4/5\] ``` void OHOS::UILabel::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) ``` **Description:** Sets the direction for this text. **Returns:** direct Returns the text direction, as defined in **UITextLanguageDirect**. ## SetDirect\(\) \[5/5\] ``` void OHOS::UIPicker::SetDirect ([UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) direct) ``` **Description:** Sets the text direction. **Parameters:**

Name

Description

direct Indicates the text direction to set. For details, see UITextLanguageDirect.
## SetDirection\(\) \[1/2\] ``` void OHOS::UIBoxProgress::SetDirection (const [Direction](Graphic.md#ga4a7a2c192206c8b18379f42a5fd176eb) & direction) ``` **Description:** Sets the direction for this progress bar. **Parameters:**

Name

Description

direction Indicates the direction to set. The default direction is from left to right. For details, see Direction.
**See also:** [GetDirection](Graphic.md#ga493699e8d0e934d7fb3d5502529a1c5e) ## SetDirection\(\) \[2/2\] ``` void OHOS::UISwipeView::SetDirection (uint8_t direction) ``` **Description:** Sets the dragging direction. **Parameters:**

Name

Description

direction Indicates the dragging direction, either HORIZONTAL or VERTICAL.
## SetDisallowIntercept\(\) ``` void OHOS::UIViewGroup::SetDisallowIntercept (bool flag) ``` **Description:** Sets whether this view group is intercepted upon touch events. **Parameters:**

Name

Description

flag Specifies whether this view group is intercepted upon touch events. true indicates that this view group is intercepted upon touch events, and false indicates the opposite case.
## SetDisplayMode\(\) ``` void OHOS::UIDigitalClock::SetDisplayMode ([DisplayMode](Graphic.md#gabe3b64b11e5bf5d7b54e1039e40f306b) dm) ``` **Description:** Sets the display mode for this digital clock. **Parameters:**

Name

Description

dm Indicates the display mode to set.
## SetDragACCLevel\(\) ``` void OHOS::UIAbstractScroll::SetDragACCLevel (uint16_t value) ``` **Description:** Sets the drag acceleration. **Parameters:**

Name

Description

value Indicates the drag acceleration to set. The default value is 10. A larger drag acceleration indicates a higher inertial scroll velocity.
## SetDragFunc\(\) ``` void OHOS::UIAbstractScroll::SetDragFunc (EasingFunc func) ``` **Description:** Sets the easing function that specifies a scroll animation after a finger lifts the screen. **Parameters:**

Name

Description

func Indicates the easing function to set. The default function is EasingEquation::CubicEaseOut. For details, see EasingEquation.
## SetDraggable\(\) ``` void OHOS::UIView::SetDraggable (bool draggable) ``` **Description:** Sets whether the view is draggable. **Parameters:**

Name

Description

draggable Specifies whether to set the view draggable. Value true means to set the view draggable, and false means the opposite.
## SetDragParentInstead\(\) ``` void OHOS::UIView::SetDragParentInstead (bool dragParentInstead) ``` **Description:** Sets whether to transfer the drag event to the parent view for processing when the view is being dragged. **Parameters:**

Name

Description

dragParentInstead Specifies whether to transfer the event to the parent view for processing. Value true means to transfer the event to the parent view for processing, and false means the opposite.
## SetDurationTime\(\) ``` void OHOS::UITextureMapper::SetDurationTime (uint16_t durationTime) ``` **Description:** Sets the duration for this animator, in milliseconds. The durations of image scaling and rotation are the same and cannot be set separately. **Parameters:**

Name

Description

durationTime Indicates the duration to set.
## SetEasingFunc\(\) ``` void OHOS::UITextureMapper::SetEasingFunc (EasingFunc easingFunc) ``` **Description:** Sets the easing function for this animator. The easing functions for image scaling and rotation are the same and cannot be set separately. **Parameters:**

Name

Description

easingFunc Indicates the easing function to set. The animation moves at a constant velocity by default. For details, see EasingEquation.
## SetEndAngle\(\) ``` void OHOS::UICircleProgress::SetEndAngle (int16_t endAngle) ``` **Description:** Sets the end angle. The 12-clock direction is 0 degrees, and the 3-clock direction is 90 degrees. If the start angle is smaller than the end angle, the progress bar is clockwise. Otherwise, the progress bar is anticlockwise. The maximum range of a progress bar is a circle. If the difference between the start angle and end angle exceeds 360 degrees, a circular progress bar is created. **Parameters:**

Name

Description

endAngle Indicates the end angle to set, which can be any value represented by int16_t. The default value is 360.
**See also:** [GetEndAngle](Graphic.md#gacab2327bfc24ee985818a95d468af181) | [SetStartAngle](Graphic.md#gae27e30bd77b83bc55ecc9f2a5643943a) ## SetExpandHeight\(\) ``` void OHOS::Text::SetExpandHeight (bool expand) ``` **Description:** Sets whether to adapt the component height to this text. **Parameters:**

Name

Description

expand Specifies whether to adapt the component height to this text. The value true indicates that the component height will adapt to this text, and false indicates not.
## SetExpandWidth\(\) ``` void OHOS::Text::SetExpandWidth (bool expand) ``` **Description:** Sets whether to adapt the component width to this text. **Parameters:**

Name

Description

expand Specifies whether to adapt the component width to this text. The value true indicates that the component width will adapt to this text, and false indicates not.
## SetFillColor\(\) \[1/2\] ``` void OHOS::Paint::SetFillColor ([ColorType](OHOS-Color32.md) color) ``` **Description:** Sets fill color. This function is valid only for closed graphs. **Parameters:**

Name

Description

color Indicates the fill color to set.
**See also:** [GetFillColor](Graphic.md#gadc1b88c39670f103e0c84a089e2178cf) ## SetFillColor\(\) \[2/2\] ``` void OHOS::UIChartDataSerial::SetFillColor (const [ColorType](OHOS-Color32.md) & color) ``` **Description:** Sets the fill color of the data set. For a line chart, **color** refers to the fill color between the line and the x-axis. For a bar chart, **color** refers to the color of the bars. **Parameters:**

Name

Description

color Indicates the fill color to set.
**See also:** [GetFillColor](Graphic.md#ga3b20df3a339aa0f41d404eb3dc1d12ca) ## SetFlexWrap\(\) ``` void OHOS::FlexLayout::SetFlexWrap (uint8_t wrap) ``` **Description:** Sets whether to support word wrap. **Parameters:**

Name

Description

wrap Indicates the word wrap attribute.
## SetFont\(\) \[1/6\] ``` void OHOS::UIDigitalClock::SetFont (const char * name, uint8_t size ) ``` **Description:** Sets the dynamic font for this digital clock. **Parameters:**

Name

Description

name Indicates the pointer to the font name.
size Indicates the font size to set.
## SetFont\(\) \[2/6\] ``` void OHOS::Text::SetFont (const char * name, uint8_t size ) ``` **Description:** Sets the font name and size. **Parameters:**

Name

Description

name Indicates the pointer to the font name.
size Indicates the font size to set.
## SetFont\(\) \[3/6\] ``` void OHOS::TextAdapter::SetFont (const char * name, uint8_t size ) ``` **Description:** Sets the font. **Parameters:**

Name

Description

name Indicates the pointer to the font name.
size Indicates the font size to set.
## SetFont\(\) \[4/6\] ``` void OHOS::UIArcLabel::SetFont (const char * name, uint8_t size ) ``` **Description:** Sets the font for this arc label. **Parameters:**

Name

Description

name Indicates the pointer to the font name.
size Indicates the font size to set.
## SetFont\(\) \[5/6\] ``` void OHOS::UILabelButton::SetFont (const char * name, uint8_t size ) ``` **Description:** Sets the font for this text. **Parameters:**

Name

Description

name Indicates the pointer to the font name.
size Indicates the font size to set.
## SetFont\(\) \[6/6\] ``` void OHOS::UILabel::SetFont (const char * name, uint8_t size ) ``` **Description:** Sets the font for this label. **Parameters:**

Name

Description

name Indicates the pointer to the font name.
size Indicates the font size to set.
## SetFontId\(\) \[1/7\] ``` void OHOS::UIPicker::SetFontId (uint8_t backgroundFontId, uint8_t highlightFontId ) ``` **Description:** Sets the font IDs of dynamic text, which is the string array set through [SetValues](Graphic.md#ga419bb15f72b02f009a76a84e1242b37a). **Parameters:**

Name

Description

backgroundFontId Indicates the font ID of the background text.
highlightFontId Indicates the font ID of the highlighted text.
## SetFontId\(\) \[2/7\] ``` void OHOS::UIDigitalClock::SetFontId (uint8_t fontId) ``` **Description:** Sets the dynamic font ID for this digital clock. **Parameters:**

Name

Description

fontId Indicates the dynamic font ID to set.
## SetFontId\(\) \[3/7\] ``` void OHOS::TextAdapter::SetFontId (uint8_t fontId) ``` **Description:** Sets font ID. **Parameters:**

Name

Description

fontId Indicates the font ID. For details, see UITextLanguageFontId.
## SetFontId\(\) \[4/7\] ``` void OHOS::Text::SetFontId (uint8_t fontId) ``` **Description:** Sets the font ID. **Parameters:**

Name

Description

fontId Indicates the font ID to set.
## SetFontId\(\) \[5/7\] ``` void OHOS::UIArcLabel::SetFontId (uint8_t fontId) ``` **Description:** Sets the font ID for this arc label. **Parameters:**

Name

Description

fontId Indicates the font ID composed of font name and size.
## SetFontId\(\) \[6/7\] ``` void OHOS::UILabelButton::SetFontId (uint8_t fontId) ``` **Description:** Sets the font ID. **Parameters:**

Name

Description

fontId Indicates the font ID composed of the font name and size.
## SetFontId\(\) \[7/7\] ``` void OHOS::UILabel::SetFontId (uint8_t fontId) ``` **Description:** Sets the font ID for this label. **Parameters:**

Name

Description

fontId Indicates the font ID composed of font name and size.
## SetForegroundStyle\(\) \[1/2\] ``` void OHOS::UIAbstractProgress::SetForegroundStyle (const [Style](OHOS-Style.md) & style) ``` **Description:** Sets the foreground style for this progress bar. **Parameters:**

Name

Description

style Indicates the foreground style of this progress bar. For details, see Style.
**See also:** [SetBackgroundStyle](Graphic.md#ga6817b5178e93e5f16f2b420cf5a171c1) | [GetForegroundStyle](Graphic.md#gac77f945f375f333f80bd70254b5c1f96) ## SetForegroundStyle\(\) \[2/2\] ``` void OHOS::UIAbstractProgress::SetForegroundStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a foreground style for this progress bar. **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetFPSCalculateType\(\) ``` void OHOS::SysInfo::OnFPSChangedListener::SetFPSCalculateType ([FPSCalculateType](Graphic.md#ga75d850e3abff6c2f617b689a0cb9a3d1) type) ``` **Description:** Sets the FPS sampling type. **Parameters:**

Name

Description

type Indicates the FPS sampling type. For details, see FPSCalculateType.
## SetGradientBottom\(\) ``` void OHOS::UIChartPolyline::SetGradientBottom (uint16_t bottom) ``` **Description:** Sets the distance between the bottom edge of the fill color range and the x-axis. This function fills in the area between the polyline and bottom of the line chart. For a chart that is not reversed, if the bottom is above the polyline, there is no filling. For a reversed chart, if the bottom is below the polyline, there is no filling. **Parameters:**

Name

Description

bottom Indicates the bottom of the filling range. The value is the distance to the x-axis.
## SetGradientOpacity\(\) ``` void OHOS::UIChartPolyline::SetGradientOpacity (uint8_t minOpa, uint8_t maxOpa ) ``` **Description:** Sets the opacity range of the fill color gradient. This function sets the opacity range between the top point and bottom point of the line chart. The opacity of each horizontal line is calculated based on the ratio. **Parameters:**

Name

Description

minOpa Indicates the opacity closest to the x-axis.
maxOpa Indicates the opacity farthest away from the x-axis.
## SetHandImage\(\) ``` void OHOS::UIAnalogClock::SetHandImage ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type, const [UIImageView](OHOS-UIImageView.md) & img, [Point](OHOS-Point.md) position, [Point](OHOS-Point.md) center ) ``` **Description:** Sets the image used to draw a clock hand. **Parameters:**

Name

Description

type Indicates the clock hand type, as enumerated in HandType.
img Indicates the image to set.
position Indicates the start position of this image.
center Indicates the rotation center of this clock hand.
## SetHandLine\(\) ``` void OHOS::UIAnalogClock::SetHandLine ([HandType](Graphic.md#ga13cf64ea5bd39550976aaf65b1381edf) type, [Point](OHOS-Point.md) position, [Point](OHOS-Point.md) center, [ColorType](OHOS-Color32.md) color, uint16_t width, uint16_t height, OpacityType opacity ) ``` **Description:** Sets the line used to draw a clock hand. **Parameters:**

Name

Description

type Indicates the clock hand type, as enumerated in HandType.
position Indicates the position of the line endpoint close to the rotation center.
center Indicates the rotation center of this clock hand.
color Indicates the color of this line.
width Indicates the width of this line when it is 12 o'clock.
height Indicates the height of this line when it is 12 o'clock.
opacity Indicates the opacity of this line.
## SetHeadPointStyle\(\) ``` void OHOS::UIChartDataSerial::SetHeadPointStyle (const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md) & style) ``` **Description:** Sets the style of the frontmost point on a polyline. **Parameters:**

Name

Description

style Indicates the style to set. For details, see PointStyle.
## SetHeight\(\) \[1/10\] ``` void OHOS::TextAdapter::SetHeight (int16_t height) ``` **Description:** Sets the height of the [UILabel](OHOS-UILabel.md) constructed by the adapter. **Returns:** Returns the height of the [UILabel](OHOS-UILabel.md) constructed by the adapter. ## SetHeight\(\) \[2/10\] ``` void OHOS::Rect::SetHeight (int16_t height) ``` **Description:** Changes the height of the rectangle without changing the coordinate of the top boundary. **Parameters:**

Name

Description

height Indicates the height of the rectangle.
## SetHeight\(\) \[3/10\] ``` virtual void OHOS::UIView::SetHeight (int16_t height) ``` **Description:** Sets the height for the view. Reimplemented in [OHOS::UIChart](Graphic.md#ga54b3c4122ebaeefe74587ca69aa98600), [OHOS::UILabel](Graphic.md#ga9998ddd0dfc0863d31f931a76f1da033), [OHOS::UIButton](Graphic.md#ga8b6dbfcd0328753c2c3cef4d14b0ff30), [OHOS::UIPicker](Graphic.md#ga167979fe09694b0f0c09e9c676189bea), [OHOS::UITimePicker](Graphic.md#ga06667e791f24098f22ef096ee6af77ad), [OHOS::UISurfaceView](Graphic.md#gaf90ada30a3336b947951d408b685787e), and [OHOS::UIBoxProgress](Graphic.md#ga54299cb7561cee9a03d0fc9d0ddda784). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHeight\(\) \[4/10\] ``` void OHOS::UIBoxProgress::SetHeight (int16_t height) ``` **Description:** Sets the height for this view. The height of the view must be greater than or equal to the actual height of the progress bar to ensure a normal display. You need to call this function before calling [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) to set the actual height of the progress bar. Otherwise, the height of the progress bar is reset to **height** of the view. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
**See also:** [SetWidth](Graphic.md#ga4b3eeb9de2443182480a71cadb23178c) | [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) | [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) ## SetHeight\(\) \[5/10\] ``` void OHOS::UISurfaceView::SetHeight (int16_t height) ``` **Description:** Sets the height for this view. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHeight\(\) \[6/10\] ``` void OHOS::UITimePicker::SetHeight (int16_t height) ``` **Description:** Sets the height for the time picker. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHeight\(\) \[7/10\] ``` void OHOS::UIPicker::SetHeight (int16_t height) ``` **Description:** Sets the height for this component. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHeight\(\) \[8/10\] ``` void OHOS::UIButton::SetHeight (int16_t height) ``` **Description:** Sets the height for this image. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHeight\(\) \[9/10\] ``` void OHOS::UILabel::SetHeight (int16_t height) ``` **Description:** Sets the height for this label. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHeight\(\) \[10/10\] ``` void OHOS::UIChart::SetHeight (int16_t height) ``` **Description:** Sets the height for this component. Reimplemented from [OHOS::UIView](Graphic.md#ga9c7110620d5dc3a7bd3efe1fc2edd125). **Parameters:**

Name

Description

height Indicates the height to set.
## SetHorizontalScrollState\(\) ``` void OHOS::UIScrollView::SetHorizontalScrollState (bool state) ``` **Description:** Sets whether a horizontal scroll is enabled. **Parameters:**

Name

Description

state Specifies whether a horizontal scroll is enabled. true indicates a horizontal scroll is enabled, and false indicates the opposite case.
## SetImage\(\) \[1/4\] ``` void OHOS::UISlider::SetImage (const char * backgroundImage, const char * foregroundImage, const char * knobImage ) ``` **Description:** Sets the images for this slider, including the background, foreground, and knob images. **Parameters:**

Name

Description

backgroundImage Indicates the background image to set.
foregroundImage Indicates the foreground image to set.
knobImage Indicates the knob image to set.
## SetImage\(\) \[2/4\] ``` void OHOS::UIAbstractProgress::SetImage (const char * foregroundImage, const char * backgroundImage = [/topic/body/section/screen/code {""}) nullptr (code] ) ``` **Description:** Sets the image for this progress bar. The size of the image must be the same as that of the progress bar to ensure a normal display. If the value of any input parameter is **nullptr**, image filling is canceled. Instead, color filling will be adopted. **Parameters:**

Name

Description

foregroundImage Indicates the foreground image of the progress bar. The default value is nullptr.
backgroundImage Indicates the background image of the progress bar. The default value is nullptr.
## SetImage\(\) \[3/4\] ``` void OHOS::UISlider::SetImage (const [ImageInfo](OHOS-ImageInfo.md) * backgroundImage, const [ImageInfo](OHOS-ImageInfo.md) * foregroundImage, const [ImageInfo](OHOS-ImageInfo.md) * knobImage ) ``` **Description:** Sets the images as pixel maps for this slider, including the background, foreground, and knob images. **Parameters:**

Name

Description

backgroundImage Indicates the background image to set.
foregroundImage Indicates the foreground image to set.
knobImage Indicates the knob image to set.
## SetImage\(\) \[4/4\] ``` void OHOS::UIAbstractProgress::SetImage (const [ImageInfo](OHOS-ImageInfo.md) * foregroundImage, const [ImageInfo](OHOS-ImageInfo.md) * backgroundImage = [/topic/body/section/screen/code {""}) nullptr (code] ) ``` **Description:** Sets the image as a pixel map for this progress bar. The size of the image must be the same as that of the progress bar to ensure a normal display. If the value of any input parameter is **nullptr**, image filling is canceled. Instead, color filling will be adopted. **Parameters:**

Name

Description

foregroundImage Indicates the foreground image of the progress bar. The default value is nullptr.
backgroundImage Indicates the background image of the progress bar. The default value is nullptr.
## SetImageAnimatorSrc\(\) \[1/2\] ``` void OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char * imageSrc, uint8_t imageNum ) ``` **Description:** Sets the images for this animator. **Parameters:**

Name

Description

imageSrc Indicates the pointer to the ImageAnimatorInfo array for storing the configured image information. The memory cannot be released before this animator stops.
imageNum Indicates the number of images.
**See also:** [GetImageAnimatorSrc](Graphic.md#gadc1064a27f9b95a2797c33793b2110ee) | [GetImageAnimatorImageNum](Graphic.md#ga1da191cab1e6b4ffb3a87b50fbe4f7ed) ## SetImageAnimatorSrc\(\) \[2/2\] ``` void OHOS::UIImageAnimatorView::SetImageAnimatorSrc (const char * imageSrc, uint8_t imageNum, uint16_t timeOfUpdate ) ``` **Description:** Sets the images and speed for this animator. **Parameters:**

Name

Description

imageSrc Indicates the pointer to the ImageAnimatorInfo array for storing the configured image information. The memory cannot be released before this animator stops.
imageNum Indicates the number of images.
timeOfUpdate Indicates the interval for updating images, in milliseconds. The default value is 1.
**See also:** [GetTimeOfUpdate](Graphic.md#ga24411b0b4d9f619532aa879ee6ee7af1) | [GetImageAnimatorSrc](Graphic.md#gadc1064a27f9b95a2797c33793b2110ee) | [GetImageAnimatorImageNum](Graphic.md#ga1da191cab1e6b4ffb3a87b50fbe4f7ed) ## SetImagePosition\(\) ``` void OHOS::UIButton::SetImagePosition (const int16_t x, const int16_t y ) ``` **Description:** Sets the position for this image. **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
## SetImages\(\) \[1/2\] ``` virtual void OHOS::UICheckBox::SetImages (const char * selectedImageSrc, const char * unselectedImageSrc ) ``` **Description:** Sets the images for this check box. **Parameters:**

Name

Description

selectedImageSrc Indicates the image for this check box when selected.
unselectedImageSrc Indicates the image for this check box when unselected.
## SetImages\(\) \[2/2\] ``` virtual void OHOS::UICheckBox::SetImages (const [ImageInfo](OHOS-ImageInfo.md) * selectedImageSrc, const [ImageInfo](OHOS-ImageInfo.md) * unselectedImageSrc ) ``` **Description:** Sets the images for this check box. **Parameters:**

Name

Description

selectedImageSrc Indicates the image for this check box when selected.
unselectedImageSrc Indicates the image for this check box when unselected.
## SetImageSrc\(\) \[1/2\] ``` void OHOS::UIButton::SetImageSrc (const char * defaultImgSrc, const char * triggeredImgSrc ) ``` **Description:** Sets the image for this button. **Parameters:**

Name

Description

defaultImgSrc Indicates the default image.
triggeredImgSrc Indicates the image for a button when it is triggered.
## SetImageSrc\(\) \[2/2\] ``` void OHOS::UIButton::SetImageSrc (const [ImageInfo](OHOS-ImageInfo.md) * defaultImgSrc, const [ImageInfo](OHOS-ImageInfo.md) * triggeredImgSrc ) ``` **Description:** Sets the image for this button. **Parameters:**

Name

Description

defaultImgSrc Indicates the default image.
triggeredImgSrc Indicates the image for a button when it is triggered.
## SetInitTime12Hour\(\) ``` void OHOS::UIAnalogClock::SetInitTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am ) ``` **Description:** Sets the initial time in the 12-hour format. **Parameters:**

Name

Description

hour Indicates the hour to set.
minute Indicates the minute to set.
second Indicates the second to set.
am Specifies whether it is in the morning. true indicates that it is in the morning, and false indicates that it is in the afternoon.
## SetInitTime24Hour\(\) ``` void OHOS::UIAnalogClock::SetInitTime24Hour (uint8_t hour, uint8_t minute, uint8_t second ) ``` **Description:** Sets the initial time in the 24-hour format. **Parameters:**

Name

Description

hour Indicates the hour to set.
minute Indicates the minute to set.
second Indicates the second to set.
## SetIntercept\(\) ``` void OHOS::UIView::SetIntercept (bool isIntercept) ``` **Description:** Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing. **Parameters:**

Name

Description

isIntercept Specifies whether to intercept the drag event. Value true means to intercept the drag event, and false means the opposite.
## SetInterval\(\) ``` virtual void OHOS::UIRepeatButton::SetInterval (uint16_t interval) ``` **Description:** Sets the interval between two consecutive click events. **Parameters:**

Name

Description

interval Indicates the interval to set.
## SetItemHeight\(\) \[1/2\] ``` void OHOS::UITimePicker::SetItemHeight (int16_t height) ``` **Description:** Sets the height of each item in the time picker. **Parameters:**

Name

Description

height Indicates the height of each item.
## SetItemHeight\(\) \[2/2\] ``` void OHOS::UIPicker::SetItemHeight (int16_t height) ``` **Description:** Sets the height of each item in the picker. **Parameters:**

Name

Description

height Indicates the height to set.
## SetKnobStyle\(\) \[1/2\] ``` void OHOS::UISlider::SetKnobStyle (const [Style](OHOS-Style.md) & style) ``` **Description:** Sets the knob style. **Parameters:**

Name

Description

style Indicates the knob style to set. For details, see Style.
**See also:** [GetKnobStyle](Graphic.md#gaecf92fe00a7565d034937e89fe2cf1e6) ## SetKnobStyle\(\) \[2/2\] ``` void OHOS::UISlider::SetKnobStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a knob style. **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetKnobWidth\(\) ``` void OHOS::UISlider::SetKnobWidth (int16_t width) ``` **Description:** Sets the width for this knob. The width of this knob is the same as its height. By default, the width of this knob is the same as the height of the horizontal slider or the width of the vertical slider. **Parameters:**

Name

Description

width Indicates the knob width to set.
**See also:** [GetKnobWidth](Graphic.md#ga9bac904abdf8b097778fea5febc1ec00) ## SetLabelStyle\(\) \[1/2\] ``` void OHOS::UILabelButton::SetLabelStyle ([Style](OHOS-Style.md) & labelStyle) ``` **Description:** Sets the style for this label. **Parameters:**

Name

Description

labelStyle Indicates the label style to set.
## SetLabelStyle\(\) \[2/2\] ``` void OHOS::UILabelButton::SetLabelStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a style for this label. **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetLablePosition\(\) ``` void OHOS::UILabelButton::SetLablePosition (int16_t x, int16_t y ) ``` **Description:** Sets the position for this label relative to the button holding it. **Parameters:**

Name

Description

x Indicates the offset distance by which this label is moved on the x-axis.
y Indicates the offset distance by which this label is moved on the y-axis.
## SetLastRun\(\) ``` void OHOS::Task::SetLastRun (uint32_t lastRun) ``` **Description:** Sets the end time for this task. **Parameters:**

Name

Description

lastRun Indicates the end time to set.
## SetLayoutDirection\(\) ``` void OHOS::Layout::SetLayoutDirection (const [DirectionType](Codec.md#ga8ef30fa9c08e08c8706653571f9f5b81) & direction) ``` **Description:** Sets the layout direction. **Parameters:**

Name

Description

direction Indicates the direction of the layout. Available values are as follows: LAYOUT_HOR: from left to right LAYOUT_HOR_R: from right to left LAYOUT_VER: from top to bottom LAYOUT_VER_R: from bottom to top
## SetLeft\(\) ``` void OHOS::Rect::SetLeft (int16_t left) ``` **Description:** Sets the coordinate of the left boundary of a rectangle. **Parameters:**

Name

Description

left Indicates the coordinate of the left boundary.
## SetLineBreakMode\(\) \[1/2\] ``` void OHOS::UILabel::SetLineBreakMode (const uint8_t lineBreakMode) ``` **Description:** Sets the line break mode for this text. **Parameters:**

Name

Description

lineBreakMode Indicates the line break mode to set.
## SetLineBreakMode\(\) \[2/2\] ``` void OHOS::TextAdapter::SetLineBreakMode (const uint8_t lineBreakMode) ``` **Description:** Sets the **LineBreakMode** attribute of [UILabel](OHOS-UILabel.md) constructed by the adapter. For details about the values of **LineBreakMode**, see **LINE\_BREAK\_ADAPT**, **LINE\_BREAK\_WRAP**, **LINE\_BREAK\_ELLIPSIS**, and **LINE\_BREAK\_MARQUEE**. **Parameters:**

Name

Description

lineBreakMode Indicates the LineBreakMode of UILabel.
## SetLineColor\(\) \[1/3\] ``` void OHOS::UICircleProgress::SetLineColor ([ColorType](OHOS-Color32.md) color) ``` **Description:** Sets the foreground color for this progress bar. **Parameters:**

Name

Description

color Indicates the foreground color to set. For details, see ColorType.
## SetLineColor\(\) \[2/3\] ``` void OHOS::UIAxis::SetLineColor (const [ColorType](OHOS-Color32.md) & color) ``` **Description:** Sets the line color of the coordinate axis. **Parameters:**

Name

Description

color Indicates the line color to set. For details, see ColorType.
## SetLineColor\(\) \[3/3\] ``` void OHOS::UIChartDataSerial::SetLineColor (const [ColorType](OHOS-Color32.md) & color) ``` **Description:** Sets the polyline color of the data set in the line chart. This function applies only to line charts. **Parameters:**

Name

Description

color Indicates the polyline color to set.
**See also:** [GetLineColor](Graphic.md#gaa35d69c841a74505735d1acb60476f13) ## SetLoopState\(\) \[1/3\] ``` void OHOS::UISwipeView::SetLoopState (bool loop) ``` **Description:** Sets whether the swipe view supports a cycle swipe. **Parameters:**

Name

Description

loop Indicates the cycle swipe flag. true indicates the cycle swipe is supported, and false indicates the opposite case.
## SetLoopState\(\) \[2/3\] ``` void OHOS::UIPicker::SetLoopState (bool state) ``` **Description:** Sets whether a picker can slide cyclically. **Parameters:**

Name

Description

state Specifies whether the picker can slide cyclically. Value true indicates that the picker can slide cyclically, and value false indicates that the picker cannot slide cyclically. The default value is false.
## SetLoopState\(\) \[3/3\] ``` void OHOS::UIList::SetLoopState (bool state) ``` **Description:** Sets the loop state for this list, in which a loop scroll is possible since the top and bottom of the list are connected together. **Parameters:**

Name

Description

state Indicates the loop state to set.
## SetMajorAxisAlign\(\) ``` void OHOS::FlexLayout::SetMajorAxisAlign (const AlignType & align) ``` **Description:** Sets the alignment mode of the primary axis \(the axis where the layout direction is located\). The child views in the layout are placed in this mode in the direction of the primary axis. **Parameters:**

Name

Description

align Indicates the alignment mode to set. The value can be ALIGN_START, ALIGN_END, ALIGN_CENTER, ALIGN_EVENLY, ALIGN_AROUND, or ALIGN_BETWEEN.
## SetMarkNum\(\) \[1/3\] ``` void OHOS::UIXAxis::SetMarkNum (uint16_t count) ``` **Description:** Sets the number of scales on the x-axis. For a bar chart, the number of scales must be the same as that of bars so that each bar can be properly displayed between two scales. Implements [OHOS::UIAxis](Graphic.md#gaebe68b636d2147f2e69bd658696dc4ee). **Parameters:**

Name

Description

count Indicates the number of scales to set. The default value is 5.
## SetMarkNum\(\) \[2/3\] ``` void OHOS::UIYAxis::SetMarkNum (uint16_t count) ``` **Description:** Sets the number of scales on the Y axis. Implements [OHOS::UIAxis](Graphic.md#gaebe68b636d2147f2e69bd658696dc4ee). **Parameters:**

Name

Description

count Indicates the number of scales to set. The default value is 5.
## SetMarkNum\(\) \[3/3\] ``` virtual void OHOS::UIAxis::SetMarkNum (uint16_t count) ``` **Description:** Sets the number of scales on a coordinate axis. For a bar chart, the number of scales must be the same as that of bars so that each bar can be properly displayed between two scales. Implemented in [OHOS::UIYAxis](Graphic.md#gaf67c1b25c1d1a3ba694cb47f7e9fda85), and [OHOS::UIXAxis](Graphic.md#ga46f4151f1379809749ab2ba364d55170). **Parameters:**

Name

Description

count Indicates the number of scales to set. The default value is 5.
## SetMaxDataCount\(\) ``` bool OHOS::UIChartDataSerial::SetMaxDataCount (uint16_t maxCount) ``` **Description:** Sets the maximum number of data points that can be stored in a data set. This function must be called before data is added, deleted, or modified. Otherwise, data operations will fail. **Parameters:**

Name

Description

maxCount Indicates the number of data points. The default value is 0.
**Returns:** Returns **true** if the operation is successful; returns **false** otherwise. ## SetMaxScrollDistance\(\) ``` void OHOS::UIAbstractScroll::SetMaxScrollDistance (uint16_t distance) ``` **Description:** Sets the maximum scroll distance after a finger lifts the screen. **Parameters:**

Name

Description

distance Indicates the maximum scroll distance to set. The default value is 0, indicating that the scroll distance is not limited.
## SetName\(\) ``` void OHOS::UIRadioButton::SetName (const char * name) ``` **Description:** Sets the name for this radio button. **Parameters:**

Name

Description

name Indicates the name to set, which is a character string.
## SetNextSibling\(\) ``` void OHOS::UIView::SetNextSibling ([UIView](OHOS-UIView.md) * sibling) ``` **Description:** Sets the next sibling view for the view. **Parameters:**

Name

Description

sibling Indicates the pointer to the next sibling view to set.
## SetOnChangeListener\(\) ``` void OHOS::UICheckBox::SetOnChangeListener ([OnChangeListener](OHOS-UICheckBox-OnChangeListener.md) * onStateChangeListener) ``` **Description:** Sets the listener for this check box. The listener is triggered to invoke the callback function upon click events. **Parameters:**

Name

Description

listener Indicates the listener to set. For details, see OnChangeListener.
## SetOnClickListener\(\) \[1/2\] ``` void OHOS::UIView::SetOnClickListener ([OnClickListener](OHOS-UIView-OnClickListener.md) * onClickListener) ``` **Description:** Sets a click event listener for the view. **Parameters:**

Name

Description

onClickListener Indicates the pointer to the click event listener to set.
## SetOnClickListener\(\) \[2/2\] ``` void OHOS::TextAdapter::SetOnClickListener ([UIView::OnClickListener](OHOS-UIView-OnClickListener.md) * clickListener) ``` **Description:** Sets the callback function to be invoked upon a click event. **Parameters:**

Name

Description

clickListener Indicates the pointer to the callback function.
## SetOnDragListener\(\) ``` void OHOS::UIView::SetOnDragListener ([OnDragListener](OHOS-UIView-OnDragListener.md) * onDragListener) ``` **Description:** Sets a drag event listener for the view. **Parameters:**

Name

Description

onDragListener Indicates the pointer to the drag event listener to set.
## SetOnKeyActListener\(\) ``` void OHOS::RootView::SetOnKeyActListener ([OnKeyActListener](OHOS-RootView-OnKeyActListener.md) * onKeyActListener) ``` **Description:** Sets the listener that contains a callback to be invoked upon a physical key event. **Parameters:**

Name

Description

onKeyActListener Indicates the pointer to the listener to set.
## SetOnLongPressListener\(\) ``` void OHOS::UIView::SetOnLongPressListener ([OnLongPressListener](OHOS-UIView-OnLongPressListener.md) * onLongPressListener) ``` **Description:** Sets a long-press event listener for the view. **Parameters:**

Name

Description

onLongPressListener Indicates the pointer to the long-press event listener to set.
## SetOnSwipeListener\(\) ``` void OHOS::UISwipeView::SetOnSwipeListener ([OnSwipeListener](OHOS-UISwipeView-OnSwipeListener.md) * onSwipeListener) ``` **Description:** Sets the listener that contains a callback to be invoked upon a swipe event. **Parameters:**

Name

Description

onSwipeListener Indicates the listener to set.
## SetOnTouchListener\(\) ``` void OHOS::UIView::SetOnTouchListener ([OnTouchListener](OHOS-UIView-OnTouchListener.md) * onTouchListener) ``` **Description:** Sets a touch event listener for the view. **Parameters:**

Name

Description

onTouchListener Indicates the pointer to the touch event listener to set.
## SetOnVirtualDeviceEventListener\(\) ``` void OHOS::RootView::SetOnVirtualDeviceEventListener ([OnVirtualDeviceEventListener](OHOS-RootView-OnVirtualDeviceEventListener.md) * onVirtualDeviceEventListener) ``` **Description:** Sets a listener for monitoring the input events of a virtual device. **Parameters:**

Name

Description

onVirtualDeviceEventListener Indicates the pointer to the listener to set.
## SetOpacity\(\) \[1/2\] ``` void OHOS::UIDigitalClock::SetOpacity (uint8_t opacity) ``` **Description:** Sets the opacity for this digital clock. **Parameters:**

Name

Description

opacity Indicates the opacity of this digital clock. The value ranges from 0 (transparency) to 255 (opacity).
## SetOpacity\(\) \[2/2\] ``` void OHOS::Paint::SetOpacity (uint8_t opacity) ``` **Description:** Sets the opacity. The setting takes effect for the entire graph, including the border, line color, and fill color. **Parameters:**

Name

Description

opacity Indicates the opacity. The value range is [0, 255].
**See also:** [GetOpacity](Graphic.md#ga3a47fccd734ec0e79af89bedacdd4357) ## SetParent\(\) ``` void OHOS::UIView::SetParent ([UIView](OHOS-UIView.md) * parent) ``` **Description:** Sets the parent view for the view. **Parameters:**

Name

Description

parent Indicates the pointer to the parent view to set.
## SetPeriod\(\) ``` void OHOS::Task::SetPeriod (uint32_t period) ``` **Description:** Sets the running period for this task. **Parameters:**

Name

Description

period Indicates the running period to set.
## SetPivot\(\) ``` void OHOS::UITextureMapper::SetPivot (int16_t x, int16_t y ) ``` **Description:** Sets the coordinates of the rotation and scaling pivots for this image. The coordinates represent the position relative to this image. For example, setting the x-coordinate and y-coordinate of the rotation or scaling center to the half of the image width and height respectively means the rotation or scaling is going to be performed around the center of this image. **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
## SetPolygon\(\) ``` void OHOS::TransformMap::SetPolygon (const [Polygon](OHOS-Polygon.md) & polygon) ``` **Description:** Sets a polygon after rectangle transformation. **Parameters:**

Name

Description

polygon Indicates the polygon to set.
## SetPosition\(\) \[1/7\] ``` void OHOS::Rect::SetPosition (int16_t x, int16_t y ) ``` **Description:** Changes the coordinates of the left and top boundaries of the rectangle without changing the rectangle width and height. **Parameters:**

Name

Description

x Indicates the coordinate of the left boundary.
y Indicates the coordinate of the top boundary.
## SetPosition\(\) \[2/7\] ``` virtual void OHOS::UIView::SetPosition (int16_t x, int16_t y ) ``` **Description:** Sets the position for the view. Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga01d3098090d17bdd720df6e861784e13), and [OHOS::UISurfaceView](Graphic.md#ga5d9af67ba074697876ff97f8ece305b7). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
## SetPosition\(\) \[3/7\] ``` void OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y ) ``` **Description:** Sets the position for this view. Reimplemented from [OHOS::UIView](Graphic.md#gab34233f6aeae330b025969137d03e67a). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
## SetPosition\(\) \[4/7\] ``` void OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y ) ``` **Description:** Sets the position for this analog clock. Reimplemented from [OHOS::UIView](Graphic.md#gab34233f6aeae330b025969137d03e67a). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
## SetPosition\(\) \[5/7\] ``` virtual void OHOS::UIView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height ) ``` **Description:** Adjusts the position and size of the view. Reimplemented in [OHOS::UIAnalogClock](Graphic.md#gaa7fad079e41c8efd137781350b60687b), and [OHOS::UISurfaceView](Graphic.md#ga4a505b3b207653c60161d90750f88a9d). **Parameters:**

Name

Description

x Indicates the new x-coordinate.
y Indicates the new y-coordinate.
width Indicates the new width.
height Indicates the new height.
## SetPosition\(\) \[6/7\] ``` void OHOS::UISurfaceView::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height ) ``` **Description:** Sets the position and size for this view. Reimplemented from [OHOS::UIView](Graphic.md#gaf8ce4c009f23b7175b2b34bac4a74262). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
width Indicates the width to set.
height Indicates the height to set.
## SetPosition\(\) \[7/7\] ``` void OHOS::UIAnalogClock::SetPosition (int16_t x, int16_t y, int16_t width, int16_t height ) ``` **Description:** Sets the position and size for this analog clock. Reimplemented from [OHOS::UIView](Graphic.md#gaf8ce4c009f23b7175b2b34bac4a74262). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
y Indicates the y-coordinate to set.
width Indicates the width to set.
height Indicates the height to set.
## SetPreLastPoint\(\) ``` void OHOS::DragEvent::SetPreLastPoint (const [Point](OHOS-Point.md) & preLastPos) ``` **Description:** Sets the coordinates of the stay position before the last position in the drag event. **Parameters:**

Name

Description

preLastPos Indicates the coordinates of the stay position to set.
## SetProgressImagePosition\(\) ``` void OHOS::UICircleProgress::SetProgressImagePosition (int16_t x, int16_t y ) ``` **Description:** Sets the coordinates of the foreground image for this progress bar relative to the view. **Parameters:**

Name

Description

x Indicates the x-coordinate to set. The default value is 0.
y Indicates the y-coordinate to set. The default value is 0.
**See also:** [SetBackgroundImagePosition](Graphic.md#ga66b95a4793bc60596a56be00849b8296) ## SetRadius\(\) ``` void OHOS::UICircleProgress::SetRadius (uint16_t radius) ``` **Description:** Sets the outer radius for this circular progress bar. **Parameters:**

Name

Description

radius Indicates the outer radius to set.
**See also:** [GetRadius](Graphic.md#gabb2869e683ccd799891a8869613ec8c7) ## SetRange\(\) ``` void OHOS::UIAbstractProgress::SetRange (int16_t rangeMax, int16_t rangeMin ) ``` **Description:** Sets the range for this progress bar. **rangeMin** and **rangeMax** can be any value represented by **int16\_t**. **rangeMax** must be greater than or equal to **rangeMin**. Otherwise, the setting does not take effect and the original value is used. **Parameters:**

Name

Description

rangeMax Indicates the maximum value of this progress bar. The default value is 100.
rangeMin Indicates the minimum value of this progress bar. The default value is 0.
**See also:** [GetRangeMin](Graphic.md#ga68ab733afcf4224a799ccad2092d1d23) | [GetRangeMax](Graphic.md#ga1840199f22d5d3e4ef58e41ac8f4febc) ## SetReboundSize\(\) ``` void OHOS::UIAbstractScroll::SetReboundSize (uint16_t size) ``` **Description:** Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar. **Parameters:**

Name

Description

size Indicates the rebound size to set.
## SetRect\(\) ``` void OHOS::Rect::SetRect (int16_t left, int16_t top, int16_t right, int16_t bottom ) ``` **Description:** Sets the coordinates of the four boundaries of a rectangle. **Parameters:**

Name

Description

left Indicates the coordinate of the left boundary.
top Indicates the coordinate of the top boundary.
right Indicates the coordinate of the right boundary.
bottom Indicates the coordinate of the bottom boundary.
## SetRepeat\(\) ``` void OHOS::UIImageAnimatorView::SetRepeat (bool repeat) ``` **Description:** Sets whether to play this animator for infinite times. **Parameters:**

Name

Description

repeat Specifies whether the animator is played for infinite times. true (default value) indicates the animator is played for infinite times, and false indicates the animator is played a specified number of times.
**See also:** [IsRepeat](Graphic.md#ga5e3700fe3d572ed6329237480bd4b5d2) ## SetRepeatTimes\(\) ``` void OHOS::UIImageAnimatorView::SetRepeatTimes (uint32_t times) ``` **Description:** Sets the playback times for this animator. This function takes effect only when **repeat** is set to **false** in [SetRepeat](Graphic.md#ga0368d596c01e1a6093d7476fce548a38). **Parameters:**

Name

Description

times Indicates the playback times to set. The default value is 1.
**See also:** [GetRepeatTimes](Graphic.md#gae900ab627983fb255dc0d1672c1f3a03) ## SetReverse\(\) ``` void OHOS::UIImageAnimatorView::SetReverse (bool reverse) ``` **Description:** Sets the playback sequence for this animator. **Parameters:**

Name

Description

reverse Indicates the playback sequence to set. true indicates a reverse playback and false (default value) indicates a forward playback.
**See also:** [IsReverse](Graphic.md#ga35b508048046b7adf938de5cc4004724) ## SetRight\(\) ``` void OHOS::Rect::SetRight (int16_t right) ``` **Description:** Sets the coordinate of the right boundary of a rectangle. **Parameters:**

Name

Description

right Indicates the coordinate of the right boundary.
## SetRollSpeed\(\) ``` void OHOS::UILabel::SetRollSpeed (uint16_t speed) ``` **Description:** Sets the scroll speed for this text. **Parameters:**

Name

Description

speed Indicates the scroll speed to set.
## SetRollStartPos\(\) ``` void OHOS::UILabel::SetRollStartPos (int16_t pos) ``` **Description:** Sets the position where this text starts to roll. **Parameters:**

Name

Description

pos Indicates the position to set.
## SetRotateEnd\(\) ``` void OHOS::UITextureMapper::SetRotateEnd (int16_t end) ``` **Description:** Sets the end angle of rotation for this image. **Parameters:**

Name

Description

end Indicates the end angle of rotation to set. The default value is 0.
## SetRotateStart\(\) ``` void OHOS::UITextureMapper::SetRotateStart (int16_t start) ``` **Description:** Sets the start angle of rotation for this image. By default, the image starts to rotate from the current angle of this stopped animator. **Parameters:**

Name

Description

start Indicates the start angle to set. The default value is 0.
## SetRows\(\) ``` void OHOS::GridLayout::SetRows (const uint16_t & rows) ``` **Description:** Sets the number of rows in a grid. **Parameters:**

Name

Description

rows Indicates the number of rows to set.
## SetRunTime\(\) ``` void OHOS::Animator::SetRunTime (uint32_t runTime) ``` **Description:** Sets the running time for this animator. **Parameters:**

Name

Description

runTime Indicates the running time to set, in milliseconds.
**See also:** [GetRunTime](Graphic.md#ga18a8b8b9ceb344e6660a5c0de5a9ce1f) ## SetScaleEnd\(\) ``` void OHOS::UITextureMapper::SetScaleEnd (float end) ``` **Description:** Sets the end ratio for scaling this image. **Parameters:**

Name

Description

end Indicates the end ratio to set. The default value is 1.
## SetScaleStart\(\) ``` void OHOS::UITextureMapper::SetScaleStart (float start) ``` **Description:** Sets the start ratio for scaling this image. By default, the image starts to scale from the current ratio of this stopped animator. The X and Y directions are scaled at the same ratio. Single-direction scaling is not supported. **Parameters:**

Name

Description

start Indicates the start ratio to set. The default value is 1.
## SetScrollbarWidth\(\) ``` void OHOS::UIScrollView::SetScrollbarWidth (uint8_t width) ``` **Description:** Sets the width for this scroll bar. **Parameters:**

Name

Description

width Indicates the width to set. The default value is DEFAULT_BAR_WIDTH.
## SetScrollBlankSize\(\) ``` void OHOS::UIAbstractScroll::SetScrollBlankSize (uint16_t size) ``` **Description:** Sets the blank size for this scroll view. **Parameters:**

Name

Description

value Indicates the blank size to set. The default value is 0. Taking a vertical scroll as an example, the value 0 indicates that the head node can only scroll downwards the top of the view and the tail node scroll upwards the bottom; the value 10 indicates that the head node can continue scrolling down by 10 pixels after it reaches the top of the view.
## SetScrollStateListener\(\) ``` void OHOS::UIList::SetScrollStateListener ([ListScrollListener](OHOS-ListScrollListener.md) * scrollListener) ``` **Description:** Sets the listener that contains a callback to be invoked when a child view is selected as this list scrolls. **Parameters:**

Name

Description

scrollListener Indicates the listener to set.
## SetSecondaryAxisAlign\(\) ``` void OHOS::FlexLayout::SetSecondaryAxisAlign (const AlignType & align) ``` **Description:** Sets the alignment mode of the secondary axis \(the axis perpendicular to the set layout direction\). **Parameters:**

Name

Description

align Indicates the alignment mode to set. The value can be ALIGN_START, ALIGN_CENTER, or ALIGN_END.
## SetSelected\(\) \[1/2\] ``` bool OHOS::UITimePicker::SetSelected (const char * value) ``` **Description:** Sets the time currently selected in the time picker. **Parameters:**

Name

Description

value Indicates the pointer to the selected time, which is in the format of "hour:minute:second", for example, 10:12:50. The second is optional and depends on the setting of EnableSecond. The time must be a valid value. For example, the hour value must range from 0 to 23.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetSelected\(\) \[2/2\] ``` bool OHOS::UIPicker::SetSelected (uint16_t index) ``` **Description:** Sets the index of the item currently selected in the picker. **Parameters:**

Name

Description

index Indicates the index to set.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetSelectPosition\(\) ``` void OHOS::UIList::SetSelectPosition (uint16_t position) ``` **Description:** Sets the position where a child view is selected as this list scrolls. When a child view is selected at the specified position, the callback [ListScrollListener](OHOS-ListScrollListener.md) is invoked. You can implement the zoom-in and color-change effects in the callback. **Parameters:**

Name

Description

position Indicates the position to set. The default value is 0, indicating that no position is set.
## SetSizeFixed\(\) ``` void OHOS::UIImageAnimatorView::SetSizeFixed (bool fixed) ``` **Description:** Sets whether the image size is fixed to the view size. **Parameters:**

Name

Description

fixed Specifies whether the image size is fixed to the view size. The value true indicates the size of the image is the same as that of the view, and false indicates the position and size of this image need to be set in the ImageAnimatorInfo structure.
**See also:** [IsSizeFixed](Graphic.md#gabf4bad201ee9ef8aa484677b1daa3ba4) ## SetSliderColor\(\) ``` void OHOS::UISlider::SetSliderColor (const [ColorType](OHOS-Color32.md) backgroundColor, const [ColorType](OHOS-Color32.md) foregroundColor, const [ColorType](OHOS-Color32.md) knobColor ) ``` **Description:** Sets the colors for this slider, including the background, foreground, and knob colors. **Parameters:**

Name

Description

backgroundColor Indicates the background color to set.
foregroundColor Indicates the foreground color to set.
knobColor Indicates the knob color to set.
## SetSliderEventListener\(\) ``` void OHOS::UISlider::SetSliderEventListener ([UISliderEventListener](OHOS-UISlider-UISliderEventListener.md) * listener) ``` **Description:** Sets the listener for a slider change. When a user drags or clicks the slider, listening is triggered and the **OnChange** callback is invoked. When a user releases the slider, the **OnRelease** callback is invoked. **Parameters:**

Name

Description

listener Indicates the listener to set. For details, see UISliderEventListener.
## SetSliderRadius\(\) ``` void OHOS::UISlider::SetSliderRadius (int16_t backgroundRadius, int16_t foregroundRadius, int16_t knobRadius ) ``` **Description:** Sets the corner radiuses for this slider, including the background, foreground, and knob corner radiuses. **Parameters:**

Name

Description

backgroundRadius Indicates the background corner radius to set.
foregroundRadius Indicates the foreground corner radius to set.
knobRadius Indicates the knob corner radius to set.
## SetSrc\(\) \[1/4\] ``` bool OHOS::Image::SetSrc (const char * src) ``` **Description:** Sets the image path. **Parameters:**

Name

Description

src Indicates the pointer to image path in the format of ..\xxx\xxx\xxx.bin.
**Returns:** Returns **true** if the operation is successful; returns **false** if the operation fails. ## SetSrc\(\) \[2/4\] ``` void OHOS::UIImageView::SetSrc (const char * src) ``` **Description:** Sets the image path. **Parameters:**

Name

Description

src Indicates the pointer to the image path represented by a string.
## SetSrc\(\) \[3/4\] ``` bool OHOS::Image::SetSrc (const [ImageInfo](OHOS-ImageInfo.md) * src) ``` **Description:** Sets the image information. **Parameters:**

Name

Description

src Indicates the pointer to the image information.
**Returns:** Returns **true** if the operation is successful; returns **false** if the operation fails. ## SetSrc\(\) \[4/4\] ``` void OHOS::UIImageView::SetSrc (const [ImageInfo](OHOS-ImageInfo.md) * src) ``` **Description:** Sets the image information. **Parameters:**

Name

Description

src Indicates the pointer to the image information. For details, see ImageInfo.
## SetStartAngle\(\) ``` void OHOS::UICircleProgress::SetStartAngle (int16_t startAngle) ``` **Description:** Sets the start angle. The 12-clock direction is 0 degrees, and the 3-clock direction is 90 degrees. If the start angle is smaller than the end angle, the progress bar is clockwise. Otherwise, the progress bar is anticlockwise. The maximum range of a progress bar is a circle. If the difference between the start angle and end angle exceeds 360 degrees, a circular progress bar is created. **Parameters:**

Name

Description

startAngle Indicates the start angle to set, which can be any value represented by int16_t. The default value is 0.
**See also:** [GetStartAngle](Graphic.md#ga37a3e63da7a8658e48a25ae9ec73abea) | [SetEndAngle](Graphic.md#ga831186bf208f8236b006b13cc122c82c) ## SetStartIndex\(\) ``` void OHOS::UIList::SetStartIndex (uint16_t index) ``` **Description:** Sets the start index for this list. **Parameters:**

Name

Description

index Indicates the start index to set. The default value is 0.
## SetStartPosition\(\) ``` void OHOS::UICanvas::SetStartPosition (const [Point](OHOS-Point.md) & startPoint) ``` **Description:** Sets the coordinates of the start point for drawing a line. For example, if **startPoint** is set to \{50, 50\}, the line is drawn from this set of coordinates on the canvas. **Parameters:**

Name

Description

startPoint Indicates the coordinates of the start point.
**See also:** [GetStartPosition](Graphic.md#gad23f7db18bfa5f91e3cb814193e6932d) ## SetState\(\) \[1/3\] ``` void OHOS::UIToggleButton::SetState (bool state) ``` **Description:** Sets the state for this toggle button. **Parameters:**

Name

Description

state Indicates the state of this toggle button. The value true indicates the image displayed for On, and false indicates the image displayed for Off. If this function is not called, the image is displayed for Off.
## SetState\(\) \[2/3\] ``` void OHOS::UICheckBox::SetState ([UICheckBoxState](Graphic.md#ga15a3f0302aded0e4d1584ddc6002335d) state) ``` **Description:** Sets the state for this check box. **Parameters:**

Name

Description

state Indicates the state of this check box. For details, see UICheckBoxState.
## SetState\(\) \[3/3\] ``` void OHOS::Animator::SetState (uint8_t state) ``` **Description:** Sets the current state for this animator. **Parameters:**

Name

Description

state Indicates the current animator state to set, which can be STOP, START, or PAUSE.
**See also:** [GetState](Graphic.md#gafd0166df63bed582022ed93175dd3179) ## SetStateForStyle\(\) ``` void OHOS::UIButton::SetStateForStyle ([ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) state) ``` **Description:** Sets the state for a button. After the setting, calling [SetStyle](Graphic.md#gaa5fdd9b28b8c919dbde0e34d8ae38caf) will change the style of this button, but not its state. **Parameters:**

Name

Description

state Indicates the button state, as enumerated in ButtonState.
## SetStep\(\) ``` void OHOS::UIAbstractProgress::SetStep (uint16_t step) ``` **Description:** Sets the step for this progress bar. The step is used to control the update frequency of the progress bar. When the value change exceeds the step, the progress bar is redrawn. For example, when the step is set to 10 and the current progress value is 5, the progress bar will not be redrawn if the progress value becomes 14, but will be redrawn if the progress value becomes 15. In addition, when its current value changes to be the maximum or minimum value, the progress bar is redrawn regardless of the step you set. **Parameters:**

Name

Description

step Indicates the step to set. The default value is 1.
**See also:** [GetStep](Graphic.md#ga9c1678604605a54c2e338d283c46866d) ## SetStrokeColor\(\) ``` void OHOS::Paint::SetStrokeColor ([ColorType](OHOS-Color32.md) color) ``` **Description:** Sets the color of a line or border. **Parameters:**

Name

Description

color Indicates the line color when a line is drawn or the border color when a closed graph is drawn.
**See also:** [GetStrokeColor](Graphic.md#gaf9dba05cf9c9f91853a523d961e76fb1) ## SetStrokeWidth\(\) ``` void OHOS::Paint::SetStrokeWidth (uint16_t width) ``` **Description:** Sets the width of a line or border. **Parameters:**

Name

Description

width Indicates the line width when a line is drawn or the border width when a closed graph is drawn. The width is extended to both sides.
**See also:** [GetStrokeWidth](Graphic.md#gaf8420a460f4a21c9208674e07893c3f0) ## SetStyle\(\) \[1/5\] ``` void OHOS::Paint::SetStyle ([PaintStyle](Graphic.md#ga548320a469b7862fa416af062cad5d7a) style) ``` **Description:** Sets the paint style of a closed graph. **Parameters:**

Name

Description

style Indicates the paint style. Stroke and fill are set by default. For details, see PaintStyle.
**See also:** [GetStyle](Graphic.md#ga18429dcf1a0dfbe0bf3e5718efa65128) ## SetStyle\(\) \[2/5\] ``` virtual void OHOS::UIView::SetStyle ([Style](OHOS-Style.md) & style) ``` **Description:** Sets the view style. **Parameters:**

Name

Description

style Indicates the view style.
## SetStyle\(\) \[3/5\] ``` void OHOS::Style::SetStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a style. **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetStyle\(\) \[4/5\] ``` virtual void OHOS::UIView::SetStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a style. Reimplemented in [OHOS::UIButton](Graphic.md#gaa5fdd9b28b8c919dbde0e34d8ae38caf). **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetStyle\(\) \[5/5\] ``` void OHOS::UIButton::SetStyle (uint8_t key, int64_t value ) ``` **Description:** Sets a style. Reimplemented from [OHOS::UIView](Graphic.md#ga0945c2f05815dc2e466ef9ceaca2f700). **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
## SetStyleForState\(\) ``` void OHOS::UIButton::SetStyleForState (uint8_t key, int64_t value, [ButtonState](Graphic.md#ga188dd55c17ee44be27fa80543f13f729) state ) ``` **Description:** Sets the style for a button in a specific state. **Parameters:**

Name

Description

key Indicates the key of the style to set.
value Indicates the value matching the key.
state Indicates the button state, as enumerated in ButtonState.
## SetSwipeACCLevel\(\) ``` void OHOS::UIAbstractScroll::SetSwipeACCLevel (uint16_t value) ``` **Description:** Sets the compensation distance after a finger lifts the screen. **Parameters:**

Name

Description

value Indicates the compensation distance to set. The default value is 0.
## SetText\(\) \[1/5\] ``` void OHOS::UILabelButton::SetText (const char * text) ``` **Description:** Sets the text for this label button. **Parameters:**

Name

Description

text Indicates the pointer to the text.
## SetText\(\) \[2/5\] ``` void OHOS::Text::SetText (const char * text) ``` **Description:** Sets the content for this text. **Parameters:**

Name

Description

text Indicates the pointer to the text content.
## SetText\(\) \[3/5\] ``` void OHOS::UIDialog::SetText (const char * text) ``` **Description:** Sets the text for this dialog box. **Parameters:**

Name

Description

text Indicates the pointer to the text.
## SetText\(\) \[4/5\] ``` void OHOS::UIArcLabel::SetText (const char * text) ``` **Description:** Sets the text content for this arc label. **Parameters:**

Name

Description

text Indicates the pointer to the text content.
## SetText\(\) \[5/5\] ``` void OHOS::UILabel::SetText (const char * text) ``` **Description:** Sets the text content for this label. **Parameters:**

Name

Description

text Indicates the pointer to the text content.
## SetTextColor\(\) \[1/3\] ``` void OHOS::UIPicker::SetTextColor ([ColorType](OHOS-Color32.md) backgroundColor, [ColorType](OHOS-Color32.md) highlightColor ) ``` **Description:** Sets the text color. **Parameters:**

Name

Description

backgroundColor Indicates the color of the background text.
highlightColor Indicates the color of the highlighted text.
## SetTextColor\(\) \[2/3\] ``` void OHOS::UILabel::SetTextColor ([ColorType](OHOS-Color32.md) color) ``` **Description:** Sets the color for this text. **Parameters:**

Name

Description

color Indicates the text color to set.
## SetTextColor\(\) \[3/3\] ``` void OHOS::UILabelButton::SetTextColor ([ColorType](OHOS-Color32.md) color) ``` **Description:** Sets the color for this text. **Parameters:**

Name

Description

color Indicates the text color to set.
## SetTextFormatter\(\) \[1/2\] ``` void OHOS::TextAdapter::SetTextFormatter ([TextFormatter](OHOS-TextFormatter.md) * formatter) ``` **Description:** Sets the text formatter. **Parameters:**

Name

Description

formatter Indicates the pointer to the text formatter. For details, see TextFormatter.
## SetTextFormatter\(\) \[2/2\] ``` void OHOS::UIPicker::SetTextFormatter ([TextFormatter](OHOS-TextFormatter.md) * formatter) ``` **Description:** Sets the text formatter. **Parameters:**

Name

Description

formatter Indicates the pointer to the text formatter. For details, see TextFormatter.
## SetTextRotation\(\) \[1/2\] ``` void OHOS::Text::SetTextRotation (LabelRotateDegree angle) ``` **Description:** Sets the clockwise rotation angle for this text. **Parameters:**

Name

Description

angle Indicates the rotation angle to set. The value can be DEGREE_0, DEGREE_90, DEGREE_180, or DEGREE_270, as defined in LabelRotateDegree.
## SetTextRotation\(\) \[2/2\] ``` void OHOS::UILabel::SetTextRotation (LabelRotateDegree angle) ``` **Description:** Sets the clockwise rotation angle for this text. **Parameters:**

Name

Description

angle Indicates the rotation angle to set. The value can be DEGREE_0, DEGREE_90, DEGREE_180, or DEGREE_270, as defined in LabelRotateDegree.
## SetTextStyle\(\) ``` void OHOS::UITimePicker::SetTextStyle (uint8_t backgroundFontId, uint8_t highlightFontId, [ColorType](OHOS-Color32.md) backgroundColor, [ColorType](OHOS-Color32.md) highlightColor ) ``` **Description:** Sets the text format in the time picker, including the font ID and color. **Parameters:**

Name

Description

backgroundFontId Indicates the font ID of the background text.
highlightFontId Indicates the font ID of the highlighted text.
backgroundColor Indicates the color of the background text.
highlightColor Indicates the color of the highlighted text.
## SetThrowDrag\(\) ``` void OHOS::UIAbstractScroll::SetThrowDrag (bool throwDrag) ``` **Description:** Sets whether to continue scrolling after a finger lifts the screen. **Parameters:**

Name

Description

throwDrag Specifies whether to continue scrolling after a finger lifts the screen. true indicates the scroll continues, and false indicates the scroll stops immediately after a finger lifts.
## SetTime\(\) ``` void OHOS::Animator::SetTime (uint32_t time) ``` **Description:** Sets the total duration for this animator. **Parameters:**

Name

Description

time Indicates the total duration to set, in milliseconds.
**See also:** [GetTime](Graphic.md#gac05ba70bafa9887dc23ea4ba69da632d) ## SetTime12Hour\(\) ``` void OHOS::UIAbstractClock::SetTime12Hour (uint8_t hour, uint8_t minute, uint8_t second, bool am ) ``` **Description:** Sets the time in 12-hour format. **Parameters:**

Name

Description

hour Indicates the hour to set, within [0, 11] after the modulo operation.
minute Indicates the minute to set, within [0, 59] after the modulo operation.
second Indicates the second to set, within [0, 59] after the modulo operation.
am Specifies whether it is in the morning. true indicates that it is in the morning, and false indicates that it is in the afternoon.
## SetTime24Hour\(\) ``` void OHOS::UIAbstractClock::SetTime24Hour (uint8_t hour, uint8_t minute, uint8_t second ) ``` **Description:** Sets the time in 24-hour format. **Parameters:**

Name

Description

hour Indicates the hour to set, within [0, 23] after the modulo operation.
minute Indicates the minute to set, within [0, 59] after the modulo operation.
second Indicates the second to set, within [0, 59] after the modulo operation.
## SetTimeOfPause\(\) ``` void OHOS::UIImageAnimatorView::SetTimeOfPause (uint16_t timeOfPause) ``` **Description:** Sets the interval between two playbacks of an infinitely repeated animator. **Parameters:**

Name

Description

timeOfPause Indicates the interval between two playbacks of an infinitely repeated animator, in milliseconds. The default value is 0, indicating that there is no interval.
**See also:** [GetTimeOfPause](Graphic.md#ga8bd6ba744209193fd1f3e630e6cf1c5a) ## SetTimeOfUpdate\(\) ``` void OHOS::UIImageAnimatorView::SetTimeOfUpdate (uint16_t timeOfUpdate) ``` **Description:** Sets the speed for this animator. **Parameters:**

Name

Description

timeOfUpdate Indicates the interval for updating images, in milliseconds. The default value is 1.
**See also:** [GetTimeOfUpdate](Graphic.md#ga24411b0b4d9f619532aa879ee6ee7af1) ## SetTimeStamp\(\) ``` void OHOS::Event::SetTimeStamp (const TimeType & timeStamp) ``` **Description:** Sets the timestamp when an event occurs. **Parameters:**

Name

Description

timeStamp Indicates the timestamp of the event to set.
## SetTitle\(\) ``` void OHOS::UIDialog::SetTitle (const char * title) ``` **Description:** Sets the title for this dialog box. **Parameters:**

Name

Description

title Indicates the pointer to the title.
## SetTop\(\) ``` void OHOS::Rect::SetTop (int16_t top) ``` **Description:** Sets the coordinate of the top boundary of a rectangle. **Parameters:**

Name

Description

top Indicates the coordinate of the top boundary.
## SetTopPointStyle\(\) ``` void OHOS::UIChartDataSerial::SetTopPointStyle (const [PointStyle](OHOS-UIChartDataSerial-PointStyle.md) & style) ``` **Description:** Sets the style of the top point of a polyline. **Parameters:**

Name

Description

style Indicates the style to set. For details, see PointStyle.
## SetTouchable\(\) ``` void OHOS::UIView::SetTouchable (bool touch) ``` **Description:** Sets whether the view is touchable. **Parameters:**

Name

Description

touchable Specifies whether to set the view touchable. Value true means to set the view touchable, and false means the opposite.
## SetTransformAlgorithm\(\) ``` void OHOS::UIImageView::SetTransformAlgorithm (TransformAlgorithm algorithm) ``` **Description:** Sets the algorithm used for image rotation and scaling. **Parameters:**

Name

Description

algorithm Indicates the image transformation algorithm. For details, see TransformAlgorithm.
## SetTransformMap\(\) ``` void OHOS::UIView::SetTransformMap (const [TransformMap](OHOS-TransformMap.md) & transMap) ``` **Description:** Sets the affine transformation matrix. **Parameters:**

Name

Description

transMap Indicates the transformation matrix.
## SetValidHeight\(\) ``` void OHOS::UIBoxProgress::SetValidHeight (int16_t height) ``` **Description:** Sets the actual height for this progress bar. The progress bar is centered in the view after the setting. By default, the height of the progress bar is the same as that of the view. If the height of the progress bar is greater than that of the view, the excess part cannot be displayed. **Parameters:**

Name

Description

height Indicates the actual height to set.
**See also:** [GetValidHeight](Graphic.md#ga1e6c92b20c4931a058c0b7775bf180c9) ## SetValidWidth\(\) ``` void OHOS::UIBoxProgress::SetValidWidth (int16_t width) ``` **Description:** Sets the actual width for this progress bar. The progress bar is centered in the view after the setting. By default, the width of the progress bar is the same as that of the view. If the width of the progress bar is greater than that of the view, the excess part cannot be displayed. **Parameters:**

Name

Description

width Indicates the actual width of this progress bar.
**See also:** [GetValidWidth](Graphic.md#ga6577d38d85234e08f709dd0ae131b255) ## SetValue\(\) ``` void OHOS::UIAbstractProgress::SetValue (int16_t value) ``` **Description:** Sets the current value for this progress bar. **Parameters:**

Name

Description

value Indicates the current value of this progress bar, within [rangeMin, rangeMax] specified by SetRange. If the value is less than rangeMin, rangeMin is used; if the value is greater than rangeMax, rangeMax is used.
**See also:** [SetRange](Graphic.md#ga089e3875453011499ad33ed89a44a699) | [GetValue](Graphic.md#ga6face76aa7972efeb6cbb8f525f23135) ## SetValues\(\) \[1/2\] ``` bool OHOS::UIPicker::SetValues (const char * value[], uint16_t count ) ``` **Description:** Sets dynamic text data in the picker by using a string array. **Parameters:**

Name

Description

value[] Indicates the array of text data.
count Indicates the array size.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetValues\(\) \[2/2\] ``` bool OHOS::UIPicker::SetValues (int16_t start, int16_t end ) ``` **Description:** Sets the numeric data in the picker by using a given numeric range. All integers in the range are automatically generated based on the start value and end value and placed in the picker in sequence. The start value must be smaller or equal to the end value. **Parameters:**

Name

Description

start Indicates the start integer.
end Indicates the end integer.
**Returns:** Returns **true** if the setting is successful; returns **false** otherwise. ## SetVertexNum\(\) ``` void OHOS::Polygon::SetVertexNum (uint8_t vertexNum) ``` **Description:** Sets the number of vertices of a polygon. **Parameters:**

Name

Description

vertexNum Indicates the number of vertices.
## SetVerticalScrollState\(\) ``` void OHOS::UIScrollView::SetVerticalScrollState (bool state) ``` **Description:** Sets whether a vertical scroll is enabled. **Parameters:**

Name

Description

state Specifies whether a vertical scroll is enabled. true indicates a vertical scroll is enabled, and false indicates the opposite case.
## SetViewId\(\) ``` void OHOS::UIView::SetViewId (const char * id) ``` **Description:** Sets the view ID. **Parameters:**

Name

Description

id Indicates the pointer to the view ID.
## SetViewIndex\(\) ``` void OHOS::UIView::SetViewIndex (int16_t index) ``` **Description:** Sets the view index. **Parameters:**

Name

Description

index Indicates the view index to set.
## SetVisible\(\) \[1/3\] ``` virtual void OHOS::UIView::SetVisible (bool visible) ``` **Description:** Sets whether the view is visible. Reimplemented in [OHOS::UISurfaceView](Graphic.md#gaa6b5efec0684a2800dba70c697d3902e), and [OHOS::UIDialog](Graphic.md#gaf836d530b3fa9d50f70053c2b0b528d6). **Parameters:**

Name

Description

visible Specifies whether to set the view visible. Value true means to set the view visible, and false means the opposite.
## SetVisible\(\) \[2/3\] ``` void OHOS::UIDialog::SetVisible (bool visible) ``` **Description:** Sets whether a dialog box is visible. Reimplemented from [OHOS::UIView](Graphic.md#ga07e7e1f268bd6ce975f4f0f8487af5d0). **Parameters:**

Name

Description

visible Specifies whether a dialog box is visible. The value true means visible, and false means invisible.
## SetVisible\(\) \[3/3\] ``` void OHOS::UISurfaceView::SetVisible (bool visible) ``` **Description:** Sets whether this view is visible. Reimplemented from [OHOS::UIView](Graphic.md#ga07e7e1f268bd6ce975f4f0f8487af5d0). **Parameters:**

Name

Description

visible Specifies whether this view is visible. true indicates this view is visible, and false indicates the opposite case.
## SetWidth\(\) \[1/10\] ``` void OHOS::TextAdapter::SetWidth (int16_t width) ``` **Description:** Sets the width of [UILabel](OHOS-UILabel.md) constructed by the adapter. **Returns:** Returns the width of [UILabel](OHOS-UILabel.md). ## SetWidth\(\) \[2/10\] ``` void OHOS::Rect::SetWidth (int16_t width) ``` **Description:** Changes the width of the rectangle without changing the coordinate of the left boundary. **Parameters:**

Name

Description

width Indicates the width of the rectangle.
## SetWidth\(\) \[3/10\] ``` virtual void OHOS::UIView::SetWidth (int16_t width) ``` **Description:** Sets the width for the view. Reimplemented in [OHOS::UIChart](Graphic.md#ga2ae317808111cd58e6ba93e030f23111), [OHOS::UILabel](Graphic.md#ga4000481fca247d526961d9da6809a806), [OHOS::UIButton](Graphic.md#ga420f927c473cec8c6f3265ff7c35336f), [OHOS::UIPicker](Graphic.md#ga792a345948af532f9c06cd40c05d1a2d), [OHOS::UITimePicker](Graphic.md#gad8dc3b2df7fe8aed16776a063efc8b4b), [OHOS::UISurfaceView](Graphic.md#ga54c350b75cf87ca112b3c21791f9c559), and [OHOS::UIBoxProgress](Graphic.md#ga4b3eeb9de2443182480a71cadb23178c). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWidth\(\) \[4/10\] ``` void OHOS::UIBoxProgress::SetWidth (int16_t width) ``` **Description:** Sets the width for the view holding this progress bar. The width of the view must be greater than or equal to the actual width of the progress bar to ensure a normal display. You need to call this function before calling [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) to set the actual width of the progress bar. Otherwise, the width of the progress bar is reset to **width** of the view. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width of the view.
**See also:** [SetHeight](Graphic.md#ga54299cb7561cee9a03d0fc9d0ddda784) | [SetValidWidth](Graphic.md#gada3cf1819e826ee0aed4a40ef00b91a6) | [SetValidHeight](Graphic.md#ga6958b8273ad7a5563dfa19267cc3a13c) ## SetWidth\(\) \[5/10\] ``` void OHOS::UISurfaceView::SetWidth (int16_t width) ``` **Description:** Sets the width for this view. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWidth\(\) \[6/10\] ``` void OHOS::UITimePicker::SetWidth (int16_t width) ``` **Description:** Sets the width for the time picker. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWidth\(\) \[7/10\] ``` void OHOS::UIPicker::SetWidth (int16_t width) ``` **Description:** Sets the width for this component. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWidth\(\) \[8/10\] ``` void OHOS::UIButton::SetWidth (int16_t width) ``` **Description:** Sets the width for this image. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWidth\(\) \[9/10\] ``` void OHOS::UILabel::SetWidth (int16_t width) ``` **Description:** Sets the width for this label. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWidth\(\) \[10/10\] ``` void OHOS::UIChart::SetWidth (int16_t width) ``` **Description:** Sets the width for this component. Reimplemented from [OHOS::UIView](Graphic.md#ga3375ec5ef059fd88c657af4552d2fa4f). **Parameters:**

Name

Description

width Indicates the width to set.
## SetWorkMode\(\) \[1/2\] ``` virtual void OHOS::UIAbstractClock::SetWorkMode ([WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) newMode) ``` **Description:** Sets the working mode for this clock. Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga1714e171ff1e9248932a9f2c14c82d12). **Parameters:**

Name

Description

newMode Indicates the working mode to set. For details, see WorkMode.
## SetWorkMode\(\) \[2/2\] ``` void OHOS::UIAnalogClock::SetWorkMode ([WorkMode](Graphic.md#ga19db90932bc71e6bbced6ccf2935ac98) newMode) ``` **Description:** Sets the working mode for this analog clock. Reimplemented from [OHOS::UIAbstractClock](Graphic.md#gaafa5df66c896268de27bf335c1b72b92). **Parameters:**

Name

Description

newMode Indicates the working mode to set. For details, see WorkMode.
## SetX\(\) \[1/3\] ``` void OHOS::Rect::SetX (int16_t x) ``` **Description:** Changes the left boundary coordinate of the rectangle without changing the rectangle width. **Parameters:**

Name

Description

x Indicates the coordinate of the left boundary.
## SetX\(\) \[2/3\] ``` virtual void OHOS::UIView::SetX (int16_t x) ``` **Description:** Sets the x-coordinate for the view. Reimplemented in [OHOS::UISurfaceView](Graphic.md#ga87457cce8ab3daa62852815ad36e9692). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
## SetX\(\) \[3/3\] ``` void OHOS::UISurfaceView::SetX (int16_t x) ``` **Description:** Sets the x-coordinate for this view. Reimplemented from [OHOS::UIView](Graphic.md#gaded403626558d28e62bf5632ccbb24b5). **Parameters:**

Name

Description

x Indicates the x-coordinate to set.
## SetXScrollBarVisible\(\) ``` void OHOS::UIScrollView::SetXScrollBarVisible (bool state) ``` **Description:** Sets whether the horizontal scroll bar is visible. **Parameters:**

Name

Description

state Specifies whether the horizontal scroll bar is visible. true indicates the horizontal scroll bar is visible, and false indicates the opposite case.
## SetY\(\) \[1/3\] ``` void OHOS::Rect::SetY (int16_t y) ``` **Description:** Changes the top boundary coordinate of the rectangle without changing the rectangle height. **Parameters:**

Name

Description

y Indicates the coordinate of the top boundary.
## SetY\(\) \[2/3\] ``` virtual void OHOS::UIView::SetY (int16_t y) ``` **Description:** Sets the y-coordinate for the view. Reimplemented in [OHOS::UISurfaceView](Graphic.md#gad7e27c2508753b6752594c3615b5d2fe). **Parameters:**

Name

Description

y Indicates the y-coordinate to set.
## SetY\(\) \[3/3\] ``` void OHOS::UISurfaceView::SetY (int16_t y) ``` **Description:** Sets the y-coordinate for this view. Reimplemented from [OHOS::UIView](Graphic.md#gaaa8edc224cf1c7deb2724fb225960877). **Parameters:**

Name

Description

y Indicates the y-coordinate to set.
## SetYScrollBarVisible\(\) ``` void OHOS::UIScrollView::SetYScrollBarVisible (bool state) ``` **Description:** Sets whether the vertical scroll bar is visible. **Parameters:**

Name

Description

state Specifies whether this vertical scroll bar is visible. true indicates the horizontal scroll bar is visible, and false indicates the opposite case.
## Silver\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Silver () ``` **Description:** Obtains the color data of silver. **Returns:** Returns the color data. ## SineEaseIn\(\) ``` static int16_t OHOS::EasingEquation::SineEaseIn (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in shaping like a sinusoidal curve. **sin\(t\)** is the equation for a sinusoidal easing. The animation starts slowly from zero velocity and accelerates fast towards the end. The acceleration change is similar to a sinusoidal curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [SineEaseOut](Graphic.md#ga34018757e69d7920557030f33393048d) | [SineEaseInOut](Graphic.md#ga2c3b14232a67095b0b941bae3a7b2e54) ## SineEaseInOut\(\) ``` static int16_t OHOS::EasingEquation::SineEaseInOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases in and then out shaping like a sinusoidal curve. **sin\(t\)** is the equation for a sinusoidal easing. The animation accelerates slowly until halfway and decelerates slowly towards the end. The acceleration change is similar to a sinusoidal curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [SineEaseIn](Graphic.md#ga89ee91a569b73c6ebb29ae4dfd2777f9) | [SineEaseOut](Graphic.md#ga34018757e69d7920557030f33393048d) ## SineEaseOut\(\) ``` static int16_t OHOS::EasingEquation::SineEaseOut (int16_t startPos, int16_t endPos, uint16_t curTime, uint16_t durationTime ) ``` **Description:** Eases out shaping like a sinusoidal curve. **sin\(t\)** is the equation for a sinusoidal easing. The animation starts fast and decelerates slowly towards the end. The acceleration change is similar to a sinusoidal curve. **Parameters:**

Name

Description

startPos Indicates the start value of this animation.
endPos Indicates the end value of this animation.
curTime Indicates the current time of this animation.
durationTime Indicates the total duration of this animation.
**Returns:** Returns the value for the current time. **See also:** [SineEaseIn](Graphic.md#ga89ee91a569b73c6ebb29ae4dfd2777f9) | [SineEaseInOut](Graphic.md#ga2c3b14232a67095b0b941bae3a7b2e54) ## Size\(\) ``` uint16_t [OHOS::List](OHOS-List-T.md)< T >::Size () const ``` **Description:** Obtains the size of a linked list. **Returns:** Returns the size of the linked list. ## Start\(\) \[1/3\] ``` void OHOS::UITextureMapper::Start () ``` **Description:** Starts this animator. ## Start\(\) \[2/3\] ``` void OHOS::Animator::Start () ``` **Description:** Starts this animator. **See also:** [Stop](Graphic.md#gad670cee429a5535149db0f8b3828e951) ## Start\(\) \[3/3\] ``` void OHOS::UIImageAnimatorView::Start () ``` **Description:** Starts this animator. The forward playback starts from the first image and the reverse playback starts from the last image. **See also:** [Stop](Graphic.md#ga1887f1afd8e85c0a9c781e182fe5afc3) ## Stop\(\) \[1/2\] ``` void OHOS::Animator::Stop () ``` **Description:** Stops this animator. **See also:** [Start](Graphic.md#gad56477fe4b6d0158082e841e327c1bf6) ## Stop\(\) \[2/2\] ``` void OHOS::UIImageAnimatorView::Stop (bool needReset = [/topic/body/section/screen/code {""}) true (code]) ``` **Description:** Stops this animator. **Parameters:**

Name

Description

needReset Specifies whether the animator needs to be reset to the original one. true (default value) indicates the original image is displayed, and false indicates the current image is displayed.
**See also:** [Start](Graphic.md#ga99fb1b9b27ee65f812085f93e05330a6) ## Style\(\) ``` OHOS::Style::Style () ``` **Description:** A constructor used to create a **[Style](OHOS-Style.md)** instance. ## StyleDefault\(\) ``` OHOS::StyleDefault::StyleDefault () ``` **Description:** A constructor used to create a **[StyleDefault](OHOS-StyleDefault.md)** instance. ## SuthHodgClip\(\) ``` [Polygon](OHOS-Polygon.md) OHOS::SuthHodgClip (const [Rect](OHOS-Rect.md) & clipRect, const [Polygon](OHOS-Polygon.md) & polygon ) ``` **Description:** Implements Sutherland-Hodgman, an algorithm used for clipping polygons. **Parameters:**

Name

Description

clipRect Indicates the rectangle used for clipping the polygon.
polygon Indicates the polygon to clip.
**Returns:** Returns the polygon after clipping. ## Tail\(\) ``` [ListNode](OHOS-ListNode-T.md)* [OHOS::List](OHOS-List-T.md)< T >::Tail () const ``` **Description:** Obtains the tail node address of a linked list. **Returns:** Returns the tail node address. ## Task\(\) ``` OHOS::Task::Task (uint32_t period) ``` **Description:** A constructor used to create a **[Task](OHOS-Task.md)** instance with the specified running period. **Parameters:**

Name

Description

period Indicates the running period of this task.
## Teal\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Teal () ``` **Description:** Obtains the color data of teal. **Returns:** Returns the color data. ## Text\(\) ``` OHOS::Text::Text () ``` **Description:** A constructor used to create a **[Text](OHOS-Text.md)** instance. ## TextAdapter\(\) ``` OHOS::TextAdapter::TextAdapter () ``` **Description:** A constructor used to create a **[UILabel](OHOS-UILabel.md)** instance. ## Theme\(\) ``` OHOS::Theme::Theme () ``` **Description:** A constructor used to create a **[Theme](OHOS-Theme.md)** instance. ## TransformMap\(\) \[1/2\] ``` OHOS::TransformMap::TransformMap () ``` **Description:** The default constructor used to create a **[TransformMap](OHOS-TransformMap.md)** instance. ## TransformMap\(\) \[2/2\] ``` OHOS::TransformMap::TransformMap (const [Rect](OHOS-Rect.md) & rect) ``` **Description:** A constructor used to create a **[TransformMap](OHOS-TransformMap.md)** instance. **Parameters:**

Name

Description

rect Indicates the rectangle to transform.
## Translate\(\) ``` [Matrix3](OHOS-Matrix3-T.md)< T > [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::Translate (const [Vector2](OHOS-Vector2-T.md)< T > & trans) ``` **Description:** Obtains a matrix translation. **Parameters:**

Name

Description

trans Indicates the distances to translate along the x-axis and y-axis.
**Returns:** Returns the matrix after translation. ## TranslateToPixel\(\) \[1/3\] ``` void OHOS::UIXAxis::TranslateToPixel (int16_t & value) ``` **Description:** Translates data into the x coordinate of a pixel. This function calculates the position of the corresponding pixel \(relative position in the chart\) based on the value of **value** and the data range of the x-axis. Implements [OHOS::UIAxis](Graphic.md#ga8ff3fd2953897245e4f6e3cb6bd71495). **Parameters:**

Name

Description

value Indicates the current value. The x coordinate obtained after translation is also printed using this parameter.
## TranslateToPixel\(\) \[2/3\] ``` void OHOS::UIYAxis::TranslateToPixel (int16_t & value) ``` **Description:** Translates data into the y coordinate of a pixel. Calculates the position of the corresponding pixel \(relative position in the chart\) based on the value of **value** and the data range of the Y axis. Implements [OHOS::UIAxis](Graphic.md#ga8ff3fd2953897245e4f6e3cb6bd71495). **Parameters:**

Name

Description

value Indicates the current value. The y coordinate obtained after translation is also printed using this parameter.
## TranslateToPixel\(\) \[3/3\] ``` virtual void OHOS::UIAxis::TranslateToPixel (int16_t & value) ``` **Description:** Translates data into pixel coordinates. This function calculates the relative position of a pixel in the corresponding [UIChart](OHOS-UIChart.md) based on the value of **value** and the data range of the coordinate axis. Implemented in [OHOS::UIYAxis](Graphic.md#gae70c8c411116746a2ab73a6f9bbd1233), and [OHOS::UIXAxis](Graphic.md#ga9407ddab6d7e65fc075ca37b86163e6f). **Parameters:**

Name

Description

value Indicates the current value. The coordinate value obtained after translation is also printed using this parameter.
## UIAbstractClock\(\) \[1/2\] ``` OHOS::UIAbstractClock::UIAbstractClock () ``` **Description:** A default constructor used to create a **[UIAbstractClock](OHOS-UIAbstractClock.md)** instance. ## UIAbstractClock\(\) \[2/2\] ``` OHOS::UIAbstractClock::UIAbstractClock (uint8_t hour, uint8_t minute, uint8_t second ) ``` **Description:** A constructor used to create a **[UIAbstractClock](OHOS-UIAbstractClock.md)** instance with time elements \(hour, minute and second\). **Parameters:**

Name

Description

hour Indicates the hour.
minute Indicates the minute.
second Indicates the second.
## UIAbstractProgress\(\) ``` OHOS::UIAbstractProgress::UIAbstractProgress () ``` **Description:** A constructor used to create a **[UIAbstractProgress](OHOS-UIAbstractProgress.md)** instance. ## UIAbstractScroll\(\) ``` OHOS::UIAbstractScroll::UIAbstractScroll () ``` **Description:** A constructor used to create a **[UIAbstractScroll](OHOS-UIAbstractScroll.md)** instance. ## UIAnalogClock\(\) ``` OHOS::UIAnalogClock::UIAnalogClock () ``` **Description:** A default constructor used to create a **[UIAnalogClock](OHOS-UIAnalogClock.md)** instance. ## UIArcLabel\(\) ``` OHOS::UIArcLabel::UIArcLabel () ``` **Description:** A default constructor used to create a **[UIArcLabel](OHOS-UIArcLabel.md)** instance. ## UIAxis\(\) ``` OHOS::UIAxis::UIAxis () ``` **Description:** A constructor used to create a **[UIAxis](OHOS-UIAxis.md)** instance. ## UIBoxProgress\(\) ``` OHOS::UIBoxProgress::UIBoxProgress () ``` **Description:** A constructor used to create a **[UIBoxProgress](OHOS-UIBoxProgress.md)** instance. ## UIButton\(\) \[1/2\] ``` OHOS::UIButton::UIButton () ``` **Description:** A constructor used to create a **[UIButton](OHOS-UIButton.md)** instance. ## UIButton\(\) \[2/2\] ``` OHOS::UIButton::UIButton (const char * id) ``` **Description:** A constructor used to create a **[UIButton](OHOS-UIButton.md)** instance based on the button ID. Buttons sharing the same ID are in the same batch. **Parameters:**

Name

Description

id Indicates the button ID.
## UICanvas\(\) ``` OHOS::UICanvas::UICanvas () ``` **Description:** A constructor used to create a **[UICanvas](OHOS-UICanvas.md)** instance. ## UIChart\(\) ``` OHOS::UIChart::UIChart () ``` **Description:** A constructor used to create a **[UIChart](OHOS-UIChart.md)** instance. ## UIChartDataSerial\(\) ``` OHOS::UIChartDataSerial::UIChartDataSerial () ``` **Description:** A constructor used to create a **[UIChartDataSerial](OHOS-UIChartDataSerial.md)** instance. ## UIChartPillar\(\) ``` OHOS::UIChartPillar::UIChartPillar () ``` **Description:** A constructor used to create a **[UIChartPillar](OHOS-UIChartPillar.md)** instance. ## UIChartPolyline\(\) ``` OHOS::UIChartPolyline::UIChartPolyline () ``` **Description:** A constructor used to create a **[UIChartPolyline](OHOS-UIChartPolyline.md)** instance. ## UICheckBox\(\) ``` OHOS::UICheckBox::UICheckBox () ``` **Description:** A constructor used to create a **[UICheckBox](OHOS-UICheckBox.md)** instance. ## UICircleProgress\(\) ``` OHOS::UICircleProgress::UICircleProgress () ``` **Description:** A constructor used to create a **[UICircleProgress](OHOS-UICircleProgress.md)** instance. ## UIDialog\(\) ``` OHOS::UIDialog::UIDialog () ``` **Description:** A constructor used to create a **[UIDialog](OHOS-UIDialog.md)** instance. ## UIDigitalClock\(\) ``` OHOS::UIDigitalClock::UIDigitalClock () ``` **Description:** A default constructor used to create a **[UIDigitalClock](OHOS-UIDigitalClock.md)** instance. ## UIFree\(\) ``` void OHOS::UIFree (void * buffer) ``` **Description:** Releases memory for the graphics module. You can implement this function to override the **free** and **delete** functions. **Parameters:**

Name

Description

buffer Indicates the pointer to the memory to be released.
## UIImageAnimatorView\(\) ``` OHOS::UIImageAnimatorView::UIImageAnimatorView () ``` **Description:** A constructor used to create a **[UIImageAnimatorView](OHOS-UIImageAnimatorView.md)** instance. ## UIImageView\(\) ``` OHOS::UIImageView::UIImageView () ``` **Description:** A default constructor used to create a **[UIImageView](OHOS-UIImageView.md)** instance. ## UILabel\(\) ``` OHOS::UILabel::UILabel () ``` **Description:** A constructor used to create a **[UILabel](OHOS-UILabel.md)** instance. ## UILabelButton\(\) ``` OHOS::UILabelButton::UILabelButton () ``` **Description:** A constructor used to create a **[UILabelButton](OHOS-UILabelButton.md)** instance. ## UIList\(\) \[1/2\] ``` OHOS::UIList::UIList () ``` **Description:** A constructor used to create a **[UIList](OHOS-UIList.md)** instance in the vertical direction. ## UIList\(\) \[2/2\] ``` OHOS::UIList::UIList (uint8_t direction) ``` **Description:** A constructor used to create a **[UIList](OHOS-UIList.md)** instance in the specified direction. **Parameters:**

Name

Description

direction Indicates the UIList direction, either HORIZONTAL or VERTICAL.
## UIMalloc\(\) ``` void* OHOS::UIMalloc (uint32_t size) ``` **Description:** Applies for memory for the graphics module. You can implement this function to override the **malloc** and **new** functions. **Parameters:**

Name

Description

size Indicates the size of the memory to apply for.
## UIPicker\(\) ``` OHOS::UIPicker::UIPicker () ``` **Description:** A constructor used to create a **[UIPicker](OHOS-UIPicker.md)** instance. ## UIRadioButton\(\) ``` OHOS::UIRadioButton::UIRadioButton () ``` **Description:** A constructor used to create a **[UIRadioButton](OHOS-UIRadioButton.md)** instance. ## UIRepeatButton\(\) ``` OHOS::UIRepeatButton::UIRepeatButton () ``` **Description:** A constructor used to create a **[UIRepeatButton](OHOS-UIRepeatButton.md)** instance. ## UIScrollView\(\) ``` OHOS::UIScrollView::UIScrollView () ``` **Description:** A constructor used to create a **[UIScrollView](OHOS-UIScrollView.md)** instance, with both horizontal and vertical scrolls supported. ## UISlider\(\) ``` OHOS::UISlider::UISlider () ``` **Description:** A constructor used to create a **[UISlider](OHOS-UISlider.md)** instance. ## UISurfaceView\(\) ``` OHOS::UISurfaceView::UISurfaceView () ``` **Description:** A constructor used to create a **[UISurfaceView](OHOS-UISurfaceView.md)** instance. ## UISwipeView\(\) ``` OHOS::UISwipeView::UISwipeView (uint8_t direction = [/topic/body/section/screen/code {""}) [HORIZONTAL](Graphic.md#ga34dfbde0fad8baade31c02d9e8dd5026) (code]) ``` **Description:** A constructor used to create a **[UISwipeView](OHOS-UISwipeView.md)** instance. ## UITextureMapper\(\) ``` OHOS::UITextureMapper::UITextureMapper () ``` **Description:** A constructor used to create a **[UITextureMapper](OHOS-UITextureMapper.md)** instance. ## UITimePicker\(\) ``` OHOS::UITimePicker::UITimePicker () ``` **Description:** A constructor used to create a **[UITimePicker](OHOS-UITimePicker.md)** instance. ## UIToggleButton\(\) ``` OHOS::UIToggleButton::UIToggleButton () ``` **Description:** A constructor used to create a **[UIToggleButton](OHOS-UIToggleButton.md)** instance. ## UIView\(\) \[1/2\] ``` OHOS::UIView::UIView () ``` **Description:** A default constructor used to create an **[UIView](OHOS-UIView.md)** instance. ## UIView\(\) \[2/2\] ``` OHOS::UIView::UIView (const char * id) ``` **Description:** A constructor used to create an **[UIView](OHOS-UIView.md)** instance. **Parameters:**

Name

Description

id Indicates the pointer to the view ID.
## UIViewGroup\(\) ``` OHOS::UIViewGroup::UIViewGroup () ``` **Description:** A default constructor used to create a **[UIViewGroup](OHOS-UIViewGroup.md)** instance. ## UIXAxis\(\) ``` OHOS::UIXAxis::UIXAxis () ``` **Description:** A constructor used to create a **[UIXAxis](OHOS-UIXAxis.md)** instance. ## UIYAxis\(\) ``` OHOS::UIYAxis::UIYAxis () ``` **Description:** A constructor used to create a **[UIYAxis](OHOS-UIYAxis.md)** instance. ## UpdateClock\(\) \[1/3\] ``` virtual void OHOS::UIAbstractClock::UpdateClock (bool clockInit) ``` **Description:** Updates this clock. Reimplemented in [OHOS::UIAnalogClock](Graphic.md#ga5274a3e5b66e5f80aab899ef4e61edb2), and [OHOS::UIDigitalClock](Graphic.md#ga386c03c483ef38cb5310563b6ba9bc02). **Parameters:**

Name

Description

clockInit Specifies whether it is the first initialization. true indicates it is the first initialization, and false indicates the opposite case.
## UpdateClock\(\) \[2/3\] ``` void OHOS::UIDigitalClock::UpdateClock (bool clockInit) ``` **Description:** Updates this digital clock. Reimplemented from [OHOS::UIAbstractClock](Graphic.md#gad7c0fba1eac5d10998954e9c1e097197). **Parameters:**

Name

Description

clockInit Specifies whether the first initialization. true indicates the first initialization, and false indicates the opposite case.
## UpdateClock\(\) \[3/3\] ``` void OHOS::UIAnalogClock::UpdateClock (bool clockInit) ``` **Description:** Updates the time of this analog clock. Reimplemented from [OHOS::UIAbstractClock](Graphic.md#gad7c0fba1eac5d10998954e9c1e097197). **Parameters:**

Name

Description

clockInit Specifies whether it is the first initialization. true indicates it is the first initialization, and false indicates the opposite case.
## Vector2\(\) \[1/2\] ``` [OHOS::Vector2](OHOS-Vector2-T.md)< T >::[Vector2](OHOS-Vector2-T.md) () ``` **Description:** A constructor used to create a **[Vector2](OHOS-Vector2-T.md)** instance. ## Vector2\(\) \[2/2\] ``` [OHOS::Vector2](OHOS-Vector2-T.md)< T >::[Vector2](OHOS-Vector2-T.md) (T x, T y ) ``` **Description:** A constructor used to create a **[Vector2](OHOS-Vector2-T.md)** instance based on the X and Y coordinates. **Parameters:**

Name

Description

x Indicates the X coordinate.
y Indicates the Y coordinate.
## Vector3\(\) \[1/2\] ``` [OHOS::Vector3](OHOS-Vector3-T.md)< T >::[Vector3](OHOS-Vector3-T.md) () ``` **Description:** A constructor used to create a **[Vector3](OHOS-Vector3-T.md)** instance. ## Vector3\(\) \[2/2\] ``` [OHOS::Vector3](OHOS-Vector3-T.md)< T >::[Vector3](OHOS-Vector3-T.md) (T x, T y, T z ) ``` **Description:** Defines a **[Vector3](OHOS-Vector3-T.md)** instance and initializes the values of **x**, **y**, and **z**. **Parameters:**

Name

Description

x Indicates the X coordinate.
y Indicates the Y coordinate.
z Indicates the Z coordinate.
## VirtualDeviceEvent\(\) ``` OHOS::VirtualDeviceEvent::VirtualDeviceEvent (uint16_t type, uint16_t value ) ``` **Description:** A constructor used to create a **[VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md)** instance. **Parameters:**

Name

Description

type Indicates the virtual device type. The options are AOD and PRIVATE.
value Indicates the virtual event value.
## White\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::White () ``` **Description:** Obtains the color data of white. **Returns:** Returns the color data. ## Yellow\(\) ``` static [ColorType](OHOS-Color32.md) OHOS::Color::Yellow () ``` **Description:** Obtains the color data of yellow. **Returns:** Returns the color data. ## \~AbstractAdapter\(\) ``` virtual OHOS::AbstractAdapter::~AbstractAdapter () ``` **Description:** A destructor used to delete the **[AbstractAdapter](OHOS-AbstractAdapter.md)** instance. ## \~Animator\(\) ``` virtual OHOS::Animator::~Animator () ``` **Description:** A destructor used to delete the **[Animator](OHOS-Animator.md)** instance. ## \~AnimatorCallback\(\) ``` virtual OHOS::AnimatorCallback::~AnimatorCallback () ``` **Description:** A default destructor used to delete an **[AnimatorCallback](OHOS-AnimatorCallback.md)** instance. ## \~AnimatorStopListener\(\) \[1/2\] ``` virtual OHOS::UITextureMapper::AnimatorStopListener::~AnimatorStopListener () ``` **Description:** A destructor used to delete an **[AnimatorStopListener](OHOS-UITextureMapper-AnimatorStopListener.md)** instance. ## \~AnimatorStopListener\(\) \[2/2\] ``` virtual OHOS::UIImageAnimatorView::AnimatorStopListener::~AnimatorStopListener () ``` **Description:** A destructor used to delete an **[AnimatorStopListener](OHOS-UIImageAnimatorView-AnimatorStopListener.md)** instance. ## \~CancelEvent\(\) ``` virtual OHOS::CancelEvent::~CancelEvent () ``` **Description:** A destructor used to delete the **[CancelEvent](OHOS-CancelEvent.md)** instance. ## \~ClickEvent\(\) ``` virtual OHOS::ClickEvent::~ClickEvent () ``` **Description:** A destructor used to delete the **[ClickEvent](OHOS-ClickEvent.md)** instance. ## \~DragEvent\(\) ``` virtual OHOS::DragEvent::~DragEvent () ``` **Description:** A destructor used to delete the **[DragEvent](OHOS-DragEvent.md)** instance. ## \~Event\(\) ``` virtual OHOS::Event::~Event () ``` **Description:** A destructor used to delete the **[Event](OHOS-Event.md)** instance. ## \~FlexLayout\(\) ``` virtual OHOS::FlexLayout::~FlexLayout () ``` **Description:** A destructor used to delete the **[FlexLayout](OHOS-FlexLayout.md)** instance. ## \~GridLayout\(\) ``` virtual OHOS::GridLayout::~GridLayout () ``` **Description:** A destructor used to delete the **[GridLayout](OHOS-GridLayout.md)** instance. ## \~Hand\(\) ``` virtual OHOS::UIAnalogClock::Hand::~Hand () ``` **Description:** A destructor used to delete the **[Hand](OHOS-UIAnalogClock-Hand.md)** instance. ## \~Image\(\) ``` virtual OHOS::Image::~Image () ``` **Description:** A destructor used to delete the **[Image](OHOS-Image.md)** instance. ## \~KeyEvent\(\) ``` OHOS::KeyEvent::~KeyEvent () ``` **Description:** A destructor used to delete the **[KeyEvent](OHOS-KeyEvent.md)** instance. ## \~Layout\(\) ``` virtual OHOS::Layout::~Layout () ``` **Description:** A destructor used to delete the **[Layout](OHOS-Layout.md)** instance. ## \~Line\(\) ``` OHOS::Line::~Line () ``` **Description:** A destructor used to delete the **[Line](OHOS-Line.md)** instance. ## \~List\(\) ``` virtual [OHOS::List](OHOS-List-T.md)< T >::~[List](OHOS-List-T.md) () ``` **Description:** A destructor used to delete the **[List](OHOS-List-T.md)** instance. ## \~ListScrollListener\(\) ``` virtual OHOS::ListScrollListener::~ListScrollListener () ``` **Description:** A destructor used to delete the **[ListScrollListener](OHOS-ListScrollListener.md)** instance. ## \~LongPressEvent\(\) ``` virtual OHOS::LongPressEvent::~LongPressEvent () ``` **Description:** A destructor used to delete the **[LongPressEvent](OHOS-LongPressEvent.md)** instance. ## \~Matrix3\(\) ``` [OHOS::Matrix3](OHOS-Matrix3-T.md)< T >::~[Matrix3](OHOS-Matrix3-T.md) () ``` **Description:** A destructor used to delete the **[Matrix3](OHOS-Matrix3-T.md)** instance. ## \~OnChangeListener\(\) ``` virtual OHOS::UICheckBox::OnChangeListener::~OnChangeListener () ``` **Description:** A destructor used to delete the **[OnChangeListener](OHOS-UICheckBox-OnChangeListener.md)** instance. ## \~OnClickListener\(\) ``` virtual OHOS::UIView::OnClickListener::~OnClickListener () ``` **Description:** A destructor used to delete the **[OnClickListener](OHOS-UIView-OnClickListener.md)** instance. ## \~OnDragListener\(\) ``` virtual OHOS::UIView::OnDragListener::~OnDragListener () ``` **Description:** A destructor used to delete the **[OnDragListener](OHOS-UIView-OnDragListener.md)** instance. ## \~OnFPSChangedListener\(\) ``` virtual OHOS::SysInfo::OnFPSChangedListener::~OnFPSChangedListener () ``` **Description:** A destructor used to delete the **[OnFPSChangedListener](OHOS-SysInfo-OnFPSChangedListener.md)** instance. ## \~OnLongPressListener\(\) ``` virtual OHOS::UIView::OnLongPressListener::~OnLongPressListener () ``` **Description:** A destructor used to delete the **[OnLongPressListener](OHOS-UIView-OnLongPressListener.md)** instance. ## \~OnScrollListener\(\) ``` virtual OHOS::UIScrollView::OnScrollListener::~OnScrollListener () ``` **Description:** A destructor used to delete the **[OnScrollListener](OHOS-UIScrollView-OnScrollListener.md)** instance. ## \~OnTouchListener\(\) ``` virtual OHOS::UIView::OnTouchListener::~OnTouchListener () ``` **Description:** A destructor used to delete the **[OnTouchListener](OHOS-UIView-OnTouchListener.md)** instance. ## \~Paint\(\) ``` virtual OHOS::Paint::~Paint () ``` **Description:** A destructor used to delete the **[Paint](OHOS-Paint.md)** instance. ## \~Polygon\(\) ``` OHOS::Polygon::~Polygon () ``` **Description:** A destructor used to delete the **[Polygon](OHOS-Polygon.md)** instance. ## \~PressEvent\(\) ``` virtual OHOS::PressEvent::~PressEvent () ``` **Description:** A destructor used to delete the **[PressEvent](OHOS-PressEvent.md)** instance. ## \~Rect\(\) ``` OHOS::Rect::~Rect () ``` **Description:** A destructor used to delete the **[Rect](OHOS-Rect.md)** instance. ## \~ReleaseEvent\(\) ``` virtual OHOS::ReleaseEvent::~ReleaseEvent () ``` **Description:** A destructor used to delete the **[ReleaseEvent](OHOS-ReleaseEvent.md)** instance. ## \~SelectedListener\(\) \[1/2\] ``` OHOS::UITimePicker::SelectedListener::~SelectedListener () ``` **Description:** A destructor used to delete the **[SelectedListener](OHOS-UITimePicker-SelectedListener.md)** instance. ## \~SelectedListener\(\) \[2/2\] ``` virtual OHOS::UIPicker::SelectedListener::~SelectedListener () ``` **Description:** A destructor used to delete the **[SelectedListener](OHOS-UIPicker-SelectedListener.md)** instance. ## \~Style\(\) ``` virtual OHOS::Style::~Style () ``` **Description:** A destructor used to delete the **[Style](OHOS-Style.md)** instance. ## \~StyleDefault\(\) ``` OHOS::StyleDefault::~StyleDefault () ``` **Description:** A destructor used to delete the **[StyleDefault](OHOS-StyleDefault.md)** instance. ## \~Text\(\) ``` virtual OHOS::Text::~Text () ``` **Description:** A destructor used to delete the **[Text](OHOS-Text.md)** instance. ## \~TextAdapter\(\) ``` virtual OHOS::TextAdapter::~TextAdapter () ``` **Description:** A destructor used to delete the **[UILabel](OHOS-UILabel.md)** instance. ## \~Theme\(\) ``` virtual OHOS::Theme::~Theme () ``` **Description:** A destructor used to delete the **[Theme](OHOS-Theme.md)** instance. ## \~TransformMap\(\) ``` OHOS::TransformMap::~TransformMap () ``` **Description:** A destructor used to delete the **[TransformMap](OHOS-TransformMap.md)** instance. ## \~UIAbstractClock\(\) ``` virtual OHOS::UIAbstractClock::~UIAbstractClock () ``` **Description:** A destructor used to delete the **[UIAbstractClock](OHOS-UIAbstractClock.md)** instance. ## \~UIAbstractProgress\(\) ``` virtual OHOS::UIAbstractProgress::~UIAbstractProgress () ``` **Description:** A destructor used to delete the **[UIAbstractProgress](OHOS-UIAbstractProgress.md)** instance. ## \~UIAbstractScroll\(\) ``` virtual OHOS::UIAbstractScroll::~UIAbstractScroll () ``` **Description:** A destructor used to delete the **[UIAbstractScroll](OHOS-UIAbstractScroll.md)** instance. ## \~UIAnalogClock\(\) ``` virtual OHOS::UIAnalogClock::~UIAnalogClock () ``` **Description:** A destructor used to delete the **[UIAnalogClock](OHOS-UIAnalogClock.md)** instance. ## \~UIArcLabel\(\) ``` virtual OHOS::UIArcLabel::~UIArcLabel () ``` **Description:** A destructor used to delete the **[UIArcLabel](OHOS-UIArcLabel.md)** instance. ## \~UIAxis\(\) ``` virtual OHOS::UIAxis::~UIAxis () ``` **Description:** A destructor used to delete the **[UIAxis](OHOS-UIAxis.md)** instance. ## \~UIBoxProgress\(\) ``` virtual OHOS::UIBoxProgress::~UIBoxProgress () ``` **Description:** A destructor used to delete the **[UIBoxProgress](OHOS-UIBoxProgress.md)** instance. ## \~UIButton\(\) ``` virtual OHOS::UIButton::~UIButton () ``` **Description:** A destructor used to delete the **[UIButton](OHOS-UIButton.md)** instance. ## \~UICanvas\(\) ``` virtual OHOS::UICanvas::~UICanvas () ``` **Description:** A destructor used to delete the **[UICanvas](OHOS-UICanvas.md)** instance. ## \~UIChart\(\) ``` virtual OHOS::UIChart::~UIChart () ``` **Description:** A destructor used to delete the **[UIChart](OHOS-UIChart.md)** instance. ## \~UIChartDataSerial\(\) ``` virtual OHOS::UIChartDataSerial::~UIChartDataSerial () ``` **Description:** A destructor used to delete the **[UIChartDataSerial](OHOS-UIChartDataSerial.md)** instance. ## \~UIChartPillar\(\) ``` virtual OHOS::UIChartPillar::~UIChartPillar () ``` **Description:** A destructor used to delete the **[UIChartPillar](OHOS-UIChartPillar.md)** instance. ## \~UIChartPolyline\(\) ``` virtual OHOS::UIChartPolyline::~UIChartPolyline () ``` **Description:** A destructor used to delete the **[UIChartPolyline](OHOS-UIChartPolyline.md)** instance. ## \~UICheckBox\(\) ``` virtual OHOS::UICheckBox::~UICheckBox () ``` **Description:** A destructor used to delete the **[UICheckBox](OHOS-UICheckBox.md)** instance. ## \~UICircleProgress\(\) ``` virtual OHOS::UICircleProgress::~UICircleProgress () ``` **Description:** A destructor used to delete the **[UICircleProgress](OHOS-UICircleProgress.md)** instance. ## \~UIDialog\(\) ``` virtual OHOS::UIDialog::~UIDialog () ``` **Description:** A destructor used to delete the **[UIDialog](OHOS-UIDialog.md)** instance. ## \~UIDigitalClock\(\) ``` virtual OHOS::UIDigitalClock::~UIDigitalClock () ``` **Description:** A destructor used to delete the **[UIDigitalClock](OHOS-UIDigitalClock.md)** instance. ## \~UIImageAnimatorView\(\) ``` virtual OHOS::UIImageAnimatorView::~UIImageAnimatorView () ``` **Description:** A destructor used to delete the **[UIImageAnimatorView](OHOS-UIImageAnimatorView.md)** instance. ## \~UIImageView\(\) ``` virtual OHOS::UIImageView::~UIImageView () ``` **Description:** A destructor used to delete the **[UIImageView](OHOS-UIImageView.md)** instance. ## \~UILabel\(\) ``` virtual OHOS::UILabel::~UILabel () ``` **Description:** A destructor used to delete the **[UILabel](OHOS-UILabel.md)** instance. ## \~UILabelButton\(\) ``` virtual OHOS::UILabelButton::~UILabelButton () ``` **Description:** A destructor used to delete the **[UILabelButton](OHOS-UILabelButton.md)** instance. ## \~UIList\(\) ``` virtual OHOS::UIList::~UIList () ``` **Description:** A destructor used to delete the **[UIList](OHOS-UIList.md)** instance. ## \~UIPicker\(\) ``` virtual OHOS::UIPicker::~UIPicker () ``` **Description:** A destructor used to delete the **[UIPicker](OHOS-UIPicker.md)** instance. ## \~UIRadioButton\(\) ``` virtual OHOS::UIRadioButton::~UIRadioButton () ``` **Description:** A destructor used to delete the **[UIRadioButton](OHOS-UIRadioButton.md)** instance. ## \~UIRepeatButton\(\) ``` virtual OHOS::UIRepeatButton::~UIRepeatButton () ``` **Description:** A destructor used to delete the **[UIRepeatButton](OHOS-UIRepeatButton.md)** instance. ## \~UIScrollView\(\) ``` virtual OHOS::UIScrollView::~UIScrollView () ``` **Description:** A destructor used to delete the **[UIScrollView](OHOS-UIScrollView.md)** instance. ## \~UISlider\(\) ``` virtual OHOS::UISlider::~UISlider () ``` **Description:** A destructor used to delete the **[UISlider](OHOS-UISlider.md)** instance. ## \~UISliderEventListener\(\) ``` virtual OHOS::UISlider::UISliderEventListener::~UISliderEventListener () ``` **Description:** A destructor used to delete the ** [UISliderEventListener](OHOS-UISlider-UISliderEventListener.md) ** instance. ## \~UISurfaceView\(\) ``` OHOS::UISurfaceView::~UISurfaceView () ``` **Description:** A destructor used to delete the **[UISurfaceView](OHOS-UISurfaceView.md)** instance. ## \~UISwipeView\(\) ``` virtual OHOS::UISwipeView::~UISwipeView () ``` **Description:** A destructor used to delete the **[UISwipeView](OHOS-UISwipeView.md)** instance. ## \~UITextureMapper\(\) ``` virtual OHOS::UITextureMapper::~UITextureMapper () ``` **Description:** A destructor used to delete the **[UITextureMapper](OHOS-UITextureMapper.md)** instance. ## \~UITimePicker\(\) ``` virtual OHOS::UITimePicker::~UITimePicker () ``` **Description:** A destructor used to delete the **[UITimePicker](OHOS-UITimePicker.md)** instance. ## \~UIToggleButton\(\) ``` virtual OHOS::UIToggleButton::~UIToggleButton () ``` **Description:** A destructor used to delete the **[UIToggleButton](OHOS-UIToggleButton.md)** instance. ## \~UIView\(\) ``` virtual OHOS::UIView::~UIView () ``` **Description:** A destructor used to delete the **[UIView](OHOS-UIView.md)** instance. ## \~UIViewGroup\(\) ``` virtual OHOS::UIViewGroup::~UIViewGroup () ``` **Description:** A destructor used to delete the **[UIViewGroup](OHOS-UIViewGroup.md)** instance. ## \~UIXAxis\(\) ``` virtual OHOS::UIXAxis::~UIXAxis () ``` **Description:** A destructor used to delete the **[UIXAxis](OHOS-UIXAxis.md)** instance. ## \~UIYAxis\(\) ``` virtual OHOS::UIYAxis::~UIYAxis () ``` **Description:** A destructor used to delete the **[UIYAxis](OHOS-UIYAxis.md)** instance. ## \~Vector2\(\) ``` [OHOS::Vector2](OHOS-Vector2-T.md)< T >::~[Vector2](OHOS-Vector2-T.md) () ``` **Description:** A destructor used to delete the **[Vector2](OHOS-Vector2-T.md)** instance. ## \~Vector3\(\) ``` [OHOS::Vector3](OHOS-Vector3-T.md)< T >::~[Vector3](OHOS-Vector3-T.md) () ``` **Description:** A destructor used to delete the **[Vector3](OHOS-Vector3-T.md)** instance. ## \~VirtualDeviceEvent\(\) ``` OHOS::VirtualDeviceEvent::~VirtualDeviceEvent () ``` **Description:** A destructor used to delete the **[VirtualDeviceEvent](OHOS-VirtualDeviceEvent.md)** instance. ## **Variable Documentation** ## align ``` [UITextLanguageAlignment](Graphic.md#ga3f99b58f731a37cacde72d5e0c934593) OHOS::UICanvas::FontStyle::align ``` **Description:** [Text](OHOS-Text.md) alignment mode. For details, see **UITextLanguageAlignment**. ## alpha \[1/2\] ``` uint8_t OHOS::Color32::alpha ``` **Description:** Alpha \(how opaque each pixel is\) ## alpha \[2/2\] ``` uint8_t { ... } ::alpha ``` **Description:** Alpha \(how opaque each pixel is\) ## ANIMATOR\_TIME ``` constexpr static uint16_t OHOS::UISwipeView::ANIMATOR_TIME = 12 ``` **Description:** Indicates that the animation duration is 12 ticks. ## blue \[1/5\] ``` uint16_t { ... } ::blue ``` **Description:** Blue ## blue \[2/5\] ``` uint16_t OHOS::Color16::blue ``` **Description:** Blue ## blue \[3/5\] ``` uint8_t OHOS::Color24::blue ``` **Description:** Blue ## blue \[4/5\] ``` uint8_t OHOS::Color32::blue ``` **Description:** Blue ## blue \[5/5\] ``` uint8_t { ... } ::blue ``` **Description:** Blue ## CIRCLE\_IN\_DEGREE ``` constexpr uint16_t OHOS::CIRCLE_IN_DEGREE = 360 ``` **Description:** A full rotation: 360 degrees ## colorMode ``` uint32_t OHOS::ImageHeader::colorMode ``` **Description:** [Color](OHOS-Color.md) format, which is used to match image type. This variable is important. ## data ``` const uint8_t* OHOS::ImageInfo::data ``` **Description:** Pixel color data of pixelmap images ## dataSize ``` uint32_t OHOS::ImageInfo::dataSize ``` **Description:** Size of the image data \(in bytes\) ## DEFAULT\_BLANK\_SIZE ``` constexpr static uint16_t OHOS::UISwipeView::DEFAULT_BLANK_SIZE = 30 ``` **Description:** Indicates the maximum distance between the first and the last tab when the current view is not in a cycle swipe mode. The page can be rebound after the setting. ## direct ``` [UITextLanguageDirect](Graphic.md#ga0c108f97781843f67c101b47b6c00cf0) OHOS::UICanvas::FontStyle::direct ``` **Description:** [Text](OHOS-Text.md) direction. For details, see **UITextLanguageDirect**. ## fillColor ``` [ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::PointStyle::fillColor ``` **Description:** Fill color ## fontName ``` const char* OHOS::UICanvas::FontStyle::fontName ``` **Description:** Font name ## fontSize ``` uint8_t OHOS::UICanvas::FontStyle::fontSize ``` **Description:** Font size ## full \[1/2\] ``` uint16_t OHOS::Color16::full ``` **Description:** Full RGB data ## full \[2/2\] ``` uint32_t OHOS::Color32::full ``` **Description:** Full RGB data ## green \[1/5\] ``` uint16_t { ... } ::green ``` **Description:** Green ## green \[2/5\] ``` uint16_t OHOS::Color16::green ``` **Description:** Green ## green \[3/5\] ``` uint8_t OHOS::Color24::green ``` **Description:** Green ## green \[4/5\] ``` uint8_t { ... } ::green ``` **Description:** Green ## green \[5/5\] ``` uint8_t OHOS::Color32::green ``` **Description:** Green ## header ``` [ImageHeader](OHOS-ImageHeader.md) OHOS::ImageInfo::header ``` **Description:** [Image](OHOS-Image.md) head node information. For details, see [ImageHeader](OHOS-ImageHeader.md). ## height \[1/2\] ``` uint16_t OHOS::ImageHeader::height ``` **Description:** [Image](OHOS-Image.md) height ## height \[2/2\] ``` int16_t OHOS::ImageAnimatorInfo::height ``` **Description:** [Image](OHOS-Image.md) height ## HORIZONTAL ``` constexpr uint8_t OHOS::UISwipeView::HORIZONTAL = 0 ``` **Description:** Indicates the horizontal direction. ## imageInfo ``` const char* OHOS::ImageAnimatorInfo::imageInfo ``` **Description:** [Image](OHOS-Image.md) path or pointer to the [ImageInfo](OHOS-ImageInfo.md) structure ## inactive ``` [Style](OHOS-Style.md) OHOS::ButtonStyle::inactive ``` **Description:** [Style](OHOS-Style.md) when inactive ## letterSpace ``` int16_t OHOS::UICanvas::FontStyle::letterSpace ``` **Description:** Letter-spacing ## MAX\_VERTEX\_NUM ``` const uint8_t OHOS::Polygon::MAX_VERTEX_NUM = 8 ``` **Description:** Maximum number of vertices in a polygon ## pos ``` [Point](OHOS-Point.md) OHOS::ImageAnimatorInfo::pos ``` **Description:** [Image](OHOS-Image.md) start position, relative to this view ## pressed ``` [Style](OHOS-Style.md) OHOS::ButtonStyle::pressed ``` **Description:** [Style](OHOS-Style.md) when pressed ## QUARTER\_IN\_DEGREE ``` constexpr uint16_t OHOS::QUARTER_IN_DEGREE = 90 ``` **Description:** A quarter of a rotation: 90 degrees ## radius ``` uint16_t OHOS::UIChartDataSerial::PointStyle::radius ``` **Description:** Inner radius ## red \[1/5\] ``` uint16_t OHOS::Color16::red ``` **Description:** Red ## red \[2/5\] ``` uint16_t { ... } ::red ``` **Description:** Red ## red \[3/5\] ``` uint8_t OHOS::Color24::red ``` **Description:** Red ## red \[4/5\] ``` uint8_t OHOS::Color32::red ``` **Description:** Red ## red \[5/5\] ``` uint8_t { ... } ::red ``` **Description:** Red ## released ``` [Style](OHOS-Style.md) OHOS::ButtonStyle::released ``` **Description:** [Style](OHOS-Style.md) when released ## SEMICIRCLE\_IN\_DEGREE ``` constexpr uint16_t OHOS::SEMICIRCLE_IN_DEGREE = 180 ``` **Description:** A half of a rotation: 180 degrees ## STOP\_DISTANCE ``` constexpr static uint16_t OHOS::UISwipeView::STOP_DISTANCE = 5 ``` **Description:** Indicates the maximum distance of an invalid dragging. Dragging is not triggered if the distance is less than this value. ## strokeColor ``` [ColorType](OHOS-Color32.md) OHOS::UIChartDataSerial::PointStyle::strokeColor ``` **Description:** Border color ## strokeWidth ``` uint16_t OHOS::UIChartDataSerial::PointStyle::strokeWidth ``` **Description:** Border width, which extends outwards from the inner radius ## TEXT\_ELLIPSIS\_END\_INV ``` constexpr uint16_t OHOS::Text::TEXT_ELLIPSIS_END_INV = 0xFFFF ``` **Description:** Invalid value for the ellipsis position ## THREE\_QUARTER\_IN\_DEGREE ``` constexpr uint16_t OHOS::THREE_QUARTER_IN_DEGREE = 270 ``` **Description:** Three fourths of a rotation: 270 degrees ## UI\_PI ``` constexpr double OHOS::UI_PI = 3.14159265358979 ``` **Description:** Pi value ## userData ``` void* OHOS::ImageInfo::userData ``` **Description:** User-defined data ## VERTICAL ``` constexpr uint8_t OHOS::UISwipeView::VERTICAL = 1 ``` **Description:** Indicates the vertical direction. ## width \[1/2\] ``` uint16_t OHOS::ImageHeader::width ``` **Description:** [Image](OHOS-Image.md) width ## width \[2/2\] ``` int16_t OHOS::ImageAnimatorInfo::width ``` **Description:** [Image](OHOS-Image.md) width ## x ``` int16_t OHOS::Point::x ``` **Description:** X coordinate ## y ``` int16_t OHOS::Point::y ``` **Description:** Y coordinate