#include <planning_editor.h>


Public Member Functions | |
| PlanningEditor () | |
| void | Initialize () override |
| absl::Status | Load () override |
| absl::Status | Save () override |
| absl::Status | Update () override |
| absl::Status | Undo () override |
| absl::Status | Redo () override |
| absl::Status | Cut () override |
| absl::Status | Copy () override |
| absl::Status | Paste () override |
| absl::Status | Find () override |
| bool | CanUndo () const override |
| bool | CanRedo () const override |
| bool | CanCut () const override |
| bool | CanCopy () const override |
| bool | CanPaste () const override |
| void | DrawOverview () |
| void | DrawRoute () |
| bool | dirty () const |
| bool | HasPendingProjectDraftChanges () const |
| void | DiscardProjectDraftChanges () |
| const std::optional< core::ProjectPlan > & | plan () const |
Public Member Functions inherited from yaze::editor::Editor | |
| Editor ()=default | |
| virtual | ~Editor ()=default |
| virtual void | SetDependencies (const EditorDependencies &deps) |
| virtual void | SetGameData (zelda3::GameData *game_data) |
| virtual absl::Status | BeginSaveTransaction () |
| virtual void | RollbackSaveTransaction () |
| virtual void | CommitSaveTransaction () |
| virtual void | PrepareForSessionTeardown () |
| virtual std::string | GetUndoDescription () const |
| virtual std::string | GetRedoDescription () const |
| const UndoManager & | undo_manager () const |
| virtual absl::Status | Clear () |
| virtual bool | CanFind () const |
| virtual void | ContributeStatus (StatusBar *) |
| virtual void | DrawEditorMenu () |
| virtual void | DrawEditMenuItems () |
| virtual EditorContextSnapshot | BuildContextSnapshot () const |
| EditorType | type () const |
| bool * | active () |
| void | set_active (bool active) |
| void | toggle_active () |
| virtual bool | IsRomLoaded () const |
| virtual std::string | GetRomStatus () const |
| Rom * | rom () const |
| zelda3::GameData * | game_data () const |
| project::YazeProject * | project () const |
| core::VersionManager * | version_manager () const |
| EditorContext | context () const |
| bool | HasContext () const |
Private Member Functions | |
| absl::Status | SyncWithProject () |
| absl::Status | Reload (bool discard_changes=false) |
| bool | DrawPlanHeader () |
| void | DrawNoPlan () |
| void | DrawGoal () |
| void | DrawMilestones () |
| void | DrawRouteStrip () |
| void | DrawDecisionQueue () |
| void | DrawReferences () |
| void | DrawAgentStatus () |
| void | DrawAgentObservation (const std::string &key) |
| void | DrawStepList () |
| void | DrawStepDetail () |
| void | DrawItems () |
| void | DrawTargets (const std::vector< std::string > &targets, const char *id) |
| void | OpenTarget (const std::string &target) |
| void | MarkDirty () |
Private Attributes | |
| std::string | plan_path_ |
| std::string | project_path_ |
| std::string | loaded_source_ |
| std::optional< core::ProjectPlan > | plan_ |
| std::string | load_error_ |
| std::string | save_error_ |
| std::string | new_plan_path_ |
| bool | dirty_ = false |
| bool | panels_registered_ = false |
| int | selected_step_ = -1 |
| int | selected_item_ = -1 |
| bool | items_at_step_only_ = true |
Friends | |
| class | PlanningEditorTestPeer |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::Editor | |
| std::string | MakePanelTitle (const std::string &base_title) const |
| std::string | MakeWindowId (const std::string &base_id) const |
| template<typename T > | |
| absl::StatusOr< T > | SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const |
Protected Attributes inherited from yaze::editor::Editor | |
| bool | active_ = false |
| EditorType | type_ |
| EditorDependencies | dependencies_ |
| UndoManager | undo_manager_ |
Definition at line 16 of file planning_editor.h.
|
inline |
Definition at line 20 of file planning_editor.h.
References yaze::editor::kPlanning, and yaze::editor::Editor::type_.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 145 of file planning_editor.cc.
References yaze::editor::Editor::dependencies_, DrawOverview(), DrawRoute(), ICON_MD_DASHBOARD, ICON_MD_ROUTE, panels_registered_, yaze::editor::WorkspaceWindowManager::RegisterWindowContent(), and yaze::editor::EditorDependencies::window_manager.

|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 23 of file planning_editor.h.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 162 of file planning_editor.cc.
References yaze::core::AdoptPlanAgentOnlyChanges(), dirty_, loaded_source_, yaze::core::ProjectPlan::LoadFromFile(), plan_, plan_path_, yaze::editor::Editor::project(), project_path_, and save_error_.
Referenced by DrawPlanHeader(), and yaze::editor::EditorSet::SavePlanningProjectDraft().

|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 158 of file planning_editor.cc.
References SyncWithProject().

