From ebd7446d8a8ddcb241e4279cbbddd0e810802ff7 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Tue, 4 Sep 2007 20:04:43 +0000 Subject: [PATCH] Fixed Altas/wxJS for Windows. This was SVN commit r5328. --- binaries/data/tools/atlas/scripts/section/terrain.js | 5 ++++- source/tools/atlas/wxJS/common/wxjs.h | 4 ++++ source/tools/atlas/wxJS/ext/ext_main.cpp | 4 ++-- source/tools/atlas/wxJS/ext/wxjs_ext.h | 3 +++ source/tools/atlas/wxJS/gui/gui_main.cpp | 3 ++- source/tools/atlas/wxJS/io/io_main.cpp | 3 ++- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/binaries/data/tools/atlas/scripts/section/terrain.js b/binaries/data/tools/atlas/scripts/section/terrain.js index 4b93c00fd2..b66f7c3aa9 100644 --- a/binaries/data/tools/atlas/scripts/section/terrain.js +++ b/binaries/data/tools/atlas/scripts/section/terrain.js @@ -81,9 +81,10 @@ TerrainPreviewPage.prototype = { this.panel.sizer = new wxBoxSizer(wxOrientation.VERTICAL); var scrolled = new wxScrolledWindow(this.panel, -1, wxDefaultPosition, wxDefaultSize, wxWindow.VSCROLL); scrolled.setScrollRate(0, 10); + scrolled.backgroundColour = new wxColour(255, 255, 255); this.panel.sizer.add(scrolled, 1, wxStretch.EXPAND); - var itemSizer = new wxGridSizer(6, 8, 0); + var itemSizer = new wxGridSizer(6, 4, 0); scrolled.sizer = itemSizer; // Adjust the number of columns to fit in the available area @@ -112,6 +113,8 @@ TerrainPreviewPage.prototype = { itemSizer.add(imgSizer, 0, wxAlignment.CENTRE | wxStretch.EXPAND); } + this.panel.layout(); + this.loaded = true; } }; diff --git a/source/tools/atlas/wxJS/common/wxjs.h b/source/tools/atlas/wxJS/common/wxjs.h index ccba5ccb62..67016f83d5 100644 --- a/source/tools/atlas/wxJS/common/wxjs.h +++ b/source/tools/atlas/wxJS/common/wxjs.h @@ -26,11 +26,15 @@ #define WXJS_H_ #include +/* #ifdef WXJSDLL_BUILD #define WXJSAPI WXEXPORT #else #define WXJSAPI WXIMPORT #endif +*/ +#define WXJSAPI + extern "C" WXJSAPI bool wxJS_InitClass(JSContext *cx, JSObject *global); extern "C" WXJSAPI bool wxJS_InitObject(JSContext *cx, JSObject *obj); extern "C" WXJSAPI void wxJS_Destroy(); diff --git a/source/tools/atlas/wxJS/ext/ext_main.cpp b/source/tools/atlas/wxJS/ext/ext_main.cpp index 63c9c76e17..8c54891da7 100644 --- a/source/tools/atlas/wxJS/ext/ext_main.cpp +++ b/source/tools/atlas/wxJS/ext/ext_main.cpp @@ -37,7 +37,7 @@ using namespace wxjs; using namespace wxjs::ext; - +/* #ifdef __WXMSW__ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { @@ -55,7 +55,7 @@ using namespace wxjs::ext; return result; } #endif - +*/ WXJSAPI bool wxjs::ext::InitClass(JSContext *cx, JSObject *global) { MemoryBuffer::JSInit(cx, global); diff --git a/source/tools/atlas/wxJS/ext/wxjs_ext.h b/source/tools/atlas/wxJS/ext/wxjs_ext.h index 225ab79b5e..217c1e3b23 100644 --- a/source/tools/atlas/wxJS/ext/wxjs_ext.h +++ b/source/tools/atlas/wxJS/ext/wxjs_ext.h @@ -29,11 +29,14 @@ #include +/* #ifdef WXJSDLL_BUILD #define WXJSAPI WXEXPORT #else #define WXJSAPI WXIMPORT #endif +*/ +#define WXJSAPI class wxPoint; diff --git a/source/tools/atlas/wxJS/gui/gui_main.cpp b/source/tools/atlas/wxJS/gui/gui_main.cpp index 004bd91cf5..368205905a 100644 --- a/source/tools/atlas/wxJS/gui/gui_main.cpp +++ b/source/tools/atlas/wxJS/gui/gui_main.cpp @@ -41,7 +41,7 @@ #include "../common/main.h" #include "init.h" - +/* #if defined( __WXMSW__) void WXDLLEXPORT wxEntryCleanup(); extern "C" @@ -85,3 +85,4 @@ WXJSAPI void wxJS_Destroy() { wxjs::gui::Destroy(); } +*/ \ No newline at end of file diff --git a/source/tools/atlas/wxJS/io/io_main.cpp b/source/tools/atlas/wxJS/io/io_main.cpp index 0f28305256..416f8dd2c8 100644 --- a/source/tools/atlas/wxJS/io/io_main.cpp +++ b/source/tools/atlas/wxJS/io/io_main.cpp @@ -57,7 +57,7 @@ using namespace wxjs::io; return result; } #endif - +/* WXJSAPI bool wxJS_InitClass(JSContext *cx, JSObject *global) { return InitClass(cx, global); @@ -72,3 +72,4 @@ WXJSAPI void wxJS_Destroy() { Destroy(); } +*/ \ No newline at end of file