- 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.
37 lines
576 B
C++
37 lines
576 B
C++
/*
|
|
* TestFrontend.h - headless frontend for testing with programmable input
|
|
*/
|
|
#pragma once
|
|
#include "Frontend.h"
|
|
#include "TestInputHandler.h"
|
|
#include "TestRenderer.h"
|
|
|
|
|
|
class TestFrontend final : public Frontend {
|
|
public:
|
|
TestFrontend() = default;
|
|
|
|
~TestFrontend() override = default;
|
|
|
|
bool Init(Editor &ed) override;
|
|
|
|
void Step(Editor &ed, bool &running) override;
|
|
|
|
void Shutdown() override;
|
|
|
|
|
|
TestInputHandler &Input()
|
|
{
|
|
return input_;
|
|
}
|
|
|
|
|
|
TestRenderer &Renderer()
|
|
{
|
|
return renderer_;
|
|
}
|
|
|
|
private:
|
|
TestInputHandler input_{};
|
|
TestRenderer renderer_{};
|
|
}; |