|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 27 of file planning_editor.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 28 of file planning_editor.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 29 of file planning_editor.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 30 of file planning_editor.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 31 of file planning_editor.h.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 32 of file planning_editor.h.
|
inlineoverridevirtual |
Reimplemented from yaze::editor::Editor.
Definition at line 33 of file planning_editor.h.
|
inlineoverridevirtual |
Reimplemented from yaze::editor::Editor.
Definition at line 34 of file planning_editor.h.
|
inlineoverridevirtual |
Reimplemented from yaze::editor::Editor.
Definition at line 35 of file planning_editor.h.
|
inlineoverridevirtual |
Reimplemented from yaze::editor::Editor.
Definition at line 36 of file planning_editor.h.
|
inlineoverridevirtual |
Reimplemented from yaze::editor::Editor.
Definition at line 37 of file planning_editor.h.
| void yaze::editor::PlanningEditor::DrawOverview | ( | ) |
Definition at line 342 of file planning_editor.cc.
References DrawAgentStatus(), DrawDecisionQueue(), DrawGoal(), DrawMilestones(), DrawPlanHeader(), DrawReferences(), DrawRouteStrip(), and plan_.
Referenced by Initialize().
| void yaze::editor::PlanningEditor::DrawRoute | ( | ) |
Definition at line 574 of file planning_editor.cc.
References DrawItems(), DrawPlanHeader(), DrawStepDetail(), and DrawStepList().
Referenced by Initialize().

|
inline |
Definition at line 42 of file planning_editor.h.
References dirty_.
|
inline |
Definition at line 43 of file planning_editor.h.
References dirty_.
Referenced by yaze::editor::EditorSet::HasPendingPlanningProjectDraftChanges().
| void yaze::editor::PlanningEditor::DiscardProjectDraftChanges | ( | ) |
Definition at line 244 of file planning_editor.cc.
References dirty_, loaded_source_, plan_, plan_path_, project_path_, save_error_, and SyncWithProject().

|
inline |
Definition at line 47 of file planning_editor.h.
References plan_.
|
private |
Definition at line 195 of file planning_editor.cc.
References dirty_, yaze::project::YazeProject::filepath, load_error_, loaded_source_, plan_, plan_path_, yaze::project::YazeProject::PlanningFilePath(), yaze::editor::Editor::project(), project_path_, Reload(), save_error_, selected_item_, and selected_step_.
Referenced by DiscardProjectDraftChanges(), DrawNoPlan(), DrawPlanHeader(), and Update().

|
private |
Definition at line 219 of file planning_editor.cc.
References dirty_, load_error_, loaded_source_, yaze::core::ProjectPlan::LoadFromFile(), plan_, plan_path_, save_error_, selected_item_, and selected_step_.
Referenced by DrawNoPlan(), DrawPlanHeader(), and SyncWithProject().

|
private |
Definition at line 293 of file planning_editor.cc.
References yaze::gui::ColoredText(), yaze::gui::ColoredTextF(), yaze::editor::Editor::dependencies_, dirty_, DrawNoPlan(), yaze::gui::GetErrorColor(), yaze::gui::GetModifiedColor(), ICON_MD_REFRESH, ICON_MD_SAVE, yaze::editor::kError, yaze::editor::kSuccess, plan_, plan_path_, Reload(), Save(), save_error_, yaze::editor::ToastManager::Show(), SyncWithProject(), and yaze::editor::EditorDependencies::toast_manager.
Referenced by DrawOverview(), and DrawRoute().
|
private |
Definition at line 254 of file planning_editor.cc.
References yaze::gui::ColoredTextF(), yaze::core::ProjectPlan::CreateAndLink(), yaze::gui::GetErrorColor(), ICON_MD_ADD, ICON_MD_REFRESH, load_error_, new_plan_path_, yaze::editor::Editor::project(), Reload(), and SyncWithProject().
Referenced by DrawPlanHeader().
|
private |
Definition at line 361 of file planning_editor.cc.
References ICON_MD_FLAG, MarkDirty(), and plan_.
Referenced by DrawOverview().

|
private |
Definition at line 384 of file planning_editor.cc.
References yaze::gui::ColoredTextF(), yaze::core::PlanMilestone::detail, yaze::gui::GetInfoColor(), ICON_MD_ADD, ICON_MD_TIMELINE, yaze::core::PlanMilestone::id, MarkDirty(), plan_, yaze::core::PlanMilestone::status, and yaze::core::PlanMilestone::title.
Referenced by DrawOverview().

|
private |
Definition at line 444 of file planning_editor.cc.
References yaze::gui::ColoredText(), DrawAgentObservation(), DrawTargets(), ICON_MD_CHEVRON_RIGHT, ICON_MD_ROUTE, plan_, selected_item_, and selected_step_.
Referenced by DrawOverview().

|
private |
Definition at line 496 of file planning_editor.cc.
References DrawAgentObservation(), DrawTargets(), yaze::gui::GetDisabledColor(), ICON_MD_ADD, ICON_MD_CHECKLIST, yaze::core::PlanDecision::id, MarkDirty(), plan_, yaze::core::PlanDecision::status, and yaze::core::PlanDecision::title.
Referenced by DrawOverview().

