# HG changeset patch # User bgo-osimis # Date 1551072921 -3600 # Node ID 329f229c27946a5ba04c7b922576d7dd7b5980ed # Parent baa9e1e932db345cd84ed62415f71a9782c46f34 Improvements to the integrated demo for TS <--> C++ diff -r baa9e1e932db -r 329f229c2794 Resources/CodeGeneration/testWasmIntegrated/build-web.sh --- a/Resources/CodeGeneration/testWasmIntegrated/build-web.sh Sun Feb 24 20:22:56 2019 +0100 +++ b/Resources/CodeGeneration/testWasmIntegrated/build-web.sh Mon Feb 25 06:35:21 2019 +0100 @@ -22,5 +22,8 @@ # copy WASM binary to output dir cp build-wasm/testWasmIntegratedCpp.wasm build-final/ +echo "...Serving files at http://127.0.0.1:8080/" +echo "Please open build_final/testWasmIntegrated.html" + sudo python3 serve.py diff -r baa9e1e932db -r 329f229c2794 Resources/CodeGeneration/testWasmIntegrated/main.cpp --- a/Resources/CodeGeneration/testWasmIntegrated/main.cpp Sun Feb 24 20:22:56 2019 +0100 +++ b/Resources/CodeGeneration/testWasmIntegrated/main.cpp Mon Feb 25 06:35:21 2019 +0100 @@ -15,7 +15,7 @@ #define HANDLE_MESSAGE(Type,value) \ stringstream ss; \ - ss << "Received an instance of" #Type ". Here's the dump:\n"; \ + ss << "Received an instance of:\n" #Type "\n. Here's the dump:\n"; \ testWasmIntegratedCpp::StoneDumpValue(ss, value, 0); \ SendFreeTextFromCppJS(ss.str().c_str()); \ return true; diff -r baa9e1e932db -r 329f229c2794 Resources/CodeGeneration/testWasmIntegrated/styles.css --- a/Resources/CodeGeneration/testWasmIntegrated/styles.css Sun Feb 24 20:22:56 2019 +0100 +++ b/Resources/CodeGeneration/testWasmIntegrated/styles.css Mon Feb 25 06:35:21 2019 +0100 @@ -3,8 +3,8 @@ grid-template-columns: 0.55fr 0.55fr 0.55fr 0.55fr 0.6fr 1.1fr 1.1fr; grid-template-rows: 1.1fr 0.9fr 0.2fr 0.3fr 0.1fr 0.3fr 0.1fr; grid-template-areas: - "SerializedInput SerializedInput SerializedInput SerializedInput Trigger CppOutput CppOutput" - "SerializedInput SerializedInput SerializedInput SerializedInput Trigger CppOutput CppOutput" + "SerializedInput SerializedInput SerializedInput SerializedInput ButtonContainer CppOutput CppOutput" + "SerializedInput SerializedInput SerializedInput SerializedInput ButtonContainer CppOutput CppOutput" ". . . . . . ." "Test1 Test2 Test3 Test4 . . ." ". . . . . . ." @@ -15,15 +15,33 @@ height: 480px; } + .TestWasm-ButtonContainer { + display: grid; + grid-template-columns: 0.2fr 0.8fr 0.2fr; + grid-template-rows: 0.2fr 0.5fr 0.2fr 0.5fr 0.2fr 0.5fr 0.2fr; + grid-template-areas: + ". . ." + ". TriggerButton ." + ". . ." + ". ClearButton ." + ". . ." + ". ShowSchemaButton ." + ". . ." + ; + } + + .TestWasm-TriggerButton { grid-area: TriggerButton; } + + .TestWasm-ClearButton { grid-area: ClearButton; } + + .TestWasm-ShowSchemaButton { grid-area: ShowSchemaButton; } + + .TestWasm-SerializedInput { grid-area: SerializedInput; } .TestWasm-CppOutput { grid-area: CppOutput; } -.TestWasm-Trigger { - grid-area: Trigger; - align-items: center; - text-align: center; -} +.TestWasm-ButtonContainer { grid-area: ButtonContainer; } .TestWasm-Test1 { grid-area: Test1; } diff -r baa9e1e932db -r 329f229c2794 Resources/CodeGeneration/testWasmIntegrated/testWasmIntegrated.html --- a/Resources/CodeGeneration/testWasmIntegrated/testWasmIntegrated.html Sun Feb 24 20:22:56 2019 +0100 +++ b/Resources/CodeGeneration/testWasmIntegrated/testWasmIntegrated.html Mon Feb 25 06:35:21 2019 +0100 @@ -13,15 +13,23 @@ -->