Skip to content

Commit 13b7143

Browse files
committed
Store input handling enable flag as a bool.
1 parent d7d7ba7 commit 13b7143

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

Diff for: Sources/NodeUIEngine/NUIE_NativeNodeEditorControl.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace NUIE
44
{
55

66
NativeNodeEditorControl::NativeNodeEditorControl () :
7-
inputHandling (InputHandling::Enabled)
7+
inputHandlingEnabled (true)
88
{
99

1010
}
@@ -16,12 +16,12 @@ NativeNodeEditorControl::~NativeNodeEditorControl ()
1616

1717
bool NativeNodeEditorControl::IsInputHandlingEnabled () const
1818
{
19-
return inputHandling == InputHandling::Enabled;
19+
return inputHandlingEnabled;
2020
}
2121

22-
void NativeNodeEditorControl::SetInputHandling (InputHandling newInputHandling)
22+
void NativeNodeEditorControl::EnableInputHandling (bool enabled)
2323
{
24-
inputHandling = newInputHandling;
24+
inputHandlingEnabled = enabled;
2525
}
2626

2727
}

Diff for: Sources/NodeUIEngine/NUIE_NativeNodeEditorControl.hpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@ namespace NUIE
99
class NativeNodeEditorControl
1010
{
1111
public:
12-
enum class InputHandling
13-
{
14-
Enabled,
15-
Disabled
16-
};
17-
1812
NativeNodeEditorControl ();
1913
virtual ~NativeNodeEditorControl ();
2014

2115
bool IsInputHandlingEnabled () const;
22-
virtual void SetInputHandling (InputHandling newInputHandling);
16+
virtual void EnableInputHandling (bool enabled);
2317

2418
virtual bool Init (NodeEditor* nodeEditorPtr, void* nativeParentHandle, int x, int y, int width, int height) = 0;
2519
virtual void* GetEditorNativeHandle () const = 0;
@@ -32,7 +26,7 @@ class NativeNodeEditorControl
3226
virtual DrawingContext& GetDrawingContext () = 0;
3327

3428
private:
35-
InputHandling inputHandling;
29+
bool inputHandlingEnabled;
3630
};
3731

3832
using NativeNodeEditorControlPtr = std::shared_ptr<NativeNodeEditorControl>;

Diff for: Sources/WindowsAppSupport/WAS_NodeEditorNodeTreeHwndControl.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ NodeEditorNodeTreeHwndControl::~NodeEditorNodeTreeHwndControl ()
112112

113113
}
114114

115-
void NodeEditorNodeTreeHwndControl::SetInputHandling (InputHandling newInputHandling)
115+
void NodeEditorNodeTreeHwndControl::EnableInputHandling (bool enabled)
116116
{
117-
NativeNodeEditorControl::SetInputHandling (newInputHandling);
118-
nodeEditorControl.SetInputHandling (newInputHandling);
117+
NativeNodeEditorControl::EnableInputHandling (enabled);
118+
nodeEditorControl.EnableInputHandling (enabled);
119119
}
120120

121121
bool NodeEditorNodeTreeHwndControl::Init (NUIE::NodeEditor* nodeEditorPtr, void* nativeParentHandle, int x, int y, int width, int height)

Diff for: Sources/WindowsAppSupport/WAS_NodeEditorNodeTreeHwndControl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class NodeEditorNodeTreeHwndControl : public NUIE::NativeNodeEditorControl
3636
NodeEditorNodeTreeHwndControl (const Settings& settings, const NUIE::NativeDrawingContextPtr& nativeContext);
3737
virtual ~NodeEditorNodeTreeHwndControl ();
3838

39-
virtual void SetInputHandling (InputHandling newInputHandling) override;
39+
virtual void EnableInputHandling (bool enabled) override;
4040

4141
virtual bool Init (NUIE::NodeEditor* nodeEditorPtr, void* nativeParentHandle, int x, int y, int width, int height) override;
4242
virtual void* GetEditorNativeHandle () const override;

0 commit comments

Comments
 (0)