|
private |
Definition at line 548 of file planning_editor.cc.
References ICON_MD_CONTENT_COPY, ICON_MD_EVENT_NOTE, and plan_.
Referenced by DrawOverview().
|
private |
Definition at line 817 of file planning_editor.cc.
References yaze::gui::ColoredText(), yaze::gui::ColoredTextF(), yaze::core::FindPlanAgentStatus(), yaze::gui::GetInfoColor(), yaze::gui::GetWarningColor(), ICON_MD_SMART_TOY, yaze::core::OrphanedPlanAgentObservations(), and plan_.
Referenced by DrawOverview().
|
private |
Definition at line 852 of file planning_editor.cc.
References yaze::gui::ColoredText(), yaze::core::FindPlanAgentObservation(), yaze::gui::GetInfoColor(), ICON_MD_SMART_TOY, and plan_.
Referenced by DrawDecisionQueue(), DrawItems(), DrawRouteStrip(), and DrawStepDetail().

|
private |
Definition at line 595 of file planning_editor.cc.
References ICON_MD_ADD, yaze::core::PlanRouteStep::id, yaze::core::PlanRouteStep::kind, MarkDirty(), plan_, selected_step_, and yaze::core::PlanRouteStep::title.
Referenced by DrawRoute().

|
private |
Definition at line 652 of file planning_editor.cc.
References DrawAgentObservation(), DrawTargets(), ICON_MD_DELETE, MarkDirty(), plan_, save_error_, and selected_step_.
Referenced by DrawRoute().

|
private |
Definition at line 703 of file planning_editor.cc.
References yaze::gui::ColoredText(), DrawAgentObservation(), ICON_MD_ADD, ICON_MD_DELETE, yaze::core::PlanRouteItem::id, items_at_step_only_, MarkDirty(), yaze::core::PlanRouteItem::name, plan_, selected_item_, selected_step_, yaze::core::PlanRouteItem::status, and yaze::core::PlanRouteItem::step.
Referenced by DrawRoute().

|
private |
Definition at line 893 of file planning_editor.cc.
References yaze::core::PlanTarget::NumericId(), OpenTarget(), and yaze::core::PlanTarget::Parse().
Referenced by DrawDecisionQueue(), DrawRouteStrip(), and DrawStepDetail().

|
private |
Definition at line 917 of file planning_editor.cc.
References yaze::editor::JumpToMapRequestEvent::Create(), yaze::editor::JumpToRoomRequestEvent::Create(), yaze::editor::Editor::dependencies_, yaze::editor::ContentRegistry::Context::event_bus(), yaze::core::PlanTarget::kind, yaze::core::PlanTarget::NumericId(), yaze::core::PlanTarget::Parse(), and yaze::editor::EditorDependencies::session_id.
Referenced by DrawTargets().
|
inlineprivate |
Definition at line 69 of file planning_editor.h.
References dirty_.
Referenced by DrawDecisionQueue(), DrawGoal(), DrawItems(), DrawMilestones(), DrawStepDetail(), and DrawStepList().
|
friend |
Definition at line 17 of file planning_editor.h.
|
private |
Definition at line 71 of file planning_editor.h.
Referenced by DiscardProjectDraftChanges(), DrawPlanHeader(), Reload(), Save(), and SyncWithProject().
|
private |
Definition at line 72 of file planning_editor.h.
Referenced by DiscardProjectDraftChanges(), Save(), and SyncWithProject().
|
private |
Definition at line 73 of file planning_editor.h.
Referenced by DiscardProjectDraftChanges(), Reload(), Save(), and SyncWithProject().
|
private |
Definition at line 74 of file planning_editor.h.
Referenced by DiscardProjectDraftChanges(), DrawAgentObservation(), DrawAgentStatus(), DrawDecisionQueue(), DrawGoal(), DrawItems(), DrawMilestones(), DrawOverview(), DrawPlanHeader(), DrawReferences(), DrawRouteStrip(), DrawStepDetail(), DrawStepList(), plan(), Reload(), Save(), and SyncWithProject().
|
private |
Definition at line 75 of file planning_editor.h.
Referenced by DrawNoPlan(), Reload(), and SyncWithProject().
|
private |
Definition at line 76 of file planning_editor.h.
Referenced by DiscardProjectDraftChanges(), DrawPlanHeader(), DrawStepDetail(), Reload(), Save(), and SyncWithProject().
|
private |
Definition at line 77 of file planning_editor.h.
Referenced by DrawNoPlan().
|
private |
Definition at line 78 of file planning_editor.h.
Referenced by dirty(), DiscardProjectDraftChanges(), DrawPlanHeader(), HasPendingProjectDraftChanges(), MarkDirty(), Reload(), Save(), and SyncWithProject().
|
private |
Definition at line 79 of file planning_editor.h.
Referenced by Initialize().
|
private |
Definition at line 80 of file planning_editor.h.
Referenced by DrawItems(), DrawRouteStrip(), DrawStepDetail(), DrawStepList(), Reload(), and SyncWithProject().
|
private |
Definition at line 81 of file planning_editor.h.
Referenced by DrawItems(), DrawRouteStrip(), Reload(), and SyncWithProject().
|
private |
Definition at line 82 of file planning_editor.h.
Referenced by DrawItems().