Elaztek Developer Hub
Blamite Game Engine - Keystone  00411.04.21.24.0017.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamEditorDocument_File Class Reference

Class representing a File document. More...

#include <file.h>

+ Inheritance diagram for BlamEditorDocument_File:
+ Collaboration diagram for BlamEditorDocument_File:

Public Member Functions

 BlamEditorDocument_File (BlamEditorWindow *_window, std::string _file_path)
 
 BlamEditorDocument_File (std::string _file_path)
 
bool Close () override
 Closes the document and releases any resources being used by it. More...
 
void Save () override
 Attempts to save the document, replacing the original file. More...
 
void SaveAs () override
 Attempts to save the document, prompting the user to save as a new file. More...
 
- Public Member Functions inherited from BlamEditorDocument
 BlamEditorDocument (BlamEditorWindow *_window, BlamEditorDocumentType doctype)
 Constructs a new BlamEditorDocument. More...
 
BlamEditorDocumentType GetDocumentType ()
 Retrieves the type of this document. More...
 
virtual void OnThemeChange (BlamEditorTheme *new_theme)
 Called when the active theme is changed. More...
 
void Show ()
 Shows the document within the parent window. More...
 
void UpdateDefaultIcon ()
 Updates the document's icon. More...
 
virtual bool ConfirmClose (std::string confirmation_message="")
 Called immediately before closing a document. More...
 
virtual void FlagAsModified (bool new_modified_state=true)
 Flags the document as being modified. More...
 
virtual bool Close (bool force_close)
 Closes the document and releases any resources being used by it. More...
 
virtual void OnFocused ()
 Called when the document is focused. More...
 
virtual void OnUnfocused ()
 Called when the document is unfocused. More...
 

Public Attributes

bool is_binary = false
 
void * binary_address = nullptr
 
int64_t binary_size = 0
 
bool is_new = false
 
- Public Attributes inherited from BlamEditorDocument
BlamEditorWindowparent_window = nullptr
 The parent window that owns this document. More...
 
std::string document_title = "document"
 The title of this document. More...
 
BlamEditorDocumentWidgetui = nullptr
 The GUI widget associated with this document. More...
 
bool loaded = true
 Whether or not the document was able to be successfully loaded. More...
 
bool modified = false
 Whether or not the document has been modified. More...
 
bool override_icon = false
 Whether or not this document uses a custom icon other than the application default. More...
 
std::string custom_icon_group = ""
 The resource group containing the custom icon name. Only used when override_icon is true. More...
 
std::string custom_icon_id = ""
 The resource ID of the custom icon. Only used when override_icon is true. More...
 
std::string file_path = ""
 The path to the file associated with this document. More...
 
std::string document_context = ""
 The context of this document. Will generally be a project or tag folder. More...
 
int mdi_default_width = 700
 The default starting width of the document's MDI window. More...
 
int mdi_default_height = 700
 The default starting height of the document's MDI window. More...
 

Detailed Description

Class representing a File document.

Constructor & Destructor Documentation

◆ BlamEditorDocument_File() [1/2]

BlamEditorDocument_File::BlamEditorDocument_File ( BlamEditorWindow _window,
std::string  _file_path 
)
+ Here is the call graph for this function:

◆ BlamEditorDocument_File() [2/2]

BlamEditorDocument_File::BlamEditorDocument_File ( std::string  _file_path)
+ Here is the call graph for this function:

Member Function Documentation

◆ Close()

bool BlamEditorDocument_File::Close ( )
overridevirtual

Closes the document and releases any resources being used by it.

Returns
true if the document was closed, false if the close was cancelled.

Reimplemented from BlamEditorDocument.

+ Here is the call graph for this function:

◆ Save()

void BlamEditorDocument_File::Save ( )
overridevirtual

Attempts to save the document, replacing the original file.

Reimplemented from BlamEditorDocument.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAs()

void BlamEditorDocument_File::SaveAs ( )
overridevirtual

Attempts to save the document, prompting the user to save as a new file.

Reimplemented from BlamEditorDocument.

+ Here is the call graph for this function:

Member Data Documentation

◆ binary_address

void* BlamEditorDocument_File::binary_address = nullptr

◆ binary_size

int64_t BlamEditorDocument_File::binary_size = 0

◆ is_binary

bool BlamEditorDocument_File::is_binary = false

◆ is_new

bool BlamEditorDocument_File::is_new = false

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