Module flower.widget.ScrollGroup
Scrollable Group class.
Extends:
Info:
- Release: V3.0.0
- Author: Makoto
Functions
ScrollGroup:_initInternal () | Initializes the internal variables. |
ScrollGroup:_initEventListeners () | Performing the initialization processing of the event listener. |
ScrollGroup:_createChildren () | Performing the initialization processing of the component. |
ScrollGroup:_createScrollBar () | Create the scrollBar |
ScrollGroup:_preUpdateScrollSize () | Pre Update the scroll size. |
ScrollGroup:_updateScrollSize () | Update the scroll size. |
ScrollGroup:_updateScrollBar () | Update the vertical scroll bar. |
ScrollGroup:_showScrollBar () | Show scroll bars. |
ScrollGroup:_hideScrollBar () | Hide scroll bars. |
ScrollGroup:_updateScrollPosition () | Update of the scroll processing. |
ScrollGroup:_ajustScrollPosition () | Adjusted so as to fall within the scope of the scroll. |
ScrollGroup:_startLooper () | Start looper. |
ScrollGroup:_stopLooper () | Stop looper. |
ScrollGroup:getContentBackground () | Return the contentBackground |
ScrollGroup:getContentGroup () | Return the contentGroup |
ScrollGroup:getContentSize () | Returns the contentGroup size. |
ScrollGroup:addContent (content) | Add the content to contentGroup. |
ScrollGroup:removeContent (content) | Add the content from contentGroup. |
ScrollGroup:setContents (contents) | Add the content to contentGroup. |
ScrollGroup:updateLayout () | Also changes the size of the scroll container when layout update. |
ScrollGroup:setLayout (layout) | Set the layout. |
ScrollGroup:getContentLayout () | Return the layout. |
ScrollGroup:setFriction (value) | Set the coefficient of friction at the time of scrolling. |
ScrollGroup:getFriction () | Returns the coefficient of friction at the time of scrolling. |
ScrollGroup:setScrollPolicy (horizontal, vertical) | Sets the horizontal and vertical scroll enabled. |
ScrollGroup:getScrollPolicy () | Return the scroll policy. |
ScrollGroup:setBouncePolicy (horizontal, vertical) | Sets the horizontal and vertical bounce enabled. |
ScrollGroup:getBouncePolicy () | Returns whether horizontal bouncing is enabled. |
ScrollGroup:isScrolling () | If this component is scrolling returns true. |
ScrollGroup:setScrollPosition (x, y) | Sets the scroll position. |
ScrollGroup:addScrollPosition (x, y) | Sets the scroll position. |
ScrollGroup:getScrollPosition () | Returns the scroll position. |
ScrollGroup:getMaxScrollPosition () | Returns the max scroll position. |
ScrollGroup:setScrollForceVec (x, y) | Sets the force to scroll in one frame. |
ScrollGroup:getScrollForceVec () | Returns the force to scroll in one frame. |
ScrollGroup:setScrollForceLimits (minX, minY, maxX, maxY) | Sets the scroll force in one frame. |
ScrollGroup:getScrollForceLimits (x, y) | Returns the maximum force in one frame. |
ScrollGroup:isTouching () | If the user has touched returns true. |
ScrollGroup:scrollTo (x, y, sec, mode, callback) | Scroll to the specified location. |
ScrollGroup:getScrollBounds () | Computes the boundaries of the scroll area. |
ScrollGroup:isPositionOutOfBounds (left, top) | Returns whether the input position is out of bounds. |
ScrollGroup:isPositionOutOfHorizontal (left) | Returns whether the input position is out of bounds. |
ScrollGroup:isPositionOutOfVertical (top) | Returns whether the input position is out of bounds. |
ScrollGroup:clipScrollPosition (left, top) | Clips the input position to the size of the container |
ScrollGroup:isScrollAnimating () | Returns whether the scrollTo animation is running. |
ScrollGroup:stopScrollAnimation () | Stops the scrollTo animation if it's running |
ScrollGroup:dispatchTouchCancelEvent () | TODO:LDoc |
ScrollGroup:onEnterFrame () | Update frame. |
ScrollGroup:onStopScrollAnimation () | Update frame. |
ScrollGroup:onTouchDown (e) | This event handler is called when you touch the component. |
ScrollGroup:onTouchUp (e) | This event handler is called when you touch the component. |
ScrollGroup:onTouchMove (e) | This event handler is called when you touch the component. |
ScrollGroup:onTouchCancel (e) | This event handler is called when you touch the component. |
Fields
STYLE_FRICTION | Style: friction |
STYLE_SCROLL_POLICY | Style: scrollPolicy |
STYLE_BOUNCE_POLICY | Style: bouncePolicy |
STYLE_SCROLL_FORCE_LIMITS | Style: scrollForceBounds |
STYLE_VERTICAL_SCROLL_BAR_COLOR | Style: verticalScrollBarColor |
STYLE_VERTICAL_SCROLL_BAR_TEXTURE | Style: verticalScrollBarTexture |
STYLE_HORIZONTAL_SCROLL_BAR_COLOR | Style: horizontalScrollBarTexture |
STYLE_HORIZONTAL_SCROLL_BAR_TEXTURE | Style: horizontalScrollBarTexture |
Functions
- ScrollGroup:_initInternal ()
- Initializes the internal variables.
- ScrollGroup:_initEventListeners ()
- Performing the initialization processing of the event listener.
- ScrollGroup:_createChildren ()
- Performing the initialization processing of the component.
- ScrollGroup:_createScrollBar ()
- Create the scrollBar
- ScrollGroup:_preUpdateScrollSize ()
- Pre Update the scroll size.
- ScrollGroup:_updateScrollSize ()
- Update the scroll size.
- ScrollGroup:_updateScrollBar ()
- Update the vertical scroll bar.
- ScrollGroup:_showScrollBar ()
- Show scroll bars.
- ScrollGroup:_hideScrollBar ()
- Hide scroll bars.
- ScrollGroup:_updateScrollPosition ()
- Update of the scroll processing.
- ScrollGroup:_ajustScrollPosition ()
- Adjusted so as to fall within the scope of the scroll.
- ScrollGroup:_startLooper ()
- Start looper.
- ScrollGroup:_stopLooper ()
- Stop looper.
- ScrollGroup:getContentBackground ()
-
Return the contentBackground
Returns:
-
contentBackground
- ScrollGroup:getContentGroup ()
-
Return the contentGroup
Returns:
-
contentGroup
- ScrollGroup:getContentSize ()
-
Returns the contentGroup size.
Returns:
- width
- height
- ScrollGroup:addContent (content)
-
Add the content to contentGroup.
Parameters:
- content
- ScrollGroup:removeContent (content)
-
Add the content from contentGroup.
Parameters:
- content
- ScrollGroup:setContents (contents)
-
Add the content to contentGroup.
Parameters:
- contents
- ScrollGroup:updateLayout ()
- Also changes the size of the scroll container when layout update.
- ScrollGroup:setLayout (layout)
-
Set the layout.
Parameters:
- layout layout
- ScrollGroup:getContentLayout ()
-
Return the layout.
Returns:
-
layout
- ScrollGroup:setFriction (value)
-
Set the coefficient of friction at the time of scrolling.
Parameters:
- value friction
- ScrollGroup:getFriction ()
-
Returns the coefficient of friction at the time of scrolling.
Returns:
-
friction
- ScrollGroup:setScrollPolicy (horizontal, vertical)
-
Sets the horizontal and vertical scroll enabled.
Parameters:
- horizontal horizontal scroll is enabled.
- vertical vertical scroll is enabled.
- ScrollGroup:getScrollPolicy ()
-
Return the scroll policy.
Returns:
- horizontal scroll enabled.
- vertical scroll enabled.
- ScrollGroup:setBouncePolicy (horizontal, vertical)
-
Sets the horizontal and vertical bounce enabled.
Parameters:
- horizontal horizontal scroll is enabled.
- vertical vertical scroll is enabled.
- ScrollGroup:getBouncePolicy ()
-
Returns whether horizontal bouncing is enabled.
Returns:
- horizontal bouncing enabled
- vertical bouncing enabled
- ScrollGroup:isScrolling ()
-
If this component is scrolling returns true.
Returns:
-
scrolling
- ScrollGroup:setScrollPosition (x, y)
-
Sets the scroll position.
Parameters:
- x x-position.
- y y-position.
- ScrollGroup:addScrollPosition (x, y)
-
Sets the scroll position.
Parameters:
- x x-position.
- y y-position.
- ScrollGroup:getScrollPosition ()
-
Returns the scroll position.
Returns:
- x-position.
- y-position.
- ScrollGroup:getMaxScrollPosition ()
-
Returns the max scroll position.
Returns:
- max x-position.
- max y-position.
- ScrollGroup:setScrollForceVec (x, y)
-
Sets the force to scroll in one frame.
It does not make sense if you're touch.
Parameters:
- x x force
- y y force
- ScrollGroup:getScrollForceVec ()
-
Returns the force to scroll in one frame.
Returns:
- x force
- y force
- ScrollGroup:setScrollForceLimits (minX, minY, maxX, maxY)
-
Sets the scroll force in one frame.
Parameters:
- minX x force
- minY y force
- maxX x force
- maxY y force
- ScrollGroup:getScrollForceLimits (x, y)
-
Returns the maximum force in one frame.
Parameters:
- x force
- y force
- ScrollGroup:isTouching ()
-
If the user has touched returns true.
Returns:
-
If the user has touched returns true.
- ScrollGroup:scrollTo (x, y, sec, mode, callback)
-
Scroll to the specified location.
Parameters:
- x position of the x
- y position of the x
- sec second
- mode EaseType
- callback (optional) allows callback notification when animation completes.
- ScrollGroup:getScrollBounds ()
-
Computes the boundaries of the scroll area.
Returns:
-
the min and max values of the scroll area
- ScrollGroup:isPositionOutOfBounds (left, top)
-
Returns whether the input position is out of bounds.
Parameters:
- left The x position
- top The y position
Returns:
-
boolean
- ScrollGroup:isPositionOutOfHorizontal (left)
-
Returns whether the input position is out of bounds.
Parameters:
- left The x position
Returns:
-
boolean
- ScrollGroup:isPositionOutOfVertical (top)
-
Returns whether the input position is out of bounds.
Parameters:
- top The y position
Returns:
-
boolean
- ScrollGroup:clipScrollPosition (left, top)
-
Clips the input position to the size of the container
Parameters:
- left The x position
- top The y position
Returns:
-
clipped left and top
- ScrollGroup:isScrollAnimating ()
-
Returns whether the scrollTo animation is running.
Returns:
-
boolean
- ScrollGroup:stopScrollAnimation ()
-
Stops the scrollTo animation if it's running
Returns:
-
none
- ScrollGroup:dispatchTouchCancelEvent ()
- TODO:LDoc
- ScrollGroup:onEnterFrame ()
- Update frame.
- ScrollGroup:onStopScrollAnimation ()
- Update frame.
- ScrollGroup:onTouchDown (e)
-
This event handler is called when you touch the component.
Parameters:
- e touch event
- ScrollGroup:onTouchUp (e)
-
This event handler is called when you touch the component.
Parameters:
- e touch event
- ScrollGroup:onTouchMove (e)
-
This event handler is called when you touch the component.
Parameters:
- e touch event
- ScrollGroup:onTouchCancel (e)
-
This event handler is called when you touch the component.
Parameters:
- e touch event
Fields
- STYLE_FRICTION
- Style: friction
- STYLE_SCROLL_POLICY
- Style: scrollPolicy
- STYLE_BOUNCE_POLICY
- Style: bouncePolicy
- STYLE_SCROLL_FORCE_LIMITS
- Style: scrollForceBounds
- STYLE_VERTICAL_SCROLL_BAR_COLOR
- Style: verticalScrollBarColor
- STYLE_VERTICAL_SCROLL_BAR_TEXTURE
- Style: verticalScrollBarTexture
- STYLE_HORIZONTAL_SCROLL_BAR_COLOR
- Style: horizontalScrollBarTexture
- STYLE_HORIZONTAL_SCROLL_BAR_TEXTURE
- Style: horizontalScrollBarTexture