1
0
forked from 0ad/0ad

Fixed Altas/wxJS for Windows.

This was SVN commit r5328.
This commit is contained in:
Ykkrosh 2007-09-04 20:04:43 +00:00
parent de1812becb
commit ebd7446d8a
6 changed files with 17 additions and 5 deletions

View File

@ -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;
}
};

View File

@ -26,11 +26,15 @@
#define WXJS_H_
#include <wx/dlimpexp.h>
/*
#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();

View File

@ -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);

View File

@ -29,11 +29,14 @@
#include <wx/dlimpexp.h>
/*
#ifdef WXJSDLL_BUILD
#define WXJSAPI WXEXPORT
#else
#define WXJSAPI WXIMPORT
#endif
*/
#define WXJSAPI
class wxPoint;

View File

@ -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();
}
*/

View File

@ -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();
}
*/