|
|
void | push (EditorCommand command) |
| | Push a command onto the queue. UI thread only.
|
| FlushResult | flush () |
| | Drain and coalesce the pending commands. Returns the effective set of commands to apply, in the order the application should issue them. After flush() returns, the queue is empty.
|
|
bool | empty () const |
| | Whether the queue currently holds any pending commands. Useful for frame-skip optimizations (no need to re-render if nothing changed).
|
|
std::size_t | size () const |
| | Number of un-coalesced commands currently pending. Coalescing happens at flush() time, so this is the raw count, not the effective count.
|
|
void | clear () |
| | Drop everything pending without applying. Useful for tests and for the "abort drag" cancel path.
|
◆ donner::editor::CommandQueue::FlushResult
| struct donner::editor::CommandQueue::FlushResult |
| Class Members |
|
vector< EditorCommand > |
effectiveCommands |
|
|
bool |
hadReplaceDocument = false |
True when any ReplaceDocument was drained from the raw pending batch. |
|
bool |
preserveUndoOnReparse = false |
True only when the drained batch contained at least one ReplaceDocument and every drained ReplaceDocument carried the preserve-undo marker. |
◆ flush()
Drain and coalesce the pending commands. Returns the effective set of commands to apply, in the order the application should issue them. After flush() returns, the queue is empty.
flush() is called once per frame at the start of the main loop.
The documentation for this class was generated from the following file: