Files
kte/TestFrontend.cc
2026-02-17 13:44:36 -08:00

39 lines
573 B
C++

#include "TestFrontend.h"
#include "Command.h"
#include "Editor.h"
bool
TestFrontend::Init(int &argc, char **argv, Editor &ed)
{
(void) argc;
(void) argv;
ed.SetDimensions(24, 80);
return true;
}
void
TestFrontend::Step(Editor &ed, bool &running)
{
// Allow deferred opens (including swap recovery prompts) to run.
ed.ProcessPendingOpens();
MappedInput mi;
if (input_.Poll(mi)) {
if (mi.hasCommand) {
Execute(ed, mi.id, mi.arg, mi.count);
}
}
if (ed.QuitRequested()) {
running = false;
}
renderer_.Draw(ed);
}
void
TestFrontend::Shutdown() {}