SplitContainer

package
v0.0.0-...-fa94a0d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

A container that accepts only two child controls, then arranges them horizontally or vertically and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls.

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
	AsSplitContainer() Instance
}

type DraggerVisibility

type DraggerVisibility int //gd:SplitContainer.DraggerVisibility
const (
	// The split dragger icon is always visible when theme's 'autohide' is false, otherwise visible only when the cursor hovers it.
	//
	// The size of the grabber icon determines the minimum theme's 'separation'.
	//
	// The dragger icon is automatically hidden if the length of the grabber icon is longer than the split bar.
	DraggerVisible DraggerVisibility = 0
	// The split dragger icon is never visible regardless of the value of theme's 'autohide'.
	//
	// The size of the grabber icon determines the minimum theme's 'separation'.
	DraggerHidden DraggerVisibility = 1
	// The split dragger icon is not visible, and the split bar is collapsed to zero thickness.
	DraggerHiddenCollapsed DraggerVisibility = 2
)

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsCanvasItem

func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance

func (*Extension[T]) AsContainer

func (self *Extension[T]) AsContainer() Container.Instance

func (*Extension[T]) AsControl

func (self *Extension[T]) AsControl() Control.Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsSplitContainer

func (self *Extension[T]) AsSplitContainer() Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.SplitContainer

Instance of the class with convieniently typed arguments and results.

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) AsSplitContainer

func (self Instance) AsSplitContainer() Instance

func (Instance) ClampSplitOffset

func (self Instance) ClampSplitOffset()

Clamps the SplitOffset value to not go outside the currently possible minimal and maximum values.

func (Instance) Collapsed

func (self Instance) Collapsed() bool

func (Instance) DragAreaHighlightInEditor

func (self Instance) DragAreaHighlightInEditor() bool

func (Instance) DragAreaMarginBegin

func (self Instance) DragAreaMarginBegin() int

func (Instance) DragAreaMarginEnd

func (self Instance) DragAreaMarginEnd() int

func (Instance) DragAreaOffset

func (self Instance) DragAreaOffset() int

func (Instance) DraggerVisibility

func (self Instance) DraggerVisibility() DraggerVisibility

func (Instance) DraggingEnabled

func (self Instance) DraggingEnabled() bool

func (Instance) GetDragAreaControl

func (self Instance) GetDragAreaControl() Control.Instance

Returns the drag area Control. For example, you can move a pre-configured button into the drag area Control so that it rides along with the split bar. Try setting the Button anchors to center prior to the reparent() call.

Note: The drag area Control is drawn over the SplitContainer's children, so CanvasItem draw objects called from the Control and children added to the Control will also appear over the SplitContainer's children. Try setting Control.MouseFilter of custom children to [Control.MouseFilterIgnore] to prevent blocking the mouse from dragging if desired.

Warning: This is a required internal node, removing and freeing it may cause a crash.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) OnDragEnded

func (self Instance) OnDragEnded(cb func(), flags ...Signal.Flags)

func (Instance) OnDragStarted

func (self Instance) OnDragStarted(cb func(), flags ...Signal.Flags)

func (Instance) OnDragged

func (self Instance) OnDragged(cb func(offset int), flags ...Signal.Flags)

func (Instance) SetCollapsed

func (self Instance) SetCollapsed(value bool)

func (Instance) SetDragAreaHighlightInEditor

func (self Instance) SetDragAreaHighlightInEditor(value bool)

func (Instance) SetDragAreaMarginBegin

func (self Instance) SetDragAreaMarginBegin(value int)

func (Instance) SetDragAreaMarginEnd

func (self Instance) SetDragAreaMarginEnd(value int)

func (Instance) SetDragAreaOffset

func (self Instance) SetDragAreaOffset(value int)

func (Instance) SetDraggerVisibility

func (self Instance) SetDraggerVisibility(value DraggerVisibility)

func (Instance) SetDraggingEnabled

func (self Instance) SetDraggingEnabled(value bool)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetSplitOffset

func (self Instance) SetSplitOffset(value int)

func (Instance) SetTouchDraggerEnabled

func (self Instance) SetTouchDraggerEnabled(value bool)

func (Instance) SetVertical

func (self Instance) SetVertical(value bool)

func (Instance) SplitOffset

func (self Instance) SplitOffset() int

func (Instance) TouchDraggerEnabled

func (self Instance) TouchDraggerEnabled() bool

func (Instance) Vertical

func (self Instance) Vertical() bool

func (Instance) Virtual

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

Jump to

Keyboard shortcuts

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