#include <gui_checkbox_utils.h>
Utility interface for checkbox gadget metrics and icon state mapping.
Provides helpers to compute font-scaled checkbox sizes and to resolve checkbox icon resource IDs from hover, focus, disabled, and checkbox states.
Public Types | |
| enum class | STATE : UChar { UNCHECKED , CHECKED , TRISTATE } |
Public Member Functions | |
| enum maxon::GuiCheckboxUtils::STATE UChar | MAXON_ENUM_LIST_CLASS (STATE) |
Static Public Member Functions | |
| static MAXON_METHOD Int32 | GetBaseSize () |
| static MAXON_METHOD Int32 | GetFontScaledSize (Opt< Float > fontSize={}) |
| static MAXON_METHOD Int32 | GetIconId (Bool isHovered, Bool isFocused, Bool isDisabled, STATE checkboxState) |
Private Member Functions | |
| MAXON_INTERFACE_NONVIRTUAL (GuiCheckboxUtils, MAXON_REFERENCE_STATIC, "net.maxon.interface.guicheckboxutils") | |
|
private |
|
static |
Returns the unscaled base size used for the checkbox gadget.
|
static |
Returns the size of a checkbox gadget, scaled according to the optional font size.
| fontSize | Optional font size override; if omitted, uses the font size defined in preferences. |
| enum maxon::GuiCheckboxUtils::STATE UChar MAXON_ENUM_LIST_CLASS | ( | STATE | ) |
|
static |
Returns the icon resource identifier for a checkbox with the specified interaction and checkbox states.
| isHovered | True if the mouse cursor is hovering over the gadget. |
| isFocused | True if the gadget has keyboard focus. |
| isDisabled | True if the gadget is disabled. Takes priority over hover and focus. |
| checkboxState | The current checkbox state. |