2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module PageView
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @extend ListView
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @parent_module ccui
|
|
|
|
|
|
|
|
--------------------------------
|
2015-11-17 12:09:43 +08:00
|
|
|
-- brief Set space between page indicator's index nodes.<br>
|
|
|
|
-- param spaceBetweenIndexNodes Space between nodes in pixel.
|
|
|
|
-- @function [parent=#PageView] setIndicatorSpaceBetweenIndexNodes
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @param #float spaceBetweenIndexNodes
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-11-17 12:09:43 +08:00
|
|
|
-- Insert a page into PageView at a given index.<br>
|
|
|
|
-- param page Page to be inserted.<br>
|
|
|
|
-- param idx A given index.
|
|
|
|
-- @function [parent=#PageView] insertPage
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @param #ccui.Widget page
|
|
|
|
-- @param #int idx
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2016-05-30 17:27:04 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Remove all pages of the PageView.
|
|
|
|
-- @function [parent=#PageView] removeAllPages
|
|
|
|
-- @param self
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2015-11-17 12:09:43 +08:00
|
|
|
--------------------------------
|
2016-04-11 17:56:18 +08:00
|
|
|
--
|
|
|
|
-- @function [parent=#PageView] setAutoScrollStopEpsilon
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @param self
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @param #float epsilon
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
2015-11-17 12:09:43 +08:00
|
|
|
|
2016-05-30 17:27:04 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Set scale of page indicator's index nodes.<br>
|
|
|
|
-- param indexNodesScale Scale of index nodes.
|
|
|
|
-- @function [parent=#PageView] setIndicatorIndexNodesScale
|
|
|
|
-- @param self
|
|
|
|
-- @param #float indexNodesScale
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2015-09-29 15:45:48 +08:00
|
|
|
--------------------------------
|
2016-04-11 17:56:18 +08:00
|
|
|
-- brief Toggle page indicator enabled.<br>
|
|
|
|
-- param enabled True if enable page indicator, false otherwise.
|
|
|
|
-- @function [parent=#PageView] setIndicatorEnabled
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @param #bool enabled
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- brief Set color of page indicator's selected index.<br>
|
2016-05-30 17:27:04 +08:00
|
|
|
-- param color Space between nodes in pixel.
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @function [parent=#PageView] setIndicatorSelectedIndexColor
|
|
|
|
-- @param self
|
|
|
|
-- @param #color3b_table color
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- brief Add a page turn callback to PageView, then when one page is turning, the callback will be called.<br>
|
|
|
|
-- param callback A page turning callback.
|
|
|
|
-- @function [parent=#PageView] addEventListener
|
|
|
|
-- @param self
|
|
|
|
-- @param #function callback
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2016-04-11 17:56:18 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Get the page indicator's position.<br>
|
|
|
|
-- return positionAsAnchorPoint
|
|
|
|
-- @function [parent=#PageView] getIndicatorPosition
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
2015-09-29 15:45:48 +08:00
|
|
|
--------------------------------
|
2015-11-17 12:09:43 +08:00
|
|
|
-- Jump to a page with a given index without scrolling.<br>
|
|
|
|
-- This is the different between scrollToPage.<br>
|
|
|
|
-- param index A given index in PageView. Index start from 0 to pageCount -1.
|
|
|
|
-- @function [parent=#PageView] setCurrentPageIndex
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long index
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2016-05-30 17:27:04 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Get the color of page indicator's index nodes.<br>
|
|
|
|
-- return color
|
|
|
|
-- @function [parent=#PageView] getIndicatorIndexNodesColor
|
|
|
|
-- @param self
|
|
|
|
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
|
|
|
|
2015-09-29 15:45:48 +08:00
|
|
|
--------------------------------
|
2016-04-11 17:56:18 +08:00
|
|
|
-- brief Get the color of page indicator's selected index.<br>
|
|
|
|
-- return color
|
|
|
|
-- @function [parent=#PageView] getIndicatorSelectedIndexColor
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
|
|
|
|
2016-05-30 17:27:04 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Get scale of page indicator's index nodes.<br>
|
|
|
|
-- return indexNodesScale
|
|
|
|
-- @function [parent=#PageView] getIndicatorIndexNodesScale
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2016-04-11 17:56:18 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Set the page indicator's position in page view.<br>
|
|
|
|
-- param position The position in page view
|
|
|
|
-- @function [parent=#PageView] setIndicatorPosition
|
|
|
|
-- @param self
|
|
|
|
-- @param #vec2_table position
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-11-17 12:09:43 +08:00
|
|
|
-- Scroll to a page with a given index.<br>
|
|
|
|
-- param idx A given index in the PageView. Index start from 0 to pageCount -1.
|
|
|
|
-- @function [parent=#PageView] scrollToPage
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long idx
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-11-17 12:09:43 +08:00
|
|
|
-- brief Set the page indicator's position using anchor point.<br>
|
|
|
|
-- param positionAsAnchorPoint The position as anchor point.
|
|
|
|
-- @function [parent=#PageView] setIndicatorPositionAsAnchorPoint
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @param #vec2_table positionAsAnchorPoint
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Scroll to a page with a given index.<br>
|
|
|
|
-- param idx A given index in the PageView. Index start from 0 to pageCount -1.
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @function [parent=#PageView] scrollToItem
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long itemIndex
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
2016-05-30 17:27:04 +08:00
|
|
|
-- brief Set color of page indicator's index nodes.<br>
|
|
|
|
-- param color Space between nodes in pixel.
|
|
|
|
-- @function [parent=#PageView] setIndicatorIndexNodesColor
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-05-30 17:27:04 +08:00
|
|
|
-- @param #color3b_table color
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2016-04-11 17:56:18 +08:00
|
|
|
-- brief Get the page indicator's position as anchor point.<br>
|
|
|
|
-- return positionAsAnchorPoint
|
|
|
|
-- @function [parent=#PageView] getIndicatorPositionAsAnchorPoint
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2016-04-11 17:56:18 +08:00
|
|
|
-- Gets current displayed page index.<br>
|
|
|
|
-- return current page index.
|
|
|
|
-- @function [parent=#PageView] getCurrentPageIndex
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @return long#long ret (return value: long)
|
2015-09-29 15:45:48 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2016-04-11 17:56:18 +08:00
|
|
|
-- Remove a page of PageView.<br>
|
|
|
|
-- param page Page to be removed.
|
|
|
|
-- @function [parent=#PageView] removePage
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-04-11 17:56:18 +08:00
|
|
|
-- @param #ccui.Widget page
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2016-05-30 17:27:04 +08:00
|
|
|
--------------------------------
|
|
|
|
-- sets texture for index nodes.<br>
|
|
|
|
-- param fileName File name of texture.<br>
|
|
|
|
-- param resType @see TextureResType .
|
|
|
|
-- @function [parent=#PageView] setIndicatorIndexNodesTexture
|
|
|
|
-- @param self
|
|
|
|
-- @param #string texName
|
|
|
|
-- @param #int texType
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2016-04-11 17:56:18 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Query page indicator state.<br>
|
|
|
|
-- return True if page indicator is enabled, false otherwise.
|
|
|
|
-- @function [parent=#PageView] getIndicatorEnabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2015-09-29 15:45:48 +08:00
|
|
|
--------------------------------
|
2015-11-17 12:09:43 +08:00
|
|
|
-- Remove a page at a given index of PageView.<br>
|
|
|
|
-- param index A given index.
|
|
|
|
-- @function [parent=#PageView] removePageAtIndex
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2016-03-17 13:53:10 +08:00
|
|
|
-- @param #long index
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2016-04-11 17:56:18 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Get the space between page indicator's index nodes.<br>
|
|
|
|
-- return spaceBetweenIndexNodes
|
|
|
|
-- @function [parent=#PageView] getIndicatorSpaceBetweenIndexNodes
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Insert a page into the end of PageView.<br>
|
|
|
|
-- param page Page to be inserted.
|
|
|
|
-- @function [parent=#PageView] addPage
|
|
|
|
-- @param self
|
|
|
|
-- @param #ccui.Widget page
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
2015-09-29 15:45:48 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Create an empty PageView.<br>
|
|
|
|
-- return A PageView instance.
|
|
|
|
-- @function [parent=#PageView] create
|
|
|
|
-- @param self
|
|
|
|
-- @return PageView#PageView ret (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#PageView] createInstance
|
|
|
|
-- @param self
|
|
|
|
-- @return Ref#Ref ret (return value: cc.Ref)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @function [parent=#PageView] doLayout
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#PageView] init
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
--
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @function [parent=#PageView] getDescription
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Changes direction<br>
|
|
|
|
-- Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll.<br>
|
|
|
|
-- param direction Set the page view's scroll direction.
|
|
|
|
-- @function [parent=#PageView] setDirection
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @param self
|
2015-11-17 12:09:43 +08:00
|
|
|
-- @param #int direction
|
2015-09-29 15:45:48 +08:00
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Default constructor<br>
|
|
|
|
-- js ctor<br>
|
|
|
|
-- lua new
|
|
|
|
-- @function [parent=#PageView] PageView
|
|
|
|
-- @param self
|
|
|
|
-- @return PageView#PageView self (return value: ccui.PageView)
|
|
|
|
|
|
|
|
return nil
|