yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::editor::AssemblyEditor Class Reference

Text editor for modifying assembly code. More...

#include <assembly_editor.h>

Inheritance diagram for yaze::app::editor::AssemblyEditor:
Collaboration diagram for yaze::app::editor::AssemblyEditor:

Public Member Functions

 AssemblyEditor ()
 
void ChangeActiveFile (const std::string_view &filename)
 
void Update (bool &is_loaded)
 
void InlineUpdate ()
 
void UpdateCodeView ()
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Find () override
 
absl::Status Update () override
 
void OpenFolder (const std::string &folder_path)
 
- Public Member Functions inherited from yaze::app::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
EditorType type () const
 

Private Member Functions

void DrawFileMenu ()
 
void DrawEditMenu ()
 
void SetEditorText ()
 
void DrawCurrentFolder ()
 
void DrawFileTabView ()
 

Private Attributes

bool file_is_loaded_ = false
 
std::vector< std::string > files_
 
std::vector< TextEditor > open_files_
 
ImVector< int > active_files_
 
int current_file_id_ = 0
 
std::string current_file_
 
core::FolderItem current_folder_
 
TextEditor text_editor_
 

Additional Inherited Members

- Protected Attributes inherited from yaze::app::editor::Editor
EditorType type_
 
EditorContext context_
 

Detailed Description

Text editor for modifying assembly code.

Definition at line 19 of file assembly_editor.h.

Constructor & Destructor Documentation

◆ AssemblyEditor()

yaze::app::editor::AssemblyEditor::AssemblyEditor ( )
inline

Definition at line 21 of file assembly_editor.h.

References yaze::app::gui::GetAssemblyLanguageDef(), yaze::app::editor::kAssembly, text_editor_, and yaze::app::editor::Editor::type_.

Here is the call graph for this function:

Member Function Documentation

◆ ChangeActiveFile()

void yaze::app::editor::AssemblyEditor::ChangeActiveFile ( const std::string_view & filename)
inline

Definition at line 27 of file assembly_editor.h.

References current_file_, and file_is_loaded_.

Referenced by DrawCurrentFolder(), DrawFileMenu(), and InlineUpdate().

◆ Update() [1/2]

void yaze::app::editor::AssemblyEditor::Update ( bool & is_loaded)

Definition at line 102 of file assembly_editor.cc.

References current_file_, DrawEditMenu(), DrawFileMenu(), SetEditorText(), and text_editor_.

Referenced by yaze::app::editor::EditorManager::DrawYazeMenuBar().

Here is the call graph for this function:

◆ InlineUpdate()

void yaze::app::editor::AssemblyEditor::InlineUpdate ( )

Definition at line 123 of file assembly_editor.cc.

References ChangeActiveFile(), current_file_, SetEditorText(), and text_editor_.

Referenced by yaze::app::editor::MusicEditor::Update().

Here is the call graph for this function:

◆ UpdateCodeView()

void yaze::app::editor::AssemblyEditor::UpdateCodeView ( )

◆ Cut()

absl::Status yaze::app::editor::AssemblyEditor::Cut ( )
overridevirtual

Implements yaze::app::editor::Editor.

Definition at line 339 of file assembly_editor.cc.

References text_editor_.

◆ Copy()

absl::Status yaze::app::editor::AssemblyEditor::Copy ( )
overridevirtual

Implements yaze::app::editor::Editor.

Definition at line 344 of file assembly_editor.cc.

References text_editor_.

◆ Paste()

absl::Status yaze::app::editor::AssemblyEditor::Paste ( )
overridevirtual

Implements yaze::app::editor::Editor.

Definition at line 349 of file assembly_editor.cc.

References text_editor_.

◆ Undo()

absl::Status yaze::app::editor::AssemblyEditor::Undo ( )
overridevirtual

Implements yaze::app::editor::Editor.

Definition at line 354 of file assembly_editor.cc.

References text_editor_.

◆ Redo()

absl::Status yaze::app::editor::AssemblyEditor::Redo ( )
overridevirtual

Implements yaze::app::editor::Editor.

Definition at line 359 of file assembly_editor.cc.

References text_editor_.

◆ Find()

absl::Status yaze::app::editor::AssemblyEditor::Find ( )
inlineoverridevirtual

Implements yaze::app::editor::Editor.

Definition at line 43 of file assembly_editor.h.

◆ Update() [2/2]

absl::Status yaze::app::editor::AssemblyEditor::Update ( )
overridevirtual

Implements yaze::app::editor::Editor.

Definition at line 364 of file assembly_editor.cc.

◆ OpenFolder()

void yaze::app::editor::AssemblyEditor::OpenFolder ( const std::string & folder_path)

Definition at line 98 of file assembly_editor.cc.

References current_folder_.

Referenced by yaze::app::editor::EditorManager::OpenProject().

◆ DrawFileMenu()

void yaze::app::editor::AssemblyEditor::DrawFileMenu ( )
private
Todo
Implement this

Definition at line 278 of file assembly_editor.cc.

References ChangeActiveFile().

Referenced by Update().

Here is the call graph for this function:

◆ DrawEditMenu()

void yaze::app::editor::AssemblyEditor::DrawEditMenu ( )
private
Todo
Implement this.

Definition at line 298 of file assembly_editor.cc.

References text_editor_.

Referenced by Update().

◆ SetEditorText()

void yaze::app::editor::AssemblyEditor::SetEditorText ( )
private

Definition at line 324 of file assembly_editor.cc.

References current_file_, file_is_loaded_, and text_editor_.

Referenced by InlineUpdate(), Update(), and UpdateCodeView().

◆ DrawCurrentFolder()

void yaze::app::editor::AssemblyEditor::DrawCurrentFolder ( )
private

◆ DrawFileTabView()

void yaze::app::editor::AssemblyEditor::DrawFileTabView ( )
private

Member Data Documentation

◆ file_is_loaded_

bool yaze::app::editor::AssemblyEditor::file_is_loaded_ = false
private

Definition at line 59 of file assembly_editor.h.

Referenced by ChangeActiveFile(), and SetEditorText().

◆ files_

std::vector<std::string> yaze::app::editor::AssemblyEditor::files_
private

Definition at line 61 of file assembly_editor.h.

Referenced by DrawFileTabView().

◆ open_files_

std::vector<TextEditor> yaze::app::editor::AssemblyEditor::open_files_
private

Definition at line 62 of file assembly_editor.h.

Referenced by DrawFileTabView().

◆ active_files_

ImVector<int> yaze::app::editor::AssemblyEditor::active_files_
private

Definition at line 63 of file assembly_editor.h.

Referenced by DrawFileTabView().

◆ current_file_id_

int yaze::app::editor::AssemblyEditor::current_file_id_ = 0
private

Definition at line 64 of file assembly_editor.h.

Referenced by DrawFileTabView().

◆ current_file_

std::string yaze::app::editor::AssemblyEditor::current_file_
private

◆ current_folder_

core::FolderItem yaze::app::editor::AssemblyEditor::current_folder_
private

Definition at line 67 of file assembly_editor.h.

Referenced by DrawCurrentFolder(), OpenFolder(), and UpdateCodeView().

◆ text_editor_

TextEditor yaze::app::editor::AssemblyEditor::text_editor_
private

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