OHOS::UISwipeView
Description:
Represents a swipe view.
Each swipe view consists of multiple child views, which can be navigated through swiping. The child views can be either horizontal or vertical.
Since:
1.0
Version:
1.0
Summary
Public Member Functions
(uint8_t direction=HORIZONTAL) |
|
~UISwipeView () |
|
GetViewType () const override |
|
GetDirection () const |
|
(UIView view) override |
|
(UIView prevView, insertView) override |
|
Remove ( view) override |
|
SetCurrentPage (uint16_t , bool needAnimator=false) |
|
GetCurrentPage () const |
|
Sets a blank size, as defined in DEFAULT_BLANK_SIZE. |
|
(const DragEvent &event) override |
|
(const DragEvent &event) override |
|
(uint16_t time) |
Sets the time for the page being animated. The page will go beyond the blank during this time. |
GetViewByIndex (uint16_t ) const |
|
(OnSwipeListener onSwipeListener) |
Sets the listener that contains a callback to be invoked upon a swipe event. |
A constructor used to create a UIAbstractScroll instance. |
|
A destructor used to delete the UIAbstractScroll instance. |
|
SetScrollBlankSize (uint16_t size) |
|
Sets the maximum scroll distance after a finger lifts the screen. |
|
SetReboundSize (uint16_t size) |
Sets the rebound size, which is the distance a knob moves after being released when it reaches the end of a scrollbar. |
Obtains the maximum scroll distance after a finger lifts the screen. |
|
SetDragFunc (EasingFunc func) |
Sets the easing function that specifies a scroll animation after a finger lifts the screen. |
Sets whether to continue scrolling after a finger lifts the screen. |
|
SetDragACCLevel (uint16_t value) |
|
SetSwipeACCLevel (uint16_t value) |
Sets the compensation distance after a finger lifts the screen. |
Obtains the compensation distance after a finger lifts the screen. |
|
UIViewGroup () |
|
~UIViewGroup () |
|
GetViewType () const override |
|
GetTargetView (const &point, UIView *last) override |
Obtains the target child view that is visible and can respond to touch events based on given coordinates. |
Sets whether this view group is intercepted upon touch events. |
|
GetChildById (const char id) const override |
|
SetAutoSize (bool state) |
Sets whether the size of this view group is adaptive to that of all child views. |
UIView (const char id) |
|
~UIView () |
|
OnPreDraw (const &invalidatedArea) |
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. |
OnDraw (const &invalidatedArea) |
|
OnPostDraw (const &invalidatedArea) |
|
ReMeasure () |
|
InvalidateRect (const &invalidatedArea) |
|
OnLongPressEvent (const &event) |
|
OnDragStartEvent (const &event) |
|
OnClickEvent (const &event) |
|
OnPressEvent (const &event) |
|
OnReleaseEvent (const &event) |
|
OnCancelEvent (const &event) |
|
SetOnDragListener ( onDragListener) |
|
SetOnClickListener ( onClickListener) |
|
SetOnLongPressListener ( onLongPressListener) |
|
SetOnTouchListener ( onTouchListener) |
|
SetParent ( parent) |
|
GetParent () const |
|
SetNextSibling ( sibling) |
|
GetNextSibling () const |
|
SetVisible (bool visible) |
|
SetTouchable (bool touch) |
|
SetDraggable (bool draggable) |
|
SetDragParentInstead (bool dragParentInstead) |
Sets whether to transfer the drag event to the parent view for processing when the view is being dragged. |
Obtains whether the view transfers a drag event to the parent view for processing. |
|
GetRect () const |
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. |
GetVisibleRect () const |
|
GetMaskedRect () const |
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. |
GetOrigRect () const |
|
Obtains the content of the absolute rectangle area of the view. This area excludes padding. |
|
GetRelativeRect () const |
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. |
ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height) |
Adjusts the size of the visible area. This operation may affect the final display size. |
GetWidth () |
|
GetHeight () |
|
SetX (int16_t x) |
|
GetY () const |
|
SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) |
|
SetIntercept (bool isIntercept) |
Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing. |
(const TransformMap &transMap) |
|
GetViewId () const |
|
(int16_t index) |
|
LayoutChildren (bool neeInvalidate=false) |
Lays out all child views according to the preset arrangement mode. |
LayoutLeftOfParent (int16_t offset=0) |
|
LayoutTopOfParent (int16_t offset=0) |
|
AlignLeftToSibling (const char id, int16_t offset=0) |
|
AlignTopToSibling (const char id, int16_t offset=0) |
|
AlignHorCenterToSibling (const char id, int16_t offset=0) |
Aligns the view with the center of a sibling view in the x-axis. |
Aligns the view with the center of a sibling view in the y-axis. |
|
LayoutLeftToSibling (const char id, int16_t offset=0) |
|
LayoutTopToSibling (const char id, int16_t offset=0) |
|
SetStyle ( &style) |
|
SetStyle (uint8_t key, int64_t value) |
|
GetStyleConst () const |
Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory. |
operator new (size_t size) |
|
Protected Member Functions
GetAllChildRelativeRect () const |
Obtains the rectangle area of a new view group after being adaptive to the size of all child views. |
Performs operations needed after a child view is added or removed. |