Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
cadran_text.hpp
Go to the documentation of this file.
1// cadran_text — the words the Cadran screens lay out, with no view: a
2// dialog's table, a week's identical lines as one, a failure's title, reason
3// and code. Translated through ui/tr.hpp, so a host suite checks them against
4// the real catalogs (tests/host/cadran_text_tests.cpp).
5// Copyright (C) 2026 JigSawFr. GPLv3-or-later (see LICENSE.GPL).
6#pragma once
7
8#include <cstdint>
9#include <string>
10#include <utility>
11#include <vector>
12
13namespace cadran_text
14{
15
20using Rows = std::vector<std::pair<std::string, std::string>>;
21std::string table(const Rows& rows);
22bool table_rows(const std::string& paragraph, Rows* rows);
23
27std::vector<std::pair<std::string, std::string>> group_rows(const std::vector<std::pair<std::string, std::string>>& rows);
28
33struct Failure
34{
35 std::string title;
36 std::string reason;
37 std::string code;
38 bool report = false;
39};
43Failure failure(const std::string& what, const std::string& hint, uint32_t rc, bool app_result);
44
45} // namespace cadran_text
Definition cadran_text.hpp:14
std::vector< std::pair< std::string, std::string > > group_rows(const std::vector< std::pair< std::string, std::string > > &rows)
std::string table(const Rows &rows)
bool table_rows(const std::string &paragraph, Rows *rows)
std::vector< std::pair< std::string, std::string > > Rows
Definition cadran_text.hpp:20
Failure failure(const std::string &what, const std::string &hint, uint32_t rc, bool app_result)
Definition cadran_text.hpp:34
bool report
Definition cadran_text.hpp:38
std::string title
"" when there is none
Definition cadran_text.hpp:35
std::string code
"" for none
Definition cadran_text.hpp:37
std::string reason
Definition cadran_text.hpp:36