#pragma once #include "evo/client/environment_view.hpp" #include "evo/client/organism_view.hpp" #include #include #include #include // 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 organism_rows(const OrganismCell& cell); [[nodiscard]] std::vector 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