8#include "absl/strings/str_format.h"
9#include "absl/strings/str_join.h"
10#include "absl/strings/str_split.h"
11#include "absl/strings/strip.h"
12#include "absl/time/clock.h"
13#include "absl/time/time.h"
23#include "imgui/imgui.h"
24#include "imgui/misc/cpp/imgui_stdlib.h"
31constexpr const char*
kItemStatuses[] = {
"implemented",
"prototype",
"decided",
34constexpr const char*
kStepKinds[] = {
"story",
"errand",
"dungeon",
35 "shrine",
"boss",
"optional"};
40 int priority, std::function<
void()> draw)
42 name_(std::move(name)),
45 draw_(std::move(draw)) {}
47 std::string
GetId()
const override {
return id_; }
49 std::string
GetIcon()
const override {
return icon_; }
52 return WindowPresentationPolicy::CoreWorkspace();
57 void Draw(
bool* )
override {
73 const char*
const (&options)[N]) {
75 if (ImGui::BeginCombo(label, value->empty() ?
"-" : value->c_str())) {
76 for (
const char* option : options) {
77 const bool selected = *value == option;
78 if (ImGui::Selectable(option, selected)) {
89 if (status ==
"implemented" || status ==
"done" || status ==
"decided") {
92 if (status ==
"prototype" || status ==
"active") {
95 if (status ==
"open") {
102 return absl::FormatTime(
"%Y-%m-%d", absl::Now(), absl::LocalTimeZone());
109 !absl::ParseTime(
"%Y-%m-%d", date, absl::LocalTimeZone(), &due, &error)) {
112 const int64_t days = absl::ToInt64Hours(due - absl::Now()) / 24;
114 return absl::StrFormat(
"%d days past", -days);
116 return absl::StrFormat(
"%d days left", days);
120 return absl::StrJoin(targets,
", ");
124 std::vector<std::string> out;
125 for (absl::string_view part :
126 absl::StrSplit(text,
',', absl::SkipWhitespace())) {
127 out.emplace_back(absl::StripAsciiWhitespace(part));
137 const char* fallback) {
138 auto it = obj.find(key);
139 return it != obj.end() && it->is_string() ? it->get<std::string>()
140 : std::string(fallback);
148 std::string_view current_id,
149 std::string_view proposed_id) {
150 const std::string proposed(proposed_id);
151 if (absl::StripAsciiWhitespace(proposed).empty()) {
152 return absl::InvalidArgumentError(
"Step Id cannot be empty");
154 if (proposed_id != current_id && plan.
FindStep(proposed_id) >= 0) {
155 return absl::AlreadyExistsError(
156 absl::StrFormat(
"Another step already uses Id \"%s\"", proposed));
158 return absl::OkStatus();
169 window_manager->RegisterWindowContent(std::make_unique<PlanningPanel>(
180 return absl::OkStatus();
184 return absl::FailedPreconditionError(
185 "Restore the plan's project before saving its edits");
188 std::string disk_source;
194 "The plan file changed outside agent status since it was loaded. "
195 "Your edits are kept; copy them, then Reload to see the file.";
198 expected_source = std::move(disk_source);
208 return absl::OkStatus();
215 return absl::OkStatus();
218 save_error_ =
"Save or discard plan edits before replacing their project";
232 return absl::OkStatus();
236 if (
dirty_ && !discard_changes) {
237 save_error_ =
"Save or explicitly discard plan edits before reloading";
243 load_error_ = std::string(loaded.status().message());
244 return loaded.status();
246 plan_ = std::move(*loaded);
259 return absl::OkStatus();
277 "Open a .yaze project to plan it. The plan is a JSON file named by "
278 "the project's [planning] section.");
290 ?
"This project has no plan file. Create one, or set [planning] "
291 "file= in the .yaze file."
292 :
"The linked plan could not be loaded. Retry after repairing it, or "
293 "create a plan at a new path. Existing files are never replaced.");
295 const std::filesystem::path project_path(
project()->filepath);
297 (project_path.stem().string() +
".plan.json"))
300 ImGui::SetNextItemWidth(-1);
302 if (ImGui::Button(
ICON_MD_ADD " Create plan and link it to the project")) {
303 absl::Status status =
319 ImGui::TextDisabled(
"%s",
plan_path_.c_str());
321 ImGui::BeginDisabled(!
dirty_);
323 absl::Status status =
Save();
326 status.ok() ?
"Plan saved" : std::string(status.message()),
330 ImGui::EndDisabled();
334 ImGui::OpenPopup(
"Discard plan edits?");
339 if (ImGui::BeginPopupModal(
"Discard plan edits?",
nullptr,
340 ImGuiWindowFlags_AlwaysAutoResize)) {
341 ImGui::TextUnformatted(
"Reload discards the unsaved plan edits.");
342 if (ImGui::Button(
"Discard and reload")) {
344 ImGui::CloseCurrentPopup();
347 if (ImGui::Button(
"Keep editing")) {
348 ImGui::CloseCurrentPopup();
359 return plan_.has_value();
366 if (!
plan_->title.empty()) {
367 ImGui::TextUnformatted(
plan_->title.c_str());
369 if (!
plan_->about.empty()) {
370 ImGui::TextWrapped(
"%s",
plan_->about.c_str());
382 auto& goal =
plan_->goal;
384 ImGui::SetNextItemWidth(-1);
385 if (ImGui::InputTextWithHint(
"##goal_title",
"What this push delivers",
389 ImGui::SetNextItemWidth(120);
390 if (ImGui::InputTextWithHint(
"##goal_due",
"YYYY-MM-DD", &goal.due)) {
393 const std::string left = DaysUntil(goal.due);
396 ImGui::TextDisabled(
"%s", left.c_str());
398 if (ImGui::InputTextMultiline(
"##goal_detail", &goal.detail,
399 ImVec2(-1, ImGui::GetTextLineHeight() * 3))) {
409 if (!current->
detail.empty()) {
410 ImGui::TextWrapped(
"%s", current->
detail.c_str());
413 if (!ImGui::TreeNode(
"##milestones",
"All milestones (%zu)",
414 plan_->milestones.size())) {
417 if (ImGui::BeginTable(
"##milestone_table", 4,
418 ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersInnerH |
419 ImGuiTableFlags_SizingStretchProp)) {
420 ImGui::TableSetupColumn(
"Milestone", ImGuiTableColumnFlags_WidthStretch);
421 ImGui::TableSetupColumn(
"Start", ImGuiTableColumnFlags_WidthFixed, 90);
422 ImGui::TableSetupColumn(
"End", ImGuiTableColumnFlags_WidthFixed, 90);
423 ImGui::TableSetupColumn(
"Status", ImGuiTableColumnFlags_WidthFixed, 110);
424 ImGui::TableHeadersRow();
425 for (
size_t i = 0; i <
plan_->milestones.size(); ++i) {
426 auto& m =
plan_->milestones[i];
427 ImGui::PushID(
static_cast<int>(i));
428 ImGui::TableNextRow();
429 ImGui::TableNextColumn();
430 ImGui::SetNextItemWidth(-1);
431 if (ImGui::InputText(
"##title", &m.title)) {
434 ImGui::TableNextColumn();
435 ImGui::SetNextItemWidth(-1);
436 if (ImGui::InputText(
"##start", &m.start)) {
439 ImGui::TableNextColumn();
440 ImGui::SetNextItemWidth(-1);
441 if (ImGui::InputText(
"##end", &m.end)) {
444 ImGui::TableNextColumn();
445 ImGui::SetNextItemWidth(-1);
446 if (StatusCombo(
"##status", &m.status, kMilestoneStatuses)) {
453 if (ImGui::SmallButton(
ICON_MD_ADD " Milestone")) {
455 m.
id =
plan_->NewMilestoneId();
456 m.
title =
"New milestone";
458 plan_->milestones.push_back(std::move(m));
466 if (
plan_->route_steps.empty()) {
467 ImGui::TextDisabled(
"No route steps yet. Add them in the Route window.");
470 ImGui::BeginChild(
"##route_strip",
471 ImVec2(0, ImGui::GetFrameHeightWithSpacing() * 1.6f),
false,
472 ImGuiWindowFlags_HorizontalScrollbar);
473 for (
size_t i = 0; i <
plan_->route_steps.size(); ++i) {
474 const auto& step =
plan_->route_steps[i];
476 ImGui::SameLine(0, 2);
478 ImGui::SameLine(0, 2);
480 ImGui::PushID(
static_cast<int>(i));
483 ImGui::PushStyleColor(ImGuiCol_Button,
484 ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive));
486 if (ImGui::Button(StepLabel(step).c_str())) {
491 ImGui::PopStyleColor();
493 if (ImGui::IsItemHovered()) {
494 ImGui::SetTooltip(
"%s\n%s", step.title.c_str(), step.note.c_str());
502 ImGui::Text(
"%s", step.title.c_str());
503 if (!step.note.empty()) {
504 ImGui::TextWrapped(
"%s", step.note.c_str());
508 for (
const auto* item :
plan_->ItemsAtStep(step.id)) {
509 ImGui::BulletText(
"%s", item->name.c_str());
517 const auto open =
plan_->OpenDecisions();
518 ImGui::SeparatorText(
521 for (
size_t i = 0; i <
plan_->decisions.size(); ++i) {
522 auto& d =
plan_->decisions[i];
523 ImGui::PushID(
static_cast<int>(i));
524 const bool is_open = d.status.empty() || d.status ==
"open";
525 std::string header = d.priority > 0
526 ? absl::StrFormat(
"%d. %s", d.priority, d.title)
529 header += absl::StrFormat(
" (%s)", d.status);
531 ImGui::PushStyleColor(ImGuiCol_Text,
532 is_open ? ImGui::GetStyleColorVec4(ImGuiCol_Text)
534 const bool expanded = ImGui::TreeNode(
"##decision",
"%s", header.c_str());
535 ImGui::PopStyleColor();
537 if (!d.recommendation.empty()) {
538 ImGui::TextWrapped(
"Recommendation: %s", d.recommendation.c_str());
540 ImGui::SetNextItemWidth(120);
541 if (StatusCombo(
"Status", &d.status, kDecisionStatuses)) {
544 if (ImGui::InputTextMultiline(
545 "##answer", &d.answer,
546 ImVec2(-1, ImGui::GetTextLineHeight() * 3))) {
550 for (
const auto& ref : d.refs) {
551 ImGui::TextDisabled(
"%s", ref.c_str());
561 d.
title =
"New decision";
563 plan_->decisions.push_back(std::move(d));
569 if (
plan_->references.empty()) {
573 for (
size_t i = 0; i <
plan_->references.size(); ++i) {
574 const auto& r =
plan_->references[i];
575 ImGui::PushID(
static_cast<int>(i));
576 ImGui::BulletText(
"%s", r.label.c_str());
577 if (!r.author.empty() || !r.date.empty()) {
579 ImGui::TextDisabled(
"%s %s", r.author.c_str(), r.date.c_str());
581 if (!r.path.empty()) {
584 ImGui::SetClipboardText(r.path.c_str());
586 if (ImGui::IsItemHovered()) {
587 ImGui::SetTooltip(
"Copy path: %s", r.path.c_str());
598 if (ImGui::BeginTable(
600 ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersInnerV)) {
601 ImGui::TableSetupColumn(
"Steps", ImGuiTableColumnFlags_WidthStretch, 0.45f);
602 ImGui::TableSetupColumn(
"Detail", ImGuiTableColumnFlags_WidthStretch,
604 ImGui::TableNextRow();
605 ImGui::TableNextColumn();
607 ImGui::TableNextColumn();
616 auto& steps =
plan_->route_steps;
617 ImGui::BeginChild(
"##step_list", ImVec2(0, 320));
618 std::string last_group;
621 for (
size_t i = 0; i < steps.size(); ++i) {
622 const auto& step = steps[i];
623 if (!step.group.empty() && step.group != last_group) {
624 ImGui::SeparatorText(step.group.c_str());
625 last_group = step.group;
627 ImGui::PushID(
static_cast<int>(i));
628 if (ImGui::Selectable(absl::StrFormat(
"%zu. %s %s", i + 1, StepLabel(step),
629 step.code.empty() ?
"" : step.title)
634 if (ImGui::BeginDragDropSource()) {
635 const int index =
static_cast<int>(i);
636 ImGui::SetDragDropPayload(
"PLAN_STEP", &index,
sizeof(index));
637 ImGui::TextUnformatted(StepLabel(step).c_str());
638 ImGui::EndDragDropSource();
640 if (ImGui::BeginDragDropTarget()) {
641 if (
const ImGuiPayload* payload =
642 ImGui::AcceptDragDropPayload(
"PLAN_STEP")) {
643 move_from = *
static_cast<const int*
>(payload->Data);
644 move_to =
static_cast<int>(i);
646 ImGui::EndDragDropTarget();
651 if (move_from >= 0 && move_to >= 0 && move_from != move_to) {
652 auto moved = std::move(steps[move_from]);
653 steps.erase(steps.begin() + move_from);
654 steps.insert(steps.begin() + move_to, std::move(moved));
661 step.
title =
"New step";
664 steps.insert(steps.begin() + at, std::move(step));
669 ImGui::TextDisabled(
"Drag steps to reorder");
673 if (!
plan_.has_value() ||
plan_->FindStep(step_id) < 0) {
676 const std::string proposed(absl::StripAsciiWhitespace(
step_id_edit_));
678 std::string current = step_id;
679 if (status.ok() && proposed != step_id) {
680 status =
plan_->RenameStep(step_id, proposed);
689 step_id_error_ = status.ok() ?
"" : std::string(status.message());
706 bool removed =
false;
710 auto& steps =
plan_->route_steps;
711 steps.erase(steps.begin() + index);
713 std::min<int>(
selected_step_,
static_cast<int>(steps.size()) - 1);
717 auto& items =
plan_->route_items;
718 const auto it = std::find_if(
719 items.begin(), items.end(),
720 [&](
const auto& item) { return item.id == pending_removal_id_; });
721 if (it != items.end()) {
735 const std::string message = absl::StrFormat(
736 "Remove %s? Planning edits have no undo; reloading the saved plan is "
737 "the only way back.",
740 message.c_str(),
"Remove",
"Cancel")) {
746 auto& steps =
plan_->route_steps;
747 if (selected_step_ < 0 || selected_step_ >=
static_cast<int>(steps.size())) {
748 ImGui::TextDisabled(
"Select a step");
752 ImGui::PushID(
"step_detail");
766 if (ImGui::IsItemActivated()) {
769 if (ImGui::IsItemDeactivatedAfterEdit()) {
775 if (ImGui::InputText(
"Code", &step.code)) {
778 if (ImGui::InputText(
"Title", &step.title)) {
781 if (ImGui::InputText(
"Group", &step.group)) {
784 if (StatusCombo(
"Kind", &step.kind, kStepKinds)) {
787 std::string targets = JoinTargets(step.targets);
788 if (ImGui::InputTextWithHint(
"Targets",
"room:0x0C, map:0x4B, area:D1",
790 step.targets = SplitTargets(targets);
794 if (ImGui::InputTextMultiline(
"##note", &step.note,
795 ImVec2(-1, ImGui::GetTextLineHeight() * 4))) {
802 absl::StrFormat(
"step \"%s\" (Id %s)", StepLabel(step), step.id));
803 ImGui::OpenPopup(kRemoveConfirmPopupId);
810 auto& items =
plan_->route_items;
811 const std::string step_id =
813 selected_step_ < static_cast<int>(
plan_->route_steps.size())
816 ImGui::Text(
"Items (%zu)", items.size());
823 item.
name =
"New item";
826 items.push_back(std::move(item));
830 if (ImGui::BeginTable(
"##items", 5,
831 ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY |
832 ImGuiTableFlags_BordersInnerH,
834 ImGui::TableSetupScrollFreeze(0, 1);
835 ImGui::TableSetupColumn(
"Item", ImGuiTableColumnFlags_WidthStretch);
836 ImGui::TableSetupColumn(
"Step", ImGuiTableColumnFlags_WidthFixed, 80);
837 ImGui::TableSetupColumn(
"Category", ImGuiTableColumnFlags_WidthFixed, 80);
838 ImGui::TableSetupColumn(
"Status", ImGuiTableColumnFlags_WidthFixed, 90);
839 ImGui::TableSetupColumn(
"Where", ImGuiTableColumnFlags_WidthStretch);
840 ImGui::TableHeadersRow();
841 for (
size_t i = 0; i < items.size(); ++i) {
842 const auto& item = items[i];
846 ImGui::PushID(
static_cast<int>(i));
847 ImGui::TableNextRow();
848 ImGui::TableNextColumn();
849 if (ImGui::Selectable(item.name.c_str(),
851 ImGuiSelectableFlags_SpanAllColumns)) {
854 ImGui::TableNextColumn();
855 const int step_index =
plan_->FindStep(item.step);
856 ImGui::TextUnformatted(
857 step_index >= 0 ? StepLabel(
plan_->route_steps[step_index]).c_str()
858 : item.step.c_str());
859 ImGui::TableNextColumn();
860 ImGui::TextUnformatted(item.category.c_str());
861 ImGui::TableNextColumn();
863 ImGui::TableNextColumn();
864 ImGui::TextUnformatted(item.where.c_str());
870 if (selected_item_ < 0 || selected_item_ >=
static_cast<int>(items.size())) {
874 ImGui::SeparatorText(item.name.c_str());
875 ImGui::PushID(
"item_detail");
876 if (ImGui::InputText(
"Name", &item.name)) {
879 if (ImGui::BeginCombo(
"Step", item.step.c_str())) {
880 for (
const auto& step :
plan_->route_steps) {
881 if (ImGui::Selectable(
882 absl::StrFormat(
"%s %s", StepLabel(step), step.title).c_str(),
883 item.step == step.id)) {
890 if (ImGui::InputText(
"Category", &item.category)) {
893 if (StatusCombo(
"Status", &item.status, kItemStatuses)) {
896 if (ImGui::Checkbox(
"Required", &item.required)) {
899 if (ImGui::InputText(
"Where", &item.where)) {
902 if (ImGui::InputTextMultiline(
"##item_note", &item.note,
903 ImVec2(-1, ImGui::GetTextLineHeight() * 3))) {
907 for (
const auto& need : item.needs) {
908 const int step_index =
plan_->FindStep(need.step);
909 ImGui::BulletText(
"Needed at %s: %s",
911 ? StepLabel(
plan_->route_steps[step_index]).c_str()
917 absl::StrFormat(
"item \"%s\" (Id %s)", item.name, item.id));
918 ImGui::OpenPopup(kRemoveConfirmPopupId);
926 if (section ==
nullptr) {
930 const auto observations = section->find(
"observations");
932 observations != section->end() && observations->is_object()
933 ? observations->size()
935 ImGui::TextDisabled(
"%zu observations, updated %s by %s", count,
936 JsonString(*section,
"updated_utc",
"-").c_str(),
937 JsonString(*section,
"agent",
"-").c_str());
939 if (!orphans.empty()) {
941 "%zu observations name entries no longer in the plan: %s",
942 orphans.size(), absl::StrJoin(orphans,
", ").c_str());
945 !ImGui::TreeNode(
"##agent_observations",
"Observations (%zu)", count)) {
948 for (
auto it = observations->begin(); it != observations->end(); ++it) {
949 ImGui::BulletText(
"%s", it.key().c_str());
950 const std::string state = JsonString(it.value(),
"state",
"");
951 if (!state.empty()) {
961 if (obs ==
nullptr) {
964 ImGui::PushID(key.c_str());
966 const std::string state = JsonString(*obs,
"state",
"");
967 if (!state.empty()) {
970 for (
const char* field : {
"summary",
"next"}) {
971 const std::string text = JsonString(*obs, field,
"");
973 ImGui::TextWrapped(
"%s", text.c_str());
976 if (
auto evidence = obs->find(
"evidence");
977 evidence != obs->end() && evidence->is_array()) {
978 for (
const auto& entry : *evidence) {
979 if (entry.is_string()) {
980 ImGui::BulletText(
"%s", entry.get<std::string>().c_str());
984 if (
auto prs = obs->find(
"prs"); prs != obs->end() && prs->is_array()) {
985 std::vector<std::string> labels;
986 for (
const auto& pr : *prs) {
987 labels.push_back(pr.is_string() ? pr.get<std::string>()
990 ImGui::TextDisabled(
"PRs: %s", absl::StrJoin(labels,
", ").c_str());
993 "%s %s - read-only; agents update this, your notes stay "
995 JsonString(*obs,
"agent",
"").c_str(),
996 JsonString(*obs,
"observed_utc",
"").c_str());
1002 if (targets.empty()) {
1006 for (
size_t i = 0; i < targets.size(); ++i) {
1010 ImGui::PushID(
static_cast<int>(i));
1013 if (ImGui::SmallButton(targets[i].c_str())) {
1017 ImGui::TextDisabled(
"%s", targets[i].c_str());
1028 if (!bus ||
id < 0) {
1031 if (target.
kind ==
"room") {
1033 }
else if (target.
kind ==
"map") {
static absl::Status CreateAndLink(project::YazeProject *project, const std::string &path)
static absl::StatusOr< ProjectPlan > LoadFromFile(const std::string &path, std::string *source=nullptr)
int FindStep(std::string_view id) const
project::YazeProject * project() const
EditorDependencies dependencies_
void RequestRemoval(RemovalKind kind, const std::string &id, std::string label)
std::string pending_removal_label_
std::string pending_removal_id_
void DrawRemovalConfirm()
RemovalKind pending_removal_
absl::Status Reload(bool discard_changes=false)
std::string loaded_source_
void Initialize() override
absl::Status Save() override
std::string new_plan_path_
void CancelPendingRemoval()
std::string step_id_edit_for_
void CommitStepIdEdit(std::string step_id)
std::string step_id_error_
bool ConfirmPendingRemoval()
std::string project_path_
void DrawAgentObservation(const std::string &key)
void DrawTargets(const std::vector< std::string > &targets, const char *id)
void DiscardProjectDraftChanges()
std::string step_id_edit_
std::optional< core::ProjectPlan > plan_
absl::Status SyncWithProject()
absl::Status Update() override
void OpenTarget(const std::string &target)
void Show(const std::string &message, ToastType type=ToastType::kInfo, float ttl_seconds=3.0f, std::string action_label={}, std::function< void()> on_action=nullptr)
Base interface for all logical window content components.
void RegisterWindowContent(std::unique_ptr< WindowContent > window)
Register a WindowContent instance for central drawing.
std::function< void()> draw_
void Draw(bool *) override
Draw the panel content.
std::string GetId() const override
Unique identifier for this panel.
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
PlanningPanel(std::string id, std::string name, const char *icon, int priority, std::function< void()> draw)
int GetPriority() const override
Get display priority for menu ordering.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
#define ICON_MD_EVENT_NOTE
#define ICON_MD_CHECKLIST
#define ICON_MD_DASHBOARD
#define ICON_MD_CONTENT_COPY
#define ICON_MD_CHEVRON_RIGHT
#define ICON_MD_SMART_TOY
const PlanJson * FindPlanAgentStatus(const ProjectPlan &plan)
const PlanJson * FindPlanAgentObservation(const ProjectPlan &plan, std::string_view key)
bool AdoptPlanAgentOnlyChanges(ProjectPlan *draft, std::string_view loaded_source, std::string_view disk_source)
nlohmann::ordered_json PlanJson
std::vector< std::string > OrphanedPlanAgentObservations(const ProjectPlan &plan)
::yaze::EventBus * event_bus()
Get the current EventBus instance.
bool StatusCombo(const char *label, std::string *value, const char *const (&options)[N])
std::vector< std::string > SplitTargets(const std::string &text)
ImVec4 StatusColor(const std::string &status)
constexpr const char * kDecisionStatuses[]
constexpr const char * kStepKinds[]
std::string StepLabel(const core::PlanRouteStep &step)
constexpr const char * kMilestoneStatuses[]
constexpr const char * kItemStatuses[]
std::string JoinTargets(const std::vector< std::string > &targets)
std::string JsonString(const core::PlanJson &obj, const char *key, const char *fallback)
std::string DaysUntil(const std::string &date)
constexpr const char * kRemoveConfirmPopupId
constexpr const char * kCategory
Editors are the view controllers for the application.
absl::Status ValidateStepIdEdit(const core::ProjectPlan &plan, std::string_view current_id, std::string_view proposed_id)
void ColoredText(const char *text, const ImVec4 &color)
ImVec4 GetDisabledColor()
void ColoredTextF(const ImVec4 &color, const char *fmt,...)
bool ConfirmationDialog(const char *id, const char *title, const char *message, const char *confirm_text, const char *cancel_text)
ImVec4 GetModifiedColor()
static PlanTarget Parse(std::string_view text)
ToastManager * toast_manager
WorkspaceWindowManager * window_manager
static JumpToMapRequestEvent Create(int map, size_t session=0)
static JumpToRoomRequestEvent Create(int room, size_t session=0)
std::string PlanningFilePath() const