OHOS::UIBoxProgress

    Graphic

    Description:

    Represents a linear progress bar.

    This class is used to set the range and current value to display the linear progress bar which can be in multiple directions.

    Since:

    1.0

    Version:

    1.0

    Public Member Function Name

    Description

    ()

     

    A constructor used to create a UIBoxProgress instance.

    ()

    virtual 

    A destructor used to delete the UIBoxProgress instance.

    () const override

    UIViewType 

    Obtains the view type.

    SetWidth (int16_t width) override

    void 

    Sets the width for the view holding this progress bar.

    (int16_t height) override

    void 

    Sets the height for this view.

    SetDirection (const &direction)

    void 

    Sets the direction for this progress bar.

    GetDirection () const

     

    Obtains the direction of this progress bar.

    SetValidWidth (int16_t width)

    void 

    Sets the actual width for this progress bar.

    () const

    int16_t 

    Obtains the actual width of this progress bar.

    SetValidHeight (int16_t height)

    void 

    Sets the actual height for this progress bar.

    () const

    int16_t 

    Obtains the actual height of this progress bar.

    OnDraw (const &invalidatedArea) override

    void 

    Called when a view is drawn.

    UIAbstractProgress ()

     

    A constructor used to create a instance.

    ~UIAbstractProgress ()

    virtual 

    A destructor used to delete the instance.

    EnableBackground (bool enable)

    void 

    Sets whether the background of the progress bar is visible.

    (int16_t value)

    void 

    Sets the current value for this progress bar.

    GetValue () const

    int16_t 

    Obtains the current value of this progress bar.

    (int16_t rangeMax, int16_t rangeMin)

    void 

    Sets the range for this progress bar.

    GetRangeMin () const

    int16_t 

    Obtains the minimum value of this progress bar.

    () const

    int16_t 

    Obtains the maximum value of this progress bar.

    SetImage (const char foregroundImage, const char backgroundImage=nullptr)

    void 

    Sets the image for this progress bar.

    (const ImageInfo foregroundImage, const backgroundImage=nullptr)

    void 

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

    SetStep (uint16_t step)

    void 

    Sets the step for this progress bar.

    () const

    uint16_t 

    Obtains the current step of this progress bar.

    SetBackgroundStyle (const &style)

    void 

    Sets the background style for this progress bar.

    SetBackgroundStyle (uint8_t key, int64_t value)

    void 

    Sets a background style for this progress bar.

    () const

    const Style

    Obtains the background style of this progress bar.

    (uint8_t key) const

    int64_t 

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

    SetForegroundStyle (const &style)

    void 

    Sets the foreground style for this progress bar.

    SetForegroundStyle (uint8_t key, int64_t value)

    void 

    Sets a foreground style for this progress bar.

    () const

    const Style

    Obtains the foreground style of this progress bar.

    (uint8_t key) const

    int64_t 

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

    SetCapType ( cap)

    void 

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

    UIView ()

     

    A default constructor used to create an instance.

    UIView (const char id)

     

    A constructor used to create an instance.

    virtual 

    A destructor used to delete the UIView instance.

    (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.

    (const Rect &invalidatedArea)

    virtual void 

    Called after a view is drawn.

    ()

    virtual void 

    Remeasures the view size.

    Invalidate ()

    void 

    Refreshes the invalidated area of the view.

    (const Rect &invalidatedArea)

    void 

    Refreshes a view in a specified invalidated area.

    (const LongPressEvent &event)

    virtual bool 

    Called when the view is long pressed.

    (const DragEvent &event)

    virtual bool 

    Called when the view starts to drag.

    (const DragEvent &event)

    virtual bool 

    Called when the view is being dragged.

    (const DragEvent &event)

    virtual bool 

    Called when the view stops dragging.

    (const ClickEvent &event)

    virtual void 

    Called when the view is clicked.

    (const PressEvent &event)

    virtual void 

    Called when the view is pressed.

    (const ReleaseEvent &event)

    virtual void 

    Called when the view is released.

    (const CancelEvent &event)

    virtual void 

    Called when a click event on the view is canceled.

    (OnDragListener onDragListener)

    void 

    Sets a drag event listener for the view.

    ()

    OnDragListener

    Obtains the drag event listener for the view.

    (OnClickListener onClickListener)

    void 

    Sets a click event listener for the view.

    ()

    OnClickListener

    Obtains the click event listener for the view.

    (OnLongPressListener onLongPressListener)

    void 

    Sets a long-press event listener for the view.

    ()

    OnLongPressListener

    Obtains the long-press event listener for the view.

    (OnTouchListener onTouchListener)

    void 

    Sets a touch event listener for the view.

    ()

    OnTouchListener

    Obtains the touch event listener for the view.

    (const Point &point, **last)

    virtual void 

    Obtains the top-level view based on specified coordinates.

    SetParent ( parent)

    void 

    Sets the parent view for the view.

    GetParent () const

     

    Obtains the parent view of the view.

    SetNextSibling ( sibling)

    void 

    Sets the next sibling view for the view.

    GetNextSibling () const

     

    Obtains the next sibling view of the view.

    SetVisible (bool visible)

    virtual void 

    Sets whether the view is visible.

    () const

    bool 

    Checks whether the view is visible.

    SetTouchable (bool touch)

    void 

    Sets whether the view is touchable.

    () const

    bool 

    Checks whether the view is touchable.

    SetDraggable (bool draggable)

    void 

    Sets whether the view is draggable.

    () const

    bool 

    Checks whether the view is draggable.

    SetDragParentInstead (bool dragParentInstead)

    void 

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

    () const

    bool 

    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

     

    Obtains the visible absolute rectangle area of the view.

    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 absolute rectangle area of the view.

    GetContentRect ()

    virtual  

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

    GetRelativeRect () const

     

    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.

    ()

    virtual int16_t 

    Obtains the width for the view.

    GetHeight ()

    virtual int16_t 

    Obtains the height for the view.

    (int16_t width, int16_t height)

    virtual void 

    Adjusts the size of the view.

    SetX (int16_t x)

    virtual void 

    Sets the x-coordinate for the view.

    () const

    int16_t 

    Obtains the x-coordinate for the view.

    SetY (int16_t y)

    virtual void 

    Sets the y-coordinate for the view.

    () const

    int16_t 

    Obtains the y-coordinate for the view.

    SetPosition (int16_t x, int16_t y)

    virtual void 

    Sets the position for the view.

    (int16_t x, int16_t y, int16_t width, int16_t height)

    virtual void 

    Adjusts the position and size of the view.

    IsViewGroup () const

    bool 

    Checks whether the view is a container view.

    (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.

    SetTransformMap (const &transMap)

    void 

    Sets the affine transformation matrix.

    GetTransformMap ()

    Obtains an affine transformation matrix.

    GetChildById (const char id) const

    virtual  

    Obtains the child view of a specified ID.

    SetViewId (const char id)

    void 

    Sets the view ID.

    () const

    const char  

    Obtains the view ID.

    SetViewIndex (int16_t )

    void 

    Sets the view index.

    GetViewIndex () const

    int16_t 

    Obtains the view index.

    (bool neeInvalidate=false)

    virtual void 

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

    LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0)

    void 

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

    (int16_t offset=0)

    void 

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

    LayoutRightOfParent (int16_t offset=0)

    void 

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

    (int16_t offset=0)

    void 

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

    LayoutBottomOfParent (int16_t offset=0)

    void 

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

    (const char id, int16_t offset=0)

    void 

    Aligns the view with the left of a sibling view.

    AlignRightToSibling (const char id, int16_t offset=0)

    void 

    Aligns the view with the right of a sibling view.

    (const char id, int16_t offset=0)

    void 

    Aligns the view with the top of a sibling view.

    AlignBottomToSibling (const char id, int16_t offset=0)

    void 

    Aligns the view with the bottom of a sibling view.

    (const char id, int16_t offset=0)

    void 

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

    AlignVerCenterToSibling (const char id, int16_t offset=0)

    void 

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

    (const char id, int16_t offset=0)

    void 

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

    LayoutRightToSibling (const char id, int16_t offset=0)

    void 

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

    (const char id, int16_t offset=0)

    void 

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

    LayoutBottomToSibling (const char id, int16_t offset=0)

    void 

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

    (Style &style)

    virtual void 

    Sets the view style.

    (uint8_t key, int64_t value)

    virtual void 

    Sets a style.

    GetStyle (uint8_t key) const

    virtual int64_t 

    Obtains the value of a style.

    () const

    const Style

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

    (size_t size)

    void  

    Overrides the new function.

    operator delete (void *p)

    Overrides the delete function.