- Created IProjectManager interface - ProjectManager now implements IProjectManager - Removed ProjectManager::Get() singleton - Added IEditorContext::GetProjectManager() - ProjectPanel now uses m_context->GetProjectManager() instead of singleton - EditorContext owns ProjectManager instance
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
#include "Core/AssetItem.h"
|
|
|
|
namespace XCEngine {
|
|
namespace Editor {
|
|
|
|
class IProjectManager {
|
|
public:
|
|
virtual ~IProjectManager() = default;
|
|
|
|
virtual std::vector<AssetItemPtr>& GetCurrentItems() = 0;
|
|
virtual int GetSelectedIndex() const = 0;
|
|
virtual void SetSelectedIndex(int index) = 0;
|
|
|
|
virtual void NavigateToFolder(const AssetItemPtr& folder) = 0;
|
|
virtual void NavigateBack() = 0;
|
|
virtual void NavigateToIndex(size_t index) = 0;
|
|
virtual bool CanNavigateBack() const = 0;
|
|
|
|
virtual std::string GetCurrentPath() const = 0;
|
|
virtual size_t GetPathDepth() const = 0;
|
|
virtual std::string GetPathName(size_t index) const = 0;
|
|
|
|
virtual void Initialize(const std::string& projectPath) = 0;
|
|
virtual void RefreshCurrentFolder() = 0;
|
|
|
|
virtual void CreateFolder(const std::string& name) = 0;
|
|
virtual void DeleteItem(int index) = 0;
|
|
virtual bool MoveItem(const std::string& sourceFullPath, const std::string& destFolderFullPath) = 0;
|
|
|
|
virtual const std::string& GetProjectPath() const = 0;
|
|
};
|
|
|
|
} // namespace Editor
|
|
} // namespace XCEngine
|