Files
kte/TestInputHandler.h
Kyle Isom 45b2b88623 Code quality, safety, stability, and cleanups.
- Replace header include guards with `#pragma once` and perform minor optimizations.
- Replaced traditional include guards with `#pragma once` for simplicity and to reduce boilerplate in all headers.
- Improved CLI line number handling with clamping and error messaging.
- Enhanced `chdir` error handling for macOS GUI builds.
- Removed redundant logic for GUI builds.
- Adjusted font constructor and registry to handle `const` data pointers consistently.
2025-12-03 14:02:54 -08:00

30 lines
539 B
C++

/*
* TestInputHandler.h - programmable input handler for testing
*/
#pragma once
#include <queue>
#include "InputHandler.h"
class TestInputHandler final : public InputHandler {
public:
TestInputHandler() = default;
~TestInputHandler() override = default;
bool Poll(MappedInput &out) override;
void QueueCommand(CommandId id, const std::string &arg = "", int count = 0);
void QueueText(const std::string &text);
[[nodiscard]] bool IsEmpty() const
{
return queue_.empty();
}
private:
std::queue<MappedInput> queue_;
};