yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::PlanningEditor Class Reference

#include <planning_editor.h>

Inheritance diagram for yaze::editor::PlanningEditor:
Collaboration diagram for yaze::editor::PlanningEditor:

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
 
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 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

void SyncWithProject ()
 
absl::Status Reload ()
 
bool DrawPlanHeader ()
 
void DrawNoPlan ()
 
void DrawGoal ()
 
void DrawMilestones ()
 
void DrawRouteStrip ()
 
void DrawDecisionQueue ()
 
void DrawReferences ()
 
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::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
 

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_
 

Detailed Description

Definition at line 16 of file planning_editor.h.

Constructor & Destructor Documentation

◆ PlanningEditor()

yaze::editor::PlanningEditor::PlanningEditor ( )
inline

Definition at line 18 of file planning_editor.h.

References yaze::editor::kPlanning, and yaze::editor::Editor::type_.

Member Function Documentation

◆ Initialize()

void yaze::editor::PlanningEditor::Initialize ( )
overridevirtual

◆ Load()

absl::Status yaze::editor::PlanningEditor::Load ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 21 of file planning_editor.h.

◆ Save()

absl::Status yaze::editor::PlanningEditor::Save ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 155 of file planning_editor.cc.

References dirty_, plan_, plan_path_, and save_error_.

Referenced by DrawPlanHeader().

◆ Update()

absl::Status yaze::editor::PlanningEditor::Update ( )
overridevirtual

Implements yaze::editor::Editor.

Definition at line 150 of file planning_editor.cc.

References SyncWithProject().

Here is the call graph for this function:

◆ Undo()

absl::Status yaze::editor::PlanningEditor::Undo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 25 of file planning_editor.h.

◆ Redo()

absl::Status yaze::editor::PlanningEditor::Redo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 26 of file planning_editor.h.

◆ Cut()

absl::Status yaze::editor::PlanningEditor::Cut ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 27 of file planning_editor.h.

◆ Copy()

absl::Status yaze::editor::PlanningEditor::Copy ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 28 of file planning_editor.h.

◆ Paste()

absl::Status yaze::editor::PlanningEditor::Paste ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 29 of file planning_editor.h.

◆ Find()

absl::Status yaze::editor::PlanningEditor::Find ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 30 of file planning_editor.h.

◆ CanUndo()

bool yaze::editor::PlanningEditor::CanUndo ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 31 of file planning_editor.h.

◆ CanRedo()

bool yaze::editor::PlanningEditor::CanRedo ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 32 of file planning_editor.h.

◆ CanCut()

bool yaze::editor::PlanningEditor::CanCut ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 33 of file planning_editor.h.

◆ CanCopy()

bool yaze::editor::PlanningEditor::CanCopy ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 34 of file planning_editor.h.

◆ CanPaste()

bool yaze::editor::PlanningEditor::CanPaste ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 35 of file planning_editor.h.

◆ DrawOverview()

void yaze::editor::PlanningEditor::DrawOverview ( )

◆ DrawRoute()

void yaze::editor::PlanningEditor::DrawRoute ( )

Definition at line 503 of file planning_editor.cc.

References DrawItems(), DrawPlanHeader(), DrawStepDetail(), and DrawStepList().

Referenced by Initialize().

Here is the call graph for this function:

◆ dirty()

bool yaze::editor::PlanningEditor::dirty ( ) const
inline

Definition at line 40 of file planning_editor.h.

References dirty_.

◆ plan()

const std::optional< core::ProjectPlan > & yaze::editor::PlanningEditor::plan ( ) const
inline

Definition at line 41 of file planning_editor.h.

References plan_.

Referenced by DrawNoPlan().

◆ SyncWithProject()

void yaze::editor::PlanningEditor::SyncWithProject ( )
private

Definition at line 169 of file planning_editor.cc.

References dirty_, load_error_, plan_, plan_path_, yaze::project::YazeProject::PlanningFilePath(), yaze::editor::Editor::project(), Reload(), selected_item_, and selected_step_.

Referenced by DrawPlanHeader(), and Update().

Here is the call graph for this function:

◆ Reload()

absl::Status yaze::editor::PlanningEditor::Reload ( )
private

Definition at line 185 of file planning_editor.cc.

References dirty_, load_error_, yaze::core::ProjectPlan::LoadFromFile(), plan_, plan_path_, selected_item_, and selected_step_.

Referenced by DrawNoPlan(), DrawPlanHeader(), and SyncWithProject().

