wxRadioButton(3erl)

πŸ’… NAME

wxRadioButton - Functions for wxRadioButton class

okay so this is wxRadioButton(3erl), the Erlang Module Definition page β€” and it's literally the manual for the wxRadioButton class. bestie, we're about to make mutually exclusive options make sense. πŸ’–

✨ DESCRIPTION

A radio button item is a button which usually denotes one of several mutually exclusive options. It has a text label next to a (usually) round button. lowkey the most civilized way to pick one option, and honestly? iconic. πŸŽ€

You can create a group of mutually-exclusive radio buttons by specifying wxRB_GROUP for the first in the group. The group ends when another radio button group is created, or there are no more radio buttons. periodt. πŸ’…

πŸŽ€ Styles

This class supports the following styles:

... and then the page just does not list any styles here 😭 that's not me skipping it, bestie β€” that is literally all she wrote. no cap. vibe check: empty.

See: Overview events, wxRadioBox, wxCheckBox πŸ‘€

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

wxWidgets docs: wxRadioButton πŸ¦‹

πŸŽ‰ EVENTS

Event types emitted from this class: command_radiobutton_selected πŸ”₯

🧸 DATA TYPES

wxRadioButton() = wx:wx_object()

πŸš€ EXPORTS

new() -> wxRadioButton()

Default constructor. ✨

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

new(Parent, Id, Label) -> wxRadioButton()

Types:

Parent = wxWindow:wxWindow()
Id = integer()
Label = unicode:chardata()

just the types on this one, bestie β€” no extra prose here. 🫢

new(Parent, Id, Label, Options :: [Option]) -> wxRadioButton()

Types:

Parent = wxWindow:wxWindow()
Id = integer()
Label = unicode:chardata()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()} |
    {validator, wx:wx_object()}

Constructor, creating and showing a radio button. πŸŽ€

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

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

Destructor, destroying the radio button item. πŸ’€

create(This, Parent, Id, Label) -> boolean()

Types:

This = wxRadioButton()
Parent = wxWindow:wxWindow()
Id = integer()
Label = unicode:chardata()

this one is types-only too β€” the page is being mysterious. πŸ™ˆ ngl, we move.

create(This, Parent, Id, Label, Options :: [Option]) -> boolean()

Types:

This = wxRadioButton()
Parent = wxWindow:wxWindow()
Id = integer()
Label = unicode:chardata()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()} |
    {validator, wx:wx_object()}

Creates the choice for two-step construction. ✨

See: new/4 for further details.

getValue(This) -> boolean()

Types:

This = wxRadioButton()

Returns true if the radio button is checked, false otherwise. βœ…

setValue(This, Value) -> ok

Types:

This = wxRadioButton()
Value = boolean()

Sets the radio button to checked or unchecked status.

This does not cause a wxEVT_RADIOBUTTON event to get emitted. 🚫

If the radio button belongs to a radio group exactly one button in the group may be checked and so this method can be only called with value set to true. To uncheck a radio button in a group you must check another button in the same group. no cap, that's the rule. πŸ’…

Note: Under MSW, the focused radio button is always selected, i.e. its value is true. And, conversely, calling SetValue(true) will also set focus to the radio button if the focus had previously been on another radio button in the same group - as otherwise setting it on wouldn't work.

and that's the whole page, bestie! the footer credits wxWidgets team. and version wx 2.2.2.1, and the page is wxRadioButton(3erl) β€” no date on this one, so I'm not inventing one πŸ˜­πŸ’–

πŸ“¦ where this page comes from