Public Access
Every screen's keys are constant tables in lib/core/src/app_keys.h (52 of them, each under an `// id: Title` comment). An App's help() picks the table of the state it is in. site/tools/gen_dev_docs.py reads the same file and writes site/data/keys.toml; the `keys` shortcode shows a screen's tables on its guide page, and /guide/keys/ shows all of them. The Site job fails when the data file is out of date or a page asks for a table that doesn't exist, and now also runs when app_keys.h changes. A key added to an App shows up on the website without anyone editing a page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
26 lines
647 B
C++
26 lines
647 B
C++
#pragma once
|
|
|
|
#include "app.h"
|
|
#include "app_keys.h"
|
|
#include "app_manager.h"
|
|
#include "list_model.h"
|
|
#include "ui/theme.h"
|
|
|
|
namespace roro {
|
|
|
|
// Home screen: lists the visible Apps; Select opens one.
|
|
class LauncherApp : public App {
|
|
public:
|
|
void setManager(AppManager& manager) { manager_ = &manager; }
|
|
void onEnter() override;
|
|
bool onKey(const KeyEvent& e) override;
|
|
void draw(Canvas& c) override;
|
|
void help(std::vector<KeyHelp>& out) const override { keys::add(out, keys::kLauncher); }
|
|
|
|
private:
|
|
AppManager* manager_ = nullptr;
|
|
ListModel list_{theme::kContent.h / theme::kLineHeight};
|
|
};
|
|
|
|
} // namespace roro
|