C# 클래스 Nez.UI.ScrollPane

A group that scrolls a child widget using scrollbars and/or mouse or touch dragging. The widget is sized to its preferred size.If the widget's preferred width or height is less than the size of this scroll pane, it is set to the size of this scroll pane. Scrollbars appear when the widget is larger than the scroll pane. The scroll pane's preferred size is that of the child widget. At this size, the child widget will not need to scroll, so scroll pane is typically sized by ignoring the preferred size in one or both directions.
상속: Group, IInputListener
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_disableX bool

공개 메소드들

메소드 설명
ScrollPane ( Element widget ) : System
ScrollPane ( Element widget, ScrollPaneStyle style ) : System
ScrollPane ( Element widget, Skin skin ) : System
ScrollPane ( Element widget, Skin skin, string styleName ) : System
cancel ( ) : void

If currently scrolling by tracking a touch down, stop scrolling.

debugRender ( Graphics graphics ) : void
draw ( Graphics graphics, float parentAlpha ) : void
fling ( float flingTime, float velocityX, float velocityY ) : void

Generate fling gesture

getMaxX ( ) : float

Returns the maximum scroll value in the x direction.

getMaxY ( ) : float

Returns the maximum scroll value in the y direction.

getScrollBarHeight ( ) : float
getScrollBarWidth ( ) : float
getScrollHeight ( ) : float

Returns the height of the scrolled viewport.

getScrollPercentX ( ) : float
getScrollPercentY ( ) : float
getScrollSpeed ( ) : float

Returns the x scroll speed

getScrollWidth ( ) : float

Returns the width of the scrolled viewport.

getScrollX ( ) : float

Returns the x scroll position in pixels, where 0 is the left of the scroll pane.

getScrollY ( ) : float

Returns the y scroll position in pixels, where 0 is the top of the scroll pane.

getStyle ( ) : ScrollPaneStyle

Returns the scroll pane's style. Modifying the returned style may not have an effect until {@link #setStyle(ScrollPaneStyle)} is called.

getUseNaturalScrolling ( ) : bool
getVariableSizeKnobs ( ) : bool
getVelocityX ( ) : float

Gets the flick scroll x velocity

getVelocityY ( ) : float

Gets the flick scroll y velocity

getVisualScrollPercentX ( ) : float
getVisualScrollPercentY ( ) : float
getVisualScrollX ( ) : float
getVisualScrollY ( ) : float
getWidget ( ) : Element

Returns the Element embedded in this scroll pane, or null

hit ( Vector2 point ) : Element
isBottomEdge ( ) : bool
isFlinging ( ) : bool
isForceScrollX ( ) : bool
isForceScrollY ( ) : bool
isLeftEdge ( ) : bool
isRightEdge ( ) : bool
isScrollX ( ) : bool

Returns true if the widget is larger than the scroll pane horizontally.

isScrollY ( ) : bool

Returns true if the widget is larger than the scroll pane vertically.

isScrollingDisabledX ( ) : bool
isScrollingDisabledY ( ) : bool
isTopEdge ( ) : bool
layout ( ) : void
scrollTo ( float x, float y, float width, float height ) : void

Sets the scroll offset so the specified rectangle is fully in view, if possible. Coordinates are in the scroll pane widget's coordinate system.

scrollTo ( float x, float y, float width, float height, bool centerHorizontal, bool centerVertical ) : void

Sets the scroll offset so the specified rectangle is fully in view, and optionally centered vertically and/or horizontally, if possible. Coordinates are in the scroll pane widget's coordinate system.

setClamp ( bool clamp ) : ScrollPane

For flick scroll, prevents scrolling out of the widget's bounds. Default is true.

setFadeScrollBars ( bool fadeScrollBars ) : ScrollPane

When true the scrollbars don't reduce the scrollable size and fade out after some time of not being used.

setFlingTime ( float flingTime ) : ScrollPane

