Plasma Engine  2.0
Loading...
Searching...
No Matches
RmlUiSingleton.h
1#pragma once
2
3#include <RmlUiPlugin/RmlUiPluginDLL.h>
4
5#include <Foundation/Configuration/Singleton.h>
6#include <Foundation/Types/UniquePtr.h>
7
10
12struct PL_RMLUIPLUGIN_DLL plRmlUiConfiguration
13{
15
16 static constexpr const plStringView s_sConfigFile = ":project/RuntimeConfigs/RmlUiConfig.ddl"_plsv;
17
18 plResult Save(plStringView sFile = s_sConfigFile) const;
19 plResult Load(plStringView sFile = s_sConfigFile);
20
21 bool operator==(const plRmlUiConfiguration& rhs) const;
22 bool operator!=(const plRmlUiConfiguration& rhs) const { return !operator==(rhs); }
23};
24
25class PL_RMLUIPLUGIN_DLL plRmlUi
26{
27 PL_DECLARE_SINGLETON(plRmlUi);
28
29public:
30 plRmlUi();
31 ~plRmlUi();
32
33 plRmlUiContext* CreateContext(const char* szName, const plVec2U32& vInitialSize);
34 void DeleteContext(plRmlUiContext* pContext);
35
36 bool AnyContextWantsInput();
37
38 void ExtractContext(plRmlUiContext& ref_context, plMsgExtractRenderData& ref_msg);
39
40private:
41 struct Data;
42 plUniquePtr<Data> m_pData;
43};
Definition DynamicArray.h:81
Definition RmlUiContext.h:19
Definition RmlUiSingleton.h:26
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
Definition RenderData.h:116
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The RML configuration to be used on a specific platform.
Definition RmlUiSingleton.h:13