Here is the call graph for this function:

◆ DrawPlanHeader()

◆ DrawNoPlan()

◆ DrawGoal()

void yaze::editor::PlanningEditor::DrawGoal ( )
private

Definition at line 292 of file planning_editor.cc.

References ICON_MD_FLAG, MarkDirty(), and plan_.

Referenced by DrawOverview().

Here is the call graph for this function:

◆ DrawMilestones()

void yaze::editor::PlanningEditor::DrawMilestones ( )
private

◆ DrawRouteStrip()

void yaze::editor::PlanningEditor::DrawRouteStrip ( )
private

Definition at line 375 of file planning_editor.cc.

References yaze::gui::ColoredText(), DrawTargets(), ICON_MD_CHEVRON_RIGHT, ICON_MD_ROUTE, plan_, selected_item_, and selected_step_.

Referenced by DrawOverview().

Here is the call graph for this function:

◆ DrawDecisionQueue()

void yaze::editor::PlanningEditor::DrawDecisionQueue ( )
private

◆ DrawReferences()

void yaze::editor::PlanningEditor::DrawReferences ( )
private

Definition at line 477 of file planning_editor.cc.

References ICON_MD_CONTENT_COPY, ICON_MD_EVENT_NOTE, and plan_.

Referenced by DrawOverview().

◆ DrawStepList()

void yaze::editor::PlanningEditor::DrawStepList ( )
private

Definition at line 524 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().

Here is the call graph for this function:

◆ DrawStepDetail()

void yaze::editor::PlanningEditor::DrawStepDetail ( )
private

Definition at line 581 of file planning_editor.cc.

References DrawTargets(), ICON_MD_DELETE, MarkDirty(), plan_, and selected_step_.

Referenced by DrawRoute().

Here is the call graph for this function:

◆ DrawItems()

void yaze::editor::PlanningEditor::DrawItems ( )
private

◆ DrawTargets()

void yaze::editor::PlanningEditor::DrawTargets ( const std::vector< std::string > & targets,
const char * id )
private

Definition at line 748 of file planning_editor.cc.

References yaze::core::PlanTarget::NumericId(), OpenTarget(), and yaze::core::PlanTarget::Parse().

Referenced by DrawDecisionQueue(), DrawRouteStrip(), and DrawStepDetail().

Here is the call graph for this function:

◆ OpenTarget()

◆ MarkDirty()

void yaze::editor::PlanningEditor::MarkDirty ( )
inlineprivate

Definition at line 59 of file planning_editor.h.

References dirty_.

Referenced by DrawDecisionQueue(), DrawGoal(), DrawItems(), DrawMilestones(), DrawStepDetail(), and DrawStepList().

Member Data Documentation

◆ plan_path_

std::string yaze::editor::PlanningEditor::plan_path_
private

Definition at line 61 of file planning_editor.h.

Referenced by DrawPlanHeader(), Reload(), Save(), and SyncWithProject().

◆ plan_

◆ load_error_

std::string yaze::editor::PlanningEditor::load_error_
private

Definition at line 63 of file planning_editor.h.

Referenced by DrawNoPlan(), Reload(), and SyncWithProject().

◆ save_error_

std::string yaze::editor::PlanningEditor::save_error_
private

Definition at line 64 of file planning_editor.h.

Referenced by DrawPlanHeader(), and Save().

◆ new_plan_path_

std::string yaze::editor::PlanningEditor::new_plan_path_
private

Definition at line 65 of file planning_editor.h.

Referenced by DrawNoPlan().

◆ dirty_

bool yaze::editor::PlanningEditor::dirty_ = false
private

Definition at line 66 of file planning_editor.h.

Referenced by dirty(), DrawPlanHeader(), MarkDirty(), Reload(), Save(), and SyncWithProject().

◆ panels_registered_

bool yaze::editor::PlanningEditor::panels_registered_ = false
private

Definition at line 67 of file planning_editor.h.

Referenced by Initialize().

◆ selected_step_

int yaze::editor::PlanningEditor::selected_step_ = -1
private

◆ selected_item_

int yaze::editor::PlanningEditor::selected_item_ = -1
private

Definition at line 69 of file planning_editor.h.

Referenced by DrawItems(), DrawRouteStrip(), Reload(), and SyncWithProject().

◆ items_at_step_only_

bool yaze::editor::PlanningEditor::items_at_step_only_ = true
private

Definition at line 70 of file planning_editor.h.

Referenced by DrawItems().


The documentation for this class was generated from the following files: