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 // Cancel pending review actions when the active ROM changes.
37 void SetRom(Rom* rom);
38
39 // Also invalidate review state when the current ROM is replaced in place.
41
42 // Render the proposal drawer UI (creates own window)
43 void Draw();
44
45 // Render just the content (for embedding in another window like RightDrawerManager)
46 void DrawContent();
47
48 // Show/hide the drawer
49 void Show() { visible_ = true; }
50 void Hide() { visible_ = false; }
51 void Toggle() { visible_ = !visible_; }
52 bool IsVisible() const { return visible_; }
53 void FocusProposal(const std::string& proposal_id);
54
55 private:
57
58 void DrawProposalList();
59 void DrawProposalDetail();
60 void DrawPolicyStatus(); // NEW: Display policy evaluation results
61 void DrawStatusFilter();
62 void DrawActionButtons();
65
66 absl::Status AcceptProposal(const std::string& proposal_id);
67 absl::Status RejectProposal(const std::string& proposal_id);
68 absl::Status DeleteProposal(const std::string& proposal_id);
69
70 void RefreshProposals();
71 void SelectProposal(const std::string& proposal_id);
72
73 bool visible_ = false;
74 bool needs_refresh_ = true;
75
76 // Filter state
79
80 // Proposal state
81 std::vector<cli::ProposalRegistry::ProposalMetadata> proposals_;
84
85 // Diff display state
86 std::string diff_content_;
87 std::string log_content_;
89
90 // UI state
91 float drawer_width_ = 400.0f;
93 std::string confirm_action_;
95 absl::Status action_status_;
96 std::string action_feedback_;
97
98 // Current review context. Applying a proposal requires a normal editor edit.
99 Rom* rom_ = nullptr;
100};
101
102} // namespace editor
103} // namespace yaze
104
105#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:52
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)