Diol can save your theme preference in this browser using local storage.
void EsCommandAddButton(EsCommand *command, EsButton *button);
Attaches a button to the command. The button follows the command's enabled state, check state and callback.
EsCommand *EsCommandByID(ES_INSTANCE_TYPE *instance, uint32_t stableID);
Returns the command with the given stable ID. Asserts if the command does not exist.
EsCommand *EsCommandRegister(EsCommand *command, ES_INSTANCE_TYPE *instance, STRING title, EsCommandCallback callback, uint32_t stableID, EsCString cDefaultKeyboardShortcut = ES_NULL, bool enabled = false);
IDs >= 0xF0000000 reserved by the system.
void EsCommandSetCallback(EsCommand *command, EsCommandCallback callback);
Sets the command's callback and updates all attached buttons. If the callback is null, the command is disabled.
void EsCommandSetDisabled(EsCommand *command, bool disabled);
Enables or disables the command and all of the buttons attached to it.
void EsCommandSetCheck(EsCommand *command, EsCheckState check, bool sendUpdatedMessage);
Sets the command's check state and updates all attached buttons. If sendUpdatedMessage is true, each button sends its updated message.
void EsInstanceOpenReference(ES_INSTANCE_TYPE *_instance);
Increments the instance's reference count. This must be done with the message mutex acquired.
void EsInstanceCloseReference(ES_INSTANCE_TYPE *_instance);
Sends ES_MSG_INSTANCE_DESTROY when all references closed.
void EsInstanceClose(ES_INSTANCE_TYPE *instance);
Sends ES_MSG_INSTANCE_CLOSE, and closes the window's reference to the instance.
void EsInstanceSetActiveUndoManager(ES_INSTANCE_TYPE *instance, EsUndoManager *manager);
Sets the active undo manager for the instance. It ends the group on the previous manager. This must be done with the message mutex acquired.
void EsInstanceSetClassEditor(ES_INSTANCE_TYPE *instance, const EsInstanceClassEditorSettings *settings);
Sets the instance as a document editor. This customizes the File menu for editing documents. The strings in the settings must remain valid for the life of the instance.
void EsInstanceSetClassViewer(ES_INSTANCE_TYPE *instance, const EsInstanceClassViewerSettings *settings);
Sets the instance as a document viewer. The File menu will not have the New or Save items.
EsApplicationStartupRequest EsInstanceGetStartupRequest(ES_INSTANCE_TYPE *instance);
Returns the request that was used to start the instance. If there is none, returns an empty request.
void EsInstanceOpenComplete(ES_INSTANCE_TYPE *instance, EsFileStore *file, bool success, STRING errorText = BLANK_STRING);
Called after the application handles ES_MSG_INSTANCE_OPEN. On failure, it shows an error dialog. On success, it clears the modified state and marks the file store operation as complete.
void EsInstanceSaveComplete(ES_INSTANCE_TYPE *instance, EsFileStore *file, bool success);
Called after the application handles ES_MSG_INSTANCE_SAVE. It flushes the file store on success and updates the modified state.
void EsInstanceSetModified(ES_INSTANCE_TYPE *instance, bool modified);
Sets the document modified state. It enables or disables the Save command and tells the desktop. It does nothing for viewer instances.
EsError EsUserTaskStart(EsUserTaskCallback callback, EsGeneric data, STRING title, uint32_t iconID);
Starts a background task on its own thread. The user sees a progress window. This must be done with the message mutex acquired.
void EsUserTaskSetProgress(EsUserTask *task, double progress, EsFileOffsetDifference bytesPerSecond);
Set bytesPerSecond to -1 if not applicable.
bool EsUserTaskIsRunning(EsUserTask *task);
Returns false if the task was cancelled.