Diol can save your theme preference in this browser using local storage.
EsButton *EsButtonCreate(EsElement *parent, EsButtonFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0, STRING label = BLANK_STRING);
Creates a button as a child of parent. Returns ES_NULL on failure.
With style 0, the style is selected from the flags (push button, checkbox, or toolbar button).
void EsButtonSetLabel(EsButton *button, STRING label = BLANK_STRING);
Replaces the button's label and repaints the button. Must run on the message thread.
void EsButtonSetIcon(EsButton *button, uint32_t iconID);
Sets the button's icon from the icon database. Removes any image set with EsButtonSetIconFromBits.
Must run on the message thread.
void EsButtonSetIconFromBits(EsButton *button, const uint32_t *bits, size_t width, size_t height, size_t stride);
Sets the button's icon from raw pixel data. stride is the byte size of one pixel row.
Must run on the message thread.
void EsButtonSetCheck(EsButton *button, EsCheckState checkState = ES_CHECK_CHECKED, bool sendUpdatedMessage = true);
Sets the button's check state. With sendUpdatedMessage true, sends ES_MSG_CHECK_UPDATED and runs the command callback.
Does nothing if the state is unchanged. Must run on the message thread.
EsCheckState EsButtonGetCheck(EsButton *button);
Returns the button's current check state. Must run on the message thread.
void EsButtonOnCommand(EsButton *button, EsCommandCallback callback);
Sets the callback that runs when the button is activated or its check state changes.
Must run on the message thread.
void EsButtonSetCheckBuddy(EsButton *button, EsElement *checkBuddy);
The buddy element is enabled/disabled when the button is checked/unchecked.
EsElement *EsButtonGetCheckBuddy(EsButton *button);
Returns the button's check buddy element, or ES_NULL if none. Must run on the message thread.