Native window chrome integration for the editor's title bar. More...
#include <optional>#include <string>Classes | |
| struct | donner::editor::WindowChromeState |
| Inputs to the window title / chrome derivation. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| std::string | donner::editor::ComposeWindowTitle (const WindowChromeState &state, bool showEditedDotInText) |
| Compose the window title-bar text. | |
| bool | donner::editor::NativeWindowChromeAvailable () |
| Whether this platform/build drives native title-bar chrome (the edited dot and proxy icon). True only on macOS. | |
| void | donner::editor::ApplyNativeWindowChrome (GLFWwindow *window, const WindowChromeState &state) |
| Push the document's edited state and file identity into the native title bar. | |
Native window chrome integration for the editor's title bar.
Two concerns live here:
| void donner::editor::ApplyNativeWindowChrome | ( | GLFWwindow * | window, |
| const WindowChromeState & | state ) |
Push the document's edited state and file identity into the native title bar.
On macOS this sets the window's documentEdited flag (the close-button dot) and representedURL (the draggable proxy icon). No-op elsewhere, or when window is null.
| window | GLFW window backing the editor. |
| state | Current document/edited state. A missing or non-existent file path clears the proxy icon. |
|
nodiscard |
Compose the window title-bar text.
| state | Current document/edited state. |
| showEditedDotInText | When true, an unsaved document is prefixed with a bullet ("● ") in the text itself. Callers pass false on platforms that show the edited state natively (macOS), where the dot is rendered by the OS via setDocumentEdited: instead. |