wSlider

A slider is a control with a handle which can be pulled back and forth to change the value.

Appearance:
Superclass:wControl
Styles:
StylesDescription
wSlHorizontalDisplays the slider horizontally (this is the default).
wSlVerticalDisplays the slider vertically.
wSlAutoTicksDisplays tick marks.
wSlLeftDisplays ticks on the left and forces the slider to be vertical.
wSlRightDisplays ticks on the right and forces the slider to be vertical.
wSlTopDisplays ticks on the top.
wSlBottomDisplays ticks on the bottom
wSlSelRangeAllows the user to select a range on the slider.
wSlNoTicksDoes not display any tick marks.
wSlNoThumbDoes not display a thumb.
Events:wScrollEvent

Consts

wSlHorizontal = 0x00000000
wSlVertical = 0x00000002
wSlAutoTicks = 0x00000001
wSlLeft = 6
wSlRight = 2
wSlTop = 4
wSlBottom = 0
wSlSelRange = 0x00000020
wSlNoTicks = 0x00000010
wSlNoThumb = 0x00000080

Procs

proc isVertical(self: wSlider): bool {...}{.validate, inline, raises: [], tags: [].}
Returns true for slider that have the vertical style set.
proc getValue(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the current slider value.
proc setValue(self: wSlider; value: int) {...}{.validate, property, inline, raises: [],
                                      tags: [].}
Sets the slider position.
proc setRange(self: wSlider; range: Slice[int]) {...}{.validate, property, raises: [],
    tags: [].}
Sets the minimum and maximum slider values.
proc setMin(self: wSlider; min: int) {...}{.validate, property, inline, raises: [], tags: [].}
Sets the minimum slider value.
proc setMax(self: wSlider; max: int) {...}{.validate, property, inline, raises: [], tags: [].}
Sets the maximum slider value.
proc getMax(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the maximum slider value.
proc getMin(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Gets the minimum slider value.
proc getPageSize(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the page size.
proc setPageSize(self: wSlider; pageSize: int) {...}{.validate, property, inline, raises: [],
    tags: [].}
Sets the page size for the slider.
proc getLineSize(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the line size.
proc setLineSize(self: wSlider; lineSize: int) {...}{.validate, property, inline, raises: [],
    tags: [].}
Sets the line size for the slider.
proc getThumbLength(self: wSlider): int {...}{.validate, property, inline, raises: [],
                                      tags: [].}
Sets the slider thumb length.
proc setThumbLength(self: wSlider; length: int) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets the slider thumb length.
proc getSelEnd(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the selection end point.
proc getSelStart(self: wSlider): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the selection start point.
proc getSelection(self: wSlider): Slice[int] {...}{.validate, property, inline, raises: [],
    tags: [].}
Returns the selection start and end point.
proc setSelection(self: wSlider; min: int; max: int) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets the selection.
proc setSelection(self: wSlider; range: Slice[int]) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets the selection.
proc setTickFreq(self: wSlider; n: int) {...}{.validate, property, inline, raises: [], tags: [].}
Sets the tick mark frequency and position, for a slider with the wSlAutoTicks style.
proc setTick(self: wSlider; tick: int) {...}{.validate, property, inline, raises: [], tags: [].}
Sets a tick position.
proc setTicks(self: wSlider; ticks: openArray[int]) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets mulpitle ticks at the same time.
proc clearSel(self: wSlider) {...}{.validate, property, inline, raises: [], tags: [].}
Clears the selection, for a slider with the wSlSelRange style.
proc clearTicks(self: wSlider) {...}{.validate, property, inline, raises: [], tags: [].}
Clears the ticks.
proc final(self: wSlider) {...}{.raises: [], tags: [].}
Default finalizer for wSlider.
proc init(self: wSlider; parent: wWindow; id = wDefaultID; value = 0;
         range: Slice[int] = 0 .. 100; pos = wDefaultPoint; size = wDefaultSize;
         style: wStyle = wSlHorizontal) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Slider(parent: wWindow; id = wDefaultID; value = 0; range: Slice[int] = 0 .. 100;
           pos = wDefaultPoint; size = wDefaultSize; style: wStyle = wSlHorizontal): wSlider {...}{.
    inline, discardable, raises: [], tags: [].}
Constructor, creating and showing a slider.

Methods

method getDefaultSize(self: wSlider): wSize {...}{.property, raises: [], tags: [].}
Returns the default size for the control.
method getBestSize(self: wSlider): wSize {...}{.property, inline, raises: [], tags: [].}
Returns the best acceptable minimal size for the control.