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 ¶
- type Advanced
- type Any
- type DraggerVisibility
- type Extension
- func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
- func (self *Extension[T]) AsContainer() Container.Instance
- func (self *Extension[T]) AsControl() Control.Instance
- func (self *Extension[T]) AsNode() Node.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsSplitContainer() Instance
- type ID
- 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) AsSplitContainer() Instance
- func (self Instance) ClampSplitOffset()
- func (self Instance) Collapsed() bool
- func (self Instance) DragAreaHighlightInEditor() bool
- func (self Instance) DragAreaMarginBegin() int
- func (self Instance) DragAreaMarginEnd() int
- func (self Instance) DragAreaOffset() int
- func (self Instance) DraggerVisibility() DraggerVisibility
- func (self Instance) DraggingEnabled() bool
- func (self Instance) GetDragAreaControl() Control.Instance
- func (self Instance) ID() ID
- func (self Instance) OnDragEnded(cb func(), flags ...Signal.Flags)
- func (self Instance) OnDragStarted(cb func(), flags ...Signal.Flags)
- func (self Instance) OnDragged(cb func(offset int), flags ...Signal.Flags)
- func (self Instance) SetCollapsed(value bool)
- func (self Instance) SetDragAreaHighlightInEditor(value bool)
- func (self Instance) SetDragAreaMarginBegin(value int)
- func (self Instance) SetDragAreaMarginEnd(value int)
- func (self Instance) SetDragAreaOffset(value int)
- func (self Instance) SetDraggerVisibility(value DraggerVisibility)
- func (self Instance) SetDraggingEnabled(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetSplitOffset(value int)
- func (self Instance) SetTouchDraggerEnabled(value bool)
- func (self Instance) SetVertical(value bool)
- func (self Instance) SplitOffset() int
- func (self Instance) TouchDraggerEnabled() bool
- func (self Instance) Vertical() bool
- func (self Instance) Virtual(name string) reflect.Value
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 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 ¶
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 (*Extension[T]) AsSplitContainer ¶
type 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.
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 (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsContainer ¶
func (Instance) AsSplitContainer ¶
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 ¶
If true, the dragger will be disabled and the children will be sized as if the SplitOffset was 0.
func (Instance) DragAreaHighlightInEditor ¶
Highlights the drag area Rect2.PositionSize so you can see where it is during development. The drag area is gold if DraggingEnabled is true, and red if false.
func (Instance) DragAreaMarginBegin ¶
Reduces the size of the drag area and split bar theme's 'split_bar_background' at the beginning of the container.
func (Instance) DragAreaMarginEnd ¶
Reduces the size of the drag area and split bar theme's 'split_bar_background' at the end of the container.
func (Instance) DragAreaOffset ¶
Shifts the drag area in the axis of the container to prevent the drag area from overlapping the ScrollBar or other selectable Control of a child node.
func (Instance) DraggerVisibility ¶
func (self Instance) DraggerVisibility() DraggerVisibility
Determines the dragger's visibility. This property does not determine whether dragging is enabled or not. Use DraggingEnabled for that.
func (Instance) DraggingEnabled ¶
Enables or disables split dragging.
func (Instance) GetDragAreaControl ¶
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.
barnacleButton.AsNode().Reparent(splitContainer.GetDragAreaControl().AsNode())
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) OnDragEnded ¶
Emitted when the user ends dragging.
func (Instance) OnDragStarted ¶
Emitted when the user starts dragging.
func (Instance) SetCollapsed ¶
SetCollapsed sets the property returned by [IsCollapsed].
func (Instance) SetDragAreaHighlightInEditor ¶
SetDragAreaHighlightInEditor sets the property returned by [IsDragAreaHighlightInEditorEnabled].
func (Instance) SetDragAreaMarginBegin ¶
SetDragAreaMarginBegin sets the property returned by [GetDragAreaMarginBegin].
func (Instance) SetDragAreaMarginEnd ¶
SetDragAreaMarginEnd sets the property returned by [GetDragAreaMarginEnd].
func (Instance) SetDragAreaOffset ¶
SetDragAreaOffset sets the property returned by [GetDragAreaOffset].
func (Instance) SetDraggerVisibility ¶
func (self Instance) SetDraggerVisibility(value DraggerVisibility)
SetDraggerVisibility sets the property returned by [GetDraggerVisibility].
func (Instance) SetDraggingEnabled ¶
SetDraggingEnabled sets the property returned by [IsDraggingEnabled].
func (Instance) SetSplitOffset ¶
SetSplitOffset sets the property returned by [GetSplitOffset].
func (Instance) SetTouchDraggerEnabled ¶
SetTouchDraggerEnabled sets the property returned by [IsTouchDraggerEnabled].
func (Instance) SetVertical ¶
SetVertical sets the property returned by [IsVertical].
func (Instance) SplitOffset ¶
The initial offset of the splitting between the two Controls, with 0 being at the end of the first Control.
func (Instance) TouchDraggerEnabled ¶
If true, a touch-friendly drag handle will be enabled for better usability on smaller screens. Unlike the standard grabber, this drag handle overlaps the SplitContainer's children and does not affect their minimum separation. The standard grabber will no longer be drawn when this option is enabled.
func (Instance) Vertical ¶
If true, the SplitContainer will arrange its children vertically, rather than horizontally.
Can't be changed when using HSplitContainer and VSplitContainer.