OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
UILockWrapper.h
Go to the documentation of this file.
1#pragma once
2#pragma once
3#include "OTGui/GuiTypes.h"
5
6class __declspec(dllexport) UILockWrapper
7{
8public:
9 UILockWrapper(ot::components::UiComponent* _uiComponent,ot::LockTypeFlag _flag)
10 :m_lockFlag(_flag), m_uiComponent(_uiComponent)
11 {
12 if (m_uiComponent)
13 {
14 m_uiComponent->lockUI(m_lockFlag);
15 }
16 }
17 ~UILockWrapper()
18 {
19 if (m_uiComponent)
20 {
21 m_uiComponent->unlockUI(m_lockFlag);
22 }
23 }
24private:
25 ot::LockTypeFlag m_lockFlag;
26 ot::components::UiComponent* m_uiComponent = nullptr;
27};
28
Definition UiComponent.h:31
LockTypeFlag
Describes the object type to lock in the UI.
Definition GuiTypes.h:156