Documentation
¶
Overview ¶
Abstract base class for sliders, used to adjust a value by moving a grabber along a horizontal or vertical axis. Sliders are Range-based controls.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsCanvasItem() CanvasItem.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]) AsRange() Range.Instance
- func (self *Extension[T]) AsSlider() Instance
- type ID
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRange() Range.Instance
- func (self Instance) AsSlider() Instance
- func (self Instance) Editable() bool
- func (self Instance) ID() ID
- func (self Instance) OnDragEnded(cb func(value_changed bool), flags ...Signal.Flags)
- func (self Instance) OnDragStarted(cb func(), flags ...Signal.Flags)
- func (self Instance) Scrollable() bool
- func (self Instance) SetEditable(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetScrollable(value bool)
- func (self Instance) SetTickCount(value int)
- func (self Instance) SetTicksOnBorders(value bool)
- func (self Instance) SetTicksPosition(value TickPosition)
- func (self Instance) TickCount() int
- func (self Instance) TicksOnBorders() bool
- func (self Instance) TicksPosition() TickPosition
- func (self Instance) Virtual(name string) reflect.Value
- type TickPosition
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 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
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 ¶
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) Editable ¶
If true, the slider can be interacted with. If false, the value can be changed only by code.
func (Instance) OnDragEnded ¶
Emitted when the grabber stops being dragged. If 'value_changed' is true, Range.Value is different from the value when the dragging was started.
func (Instance) OnDragStarted ¶
Emitted when the grabber starts being dragged. This is emitted before the corresponding OnRange.ValueChanged signal.
func (Instance) Scrollable ¶
If true, the value can be changed using the mouse wheel.
func (Instance) SetEditable ¶
SetEditable sets the property returned by [IsEditable].
func (Instance) SetScrollable ¶
SetScrollable sets the property returned by [IsScrollable].
func (Instance) SetTickCount ¶
SetTickCount sets the property returned by [GetTicks].
func (Instance) SetTicksOnBorders ¶
SetTicksOnBorders sets the property returned by [GetTicksOnBorders].
func (Instance) SetTicksPosition ¶
func (self Instance) SetTicksPosition(value TickPosition)
SetTicksPosition sets the property returned by [GetTicksPosition].
func (Instance) TickCount ¶
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
func (Instance) TicksOnBorders ¶
If true, the slider will display ticks for minimum and maximum values.
func (Instance) TicksPosition ¶
func (self Instance) TicksPosition() TickPosition
Sets the position of the ticks. See TickPosition for details.
type TickPosition ¶
type TickPosition int //gd:Slider.TickPosition
const ( // Places the ticks at the bottom of the [HSlider], or right of the [VSlider]. // // [HSlider]: https://pkg.go.dev/graphics.gd/classdb/HSlider // [VSlider]: https://pkg.go.dev/graphics.gd/classdb/VSlider TickPositionBottomRight TickPosition = 0 // Places the ticks at the top of the [HSlider], or left of the [VSlider]. // // [HSlider]: https://pkg.go.dev/graphics.gd/classdb/HSlider // [VSlider]: https://pkg.go.dev/graphics.gd/classdb/VSlider TickPositionTopLeft TickPosition = 1 // Places the ticks at the both sides of the slider. TickPositionBoth TickPosition = 2 // Places the ticks at the center of the slider. TickPositionCenter TickPosition = 3 )