Files
dingoandClaude Opus 5.5 897055883a Add M9.8c launcher, legend, labelled inspector and click selection
Toolkit-independent launcher, selection, label and outcome-log models with
bounded inputs and fixed error text; Dear ImGui overlay in the native adapter
with toolkit-first event routing and capture; engineering panels for fixture vs
dev region, legend, inspector, session outcomes, notices and dialog. Additive
SessionClient::unreachable_attempts() bounds unreachable connects. Docs, CI
targets and validation evidence updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:09:11 -04:00

33 lines
1.5 KiB
C++

#pragma once
#include "evo/client/environment_view.hpp"
#include "evo/client/organism_view.hpp"
#include <cstdint>
#include <string>
#include <string_view>
#include <vector>
// M9.8c readable engineering labels (toolkit-independent). Text describes copied
// presentation values only; every distinct data state keeps a distinct description.
namespace evo::client {
enum class ValueKind : std::uint8_t { value, zero, missing, not_requested, undefined };
struct ValueText {
ValueKind kind{};
std::string text;
};
struct Row {
std::string label, value, unit;
};
[[nodiscard]] std::string_view field_name(world::Field field) noexcept;
[[nodiscard]] std::string_view field_unit(world::Field field) noexcept; // "fg" or "pJ"
[[nodiscard]] std::string_view freshness_name(Freshness freshness) noexcept;
// Present values give the quantity and its density per habitat volume; zero, missing,
// not requested and undefined each have their own wording (never "0" for missing).
[[nodiscard]] ValueText describe_field(const EnvironmentCell& cell, world::Field field);
[[nodiscard]] ValueText describe_moisture(const EnvironmentCell& cell);
// Labelled rows with units for the inspector. The opaque organism id is not shown.
[[nodiscard]] std::vector<Row> organism_rows(const OrganismCell& cell);
[[nodiscard]] std::vector<Row> cell_rows(const EnvironmentCell& cell);
// The density scale the renderer's ramp uses (log2 of unit per cubic micrometre).
[[nodiscard]] std::string density_scale(world::Field field);
} // namespace evo::client