wxCheckBox(3erl)

πŸŽ€ wxCheckBox β€” the Erlang module definition, bestie πŸŽ€

Okay so this is the wxCheckBox page from the Erlang module definitions (yes, that's the manual name, consider it folded in πŸ’…), and it's literally all about the checkbox class. Sit down, hydrate, let's go ✨

πŸ’– DESCRIPTION πŸ’–

A checkbox is a labelled box, and by default it's either on (the checkmark is visible) or off (no checkmark, nothing, void, empty πŸ«₯). Optionally β€” and this only happens when the wxCHK_3STATE style flag is set β€” it can have a third state, called the mixed or undetermined state. Very "does not apply" of it, honestly. That's usually what people use it for: a big fat "Does Not Apply" πŸ’€

🌸 Styles

This class supports the following styles:

(...and that's it. That's the whole list. The page literally lists nothing under here, so don't come for me, I'm just the messenger πŸ™ˆ)

See: wxRadioButton, wxCommandEvent

This class is derived (and can use functions) from: wxControl, wxWindow, wxEvtHandler β€” so it's giving main character energy with a whole ancestry behind it πŸ‘‘

wxWidgets docs: wxCheckBox

⭐ EVENTS ⭐

Event types emitted from this class: command_checkbox_clicked

πŸ¦‹ DATA TYPES πŸ¦‹

  • wxCheckBox() = wx:wx_object()

πŸ”₯ EXPORTS πŸ”₯

πŸ’œ new() -> wxCheckBox()

Default constructor.

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

πŸ’œ new(Parent, Id, Label) -> wxCheckBox()

Types:

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

πŸ’œ new(Parent, Id, Label, Options :: [Option]) -> wxCheckBox()

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 checkbox. Two-for-one, we love efficiency 🫢

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

πŸ’œ destroy(This :: wxCheckBox()) -> ok

Destructor, destroying the checkbox. Bye bestie πŸ˜­πŸ‘‹

πŸ’œ create(This, Parent, Id, Label) -> boolean()

Types:

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

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

Types:

This = wxCheckBox()
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 checkbox for two-step construction. See new/4 for details β€” it's the same info, different entry point, iykyk ✨

πŸ’œ getValue(This) -> boolean()

Types:

This = wxCheckBox()

Gets the state of a 2-state checkbox.

Return: Returns true if it is checked, false otherwise.

πŸ’œ get3StateValue(This) -> wx:wx_enum()

Types:

This = wxCheckBox()

Gets the state of a 3-state checkbox.

⚠️ Asserts when the function is used with a 2-state checkbox. Like, it will straight up yell at you. Do not.

πŸ’œ is3rdStateAllowedForUser(This) -> boolean()

Types:

This = wxCheckBox()

Returns whether or not the user can set the checkbox to the third state.

Return: true if the user can set the third state of this checkbox, false if it can only be set programmatically or if it's a 2-state checkbox.

πŸ’œ is3State(This) -> boolean()

Types:

This = wxCheckBox()

Returns whether or not the checkbox is a 3-state checkbox.

Return: true if this checkbox is a 3-state checkbox, false if it's a 2-state checkbox.

πŸ’œ isChecked(This) -> boolean()

Types:

This = wxCheckBox()

This is just a maybe-more-readable synonym for getValue/1 β€” same energy, cuter name πŸ’… Just as the latter, it returns true if the checkbox is checked and false otherwise.

πŸ’œ setValue(This, State) -> ok

Types:

This = wxCheckBox()
State = boolean()

Sets the checkbox to the given state.

🚨 Heads up: this does not cause a wxEVT_CHECKBOX event to get emitted. No event, no drama, it just happens.

πŸ’œ set3StateValue(This, State) -> ok

Types:

This = wxCheckBox()
State = wx:wx_enum()

Sets the checkbox to the given state.

🚨 Again: this does not cause a wxEVT_CHECKBOX event to get emitted.
⚠️ Asserts when the checkbox is a 2-state checkbox and you're setting the state to wxCHK_UNDETERMINED. Like girl, it only has two states, read the room πŸ’€

That's the whole page, no notes, ate and left no crumbs πŸ‘‘βœ¨ Big love and credit to the wxWidgets team 🫢 β€” this one comes from wx 2.2.2.1, mwah, bye! πŸŒˆπŸ’–

πŸ“¦ where this page comes from