/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/EnginePlugins/RmlUiPlugin/RmlUiSingleton.h
60 строк
2 KB
C-Core
RmlUI debugger and gradient support (#1984)
11 июл 2026, 11:43
Не верифицирован
11 июл 2026, 11:43
aecf32f
Код
Авторство
О чём код?
#pragma once #include <RmlUiPlugin/RmlUiPluginDLL.h> #include <Core/ResourceManager/ResourceHandle.h> #include <Foundation/Configuration/Singleton.h> #include <Foundation/Types/UniquePtr.h> #include <RendererFoundation/RendererFoundationDLL.h> class ezRmlUiContext; struct ezMsgExtractRenderData; using ezRmlUiResourceHandle = ezTypedResourceHandle<class ezRmlUiResource>; /// \brief The RML configuration to be used on a specific platform struct EZ_RMLUIPLUGIN_DLL ezRmlUiConfiguration { ezDynamicArray<ezString> m_Fonts; static constexpr const ezStringView s_sConfigFile = ":project/RuntimeConfigs/RmlUiConfig.ddl"_ezsv; ezResult Save(ezStringView sFile = s_sConfigFile) const; ezResult Load(ezStringView sFile = s_sConfigFile); bool operator==(const ezRmlUiConfiguration& rhs) const; bool operator!=(const ezRmlUiConfiguration& rhs) const { return !operator==(rhs); } }; class EZ_RMLUIPLUGIN_DLL ezRmlUi { EZ_DECLARE_SINGLETON(ezRmlUi); public: ezRmlUi(); ~ezRmlUi(); ezRmlUiContext* CreateContext(const char* szName, const ezVec2U32& vInitialSize); void DeleteContext(ezRmlUiContext* pContext); bool AnyContextWantsInput(); ezResult LoadDocumentFromResource(ezRmlUiContext& ref_context, const ezRmlUiResourceHandle& hResource); ezResult LoadDocumentFromString(ezRmlUiContext& ref_context, const ezStringView& sContent); void UnloadDocument(ezRmlUiContext& ref_context); void ClearCaches(); void ExtractContext(ezRmlUiContext& ref_context, ezGALTextureHandle hTexture); ezMutex& GetContextMutex(); #if EZ_ENABLED(EZ_COMPILE_FOR_DEVELOPMENT) void DebugContext(ezRmlUiContext* pContext); #endif private: struct Data; ezUniquePtr<Data> m_pData; };