2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module ScrollView
|
2014-06-09 11:15:50 +08:00
|
|
|
-- @extend Layout
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module ccui
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to top boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToTop
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to horizontal percent position of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToPercentHorizontal
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float percent
|
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] isInertiaScrollEnabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to both direction percent position of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToPercentBothDirection
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table percent
|
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets scroll direction of scrollview.<br>
|
|
|
|
-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll<br>
|
|
|
|
-- return Direction
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] getDirection
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to bottom and left boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToBottomLeft
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets inner container of scrollview.<br>
|
|
|
|
-- Inner container is the container of scrollview's children.<br>
|
|
|
|
-- return inner container.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] getInnerContainer
|
|
|
|
-- @param self
|
|
|
|
-- @return Layout#Layout ret (return value: ccui.Layout)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to bottom boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToBottom
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Changes scroll direction of scrollview.<br>
|
|
|
|
-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll<br>
|
|
|
|
-- param dir
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] setDirection
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int dir
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to top and left boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToTopLeft
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to top and right boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToTopRight
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to bottom and left boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToBottomLeft
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Changes inner container size of scrollview.<br>
|
|
|
|
-- Inner container size must be larger than or equal scrollview's size.<br>
|
|
|
|
-- param inner container size.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] setInnerContainerSize
|
|
|
|
-- @param self
|
|
|
|
-- @param #size_table size
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets inner container size of scrollview.<br>
|
|
|
|
-- Inner container size must be larger than or equal scrollview's size.<br>
|
|
|
|
-- return inner container size.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] getInnerContainerSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] isBounceEnabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to vertical percent position of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToPercentVertical
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float percent
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-05-12 16:14:14 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-05-12 16:14:14 +08:00
|
|
|
-- @function [parent=#ScrollView] addEventListener
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #function callback
|
2014-05-12 16:14:14 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] setInertiaScrollEnabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool enabled
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to top and left boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToTopLeft
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to horizontal percent position of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToPercentHorizontal
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float percent
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to bottom and right boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToBottomRight
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] setBounceEnabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool enabled
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to top boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToTop
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to left boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToLeft
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to both direction percent position of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToPercentBothDirection
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table percent
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to vertical percent position of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToPercentVertical
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float percent
|
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to bottom boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToBottom
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to bottom and right boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToBottomRight
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to left boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToLeft
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to right boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToRight
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Move inner container to right boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] jumpToRight
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Scroll inner container to top and right boundary of scrollview.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] scrollToTopRight
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
|
|
|
-- @param #bool attenuated
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Allocates and initializes.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] create
|
|
|
|
-- @param self
|
|
|
|
-- @return ScrollView#ScrollView ret (return value: ccui.ScrollView)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] createInstance
|
|
|
|
-- @param self
|
|
|
|
-- @return Ref#Ref ret (return value: cc.Ref)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Node, int
|
|
|
|
-- @overload self, cc.Node
|
|
|
|
-- @overload self, cc.Node, int, int
|
|
|
|
-- @overload self, cc.Node, int, string
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#ScrollView] addChild
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #int zOrder
|
|
|
|
-- @param #string name
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] getChildByName
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string name
|
2014-06-18 11:44:06 +08:00
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the "class name" of widget.
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] getDescription
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @return string#string ret (return value: string)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] update
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float dt
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets LayoutType.<br>
|
|
|
|
-- see LayoutType<br>
|
|
|
|
-- return LayoutType
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#ScrollView] getLayoutType
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#ScrollView] removeAllChildrenWithCleanup
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool cleanup
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] removeAllChildren
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
|
|
|
|
2014-05-27 10:21:22 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.<br>
|
|
|
|
-- If the widget is not in a layout, it will return itself<br>
|
|
|
|
-- param dir the direction to look for the next focused widget in a layout<br>
|
|
|
|
-- param current the current focused widget<br>
|
|
|
|
-- return the next focused widget in a layout
|
2014-05-27 10:21:22 +08:00
|
|
|
-- @function [parent=#ScrollView] findNextFocusedWidget
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int direction
|
|
|
|
-- @param #ccui.Widget current
|
2014-05-27 10:21:22 +08:00
|
|
|
-- @return Widget#Widget ret (return value: ccui.Widget)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] removeChild
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #bool cleaup
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self
|
|
|
|
-- @overload self
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] getChildren
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return array_table#array_table ret (return value: array_table)
|
2014-03-25 16:13:42 +08:00
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @function [parent=#ScrollView] getChildByTag
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int tag
|
2014-03-25 16:13:42 +08:00
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#ScrollView] getChildrenCount
|
|
|
|
-- @param self
|
|
|
|
-- @return long#long ret (return value: long)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets LayoutType.<br>
|
|
|
|
-- see LayoutType<br>
|
|
|
|
-- param LayoutType
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#ScrollView] setLayoutType
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @param #int type
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Default constructor
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ScrollView] ScrollView
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
return nil
|