ScrollContainer

package
v0.0.0-...-d9f4d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package ScrollContainer provides methods for working with ScrollContainer object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsScrollContainer() Instance
}

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 New

func New() Instance

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsContainer

func (self Instance) AsContainer() Container.Instance

func (Instance) AsControl

func (self Instance) AsControl() Control.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsScrollContainer

func (self Instance) AsScrollContainer() Instance

func (Instance) EnsureControlVisible

func (self Instance) EnsureControlVisible(control [1]gdclass.Control)

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 (self Instance) FollowFocus() bool

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 (self Instance) ScrollDeadzone() int

func (Instance) ScrollHorizontal

func (self Instance) ScrollHorizontal() int

func (Instance) ScrollHorizontalCustomStep

func (self Instance) ScrollHorizontalCustomStep() Float.X

func (Instance) ScrollVertical

func (self Instance) ScrollVertical() int

func (Instance) ScrollVerticalCustomStep

func (self Instance) ScrollVerticalCustomStep() Float.X

func (Instance) SetFollowFocus

func (self Instance) SetFollowFocus(value bool)

func (Instance) SetHorizontalScrollMode

func (self Instance) SetHorizontalScrollMode(value gdclass.ScrollContainerScrollMode)

func (Instance) SetScrollDeadzone

func (self Instance) SetScrollDeadzone(value int)

func (Instance) SetScrollHorizontal

func (self Instance) SetScrollHorizontal(value int)

func (Instance) SetScrollHorizontalCustomStep

func (self Instance) SetScrollHorizontalCustomStep(value Float.X)

func (Instance) SetScrollVertical

func (self Instance) SetScrollVertical(value int)

func (Instance) SetScrollVerticalCustomStep

func (self Instance) SetScrollVerticalCustomStep(value Float.X)

func (Instance) SetVerticalScrollMode

func (self Instance) SetVerticalScrollMode(value gdclass.ScrollContainerScrollMode)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) VerticalScrollMode

func (self Instance) VerticalScrollMode() gdclass.ScrollContainerScrollMode

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL