Lines Matching refs:view

29  * @brief Declares the base class of a view, providing basic view attributes and operations. All views are derived
59 /* Enumerates view types. */
110 * @brief Defines the base class of a view, providing basic view attributes and operations. All views are derived
119 * @brief Defines a click event listener. You need to register this listener with the view to listen to
128 * @brief Called when a view is clicked.
129 * @param view Indicates the view clicked.
132 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
133 * it is transferred to the parent view after local processing is complete.)
137 virtual bool OnClick(UIView& view, const ClickEvent& event)
151 * @brief Defines a long-press event listener. You need to register this listener with the view to listen to
160 * @brief Called when a view is long pressed.
161 * @param view Indicates the view long pressed.
164 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
165 * it is transferred to the parent view after local processing is complete.)
169 virtual bool OnLongPress(UIView& view, const LongPressEvent& event)
183 * @brief Defines a drag event listener. You need to register this listener with the view to listen to drag events.
191 * @brief Called when a view starts to drag.
192 * @param view Indicates the view dragged.
195 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
196 * it is transferred to the parent view after local processing is complete.)
200 virtual bool OnDragStart(UIView& view, const DragEvent& event)
206 * @brief Called when a view is being dragged.
207 * @param view Indicates the view dragged.
210 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
211 * it is transferred to the parent view after local processing is complete.)
215 virtual bool OnDrag(UIView& view, const DragEvent& event)
221 * @brief Called when a view stops dragging.
222 * @param view Indicates the view dragged.
225 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
226 * it is transferred to the parent view after local processing is complete.)
230 virtual bool OnDragEnd(UIView& view, const DragEvent& event)
244 * @brief Defines a touch event listener. You need to register this listener with the view to listen to touch
253 * @brief Called when a view is pressed.
254 * @param view Indicates the view pressed.
257 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
258 * it is transferred to the parent view after local processing is complete.)
262 virtual bool OnPress(UIView& view, const PressEvent& event)
268 * @brief Called when a view is released.
269 * @param view Indicates the view released.
272 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
273 * it is transferred to the parent view after local processing is complete.)
277 virtual bool OnRelease(UIView& view, const ReleaseEvent& event)
283 * @brief Called when a click event on a view is canceled.
284 * @param view Indicates the view on which a click event is canceled.
287 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
288 * it is transferred to the parent view after local processing is complete.)
292 virtual bool OnCancel(UIView& view, const CancelEvent& event)
308 * You need to register this listener with the view to listen for rotation events.
315 * @brief Called when the view starts to rotate.
316 * @param view Indicates the view that responds to the rotation event.
321 virtual bool OnRotateStart(UIView& view, const RotateEvent& event)
327 * @brief Called when a rotation event occurs on a view.
328 * @param view Indicates the view that responds to the rotation event.
334 virtual bool OnRotate(UIView& view, const RotateEvent& event)
340 * @brief Called when the view stops rotating.
341 * @param view Indicates the view that responds to the rotation event.
346 virtual bool OnRotateEnd(UIView& view, const RotateEvent& event)
360 * @brief Called when the view starts to rotate.
367 * @brief Called when a rotation event occurs on the view.
375 * @brief Called when the view stops rotating.
382 * @brief Sets a rotation event listener for the view.
390 * @brief Obtains the rotation event listener for the view.
420 * @param id Indicates the pointer to the view ID.
437 * @brief Called before a view is drawn. This function is used to check whether the invalidated area
438 * can be fully cover by this view so as to optimize the drawing process.
447 * @brief Called when a view is drawn.
455 * @brief Called after a view is drawn.
456 * @param invalidatedArea Indicates the area in which the view is drawn.
463 * @brief Remeasures the view size.
470 * @brief Refreshes the invalidated area of the view.
477 * @brief Refreshes a view in a specified invalidated area.
482 void InvalidateRect(const Rect& invalidatedArea, UIView* view = nullptr);
485 * @brief Called when the view is long pressed.
488 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
489 * it is transferred to the parent view after local processing is complete.)
496 * @brief Called when the view starts to drag.
499 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
500 * it is transferred to the parent view after local processing is complete.)
507 * @brief Called when the view is being dragged.
510 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
511 * it is transferred to the parent view after local processing is complete.)
518 * @brief Called when the view stops dragging.
521 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
522 * it is transferred to the parent view after local processing is complete.)
529 * @brief Called when the view is clicked.
532 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
533 * it is transferred to the parent view after local processing is complete.)
540 * @brief Called when the view is pressed.
543 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
544 * it is transferred to the parent view after local processing is complete.)
551 * @brief Called when the view is released.
554 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
555 * it is transferred to the parent view after local processing is complete.)
562 * @brief Called when a click event on the view is canceled.
565 * (If an event is consumed, it is not transferred to the parent view. If an event is not consumed,
566 * it is transferred to the parent view after local processing is complete.)
573 * @brief Sets a drag event listener for the view.
581 * @brief Obtains the drag event listener for the view.
589 * @brief Sets a click event listener for the view.
597 * @brief Obtains the click event listener for the view.
605 * @brief Sets a long-press event listener for the view.
613 * @brief Obtains the long-press event listener for the view.
621 * @brief Sets a touch event listener for the view.
629 * @brief Obtains the touch event listener for the view.
637 * @brief Obtains the top-level view based on specified coordinates.
639 * @param last Indicates the double pointer to the view that contains the specified coordinates.
646 * @brief Obtains the current view and target view based on specified coordinates. The obtained current view must
647 * include the specified coordinates and is a visible top view that can respond to touch events, and the
648 * obtained target view must be the top view that includes the specified coordinates.
650 * @param current Indicates the double pointer to the current view to obtain.
651 * <b>nullptr</b> indicates that the target view fails to be obtained.
652 * @param target Indicates the double pointer to the target view to obtain.
653 * <b>nullptr</b> indicates that the target view fails to be obtained.
660 * @brief Sets the parent view for the view.
661 * @param parent Indicates the pointer to the parent view to set.
668 * @brief Obtains the parent view of the view.
669 * @return Returns the pointer to the parent view.
676 * @brief Sets the next sibling view for the view.
677 * @param sibling Indicates the pointer to the next sibling view to set.
684 * @brief Obtains the next sibling view of the view.
685 * @return Returns the pointer to the next sibling view.
692 * @brief Sets whether the view is visible.
693 * @param visible Specifies whether to set the view visible. Value <b>true</b> means to set the view visible,
701 * @brief Checks whether the view is visible.
702 * @return Returns <b>true</b> if the view is visible; returns <b>false</b> otherwise.
709 * @brief Sets whether the view is touchable.
710 * @param touchable Specifies whether to set the view touchable. Value <b>true</b> means to set the view touchable,
718 * @brief Checks whether the view is touchable.
719 * @return Returns <b>true</b> if the view is touchable; returns <b>false</b> otherwise.
726 * @brief Sets whether the view is draggable.
727 * @param draggable Specifies whether to set the view draggable. Value <b>true</b> means to set the view draggable,
735 * @brief Checks whether the view is draggable.
736 * @return Returns <b>true</b> if the view is draggable; returns <b>false</b> otherwise.
743 * @brief Sets whether to transfer the drag event to the parent view for processing when the view is being dragged.
744 * @param dragParentInstead Specifies whether to transfer the event to the parent view for processing.
745 * Value <b>true</b> means to transfer the event to the parent view for processing,
753 * @brief Obtains whether the view transfers a drag event to the parent view for processing.
754 * @return Returns <b>true</b> if the view transfers the event to the parent view for processing;
762 * @brief Obtains the absolute rectangle area of the view. When the view has deformation such as rotation,
771 * @brief Obtains the visible absolute rectangle area of the view.
779 * @brief Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view
780 * can be displayed. Generally, the valid area is the same as the visible view area, but they may be
789 * @brief Obtains the absolute rectangle area of the view.
797 * @brief Obtains the content of the absolute rectangle area of the view. This area excludes padding.
807 * @brief Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area
808 * relative to the coordinates of the parent view.
809 * @return Returns the rectangle area relative to the parent view.
827 * @brief Sets the width for the view.
835 * @brief Sets a percentage that represents the proportion of the view's width to the parent view's width.
843 * @brief Obtains the width for the view.
844 * @return Returns the view width.
851 * @brief Sets the height for the view.
859 * @brief Sets a percentage that represents the proportion of the view's hieght to the parent view's hieght.
867 * @brief Obtains the height for the view.
868 * @return Returns the view height.
875 * @brief Adjusts the size of the view.
884 * @brief Adjusts the size of the view based on specified percentages.
885 * @param widthPercent Indicates the percentage that represents the proportion of the view's width
886 * to the parent view's width to set, the decimal form of which ranges from 0 to 1.
887 * @param heightPercent Indicates the percentage that represents the proportion of the view's height
888 * to the parent view's height to set, the decimal form of which ranges from 0 to 1.
895 * @brief Sets the x-coordinate for the view.
903 * @brief Sets a percentage that represents the proportion of the view's x-coordinate
904 * to the parent view's x-coordinate.
912 * @brief Obtains the x-coordinate for the view.
920 * @brief Sets the y-coordinate for the view.
928 * @brief Sets a percentage that represents the proportion of the view's y-coordinate
929 * to the parent view's y-coordinate.
937 * @brief Obtains the y-coordinate for the view.
959 * @brief Sets the position for the view.
968 * @brief Sets the position percentages for the view.
969 * @param xPercent Indicates the percentage that represents the proportion of the view's x-coordinate
970 * to the parent view's x-coordinate to set, the decimal form of which ranges from 0 to 1.
971 * @param yPercent Indicates the percentage that represents the proportion of the view's y-coordinate
972 * to the parent view's y-coordinate to set, the decimal form of which ranges from 0 to 1.
979 * @brief Adjusts the position and size of the view.
990 * @brief Sets the position and size percentages for the view.
991 * @param xPercent Indicates the percentage that represents the proportion of the view's x-coordinate
992 * to the parent view's x-coordinate to set, the decimal form of which ranges from 0 to 1.
993 * @param yPercent Indicates the percentage that represents the proportion of the view's y-coordinate
994 * to the parent view's y-coordinate, the decimal form of which ranges from 0 to 1.
995 * @param widthPercent Indicates the percentage that represents the proportion of the view's width
996 * to the parent view's width, the decimal form of which ranges from 0 to 1.
997 * @param heightPercent Indicates the percentage that represents the proportion of the view's height
998 * to the parent view's height, the decimal form of which ranges from 0 to 1.
1005 * @brief Checks whether the view is a container view.
1006 * @return Returns <b>true</b> if the view is a container view; returns <b>false</b> otherwise.
1013 * @brief Sets whether to intercept the input event. If intercepted, the view does not transfer the input event to
1014 * the parent view after local processing.
1023 * @brief Gets whether to intercept the input event. If intercepted, the view does not transfer the input event to
1024 * the parent view after local processing.
1048 * @brief Obtains the child view of a specified ID.
1049 * @return Returns the pointer to the child view.
1056 * @brief Sets the view ID.
1057 * @param id Indicates the pointer to the view ID.
1064 * @brief Obtains the view ID.
1065 * @return Returns the pointer to the view ID.
1072 * @brief Sets the view index.
1073 * @param index Indicates the view index to set.
1080 * @brief Obtains the view index.
1081 * @return Returns the view index.
1088 * @brief Obtains the view type.
1089 * @return Returns the view type.
1106 * @brief Lays out the view in the center of the parent view.
1107 * @param xOffset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1109 * @param yOffset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1117 * @brief Lays out the view on the left of the parent view.
1118 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1126 * @brief Lays out the view on the right of the parent view.
1127 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1135 * @brief Lays out the view on the top of the parent view.
1136 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1144 * @brief Lays out the view on the bottom of the parent view.
1145 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1153 * @brief Aligns the view with the left of a sibling view.
1154 * @param id Indicates the pointer to the ID of the sibling view.
1155 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1163 * @brief Aligns the view with the right of a sibling view.
1164 * @param id Indicates the pointer to the ID of the sibling view.
1165 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1173 * @brief Aligns the view with the top of a sibling view.
1174 * @param id Indicates the pointer to the ID of the sibling view.
1175 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1183 * @brief Aligns the view with the bottom of a sibling view.
1184 * @param id Indicates the pointer to the ID of the sibling view.
1185 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1193 * @brief Aligns the view with the center of a sibling view in the x-axis.
1194 * @param id Indicates the pointer to the ID of the sibling view.
1195 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1203 * @brief Aligns the view with the center of a sibling view in the y-axis.
1204 * @param id Indicates the pointer to the ID of the sibling view.
1205 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1213 * @brief Lays out the view on the left of a sibling view.
1214 * @param id Indicates the pointer to the ID of the sibling view.
1215 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1223 * @brief Lays out the view on the right of a sibling view.
1224 * @param id Indicates the pointer to the ID of the sibling view.
1225 * @param offset Indicates the offset added to the x-axis after the view is placed. A positive number indicates
1233 * @brief Lays out the view on the above of a sibling view.
1234 * @param id Indicates the pointer to the ID of the sibling view.
1235 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1243 * @brief Lays out the view on the below of a sibling view.
1244 * @param id Indicates the pointer to the ID of the sibling view.
1245 * @param offset Indicates the offset added to the y-axis after the view is placed. A positive number indicates
1253 * @brief Sets the view style.
1254 * @param style Indicates the view style.
1281 * @brief Obtains the view style. This function applies to scenarios where the style does not need to be modified,
1283 * @return Returns the view style.
1290 * @brief Sets the opacity for the view.
1299 * @brief Obtains the view opacity.
1301 * @return Returns the view opacity.
1328 * @brief Rotates the view in 2d.
1337 * @brief Rotates the view in 3d.
1347 * @brief Scales the view in 2d.
1357 * @brief Scales the view in 3d.
1367 * @brief Shears the view in 3d.
1394 * @brief Requests the focus on the view.
1402 * @brief Clears the focus on the view.
1454 * @param view 获焦的视图
1458 virtual bool OnFocus(UIView& view)
1465 * @param view 失焦的视图
1469 virtual bool OnBlur(UIView& view)
1512 * @brief Set view zIndex order
1513 * @param zIndex specifies the stack order of an view. The default is zero.
1519 * @brief Get zIndex value of the view
1525 * @brief Sets the next render sibling view for the view.
1526 * @param sibling Indicates the pointer to the next render sibling view to set.
1531 * @brief Obtains the next render sibling view of the view.
1532 * @return Returns the pointer to the next render sibling view.