InteractiveComponent Slider Component HorizontalSlider VerticalSlider
A slider component, containing a thumb and a track to move the thumb along.
behaviour
bindable
clonable
center :Null<Float>
When defined & two thumbs are present, provides an offset to the actual center: the leftmost thumb will always be before the center, and the rightmost thumb will always be after the center.
behaviour
bindable
clonable
end :Float
The value the fill of the slider ends at. When start is defined, another moveable thumb will appear at the position end .
behaviour
bindable
clonable
majorTicks :Null<Float>
When defined, creates ticks each time a value divisible by majorTicks is reached. in horizontal sliders, by default, the ticks apper below slider
behaviour
bindable
clonable
max :Float
The maximum value of the slider. used to calculate the thumb's position.
behaviour
bindable
clonable
min :Float
The minimum value of the slider. used to calculate the thumb's position.
behaviour
bindable
clonable
minorTicks :Null<Float>
When defined, creates little ticks each time a value divisible by minorTicks is reached. in horizontal sliders, by default, the ticks apper below slider
behaviour
bindable
clonable
pos :Float
The value the thumb is currently at.
behaviour
bindable
clonable
precision :Null<Int>
How many numbers after the decimal points are calculated for the position of the thumb.
behaviour
bindable
clonable
start :Null<Float>
The value the fill of the slider starts from. When end is defined, another moveable thumb will appear at the position start .
behaviour
bindable
clonable
step :Null<Float>
When defined, snaps the thumb to the nearest step, example: if pos is 6 and step is 10, the thumb will be moved to 10.
allowFocus :Bool
Whether this component is allowed to gain focus
behaviour
bindable
clonable
autoFocus :Bool
Whether this component is allowed to gain focus automatically
focus :Bool
Whether this component currently has focus Note*: components that have focus will have an :active css psuedo class automatically added
animatable :Bool
Whether this component is allowed to animate or not.
The currently running animation.
draggable :Bool
When set to true , this component should be drag&drop-able.
isComponentSolid :Bool
Whether this component has a non-visible graphic added/drawn onto it or not.
native :Null<Bool>
When enabled, HaxeUI will try to use a native version of this component.
The Screen object this component is displayed on.
userData ::Dynamic
Can be used to store specific data relating to the component, or other things in your application.
actualComponentHeight :Float
The component's true height on screen. May differ from componentHeight if Toolkit.scaleY != 1
actualComponentWidth :Float
The component's true width on screen. May differ from componentWidth if Toolkit.scaleX != 1
When set to a non-null value, restricts the component's "rendering zone" to only render inside the bounds of the given rectangle, effectively "clipping" the component.
hasScreen :Bool
Whether this component, or one if it's parents, has a screen.
isComponentClipped :Bool
Whether this component has a non-null clipping rectangle or not.
isComponentOffscreen :Bool
true if this component's area intersects with the screen, false otherwise. clipRect is not taken into consideration - that means, if a clipRect turns a component from being visible on screen to being invisible on screen, isComponentOffScreen should still be false .
Gets a complete copy of this component.
Returns
A new component, similar to this one.
Returns true if the given component is a child of this component, false otherwise.
Parameters
The child component to check against.
Returns
Is the child component a child of this component?
disposeComponent ():Void
Removes this component from memory. Calling methods/using fields on this component after calling disposeComponent is undefined behaviour, and could result in a null pointer exception/x is null exceptions.
fadeIn (onEnd:():Void = null, show:Bool = true):Void
Applies a fade effect which turns this component from invisible to visible.
Parameters
onEnd:():Void = null
A function to dispatch when the fade completes show:Bool = true
When enabled, ensures that this component is actually visible when the fade completes.
fadeOut (onEnd:():Void = null, hide:Bool = true):Void
Applies a fade effect which turns this component from visible to invisible.
Parameters
onEnd:():Void = null
A function to dispatch when the fade completes show:Bool = true
When enabled, ensures that this component is actually invisible when the fade completes.
findComponents <T>(styleName:String = null, type:Class<T> = null, maxDepth:Int = 5):Array<T>
Finds all components with a specific style in this components display tree.
Parameters
styleName:String = null
The style name to search for type:Class<T> = null
The component class you wish to cast the result to (defaults to null , which means casting to the default, Component type). maxDepth:Int = 5
how many children "deep" should the search go to find components. defaults to 5 .
Returns
An array of the found components.
findComponentsUnderPoint <T>(screenX:Float, screenY:Float, type:Class<T> = null):Array<
Component >
Lists components under a specific point in global, screen coordinates. Note: this function will return *every single* components at a specific point, even if they have no backgrounds, or haven't got anything drawn onto them.
Parameters
screenX:Float
The global, on-screen x position of the point to check for components under screenY:Float
The global, on-screen y position of the point to check for components under type:Class<T> = null
Used to filter all components that aren't of a specific type. null by default, which means no filter is applied.
Returns
An array of all components that overlap the "global" position (x, y)
hasComponentUnderPoint <T>(screenX:Float, screenY:Float, type:Class<T> = null):Bool
Finds out if there is a component under a specific point in global coordinates.
Parameters
screenX:Float
The global, on-screen x position of the point to check for components under screenY:Float
The global, on-screen y position of the point to check for components under type:Class<T> = null
Used to filter all components that aren't of a specific type. null by default, which means no filter is applied.
Returns
true if there is a component that overlaps the global position (x, y) , false otherwise.
lockLayout (recursive:Bool = false):Void
ready ():Void
Tells the framework this component is ready to render *Note*: this is called internally by the framework
Sets the index of child under this component, essentially moving it forwards/backwards.
Parameters
The child to set the index of. index:Int
the index to set to.
Returns
unlockLayout (recursive:Bool = false):Void
walkComponents (callback::
Component ->Bool):Void
Iterates over the children components and calls callback() on each of them, recursively. The children's children are also included in the walking, and so are those children's children...
Parameters
a callback that receives one component, and returns whether the walking should continue or not.
pauseEvent (type:String, recursive:Bool = false):Void
resumeEvent (type:String, recursive:Bool = false):Void