Elaztek Developer Hub
Blamite Game Engine - Keystone  00433.02.16.25.2127.blamite
A library that enables the use of Qt in Blamite's editing tools.
file.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <HEKGuerilla/components/tags/tags.h>
4 
5 #include "../BlamEditorDocument.h"
6 
7 #ifndef KEYSTONE
8 #define KEYSTONE
9 #endif
10 
15 {
16 public:
17  bool is_binary = false;
18  void* binary_address = nullptr;
19  int64_t binary_size = 0;
20 
21  bool is_new = false;
22 
23  BlamEditorDocument_File(BlamEditorWindow* _window, std::string _file_path);
24 
25  BlamEditorDocument_File(std::string _file_path);
26 
27  bool Close() override;
28  void Save() override;
29  void SaveAs() override;
30 };
BlamEditorDocument::mdi_default_height
int mdi_default_height
The default starting height of the document's MDI window.
Definition: BlamEditorDocument.h:63
BlamEditorDocument::mdi_default_width
int mdi_default_width
The default starting width of the document's MDI window.
Definition: BlamEditorDocument.h:62
editor_data.h
BlamEditorDocument::file_path
std::string file_path
The path to the file associated with this document.
Definition: BlamEditorDocument.h:59
CodeEditorDialog.h
document_type_configs
std::map< BlamEditorDocumentType, BlamConfigurationFile * > document_type_configs
Definition: document_config.cpp:10
BlamEditorWindow::GetEditorWindowType
BlamEditorWindowType GetEditorWindowType()
Retrieves the type of the editor window.
Definition: BlamEditorWindow.cpp:124
free
Font Awesome Free License Font Awesome Free is free
Definition: LICENSE.txt:4
BlamEditorDocumentWidget::document
BlamEditorDocument * document
The document associated with this widget.
Definition: BlamEditorDocument.h:172
CodeEditorWidget::GetText
std::string GetText()
Retrieves the updated text.
Definition: CodeEditorWidget.cpp:97
BlamEditorDocumentType
BlamEditorDocumentType
Enumerator containing all possible editor document types.
Definition: BlamEditorDocument.h:23
BlamEditorDocument::document_title
std::string document_title
The title of this document.
Definition: BlamEditorDocument.h:50
HexEditorWidget::UpdateBuffer
void UpdateBuffer()
Definition: HexEditorWidget.cpp:48
BlamKeystone::EditorData::UnloadDocumentConfigurations
KEYSTONE void UnloadDocumentConfigurations()
Unloads all document type configurations.
Definition: document_config.cpp:91
BlamEditorWindowType::Sapien
@ Sapien
The editor window is the main window for Sapien (see #sapien_main_window).
BlamEditorDocument.h
BlamEditorDocument::FlagAsModified
virtual void FlagAsModified(bool new_modified_state=true)
Flags the document as being modified.
Definition: BlamEditorDocument.cpp:79
BlamEditorDocument_File::binary_address
void * binary_address
Definition: file.h:18
HexEditorWidget::GetDataSize
int64_t GetDataSize()
Definition: HexEditorWidget.cpp:71
BlamEditorDocument_File::Save
void Save() override
Attempts to save the document, replacing the original file.
Definition: file.cpp:152
BlamEditorDocumentType::TagDesigner
@ TagDesigner
Special document type used for the Tag Designer window.
BlamEditorWindow.h
BlamEditorDocumentType::Tag
@ Tag
Indicates the document represents a tag file.
BlamEditorDocumentSubWindow::document
BlamEditorDocument * document
The document associated with this widget.
Definition: BlamEditorDocument.h:157
BlamEditorWindowType
BlamEditorWindowType
Enumerator used to identify the type of the main editor window.
Definition: keystone_api.h:53
BlamKeystone::EditorData::LoadDocumentConfigurations
KEYSTONE void LoadDocumentConfigurations()
Loads all document type configurations.
Definition: document_config.cpp:83
HexEditorWidget
Definition: HexEditorWidget.h:9
HexEditorWidget::GetDataAddress
void * GetDataAddress()
Definition: HexEditorWidget.cpp:66
BlamEditorDocument_File::Close
bool Close() override
Closes the document and releases any resources being used by it.
Definition: file.cpp:137
BlamEditorDocument_File::is_binary
bool is_binary
Definition: file.h:17
BlamEditorDocument_File::is_new
bool is_new
Definition: file.h:21
is_plaintext_file
bool is_plaintext_file(std::string file_path)
Definition: file.cpp:18
CodeEditorWidget
Definition: CodeEditorWidget.h:12
BlamKeystone::EditorData::GetMainEditorWindow
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:34
BlamEditorWindowType::Foundry
@ Foundry
The editor window is the main window for Foundry (see foundry_main_window).
HexEditorDialog.h
BlamEditorDocument
Interface class that any types of editor documents inherit from.
Definition: BlamEditorDocument.h:38
load_document_config
void load_document_config(BlamEditorDocumentType type, std::string filename)
Definition: document_config.cpp:12
BlamEditorDocument_File::binary_size
int64_t binary_size
Definition: file.h:19
BlamKeystone::EditorData::GetDocumentTypeConfigurations
KEYSTONE std::map< BlamEditorDocumentType, BlamConfigurationFile * > GetDocumentTypeConfigurations()
Retrieves the list of loaded document type configuration files.
Definition: document_config.cpp:117
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:34
BlamEditorDocumentSubWindow::closeEvent
void closeEvent(QCloseEvent *closeEvent)
Definition: BlamEditorDocumentSubWindow.cpp:5
BlamEditorDocument_File::SaveAs
void SaveAs() override
Attempts to save the document, prompting the user to save as a new file.
Definition: file.cpp:181
engine.h
file.h
BlamEditorDocument::Close
virtual bool Close()
Closes the document and releases any resources being used by it.
Definition: BlamEditorDocument.cpp:178
BlamEditorDocument_File
Class representing a File document.
Definition: file.h:14
BlamEditorWindowType::Tool
@ Tool
The editor window is the GUI for Tool (see tool_gui_window).
BlamEditorDocument_File::BlamEditorDocument_File
BlamEditorDocument_File(BlamEditorWindow *_window, std::string _file_path)
Definition: file.cpp:63
BlamEditorDocumentType::File
@ File
Indicates the document represents a generic file.
BlamEditorWindowType::Guerilla
@ Guerilla
The editor window is the main window for Guerilla (see guerilla_window).
BlamEditorDocument::ui
BlamEditorDocumentWidget * ui
The GUI widget associated with this document.
Definition: BlamEditorDocument.h:51
BlamKeystone::EditorData::GetDocumentTypeConfiguration
KEYSTONE BlamConfigurationFile * GetDocumentTypeConfiguration(BlamEditorDocumentType type)
Attempts to locate the configuration file for the specified document type.
Definition: document_config.cpp:107