Documentation
¶
Overview ¶
Package ScrollContainer provides methods for working with ScrollContainer object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsContainer() Container.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsScrollContainer() Instance
- func (self Instance) EnsureControlVisible(control [1]gdclass.Control)
- func (self Instance) FollowFocus() bool
- func (self Instance) GetHScrollBar() [1]gdclass.HScrollBar
- func (self Instance) GetVScrollBar() [1]gdclass.VScrollBar
- func (self Instance) HorizontalScrollMode() gdclass.ScrollContainerScrollMode
- func (self Instance) OnScrollEnded(cb func())
- func (self Instance) OnScrollStarted(cb func())
- func (self Instance) ScrollDeadzone() int
- func (self Instance) ScrollHorizontal() int
- func (self Instance) ScrollHorizontalCustomStep() Float.X
- func (self Instance) ScrollVertical() int
- func (self Instance) ScrollVerticalCustomStep() Float.X
- func (self Instance) SetFollowFocus(value bool)
- func (self Instance) SetHorizontalScrollMode(value gdclass.ScrollContainerScrollMode)
- func (self Instance) SetScrollDeadzone(value int)
- func (self Instance) SetScrollHorizontal(value int)
- func (self Instance) SetScrollHorizontalCustomStep(value Float.X)
- func (self Instance) SetScrollVertical(value int)
- func (self Instance) SetScrollVerticalCustomStep(value Float.X)
- func (self Instance) SetVerticalScrollMode(value gdclass.ScrollContainerScrollMode)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) VerticalScrollMode() gdclass.ScrollContainerScrollMode
- func (self Instance) Virtual(name string) reflect.Value
- type ScrollMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.ScrollContainer
A container used to provide a child control with scrollbars when needed. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.custom_minimum_size] of the Control relative to the ScrollContainer.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsContainer ¶
func (Instance) AsScrollContainer ¶
func (Instance) EnsureControlVisible ¶
Ensures the given [param control] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]: [codeblock] add_child(child_node) await get_tree().process_frame ensure_control_visible(child_node) [/codeblock]
func (Instance) FollowFocus ¶
func (Instance) GetHScrollBar ¶
func (self Instance) GetHScrollBar() [1]gdclass.HScrollBar
Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member horizontal_scroll_mode].
func (Instance) GetVScrollBar ¶
func (self Instance) GetVScrollBar() [1]gdclass.VScrollBar
Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member vertical_scroll_mode].
func (Instance) HorizontalScrollMode ¶
func (self Instance) HorizontalScrollMode() gdclass.ScrollContainerScrollMode
func (Instance) OnScrollEnded ¶
func (self Instance) OnScrollEnded(cb func())
func (Instance) OnScrollStarted ¶
func (self Instance) OnScrollStarted(cb func())
func (Instance) ScrollDeadzone ¶
func (Instance) ScrollHorizontal ¶
func (Instance) ScrollHorizontalCustomStep ¶
func (Instance) ScrollVertical ¶
func (Instance) ScrollVerticalCustomStep ¶
func (Instance) SetFollowFocus ¶
func (Instance) SetHorizontalScrollMode ¶
func (self Instance) SetHorizontalScrollMode(value gdclass.ScrollContainerScrollMode)
func (Instance) SetScrollDeadzone ¶
func (Instance) SetScrollHorizontal ¶
func (Instance) SetScrollHorizontalCustomStep ¶
func (Instance) SetScrollVertical ¶
func (Instance) SetScrollVerticalCustomStep ¶
func (Instance) SetVerticalScrollMode ¶
func (self Instance) SetVerticalScrollMode(value gdclass.ScrollContainerScrollMode)
func (*Instance) UnsafePointer ¶
func (Instance) VerticalScrollMode ¶
func (self Instance) VerticalScrollMode() gdclass.ScrollContainerScrollMode
type ScrollMode ¶
type ScrollMode = gdclass.ScrollContainerScrollMode //gd:ScrollContainer.ScrollMode
const ( /*Scrolling disabled, scrollbar will be invisible.*/ ScrollModeDisabled ScrollMode = 0 /*Scrolling enabled, scrollbar will be visible only if necessary, i.e. container's content is bigger than the container.*/ ScrollModeAuto ScrollMode = 1 /*Scrolling enabled, scrollbar will be always visible.*/ ScrollModeShowAlways ScrollMode = 2 /*Scrolling enabled, scrollbar will be hidden.*/ ScrollModeShowNever ScrollMode = 3 )