For flick scroll, sets the amount of time in seconds that a fling will continue to scroll. Default is 1.

setForceScroll ( bool x, bool y ) : ScrollPane

Forces enabling scrollbars (for non-flick scroll) and overscrolling (for flick scroll) in a direction, even if the contents do not exceed the bounds in that direction.

setOverscroll ( bool overscrollX, bool overscrollY ) : ScrollPane

For flick scroll, if true the widget can be scrolled slightly past its bounds and will animate back to its bounds when scrolling is stopped. Default is true.

setScrollBarPositions ( bool bottom, bool right ) : ScrollPane

Set the position of the vertical and horizontal scroll bars.

setScrollPercentX ( float percentX ) : void
setScrollPercentY ( float percentY ) : void
setScrollSpeed ( float scrollSpeed ) : ScrollPane

sets the scroll speed when the mouse wheel is used to scroll the ScrollPane

setScrollX ( float pixelsX ) : ScrollPane

sets x scroll amount

setScrollY ( float pixelsY ) : ScrollPane

Called whenever the y scroll amount is changed

setScrollbarsOnTop ( bool scrollbarsOnTop ) : ScrollPane

When false (the default), the widget is clipped so it is not drawn under the scrollbars. When true, the widget is clipped to the entire scroll pane bounds and the scrollbars are drawn on top of the widget. If {@link #setFadeScrollBars(boolean)} is true, the scroll bars are always drawn on top.

setScrollingDisabled ( bool x, bool y ) : ScrollPane

Disables scrolling in a direction. The widget will be sized to the FlickScrollPane in the disabled direction.

setSmoothScrolling ( bool smoothScrolling ) : ScrollPane
setStyle ( ScrollPaneStyle style ) : ScrollPane
setUseNaturalScrolling ( bool useNaturalScrolling ) : ScrollPane

sets how the mouse wheel/trackpad operates. Natural scrolling moves the contents of a window the same direction as your fingers.

setVariableSizeKnobs ( bool variableSizeKnobs ) : ScrollPane

If true, the scroll knobs are sized based on getMaxX() or getMaxY(). If false, the scroll knobs are sized based on Drawable#getMinWidth() or Drawable#getMinHeight(). Default is true.

setVelocityX ( float velocityX ) : void
setVelocityY ( float velocityY ) : ScrollPane
setWidget ( Element widget ) : ScrollPane

Sets the {@link Element} embedded in this scroll pane

setupFadeScrollBars ( float fadeAlphaSeconds, float fadeDelaySeconds ) : ScrollPane
setupOverscroll ( float distance, float speedMin, float speedMax ) : ScrollPane

For flick scroll, sets the overscroll distance in pixels and the speed it returns to the widget's bounds in seconds. Default is 50, 30, 200.

updateVisualScroll ( ) : ScrollPane

Sets the visual scroll amount equal to the scroll amount. This can be used when setting the scroll amount without animating.

보호된 메소드들

메소드 설명
setVisualScrollX ( float pixelsX ) : void

Called whenever the visual x scroll amount is changed

setVisualScrollY ( float pixelsY ) : void

Called whenever the visual y scroll amount is changed

update ( ) : void

비공개 메소드들

메소드 설명
IInputListener ( Vector2 mousePos ) : bool
IInputListener ( int mouseWheelDelta ) : bool
IInputListener ( ) : void
IInputListener ( Vector2 mousePos ) : void
clamp ( ) : void
resetFade ( ) : void

메소드 상세

ScrollPane() 공개 메소드

public ScrollPane ( Element widget ) : System
widget Element
리턴 System

ScrollPane() 공개 메소드

public ScrollPane ( Element widget, ScrollPaneStyle style ) : System
widget Element
style ScrollPaneStyle
리턴 System

ScrollPane() 공개 메소드

public ScrollPane ( Element widget, Skin skin ) : System
widget Element
skin Skin
리턴 System

ScrollPane() 공개 메소드

public ScrollPane ( Element widget, Skin skin, string styleName ) : System
widget Element
skin Skin
styleName string
리턴 System

cancel() 공개 메소드

If currently scrolling by tracking a touch down, stop scrolling.
public cancel ( ) : void
리턴 void

debugRender() 공개 메소드

public debugRender ( Graphics graphics ) : void
graphics Graphics
리턴 void

draw() 공개 메소드

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
리턴 void

fling() 공개 메소드

Generate fling gesture
public fling ( float flingTime, float velocityX, float velocityY ) : void
flingTime float Fling time.
velocityX float Velocity x.
velocityY float Velocity y.
리턴 void

getMaxX() 공개 메소드

Returns the maximum scroll value in the x direction.
public getMaxX ( ) : float
리턴 float

getMaxY() 공개 메소드

Returns the maximum scroll value in the y direction.
public getMaxY ( ) : float
리턴 float

getScrollBarHeight() 공개 메소드

public getScrollBarHeight ( ) : float
리턴 float

getScrollBarWidth() 공개 메소드

public getScrollBarWidth ( ) : float
리턴 float

getScrollHeight() 공개 메소드

Returns the height of the scrolled viewport.
public getScrollHeight ( ) : float
리턴 float

getScrollPercentX() 공개 메소드

public getScrollPercentX ( ) : float
리턴 float

getScrollPercentY() 공개 메소드

public getScrollPercentY ( ) : float
리턴 float

getScrollSpeed() 공개 메소드

Returns the x scroll speed
public getScrollSpeed ( ) : float
리턴 float

getScrollWidth() 공개 메소드

Returns the width of the scrolled viewport.
public getScrollWidth ( ) : float
리턴 float

getScrollX() 공개 메소드

Returns the x scroll position in pixels, where 0 is the left of the scroll pane.
public getScrollX ( ) : float
리턴 float

getScrollY() 공개 메소드

Returns the y scroll position in pixels, where 0 is the top of the scroll pane.
public getScrollY ( ) : float
리턴 float

getStyle() 공개 메소드

Returns the scroll pane's style. Modifying the returned style may not have an effect until {@link #setStyle(ScrollPaneStyle)} is called.
public getStyle ( ) : ScrollPaneStyle
리턴 ScrollPaneStyle

getUseNaturalScrolling() 공개 메소드

public getUseNaturalScrolling ( ) : bool
리턴 bool

getVariableSizeKnobs() 공개 메소드

public getVariableSizeKnobs ( ) : bool
리턴 bool

getVelocityX() 공개 메소드

Gets the flick scroll x velocity
public getVelocityX ( ) : float
리턴 float

getVelocityY() 공개 메소드

Gets the flick scroll y velocity
public getVelocityY ( ) : float
리턴 float

getVisualScrollPercentX() 공개 메소드

public getVisualScrollPercentX ( ) : float
리턴 float

getVisualScrollPercentY() 공개 메소드

public getVisualScrollPercentY ( ) : float
리턴 float

getVisualScrollX() 공개 메소드

public getVisualScrollX ( ) : float
리턴 float

getVisualScrollY() 공개 메소드

public getVisualScrollY ( ) : float
리턴 float

getWidget() 공개 메소드

Returns the Element embedded in this scroll pane, or null
public getWidget ( ) : Element
리턴 Element

hit() 공개 메소드

public hit ( Vector2 point ) : Element
point Vector2
리턴 Element

isBottomEdge() 공개 메소드

public isBottomEdge ( ) : bool
리턴 bool

isFlinging() 공개 메소드

public isFlinging ( ) : bool
리턴 bool

isForceScrollX() 공개 메소드

public isForceScrollX ( ) : bool
리턴 bool

isForceScrollY() 공개 메소드

public isForceScrollY ( ) : bool
리턴 bool

isLeftEdge() 공개 메소드

public isLeftEdge ( ) : bool
리턴 bool

isRightEdge() 공개 메소드

public isRightEdge ( ) : bool
리턴 bool

isScrollX() 공개 메소드

Returns true if the widget is larger than the scroll pane horizontally.
public isScrollX ( ) : bool
리턴 bool

isScrollY() 공개 메소드

Returns true if the widget is larger than the scroll pane vertically.
public isScrollY ( ) : bool
리턴 bool

isScrollingDisabledX() 공개 메소드

public isScrollingDisabledX ( ) : bool
리턴 bool

isScrollingDisabledY() 공개 메소드

public isScrollingDisabledY ( ) : bool
리턴 bool

isTopEdge() 공개 메소드

public isTopEdge ( ) : bool
리턴 bool

layout() 공개 메소드

public layout ( ) : void
리턴 void

scrollTo() 공개 메소드

Sets the scroll offset so the specified rectangle is fully in view, if possible. Coordinates are in the scroll pane widget's coordinate system.
public scrollTo ( float x, float y, float width, float height ) : void
x float The x coordinate.
y float The y coordinate.
width float Width.
height float Height.
리턴 void

scrollTo() 공개 메소드

Sets the scroll offset so the specified rectangle is fully in view, and optionally centered vertically and/or horizontally, if possible. Coordinates are in the scroll pane widget's coordinate system.
public scrollTo ( float x, float y, float width, float height, bool centerHorizontal, bool centerVertical ) : void
x float The x coordinate.
y float The y coordinate.
width float Width.
height float Height.
centerHorizontal bool Center horizontal.
centerVertical bool Center vertical.
리턴 void

setClamp() 공개 메소드

For flick scroll, prevents scrolling out of the widget's bounds. Default is true.
public setClamp ( bool clamp ) : ScrollPane
clamp bool Clamp.
리턴 ScrollPane

setFadeScrollBars() 공개 메소드

When true the scrollbars don't reduce the scrollable size and fade out after some time of not being used.
public setFadeScrollBars ( bool fadeScrollBars ) : ScrollPane
fadeScrollBars bool Fade scroll bars.
리턴 ScrollPane

setFlingTime() 공개 메소드

For flick scroll, sets the amount of time in seconds that a fling will continue to scroll. Default is 1.
public setFlingTime ( float flingTime ) : ScrollPane
flingTime float Fling time.
리턴 ScrollPane

setForceScroll() 공개 메소드

Forces enabling scrollbars (for non-flick scroll) and overscrolling (for flick scroll) in a direction, even if the contents do not exceed the bounds in that direction.
public setForceScroll ( bool x, bool y ) : ScrollPane
x bool The x coordinate.
y bool The y coordinate.
리턴 ScrollPane

setOverscroll() 공개 메소드

For flick scroll, if true the widget can be scrolled slightly past its bounds and will animate back to its bounds when scrolling is stopped. Default is true.
public setOverscroll ( bool overscrollX, bool overscrollY ) : ScrollPane
overscrollX bool Overscroll x.
overscrollY bool Overscroll y.
리턴 ScrollPane

setScrollBarPositions() 공개 메소드

Set the position of the vertical and horizontal scroll bars.
public setScrollBarPositions ( bool bottom, bool right ) : ScrollPane
bottom bool Bottom.
right bool Right.
리턴 ScrollPane

setScrollPercentX() 공개 메소드

public setScrollPercentX ( float percentX ) : void
percentX float
리턴 void

setScrollPercentY() 공개 메소드

public setScrollPercentY ( float percentY ) : void
percentY float
리턴 void

setScrollSpeed() 공개 메소드

sets the scroll speed when the mouse wheel is used to scroll the ScrollPane
public setScrollSpeed ( float scrollSpeed ) : ScrollPane
scrollSpeed float Scroll speed.
리턴 ScrollPane

setScrollX() 공개 메소드

sets x scroll amount
public setScrollX ( float pixelsX ) : ScrollPane
pixelsX float Pixels x.
리턴 ScrollPane

setScrollY() 공개 메소드

Called whenever the y scroll amount is changed
public setScrollY ( float pixelsY ) : ScrollPane
pixelsY float Pixels y.
리턴 ScrollPane

setScrollbarsOnTop() 공개 메소드

When false (the default), the widget is clipped so it is not drawn under the scrollbars. When true, the widget is clipped to the entire scroll pane bounds and the scrollbars are drawn on top of the widget. If {@link #setFadeScrollBars(boolean)} is true, the scroll bars are always drawn on top.
public setScrollbarsOnTop ( bool scrollbarsOnTop ) : ScrollPane
scrollbarsOnTop bool Scrollbars on top.
리턴 ScrollPane

setScrollingDisabled() 공개 메소드

Disables scrolling in a direction. The widget will be sized to the FlickScrollPane in the disabled direction.
public setScrollingDisabled ( bool x, bool y ) : ScrollPane
x bool The x coordinate.
y bool The y coordinate.
리턴 ScrollPane

setSmoothScrolling() 공개 메소드

public setSmoothScrolling ( bool smoothScrolling ) : ScrollPane
smoothScrolling bool
리턴 ScrollPane

setStyle() 공개 메소드

public setStyle ( ScrollPaneStyle style ) : ScrollPane
style ScrollPaneStyle
리턴 ScrollPane

setUseNaturalScrolling() 공개 메소드

sets how the mouse wheel/trackpad operates. Natural scrolling moves the contents of a window the same direction as your fingers.
public setUseNaturalScrolling ( bool useNaturalScrolling ) : ScrollPane
useNaturalScrolling bool Use natural scrolling.
리턴 ScrollPane

setVariableSizeKnobs() 공개 메소드

If true, the scroll knobs are sized based on getMaxX() or getMaxY(). If false, the scroll knobs are sized based on Drawable#getMinWidth() or Drawable#getMinHeight(). Default is true.
public setVariableSizeKnobs ( bool variableSizeKnobs ) : ScrollPane
variableSizeKnobs bool Variable size knobs.
리턴 ScrollPane

setVelocityX() 공개 메소드

public setVelocityX ( float velocityX ) : void
velocityX float
리턴 void

setVelocityY() 공개 메소드

public setVelocityY ( float velocityY ) : ScrollPane
velocityY float
리턴 ScrollPane

setVisualScrollX() 보호된 메소드

Called whenever the visual x scroll amount is changed
protected setVisualScrollX ( float pixelsX ) : void
pixelsX float Pixels x.
리턴 void

setVisualScrollY() 보호된 메소드

Called whenever the visual y scroll amount is changed
protected setVisualScrollY ( float pixelsY ) : void
pixelsY float Pixels y.
리턴 void

setWidget() 공개 메소드

Sets the {@link Element} embedded in this scroll pane
public setWidget ( Element widget ) : ScrollPane
widget Element Widget.
리턴 ScrollPane

setupFadeScrollBars() 공개 메소드

public setupFadeScrollBars ( float fadeAlphaSeconds, float fadeDelaySeconds ) : ScrollPane
fadeAlphaSeconds float
fadeDelaySeconds float
리턴 ScrollPane

setupOverscroll() 공개 메소드

For flick scroll, sets the overscroll distance in pixels and the speed it returns to the widget's bounds in seconds. Default is 50, 30, 200.
public setupOverscroll ( float distance, float speedMin, float speedMax ) : ScrollPane
distance float Distance.
speedMin float Speed minimum.
speedMax float Speed max.
리턴 ScrollPane

update() 보호된 메소드

protected update ( ) : void
리턴 void

updateVisualScroll() 공개 메소드

Sets the visual scroll amount equal to the scroll amount. This can be used when setting the scroll amount without animating.
public updateVisualScroll ( ) : ScrollPane
리턴 ScrollPane

프로퍼티 상세

_disableX 보호되어 있는 프로퍼티

protected bool _disableX
리턴 bool