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
23
struct
EditorField
24
{
25
enum class
Control
26
{
27
Text
,
28
Number
,
29
Choice
,
30
Attributes
31
};
32
std::string
column
;
33
std::string
label
;
34
std::string
section
;
35
Control
control
=
Control::Text
;
36
std::optional<double>
minimum
;
37
std::optional<double>
maximum
;
38
std::vector<std::pair<std::string, std::string>>
choices
;
39
};
40
45
std::vector<EditorField>
editorFields
(std::string_view
table
);
46
48
std::string_view
editorTable
(
NavSection
section);
49
bool
hasBuiltinEditor
(
const
std::optional<NavEntry>& context);
hasBuiltinEditor
bool hasBuiltinEditor(const std::optional< NavEntry > &context)
Definition
editor_fields.cpp:132
editorTable
std::string_view editorTable(NavSection section)
Definition
editor_fields.cpp:111
editorFields
std::vector< EditorField > editorFields(std::string_view table)
Definition
editor_fields.cpp:78
nav_history.h
NavSection
NavSection
Screens of the management shell. The sidebar groups them into a few hubs (Home, Inbox,...
Definition
nav_history.h:26
table
std::string_view table
Definition
runtime_editor_validation.cpp:44
EditorField
Definition
editor_fields.h:24
EditorField::label
std::string label
Definition
editor_fields.h:33
EditorField::maximum
std::optional< double > maximum
Definition
editor_fields.h:37
EditorField::choices
std::vector< std::pair< std::string, std::string > > choices
Definition
editor_fields.h:38
EditorField::Control
Control
Definition
editor_fields.h:26
EditorField::Control::Attributes
@ Attributes
EditorField::Control::Choice
@ Choice
EditorField::Control::Text
@ Text
EditorField::Control::Number
@ Number
EditorField::minimum
std::optional< double > minimum
Definition
editor_fields.h:36
EditorField::control
Control control
Definition
editor_fields.h:35
EditorField::section
std::string section
Definition
editor_fields.h:34
EditorField::column
std::string column
Definition
editor_fields.h:32
src
gui
view_models
editor_fields.h
Generated by
1.9.8