2007-09-02 19:17:58 +02:00
|
|
|
Based on wxJavaScript 0.9.71, with some modifications:
|
2007-06-09 00:56:01 +02:00
|
|
|
|
2007-09-02 19:17:58 +02:00
|
|
|
svn co -r818 https://wxjs.svn.sourceforge.net/svnroot/wxjs/trunk/wxJS2/src/ temp_src_dir
|
|
|
|
# Copy {common,ext,gui,io} source files into tools/atlas/wxJS
|
|
|
|
# Keep non-standard files gui/{control/{notebook,bookctrl},event/notebookevt,misc/timer}.{cpp,h}
|
2007-06-09 00:56:01 +02:00
|
|
|
|
|
|
|
# Rename common filenames to prevent naming conflicts when we compile everything together
|
|
|
|
for i in io ext gui; do
|
|
|
|
for j in init constant main; do
|
|
|
|
mv $i/$j.cpp $i/${i}_$j.cpp 2>/dev/null;
|
|
|
|
done;
|
|
|
|
done
|
|
|
|
|
2007-09-02 19:17:58 +02:00
|
|
|
# Make sure new files are added to our SVN
|
|
|
|
|
|
|
|
# Fix line endings
|
|
|
|
for i in `find . -name '*.cpp' -or -name '*.h'`; do dos2unix $i; done
|
|
|
|
for i in `find . -name '*.cpp' -or -name '*.h'`; do svn propset svn:eol-style native $i; done
|
2007-06-09 00:56:01 +02:00
|
|
|
|
2007-09-02 19:17:58 +02:00
|
|
|
# Add '#include "precompiled.h"' to every .cpp file
|
|
|
|
for i in `find common ext gui io -name '*.cpp'`; do
|
|
|
|
if [[ ! ( `grep precompiled.h $i` ) ]]; then
|
|
|
|
mv $i $i~; ( echo -e "#include \"precompiled.h\"\n" ; cat $i~ ) >$i; rm $i~;
|
|
|
|
fi
|
|
|
|
done
|
2007-06-09 00:56:01 +02:00
|
|
|
|
2007-09-02 19:17:58 +02:00
|
|
|
# Fix JS include paths
|
|
|
|
for i in `grep -lr '<jsapi.h>' .`; do sed -i 's/<jsapi.h>/<js\/jsapi.h>/' $i; done
|
|
|
|
for i in `grep -lr '<jsdate.h>' .`; do sed -i 's/<jsdate.h>/<js\/jsdate.h>/' $i; done
|
2007-06-09 00:56:01 +02:00
|
|
|
|
|
|
|
io/io_constant.cpp: replace
|
|
|
|
"JSConstDoubleSpec wxGlobalMap[] =
|
|
|
|
{
|
|
|
|
WXJS_SIMPLE_CONSTANT(wxNOT_FOUND)
|
|
|
|
{ 0 }
|
|
|
|
};"
|
|
|
|
with
|
|
|
|
"extern JSConstDoubleSpec wxGlobalMap[];"
|
2007-09-02 19:17:58 +02:00
|
|
|
(since it conflicts with wxGlobalMap in gui/misc/constant.cpp)
|
|
|
|
|
|
|
|
gui/gui_init.cpp: add
|
|
|
|
#include "control/bookctrl.h"
|
|
|
|
#include "control/notebook.h"
|
|
|
|
#include "misc/timer.h"
|
|
|
|
|
|
|
|
obj = BookCtrlBase::JSInit(cx, global, Control::GetClassPrototype());
|
|
|
|
wxASSERT_MSG(obj != NULL, wxT("wxBookCtrlBase prototype creation failed"));
|
|
|
|
if (! obj )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
obj = Notebook::JSInit(cx, global, BookCtrlBase::GetClassPrototype());
|
|
|
|
wxASSERT_MSG(obj != NULL, wxT("wxNotebook prototype creation failed"));
|
|
|
|
if (! obj )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
obj = Timer::JSInit(cx, global);
|
|
|
|
wxASSERT_MSG(obj != NULL, wxT("wxTimer prototype creation failed"));
|
|
|
|
if (! obj )
|
2007-09-03 01:38:58 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
gui/event/jsevent.cpp: add
|
|
|
|
obj = NotebookEvent::JSInit(cx, global, NotifyEvent::GetClassPrototype());
|
|
|
|
wxASSERT_MSG(obj != NULL, wxT("wxNotebookEvent prototype creation failed"));
|
|
|
|
if (! obj )
|
|
|
|
return false;
|
|
|
|
|
2009-06-26 23:45:37 +02:00
|
|
|
TODO: add back tooltips into window.cpp
|
|
|
|
|
|
|
|
gui/sizer: add 'clear'
|