From 651fdfbdb7305c7e4e95f6a901faa907883fe14f Mon Sep 17 00:00:00 2001 From: "fires.gc" Date: Wed, 23 Jul 2008 23:30:11 +0000 Subject: [PATCH] Updated wxwidgets to 2.8.8 - should fix http://code.google.com/p/dolphin-emu/issues/detail?id=65 - thx to prismsub7 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@73 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/wxWidgets/art/addbookm.xpm | 2 +- Externals/wxWidgets/art/back.xpm | 2 +- Externals/wxWidgets/art/cdrom.xpm | 2 +- Externals/wxWidgets/art/copy.xpm | 2 +- Externals/wxWidgets/art/cross.xpm | 2 +- Externals/wxWidgets/art/cut.xpm | 2 +- Externals/wxWidgets/art/deffile.xpm | 2 +- Externals/wxWidgets/art/delbookm.xpm | 2 +- Externals/wxWidgets/art/delete.xpm | 2 +- Externals/wxWidgets/art/dir_up.xpm | 2 +- Externals/wxWidgets/art/down.xpm | 2 +- Externals/wxWidgets/art/exefile.xpm | 2 +- Externals/wxWidgets/art/fileopen.xpm | 2 +- Externals/wxWidgets/art/filesave.xpm | 2 +- Externals/wxWidgets/art/filesaveas.xpm | 2 +- Externals/wxWidgets/art/find.xpm | 2 +- Externals/wxWidgets/art/findrepl.xpm | 2 +- Externals/wxWidgets/art/floppy.xpm | 2 +- Externals/wxWidgets/art/folder.xpm | 2 +- Externals/wxWidgets/art/folder_open.xpm | 2 +- Externals/wxWidgets/art/forward.xpm | 2 +- Externals/wxWidgets/art/gtk/error.xpm | 2 +- Externals/wxWidgets/art/gtk/info.xpm | 2 +- Externals/wxWidgets/art/gtk/question.xpm | 2 +- Externals/wxWidgets/art/gtk/warning.xpm | 2 +- Externals/wxWidgets/art/harddisk.xpm | 2 +- Externals/wxWidgets/art/helpicon.xpm | 2 +- Externals/wxWidgets/art/home.xpm | 2 +- Externals/wxWidgets/art/htmbook.xpm | 2 +- Externals/wxWidgets/art/htmfoldr.xpm | 2 +- Externals/wxWidgets/art/htmoptns.xpm | 2 +- Externals/wxWidgets/art/htmpage.xpm | 2 +- Externals/wxWidgets/art/htmsidep.xpm | 2 +- Externals/wxWidgets/art/listview.xpm | 2 +- Externals/wxWidgets/art/missimg.xpm | 2 +- Externals/wxWidgets/art/motif/error.xpm | 2 +- Externals/wxWidgets/art/motif/info.xpm | 2 +- Externals/wxWidgets/art/motif/question.xpm | 2 +- Externals/wxWidgets/art/motif/warning.xpm | 2 +- Externals/wxWidgets/art/new.xpm | 2 +- Externals/wxWidgets/art/new_dir.xpm | 2 +- Externals/wxWidgets/art/paste.xpm | 2 +- Externals/wxWidgets/art/print.xpm | 2 +- Externals/wxWidgets/art/quit.xpm | 2 +- Externals/wxWidgets/art/redo.xpm | 2 +- Externals/wxWidgets/art/removable.xpm | 2 +- Externals/wxWidgets/art/repview.xpm | 2 +- Externals/wxWidgets/art/tick.xpm | 2 +- Externals/wxWidgets/art/tipicon.xpm | 2 +- Externals/wxWidgets/art/toparent.xpm | 2 +- Externals/wxWidgets/art/undo.xpm | 2 +- Externals/wxWidgets/art/up.xpm | 2 +- Externals/wxWidgets/art/wxwin16x16.xpm | 2 +- Externals/wxWidgets/art/wxwin32x32.xpm | 2 +- Externals/wxWidgets/build/msw/wx_core.vcproj | 16 +- Externals/wxWidgets/include/wx/accel.h | 4 +- Externals/wxWidgets/include/wx/access.h | 10 +- Externals/wxWidgets/include/wx/animate.h | 4 +- Externals/wxWidgets/include/wx/app.h | 9 +- Externals/wxWidgets/include/wx/artprov.h | 6 +- .../wxWidgets/include/wx/aui/framemanager.h | 4 +- Externals/wxWidgets/include/wx/aui/tabmdi.h | 8 +- Externals/wxWidgets/include/wx/calctrl.h | 4 +- Externals/wxWidgets/include/wx/clrpicker.h | 4 +- Externals/wxWidgets/include/wx/cmndata.h | 4 +- Externals/wxWidgets/include/wx/colour.h | 4 +- Externals/wxWidgets/include/wx/confbase.h | 6 +- Externals/wxWidgets/include/wx/containr.h | 3 +- Externals/wxWidgets/include/wx/cppunit.h | 6 +- Externals/wxWidgets/include/wx/dataview.h | 12 +- Externals/wxWidgets/include/wx/datetime.h | 25 +- Externals/wxWidgets/include/wx/dc.h | 6 +- Externals/wxWidgets/include/wx/dcgraph.h | 2 +- Externals/wxWidgets/include/wx/dde.h | 8 +- Externals/wxWidgets/include/wx/debug.h | 7 +- Externals/wxWidgets/include/wx/defs.h | 16 +- Externals/wxWidgets/include/wx/dir.h | 4 +- Externals/wxWidgets/include/wx/docview.h | 20 +- Externals/wxWidgets/include/wx/dynlib.h | 9 +- Externals/wxWidgets/include/wx/dynload.h | 4 +- Externals/wxWidgets/include/wx/event.h | 6 +- Externals/wxWidgets/include/wx/evtloop.h | 32 ++- Externals/wxWidgets/include/wx/fdrepdlg.h | 8 +- Externals/wxWidgets/include/wx/fileconf.h | 4 +- Externals/wxWidgets/include/wx/filefn.h | 30 +- Externals/wxWidgets/include/wx/filesys.h | 8 +- Externals/wxWidgets/include/wx/font.h | 4 +- Externals/wxWidgets/include/wx/fontpicker.h | 4 +- Externals/wxWidgets/include/wx/gbsizer.h | 7 +- .../wxWidgets/include/wx/generic/dataview.h | 8 +- .../wxWidgets/include/wx/generic/dirctrlg.h | 4 +- Externals/wxWidgets/include/wx/generic/grid.h | 14 +- .../wxWidgets/include/wx/generic/helpext.h | 4 +- .../wxWidgets/include/wx/generic/progdlgg.h | 6 +- .../wxWidgets/include/wx/generic/spinctlg.h | 3 +- .../wxWidgets/include/wx/generic/splash.h | 4 +- .../wxWidgets/include/wx/generic/splitter.h | 4 +- .../wxWidgets/include/wx/generic/srchctlg.h | 6 +- Externals/wxWidgets/include/wx/geometry.h | 6 +- Externals/wxWidgets/include/wx/graphics.h | 4 +- Externals/wxWidgets/include/wx/hash.h | 4 +- .../wxWidgets/include/wx/html/helpdata.h | 4 +- Externals/wxWidgets/include/wx/html/helpfrm.h | 4 +- .../wxWidgets/include/wx/html/htmlcell.h | 10 +- Externals/wxWidgets/include/wx/html/htmlwin.h | 8 +- Externals/wxWidgets/include/wx/html/webkit.h | 31 ++- Externals/wxWidgets/include/wx/html/winpars.h | 46 +++- Externals/wxWidgets/include/wx/intl.h | 19 +- Externals/wxWidgets/include/wx/ipcbase.h | 6 +- Externals/wxWidgets/include/wx/list.h | 8 +- Externals/wxWidgets/include/wx/log.h | 8 +- Externals/wxWidgets/include/wx/longlong.h | 6 +- Externals/wxWidgets/include/wx/mimetype.h | 4 +- Externals/wxWidgets/include/wx/module.h | 4 +- Externals/wxWidgets/include/wx/mstream.h | 4 +- Externals/wxWidgets/include/wx/msw/accel.h | 4 +- Externals/wxWidgets/include/wx/msw/app.h | 29 +- Externals/wxWidgets/include/wx/msw/brush.h | 4 +- Externals/wxWidgets/include/wx/msw/choice.h | 4 +- Externals/wxWidgets/include/wx/msw/colour.h | 10 +- Externals/wxWidgets/include/wx/msw/dcclient.h | 4 +- Externals/wxWidgets/include/wx/msw/dde.h | 6 +- Externals/wxWidgets/include/wx/msw/dialog.h | 6 +- Externals/wxWidgets/include/wx/msw/gdiimage.h | 8 +- Externals/wxWidgets/include/wx/msw/glcanvas.h | 4 +- Externals/wxWidgets/include/wx/msw/listctrl.h | 9 +- Externals/wxWidgets/include/wx/msw/mdi.h | 8 +- Externals/wxWidgets/include/wx/msw/palette.h | 6 +- Externals/wxWidgets/include/wx/msw/pen.h | 6 +- Externals/wxWidgets/include/wx/msw/radiobox.h | 6 +- Externals/wxWidgets/include/wx/msw/region.h | 4 +- Externals/wxWidgets/include/wx/msw/setup.h | 12 +- Externals/wxWidgets/include/wx/msw/setup0.h | 4 +- Externals/wxWidgets/include/wx/msw/slider95.h | 4 +- Externals/wxWidgets/include/wx/msw/spinctrl.h | 10 +- Externals/wxWidgets/include/wx/msw/statbmp.h | 8 +- Externals/wxWidgets/include/wx/msw/taskbar.h | 4 +- Externals/wxWidgets/include/wx/msw/textctrl.h | 4 +- Externals/wxWidgets/include/wx/msw/toplevel.h | 7 +- .../wxWidgets/include/wx/msw/wince/setup.h | 4 +- Externals/wxWidgets/include/wx/msw/window.h | 8 +- Externals/wxWidgets/include/wx/msw/wrapwin.h | 4 +- Externals/wxWidgets/include/wx/object.h | 12 +- Externals/wxWidgets/include/wx/overlay.h | 4 +- Externals/wxWidgets/include/wx/paper.h | 4 +- Externals/wxWidgets/include/wx/platform.h | 30 +- Externals/wxWidgets/include/wx/popupwin.h | 6 +- .../wxWidgets/include/wx/private/overlay.h | 4 +- Externals/wxWidgets/include/wx/radiobox.h | 4 +- Externals/wxWidgets/include/wx/regex.h | 8 +- Externals/wxWidgets/include/wx/renderer.h | 29 +- .../include/wx/richtext/richtextbuffer.h | 81 ++++-- .../include/wx/richtext/richtextbulletspage.h | 7 +- .../include/wx/richtext/richtextctrl.h | 24 +- .../include/wx/richtext/richtextfontpage.h | 12 +- .../include/wx/richtext/richtextstyledlg.h | 5 +- .../include/wx/richtext/richtextsymboldlg.h | 9 +- .../include/wx/richtext/richtextxml.h | 4 +- Externals/wxWidgets/include/wx/sckipc.h | 6 +- Externals/wxWidgets/include/wx/scrolwin.h | 6 +- Externals/wxWidgets/include/wx/setup_inc.h | 4 +- Externals/wxWidgets/include/wx/sizer.h | 25 +- Externals/wxWidgets/include/wx/stream.h | 8 +- Externals/wxWidgets/include/wx/string.h | 8 +- Externals/wxWidgets/include/wx/taskbar.h | 4 +- Externals/wxWidgets/include/wx/textbuf.h | 2 +- Externals/wxWidgets/include/wx/textctrl.h | 8 +- Externals/wxWidgets/include/wx/thread.h | 23 +- Externals/wxWidgets/include/wx/tipwin.h | 4 +- Externals/wxWidgets/include/wx/toplevel.h | 4 +- Externals/wxWidgets/include/wx/treebase.h | 12 +- Externals/wxWidgets/include/wx/txtstrm.h | 6 +- .../wxWidgets/include/wx/unix/taskbarx11.h | 5 +- Externals/wxWidgets/include/wx/utils.h | 17 +- Externals/wxWidgets/include/wx/validate.h | 6 +- Externals/wxWidgets/include/wx/version.h | 6 +- Externals/wxWidgets/include/wx/vlbox.h | 4 +- Externals/wxWidgets/include/wx/window.h | 23 +- Externals/wxWidgets/include/wx/wizard.h | 4 +- Externals/wxWidgets/include/wx/wxchar.h | 5 +- Externals/wxWidgets/include/wx/xml/xml.h | 7 +- .../wxWidgets/include/wx/xrc/xh_bmpcbox.h | 4 +- .../wxWidgets/include/wx/xrc/xh_choicbk.h | 2 +- .../wxWidgets/include/wx/xrc/xh_collpane.h | 4 +- .../wxWidgets/include/wx/xrc/xh_listbk.h | 2 +- Externals/wxWidgets/include/wx/xrc/xh_notbk.h | 4 +- .../wxWidgets/include/wx/xrc/xh_propdlg.h | 4 +- Externals/wxWidgets/include/wx/xrc/xh_toolb.h | 4 +- .../wxWidgets/include/wx/xrc/xh_treebk.h | 2 +- Externals/wxWidgets/include/wx/xrc/xh_wizrd.h | 6 +- Externals/wxWidgets/include/wx/xti.h | 4 +- Externals/wxWidgets/include/wx/zipstrm.h | 6 +- Externals/wxWidgets/lib/vc_lib/msw/wx/setup.h | 12 +- Externals/wxWidgets/src/common/appbase.cpp | 17 +- Externals/wxWidgets/src/common/artstd.cpp | 19 +- Externals/wxWidgets/src/common/bookctrl.cpp | 9 +- Externals/wxWidgets/src/common/config.cpp | 4 +- Externals/wxWidgets/src/common/cshelp.cpp | 17 +- Externals/wxWidgets/src/common/datetime.cpp | 13 +- Externals/wxWidgets/src/common/datstrm.cpp | 36 +-- Externals/wxWidgets/src/common/db.cpp | 4 +- Externals/wxWidgets/src/common/dcbufcmn.cpp | 10 +- Externals/wxWidgets/src/common/dcgraph.cpp | 8 +- Externals/wxWidgets/src/common/docview.cpp | 21 +- Externals/wxWidgets/src/common/event.cpp | 15 +- Externals/wxWidgets/src/common/fileconf.cpp | 4 +- Externals/wxWidgets/src/common/filefn.cpp | 2 +- Externals/wxWidgets/src/common/filename.cpp | 17 +- Externals/wxWidgets/src/common/filesys.cpp | 2 +- Externals/wxWidgets/src/common/framecmn.cpp | 16 +- Externals/wxWidgets/src/common/fs_arc.cpp | 6 +- Externals/wxWidgets/src/common/gbsizer.cpp | 97 ++++++- Externals/wxWidgets/src/common/image.cpp | 40 ++- Externals/wxWidgets/src/common/imagpng.cpp | 8 +- Externals/wxWidgets/src/common/imagxpm.cpp | 6 +- Externals/wxWidgets/src/common/init.cpp | 6 +- Externals/wxWidgets/src/common/intl.cpp | 176 +++++++++--- Externals/wxWidgets/src/common/log.cpp | 16 +- Externals/wxWidgets/src/common/menucmn.cpp | 4 +- Externals/wxWidgets/src/common/pickerbase.cpp | 8 +- Externals/wxWidgets/src/common/regex.cpp | 6 +- Externals/wxWidgets/src/common/sizer.cpp | 78 +++++- Externals/wxWidgets/src/common/stdpbase.cpp | 44 ++- Externals/wxWidgets/src/common/stream.cpp | 11 +- Externals/wxWidgets/src/common/string.cpp | 24 +- Externals/wxWidgets/src/common/tarstrm.cpp | 34 +-- Externals/wxWidgets/src/common/toplvcmn.cpp | 46 ++-- Externals/wxWidgets/src/common/treebase.cpp | 6 +- Externals/wxWidgets/src/common/utilscmn.cpp | 16 +- Externals/wxWidgets/src/common/wincmn.cpp | 76 +++++- Externals/wxWidgets/src/common/wxchar.cpp | 15 +- Externals/wxWidgets/src/common/zipstrm.cpp | 2 +- Externals/wxWidgets/src/generic/calctrl.cpp | 12 +- Externals/wxWidgets/src/generic/choicbkg.cpp | 3 +- .../wxWidgets/src/generic/clrpickerg.cpp | 4 +- Externals/wxWidgets/src/generic/datectlg.cpp | 77 +++--- Externals/wxWidgets/src/generic/dcpsg.cpp | 16 +- .../wxWidgets/src/generic/filepickerg.cpp | 4 +- .../wxWidgets/src/generic/fontpickerg.cpp | 4 +- Externals/wxWidgets/src/generic/graphicc.cpp | 2 +- Externals/wxWidgets/src/generic/grid.cpp | 256 +++++++++++++++--- Externals/wxWidgets/src/generic/hyperlink.cpp | 4 +- Externals/wxWidgets/src/generic/listctrl.cpp | 62 ++++- Externals/wxWidgets/src/generic/notebook.cpp | 6 +- Externals/wxWidgets/src/generic/odcombo.cpp | 17 +- Externals/wxWidgets/src/generic/prntdlgg.cpp | 6 +- Externals/wxWidgets/src/generic/progdlgg.cpp | 6 +- Externals/wxWidgets/src/generic/sashwin.cpp | 4 +- Externals/wxWidgets/src/generic/scrlwing.cpp | 93 ++++++- Externals/wxWidgets/src/generic/spinctlg.cpp | 29 +- Externals/wxWidgets/src/generic/statusbr.cpp | 35 +-- Externals/wxWidgets/src/generic/tipdlg.cpp | 32 ++- Externals/wxWidgets/src/generic/treectlg.cpp | 4 +- Externals/wxWidgets/src/generic/vlbox.cpp | 6 +- Externals/wxWidgets/src/generic/vscroll.cpp | 8 +- Externals/wxWidgets/src/msw/app.cpp | 26 +- Externals/wxWidgets/src/msw/button.cpp | 29 +- Externals/wxWidgets/src/msw/checklst.cpp | 4 +- Externals/wxWidgets/src/msw/choice.cpp | 17 +- Externals/wxWidgets/src/msw/control.cpp | 16 +- Externals/wxWidgets/src/msw/dcprint.cpp | 12 +- Externals/wxWidgets/src/msw/dialup.cpp | 10 +- Externals/wxWidgets/src/msw/gsocket.cpp | 10 +- Externals/wxWidgets/src/msw/gsockmsw.cpp | 16 +- Externals/wxWidgets/src/msw/listctrl.cpp | 128 +++++---- Externals/wxWidgets/src/msw/menuitem.cpp | 10 +- Externals/wxWidgets/src/msw/mimetype.cpp | 39 ++- Externals/wxWidgets/src/msw/msgdlg.cpp | 10 +- Externals/wxWidgets/src/msw/notebook.cpp | 8 +- Externals/wxWidgets/src/msw/ole/access.cpp | 3 +- Externals/wxWidgets/src/msw/ole/automtn.cpp | 6 +- Externals/wxWidgets/src/msw/ole/oleutils.cpp | 20 +- Externals/wxWidgets/src/msw/ownerdrw.cpp | 26 +- Externals/wxWidgets/src/msw/radiobox.cpp | 21 +- Externals/wxWidgets/src/msw/renderer.cpp | 200 +++++++++++++- Externals/wxWidgets/src/msw/spinctrl.cpp | 66 ++++- Externals/wxWidgets/src/msw/statbmp.cpp | 30 +- Externals/wxWidgets/src/msw/statbox.cpp | 12 +- Externals/wxWidgets/src/msw/stdpaths.cpp | 4 +- Externals/wxWidgets/src/msw/taskbar.cpp | 3 +- Externals/wxWidgets/src/msw/tbar95.cpp | 21 +- Externals/wxWidgets/src/msw/textctrl.cpp | 64 ++++- Externals/wxWidgets/src/msw/toplevel.cpp | 54 ++-- Externals/wxWidgets/src/msw/treectrl.cpp | 59 +++- Externals/wxWidgets/src/msw/utils.cpp | 46 ++-- .../wxWidgets/src/msw/wince/filefnwce.cpp | 33 +-- Externals/wxWidgets/src/msw/window.cpp | 112 +++++--- 287 files changed, 2968 insertions(+), 1102 deletions(-) diff --git a/Externals/wxWidgets/art/addbookm.xpm b/Externals/wxWidgets/art/addbookm.xpm index 18851bcdf4..7d5f69900e 100644 --- a/Externals/wxWidgets/art/addbookm.xpm +++ b/Externals/wxWidgets/art/addbookm.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *addbookm_xpm[] = { +static const char * addbookm_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", ". c Black", diff --git a/Externals/wxWidgets/art/back.xpm b/Externals/wxWidgets/art/back.xpm index 81b7a909f2..b48af706cc 100644 --- a/Externals/wxWidgets/art/back.xpm +++ b/Externals/wxWidgets/art/back.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * back_xpm[] = { +static const char * back_xpm[] = { "16 15 3 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/cdrom.xpm b/Externals/wxWidgets/art/cdrom.xpm index b43abd7f0b..b72d529e1c 100644 --- a/Externals/wxWidgets/art/cdrom.xpm +++ b/Externals/wxWidgets/art/cdrom.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *cdrom_xpm[] = { +static const char * cdrom_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 36 1", "= c #9BACC2", diff --git a/Externals/wxWidgets/art/copy.xpm b/Externals/wxWidgets/art/copy.xpm index 95ad44880d..aa6094f00f 100644 --- a/Externals/wxWidgets/art/copy.xpm +++ b/Externals/wxWidgets/art/copy.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *copy_xpm[] = { +static const char * copy_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 23 1", "o c #97C4E7", diff --git a/Externals/wxWidgets/art/cross.xpm b/Externals/wxWidgets/art/cross.xpm index b30173b398..5fe844ab75 100644 --- a/Externals/wxWidgets/art/cross.xpm +++ b/Externals/wxWidgets/art/cross.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *cross_xpm[] = { +static const char * cross_xpm[] = { /* columns rows colors chars-per-pixel */ "10 10 2 1", " c Gray0", diff --git a/Externals/wxWidgets/art/cut.xpm b/Externals/wxWidgets/art/cut.xpm index 8afa8f6d15..83ff3bb955 100644 --- a/Externals/wxWidgets/art/cut.xpm +++ b/Externals/wxWidgets/art/cut.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *cut_xpm[] = { +static const char * cut_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 25 1", "6 c #D8BDC0", diff --git a/Externals/wxWidgets/art/deffile.xpm b/Externals/wxWidgets/art/deffile.xpm index 5442c6cc68..f08974b32c 100644 --- a/Externals/wxWidgets/art/deffile.xpm +++ b/Externals/wxWidgets/art/deffile.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *deffile_xpm[] = { +static const char * deffile_xpm[] = { /* columns rows colors chars-per-pixel */ "16 16 32 1", "= c #97C4E7", diff --git a/Externals/wxWidgets/art/delbookm.xpm b/Externals/wxWidgets/art/delbookm.xpm index 80a83897c4..013882327e 100644 --- a/Externals/wxWidgets/art/delbookm.xpm +++ b/Externals/wxWidgets/art/delbookm.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *delbookm_xpm[] = { +static const char * delbookm_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", ". c Black", diff --git a/Externals/wxWidgets/art/delete.xpm b/Externals/wxWidgets/art/delete.xpm index b7ecf3aaaa..106d38894e 100644 --- a/Externals/wxWidgets/art/delete.xpm +++ b/Externals/wxWidgets/art/delete.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *delete_xpm[] = { +static const char * delete_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 21 1", "2 c #A5AEBD", diff --git a/Externals/wxWidgets/art/dir_up.xpm b/Externals/wxWidgets/art/dir_up.xpm index efdf4340a8..0c2f71d092 100644 --- a/Externals/wxWidgets/art/dir_up.xpm +++ b/Externals/wxWidgets/art/dir_up.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *dir_up_xpm[] = { +static const char * dir_up_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 31 1", "6 c #9BACC2", diff --git a/Externals/wxWidgets/art/down.xpm b/Externals/wxWidgets/art/down.xpm index f03819e4d3..1f9cf29373 100644 --- a/Externals/wxWidgets/art/down.xpm +++ b/Externals/wxWidgets/art/down.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * down_xpm[] = { +static const char * down_xpm[] = { "16 15 3 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/exefile.xpm b/Externals/wxWidgets/art/exefile.xpm index 4defb732e3..7ecdec3e7b 100644 --- a/Externals/wxWidgets/art/exefile.xpm +++ b/Externals/wxWidgets/art/exefile.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *exefile_xpm[] = { +static const char * exefile_xpm[] = { /* columns rows colors chars-per-pixel */ "16 16 51 1", "% c #E8E8EC", diff --git a/Externals/wxWidgets/art/fileopen.xpm b/Externals/wxWidgets/art/fileopen.xpm index 50724a857c..9cf25ccc5b 100644 --- a/Externals/wxWidgets/art/fileopen.xpm +++ b/Externals/wxWidgets/art/fileopen.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *fileopen_xpm[] = { +static const char * fileopen_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 36 1", "6 c #9BACC2", diff --git a/Externals/wxWidgets/art/filesave.xpm b/Externals/wxWidgets/art/filesave.xpm index 5c63fcfd5d..04b7539e28 100644 --- a/Externals/wxWidgets/art/filesave.xpm +++ b/Externals/wxWidgets/art/filesave.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *filesave_xpm[] = { +static const char * filesave_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 21 1", "O c #FFFFFF", diff --git a/Externals/wxWidgets/art/filesaveas.xpm b/Externals/wxWidgets/art/filesaveas.xpm index 9fb5fca7a5..3c45bc808d 100644 --- a/Externals/wxWidgets/art/filesaveas.xpm +++ b/Externals/wxWidgets/art/filesaveas.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *filesaveas_xpm[] = { +static const char * filesaveas_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 23 1", "X c Black", diff --git a/Externals/wxWidgets/art/find.xpm b/Externals/wxWidgets/art/find.xpm index fe90d31ba8..51544e98b8 100644 --- a/Externals/wxWidgets/art/find.xpm +++ b/Externals/wxWidgets/art/find.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *find_xpm[] = { +static const char * find_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 41 1", "y c #A06959", diff --git a/Externals/wxWidgets/art/findrepl.xpm b/Externals/wxWidgets/art/findrepl.xpm index 13c5aa08b4..33b083b5fd 100644 --- a/Externals/wxWidgets/art/findrepl.xpm +++ b/Externals/wxWidgets/art/findrepl.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *findrepl_xpm[] = { +static const char * findrepl_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 42 1", "y c #A06959", diff --git a/Externals/wxWidgets/art/floppy.xpm b/Externals/wxWidgets/art/floppy.xpm index 408d8fdf7c..4d6b7d8fe3 100644 --- a/Externals/wxWidgets/art/floppy.xpm +++ b/Externals/wxWidgets/art/floppy.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *floppy_xpm[] = { +static const char * floppy_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 18 1", "& c #E3E4E6", diff --git a/Externals/wxWidgets/art/folder.xpm b/Externals/wxWidgets/art/folder.xpm index 638f10cd8f..60a4207884 100644 --- a/Externals/wxWidgets/art/folder.xpm +++ b/Externals/wxWidgets/art/folder.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *folder_xpm[] = { +static const char * folder_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 22 1", "> c #9BACC2", diff --git a/Externals/wxWidgets/art/folder_open.xpm b/Externals/wxWidgets/art/folder_open.xpm index e1253161cf..60b1e65add 100644 --- a/Externals/wxWidgets/art/folder_open.xpm +++ b/Externals/wxWidgets/art/folder_open.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *folder_open_xpm[] = { +static const char * folder_open_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 31 1", "6 c #9BACC2", diff --git a/Externals/wxWidgets/art/forward.xpm b/Externals/wxWidgets/art/forward.xpm index ebe75efb01..56df17bccf 100644 --- a/Externals/wxWidgets/art/forward.xpm +++ b/Externals/wxWidgets/art/forward.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * forward_xpm[] = { +static const char * forward_xpm[] = { "16 15 3 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/gtk/error.xpm b/Externals/wxWidgets/art/gtk/error.xpm index e77c8e9fb6..956e3549e9 100644 --- a/Externals/wxWidgets/art/gtk/error.xpm +++ b/Externals/wxWidgets/art/gtk/error.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *error_xpm[] = { +static const char * error_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 4 1", " c None", diff --git a/Externals/wxWidgets/art/gtk/info.xpm b/Externals/wxWidgets/art/gtk/info.xpm index 8892f504c1..930b639cc3 100644 --- a/Externals/wxWidgets/art/gtk/info.xpm +++ b/Externals/wxWidgets/art/gtk/info.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *info_xpm[] = { +static const char * info_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 9 1", "$ c Black", diff --git a/Externals/wxWidgets/art/gtk/question.xpm b/Externals/wxWidgets/art/gtk/question.xpm index 8b3cb01ef5..3ea9434c2f 100644 --- a/Externals/wxWidgets/art/gtk/question.xpm +++ b/Externals/wxWidgets/art/gtk/question.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *question_xpm[] = { +static const char * question_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 21 1", ". c Black", diff --git a/Externals/wxWidgets/art/gtk/warning.xpm b/Externals/wxWidgets/art/gtk/warning.xpm index 92b7a70860..18135c81cb 100644 --- a/Externals/wxWidgets/art/gtk/warning.xpm +++ b/Externals/wxWidgets/art/gtk/warning.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *warning_xpm[] = { +static const char * warning_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 9 1", "@ c Black", diff --git a/Externals/wxWidgets/art/harddisk.xpm b/Externals/wxWidgets/art/harddisk.xpm index 7586442052..bdff0763a1 100644 --- a/Externals/wxWidgets/art/harddisk.xpm +++ b/Externals/wxWidgets/art/harddisk.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *harddisk_xpm[] = { +static const char * harddisk_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 39 1", "7 c #E3E4E6", diff --git a/Externals/wxWidgets/art/helpicon.xpm b/Externals/wxWidgets/art/helpicon.xpm index 1c34d8ba2f..6abce2c0dd 100644 --- a/Externals/wxWidgets/art/helpicon.xpm +++ b/Externals/wxWidgets/art/helpicon.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *helpicon_xpm[] = { +static const char * helpicon_xpm[] = { /* columns rows colors chars-per-pixel */ "32 32 6 1", " c Gray0", diff --git a/Externals/wxWidgets/art/home.xpm b/Externals/wxWidgets/art/home.xpm index 5bb2d0c68b..078e7d6c65 100644 --- a/Externals/wxWidgets/art/home.xpm +++ b/Externals/wxWidgets/art/home.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *home_xpm[] = { +static const char * home_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", ". c Black", diff --git a/Externals/wxWidgets/art/htmbook.xpm b/Externals/wxWidgets/art/htmbook.xpm index c219b59e5c..eb343cbe3b 100644 --- a/Externals/wxWidgets/art/htmbook.xpm +++ b/Externals/wxWidgets/art/htmbook.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * htmbook_xpm[] = { +static const char * htmbook_xpm[] = { "16 16 6 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/htmfoldr.xpm b/Externals/wxWidgets/art/htmfoldr.xpm index d7a1c7139a..fc14e60cc7 100644 --- a/Externals/wxWidgets/art/htmfoldr.xpm +++ b/Externals/wxWidgets/art/htmfoldr.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * htmfoldr_xpm[] = { +static const char * htmfoldr_xpm[] = { "16 16 6 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/htmoptns.xpm b/Externals/wxWidgets/art/htmoptns.xpm index 107bc67864..8649f79398 100644 --- a/Externals/wxWidgets/art/htmoptns.xpm +++ b/Externals/wxWidgets/art/htmoptns.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * htmoptns_xpm[] = { +static const char * htmoptns_xpm[] = { "16 15 2 1", " c None", ". c #000000", diff --git a/Externals/wxWidgets/art/htmpage.xpm b/Externals/wxWidgets/art/htmpage.xpm index 8b4e60e8a2..bf934b981b 100644 --- a/Externals/wxWidgets/art/htmpage.xpm +++ b/Externals/wxWidgets/art/htmpage.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * htmpage_xpm[] = { +static const char * htmpage_xpm[] = { "16 16 4 1", " c None", ". c #808080", diff --git a/Externals/wxWidgets/art/htmsidep.xpm b/Externals/wxWidgets/art/htmsidep.xpm index d71129f9e2..514d7de0bb 100644 --- a/Externals/wxWidgets/art/htmsidep.xpm +++ b/Externals/wxWidgets/art/htmsidep.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *htmsidep_xpm[] = { +static const char * htmsidep_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 6 1", ". c Black", diff --git a/Externals/wxWidgets/art/listview.xpm b/Externals/wxWidgets/art/listview.xpm index 9d8d804c02..e17781e2f0 100644 --- a/Externals/wxWidgets/art/listview.xpm +++ b/Externals/wxWidgets/art/listview.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *listview_xpm[] = { +static const char * listview_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 4 1", " c Black", diff --git a/Externals/wxWidgets/art/missimg.xpm b/Externals/wxWidgets/art/missimg.xpm index f235f6277c..ca96c3a2ef 100644 --- a/Externals/wxWidgets/art/missimg.xpm +++ b/Externals/wxWidgets/art/missimg.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *missimg_xpm[] = { +static const char * missimg_xpm[] = { /* columns rows colors chars-per-pixel */ "32 32 5 1", "X c Black", diff --git a/Externals/wxWidgets/art/motif/error.xpm b/Externals/wxWidgets/art/motif/error.xpm index e77c8e9fb6..956e3549e9 100644 --- a/Externals/wxWidgets/art/motif/error.xpm +++ b/Externals/wxWidgets/art/motif/error.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *error_xpm[] = { +static const char * error_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 4 1", " c None", diff --git a/Externals/wxWidgets/art/motif/info.xpm b/Externals/wxWidgets/art/motif/info.xpm index 8892f504c1..930b639cc3 100644 --- a/Externals/wxWidgets/art/motif/info.xpm +++ b/Externals/wxWidgets/art/motif/info.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *info_xpm[] = { +static const char * info_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 9 1", "$ c Black", diff --git a/Externals/wxWidgets/art/motif/question.xpm b/Externals/wxWidgets/art/motif/question.xpm index 8b3cb01ef5..3ea9434c2f 100644 --- a/Externals/wxWidgets/art/motif/question.xpm +++ b/Externals/wxWidgets/art/motif/question.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *question_xpm[] = { +static const char * question_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 21 1", ". c Black", diff --git a/Externals/wxWidgets/art/motif/warning.xpm b/Externals/wxWidgets/art/motif/warning.xpm index 92b7a70860..18135c81cb 100644 --- a/Externals/wxWidgets/art/motif/warning.xpm +++ b/Externals/wxWidgets/art/motif/warning.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *warning_xpm[] = { +static const char * warning_xpm[] = { /* columns rows colors chars-per-pixel */ "48 48 9 1", "@ c Black", diff --git a/Externals/wxWidgets/art/new.xpm b/Externals/wxWidgets/art/new.xpm index 4c2641c663..7b6143098e 100644 --- a/Externals/wxWidgets/art/new.xpm +++ b/Externals/wxWidgets/art/new.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *new_xpm[] = { +static const char * new_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 29 1", "* c #97C4E7", diff --git a/Externals/wxWidgets/art/new_dir.xpm b/Externals/wxWidgets/art/new_dir.xpm index 45ff9e6583..9eebabfa05 100644 --- a/Externals/wxWidgets/art/new_dir.xpm +++ b/Externals/wxWidgets/art/new_dir.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *new_dir_xpm[] = { +static const char * new_dir_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 22 1", "X c Black", diff --git a/Externals/wxWidgets/art/paste.xpm b/Externals/wxWidgets/art/paste.xpm index 57e7f2a593..028fa485b7 100644 --- a/Externals/wxWidgets/art/paste.xpm +++ b/Externals/wxWidgets/art/paste.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *paste_xpm[] = { +static const char * paste_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 25 1", "< c #FEECE4", diff --git a/Externals/wxWidgets/art/print.xpm b/Externals/wxWidgets/art/print.xpm index a090f99931..e91d170a20 100644 --- a/Externals/wxWidgets/art/print.xpm +++ b/Externals/wxWidgets/art/print.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *print_xpm[] = { +static const char * print_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 39 1", "< c #E3E4E6", diff --git a/Externals/wxWidgets/art/quit.xpm b/Externals/wxWidgets/art/quit.xpm index a2e25e9c1a..659093233f 100644 --- a/Externals/wxWidgets/art/quit.xpm +++ b/Externals/wxWidgets/art/quit.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *quit_xpm[] = { +static const char * quit_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 69 1", "@ c Black", diff --git a/Externals/wxWidgets/art/redo.xpm b/Externals/wxWidgets/art/redo.xpm index 442c1d036b..844403e791 100644 --- a/Externals/wxWidgets/art/redo.xpm +++ b/Externals/wxWidgets/art/redo.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *redo_xpm[] = { +static const char * redo_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 37 1", "4 c #9BACC2", diff --git a/Externals/wxWidgets/art/removable.xpm b/Externals/wxWidgets/art/removable.xpm index 1036c8f4d3..fcc52ff810 100644 --- a/Externals/wxWidgets/art/removable.xpm +++ b/Externals/wxWidgets/art/removable.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *removable_xpm[] = { +static const char * removable_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 23 1", "@ c #C3C3C4", diff --git a/Externals/wxWidgets/art/repview.xpm b/Externals/wxWidgets/art/repview.xpm index 1f8f70b00e..c270f56f66 100644 --- a/Externals/wxWidgets/art/repview.xpm +++ b/Externals/wxWidgets/art/repview.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *repview_xpm[] = { +static const char * repview_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 3 1", " c Black", diff --git a/Externals/wxWidgets/art/tick.xpm b/Externals/wxWidgets/art/tick.xpm index 440ecb1933..c7ee0e2c1f 100644 --- a/Externals/wxWidgets/art/tick.xpm +++ b/Externals/wxWidgets/art/tick.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *tick_xpm[] = { +static const char * tick_xpm[] = { /* columns rows colors chars-per-pixel */ "10 10 2 1", ". c Gray0", diff --git a/Externals/wxWidgets/art/tipicon.xpm b/Externals/wxWidgets/art/tipicon.xpm index 687fc6c390..712cf8a20f 100644 --- a/Externals/wxWidgets/art/tipicon.xpm +++ b/Externals/wxWidgets/art/tipicon.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *tipicon_xpm[] = { +static const char * tipicon_xpm[] = { /* columns rows colors chars-per-pixel */ "32 32 9 1", "$ c Black", diff --git a/Externals/wxWidgets/art/toparent.xpm b/Externals/wxWidgets/art/toparent.xpm index 09cfc2ca5c..7894fd087a 100644 --- a/Externals/wxWidgets/art/toparent.xpm +++ b/Externals/wxWidgets/art/toparent.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * toparent_xpm[] = { +static const char * toparent_xpm[] = { "16 15 3 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/undo.xpm b/Externals/wxWidgets/art/undo.xpm index 529123fc7b..e750a98ff2 100644 --- a/Externals/wxWidgets/art/undo.xpm +++ b/Externals/wxWidgets/art/undo.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *undo_xpm[] = { +static const char * undo_xpm[] = { /* columns rows colors chars-per-pixel */ "16 15 37 1", "4 c #9BACC2", diff --git a/Externals/wxWidgets/art/up.xpm b/Externals/wxWidgets/art/up.xpm index 57d1168837..922eb6483a 100644 --- a/Externals/wxWidgets/art/up.xpm +++ b/Externals/wxWidgets/art/up.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * up_xpm[] = { +static const char * up_xpm[] = { "16 15 3 1", " c None", ". c Black", diff --git a/Externals/wxWidgets/art/wxwin16x16.xpm b/Externals/wxWidgets/art/wxwin16x16.xpm index c737fbb802..81b85169d2 100644 --- a/Externals/wxWidgets/art/wxwin16x16.xpm +++ b/Externals/wxWidgets/art/wxwin16x16.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *wxwin16x16_xpm[] = { +static const char * wxwin16x16_xpm[] = { "16 16 6 1", " c None", ". c #000000", diff --git a/Externals/wxWidgets/art/wxwin32x32.xpm b/Externals/wxWidgets/art/wxwin32x32.xpm index 34b841a0e8..92829ffd12 100644 --- a/Externals/wxWidgets/art/wxwin32x32.xpm +++ b/Externals/wxWidgets/art/wxwin32x32.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *wxwin32x32_xpm[] = { +static const char * wxwin32x32_xpm[] = { "32 32 6 1", " c None", ". c #000000", diff --git a/Externals/wxWidgets/build/msw/wx_core.vcproj b/Externals/wxWidgets/build/msw/wx_core.vcproj index 696b019ba2..57b6fbd4ac 100644 --- a/Externals/wxWidgets/build/msw/wx_core.vcproj +++ b/Externals/wxWidgets/build/msw/wx_core.vcproj @@ -1,7 +1,7 @@ - - @@ -17021,6 +17017,10 @@ /> + + // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -159,7 +159,7 @@ private: // wxCalendarCtrl events // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_ADV wxCalendarCtrl; +class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl; class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent { diff --git a/Externals/wxWidgets/include/wx/clrpicker.h b/Externals/wxWidgets/include/wx/clrpicker.h index 3a59b5418b..f6a436fc3a 100644 --- a/Externals/wxWidgets/include/wx/clrpicker.h +++ b/Externals/wxWidgets/include/wx/clrpicker.h @@ -5,7 +5,7 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Vadim Zeitlin, Francesco Montorsi -// RCS-ID: $Id: clrpicker.h 41022 2006-09-05 21:02:27Z VZ $ +// RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -20,7 +20,7 @@ #include "wx/pickerbase.h" -class WXDLLIMPEXP_CORE wxColourPickerEvent; +class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent; extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[]; diff --git a/Externals/wxWidgets/include/wx/cmndata.h b/Externals/wxWidgets/include/wx/cmndata.h index 69a0dc5790..a96c4ff724 100644 --- a/Externals/wxWidgets/include/wx/cmndata.h +++ b/Externals/wxWidgets/include/wx/cmndata.h @@ -4,7 +4,7 @@ // Author: Julian Smart and others // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: cmndata.h 45498 2007-04-16 13:03:05Z VZ $ +// RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -23,7 +23,7 @@ #endif -class WXDLLEXPORT wxPrintNativeDataBase; +class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase; class WXDLLEXPORT wxColourData: public wxObject diff --git a/Externals/wxWidgets/include/wx/colour.h b/Externals/wxWidgets/include/wx/colour.h index 11d09747bc..66c45e7722 100644 --- a/Externals/wxWidgets/include/wx/colour.h +++ b/Externals/wxWidgets/include/wx/colour.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: Francesco Montorsi // Created: -// RCS-ID: $Id: colour.h 45981 2007-05-11 22:41:50Z VZ $ +// RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,7 +16,7 @@ #include "wx/gdiobj.h" -class WXDLLEXPORT wxColour; +class WXDLLIMPEXP_FWD_CORE wxColour; // the standard wxColour constructors; // this macro avoids to repeat these lines across all colour.h files, since diff --git a/Externals/wxWidgets/include/wx/confbase.h b/Externals/wxWidgets/include/wx/confbase.h index 03c1dab546..c17e84caf7 100644 --- a/Externals/wxWidgets/include/wx/confbase.h +++ b/Externals/wxWidgets/include/wx/confbase.h @@ -2,11 +2,11 @@ // Name: confbase.h // Purpose: declaration of the base class of all config implementations // (see also: fileconf.h and msw/regconf.h and iniconf.h) -// Author: Karsten Ballüder & Vadim Zeitlin +// Author: Karsten Ballueder & Vadim Zeitlin // Modified by: // Created: 07.04.98 (adapted from appconf.h) -// RCS-ID: $Id: confbase.h 49563 2007-10-31 20:46:21Z VZ $ -// Copyright: (c) 1997 Karsten Ballüder Ballueder@usa.net +// RCS-ID: $Id: confbase.h 50711 2007-12-15 02:57:58Z VZ $ +// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net // Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets/include/wx/containr.h b/Externals/wxWidgets/include/wx/containr.h index 8a446957e2..0cf322c2e0 100644 --- a/Externals/wxWidgets/include/wx/containr.h +++ b/Externals/wxWidgets/include/wx/containr.h @@ -5,7 +5,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.08.01 -// RCS-ID: $Id: containr.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: containr.h 50863 2007-12-20 18:32:55Z VS $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -126,6 +126,7 @@ void classname::SetFocusIgnoringChildren() \ void classname::OnChildFocus(wxChildFocusEvent& event) \ { \ m_container.SetLastFocus(event.GetWindow()); \ + event.Skip(); \ } \ \ void classname::OnFocus(wxFocusEvent& event) \ diff --git a/Externals/wxWidgets/include/wx/cppunit.h b/Externals/wxWidgets/include/wx/cppunit.h index 6e159fd772..c6057a02f2 100644 --- a/Externals/wxWidgets/include/wx/cppunit.h +++ b/Externals/wxWidgets/include/wx/cppunit.h @@ -3,7 +3,7 @@ // Purpose: wrapper header for CppUnit headers // Author: Vadim Zeitlin // Created: 15.02.04 -// RCS-ID: $Id: cppunit.h 49019 2007-10-02 14:56:53Z MW $ +// RCS-ID: $Id: cppunit.h 53917 2008-06-01 20:32:26Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -87,6 +87,10 @@ // Use this macro to compare a size_t with a literal integer #define WX_ASSERT_SIZET_EQUAL(n, m) CPPUNIT_ASSERT_EQUAL(((size_t)n), m) +// Use this macro to compare the expected time_t value with the result of not +// necessarily time_t type +#define WX_ASSERT_TIME_T_EQUAL(t, n) CPPUNIT_ASSERT_EQUAL((t), (time_t)(n)) + /////////////////////////////////////////////////////////////////////////////// // stream inserter for wxString diff --git a/Externals/wxWidgets/include/wx/dataview.h b/Externals/wxWidgets/include/wx/dataview.h index c84a424ea3..37f61e3d88 100644 --- a/Externals/wxWidgets/include/wx/dataview.h +++ b/Externals/wxWidgets/include/wx/dataview.h @@ -4,7 +4,7 @@ // Author: Robert Roebling // Modified by: // Created: 08.01.06 -// RCS-ID: $Id: dataview.h 42909 2006-11-01 15:24:48Z RR $ +// RCS-ID: $Id: dataview.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,11 +39,11 @@ // wxDataViewCtrl globals // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_ADV wxDataViewModel; -class WXDLLIMPEXP_ADV wxDataViewListModel; -class WXDLLIMPEXP_ADV wxDataViewCtrl; -class WXDLLIMPEXP_ADV wxDataViewColumn; -class WXDLLIMPEXP_ADV wxDataViewRenderer; +class WXDLLIMPEXP_FWD_ADV wxDataViewModel; +class WXDLLIMPEXP_FWD_ADV wxDataViewListModel; +class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl; +class WXDLLIMPEXP_FWD_ADV wxDataViewColumn; +class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer; extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[]; diff --git a/Externals/wxWidgets/include/wx/datetime.h b/Externals/wxWidgets/include/wx/datetime.h index ca0c8712c4..53aea2a473 100644 --- a/Externals/wxWidgets/include/wx/datetime.h +++ b/Externals/wxWidgets/include/wx/datetime.h @@ -5,7 +5,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 10.02.99 -// RCS-ID: $Id: datetime.h 48283 2007-08-21 12:14:26Z JS $ +// RCS-ID: $Id: datetime.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,9 +27,9 @@ #include "wx/longlong.h" -class WXDLLIMPEXP_BASE wxDateTime; -class WXDLLIMPEXP_BASE wxTimeSpan; -class WXDLLIMPEXP_BASE wxDateSpan; +class WXDLLIMPEXP_FWD_BASE wxDateTime; +class WXDLLIMPEXP_FWD_BASE wxTimeSpan; +class WXDLLIMPEXP_FWD_BASE wxDateSpan; #include "wx/dynarray.h" @@ -125,7 +125,7 @@ WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*); // argument for arguments of type wxDateTime; it is also returned by all // functions returning wxDateTime on failure (this is why it is also called // wxInvalidDateTime) -class WXDLLIMPEXP_BASE wxDateTime; +class WXDLLIMPEXP_FWD_BASE wxDateTime; extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultDateTimeFormat; extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultTimeSpanFormat; @@ -421,8 +421,21 @@ public: { public: TimeZone(TZ tz); + + // don't use this ctor, it doesn't work for negative offsets (but can't + // be removed or changed to avoid breaking ABI in 2.8) TimeZone(wxDateTime_t offset = 0) { m_offset = offset; } +#if wxABI_VERSION >= 20808 + // create time zone object with the given offset + static TimeZone Make(long offset) + { + TimeZone tz; + tz.m_offset = offset; + return tz; + } +#endif // wxABI 2.8.8+ + long GetOffset() const { return m_offset; } private: @@ -1494,7 +1507,7 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray, WXDLLIMPEXP_BASE) // virtual methods to work with the holidays they correspond to. // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_BASE wxDateTimeHolidayAuthority; +class WXDLLIMPEXP_FWD_BASE wxDateTimeHolidayAuthority; WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxDateTimeHolidayAuthority *, wxHolidayAuthoritiesArray, class WXDLLIMPEXP_BASE); diff --git a/Externals/wxWidgets/include/wx/dc.h b/Externals/wxWidgets/include/wx/dc.h index 405f05db8d..cfcfa54018 100644 --- a/Externals/wxWidgets/include/wx/dc.h +++ b/Externals/wxWidgets/include/wx/dc.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05/25/99 -// RCS-ID: $Id: dc.h 43745 2006-12-02 14:11:15Z VZ $ +// RCS-ID: $Id: dc.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -30,8 +30,8 @@ #include "wx/dynarray.h" #include "wx/math.h" -class WXDLLEXPORT wxDC; -class WXDLLEXPORT wxDCBase; +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxDCBase; class WXDLLEXPORT wxDrawObject { diff --git a/Externals/wxWidgets/include/wx/dcgraph.h b/Externals/wxWidgets/include/wx/dcgraph.h index 50ce9179c9..8245f8145e 100644 --- a/Externals/wxWidgets/include/wx/dcgraph.h +++ b/Externals/wxWidgets/include/wx/dcgraph.h @@ -5,7 +5,7 @@ // Modified by: // Created: // Copyright: (c) Stefan Csomor -// RCS-ID: $Id: dcgraph.h 49295 2007-10-21 18:02:10Z SC $ +// RCS-ID: $Id: dcgraph.h 53390 2008-04-28 04:19:15Z KO $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets/include/wx/dde.h b/Externals/wxWidgets/include/wx/dde.h index 59eefc70d1..495e9e27a3 100644 --- a/Externals/wxWidgets/include/wx/dde.h +++ b/Externals/wxWidgets/include/wx/dde.h @@ -5,7 +5,7 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dde.h 33948 2005-05-04 18:57:50Z JS $ +// RCS-ID: $Id: dde.h 53135 2008-04-12 02:31:04Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -14,9 +14,9 @@ #include "wx/list.h" -class WXDLLIMPEXP_BASE wxDDEClient; -class WXDLLIMPEXP_BASE wxDDEServer; -class WXDLLIMPEXP_BASE wxDDEConnection; +class WXDLLIMPEXP_FWD_BASE wxDDEClient; +class WXDLLIMPEXP_FWD_BASE wxDDEServer; +class WXDLLIMPEXP_FWD_BASE wxDDEConnection; WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE); WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE); diff --git a/Externals/wxWidgets/include/wx/debug.h b/Externals/wxWidgets/include/wx/debug.h index 1887a2818a..61cd93875c 100644 --- a/Externals/wxWidgets/include/wx/debug.h +++ b/Externals/wxWidgets/include/wx/debug.h @@ -4,7 +4,7 @@ * Author: Vadim Zeitlin * Modified by: Ryan Norton (Converted to C) * Created: 29/01/98 -* RCS-ID: $Id: debug.h 39943 2006-07-02 21:40:38Z SN $ +* RCS-ID: $Id: debug.h 53711 2008-05-22 22:58:28Z SN $ * Copyright: (c) 1998 Vadim Zeitlin * Licence: wxWindows licence */ @@ -210,7 +210,10 @@ wxFAIL_COND_MSG(#cond, msg); \ op; \ } \ - struct wxDummyCheckStruct /* just to force a semicolon */ + typedef int wxDummyCheckInt /* just to force a semicolon */ + /* NB: old gcc versions (e.g. 2.8) give an internal compiler error */ + /* on a simple forward declaration, when used in a template */ + /* function, so rather use a dummy typedef which does work... */ #endif /* special form of wxCHECK2: as wxCHECK, but for use in void functions */ diff --git a/Externals/wxWidgets/include/wx/defs.h b/Externals/wxWidgets/include/wx/defs.h index 261352a938..4814dc8ced 100644 --- a/Externals/wxWidgets/include/wx/defs.h +++ b/Externals/wxWidgets/include/wx/defs.h @@ -4,7 +4,7 @@ * Author: Julian Smart and others * Modified by: Ryan Norton (Converted to C) * Created: 01/02/97 - * RCS-ID: $Id: defs.h 49612 2007-11-03 23:50:04Z VZ $ + * RCS-ID: $Id: defs.h 53370 2008-04-26 05:43:41Z KO $ * Copyright: (c) Julian Smart * Licence: wxWindows licence */ @@ -1273,6 +1273,9 @@ enum wxStretch wxEXPAND = wxGROW, wxSHAPED = 0x4000, wxFIXED_MINSIZE = 0x8000, +#if wxABI_VERSION >= 20808 + wxRESERVE_SPACE_EVEN_IF_HIDDEN = 0x0002, +#endif wxTILE = 0xc000, /* for compatibility only, default now, don't use explicitly any more */ @@ -2313,6 +2316,17 @@ enum wxUpdateUI wxUPDATE_UI_FROMIDLE = 0x0002 /* Invoked from On(Internal)Idle */ }; +/* ---------------------------------------------------------------------------- */ +/* Notification Event flags - used for dock icon bouncing, etc. */ +/* ---------------------------------------------------------------------------- */ + +enum wxNotificationOptions +{ + wxNOTIFY_NONE = 0x0000, + wxNOTIFY_ONCE = 0x0001, + wxNOTIFY_REPEAT = 0x0002 +}; + /* ---------------------------------------------------------------------------- */ /* miscellaneous */ /* ---------------------------------------------------------------------------- */ diff --git a/Externals/wxWidgets/include/wx/dir.h b/Externals/wxWidgets/include/wx/dir.h index 255f15195f..90cee0225e 100644 --- a/Externals/wxWidgets/include/wx/dir.h +++ b/Externals/wxWidgets/include/wx/dir.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 08.12.99 -// RCS-ID: $Id: dir.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: dir.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -78,7 +78,7 @@ public: // wxDir: portable equivalent of {open/read/close}dir functions // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_BASE wxDirData; +class WXDLLIMPEXP_FWD_BASE wxDirData; class WXDLLIMPEXP_BASE wxDir { diff --git a/Externals/wxWidgets/include/wx/docview.h b/Externals/wxWidgets/include/wx/docview.h index 9b36b07739..c19bae19df 100644 --- a/Externals/wxWidgets/include/wx/docview.h +++ b/Externals/wxWidgets/include/wx/docview.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: docview.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: docview.h 53546 2008-05-10 21:02:36Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -32,7 +32,7 @@ class WXDLLIMPEXP_FWD_CORE wxDocManager; class WXDLLIMPEXP_FWD_CORE wxPrintInfo; class WXDLLIMPEXP_FWD_CORE wxCommandProcessor; class WXDLLIMPEXP_FWD_CORE wxFileHistory; -class WXDLLIMPEXP_FWD_CORE wxConfigBase; +class WXDLLIMPEXP_FWD_BASE wxConfigBase; #if wxUSE_STD_IOSTREAM #include "wx/iosfwrap.h" @@ -246,7 +246,7 @@ private: class WXDLLEXPORT wxDocTemplate: public wxObject { -friend class WXDLLEXPORT wxDocManager; +friend class WXDLLIMPEXP_FWD_CORE wxDocManager; public: // Associate document and view types. They're for identifying what view is @@ -408,8 +408,22 @@ public: wxList& GetTemplates() { return m_templates; } // Make a default document name + // + // NB: this method is renamed to MakeNewDocumentName() in wx 3.0, you still + // need to override it if your code needs to customize the default name + // generation but if you just use it from your code, prefer the version + // below which is forward-compatible with wx 3.0 virtual bool MakeDefaultName(wxString& buf); +#if wxABI_VERSION >= 20808 + wxString MakeNewDocumentName() const + { + wxString s; + wx_const_cast(wxDocManager *, this)->MakeDefaultName(s); + return s; + } +#endif // wx ABI >= 2.8.8 + // Make a frame title (override this to do something different) virtual wxString MakeFrameTitle(wxDocument* doc); diff --git a/Externals/wxWidgets/include/wx/dynlib.h b/Externals/wxWidgets/include/wx/dynlib.h index 2b74627392..c48f3c8801 100644 --- a/Externals/wxWidgets/include/wx/dynlib.h +++ b/Externals/wxWidgets/include/wx/dynlib.h @@ -4,7 +4,7 @@ // Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik // Modified by: // Created: 20/07/98 -// RCS-ID: $Id: dynlib.h 36214 2005-11-20 21:23:53Z VZ $ +// RCS-ID: $Id: dynlib.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -32,7 +32,7 @@ #define wxHAVE_DYNLIB_ERROR #endif -class WXDLLIMPEXP_BASE wxDynamicLibraryDetailsCreator; +class WXDLLIMPEXP_FWD_BASE wxDynamicLibraryDetailsCreator; // ---------------------------------------------------------------------------- // conditional compilation @@ -42,14 +42,15 @@ class WXDLLIMPEXP_BASE wxDynamicLibraryDetailsCreator; // native version, even if configure detected presence of DLOPEN. #if defined(__OS2__) || defined(__EMX__) || defined(__WINDOWS__) typedef HMODULE wxDllType; +#elif defined(__DARWIN__) + // Don't include dlfcn.h on Darwin, we may be using our own replacements. + typedef void *wxDllType; #elif defined(HAVE_DLOPEN) #include typedef void *wxDllType; #elif defined(HAVE_SHL_LOAD) #include typedef shl_t wxDllType; -#elif defined(__DARWIN__) - typedef void *wxDllType; #elif defined(__WXMAC__) #include typedef CFragConnectionID wxDllType; diff --git a/Externals/wxWidgets/include/wx/dynload.h b/Externals/wxWidgets/include/wx/dynload.h index ee809a3936..8f3805f10e 100644 --- a/Externals/wxWidgets/include/wx/dynload.h +++ b/Externals/wxWidgets/include/wx/dynload.h @@ -5,7 +5,7 @@ // (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux) // Modified by: // Created: 03/12/01 -// RCS-ID: $Id: dynload.h 36973 2006-01-18 16:45:41Z JS $ +// RCS-ID: $Id: dynload.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 2001 Ron Lee // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,7 +25,7 @@ #include "wx/hashmap.h" #include "wx/module.h" -class WXDLLIMPEXP_BASE wxPluginLibrary; +class WXDLLIMPEXP_FWD_BASE wxPluginLibrary; WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPluginLibrary *, wxDLManifest, diff --git a/Externals/wxWidgets/include/wx/event.h b/Externals/wxWidgets/include/wx/event.h index 00f67158a5..0d0889b49e 100644 --- a/Externals/wxWidgets/include/wx/event.h +++ b/Externals/wxWidgets/include/wx/event.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: event.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: event.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,7 +39,7 @@ class WXDLLIMPEXP_FWD_BASE wxList; class WXDLLIMPEXP_FWD_CORE wxWindowBase; #endif // wxUSE_GUI -class WXDLLIMPEXP_BASE wxEvtHandler; +class WXDLLIMPEXP_FWD_BASE wxEvtHandler; // ---------------------------------------------------------------------------- // Event types @@ -414,7 +414,7 @@ protected: private: // it needs to access our m_propagationLevel - friend class WXDLLIMPEXP_BASE wxPropagateOnce; + friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce; DECLARE_ABSTRACT_CLASS(wxEvent) }; diff --git a/Externals/wxWidgets/include/wx/evtloop.h b/Externals/wxWidgets/include/wx/evtloop.h index 8c04bed5da..3f44e8688a 100644 --- a/Externals/wxWidgets/include/wx/evtloop.h +++ b/Externals/wxWidgets/include/wx/evtloop.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 01.06.01 -// RCS-ID: $Id: evtloop.h 40865 2006-08-27 09:42:42Z VS $ +// RCS-ID: $Id: evtloop.h 53607 2008-05-16 15:21:40Z SN $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -14,7 +14,7 @@ #include "wx/utils.h" -class WXDLLEXPORT wxEventLoop; +class WXDLLIMPEXP_FWD_CORE wxEventLoop; // ---------------------------------------------------------------------------- // wxEventLoop: a GUI event loop @@ -198,4 +198,32 @@ private: wxEventLoop *m_evtLoopOld; }; +#if wxABI_VERSION >= 20808 +class wxEventLoopGuarantor +{ +public: + wxEventLoopGuarantor() + { + m_evtLoopNew = NULL; + if (!wxEventLoop::GetActive()) + { + m_evtLoopNew = new wxEventLoop; + wxEventLoop::SetActive(m_evtLoopNew); + } + } + + ~wxEventLoopGuarantor() + { + if (m_evtLoopNew) + { + wxEventLoop::SetActive(NULL); + delete m_evtLoopNew; + } + } + +private: + wxEventLoop *m_evtLoopNew; +}; +#endif // wxABI_VERSION >= 20805 + #endif // _WX_EVTLOOP_H_ diff --git a/Externals/wxWidgets/include/wx/fdrepdlg.h b/Externals/wxWidgets/include/wx/fdrepdlg.h index 822ec2b7f0..87d1544970 100644 --- a/Externals/wxWidgets/include/wx/fdrepdlg.h +++ b/Externals/wxWidgets/include/wx/fdrepdlg.h @@ -18,10 +18,10 @@ #include "wx/dialog.h" -class WXDLLEXPORT wxFindDialogEvent; -class WXDLLEXPORT wxFindReplaceDialog; -class WXDLLEXPORT wxFindReplaceData; -class WXDLLEXPORT wxFindReplaceDialogImpl; +class WXDLLIMPEXP_FWD_CORE wxFindDialogEvent; +class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialog; +class WXDLLIMPEXP_FWD_CORE wxFindReplaceData; +class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialogImpl; // ---------------------------------------------------------------------------- // Flags for wxFindReplaceData.Flags diff --git a/Externals/wxWidgets/include/wx/fileconf.h b/Externals/wxWidgets/include/wx/fileconf.h index eae7039f7c..47c483f269 100644 --- a/Externals/wxWidgets/include/wx/fileconf.h +++ b/Externals/wxWidgets/include/wx/fileconf.h @@ -4,8 +4,8 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.04.98 (adapted from appconf.cpp) -// RCS-ID: $Id: fileconf.h 49563 2007-10-31 20:46:21Z VZ $ -// Copyright: (c) 1997 Karsten Ballüder & Vadim Zeitlin +// RCS-ID: $Id: fileconf.h 50711 2007-12-15 02:57:58Z VZ $ +// Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin // Ballueder@usa.net // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets/include/wx/filefn.h b/Externals/wxWidgets/include/wx/filefn.h index b0aa5acd88..e2ceee3c87 100644 --- a/Externals/wxWidgets/include/wx/filefn.h +++ b/Externals/wxWidgets/include/wx/filefn.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: filefn.h 49998 2007-11-16 17:19:37Z CE $ +// RCS-ID: $Id: filefn.h 53877 2008-05-31 12:43:44Z SN $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -197,7 +197,7 @@ enum wxFileKind // to avoid using them as they're not present in earlier versions and // always using the native functions spelling is easier than testing for // the versions - #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) + #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__) #define wxPOSIX_IDENT(func) ::func #else // by default assume MSVC-compatible names #define wxPOSIX_IDENT(func) _ ## func @@ -232,9 +232,16 @@ enum wxFileKind #endif #ifdef wxHAS_HUGE_FILES - #define wxSeek wxPOSIX_IDENT(lseeki64) - #define wxLseek wxPOSIX_IDENT(lseeki64) - #define wxTell wxPOSIX_IDENT(telli64) + #ifndef __MINGW64__ + #define wxSeek wxPOSIX_IDENT(lseeki64) + #define wxLseek wxPOSIX_IDENT(lseeki64) + #define wxTell wxPOSIX_IDENT(telli64) + #else + // unfortunately, mingw-W64 is somewhat inconsistent... + #define wxSeek _lseeki64 + #define wxLseek _lseeki64 + #define wxTell _telli64 + #endif #else // !wxHAS_HUGE_FILES #define wxSeek wxPOSIX_IDENT(lseek) #define wxLseek wxPOSIX_IDENT(lseek) @@ -242,12 +249,15 @@ enum wxFileKind #endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES #ifndef __WATCOMC__ - #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540) - // NB: this one is not POSIX and always has the underscore - #define wxFsync _commit + #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540) + // NB: this one is not POSIX and always has the underscore + #define wxFsync _commit - #define HAVE_FSYNC - #endif // BORLANDC + // could be already defined by configure (Cygwin) + #ifndef HAVE_FSYNC + #define HAVE_FSYNC + #endif + #endif // BORLANDC #endif #define wxEof wxPOSIX_IDENT(eof) diff --git a/Externals/wxWidgets/include/wx/filesys.h b/Externals/wxWidgets/include/wx/filesys.h index 4a0c7aa152..3d40f11048 100644 --- a/Externals/wxWidgets/include/wx/filesys.h +++ b/Externals/wxWidgets/include/wx/filesys.h @@ -3,7 +3,7 @@ // Purpose: class for opening files - virtual file system // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// RCS-ID: $Id: filesys.h 43263 2006-11-10 09:00:06Z MW $ +// RCS-ID: $Id: filesys.h 53135 2008-04-12 02:31:04Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,9 +27,9 @@ #include "wx/filename.h" #include "wx/hashmap.h" -class WXDLLIMPEXP_BASE wxFSFile; -class WXDLLIMPEXP_BASE wxFileSystemHandler; -class WXDLLIMPEXP_BASE wxFileSystem; +class WXDLLIMPEXP_FWD_BASE wxFSFile; +class WXDLLIMPEXP_FWD_BASE wxFileSystemHandler; +class WXDLLIMPEXP_FWD_BASE wxFileSystem; //-------------------------------------------------------------------------------- // wxFSFile diff --git a/Externals/wxWidgets/include/wx/font.h b/Externals/wxWidgets/include/wx/font.h index 051f47be3a..7512626265 100644 --- a/Externals/wxWidgets/include/wx/font.h +++ b/Externals/wxWidgets/include/wx/font.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.09.99 -// RCS-ID: $Id: font.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: font.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -105,7 +105,7 @@ enum // wxFontBase represents a font object // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxNativeFontInfo; +class WXDLLIMPEXP_FWD_CORE wxNativeFontInfo; class WXDLLEXPORT wxFontBase : public wxGDIObject { diff --git a/Externals/wxWidgets/include/wx/fontpicker.h b/Externals/wxWidgets/include/wx/fontpicker.h index e64159e2aa..d13d0b22fc 100644 --- a/Externals/wxWidgets/include/wx/fontpicker.h +++ b/Externals/wxWidgets/include/wx/fontpicker.h @@ -5,7 +5,7 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: fontpicker.h 42999 2006-11-03 21:54:13Z VZ $ +// RCS-ID: $Id: fontpicker.h 53135 2008-04-12 02:31:04Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -20,7 +20,7 @@ #include "wx/pickerbase.h" -class WXDLLIMPEXP_CORE wxFontPickerEvent; +class WXDLLIMPEXP_FWD_CORE wxFontPickerEvent; extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerWidgetNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerCtrlNameStr[]; diff --git a/Externals/wxWidgets/include/wx/gbsizer.h b/Externals/wxWidgets/include/wx/gbsizer.h index 2ad9cb911d..dd2f31bec7 100644 --- a/Externals/wxWidgets/include/wx/gbsizer.h +++ b/Externals/wxWidgets/include/wx/gbsizer.h @@ -6,7 +6,7 @@ // // Author: Robin Dunn // Created: 03-Nov-2003 -// RCS-ID: $Id: gbsizer.h 35650 2005-09-23 12:56:45Z MR $ +// RCS-ID: $Id: gbsizer.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Robin Dunn // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -79,7 +79,7 @@ extern WXDLLEXPORT_DATA(const wxGBSpan) wxDefaultSpan; // wxGBSizerItem //--------------------------------------------------------------------------- -class WXDLLEXPORT wxGridBagSizer; +class WXDLLIMPEXP_FWD_CORE wxGridBagSizer; class WXDLLEXPORT wxGBSizerItem : public wxSizerItem @@ -286,6 +286,9 @@ public: protected: wxGBPosition FindEmptyCell(); +#if wxABI_VERSION >= 20808 + void AdjustForOverflow(); +#endif wxSize m_emptyCellSize; diff --git a/Externals/wxWidgets/include/wx/generic/dataview.h b/Externals/wxWidgets/include/wx/generic/dataview.h index db51530bb3..7369063e92 100644 --- a/Externals/wxWidgets/include/wx/generic/dataview.h +++ b/Externals/wxWidgets/include/wx/generic/dataview.h @@ -2,7 +2,7 @@ // Name: wx/generic/dataview.h // Purpose: wxDataViewCtrl generic implementation header // Author: Robert Roebling -// Id: $Id: dataview.h 41659 2006-10-06 09:50:45Z RR $ +// Id: $Id: dataview.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,9 +21,9 @@ // classes // --------------------------------------------------------- -class WXDLLIMPEXP_ADV wxDataViewCtrl; -class WXDLLIMPEXP_ADV wxDataViewMainWindow; -class WXDLLIMPEXP_ADV wxDataViewHeaderWindow; +class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl; +class WXDLLIMPEXP_FWD_ADV wxDataViewMainWindow; +class WXDLLIMPEXP_FWD_ADV wxDataViewHeaderWindow; // --------------------------------------------------------- // wxDataViewRenderer diff --git a/Externals/wxWidgets/include/wx/generic/dirctrlg.h b/Externals/wxWidgets/include/wx/generic/dirctrlg.h index 3f24437676..b4cea43b5f 100644 --- a/Externals/wxWidgets/include/wx/generic/dirctrlg.h +++ b/Externals/wxWidgets/include/wx/generic/dirctrlg.h @@ -7,7 +7,7 @@ // Author: Robert Roebling, Harm van der Heijden, Julian Smart et al // Modified by: // Created: 21/3/2000 -// RCS-ID: $Id: dirctrlg.h 49804 2007-11-10 01:09:42Z VZ $ +// RCS-ID: $Id: dirctrlg.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -76,7 +76,7 @@ public: // wxDirCtrl //----------------------------------------------------------------------------- -class WXDLLEXPORT wxDirFilterListCtrl; +class WXDLLIMPEXP_FWD_CORE wxDirFilterListCtrl; class WXDLLEXPORT wxGenericDirCtrl: public wxControl { diff --git a/Externals/wxWidgets/include/wx/generic/grid.h b/Externals/wxWidgets/include/wx/generic/grid.h index e55ed0aec0..024e4ee6ba 100644 --- a/Externals/wxWidgets/include/wx/generic/grid.h +++ b/Externals/wxWidgets/include/wx/generic/grid.h @@ -4,7 +4,7 @@ // Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) // Modified by: Santiago Palacios // Created: 1/08/1999 -// RCS-ID: $Id: grid.h 49804 2007-11-10 01:09:42Z VZ $ +// RCS-ID: $Id: grid.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -51,6 +51,12 @@ extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxGridNameStr[]; #define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING #define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER +#if wxABI_VERSION >= 20808 + // magic constant which tells (to some functions) to automatically + // calculate the appropriate size + #define wxGRID_AUTOSIZE (-1) +#endif // wxABI_VERSION >= 20808 + // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- @@ -1996,7 +2002,11 @@ protected: bool GetModelValues(); bool SetModelValues(); - friend class WXDLLIMPEXP_ADV wxGridSelection; +private: + // Calculate the minimum acceptable size for labels area + wxCoord CalcColOrRowLabelAreaMinSize(bool column /* or row? */); + + friend class WXDLLIMPEXP_FWD_ADV wxGridSelection; DECLARE_DYNAMIC_CLASS( wxGrid ) DECLARE_EVENT_TABLE() diff --git a/Externals/wxWidgets/include/wx/generic/helpext.h b/Externals/wxWidgets/include/wx/generic/helpext.h index cf56646497..f5ba978d1f 100644 --- a/Externals/wxWidgets/include/wx/generic/helpext.h +++ b/Externals/wxWidgets/include/wx/generic/helpext.h @@ -1,10 +1,10 @@ /*-*- c++ -*-******************************************************** * helpext.h - an external help controller for wxWidgets * * * - * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) * + * (C) 1998 by Karsten Ballueder (Ballueder@usa.net) * * License: wxWindows licence * * * - * $Id: helpext.h 41020 2006-09-05 20:47:48Z VZ $ + * $Id: helpext.h 50711 2007-12-15 02:57:58Z VZ $ *******************************************************************/ #ifndef __WX_HELPEXT_H_ diff --git a/Externals/wxWidgets/include/wx/generic/progdlgg.h b/Externals/wxWidgets/include/wx/generic/progdlgg.h index c5bee103af..6382d1fc8b 100644 --- a/Externals/wxWidgets/include/wx/generic/progdlgg.h +++ b/Externals/wxWidgets/include/wx/generic/progdlgg.h @@ -1,11 +1,11 @@ //////////////////////////////////////////////////// // Name: progdlgg.h // Purpose: wxProgressDialog class -// Author: Karsten Ballüder +// Author: Karsten Ballueder // Modified by: // Created: 09.05.1999 -// RCS-ID: $Id: progdlgg.h 49563 2007-10-31 20:46:21Z VZ $ -// Copyright: (c) Karsten Ballüder +// RCS-ID: $Id: progdlgg.h 50711 2007-12-15 02:57:58Z VZ $ +// Copyright: (c) Karsten Ballueder // Licence: wxWindows licence //////////////////////////////////////////////////// diff --git a/Externals/wxWidgets/include/wx/generic/spinctlg.h b/Externals/wxWidgets/include/wx/generic/spinctlg.h index 17e381d6d3..386c881c2c 100644 --- a/Externals/wxWidgets/include/wx/generic/spinctlg.h +++ b/Externals/wxWidgets/include/wx/generic/spinctlg.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 28.10.99 -// RCS-ID: $Id: spinctlg.h 35650 2005-09-23 12:56:45Z MR $ +// RCS-ID: $Id: spinctlg.h 52582 2008-03-17 13:46:31Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -74,6 +74,7 @@ public: // forward these functions to all subcontrols virtual bool Enable(bool enable = true); virtual bool Show(bool show = true); + virtual bool Reparent(wxWindow *newParent); // get the subcontrols wxTextCtrl *GetText() const { return m_text; } diff --git a/Externals/wxWidgets/include/wx/generic/splash.h b/Externals/wxWidgets/include/wx/generic/splash.h index e7cf5cd22a..cd0062d6c4 100644 --- a/Externals/wxWidgets/include/wx/generic/splash.h +++ b/Externals/wxWidgets/include/wx/generic/splash.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: // Created: 28/6/2000 -// RCS-ID: $Id: splash.h 41020 2006-09-05 20:47:48Z VZ $ +// RCS-ID: $Id: splash.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -27,7 +27,7 @@ #define wxSPLASH_TIMEOUT 0x04 #define wxSPLASH_NO_TIMEOUT 0x00 -class WXDLLIMPEXP_ADV wxSplashScreenWindow; +class WXDLLIMPEXP_FWD_ADV wxSplashScreenWindow; /* * wxSplashScreen diff --git a/Externals/wxWidgets/include/wx/generic/splitter.h b/Externals/wxWidgets/include/wx/generic/splitter.h index ebd34dfa59..3ea6b1147d 100644 --- a/Externals/wxWidgets/include/wx/generic/splitter.h +++ b/Externals/wxWidgets/include/wx/generic/splitter.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: splitter.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: splitter.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -15,7 +15,7 @@ #include "wx/window.h" // base class declaration #include "wx/containr.h" // wxControlContainer -class WXDLLEXPORT wxSplitterEvent; +class WXDLLIMPEXP_FWD_CORE wxSplitterEvent; // --------------------------------------------------------------------------- // splitter constants diff --git a/Externals/wxWidgets/include/wx/generic/srchctlg.h b/Externals/wxWidgets/include/wx/generic/srchctlg.h index 47285bbf54..8f7a42e52e 100644 --- a/Externals/wxWidgets/include/wx/generic/srchctlg.h +++ b/Externals/wxWidgets/include/wx/generic/srchctlg.h @@ -3,7 +3,7 @@ // Purpose: generic wxSearchCtrl class // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctlg.h 45828 2007-05-05 14:51:51Z VZ $ +// RCS-ID: $Id: srchctlg.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: Vince Harron // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -15,8 +15,8 @@ #include "wx/bitmap.h" -class WXDLLEXPORT wxSearchButton; -class WXDLLEXPORT wxSearchTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxSearchButton; +class WXDLLIMPEXP_FWD_CORE wxSearchTextCtrl; // ---------------------------------------------------------------------------- // wxSearchCtrl is a combination of wxTextCtrl and wxSearchButton diff --git a/Externals/wxWidgets/include/wx/geometry.h b/Externals/wxWidgets/include/wx/geometry.h index 29af95f252..c4e67817f0 100644 --- a/Externals/wxWidgets/include/wx/geometry.h +++ b/Externals/wxWidgets/include/wx/geometry.h @@ -4,7 +4,7 @@ // Author: Stefan Csomor // Modified by: // Created: 08/05/99 -// RCS-ID: $Id: geometry.h 49294 2007-10-21 17:59:09Z SC $ +// RCS-ID: $Id: geometry.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1999 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,8 +20,8 @@ #include "wx/gdicmn.h" #include "wx/math.h" -class WXDLLIMPEXP_BASE wxDataInputStream; -class WXDLLIMPEXP_BASE wxDataOutputStream; +class WXDLLIMPEXP_FWD_BASE wxDataInputStream; +class WXDLLIMPEXP_FWD_BASE wxDataOutputStream; // clipping from Cohen-Sutherland diff --git a/Externals/wxWidgets/include/wx/graphics.h b/Externals/wxWidgets/include/wx/graphics.h index efd6792c6c..0b445cb2e3 100644 --- a/Externals/wxWidgets/include/wx/graphics.h +++ b/Externals/wxWidgets/include/wx/graphics.h @@ -5,13 +5,15 @@ // Modified by: // Created: // Copyright: (c) Stefan Csomor -// RCS-ID: $Id: graphics.h 49402 2007-10-24 14:48:10Z VZ $ +// RCS-ID: $Id: graphics.h 50671 2007-12-12 20:19:36Z MR $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_GRAPHICS_H_ #define _WX_GRAPHICS_H_ +#include "wx/defs.h" + #if wxUSE_GRAPHICS_CONTEXT #include "wx/geometry.h" diff --git a/Externals/wxWidgets/include/wx/hash.h b/Externals/wxWidgets/include/wx/hash.h index f5cd926412..9937bbe4e4 100644 --- a/Externals/wxWidgets/include/wx/hash.h +++ b/Externals/wxWidgets/include/wx/hash.h @@ -4,7 +4,7 @@ // Author: Julian Smart // Modified by: VZ at 25.02.00: type safe hashes with WX_DECLARE_HASH() // Created: 01/02/97 -// RCS-ID: $Id: hash.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: hash.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -312,7 +312,7 @@ private: class WXDLLIMPEXP_BASE wxHashTable_Node : public wxHashTableBase_Node { - friend class WXDLLIMPEXP_BASE wxHashTable; + friend class WXDLLIMPEXP_FWD_BASE wxHashTable; public: wxHashTable_Node( long key, void* value, wxHashTableBase* table ) diff --git a/Externals/wxWidgets/include/wx/html/helpdata.h b/Externals/wxWidgets/include/wx/html/helpdata.h index 1d7de2083f..20175732e2 100644 --- a/Externals/wxWidgets/include/wx/html/helpdata.h +++ b/Externals/wxWidgets/include/wx/html/helpdata.h @@ -4,7 +4,7 @@ // Notes: Based on htmlhelp.cpp, implementing a monolithic // HTML Help controller class, by Vaclav Slavik // Author: Harm van der Heijden and Vaclav Slavik -// RCS-ID: $Id: helpdata.h 41020 2006-09-05 20:47:48Z VZ $ +// RCS-ID: $Id: helpdata.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) Harm van der Heijden and Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,7 +22,7 @@ #include "wx/dynarray.h" #include "wx/font.h" -class WXDLLIMPEXP_HTML wxHtmlHelpData; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpData; //-------------------------------------------------------------------------------- // helper classes & structs diff --git a/Externals/wxWidgets/include/wx/html/helpfrm.h b/Externals/wxWidgets/include/wx/html/helpfrm.h index 81147ef327..26ee3fdd78 100644 --- a/Externals/wxWidgets/include/wx/html/helpfrm.h +++ b/Externals/wxWidgets/include/wx/html/helpfrm.h @@ -4,7 +4,7 @@ // Notes: Based on htmlhelp.cpp, implementing a monolithic // HTML Help controller class, by Vaclav Slavik // Author: Harm van der Heijden and Vaclav Slavik -// RCS-ID: $Id: helpfrm.h 49563 2007-10-31 20:46:21Z VZ $ +// RCS-ID: $Id: helpfrm.h 50202 2007-11-23 21:29:29Z VZ $ // Copyright: (c) Harm van der Heijden and Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -64,7 +64,7 @@ class wxHtmlHelpMergedIndex; class WXDLLIMPEXP_FWD_CORE wxHelpControllerBase; class WXDLLIMPEXP_FWD_HTML wxHtmlHelpController; -class WXDLLIMPEXP_FWD_CORE wxHtmlHelpWindow; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpWindow; class WXDLLIMPEXP_HTML wxHtmlHelpFrame : public wxFrame { diff --git a/Externals/wxWidgets/include/wx/html/htmlcell.h b/Externals/wxWidgets/include/wx/html/htmlcell.h index 6d85443aa8..70113d1f7e 100644 --- a/Externals/wxWidgets/include/wx/html/htmlcell.h +++ b/Externals/wxWidgets/include/wx/html/htmlcell.h @@ -3,7 +3,7 @@ // Purpose: wxHtmlCell class is used by wxHtmlWindow/wxHtmlWinParser // as a basic visual element of HTML page // Author: Vaclav Slavik -// RCS-ID: $Id: htmlcell.h 41020 2006-09-05 20:47:48Z VZ $ +// RCS-ID: $Id: htmlcell.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1999-2003 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,10 +20,10 @@ #include "wx/window.h" -class WXDLLIMPEXP_HTML wxHtmlWindowInterface; -class WXDLLIMPEXP_HTML wxHtmlLinkInfo; -class WXDLLIMPEXP_HTML wxHtmlCell; -class WXDLLIMPEXP_HTML wxHtmlContainerCell; +class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface; +class WXDLLIMPEXP_FWD_HTML wxHtmlLinkInfo; +class WXDLLIMPEXP_FWD_HTML wxHtmlCell; +class WXDLLIMPEXP_FWD_HTML wxHtmlContainerCell; // wxHtmlSelection is data holder with information about text selection. diff --git a/Externals/wxWidgets/include/wx/html/htmlwin.h b/Externals/wxWidgets/include/wx/html/htmlwin.h index 644c53e3c3..923e84ddec 100644 --- a/Externals/wxWidgets/include/wx/html/htmlwin.h +++ b/Externals/wxWidgets/include/wx/html/htmlwin.h @@ -2,7 +2,7 @@ // Name: htmlwin.h // Purpose: wxHtmlWindow class for parsing & displaying HTML // Author: Vaclav Slavik -// RCS-ID: $Id: htmlwin.h 43854 2006-12-07 08:56:57Z PC $ +// RCS-ID: $Id: htmlwin.h 53135 2008-04-12 02:31:04Z VZ $ // Copyright: (c) 1999 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,9 +28,9 @@ class wxHtmlProcessor; class wxHtmlWinModule; class wxHtmlHistoryArray; class wxHtmlProcessorList; -class WXDLLIMPEXP_HTML wxHtmlWinAutoScrollTimer; -class WXDLLIMPEXP_HTML wxHtmlCellEvent; -class WXDLLIMPEXP_HTML wxHtmlLinkEvent; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinAutoScrollTimer; +class WXDLLIMPEXP_FWD_HTML wxHtmlCellEvent; +class WXDLLIMPEXP_FWD_HTML wxHtmlLinkEvent; // wxHtmlWindow flags: diff --git a/Externals/wxWidgets/include/wx/html/webkit.h b/Externals/wxWidgets/include/wx/html/webkit.h index 247a68a97f..28586e0208 100644 --- a/Externals/wxWidgets/include/wx/html/webkit.h +++ b/Externals/wxWidgets/include/wx/html/webkit.h @@ -4,7 +4,7 @@ // Author: Jethro Grassie / Kevin Ollivier // Modified by: // Created: 2004-4-16 -// RCS-ID: $Id: webkit.h 42107 2006-10-19 00:40:23Z KO $ +// RCS-ID: $Id: webkit.h 53798 2008-05-28 06:12:34Z RD $ // Copyright: (c) Jethro Grassie / Kevin Ollivier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -172,12 +172,34 @@ protected: wxString m_url; }; + +#if wxABI_VERSION >= 20808 +class wxWebKitNewWindowEvent : public wxCommandEvent +{ + DECLARE_DYNAMIC_CLASS( wxWebViewNewWindowEvent ) +public: + wxString GetURL() const { return m_url; } + void SetURL(const wxString& url) { m_url = url; } + wxString GetTargetName() const { return m_targetName; } + void SetTargetName(const wxString& name) { m_targetName = name; } + + wxWebKitNewWindowEvent( wxWindow* win = (wxWindow*)(NULL)); + wxEvent *Clone(void) const { return new wxWebKitNewWindowEvent(*this); } + +private: + wxString m_url; + wxString m_targetName; +}; +#endif + typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&); typedef void (wxEvtHandler::*wxWebKitBeforeLoadEventFunction)(wxWebKitBeforeLoadEvent&); +typedef void (wxEvtHandler::*wxWebKitNewWindowEventFunction)(wxWebKitNewWindowEvent&); BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_WEBKIT_BEFORE_LOAD, wxID_ANY) DECLARE_LOCAL_EVENT_TYPE(wxEVT_WEBKIT_STATE_CHANGED, wxID_ANY) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_WEBKIT_NEW_WINDOW, wxID_ANY) END_DECLARE_EVENT_TYPES() #define EVT_WEBKIT_STATE_CHANGED(func) \ @@ -196,6 +218,13 @@ END_DECLARE_EVENT_TYPES() (wxWebKitBeforeLoadEventFunction) & func, \ (wxObject *) NULL ), +#define EVT_WEBKIT_NEW_WINDOW(func) \ + DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_NEW_WINDOW, \ + wxID_ANY, \ + wxID_ANY, \ + (wxObjectEventFunction) \ + (wxWebKitNewWindowEventFunction) & func, \ + (wxObject *) NULL ), #endif // wxUSE_WEBKIT #endif diff --git a/Externals/wxWidgets/include/wx/html/winpars.h b/Externals/wxWidgets/include/wx/html/winpars.h index 3c5dd032ee..def2614e93 100644 --- a/Externals/wxWidgets/include/wx/html/winpars.h +++ b/Externals/wxWidgets/include/wx/html/winpars.h @@ -2,7 +2,7 @@ // Name: winpars.h // Purpose: wxHtmlWinParser class (parser to be used with wxHtmlWindow) // Author: Vaclav Slavik -// RCS-ID: $Id: winpars.h 45498 2007-04-16 13:03:05Z VZ $ +// RCS-ID: $Id: winpars.h 53457 2008-05-05 10:53:58Z VS $ // Copyright: (c) 1999 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,11 +19,11 @@ #include "wx/html/htmlcell.h" #include "wx/encconv.h" -class WXDLLIMPEXP_HTML wxHtmlWindow; -class WXDLLIMPEXP_HTML wxHtmlWindowInterface; -class WXDLLIMPEXP_HTML wxHtmlWinParser; -class WXDLLIMPEXP_HTML wxHtmlWinTagHandler; -class WXDLLIMPEXP_HTML wxHtmlTagsModule; +class WXDLLIMPEXP_FWD_HTML wxHtmlWindow; +class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinTagHandler; +class WXDLLIMPEXP_FWD_HTML wxHtmlTagsModule; //-------------------------------------------------------------------------------- @@ -145,11 +145,26 @@ public: // creates font depending on m_Font* members. virtual wxFont* CreateCurrentFont(); +#if wxABI_VERSION >= 20808 + enum WhitespaceMode + { + Whitespace_Normal, // normal mode, collapse whitespace + Whitespace_Pre // inside
, keep whitespace as-is
+    };
+
+    // change the current whitespace handling mode
+    void SetWhitespaceMode(WhitespaceMode mode);
+    WhitespaceMode GetWhitespaceMode() const;
+#endif // wxABI_VERSION >= 20808
+
 protected:
     virtual void AddText(const wxChar* txt);
 
 private:
-    void DoAddText(wxChar *temp, int& templen, wxChar nbsp);
+    void FlushWordBuf(wxChar *temp, int& templen, wxChar nbsp);
+    void AddWord(wxHtmlWordCell *c);
+    void AddWord(const wxString& word);
+    void AddPreBlock(const wxString& text);
 
     bool m_tmpLastWasSpace;
     wxChar *m_tmpStrBuf;
@@ -206,7 +221,22 @@ private:
     wxEncodingConverter *m_EncConv;
 #endif
 
-    wxHtmlWordCell *m_lastWordCell;
+    struct TextParsingState
+    {
+        // current whitespace handling mode
+        WhitespaceMode m_whitespaceMode;
+
+        wxHtmlWordCell *m_lastWordCell;
+
+        // current position on line, in num. of characters; used to properly
+        // expand TABs; only updated while inside 
+        int m_posColumn;
+    };
+
+    // NB: this pointer replaces m_lastWordCell pointer in wx<=2.8.7; this
+    //     way, wxHtmlWinParser remains ABI compatible with older versions
+    //     despite addition of two fields in TextParsingState
+    TextParsingState *m_textParsingState;
 
     DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
 };
diff --git a/Externals/wxWidgets/include/wx/intl.h b/Externals/wxWidgets/include/wx/intl.h
index 457758d673..31f35be662 100644
--- a/Externals/wxWidgets/include/wx/intl.h
+++ b/Externals/wxWidgets/include/wx/intl.h
@@ -5,11 +5,14 @@
 // Modified by: Michael N. Filippov 
 //              (2003/09/30 - plural forms support)
 // Created:     29/01/98
-// RCS-ID:      $Id: intl.h 45738 2007-05-01 21:10:46Z VS $
+// RCS-ID:      $Id: intl.h 53754 2008-05-26 18:50:17Z RD $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+// WARNING: Parts of this file are generated. See misc/languages/README for
+// details.
+
 #ifndef _WX_INTL_H_
 #define _WX_INTL_H_
 
@@ -54,8 +57,8 @@ enum wxLayoutDirection
 // forward decls
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxLocale;
-class WXDLLIMPEXP_BASE wxLanguageInfoArray;
+class WXDLLIMPEXP_FWD_BASE wxLocale;
+class WXDLLIMPEXP_FWD_BASE wxLanguageInfoArray;
 class wxMsgCatalog;
 
 // ============================================================================
@@ -308,6 +311,16 @@ enum wxLanguage
 
     // for custom, user-defined languages:
     wxLANGUAGE_USER_DEFINED
+
+
+#if wxABI_VERSION >= 20808
+    // For binary compatibility, we can't put new items in their normal
+    // position in the enum, because it would change other values.  We have to
+    // put it somewhere well outside normal range -- the particular value used
+    // is arbitrary:
+    , wxLANGUAGE_VALENCIAN = 0x1fffffff,
+    wxLANGUAGE_SAMI
+#endif
 };
 
 // --- --- --- generated code ends here --- --- ---
diff --git a/Externals/wxWidgets/include/wx/ipcbase.h b/Externals/wxWidgets/include/wx/ipcbase.h
index 94f7265e6a..d2a48f6216 100644
--- a/Externals/wxWidgets/include/wx/ipcbase.h
+++ b/Externals/wxWidgets/include/wx/ipcbase.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     4/1/98
-// RCS-ID:      $Id: ipcbase.h 45498 2007-04-16 13:03:05Z VZ $
+// RCS-ID:      $Id: ipcbase.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -38,8 +38,8 @@ enum wxIPCFormat
   wxIPC_PRIVATE =          20
 };
 
-class WXDLLIMPEXP_BASE wxServerBase;
-class WXDLLIMPEXP_BASE wxClientBase;
+class WXDLLIMPEXP_FWD_BASE wxServerBase;
+class WXDLLIMPEXP_FWD_BASE wxClientBase;
 
 class WXDLLIMPEXP_BASE wxConnectionBase: public wxObject
 {
diff --git a/Externals/wxWidgets/include/wx/list.h b/Externals/wxWidgets/include/wx/list.h
index 24d89a3471..c1daac2edf 100644
--- a/Externals/wxWidgets/include/wx/list.h
+++ b/Externals/wxWidgets/include/wx/list.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added
 // Created:     29/01/98
-// RCS-ID:      $Id: list.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: list.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ extern "C"
 typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2);
 }
 
-class WXDLLIMPEXP_BASE wxObjectListNode;
+class WXDLLIMPEXP_FWD_BASE wxObjectListNode;
 typedef wxObjectListNode wxNode;
 
 //
@@ -437,7 +437,7 @@ private:
 
 extern WXDLLIMPEXP_DATA_BASE(wxListKey) wxDefaultListKey;
 
-class WXDLLIMPEXP_BASE wxListBase;
+class WXDLLIMPEXP_FWD_BASE wxListBase;
 
 class WXDLLIMPEXP_BASE wxNodeBase
 {
@@ -499,7 +499,7 @@ private:
 // a double-linked list class
 // -----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxList;
+class WXDLLIMPEXP_FWD_BASE wxList;
 
 class WXDLLIMPEXP_BASE wxListBase : public wxObject
 {
diff --git a/Externals/wxWidgets/include/wx/log.h b/Externals/wxWidgets/include/wx/log.h
index 10d1990958..5e23bcf927 100644
--- a/Externals/wxWidgets/include/wx/log.h
+++ b/Externals/wxWidgets/include/wx/log.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: log.h 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: log.h 50993 2008-01-02 21:18:15Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -297,7 +297,11 @@ private:
 
     // this is the replacement of DoLogNumberOfRepeats() (which has to be kept
     // to avoid breaking ABI in this version)
-    unsigned LogLastRepetitionCountIfNeeded();
+    unsigned LogLastRepeatIfNeeded();
+
+    // implementation of the function above which supposes that the caller had
+    // already locked gs_prevCS
+    unsigned LogLastRepeatIfNeededUnlocked();
 };
 
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/include/wx/longlong.h b/Externals/wxWidgets/include/wx/longlong.h
index e350bf67ee..007340c9a5 100644
--- a/Externals/wxWidgets/include/wx/longlong.h
+++ b/Externals/wxWidgets/include/wx/longlong.h
@@ -5,7 +5,7 @@
 // Author:      Jeffrey C. Ollie , Vadim Zeitlin
 // Modified by:
 // Created:     10.02.99
-// RCS-ID:      $Id: longlong.h 40658 2006-08-18 15:27:30Z JS $
+// RCS-ID:      $Id: longlong.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -86,8 +86,8 @@
 
 #ifndef wxUSE_LONGLONG_WX
     #define wxUSE_LONGLONG_WX 0
-    class WXDLLIMPEXP_BASE wxLongLongNative;
-    class WXDLLIMPEXP_BASE wxULongLongNative;
+    class WXDLLIMPEXP_FWD_BASE wxLongLongNative;
+    class WXDLLIMPEXP_FWD_BASE wxULongLongNative;
     typedef wxLongLongNative wxLongLong;
     typedef wxULongLongNative wxULongLong;
 #endif
diff --git a/Externals/wxWidgets/include/wx/mimetype.h b/Externals/wxWidgets/include/wx/mimetype.h
index 20f2e1a72d..8dfa73b94b 100644
--- a/Externals/wxWidgets/include/wx/mimetype.h
+++ b/Externals/wxWidgets/include/wx/mimetype.h
@@ -5,7 +5,7 @@
 // Modified by:
 //  Chris Elliott (biol75@york.ac.uk) 5 Dec 00: write support for Win32
 // Created:     23.09.98
-// RCS-ID:      $Id: mimetype.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: mimetype.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence (part of wxExtra library)
 /////////////////////////////////////////////////////////////////////////////
@@ -203,7 +203,7 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxFileTypeInfo, wxArrayFileTypeInfo,
 
 class WXDLLIMPEXP_BASE wxFileType
 {
-friend class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl;  // it has access to m_impl
+friend class WXDLLIMPEXP_FWD_BASE wxMimeTypesManagerImpl;  // it has access to m_impl
 
 public:
     // An object of this class must be passed to Get{Open|Print}Command. The
diff --git a/Externals/wxWidgets/include/wx/module.h b/Externals/wxWidgets/include/wx/module.h
index dfff0ba0e7..5e8af96ac9 100644
--- a/Externals/wxWidgets/include/wx/module.h
+++ b/Externals/wxWidgets/include/wx/module.h
@@ -4,7 +4,7 @@
 // Author:      Wolfram Gloger/adapted by Guilhem Lavaux
 // Modified by:
 // Created:     04/11/98
-// RCS-ID:      $Id: module.h 40943 2006-08-31 19:31:43Z ABX $
+// RCS-ID:      $Id: module.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Wolfram Gloger and Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -17,7 +17,7 @@
 #include "wx/dynarray.h"
 
 // declare a linked list of modules
-class WXDLLIMPEXP_BASE wxModule;
+class WXDLLIMPEXP_FWD_BASE wxModule;
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 
 // and an array of class info objects
diff --git a/Externals/wxWidgets/include/wx/mstream.h b/Externals/wxWidgets/include/wx/mstream.h
index c7bc315373..a814522846 100644
--- a/Externals/wxWidgets/include/wx/mstream.h
+++ b/Externals/wxWidgets/include/wx/mstream.h
@@ -4,7 +4,7 @@
 // Author:      Guilhem Lavaux
 // Modified by:
 // Created:     11/07/98
-// RCS-ID:      $Id: mstream.h 38717 2006-04-14 17:01:16Z ABX $
+// RCS-ID:      $Id: mstream.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,7 +18,7 @@
 
 #include "wx/stream.h"
 
-class WXDLLIMPEXP_BASE wxMemoryOutputStream;
+class WXDLLIMPEXP_FWD_BASE wxMemoryOutputStream;
 
 class WXDLLIMPEXP_BASE wxMemoryInputStream : public wxInputStream
 {
diff --git a/Externals/wxWidgets/include/wx/msw/accel.h b/Externals/wxWidgets/include/wx/msw/accel.h
index 7911ec88c3..7051468946 100644
--- a/Externals/wxWidgets/include/wx/msw/accel.h
+++ b/Externals/wxWidgets/include/wx/msw/accel.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     31/7/98
-// RCS-ID:      $Id: accel.h 42752 2006-10-30 19:26:48Z VZ $
+// RCS-ID:      $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -12,7 +12,7 @@
 #ifndef _WX_ACCEL_H_
 #define _WX_ACCEL_H_
 
-class WXDLLIMPEXP_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
 
 // ----------------------------------------------------------------------------
 // the accel table has all accelerators for a given window or menu
diff --git a/Externals/wxWidgets/include/wx/msw/app.h b/Externals/wxWidgets/include/wx/msw/app.h
index 8d3c7343ad..4989c9c7a4 100644
--- a/Externals/wxWidgets/include/wx/msw/app.h
+++ b/Externals/wxWidgets/include/wx/msw/app.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: app.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: app.h 53157 2008-04-13 12:17:37Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -109,6 +109,30 @@ wxEntry(HINSTANCE hInstance,
         wxCmdLineArgType pCmdLine = NULL,
         int nCmdShow = SW_SHOWNORMAL);
 
+#if defined(__BORLANDC__) && wxUSE_UNICODE
+    // Borland C++ has the following nonstandard behaviour: when the -WU
+    // command line flag is used, the linker expects to find wWinMain instead
+    // of WinMain. This flag causes the compiler to define _UNICODE and
+    // UNICODE symbols and there's no way to detect its use, so we have to
+    // define both WinMain and wWinMain so that IMPLEMENT_WXWIN_MAIN works
+    // for both code compiled with and without -WU.
+    // See http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1935997&group_id=9863
+    // for more details.
+    #define IMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD                        \
+        extern "C" int WINAPI wWinMain(HINSTANCE hInstance,                 \
+                                      HINSTANCE hPrevInstance,              \
+                                      wchar_t * WXUNUSED(lpCmdLine),        \
+                                      int nCmdShow)                         \
+        {                                                                   \
+            /* NB: wxEntry expects lpCmdLine argument to be char*, not */   \
+            /*     wchar_t*, but fortunately it's not used anywhere    */   \
+            /*     and we can simply pass NULL in:                     */   \
+            return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow);       \
+        }
+#else
+    #define IMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD
+#endif // defined(__BORLANDC__) && wxUSE_UNICODE
+
 #define IMPLEMENT_WXWIN_MAIN \
     extern "C" int WINAPI WinMain(HINSTANCE hInstance,                    \
                                   HINSTANCE hPrevInstance,                \
@@ -116,7 +140,8 @@ wxEntry(HINSTANCE hInstance,
                                   int nCmdShow)                           \
     {                                                                     \
         return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow);    \
-    }
+    }                                                                     \
+    IMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD
 
 #endif // _WX_APP_H_
 
diff --git a/Externals/wxWidgets/include/wx/msw/brush.h b/Externals/wxWidgets/include/wx/msw/brush.h
index 0c48447aab..37de6d77d6 100644
--- a/Externals/wxWidgets/include/wx/msw/brush.h
+++ b/Externals/wxWidgets/include/wx/msw/brush.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: brush.h 41751 2006-10-08 21:56:55Z VZ $
+// RCS-ID:      $Id: brush.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,7 +16,7 @@
 #include "wx/gdiobj.h"
 #include "wx/bitmap.h"
 
-class WXDLLEXPORT wxBrush;
+class WXDLLIMPEXP_FWD_CORE wxBrush;
 
 // ----------------------------------------------------------------------------
 // wxBrush
diff --git a/Externals/wxWidgets/include/wx/msw/choice.h b/Externals/wxWidgets/include/wx/msw/choice.h
index 5467b0a0fb..6dccdafa49 100644
--- a/Externals/wxWidgets/include/wx/msw/choice.h
+++ b/Externals/wxWidgets/include/wx/msw/choice.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin to derive from wxChoiceBase
 // Created:     01/02/97
-// RCS-ID:      $Id: choice.h 38319 2006-03-23 22:05:23Z VZ $
+// RCS-ID:      $Id: choice.h 51616 2008-02-09 15:22:15Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -66,6 +66,8 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
 
+    virtual void SetLabel(const wxString& label);
+
     virtual void Delete(unsigned int n);
     virtual void Clear();
 
diff --git a/Externals/wxWidgets/include/wx/msw/colour.h b/Externals/wxWidgets/include/wx/msw/colour.h
index 1b7ce074da..d66b838d72 100644
--- a/Externals/wxWidgets/include/wx/msw/colour.h
+++ b/Externals/wxWidgets/include/wx/msw/colour.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: colour.h 45498 2007-04-16 13:03:05Z VZ $
+// RCS-ID:      $Id: colour.h 51769 2008-02-13 22:36:43Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -24,9 +24,13 @@ public:
     // constructors
     // ------------
 
-    // default
     wxColour() { Init(); }
-    DEFINE_STD_WXCOLOUR_CONSTRUCTORS
+    wxColour( ChannelType red, ChannelType green, ChannelType blue,
+              ChannelType alpha = wxALPHA_OPAQUE )
+        { Set(red, green, blue, alpha); }
+    wxColour( unsigned long colRGB ) { Set(colRGB); }
+    wxColour(const wxString& colourName) { Init(); Set(colourName); }
+    wxColour(const wxChar *colourName) { Init(); Set(colourName); }
 
 
     // dtor
diff --git a/Externals/wxWidgets/include/wx/msw/dcclient.h b/Externals/wxWidgets/include/wx/msw/dcclient.h
index a4b87b2d82..e01171e3e4 100644
--- a/Externals/wxWidgets/include/wx/msw/dcclient.h
+++ b/Externals/wxWidgets/include/wx/msw/dcclient.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: dcclient.h 35650 2005-09-23 12:56:45Z MR $
+// RCS-ID:      $Id: dcclient.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@
 // ----------------------------------------------------------------------------
 
 // this one if used by wxPaintDC only
-struct WXDLLEXPORT wxPaintDCInfo;
+struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
 
 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
 
diff --git a/Externals/wxWidgets/include/wx/msw/dde.h b/Externals/wxWidgets/include/wx/msw/dde.h
index 283a557215..fe8f23c2ff 100644
--- a/Externals/wxWidgets/include/wx/msw/dde.h
+++ b/Externals/wxWidgets/include/wx/msw/dde.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: dde.h 41020 2006-09-05 20:47:48Z VZ $
+// RCS-ID:      $Id: dde.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -38,8 +38,8 @@
  *
  */
 
-class WXDLLIMPEXP_BASE wxDDEServer;
-class WXDLLIMPEXP_BASE wxDDEClient;
+class WXDLLIMPEXP_FWD_BASE wxDDEServer;
+class WXDLLIMPEXP_FWD_BASE wxDDEClient;
 
 class WXDLLIMPEXP_BASE wxDDEConnection: public wxConnectionBase
 {
diff --git a/Externals/wxWidgets/include/wx/msw/dialog.h b/Externals/wxWidgets/include/wx/msw/dialog.h
index bb408bf12b..15f8ba10f0 100644
--- a/Externals/wxWidgets/include/wx/msw/dialog.h
+++ b/Externals/wxWidgets/include/wx/msw/dialog.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: dialog.h 40687 2006-08-19 22:56:11Z VZ $
+// RCS-ID:      $Id: dialog.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,10 +16,10 @@
 
 extern WXDLLEXPORT_DATA(const wxChar) wxDialogNameStr[];
 
-class WXDLLEXPORT wxDialogModalData;
+class WXDLLIMPEXP_FWD_CORE wxDialogModalData;
 
 #if wxUSE_TOOLBAR && (defined(__SMARTPHONE__) || defined(__POCKETPC__))
-class WXDLLEXPORT wxToolBar;
+class WXDLLIMPEXP_FWD_CORE wxToolBar;
 extern WXDLLEXPORT_DATA(const wxChar) wxToolBarNameStr[];
 #endif
 
diff --git a/Externals/wxWidgets/include/wx/msw/gdiimage.h b/Externals/wxWidgets/include/wx/msw/gdiimage.h
index 5cf494351e..d78f5b6201 100644
--- a/Externals/wxWidgets/include/wx/msw/gdiimage.h
+++ b/Externals/wxWidgets/include/wx/msw/gdiimage.h
@@ -5,7 +5,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.11.99
-// RCS-ID:      $Id: gdiimage.h 41751 2006-10-08 21:56:55Z VZ $
+// RCS-ID:      $Id: gdiimage.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1999 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -20,9 +20,9 @@
 #include "wx/gdicmn.h"          // wxBITMAP_TYPE_INVALID
 #include "wx/list.h"
 
-class WXDLLEXPORT wxGDIImageRefData;
-class WXDLLEXPORT wxGDIImageHandler;
-class WXDLLEXPORT wxGDIImage;
+class WXDLLIMPEXP_FWD_CORE wxGDIImageRefData;
+class WXDLLIMPEXP_FWD_CORE wxGDIImageHandler;
+class WXDLLIMPEXP_FWD_CORE wxGDIImage;
 
 WX_DECLARE_EXPORTED_LIST(wxGDIImageHandler, wxGDIImageHandlerList);
 
diff --git a/Externals/wxWidgets/include/wx/msw/glcanvas.h b/Externals/wxWidgets/include/wx/msw/glcanvas.h
index 2396360adf..be8b6351ba 100644
--- a/Externals/wxWidgets/include/wx/msw/glcanvas.h
+++ b/Externals/wxWidgets/include/wx/msw/glcanvas.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: glcanvas.h 43097 2006-11-06 00:57:46Z VZ $
+// RCS-ID:      $Id: glcanvas.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -19,7 +19,7 @@
 
 #include 
 
-class WXDLLIMPEXP_GL wxGLCanvas;     /* forward reference */
+class WXDLLIMPEXP_FWD_GL wxGLCanvas;     /* forward reference */
 
 class WXDLLIMPEXP_GL wxGLContext: public wxObject
 {
diff --git a/Externals/wxWidgets/include/wx/msw/listctrl.h b/Externals/wxWidgets/include/wx/msw/listctrl.h
index 5f432ba1f3..725a587e23 100644
--- a/Externals/wxWidgets/include/wx/msw/listctrl.h
+++ b/Externals/wxWidgets/include/wx/msw/listctrl.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Agron Selimaj
 // Created:     01/02/97
-// RCS-ID:      $Id: listctrl.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: listctrl.h 51773 2008-02-13 22:46:30Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -341,10 +341,10 @@ public:
     bool SortItems(wxListCtrlCompare fn, long data);
 
     // IMPLEMENTATION
+	virtual bool MSWDrawSubItem(wxPaintDC& rPainDC, int item, int subitem);
     virtual bool MSWCommand(WXUINT param, WXWORD id);
     virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
     virtual bool MSWShouldPreProcessMessage(WXMSG* msg);
-	virtual bool MSWDrawSubItem(wxPaintDC& rPainDC, int tem, int subitem);
 
     // bring the control in sync with current m_windowStyle value
     void UpdateStyle();
@@ -432,6 +432,11 @@ private:
     // process NM_CUSTOMDRAW notification message
     WXLPARAM OnCustomDraw(WXLPARAM lParam);
 
+    // set the extended styles for the control (used by Create() and
+    // UpdateStyle()), only should be called if InReportView()
+    void MSWSetExListStyles();
+
+
     DECLARE_DYNAMIC_CLASS(wxListCtrl)
     DECLARE_EVENT_TABLE()
     DECLARE_NO_COPY_CLASS(wxListCtrl)
diff --git a/Externals/wxWidgets/include/wx/msw/mdi.h b/Externals/wxWidgets/include/wx/msw/mdi.h
index 20b54ca697..46f7f10596 100644
--- a/Externals/wxWidgets/include/wx/msw/mdi.h
+++ b/Externals/wxWidgets/include/wx/msw/mdi.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: mdi.h 45498 2007-04-16 13:03:05Z VZ $
+// RCS-ID:      $Id: mdi.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,8 +16,8 @@
 
 extern WXDLLEXPORT_DATA(const wxChar) wxStatusLineNameStr[];
 
-class WXDLLEXPORT wxMDIClientWindow;
-class WXDLLEXPORT wxMDIChildFrame;
+class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
+class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
 
 // ---------------------------------------------------------------------------
 // wxMDIParentFrame
@@ -111,7 +111,7 @@ protected:
     bool m_parentFrameActive;
 
 private:
-    friend class WXDLLEXPORT wxMDIChildFrame;
+    friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
 
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
diff --git a/Externals/wxWidgets/include/wx/msw/palette.h b/Externals/wxWidgets/include/wx/msw/palette.h
index 0aa36ea24a..87b59ec335 100644
--- a/Externals/wxWidgets/include/wx/msw/palette.h
+++ b/Externals/wxWidgets/include/wx/msw/palette.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: palette.h 42752 2006-10-30 19:26:48Z VZ $
+// RCS-ID:      $Id: palette.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -14,11 +14,11 @@
 
 #include "wx/gdiobj.h"
 
-class WXDLLEXPORT wxPalette;
+class WXDLLIMPEXP_FWD_CORE wxPalette;
 
 class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData
 {
-    friend class WXDLLEXPORT wxPalette;
+    friend class WXDLLIMPEXP_FWD_CORE wxPalette;
 public:
     wxPaletteRefData(void);
     virtual ~wxPaletteRefData(void);
diff --git a/Externals/wxWidgets/include/wx/msw/pen.h b/Externals/wxWidgets/include/wx/msw/pen.h
index c9804c7a83..caf378d336 100644
--- a/Externals/wxWidgets/include/wx/msw/pen.h
+++ b/Externals/wxWidgets/include/wx/msw/pen.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
 // Created:     01/02/97
-// RCS-ID:      $Id: pen.h 45498 2007-04-16 13:03:05Z VZ $
+// RCS-ID:      $Id: pen.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,7 +18,7 @@
 
 typedef WXDWORD wxMSWDash;
 
-class WXDLLEXPORT wxPen;
+class WXDLLIMPEXP_FWD_CORE wxPen;
 
 // VZ: this class should be made private
 class WXDLLEXPORT wxPenRefData : public wxGDIRefData
@@ -54,7 +54,7 @@ protected:
     WXHPEN        m_hPen;
 
 private:
-    friend class WXDLLEXPORT wxPen;
+    friend class WXDLLIMPEXP_FWD_CORE wxPen;
 
     // Cannot use
     //  DECLARE_NO_COPY_CLASS(wxPenRefData)
diff --git a/Externals/wxWidgets/include/wx/msw/radiobox.h b/Externals/wxWidgets/include/wx/msw/radiobox.h
index c056ed61c1..8012dd8b97 100644
--- a/Externals/wxWidgets/include/wx/msw/radiobox.h
+++ b/Externals/wxWidgets/include/wx/msw/radiobox.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: radiobox.h 43881 2006-12-09 19:48:21Z PC $
+// RCS-ID:      $Id: radiobox.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -14,7 +14,7 @@
 
 #include "wx/statbox.h"
 
-class WXDLLEXPORT wxSubwindows;
+class WXDLLIMPEXP_FWD_CORE wxSubwindows;
 
 // ----------------------------------------------------------------------------
 // wxRadioBox
@@ -111,6 +111,8 @@ public:
     }
 #endif // wxUSE_HELP
 
+    virtual bool Reparent(wxWindowBase *newParent);
+
     // we inherit a version always returning false from wxStaticBox, override
     // it to behave normally
     virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); }
diff --git a/Externals/wxWidgets/include/wx/msw/region.h b/Externals/wxWidgets/include/wx/msw/region.h
index 9fe434391f..ee1f60bf2b 100644
--- a/Externals/wxWidgets/include/wx/msw/region.h
+++ b/Externals/wxWidgets/include/wx/msw/region.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: region.h 41429 2006-09-25 11:47:23Z VZ $
+// RCS-ID:      $Id: region.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1997-2002 wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ protected:
     virtual bool DoOffset(wxCoord x, wxCoord y);
     virtual bool DoCombine(const wxRegion& region, wxRegionOp op);
 
-    friend class WXDLLEXPORT wxRegionIterator;
+    friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator;
 
     DECLARE_DYNAMIC_CLASS(wxRegion)
 };
diff --git a/Externals/wxWidgets/include/wx/msw/setup.h b/Externals/wxWidgets/include/wx/msw/setup.h
index f3f674416d..dd3112dacd 100644
--- a/Externals/wxWidgets/include/wx/msw/setup.h
+++ b/Externals/wxWidgets/include/wx/msw/setup.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: setup0.h 43908 2006-12-11 06:19:27Z RD $
+// RCS-ID:      $Id: setup0.h 51451 2008-01-29 23:11:55Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -991,7 +991,7 @@
 // Default is 0.
 //
 // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS       1
+#define wxUSE_GLCANVAS       0
 
 // wxRichTextCtrl allows editing of styled text.
 //
@@ -1042,7 +1042,7 @@
 // ----------------------------------------------------------------------------
 
 // wxSingleInstanceChecker class allows to verify at startup if another program
-// instance is running (it is only available under Win32)
+// instance is running.
 //
 // Default is 1
 //
@@ -1070,7 +1070,7 @@
 // Use wxHTML-based help controller?
 #define wxUSE_WXHTML_HELP 1
 
-#define wxUSE_RESOURCES   1
+#define wxUSE_RESOURCES   0
                                 // 0 for no wxGetResource/wxWriteResource
 #define wxUSE_CONSTRAINTS 1
                                 // 0 for no window layout constraint system
@@ -1096,7 +1096,7 @@
 // ----------------------------------------------------------------------------
 
 // Define 1 to use ODBC classes
-#define wxUSE_ODBC          1
+#define wxUSE_ODBC          0
 
 // For backward compatibility reasons, this parameter now only controls the
 // default scrolling method used by cursors.  This default behavior can be
@@ -1309,7 +1309,7 @@
 #define wxUSE_UXTHEME_AUTO      1
 
 // Set to 1 to use InkEdit control (Tablet PC), if available
-#define wxUSE_INKEDIT  1
+#define wxUSE_INKEDIT  0
 
 // ----------------------------------------------------------------------------
 // Generic versions of native controls
diff --git a/Externals/wxWidgets/include/wx/msw/setup0.h b/Externals/wxWidgets/include/wx/msw/setup0.h
index 01a64ef193..dd3112dacd 100644
--- a/Externals/wxWidgets/include/wx/msw/setup0.h
+++ b/Externals/wxWidgets/include/wx/msw/setup0.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: setup0.h 43908 2006-12-11 06:19:27Z RD $
+// RCS-ID:      $Id: setup0.h 51451 2008-01-29 23:11:55Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1042,7 +1042,7 @@
 // ----------------------------------------------------------------------------
 
 // wxSingleInstanceChecker class allows to verify at startup if another program
-// instance is running (it is only available under Win32)
+// instance is running.
 //
 // Default is 1
 //
diff --git a/Externals/wxWidgets/include/wx/msw/slider95.h b/Externals/wxWidgets/include/wx/msw/slider95.h
index 0233a560f0..c81f9f1091 100644
--- a/Externals/wxWidgets/include/wx/msw/slider95.h
+++ b/Externals/wxWidgets/include/wx/msw/slider95.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: slider95.h 37393 2006-02-08 21:47:09Z VZ $
+// RCS-ID:      $Id: slider95.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -12,7 +12,7 @@
 #ifndef _WX_SLIDER95_H_
 #define _WX_SLIDER95_H_
 
-class WXDLLEXPORT wxSubwindows;
+class WXDLLIMPEXP_FWD_CORE wxSubwindows;
 
 // Slider
 class WXDLLEXPORT wxSlider : public wxSliderBase
diff --git a/Externals/wxWidgets/include/wx/msw/spinctrl.h b/Externals/wxWidgets/include/wx/msw/spinctrl.h
index df84d154ea..08b6194504 100644
--- a/Externals/wxWidgets/include/wx/msw/spinctrl.h
+++ b/Externals/wxWidgets/include/wx/msw/spinctrl.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     22.07.99
-// RCS-ID:      $Id: spinctrl.h 44196 2007-01-11 01:59:42Z VZ $
+// RCS-ID:      $Id: spinctrl.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,7 +18,7 @@
 
 #include "wx/dynarray.h"
 
-class WXDLLEXPORT wxSpinCtrl;
+class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
 WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins);
 
 // ----------------------------------------------------------------------------
@@ -73,6 +73,8 @@ public:
     virtual bool Enable(bool enable = true);
     virtual bool Show(bool show = true);
 
+    virtual bool Reparent(wxWindowBase *newParent);
+
     // wxSpinButton doesn't accept focus, but we do
     virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); }
 
@@ -92,6 +94,10 @@ protected:
     virtual void DoMoveWindow(int x, int y, int width, int height);
     virtual wxSize DoGetBestSize() const;
     virtual void DoGetSize(int *width, int *height) const;
+#if wxABI_VERSION >= 20808
+    virtual void DoGetClientSize(int *x, int *y) const;
+#endif
+
 #if wxUSE_TOOLTIPS
     virtual void DoSetToolTip( wxToolTip *tip );
 #endif // wxUSE_TOOLTIPS
diff --git a/Externals/wxWidgets/include/wx/msw/statbmp.h b/Externals/wxWidgets/include/wx/msw/statbmp.h
index 4e4ea9371f..99bc985955 100644
--- a/Externals/wxWidgets/include/wx/msw/statbmp.h
+++ b/Externals/wxWidgets/include/wx/msw/statbmp.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: statbmp.h 37393 2006-02-08 21:47:09Z VZ $
+// RCS-ID:      $Id: statbmp.h 51824 2008-02-16 01:59:21Z SN $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -68,6 +68,12 @@ protected:
     void SetImage(const wxGDIImage* image);
     void SetImageNoCopy( wxGDIImage* image );
 
+#if wxABI_VERSION >= 20808
+    // draw the bitmap ourselves here if the OS can't do it correctly (if it
+    // can we leave it to it)
+    void DoPaintManually(wxPaintEvent& event);
+#endif
+
     // we can have either an icon or a bitmap
     bool m_isIcon;
     wxGDIImage *m_image;
diff --git a/Externals/wxWidgets/include/wx/msw/taskbar.h b/Externals/wxWidgets/include/wx/msw/taskbar.h
index b6e64580b2..9956ee4cc0 100644
--- a/Externals/wxWidgets/include/wx/msw/taskbar.h
+++ b/Externals/wxWidgets/include/wx/msw/taskbar.h
@@ -5,7 +5,7 @@
 // Author:      Julian Smart
 // Modified by: Vaclav Slavik
 // Created:     24/3/98
-// RCS-ID:      $Id: taskbar.h 35650 2005-09-23 12:56:45Z MR $
+// RCS-ID:      $Id: taskbar.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
@@ -16,7 +16,7 @@
 #include "wx/icon.h"
 
 // private helper class:
-class WXDLLIMPEXP_ADV wxTaskBarIconWindow;
+class WXDLLIMPEXP_FWD_ADV wxTaskBarIconWindow;
 
 class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase
 {
diff --git a/Externals/wxWidgets/include/wx/msw/textctrl.h b/Externals/wxWidgets/include/wx/msw/textctrl.h
index 557016426b..5790a7c93f 100644
--- a/Externals/wxWidgets/include/wx/msw/textctrl.h
+++ b/Externals/wxWidgets/include/wx/msw/textctrl.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: textctrl.h 44182 2007-01-09 21:26:53Z JS $
+// RCS-ID:      $Id: textctrl.h 52547 2008-03-15 12:33:04Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -272,6 +272,8 @@ protected:
     int m_updatesCount;
 
 private:
+    void OnKeyDown(wxKeyEvent& event);
+
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl)
 
diff --git a/Externals/wxWidgets/include/wx/msw/toplevel.h b/Externals/wxWidgets/include/wx/msw/toplevel.h
index cd51a22aad..30ddeeda91 100644
--- a/Externals/wxWidgets/include/wx/msw/toplevel.h
+++ b/Externals/wxWidgets/include/wx/msw/toplevel.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.09.01
-// RCS-ID:      $Id: toplevel.h 42541 2006-10-27 20:05:47Z RR $
+// RCS-ID:      $Id: toplevel.h 50999 2008-01-03 01:13:44Z VZ $
 // Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -180,6 +180,11 @@ protected:
 #endif // __SMARTPHONE__ && __WXWINCE__
 
 private:
+    // helper of SetIcons(): calls gets the icon with the size specified by the
+    // given system metrics (SM_C{X|Y}[SM]ICON) from the bundle and sets it
+    // using WM_SETICON with the specified wParam (ICOM_SMALL or ICON_BIG)
+    void DoSelectAndSetIcon(const wxIconBundle& icons, int smX, int smY, int i);
+
 
 #if defined(__SMARTPHONE__) || defined(__POCKETPC__)
     void* m_activateInfo;
diff --git a/Externals/wxWidgets/include/wx/msw/wince/setup.h b/Externals/wxWidgets/include/wx/msw/wince/setup.h
index c84e6e97ae..9d4671c29d 100644
--- a/Externals/wxWidgets/include/wx/msw/wince/setup.h
+++ b/Externals/wxWidgets/include/wx/msw/wince/setup.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: setup.h 43908 2006-12-11 06:19:27Z RD $
+// RCS-ID:      $Id: setup.h 51451 2008-01-29 23:11:55Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1042,7 +1042,7 @@
 // ----------------------------------------------------------------------------
 
 // wxSingleInstanceChecker class allows to verify at startup if another program
-// instance is running (it is only available under Win32)
+// instance is running.
 //
 // Default is 1
 //
diff --git a/Externals/wxWidgets/include/wx/msw/window.h b/Externals/wxWidgets/include/wx/msw/window.h
index b981f2f504..b765ac1dbb 100644
--- a/Externals/wxWidgets/include/wx/msw/window.h
+++ b/Externals/wxWidgets/include/wx/msw/window.h
@@ -5,7 +5,7 @@
 // Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling,
 //              elimination of Default(), ...
 // Created:     01/02/97
-// RCS-ID:      $Id: window.h 47962 2007-08-08 12:38:13Z JS $
+// RCS-ID:      $Id: window.h 53929 2008-06-02 18:27:16Z RD $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -428,7 +428,11 @@ public:
 
     // check if a native double-buffering applies for this window
     virtual bool IsDoubleBuffered() const;
-
+    
+#if wxABI_VERSION >= 20808
+    void SetDoubleBuffered(bool on);
+#endif
+    
     // synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false
     void GenerateMouseLeave();
 
diff --git a/Externals/wxWidgets/include/wx/msw/wrapwin.h b/Externals/wxWidgets/include/wx/msw/wrapwin.h
index b7cb64ae9e..d1e6a0a861 100644
--- a/Externals/wxWidgets/include/wx/msw/wrapwin.h
+++ b/Externals/wxWidgets/include/wx/msw/wrapwin.h
@@ -3,7 +3,7 @@
 // Purpose:     Wrapper around , to be included instead of it
 // Author:      Vaclav Slavik
 // Created:     2003/07/22
-// RCS-ID:      $Id: wrapwin.h 42462 2006-10-26 19:06:51Z VZ $
+// RCS-ID:      $Id: wrapwin.h 53877 2008-05-31 12:43:44Z SN $
 // Copyright:   (c) 2003 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -62,7 +62,7 @@
 // pointer) on MSVC 7 and later. However, they are not available in older 
 // Platform SDKs, and since they are typedefs and not #defines we simply 
 // overwrite them if there is a chance that they're not defined
-#if !defined(_MSC_VER) || (_MSC_VER < 1300)
+#if (!defined(_MSC_VER) || (_MSC_VER < 1300)) && !defined(__WIN64__)
     #define UINT_PTR unsigned int
     #define LONG_PTR long
     #define ULONG_PTR unsigned long
diff --git a/Externals/wxWidgets/include/wx/object.h b/Externals/wxWidgets/include/wx/object.h
index 93d0aebd52..00d305bda4 100644
--- a/Externals/wxWidgets/include/wx/object.h
+++ b/Externals/wxWidgets/include/wx/object.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Ron Lee
 // Created:     01/02/97
-// RCS-ID:      $Id: object.h 42776 2006-10-30 22:03:53Z VZ $
+// RCS-ID:      $Id: object.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1997 Julian Smart
 //              (c) 2001 Ron Lee 
 // Licence:     wxWindows licence
@@ -19,7 +19,7 @@
 
 #include "wx/memory.h"
 
-class WXDLLIMPEXP_BASE wxObject;
+class WXDLLIMPEXP_FWD_BASE wxObject;
 
 #ifndef wxUSE_EXTENDED_RTTI
 #define wxUSE_EXTENDED_RTTI 0
@@ -33,9 +33,9 @@ class WXDLLIMPEXP_BASE wxObject;
 // conditional compilation
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxClassInfo;
-class WXDLLIMPEXP_BASE wxHashTable;
-class WXDLLIMPEXP_BASE wxObjectRefData;
+class WXDLLIMPEXP_FWD_BASE wxClassInfo;
+class WXDLLIMPEXP_FWD_BASE wxHashTable;
+class WXDLLIMPEXP_FWD_BASE wxObjectRefData;
 
 // ----------------------------------------------------------------------------
 // wxClassInfo
@@ -388,7 +388,7 @@ inline void* wxCheckCast(void *ptr)
 
 class WXDLLIMPEXP_BASE wxObjectRefData
 {
-    friend class WXDLLIMPEXP_BASE wxObject;
+    friend class WXDLLIMPEXP_FWD_BASE wxObject;
 
 public:
     wxObjectRefData() : m_count(1) { }
diff --git a/Externals/wxWidgets/include/wx/overlay.h b/Externals/wxWidgets/include/wx/overlay.h
index eabdef6489..d0d2a11aa1 100644
--- a/Externals/wxWidgets/include/wx/overlay.h
+++ b/Externals/wxWidgets/include/wx/overlay.h
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     2006-10-20
-// RCS-ID:      $Id: overlay.h 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: overlay.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ public:
     wxOverlayImpl *GetImpl() { return m_impl; }
 
 private:
-    friend class WXDLLEXPORT wxDCOverlay;
+    friend class WXDLLIMPEXP_FWD_CORE wxDCOverlay;
 
     // returns true if it has been setup
     bool IsOk();
diff --git a/Externals/wxWidgets/include/wx/paper.h b/Externals/wxWidgets/include/wx/paper.h
index b4c7be4376..fe69bd471c 100644
--- a/Externals/wxWidgets/include/wx/paper.h
+++ b/Externals/wxWidgets/include/wx/paper.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: paper.h 36973 2006-01-18 16:45:41Z JS $
+// RCS-ID:      $Id: paper.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -68,7 +68,7 @@ private:
 
 WX_DECLARE_STRING_HASH_MAP(wxPrintPaperType*, wxStringToPrintPaperTypeHashMap);
 
-class WXDLLEXPORT wxPrintPaperTypeList;
+class WXDLLIMPEXP_FWD_CORE wxPrintPaperTypeList;
 
 class WXDLLEXPORT wxPrintPaperDatabase
 {
diff --git a/Externals/wxWidgets/include/wx/platform.h b/Externals/wxWidgets/include/wx/platform.h
index 361248cc1f..b75cf47258 100644
--- a/Externals/wxWidgets/include/wx/platform.h
+++ b/Externals/wxWidgets/include/wx/platform.h
@@ -4,7 +4,7 @@
 * Author:      Vadim Zeitlin
 * Modified by:
 * Created:     29.10.01 (extracted from wx/defs.h)
-* RCS-ID:      $Id: platform.h 49409 2007-10-24 21:43:36Z DE $
+* RCS-ID:      $Id: platform.h 53877 2008-05-31 12:43:44Z SN $
 * Copyright:   (c) 1997-2001 Vadim Zeitlin
 * Licence:     wxWindows licence
 */
@@ -256,6 +256,20 @@
 #undef UNICODE
 #endif
 
+/*
+   Notice that Turbo Explorer (BCC 5.82) is available for free at
+   http://www.turboexplorer.com/downloads, you can get it if you have trouble
+   compiling wxWidgets with your current Borland compiler.
+*/
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x540)
+#   error "wxWidgets requires a newer version of Borland, we recommend upgrading to 5.82 (Turbo Explorer). You may at your own risk remove this line and try building but be prepared to get build errors."
+#endif /* __BORLANDC__ */
+
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x582) && (__BORLANDC__ > 0x559)
+#   ifndef _USE_OLD_RW_STL
+#       error "wxWidgets is incompatible with default Borland C++ 5.6 STL library, please add -D_USE_OLD_RW_STL to your bcc32.cfg to use RogueWave STL implementation."
+#   endif
+#endif /* __BORLANDC__ */
 
 /*
    This macro can be used to test the Open Watcom version.
@@ -482,7 +496,7 @@
 
     /* size_t is the same as unsigned int for all Windows compilers we know, */
     /* so define it if it hadn't been done by configure yet */
-#    if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
+#    if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) && !defined(__WIN64__)
 #        define wxSIZE_T_IS_UINT
 #    endif
 #endif  /* OS */
@@ -571,6 +585,9 @@
 #        define wxHAVE_RAW_BITMAP
 #    endif
 #endif
+#if defined(__WXGTK20__) || defined(__WXMAC__)
+#    define wxHAVE_RAW_BITMAP
+#endif
 
 /*
     Handle Darwin gcc universal compilation.  Don't do this in an Apple-
@@ -590,6 +607,15 @@
 #    warning "Compiling wxMac with probably wrong endianness"
 #endif
 
+#ifdef __VMS
+#define XtDisplay XTDISPLAY
+#ifdef __WXMOTIF__
+#define XtParent XTPARENT
+#define XtScreen XTSCREEN
+#define XtWindow XTWINDOW
+#endif
+#endif
+
 /* Choose which method we will use for updating menus
  * - in OnIdle, or when we receive a wxEVT_MENU_OPEN event.
  * Presently, only Windows and GTK+ support wxEVT_MENU_OPEN.
diff --git a/Externals/wxWidgets/include/wx/popupwin.h b/Externals/wxWidgets/include/wx/popupwin.h
index 2680d9e2a0..c72eafeb6d 100644
--- a/Externals/wxWidgets/include/wx/popupwin.h
+++ b/Externals/wxWidgets/include/wx/popupwin.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     06.01.01
-// RCS-ID:      $Id: popupwin.h 49642 2007-11-05 16:54:48Z SC $
+// RCS-ID:      $Id: popupwin.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2001 Vadim Zeitlin 
 // License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -77,8 +77,8 @@ public:
 // when the user clicks mouse outside it or if it loses focus in any other way
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxPopupWindowHandler;
-class WXDLLEXPORT wxPopupFocusHandler;
+class WXDLLIMPEXP_FWD_CORE wxPopupWindowHandler;
+class WXDLLIMPEXP_FWD_CORE wxPopupFocusHandler;
 
 class WXDLLEXPORT wxPopupTransientWindow : public wxPopupWindow
 {
diff --git a/Externals/wxWidgets/include/wx/private/overlay.h b/Externals/wxWidgets/include/wx/private/overlay.h
index 08dfaad9e7..9203503ce2 100644
--- a/Externals/wxWidgets/include/wx/private/overlay.h
+++ b/Externals/wxWidgets/include/wx/private/overlay.h
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     2006-10-20
-// RCS-ID:      $Id: overlay.h 42397 2006-10-25 12:12:56Z VS $
+// RCS-ID:      $Id: overlay.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@
 
 #include "wx/bitmap.h"
 
-class WXDLLIMPEXP_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
 
 // generic implementation of wxOverlay
 class wxOverlayImpl
diff --git a/Externals/wxWidgets/include/wx/radiobox.h b/Externals/wxWidgets/include/wx/radiobox.h
index 141a9cfad9..51b75b30e2 100644
--- a/Externals/wxWidgets/include/wx/radiobox.h
+++ b/Externals/wxWidgets/include/wx/radiobox.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     10.09.00
-// RCS-ID:      $Id: radiobox.h 42862 2006-10-31 16:39:07Z VZ $
+// RCS-ID:      $Id: radiobox.h 50255 2007-11-26 13:48:36Z VZ $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -20,7 +20,7 @@
 
 #include "wx/dynarray.h"
 
-class WXDLLEXPORT wxToolTip;
+class WXDLLIMPEXP_FWD_CORE wxToolTip;
 
 WX_DEFINE_EXPORTED_ARRAY_PTR(wxToolTip *, wxToolTipArray);
 
diff --git a/Externals/wxWidgets/include/wx/regex.h b/Externals/wxWidgets/include/wx/regex.h
index 87650fad87..5616d12813 100644
--- a/Externals/wxWidgets/include/wx/regex.h
+++ b/Externals/wxWidgets/include/wx/regex.h
@@ -1,11 +1,11 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Name:        wx/regex.h
 // Purpose:     regular expression matching
-// Author:      Karsten Ballüder
+// Author:      Karsten Ballueder
 // Modified by: VZ at 13.07.01 (integrated to wxWin)
 // Created:     05.02.2000
-// RCS-ID:      $Id: regex.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright:   (c) 2000 Karsten Ballüder 
+// RCS-ID:      $Id: regex.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright:   (c) 2000 Karsten Ballueder 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -68,7 +68,7 @@ enum
 // wxRegEx: a regular expression
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxRegExImpl;
+class WXDLLIMPEXP_FWD_BASE wxRegExImpl;
 
 class WXDLLIMPEXP_BASE wxRegEx
 {
diff --git a/Externals/wxWidgets/include/wx/renderer.h b/Externals/wxWidgets/include/wx/renderer.h
index 122c91845e..b28ec85312 100644
--- a/Externals/wxWidgets/include/wx/renderer.h
+++ b/Externals/wxWidgets/include/wx/renderer.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.07.2003
-// RCS-ID:      $Id: renderer.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: renderer.h 53667 2008-05-20 09:28:48Z VS $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -406,4 +406,31 @@ wxRendererNative& wxRendererNative::GetDefault()
 
 #endif // !wxHAS_NATIVE_RENDERER
 
+
+// ----------------------------------------------------------------------------
+// Other renderer functions to be merged in to wxRenderer class in 2.9, but
+// they are standalone functions here to protect the ABI.
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXGTK20__)
+#if wxABI_VERSION >= 20808
+
+// Draw a native wxChoice
+void WXDLLEXPORT wxRenderer_DrawChoice(wxWindow* win, wxDC& dc,
+                                       const wxRect& rect, int flags=0);
+
+// Draw a native wxComboBox
+void WXDLLEXPORT wxRenderer_DrawComboBox(wxWindow* win, wxDC& dc,
+                                         const wxRect& rect, int flags=0);
+
+// Draw a native wxTextCtrl frame
+void WXDLLEXPORT wxRenderer_DrawTextCtrl(wxWindow* win, wxDC& dc,
+                                         const wxRect& rect, int flags=0);
+
+// Draw a native wxRadioButton (just the graphical portion)
+void WXDLLEXPORT wxRenderer_DrawRadioButton(wxWindow* win, wxDC& dc,
+                                            const wxRect& rect, int flags=0);
+#endif // wxABI_VERSION
+#endif // (platforms)
+
 #endif // _WX_RENDERER_H_
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextbuffer.h b/Externals/wxWidgets/include/wx/richtext/richtextbuffer.h
index e912ca2a28..b7667faf0e 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextbuffer.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextbuffer.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2005-09-30
-// RCS-ID:      $Id: richtextbuffer.h 44399 2007-02-07 12:24:17Z JS $
+// RCS-ID:      $Id: richtextbuffer.h 53671 2008-05-20 13:23:07Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -70,6 +70,14 @@
 #include "wx/dataobj.h"
 #endif
 
+// Setting wxRICHTEXT_USE_OWN_CARET to 1 implements a non-flashing
+// cursor reliably without using wxClientDC in case there
+// are platform-specific problems with the generic caret.
+#define wxRICHTEXT_USE_OWN_CARET 0
+
+// Switch off for binary compatibility, on for faster drawing
+#define wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING 0
+
 /*!
  * Special characters
  */
@@ -91,19 +99,19 @@ extern WXDLLIMPEXP_RICHTEXT const wxChar wxRichTextLineBreakChar;
  * Forward declarations
  */
 
-class WXDLLIMPEXP_RICHTEXT wxRichTextCtrl;
-class WXDLLIMPEXP_RICHTEXT wxRichTextObject;
-class WXDLLIMPEXP_RICHTEXT wxRichTextCacheObject;
-class WXDLLIMPEXP_RICHTEXT wxRichTextObjectList;
-class WXDLLIMPEXP_RICHTEXT wxRichTextLine;
-class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph;
-class WXDLLIMPEXP_RICHTEXT wxRichTextFileHandler;
-class WXDLLIMPEXP_RICHTEXT wxRichTextStyleSheet;
-class WXDLLIMPEXP_RICHTEXT wxTextAttrEx;
-class WXDLLIMPEXP_RICHTEXT wxRichTextListStyleDefinition;
-class WXDLLIMPEXP_RICHTEXT wxRichTextEvent;
-class WXDLLIMPEXP_RICHTEXT wxRichTextRenderer;
-class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCtrl;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextObject;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCacheObject;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextObjectList;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextLine;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextParagraph;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextFileHandler;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextStyleSheet;
+class WXDLLIMPEXP_FWD_RICHTEXT wxTextAttrEx;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextListStyleDefinition;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextEvent;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextRenderer;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextBuffer;
 
 /*!
  * Flags determining the available space, passed to Layout
@@ -148,6 +156,8 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer;
 
 #define wxRICHTEXT_FORMATTED        0x01
 #define wxRICHTEXT_UNFORMATTED      0x02
+#define wxRICHTEXT_CACHE_SIZE       0x04
+#define wxRICHTEXT_HEIGHT_ONLY      0x08
 
 /*!
  * Flags for SetStyle/SetListStyle
@@ -192,6 +202,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer;
 
 #define wxRICHTEXT_INSERT_NONE                              0x00
 #define wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE     0x01
+#define wxRICHTEXT_INSERT_INTERACTIVE                       0x02
 
 /*!
  * Extra formatting flags not in wxTextAttr
@@ -212,6 +223,11 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer;
 #define wxTEXT_ATTR_EFFECTS                 0x00800000
 #define wxTEXT_ATTR_OUTLINE_LEVEL           0x01000000
 
+// A special flag telling the buffer to keep the first paragraph style
+// as-is, when deleting a paragraph marker. In future we might pass a
+// flag to InsertFragment and DeleteRange to indicate the appropriate mode.
+#define wxTEXT_ATTR_KEEP_FIRST_PARA_STYLE   0x10000000
+
 /*!
  * Styles for wxTextAttrEx::SetBulletStyle
  */
@@ -271,6 +287,12 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer;
 
 #define wxTEXT_ATTR_ALL (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
 
+/*!
+ * Default superscript/subscript font multiplication factor
+ */
+
+#define wxSCRIPT_MUL_FACTOR             1.5
+
 /*!
  * wxRichTextRange class declaration
  * This stores beginning and end positions for a range of data.
@@ -567,7 +589,7 @@ public:
     // accessors
     bool HasTextColour() const { return m_colText.Ok() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
     bool HasBackgroundColour() const { return m_colBack.Ok() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
-    bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) || ((m_flags & wxTEXT_ATTR_ALIGNMENT) != 0) ; }
+    bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && ((m_flags & wxTEXT_ATTR_ALIGNMENT) != 0) ; }
     bool HasTabs() const { return (m_flags & wxTEXT_ATTR_TABS) != 0 ; }
     bool HasLeftIndent() const { return (m_flags & wxTEXT_ATTR_LEFT_INDENT) != 0 ; }
     bool HasRightIndent() const { return (m_flags & wxTEXT_ATTR_RIGHT_INDENT) != 0 ; }
@@ -1230,6 +1252,11 @@ public:
     void SetDescent(int descent) { m_descent = descent; }
     int GetDescent() const { return m_descent; }
 
+#if wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING
+    wxArrayInt& GetObjectSizes() { return m_objectSizes; }
+    const wxArrayInt& GetObjectSizes() const { return m_objectSizes; }
+#endif
+
 // Operations
 
     /// Initialisation
@@ -1256,6 +1283,11 @@ protected:
 
     // The parent object
     wxRichTextParagraph* m_parent;
+
+    // Sizes of the objects within a line so we don't have to get text extents
+#if wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING
+    wxArrayInt          m_objectSizes;
+#endif
 };
 
 WX_DECLARE_LIST_WITH_DECL( wxRichTextLine, wxRichTextLineList , class WXDLLIMPEXP_RICHTEXT );
@@ -1460,8 +1492,8 @@ protected:
  * wxRichTextImageBlock stores information about an image, in binary in-memory form
  */
 
-class WXDLLIMPEXP_BASE wxDataInputStream;
-class WXDLLIMPEXP_BASE wxDataOutputStream;
+class WXDLLIMPEXP_FWD_BASE wxDataInputStream;
+class WXDLLIMPEXP_FWD_BASE wxDataOutputStream;
 
 class WXDLLIMPEXP_RICHTEXT wxRichTextImageBlock: public wxObject
 {
@@ -1608,8 +1640,8 @@ protected:
  * This is a kind of box, used to represent the whole buffer
  */
 
-class WXDLLIMPEXP_RICHTEXT wxRichTextCommand;
-class WXDLLIMPEXP_RICHTEXT wxRichTextAction;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCommand;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextAction;
 
 class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer: public wxRichTextParagraphLayoutBox
 {
@@ -1998,7 +2030,7 @@ enum wxRichTextCommandId
  *
  */
 
-class WXDLLIMPEXP_RICHTEXT wxRichTextAction;
+class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextAction;
 class WXDLLIMPEXP_RICHTEXT wxRichTextCommand: public wxCommand
 {
 public:
@@ -2047,6 +2079,11 @@ public:
     /// Replace the buffer paragraphs with the given fragment.
     void ApplyParagraphs(const wxRichTextParagraphLayoutBox& fragment);
 
+#if wxABI_VERSION >= 20808
+    // Create arrays to be used in refresh optimization
+    void CalculateRefreshOptimizations(wxArrayInt& optimizationLineCharPositions, wxArrayInt& optimizationLineYPositions);
+#endif
+
     /// Get the fragments
     wxRichTextParagraphLayoutBox& GetNewParagraphs() { return m_newParagraphs; }
     wxRichTextParagraphLayoutBox& GetOldParagraphs() { return m_oldParagraphs; }
@@ -2111,6 +2148,10 @@ protected:
 // in a larger document
 #define wxRICHTEXT_HANDLER_NO_HEADER_FOOTER         0x0080
 
+// Convert the more common face names to names that will work on the current platform
+// in a larger document
+#define wxRICHTEXT_HANDLER_CONVERT_FACENAMES        0x0100
+
 /*!
  * wxRichTextFileHandler
  * Base class for file handlers
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextbulletspage.h b/Externals/wxWidgets/include/wx/richtext/richtextbulletspage.h
index 1e64530ebb..fc69435507 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextbulletspage.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextbulletspage.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     10/4/2006 10:32:31 AM
-// RCS-ID:      $Id: richtextbulletspage.h 42678 2006-10-29 22:01:06Z JS $
+// RCS-ID:      $Id: richtextbulletspage.h 50950 2007-12-30 16:11:12Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,11 +16,6 @@
  * Includes
  */
 
-////@begin includes
-#include "wx/statline.h"
-#include "wx/spinctrl.h"
-////@end includes
-
 /*!
  * Forward declarations
  */
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextctrl.h b/Externals/wxWidgets/include/wx/richtext/richtextctrl.h
index decbca2496..6b4c0f6e37 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextctrl.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextctrl.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2005-09-30
-// RCS-ID:      $Id: richtextctrl.h 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: richtextctrl.h 52136 2008-02-27 08:54:40Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -144,6 +144,20 @@ public:
     /// Get the threshold in character positions for doing layout optimization during sizing
     long GetDelayedLayoutThreshold() const { return m_delayedLayoutThreshold; }
 
+#if wxABI_VERSION >= 20808
+    /// Set text cursor
+    void SetTextCursor(const wxCursor& cursor ) { m_textCursor = cursor; }
+
+    /// Get text cursor
+    wxCursor GetTextCursor() const { return m_textCursor; }
+
+    /// Set URL cursor
+    void SetURLCursor(const wxCursor& cursor ) { m_urlCursor = cursor; }
+
+    /// Get URL cursor
+    wxCursor GetURLCursor() const { return m_urlCursor; }
+#endif
+
 // Operations
 
     // editing
@@ -925,10 +939,17 @@ BEGIN_DECLARE_EVENT_TYPES()
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, 2614)
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, 2615)
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, 2616)
+
+#if wxABI_VERSION >= 20808
+    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_RICHTEXT, wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, 2617)
+#endif
 END_DECLARE_EVENT_TYPES()
 
 typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&);
 
+#define wxRichTextEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxRichTextEventFunction, &func)
+
 #define EVT_RICHTEXT_LEFT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 #define EVT_RICHTEXT_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 #define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
@@ -946,6 +967,7 @@ typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&);
 #define EVT_RICHTEXT_CONTENT_DELETED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 #define EVT_RICHTEXT_STYLE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 #define EVT_RICHTEXT_SELECTION_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
+#define EVT_RICHTEXT_BUFFER_RESET(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxRichTextEventFunction, & fn ), NULL ),
 
 #endif
     // wxUSE_RICHTEXT
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextfontpage.h b/Externals/wxWidgets/include/wx/richtext/richtextfontpage.h
index 7ecce8f361..1e1295fa78 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextfontpage.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextfontpage.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2006-10-02
-// RCS-ID:      $Id: richtextfontpage.h 43197 2006-11-08 14:05:50Z JS $
+// RCS-ID:      $Id: richtextfontpage.h 53105 2008-04-10 14:05:25Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -103,6 +103,12 @@ public:
     /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL
     void OnCapsctrlClick( wxCommandEvent& event );
 
+    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT
+    void OnRichtextfontpageSuperscriptClick( wxCommandEvent& event );
+
+    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT
+    void OnRichtextfontpageSubscriptClick( wxCommandEvent& event );
+
 ////@end wxRichTextFontPage event handler declarations
 
 ////@begin wxRichTextFontPage member function declarations
@@ -128,6 +134,8 @@ public:
     wxRichTextColourSwatchCtrl* m_colourCtrl;
     wxCheckBox* m_strikethroughCtrl;
     wxCheckBox* m_capitalsCtrl;
+    wxCheckBox* m_superscriptCtrl;
+    wxCheckBox* m_subscriptCtrl;
     wxRichTextFontPreviewCtrl* m_previewCtrl;
     /// Control identifiers
     enum {
@@ -142,6 +150,8 @@ public:
         ID_RICHTEXTFONTPAGE_COLOURCTRL = 10009,
         ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10010,
         ID_RICHTEXTFONTPAGE_CAPSCTRL = 10011,
+        ID_RICHTEXTFONTPAGE_SUPERSCRIPT = 10012,
+        ID_RICHTEXTFONTPAGE_SUBSCRIPT = 10013,
         ID_RICHTEXTFONTPAGE_PREVIEWCTRL = 10003
     };
 ////@end wxRichTextFontPage member variables
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextstyledlg.h b/Externals/wxWidgets/include/wx/richtext/richtextstyledlg.h
index 1315c90311..fdad166ad7 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextstyledlg.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextstyledlg.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     10/5/2006 12:05:31 PM
-// RCS-ID:      $Id: richtextstyledlg.h 49398 2007-10-24 14:20:43Z JS $
+// RCS-ID:      $Id: richtextstyledlg.h 52117 2008-02-26 15:04:54Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -33,6 +33,9 @@ class wxRichTextStyleListCtrl;
 class wxRichTextCtrl;
 ////@end forward declarations
 
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxCheckBox;
+
 /*!
  * Control identifiers
  */
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextsymboldlg.h b/Externals/wxWidgets/include/wx/richtext/richtextsymboldlg.h
index a995422f68..f7079569ef 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextsymboldlg.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextsymboldlg.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     10/5/2006 3:11:58 PM
-// RCS-ID:      $Id: richtextsymboldlg.h 49960 2007-11-15 08:03:59Z JS $
+// RCS-ID:      $Id: richtextsymboldlg.h 50950 2007-12-30 16:11:12Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,14 +18,15 @@
 
 #include "wx/dialog.h"
 #include "wx/vscroll.h"
-#include "wx/combobox.h"
-#include "wx/stattext.h"
-#include "wx/textctrl.h"
 
 /*!
  * Forward declarations
  */
 
+class WXDLLIMPEXP_FWD_CORE wxStaticText;
+class WXDLLIMPEXP_FWD_CORE wxComboBox;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+
 ////@begin forward declarations
 class wxSymbolListCtrl;
 ////@end forward declarations
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextxml.h b/Externals/wxWidgets/include/wx/richtext/richtextxml.h
index 621305fc21..36d9bb8dc9 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextxml.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextxml.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2005-09-30
-// RCS-ID:      $Id: richtextxml.h 42431 2006-10-26 06:32:47Z JS $
+// RCS-ID:      $Id: richtextxml.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@
  * wxRichTextXMLHandler
  */
 
-class WXDLLIMPEXP_XML wxXmlNode;
+class WXDLLIMPEXP_FWD_XML wxXmlNode;
 
 class WXDLLIMPEXP_RICHTEXT wxRichTextXMLHandler: public wxRichTextFileHandler
 {
diff --git a/Externals/wxWidgets/include/wx/sckipc.h b/Externals/wxWidgets/include/wx/sckipc.h
index 6ff0bb01c7..ef388101f2 100644
--- a/Externals/wxWidgets/include/wx/sckipc.h
+++ b/Externals/wxWidgets/include/wx/sckipc.h
@@ -6,7 +6,7 @@
 //              Guillermo Rodriguez (updated for wxSocket v2) Jan 2000
 //                                  (callbacks deprecated)    Mar 2000
 // Created:     1993
-// RCS-ID:      $Id: sckipc.h 36183 2005-11-15 18:05:48Z VZ $
+// RCS-ID:      $Id: sckipc.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Julian Smart 1993
 //              (c) Guilhem Lavaux 1997, 1998
 //              (c) 2000 Guillermo Rodriguez 
@@ -49,8 +49,8 @@
  *
  */
 
-class WXDLLIMPEXP_NET wxTCPServer;
-class WXDLLIMPEXP_NET wxTCPClient;
+class WXDLLIMPEXP_FWD_NET wxTCPServer;
+class WXDLLIMPEXP_FWD_NET wxTCPClient;
 
 class WXDLLIMPEXP_NET wxTCPConnection: public wxConnectionBase
 {
diff --git a/Externals/wxWidgets/include/wx/scrolwin.h b/Externals/wxWidgets/include/wx/scrolwin.h
index 46269c8723..c5d06fa1e2 100644
--- a/Externals/wxWidgets/include/wx/scrolwin.h
+++ b/Externals/wxWidgets/include/wx/scrolwin.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     30.08.00
-// RCS-ID:      $Id: scrolwin.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: scrolwin.h 50864 2007-12-20 18:36:19Z VS $
 // Copyright:   (c) 2000 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -163,6 +163,10 @@ public:
     void HandleOnMouseWheel(wxMouseEvent& event);
 #endif // wxUSE_MOUSEWHEEL
 
+#if wxABI_VERSION >= 20808
+    void HandleOnChildFocus(wxChildFocusEvent& event);
+#endif
+
     // FIXME: this is needed for now for wxPlot compilation, should be removed
     //        once it is fixed!
     void OnScroll(wxScrollWinEvent& event) { HandleOnScroll(event); }
diff --git a/Externals/wxWidgets/include/wx/setup_inc.h b/Externals/wxWidgets/include/wx/setup_inc.h
index ba10f4c32c..aafa934070 100644
--- a/Externals/wxWidgets/include/wx/setup_inc.h
+++ b/Externals/wxWidgets/include/wx/setup_inc.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:
-// RCS-ID:      $Id: setup_inc.h 43908 2006-12-11 06:19:27Z RD $
+// RCS-ID:      $Id: setup_inc.h 51451 2008-01-29 23:11:55Z VZ $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -1038,7 +1038,7 @@
 // ----------------------------------------------------------------------------
 
 // wxSingleInstanceChecker class allows to verify at startup if another program
-// instance is running (it is only available under Win32)
+// instance is running.
 //
 // Default is 1
 //
diff --git a/Externals/wxWidgets/include/wx/sizer.h b/Externals/wxWidgets/include/wx/sizer.h
index 3cb78b9c1e..e95ab437e1 100644
--- a/Externals/wxWidgets/include/wx/sizer.h
+++ b/Externals/wxWidgets/include/wx/sizer.h
@@ -4,7 +4,7 @@
 // Author:      Robert Roebling and Robin Dunn
 // Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags)
 // Created:
-// RCS-ID:      $Id: sizer.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: sizer.h 52331 2008-03-05 15:02:22Z VS $
 // Copyright:   (c) Robin Dunn, Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -24,6 +24,8 @@ class WXDLLIMPEXP_FWD_CORE wxButton;
 class WXDLLIMPEXP_FWD_CORE wxBoxSizer;
 class WXDLLIMPEXP_FWD_CORE wxSizerItem;
 class WXDLLIMPEXP_FWD_CORE wxSizer;
+class WXDLLIMPEXP_FWD_CORE wxFlexGridSizer;
+class WXDLLIMPEXP_FWD_CORE wxGridBagSizer;
 
 #ifndef wxUSE_BORDER_BY_DEFAULT
     #ifdef __SMARTPHONE__
@@ -175,6 +177,11 @@ public:
     }
 #endif // wx 2.8.2+
 
+#if wxABI_VERSION >= 20808
+    // makes the item ignore window's visibility status
+    wxSizerFlags& ReserveSpaceEvenIfHidden();
+#endif
+
     // accessors for wxSizer only
     int GetProportion() const { return m_proportion; }
     int GetFlags() const { return m_flags; }
@@ -393,8 +400,15 @@ protected:
     wxObject    *m_userData;
 
 private:
+    // 2.8-only implementation detail for wxRESERVE_SPACE_EVEN_IF_HIDDEN
+    bool ShouldAccountFor() const;
+
     DECLARE_CLASS(wxSizerItem)
     DECLARE_NO_COPY_CLASS(wxSizerItem)
+
+    friend class wxBoxSizer;
+    friend class wxFlexGridSizer;
+    friend class wxGridBagSizer;
 };
 
 WX_DECLARE_EXPORTED_LIST( wxSizerItem, wxSizerItemList );
@@ -548,6 +562,11 @@ public:
 
     virtual void Layout();
 
+#if wxABI_VERSION >= 20808
+    wxSize ComputeFittingClientSize(wxWindow *window);
+    wxSize ComputeFittingWindowSize(wxWindow *window);
+#endif
+
     wxSize Fit( wxWindow *window );
     void FitInside( wxWindow *window );
     void SetSizeHints( wxWindow *window );
@@ -858,7 +877,7 @@ private:
 
 // this sizer works with wxNotebook/wxListbook/... and sizes the control to
 // fit its pages
-class WXDLLEXPORT wxBookCtrlBase;
+class WXDLLIMPEXP_FWD_CORE wxBookCtrlBase;
 
 class WXDLLEXPORT wxBookCtrlSizer : public wxSizer
 {
@@ -889,7 +908,7 @@ private:
 
 // before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards
 // compatibility
-class WXDLLEXPORT wxNotebook;
+class WXDLLIMPEXP_FWD_CORE wxNotebook;
 
 class WXDLLEXPORT wxNotebookSizer : public wxBookCtrlSizer
 {
diff --git a/Externals/wxWidgets/include/wx/stream.h b/Externals/wxWidgets/include/wx/stream.h
index dea2085305..bea273189b 100644
--- a/Externals/wxWidgets/include/wx/stream.h
+++ b/Externals/wxWidgets/include/wx/stream.h
@@ -4,7 +4,7 @@
 // Author:      Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin
 // Modified by:
 // Created:     11/07/98
-// RCS-ID:      $Id: stream.h 42623 2006-10-29 17:00:07Z MW $
+// RCS-ID:      $Id: stream.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -21,9 +21,9 @@
 #include "wx/string.h"
 #include "wx/filefn.h"  // for wxFileOffset, wxInvalidOffset and wxSeekMode
 
-class WXDLLIMPEXP_BASE wxStreamBase;
-class WXDLLIMPEXP_BASE wxInputStream;
-class WXDLLIMPEXP_BASE wxOutputStream;
+class WXDLLIMPEXP_FWD_BASE wxStreamBase;
+class WXDLLIMPEXP_FWD_BASE wxInputStream;
+class WXDLLIMPEXP_FWD_BASE wxOutputStream;
 
 typedef wxInputStream& (*__wxInputManip)(wxInputStream&);
 typedef wxOutputStream& (*__wxOutputManip)(wxOutputStream&);
diff --git a/Externals/wxWidgets/include/wx/string.h b/Externals/wxWidgets/include/wx/string.h
index fa3d9c5a86..8ea435ee08 100644
--- a/Externals/wxWidgets/include/wx/string.h
+++ b/Externals/wxWidgets/include/wx/string.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: string.h 45861 2007-05-06 12:57:43Z VS $
+// RCS-ID:      $Id: string.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@
 #include "wx/buffer.h"      // for wxCharBuffer
 #include "wx/strconv.h"     // for wxConvertXXX() macros and wxMBConv classes
 
-class WXDLLIMPEXP_BASE wxString;
+class WXDLLIMPEXP_FWD_BASE wxString;
 
 // ---------------------------------------------------------------------------
 // macros
@@ -252,7 +252,7 @@ struct WXDLLIMPEXP_BASE wxStringData
 class WXDLLIMPEXP_BASE wxStringBase
 {
 #if !wxUSE_STL
-friend class WXDLLIMPEXP_BASE wxArrayString;
+friend class WXDLLIMPEXP_FWD_BASE wxArrayString;
 #endif
 public :
   // an 'invalid' value for string index, moved to this place due to a CW bug
@@ -659,7 +659,7 @@ public:
 class WXDLLIMPEXP_BASE wxString : public wxStringBase
 {
 #if !wxUSE_STL
-friend class WXDLLIMPEXP_BASE wxArrayString;
+friend class WXDLLIMPEXP_FWD_BASE wxArrayString;
 #endif
 
   // NB: special care was taken in arranging the member functions in such order
diff --git a/Externals/wxWidgets/include/wx/taskbar.h b/Externals/wxWidgets/include/wx/taskbar.h
index 3a204df112..7cdd1cc3ad 100644
--- a/Externals/wxWidgets/include/wx/taskbar.h
+++ b/Externals/wxWidgets/include/wx/taskbar.h
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:
 // Copyright:   (c) Julian Smart
-// RCS-ID:      $Id: taskbar.h 44138 2007-01-07 19:44:14Z VZ $
+// RCS-ID:      $Id: taskbar.h 53135 2008-04-12 02:31:04Z VZ $
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -18,7 +18,7 @@
 
 #include "wx/event.h"
 
-class WXDLLIMPEXP_ADV wxTaskBarIconEvent;
+class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent;
 
 // ----------------------------------------------------------------------------
 // wxTaskBarIconBase: define wxTaskBarIcon interface
diff --git a/Externals/wxWidgets/include/wx/textbuf.h b/Externals/wxWidgets/include/wx/textbuf.h
index 845439e3d9..97246b6b2e 100644
--- a/Externals/wxWidgets/include/wx/textbuf.h
+++ b/Externals/wxWidgets/include/wx/textbuf.h
@@ -172,7 +172,7 @@ protected:
     // -----
 
     // default ctor, use Open(string)
-    wxTextBuffer() { m_isOpened = false; }
+    wxTextBuffer() { m_nCurLine = 0; m_isOpened = false; }
 
     // ctor from filename
     wxTextBuffer(const wxString& strBufferName);
diff --git a/Externals/wxWidgets/include/wx/textctrl.h b/Externals/wxWidgets/include/wx/textctrl.h
index 59572d3d50..b1b4c0a25a 100644
--- a/Externals/wxWidgets/include/wx/textctrl.h
+++ b/Externals/wxWidgets/include/wx/textctrl.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     13.07.99
-// RCS-ID:      $Id: textctrl.h 41754 2006-10-08 22:40:14Z VZ $
+// RCS-ID:      $Id: textctrl.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -44,8 +44,8 @@
     #define NO_TEXT_WINDOW_STREAM
 #endif
 
-class WXDLLEXPORT wxTextCtrl;
-class WXDLLEXPORT wxTextCtrlBase;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrlBase;
 
 // ----------------------------------------------------------------------------
 // wxTextCtrl types
@@ -232,7 +232,7 @@ public:
     bool HasTextColour() const { return m_colText.Ok() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
     bool HasBackgroundColour() const { return m_colBack.Ok() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
     bool HasFont() const { return m_font.Ok() && HasFlag(wxTEXT_ATTR_FONT) ; }
-    bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) || ((m_flags & wxTEXT_ATTR_ALIGNMENT) != 0) ; }
+    bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && ((m_flags & wxTEXT_ATTR_ALIGNMENT) != 0) ; }
     bool HasTabs() const { return (m_flags & wxTEXT_ATTR_TABS) != 0 ; }
     bool HasLeftIndent() const { return (m_flags & wxTEXT_ATTR_LEFT_INDENT) != 0 ; }
     bool HasRightIndent() const { return (m_flags & wxTEXT_ATTR_RIGHT_INDENT) != 0 ; }
diff --git a/Externals/wxWidgets/include/wx/thread.h b/Externals/wxWidgets/include/wx/thread.h
index 6e60aee444..bb15fa7a44 100644
--- a/Externals/wxWidgets/include/wx/thread.h
+++ b/Externals/wxWidgets/include/wx/thread.h
@@ -5,7 +5,7 @@
 // Modified by: Vadim Zeitlin (modifications partly inspired by omnithreads
 //              package from Olivetti & Oracle Research Laboratory)
 // Created:     04/13/98
-// RCS-ID:      $Id: thread.h 38717 2006-04-14 17:01:16Z ABX $
+// RCS-ID:      $Id: thread.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -109,11 +109,11 @@ enum wxMutexType
 };
 
 // forward declarations
-class WXDLLIMPEXP_BASE wxThreadHelper;
-class WXDLLIMPEXP_BASE wxConditionInternal;
-class WXDLLIMPEXP_BASE wxMutexInternal;
-class WXDLLIMPEXP_BASE wxSemaphoreInternal;
-class WXDLLIMPEXP_BASE wxThreadInternal;
+class WXDLLIMPEXP_FWD_BASE wxThreadHelper;
+class WXDLLIMPEXP_FWD_BASE wxConditionInternal;
+class WXDLLIMPEXP_FWD_BASE wxMutexInternal;
+class WXDLLIMPEXP_FWD_BASE wxSemaphoreInternal;
+class WXDLLIMPEXP_FWD_BASE wxThreadInternal;
 
 // ----------------------------------------------------------------------------
 // A mutex object is a synchronization object whose state is set to signaled
@@ -693,11 +693,12 @@ inline void WXDLLIMPEXP_BASE wxMutexGuiLeave() { }
 
 // macros for entering/leaving critical sections which may be used without
 // having to take them inside "#if wxUSE_THREADS"
-#define wxENTER_CRIT_SECT(cs)
-#define wxLEAVE_CRIT_SECT(cs)
-#define wxCRIT_SECT_DECLARE(cs)
-#define wxCRIT_SECT_DECLARE_MEMBER(cs)
-#define wxCRIT_SECT_LOCKER(name, cs)
+// (the implementation uses dummy structs to force semicolon after the macro)
+#define wxENTER_CRIT_SECT(cs)            do {} while (0)
+#define wxLEAVE_CRIT_SECT(cs)            do {} while (0)
+#define wxCRIT_SECT_DECLARE(cs)          struct wxDummyCS##cs
+#define wxCRIT_SECT_DECLARE_MEMBER(cs)   struct wxDummyCSMember##cs
+#define wxCRIT_SECT_LOCKER(name, cs)     struct wxDummyCSLocker##name
 
 // if there is only one thread, it is always the main one
 inline bool wxIsMainThread() { return true; }
diff --git a/Externals/wxWidgets/include/wx/tipwin.h b/Externals/wxWidgets/include/wx/tipwin.h
index 0bf3db8dc0..b6c8d350aa 100644
--- a/Externals/wxWidgets/include/wx/tipwin.h
+++ b/Externals/wxWidgets/include/wx/tipwin.h
@@ -5,7 +5,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     10.09.00
-// RCS-ID:      $Id: tipwin.h 35650 2005-09-23 12:56:45Z MR $
+// RCS-ID:      $Id: tipwin.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2000 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@
 #endif
 #include "wx/arrstr.h"
 
-class WXDLLEXPORT wxTipWindowView;
+class WXDLLIMPEXP_FWD_CORE wxTipWindowView;
 
 // ----------------------------------------------------------------------------
 // wxTipWindow
diff --git a/Externals/wxWidgets/include/wx/toplevel.h b/Externals/wxWidgets/include/wx/toplevel.h
index 0b6831357f..2351d7cd9a 100644
--- a/Externals/wxWidgets/include/wx/toplevel.h
+++ b/Externals/wxWidgets/include/wx/toplevel.h
@@ -5,7 +5,7 @@
 // Author:      Vadim Zeitlin, Vaclav Slavik
 // Modified by:
 // Created:     06.08.01
-// RCS-ID:      $Id: toplevel.h 43843 2006-12-07 05:44:44Z PC $
+// RCS-ID:      $Id: toplevel.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2001 Vadim Zeitlin 
 //                       Vaclav Slavik 
 // Licence:     wxWindows licence
@@ -24,7 +24,7 @@
 // the default names for various classes
 extern WXDLLEXPORT_DATA(const wxChar) wxFrameNameStr[];
 
-class WXDLLEXPORT wxTopLevelWindowBase;
+class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
 
 // ----------------------------------------------------------------------------
 // constants
diff --git a/Externals/wxWidgets/include/wx/treebase.h b/Externals/wxWidgets/include/wx/treebase.h
index 2a9771831b..a89786268b 100644
--- a/Externals/wxWidgets/include/wx/treebase.h
+++ b/Externals/wxWidgets/include/wx/treebase.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart et al
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: treebase.h 39857 2006-06-27 21:21:36Z RD $
+// RCS-ID:      $Id: treebase.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1997,1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -107,8 +107,8 @@ inline bool operator!=(const wxTreeItemId& i1, const wxTreeItemId& i2)
 
 class WXDLLEXPORT wxTreeItemData: public wxClientData
 {
-friend class WXDLLEXPORT wxTreeCtrl;
-friend class WXDLLEXPORT wxGenericTreeCtrl;
+friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl;
+friend class WXDLLIMPEXP_FWD_CORE wxGenericTreeCtrl;
 public:
     // creation/destruction
     // --------------------
@@ -265,7 +265,7 @@ private:
 //     descriptions below
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT  wxTreeCtrlBase;
+class WXDLLIMPEXP_FWD_CORE wxTreeCtrlBase;
 
 class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
 {
@@ -320,8 +320,8 @@ private:
     wxString      m_label;
     bool          m_editCancelled;
 
-    friend class WXDLLEXPORT wxTreeCtrl;
-    friend class WXDLLEXPORT wxGenericTreeCtrl;
+    friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl;
+    friend class WXDLLIMPEXP_FWD_CORE wxGenericTreeCtrl;
 
     DECLARE_DYNAMIC_CLASS(wxTreeEvent)
 };
diff --git a/Externals/wxWidgets/include/wx/txtstrm.h b/Externals/wxWidgets/include/wx/txtstrm.h
index 1054811009..0e2b0c9551 100644
--- a/Externals/wxWidgets/include/wx/txtstrm.h
+++ b/Externals/wxWidgets/include/wx/txtstrm.h
@@ -4,7 +4,7 @@
 // Author:      Guilhem Lavaux
 // Modified by:
 // Created:     28/06/1998
-// RCS-ID:      $Id: txtstrm.h 38717 2006-04-14 17:01:16Z ABX $
+// RCS-ID:      $Id: txtstrm.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -17,8 +17,8 @@
 
 #if wxUSE_STREAMS
 
-class WXDLLIMPEXP_BASE wxTextInputStream;
-class WXDLLIMPEXP_BASE wxTextOutputStream;
+class WXDLLIMPEXP_FWD_BASE wxTextInputStream;
+class WXDLLIMPEXP_FWD_BASE wxTextOutputStream;
 
 typedef wxTextInputStream& (*__wxTextInputManip)(wxTextInputStream&);
 typedef wxTextOutputStream& (*__wxTextOutputManip)(wxTextOutputStream&);
diff --git a/Externals/wxWidgets/include/wx/unix/taskbarx11.h b/Externals/wxWidgets/include/wx/unix/taskbarx11.h
index 7e74a54beb..419ea1e04a 100644
--- a/Externals/wxWidgets/include/wx/unix/taskbarx11.h
+++ b/Externals/wxWidgets/include/wx/unix/taskbarx11.h
@@ -4,7 +4,7 @@
 // Author:      Vaclav Slavik
 // Modified by:
 // Created:     04/04/2003
-// RCS-ID:      $Id: taskbarx11.h 35650 2005-09-23 12:56:45Z MR $
+// RCS-ID:      $Id: taskbarx11.h 53563 2008-05-11 22:45:36Z PC $
 // Copyright:   (c) Vaclav Slavik, 2003
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
@@ -36,6 +36,9 @@ public:
 protected:
     wxTaskBarIconArea *m_iconWnd;
 
+private:
+    void OnDestroy(wxWindowDestroyEvent&);
+
     DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
 };
 
diff --git a/Externals/wxWidgets/include/wx/utils.h b/Externals/wxWidgets/include/wx/utils.h
index bfd7977b97..cf94bc0e6c 100644
--- a/Externals/wxWidgets/include/wx/utils.h
+++ b/Externals/wxWidgets/include/wx/utils.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: utils.h 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: utils.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -46,10 +46,10 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt;
 // Forward declaration
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxProcess;
-class WXDLLIMPEXP_CORE wxFrame;
-class WXDLLIMPEXP_CORE wxWindow;
-class WXDLLIMPEXP_CORE wxWindowList;
+class WXDLLIMPEXP_FWD_BASE wxProcess;
+class WXDLLIMPEXP_FWD_CORE wxFrame;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindowList;
 
 // ----------------------------------------------------------------------------
 // Macros
@@ -720,9 +720,16 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y );
 // wxYield(): these functions are obsolete, please use wxApp methods instead!
 // ----------------------------------------------------------------------------
 
+// avoid redeclaring this function here if it had been already declated by
+// wx/app.h, this results in warnings from g++ with -Wredundant-decls
+#ifndef wx_YIELD_DECLARED
+#define wx_YIELD_DECLARED
+
 // Yield to other apps/messages
 WXDLLIMPEXP_BASE bool wxYield();
 
+#endif // wx_YIELD_DECLARED
+
 // Like wxYield, but fails silently if the yield is recursive.
 WXDLLIMPEXP_BASE bool wxYieldIfNeeded();
 
diff --git a/Externals/wxWidgets/include/wx/validate.h b/Externals/wxWidgets/include/wx/validate.h
index 16b03b726b..ea8c808979 100644
--- a/Externals/wxWidgets/include/wx/validate.h
+++ b/Externals/wxWidgets/include/wx/validate.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: validate.h 45498 2007-04-16 13:03:05Z VZ $
+// RCS-ID:      $Id: validate.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,8 +18,8 @@
 
 #include "wx/event.h"
 
-class WXDLLEXPORT wxWindow;
-class WXDLLEXPORT wxWindowBase;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindowBase;
 
 /*
  A validator has up to three purposes:
diff --git a/Externals/wxWidgets/include/wx/version.h b/Externals/wxWidgets/include/wx/version.h
index 2662d7eee2..3362a015c1 100644
--- a/Externals/wxWidgets/include/wx/version.h
+++ b/Externals/wxWidgets/include/wx/version.h
@@ -4,7 +4,7 @@
  *  Author:      Julian Smart
  *  Modified by: Ryan Norton (Converted to C)
  *  Created:     29/01/98
- *  RCS-ID:      $Id: version.h 49673 2007-11-06 09:28:42Z CE $
+ *  RCS-ID:      $Id: version.h 53651 2008-05-19 19:09:22Z CE $
  *  Copyright:   (c) 1998 Julian Smart
  *  Licence:     wxWindows licence
  */
@@ -28,9 +28,9 @@
 /*  NB: this file is parsed by automatic tools so don't change its format! */
 #define wxMAJOR_VERSION      2
 #define wxMINOR_VERSION      8
-#define wxRELEASE_NUMBER     7
+#define wxRELEASE_NUMBER     8
 #define wxSUBRELEASE_NUMBER  0
-#define wxVERSION_STRING   _T("wxWidgets 2.8.7")
+#define wxVERSION_STRING   _T("wxWidgets 2.8.8")
 
 /*  nothing to update below this line when updating the version */
 /*  ---------------------------------------------------------------------------- */
diff --git a/Externals/wxWidgets/include/wx/vlbox.h b/Externals/wxWidgets/include/wx/vlbox.h
index fbfce92596..7767761fdd 100644
--- a/Externals/wxWidgets/include/wx/vlbox.h
+++ b/Externals/wxWidgets/include/wx/vlbox.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     31.05.03
-// RCS-ID:      $Id: vlbox.h 41810 2006-10-09 16:39:34Z VZ $
+// RCS-ID:      $Id: vlbox.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -15,7 +15,7 @@
 #include "wx/vscroll.h"         // base class
 #include "wx/bitmap.h"
 
-class WXDLLEXPORT wxSelectionStore;
+class WXDLLIMPEXP_FWD_CORE wxSelectionStore;
 
 #define wxVListBoxNameStr _T("wxVListBox")
 
diff --git a/Externals/wxWidgets/include/wx/window.h b/Externals/wxWidgets/include/wx/window.h
index 01febb3191..acb4908e05 100644
--- a/Externals/wxWidgets/include/wx/window.h
+++ b/Externals/wxWidgets/include/wx/window.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by: Ron Lee
 // Created:     01/02/97
-// RCS-ID:      $Id: window.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: window.h 52330 2008-03-05 14:19:38Z VS $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -326,6 +326,12 @@ public:
         return wxRect(GetClientAreaOrigin(), GetClientSize());
     }
 
+#if wxABI_VERSION >= 20808
+    // client<->window size conversion
+    wxSize ClientToWindowSize(const wxSize& size) const;
+    wxSize WindowToClientSize(const wxSize& size) const;
+#endif
+
         // get the size best suited for the window (in fact, minimal
         // acceptable size using which it will still look "nice" in
         // most situations)
@@ -573,6 +579,13 @@ public:
     // needed just for extended runtime
     const wxWindowList& GetWindowChildren() const { return GetChildren() ; }
 
+#if wxABI_VERSION >= 20808
+        // get the window before/after this one in the parents children list,
+        // returns NULL if this is the first/last window
+    wxWindow *GetPrevSibling() const { return DoGetSibling(MoveBefore); }
+    wxWindow *GetNextSibling() const { return DoGetSibling(MoveAfter); }
+#endif // wx 2.8.8+
+
         // get the parent or the parent of the parent
     wxWindow *GetParent() const { return m_parent; }
     inline wxWindow *GetGrandParent() const;
@@ -1141,12 +1154,18 @@ protected:
     virtual bool TryValidator(wxEvent& event);
     virtual bool TryParent(wxEvent& event);
 
-    // common part of MoveBefore/AfterInTabOrder()
     enum MoveKind
     {
         MoveBefore,     // insert before the given window
         MoveAfter       // insert after the given window
     };
+
+#if wxABI_VERSION >= 20808
+    // common part of GetPrev/NextSibling()
+    wxWindow *DoGetSibling(MoveKind order) const;
+#endif // wx 2.8.8+
+
+    // common part of MoveBefore/AfterInTabOrder()
     virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move);
 
 #if wxUSE_CONSTRAINTS
diff --git a/Externals/wxWidgets/include/wx/wizard.h b/Externals/wxWidgets/include/wx/wizard.h
index 3b7d3e477f..dd212851d9 100644
--- a/Externals/wxWidgets/include/wx/wizard.h
+++ b/Externals/wxWidgets/include/wx/wizard.h
@@ -9,7 +9,7 @@
 //              Added wxWIZARD_HELP event
 //              Robert Vazan (sizers)
 // Created:     15.08.99
-// RCS-ID:      $Id: wizard.h 35858 2005-10-09 15:48:42Z MBN $
+// RCS-ID:      $Id: wizard.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1999 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@
 #define wxWIZARD_EX_HELPBUTTON   0x00000010
 
 // forward declarations
-class WXDLLIMPEXP_ADV wxWizard;
+class WXDLLIMPEXP_FWD_ADV wxWizard;
 
 // ----------------------------------------------------------------------------
 // wxWizardPage is one of the wizards screen: it must know what are the
diff --git a/Externals/wxWidgets/include/wx/wxchar.h b/Externals/wxWidgets/include/wx/wxchar.h
index eb9813254f..477967b7b7 100644
--- a/Externals/wxWidgets/include/wx/wxchar.h
+++ b/Externals/wxWidgets/include/wx/wxchar.h
@@ -4,7 +4,7 @@
  * Author:      Joel Farley, Ove Kċven
  * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
  * Created:     1998/06/12
- * RCS-ID:      $Id: wxchar.h 49328 2007-10-22 11:32:59Z VZ $
+ * RCS-ID:      $Id: wxchar.h 50987 2008-01-02 16:31:38Z VZ $
  * Copyright:   (c) 1998-2006 wxWidgets dev team
  * Licence:     wxWindows licence
  */
@@ -251,6 +251,9 @@
 /* and _() in wxWidgets sources */
 #define wxT(x)       _T(x)
 
+/* this macro exists only for forward compatibility with wx 3.0 */
+#define wxS(x)       _T(x)
+
 /* a helper macro allowing to make another macro Unicode-friendly, see below */
 #define wxAPPLY_T(x) _T(x)
 
diff --git a/Externals/wxWidgets/include/wx/xml/xml.h b/Externals/wxWidgets/include/wx/xml/xml.h
index e8658d7cd0..3845513b72 100644
--- a/Externals/wxWidgets/include/wx/xml/xml.h
+++ b/Externals/wxWidgets/include/wx/xml/xml.h
@@ -3,7 +3,7 @@
 // Purpose:     wxXmlDocument - XML parser & data holder class
 // Author:      Vaclav Slavik
 // Created:     2000/03/05
-// RCS-ID:      $Id: xml.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: xml.h 52976 2008-04-02 10:06:54Z VS $
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -115,7 +115,10 @@ public:
     wxXmlNode(wxXmlNodeType type, const wxString& name,
               const wxString& content = wxEmptyString);
     virtual void AddChild(wxXmlNode *child);
-    virtual bool InsertChild(wxXmlNode *child, wxXmlNode *before_node);
+    virtual bool InsertChild(wxXmlNode *child, wxXmlNode *followingNode);
+#if wxABI_VERSION >= 20808
+    bool InsertChildAfter(wxXmlNode *child, wxXmlNode *precedingNode);
+#endif
     virtual bool RemoveChild(wxXmlNode *child);
     virtual void AddProperty(const wxString& name, const wxString& value);
     virtual bool DeleteProperty(const wxString& name);
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_bmpcbox.h b/Externals/wxWidgets/include/wx/xrc/xh_bmpcbox.h
index 8e1e1586db..3c23bb286e 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_bmpcbox.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_bmpcbox.h
@@ -3,7 +3,7 @@
 // Purpose:     XML resource handler for wxBitmapComboBox
 // Author:      Jaakko Salli
 // Created:     Sep-10-2006
-// RCS-ID:      $Id: xh_bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
+// RCS-ID:      $Id: xh_bmpcbox.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2006 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -15,7 +15,7 @@
 
 #if wxUSE_XRC && wxUSE_BITMAPCOMBOBOX
 
-class WXDLLIMPEXP_ADV wxBitmapComboBox;
+class WXDLLIMPEXP_FWD_ADV wxBitmapComboBox;
 
 class WXDLLIMPEXP_XRC wxBitmapComboBoxXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_choicbk.h b/Externals/wxWidgets/include/wx/xrc/xh_choicbk.h
index d79856bf4c..1315e453be 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_choicbk.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_choicbk.h
@@ -13,7 +13,7 @@
 
 #if wxUSE_XRC && wxUSE_CHOICEBOOK
 
-class WXDLLEXPORT wxChoicebook;
+class WXDLLIMPEXP_FWD_CORE wxChoicebook;
 
 class WXDLLIMPEXP_XRC wxChoicebookXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_collpane.h b/Externals/wxWidgets/include/wx/xrc/xh_collpane.h
index fe3b859147..1c5fc5d3b1 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_collpane.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_collpane.h
@@ -3,7 +3,7 @@
 // Purpose:     XML resource handler for wxCollapsiblePane
 // Author:      Francesco Montorsi
 // Created:     2006-10-27
-// RCS-ID:      $Id: xh_collpane.h 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: xh_collpane.h 52422 2008-03-10 13:55:07Z VZ $
 // Copyright:   (c) 2006 Francesco Montorsi
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -15,7 +15,7 @@
 
 #if wxUSE_XRC && wxUSE_COLLPANE
 
-class WXDLLIMPEXP_FWD_ADV wxCollapsiblePane;
+class WXDLLIMPEXP_FWD_CORE wxCollapsiblePane;
 
 class WXDLLIMPEXP_XRC wxCollapsiblePaneXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_listbk.h b/Externals/wxWidgets/include/wx/xrc/xh_listbk.h
index f012e29740..bd2ea95646 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_listbk.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_listbk.h
@@ -13,7 +13,7 @@
 
 #if wxUSE_XRC && wxUSE_LISTBOOK
 
-class WXDLLEXPORT wxListbook;
+class WXDLLIMPEXP_FWD_CORE wxListbook;
 
 class WXDLLIMPEXP_XRC wxListbookXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_notbk.h b/Externals/wxWidgets/include/wx/xrc/xh_notbk.h
index 143892bbe6..d21ba65c7b 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_notbk.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_notbk.h
@@ -2,7 +2,7 @@
 // Name:        wx/xrc/xh_notbk.h
 // Purpose:     XML resource handler for wxNotebook
 // Author:      Vaclav Slavik
-// RCS-ID:      $Id: xh_notbk.h 41590 2006-10-03 14:53:40Z VZ $
+// RCS-ID:      $Id: xh_notbk.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -14,7 +14,7 @@
 
 #if wxUSE_XRC && wxUSE_NOTEBOOK
 
-class WXDLLEXPORT wxNotebook;
+class WXDLLIMPEXP_FWD_CORE wxNotebook;
 
 class WXDLLIMPEXP_XRC wxNotebookXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_propdlg.h b/Externals/wxWidgets/include/wx/xrc/xh_propdlg.h
index 46bd2c47e4..a54f124143 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_propdlg.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_propdlg.h
@@ -3,7 +3,7 @@
 // Purpose:     XML resource handler for wxPropertySheetDialog
 // Author:      Sander Berents
 // Created:     2007/07/12
-// RCS-ID:      $Id: xh_propdlg.h 48279 2007-08-21 11:35:50Z VS $
+// RCS-ID:      $Id: xh_propdlg.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2007 Sander Berents
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,7 +16,7 @@
 #if wxUSE_XRC
 
 #if wxABI_VERSION >= 20805
-class WXDLLEXPORT wxPropertySheetDialog;
+class WXDLLIMPEXP_FWD_ADV wxPropertySheetDialog;
 
 class WXDLLIMPEXP_XRC wxPropertySheetDialogXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_toolb.h b/Externals/wxWidgets/include/wx/xrc/xh_toolb.h
index 81a1cd8da5..4a4bd6bf88 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_toolb.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_toolb.h
@@ -3,7 +3,7 @@
 // Purpose:     XML resource handler for wxToolBar
 // Author:      Vaclav Slavik
 // Created:     2000/08/11
-// RCS-ID:      $Id: xh_toolb.h 41590 2006-10-03 14:53:40Z VZ $
+// RCS-ID:      $Id: xh_toolb.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -15,7 +15,7 @@
 
 #if wxUSE_XRC && wxUSE_TOOLBAR
 
-class WXDLLEXPORT wxToolBar;
+class WXDLLIMPEXP_FWD_CORE wxToolBar;
 
 class WXDLLIMPEXP_XRC wxToolBarXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_treebk.h b/Externals/wxWidgets/include/wx/xrc/xh_treebk.h
index 0d08cc6bc0..bd6078a779 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_treebk.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_treebk.h
@@ -14,7 +14,7 @@
 
 #if wxUSE_XRC && wxUSE_TREEBOOK
 
-class  WXDLLEXPORT wxTreebook;
+class WXDLLIMPEXP_FWD_CORE wxTreebook;
 #include "wx/dynarray.h"
 
 WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes,
diff --git a/Externals/wxWidgets/include/wx/xrc/xh_wizrd.h b/Externals/wxWidgets/include/wx/xrc/xh_wizrd.h
index eb1a14b314..784a4d9e76 100644
--- a/Externals/wxWidgets/include/wx/xrc/xh_wizrd.h
+++ b/Externals/wxWidgets/include/wx/xrc/xh_wizrd.h
@@ -3,7 +3,7 @@
 // Purpose:     XML resource handler for wxWizard
 // Author:      Vaclav Slavik
 // Created:     2003/03/02
-// RCS-ID:      $Id: xh_wizrd.h 41590 2006-10-03 14:53:40Z VZ $
+// RCS-ID:      $Id: xh_wizrd.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -15,8 +15,8 @@
 
 #if wxUSE_XRC && wxUSE_WIZARDDLG
 
-class WXDLLEXPORT wxWizard;
-class WXDLLEXPORT wxWizardPageSimple;
+class WXDLLIMPEXP_FWD_ADV wxWizard;
+class WXDLLIMPEXP_FWD_ADV wxWizardPageSimple;
 
 class WXDLLIMPEXP_XRC wxWizardXmlHandler : public wxXmlResourceHandler
 {
diff --git a/Externals/wxWidgets/include/wx/xti.h b/Externals/wxWidgets/include/wx/xti.h
index 0e461966d0..5fd35efb48 100644
--- a/Externals/wxWidgets/include/wx/xti.h
+++ b/Externals/wxWidgets/include/wx/xti.h
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     27/07/03
-// RCS-ID:      $Id: xti.h 41020 2006-09-05 20:47:48Z VZ $
+// RCS-ID:      $Id: xti.h 52488 2008-03-14 14:13:05Z JS $
 // Copyright:   (c) 1997 Julian Smart
 //              (c) 2003 Stefan Csomor
 // Licence:     wxWindows licence
@@ -2026,7 +2026,7 @@ private :
     (int) sizeof(name),                              \
     (wxObjectConstructorFn) wxConstructorFor##name   ,   \
     name::GetPropertiesStatic(),name::GetHandlersStatic(),name::ms_constructor , name::ms_constructorProperties ,     \
-    name::ms_constructorPropertiesCount , wxVariantToObjectConverter##name , wxObjectToVariantConverter##name);    \
+    name::ms_constructorPropertiesCount , wxVariantToObjectConverter##name, wxVariantToObjectConverter##name , wxObjectToVariantConverter##name);    \
 
 #define IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2) \
     _IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2 , "") \
diff --git a/Externals/wxWidgets/include/wx/zipstrm.h b/Externals/wxWidgets/include/wx/zipstrm.h
index 4546057361..572b88a9f4 100644
--- a/Externals/wxWidgets/include/wx/zipstrm.h
+++ b/Externals/wxWidgets/include/wx/zipstrm.h
@@ -2,7 +2,7 @@
 // Name:        wx/zipstrm.h
 // Purpose:     Streams for Zip files
 // Author:      Mike Wetherell
-// RCS-ID:      $Id: zipstrm.h 43887 2006-12-09 22:28:11Z MW $
+// RCS-ID:      $Id: zipstrm.h 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) Mike Wetherell
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -112,8 +112,8 @@ enum wxZipFlags
 
 // Forward decls
 //
-class WXDLLIMPEXP_BASE wxZipEntry;
-class WXDLLIMPEXP_BASE wxZipInputStream;
+class WXDLLIMPEXP_FWD_BASE wxZipEntry;
+class WXDLLIMPEXP_FWD_BASE wxZipInputStream;
 
 
 /////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/lib/vc_lib/msw/wx/setup.h b/Externals/wxWidgets/lib/vc_lib/msw/wx/setup.h
index f3f674416d..dd3112dacd 100644
--- a/Externals/wxWidgets/lib/vc_lib/msw/wx/setup.h
+++ b/Externals/wxWidgets/lib/vc_lib/msw/wx/setup.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: setup0.h 43908 2006-12-11 06:19:27Z RD $
+// RCS-ID:      $Id: setup0.h 51451 2008-01-29 23:11:55Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -991,7 +991,7 @@
 // Default is 0.
 //
 // Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS       1
+#define wxUSE_GLCANVAS       0
 
 // wxRichTextCtrl allows editing of styled text.
 //
@@ -1042,7 +1042,7 @@
 // ----------------------------------------------------------------------------
 
 // wxSingleInstanceChecker class allows to verify at startup if another program
-// instance is running (it is only available under Win32)
+// instance is running.
 //
 // Default is 1
 //
@@ -1070,7 +1070,7 @@
 // Use wxHTML-based help controller?
 #define wxUSE_WXHTML_HELP 1
 
-#define wxUSE_RESOURCES   1
+#define wxUSE_RESOURCES   0
                                 // 0 for no wxGetResource/wxWriteResource
 #define wxUSE_CONSTRAINTS 1
                                 // 0 for no window layout constraint system
@@ -1096,7 +1096,7 @@
 // ----------------------------------------------------------------------------
 
 // Define 1 to use ODBC classes
-#define wxUSE_ODBC          1
+#define wxUSE_ODBC          0
 
 // For backward compatibility reasons, this parameter now only controls the
 // default scrolling method used by cursors.  This default behavior can be
@@ -1309,7 +1309,7 @@
 #define wxUSE_UXTHEME_AUTO      1
 
 // Set to 1 to use InkEdit control (Tablet PC), if available
-#define wxUSE_INKEDIT  1
+#define wxUSE_INKEDIT  0
 
 // ----------------------------------------------------------------------------
 // Generic versions of native controls
diff --git a/Externals/wxWidgets/src/common/appbase.cpp b/Externals/wxWidgets/src/common/appbase.cpp
index 444f80e5df..9bc6833db6 100644
--- a/Externals/wxWidgets/src/common/appbase.cpp
+++ b/Externals/wxWidgets/src/common/appbase.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     19.06.2003 (extracted from common/appcmn.cpp)
-// RCS-ID:      $Id: appbase.cpp 43628 2006-11-24 10:55:26Z RR $
+// RCS-ID:      $Id: appbase.cpp 52093 2008-02-25 13:43:07Z VZ $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // License:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
@@ -70,6 +70,8 @@
             #include "wx/msw/debughlp.h"
         #endif
     #endif // wxUSE_STACKWALKER
+
+    #include "wx/recguard.h"
 #endif // __WXDEBUG__
 
 // wxABI_VERSION can be defined when compiling applications but it should be
@@ -683,20 +685,17 @@ void wxOnAssert(const wxChar *szFile,
                 const wxChar *szMsg)
 {
     // FIXME MT-unsafe
-    static bool s_bInAssert = false;
+    static int s_bInAssert = 0;
 
-    if ( s_bInAssert )
+    wxRecursionGuard guard(s_bInAssert);
+    if ( guard.IsInside() )
     {
-        // He-e-e-e-elp!! we're trapped in endless loop
+        // can't use assert here to avoid infinite loops, so just trap
         wxTrap();
 
-        s_bInAssert = false;
-
         return;
     }
 
-    s_bInAssert = true;
-
     // __FUNCTION__ is always in ASCII, convert it to wide char if needed
     const wxString strFunc = wxString::FromAscii(szFunc);
 
@@ -711,8 +710,6 @@ void wxOnAssert(const wxChar *szFile,
         // let the app process it as it wants
         wxTheApp->OnAssertFailure(szFile, nLine, strFunc, szCond, szMsg);
     }
-
-    s_bInAssert = false;
 }
 
 #endif // __WXDEBUG__
diff --git a/Externals/wxWidgets/src/common/artstd.cpp b/Externals/wxWidgets/src/common/artstd.cpp
index 5e7bcd2ba7..6075ae8f23 100644
--- a/Externals/wxWidgets/src/common/artstd.cpp
+++ b/Externals/wxWidgets/src/common/artstd.cpp
@@ -4,7 +4,7 @@
 // Author:      Vaclav Slavik
 // Modified by:
 // Created:     18/03/2002
-// RCS-ID:      $Id: artstd.cpp 41398 2006-09-23 20:16:18Z VZ $
+// RCS-ID:      $Id: artstd.cpp 52561 2008-03-16 00:36:37Z VS $
 // Copyright:   (c) Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -88,8 +88,6 @@ protected:
 // XPMs with the art
 // ----------------------------------------------------------------------------
 
-// XPM hack: make the arrays const
-#define static static const
 
 #if defined(__WXGTK__)
     #include "../../art/gtk/info.xpm"
@@ -153,7 +151,6 @@ protected:
 #include "../../art/findrepl.xpm"
 
 
-#undef static
 
 wxBitmap wxDefaultArtProvider_CreateBitmap(const wxArtID& id)
 {
@@ -238,14 +235,26 @@ wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id,
             {
                 int bmp_w = bmp.GetWidth();
                 int bmp_h = bmp.GetHeight();
-                // want default size but it's smaller, paste into transparent image
+
                 if ((bmp_h < bestSize.x) && (bmp_w < bestSize.y))
                 {
+                    // the caller wants default size, which is larger than 
+                    // the image we have; to avoid degrading it visually by
+                    // scaling it up, paste it into transparent image instead:
                     wxPoint offset((bestSize.x - bmp_w)/2, (bestSize.y - bmp_h)/2);
                     wxImage img = bmp.ConvertToImage();
                     img.Resize(bestSize, offset);
                     bmp = wxBitmap(img);
                 }
+                else // scale (down or mixed, but not up)
+                {
+                    wxImage img = bmp.ConvertToImage();
+                    bmp = wxBitmap
+                          (
+                              img.Scale(bestSize.x, bestSize.y,
+                                        wxIMAGE_QUALITY_HIGH)
+                          );
+                }
             }
         }
     }
diff --git a/Externals/wxWidgets/src/common/bookctrl.cpp b/Externals/wxWidgets/src/common/bookctrl.cpp
index 3c19c630f1..a64fc9eade 100644
--- a/Externals/wxWidgets/src/common/bookctrl.cpp
+++ b/Externals/wxWidgets/src/common/bookctrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     19.08.03
-// RCS-ID:      $Id: bookctrl.cpp 43027 2006-11-04 12:20:09Z VZ $
+// RCS-ID:      $Id: bookctrl.cpp 53783 2008-05-27 14:15:14Z SC $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -229,6 +229,13 @@ void wxBookCtrlBase::DoSize()
                     sizeCtrl( GetControllerSize() );
 
         m_bookctrl->SetClientSize( sizeCtrl.x - sizeBorder.x, sizeCtrl.y - sizeBorder.y );
+        // if this changes the visibility of the scrollbars the best size changes, relayout in this case
+        wxSize sizeCtrl2 = GetControllerSize();
+        if ( sizeCtrl != sizeCtrl2 )
+        {
+            wxSize sizeBorder2 = m_bookctrl->GetSize() - m_bookctrl->GetClientSize();
+            m_bookctrl->SetClientSize( sizeCtrl2.x - sizeBorder2.x, sizeCtrl2.y - sizeBorder2.y );
+        }
 
         const wxSize sizeNew = m_bookctrl->GetSize();
         wxPoint posCtrl;
diff --git a/Externals/wxWidgets/src/common/config.cpp b/Externals/wxWidgets/src/common/config.cpp
index 1862005148..1079e46be5 100644
--- a/Externals/wxWidgets/src/common/config.cpp
+++ b/Externals/wxWidgets/src/common/config.cpp
@@ -4,8 +4,8 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     07.04.98
-// RCS-ID:      $Id: config.cpp 44868 2007-03-17 14:40:30Z VZ $
-// Copyright:   (c) 1997 Karsten Ballüder   Ballueder@usa.net
+// RCS-ID:      $Id: config.cpp 50711 2007-12-15 02:57:58Z VZ $
+// Copyright:   (c) 1997 Karsten Ballueder   Ballueder@usa.net
 //                       Vadim Zeitlin      
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/src/common/cshelp.cpp b/Externals/wxWidgets/src/common/cshelp.cpp
index a79a687c92..181fd53b38 100644
--- a/Externals/wxWidgets/src/common/cshelp.cpp
+++ b/Externals/wxWidgets/src/common/cshelp.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart, Vadim Zeitlin
 // Modified by:
 // Created:     08/09/2000
-// RCS-ID:      $Id: cshelp.cpp 43211 2006-11-09 00:41:18Z VZ $
+// RCS-ID:      $Id: cshelp.cpp 52329 2008-03-05 13:20:26Z VZ $
 // Copyright:   (c) 2000 Julian Smart, Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -123,8 +123,8 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
     wxCursor oldCursor = win->GetCursor();
     win->SetCursor(cursor);
 
-#ifdef __WXMSW__
-    //    wxSetCursor(cursor);
+#ifdef __WXMAC__
+    wxSetCursor(cursor);
 #endif
 
     m_status = false;
@@ -149,6 +149,10 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
 
     win->SetCursor(oldCursor);
 
+#ifdef __WXMAC__
+    wxSetCursor(wxNullCursor);
+#endif
+
     if (m_status)
     {
         wxPoint pt;
@@ -384,6 +388,11 @@ void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window)
 bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)
 {
 #if wxUSE_MS_HTML_HELP || wxUSE_TIPWINDOW
+#if wxUSE_MS_HTML_HELP
+    // m_helptextAtPoint will be reset by GetHelpTextMaybeAtPoint(), stash it
+    const wxPoint posTooltip = m_helptextAtPoint;
+#endif // wxUSE_MS_HTML_HELP
+
     const wxString text = GetHelpTextMaybeAtPoint(window);
 
     if ( !text.empty() )
@@ -393,7 +402,7 @@ bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)
         if ( !wxCHMHelpController::ShowContextHelpPopup
                                    (
                                         text,
-                                        wxGetMousePosition(),
+                                        posTooltip,
                                         (wxWindow *)window
                                    ) )
 #endif // wxUSE_MS_HTML_HELP
diff --git a/Externals/wxWidgets/src/common/datetime.cpp b/Externals/wxWidgets/src/common/datetime.cpp
index 3e29c7c94c..d5c5cebcdd 100644
--- a/Externals/wxWidgets/src/common/datetime.cpp
+++ b/Externals/wxWidgets/src/common/datetime.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     11.05.99
-// RCS-ID:      $Id: datetime.cpp 49000 2007-09-30 20:37:29Z VZ $
+// RCS-ID:      $Id: datetime.cpp 53900 2008-06-01 14:37:26Z VZ $
 // Copyright:   (c) 1999 Vadim Zeitlin 
 //              parts of code taken from sndcal library by Scott E. Lee:
 //
@@ -2879,8 +2879,9 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
     min = (wxDateTime_t)(min + *p++ - _T('0'));
 
     wxDateTime_t sec = 0;
-    if ( *p++ == _T(':') )
+    if ( *p == _T(':') )
     {
+        p++;
         if ( !wxIsdigit(*p) )
         {
             return (wxChar *)NULL;
@@ -3000,7 +3001,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
 
     // the spec was correct, construct the date from the values we found
     Set(day, mon, year, hour, min, sec);
-    MakeFromTimezone(TimeZone((wxDateTime_t)(offset*SEC_PER_MIN)));
+    MakeFromTimezone(TimeZone::Make(offset*SEC_PER_MIN));
 
     return p;
 }
@@ -3992,8 +3993,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
             }
             else // not a valid month name
             {
-                wday = GetWeekDayFromName(token, Name_Full | Name_Abbr);
-                if ( wday != Inv_WeekDay )
+                WeekDay wday2 = GetWeekDayFromName(token, Name_Full | Name_Abbr);
+                if ( wday2 != Inv_WeekDay )
                 {
                     // a week day
                     if ( haveWDay )
@@ -4001,6 +4002,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
                         break;
                     }
 
+                    wday = wday2;
+
                     haveWDay = true;
                 }
                 else // not a valid weekday name
diff --git a/Externals/wxWidgets/src/common/datstrm.cpp b/Externals/wxWidgets/src/common/datstrm.cpp
index 760dd852ec..28f496562b 100644
--- a/Externals/wxWidgets/src/common/datstrm.cpp
+++ b/Externals/wxWidgets/src/common/datstrm.cpp
@@ -4,7 +4,7 @@
 // Author:      Guilhem Lavaux
 // Modified by: Mickael Gilabert
 // Created:     28/06/98
-// RCS-ID:      $Id: datstrm.cpp 39745 2006-06-15 17:58:49Z ABX $
+// RCS-ID:      $Id: datstrm.cpp 53028 2008-04-05 17:28:32Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -100,25 +100,27 @@ double wxDataInputStream::ReadDouble()
 
 wxString wxDataInputStream::ReadString()
 {
-  size_t len;
-
-  len = Read32();
-
-  if (len > 0)
-  {
-#if wxUSE_UNICODE
-    wxCharBuffer tmp(len + 1);
-    m_input->Read(tmp.data(), len);
-    tmp.data()[len] = '\0';
-    wxString ret(m_conv->cMB2WX(tmp.data()));
-#else
     wxString ret;
-    m_input->Read( wxStringBuffer(ret, len), len);
+
+    const size_t len = Read32();
+    if ( len > 0 )
+    {
+#if wxUSE_UNICODE
+        wxCharBuffer tmp(len + 1);
+        if ( tmp )
+        {
+            m_input->Read(tmp.data(), len);
+            tmp.data()[len] = '\0';
+            ret = m_conv->cMB2WX(tmp.data());
+        }
+#else
+        wxStringBuffer buf(ret, len);
+        if ( buf )
+            m_input->Read(buf, len);
 #endif
+    }
+
     return ret;
-  }
-  else
-    return wxEmptyString;
 }
 
 #if wxUSE_LONGLONG
diff --git a/Externals/wxWidgets/src/common/db.cpp b/Externals/wxWidgets/src/common/db.cpp
index 72474fdc66..9fedf0bd13 100644
--- a/Externals/wxWidgets/src/common/db.cpp
+++ b/Externals/wxWidgets/src/common/db.cpp
@@ -16,7 +16,7 @@
 //                -Set ODBC option to only read committed writes to the DB so all
 //                   databases operate the same in that respect
 // Created:     9.96
-// RCS-ID:      $Id: db.cpp 48685 2007-09-14 19:02:28Z VZ $
+// RCS-ID:      $Id: db.cpp 52489 2008-03-14 14:14:57Z JS $
 // Copyright:   (c) 1996 Remstar International, Inc.
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -1912,7 +1912,7 @@ void wxDb::logError(const wxString &errMsg, const wxString &SQLState)
     }
 
     wxStrncpy(errorList[pLast], errMsg, DB_MAX_ERROR_MSG_LEN);
-    errorList[pLast][DB_MAX_ERROR_MSG_LEN] = 0;
+    errorList[pLast][DB_MAX_ERROR_MSG_LEN-1] = 0;
 
     if (SQLState.length())
         if ((dbStatus = TranslateSqlState(SQLState)) != DB_ERR_FUNCTION_SEQUENCE_ERROR)
diff --git a/Externals/wxWidgets/src/common/dcbufcmn.cpp b/Externals/wxWidgets/src/common/dcbufcmn.cpp
index eb232be5cf..88751fe85a 100644
--- a/Externals/wxWidgets/src/common/dcbufcmn.cpp
+++ b/Externals/wxWidgets/src/common/dcbufcmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Ron Lee, Jaakko Salli
 // Modified by:
 // Created:     Sep-20-2006
-// RCS-ID:      $Id: dcbufcmn.cpp 42885 2006-11-01 02:10:47Z RD $
+// RCS-ID:      $Id: dcbufcmn.cpp 52152 2008-02-27 18:03:12Z VZ $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -53,6 +53,14 @@ public:
                     h > ms_buffer->GetHeight() )
         {
             delete ms_buffer;
+
+            // we must always return a valid bitmap but creating a bitmap of
+            // size 0 would fail, so create a 1*1 bitmap in this case
+            if ( !w )
+                w = 1;
+            if ( !h )
+                h = 1;
+
             ms_buffer = new wxBitmap(w, h);
         }
         return ms_buffer;
diff --git a/Externals/wxWidgets/src/common/dcgraph.cpp b/Externals/wxWidgets/src/common/dcgraph.cpp
index 1572d70264..0282a8c9d5 100644
--- a/Externals/wxWidgets/src/common/dcgraph.cpp
+++ b/Externals/wxWidgets/src/common/dcgraph.cpp
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:
-// RCS-ID:      $Id: dcgraph.cpp 49369 2007-10-23 21:30:28Z RD $
+// RCS-ID:      $Id: dcgraph.cpp 53772 2008-05-27 04:57:52Z SC $
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -143,7 +143,7 @@ void wxGCDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
 
 bool wxGCDC::StartDoc( const wxString& WXUNUSED(message) ) 
 {
-    return false;
+    return true;
 }
 
 void wxGCDC::EndDoc() 
@@ -539,14 +539,12 @@ void wxGCDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
     {
         wxGraphicsPath path = m_graphicContext->CreatePath();
         path.MoveToPoint( 0, 0 );
-        path.AddLineToPoint( h / 2.0 * cos(DegToRad(sa)) , h / 2.0 * sin(DegToRad(-sa)) );
-        path.AddLineToPoint( h / 2.0 * cos(DegToRad(ea)) , h / 2.0 * sin(DegToRad(-ea)) );
+        path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
         path.AddLineToPoint( 0, 0 );
         m_graphicContext->FillPath( path );
 
         path = m_graphicContext->CreatePath();
         path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
-        m_graphicContext->FillPath( path );
         m_graphicContext->StrokePath( path );
     }
     else
diff --git a/Externals/wxWidgets/src/common/docview.cpp b/Externals/wxWidgets/src/common/docview.cpp
index fe213a1fd5..1268ce52fd 100644
--- a/Externals/wxWidgets/src/common/docview.cpp
+++ b/Externals/wxWidgets/src/common/docview.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: docview.cpp 49483 2007-10-27 09:25:04Z JS $
+// RCS-ID:      $Id: docview.cpp 51392 2008-01-26 23:23:09Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -296,8 +296,12 @@ bool wxDocument::SaveAs()
 #else
     wxString filter = docTemplate->GetFileFilter() ;
 #endif
+    wxString defaultDir = docTemplate->GetDirectory();
+    if (defaultDir.IsEmpty())
+        defaultDir = wxPathOnly(GetFilename());
+
     wxString tmp = wxFileSelector(_("Save as"),
-            docTemplate->GetDirectory(),
+            defaultDir,
             wxFileNameFromPath(GetFilename()),
             docTemplate->GetDefaultExtension(),
             filter,
@@ -2456,15 +2460,22 @@ bool wxTransferStreamToFile(wxInputStream& stream, const wxString& filename)
         return false;
 
     char buf[4096];
-    do
+    for ( ;; )
     {
         stream.Read(buf, WXSIZEOF(buf));
 
         const size_t nRead = stream.LastRead();
-        if ( !nRead || !file.Write(buf, nRead) )
+        if ( !nRead )
+        {
+            if ( stream.Eof() )
+                break;
+
+            return false;
+        }
+
+        if ( !file.Write(buf, nRead) )
             return false;
     }
-    while ( !stream.Eof() );
 
     return true;
 }
diff --git a/Externals/wxWidgets/src/common/event.cpp b/Externals/wxWidgets/src/common/event.cpp
index b524ee95ee..a12e131f8a 100644
--- a/Externals/wxWidgets/src/common/event.cpp
+++ b/Externals/wxWidgets/src/common/event.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: event.cpp 48332 2007-08-22 14:46:50Z DE $
+// RCS-ID:      $Id: event.cpp 51404 2008-01-27 12:57:04Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -41,6 +41,13 @@
     #endif // wxUSE_GUI
 #endif
 
+#if wxUSE_BASE
+    #include "wx/ptr_scpd.h"
+
+    wxDECLARE_SCOPED_PTR(wxEvent, wxEventPtr)
+    wxDEFINE_SCOPED_PTR(wxEvent, wxEventPtr)
+#endif // wxUSE_BASE
+
 // ----------------------------------------------------------------------------
 // wxWin macros
 // ----------------------------------------------------------------------------
@@ -1170,9 +1177,9 @@ void wxEvtHandler::ProcessPendingEvents()
           node;
           node = m_pendingEvents->GetFirst() )
     {
-        wxEvent *event = (wxEvent *)node->GetData();
+        wxEventPtr event(wx_static_cast(wxEvent *, node->GetData()));
 
-        // It's importan we remove event from list before processing it.
+        // It's important we remove event from list before processing it.
         // Else a nested event loop, for example from a modal dialog, might
         // process the same event again.
 
@@ -1182,8 +1189,6 @@ void wxEvtHandler::ProcessPendingEvents()
 
         ProcessEvent(*event);
 
-        delete event;
-
         wxENTER_CRIT_SECT( Lock() );
 
         if ( --n == 0 )
diff --git a/Externals/wxWidgets/src/common/fileconf.cpp b/Externals/wxWidgets/src/common/fileconf.cpp
index 6f312adae9..d89f8a96f2 100644
--- a/Externals/wxWidgets/src/common/fileconf.cpp
+++ b/Externals/wxWidgets/src/common/fileconf.cpp
@@ -4,8 +4,8 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     07.04.98 (adapted from appconf.cpp)
-// RCS-ID:      $Id: fileconf.cpp 49525 2007-10-29 19:00:07Z VZ $
-// Copyright:   (c) 1997 Karsten Ballüder   &  Vadim Zeitlin
+// RCS-ID:      $Id: fileconf.cpp 50711 2007-12-15 02:57:58Z VZ $
+// Copyright:   (c) 1997 Karsten Ballueder   &  Vadim Zeitlin
 //                       Ballueder@usa.net     
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/src/common/filefn.cpp b/Externals/wxWidgets/src/common/filefn.cpp
index fc40d747e9..a825cb2a32 100644
--- a/Externals/wxWidgets/src/common/filefn.cpp
+++ b/Externals/wxWidgets/src/common/filefn.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: filefn.cpp 48334 2007-08-22 14:55:07Z JS $
+// RCS-ID:      $Id: filefn.cpp 51858 2008-02-17 09:16:11Z SC $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/src/common/filename.cpp b/Externals/wxWidgets/src/common/filename.cpp
index a9cbc3e3c8..1780b88898 100644
--- a/Externals/wxWidgets/src/common/filename.cpp
+++ b/Externals/wxWidgets/src/common/filename.cpp
@@ -4,7 +4,7 @@
 // Author:      Robert Roebling, Vadim Zeitlin
 // Modified by:
 // Created:     28.12.2000
-// RCS-ID:      $Id: filename.cpp 44813 2007-03-15 00:21:59Z VZ $
+// RCS-ID:      $Id: filename.cpp 52996 2008-04-03 12:47:16Z VZ $
 // Copyright:   (c) 2000 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1825,7 +1825,7 @@ wxString wxFileName::GetLongPath() const
 
 #if defined(__WIN32__) && !defined(__WXWINCE__) && !defined(__WXMICROWIN__)
 
-#if wxUSE_DYNAMIC_LOADER
+#if wxUSE_DYNLIB_CLASS
     typedef DWORD (WINAPI *GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD);
 
     // this is MT-safe as in the worst case we're going to resolve the function
@@ -1876,7 +1876,7 @@ wxString wxFileName::GetLongPath() const
             }
         }
     }
-#endif // wxUSE_DYNAMIC_LOADER
+#endif // wxUSE_DYNLIB_CLASS
 
     // The OS didn't support GetLongPathName, or some other error.
     // We need to call FindFirstFile on each component in turn.
@@ -2230,6 +2230,15 @@ bool wxFileName::Touch()
 #endif // platforms
 }
 
+#ifdef wxNEED_WX_UNISTD_H
+
+static int wxStat( const char *file_name, wxStructStat *buf )
+{
+    return stat( file_name , buf );
+}
+
+#endif
+
 bool wxFileName::GetTimes(wxDateTime *dtAccess,
                           wxDateTime *dtMod,
                           wxDateTime *dtCreate) const
@@ -2282,7 +2291,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
 #elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__))
     // no need to test for IsDir() here
     wxStructStat stBuf;
-    if ( wxStat( GetFullPath().c_str(), &stBuf) == 0 )
+    if ( wxStat( GetFullPath().fn_str(), &stBuf) == 0 )
     {
         if ( dtAccess )
             dtAccess->Set(stBuf.st_atime);
diff --git a/Externals/wxWidgets/src/common/filesys.cpp b/Externals/wxWidgets/src/common/filesys.cpp
index 763b22fb1b..7892ce719e 100644
--- a/Externals/wxWidgets/src/common/filesys.cpp
+++ b/Externals/wxWidgets/src/common/filesys.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxFileSystem class - interface for opening files
 // Author:      Vaclav Slavik
 // Copyright:   (c) 1999 Vaclav Slavik
-// CVS-ID:      $Id: filesys.cpp 46574 2007-06-21 11:24:31Z VZ $
+// CVS-ID:      $Id: filesys.cpp 51940 2008-02-20 16:33:55Z VZ $
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/Externals/wxWidgets/src/common/framecmn.cpp b/Externals/wxWidgets/src/common/framecmn.cpp
index aee874e199..4b7e3bc175 100644
--- a/Externals/wxWidgets/src/common/framecmn.cpp
+++ b/Externals/wxWidgets/src/common/framecmn.cpp
@@ -3,7 +3,7 @@
 // Purpose:     common (for all platforms) wxFrame functions
 // Author:      Julian Smart, Vadim Zeitlin
 // Created:     01/02/97
-// Id:          $Id: framecmn.cpp 49740 2007-11-09 11:08:13Z JS $
+// Id:          $Id: framecmn.cpp 51463 2008-01-30 21:31:03Z VZ $
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -171,7 +171,8 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const
 
 void wxFrameBase::SendSizeEvent()
 {
-    wxSizeEvent event( GetSize(), GetId() );
+    const wxSize size = GetSize();
+    wxSizeEvent event( size, GetId() );
     event.SetEventObject( this );
     GetEventHandler()->AddPendingEvent( event );
 
@@ -179,8 +180,12 @@ void wxFrameBase::SendSizeEvent()
     // SendSizeEvent is typically called when a toolbar is shown
     // or hidden, but sending the size event alone is not enough
     // to trigger a full layout.
-    ((wxFrame*)this)->GtkOnSize();
-#endif
+    ((wxFrame*)this)->GtkOnSize(
+#ifndef __WXGTK20__
+        0, 0, size.x, size.y
+#endif // __WXGTK20__
+    );
+#endif // __WXGTK__
 }
 
 
@@ -216,8 +221,7 @@ bool wxFrameBase::ProcessCommand(int id)
         }
     }
 
-    GetEventHandler()->ProcessEvent(commandEvent);
-    return true;
+    return GetEventHandler()->ProcessEvent(commandEvent);
 #else // !wxUSE_MENUS
     return false;
 #endif // wxUSE_MENUS/!wxUSE_MENUS
diff --git a/Externals/wxWidgets/src/common/fs_arc.cpp b/Externals/wxWidgets/src/common/fs_arc.cpp
index 70a03372d0..dae1910a12 100644
--- a/Externals/wxWidgets/src/common/fs_arc.cpp
+++ b/Externals/wxWidgets/src/common/fs_arc.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxArchive file system
 // Author:      Vaclav Slavik, Mike Wetherell
 // Copyright:   (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
-// CVS-ID:      $Id: fs_arc.cpp 43505 2006-11-19 02:11:40Z MW $
+// CVS-ID:      $Id: fs_arc.cpp 51495 2008-02-01 16:44:56Z MW $
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -22,7 +22,7 @@
     #include "wx/log.h"
 #endif
 
-#if WXWIN_COMPATIBILITY_2_6
+#if WXWIN_COMPATIBILITY_2_6 && wxUSE_ZIPSTREAM
     #include "wx/zipstrm.h"
 #else
     #include "wx/archive.h"
@@ -399,7 +399,7 @@ wxFSFile* wxArchiveFSHandler::OpenFile(
 
     if (s && s->IsOk())
     {
-#if WXWIN_COMPATIBILITY_2_6
+#if WXWIN_COMPATIBILITY_2_6 && wxUSE_ZIPSTREAM
         if (factory->IsKindOf(CLASSINFO(wxZipClassFactory)))
             ((wxZipInputStream*)s)->m_allowSeeking = true;
 #endif // WXWIN_COMPATIBILITY_2_6
diff --git a/Externals/wxWidgets/src/common/gbsizer.cpp b/Externals/wxWidgets/src/common/gbsizer.cpp
index c9f58f7948..bfed38ea46 100644
--- a/Externals/wxWidgets/src/common/gbsizer.cpp
+++ b/Externals/wxWidgets/src/common/gbsizer.cpp
@@ -6,7 +6,7 @@
 //
 // Author:      Robin Dunn
 // Created:     03-Nov-2003
-// RCS-ID:      $Id: gbsizer.cpp 45407 2007-04-11 21:54:15Z RD $
+// RCS-ID:      $Id: gbsizer.cpp 53000 2008-04-03 23:28:16Z RD $
 // Copyright:   (c) Robin Dunn
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -453,7 +453,7 @@ wxSize wxGridBagSizer::CalcMin()
     while (node)
     {
         wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
-        if ( item->IsShown() )
+        if ( item->ShouldAccountFor() )
         {
             int row, col, endrow, endcol;
 
@@ -476,6 +476,7 @@ wxSize wxGridBagSizer::CalcMin()
         node = node->GetNext();
     }
 
+    AdjustForOverflow();
     AdjustForFlexDirection();
 
     // Now traverse the heights and widths arrays calcing the totals, including gaps
@@ -538,7 +539,7 @@ void wxGridBagSizer::RecalcSizes()
         int row, col, endrow, endcol;
         wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
 
-        if ( item->IsShown() )
+        if ( item->ShouldAccountFor() )
         {
             item->GetPos(row, col);
             item->GetEndPos(endrow, endcol);
@@ -561,6 +562,96 @@ void wxGridBagSizer::RecalcSizes()
 }
 
 
+// Sometimes CalcMin can result in some rows or cols having too much space in
+// them because as it traverses the items it makes some assumptions when
+// items span to other cells.  But those assumptions can become invalid later
+// on when other items are fitted into the same rows or columns that the
+// spanning item occupies. This method tries to find those situations and
+// fixes them.
+void wxGridBagSizer::AdjustForOverflow()
+{
+    int row, col;
+    
+    for (row=0; row<(int)m_rowHeights.GetCount(); row++)
+    {
+        int rowExtra=INT_MAX;
+        int rowHeight = m_rowHeights[row];
+        for (col=0; col<(int)m_colWidths.GetCount(); col++)
+        {
+            wxGBPosition pos(row,col);
+            wxGBSizerItem* item = FindItemAtPosition(pos);
+            if ( !item )
+                continue;
+
+            int endrow, endcol;
+            item->GetEndPos(endrow, endcol);
+            
+            // If the item starts in this position and doesn't span rows, then
+            // just look at the whole item height
+            if ( item->GetPos() == pos && endrow == row )
+            {
+                int itemHeight = item->CalcMin().GetHeight();
+                rowExtra = wxMin(rowExtra, rowHeight - itemHeight);
+                continue;
+            }
+
+            // Otherwise, only look at spanning items if they end on this row
+            if ( endrow == row )
+            {
+                // first deduct the portions of the item that are on prior rows
+                int itemHeight = item->CalcMin().GetHeight();
+                for (int r=item->GetPos().GetRow(); rGetEndPos(endrow, endcol);
+            
+            if ( item->GetPos() == pos && endcol == col )
+            {
+                int itemWidth = item->CalcMin().GetWidth();
+                colExtra = wxMin(colExtra, colWidth - itemWidth);
+                continue;
+            }
+
+            if ( endcol == col )
+            {
+                int itemWidth = item->CalcMin().GetWidth();
+                for (int c=item->GetPos().GetCol(); cm_data;
+    unsigned char* src_alpha = M_IMGDATA->m_alpha;
     unsigned char* dst_data = ret_image.GetData();
     unsigned char* dst_alpha = NULL;
 
@@ -576,7 +571,7 @@ wxImage wxImage::ResampleBox(int width, int height) const
                   j++ )
             {
                 // We don't care to average pixels that don't exist (edges)
-                if ( j < 0 || j > M_IMGDATA->m_height )
+                if ( j < 0 || j > M_IMGDATA->m_height - 1 )
                     continue;
 
                 for ( int i = int(src_x - scale_factor_x/2.0 + 1);
@@ -584,11 +579,11 @@ wxImage wxImage::ResampleBox(int width, int height) const
                       i++ )
                 {
                     // Don't average edge pixels
-                    if ( i < 0 || i > M_IMGDATA->m_width )
+                    if ( i < 0 || i > M_IMGDATA->m_width - 1 )
                         continue;
 
                     // Calculate the actual index in our source pixels
-                    src_pixel_index = src_y * M_IMGDATA->m_width + src_x;
+                    src_pixel_index = j * M_IMGDATA->m_width + i;
 
                     sum_r += src_data[src_pixel_index * 3 + 0];
                     sum_g += src_data[src_pixel_index * 3 + 1];
@@ -1294,6 +1289,26 @@ void wxImage::Paste( const wxImage &image, int x, int y )
         return;
     }
 
+    // Copy over the alpha channel from the original image
+    if ( image.HasAlpha() )
+    {
+        if ( !HasAlpha() )
+            InitAlpha();
+
+        unsigned char* source_data = image.GetAlpha() + xx + yy*image.GetWidth();
+        int source_step = image.GetWidth();
+
+        unsigned char* target_data = GetAlpha() + (x+xx) + (y+yy)*M_IMGDATA->m_width;
+        int target_step = M_IMGDATA->m_width;
+
+        for (int j = 0; j < height; j++,
+                                    source_data += source_step,
+                                    target_data += target_step)
+        {
+            memcpy( target_data, source_data, width );
+        }
+    }
+
     if (!HasMask() && image.HasMask())
     {
         unsigned char r = image.GetMaskRed();
@@ -2057,8 +2072,7 @@ bool wxImage::SaveFile( const wxString& filename ) const
     wxImageHandler * pHandler = FindHandler(ext, -1);
     if (pHandler)
     {
-        SaveFile(filename, pHandler->GetType());
-        return true;
+        return SaveFile(filename, pHandler->GetType());
     }
 
     wxLogError(_("Can't save image to file '%s': unknown extension."), filename.c_str());
diff --git a/Externals/wxWidgets/src/common/imagpng.cpp b/Externals/wxWidgets/src/common/imagpng.cpp
index c533848dd8..f8277721b1 100644
--- a/Externals/wxWidgets/src/common/imagpng.cpp
+++ b/Externals/wxWidgets/src/common/imagpng.cpp
@@ -2,7 +2,7 @@
 // Name:        src/common/imagepng.cpp
 // Purpose:     wxImage PNG handler
 // Author:      Robert Roebling
-// RCS-ID:      $Id: imagpng.cpp 42092 2006-10-18 17:06:11Z RR $
+// RCS-ID:      $Id: imagpng.cpp 53479 2008-05-07 16:23:55Z PC $
 // Copyright:   (c) Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -33,7 +33,7 @@
     #include "wx/module.h"
 #endif
 
-#include "../png/png.h"
+#include "png.h"
 #include "wx/filefn.h"
 #include "wx/wfstream.h"
 #include "wx/intl.h"
@@ -105,7 +105,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
 #if wxUSE_STREAMS
 
 #ifndef PNGLINKAGEMODE
-    #ifdef __WATCOMC__
+    #ifdef PNGAPI
+        #define PNGLINKAGEMODE PNGAPI
+    #elif defined(__WATCOMC__)
         // we need an explicit cdecl for Watcom, at least according to
         //
         // http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863
diff --git a/Externals/wxWidgets/src/common/imagxpm.cpp b/Externals/wxWidgets/src/common/imagxpm.cpp
index 5a7c326df0..cca244c1a6 100644
--- a/Externals/wxWidgets/src/common/imagxpm.cpp
+++ b/Externals/wxWidgets/src/common/imagxpm.cpp
@@ -2,7 +2,7 @@
 // Name:        src/common/imagxpm.cpp
 // Purpose:     wxXPMHandler
 // Author:      Vaclav Slavik, Robert Roebling
-// RCS-ID:      $Id: imagxpm.cpp 47105 2007-07-03 17:17:20Z PC $
+// RCS-ID:      $Id: imagxpm.cpp 53477 2008-05-07 07:28:57Z JS $
 // Copyright:   (c) 2001 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -129,9 +129,9 @@ bool wxXPMHandler::SaveFile(wxImage * image,
     }
 
     if ( !sName.empty() )
-        sName = wxString(wxT("/* XPM */\nstatic char *")) + sName;
+        sName = wxString(wxT("/* XPM */\nstatic const char *")) + sName;
     else
-        sName = wxT("/* XPM */\nstatic char *xpm_data");
+        sName = wxT("/* XPM */\nstatic const char *xpm_data");
     stream.Write( (const char*) sName.ToAscii(), sName.Len() );
 
     char tmpbuf[200];
diff --git a/Externals/wxWidgets/src/common/init.cpp b/Externals/wxWidgets/src/common/init.cpp
index 8bcd852543..c9b760ac22 100644
--- a/Externals/wxWidgets/src/common/init.cpp
+++ b/Externals/wxWidgets/src/common/init.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     04.10.99
-// RCS-ID:      $Id: init.cpp 50009 2007-11-16 23:41:38Z VZ $
+// RCS-ID:      $Id: init.cpp 51336 2008-01-22 13:59:45Z SC $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -179,7 +179,11 @@ static void ConvertArgsToUnicode(int argc, char **argv)
     int wargc = 0;
     for ( int i = 0; i < argc; i++ )
     {
+#ifdef __DARWIN__
+        wxWCharBuffer buf(wxConvFileName->cMB2WX(argv[i]));
+#else
         wxWCharBuffer buf(wxConvLocal.cMB2WX(argv[i]));
+#endif
         if ( !buf )
         {
             wxLogWarning(_("Command line argument %d couldn't be converted to Unicode and will be ignored."),
diff --git a/Externals/wxWidgets/src/common/intl.cpp b/Externals/wxWidgets/src/common/intl.cpp
index 0da85adad6..4b36349880 100644
--- a/Externals/wxWidgets/src/common/intl.cpp
+++ b/Externals/wxWidgets/src/common/intl.cpp
@@ -5,7 +5,7 @@
 // Modified by: Michael N. Filippov 
 //              (2003/09/30 - PluralForms support)
 // Created:     29/01/98
-// RCS-ID:      $Id: intl.cpp 49569 2007-10-31 23:05:53Z RD $
+// RCS-ID:      $Id: intl.cpp 53628 2008-05-17 22:49:30Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,12 +18,6 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __EMX__
-// The following define is needed by Innotek's libc to
-// make the definition of struct localeconv available.
-#define __INTERNAL_DEFS
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -31,6 +25,12 @@
     #pragma hdrstop
 #endif
 
+#ifdef __EMX__
+// The following define is needed by Innotek's libc to
+// make the definition of struct localeconv available.
+#define __INTERNAL_DEFS
+#endif
+
 #if wxUSE_INTL
 
 #ifndef WX_PRECOMP
@@ -74,6 +74,12 @@
     #include  "wx/mac/private.h"  // includes mac headers
 #endif
 
+#if defined(__DARWIN__)
+    #include "wx/mac/corefoundation/cfref.h"
+    #include 
+    #include "wx/mac/corefoundation/cfstring.h"
+#endif
+
 // ----------------------------------------------------------------------------
 // simple types
 // ----------------------------------------------------------------------------
@@ -232,7 +238,7 @@ wxPluralFormsScanner::wxPluralFormsScanner(const char* s) : m_s(s)
 bool wxPluralFormsScanner::nextToken()
 {
     wxPluralFormsToken::Type type = wxPluralFormsToken::T_ERROR;
-    while (isspace(*m_s))
+    while (isspace((unsigned char) *m_s))
     {
         ++m_s;
     }
@@ -240,20 +246,20 @@ bool wxPluralFormsScanner::nextToken()
     {
         type = wxPluralFormsToken::T_EOF;
     }
-    else if (isdigit(*m_s))
+    else if (isdigit((unsigned char) *m_s))
     {
         wxPluralFormsToken::Number number = *m_s++ - '0';
-        while (isdigit(*m_s))
+        while (isdigit((unsigned char) *m_s))
         {
             number = number * 10 + (*m_s++ - '0');
         }
         m_token.setNumber(number);
         type = wxPluralFormsToken::T_NUMBER;
     }
-    else if (isalpha(*m_s))
+    else if (isalpha((unsigned char) *m_s))
     {
         const char* begin = m_s++;
-        while (isalnum(*m_s))
+        while (isalnum((unsigned char) *m_s))
         {
             ++m_s;
         }
@@ -958,8 +964,10 @@ private:
 class wxMsgCatalog
 {
 public:
+#if !wxUSE_UNICODE
     wxMsgCatalog() { m_conv = NULL; }
     ~wxMsgCatalog();
+#endif
 
     // load the catalog from disk (szDirPrefix corresponds to language)
     bool Load(const wxChar *szDirPrefix, const wxChar *szName,
@@ -978,9 +986,11 @@ private:
     wxMessagesHash  m_messages; // all messages in the catalog
     wxString        m_name;     // name of the domain
 
+#if !wxUSE_UNICODE
     // the conversion corresponding to this catalog charset if we installed it
     // as the global one
     wxCSConv *m_conv;
+#endif
 
     wxPluralFormsCalculatorPtr  m_pluralFormsCalculator;
 };
@@ -1407,6 +1417,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
 // wxMsgCatalog class
 // ----------------------------------------------------------------------------
 
+#if !wxUSE_UNICODE
 wxMsgCatalog::~wxMsgCatalog()
 {
     if ( m_conv )
@@ -1421,6 +1432,7 @@ wxMsgCatalog::~wxMsgCatalog()
         delete m_conv;
     }
 }
+#endif // !wxUSE_UNICODE
 
 bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
                         const wxChar *msgIdCharset, bool bConvertEncoding)
@@ -1434,7 +1446,7 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
 
     file.FillHash(m_messages, msgIdCharset, bConvertEncoding);
 
-#if wxUSE_WCHAR_T
+#if !wxUSE_UNICODE && wxUSE_WCHAR_T
     // we should use a conversion compatible with the message catalog encoding
     // in the GUI if we don't convert the strings to the current conversion but
     // as the encoding is global, only change it once, otherwise we could get
@@ -1450,7 +1462,7 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
         wxConvUI =
         m_conv = new wxCSConv(file.GetCharset());
     }
-#endif // wxUSE_WCHAR_T
+#endif // !wxUSE_UNICODE && wxUSE_WCHAR_T
 
     return true;
 }
@@ -1934,8 +1946,13 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
     // for now we don't use the encoding, although we probably should (doing
     // translations of the msg catalogs on the fly as required) (TODO)
     //
-    // we don't use the modifiers neither but we probably should translate
-    // "euro" into iso885915
+    // we need the modified for languages like Valencian: ca_ES@valencia
+    // though, remember it
+    wxString modifier;
+    size_t posModifier = langFull.find_first_of(_T("@"));
+    if ( posModifier != wxString::npos )
+        modifier = langFull.Mid(posModifier);
+
     size_t posEndLang = langFull.find_first_of(_T("@."));
     if ( posEndLang != wxString::npos )
     {
@@ -1981,11 +1998,24 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
         }
 
         // 1. Try to find the language either as is:
-        for ( i = 0; i < count; i++ )
+        // a) With modifier if set
+        if ( !modifier.empty() )
         {
-            if ( ms_languagesDB->Item(i).CanonicalName == langFull )
+            wxString langFullWithModifier = langFull + modifier;
+            for ( i = 0; i < count; i++ )
             {
-                break;
+                if ( ms_languagesDB->Item(i).CanonicalName == langFullWithModifier )
+                    break;
+            }
+        }
+
+        // b) Without modifier
+        if ( modifier.empty() || i == count )
+        {
+            for ( i = 0; i < count; i++ )
+            {
+                if ( ms_languagesDB->Item(i).CanonicalName == langFull )
+                    break;
             }
         }
 
@@ -2151,7 +2181,7 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
         lc = wxT("lv_LV") ;
         break ;
       case verSami:
-        // not known
+        lc = wxT("se_NO") ;
         break ;
       case verFaroeIsl:
         lc = wxT("fo_FO") ;
@@ -2302,14 +2332,16 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
         break ;
       default :
         break ;
-   }
-  for ( i = 0; i < count; i++ )
-  {
-      if ( ms_languagesDB->Item(i).CanonicalName == lc )
-      {
-          break;
-      }
-  }
+    }
+    if ( !lc )
+        return wxLANGUAGE_UNKNOWN;
+    for ( i = 0; i < count; i++ )
+    {
+        if ( ms_languagesDB->Item(i).CanonicalName == lc )
+        {
+            break;
+        }
+    }
 
 #elif defined(__WIN32__)
     LCID lcid = GetUserDefaultLCID();
@@ -2739,8 +2771,8 @@ bool wxLocale::IsAvailable(int lang)
         return false;
 
 #elif defined(__UNIX__)
-    
-    // Test if setting the locale works, then set it back. 
+
+    // Test if setting the locale works, then set it back.
     wxMB2WXbuf oldLocale = wxSetlocale(LC_ALL, wxEmptyString);
     wxMB2WXbuf tmp = wxSetlocaleTryUTF(LC_ALL, info->CanonicalName);
     if ( !tmp )
@@ -2751,8 +2783,8 @@ bool wxLocale::IsAvailable(int lang)
             return false;
     }
     // restore the original locale
-    wxSetlocale(LC_ALL, oldLocale);    
-#endif 
+    wxSetlocale(LC_ALL, oldLocale);
+#endif
 
     return true;
 }
@@ -2818,6 +2850,18 @@ bool wxLocale::AddCatalog(const wxChar *szDomain,
 /* static */
 wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
 {
+    wxUint32 lcid = LOCALE_USER_DEFAULT;
+
+    if (wxGetLocale())
+    {
+        const wxLanguageInfo *info = GetLanguageInfo(wxGetLocale()->GetLanguage());
+        if (info)
+        {                         ;
+            lcid = MAKELCID(MAKELANGID(info->WinLang, info->WinSublang),
+                                     SORT_DEFAULT);
+        }
+    }
+
     wxString str;
     wxChar buffer[256];
     size_t count;
@@ -2825,7 +2869,7 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
     switch (index)
     {
         case wxLOCALE_DECIMAL_POINT:
-            count = ::GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buffer, 256);
+            count = ::GetLocaleInfo(lcid, LOCALE_SDECIMAL, buffer, 256);
             if (!count)
                 str << wxT(".");
             else
@@ -2833,14 +2877,14 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
             break;
 #if 0
         case wxSYS_LIST_SEPARATOR:
-            count = ::GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLIST, buffer, 256);
+            count = ::GetLocaleInfo(lcid, LOCALE_SLIST, buffer, 256);
             if (!count)
                 str << wxT(",");
             else
                 str << buffer;
             break;
         case wxSYS_LEADING_ZERO: // 0 means no leading zero, 1 means leading zero
-            count = ::GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ILZERO, buffer, 256);
+            count = ::GetLocaleInfo(lcid, LOCALE_ILZERO, buffer, 256);
             if (!count)
                 str << wxT("0");
             else
@@ -2853,7 +2897,48 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
     return str;
 }
 
-#else // !__WXMSW__
+#elif defined(__DARWIN__)
+
+/* static */
+wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
+{
+    CFLocaleRef userLocaleRefRaw;
+    if ( wxGetLocale() )
+    {
+        userLocaleRefRaw = CFLocaleCreate
+                           (
+                                kCFAllocatorDefault,
+                                wxMacCFStringHolder(wxGetLocale()->GetCanonicalName())
+                           );
+    }
+    else // no current locale, use the default one
+    {
+        userLocaleRefRaw = CFLocaleCopyCurrent();
+    }
+
+    wxCFRef userLocaleRef(userLocaleRefRaw);
+
+    CFTypeRef cfstr;
+    switch ( index )
+    {
+        case wxLOCALE_THOUSANDS_SEP:
+            cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleGroupingSeparator);
+            break;
+
+        case wxLOCALE_DECIMAL_POINT:
+            cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleDecimalSeparator);
+            break;
+
+        default:
+            wxFAIL_MSG( _T("Unknown locale info") );
+    }
+
+    wxMacCFStringHolder
+        str(CFStringCreateCopy(NULL, static_cast(cfstr)));
+    return str.AsString();
+}
+
+#else // !__WXMSW__ && !__DARWIN__
 
 /* static */
 wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat)
@@ -3112,6 +3197,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxLocaleModule, wxModule)
 #ifndef LANG_RUSSIAN
 #define LANG_RUSSIAN (0)
 #endif
+#ifndef LANG_SAMI
+#define LANG_SAMI (0)
+#endif
 #ifndef LANG_SANSKRIT
 #define LANG_SANSKRIT (0)
 #endif
@@ -3160,6 +3248,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxLocaleModule, wxModule)
 #ifndef LANG_UZBEK
 #define LANG_UZBEK (0)
 #endif
+#ifndef LANG_VALENCIAN
+#define LANG_VALENCIAN (0)
+#endif
 #ifndef LANG_VIETNAMESE
 #define LANG_VIETNAMESE (0)
 #endif
@@ -3531,7 +3622,7 @@ void wxLocale::InitLanguagesDB()
    LNG(wxLANGUAGE_FRENCH_SWISS,               "fr_CH", LANG_FRENCH    , SUBLANG_FRENCH_SWISS              , wxLayout_LeftToRight, "French (Swiss)")
    LNG(wxLANGUAGE_FRISIAN,                    "fy"   , 0              , 0                                 , wxLayout_LeftToRight, "Frisian")
    LNG(wxLANGUAGE_GALICIAN,                   "gl_ES", 0              , 0                                 , wxLayout_LeftToRight, "Galician")
-   LNG(wxLANGUAGE_GEORGIAN,                   "ka"   , LANG_GEORGIAN  , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Georgian")
+   LNG(wxLANGUAGE_GEORGIAN,                   "ka_GE", LANG_GEORGIAN  , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Georgian")
    LNG(wxLANGUAGE_GERMAN,                     "de_DE", LANG_GERMAN    , SUBLANG_GERMAN                    , wxLayout_LeftToRight, "German")
    LNG(wxLANGUAGE_GERMAN_AUSTRIAN,            "de_AT", LANG_GERMAN    , SUBLANG_GERMAN_AUSTRIAN           , wxLayout_LeftToRight, "German (Austrian)")
    LNG(wxLANGUAGE_GERMAN_BELGIUM,             "de_BE", 0              , 0                                 , wxLayout_LeftToRight, "German (Belgium)")
@@ -3567,7 +3658,7 @@ void wxLocale::InitLanguagesDB()
    LNG(wxLANGUAGE_KIRUNDI,                    "rn"   , 0              , 0                                 , wxLayout_LeftToRight, "Kirundi")
    LNG(wxLANGUAGE_KONKANI,                    ""     , LANG_KONKANI   , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Konkani")
    LNG(wxLANGUAGE_KOREAN,                     "ko_KR", LANG_KOREAN    , SUBLANG_KOREAN                    , wxLayout_LeftToRight, "Korean")
-   LNG(wxLANGUAGE_KURDISH,                    "ku"   , 0              , 0                                 , wxLayout_LeftToRight, "Kurdish")
+   LNG(wxLANGUAGE_KURDISH,                    "ku_TR", 0              , 0                                 , wxLayout_LeftToRight, "Kurdish")
    LNG(wxLANGUAGE_LAOTHIAN,                   "lo"   , 0              , 0                                 , wxLayout_LeftToRight, "Laothian")
    LNG(wxLANGUAGE_LATIN,                      "la"   , 0              , 0                                 , wxLayout_LeftToRight, "Latin")
    LNG(wxLANGUAGE_LATVIAN,                    "lv_LV", LANG_LATVIAN   , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Latvian")
@@ -3586,7 +3677,7 @@ void wxLocale::InitLanguagesDB()
    LNG(wxLANGUAGE_MOLDAVIAN,                  "mo"   , 0              , 0                                 , wxLayout_LeftToRight, "Moldavian")
    LNG(wxLANGUAGE_MONGOLIAN,                  "mn"   , 0              , 0                                 , wxLayout_LeftToRight, "Mongolian")
    LNG(wxLANGUAGE_NAURU,                      "na"   , 0              , 0                                 , wxLayout_LeftToRight, "Nauru")
-   LNG(wxLANGUAGE_NEPALI,                     "ne"   , LANG_NEPALI    , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Nepali")
+   LNG(wxLANGUAGE_NEPALI,                     "ne_NP", LANG_NEPALI    , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Nepali")
    LNG(wxLANGUAGE_NEPALI_INDIA,               "ne_IN", LANG_NEPALI    , SUBLANG_NEPALI_INDIA              , wxLayout_LeftToRight, "Nepali (India)")
    LNG(wxLANGUAGE_NORWEGIAN_BOKMAL,           "nb_NO", LANG_NORWEGIAN , SUBLANG_NORWEGIAN_BOKMAL          , wxLayout_LeftToRight, "Norwegian (Bokmal)")
    LNG(wxLANGUAGE_NORWEGIAN_NYNORSK,          "nn_NO", LANG_NORWEGIAN , SUBLANG_NORWEGIAN_NYNORSK         , wxLayout_LeftToRight, "Norwegian (Nynorsk)")
@@ -3607,8 +3698,12 @@ void wxLocale::InitLanguagesDB()
    LNG(wxLANGUAGE_SANGHO,                     "sg"   , 0              , 0                                 , wxLayout_LeftToRight, "Sangho")
    LNG(wxLANGUAGE_SANSKRIT,                   "sa"   , LANG_SANSKRIT  , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Sanskrit")
    LNG(wxLANGUAGE_SCOTS_GAELIC,               "gd"   , 0              , 0                                 , wxLayout_LeftToRight, "Scots Gaelic")
+   LNG(wxLANGUAGE_SAMI,                       "se_NO", LANG_SAMI      , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Northern Sami")
+   LNG(wxLANGUAGE_SERBIAN,                    "sr_SR", LANG_SERBIAN   , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Serbian")
+   LNG(wxLANGUAGE_SERBIAN_CYRILLIC,           "sr_SR", LANG_SERBIAN   , SUBLANG_SERBIAN_CYRILLIC          , wxLayout_LeftToRight, "Serbian (Cyrillic)")
+   LNG(wxLANGUAGE_SERBIAN_LATIN,              "sr_SR@latin", LANG_SERBIAN   , SUBLANG_SERBIAN_LATIN             , wxLayout_LeftToRight, "Serbian (Latin)")
    LNG(wxLANGUAGE_SERBIAN_CYRILLIC,           "sr_YU", LANG_SERBIAN   , SUBLANG_SERBIAN_CYRILLIC          , wxLayout_LeftToRight, "Serbian (Cyrillic)")
-   LNG(wxLANGUAGE_SERBIAN_LATIN,              "sr_YU", LANG_SERBIAN   , SUBLANG_SERBIAN_LATIN             , wxLayout_LeftToRight, "Serbian (Latin)")
+   LNG(wxLANGUAGE_SERBIAN_LATIN,              "sr_YU@latin", LANG_SERBIAN   , SUBLANG_SERBIAN_LATIN             , wxLayout_LeftToRight, "Serbian (Latin)")
    LNG(wxLANGUAGE_SERBO_CROATIAN,             "sh"   , 0              , 0                                 , wxLayout_LeftToRight, "Serbo-Croatian")
    LNG(wxLANGUAGE_SESOTHO,                    "st"   , 0              , 0                                 , wxLayout_LeftToRight, "Sesotho")
    LNG(wxLANGUAGE_SETSWANA,                   "tn"   , 0              , 0                                 , wxLayout_LeftToRight, "Setswana")
@@ -3665,6 +3760,7 @@ void wxLocale::InitLanguagesDB()
    LNG(wxLANGUAGE_UZBEK,                      "uz"   , LANG_UZBEK     , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Uzbek")
    LNG(wxLANGUAGE_UZBEK_CYRILLIC,             "uz"   , LANG_UZBEK     , SUBLANG_UZBEK_CYRILLIC            , wxLayout_LeftToRight, "Uzbek (Cyrillic)")
    LNG(wxLANGUAGE_UZBEK_LATIN,                "uz"   , LANG_UZBEK     , SUBLANG_UZBEK_LATIN               , wxLayout_LeftToRight, "Uzbek (Latin)")
+   LNG(wxLANGUAGE_VALENCIAN,                  "ca_ES@valencia", LANG_VALENCIAN , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Valencian")
    LNG(wxLANGUAGE_VIETNAMESE,                 "vi_VN", LANG_VIETNAMESE, SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Vietnamese")
    LNG(wxLANGUAGE_VOLAPUK,                    "vo"   , 0              , 0                                 , wxLayout_LeftToRight, "Volapuk")
    LNG(wxLANGUAGE_WELSH,                      "cy"   , 0              , 0                                 , wxLayout_LeftToRight, "Welsh")
diff --git a/Externals/wxWidgets/src/common/log.cpp b/Externals/wxWidgets/src/common/log.cpp
index 7068d24fe8..9c56c4719e 100644
--- a/Externals/wxWidgets/src/common/log.cpp
+++ b/Externals/wxWidgets/src/common/log.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: log.cpp 49589 2007-11-01 20:35:45Z VZ $
+// RCS-ID:      $Id: log.cpp 50994 2008-01-02 21:27:31Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -287,13 +287,18 @@ wxCRIT_SECT_DECLARE(gs_prevCS);
 unsigned wxLog::DoLogNumberOfRepeats()
 {
     wxLog * const pLogger = GetActiveTarget();
-    return pLogger ? pLogger->LogLastRepetitionCountIfNeeded() : 0u;
+    return pLogger ? pLogger->LogLastRepeatIfNeeded() : 0u;
 }
 
-unsigned wxLog::LogLastRepetitionCountIfNeeded()
+unsigned wxLog::LogLastRepeatIfNeeded()
 {
     wxCRIT_SECT_LOCKER(lock, gs_prevCS);
 
+    return LogLastRepeatIfNeededUnlocked();
+}
+
+unsigned wxLog::LogLastRepeatIfNeededUnlocked()
+{
     long retval = ms_prevCounter;
     if ( ms_prevCounter > 0 )
     {
@@ -315,7 +320,6 @@ unsigned wxLog::LogLastRepetitionCountIfNeeded()
 
 wxLog::~wxLog()
 {
-    LogLastRepetitionCountIfNeeded();
 }
 
 /* static */
@@ -339,7 +343,7 @@ void wxLog::OnLog(wxLogLevel level, const wxChar *szString, time_t t)
                     return;
                 }
 
-                pLogger->LogLastRepetitionCountIfNeeded();
+                pLogger->LogLastRepeatIfNeededUnlocked();
 
                 // reset repetition counter for a new message
                 ms_prevString = szString;
@@ -497,7 +501,7 @@ void wxLog::DoLogString(const wxChar *WXUNUSED(szString), time_t WXUNUSED(t))
 
 void wxLog::Flush()
 {
-    // nothing to do here
+    LogLastRepeatIfNeeded();
 }
 
 /*static*/ bool wxLog::IsAllowedTraceMask(const wxChar *mask)
diff --git a/Externals/wxWidgets/src/common/menucmn.cpp b/Externals/wxWidgets/src/common/menucmn.cpp
index e018b08ada..9dbba3c749 100644
--- a/Externals/wxWidgets/src/common/menucmn.cpp
+++ b/Externals/wxWidgets/src/common/menucmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     26.10.99
-// RCS-ID:      $Id: menucmn.cpp 48053 2007-08-13 17:07:01Z JS $
+// RCS-ID:      $Id: menucmn.cpp 51361 2008-01-24 18:12:55Z PC $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -470,8 +470,6 @@ void wxMenuBase::Init(long style)
 wxMenuBase::~wxMenuBase()
 {
     WX_CLEAR_LIST(wxMenuItemList, m_items);
-
-    // Actually, in GTK, the submenus have to get deleted first.
 }
 
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/common/pickerbase.cpp b/Externals/wxWidgets/src/common/pickerbase.cpp
index beb6059277..d95110fdc9 100644
--- a/Externals/wxWidgets/src/common/pickerbase.cpp
+++ b/Externals/wxWidgets/src/common/pickerbase.cpp
@@ -4,7 +4,7 @@
 // Author:      Francesco Montorsi
 // Modified by:
 // Created:     15/04/2006
-// RCS-ID:      $Id: pickerbase.cpp 44218 2007-01-14 16:18:36Z VZ $
+// RCS-ID:      $Id: pickerbase.cpp 52566 2008-03-16 13:50:17Z JS $
 // Copyright:   (c) Francesco Montorsi
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -96,14 +96,14 @@ bool wxPickerBase::CreateBase(wxWindow *parent,
         // set the initial contents of the textctrl
         m_text->SetValue(text);
 
-        m_text->Connect(wxEVT_COMMAND_TEXT_UPDATED,
+        m_text->Connect(m_text->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
                 wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate),
                 NULL, this);
-        m_text->Connect(wxEVT_KILL_FOCUS,
+        m_text->Connect(m_text->GetId(), wxEVT_KILL_FOCUS,
                 wxFocusEventHandler(wxPickerBase::OnTextCtrlKillFocus),
                 NULL, this);
 
-        m_text->Connect(wxEVT_DESTROY,
+        m_text->Connect(m_text->GetId(), wxEVT_DESTROY,
                 wxWindowDestroyEventHandler(wxPickerBase::OnTextCtrlDelete),
                 NULL, this);
 
diff --git a/Externals/wxWidgets/src/common/regex.cpp b/Externals/wxWidgets/src/common/regex.cpp
index 4eea090b99..33af348ad5 100644
--- a/Externals/wxWidgets/src/common/regex.cpp
+++ b/Externals/wxWidgets/src/common/regex.cpp
@@ -1,11 +1,11 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Name:        src/common/regex.cpp
 // Purpose:     regular expression matching
-// Author:      Karsten Ballüder and Vadim Zeitlin
+// Author:      Karsten Ballueder and Vadim Zeitlin
 // Modified by:
 // Created:     13.07.01
-// RCS-ID:      $Id: regex.cpp 36271 2005-11-27 18:12:37Z MW $
-// Copyright:   (c) 2000 Karsten Ballüder 
+// RCS-ID:      $Id: regex.cpp 50711 2007-12-15 02:57:58Z VZ $
+// Copyright:   (c) 2000 Karsten Ballueder 
 //                  2001 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/src/common/sizer.cpp b/Externals/wxWidgets/src/common/sizer.cpp
index b2528e8982..1db16c8f74 100644
--- a/Externals/wxWidgets/src/common/sizer.cpp
+++ b/Externals/wxWidgets/src/common/sizer.cpp
@@ -5,7 +5,7 @@
 //              Dirk Holtwick, Ron Lee
 // Modified by: Ron Lee
 // Created:
-// RCS-ID:      $Id: sizer.cpp 49676 2007-11-06 10:47:58Z JS $
+// RCS-ID:      $Id: sizer.cpp 52359 2008-03-06 13:48:50Z VS $
 // Copyright:   (c) Robin Dunn, Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -86,6 +86,17 @@ WX_DEFINE_EXPORTED_LIST( wxSizerItemList )
     minsize
 */
 
+
+// ----------------------------------------------------------------------------
+// wxSizerFlags
+// ----------------------------------------------------------------------------
+
+wxSizerFlags& wxSizerFlags::ReserveSpaceEvenIfHidden()
+{
+    m_flags |= wxRESERVE_SPACE_EVEN_IF_HIDDEN;
+    return *this;
+}
+
 // ----------------------------------------------------------------------------
 // wxSizerItem
 // ----------------------------------------------------------------------------
@@ -487,6 +498,37 @@ bool wxSizerItem::IsShown() const
     return false;
 }
 
+// This is a helper to support wxRESERVE_SPACE_EVEN_IF_HIDDEN. In wx 2.9+,
+// this flag is respected by IsShown(), but not in wx 2.8.
+bool wxSizerItem::ShouldAccountFor() const
+{
+    if ( m_flag & wxRESERVE_SPACE_EVEN_IF_HIDDEN )
+        return true;
+
+    if ( IsSizer() )
+    {
+        // this mirrors wxSizerItem::IsShown() code above
+        const wxSizerItemList& children = m_sizer->GetChildren();
+        if ( children.GetCount() == 0 )
+            return true;
+
+        for ( wxSizerItemList::compatibility_iterator
+              node = children.GetFirst();
+              node;
+              node = node->GetNext() )
+        {
+            if ( node->GetData()->ShouldAccountFor() )
+                return true;
+        }
+        return false;
+    }
+    else
+    {
+        return IsShown();
+    }
+}
+
+
 #if WXWIN_COMPATIBILITY_2_6
 void wxSizerItem::SetOption( int option )
 {
@@ -767,7 +809,7 @@ void wxSizer::DeleteWindows()
     }
 }
 
-wxSize wxSizer::Fit( wxWindow *window )
+wxSize wxSizer::ComputeFittingWindowSize(wxWindow *window)
 {
     // take the min size by default and limit it by max size
     wxSize size = GetMinWindowSize(window);
@@ -800,9 +842,20 @@ wxSize wxSizer::Fit( wxWindow *window )
     if ( sizeMax.y != wxDefaultCoord && size.y > sizeMax.y )
         size.y = sizeMax.y;
 
+    return size;
+}
 
-    window->SetSize( size );
+wxSize wxSizer::ComputeFittingClientSize(wxWindow *window)
+{
+    wxCHECK_MSG( window, wxDefaultSize, _T("window can't be NULL") );
 
+    return window->WindowToClientSize(ComputeFittingWindowSize(window));
+}
+
+wxSize wxSizer::Fit( wxWindow *window )
+{
+    wxSize size = ComputeFittingWindowSize(window);
+    window->SetSize(size);
     return size;
 }
 
@@ -832,12 +885,19 @@ void wxSizer::SetSizeHints( wxWindow *window )
     // Preserve the window's max size hints, but set the
     // lower bound according to the sizer calculations.
 
-    wxSize size = Fit( window );
+    // This is equivalent to calling Fit(), except that we need to set
+    // the size hints _in between_ the two steps performed by Fit
+    // (1. ComputeFittingWindowSize, 2. SetSize). That's because
+    // otherwise SetSize() could have no effect if there already are
+    // size hints in effect that forbid requested size.
+    const wxSize size = ComputeFittingWindowSize(window);
 
     window->SetSizeHints( size.x,
                           size.y,
                           window->GetMaxWidth(),
                           window->GetMaxHeight() );
+
+    window->SetSize(size);
 }
 
 void wxSizer::SetVirtualSizeHints( wxWindow *window )
@@ -1415,7 +1475,7 @@ wxSize wxFlexGridSizer::CalcMin()
     while (node)
     {
         wxSizerItem    *item = node->GetData();
-        if ( item->IsShown() )
+        if ( item->ShouldAccountFor() )
         {
             wxSize sz( item->CalcMin() );
             int row = i / ncols;
@@ -1660,7 +1720,7 @@ void wxBoxSizer::RecalcSizes()
     {
         wxSizerItem     *item = node->GetData();
 
-        if (item->IsShown())
+        if (item->ShouldAccountFor())
         {
             wxSize size( item->GetMinSizeWithBorder() );
 
@@ -1753,7 +1813,7 @@ wxSize wxBoxSizer::CalcMin()
     {
         wxSizerItem *item = node->GetData();
 
-        if ( item->IsShown() )
+        if ( item->ShouldAccountFor() )
         {
             item->CalcMin();  // result is stored in the item
 
@@ -1771,7 +1831,7 @@ wxSize wxBoxSizer::CalcMin()
     {
         wxSizerItem *item = node->GetData();
 
-        if (item->IsShown() && item->GetProportion() != 0)
+        if (item->ShouldAccountFor() && item->GetProportion() != 0)
         {
             int stretch = item->GetProportion();
             wxSize size( item->GetMinSizeWithBorder() );
@@ -1797,7 +1857,7 @@ wxSize wxBoxSizer::CalcMin()
     {
         wxSizerItem *item = node->GetData();
 
-        if (item->IsShown())
+        if (item->ShouldAccountFor())
         {
             wxSize size( item->GetMinSizeWithBorder() );
             if (item->GetProportion() != 0)
diff --git a/Externals/wxWidgets/src/common/stdpbase.cpp b/Externals/wxWidgets/src/common/stdpbase.cpp
index 99f27adc52..a8212c90f0 100644
--- a/Externals/wxWidgets/src/common/stdpbase.cpp
+++ b/Externals/wxWidgets/src/common/stdpbase.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     2004-10-19
-// RCS-ID:      $Id: stdpbase.cpp 43340 2006-11-12 12:58:10Z RR $
+// RCS-ID:      $Id: stdpbase.cpp 53093 2008-04-08 13:51:17Z JS $
 // Copyright:   (c) 2004 Vadim Zeitlin 
 // License:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
@@ -34,6 +34,11 @@
 #include "wx/filename.h"
 #include "wx/stdpaths.h"
 
+#if defined(__UNIX__) && !defined(__WXMAC__)
+#include "wx/log.h"
+#include "wx/textfile.h"
+#endif
+
 // ----------------------------------------------------------------------------
 // module globals
 // ----------------------------------------------------------------------------
@@ -96,6 +101,43 @@ wxString wxStandardPathsBase::GetUserLocalDataDir() const
 
 wxString wxStandardPathsBase::GetDocumentsDir() const
 {
+#if defined(__UNIX__) && !defined(__WXMAC__)
+    {
+        wxLogNull logNull;
+        wxString homeDir = wxFileName::GetHomeDir();
+        wxString configPath;
+        if (wxGetenv(wxT("XDG_CONFIG_HOME")))
+            configPath = wxGetenv(wxT("XDG_CONFIG_HOME"));
+        else
+            configPath = homeDir + wxT("/.config");
+        wxString dirsFile = configPath + wxT("/user-dirs.dirs");
+        if (wxFileExists(dirsFile))
+        {
+            wxTextFile textFile;
+            if (textFile.Open(dirsFile))
+            {
+                size_t i;
+                for (i = 0; i < textFile.GetLineCount(); i++)
+                {
+                    wxString line(textFile[i]);
+                    int pos = line.Find(wxT("XDG_DOCUMENTS_DIR"));
+                    if (pos != wxNOT_FOUND)
+                    {
+                        wxString value = line.AfterFirst(wxT('='));
+                        value.Replace(wxT("$HOME"), homeDir);
+                        value.Trim(true);
+                        value.Trim(false);
+                        if (!value.IsEmpty() && wxDirExists(value))
+                            return value;
+                        else
+                            break;
+                    }
+                }
+            }
+        }
+    }
+#endif
+
     return wxFileName::GetHomeDir();
 }
 
diff --git a/Externals/wxWidgets/src/common/stream.cpp b/Externals/wxWidgets/src/common/stream.cpp
index 1b5eb4aed5..b743641076 100644
--- a/Externals/wxWidgets/src/common/stream.cpp
+++ b/Externals/wxWidgets/src/common/stream.cpp
@@ -5,7 +5,7 @@
 // Modified by: VZ (23.11.00) to fix realloc()ing new[]ed memory,
 //                            general code review
 // Created:     11/07/98
-// RCS-ID:      $Id: stream.cpp 44485 2007-02-12 19:11:12Z VZ $
+// RCS-ID:      $Id: stream.cpp 51662 2008-02-11 20:23:29Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1221,12 +1221,15 @@ wxInputStream& wxBufferedInputStream::Read(void *buf, size_t size)
         size -= m_lastcount;
         buf = (char *)buf + m_lastcount;
 
-        // the call to wxStreamBuffer::Read() below will reset our m_lastcount,
-        // so save it
+        // the call to wxStreamBuffer::Read() below may reset our m_lastcount
+        // (but it also may not do it if the buffer is associated to another
+        // existing stream and wasn't created by us), so save it
         size_t countOld = m_lastcount;
 
-        m_i_streambuf->Read(buf, size);
+        // the new count of the bytes read is the count of bytes read this time
+        m_lastcount = m_i_streambuf->Read(buf, size);
 
+        // plus those we had read before
         m_lastcount += countOld;
     }
 
diff --git a/Externals/wxWidgets/src/common/string.cpp b/Externals/wxWidgets/src/common/string.cpp
index 3fcacc3a76..29cbeea6d9 100644
--- a/Externals/wxWidgets/src/common/string.cpp
+++ b/Externals/wxWidgets/src/common/string.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin, Ryan Norton
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: string.cpp 49342 2007-10-23 03:30:16Z DE $
+// RCS-ID:      $Id: string.cpp 53702 2008-05-22 17:22:00Z SN $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 //              (c) 2004 Ryan Norton 
 // Licence:     wxWindows licence
@@ -209,8 +209,8 @@ bool wxStringBase::AllocBuffer(size_t nLen)
   wxASSERT( nLen >  0 );
 
   // make sure that we don't overflow
-  wxASSERT( nLen < (INT_MAX / sizeof(wxChar)) -
-                   (sizeof(wxStringData) + EXTRA_ALLOC + 1) );
+  wxCHECK( nLen < (INT_MAX / sizeof(wxChar)) -
+                  (sizeof(wxStringData) + EXTRA_ALLOC + 1), false );
 
   STATISTICS_ADD(Length, nLen);
 
@@ -844,6 +844,16 @@ bool wxStringBase::ConcatSelf(size_t nSrcLen, const wxChar *pszSrcData,
     size_t nLen = pData->nDataLength;
     size_t nNewLen = nLen + nSrcLen;
 
+    // take special care when appending part of this string to itself: the code
+    // below reallocates our buffer and this invalidates pszSrcData pointer so
+    // we have to copy it in another temporary string in this case (but avoid
+    // doing this unnecessarily)
+    if ( pszSrcData >= m_pchData && pszSrcData < m_pchData + nLen )
+    {
+        wxStringBase tmp(pszSrcData, nSrcLen);
+        return ConcatSelf(nSrcLen, tmp.m_pchData, nSrcLen);
+    }
+
     // alloc new buffer if current is too small
     if ( pData->IsShared() ) {
       STATISTICS_ADD(ConcatHit, 0);
@@ -1589,9 +1599,9 @@ wxString& wxString::MakeLower()
 // ---------------------------------------------------------------------------
 
 // some compilers (VC++ 6.0 not to name them) return true for a call to
-// isspace('ê') in the C locale which seems to be broken to me, but we have to
-// live with this by checking that the character is a 7 bit one - even if this
-// may fail to detect some spaces (I don't know if Unicode doesn't have
+// isspace('\xEA') in the C locale which seems to be broken to me, but we have
+// to live with this by checking that the character is a 7 bit one - even if 
+// this may fail to detect some spaces (I don't know if Unicode doesn't have
 // space-like symbols somewhere except in the first 128 chars), it is arguably
 // still better than trimming away accented letters
 inline int wxSafeIsspace(wxChar ch) { return (ch < 127) && wxIsspace(ch); }
@@ -1908,7 +1918,7 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
             // the user's format string
             return -1;
 #else // assume that system version only returns error if not enough space
-#ifndef __WXWINCE__
+#if !defined(__WXWINCE__) && (!defined(__OS2__) || defined(__INNOTEK_LIBC__))
             if( (errno == EILSEQ) || (errno == EINVAL) )
             // If errno was set to one of the two well-known hard errors
             // then fail immediately to avoid an infinite loop.
diff --git a/Externals/wxWidgets/src/common/tarstrm.cpp b/Externals/wxWidgets/src/common/tarstrm.cpp
index 5b33204b33..2a9693c554 100644
--- a/Externals/wxWidgets/src/common/tarstrm.cpp
+++ b/Externals/wxWidgets/src/common/tarstrm.cpp
@@ -2,7 +2,7 @@
 // Name:        tarstrm.cpp
 // Purpose:     Streams for Tar files
 // Author:      Mike Wetherell
-// RCS-ID:      $Id: tarstrm.cpp 49010 2007-10-01 21:25:08Z MW $
+// RCS-ID:      $Id: tarstrm.cpp 53248 2008-04-17 17:29:22Z MW $
 // Copyright:   (c) 2004 Mike Wetherell
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -230,7 +230,7 @@ wxUint32 wxTarHeaderBlock::SumField(int id)
 }
 
 bool wxTarHeaderBlock::Read(wxInputStream& in)
-{   
+{
     bool ok = true;
 
     for (int id = 0; id < TAR_NUMFIELDS && ok; id++)
@@ -268,7 +268,7 @@ wxTarNumber wxTarHeaderBlock::GetOctal(int id)
 bool wxTarHeaderBlock::SetOctal(int id, wxTarNumber n)
 {
     // set an octal field, return true if the number fits
-    char *field = Get(id); 
+    char *field = Get(id);
     char *p = field + Len(id);
     *--p = 0;
     while (p > field) {
@@ -311,7 +311,7 @@ bool wxTarHeaderBlock::SetPath(const wxString& name, wxMBConv& conv)
 
     for (;;) {
         fits = i < maxprefix && len - i <= maxname;
-        
+
         if (!fits) {
             const char *p = strchr(mbName + i, '/');
             if (p)
@@ -333,7 +333,7 @@ bool wxTarHeaderBlock::SetPath(const wxString& name, wxMBConv& conv)
     return fits && !badconv;
 }
 
-    
+
 /////////////////////////////////////////////////////////////////////////////
 // Some helpers
 
@@ -359,7 +359,8 @@ static wxString wxTarUserName(int uid)
     wxCharBuffer buf(bufsize);
     struct passwd pw;
 
-    if (getpwuid_r(uid, &pw, buf.data(), bufsize, &ppw) == 0)
+    memset(&pw, 0, sizeof(pw));
+    if (getpwuid_r(uid, &pw, buf.data(), bufsize, &ppw) == 0 && pw.pw_name)
         return wxString(pw.pw_name, wxConvLibc);
 #else
     if ((ppw = getpwuid(uid)) != NULL)
@@ -381,7 +382,8 @@ static wxString wxTarGroupName(int gid)
     wxCharBuffer buf(bufsize);
     struct group gr;
 
-    if (getgrgid_r(gid, &gr, buf.data(), bufsize, &pgr) == 0)
+    memset(&gr, 0, sizeof(gr));
+    if (getgrgid_r(gid, &gr, buf.data(), bufsize, &pgr) == 0 && gr.gr_name)
         return wxString(gr.gr_name, wxConvLibc);
 #else
     if ((pgr = getgrgid(gid)) != NULL)
@@ -624,7 +626,7 @@ int wxTarEntry::GetMode() const
         return m_Mode;
     else
         return m_Mode | 0111;
-    
+
 }
 
 void wxTarEntry::SetMode(int mode)
@@ -946,7 +948,7 @@ bool wxTarInputStream::ReadExtendedHeader(wxTarHeaderRecords*& recs)
 
         // read the record size (byte count in ascii decimal)
         recSize = 0;
-        while (isdigit(*p))
+        while (isdigit((unsigned char) *p))
             recSize = recSize * 10 + *p++ - '0';
 
         // validity checks
@@ -980,7 +982,7 @@ bool wxTarInputStream::ReadExtendedHeader(wxTarHeaderRecords*& recs)
         if (value.empty())
             recs->erase(key);
         else
-            (*recs)[key] = value; 
+            (*recs)[key] = value;
     }
 
     if (!ok || recPos < len || size != lastread) {
@@ -1029,7 +1031,7 @@ size_t wxTarInputStream::OnSysRead(void *buffer, size_t size)
 
     size_t lastread = m_parent_i_stream->Read(buffer, size).LastRead();
     m_pos += lastread;
-    
+
     if (m_pos >= m_size) {
         m_lasterror = wxSTREAM_EOF;
     } else if (!m_parent_i_stream->IsOk()) {
@@ -1242,7 +1244,7 @@ bool wxTarOutputStream::WriteHeaders(wxTarEntry& entry)
     *m_hdr->Get(TAR_TYPEFLAG) = char(entry.GetTypeFlag());
 
     strcpy(m_hdr->Get(TAR_MAGIC), USTAR_MAGIC);
-    strcpy(m_hdr->Get(TAR_VERSION), USTAR_VERSION); 
+    strcpy(m_hdr->Get(TAR_VERSION), USTAR_VERSION);
 
     SetHeaderString(TAR_LINKNAME, entry.GetLinkName());
     SetHeaderString(TAR_UNAME, entry.GetUserName());
@@ -1251,7 +1253,7 @@ bool wxTarOutputStream::WriteHeaders(wxTarEntry& entry)
     if (~entry.GetDevMajor())
         SetHeaderNumber(TAR_DEVMAJOR, entry.GetDevMajor());
     if (~entry.GetDevMinor())
-        SetHeaderNumber(TAR_DEVMINOR, entry.GetDevMinor()); 
+        SetHeaderNumber(TAR_DEVMINOR, entry.GetDevMinor());
 
     m_chksum = m_hdr->Sum();
     m_hdr->SetOctal(TAR_CHKSUM, m_chksum);
@@ -1282,7 +1284,7 @@ bool wxTarOutputStream::WriteHeaders(wxTarEntry& entry)
         strcpy(m_hdr2->Get(TAR_MTIME), m_hdr->Get(TAR_MTIME));
         *m_hdr2->Get(TAR_TYPEFLAG) = 'x';
         strcpy(m_hdr2->Get(TAR_MAGIC), USTAR_MAGIC);
-        strcpy(m_hdr2->Get(TAR_VERSION), USTAR_VERSION); 
+        strcpy(m_hdr2->Get(TAR_VERSION), USTAR_VERSION);
         strcpy(m_hdr2->Get(TAR_UNAME), m_hdr->Get(TAR_UNAME));
         strcpy(m_hdr2->Get(TAR_GNAME), m_hdr->Get(TAR_GNAME));
 
@@ -1306,7 +1308,7 @@ bool wxTarOutputStream::WriteHeaders(wxTarEntry& entry)
                      m_badfit.c_str(), entry.GetName().c_str());
         m_badfit.clear();
     }
-                         
+
     m_hdr->Write(*m_parent_o_stream);
     m_tarsize += TAR_BLOCKSIZE;
     m_lasterror = m_parent_o_stream->GetLastError();
@@ -1320,7 +1322,7 @@ wxString wxTarOutputStream::PaxHeaderPath(const wxString& format,
     wxString d = path.BeforeLast(_T('/'));
     wxString f = path.AfterLast(_T('/'));
     wxString ret;
-    
+
     if (d.empty())
         d = _T(".");
 
diff --git a/Externals/wxWidgets/src/common/toplvcmn.cpp b/Externals/wxWidgets/src/common/toplvcmn.cpp
index 723cbce0ab..badf84ed25 100644
--- a/Externals/wxWidgets/src/common/toplvcmn.cpp
+++ b/Externals/wxWidgets/src/common/toplvcmn.cpp
@@ -3,7 +3,7 @@
 // Purpose:     common (for all platforms) wxTopLevelWindow functions
 // Author:      Julian Smart, Vadim Zeitlin
 // Created:     01/02/97
-// Id:          $Id: toplvcmn.cpp 49029 2007-10-04 07:25:26Z SC $
+// Id:          $Id: toplvcmn.cpp 53617 2008-05-17 12:56:18Z VZ $
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -82,22 +82,33 @@ bool wxTopLevelWindowBase::Destroy()
         wxPendingDelete.Append(this);
 
 #ifdef __WXMAC__
-	// on mac we know that objects will always be deleted after this event
-	// has been handled, using Hide we avoid erratic redraws during window
-	// tear down
-	Hide();
-#else
-    if (wxTopLevelWindows.GetCount() > 1)
+    // on mac we know that objects will always be deleted after this event
+    // has been handled, using Hide we avoid erratic redraws during window
+    // tear down
+    Hide();
+#else // !__WXMAC__
+    // normally we want to hide the window immediately so that it doesn't get
+    // stuck on the screen while it's being destroyed, however we shouldn't
+    // hide the last visible window as then we might not get any idle events
+    // any more as no events will be sent to the hidden window and without idle
+    // events we won't prune wxPendingDelete list and the application won't
+    // terminate
+    for ( wxWindowList::const_iterator i = wxTopLevelWindows.begin(),
+                                     end = wxTopLevelWindows.end();
+          i != end;
+          ++i )
     {
-        // Hide it immediately. This should
-        // not be done if this TLW is the
-        // only one left since we then would
-        // risk not to get any idle events
-        // at all anymore during which we
-        // could delete any pending events.
-        Hide();
+        wxTopLevelWindow * const win = wx_static_cast(wxTopLevelWindow *, *i);
+        if ( win != this && win->IsShown() )
+        {
+            // there remains at least one other visible TLW, we can hide this
+            // one
+            Hide();
+
+            break;
+        }
     }
-#endif
+#endif // __WXMAC__/!__WXMAC__
 
     return true;
 }
@@ -249,8 +260,11 @@ void wxTopLevelWindowBase::DoCentre(int dir)
     if((rectParent == rectDisplay) && IsMaximized())
         return;
 
+    if ( !(dir & wxBOTH) )
+        dir |= wxBOTH; // if neither is specified, center in both directions
+
     // the new window rect candidate
-    wxRect rect = GetRect().CentreIn(rectParent, dir);
+    wxRect rect = GetRect().CentreIn(rectParent, dir & ~wxCENTRE_ON_SCREEN);
 
     // we don't want to place the window off screen if Centre() is called as
     // this is (almost?) never wanted and it would be very difficult to prevent
diff --git a/Externals/wxWidgets/src/common/treebase.cpp b/Externals/wxWidgets/src/common/treebase.cpp
index 8ab76b76f2..2299e994e0 100644
--- a/Externals/wxWidgets/src/common/treebase.cpp
+++ b/Externals/wxWidgets/src/common/treebase.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Created:     01/02/97
 // Modified:
-// Id:          $Id: treebase.cpp 44116 2007-01-07 15:02:57Z VZ $
+// Id:          $Id: treebase.cpp 51356 2008-01-24 11:23:30Z VZ $
 // Copyright:   (c) 1998 Robert Roebling, Julian Smart et al
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -193,7 +193,9 @@ void wxTreeCtrlBase::ExpandAllChildren(const wxTreeItemId& item)
 {
     // expand this item first, this might result in its children being added on
     // the fly
-    Expand(item);
+    if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
+        Expand(item);
+    //else: expanding hidden root item is unsupported and unnecessary
 
     // then (recursively) expand all the children
     wxTreeItemIdValue cookie;
diff --git a/Externals/wxWidgets/src/common/utilscmn.cpp b/Externals/wxWidgets/src/common/utilscmn.cpp
index 421f735312..cbf133426e 100644
--- a/Externals/wxWidgets/src/common/utilscmn.cpp
+++ b/Externals/wxWidgets/src/common/utilscmn.cpp
@@ -3,7 +3,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: utilscmn.cpp 48211 2007-08-20 01:41:09Z KO $
+// RCS-ID:      $Id: utilscmn.cpp 51328 2008-01-22 10:19:39Z VS $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -864,6 +864,20 @@ static bool wxLaunchDefaultBrowserBaseImpl(const wxString& url, int flags)
 
 #ifdef __UNIX__
 
+    // Our best best is to use xdg-open from freedesktop.org cross-desktop
+    // compatibility suite xdg-utils
+    // (see http://portland.freedesktop.org/wiki/) -- this is installed on
+    // most modern distributions and may be tweaked by them to handle
+    // distribution specifics. Only if that fails, try to find the right
+    // browser ourselves.
+    wxString path, xdg_open;
+    if ( wxGetEnv(_T("PATH"), &path) &&
+         wxFindFileInPath(&xdg_open, path, _T("xdg-open")) )
+    {
+        if ( wxExecute(xdg_open + _T(" ") + url) )
+            return true;
+    }
+
     wxString desktop = wxTheApp->GetTraits()->GetDesktopEnvironment();
 
     // GNOME and KDE desktops have some applications which should be always installed
diff --git a/Externals/wxWidgets/src/common/wincmn.cpp b/Externals/wxWidgets/src/common/wincmn.cpp
index 106fad2c5e..5e772ce566 100644
--- a/Externals/wxWidgets/src/common/wincmn.cpp
+++ b/Externals/wxWidgets/src/common/wincmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart, Vadim Zeitlin
 // Modified by:
 // Created:     13/07/98
-// RCS-ID:      $Id: wincmn.cpp 46272 2007-06-02 13:25:43Z VZ $
+// RCS-ID:      $Id: wincmn.cpp 52330 2008-03-05 14:19:38Z VS $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -392,6 +392,14 @@ wxWindowBase::~wxWindowBase()
 #if wxUSE_ACCESSIBILITY
     delete m_accessible;
 #endif
+
+#if wxUSE_HELP
+    // NB: this has to be called unconditionally, because we don't
+    //     know whether this window has associated help text or not
+    wxHelpProvider *helpProvider = wxHelpProvider::Get();
+    if ( helpProvider )
+        helpProvider->RemoveHelp(this);
+#endif
 }
 
 void wxWindowBase::SendDestroyEvent()
@@ -747,6 +755,22 @@ wxPoint wxWindowBase::GetClientAreaOrigin() const
     return wxPoint(0,0);
 }
 
+wxSize wxWindowBase::ClientToWindowSize(const wxSize& size) const
+{
+    const wxSize diff(GetSize() - GetClientSize());
+
+    return wxSize(size.x == -1 ? -1 : size.x + diff.x,
+                  size.y == -1 ? -1 : size.y + diff.y);
+}
+
+wxSize wxWindowBase::WindowToClientSize(const wxSize& size) const
+{
+    const wxSize diff(GetSize() - GetClientSize());
+
+    return wxSize(size.x == -1 ? -1 : size.x - diff.x,
+                  size.y == -1 ? -1 : size.y - diff.y);
+}
+
 void wxWindowBase::SetWindowVariant( wxWindowVariant variant )
 {
     if ( m_windowVariant != variant )
@@ -891,8 +915,11 @@ bool wxWindowBase::Enable(bool enable)
 
 bool wxWindowBase::IsShownOnScreen() const
 {
+    // A window is shown on screen if it itself is shown and so are all its
+    // parents. But if a window is toplevel one, then its always visible on
+    // screen if IsShown() returns true, even if it has a hidden parent.
     return IsShown() &&
-           (GetParent() == NULL || GetParent()->IsShownOnScreen());
+           (IsTopLevel() || !GetParent() || GetParent()->IsShownOnScreen());
 }
 
 // ----------------------------------------------------------------------------
@@ -1635,7 +1662,29 @@ void wxWindowBase::OnHelp(wxHelpEvent& event)
     wxHelpProvider *helpProvider = wxHelpProvider::Get();
     if ( helpProvider )
     {
-        if ( helpProvider->ShowHelpAtPoint(this, event.GetPosition(), event.GetOrigin()) )
+        wxPoint pos = event.GetPosition();
+        const wxHelpEvent::Origin origin = event.GetOrigin();
+        if ( origin == wxHelpEvent::Origin_Keyboard )
+        {
+            // if the help event was generated from keyboard it shouldn't
+            // appear at the mouse position (which is still the only position
+            // associated with help event) if the mouse is far away, although
+            // we still do use the mouse position if it's over the window
+            // because we suppose the user looks approximately at the mouse
+            // already and so it would be more convenient than showing tooltip
+            // at some arbitrary position which can be quite far from it
+            const wxRect rectClient = GetClientRect();
+            if ( !rectClient.Contains(ScreenToClient(pos)) )
+            {
+                // position help slightly under and to the right of this window
+                pos = ClientToScreen(wxPoint(
+                        2*GetCharWidth(),
+                        rectClient.height + GetCharHeight()
+                      ));
+            }
+        }
+
+        if ( helpProvider->ShowHelpAtPoint(this, pos, origin) )
         {
             // skip the event.Skip() below
             return;
@@ -2617,6 +2666,27 @@ bool wxWindowBase::TryParent(wxEvent& event)
     return wxEvtHandler::TryParent(event);
 }
 
+// ----------------------------------------------------------------------------
+// window relationships
+// ----------------------------------------------------------------------------
+
+wxWindow *wxWindowBase::DoGetSibling(MoveKind order) const
+{
+    wxCHECK_MSG( GetParent(), NULL,
+                    _T("GetPrev/NextSibling() don't work for TLWs!") );
+
+    wxWindowList& siblings = GetParent()->GetChildren();
+    wxWindowList::compatibility_iterator i = siblings.Find((wxWindow *)this);
+    wxCHECK_MSG( i, NULL, _T("window not a child of its parent?") );
+
+    if ( order == MoveBefore )
+        i = i->GetPrevious();
+    else // MoveAfter
+        i = i->GetNext();
+
+    return i ? i->GetData() : NULL;
+}
+
 // ----------------------------------------------------------------------------
 // keyboard navigation
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/common/wxchar.cpp b/Externals/wxWidgets/src/common/wxchar.cpp
index 3a47ff0a5a..e89894106e 100644
--- a/Externals/wxWidgets/src/common/wxchar.cpp
+++ b/Externals/wxWidgets/src/common/wxchar.cpp
@@ -4,7 +4,7 @@
 // Author:      Ove Kaven
 // Modified by: Ron Lee, Francesco Montorsi
 // Created:     09/04/99
-// RCS-ID:      $Id: wxchar.cpp 49328 2007-10-22 11:32:59Z VZ $
+// RCS-ID:      $Id: wxchar.cpp 54071 2008-06-10 18:22:32Z VZ $
 // Copyright:   (c) wxWidgets copyright
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -2023,13 +2023,19 @@ WXDLLEXPORT const wxChar *wxStrstr(const wxChar *haystack, const wxChar *needle)
 
 WXDLLEXPORT double wxStrtod(const wxChar *nptr, wxChar **endptr)
 {
+  const wxChar decSep(
+#if wxUSE_INTL
+      wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER)[0]
+#else
+      _T('.')
+#endif
+      );
   const wxChar *start = nptr;
 
-  // FIXME: only correct for C locale
   while (wxIsspace(*nptr)) nptr++;
   if (*nptr == wxT('+') || *nptr == wxT('-')) nptr++;
   while (wxIsdigit(*nptr)) nptr++;
-  if (*nptr == wxT('.')) {
+  if (*nptr == decSep) {
     nptr++;
     while (wxIsdigit(*nptr)) nptr++;
   }
@@ -2040,7 +2046,7 @@ WXDLLEXPORT double wxStrtod(const wxChar *nptr, wxChar **endptr)
   }
 
   wxString data(start, nptr-start);
-  wxWX2MBbuf dat = data.mb_str(wxConvLibc);
+  const wxWX2MBbuf dat = data.mb_str(wxConvLibc);
   char *rdat = wxMBSTRINGCAST dat;
   double ret = strtod(dat, &rdat);
 
@@ -2053,7 +2059,6 @@ WXDLLEXPORT long int wxStrtol(const wxChar *nptr, wxChar **endptr, int base)
 {
   const wxChar *start = nptr;
 
-  // FIXME: only correct for C locale
   while (wxIsspace(*nptr)) nptr++;
   if (*nptr == wxT('+') || *nptr == wxT('-')) nptr++;
   if (((base == 0) || (base == 16)) &&
diff --git a/Externals/wxWidgets/src/common/zipstrm.cpp b/Externals/wxWidgets/src/common/zipstrm.cpp
index 4009fcbff9..1cda3adce2 100644
--- a/Externals/wxWidgets/src/common/zipstrm.cpp
+++ b/Externals/wxWidgets/src/common/zipstrm.cpp
@@ -2,7 +2,7 @@
 // Name:        src/common/zipstrm.cpp
 // Purpose:     Streams for Zip files
 // Author:      Mike Wetherell
-// RCS-ID:      $Id: zipstrm.cpp 44087 2007-01-01 22:27:42Z PC $
+// RCS-ID:      $Id: zipstrm.cpp 51009 2008-01-03 17:11:45Z MW $
 // Copyright:   (c) Mike Wetherell
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/src/generic/calctrl.cpp b/Externals/wxWidgets/src/generic/calctrl.cpp
index 36518a089c..6624a6b971 100644
--- a/Externals/wxWidgets/src/generic/calctrl.cpp
+++ b/Externals/wxWidgets/src/generic/calctrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     29.12.99
-// RCS-ID:      $Id: calctrl.cpp 43778 2006-12-03 21:30:23Z VZ $
+// RCS-ID:      $Id: calctrl.cpp 53987 2008-06-05 15:48:55Z VZ $
 // Copyright:   (c) 1999 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -300,7 +300,7 @@ void wxCalendarCtrl::CreateMonthComboBox()
                           wxDefaultCoord,
                           wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
 
-    m_comboMonth->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED,
+    m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED,
                           wxCommandEventHandler(wxCalendarCtrl::OnMonthChange),
                           NULL, this);
 }
@@ -314,11 +314,11 @@ void wxCalendarCtrl::CreateYearSpinCtrl()
                                 wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
                                 -4300, 10000, GetDate().GetYear());
 
-    m_spinYear->Connect(wxEVT_COMMAND_TEXT_UPDATED,
+    m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
                         wxCommandEventHandler(wxCalendarCtrl::OnYearTextChange),
                         NULL, this);
 
-    m_spinYear->Connect(wxEVT_COMMAND_SPINCTRL_UPDATED,
+    m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED,
                         wxCommandEventHandler(wxCalendarCtrl::OnYearChange),
                         NULL, this);
 }
@@ -1477,6 +1477,10 @@ void wxCalendarCtrl::OnClick(wxMouseEvent& event)
             event.Skip();
             break;
     }
+
+    // as we don't (always) skip the message, we're not going to receive the
+    // focus on click by default if we don't do it ourselves
+    SetFocus();
 }
 
 wxCalendarHitTestResult wxCalendarCtrl::HitTest(const wxPoint& pos,
diff --git a/Externals/wxWidgets/src/generic/choicbkg.cpp b/Externals/wxWidgets/src/generic/choicbkg.cpp
index 1e381baf2e..4b64b8eec7 100644
--- a/Externals/wxWidgets/src/generic/choicbkg.cpp
+++ b/Externals/wxWidgets/src/generic/choicbkg.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by: Wlodzimierz ABX Skiba from generic/listbkg.cpp
 // Created:     15.09.04
-// RCS-ID:      $Id: choicbkg.cpp 49720 2007-11-07 18:16:37Z JS $
+// RCS-ID:      $Id: choicbkg.cpp 53045 2008-04-06 15:14:25Z VZ $
 // Copyright:   (c) Vadim Zeitlin, Wlodzimierz Skiba
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -291,6 +291,7 @@ wxWindow *wxChoicebook::DoRemovePage(size_t page)
 
 bool wxChoicebook::DeleteAllPages()
 {
+    m_selection = wxNOT_FOUND;
     GetChoiceCtrl()->Clear();
     return wxBookCtrlBase::DeleteAllPages();
 }
diff --git a/Externals/wxWidgets/src/generic/clrpickerg.cpp b/Externals/wxWidgets/src/generic/clrpickerg.cpp
index 508d6cf538..5d4eba0a9d 100644
--- a/Externals/wxWidgets/src/generic/clrpickerg.cpp
+++ b/Externals/wxWidgets/src/generic/clrpickerg.cpp
@@ -4,7 +4,7 @@
 // Author:      Francesco Montorsi (readapted code written by Vadim Zeitlin)
 // Modified by:
 // Created:     15/04/2006
-// RCS-ID:      $Id: clrpickerg.cpp 40322 2006-07-25 11:41:53Z ABX $
+// RCS-ID:      $Id: clrpickerg.cpp 52835 2008-03-26 15:49:08Z JS $
 // Copyright:   (c) Vadim Zeitlin, Francesco Montorsi
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -56,7 +56,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
     }
 
     // and handle user clicks on it
-    Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
             wxCommandEventHandler(wxGenericColourButton::OnButtonClick),
             NULL, this);
 
diff --git a/Externals/wxWidgets/src/generic/datectlg.cpp b/Externals/wxWidgets/src/generic/datectlg.cpp
index 19577d18c0..11e45b677e 100644
--- a/Externals/wxWidgets/src/generic/datectlg.cpp
+++ b/Externals/wxWidgets/src/generic/datectlg.cpp
@@ -4,7 +4,7 @@
 // Author:      Andreas Pflug
 // Modified by:
 // Created:     2005-01-19
-// RCS-ID:      $Id: datectlg.cpp 46530 2007-06-18 19:34:56Z RD $
+// RCS-ID:      $Id: datectlg.cpp 53510 2008-05-09 22:15:55Z RD $
 // Copyright:   (c) 2005 Andreas Pflug 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -158,6 +158,7 @@ public:
         if ( date.IsValid() )
         {
             m_combo->SetText(date.Format(m_format));
+            SetDate(date);
         }
         else // invalid date
         {
@@ -166,13 +167,6 @@ public:
 
             m_combo->SetText(wxEmptyString);
         }
-
-        m_currentDate = date;
-    }
-
-    const wxDateTime& GetDateValue() const
-    {
-        return m_currentDate;
     }
 
     bool ParseDateTime(const wxString& s, wxDateTime* pDt)
@@ -217,39 +211,40 @@ private:
 
     void OnSelChange(wxCalendarEvent &ev)
     {
-        m_currentDate = wxCalendarCtrl::GetDate();
-        m_combo->SetText(m_currentDate.Format(m_format));
+        m_combo->SetText(GetDate().Format(m_format));
 
         if ( ev.GetEventType() == wxEVT_CALENDAR_DOUBLECLICKED )
         {
             Dismiss();
         }
 
-        SendDateEvent(m_currentDate);
+        SendDateEvent(GetDate());
     }
 
     void OnKillTextFocus(wxFocusEvent &ev)
     {
         ev.Skip();
 
+        const wxDateTime& dtOld = GetDate();
+
         wxDateTime dt;
         wxString value = m_combo->GetValue();
         if ( !ParseDateTime(value, &dt) )
         {
             if ( !HasDPFlag(wxDP_ALLOWNONE) )
-                dt = m_currentDate;
+                dt = dtOld;
         }
 
-        if ( dt.IsValid() )
-            m_combo->SetText(dt.Format(m_format));
-        else
-            m_combo->SetText(wxEmptyString);
+        m_combo->SetText(GetStringValueFor(dt));
 
+        if ( !dt.IsValid() && HasDPFlag(wxDP_ALLOWNONE) )
+            return;
+        
         // notify that we had to change the date after validation
-        if ( (dt.IsValid() && (!m_currentDate.IsValid() || m_currentDate != dt)) ||
-                (!dt.IsValid() && m_currentDate.IsValid()) )
+        if ( (dt.IsValid() && (!dtOld.IsValid() || dt != dtOld)) ||
+                (!dt.IsValid() && dtOld.IsValid()) )
         {
-            m_currentDate = dt;
+            SetDate(dt);
             SendDateEvent(dt);
         }
     }
@@ -319,8 +314,8 @@ private:
             m_combo->SetValidator(tv);
     #endif
 
-            if (m_currentDate.IsValid())
-                m_combo->SetText(m_currentDate.Format(m_format));
+            if ( GetDate().IsValid() )
+                m_combo->SetText(GetDate().Format(m_format));
         }
 
         return true;
@@ -329,25 +324,30 @@ private:
     virtual void SetStringValue(const wxString& s)
     {
         wxDateTime dt;
-        if ( ParseDateTime(s, &dt) )
-            m_currentDate = dt;
-        else if ( HasDPFlag(wxDP_ALLOWNONE) )
-            m_currentDate = dt;
+        if ( !s.empty() && ParseDateTime(s, &dt) )
+            SetDate(dt);
+        //else: keep the old value
     }
 
     virtual wxString GetStringValue() const
     {
-        if ( !m_currentDate.IsValid() ) 
-            return wxEmptyString;
-
-        return m_currentDate.Format(m_format);
+        return GetStringValueFor(GetDate());
     }
 
 private:
+    // returns either the given date representation using the current format or
+    // an empty string if it's invalid
+    wxString GetStringValueFor(const wxDateTime& dt) const
+    {
+        wxString val;
+        if ( dt.IsValid() )
+            val = dt.Format(m_format);
+
+        return val;
+    }
 
     wxSize          m_useSize;
     wxString        m_format;
-    wxDateTime      m_currentDate;
 
     DECLARE_EVENT_TABLE()
 };
@@ -408,6 +408,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
     m_combo->SetCtrlMainWnd(this);
 
     m_popup = new wxCalendarComboPopup();
+    m_cal = m_popup;
 
 #if defined(__WXMSW__)
     // without this keyboard navigation in month control doesn't work
@@ -415,8 +416,6 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
 #endif
     m_combo->SetPopupControl(m_popup);
 
-    m_cal = m_popup;
-
     m_popup->SetDateValue(date.IsValid() ? date : wxDateTime::Today());
 
     SetInitialSize(size);
@@ -428,8 +427,8 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
 void wxDatePickerCtrlGeneric::Init()
 {
     m_combo = NULL;
-    m_cal = NULL;
     m_popup = NULL;
+    m_cal = NULL;
 }
 
 wxDatePickerCtrlGeneric::~wxDatePickerCtrlGeneric()
@@ -442,8 +441,8 @@ bool wxDatePickerCtrlGeneric::Destroy()
         m_combo->Destroy();
 
     m_combo = NULL;
-    m_cal = NULL;
     m_popup = NULL;
+    m_cal = NULL;
 
     return wxControl::Destroy();
 }
@@ -465,13 +464,13 @@ bool
 wxDatePickerCtrlGeneric::SetDateRange(const wxDateTime& lowerdate,
                                       const wxDateTime& upperdate)
 {
-    return m_cal->SetDateRange(lowerdate, upperdate);
+    return m_popup->SetDateRange(lowerdate, upperdate);
 }
 
 
 wxDateTime wxDatePickerCtrlGeneric::GetValue() const
 {
-    return m_popup->GetDateValue();
+    return m_popup->GetDate();
 }
 
 
@@ -484,9 +483,9 @@ void wxDatePickerCtrlGeneric::SetValue(const wxDateTime& date)
 bool wxDatePickerCtrlGeneric::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
 {
     if (dt1)
-        *dt1 = m_cal->GetLowerDateLimit();
+        *dt1 = m_popup->GetLowerDateLimit();
     if (dt2)
-        *dt2 = m_cal->GetUpperDateLimit();
+        *dt2 = m_popup->GetUpperDateLimit();
     return true;
 }
 
@@ -494,7 +493,7 @@ bool wxDatePickerCtrlGeneric::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
 void
 wxDatePickerCtrlGeneric::SetRange(const wxDateTime &dt1, const wxDateTime &dt2)
 {
-    m_cal->SetDateRange(dt1, dt2);
+    m_popup->SetDateRange(dt1, dt2);
 }
 
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/generic/dcpsg.cpp b/Externals/wxWidgets/src/generic/dcpsg.cpp
index 60741cf5db..eb33a8908f 100644
--- a/Externals/wxWidgets/src/generic/dcpsg.cpp
+++ b/Externals/wxWidgets/src/generic/dcpsg.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart, Robert Roebling, Markus Holzhem
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: dcpsg.cpp 48979 2007-09-28 06:58:48Z RR $
+// RCS-ID:      $Id: dcpsg.cpp 50711 2007-12-15 02:57:58Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -2123,13 +2123,13 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
            /  these values from AFM files, too. Maybe later ... */
 
         // NB: casts to int are needed to suppress gcc 3.3 warnings
-        lastWidths[196] = lastWidths[(int)'A'];  // Ä
-        lastWidths[228] = lastWidths[(int)'a'];  // ä
-        lastWidths[214] = lastWidths[(int)'O'];  // Ö
-        lastWidths[246] = lastWidths[(int)'o'];  // ö
-        lastWidths[220] = lastWidths[(int)'U'];  // Ü
-        lastWidths[252] = lastWidths[(int)'u'];  // ü
-        lastWidths[223] = lastWidths[(int)251];  // ß
+        lastWidths[196] = lastWidths[(int)'A'];  // U+00C4 A Umlaute
+        lastWidths[228] = lastWidths[(int)'a'];  // U+00E4 a Umlaute
+        lastWidths[214] = lastWidths[(int)'O'];  // U+00D6 O Umlaute
+        lastWidths[246] = lastWidths[(int)'o'];  // U+00F6 o Umlaute
+        lastWidths[220] = lastWidths[(int)'U'];  // U+00DC U Umlaute
+        lastWidths[252] = lastWidths[(int)'u'];  // U+00FC u Umlaute
+        lastWidths[223] = lastWidths[(int)251];  // U+00DF eszett (scharfes s)
 
         /* JC: calculate UnderlineThickness/UnderlinePosition */
 
diff --git a/Externals/wxWidgets/src/generic/filepickerg.cpp b/Externals/wxWidgets/src/generic/filepickerg.cpp
index 61675eebab..96eb79916a 100644
--- a/Externals/wxWidgets/src/generic/filepickerg.cpp
+++ b/Externals/wxWidgets/src/generic/filepickerg.cpp
@@ -4,7 +4,7 @@
 // Author:      Francesco Montorsi
 // Modified by:
 // Created:     15/04/2006
-// RCS-ID:      $Id: filepickerg.cpp 39538 2006-06-03 19:20:23Z PC $
+// RCS-ID:      $Id: filepickerg.cpp 52835 2008-03-26 15:49:08Z JS $
 // Copyright:   (c) Francesco Montorsi
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
     }
 
     // and handle user clicks on it
-    Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
             wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick),
             NULL, this);
 
diff --git a/Externals/wxWidgets/src/generic/fontpickerg.cpp b/Externals/wxWidgets/src/generic/fontpickerg.cpp
index cde6821bba..e01bcd544e 100644
--- a/Externals/wxWidgets/src/generic/fontpickerg.cpp
+++ b/Externals/wxWidgets/src/generic/fontpickerg.cpp
@@ -4,7 +4,7 @@
 // Author:      Francesco Montorsi
 // Modified by:
 // Created:     15/04/2006
-// RCS-ID:      $Id: fontpickerg.cpp 42999 2006-11-03 21:54:13Z VZ $
+// RCS-ID:      $Id: fontpickerg.cpp 52835 2008-03-26 15:49:08Z JS $
 // Copyright:   (c) Francesco Montorsi
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -60,7 +60,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
     }
 
     // and handle user clicks on it
-    Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
             wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
             NULL, this);
 
diff --git a/Externals/wxWidgets/src/generic/graphicc.cpp b/Externals/wxWidgets/src/generic/graphicc.cpp
index f203e70498..53b4fa881e 100644
--- a/Externals/wxWidgets/src/generic/graphicc.cpp
+++ b/Externals/wxWidgets/src/generic/graphicc.cpp
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     2006-10-03
-// RCS-ID:      $Id: graphicc.cpp 44597 2007-03-02 16:39:21Z RD $
+// RCS-ID:      $Id: graphicc.cpp 51312 2008-01-21 16:30:13Z VS $
 // Copyright:   (c) 2006 Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/wxWidgets/src/generic/grid.cpp b/Externals/wxWidgets/src/generic/grid.cpp
index 48a44ad9fc..99493008f3 100644
--- a/Externals/wxWidgets/src/generic/grid.cpp
+++ b/Externals/wxWidgets/src/generic/grid.cpp
@@ -4,7 +4,7 @@
 // Author:      Michael Bedward (based on code by Julian Smart, Robin Dunn)
 // Modified by: Robin Dunn, Vadim Zeitlin, Santiago Palacios
 // Created:     1/08/1999
-// RCS-ID:      $Id: grid.cpp 47330 2007-07-11 08:32:10Z JS $
+// RCS-ID:      $Id: grid.cpp 54276 2008-06-18 11:21:57Z SN $
 // Copyright:   (c) Michael Bedward (mbedward@ozemail.com.au)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -70,6 +70,37 @@ struct wxGridCellWithAttr
     wxGridCellWithAttr(int row, int col, wxGridCellAttr *attr_)
         : coords(row, col), attr(attr_)
     {
+        wxASSERT( attr );
+    }
+
+    wxGridCellWithAttr(const wxGridCellWithAttr& other)
+        : coords(other.coords),
+          attr(other.attr)
+    {
+        attr->IncRef();
+    }
+
+    wxGridCellWithAttr& operator=(const wxGridCellWithAttr& other)
+    {
+        coords = other.coords;
+        if (attr != other.attr)
+        {
+            attr->DecRef();
+            attr = other.attr;
+            attr->IncRef();
+        }
+        return *this;
+    }
+
+    void ChangeAttr(wxGridCellAttr * new_attr)
+    {
+        if (attr != new_attr)
+        {
+	    // "Delete" (i.e. DecRef) the old attribute.
+            attr->DecRef();
+            attr = new_attr;
+            // Take ownership of the new attribute, i.e. no IncRef.
+        }
     }
 
     ~wxGridCellWithAttr()
@@ -79,10 +110,6 @@ struct wxGridCellWithAttr
 
     wxGridCellCoords coords;
     wxGridCellAttr  *attr;
-
-// Cannot do this:
-//  DECLARE_NO_COPY_CLASS(wxGridCellWithAttr)
-// without rewriting the macros, which require a public copy constructor.
 };
 
 WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellWithAttr, wxGridCellWithAttrArray,
@@ -127,6 +154,8 @@ public:
     wxGridRowLabelWindow( wxGrid *parent, wxWindowID id,
                           const wxPoint &pos, const wxSize &size );
 
+    virtual bool AcceptsFocus() const { return false; }
+
 private:
     wxGrid   *m_owner;
 
@@ -150,6 +179,8 @@ public:
     wxGridColLabelWindow( wxGrid *parent, wxWindowID id,
                           const wxPoint &pos, const wxSize &size );
 
+    virtual bool AcceptsFocus() const { return false; }
+
 private:
     wxGrid   *m_owner;
 
@@ -173,6 +204,8 @@ public:
     wxGridCornerLabelWindow( wxGrid *parent, wxWindowID id,
                              const wxPoint &pos, const wxSize &size );
 
+    virtual bool AcceptsFocus() const { return false; }
+
 private:
     wxGrid *m_owner;
 
@@ -1496,10 +1529,17 @@ void wxGridCellChoiceEditor::Create(wxWindow* parent,
                                     wxWindowID id,
                                     wxEvtHandler* evtHandler)
 {
+    int style = wxTE_PROCESS_ENTER |
+                wxTE_PROCESS_TAB |
+                wxBORDER_NONE;
+
+    if ( !m_allowOthers )
+        style |= wxCB_READONLY;
+
     m_control = new wxComboBox(parent, id, wxEmptyString,
                                wxDefaultPosition, wxDefaultSize,
                                m_choices,
-                               m_allowOthers ? 0 : wxCB_READONLY);
+                               style);
 
     wxGridCellEditor::Create(parent, id, evtHandler);
 }
@@ -1785,7 +1825,12 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
     {
         if ( isSelected )
         {
-            dc.SetBrush( wxBrush(grid.GetSelectionBackground(), wxSOLID) );
+            wxColour clr;
+            if ( wxWindow::FindFocus() == grid.GetGridWindow() )
+                clr = grid.GetSelectionBackground();
+            else
+                clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);
+            dc.SetBrush( wxBrush(clr, wxSOLID) );
         }
         else
         {
@@ -1819,7 +1864,13 @@ void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
     {
         if ( isSelected )
         {
-            dc.SetTextBackground( grid.GetSelectionBackground() );
+            wxColour clr;
+            if ( wxWindow::FindFocus() ==
+                 wx_const_cast(wxGrid&, grid).GetGridWindow() )
+                clr = grid.GetSelectionBackground();
+            else
+                clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);
+            dc.SetTextBackground( clr );
             dc.SetTextForeground( grid.GetSelectionForeground() );
         }
         else
@@ -2568,21 +2619,25 @@ wxGridCellEditor* wxGridCellAttr::GetEditor(wxGrid* grid, int row, int col) cons
 
 void wxGridCellAttrData::SetAttr(wxGridCellAttr *attr, int row, int col)
 {
+    // Note: contrary to wxGridRowOrColAttrData::SetAttr, we must not
+    //       touch attribute's reference counting explicitly, since this
+    //       is managed by class wxGridCellWithAttr
     int n = FindIndex(row, col);
     if ( n == wxNOT_FOUND )
     {
-        // add the attribute
-        m_attrs.Add(new wxGridCellWithAttr(row, col, attr));
+        if ( attr )
+        {
+            // add the attribute
+            m_attrs.Add(new wxGridCellWithAttr(row, col, attr));
+        }
+        //else: nothing to do
     }
-    else
+    else // we already have an attribute for this cell
     {
-        // free the old attribute
-        m_attrs[(size_t)n].attr->DecRef();
-
         if ( attr )
         {
             // change the attribute
-            m_attrs[(size_t)n].attr = attr;
+            m_attrs[(size_t)n].ChangeAttr(attr);
         }
         else
         {
@@ -2631,8 +2686,6 @@ void wxGridCellAttrData::UpdateAttrRows( size_t pos, int numRows )
                 else
                 {
                     // ...or remove the attribute
-                    // No need to DecRef the attribute itself since this is
-                    // done be wxGridCellWithAttr's destructor!
                     m_attrs.RemoveAt(n);
                     n--;
                     count--;
@@ -2667,8 +2720,6 @@ void wxGridCellAttrData::UpdateAttrCols( size_t pos, int numCols )
                 else
                 {
                     // ...or remove the attribute
-                    // No need to DecRef the attribute itself since this is
-                    // done be wxGridCellWithAttr's destructor!
                     m_attrs.RemoveAt(n);
                     n--;
                     count--;
@@ -2725,22 +2776,31 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol)
     int i = m_rowsOrCols.Index(rowOrCol);
     if ( i == wxNOT_FOUND )
     {
-        // add the attribute
-        m_rowsOrCols.Add(rowOrCol);
-        m_attrs.Add(attr);
+        if ( attr )
+        {
+            // add the attribute - no need to do anything to reference count
+            //                     since we take ownership of the attribute.
+            m_rowsOrCols.Add(rowOrCol);
+            m_attrs.Add(attr);
+        }
+        // nothing to remove
     }
     else
     {
         size_t n = (size_t)i;
+        if ( m_attrs[n] == attr )
+            // nothing to do
+            return; 
         if ( attr )
         {
-            // change the attribute
+            // change the attribute, handling reference count manually,
+            //                       taking ownership of the new attribute.
             m_attrs[n]->DecRef();
             m_attrs[n] = attr;
         }
         else
         {
-            // remove this attribute
+            // remove this attribute, handling reference count manually
             m_attrs[n]->DecRef();
             m_rowsOrCols.RemoveAt(n);
             m_attrs.RemoveAt(n);
@@ -3141,7 +3201,8 @@ void wxGridTableBase::SetAttr(wxGridCellAttr* attr, int row, int col)
 {
     if ( m_attrProvider )
     {
-        attr->SetKind(wxGridCellAttr::Cell);
+        if ( attr )
+            attr->SetKind(wxGridCellAttr::Cell);
         m_attrProvider->SetAttr(attr, row, col);
     }
     else
@@ -4066,6 +4127,34 @@ void wxGridWindow::OnEraseBackground( wxEraseEvent& WXUNUSED(event) )
 
 void wxGridWindow::OnFocus(wxFocusEvent& event)
 {
+    // current cell cursor {dis,re}appears on focus change:
+    wxRect cursor = m_owner->CellToRect(m_owner->GetGridCursorRow(),
+                                        m_owner->GetGridCursorCol());
+    Refresh(true, &cursor);
+
+    // and if we have any selection, it has to be repainted, because it
+    // uses different colour when the grid is not focused:
+    if ( m_owner->IsSelection() )
+    {
+        Refresh();
+    }
+    else
+    {
+        // NB: Note that this code is in "else" branch only because the other
+        //     branch refreshes everything and so there's no point in calling
+        //     Refresh() again, *not* because it should only be done if
+        //     !IsSelection(). If the above code is ever optimized to refresh
+        //     only selected area, this needs to be moved out of the "else"
+        //     branch so that it's always executed.
+
+        // current cell cursor {dis,re}appears on focus change:
+        const wxGridCellCoords cursorCoords(m_owner->GetGridCursorRow(),
+                                            m_owner->GetGridCursorCol());
+        const wxRect cursor =
+            m_owner->BlockToDeviceRect(cursorCoords, cursorCoords);
+        Refresh(true, &cursor);
+    }
+
     if ( !m_owner->GetEventHandler()->ProcessEvent( event ) )
         event.Skip();
 }
@@ -4690,17 +4779,26 @@ void wxGrid::CalcWindowSizes()
         }
     }
 
+    // the grid may be too small to have enough space for the labels yet, don't
+    // size the windows to negative sizes in this case
+    int gw = cw - m_rowLabelWidth;
+    int gh = ch - m_colLabelHeight;
+    if (gw < 0)
+        gw = 0;
+    if (gh < 0)
+        gh = 0;
+
     if ( m_cornerLabelWin && m_cornerLabelWin->IsShown() )
         m_cornerLabelWin->SetSize( 0, 0, m_rowLabelWidth, m_colLabelHeight );
 
     if ( m_colLabelWin && m_colLabelWin->IsShown() )
-        m_colLabelWin->SetSize( m_rowLabelWidth, 0, cw - m_rowLabelWidth, m_colLabelHeight );
+        m_colLabelWin->SetSize( m_rowLabelWidth, 0, gw, m_colLabelHeight );
 
     if ( m_rowLabelWin && m_rowLabelWin->IsShown() )
-        m_rowLabelWin->SetSize( 0, m_colLabelHeight, m_rowLabelWidth, ch - m_colLabelHeight );
+        m_rowLabelWin->SetSize( 0, m_colLabelHeight, m_rowLabelWidth, gh );
 
     if ( m_gridWin && m_gridWin->IsShown() )
-        m_gridWin->SetSize( m_rowLabelWidth, m_colLabelHeight, cw - m_rowLabelWidth, ch - m_colLabelHeight );
+        m_gridWin->SetSize( m_rowLabelWidth, m_colLabelHeight, gw, gh );
 }
 
 // this is called when the grid table sends a message
@@ -6246,7 +6344,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
             if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
             {
                 if ( CanDragRowSize() && CanDragGridSize() )
-                    ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW);
+                    ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, NULL, false);
             }
         }
         else if ( dragCol >= 0 )
@@ -6256,7 +6354,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
             if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
             {
                 if ( CanDragColSize() && CanDragGridSize() )
-                    ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL);
+                    ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, NULL, false);
             }
         }
         else // Neither on a row or col edge
@@ -7601,6 +7699,10 @@ void wxGrid::DrawCell( wxDC& dc, const wxGridCellCoords& coords )
 
 void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr )
 {
+    // don't show highlight when the grid doesn't have focus
+    if ( wxWindow::FindFocus() != m_gridWin )
+        return;
+
     int row = m_currentCellCoords.GetRow();
     int col = m_currentCellCoords.GetCol();
 
@@ -8149,15 +8251,15 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
         }
         else
         {
-            lines.Add( value.Mid(startPos, pos) );
+            lines.Add( tVal.Mid(startPos, pos) );
         }
 
         startPos += pos + 1;
     }
 
-    if ( startPos < (int)value.length() )
+    if ( startPos < (int)tVal.length() )
     {
-        lines.Add( value.Mid( startPos ) );
+        lines.Add( tVal.Mid( startPos ) );
     }
 }
 
@@ -9374,7 +9476,13 @@ wxString wxGrid::GetColLabelValue( int col )
 
 void wxGrid::SetRowLabelSize( int width )
 {
-    width = wxMax( width, 0 );
+    wxASSERT( width >= 0 || width == wxGRID_AUTOSIZE );
+
+    if ( width == wxGRID_AUTOSIZE )
+    {
+        width = CalcColOrRowLabelAreaMinSize(false/*row*/);
+    }
+
     if ( width != m_rowLabelWidth )
     {
         if ( width == 0 )
@@ -9397,7 +9505,13 @@ void wxGrid::SetRowLabelSize( int width )
 
 void wxGrid::SetColLabelSize( int height )
 {
-    height = wxMax( height, 0 );
+    wxASSERT( height >=0 || height == wxGRID_AUTOSIZE );
+
+    if ( height == wxGRID_AUTOSIZE )
+    {
+        height = CalcColOrRowLabelAreaMinSize(true/*column*/);
+    }
+
     if ( height != m_colLabelHeight )
     {
         if ( height == 0 )
@@ -9633,7 +9747,8 @@ void wxGrid::SetCellHighlightROPenWidth(int width)
         // make any visible change if the the thickness is getting smaller.
         int row = m_currentCellCoords.GetRow();
         int col = m_currentCellCoords.GetCol();
-        if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
+        if ( row == -1 || col == -1 ||
+                GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
             return;
 
         wxRect rect = CellToRect(row, col);
@@ -10517,6 +10632,12 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
 
     if ( column )
     {
+        // Ensure automatic width is not less than minimal width. See the
+        // comment in SetColSize() for explanation of why this isn't done
+        // in SetColSize().
+        if ( !setAsMin )
+            extentMax = wxMax(extentMax, GetColMinimalWidth(col));
+
         SetColSize( col, extentMax );
         if ( !GetBatchCount() )
         {
@@ -10532,6 +10653,12 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
     }
     else
     {
+        // Ensure automatic width is not less than minimal height. See the
+        // comment in SetColSize() for explanation of why this isn't done
+        // in SetRowSize().
+        if ( !setAsMin )
+            extentMax = wxMax(extentMax, GetRowMinimalHeight(row));
+
         SetRowSize(row, extentMax);
         if ( !GetBatchCount() )
         {
@@ -10555,6 +10682,59 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
     }
 }
 
+wxCoord wxGrid::CalcColOrRowLabelAreaMinSize(bool column)
+{
+    // calculate size for the rows or columns?
+    const bool calcRows = !column;
+
+    wxClientDC dc(calcRows ? GetGridRowLabelWindow()
+                           : GetGridColLabelWindow());
+    dc.SetFont(GetLabelFont());
+
+    // which dimension should we take into account for calculations?
+    //
+    // for columns, the text can be only horizontal so it's easy but for rows
+    // we also have to take into account the text orientation
+    const bool
+        useWidth = calcRows || (GetColLabelTextOrientation() == wxVERTICAL);
+
+    wxArrayString lines;
+    wxCoord extentMax = 0;
+
+    const int numRowsOrCols = calcRows ? m_numRows : m_numCols;
+    for ( int rowOrCol = 0; rowOrCol < numRowsOrCols; rowOrCol++ )
+    {
+        lines.Clear();
+        // NB: extra parentheses needed to avoid bcc 5.82 compilation errors
+        StringToLines((calcRows ? GetRowLabelValue(rowOrCol)
+                                : GetColLabelValue(rowOrCol)),
+                      lines);
+
+        long w, h;
+        GetTextBoxSize(dc, lines, &w, &h);
+
+        const wxCoord extent = useWidth ? w : h;
+        if ( extent > extentMax )
+            extentMax = extent;
+    }
+
+    if ( !extentMax )
+    {
+        // empty column - give default extent (notice that if extentMax is less
+        // than default extent but != 0, it's OK)
+        extentMax = calcRows ? GetDefaultRowLabelSize()
+                             : GetDefaultColLabelSize();
+    }
+
+    // leave some space around text (taken from AutoSizeColOrRow)
+    if ( calcRows )
+        extentMax += 10;
+    else
+        extentMax += 6;
+
+    return extentMax;
+}
+
 int wxGrid::SetOrCalcColumnSizes(bool calcOnly, bool setAsMin)
 {
     int width = m_rowLabelWidth;
@@ -10947,9 +11127,13 @@ wxArrayInt wxGrid::GetSelectedCols() const
 
 void wxGrid::ClearSelection()
 {
+    wxRect r1 = BlockToDeviceRect( m_selectingTopLeft, m_selectingBottomRight);
+    wxRect r2 = BlockToDeviceRect( m_currentCellCoords, m_selectingKeyboard );
     m_selectingTopLeft =
     m_selectingBottomRight =
     m_selectingKeyboard = wxGridNoCellCoords;
+    Refresh( false, &r1 );
+    Refresh( false, &r2 );
     if ( m_selection )
         m_selection->ClearSelection();
 }
diff --git a/Externals/wxWidgets/src/generic/hyperlink.cpp b/Externals/wxWidgets/src/generic/hyperlink.cpp
index ec0e122fed..7ee1ad3905 100644
--- a/Externals/wxWidgets/src/generic/hyperlink.cpp
+++ b/Externals/wxWidgets/src/generic/hyperlink.cpp
@@ -4,7 +4,7 @@
 // Author:      David Norris , Otto Wyss
 // Modified by: Ryan Norton, Francesco Montorsi
 // Created:     04/02/2005
-// RCS-ID:      $Id: hyperlink.cpp 42816 2006-10-31 08:50:17Z RD $
+// RCS-ID:      $Id: hyperlink.cpp 52131 2008-02-27 02:18:42Z VZ $
 // Copyright:   (c) 2005 David Norris
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -157,7 +157,7 @@ void wxHyperlinkCtrl::SetVisitedColour(const wxColour &colour)
 void wxHyperlinkCtrl::DoContextMenu(const wxPoint &pos)
 {
     wxMenu *menuPopUp = new wxMenu(wxEmptyString, wxMENU_TEAROFF);
-    menuPopUp->Append(wxHYPERLINKCTRL_POPUP_COPY_ID, wxT("Copy URL"));
+    menuPopUp->Append(wxHYPERLINKCTRL_POPUP_COPY_ID, _("&Copy URL"));
     PopupMenu( menuPopUp, pos );
     delete menuPopUp;
 }
diff --git a/Externals/wxWidgets/src/generic/listctrl.cpp b/Externals/wxWidgets/src/generic/listctrl.cpp
index 6e765a0625..47cc270a7a 100644
--- a/Externals/wxWidgets/src/generic/listctrl.cpp
+++ b/Externals/wxWidgets/src/generic/listctrl.cpp
@@ -3,7 +3,7 @@
 // Purpose:     generic implementation of wxListCtrl
 // Author:      Robert Roebling
 //              Vadim Zeitlin (virtual list control support)
-// Id:          $Id: listctrl.cpp 49590 2007-11-01 20:41:30Z VZ $
+// Id:          $Id: listctrl.cpp 54201 2008-06-13 22:38:33Z VZ $
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -579,6 +579,8 @@ public:
     // bring the selected item into view, scrolling to it if necessary
     void MoveToItem(size_t item);
 
+    bool ScrollList( int WXUNUSED(dx), int dy );
+
     // bring the current item into view
     void MoveToFocus() { MoveToItem(m_current); }
 
@@ -3312,13 +3314,51 @@ void wxListMainWindow::MoveToItem(size_t item)
     }
     else // !report
     {
+        int sx = -1,
+            sy = -1;
+
         if (rect.x-view_x < 5)
-            Scroll( (rect.x - 5) / SCROLL_UNIT_X, -1 );
+            sx = (rect.x - 5) / SCROLL_UNIT_X;
         if (rect.x + rect.width - 5 > view_x + client_w)
-            Scroll( (rect.x + rect.width - client_w + SCROLL_UNIT_X) / SCROLL_UNIT_X, -1 );
+            sx = (rect.x + rect.width - client_w + SCROLL_UNIT_X) / SCROLL_UNIT_X;
+
+        if (rect.y-view_y < 5)
+            sy = (rect.y - 5) / hLine;
+        if (rect.y + rect.height - 5 > view_y + client_h)
+            sy = (rect.y + rect.height - client_h + hLine) / hLine;
+
+        Scroll(sx, sy);
     }
 }
 
+bool wxListMainWindow::ScrollList(int WXUNUSED(dx), int dy)
+{
+    if ( !InReportView() )
+    {
+        // TODO: this should work in all views but is not implemented now
+        return false;
+    }
+
+    size_t top, bottom;
+    GetVisibleLinesRange(&top, &bottom);
+
+    if ( bottom == (size_t)-1 )
+        return 0;
+
+    ResetVisibleLinesRange();
+
+    int hLine = GetLineHeight();
+
+    Scroll(-1, top + dy / hLine);
+
+#ifdef __WXMAC__
+    // see comment in MoveToItem() for why we do this
+    ResetVisibleLinesRange();
+#endif
+
+    return true;
+}
+
 // ----------------------------------------------------------------------------
 // keyboard handling
 // ----------------------------------------------------------------------------
@@ -5083,7 +5123,17 @@ void wxGenericListCtrl::SetSingleStyle( long style, bool add )
     else
         flag &= ~style;
 
-    SetWindowStyleFlag( flag );
+    // some styles can be set without recreating everything (as happens in
+    // SetWindowStyleFlag() which calls wxListMainWindow::DeleteEverything())
+    if ( !(style & ~(wxLC_HRULES | wxLC_VRULES)) )
+    {
+        Refresh();
+        wxWindow::SetWindowStyleFlag(flag);
+    }
+    else
+    {
+        SetWindowStyleFlag( flag );
+    }
 }
 
 void wxGenericListCtrl::SetWindowStyleFlag( long flag )
@@ -5581,9 +5631,9 @@ long wxGenericListCtrl::InsertColumn( long col, const wxString &heading,
     return InsertColumn( col, item );
 }
 
-bool wxGenericListCtrl::ScrollList( int WXUNUSED(dx), int WXUNUSED(dy) )
+bool wxGenericListCtrl::ScrollList( int dx, int dy )
 {
-    return 0;
+    return m_mainWin->ScrollList(dx, dy);
 }
 
 // Sort items.
diff --git a/Externals/wxWidgets/src/generic/notebook.cpp b/Externals/wxWidgets/src/generic/notebook.cpp
index 1fff13c229..3158292b93 100644
--- a/Externals/wxWidgets/src/generic/notebook.cpp
+++ b/Externals/wxWidgets/src/generic/notebook.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     17/09/98
-// RCS-ID:      $Id: notebook.cpp 41766 2006-10-08 23:53:34Z VZ $
+// RCS-ID:      $Id: notebook.cpp 50855 2007-12-20 10:51:33Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
-BEGIN_EVENT_TABLE(wxNotebook, wxControl)
+BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase)
     EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
     EVT_SIZE(wxNotebook::OnSize)
     EVT_PAINT(wxNotebook::OnPaint)
@@ -61,7 +61,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
 END_EVENT_TABLE()
 
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase)
 IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
 
 // ============================================================================
diff --git a/Externals/wxWidgets/src/generic/odcombo.cpp b/Externals/wxWidgets/src/generic/odcombo.cpp
index aaec5a2fe1..584695949d 100644
--- a/Externals/wxWidgets/src/generic/odcombo.cpp
+++ b/Externals/wxWidgets/src/generic/odcombo.cpp
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     Apr-30-2006
-// RCS-ID:      $Id: odcombo.cpp 46186 2007-05-24 00:03:26Z VZ $
+// RCS-ID:      $Id: odcombo.cpp 52747 2008-03-23 20:20:46Z VZ $
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -246,8 +246,14 @@ void wxVListBoxComboPopup::SendComboBoxEvent( int selection )
 // returns true if key was consumed
 bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar unicode )
 {
+    const int itemCount = GetCount();
+
+    // keys do nothing in the empty control and returning immediately avoids
+    // using invalid indices below
+    if ( !itemCount )
+        return false;
+
     int value = m_value;
-    int itemCount = GetCount();
     int comboStyle = m_combo->GetWindowStyle();
 
     // this is the character equivalent of the code
@@ -632,10 +638,11 @@ void wxVListBoxComboPopup::SetStringValue( const wxString& value )
 {
     int index = m_strings.Index(value);
 
-    m_value = index;
-
-    if ( index >= -1 && index < (int)wxVListBox::GetItemCount() )
+    if ( index >= 0 && index < (int)wxVListBox::GetItemCount() )
+    {
+        m_value = index;
         wxVListBox::SetSelection(index);
+    }
 }
 
 void wxVListBoxComboPopup::CalcWidths()
diff --git a/Externals/wxWidgets/src/generic/prntdlgg.cpp b/Externals/wxWidgets/src/generic/prntdlgg.cpp
index 435b6b8d1c..e62d6baa20 100644
--- a/Externals/wxWidgets/src/generic/prntdlgg.cpp
+++ b/Externals/wxWidgets/src/generic/prntdlgg.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: prntdlgg.cpp 44226 2007-01-15 01:26:05Z PC $
+// RCS-ID:      $Id: prntdlgg.cpp 50289 2007-11-28 00:24:25Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -62,11 +62,15 @@
 #include 
 #include 
 
+#ifndef __WXUNIVERSAL__
+
 #if wxUSE_LIBGNOMEPRINT
     #include "wx/link.h"
     wxFORCE_LINK_MODULE(gnome_print)
 #endif
 
+#endif // !__WXUNIVERSAL__
+
 // ----------------------------------------------------------------------------
 // global vars
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/generic/progdlgg.cpp b/Externals/wxWidgets/src/generic/progdlgg.cpp
index 4240921877..3b63456cfc 100644
--- a/Externals/wxWidgets/src/generic/progdlgg.cpp
+++ b/Externals/wxWidgets/src/generic/progdlgg.cpp
@@ -1,11 +1,11 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        src/generic/progdlgg.cpp
 // Purpose:     wxProgressDialog class
-// Author:      Karsten Ballüder
+// Author:      Karsten Ballueder
 // Modified by:
 // Created:     09.05.1999
-// RCS-ID:      $Id: progdlgg.cpp 49601 2007-11-02 16:11:08Z VZ $
-// Copyright:   (c) Karsten Ballüder
+// RCS-ID:      $Id: progdlgg.cpp 50711 2007-12-15 02:57:58Z VZ $
+// Copyright:   (c) Karsten Ballueder
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/Externals/wxWidgets/src/generic/sashwin.cpp b/Externals/wxWidgets/src/generic/sashwin.cpp
index 258f116b79..4a0d5f2082 100644
--- a/Externals/wxWidgets/src/generic/sashwin.cpp
+++ b/Externals/wxWidgets/src/generic/sashwin.cpp
@@ -6,7 +6,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: sashwin.cpp 39745 2006-06-15 17:58:49Z ABX $
+// RCS-ID:      $Id: sashwin.cpp 51249 2008-01-16 13:50:23Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -289,7 +289,7 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
            ReleaseMouse();
         m_mouseCaptured = false;
     }
-    else if (event.Moving() && !event.Dragging())
+    else if ((event.Moving() || event.Leaving()) && !event.Dragging())
     {
         // Just change the cursor if required
         if ( sashHit != wxSASH_NONE )
diff --git a/Externals/wxWidgets/src/generic/scrlwing.cpp b/Externals/wxWidgets/src/generic/scrlwing.cpp
index 15406767ef..7b3c578820 100644
--- a/Externals/wxWidgets/src/generic/scrlwing.cpp
+++ b/Externals/wxWidgets/src/generic/scrlwing.cpp
@@ -5,7 +5,7 @@
 // Modified by: Vadim Zeitlin on 31.08.00: wxScrollHelper allows to implement.
 //              Ron Lee on 10.4.02:  virtual size / auto scrollbars et al.
 // Created:     01/02/97
-// RCS-ID:      $Id: scrlwing.cpp 47783 2007-07-28 16:55:01Z RD $
+// RCS-ID:      $Id: scrlwing.cpp 50982 2008-01-01 20:38:33Z VZ $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,10 +18,6 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __VMS
-#define XtDisplay XTDISPLAY
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -39,6 +35,7 @@
         #include "wx/timer.h"
     #endif
     #include "wx/sizer.h"
+    #include "wx/settings.h"
 #endif
 
 #ifdef __WXMAC__
@@ -245,6 +242,12 @@ bool wxScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
         return true;
     }
 
+    if ( evType == wxEVT_CHILD_FOCUS )
+    {
+        m_scrollHelper->HandleOnChildFocus((wxChildFocusEvent &)event);
+        return true;
+    }
+
     if ( evType == wxEVT_SCROLLWIN_TOP ||
          evType == wxEVT_SCROLLWIN_BOTTOM ||
          evType == wxEVT_SCROLLWIN_LINEUP ||
@@ -1058,14 +1061,12 @@ wxScrollHelper::ScrollGetWindowSizeForVirtualSize(const wxSize& size) const
     GetScrollPixelsPerUnit(&ppuX, &ppuY);
 
     wxSize minSize = m_win->GetMinSize();
-    if ( !minSize.IsFullySpecified() )
-        minSize = m_win->GetSize();
 
     wxSize best(size);
     if (ppuX > 0)
-        best.x = minSize.x;
+        best.x = minSize.x + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
     if (ppuY > 0)
-        best.y = minSize.y;
+        best.y = minSize.y + wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y);
 
     return best;
 }
@@ -1339,6 +1340,80 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
 
 #endif // wxUSE_MOUSEWHEEL
 
+void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event)
+{
+    // this event should be processed by all windows in parenthood chain,
+    // e.g. so that nested wxScrolledWindows work correctly
+    event.Skip();
+
+    // find the immediate child under which the window receiving focus is:
+    wxWindow *win = event.GetWindow();
+
+    if ( win == m_targetWindow )
+        return; // nothing to do
+
+    while ( win->GetParent() != m_targetWindow )
+    {
+        win = win->GetParent();
+        if ( !win )
+            return; // event is not from a child of the target window
+    }
+
+    // if the child is not fully visible, try to scroll it into view:
+    int stepx, stepy;
+    GetScrollPixelsPerUnit(&stepx, &stepy);
+
+    // NB: we don't call CalcScrolledPosition() on win->GetPosition() here,
+    //     because children' positions are already scrolled
+    wxRect winrect(win->GetPosition(), win->GetSize());
+    wxSize view(m_targetWindow->GetClientSize());
+
+    int startx, starty;
+    GetViewStart(&startx, &starty);
+
+    // first in vertical direction:
+    if ( stepy > 0 )
+    {
+        int diff = 0;
+
+        if ( winrect.GetTop() < 0 )
+        {
+            diff = winrect.GetTop();
+        }
+        else if ( winrect.GetBottom() > view.y )
+        {
+            diff = winrect.GetBottom() - view.y + 1;
+            // round up to next scroll step if we can't get exact position,
+            // so that the window is fully visible:
+            diff += stepy - 1;
+        }
+
+        starty = (starty * stepy + diff) / stepy;
+    }
+
+    // then horizontal:
+    if ( stepx > 0 )
+    {
+        int diff = 0;
+
+        if ( winrect.GetLeft() < 0 )
+        {
+            diff = winrect.GetLeft();
+        }
+        else if ( winrect.GetRight() > view.x )
+        {
+            diff = winrect.GetRight() - view.x + 1;
+            // round up to next scroll step if we can't get exact position,
+            // so that the window is fully visible:
+            diff += stepx - 1;
+        }
+
+        startx = (startx * stepx + diff) / stepx;
+    }
+
+    Scroll(startx, starty);
+}
+
 // ----------------------------------------------------------------------------
 // wxScrolledWindow implementation
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/generic/spinctlg.cpp b/Externals/wxWidgets/src/generic/spinctlg.cpp
index a57cc36e65..92f3eeea4f 100644
--- a/Externals/wxWidgets/src/generic/spinctlg.cpp
+++ b/Externals/wxWidgets/src/generic/spinctlg.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     29.01.01
-// RCS-ID:      $Id: spinctlg.cpp 42816 2006-10-31 08:50:17Z RD $
+// RCS-ID:      $Id: spinctlg.cpp 52582 2008-03-17 13:46:31Z VZ $
 // Copyright:   (c) 2001 Vadim Zeitlin 
 // License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -265,6 +265,17 @@ bool wxSpinCtrl::Show(bool show)
     return true;
 }
 
+bool wxSpinCtrl::Reparent(wxWindow *newParent)
+{
+    if ( m_btn )
+    {
+        m_btn->Reparent(newParent);
+        m_text->Reparent(newParent);
+    }
+
+    return true;
+}
+
 // ----------------------------------------------------------------------------
 // value and range access
 // ----------------------------------------------------------------------------
@@ -319,6 +330,22 @@ void wxSpinCtrl::SetTextValue(int val)
 
     // and give focus to the control!
     // m_text->SetFocus();    Why???? TODO.
+
+#ifdef __WXCOCOA__
+    /*  It's sort of a hack to do this from here but the idea is that if the
+        user has clicked on us, which is the main reason this method is called,
+        then focus probably ought to go to the text control since clicking on
+        a text control usually gives it focus.
+
+        However, if the focus is already on us (i.e. the user has turned on
+        the ability to tab to controls) then we don't want to drop focus.
+        So we only set focus if we would steal it away from a different
+        control, not if we would steal it away from ourself.
+     */
+    wxWindow *currentFocusedWindow = wxWindow::FindFocus();
+    if(currentFocusedWindow != this && currentFocusedWindow != m_text)
+        m_text->SetFocus();
+#endif
 }
 
 void wxSpinCtrl::SetValue(int val)
diff --git a/Externals/wxWidgets/src/generic/statusbr.cpp b/Externals/wxWidgets/src/generic/statusbr.cpp
index 2a38d4b2ea..0d283c6be6 100644
--- a/Externals/wxWidgets/src/generic/statusbr.cpp
+++ b/Externals/wxWidgets/src/generic/statusbr.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: statusbr.cpp 42157 2006-10-20 11:01:50Z SC $
+// RCS-ID:      $Id: statusbr.cpp 51615 2008-02-09 15:10:13Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -81,14 +81,14 @@ bool wxStatusBarGeneric::Create(wxWindow *parent,
     SetFont(*wxSMALL_FONT);
 #endif
 
-	wxCoord y;
-	{
-		// Set the height according to the font and the border size
-		wxClientDC dc(this);
-		dc.SetFont(GetFont());
+    wxCoord y;
+    {
+        // Set the height according to the font and the border size
+        wxClientDC dc(this);
+        dc.SetFont(GetFont());
 
-		dc.GetTextExtent(_T("X"), NULL, &y );
-	}
+        dc.GetTextExtent(_T("X"), NULL, &y );
+    }
     int height = (int)( (11*y)/10 + 2*GetBorderY());
 
     SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height);
@@ -200,7 +200,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
     {
         int width, height;
         GetClientSize(&width, &height);
-        
+
         if (GetLayoutDirection() == wxLayout_RightToLeft)
         {
             gtk_paint_resize_grip( m_widget->style,
@@ -368,23 +368,16 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
 // Initialize colours
 void wxStatusBarGeneric::InitColours()
 {
-    // Shadow colours
-#if defined(__WXMSW__) || defined(__WXMAC__)
-    wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
-    m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID);
-
-    wxColour hilightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT));
-    m_hilightPen = wxPen(hilightColour, 1, wxSOLID);
-#elif defined(__WXPM__)
+#if defined(__WXPM__)
     m_mediumShadowPen = wxPen(wxColour(127, 127, 127), 1, wxSOLID);
     m_hilightPen = *wxWHITE_PEN;
 
     SetBackgroundColour(*wxLIGHT_GREY);
     SetForegroundColour(*wxBLACK);
-#else
-    m_mediumShadowPen = *wxGREY_PEN;
-    m_hilightPen = *wxWHITE_PEN;
-#endif
+#else // !__WXPM__
+    m_mediumShadowPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+    m_hilightPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT));
+#endif // __WXPM__/!__WXPM__
 }
 
 // Responds to colour changes, and passes event on to children.
diff --git a/Externals/wxWidgets/src/generic/tipdlg.cpp b/Externals/wxWidgets/src/generic/tipdlg.cpp
index 2874d72871..abb2232577 100644
--- a/Externals/wxWidgets/src/generic/tipdlg.cpp
+++ b/Externals/wxWidgets/src/generic/tipdlg.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     28.06.99
-// RCS-ID:      $Id: tipdlg.cpp 40703 2006-08-20 10:52:52Z VZ $
+// RCS-ID:      $Id: tipdlg.cpp 52000 2008-02-22 18:37:18Z VS $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -225,20 +225,6 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
 
     // 1) create all controls in tab order
 
-    // smart phones does not support or do not waste space for wxButtons
-#ifndef __SMARTPHONE__
-    wxButton *btnClose = new wxButton(this, wxID_CLOSE);
-    SetAffirmativeId(wxID_CLOSE);
-#endif
-
-    m_checkbox = new wxCheckBox(this, wxID_ANY, _("&Show tips at startup"));
-    m_checkbox->SetValue(showAtStartup);
-
-    // smart phones does not support or do not waste space for wxButtons
-#ifndef __SMARTPHONE__
-    wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next Tip"));
-#endif
-
     wxStaticText *text = new wxStaticText(this, wxID_ANY, _("Did you know..."));
 
     if (!isPda)
@@ -279,6 +265,22 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
 
 //#endif
 
+    m_checkbox = new wxCheckBox(this, wxID_ANY, _("&Show tips at startup"));
+    m_checkbox->SetValue(showAtStartup);
+    m_checkbox->SetFocus();
+
+    // smart phones does not support or do not waste space for wxButtons
+#ifndef __SMARTPHONE__
+    wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next Tip"));
+#endif
+
+    // smart phones does not support or do not waste space for wxButtons
+#ifndef __SMARTPHONE__
+    wxButton *btnClose = new wxButton(this, wxID_CLOSE);
+    SetAffirmativeId(wxID_CLOSE);
+#endif
+
+
     // 2) put them in boxes
 
     wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
diff --git a/Externals/wxWidgets/src/generic/treectlg.cpp b/Externals/wxWidgets/src/generic/treectlg.cpp
index afcbcd3f61..4dc55bec37 100644
--- a/Externals/wxWidgets/src/generic/treectlg.cpp
+++ b/Externals/wxWidgets/src/generic/treectlg.cpp
@@ -4,7 +4,7 @@
 // Author:      Robert Roebling
 // Created:     01/02/97
 // Modified:    22/10/98 - almost total rewrite, simpler interface (VZ)
-// Id:          $Id: treectlg.cpp 47614 2007-07-21 11:41:34Z VZ $
+// Id:          $Id: treectlg.cpp 53135 2008-04-12 02:31:04Z VZ $
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@
 // array types
 // -----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxGenericTreeItem;
+class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem;
 
 WX_DEFINE_EXPORTED_ARRAY_PTR(wxGenericTreeItem *, wxArrayGenericTreeItems);
 
diff --git a/Externals/wxWidgets/src/generic/vlbox.cpp b/Externals/wxWidgets/src/generic/vlbox.cpp
index 34742968e8..70a5bc109a 100644
--- a/Externals/wxWidgets/src/generic/vlbox.cpp
+++ b/Externals/wxWidgets/src/generic/vlbox.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     31.05.03
-// RCS-ID:      $Id: vlbox.cpp 41810 2006-10-09 16:39:34Z VZ $
+// RCS-ID:      $Id: vlbox.cpp 53998 2008-06-06 22:55:23Z VZ $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // License:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
@@ -98,6 +98,10 @@ wxVListBox::~wxVListBox()
 
 void wxVListBox::SetItemCount(size_t count)
 {
+    // don't leave the current index invalid
+    if ( m_current != wxNOT_FOUND && (size_t)m_current >= count )
+        m_current = count - 1; // also ok when count == 0 as wxNOT_FOUND == -1
+
     if ( m_selStore )
     {
         // tell the selection store that our number of items has changed
diff --git a/Externals/wxWidgets/src/generic/vscroll.cpp b/Externals/wxWidgets/src/generic/vscroll.cpp
index a01e001431..705f579bc8 100644
--- a/Externals/wxWidgets/src/generic/vscroll.cpp
+++ b/Externals/wxWidgets/src/generic/vscroll.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     30.05.03
-// RCS-ID:      $Id: vscroll.cpp 40624 2006-08-16 12:17:05Z MW $
+// RCS-ID:      $Id: vscroll.cpp 51579 2008-02-07 14:15:45Z JS $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -382,6 +382,12 @@ bool wxVScrolledWindow::ScrollToLine(size_t line)
     }
     else // overlap between the lines we showed before and should show now
     {
+        // Avoid scrolling visible parts of the screen on Mac
+#ifdef __WXMAC__
+        if (!IsShownOnScreen())
+            Refresh();
+        else
+#endif
         ScrollWindow(0, GetLinesHeight(GetVisibleBegin(), lineFirstOld));
     }
 
diff --git a/Externals/wxWidgets/src/msw/app.cpp b/Externals/wxWidgets/src/msw/app.cpp
index d7b8c56fe7..4f93384ed8 100644
--- a/Externals/wxWidgets/src/msw/app.cpp
+++ b/Externals/wxWidgets/src/msw/app.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: app.cpp 41054 2006-09-07 19:01:45Z ABX $
+// RCS-ID:      $Id: app.cpp 53607 2008-05-16 15:21:40Z SN $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -539,13 +539,28 @@ void wxApp::WakeUpIdle()
     // start up again.  Doing it this way ensures that the idle handler
     // wakes up in the right thread (see also wxWakeUpMainThread() which does
     // the same for the main app thread only)
-    wxWindow *topWindow = wxTheApp->GetTopWindow();
+    wxWindow * const topWindow = wxTheApp->GetTopWindow();
     if ( topWindow )
     {
-        if ( !::PostMessage(GetHwndOf(topWindow), WM_NULL, 0, 0) )
+        HWND hwndTop = GetHwndOf(topWindow);
+
+        // Do not post WM_NULL if there's already a pending WM_NULL to avoid
+        // overflowing the message queue.
+        //
+        // Notice that due to a limitation of PeekMessage() API (which handles
+        // 0,0 range specially), we have to check the range from 0-1 instead.
+        // This still makes it possible to overflow the queue with WM_NULLs by
+        // interspersing the calles to WakeUpIdle() with windows creation but
+        // it should be rather hard to do it accidentally.
+        MSG msg;
+        if ( !::PeekMessage(&msg, hwndTop, 0, 1, PM_NOREMOVE) ||
+              ::PeekMessage(&msg, hwndTop, 1, 1, PM_NOREMOVE) )
         {
-            // should never happen
-            wxLogLastError(wxT("PostMessage(WM_NULL)"));
+            if ( !::PostMessage(hwndTop, WM_NULL, 0, 0) )
+            {
+                // should never happen
+                wxLogLastError(wxT("PostMessage(WM_NULL)"));
+            }
         }
     }
 }
@@ -687,6 +702,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
 
     // we don't want to process WM_QUIT from here - it should be processed in
     // the main event loop in order to stop it
+    wxEventLoopGuarantor dummyLoopIfNeeded;
     MSG msg;
     while ( PeekMessage(&msg, (HWND)0, 0, 0, PM_NOREMOVE) &&
             msg.message != WM_QUIT )
diff --git a/Externals/wxWidgets/src/msw/button.cpp b/Externals/wxWidgets/src/msw/button.cpp
index df899b7e4e..635e4b9269 100644
--- a/Externals/wxWidgets/src/msw/button.cpp
+++ b/Externals/wxWidgets/src/msw/button.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: button.cpp 45958 2007-05-11 13:04:33Z VZ $
+// RCS-ID:      $Id: button.cpp 51575 2008-02-06 19:58:30Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -357,25 +357,32 @@ void wxButton::SetDefault()
     SetDefaultStyle(this, true);
 }
 
-// special version of wxGetTopLevelParent() which is safe to call when the
-// parent is being destroyed: wxGetTopLevelParent() would just return NULL in
-// this case because wxWindow version of IsTopLevel() is used when it's called
-// during window destruction instead of wxTLW one, but we want to distinguish
-// between these cases
+// return the top level parent window if it's not being deleted yet, otherwise
+// return NULL
 static wxTopLevelWindow *GetTLWParentIfNotBeingDeleted(wxWindow *win)
 {
-    for ( ; win; win = win->GetParent() )
+    for ( ;; )
     {
-        if ( win->IsBeingDeleted() )
-            return NULL;
+        // IsTopLevel() will return false for a wxTLW being deleted, so we also
+        // need the parent test for this case
+        wxWindow * const parent = win->GetParent();
+        if ( !parent || win->IsTopLevel() )
+        {
+            if ( win->IsBeingDeleted() )
+                return NULL;
 
-        if ( win->IsTopLevel() )
             break;
+        }
+
+        win = parent;
     }
 
     wxASSERT_MSG( win, _T("button without top level parent?") );
 
-    return wxDynamicCast(win, wxTopLevelWindow);
+    wxTopLevelWindow * const tlw = wxDynamicCast(win, wxTopLevelWindow);
+    wxASSERT_MSG( tlw, _T("logic error in GetTLWParentIfNotBeingDeleted()") );
+
+    return tlw;
 }
 
 // set this button as being currently default
diff --git a/Externals/wxWidgets/src/msw/checklst.cpp b/Externals/wxWidgets/src/msw/checklst.cpp
index 951ee82d70..09a58bc69e 100644
--- a/Externals/wxWidgets/src/msw/checklst.cpp
+++ b/Externals/wxWidgets/src/msw/checklst.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     16.11.97
-// RCS-ID:      $Id: checklst.cpp 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: checklst.cpp 53057 2008-04-06 15:57:54Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -186,7 +186,7 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
     HDC hdc = (HDC)dc.GetHDC();
 
     // create pens, brushes &c
-    COLORREF colBg = ::GetSysColor(COLOR_WINDOW);
+    COLORREF colBg = wxColourToRGB(GetBackgroundColour());
     AutoHPEN hpenBack(colBg),
              hpenGray(RGB(0xc0, 0xc0, 0xc0));
 
diff --git a/Externals/wxWidgets/src/msw/choice.cpp b/Externals/wxWidgets/src/msw/choice.cpp
index d981d8ebc2..d154a30e02 100644
--- a/Externals/wxWidgets/src/msw/choice.cpp
+++ b/Externals/wxWidgets/src/msw/choice.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin to derive from wxChoiceBase
 // Created:     04/01/98
-// RCS-ID:      $Id: choice.cpp 45011 2007-03-22 02:46:21Z VZ $
+// RCS-ID:      $Id: choice.cpp 51616 2008-02-09 15:22:15Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -172,6 +172,21 @@ bool wxChoice::Create(wxWindow *parent,
                   style, validator, name);
 }
 
+void wxChoice::SetLabel(const wxString& label)
+{
+    if ( FindString(label) == wxNOT_FOUND )
+    {
+        // unless we explicitly do this here, CB_GETCURSEL will continue to
+        // return the index of the previously selected item which will result
+        // in wrongly replacing the value being set now with the previously
+        // value if the user simply opens and closes (without selecting
+        // anything) the combobox popup
+        SetSelection(-1);
+    }
+
+    wxChoiceBase::SetLabel(label);
+}
+
 bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
 {
     MSG *msg = (MSG *) pMsg;
diff --git a/Externals/wxWidgets/src/msw/control.cpp b/Externals/wxWidgets/src/msw/control.cpp
index 4581599c00..13b69349d4 100644
--- a/Externals/wxWidgets/src/msw/control.cpp
+++ b/Externals/wxWidgets/src/msw/control.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: control.cpp 43466 2006-11-17 12:29:21Z VZ $
+// RCS-ID:      $Id: control.cpp 54331 2008-06-22 15:49:12Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -162,6 +162,20 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
         return false;
     }
 
+#if !wxUSE_UNICODE
+    // Text labels starting with the character 0xff (which is a valid character
+    // in many code pages) don't appear correctly as CreateWindowEx() has some
+    // special treatment for this case, apparently the strings starting with -1
+    // are not really strings but something called "ordinals". There is no
+    // documentation about it but the fact is that the label gets mangled or
+    // not displayed at all if we don't do this, see #9572.
+    //
+    // Notice that 0xffff is not a valid Unicode character so the problem
+    // doesn't arise in Unicode build.
+    if ( !label.empty() && label[0] == -1 )
+        ::SetWindowText(GetHwnd(), label);
+#endif // !wxUSE_UNICODE
+
     // install wxWidgets window proc for this window
     SubclassWin(m_hWnd);
 
diff --git a/Externals/wxWidgets/src/msw/dcprint.cpp b/Externals/wxWidgets/src/msw/dcprint.cpp
index faab2ff9a6..e02fe24385 100644
--- a/Externals/wxWidgets/src/msw/dcprint.cpp
+++ b/Externals/wxWidgets/src/msw/dcprint.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: dcprint.cpp 42755 2006-10-30 19:41:46Z VZ $
+// RCS-ID:      $Id: dcprint.cpp 51771 2008-02-13 22:42:45Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -193,15 +193,13 @@ bool wxPrinterDC::StartDoc(const wxString& message)
     if (!m_hDC)
         return false;
 
-    int ret = ::StartDoc(GetHdc(), &docinfo);
-
-    if (ret <= 0)
+    if ( ::StartDoc(GetHdc(), &docinfo) <= 0 )
     {
-        DWORD lastError = GetLastError();
-        wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError);
+        wxLogLastError(wxT("StartDoc"));
+        return false;
     }
 
-    return (ret > 0);
+    return true;
 }
 
 void wxPrinterDC::EndDoc()
diff --git a/Externals/wxWidgets/src/msw/dialup.cpp b/Externals/wxWidgets/src/msw/dialup.cpp
index 87b972f23e..173bc0639a 100644
--- a/Externals/wxWidgets/src/msw/dialup.cpp
+++ b/Externals/wxWidgets/src/msw/dialup.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     07.07.99
-// RCS-ID:      $Id: dialup.cpp 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: dialup.cpp 52495 2008-03-14 14:18:24Z JS $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -711,7 +711,13 @@ size_t wxDialUpManagerMSW::GetISPNames(wxArrayString& names) const
         if ( dwRet == ERROR_BUFFER_TOO_SMALL )
         {
             // reallocate the buffer
-            rasEntries = (RASENTRYNAME *)realloc(rasEntries, size);
+            void *n  = realloc(rasEntries, size);
+            if (n == NULL)
+            {
+                free(rasEntries);
+                return 0;
+            }
+            rasEntries = (RASENTRYNAME *)n;
         }
         else if ( dwRet != 0 )
         {
diff --git a/Externals/wxWidgets/src/msw/gsocket.cpp b/Externals/wxWidgets/src/msw/gsocket.cpp
index a7f4b25103..8e966798a4 100644
--- a/Externals/wxWidgets/src/msw/gsocket.cpp
+++ b/Externals/wxWidgets/src/msw/gsocket.cpp
@@ -6,7 +6,7 @@
  * Author:      Guillermo Rodriguez Garcia 
  * Purpose:     GSocket main MSW file
  * Licence:     The wxWindows licence
- * CVSID:       $Id: gsocket.cpp 44864 2007-03-17 02:15:31Z VZ $
+ * CVSID:       $Id: gsocket.cpp 52492 2008-03-14 14:17:14Z JS $
  * -------------------------------------------------------------------------
  */
 
@@ -870,9 +870,9 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
       result |= GSOCK_INPUT_FLAG;
 
       if (m_server && m_stream)
-      { 
-        /* This is a TCP server socket that detected a connection. 
-           While the INPUT_FLAG is also set, it doesn't matter on 
+      {
+        /* This is a TCP server socket that detected a connection.
+           While the INPUT_FLAG is also set, it doesn't matter on
            this kind of  sockets, as we can only Accept() from them. */
         result |= GSOCK_CONNECTION_FLAG;
         m_detected |= GSOCK_CONNECTION_FLAG;
@@ -1451,7 +1451,7 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
   se = getservbyname(port, protocol);
   if (!se)
   {
-    if (isdigit(port[0]))
+    if (isdigit((unsigned char) port[0]))
     {
       int port_int;
 
diff --git a/Externals/wxWidgets/src/msw/gsockmsw.cpp b/Externals/wxWidgets/src/msw/gsockmsw.cpp
index 44548ebd2b..3e04645103 100644
--- a/Externals/wxWidgets/src/msw/gsockmsw.cpp
+++ b/Externals/wxWidgets/src/msw/gsockmsw.cpp
@@ -5,7 +5,7 @@
  * Licence:     wxWindows Licence
  * Author:      Guillermo Rodriguez Garcia 
  * Purpose:     GSocket GUI-specific MSW code
- * CVSID:       $Id: gsockmsw.cpp 39404 2006-05-28 23:38:11Z VZ $
+ * CVSID:       $Id: gsockmsw.cpp 50893 2007-12-22 14:05:25Z VZ $
  * -------------------------------------------------------------------------
  */
 
@@ -336,7 +336,19 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
   /* Remove the socket from the list */
   EnterCriticalSection(&critical);
   if ( socket->IsOk() )
-      socketList[(socket->m_msgnumber - WM_USER)] = NULL;
+  {
+      const int msgnum = socket->m_msgnumber;
+
+      // we need to remove any pending messages for this socket to avoid having
+      // them sent to a new socket which could reuse the same message number as
+      // soon as we destroy this one
+      MSG msg;
+      while ( ::PeekMessage(&msg, hWin, msgnum, msgnum, PM_REMOVE) )
+          ;
+
+      socketList[msgnum - WM_USER] = NULL;
+  }
+
   LeaveCriticalSection(&critical);
 }
 
diff --git a/Externals/wxWidgets/src/msw/listctrl.cpp b/Externals/wxWidgets/src/msw/listctrl.cpp
index 76dd759343..e094244a6a 100644
--- a/Externals/wxWidgets/src/msw/listctrl.cpp
+++ b/Externals/wxWidgets/src/msw/listctrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Agron Selimaj
 // Created:     04/01/98
-// RCS-ID:      $Id: listctrl.cpp 46383 2007-06-09 10:58:38Z VZ $
+// RCS-ID:      $Id: listctrl.cpp 53727 2008-05-23 18:56:24Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -279,7 +279,7 @@ wxEND_HANDLERS_TABLE()
 wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
 
 /*
- TODO : Expose more information of a list's layout etc. via appropriate objects (à la NotebookPageInfo)
+ TODO : Expose more information of a list's layout etc. via appropriate objects (a la NotebookPageInfo)
 */
 #else
 IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
@@ -338,15 +338,21 @@ bool wxListCtrl::Create(wxWindow *parent,
     // GetTextColour will always return black
     SetTextColour(GetDefaultAttributes().colFg);
 
+    if ( InReportView() )
+        MSWSetExListStyles();
+
+    return true;
+}
+
+void wxListCtrl::MSWSetExListStyles()
+{
     // for comctl32.dll v 4.70+ we want to have some non default extended
     // styles because it's prettier (and also because wxGTK does it like this)
-    if ( InReportView() && wxApp::GetComCtl32Version() >= 470 )
+    if ( wxApp::GetComCtl32Version() >= 470 )
     {
         ::SendMessage(GetHwnd(), LVM_SETEXTENDEDLISTVIEWSTYLE,
                       0, LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES);
     }
-
-    return true;
 }
 
 WXDWORD wxListCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
@@ -445,6 +451,11 @@ void wxListCtrl::UpdateStyle()
         if ( dwStyleOld != dwStyleNew )
         {
             ::SetWindowLong(GetHwnd(), GWL_STYLE, dwStyleNew);
+
+            // if we switched to the report view, set the extended styles for
+            // it too
+            if ( !(dwStyleOld & LVS_REPORT) && (dwStyleNew & LVS_REPORT) )
+                MSWSetExListStyles();
         }
     }
 }
@@ -517,7 +528,7 @@ void wxListCtrl::SetWindowStyleFlag(long flag)
 {
     if ( flag != m_windowStyle )
     {
-        m_windowStyle = flag;
+        wxControl::SetWindowStyleFlag(flag);
 
         UpdateStyle();
 
@@ -1856,28 +1867,40 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                     // where did the click occur?
                     POINT ptClick;
 #if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
-                  if(nmhdr->code == GN_CONTEXTMENU) {
-                      ptClick = ((NMRGINFO*)nmhdr)->ptAction;
-                  } else
+                    if ( nmhdr->code == GN_CONTEXTMENU )
+                    {
+                        ptClick = ((NMRGINFO*)nmhdr)->ptAction;
+                    }
+                    else
 #endif //__WXWINCE__
                     if ( !::GetCursorPos(&ptClick) )
                     {
                         wxLogLastError(_T("GetCursorPos"));
                     }
 
-                    if ( !::ScreenToClient(GetHwnd(), &ptClick) )
+                    // we need to use listctrl coordinates for the event point
+                    // but for comparison with Header_GetItemRect() result
+                    // below we need to use header window coordinates
+                    POINT ptClickList = ptClick;
+                    if ( ::ScreenToClient(GetHwnd(), &ptClickList) )
+                    {
+                        event.m_pointDrag.x = ptClickList.x;
+                        event.m_pointDrag.y = ptClickList.y;
+                    }
+                    else
+                    {
+                        wxLogLastError(_T("ScreenToClient(listctrl)"));
+                    }
+
+                    if ( !::ScreenToClient(hwndHdr, &ptClick) )
                     {
                         wxLogLastError(_T("ScreenToClient(listctrl header)"));
                     }
 
-                    event.m_pointDrag.x = ptClick.x;
-                    event.m_pointDrag.y = ptClick.y;
-
-                    int colCount = Header_GetItemCount(hwndHdr);
-
-                    RECT rect;
+                    const int colCount = Header_GetItemCount(hwndHdr);
                     for ( int col = 0; col < colCount; col++ )
                     {
+                        RECT rect;
                         if ( Header_GetItemRect(hwndHdr, col, &rect) )
                         {
                             if ( ::PtInRect(&rect, ptClick) )
@@ -2663,52 +2686,53 @@ static WXLPARAM HandleItemPrepaint(wxListCtrl *listctrl,
 
 WXLPARAM wxListCtrl::OnCustomDraw(WXLPARAM lParam)
 {
-    LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)lParam;
-    NMCUSTOMDRAW& nmcd = pLVCD->nmcd;
-    switch ( nmcd.dwDrawStage )
-    {
-        case CDDS_PREPAINT:
-            // if we've got any items with non standard attributes,
-            // notify us before painting each item
-            //
-            // for virtual controls, always suppose that we have attributes as
-            // there is no way to check for this
-            if ( IsVirtual() || m_hasAnyAttr )
-                return CDRF_NOTIFYITEMDRAW;
-            break;
+	LPNMLVCUSTOMDRAW pLVCD = (LPNMLVCUSTOMDRAW)lParam;
+	NMCUSTOMDRAW& nmcd = pLVCD->nmcd;
+	switch ( nmcd.dwDrawStage )
+	{
+	case CDDS_PREPAINT:
+		// if we've got any items with non standard attributes,
+		// notify us before painting each item
+		//
+		// for virtual controls, always suppose that we have attributes as
+		// there is no way to check for this
+		if ( IsVirtual() || m_hasAnyAttr )
+			return CDRF_NOTIFYITEMDRAW;
+		break;
 
-        case CDDS_ITEMPREPAINT:
-			{
-				const int item = nmcd.dwItemSpec;
+	case CDDS_ITEMPREPAINT:
+		{
+			const int item = nmcd.dwItemSpec;
 
-				// we get this message with item == 0 for an empty control, we
-				// must ignore it as calling OnGetItemAttr() would be wrong
-				if ( item < 0 || item >= GetItemCount() )
-					break;
+			// we get this message with item == 0 for an empty control, we
+			// must ignore it as calling OnGetItemAttr() would be wrong
+			if ( item < 0 || item >= GetItemCount() )
+				break;
 
-				return HandleItemPrepaint(this, pLVCD, DoGetItemAttr(item)) | CDRF_NOTIFYSUBITEMDRAW;
-			}
+			return HandleItemPrepaint(this, pLVCD, DoGetItemAttr(item)) | CDRF_NOTIFYSUBITEMDRAW;
+		}
 
-		case (CDDS_ITEMPREPAINT | CDDS_SUBITEM):
-			return CDRF_NOTIFYPOSTPAINT;
+	case (CDDS_ITEMPREPAINT | CDDS_SUBITEM):
+		return CDRF_NOTIFYPOSTPAINT;
 
-		case (CDDS_ITEMPOSTPAINT | CDDS_SUBITEM):
-			{
-				wxPaintDC PaintDC;
-				PaintDC.SetHDC(nmcd.hdc);
-				bool result = MSWDrawSubItem(PaintDC, nmcd.dwItemSpec, pLVCD->iSubItem);
-				PaintDC.SetHDC(NULL);
+	case (CDDS_ITEMPOSTPAINT | CDDS_SUBITEM):
+		{
+			wxPaintDC PaintDC;
+			PaintDC.SetHDC(nmcd.hdc);
+			bool result = MSWDrawSubItem(PaintDC, nmcd.dwItemSpec, pLVCD->iSubItem);
+			PaintDC.SetHDC(NULL);
 
-				if (result)
-					return CDRF_SKIPDEFAULT;
+			if (result)
+				return CDRF_SKIPDEFAULT;
 
-				return CDRF_DODEFAULT;
-			}
-    }
+			return CDRF_DODEFAULT;
+		}
+	}
 
-    return CDRF_DODEFAULT;
+	return CDRF_DODEFAULT;
 }
 
+
 #endif // NM_CUSTOMDRAW supported
 
 // Necessary for drawing hrules and vrules, if specified
diff --git a/Externals/wxWidgets/src/msw/menuitem.cpp b/Externals/wxWidgets/src/msw/menuitem.cpp
index 8c6003e46d..9e60e7d943 100644
--- a/Externals/wxWidgets/src/msw/menuitem.cpp
+++ b/Externals/wxWidgets/src/msw/menuitem.cpp
@@ -440,15 +440,7 @@ wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu,
                                 wxItemKind kind,
                                 wxMenu *subMenu)
 {
-    wxMenuItem* pItem = new wxMenuItem(parentMenu, id, name, help, kind, subMenu);
-
-#if wxUSE_OWNER_DRAWN
-
-    pItem->SetOwnerDrawn(true);
-
-#endif
-
-    return pItem;
+    return new wxMenuItem(parentMenu, id, name, help, kind, subMenu);
 }
 
 #endif // wxUSE_MENUS
diff --git a/Externals/wxWidgets/src/msw/mimetype.cpp b/Externals/wxWidgets/src/msw/mimetype.cpp
index 6aa88df544..a173daa99d 100644
--- a/Externals/wxWidgets/src/msw/mimetype.cpp
+++ b/Externals/wxWidgets/src/msw/mimetype.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     23.09.98
-// RCS-ID:      $Id: mimetype.cpp 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: mimetype.cpp 52153 2008-02-27 18:07:23Z JS $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence (part of wxExtra library)
 /////////////////////////////////////////////////////////////////////////////
@@ -199,16 +199,47 @@ bool wxFileTypeImpl::EnsureExtKeyExists()
 // get the command to use
 // ----------------------------------------------------------------------------
 
+static wxString wxFileTypeImplGetCurVer(const wxString& progId)
+{
+    wxRegKey key(wxRegKey::HKCR, progId + wxT("\\CurVer"));
+    if (key.Exists())
+    {
+        wxString value;
+        if (key.QueryValue(wxEmptyString, value))
+            return value;
+    }
+    return progId;
+}
+
 wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const
 {
     // suppress possible error messages
     wxLogNull nolog;
     wxString strKey;
 
-    if ( wxRegKey(wxRegKey::HKCR, m_ext + _T("\\shell")).Exists() )
+    {
+        wxRegKey explorerKey(wxRegKey::HKCU, wxT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\") + m_ext);
+        if (explorerKey.Exists())
+        {
+            if (explorerKey.Open(wxRegKey::Read))
+            {
+                if (explorerKey.QueryValue(wxT("Progid"), strKey))
+                {
+                    strKey = wxFileTypeImplGetCurVer(strKey);
+                }
+            }
+        }
+    }
+
+    if (!strKey && wxRegKey(wxRegKey::HKCR, m_ext + _T("\\shell")).Exists())
         strKey = m_ext;
-    if ( wxRegKey(wxRegKey::HKCR, m_strFileType + _T("\\shell")).Exists() )
-        strKey = m_strFileType;
+
+    if ( !strKey && !m_strFileType.empty())
+    {
+        wxString fileType = wxFileTypeImplGetCurVer(m_strFileType);
+        if (wxRegKey(wxRegKey::HKCR, fileType + _T("\\shell")).Exists())
+            strKey = fileType;
+    }
 
     if ( !strKey )
     {
diff --git a/Externals/wxWidgets/src/msw/msgdlg.cpp b/Externals/wxWidgets/src/msw/msgdlg.cpp
index dd0c51659e..901a9ed47e 100644
--- a/Externals/wxWidgets/src/msw/msgdlg.cpp
+++ b/Externals/wxWidgets/src/msw/msgdlg.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: msgdlg.cpp 44062 2006-12-25 14:39:11Z VZ $
+// RCS-ID:      $Id: msgdlg.cpp 50855 2007-12-20 10:51:33Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -93,6 +93,14 @@ int wxMessageDialog::ShowModal()
         msStyle |= MB_ICONINFORMATION;
     else if (wxStyle & wxICON_QUESTION)
         msStyle |= MB_ICONQUESTION;
+    else
+    {
+        int majorVersion, minorVersion;
+        wxGetOsVersion(& majorVersion, & minorVersion);
+
+        if ( majorVersion >= 6 )
+            msStyle |= MB_ICONINFORMATION;
+    }
 
     if ( wxStyle & wxSTAY_ON_TOP )
         msStyle |= MB_TOPMOST;
diff --git a/Externals/wxWidgets/src/msw/notebook.cpp b/Externals/wxWidgets/src/msw/notebook.cpp
index 53071808a5..b7db4b8315 100644
--- a/Externals/wxWidgets/src/msw/notebook.cpp
+++ b/Externals/wxWidgets/src/msw/notebook.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     11.06.98
-// RCS-ID:      $Id: notebook.cpp 46270 2007-06-02 13:22:20Z VZ $
+// RCS-ID:      $Id: notebook.cpp 50855 2007-12-20 10:51:33Z JS $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -175,7 +175,7 @@ wxBEGIN_FLAGS( wxNotebookStyle )
 
 wxEND_FLAGS( wxNotebookStyle )
 
-IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxControl,"wx/notebook.h")
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxBookCtrlBase,"wx/notebook.h")
 IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject , "wx/notebook.h" )
 
 wxCOLLECTION_TYPE_INFO( wxNotebookPageInfo * , wxNotebookPageInfoList ) ;
@@ -212,7 +212,7 @@ wxEND_HANDLERS_TABLE()
 wxCONSTRUCTOR_4( wxNotebookPageInfo , wxNotebookPage* , Page , wxString , Text , bool , Selected , int , ImageId )
 
 #else
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase)
 IMPLEMENT_DYNAMIC_CLASS(wxNotebookPageInfo, wxObject )
 #endif
 IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
@@ -383,7 +383,7 @@ bool wxNotebook::Create(wxWindow *parent,
             wxUxThemeEngine::GetIfActive()->SetWindowTheme(GetHwnd(), L"", L"");
 
             // correct the background color for the new non-themed control
-            SetBackgroundColour(GetThemeBackgroundColour()); 
+            SetBackgroundColour(GetThemeBackgroundColour());
         }
     }
 #endif // wxUSE_UXTHEME
diff --git a/Externals/wxWidgets/src/msw/ole/access.cpp b/Externals/wxWidgets/src/msw/ole/access.cpp
index 29cf2dd22b..b2f66b7a4f 100644
--- a/Externals/wxWidgets/src/msw/ole/access.cpp
+++ b/Externals/wxWidgets/src/msw/ole/access.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2003-02-12
-// RCS-ID:      $Id: access.cpp 43019 2006-11-04 11:14:57Z VZ $
+// RCS-ID:      $Id: access.cpp 51833 2008-02-16 11:15:07Z JS $
 // Copyright:   (c) 2003 Julian Smart
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,6 @@
 
 #include 
 #include 
-#include 
 
 #include "wx/msw/ole/oleutils.h"
 
diff --git a/Externals/wxWidgets/src/msw/ole/automtn.cpp b/Externals/wxWidgets/src/msw/ole/automtn.cpp
index 745ebb1e32..e22cc17324 100644
--- a/Externals/wxWidgets/src/msw/ole/automtn.cpp
+++ b/Externals/wxWidgets/src/msw/ole/automtn.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     11/6/98
-// RCS-ID:      $Id: automtn.cpp 44961 2007-03-19 20:00:59Z VZ $
+// RCS-ID:      $Id: automtn.cpp 53817 2008-05-29 13:35:52Z VZ $
 // Copyright:   (c) 1998, Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -728,7 +728,8 @@ WXDLLEXPORT bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant&
             variant = oleVariant.dblVal;
             break;
         }
-    case VT_ARRAY:
+    case VT_VARIANT:
+    // case VT_ARRAY: // This is masked out by VT_TYPEMASK
         {
             variant.ClearList();
 
@@ -861,6 +862,7 @@ static void ReleaseVariant(VARIANTARG *pvarg)
             case VT_R8:
             case VT_ERROR:        // to avoid erroring on an error return from Excel
             case VT_EMPTY:
+            case VT_DATE:
                 // no work for these types
                 break;
 
diff --git a/Externals/wxWidgets/src/msw/ole/oleutils.cpp b/Externals/wxWidgets/src/msw/ole/oleutils.cpp
index f633cafd29..7a2e21c3ae 100644
--- a/Externals/wxWidgets/src/msw/ole/oleutils.cpp
+++ b/Externals/wxWidgets/src/msw/ole/oleutils.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     19.02.98
-// RCS-ID:      $Id: oleutils.cpp 50027 2007-11-17 15:16:33Z VZ $
+// RCS-ID:      $Id: oleutils.cpp 51557 2008-02-05 07:24:59Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -89,15 +89,21 @@ WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
     if ( !bStr )
         return wxString();
 
+    const int len = SysStringLen(bStr);
+
 #if wxUSE_UNICODE
-    wxString str(bStr);
+    wxString str(bStr, len);
 #else
-    int len = SysStringLen(bStr) + 1;
-    char    *buf = new char[len];
-    (void)wcstombs( buf, bStr, len);
-    wxString str(buf);
-    delete[] buf;
+    wxString str;
+    if ( !::WideCharToMultiByte(CP_ACP, 0 /* no flags */,
+                                bStr, len /* not necessary NUL-terminated */,
+                                wxStringBuffer(str, len + 1), len + 1,
+                                NULL, NULL /* no default char */) )
+    {
+        str.clear();
+    }
 #endif
+
     return str;
 }
 
diff --git a/Externals/wxWidgets/src/msw/ownerdrw.cpp b/Externals/wxWidgets/src/msw/ownerdrw.cpp
index 0be560f95c..56fd71c300 100644
--- a/Externals/wxWidgets/src/msw/ownerdrw.cpp
+++ b/Externals/wxWidgets/src/msw/ownerdrw.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     13.11.97
-// RCS-ID:      $Id: ownerdrw.cpp 44228 2007-01-15 10:54:40Z VZ $
+// RCS-ID:      $Id: ownerdrw.cpp 51379 2008-01-26 01:38:06Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -50,13 +50,25 @@ public:
 #if defined(__WXMSW__) && defined(__WIN32__) && defined(SM_CXMENUCHECK)
         NONCLIENTMETRICS nm;
         nm.cbSize = sizeof(NONCLIENTMETRICS);
-        SystemParametersInfo(SPI_GETNONCLIENTMETRICS,0,&nm,0);
+        if ( !::SystemParametersInfo(SPI_GETNONCLIENTMETRICS,0,&nm,0) )
+        {
+#if WINVER >= 0x0600
+            // a new field has been added to NONCLIENTMETRICS under Vista, so
+            // the call to SystemParametersInfo() fails if we use the struct
+            // size incorporating this new value on an older system -- retry
+            // without it
+            nm.cbSize -= sizeof(int);
+            if ( !::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &nm, 0) )
+#endif // WINVER >= 0x0600
+            {
+                // maybe we should initialize the struct with some defaults?
+                wxLogLastError(_T("SystemParametersInfo(SPI_GETNONCLIENTMETRICS)"));
+            }
+        }
 
         ms_systemMenuButtonWidth = nm.iMenuHeight;
         ms_systemMenuHeight = nm.iMenuHeight;
 
-        ms_systemMenuHeight = 25;
-
         // create menu font
         wxNativeFontInfo info;
         memcpy(&info.lf, &nm.lfMenuFont, sizeof(LOGFONT));
@@ -235,14 +247,14 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
     }
 
     // add a 4-pixel separator, otherwise menus look cluttered
-    *pwidth += 8;
+    *pwidth += 4;
 
     // make sure that this item is at least as tall as the system menu height
     if ( *pheight < m_nMinHeight )
-        *pheight = m_nMinHeight;
+      *pheight = m_nMinHeight;
 
     // remember height for use in OnDrawItem
-        m_nHeight = *pheight;
+    m_nHeight = *pheight;
 
     return true;
 }
diff --git a/Externals/wxWidgets/src/msw/radiobox.cpp b/Externals/wxWidgets/src/msw/radiobox.cpp
index 7924795de3..85e5ef1b56 100644
--- a/Externals/wxWidgets/src/msw/radiobox.cpp
+++ b/Externals/wxWidgets/src/msw/radiobox.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: radiobox.cpp 47125 2007-07-04 21:24:41Z VZ $
+// RCS-ID:      $Id: radiobox.cpp 51905 2008-02-19 02:43:29Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -443,6 +443,25 @@ void wxRadioBox::DoSetItemToolTip(unsigned int item, wxToolTip *tooltip)
 
 #endif // wxUSE_TOOLTIPS
 
+bool wxRadioBox::Reparent(wxWindowBase *newParent)
+{
+    if ( !wxStaticBox::Reparent(newParent) )
+    {
+        return false;
+    }
+
+    HWND hwndParent = GetHwndOf(GetParent());
+    for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ )
+    {
+        ::SetParent((*m_radioButtons)[item], hwndParent);
+    }
+#ifdef __WXWINCE__
+    // put static box under the buttons in the Z-order
+    SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+#endif
+    return true;
+}
+
 WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox, wxStaticBox, m_radioButtons)
 
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/msw/renderer.cpp b/Externals/wxWidgets/src/msw/renderer.cpp
index 14fce8ee40..172b59c9d2 100644
--- a/Externals/wxWidgets/src/msw/renderer.cpp
+++ b/Externals/wxWidgets/src/msw/renderer.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.07.2003
-// RCS-ID:      $Id: renderer.cpp 43726 2006-11-30 23:44:55Z RD $
+// RCS-ID:      $Id: renderer.cpp 53524 2008-05-10 00:05:20Z RD $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -36,11 +36,29 @@
 #include "wx/msw/private.h"
 #include "wx/msw/uxtheme.h"
 
+#if wxUSE_GRAPHICS_CONTEXT
+// TODO remove this dependency (gdiplus needs the macros)
+#ifndef max
+#define max(a,b)            (((a) > (b)) ? (a) : (b))
+#endif
+
+#ifndef min
+#define min(a,b)            (((a) < (b)) ? (a) : (b))
+#endif
+
+#include "gdiplus.h"
+using namespace Gdiplus;
+#endif
+
 // tmschema.h is in Win32 Platform SDK and might not be available with earlier
 // compilers
 #ifndef CP_DROPDOWNBUTTON
     #define BP_PUSHBUTTON      1
+    #define BP_RADIOBUTTON     2
     #define BP_CHECKBOX        3
+    #define RBS_UNCHECKEDNORMAL 1
+    #define RBS_CHECKEDNORMAL   (RBS_UNCHECKEDNORMAL + 4)
+    #define RBS_MIXEDNORMAL     (RBS_CHECKEDNORMAL + 4)
     #define CBS_UNCHECKEDNORMAL 1
     #define CBS_CHECKEDNORMAL   (CBS_UNCHECKEDNORMAL + 4)
     #define CBS_MIXEDNORMAL     (CBS_CHECKEDNORMAL + 4)
@@ -74,12 +92,64 @@
     #define HP_HEADERSORTARROW  4
     #define HSAS_SORTEDUP       1
     #define HSAS_SORTEDDOWN     2
+
+    #define EP_EDITTEXT         1
+    #define ETS_NORMAL          1
+    #define ETS_HOT             2
+    #define ETS_SELECTED        3
+    #define ETS_DISABLED        4
+    #define ETS_FOCUSED         5
+    #define ETS_READONLY        6
+    #define ETS_ASSIST          7
+    #define TMT_FILLCOLOR       3802
+    #define TMT_TEXTCOLOR       3803
+    #define TMT_BORDERCOLOR     3801
+    #define TMT_EDGEFILLCOLOR   3808
 #endif
 
 #if defined(__WXWINCE__) && !defined(DFCS_FLAT)
     #define DFCS_FLAT 0
 #endif
 
+
+// ----------------------------------------------------------------------------
+// If the DC is a wxGCDC then pull out the HDC from the GraphicsContext when
+// it is needed, and handle the Release when done.
+
+class GraphicsHDC
+{
+public:
+    GraphicsHDC(wxDC* dc)
+    {
+#if wxUSE_GRAPHICS_CONTEXT
+        m_graphics = NULL;
+        wxGCDC* gcdc = wxDynamicCast(dc, wxGCDC);
+        if (gcdc) {
+            m_graphics = (Graphics*)gcdc->GetGraphicsContext()->GetNativeContext();
+            m_hdc = m_graphics->GetHDC();
+        }
+        else
+#endif
+            m_hdc = GetHdcOf(*dc);
+    }
+
+    ~GraphicsHDC()
+    {
+#if wxUSE_GRAPHICS_CONTEXT
+        if (m_graphics)
+            m_graphics->ReleaseHDC(m_hdc);
+#endif
+    }
+    
+    operator HDC() const { return m_hdc; }
+
+private:
+    HDC         m_hdc;
+#if wxUSE_GRAPHICS_CONTEXT
+    Graphics*   m_graphics;
+#endif
+};
+
 // ----------------------------------------------------------------------------
 // wxRendererMSW: wxRendererNative implementation for "old" Win32 systems
 // ----------------------------------------------------------------------------
@@ -203,7 +273,7 @@ wxRendererMSW::DrawComboBoxDropButton(wxWindow * WXUNUSED(win),
     if ( flags & wxCONTROL_PRESSED )
         style |= DFCS_PUSHED | DFCS_FLAT;
 
-    ::DrawFrameControl(GetHdcOf(dc), &r, DFC_SCROLL, style);
+    ::DrawFrameControl(GraphicsHDC(&dc), &r, DFC_SCROLL, style);
 }
 
 void
@@ -232,7 +302,7 @@ wxRendererMSW::DrawPushButton(wxWindow * WXUNUSED(win),
     RECT rc;
     wxCopyRectToRECT(rect, rc);
 
-    ::DrawFrameControl(GetHdcOf(dc), &rc, DFC_BUTTON, style);
+    ::DrawFrameControl(GraphicsHDC(&dc), &rc, DFC_BUTTON, style);
 }
 
 // ============================================================================
@@ -281,7 +351,7 @@ wxRendererXP::DrawComboBoxDropButton(wxWindow * win,
     wxUxThemeEngine::Get()->DrawThemeBackground
                             (
                                 hTheme,
-                                GetHdcOf(dc),
+                                GraphicsHDC(&dc),
                                 CP_DROPDOWNBUTTON,
                                 state,
                                 &r,
@@ -317,7 +387,7 @@ wxRendererXP::DrawHeaderButton(wxWindow *win,
     wxUxThemeEngine::Get()->DrawThemeBackground
                             (
                                 hTheme,
-                                GetHdcOf(dc),
+                                GraphicsHDC(&dc),
                                 HP_HEADERITEM,
                                 state,
                                 &r,
@@ -378,7 +448,7 @@ wxRendererXP::DrawTreeItemButton(wxWindow *win,
     wxUxThemeEngine::Get()->DrawThemeBackground
                             (
                                 hTheme,
-                                GetHdcOf(dc),
+                                GraphicsHDC(&dc),
                                 TVP_GLYPH,
                                 state,
                                 &r,
@@ -421,7 +491,7 @@ wxRendererXP::DrawCheckBox(wxWindow *win,
     wxUxThemeEngine::Get()->DrawThemeBackground
                             (
                                 hTheme,
-                                GetHdcOf(dc),
+                                GraphicsHDC(&dc),
                                 BP_CHECKBOX,
                                 state,
                                 &r,
@@ -429,6 +499,8 @@ wxRendererXP::DrawCheckBox(wxWindow *win,
                             );
 }
 
+
+
 void
 wxRendererXP::DrawPushButton(wxWindow * win,
                              wxDC& dc,
@@ -460,13 +532,12 @@ wxRendererXP::DrawPushButton(wxWindow * win,
     wxUxThemeEngine::Get()->DrawThemeBackground
                             (
                                 hTheme,
-                                GetHdcOf(dc),
+                                GraphicsHDC(&dc),
                                 BP_PUSHBUTTON,
                                 state,
                                 &r,
                                 NULL
                             );
-
 }
 
 // ----------------------------------------------------------------------------
@@ -524,4 +595,115 @@ wxRendererXP::DrawSplitterSash(wxWindow *win,
     m_rendererNative.DrawSplitterSash(win, dc, size, position, orient, flags);
 }
 
+// ----------------------------------------------------------------------------
+// Other renderer functions to be merged in to wxRenderer class in 2.9, but
+// they are standalone functions here to protect the ABI.
+// ----------------------------------------------------------------------------
+
+// Uses the theme to draw the border and fill for something like a wxTextCtrl
+void wxRenderer_DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
+{
+    wxColour fill;
+    wxColour bdr;
+    COLORREF cref;
+    
+#if wxUSE_UXTHEME
+    wxUxThemeHandle hTheme(win, L"EDIT");
+    if (hTheme)
+    {
+        wxUxThemeEngine::Get()->GetThemeColor(hTheme, EP_EDITTEXT,
+                                              ETS_NORMAL, TMT_FILLCOLOR, &cref);
+        fill = wxRGBToColour(cref);
+
+        int etsState;
+        if ( flags & wxCONTROL_DISABLED )
+            etsState = ETS_DISABLED;
+        else
+            etsState = ETS_NORMAL;
+        
+        wxUxThemeEngine::Get()->GetThemeColor(hTheme, EP_EDITTEXT,
+                                              etsState, TMT_BORDERCOLOR, &cref);
+        bdr = wxRGBToColour(cref);        
+    }
+    else
+#endif
+    {
+        fill = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+        bdr = *wxBLACK;
+    }
+    
+    dc.SetPen( bdr );
+    dc.SetBrush( fill );
+    dc.DrawRectangle(rect);
+}
+
+
+// Draw the equivallent of a wxComboBox
+void wxRenderer_DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
+{
+    // Draw the main part of the control same as TextCtrl
+    wxRenderer_DrawTextCtrl(win, dc, rect, flags);    
+    
+    // Draw the button inside the border, on the right side
+    wxRect br(rect);
+    br.height -= 2;
+    br.x += br.width - br.height - 1;
+    br.width = br.height;
+    br.y += 1;
+
+    wxRendererNative::Get().DrawComboBoxDropButton(win, dc, br, flags);
+}
+
+
+void wxRenderer_DrawChoice(wxWindow* win, wxDC& dc,
+                           const wxRect& rect, int flags)
+{
+    wxRenderer_DrawComboBox(win, dc, rect, flags);
+}
+
+    
+// Draw a themed radio button
+void wxRenderer_DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
+{
+#if wxUSE_UXTHEME
+    wxUxThemeHandle hTheme(win, L"BUTTON");
+    if ( !hTheme )
+#endif
+    {
+        // ??? m_rendererNative.DrawRadioButton(win, dc, rect, flags);
+        return;
+    }
+
+#if wxUSE_UXTHEME
+    RECT r;
+    wxCopyRectToRECT(rect, r);
+
+    int state;
+    if ( flags & wxCONTROL_CHECKED )
+        state = RBS_CHECKEDNORMAL;
+    else if ( flags & wxCONTROL_UNDETERMINED )
+        state = RBS_MIXEDNORMAL;
+    else
+        state = RBS_UNCHECKEDNORMAL;
+
+    // RBS_XXX is followed by RBX_XXXGOT, then RBS_XXXPRESSED and DISABLED
+    if ( flags & wxCONTROL_CURRENT )
+        state += 1;
+    else if ( flags & wxCONTROL_PRESSED )
+        state += 2;
+    else if ( flags & wxCONTROL_DISABLED )
+        state += 3;
+
+    wxUxThemeEngine::Get()->DrawThemeBackground
+                            (
+                                hTheme,
+                                GraphicsHDC(&dc),
+                                BP_RADIOBUTTON,
+                                state,
+                                &r,
+                                NULL
+                            );
+#endif
+}
+
 #endif // wxUSE_UXTHEME
diff --git a/Externals/wxWidgets/src/msw/spinctrl.cpp b/Externals/wxWidgets/src/msw/spinctrl.cpp
index ca0b5e8c1a..5239077d6f 100644
--- a/Externals/wxWidgets/src/msw/spinctrl.cpp
+++ b/Externals/wxWidgets/src/msw/spinctrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     22.07.99
-// RCS-ID:      $Id: spinctrl.cpp 45120 2007-03-29 18:02:11Z VZ $
+// RCS-ID:      $Id: spinctrl.cpp 53397 2008-04-28 11:33:47Z VZ $
 // Copyright:   (c) 1999-2005 Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -147,8 +147,7 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
 {
     wxSpinCtrl *spin = (wxSpinCtrl *)wxGetWindowUserData(hwnd);
 
-    // forward some messages (the key and focus ones only so far) to
-    // the spin ctrl
+    // forward some messages (mostly the key and focus ones) to the spin ctrl
     switch ( message )
     {
         case WM_SETFOCUS:
@@ -163,6 +162,12 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
         case WM_DEADCHAR:
         case WM_KEYUP:
         case WM_KEYDOWN:
+#ifdef WM_HELP
+        // we need to forward WM_HELP too to ensure that the context help
+        // associated with wxSpinCtrl is shown when the text control part of it
+        // is clicked with the "?" cursor
+        case WM_HELP:
+#endif
             spin->MSWWindowProc(message, wParam, lParam);
 
             // The control may have been deleted at this point, so check.
@@ -172,7 +177,7 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
 
         case WM_GETDLGCODE:
             // we want to get WXK_RETURN in order to generate the event for it
-            return DLGC_WANTCHARS;
+            return DLGC_WANTARROWS;
     }
 
     return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),
@@ -525,6 +530,46 @@ bool wxSpinCtrl::Show(bool show)
     return true;
 }
 
+bool wxSpinCtrl::Reparent(wxWindowBase *newParent)
+{
+    // Reparenting both the updown control and its buddy does not seem to work:
+    // they continue to be connected somehow, but visually there is no feedback
+    // on the buddy edit control. To avoid this problem, we reparent the buddy
+    // window normally, but we recreate the updown control and reassign its
+    // buddy.
+
+    if ( !wxWindowBase::Reparent(newParent) )
+        return false;
+
+    newParent->GetChildren().DeleteObject(this);
+
+    // preserve the old values
+    const wxSize size = GetSize();
+    int value = GetValue();
+    const wxRect btnRect = wxRectFromRECT(wxGetWindowRect(GetHwnd()));
+
+    // destroy the old spin button
+    UnsubclassWin();
+    if ( !::DestroyWindow(GetHwnd()) )
+        wxLogLastError(wxT("DestroyWindow"));
+
+    // create and initialize the new one
+    if ( !wxSpinButton::Create(GetParent(), GetId(),
+                               btnRect.GetPosition(), btnRect.GetSize(),
+                               GetWindowStyle(), GetName()) )
+        return false;
+
+    SetValue(value);
+    SetRange(m_min, m_max);
+    SetInitialSize(size);
+
+    // associate it with the buddy control again
+    ::SetParent(GetBuddyHwnd(), GetHwndOf(GetParent()));
+    (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0);
+
+    return true;
+}
+
 bool wxSpinCtrl::Enable(bool enable)
 {
     if ( !wxControl::Enable(enable) )
@@ -636,6 +681,19 @@ void wxSpinCtrl::DoGetSize(int *x, int *y) const
         *y = ctrlrect.bottom - ctrlrect.top;
 }
 
+void wxSpinCtrl::DoGetClientSize(int *x, int *y) const
+{
+    RECT spinrect = wxGetClientRect(GetHwnd());
+    RECT textrect = wxGetClientRect(GetBuddyHwnd());
+    RECT ctrlrect;
+    UnionRect(&ctrlrect,&textrect, &spinrect);
+
+    if ( x )
+        *x = ctrlrect.right - ctrlrect.left;
+    if ( y )
+        *y = ctrlrect.bottom - ctrlrect.top;
+}
+
 void wxSpinCtrl::DoGetPosition(int *x, int *y) const
 {
     // hack: pretend that our HWND is the text control just for a moment
diff --git a/Externals/wxWidgets/src/msw/statbmp.cpp b/Externals/wxWidgets/src/msw/statbmp.cpp
index f9dec65e10..8f1e772479 100644
--- a/Externals/wxWidgets/src/msw/statbmp.cpp
+++ b/Externals/wxWidgets/src/msw/statbmp.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: statbmp.cpp 42816 2006-10-31 08:50:17Z RD $
+// RCS-ID:      $Id: statbmp.cpp 51824 2008-02-16 01:59:21Z SN $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -31,6 +31,7 @@
 #ifndef WX_PRECOMP
     #include "wx/window.h"
     #include "wx/icon.h"
+    #include "wx/dcclient.h"
 #endif
 
 #include "wx/msw/private.h"
@@ -168,6 +169,14 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     // GetBestSize will work properly now, so set the best size if needed
     SetInitialSize(size);
 
+    // Win9x and 2000 don't draw correctly the images with alpha channel so we
+    // need to draw them ourselves and it's easier to just always do it rather
+    // than check if we have an image with alpha or not
+    if ( wxGetWinVersion() <= wxWinVersion_2000 )
+    {
+	Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually));
+    }
+
     return true;
 }
 
@@ -245,6 +254,25 @@ wxSize wxStaticBitmap::DoGetBestSize() const
     return wxSize(16, 16);
 }
 
+void wxStaticBitmap::DoPaintManually(wxPaintEvent& WXUNUSED(event))
+{
+    wxPaintDC dc(this);
+
+    const wxSize size(GetSize());
+    const wxBitmap bmp(GetBitmap());
+
+    // Clear the background
+    dc.SetBrush(GetBackgroundColour());
+    dc.SetPen(*wxTRANSPARENT_PEN);
+    dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
+
+    // Draw the image in the middle
+    dc.DrawBitmap(bmp,
+                  (size.GetWidth() - bmp.GetWidth()) / 2,
+                  (size.GetHeight() - bmp.GetHeight()) / 2,
+                  true /* use mask */);
+}
+
 void wxStaticBitmap::SetImage( const wxGDIImage* image )
 {
     wxGDIImage* convertedImage = ConvertImage( *image );
diff --git a/Externals/wxWidgets/src/msw/statbox.cpp b/Externals/wxWidgets/src/msw/statbox.cpp
index 81595253ee..1cd01ab7fd 100644
--- a/Externals/wxWidgets/src/msw/statbox.cpp
+++ b/Externals/wxWidgets/src/msw/statbox.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: statbox.cpp 45009 2007-03-22 02:31:35Z VZ $
+// RCS-ID:      $Id: statbox.cpp 52851 2008-03-27 13:03:02Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -539,14 +539,16 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event))
     dc.Blit(border, 0, rc.right - border, borderTop,
             &memdc, border, 0);
     // bottom
-    dc.Blit(border, rc.bottom - border, rc.right - border, rc.bottom,
+    dc.Blit(border, rc.bottom - border, rc.right - border, border,
             &memdc, border, rc.bottom - border);
     // left
     dc.Blit(0, 0, border, rc.bottom,
             &memdc, 0, 0);
-    // right
-    dc.Blit(rc.right - border, 0, rc.right, rc.bottom,
-            &memdc, rc.right - border, 0);
+    // right (note that upper and bottom right corners were already part of the
+    // first two blits so we shouldn't overwrite them here to avoi flicker)
+    dc.Blit(rc.right - border, borderTop,
+            border, rc.bottom - borderTop - border,
+            &memdc, rc.right - border, borderTop);
 
 
     // create the region excluding box children
diff --git a/Externals/wxWidgets/src/msw/stdpaths.cpp b/Externals/wxWidgets/src/msw/stdpaths.cpp
index 1db0ec5416..d167ff8418 100644
--- a/Externals/wxWidgets/src/msw/stdpaths.cpp
+++ b/Externals/wxWidgets/src/msw/stdpaths.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     2004-10-19
-// RCS-ID:      $Id: stdpaths.cpp 43340 2006-11-12 12:58:10Z RR $
+// RCS-ID:      $Id: stdpaths.cpp 51807 2008-02-15 13:14:49Z VZ $
 // Copyright:   (c) 2004 Vadim Zeitlin 
 // License:     wxWindows license
 ///////////////////////////////////////////////////////////////////////////////
@@ -50,7 +50,7 @@ typedef HRESULT (WINAPI *SHGetSpecialFolderPath_t)(HWND, LPTSTR, int, BOOL);
 // ----------------------------------------------------------------------------
 
 // used in our wxLogTrace messages
-static const wxChar *TRACE_MASK = _T("stdpaths");
+#define TRACE_MASK _T("stdpaths")
 
 #ifndef CSIDL_APPDATA
     #define CSIDL_APPDATA         0x001a
diff --git a/Externals/wxWidgets/src/msw/taskbar.cpp b/Externals/wxWidgets/src/msw/taskbar.cpp
index fe8e122952..68aa350a53 100644
--- a/Externals/wxWidgets/src/msw/taskbar.cpp
+++ b/Externals/wxWidgets/src/msw/taskbar.cpp
@@ -5,7 +5,7 @@
 // Author:      Julian Smart
 // Modified by: Vaclav Slavik
 // Created:     24/3/98
-// RCS-ID:      $Id: taskbar.cpp 47475 2007-07-14 20:27:01Z VZ $
+// RCS-ID:      $Id: taskbar.cpp 50294 2007-11-28 01:59:59Z VZ $
 // Copyright:   (c)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
@@ -276,6 +276,7 @@ long wxTaskBarIcon::WindowProc(unsigned int msg,
     {
         m_iconAdded = false;
         SetIcon(m_icon, m_strTooltip);
+        return 0;
     }
 
     // this function should only be called for gs_msg(Restart)Taskbar messages
diff --git a/Externals/wxWidgets/src/msw/tbar95.cpp b/Externals/wxWidgets/src/msw/tbar95.cpp
index 427cf16874..8312aef393 100644
--- a/Externals/wxWidgets/src/msw/tbar95.cpp
+++ b/Externals/wxWidgets/src/msw/tbar95.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: tbar95.cpp 48849 2007-09-21 10:33:26Z JS $
+// RCS-ID:      $Id: tbar95.cpp 53487 2008-05-08 13:25:00Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -363,8 +363,25 @@ wxSize wxToolBar::DoGetBestSize() const
             sizeBest.y = t;
         }
     }
-    else
+    else // TB_GETMAXSIZE succeeded
     {
+        // but it could still return an incorrect result due to what appears to
+        // be a bug in old comctl32.dll versions which don't handle controls in
+        // the toolbar correctly, so work around it (see SF patch 1902358)
+        if ( !IsVertical() && wxApp::GetComCtl32Version() < 600 )
+        {
+            // calculate the toolbar width in alternative way
+            RECT rcFirst, rcLast;
+            if ( ::SendMessage(GetHwnd(), TB_GETITEMRECT, 0, (LPARAM)&rcFirst)
+                    && ::SendMessage(GetHwnd(), TB_GETITEMRECT,
+                                     GetToolsCount() - 1, (LPARAM)&rcLast) )
+            {
+                const int widthAlt = rcLast.right - rcFirst.left;
+                if ( widthAlt > size.cx )
+                    size.cx = widthAlt;
+            }
+        }
+
         sizeBest.x = size.cx;
         sizeBest.y = size.cy;
     }
diff --git a/Externals/wxWidgets/src/msw/textctrl.cpp b/Externals/wxWidgets/src/msw/textctrl.cpp
index 6b7e9518e8..a09f4e7270 100644
--- a/Externals/wxWidgets/src/msw/textctrl.cpp
+++ b/Externals/wxWidgets/src/msw/textctrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: textctrl.cpp 48627 2007-09-10 11:16:04Z VZ $
+// RCS-ID:      $Id: textctrl.cpp 52547 2008-03-15 12:33:04Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -238,6 +238,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
 
 BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
     EVT_CHAR(wxTextCtrl::OnChar)
+    EVT_KEY_DOWN(wxTextCtrl::OnKeyDown)
     EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
 
 #if wxUSE_RICHEDIT
@@ -750,10 +751,12 @@ wxString wxTextCtrl::GetRange(long from, long to) const
                    encoding = font.GetEncoding();
                 }
 
+#if wxUSE_INTL
                 if ( encoding == wxFONTENCODING_SYSTEM )
                 {
                     encoding = wxLocale::GetSystemEncoding();
                 }
+#endif // wxUSE_INTL
 
                 if ( encoding == wxFONTENCODING_SYSTEM )
                 {
@@ -940,6 +943,9 @@ wxTextCtrl::StreamIn(const wxString& value,
 
     const size_t len = conv.MB2WC(NULL, value, value.length());
 
+    if (len == wxCONV_FAILED)
+        return false;
+
 #if wxUSE_WCHAR_T
     wxWCharBuffer wchBuf(len);
     wchar_t *wpc = wchBuf.data();
@@ -1032,7 +1038,8 @@ wxTextCtrl::StreamOut(wxFontEncoding encoding, bool selectionOnly) const
         // conversion but what else can we do)
         wxCSConv conv(encoding);
         size_t lenNeeded = conv.WC2MB(NULL, wchBuf, 0);
-        if ( lenNeeded++ )
+
+        if ( lenNeeded != wxCONV_FAILED && lenNeeded++ )
         {
             conv.WC2MB(wxStringBuffer(out, lenNeeded), wchBuf, lenNeeded);
         }
@@ -1962,8 +1969,50 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
     event.Skip();
 }
 
+void wxTextCtrl::OnKeyDown(wxKeyEvent& event)
+{
+    // richedit control doesn't send WM_PASTE, WM_CUT and WM_COPY messages
+    // when Ctrl-V, X or C is pressed and this prevents wxClipboardTextEvent
+    // from working. So we work around it by intercepting these shortcuts
+    // ourselves and emitting clipboard events (which richedit will handle,
+    // so everything works as before, including pasting of rich text):
+    if ( event.GetModifiers() == wxMOD_CONTROL && IsRich() )
+    {
+        switch ( event.GetKeyCode() )
+        {
+            case 'C':
+                Copy();
+                return;
+            case 'X':
+                Cut();
+                return;
+            case 'V':
+                Paste();
+                return;
+            default:
+                break;
+        }
+    }
+
+    // no, we didn't process it
+    event.Skip();
+}
+
 WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
 {
+    // we must handle clipboard events before calling MSWWindowProc, otherwise
+    // the event would be handled twice if there's a handler for it in user
+    // code:
+    switch ( nMsg )
+    {
+        case WM_CUT:
+        case WM_COPY:
+        case WM_PASTE:
+            if ( HandleClipboardEvent(nMsg) )
+                return 0;
+            break;
+    }
+
     WXLRESULT lRc = wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam);
 
     switch ( nMsg )
@@ -2006,13 +2055,6 @@ WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                 }
             }
             break;
-
-        case WM_CUT:
-        case WM_COPY:
-        case WM_PASTE:
-            if ( HandleClipboardEvent(nMsg) )
-                lRc = 0;
-            break;
     }
 
     return lRc;
@@ -2273,13 +2315,15 @@ void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event)
     event.Skip();
 }
 
-void wxTextCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event))
+void wxTextCtrl::OnSetFocus(wxFocusEvent& event)
 {
     // be sure the caret remains invisible if the user had hidden it
     if ( !m_isNativeCaretShown )
     {
         ::HideCaret(GetHwnd());
     }
+
+    event.Skip();
 }
 
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/msw/toplevel.cpp b/Externals/wxWidgets/src/msw/toplevel.cpp
index 9b88483381..17f54b914f 100644
--- a/Externals/wxWidgets/src/msw/toplevel.cpp
+++ b/Externals/wxWidgets/src/msw/toplevel.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     24.09.01
-// RCS-ID:      $Id: toplevel.cpp 48517 2007-09-02 20:24:14Z JS $
+// RCS-ID:      $Id: toplevel.cpp 53701 2008-05-22 16:46:08Z PC $
 // Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
 // License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -521,9 +521,6 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
 {
     bool ret wxDUMMY_INITIALIZE(false);
 
-    // init our fields
-    Init();
-
     wxSize sizeReal = size;
     if ( !sizeReal.IsFullySpecified() )
     {
@@ -674,10 +671,14 @@ bool wxTopLevelWindowMSW::Show(bool show)
         }
         else // just show
         {
-           if ( GetWindowStyle() & wxFRAME_TOOL_WINDOW )
-               nShowCmd = SW_SHOWNA;
-           else
-               nShowCmd = SW_SHOW;
+            // we shouldn't use SW_SHOW which also activates the window for
+            // tool frames (as they shouldn't steal focus from the main window)
+            // nor for the currently disabled windows as they would be enabled
+            // as a side effect
+            if ( HasFlag(wxFRAME_TOOL_WINDOW) || !IsEnabled() )
+                nShowCmd = SW_SHOWNA;
+            else
+                nShowCmd = SW_SHOW;
         }
     }
     else // hide
@@ -910,25 +911,26 @@ void wxTopLevelWindowMSW::SetIcon(const wxIcon& icon)
     SetIcons( wxIconBundle( icon ) );
 }
 
+void wxTopLevelWindowMSW::DoSelectAndSetIcon(const wxIconBundle& icons,
+                                             int smX,
+                                             int smY,
+                                             int i)
+{
+    const wxSize size(::GetSystemMetrics(smX), ::GetSystemMetrics(smY));
+
+    const wxIcon icon = icons.GetIcon(size);
+    if ( icon.Ok() && icon.GetWidth() == size.x && icon.GetHeight() == size.y )
+    {
+        ::SendMessage(GetHwnd(), WM_SETICON, i, (LPARAM)GetHiconOf(icon));
+    }
+}
+
 void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
 {
     wxTopLevelWindowBase::SetIcons(icons);
 
-#if !defined(__WXMICROWIN__)
-    const wxIcon& sml = icons.GetIcon( wxSize( 16, 16 ) );
-    if( sml.Ok() && sml.GetWidth() == 16 && sml.GetHeight() == 16 )
-    {
-        ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_SMALL,
-                       (LPARAM)GetHiconOf(sml) );
-    }
-
-    const wxIcon& big = icons.GetIcon( wxSize( 32, 32 ) );
-    if( big.Ok() && big.GetWidth() == 32 && big.GetHeight() == 32 )
-    {
-        ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_BIG,
-                       (LPARAM)GetHiconOf(big) );
-    }
-#endif // !__WXMICROWIN__
+    DoSelectAndSetIcon(icons, SM_CXSMICON, SM_CYSMICON, ICON_SMALL);
+    DoSelectAndSetIcon(icons, SM_CXICON, SM_CYICON, ICON_BIG);
 }
 
 bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
@@ -1023,7 +1025,7 @@ void wxTopLevelWindowMSW::RequestUserAttention(int flags)
 #if defined(FLASHW_STOP) && defined(VK_XBUTTON1)
     // available in the headers, check if it is supported by the system
     typedef BOOL (WINAPI *FlashWindowEx_t)(FLASHWINFO *pfwi);
-    FlashWindowEx_t s_pfnFlashWindowEx = NULL;
+    static FlashWindowEx_t s_pfnFlashWindowEx = NULL;
     if ( !s_pfnFlashWindowEx )
     {
         wxDynamicLibrary dllUser32(_T("user32.dll"));
@@ -1143,7 +1145,9 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
         if ( m_winLastFocused )
         {
             // let it know that it doesn't have focus any more
-            m_winLastFocused->HandleKillFocus((WXHWND)NULL);
+            // But this will already be done via WM_KILLFOCUS, so we'll get two kill
+            // focus events if we call it explicitly.
+            // m_winLastFocused->HandleKillFocus((WXHWND)NULL);
 
             // and don't remember it if it's a child from some other frame
             if ( wxGetTopLevelParent(m_winLastFocused) != this )
diff --git a/Externals/wxWidgets/src/msw/treectrl.cpp b/Externals/wxWidgets/src/msw/treectrl.cpp
index f112ebd6a1..5f28c84a09 100644
--- a/Externals/wxWidgets/src/msw/treectrl.cpp
+++ b/Externals/wxWidgets/src/msw/treectrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin to be less MSW-specific on 10.10.98
 // Created:     1997
-// RCS-ID:      $Id: treectrl.cpp 49992 2007-11-16 13:12:07Z JS $
+// RCS-ID:      $Id: treectrl.cpp 53084 2008-04-07 20:12:57Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -72,19 +72,38 @@ typedef struct tagNMTVITEMCHANGE
 #endif
 
 
-// this global variable is used on vista systems for preventing unwanted
-// item state changes in the vista tree control.  It is only used in
+// this helper class is used on vista systems for preventing unwanted
+// item state changes in the vista tree control.  It is only effective in
 // multi-select mode on vista systems.
 
-static HTREEITEM gs_unlockItem = NULL;
+// The vista tree control includes some new code that originally broke the
+// multi-selection tree, causing seemingly spurious item selection state changes
+// during Shift or Ctrl-click item selection. (To witness the original broken
+// behavior, simply make IsLocked() below always return false). This problem was
+// solved by using the following class to 'unlock' an item's selection state.
 
 class TreeItemUnlocker
 {
 public:
-    TreeItemUnlocker(HTREEITEM item) { gs_unlockItem = item; }
-    ~TreeItemUnlocker() { gs_unlockItem = NULL; }
+    // unlock a single item
+    TreeItemUnlocker(HTREEITEM item) { ms_unlockedItem = item; }
+
+    // unlock all items, don't use unless absolutely necessary
+    TreeItemUnlocker() { ms_unlockedItem = (HTREEITEM)-1; }
+
+    // lock everything back
+    ~TreeItemUnlocker() { ms_unlockedItem = NULL; }
+
+
+    // check if the item state is currently locked
+    static bool IsLocked(HTREEITEM item)
+        { return ms_unlockedItem != (HTREEITEM)-1 && item != ms_unlockedItem; }
+
+private:
+    static HTREEITEM ms_unlockedItem;
 };
 
+HTREEITEM TreeItemUnlocker::ms_unlockedItem = NULL;
 
 // ----------------------------------------------------------------------------
 // private functions
@@ -1530,12 +1549,27 @@ wxTreeItemId wxTreeCtrl::DoInsertAfter(const wxTreeItemId& parent,
     tvIns.item.lParam = (LPARAM)param;
     tvIns.item.mask = mask;
 
+    // don't use the hack below for the children of hidden root: this results
+    // in a crash inside comctl32.dll when we call TreeView_GetItemRect()
+    const bool firstChild = !IsHiddenRoot(parent) &&
+                                !TreeView_GetChild(GetHwnd(), HITEM(parent));
+
     HTREEITEM id = TreeView_InsertItem(GetHwnd(), &tvIns);
     if ( id == 0 )
     {
         wxLogLastError(wxT("TreeView_InsertItem"));
     }
 
+    // apparently some Windows versions (2000 and XP are reported to do this)
+    // sometimes don't refresh the tree after adding the first child and so we
+    // need this to make the "[+]" appear
+    if ( firstChild )
+    {
+        RECT rect;
+        TreeView_GetItemRect(GetHwnd(), HITEM(parent), &rect, FALSE);
+        ::InvalidateRect(GetHwnd(), &rect, FALSE);
+    }
+
     // associate the application tree item with Win32 tree item handle
     param->SetItem(id);
 
@@ -1623,6 +1657,10 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent,
 
 void wxTreeCtrl::Delete(const wxTreeItemId& item)
 {
+    // unlock tree selections on vista, without this the
+    // tree ctrl will eventually crash after item deletion
+    TreeItemUnlocker unlock_all;
+
     if ( !TreeView_DeleteItem(GetHwnd(), HITEM(item)) )
     {
         wxLogLastError(wxT("TreeView_DeleteItem"));
@@ -1632,6 +1670,9 @@ void wxTreeCtrl::Delete(const wxTreeItemId& item)
 // delete all children (but don't delete the item itself)
 void wxTreeCtrl::DeleteChildren(const wxTreeItemId& item)
 {
+    // unlock tree selections on vista for the duration of this call
+    TreeItemUnlocker unlock_all;
+
     wxTreeItemIdValue cookie;
 
     wxArrayTreeItemIds children;
@@ -1655,6 +1696,9 @@ void wxTreeCtrl::DeleteChildren(const wxTreeItemId& item)
 
 void wxTreeCtrl::DeleteAllItems()
 {
+    // unlock tree selections on vista for the duration of this call
+    TreeItemUnlocker unlock_all;
+
     // delete the "virtual" root item.
     if ( GET_VIRTUAL_ROOT() )
     {
@@ -2692,6 +2736,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
         // that can be used to regulate this incorrect behavior.  The
         // following messages will allow only the unlocked item's selection
         // state to change
+
         case TVN_ITEMCHANGINGA:
         case TVN_ITEMCHANGINGW:
             {
@@ -2700,7 +2745,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 {
                     // get info about the item about to be changed
                     NMTVITEMCHANGE* info = (NMTVITEMCHANGE*)lParam;
-                    if (info->hItem != gs_unlockItem)
+                    if (TreeItemUnlocker::IsLocked(info->hItem))
                     {
                         // item's state is locked, don't allow the change
                         // returning 1 will disallow the change
diff --git a/Externals/wxWidgets/src/msw/utils.cpp b/Externals/wxWidgets/src/msw/utils.cpp
index 725a92d4ef..611a75fe7d 100644
--- a/Externals/wxWidgets/src/msw/utils.cpp
+++ b/Externals/wxWidgets/src/msw/utils.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: utils.cpp 43347 2006-11-12 15:39:12Z JS $
+// RCS-ID:      $Id: utils.cpp 53784 2008-05-27 15:48:23Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1121,24 +1121,37 @@ wxString wxGetOsDescription()
                 break;
 
             case VER_PLATFORM_WIN32_NT:
-                if ( info.dwMajorVersion == 5 )
+                switch ( info.dwMajorVersion )
                 {
-                    switch ( info.dwMinorVersion )
-                    {
-                        case 0:
-                            str.Printf(_("Windows 2000 (build %lu"),
+                    case 5:
+                        switch ( info.dwMinorVersion )
+                        {
+                            case 0:
+                                str.Printf(_("Windows 2000 (build %lu"),
+                                           info.dwBuildNumber);
+                                break;
+
+                            case 1:
+                                str.Printf(_("Windows XP (build %lu"),
+                                           info.dwBuildNumber);
+                                break;
+
+                            case 2:
+                                str.Printf(_("Windows Server 2003 (build %lu"),
+                                           info.dwBuildNumber);
+                                break;
+                        }
+                        break;
+
+                    case 6:
+                        if ( info.dwMinorVersion == 0 )
+                        {
+                            str.Printf(_("Windows Vista (build %lu"),
                                        info.dwBuildNumber);
-                            break;
-                        case 1:
-                            str.Printf(_("Windows XP (build %lu"),
-                                       info.dwBuildNumber);
-                            break;
-                        case 2:
-                            str.Printf(_("Windows Server 2003 (build %lu"),
-                                       info.dwBuildNumber);
-                            break;
-                    }
+                        }
+                        break;
                 }
+
                 if ( str.empty() )
                 {
                     str.Printf(_("Windows NT %lu.%lu (build %lu"),
@@ -1146,6 +1159,7 @@ wxString wxGetOsDescription()
                            info.dwMinorVersion,
                            info.dwBuildNumber);
                 }
+
                 if ( !wxIsEmpty(info.szCSDVersion) )
                 {
                     str << _T(", ") << info.szCSDVersion;
diff --git a/Externals/wxWidgets/src/msw/wince/filefnwce.cpp b/Externals/wxWidgets/src/msw/wince/filefnwce.cpp
index e1e976bf42..bd6aae8655 100644
--- a/Externals/wxWidgets/src/msw/wince/filefnwce.cpp
+++ b/Externals/wxWidgets/src/msw/wince/filefnwce.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: filefnwce.cpp 38791 2006-04-18 09:56:17Z ABX $
+// RCS-ID:      $Id: filefnwce.cpp 52111 2008-02-26 14:15:12Z JS $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -44,16 +44,19 @@ int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode))
     {
         access = GENERIC_READ;
         shareMode = FILE_SHARE_READ|FILE_SHARE_WRITE;
-        disposition |= OPEN_EXISTING;
+        disposition = OPEN_EXISTING;
     }
     else if ((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
     {
         access = GENERIC_WRITE;
+        disposition = OPEN_ALWAYS;
     }
     else if ((oflag & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDWR)
     {
         access = GENERIC_READ|GENERIC_WRITE;
+        disposition = OPEN_ALWAYS;
     }
+
     if (oflag & O_APPEND)
     {
         if ( wxFile::Exists(filename) )
@@ -62,16 +65,16 @@ int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode))
             shareMode = FILE_SHARE_READ;
             disposition = OPEN_EXISTING;
         }
-        //else: fall through as write_append is the same as write if the
-        //      file doesn't exist
         else
+        {
             oflag |= O_TRUNC;
+        }
     }
     if (oflag & O_TRUNC)
     {
         access |= GENERIC_WRITE;
         shareMode = 0;
-        disposition = (oflag & O_CREAT) ? CREATE_ALWAYS : TRUNCATE_EXISTING;
+        disposition = oflag & O_CREAT ? CREATE_ALWAYS : TRUNCATE_EXISTING;
     }
     else if (oflag & O_CREAT)
     {
@@ -119,21 +122,19 @@ int wxClose(int fd)
 
 int wxEof(int fd)
 {
-    LONG high0 = 0;
-    DWORD off0 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_CURRENT);
+    DWORD off0 = SetFilePointer((HANDLE) fd, 0, NULL, FILE_CURRENT);
     if (off0 == 0xFFFFFFFF && GetLastError() != NO_ERROR)
         return -1;
 
-    LONG high1 = 0;
-    DWORD off1 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_END);
+    DWORD off1 = SetFilePointer((HANDLE) fd, 0, NULL, FILE_END);
     if (off1 == 0xFFFFFFFF && GetLastError() != NO_ERROR)
         return -1;
 
-    if (off0 == off1 && high0 == high1)
+    if (off0 == off1)
         return 1;
     else
     {
-        SetFilePointer((HANDLE) fd, off0, &high0, FILE_BEGIN);
+        SetFilePointer((HANDLE) fd, off0, NULL, FILE_BEGIN);
         return 0;
     }
 }
@@ -178,8 +179,7 @@ __int64 wxSeek(int fd, __int64 offset, int origin)
             break;
     }
 
-    LONG high = 0;
-    DWORD res = SetFilePointer((HANDLE) fd, offset, &high, method) ;
+    DWORD res = SetFilePointer((HANDLE) fd, offset, NULL, method) ;
     if (res == 0xFFFFFFFF && GetLastError() != NO_ERROR)
     {
         wxLogSysError(_("can't seek on file descriptor %d"), fd);
@@ -191,15 +191,16 @@ __int64 wxSeek(int fd, __int64 offset, int origin)
 
 __int64 wxTell(int fd)
 {
-    LONG high = 0;
-    DWORD res = SetFilePointer((HANDLE) fd, 0, &high, FILE_CURRENT) ;
+    // WinCE apparently doesn't support lpDistanceToMoveHigh.
+    // LONG high = 0;
+    DWORD res = SetFilePointer((HANDLE) fd, 0, NULL, FILE_CURRENT) ;
     if (res == 0xFFFFFFFF && GetLastError() != NO_ERROR)
     {
         wxLogSysError(_("can't get seek position on file descriptor %d"), fd);
         return wxInvalidOffset;
     }
     else
-        return res + (((__int64)high) << 32);
+        return res ; // + (((__int64)high) << 32);
 }
 
 int wxFsync(int WXUNUSED(fd))
diff --git a/Externals/wxWidgets/src/msw/window.cpp b/Externals/wxWidgets/src/msw/window.cpp
index 1173ed6b66..33e7002baa 100644
--- a/Externals/wxWidgets/src/msw/window.cpp
+++ b/Externals/wxWidgets/src/msw/window.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: VZ on 13.05.99: no more Default(), MSWOnXXX() reorganisation
 // Created:     04/01/98
-// RCS-ID:      $Id: window.cpp 49475 2007-10-26 22:35:54Z RD $
+// RCS-ID:      $Id: window.cpp 53929 2008-06-02 18:27:16Z RD $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -276,6 +276,22 @@ bool GetCursorPosWinCE(POINT* pt)
 }
 #endif
 
+static wxBorder TranslateBorder(wxBorder border)
+{
+    if ( border == wxBORDER_THEME )
+    {
+#if defined(__POCKETPC__) || defined(__SMARTPHONE__)
+        return wxBORDER_SIMPLE;
+#elif wxUSE_UXTHEME
+        if (wxUxThemeEngine::GetIfActive())
+            return wxBORDER_THEME;
+#endif
+        return wxBORDER_SUNKEN;
+    }
+
+    return border;
+}
+
 // ---------------------------------------------------------------------------
 // event tables
 // ---------------------------------------------------------------------------
@@ -1365,7 +1381,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
     if ( flags & wxHSCROLL )
         style |= WS_HSCROLL;
 
-    const wxBorder border = GetBorder(flags);
+    const wxBorder border = TranslateBorder(GetBorder(flags));
 
     // WS_BORDER is only required for wxBORDER_SIMPLE
     if ( border == wxBORDER_SIMPLE )
@@ -1429,13 +1445,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
 // 2.9 and above.
 wxBorder wxWindowMSW::GetThemedBorderStyle() const
 {
-#if defined(__POCKETPC__) || defined(__SMARTPHONE__)
-    return wxBORDER_SIMPLE;
-#elif wxUSE_UXTHEME
-    if (wxUxThemeEngine::GetIfActive())
-        return wxBORDER_THEME;
-#endif
-    return wxBORDER_SUNKEN;
+    return TranslateBorder(wxBORDER_THEME);
 }
 
 // Setup background and foreground colours correctly
@@ -1479,7 +1489,7 @@ void wxWindowMSW::OnInternalIdle()
     }
 #endif // !HAVE_TRACKMOUSEEVENT
 
-    if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
+    if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
         UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
@@ -1562,14 +1572,19 @@ void wxWindowMSW::Thaw()
                     if ( child->IsTopLevel() )
                         continue;
                     else
-                        child->Thaw();
+                    {
+                        // in case the child was added while the TLW was
+                        // frozen, it won't be frozen now so avoid the Thaw.
+                        if ( child->IsFrozen() )
+                            child->Thaw();
+                    }
                 }
             }
             else // This is not a TLW, so just thaw it.
             {
                 SendSetRedraw(GetHwnd(), true);
             }
-            
+
             // we need to refresh everything or otherwise the invalidated area
             // is not going to be repainted
             Refresh();
@@ -3306,7 +3321,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
         case WM_NCCALCSIZE:
             {
                 wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
-                if (theme && GetBorder() == wxBORDER_THEME)
+                if (theme && TranslateBorder(GetBorder()) == wxBORDER_THEME)
                 {
                     // first ask the widget to calculate the border size
                     rc.result = MSWDefWindowProc(message, wParam, lParam);
@@ -3324,9 +3339,9 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
                     {
                         rect = *((RECT*)lParam);
                     }
-                    wxUxThemeHandle hTheme(this, L"EDIT");
+                    wxUxThemeHandle hTheme((const wxWindow*) this, L"EDIT");
                     RECT rcClient = { 0, 0, 0, 0 };
-                    wxClientDC dc(this);
+                    wxClientDC dc((wxWindow*) this);
 
                     if (theme->GetThemeBackgroundContentRect(
                             hTheme, GetHdcOf(dc), EP_EDITTEXT, ETS_NORMAL,
@@ -3346,14 +3361,14 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
         case WM_NCPAINT:
             {
                 wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
-                if (theme && GetBorder() == wxBORDER_THEME)
+                if (theme && TranslateBorder(GetBorder()) == wxBORDER_THEME)
                 {
                     // first ask the widget to paint its non-client area, such as scrollbars, etc.
                     rc.result = MSWDefWindowProc(message, wParam, lParam);
                     processed = true;
 
-                    wxUxThemeHandle hTheme(this, L"EDIT");
-                    wxWindowDC dc(this);
+                    wxUxThemeHandle hTheme((const wxWindow*) this, L"EDIT");
+                    wxWindowDC dc((wxWindow*) this);
 
                     // Clip the DC so that you only draw on the non-client area
                     RECT rcBorder;
@@ -3791,7 +3806,7 @@ bool wxWindowMSW::HandleEndSession(bool endSession, long logOff)
     wxCloseEvent event(wxEVT_END_SESSION, wxID_ANY);
     event.SetEventObject(wxTheApp);
     event.SetCanVeto(false);
-    event.SetLoggingOff( (logOff == (long)ENDSESSION_LOGOFF) );
+    event.SetLoggingOff((logOff & ENDSESSION_LOGOFF) != 0);
 
     return wxTheApp->ProcessEvent(event);
 #else
@@ -4161,17 +4176,32 @@ bool wxWindowMSW::HandlePower(WXWPARAM WXUNUSED_IN_WINCE(wParam),
 
 bool wxWindowMSW::IsDoubleBuffered() const
 {
-    for ( const wxWindowMSW *wnd = this;
-          wnd && !wnd->IsTopLevel(); wnd =
-          wnd->GetParent() )
-    {
-        if ( ::GetWindowLong(GetHwndOf(wnd), GWL_EXSTYLE) & WS_EX_COMPOSITED )
+    const wxWindowMSW *wnd = this;
+    do {
+        long style = ::GetWindowLong(GetHwndOf(wnd), GWL_EXSTYLE);
+        if ( (style & WS_EX_COMPOSITED) != 0 )
             return true;
-    }
-
+        wnd = wnd->GetParent();
+    } while ( wnd && !wnd->IsTopLevel() );
+        
     return false;
 }
 
+void wxWindowMSW::SetDoubleBuffered(bool on)
+{
+    // Get the current extended style bits
+    long exstyle = ::GetWindowLong(GetHwnd(), GWL_EXSTYLE);
+
+    // Twiddle the bit as needed
+    if ( on )
+        exstyle |= WS_EX_COMPOSITED;
+    else
+        exstyle &= ~WS_EX_COMPOSITED;
+
+    // put it back
+    ::SetWindowLong(GetHwnd(), GWL_EXSTYLE, exstyle);
+}
+
 // ---------------------------------------------------------------------------
 // owner drawn stuff
 // ---------------------------------------------------------------------------
@@ -4269,18 +4299,8 @@ wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
         wxCHECK_MSG( wxDynamicCast(pMenuItem, wxMenuItem),
                         false, _T("MSWOnMeasureItem: bad wxMenuItem pointer") );
 
-
-        size_t w = 0, h = 0;
-        bool rc = true;
-        if (pMenuItem->GetKind() != wxITEM_SEPARATOR)
-        {
-            rc = pMenuItem->OnMeasureItem(&w, &h);
-        }         
-        else
-        {
-            w = 8;
-            h = 8;
-        }
+        size_t w, h;
+        bool rc = pMenuItem->OnMeasureItem(&w, &h);
 
         pMeasureStruct->itemWidth = w;
         pMeasureStruct->itemHeight = h;
@@ -5941,10 +5961,18 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
             break;
 
         default:
-            if ( isVirtual )
-                *isVirtual = false;
-            vk = (WXWORD)wxk;
-            break;
+            // check to see if its one of the OEM key codes.
+            BYTE vks = LOBYTE(VkKeyScan(wxk));
+            if ( vks != 0xff )
+            {
+                vk = vks;
+            }
+            else
+            {
+                if ( isVirtual )
+                    *isVirtual = false;
+                vk = (WXWORD)wxk;
+            }
     }
 
     return vk;