Skip to content

Commit 9ecaeee

Browse files
feat(CSSLayout) - fix enums to compile
1 parent 720890d commit 9ecaeee

14 files changed

+56
-37
lines changed

ReactWindows/CSSLayout/CssLayoutEngine/CSSAlign.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSAlign
66
{
7-
AUTO,
8-
FLEX_START,
9-
CENTER,
10-
FLEX_END,
11-
STRETCH
7+
Auto,
8+
FlexStart,
9+
Center,
10+
FlexEnd,
11+
Stretch
1212
};
1313
}

ReactWindows/CSSLayout/CssLayoutEngine/CSSDirection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSDirection
66
{
7-
INHERIT,
7+
Inherit,
88
LTR,
99
RTL,
1010
};

ReactWindows/CSSLayout/CssLayoutEngine/CSSFlexDirection.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSFlexDirection
66
{
7-
COLUMN,
8-
COLUMN_REVERSE,
9-
ROW,
10-
ROW_REVERSE
7+
Column,
8+
ColumnReverse,
9+
Row,
10+
RowReverse
1111
};
1212
}

ReactWindows/CSSLayout/CssLayoutEngine/CSSJustify.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSJustify
66
{
7-
FLEX_START,
8-
CENTER,
9-
FLEX_END,
10-
SPACE_BETWEEN,
11-
SPACE_AROUND,
7+
FlexStart,
8+
Center,
9+
FlexEnd,
10+
SpaceBetween,
11+
SpaceAround,
1212
};
1313
}

ReactWindows/CSSLayout/CssLayoutEngine/CSSMeasureMode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSMeasureMode
66
{
7-
UNDEFINED,
8-
EXACTLY,
9-
AT_MOST,
7+
Undefined,
8+
Exactly,
9+
AtMost,
1010
};
1111
}

ReactWindows/CSSLayout/CssLayoutEngine/CSSOverflow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSOverflow
66
{
7-
VISIBLE,
8-
HIDDEN,
7+
Visible,
8+
Hidden,
99
};
1010
}

ReactWindows/CSSLayout/CssLayoutEngine/CSSPositionType.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSPositionType
66
{
7-
RELATIVE,
8-
ABSOLUTE,
7+
Relative,
8+
Absolute,
99
};
1010
}

ReactWindows/CSSLayout/CssLayoutEngine/CSSWrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace CssLayoutEngine
44
{
55
public enum class CSSWrap
66
{
7-
NOWRAP,
8-
WRAP,
7+
NoWrap,
8+
Wrap,
99
};
1010
}

ReactWindows/CSSLayout/CssLayoutEngine/CssLayoutEngine.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,19 @@
212212
<ClInclude Include="CSSDirection.h" />
213213
<ClInclude Include="CSSFlexDirection.h" />
214214
<ClInclude Include="CSSJustify.h" />
215+
<ClInclude Include="CSSLayoutContext.h" />
215216
<ClInclude Include="CSSMeasureMode.h" />
216217
<ClInclude Include="CSSOverflow.h" />
217218
<ClInclude Include="CSSPositionType.h" />
218219
<ClInclude Include="CSSWrap.h" />
220+
<ClInclude Include="LayoutEngine.h" />
221+
<ClInclude Include="MeasureOutput.h" />
219222
<ClInclude Include="pch.h" />
220223
<ClInclude Include="SpacingType.h" />
221224
</ItemGroup>
222225
<ItemGroup>
223226
<ClCompile Include="CSSConstants.cpp" />
227+
<ClCompile Include="LayoutEngine.cpp" />
224228
<ClCompile Include="pch.cpp">
225229
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
226230
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>

ReactWindows/CSSLayout/CssLayoutEngine/CssLayoutEngine.vcxproj.filters

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<ItemGroup>
1010
<ClCompile Include="pch.cpp" />
1111
<ClCompile Include="CSSConstants.cpp" />
12+
<ClCompile Include="LayoutEngine.cpp" />
1213
</ItemGroup>
1314
<ItemGroup>
1415
<ClInclude Include="pch.h" />
@@ -23,5 +24,8 @@
2324
<ClInclude Include="CSSFlexDirection.h" />
2425
<ClInclude Include="CSSMeasureMode.h" />
2526
<ClInclude Include="CSSCachedMeasurement.h" />
27+
<ClInclude Include="CSSLayoutContext.h" />
28+
<ClInclude Include="MeasureOutput.h" />
29+
<ClInclude Include="LayoutEngine.h" />
2630
</ItemGroup>
2731
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "pch.h"
2+
#include "LayoutEngine.h"
3+
4+
#include "CSSFlexDirection.h"
5+
#include "CSSPositionType.h"
6+
7+
using namespace CssLayoutEngine;
8+
9+
int CSS_FLEX_DIRECTION_COLUMN = (int)CSSFlexDirection::Column;
10+
int CSS_FLEX_DIRECTION_COLUMN_REVERSE = (int)CSSFlexDirection::ColumnReverse;
11+
int CSS_FLEX_DIRECTION_ROW = (int)CSSFlexDirection::Row;
12+
int CSS_FLEX_DIRECTION_ROW_REVERSE = (int)CSSFlexDirection::RowReverse;
13+
14+
int CSS_POSITION_RELATIVE = (int)CSSPositionType::Relative;
15+
int CSS_POSITION_ABSOLUTE = (int)CSSPositionType::Absolute;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
3+
namespace CssLayoutEngine
4+
{
5+
public ref class LayoutEngine sealed
6+
{
7+
8+
};
9+
}

ReactWindows/ReactNative/CssLayout/Native.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

ReactWindows/ReactNative/ReactNative.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
<Compile Include="Collections\HeapBasedPriorityQueue.cs" />
172172
<Compile Include="Collections\ListExtensions.cs" />
173173
<Compile Include="Common\WindowsPlatformHelper.cs" />
174-
<Compile Include="CssLayout\Native.cs" />
175174
<Compile Include="DevSupport\DebugServerException.cs" />
176175
<Compile Include="DevSupport\DevInternalSettings.cs" />
177176
<Compile Include="DevSupport\DevOptionDialog.xaml.cs">

0 commit comments

Comments
 (0)