Skip to content

Class endstone::Toggle

ClassList > endstone > Toggle

Represents a toggle button with a label.

  • #include <endstone/form/controls/toggle.h>

Public Functions

Type Name
Toggle () = default
Toggle (Message label, bool default_value=false)
bool getDefaultValue () const
Gets the default value of the toggle.
Message getLabel () const
Gets the label of the toggle.
Toggle & setDefaultValue (bool value)
Sets the default value of the toggle.
Toggle & setLabel (Message label)
Sets the label of the toggle.

Public Functions Documentation

function Toggle [½]

endstone::Toggle::Toggle () = default

function Toggle [2/2]

inline explicit endstone::Toggle::Toggle (
    Message label,
    bool default_value=false
) 

function getDefaultValue

Gets the default value of the toggle.

inline bool endstone::Toggle::getDefaultValue () const

Returns:

The default value of the toggle.


function getLabel

Gets the label of the toggle.

inline Message endstone::Toggle::getLabel () const

Returns:

The label of the toggle.


function setDefaultValue

Sets the default value of the toggle.

inline Toggle & endstone::Toggle::setDefaultValue (
    bool value
) 

Parameters:

  • value The new default value for the toggle.

Returns:

A reference to the current toggle.


function setLabel

Sets the label of the toggle.

inline Toggle & endstone::Toggle::setLabel (
    Message label
) 

Parameters:

  • label The new label for the toggle.

Returns:

A reference to the current toggle.



The documentation for this class was generated from the following file include/endstone/form/controls/toggle.h