Player12
An open source football management simulator
Loading...
Searching...
No Matches
editor_fields.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8#pragma once
9
10#include <optional>
11#include <string>
12#include <string_view>
13#include <utility>
14#include <vector>
15
16#include "gui/nav_history.h"
17
24{
25 enum class Control
26 {
27 Text,
28 Number,
29 Choice,
31 };
32 std::string column;
33 std::string label;
34 std::string section;
36 std::optional<double> minimum;
37 std::optional<double> maximum;
38 std::vector<std::pair<std::string, std::string>> choices;
39};
40
45std::vector<EditorField> editorFields(std::string_view table);
46
48std::string_view editorTable(NavSection section);
49bool hasBuiltinEditor(const std::optional<NavEntry>& context);
bool hasBuiltinEditor(const std::optional< NavEntry > &context)
Definition editor_fields.cpp:132
std::string_view editorTable(NavSection section)
Definition editor_fields.cpp:111
std::vector< EditorField > editorFields(std::string_view table)
Definition editor_fields.cpp:78
NavSection
Screens of the management shell. The sidebar groups them into a few hubs (Home, Inbox,...
Definition nav_history.h:26
std::string_view table
Definition runtime_editor_validation.cpp:44
Definition editor_fields.h:24
std::string label
Definition editor_fields.h:33
std::optional< double > maximum
Definition editor_fields.h:37
std::vector< std::pair< std::string, std::string > > choices
Definition editor_fields.h:38
Control
Definition editor_fields.h:26
std::optional< double > minimum
Definition editor_fields.h:36
Control control
Definition editor_fields.h:35
std::string section
Definition editor_fields.h:34
std::string column
Definition editor_fields.h:32