Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiEditor::EditorApplication Class Reference

Main editor application singleton (facade). More...

#include <EditorApplication.h>

Public Member Functions

const std::string & GetProjectPath () const
 Get project root directory path.
const std::string & GetAssetsPath () const
 Get assets directory path.
const std::string & GetCachePath () const
 Get cache directory path.
bool HasProject () const
 Check if a project is currently open.
float GetDeltaTime () const
 Get delta time since last frame.
DekiObjectGetActiveObject () const
 Get currently selected object.
SceneGetActiveScene () const
 Get currently active scene.
void SetProjectPaths (const std::string &projectPath, const std::string &assetsPath, const std::string &cachePath)
 Set project paths (called when project is opened).
void ClearProjectPaths ()
 Clear project paths (called when project is closed).
void SetActiveObject (DekiObject *obj)
 Set active object (called when selection changes).
void SetActiveScene (Scene *scene)
 Set active scene (called when scene changes).
void SetDeltaTime (float dt)
 Set delta time (called each frame).
void RequestAssetRefresh ()
bool PopAssetRefreshRequest ()
void RequestAssetInvalidation ()
bool PopAssetInvalidationRequest ()
void RequestOpenTool (const std::string &filePath, const std::string &cachePath)
bool PopOpenToolRequest (std::string &outFilePath, std::string &outCachePath)
void RequestSceneTool (SceneEditTool tool)
bool PopSceneToolRequest (SceneEditTool &outTool)

Static Public Member Functions

static EditorApplication & Get ()
 Get singleton instance.

Detailed Description

Main editor application singleton (facade).

Provides Unity-like static access for EditorWindow and CustomEditor implementations: auto& app = EditorApplication::Get(); const char* projectPath = app.GetProjectPath(); DekiObject* selected = app.GetActiveObject();

The main editor (EditorApp) populates this facade via SetProjectPaths() and SetActiveObject(). Engine editors only need to call the getters.

Member Function Documentation

◆ Get()

EditorApplication & DekiEditor::EditorApplication::Get ( )
static

Get singleton instance.

◆ GetProjectPath()

const std::string & DekiEditor::EditorApplication::GetProjectPath ( ) const
inline

Get project root directory path.

Returns
Path string, or empty if no project is open

◆ GetAssetsPath()

const std::string & DekiEditor::EditorApplication::GetAssetsPath ( ) const
inline

Get assets directory path.

Returns
Path string, or empty if no project is open

◆ GetCachePath()

const std::string & DekiEditor::EditorApplication::GetCachePath ( ) const
inline

Get cache directory path.

Returns
Path string, or empty if no project is open

◆ HasProject()

bool DekiEditor::EditorApplication::HasProject ( ) const
inline

Check if a project is currently open.

◆ GetDeltaTime()

float DekiEditor::EditorApplication::GetDeltaTime ( ) const
inline

Get delta time since last frame.

◆ GetActiveObject()

DekiObject * DekiEditor::EditorApplication::GetActiveObject ( ) const
inline

Get currently selected object.

Returns
Selected object or nullptr

◆ GetActiveScene()

Scene * DekiEditor::EditorApplication::GetActiveScene ( ) const
inline

Get currently active scene.

Returns
Active scene or nullptr

◆ SetProjectPaths()

void DekiEditor::EditorApplication::SetProjectPaths ( const std::string & projectPath,
const std::string & assetsPath,
const std::string & cachePath )

Set project paths (called when project is opened).

◆ ClearProjectPaths()

void DekiEditor::EditorApplication::ClearProjectPaths ( )

Clear project paths (called when project is closed).

◆ SetActiveObject()

void DekiEditor::EditorApplication::SetActiveObject ( DekiObject * obj)
inline

Set active object (called when selection changes).

◆ SetActiveScene()

void DekiEditor::EditorApplication::SetActiveScene ( Scene * scene)
inline

Set active scene (called when scene changes).

◆ SetDeltaTime()

void DekiEditor::EditorApplication::SetDeltaTime ( float dt)
inline

Set delta time (called each frame).

◆ RequestAssetRefresh()

void DekiEditor::EditorApplication::RequestAssetRefresh ( )
inline

◆ PopAssetRefreshRequest()

bool DekiEditor::EditorApplication::PopAssetRefreshRequest ( )
inline

◆ RequestAssetInvalidation()

void DekiEditor::EditorApplication::RequestAssetInvalidation ( )
inline

◆ PopAssetInvalidationRequest()

bool DekiEditor::EditorApplication::PopAssetInvalidationRequest ( )
inline

◆ RequestOpenTool()

void DekiEditor::EditorApplication::RequestOpenTool ( const std::string & filePath,
const std::string & cachePath )
inline

◆ PopOpenToolRequest()

bool DekiEditor::EditorApplication::PopOpenToolRequest ( std::string & outFilePath,
std::string & outCachePath )
inline

◆ RequestSceneTool()

void DekiEditor::EditorApplication::RequestSceneTool ( SceneEditTool tool)
inline

◆ PopSceneToolRequest()

bool DekiEditor::EditorApplication::PopSceneToolRequest ( SceneEditTool & outTool)
inline

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