Elaztek Developer Hub
Blamite Game Engine - Keystone  00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamEditorWorkspace.h
Go to the documentation of this file.
1 #pragma once
2 
5 
7 {
9  bool docked = false;
10  Qt::DockWidgetArea dock_position = Qt::DockWidgetArea::LeftDockWidgetArea;
11  int width = 0;
12  int height = 0;
13 
14  int pos_x = 0;
15  int pos_y = 0;
16 };
17 
19 {
21  std::string path = "";
22  std::string context = "";
23 };
24 
31 {
32 private:
33  std::vector<BlamEditorWorkspace_WindowInfo> open_tool_windows = std::vector<BlamEditorWorkspace_WindowInfo>();
34  std::vector<BlamEditorWorkspace_DocumentInfo> open_documents = std::vector<BlamEditorWorkspace_DocumentInfo>();
35 
36 public:
37  std::string workspace_name = "Default";
38 
39  void ApplyWorkspace();
41 
42  void SaveToDisk();
43  bool LoadFromDisk(std::string file_path);
44 };
45 
47 {
50  KEYSTONE Qt::DockWidgetArea ConvertStringToDockWidgetArea(std::string value);
51 
54  KEYSTONE std::string ConvertDockWidgetAreaToString(Qt::DockWidgetArea dock_position);
55 }
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:37
BlamEditorDocument::GetDocumentType
BlamEditorDocumentType GetDocumentType()
Retrieves the type of this document.
Definition: BlamEditorDocument.cpp:17
BlamEditorWorkspace_WindowInfo
Definition: BlamEditorWorkspace.h:6
editor_data.h
BlamKeystone::EditorData::Workspace::ConvertDocumentTypeToString
KEYSTONE std::string ConvertDocumentTypeToString(BlamEditorDocumentType document_type)
Definition: workspace.cpp:73
BlamEditorDocument::file_path
std::string file_path
The path to the file associated with this document.
Definition: BlamEditorDocument.h:58
BlamEditorWorkspace::ApplyWorkspace
void ApplyWorkspace()
Definition: BlamEditorWorkspace.cpp:16
BlamEditorToolWindowType::Unspecified
@ Unspecified
BlamKeystone::EditorData::Workspace::ConvertStringToDockWidgetArea
KEYSTONE Qt::DockWidgetArea ConvertStringToDockWidgetArea(std::string value)
Definition: workspace.cpp:49
BlamEditorToolWindow.h
BlamEditorToolWindow::GetToolWindowType
BlamEditorToolWindowType GetToolWindowType()
Retrieves the type of tool window that this tool window represents.
Definition: BlamEditorToolWindow.cpp:24
BlamEditorWindow::open_documents
std::vector< BlamEditorDocument * > open_documents
The list of open documents.
Definition: BlamEditorWindow.h:65
BlamEditorWorkspace::LoadFromDisk
bool LoadFromDisk(std::string file_path)
Definition: BlamEditorWorkspace.cpp:181
BlamEditorDocumentType
BlamEditorDocumentType
Enumerator containing all possible editor document types.
Definition: BlamEditorDocument.h:23
BlamEditorWorkspace_WindowInfo::dock_position
Qt::DockWidgetArea dock_position
Definition: BlamEditorWorkspace.h:10
BlamEditorWorkspace_WindowInfo::width
int width
Definition: BlamEditorWorkspace.h:11
path
This folder contains built in editor themes You probably shouldn t touch these You we won t stop you but if you are looking to customize how your editor we encourage you to instead add a new user theme instead User themes are found in the following path
Definition: readme.txt:5
BlamEditorDocument.h
BlamKeystone::EditorData::Workspace
Definition: BlamEditorWorkspace.h:46
BlamKeystone::EditorData::Workspace::ConvertStringToToolWindowType
KEYSTONE BlamEditorToolWindowType ConvertStringToToolWindowType(std::string value)
Definition: workspace.cpp:21
BlamKeystone::EditorData::Workspace::ConvertToolWindowTypeToString
KEYSTONE std::string ConvertToolWindowTypeToString(BlamEditorToolWindowType window_type)
Definition: workspace.cpp:91
BlamEditorWorkspace::SaveToDisk
void SaveToDisk()
Definition: BlamEditorWorkspace.cpp:114
BlamEditorWindow.h
BlamEditorToolWindowType
BlamEditorToolWindowType
Enumerator containing all possible editor tool window types.
Definition: BlamEditorToolWindow.h:21
BlamEditorWorkspace::workspace_name
std::string workspace_name
Definition: BlamEditorWorkspace.h:37
BlamEditorWorkspace
Definition: BlamEditorWorkspace.h:30
BlamEditorWorkspace_DocumentInfo::type
BlamEditorDocumentType type
Definition: BlamEditorWorkspace.h:20
BlamEditorWorkspace::StoreWorkspaceFromWindow
void StoreWorkspaceFromWindow()
Definition: BlamEditorWorkspace.cpp:73
BlamKeystone::EditorData::Workspace::ConvertStringToDocumentType
KEYSTONE BlamEditorDocumentType ConvertStringToDocumentType(std::string value)
Definition: workspace.cpp:5
BlamEditorWorkspace_DocumentInfo
Definition: BlamEditorWorkspace.h:18
BlamEditorWorkspace_WindowInfo::pos_y
int pos_y
Definition: BlamEditorWorkspace.h:15
BlamKeystone::EditorData::GetMainEditorWindow
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:32
BlamEditorWindow::OpenToolWindow
bool OpenToolWindow(BlamEditorToolWindowType tool_type, Qt::DockWidgetArea position)
Opens the specified tool window within the main window.
Definition: BlamEditorWindow.cpp:235
BlamEditorToolWindow::GetDockWidgetArea
Qt::DockWidgetArea GetDockWidgetArea()
Definition: BlamEditorToolWindow.cpp:113
BlamEditorDocument::document_context
std::string document_context
The context of this document. Will generally be a project or tag folder.
Definition: BlamEditorDocument.h:59
BlamEditorWindow::open_tool_windows
std::vector< BlamEditorToolWindow * > open_tool_windows
The list of open tool windows.
Definition: BlamEditorWindow.h:64
BlamEditorDocument
Interface class that any types of editor documents inherit from.
Definition: BlamEditorDocument.h:37
BlamEditorWindow::CloseAllDocuments
void CloseAllDocuments()
Closes all open documents.
Definition: BlamEditorWindow.cpp:216
BlamEditorWorkspace_WindowInfo::docked
bool docked
Definition: BlamEditorWorkspace.h:9
BlamEditorWorkspace_DocumentInfo::path
std::string path
Definition: BlamEditorWorkspace.h:21
BlamEditorWorkspace_DocumentInfo::context
std::string context
Definition: BlamEditorWorkspace.h:22
BlamKeystone::EditorData::Workspace::ConvertDockWidgetAreaToString
KEYSTONE std::string ConvertDockWidgetAreaToString(Qt::DockWidgetArea dock_position)
Definition: workspace.cpp:121
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:48
BlamEditorDocumentType::Unspecified
@ Unspecified
Indicates the document type is unspecified or invalid.
BlamEditorWindow::CloseAllToolWindows
void CloseAllToolWindows()
Closes all tool windows.
Definition: BlamEditorWindow.cpp:294
BlamEditorWorkspace_WindowInfo::window_type
BlamEditorToolWindowType window_type
Definition: BlamEditorWorkspace.h:8
BlamEditorWorkspace.h
BlamEditorWorkspace_WindowInfo::height
int height
Definition: BlamEditorWorkspace.h:12
BlamEditorWindow::OpenDocument
bool OpenDocument(std::string file_path, BlamTagTreeNode *tree_node, BlamEditorDocumentType doctype)
Attempts to open the specified document in the main window.
Definition: BlamEditorWindow.cpp:99
BlamEditorWindow::GetToolWindow
BlamEditorToolWindow * GetToolWindow(BlamEditorToolWindowType tool_type)
Definition: BlamEditorWindow.cpp:330
KEYSTONE
#define KEYSTONE
Definition: keystone_api.h:20
BlamEditorWorkspace_WindowInfo::pos_x
int pos_x
Definition: BlamEditorWorkspace.h:14