wxSlider(3erl)

✨ NAME ✨

okay so this is the slider page β€” wxSlider(3erl) β€” from the Erlang Module Definition manual. It's literally β€œFunctions for wxSlider class”, and we're about to get into it. πŸ’…

πŸ’– DESCRIPTION πŸ’–

A slider is literally a control with a handle you can pull back and forth to change the value. iconic.

On Windows, the track bar control is used β€” periodt.

On GTK+, tick marks are only available for version 2.16 and later. no cap.

Slider generates the same events as wxScrollBar, but in practice the most convenient way to process wxSlider updates is by handling the slider-specific wxEVT_SLIDER event, which carries wxCommandEvent containing just the latest slider position. slay.

πŸŽ€ Styles πŸŽ€

This class supports the following styles:

that's genuinely the whole line, bestie β€” the styles list is not on this page, no cap πŸ’€

πŸ’… The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED πŸ’…

The EVT_SCROLL_THUMBRELEASE event is only emitted when you're actually dragging the thumb with the mouse and releasing it. (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_CHANGED event.)

The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb. (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen.) In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished independently of the way it had started. Please see the page_samples_widgets ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.

See: Overview events, wxScrollBar

This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler

wxWidgets docs: wxSlider

πŸ”₯ EVENTS πŸ”₯

Event types emitted from this class: scroll_top, scroll_bottom, scroll_lineup, scroll_linedown, scroll_pageup, scroll_pagedown, scroll_thumbtrack, scroll_thumbrelease, scroll_changed, scroll_top, scroll_bottom, scroll_lineup, scroll_linedown, scroll_pageup, scroll_pagedown, scroll_thumbtrack, scroll_thumbrelease, scroll_changed, command_slider_updated

πŸ¦‹ DATA TYPES πŸ¦‹

wxSlider() = wx:wx_object()

πŸ‘‘ EXPORTS πŸ‘‘

✨ new() ✨

new() -> wxSlider()

Default constructor.

πŸ’– new/5 πŸ’–

new(Parent, Id, Value, MinValue, MaxValue) -> wxSlider()

Types:

Parent = wxWindow:wxWindow()
Id = Value = MinValue = MaxValue = integer()

πŸŽ€ new/6 πŸŽ€

new(Parent, Id, Value, MinValue, MaxValue, Options :: [Option]) ->
       wxSlider()

Types:

Parent = wxWindow:wxWindow()
Id = Value = MinValue = MaxValue = integer()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()} |
    {validator, wx:wx_object()}

Constructor, creating and showing a slider.

See: create/7, wxValidator (not implemented in wx)

πŸ’… destroy πŸ’…

destroy(This :: wxSlider()) -> ok

Destructor, destroying the slider.

πŸ¦‹ create/6 πŸ¦‹

create(This, Parent, Id, Value, MinValue, MaxValue) -> boolean()

Types:

This = wxSlider()
Parent = wxWindow:wxWindow()
Id = Value = MinValue = MaxValue = integer()

🌈 create/7 🌈

create(This, Parent, Id, Value, MinValue, MaxValue,
       Options :: [Option]) ->
          boolean()

Types:

This = wxSlider()
Parent = wxWindow:wxWindow()
Id = Value = MinValue = MaxValue = integer()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()} |
    {validator, wx:wx_object()}

Used for two-step slider construction.

See new/6 for further details.

⭐ getLineSize ⭐

getLineSize(This) -> integer()

Types:

This = wxSlider()

Returns the line size.

See: setLineSize/2

πŸ”₯ getMax πŸ”₯

getMax(This) -> integer()

Types:

This = wxSlider()

Gets the maximum slider value.

See: getMin/1, setRange/3

πŸ’– getMin πŸ’–

getMin(This) -> integer()

Types:

This = wxSlider()

Gets the minimum slider value.

See: getMin/1, setRange/3

πŸ“ getPageSize πŸ“

getPageSize(This) -> integer()

Types:

This = wxSlider()

Returns the page size.

See: setPageSize/2

🧚 getThumbLength 🧚

getThumbLength(This) -> integer()

Types:

This = wxSlider()

Returns the thumb length.

Only for:wxmsw

See: setThumbLength/2

πŸ‘‘ getValue πŸ‘‘

getValue(This) -> integer()

Types:

This = wxSlider()

Gets the current slider value.

See: getMin/1, getMax/1, setValue/2

🫢 setLineSize 🫢

setLineSize(This, LineSize) -> ok

Types:

This = wxSlider()
LineSize = integer()

Sets the line size for the slider.

See: getLineSize/1

🌸 setPageSize 🌸

setPageSize(This, PageSize) -> ok

Types:

This = wxSlider()
PageSize = integer()

Sets the page size for the slider.

See: getPageSize/1

✨ setRange ✨

setRange(This, MinValue, MaxValue) -> ok

Types:

This = wxSlider()
MinValue = MaxValue = integer()

Sets the minimum and maximum slider values.

See: getMin/1, getMax/1

πŸ’€ setThumbLength πŸ’€

setThumbLength(This, Len) -> ok

Types:

This = wxSlider()
Len = integer()

Sets the slider thumb length.

Only for:wxmsw

See: getThumbLength/1

πŸŽ€ setValue πŸŽ€

setValue(This, Value) -> ok

Types:

This = wxSlider()
Value = integer()

Sets the slider position.


signing off with love: big shoutout to the wxWidgets team, this page is from wx 2.2.2.1, and it's wxSlider(3erl) β€” no date on the footer, so that's the whole footer vibe. πŸ’–

πŸ“¦ where this page comes from