yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
editor_context_snapshot.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_EDITOR_CONTEXT_SNAPSHOT_H_
2#define YAZE_APP_EDITOR_EDITOR_CONTEXT_SNAPSHOT_H_
3
4#include <algorithm>
5#include <string>
6#include <vector>
7
8namespace yaze::editor {
9
15
20
22 std::string id;
23 std::string label;
24 std::string value;
25};
26
34
43
45 bool experimental = false;
46 bool acknowledged = true;
47 std::string save_posture;
48};
49
57 std::string category;
58 std::string title;
59 std::string subtitle;
60 std::string semantic_owner;
61 std::vector<EditorContextValue> metadata;
62 std::vector<EditorContextValue> counts;
63 std::vector<EditorContextDiagnostic> diagnostics;
64 std::vector<EditorContextAction> actions;
65 std::vector<std::string> capabilities;
67 bool has_pending_changes = false;
68 std::string pending_label;
69
70 bool empty() const {
71 return title.empty() && subtitle.empty() && metadata.empty() &&
72 counts.empty() && diagnostics.empty() && actions.empty();
73 }
74
75 bool HasCapability(const std::string& capability) const {
76 return std::find(capabilities.begin(), capabilities.end(), capability) !=
77 capabilities.end();
78 }
79};
80
81} // namespace yaze::editor
82
83#endif // YAZE_APP_EDITOR_EDITOR_CONTEXT_SNAPSHOT_H_
Editors are the view controllers for the application.
EditorContextDiagnosticSeverity severity
std::vector< EditorContextValue > counts
std::vector< EditorContextAction > actions
bool HasCapability(const std::string &capability) const
std::vector< EditorContextDiagnostic > diagnostics
std::vector< EditorContextValue > metadata