Text editor for modifying assembly code. More...
#include <assembly_editor.h>
Public Member Functions | |
AssemblyEditor (Rom *rom=nullptr) | |
void | ChangeActiveFile (const std::string_view &filename) |
void | Initialize () override |
absl::Status | Load () override |
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 |
absl::Status | Save () override |
void | OpenFolder (const std::string &folder_path) |
void | set_rom (Rom *rom) |
Rom * | rom () const |
![]() | |
Editor ()=default | |
virtual | ~Editor ()=default |
virtual absl::Status | Clear () |
EditorType | type () const |
void | set_context (EditorContext *context) |
bool * | active () |
void | set_active (bool active) |
Private Member Functions | |
void | DrawFileMenu () |
void | DrawEditMenu () |
void | SetEditorText () |
void | DrawCurrentFolder () |
void | DrawFileTabView () |
Private Attributes | |
bool | file_is_loaded_ = false |
int | current_file_id_ = 0 |
std::vector< std::string > | files_ |
std::vector< TextEditor > | open_files_ |
ImVector< int > | active_files_ |
std::string | current_file_ |
FolderItem | current_folder_ |
TextEditor | text_editor_ |
Rom * | rom_ |
Additional Inherited Members | |
![]() | |
bool | active_ = false |
EditorType | type_ |
EditorContext * | context_ = nullptr |
Text editor for modifying assembly code.
Definition at line 24 of file assembly_editor.h.
|
inlineexplicit |
Definition at line 26 of file assembly_editor.h.
References yaze::gui::GetAssemblyLanguageDef(), TextEditor::GetDarkPalette(), yaze::editor::kAssembly, rom(), rom_, text_editor_, and yaze::editor::Editor::type_.
|
inline |
Definition at line 32 of file assembly_editor.h.
References current_file_, and file_is_loaded_.
Referenced by DrawCurrentFolder(), and DrawFileMenu().
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 97 of file assembly_editor.cc.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 101 of file assembly_editor.cc.
void yaze::editor::AssemblyEditor::Update | ( | bool & | is_loaded | ) |
Definition at line 107 of file assembly_editor.cc.
References current_file_, DrawEditMenu(), DrawFileMenu(), SetEditorText(), and text_editor_.
void yaze::editor::AssemblyEditor::InlineUpdate | ( | ) |
Definition at line 128 of file assembly_editor.cc.
References current_file_, SetEditorText(), and text_editor_.
void yaze::editor::AssemblyEditor::UpdateCodeView | ( | ) |
Definition at line 141 of file assembly_editor.cc.
References current_file_, current_folder_, DrawCurrentFolder(), SetEditorText(), yaze::editor::FileDialogWrapper::ShowOpenFolderDialog(), and text_editor_.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 336 of file assembly_editor.cc.
References text_editor_.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 341 of file assembly_editor.cc.
References text_editor_.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 346 of file assembly_editor.cc.
References text_editor_.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 351 of file assembly_editor.cc.
References text_editor_.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 356 of file assembly_editor.cc.
References text_editor_.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 50 of file assembly_editor.h.
|
overridevirtual |
Implements yaze::editor::Editor.
Definition at line 361 of file assembly_editor.cc.
|
inlineoverridevirtual |
Implements yaze::editor::Editor.
Definition at line 54 of file assembly_editor.h.
void yaze::editor::AssemblyEditor::OpenFolder | ( | const std::string & | folder_path | ) |
Definition at line 103 of file assembly_editor.cc.
References current_folder_.
|
inline |
|
inline |
Definition at line 59 of file assembly_editor.h.
References rom_.
Referenced by AssemblyEditor(), and set_rom().
|
private |
Definition at line 282 of file assembly_editor.cc.
References ChangeActiveFile(), and yaze::core::FileDialogWrapper::ShowOpenFileDialog().
Referenced by Update().
|
private |
Definition at line 295 of file assembly_editor.cc.
References text_editor_.
Referenced by Update().
|
private |
Definition at line 321 of file assembly_editor.cc.
References current_file_, file_is_loaded_, and text_editor_.
Referenced by InlineUpdate(), Update(), and UpdateCodeView().
|
private |
Definition at line 179 of file assembly_editor.cc.
References ChangeActiveFile(), and current_folder_.
Referenced by UpdateCodeView().
|
private |
Definition at line 229 of file assembly_editor.cc.
References active_files_, current_file_, current_file_id_, files_, ICON_MD_ADD, open_files_, and text_editor_.
|
private |
Definition at line 68 of file assembly_editor.h.
Referenced by ChangeActiveFile(), and SetEditorText().
|
private |
Definition at line 69 of file assembly_editor.h.
Referenced by DrawFileTabView().
|
private |
Definition at line 71 of file assembly_editor.h.
Referenced by DrawFileTabView().
|
private |
Definition at line 72 of file assembly_editor.h.
Referenced by DrawFileTabView().
|
private |
Definition at line 73 of file assembly_editor.h.
Referenced by DrawFileTabView().
|
private |
Definition at line 75 of file assembly_editor.h.
Referenced by ChangeActiveFile(), DrawFileTabView(), InlineUpdate(), SetEditorText(), Update(), and UpdateCodeView().
|
private |
Definition at line 76 of file assembly_editor.h.
Referenced by DrawCurrentFolder(), OpenFolder(), and UpdateCodeView().
|
private |
Definition at line 77 of file assembly_editor.h.
Referenced by AssemblyEditor(), Copy(), Cut(), DrawEditMenu(), DrawFileTabView(), InlineUpdate(), Paste(), Redo(), SetEditorText(), Undo(), Update(), and UpdateCodeView().
|
private |
Definition at line 79 of file assembly_editor.h.
Referenced by AssemblyEditor(), rom(), and set_rom().