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 - st^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