yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
proposal_drawer.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SYSTEM_PROPOSAL_DRAWER_H
2#define YAZE_APP_EDITOR_SYSTEM_PROPOSAL_DRAWER_H
3
4#include <string>
5#include <vector>
6
7#include "absl/status/status.h"
9
10namespace yaze {
11class Rom;
12}
13
14namespace yaze {
15namespace editor {
16
32 public:
34 ~ProposalDrawer() = default;
35
36 // Set the ROM instance to merge proposals into
37 void SetRom(Rom* rom) { rom_ = rom; }
38
39 // Render the proposal drawer UI (creates own window)
40 void Draw();
41
42 // Render just the content (for embedding in another window like RightPanelManager)
43 void DrawContent();
44
45 // Show/hide the drawer
46 void Show() { visible_ = true; }
47 void Hide() { visible_ = false; }
48 void Toggle() { visible_ = !visible_; }
49 bool IsVisible() const { return visible_; }
50 void FocusProposal(const std::string& proposal_id);
51
52 private:
53 void DrawProposalList();
54 void DrawProposalDetail();
55 void DrawPolicyStatus(); // NEW: Display policy evaluation results
56 void DrawStatusFilter();
57 void DrawActionButtons();
58
59 absl::Status AcceptProposal(const std::string& proposal_id);
60 absl::Status RejectProposal(const std::string& proposal_id);
61 absl::Status DeleteProposal(const std::string& proposal_id);
62
63 void RefreshProposals();
64 void SelectProposal(const std::string& proposal_id);
65
66 bool visible_ = false;
67 bool needs_refresh_ = true;
68
69 // Filter state
72
73 // Proposal state
74 std::vector<cli::ProposalRegistry::ProposalMetadata> proposals_;
77
78 // Diff display state
79 std::string diff_content_;
80 std::string log_content_;
82
83 // UI state
84 float drawer_width_ = 400.0f;
86 bool show_override_dialog_ = false; // NEW: Policy override confirmation
87 std::string confirm_action_;
89
90 // ROM reference for merging
91 Rom* rom_ = nullptr;
92};
93
94} // namespace editor
95} // namespace yaze
96
97#endif // YAZE_APP_EDITOR_SYSTEM_PROPOSAL_DRAWER_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
ImGui drawer for displaying and managing agent proposals.
absl::Status AcceptProposal(const std::string &proposal_id)
absl::Status RejectProposal(const std::string &proposal_id)
cli::ProposalRegistry::ProposalMetadata * selected_proposal_
absl::Status DeleteProposal(const std::string &proposal_id)
void FocusProposal(const std::string &proposal_id)
std::vector< cli::ProposalRegistry::ProposalMetadata > proposals_
void SelectProposal(const std::string &proposal_id)