From eff7b1aa14c02017fb92ad05028d8ba06a40a3f4 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Fri, 20 Mar 2009 05:41:36 +0000 Subject: [PATCH] Update wxWidgets to 2.8.10. I thought this would fix an issue with something I was trying to add, but it doesn't. might as well update it anyways...See http://www.wxwidgets.org/downloads/ for changelog git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2686 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/wxWidgets/build/msw/wx_adv.vcproj | 10 +- Externals/wxWidgets/build/msw/wx_base.vcproj | 10 +- .../wxWidgets/build/msw/wx_base_2008.vcproj | 6398 ----- Externals/wxWidgets/build/msw/wx_core.vcproj | 10 +- .../wxWidgets/build/msw/wx_core_2008.vcproj | 20128 ---------------- Externals/wxWidgets/include/wx/aboutdlg.h | 8 +- Externals/wxWidgets/include/wx/arrstr.h | 7 +- Externals/wxWidgets/include/wx/artprov.h | 6 +- Externals/wxWidgets/include/wx/aui/aui.h | 3 +- Externals/wxWidgets/include/wx/aui/auibook.h | 10 +- .../wxWidgets/include/wx/aui/framemanager.h | 41 +- Externals/wxWidgets/include/wx/choicebk.h | 4 +- Externals/wxWidgets/include/wx/datetime.h | 9 +- Externals/wxWidgets/include/wx/db.h | 15 +- Externals/wxWidgets/include/wx/dc.h | 10 +- Externals/wxWidgets/include/wx/debug.h | 18 +- Externals/wxWidgets/include/wx/dynlib.h | 36 +- .../wxWidgets/include/wx/generic/animate.h | 7 +- .../wxWidgets/include/wx/generic/clrpickerg.h | 14 +- Externals/wxWidgets/include/wx/generic/grid.h | 4 +- Externals/wxWidgets/include/wx/graphics.h | 60 +- Externals/wxWidgets/include/wx/hashmap.h | 47 +- Externals/wxWidgets/include/wx/hashset.h | 22 +- Externals/wxWidgets/include/wx/html/winpars.h | 19 +- Externals/wxWidgets/include/wx/list.h | 29 +- Externals/wxWidgets/include/wx/longlong.h | 26 +- .../wxWidgets/include/wx/msw/amd64.manifest | 44 +- .../wxWidgets/include/wx/msw/ia64.manifest | 44 +- Externals/wxWidgets/include/wx/msw/listctrl.h | 9 +- Externals/wxWidgets/include/wx/msw/ole/uuid.h | 8 +- Externals/wxWidgets/include/wx/msw/tbar95.h | 5 +- .../wxWidgets/include/wx/msw/wince/chkconf.h | 12 +- .../wxWidgets/include/wx/msw/wince/net.h | 1 + .../include/wx/msw/wince/smartphone.rc | 134 +- .../wxWidgets/include/wx/msw/wince/wince.rc | 52 +- .../wxWidgets/include/wx/msw/wx.manifest | 44 +- Externals/wxWidgets/include/wx/msw/wx.rc | 238 +- Externals/wxWidgets/include/wx/prntbase.h | 6 +- Externals/wxWidgets/include/wx/radiobox.h | 5 +- Externals/wxWidgets/include/wx/regex.h | 4 +- .../include/wx/richtext/richtextbuffer.h | 10 +- .../include/wx/richtext/richtextctrl.h | 4 +- .../include/wx/richtext/richtextprint.h | 4 +- .../include/wx/richtext/richtextsymboldlg.h | 4 +- Externals/wxWidgets/include/wx/settings.h | 3 +- Externals/wxWidgets/include/wx/version.h | 6 +- Externals/wxWidgets/include/wx/window.h | 23 +- Externals/wxWidgets/include/wx/xrc/xmlres.h | 4 +- Externals/wxWidgets/include/wx/zstream.h | 6 +- Externals/wxWidgets/src/common/artprov.cpp | 20 +- Externals/wxWidgets/src/common/base.rc | 98 +- Externals/wxWidgets/src/common/cmdline.cpp | 4 +- Externals/wxWidgets/src/common/combocmn.cpp | 11 +- Externals/wxWidgets/src/common/datetime.cpp | 134 +- Externals/wxWidgets/src/common/dcbase.cpp | 17 +- Externals/wxWidgets/src/common/descrip.mms | 1166 +- Externals/wxWidgets/src/common/event.cpp | 11 +- Externals/wxWidgets/src/common/filefn.cpp | 4 +- Externals/wxWidgets/src/common/filename.cpp | 46 +- Externals/wxWidgets/src/common/filesys.cpp | 134 +- Externals/wxWidgets/src/common/fontmgrcmn.cpp | 23 +- Externals/wxWidgets/src/common/gbsizer.cpp | 6 +- Externals/wxWidgets/src/common/gifdecod.cpp | 15 +- Externals/wxWidgets/src/common/glob.inc | 734 +- Externals/wxWidgets/src/common/graphcmn.cpp | 9 +- Externals/wxWidgets/src/common/imagbmp.cpp | 39 +- Externals/wxWidgets/src/common/image.cpp | 10 +- Externals/wxWidgets/src/common/imagpcx.cpp | 14 +- Externals/wxWidgets/src/common/intl.cpp | 16 +- Externals/wxWidgets/src/common/ipcbase.cpp | 9 +- Externals/wxWidgets/src/common/menucmn.cpp | 12 +- Externals/wxWidgets/src/common/object.cpp | 67 +- Externals/wxWidgets/src/common/pickerbase.cpp | 8 +- Externals/wxWidgets/src/common/popupcmn.cpp | 21 +- Externals/wxWidgets/src/common/prntbase.cpp | 391 +- Externals/wxWidgets/src/common/radiocmn.cpp | 168 +- Externals/wxWidgets/src/common/regex.cpp | 9 +- Externals/wxWidgets/src/common/stockitem.cpp | 20 +- Externals/wxWidgets/src/common/strconv.cpp | 177 +- Externals/wxWidgets/src/common/string.cpp | 68 +- Externals/wxWidgets/src/common/unictabl.inc | 1744 +- Externals/wxWidgets/src/common/uri.cpp | 21 +- Externals/wxWidgets/src/common/url.cpp | 8 +- Externals/wxWidgets/src/common/variant.cpp | 14 +- Externals/wxWidgets/src/common/wfstream.cpp | 46 +- Externals/wxWidgets/src/common/wincmn.cpp | 54 +- Externals/wxWidgets/src/common/wxchar.cpp | 14 +- Externals/wxWidgets/src/common/xpmdecod.cpp | 21 +- Externals/wxWidgets/src/generic/aboutdlgg.cpp | 17 +- Externals/wxWidgets/src/generic/caret.cpp | 37 +- Externals/wxWidgets/src/generic/choicbkg.cpp | 6 +- .../wxWidgets/src/generic/clrpickerg.cpp | 60 +- Externals/wxWidgets/src/generic/datectlg.cpp | 9 +- Externals/wxWidgets/src/generic/dcpsg.cpp | 32 +- Externals/wxWidgets/src/generic/descrip.mms | 552 +- Externals/wxWidgets/src/generic/graphicc.cpp | 221 +- Externals/wxWidgets/src/generic/grid.cpp | 347 +- Externals/wxWidgets/src/generic/gridctrl.cpp | 23 +- Externals/wxWidgets/src/generic/imaglist.cpp | 6 +- Externals/wxWidgets/src/generic/listctrl.cpp | 74 +- Externals/wxWidgets/src/generic/numdlgg.cpp | 7 +- Externals/wxWidgets/src/generic/odcombo.cpp | 27 +- Externals/wxWidgets/src/generic/prntdlgg.cpp | 8 +- Externals/wxWidgets/src/generic/scrlwing.cpp | 66 +- Externals/wxWidgets/src/generic/splash.cpp | 5 +- Externals/wxWidgets/src/generic/splitter.cpp | 20 +- Externals/wxWidgets/src/generic/statusbr.cpp | 3 +- Externals/wxWidgets/src/generic/treebkg.cpp | 11 +- Externals/wxWidgets/src/generic/treectlg.cpp | 96 +- Externals/wxWidgets/src/generic/vscroll.cpp | 6 +- Externals/wxWidgets/src/msw/aboutdlg.cpp | 4 +- Externals/wxWidgets/src/msw/accel.cpp | 9 +- Externals/wxWidgets/src/msw/app.cpp | 16 +- Externals/wxWidgets/src/msw/bitmap.cpp | 29 +- Externals/wxWidgets/src/msw/control.cpp | 4 +- Externals/wxWidgets/src/msw/display.cpp | 31 +- Externals/wxWidgets/src/msw/dlmsw.cpp | 8 +- Externals/wxWidgets/src/msw/filedlg.cpp | 15 +- Externals/wxWidgets/src/msw/frame.cpp | 55 +- Externals/wxWidgets/src/msw/graphics.cpp | 241 +- Externals/wxWidgets/src/msw/helpchm.cpp | 6 +- Externals/wxWidgets/src/msw/listbox.cpp | 37 +- Externals/wxWidgets/src/msw/listctrl.cpp | 179 +- Externals/wxWidgets/src/msw/makebase.b32 | 912 +- Externals/wxWidgets/src/msw/makefile.mic | 712 +- Externals/wxWidgets/src/msw/makefile.sl | 1828 +- Externals/wxWidgets/src/msw/menu.cpp | 5 +- Externals/wxWidgets/src/msw/notebook.cpp | 12 +- Externals/wxWidgets/src/msw/ole/automtn.cpp | 11 +- Externals/wxWidgets/src/msw/ole/droptgt.cpp | 23 +- Externals/wxWidgets/src/msw/ole/oleutils.cpp | 18 +- Externals/wxWidgets/src/msw/ole/uuid.cpp | 14 +- Externals/wxWidgets/src/msw/radiobox.cpp | 7 +- Externals/wxWidgets/src/msw/radiobut.cpp | 168 +- Externals/wxWidgets/src/msw/settings.cpp | 9 +- Externals/wxWidgets/src/msw/spinctrl.cpp | 18 +- Externals/wxWidgets/src/msw/statbmp.cpp | 27 +- Externals/wxWidgets/src/msw/tbar95.cpp | 57 +- Externals/wxWidgets/src/msw/textctrl.cpp | 6 +- Externals/wxWidgets/src/msw/thread.cpp | 20 +- Externals/wxWidgets/src/msw/treectrl.cpp | 13 +- Externals/wxWidgets/src/msw/urlmsw.cpp | 18 +- Externals/wxWidgets/src/msw/utilsexc.cpp | 55 +- Externals/wxWidgets/src/msw/version.rc | 124 +- Externals/wxWidgets/src/msw/wince/net.cpp | 60 +- Externals/wxWidgets/src/msw/window.cpp | 30 +- Externals/wxWidgets/src/png/pngwutil.c | 6 +- 147 files changed, 7226 insertions(+), 32198 deletions(-) delete mode 100644 Externals/wxWidgets/build/msw/wx_base_2008.vcproj delete mode 100644 Externals/wxWidgets/build/msw/wx_core_2008.vcproj diff --git a/Externals/wxWidgets/build/msw/wx_adv.vcproj b/Externals/wxWidgets/build/msw/wx_adv.vcproj index 1f0ee58a58..fcd2237385 100644 --- a/Externals/wxWidgets/build/msw/wx_adv.vcproj +++ b/Externals/wxWidgets/build/msw/wx_adv.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="9.00" Name="wxAdv28" - ProjectGUID="{71B16F46-0B00-4EDA-B253-D6D9D03A215C}" + ProjectGUID="{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}" RootNamespace="wxAdv28" TargetFrameworkVersion="0" > @@ -2125,10 +2125,6 @@ - - @@ -2193,6 +2189,10 @@ /> + + @@ -5734,10 +5734,6 @@ - - @@ -5802,6 +5798,10 @@ /> + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Externals/wxWidgets/build/msw/wx_core.vcproj b/Externals/wxWidgets/build/msw/wx_core.vcproj index 509aea3a35..8a3541dd21 100644 --- a/Externals/wxWidgets/build/msw/wx_core.vcproj +++ b/Externals/wxWidgets/build/msw/wx_core.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="9.00" Name="wxCore28" - ProjectGUID="{0318BA30-EF48-441A-9E10-DC85EFAE39F0}" + ProjectGUID="{11F55366-12EC-4C44-A8CB-1D4E315D61ED}" RootNamespace="wxCore" TargetFrameworkVersion="131072" > @@ -16956,6 +16956,10 @@ + + @@ -17020,10 +17024,6 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Externals/wxWidgets/include/wx/aboutdlg.h b/Externals/wxWidgets/include/wx/aboutdlg.h index 99f452123e..19a6fb949c 100644 --- a/Externals/wxWidgets/include/wx/aboutdlg.h +++ b/Externals/wxWidgets/include/wx/aboutdlg.h @@ -3,7 +3,7 @@ // Purpose: declaration of wxAboutDialog class // Author: Vadim Zeitlin // Created: 2006-10-07 -// RCS-ID: $Id: aboutdlg.h 41813 2006-10-09 16:56:18Z RD $ +// RCS-ID: $Id: aboutdlg.h 58748 2009-02-08 09:46:03Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -128,6 +128,12 @@ public: // artists and translators) as a one long multiline string wxString GetDescriptionAndCredits() const; +#if wxABI_VERSION >= 20810 + // returns the copyright with the (C) string substituted by the Unicode + // character U+00A9 + wxString GetCopyrightToDisplay() const; +#endif // wx 2.8.10+ + private: wxString m_name, m_version, diff --git a/Externals/wxWidgets/include/wx/arrstr.h b/Externals/wxWidgets/include/wx/arrstr.h index 0229f1817d..0f1b908878 100644 --- a/Externals/wxWidgets/include/wx/arrstr.h +++ b/Externals/wxWidgets/include/wx/arrstr.h @@ -4,7 +4,7 @@ // Author: Mattia Barbon and Vadim Zeitlin // Modified by: // Created: 07/07/03 -// RCS-ID: $Id: arrstr.h 33888 2005-04-26 19:24:12Z MBN $ +// RCS-ID: $Id: arrstr.h 56758 2008-11-13 22:32:21Z VS $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -364,6 +364,11 @@ public: m_strings[i] = m_array[i]; return m_strings; } + +#if wxABI_VERSION >= 20810 + wxString* Release(); +#endif // wxABI_VERSION >= 20810 + private: const wxArrayString& m_array; wxString* m_strings; diff --git a/Externals/wxWidgets/include/wx/artprov.h b/Externals/wxWidgets/include/wx/artprov.h index c5f0ff8642..1d026a74db 100644 --- a/Externals/wxWidgets/include/wx/artprov.h +++ b/Externals/wxWidgets/include/wx/artprov.h @@ -4,7 +4,7 @@ // Author: Vaclav Slavik // Modified by: // Created: 18/03/2002 -// RCS-ID: $Id: artprov.h 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id: artprov.h 57701 2008-12-31 23:40:06Z VS $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -122,6 +122,10 @@ public: // Add new provider to the bottom of providers stack (i.e. the provider // will be queried as the last one). +#if wxABI_VERSION >= 20810 + static void PushBack(wxArtProvider *provider); +#endif + // same as PushBack() static void Insert(wxArtProvider *provider); // Remove latest added provider and delete it. diff --git a/Externals/wxWidgets/include/wx/aui/aui.h b/Externals/wxWidgets/include/wx/aui/aui.h index c926462eea..72273dd488 100644 --- a/Externals/wxWidgets/include/wx/aui/aui.h +++ b/Externals/wxWidgets/include/wx/aui/aui.h @@ -4,7 +4,7 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: aui.h 40232 2006-07-22 13:14:07Z BIW $ +// RCS-ID: $Id: aui.h 55195 2008-08-23 06:31:01Z BIW $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -15,6 +15,7 @@ #include "wx/aui/framemanager.h" #include "wx/aui/dockart.h" #include "wx/aui/floatpane.h" +#include "wx/aui/auibar.h" #include "wx/aui/auibook.h" #include "wx/aui/tabmdi.h" diff --git a/Externals/wxWidgets/include/wx/aui/auibook.h b/Externals/wxWidgets/include/wx/aui/auibook.h index 9611387820..0fc290a3c5 100644 --- a/Externals/wxWidgets/include/wx/aui/auibook.h +++ b/Externals/wxWidgets/include/wx/aui/auibook.h @@ -469,15 +469,17 @@ protected: void OnRightDown(wxMouseEvent& evt); void OnRightUp(wxMouseEvent& evt); void OnLeftDClick(wxMouseEvent& evt); - void OnSetFocus(wxFocusEvent& event); - void OnKillFocus(wxFocusEvent& event); - void OnChar(wxKeyEvent& event); + void OnSetFocus(wxFocusEvent& evt); + void OnKillFocus(wxFocusEvent& evt); + void OnChar(wxKeyEvent& evt); +#endif +#if wxABI_VERSION >= 20809 + void OnCaptureLost(wxMouseCaptureLostEvent& evt); #endif void OnMotion(wxMouseEvent& evt); void OnLeaveWindow(wxMouseEvent& evt); void OnButton(wxAuiNotebookEvent& evt); - protected: wxPoint m_click_pt; diff --git a/Externals/wxWidgets/include/wx/aui/framemanager.h b/Externals/wxWidgets/include/wx/aui/framemanager.h index 0b04c4b4b1..c267ad233b 100644 --- a/Externals/wxWidgets/include/wx/aui/framemanager.h +++ b/Externals/wxWidgets/include/wx/aui/framemanager.h @@ -4,7 +4,7 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: framemanager.h 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id: framemanager.h 57885 2009-01-07 14:51:49Z JS $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -47,6 +47,7 @@ enum wxAuiManagerOption wxAUI_MGR_RECTANGLE_HINT = 1 << 5, wxAUI_MGR_HINT_FADE = 1 << 6, wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7, + wxAUI_MGR_LIVE_RESIZE = 1 << 8, wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT | @@ -166,7 +167,7 @@ public: } ~wxAuiPaneInfo() {} - + #ifndef SWIG wxAuiPaneInfo(const wxAuiPaneInfo& c) { @@ -350,12 +351,12 @@ public: #ifdef SWIG %typemap(out) wxAuiPaneInfo& ; #endif - + public: // NOTE: You can add and subtract flags from this list, // but do not change the values of the flags, because - // they are stored in a binary integer format in the + // they are stored in a binary integer format in the // perspective string. If you really need to change the // values around, you'll have to ensure backwards-compatibility // in the perspective loading code. @@ -384,11 +385,11 @@ public: buttonMaximize = 1 << 22, buttonMinimize = 1 << 23, buttonPin = 1 << 24, - + buttonCustom1 = 1 << 26, buttonCustom2 = 1 << 27, buttonCustom3 = 1 << 28, - + savedHiddenState = 1 << 30, // used internally actionPane = 1 << 31 // used internally }; @@ -451,7 +452,7 @@ public: bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info); - + bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info, const wxPoint& drop_pos); @@ -465,7 +466,7 @@ public: int insert_level = wxAUI_INSERT_PANE); bool DetachPane(wxWindow* window); - + void Update(); wxString SavePaneInfo(wxAuiPaneInfo& pane); @@ -475,7 +476,7 @@ public: void SetDockSizeConstraint(double width_pct, double height_pct); void GetDockSizeConstraint(double* width_pct, double* height_pct) const; - + void ClosePane(wxAuiPaneInfo& pane_info); void MaximizePane(wxAuiPaneInfo& pane_info); void RestorePane(wxAuiPaneInfo& pane_info); @@ -493,12 +494,12 @@ public: wxWindow* pane_window, const wxPoint& pt, const wxPoint& offset); - + void DrawHintRect( wxWindow* pane_window, const wxPoint& pt, const wxPoint& offset); - + virtual void ShowHint(const wxRect& rect); virtual void HideHint(); @@ -506,14 +507,14 @@ public: // deprecated -- please use SetManagedWindow() and // and GetManagedWindow() instead - + wxDEPRECATED( void SetFrame(wxFrame* frame) ); wxDEPRECATED( wxFrame* GetFrame() const ); - + protected: void UpdateHintWindowConfig(); - + void DoFrameLayout(); void LayoutAddPane(wxSizer* container, @@ -559,6 +560,10 @@ protected: wxArrayInt& positions, wxArrayInt& sizes); +#if wxABI_VERSION >= 20810 + /// Ends a resize action, or for live update, resizes the sash + bool DoEndResizeAction(wxMouseEvent& event); +#endif public: @@ -623,7 +628,7 @@ protected: wxTimer m_hint_fadetimer; // transparent fade timer wxByte m_hint_fadeamt; // transparent fade amount wxByte m_hint_fademax; // maximum value of hint fade - + void* m_reserved; #ifndef SWIG @@ -665,17 +670,17 @@ public: void SetPane(wxAuiPaneInfo* p) { pane = p; } void SetButton(int b) { button = b; } void SetDC(wxDC* pdc) { dc = pdc; } - + wxAuiManager* GetManager() const { return manager; } wxAuiPaneInfo* GetPane() const { return pane; } int GetButton() const { return button; } wxDC* GetDC() const { return dc; } - + void Veto(bool veto = true) { veto_flag = veto; } bool GetVeto() const { return veto_flag; } void SetCanVeto(bool can_veto) { canveto_flag = can_veto; } bool CanVeto() const { return canveto_flag && veto_flag; } - + public: wxAuiManager* manager; wxAuiPaneInfo* pane; diff --git a/Externals/wxWidgets/include/wx/choicebk.h b/Externals/wxWidgets/include/wx/choicebk.h index d1e6be6967..85182ccbcd 100644 --- a/Externals/wxWidgets/include/wx/choicebk.h +++ b/Externals/wxWidgets/include/wx/choicebk.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Modified by: Wlodzimierz ABX Skiba from wx/listbook.h // Created: 15.09.04 -// RCS-ID: $Id: choicebk.h 49804 2007-11-10 01:09:42Z VZ $ +// RCS-ID: $Id: choicebk.h 56623 2008-10-31 23:07:49Z VZ $ // Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -93,7 +93,7 @@ protected: void UpdateSelectedPage(size_t newsel) { - m_selection = newsel; + m_selection = wx_static_cast(int, newsel); GetChoiceCtrl()->Select(newsel); } diff --git a/Externals/wxWidgets/include/wx/datetime.h b/Externals/wxWidgets/include/wx/datetime.h index 186cb28775..e74dde1c73 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 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id: datetime.h 57502 2008-12-22 19:52:20Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -577,7 +577,7 @@ public: // ------------------------------------------------------------------------ // default ctor does not initialize the object, use Set()! - wxDateTime() { m_time = wxLongLong((long)ULONG_MAX, ULONG_MAX); } + wxDateTime() { m_time = wxLongLong((wxInt32)UINT_MAX, UINT_MAX); } // from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970) #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) @@ -1100,13 +1100,8 @@ public: // another one to get the current time broken down static struct tm *GetTmNow() { -#ifdef __WXWINCE__ static struct tm l_CurrentTime; return GetTmNow(&l_CurrentTime); -#else - time_t t = GetTimeNow(); - return localtime(&t); -#endif } // get current time using thread-safe function diff --git a/Externals/wxWidgets/include/wx/db.h b/Externals/wxWidgets/include/wx/db.h index bcf99059d6..013bc22760 100644 --- a/Externals/wxWidgets/include/wx/db.h +++ b/Externals/wxWidgets/include/wx/db.h @@ -17,7 +17,7 @@ // databases operate the same in that respect // // Created: 9.96 -// RCS-ID: $Id: db.h 45498 2007-04-16 13:03:05Z VZ $ +// RCS-ID: $Id: db.h 56697 2008-11-07 22:45:47Z VZ $ // Copyright: (c) 1996 Remstar International, Inc. // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -78,10 +78,15 @@ // defined in many other places on other systems (Motif, at least on // OpenVMS; Cocoa and X11) so prevent the problem by defining it before // including these headers - #define BOOL int - #include - #include - #undef BOOL + #ifndef BOOL + #define BOOL int + #include + #include + #undef BOOL + #else + #include + #include + #endif #endif // wxUSE_BUILTIN_IODBC/!wxUSE_BUILTIN_IODBC } #endif diff --git a/Externals/wxWidgets/include/wx/dc.h b/Externals/wxWidgets/include/wx/dc.h index 937d782338..d4790403a1 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 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id: dc.h 55927 2008-09-28 09:12:16Z VS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -466,7 +466,6 @@ public: bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const { return DoGetPartialTextExtents(text, widths); } - // size and resolution // ------------------- @@ -793,6 +792,13 @@ protected: virtual void DoDrawSpline(wxList *points); #endif +#if wxABI_VERSION >= 20810 + // returns adjustment factor for converting wxFont "point size"; in wx + // it is point size on screen and needs to be multiplied by this value + // for rendering on higher-resolution DCs such as printer ones + static float GetFontPointSizeAdjustment(float dpi); +#endif + protected: // unset clipping variables (after clipping region was destroyed) void ResetClipping() diff --git a/Externals/wxWidgets/include/wx/debug.h b/Externals/wxWidgets/include/wx/debug.h index 2fa1542336..fd389d516c 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 53711 2008-05-22 22:58:28Z SN $ +* RCS-ID: $Id: debug.h 54492 2008-07-05 17:54:03Z SN $ * Copyright: (c) 1998 Vadim Zeitlin * Licence: wxWindows licence */ @@ -190,6 +190,17 @@ /* as wxCHECK2 but with a message explaining why we fail */ +#ifdef __GNUC__ + #define wxFORCE_SEMICOLON typedef int wxDummyCheckInt + /* Note: 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... */ +#else + #define wxFORCE_SEMICOLON struct wxDummyCheckStruct + /* Note2: however, some other compilers (notably Digital Mars */ + /* don't like multiple typedefs (even though the standard */ + /* does allow them), so use a forward declaration for non-gcc. */ +#endif /* see comment near the definition of wxASSERT_MSG for the # if/else reason */ #if defined(__MWERKS__) #define wxCHECK2_MSG(cond, op, msg) \ @@ -210,10 +221,7 @@ wxFAIL_COND_MSG(#cond, msg); \ op; \ } \ - 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... */ + wxFORCE_SEMICOLON /* just to force a semicolon */ #endif /* special form of wxCHECK2: as wxCHECK, but for use in void functions */ diff --git a/Externals/wxWidgets/include/wx/dynlib.h b/Externals/wxWidgets/include/wx/dynlib.h index bb58b10267..3552bdcaaf 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 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id: dynlib.h 58750 2009-02-08 10:01:03Z VZ $ // Copyright: (c) 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -76,6 +76,18 @@ enum wxDLFlags wxDL_NOSHARE = 0x00000010, // load new DLL, don't reuse already loaded // (only for wxPluginManager) + wxDL_QUIET = 0x00000020, // don't log an error if failed to load + +#if wxABI_VERSION >= 20810 + // this flag is dangerous, for internal use of wxMSW only, don't use at all + // and especially don't use directly, use wxLoadedDLL instead if you really + // do need it + wxDL_GET_LOADED = 0x00000040, // Win32 only: return handle of already + // loaded DLL or NULL otherwise; Unload() + // should not be called so don't forget to + // Detach() if you use this function +#endif // wx 2.8.10+ + wxDL_DEFAULT = wxDL_NOW // default flags correspond to Win32 }; @@ -309,6 +321,28 @@ protected: DECLARE_NO_COPY_CLASS(wxDynamicLibrary) }; +#if defined(__WXMSW__) && wxABI_VERSION >= 20810 + +// ---------------------------------------------------------------------------- +// wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind +// to a DLL already loaded into the project address space +// ---------------------------------------------------------------------------- + +class wxLoadedDLL : public wxDynamicLibrary +{ +public: + wxLoadedDLL(const wxString& dllname) + : wxDynamicLibrary(dllname, wxDL_GET_LOADED | wxDL_VERBATIM | wxDL_QUIET) + { + } + + ~wxLoadedDLL() + { + Detach(); + } +}; + +#endif // __WXMSW__ // ---------------------------------------------------------------------------- // Interesting defines diff --git a/Externals/wxWidgets/include/wx/generic/animate.h b/Externals/wxWidgets/include/wx/generic/animate.h index 30584831fd..28cb4b8bbf 100644 --- a/Externals/wxWidgets/include/wx/generic/animate.h +++ b/Externals/wxWidgets/include/wx/generic/animate.h @@ -4,7 +4,7 @@ // Author: Julian Smart and Guillermo Rodriguez Garcia // Modified by: Francesco Montorsi // Created: 13/8/99 -// RCS-ID: $Id: animate.h 43898 2006-12-10 14:18:37Z VZ $ +// RCS-ID: $Id: animate.h 58350 2009-01-24 10:00:38Z FM $ // Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -23,6 +23,11 @@ WX_DECLARE_LIST_WITH_DECL(wxAnimationDecoder, wxAnimationDecoderList, class WXDL class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase { public: +#if wxABI_VERSION >= 20810 + wxAnimation() {} + wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) + { LoadFile(name, type); } +#endif virtual bool IsOk() const { return m_refData != NULL; } diff --git a/Externals/wxWidgets/include/wx/generic/clrpickerg.h b/Externals/wxWidgets/include/wx/generic/clrpickerg.h index b7be525e70..a67f1181f3 100644 --- a/Externals/wxWidgets/include/wx/generic/clrpickerg.h +++ b/Externals/wxWidgets/include/wx/generic/clrpickerg.h @@ -5,7 +5,7 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Vadim Zeitlin, Francesco Montorsi -// RCS-ID: $Id: clrpickerg.h 40322 2006-07-25 11:41:53Z ABX $ +// RCS-ID: $Id: clrpickerg.h 58967 2009-02-17 13:31:28Z SC $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -25,8 +25,18 @@ // the default style #define wxCLRBTN_DEFAULT_STYLE (wxCLRBTN_SHOW_LABEL) +#ifndef wxCLRBTN_USES_BMP_BUTTON + #define wxCLRBTN_USES_BMP_BUTTON 0 +#endif -class WXDLLIMPEXP_CORE wxGenericColourButton : public wxButton, +#if wxCLRBTN_USES_BMP_BUTTON + #include "wx/bmpbutton.h" + #define wxCLRBTN_BASE_CLASS wxBitmapButton +#else + #define wxCLRBTN_BASE_CLASS wxButton +#endif + +class WXDLLIMPEXP_CORE wxGenericColourButton : public wxCLRBTN_BASE_CLASS, public wxColourPickerWidgetBase { public: diff --git a/Externals/wxWidgets/include/wx/generic/grid.h b/Externals/wxWidgets/include/wx/generic/grid.h index 858f2ae0ff..e84bb7dd73 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 53135 2008-04-12 02:31:04Z VZ $ +// RCS-ID: $Id: grid.h 55568 2008-09-12 12:49:11Z VZ $ // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -2256,7 +2256,7 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_CMD_LABEL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_DCLICK, id, fn) #define EVT_GRID_CMD_ROW_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(ROW_SIZE, id, fn) #define EVT_GRID_CMD_COL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_SIZE, id, fn) -#define EVT_GRID_CMD_COL_MOVE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_MOVE, id, fn) +#define EVT_GRID_CMD_COL_MOVE(id, fn) wx__DECLARE_GRIDEVT(COL_MOVE, id, fn) #define EVT_GRID_CMD_RANGE_SELECT(id, fn) wx__DECLARE_GRIDRANGESELEVT(RANGE_SELECT, id, fn) #define EVT_GRID_CMD_CELL_CHANGE(id, fn) wx__DECLARE_GRIDEVT(CELL_CHANGE, id, fn) #define EVT_GRID_CMD_SELECT_CELL(id, fn) wx__DECLARE_GRIDEVT(SELECT_CELL, id, fn) diff --git a/Externals/wxWidgets/include/wx/graphics.h b/Externals/wxWidgets/include/wx/graphics.h index 832a2123fe..34f831e91c 100644 --- a/Externals/wxWidgets/include/wx/graphics.h +++ b/Externals/wxWidgets/include/wx/graphics.h @@ -5,7 +5,7 @@ // Modified by: // Created: // Copyright: (c) Stefan Csomor -// RCS-ID: $Id: graphics.h 50671 2007-12-12 20:19:36Z MR $ +// RCS-ID: $Id: graphics.h 57953 2009-01-09 18:46:48Z SC $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -29,6 +29,7 @@ class WXDLLIMPEXP_CORE wxGraphicsRenderer; class WXDLLIMPEXP_CORE wxGraphicsPen; class WXDLLIMPEXP_CORE wxGraphicsBrush; class WXDLLIMPEXP_CORE wxGraphicsFont; +class WXDLLIMPEXP_CORE wxGraphicsBitmap; /* * notes about the graphics context apis @@ -63,6 +64,10 @@ class WXDLLIMPEXP_CORE wxGraphicsObject : public wxObject { public : wxGraphicsObject() ; +#if wxABI_VERSION >= 20810 + wxGraphicsObject( const wxGraphicsObject& other) : wxObject( other ) {} + wxGraphicsObject& operator= (const wxGraphicsObject & other) { Ref(other); return *this;} +#endif wxGraphicsObject( wxGraphicsRenderer* renderer ) ; virtual ~wxGraphicsObject() ; @@ -82,6 +87,10 @@ class WXDLLIMPEXP_CORE wxGraphicsPen : public wxGraphicsObject { public : wxGraphicsPen() {} +#if wxABI_VERSION >= 20810 + wxGraphicsPen( const wxGraphicsPen& other) : wxGraphicsObject( other ) {} + wxGraphicsPen& operator= (const wxGraphicsPen & other) { Ref(other); return *this;} +#endif virtual ~wxGraphicsPen() {} private : DECLARE_DYNAMIC_CLASS(wxGraphicsPen) @@ -93,6 +102,10 @@ class WXDLLIMPEXP_CORE wxGraphicsBrush : public wxGraphicsObject { public : wxGraphicsBrush() {} +#if wxABI_VERSION >= 20810 + wxGraphicsBrush( const wxGraphicsBrush& other) : wxGraphicsObject( other ) {} + wxGraphicsBrush& operator= (const wxGraphicsBrush & other) { Ref(other); return *this;} +#endif virtual ~wxGraphicsBrush() {} private : DECLARE_DYNAMIC_CLASS(wxGraphicsBrush) @@ -104,6 +117,10 @@ class WXDLLIMPEXP_CORE wxGraphicsFont : public wxGraphicsObject { public : wxGraphicsFont() {} +#if wxABI_VERSION >= 20810 + wxGraphicsFont( const wxGraphicsFont& other) : wxGraphicsObject( other ) {} + wxGraphicsFont& operator= (const wxGraphicsFont & other) { Ref(other); return *this;} +#endif virtual ~wxGraphicsFont() {} private : DECLARE_DYNAMIC_CLASS(wxGraphicsFont) @@ -111,6 +128,20 @@ private : extern WXDLLEXPORT_DATA(wxGraphicsFont) wxNullGraphicsFont; +class WXDLLIMPEXP_CORE wxGraphicsBitmap : public wxGraphicsObject +{ +public : + wxGraphicsBitmap() {} +#if wxABI_VERSION >= 20810 + wxGraphicsBitmap( const wxGraphicsBitmap& other) : wxGraphicsObject( other ) {} + wxGraphicsBitmap& operator= (const wxGraphicsBitmap & other) { Ref(other); return *this;} +#endif + virtual ~wxGraphicsBitmap() {} +private : + DECLARE_DYNAMIC_CLASS(wxGraphicsBitmap) +} ; + +extern WXDLLEXPORT_DATA(wxGraphicsBitmap) wxNullGraphicsBitmap; class WXDLLIMPEXP_CORE wxGraphicsMatrixData : public wxGraphicsObjectRefData { @@ -171,6 +202,10 @@ class WXDLLIMPEXP_CORE wxGraphicsMatrix : public wxGraphicsObject { public : wxGraphicsMatrix() {} +#if wxABI_VERSION >= 20810 + wxGraphicsMatrix( const wxGraphicsMatrix& other) : wxGraphicsObject( other ) {} + wxGraphicsMatrix& operator= (const wxGraphicsMatrix & other) { Ref(other); return *this;} +#endif virtual ~wxGraphicsMatrix() {} @@ -306,6 +341,10 @@ class WXDLLIMPEXP_CORE wxGraphicsPath : public wxGraphicsObject { public : wxGraphicsPath() {} +#if wxABI_VERSION >= 20810 + wxGraphicsPath( const wxGraphicsPath& other) : wxGraphicsObject( other ) {} + wxGraphicsPath& operator= (const wxGraphicsPath & other) { Ref(other); return *this;} +#endif virtual ~wxGraphicsPath() {} // @@ -428,6 +467,12 @@ public: // sets the font virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) const; + +#if wxABI_VERSION >= 20809 + wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) const; +#endif + + //virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) const; // create a 'native' matrix corresponding to these values virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, @@ -527,7 +572,10 @@ public: // // image support // - +#if wxABI_VERSION >= 20809 + void DrawGraphicsBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); +#endif + virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; @@ -584,6 +632,10 @@ class WXDLLIMPEXP_CORE wxGraphicsFigure : public wxGraphicsObject { public : wxGraphicsFigure(wxGraphicsRenderer* renderer) ; +#if wxABI_VERSION >= 20810 + wxGraphicsFigure( const wxGraphicsFigure& other) : wxGraphicsObject( other ) {} + wxGraphicsFigure& operator= (const wxGraphicsFigure & other) { Ref(other); return *this;} +#endif virtual ~wxGraphicsFigure() ; @@ -666,6 +718,10 @@ public : // sets the font virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) = 0; +#if wxABI_VERSION >= 20809 + wxGraphicsBitmap CreateBitmap( const wxBitmap &bmp ); +#endif + private : DECLARE_NO_COPY_CLASS(wxGraphicsRenderer) DECLARE_ABSTRACT_CLASS(wxGraphicsRenderer) diff --git a/Externals/wxWidgets/include/wx/hashmap.h b/Externals/wxWidgets/include/wx/hashmap.h index 11fca62306..425315dc0a 100644 --- a/Externals/wxWidgets/include/wx/hashmap.h +++ b/Externals/wxWidgets/include/wx/hashmap.h @@ -4,7 +4,7 @@ // Author: Mattia Barbon // Modified by: // Created: 29/01/2002 -// RCS-ID: $Id: hashmap.h 45498 2007-04-16 13:03:05Z VZ $ +// RCS-ID: $Id: hashmap.h 57388 2008-12-17 09:34:48Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,12 +14,34 @@ #include "wx/string.h" +// In wxUSE_STL build we prefer to use the standard hash map class but it can +// be either in non-standard hash_map header (old g++ and some other STL +// implementations) or in C++0x standard unordered_map which can in turn be +// available either in std::tr1 or std namespace itself +// +// To summarize: if std::unordered_map is available use it, otherwise use tr1 +// and finally fall back to non-standard hash_map + #if (defined(HAVE_EXT_HASH_MAP) || defined(HAVE_HASH_MAP)) \ && (defined(HAVE_GNU_CXX_HASH_MAP) || defined(HAVE_STD_HASH_MAP)) #define HAVE_STL_HASH_MAP #endif -#if wxUSE_STL && defined(HAVE_STL_HASH_MAP) +#if wxUSE_STL && \ + (defined(HAVE_STD_UNORDERED_MAP) || defined(HAVE_TR1_UNORDERED_MAP)) + +#if defined(HAVE_STD_UNORDERED_MAP) + #include + #define WX_HASH_MAP_NAMESPACE std +#elif defined(HAVE_TR1_UNORDERED_MAP) + #include + #define WX_HASH_MAP_NAMESPACE std::tr1 +#endif + +#define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ + typedef WX_HASH_MAP_NAMESPACE::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME + +#elif wxUSE_STL && defined(HAVE_STL_HASH_MAP) #if defined(HAVE_EXT_HASH_MAP) #include @@ -36,8 +58,9 @@ #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ typedef WX_HASH_MAP_NAMESPACE::hash_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME -#else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) +#else // !wxUSE_STL || no std::{hash,unordered}_map class available +#define wxNEEDS_WX_HASH_MAP #ifdef __WXWINCE__ typedef int ptrdiff_t; @@ -442,7 +465,7 @@ inline bool grow_lf70( size_t buckets, size_t items ) return float(items)/float(buckets) >= 0.85; } -#endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) +#endif // various hash map implementations // ---------------------------------------------------------------------------- // hashing and comparison functors @@ -452,7 +475,7 @@ inline bool grow_lf70( size_t buckets, size_t items ) // operators to suppress warnings about "statement with no effect" from gcc // in the hash table class assignment operator (where they're assigned) -#if wxUSE_STL && defined(HAVE_STL_HASH_MAP) +#ifndef wxNEEDS_WX_HASH_MAP // integer types class WXDLLIMPEXP_BASE wxIntegerHash @@ -496,7 +519,7 @@ public: wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } }; -#else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) +#else // wxNEEDS_WX_HASH_MAP // integer types class WXDLLIMPEXP_BASE wxIntegerHash @@ -517,7 +540,7 @@ public: wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } }; -#endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) +#endif // !wxNEEDS_WX_HASH_MAP/wxNEEDS_WX_HASH_MAP class WXDLLIMPEXP_BASE wxIntegerEqual { @@ -543,8 +566,8 @@ class WXDLLIMPEXP_BASE wxPointerHash public: wxPointerHash() { } -#if wxUSE_STL && defined(HAVE_STL_HASH_MAP) - size_t operator()( const void* k ) const { return (size_t)k; } +#ifdef wxNEEDS_WX_HASH_MAP + wxUIntPtr operator()( const void* k ) const { return wxPtrToUInt(k); } #else wxUIntPtr operator()( const void* k ) const { return wxPtrToUInt(k); } #endif @@ -596,7 +619,7 @@ public: wxStringEqual& operator=(const wxStringEqual&) { return *this; } }; -#if !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) +#ifdef wxNEEDS_WX_HASH_MAP #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ _WX_DECLARE_PAIR( KEY_T, VALUE_T, CLASSNAME##_wxImplementation_Pair, CLASSEXP ) \ @@ -637,8 +660,6 @@ public: \ Node *node = GetOrCreateNode( \ CLASSNAME##_wxImplementation_Pair( v.first, v.second ), \ created); \ - if ( !created ) \ - node->m_value.second = v.second; \ return Insert_Result(iterator(node, this), created); \ } \ \ @@ -655,7 +676,7 @@ public: \ } \ } -#endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP) +#endif // wxNEEDS_WX_HASH_MAP // these macros are to be used in the user code #define WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME) \ diff --git a/Externals/wxWidgets/include/wx/hashset.h b/Externals/wxWidgets/include/wx/hashset.h index b506fb08fc..ed161cbf2d 100644 --- a/Externals/wxWidgets/include/wx/hashset.h +++ b/Externals/wxWidgets/include/wx/hashset.h @@ -4,7 +4,7 @@ // Author: Mattia Barbon // Modified by: // Created: 11/08/2003 -// RCS-ID: $Id: hashset.h 49056 2007-10-05 22:42:35Z VS $ +// RCS-ID: $Id: hashset.h 55215 2008-08-23 18:54:04Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,7 +14,25 @@ #include "wx/hashmap.h" -#if wxUSE_STL && defined(HAVE_STL_HASH_MAP) +// see comment in wx/hashmap.h which also applies to different standard hash +// set classes + +#if wxUSE_STL && \ + (defined(HAVE_STD_UNORDERED_SET) || defined(HAVE_TR1_UNORDERED_SET)) + +#if defined(HAVE_STD_UNORDERED_SET) + #include + #define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP )\ + typedef std::unordered_set< KEY_T, HASH_T, KEY_EQ_T > CLASSNAME +#elif defined(HAVE_TR1_UNORDERED_SET) + #include + #define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP )\ + typedef std::tr1::unordered_set< KEY_T, HASH_T, KEY_EQ_T > CLASSNAME +#else +#error Update this code: unordered_set is available, but I do not know where. +#endif + +#elif wxUSE_STL && defined(HAVE_STL_HASH_MAP) #if defined(HAVE_EXT_HASH_MAP) #include diff --git a/Externals/wxWidgets/include/wx/html/winpars.h b/Externals/wxWidgets/include/wx/html/winpars.h index 14d5d05628..00ff54c40e 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 53457 2008-05-05 10:53:58Z VS $ +// RCS-ID: $Id: winpars.h 59260 2009-03-02 10:43:00Z VS $ // Copyright: (c) 1999 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -24,6 +24,7 @@ class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface; class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser; class WXDLLIMPEXP_FWD_HTML wxHtmlWinTagHandler; class WXDLLIMPEXP_FWD_HTML wxHtmlTagsModule; +struct wxHtmlWinParser_TextParsingState; //-------------------------------------------------------------------------------- @@ -221,22 +222,10 @@ private: wxEncodingConverter *m_EncConv; #endif - 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;
+    //     despite addition of two fields in wxHtmlWinParser_TextParsingState
+    wxHtmlWinParser_TextParsingState *m_textParsingState;
 
     DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
 };
diff --git a/Externals/wxWidgets/include/wx/list.h b/Externals/wxWidgets/include/wx/list.h
index e5078ee501..4b5ae06897 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 53135 2008-04-12 02:31:04Z VZ $
+// RCS-ID:      $Id: list.h 58742 2009-02-07 23:46:53Z VZ $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -296,7 +296,7 @@ private:
             push_front( e );                                                  \
             return compatibility_iterator( this, begin() );                   \
         }                                                                     \
-        compatibility_iterator Insert( compatibility_iterator & i, elT e )    \
+        compatibility_iterator Insert(const compatibility_iterator &i, elT e) \
         {                                                                     \
             return compatibility_iterator( this, insert( i.m_iter, e ) );     \
         }                                                                     \
@@ -1035,18 +1035,22 @@ private:
         }                                                                   \
         iterator insert(const iterator& it, const_reference v = value_type())\
         {                                                                   \
-            Insert(it.m_node, (const_base_reference)v);                     \
-            return iterator(it.m_node->GetPrevious(), GetLast());           \
+            if ( it == end() )                                              \
+                Append((const_base_reference)v);                            \
+            else                                                            \
+                Insert(it.m_node, (const_base_reference)v);                 \
+            iterator itprev(it);                                            \
+            return itprev--;                                                \
         }                                                                   \
         void insert(const iterator& it, size_type n, const_reference v = value_type())\
         {                                                                   \
             for(size_type i = 0; i < n; ++i)                                \
-                Insert(it.m_node, (const_base_reference)v);                 \
+                insert(it, v);                                              \
         }                                                                   \
         void insert(const iterator& it, const_iterator first, const const_iterator& last)\
         {                                                                   \
             for(; first != last; ++first)                                   \
-                Insert(it.m_node, (const_base_reference)*first);            \
+                insert(it, *first);                                         \
         }                                                                   \
         iterator erase(const iterator& it)                                  \
         {                                                                   \
@@ -1055,7 +1059,9 @@ private:
         }                                                                   \
         iterator erase(const iterator& first, const iterator& last)         \
         {                                                                   \
-            iterator next = last; ++next;                                   \
+            iterator next = last;                                           \
+            if ( next != end() )                                            \
+                ++next;                                                     \
             DeleteNodes(first.m_node, last.m_node);                         \
             return next;                                                    \
         }                                                                   \
@@ -1066,10 +1072,11 @@ private:
             { splice(it, l, l.begin(), l.end() ); }                         \
         void splice(const iterator& it, name& l, const iterator& first)     \
         {                                                                   \
-            iterator tmp = first; ++tmp;                                    \
-            if(it == first || it == tmp) return;                            \
-            insert(it, *first);                                             \
-            l.erase(first);                                                 \
+            if ( it != first )                                              \
+            {                                                               \
+                insert(it, *first);                                         \
+                l.erase(first);                                             \
+            }                                                               \
         }                                                                   \
         void remove(const_reference v)                                      \
             { DeleteObject((const_base_reference)v); }                      \
diff --git a/Externals/wxWidgets/include/wx/longlong.h b/Externals/wxWidgets/include/wx/longlong.h
index bab44e92f2..0bead4700f 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 53135 2008-04-12 02:31:04Z VZ $
+// RCS-ID:      $Id: longlong.h 54663 2008-07-16 15:22:22Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -113,9 +113,9 @@ public:
         // from long long
     wxLongLongNative(wxLongLong_t ll) : m_ll(ll) { }
         // from 2 longs
-    wxLongLongNative(long hi, unsigned long lo) : m_ll(0)
+    wxLongLongNative(wxInt32 hi, wxUint32 lo)
     {
-        // assign first to avoid precision loss!
+        // cast to wxLongLong_t first to avoid precision loss!
         m_ll = ((wxLongLong_t) hi) << 32;
         m_ll |= (wxLongLong_t) lo;
     }
@@ -160,11 +160,11 @@ public:
 
     // accessors
         // get high part
-    long GetHi() const
-        { return wx_truncate_cast(long, m_ll >> 32); }
+    wxInt32 GetHi() const
+        { return wx_truncate_cast(wxInt32, m_ll >> 32); }
         // get low part
-    unsigned long GetLo() const
-        { return wx_truncate_cast(unsigned long, m_ll); }
+    wxUint32 GetLo() const
+        { return wx_truncate_cast(wxUint32, m_ll); }
 
         // get absolute value
     wxLongLongNative Abs() const { return wxLongLongNative(*this).Abs(); }
@@ -350,9 +350,9 @@ public:
         // from long long
     wxULongLongNative(wxULongLong_t ll) : m_ll(ll) { }
         // from 2 longs
-    wxULongLongNative(unsigned long hi, unsigned long lo) : m_ll(0)
+    wxULongLongNative(wxUint32 hi, wxUint32 lo) : m_ll(0)
     {
-        // assign first to avoid precision loss!
+        // cast to wxLongLong_t first to avoid precision loss!
         m_ll = ((wxULongLong_t) hi) << 32;
         m_ll |= (wxULongLong_t) lo;
     }
@@ -392,11 +392,11 @@ public:
 
     // accessors
         // get high part
-    unsigned long GetHi() const
-        { return wx_truncate_cast(unsigned long, m_ll >> 32); }
+    wxUint32 GetHi() const
+        { return wx_truncate_cast(wxUint32, m_ll >> 32); }
         // get low part
-    unsigned long GetLo() const
-        { return wx_truncate_cast(unsigned long, m_ll); }
+    wxUint32 GetLo() const
+        { return wx_truncate_cast(wxUint32, m_ll); }
 
         // convert to native ulong long
     wxULongLong_t GetValue() const { return m_ll; }
diff --git a/Externals/wxWidgets/include/wx/msw/amd64.manifest b/Externals/wxWidgets/include/wx/msw/amd64.manifest
index 3e2d475715..60db9e3150 100644
--- a/Externals/wxWidgets/include/wx/msw/amd64.manifest
+++ b/Externals/wxWidgets/include/wx/msw/amd64.manifest
@@ -1,22 +1,22 @@
-
-
-
-wxWindows application
-
-    
-        
-    
-
-
+
+
+
+wxWindows application
+
+    
+        
+    
+
+
diff --git a/Externals/wxWidgets/include/wx/msw/ia64.manifest b/Externals/wxWidgets/include/wx/msw/ia64.manifest
index 4d00130f6d..242ea4b624 100644
--- a/Externals/wxWidgets/include/wx/msw/ia64.manifest
+++ b/Externals/wxWidgets/include/wx/msw/ia64.manifest
@@ -1,22 +1,22 @@
-
-
-
-wxWindows application
-
-    
-        
-    
-
-
+
+
+
+wxWindows application
+
+    
+        
+    
+
+
diff --git a/Externals/wxWidgets/include/wx/msw/listctrl.h b/Externals/wxWidgets/include/wx/msw/listctrl.h
index 4952609eea..e6fd884a8f 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 51773 2008-02-13 22:46:30Z VZ $
+// RCS-ID:      $Id: listctrl.h 54419 2008-06-29 01:35:24Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -12,7 +12,6 @@
 #ifndef _WX_LISTCTRL_H_
 #define _WX_LISTCTRL_H_
 
-#include "wx/dcbuffer.h"
 #include "wx/textctrl.h"
 
 class WXDLLIMPEXP_FWD_CORE wxImageList;
@@ -342,7 +341,6 @@ 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);
@@ -437,6 +435,11 @@ private:
     // UpdateStyle()), only should be called if InReportView()
     void MSWSetExListStyles();
 
+    // initialize the (already created) m_textCtrl with the associated HWND
+    void InitEditControl(WXHWND hWnd);
+
+    // destroy m_textCtrl if it's currently valid and reset it to NULL
+    void DeleteEditControl();
 
     DECLARE_DYNAMIC_CLASS(wxListCtrl)
     DECLARE_EVENT_TABLE()
diff --git a/Externals/wxWidgets/include/wx/msw/ole/uuid.h b/Externals/wxWidgets/include/wx/msw/ole/uuid.h
index 474964dcff..6a266d71b5 100644
--- a/Externals/wxWidgets/include/wx/msw/ole/uuid.h
+++ b/Externals/wxWidgets/include/wx/msw/ole/uuid.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     11.07.97
-// RCS-ID:      $Id: uuid.h 35650 2005-09-23 12:56:45Z MR $
+// RCS-ID:      $Id: uuid.h 55113 2008-08-18 11:30:10Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 //
@@ -74,6 +74,12 @@ public:
   bool Set(const wxChar *pc); // from a string, returns true if ok
   void Set(const UUID& uuid); // from another UUID (never fails)
 
+#if wxABI_VERSION >= 20809
+  // comparison operators
+  bool operator==(const Uuid& uuid) const;
+  bool operator!=(const Uuid& uuid) const;
+#endif // wxABI_VERSION >= 2.8.9
+
   // accessors
   operator const UUID*()   const { return &m_uuid;               }
   operator const wxChar*() const { return (wxChar *)(m_pszUuid); }
diff --git a/Externals/wxWidgets/include/wx/msw/tbar95.h b/Externals/wxWidgets/include/wx/msw/tbar95.h
index e5f465f3b6..4b1d4b66de 100644
--- a/Externals/wxWidgets/include/wx/msw/tbar95.h
+++ b/Externals/wxWidgets/include/wx/msw/tbar95.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: tbar95.h 44317 2007-01-25 23:35:07Z RD $
+// RCS-ID:      $Id: tbar95.h 58446 2009-01-26 23:32:16Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -142,6 +142,9 @@ protected:
     wxToolBarToolBase *m_pInTool;
 
 private:
+    // makes sure tool bitmap size is sufficient for all tools
+    void AdjustToolBitmapSize();
+
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxToolBar)
     DECLARE_NO_COPY_CLASS(wxToolBar)
diff --git a/Externals/wxWidgets/include/wx/msw/wince/chkconf.h b/Externals/wxWidgets/include/wx/msw/wince/chkconf.h
index c79f5ed5b2..12cca184f6 100644
--- a/Externals/wxWidgets/include/wx/msw/wince/chkconf.h
+++ b/Externals/wxWidgets/include/wx/msw/wince/chkconf.h
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     2005-03-07
-// RCS-ID:      $Id: chkconf.h 40023 2006-07-06 07:07:52Z ABX $
+// RCS-ID:      $Id: chkconf.h 55651 2008-09-16 08:03:55Z VZ $
 // Copyright:   (c) 2005 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -29,6 +29,16 @@
 #undef wxUSE_IPC
 #define wxUSE_IPC 0
 
+// no AUI under CE: it's unnecessary and currently doesn't compile
+#undef wxUSE_AUI
+#define wxUSE_AUI 0
+
+// no MDI under CE
+#undef wxUSE_MDI
+#define wxUSE_MDI 0
+#undef wxUSE_MDI_ARCHITECTURE
+#define wxUSE_MDI_ARCHITECTURE 0
+
 // metafiles are not supported neither
 #undef wxUSE_ENH_METAFILE
 #define wxUSE_ENH_METAFILE 0
diff --git a/Externals/wxWidgets/include/wx/msw/wince/net.h b/Externals/wxWidgets/include/wx/msw/wince/net.h
index f99209bd55..dbf04259f9 100644
--- a/Externals/wxWidgets/include/wx/msw/wince/net.h
+++ b/Externals/wxWidgets/include/wx/msw/wince/net.h
@@ -1,4 +1,5 @@
 // Copyright 1998, Ben Goetter.  All rights reserved.
+// Also released under wxWindows license - see src/msw/wince/net.cpp
 
 /*
  patch holes in winsock
diff --git a/Externals/wxWidgets/include/wx/msw/wince/smartphone.rc b/Externals/wxWidgets/include/wx/msw/wince/smartphone.rc
index 2be02497d3..0f13ac6697 100644
--- a/Externals/wxWidgets/include/wx/msw/wince/smartphone.rc
+++ b/Externals/wxWidgets/include/wx/msw/wince/smartphone.rc
@@ -1,67 +1,67 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/msw/wince/smartphone.h
-// Purpose:     resources for MS Smartphone build
-// Author:      Wlodzimierz ABX Skiba
-// Modified by:
-// Created:     01.05.2004
-// RCS-ID:      $Id: smartphone.rc 30036 2004-10-20 15:14:46Z VZ $
-// Copyright:   (c) Wlodzimierz Skiba
-// License:     wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#include 
-
-#include "wx/msw/wince/resources.h"
-
-STRINGTABLE
-BEGIN
-    IDS_EMPTY   ""
-END
-
-IDR_POPUP_1 MENU
-BEGIN
-    POPUP ""
-    BEGIN
-        MENUITEM "M", IDM_ITEM
-    END
-END
-
-IDR_POPUP_2 MENU
-BEGIN
-    POPUP ""
-    BEGIN
-        MENUITEM "M", IDM_ITEM
-    END
-    POPUP ""
-    BEGIN
-        MENUITEM "M", IDM_ITEM
-    END
-END
-
-IDR_MENUBAR_ONE_BUTTON RCDATA
-BEGIN
-    0,2,
-    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_BUTTON   | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU,
-    I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_BUTTON   | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU,
-END
-
-IDR_MENUBAR_LEFT_MENU RCDATA
-BEGIN
-    IDR_POPUP_1,1,
-    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0,
-END
-
-IDR_MENUBAR_RIGHT_MENU RCDATA
-BEGIN
-    IDR_POPUP_1,2,
-    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_BUTTON   | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU,
-    I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0,
-END
-
-IDR_MENUBAR_BOTH_MENUS RCDATA
-BEGIN
-    IDR_POPUP_2,2,
-    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0,
-    I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 1,
-END
-
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wx/msw/wince/smartphone.h
+// Purpose:     resources for MS Smartphone build
+// Author:      Wlodzimierz ABX Skiba
+// Modified by:
+// Created:     01.05.2004
+// RCS-ID:      $Id: smartphone.rc 30036 2004-10-20 15:14:46Z VZ $
+// Copyright:   (c) Wlodzimierz Skiba
+// License:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#include 
+
+#include "wx/msw/wince/resources.h"
+
+STRINGTABLE
+BEGIN
+    IDS_EMPTY   ""
+END
+
+IDR_POPUP_1 MENU
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "M", IDM_ITEM
+    END
+END
+
+IDR_POPUP_2 MENU
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "M", IDM_ITEM
+    END
+    POPUP ""
+    BEGIN
+        MENUITEM "M", IDM_ITEM
+    END
+END
+
+IDR_MENUBAR_ONE_BUTTON RCDATA
+BEGIN
+    0,2,
+    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_BUTTON   | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU,
+    I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_BUTTON   | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU,
+END
+
+IDR_MENUBAR_LEFT_MENU RCDATA
+BEGIN
+    IDR_POPUP_1,1,
+    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0,
+END
+
+IDR_MENUBAR_RIGHT_MENU RCDATA
+BEGIN
+    IDR_POPUP_1,2,
+    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_BUTTON   | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU,
+    I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0,
+END
+
+IDR_MENUBAR_BOTH_MENUS RCDATA
+BEGIN
+    IDR_POPUP_2,2,
+    I_IMAGENONE, IDM_LEFT,  TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0,
+    I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 1,
+END
+
diff --git a/Externals/wxWidgets/include/wx/msw/wince/wince.rc b/Externals/wxWidgets/include/wx/msw/wince/wince.rc
index 1c2e85ffe5..d1f542224f 100644
--- a/Externals/wxWidgets/include/wx/msw/wince/wince.rc
+++ b/Externals/wxWidgets/include/wx/msw/wince/wince.rc
@@ -1,26 +1,26 @@
-#include 
-
-#ifdef WIN32_PLATFORM_WFSP
-    #include "wx/msw/wince/smartphone.rc"
-#else
-
-// Dummy menubar/toolbar for WinCE
-
-5000 RCDATA DISCARDABLE
-BEGIN
-  // Popup menu name
-  5000,
-  // Count of items to put on the menu
-  0
-END
-
-5000 MENU DISCARDABLE
-BEGIN
-    POPUP "Dummy"
-    BEGIN
-    MENUITEM "Dummy" 99
-    END
-END
-
-#endif
-
+#include 
+
+#ifdef WIN32_PLATFORM_WFSP
+    #include "wx/msw/wince/smartphone.rc"
+#else
+
+// Dummy menubar/toolbar for WinCE
+
+5000 RCDATA DISCARDABLE
+BEGIN
+  // Popup menu name
+  5000,
+  // Count of items to put on the menu
+  0
+END
+
+5000 MENU DISCARDABLE
+BEGIN
+    POPUP "Dummy"
+    BEGIN
+    MENUITEM "Dummy" 99
+    END
+END
+
+#endif
+
diff --git a/Externals/wxWidgets/include/wx/msw/wx.manifest b/Externals/wxWidgets/include/wx/msw/wx.manifest
index 0d0bf1f16b..ecce6f5c3b 100644
--- a/Externals/wxWidgets/include/wx/msw/wx.manifest
+++ b/Externals/wxWidgets/include/wx/msw/wx.manifest
@@ -1,22 +1,22 @@
-
-
-
-wxWindows application
-
-    
-        
-    
-
-
+
+
+
+wxWindows application
+
+    
+        
+    
+
+
diff --git a/Externals/wxWidgets/include/wx/msw/wx.rc b/Externals/wxWidgets/include/wx/msw/wx.rc
index da8cfe8e05..60d52dc309 100644
--- a/Externals/wxWidgets/include/wx/msw/wx.rc
+++ b/Externals/wxWidgets/include/wx/msw/wx.rc
@@ -1,119 +1,119 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        wx.rc
-// Purpose:     wxWindows resource definitions. ALWAYS include
-//              this in your application resource file.
-// Author:      Julian Smart
-// Modified by:
-// Created:
-// Copyright:   (c) Julian Smart
-// RCS-ID:      $Id: wx.rc 43491 2006-11-18 16:46:59Z VZ $
-// Licence:     wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#if defined(__MWERKS__)
-#include 
-#else
-#include 
-#endif
-
-#if defined(_WIN32_WCE)
-    #include "wx/msw/wince/wince.rc"
-#endif
-
-#include "wx/msw/rcdefs.h"
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// This is the MDI Window menu
-//
-
-wxWindowMenu MENU DISCARDABLE
-BEGIN
-    POPUP "&Window"
-    BEGIN
-        MENUITEM "&Cascade",                    4002
-        MENUITEM "Tile &Horizontally",          4001
-        MENUITEM "Tile &Vertically",            4005
-	MENUITEM "", -1
-        MENUITEM "&Arrange Icons",              4003
-        MENUITEM "&Next",                       4004
-    END
-END
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Standard wxWindows Cursors
-//
-
-WXCURSOR_HAND           CURSOR  DISCARDABLE     "wx/msw/hand.cur"
-WXCURSOR_BULLSEYE       CURSOR  DISCARDABLE     "wx/msw/bullseye.cur"
-WXCURSOR_PENCIL         CURSOR  DISCARDABLE     "wx/msw/pencil.cur"
-WXCURSOR_MAGNIFIER      CURSOR  DISCARDABLE     "wx/msw/magnif1.cur"
-WXCURSOR_ROLLER         CURSOR  DISCARDABLE     "wx/msw/roller.cur"
-WXCURSOR_PBRUSH         CURSOR  DISCARDABLE     "wx/msw/pbrush.cur"
-WXCURSOR_PLEFT          CURSOR  DISCARDABLE     "wx/msw/pntleft.cur"
-WXCURSOR_PRIGHT         CURSOR  DISCARDABLE     "wx/msw/pntright.cur"
-WXCURSOR_BLANK          CURSOR  DISCARDABLE     "wx/msw/blank.cur"
-WXCURSOR_RIGHT_ARROW    CURSOR  DISCARDABLE     "wx/msw/rightarr.cur"
-WXCURSOR_CROSS          CURSOR  DISCARDABLE     "wx/msw/cross.cur"
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Default Icons
-//
-
-// First wx icon in alphabetical order, so it will be used by Explorer if the
-// application doesn't have any icons of its own
-wxICON_AAA                      ICON "wx/msw/std.ico"
-
-//wxDEFAULT_FRAME               ICON "wx/msw/std.ico"
-//wxDEFAULT_MDIPARENTFRAME      ICON "wx/msw/mdi.ico"
-//wxDEFAULT_MDICHILDFRAME       ICON "wx/msw/child.ico"
-
-// Standard small icons
-wxICON_SMALL_CLOSED_FOLDER      ICON "wx/msw/folder1.ico"
-wxICON_SMALL_OPEN_FOLDER        ICON "wx/msw/folder2.ico"
-wxICON_SMALL_FILE               ICON "wx/msw/file1.ico"
-wxICON_SMALL_COMPUTER           ICON "wx/msw/computer.ico"
-wxICON_SMALL_DRIVE              ICON "wx/msw/drive.ico"
-wxICON_SMALL_CDROM              ICON "wx/msw/cdrom.ico"
-wxICON_SMALL_FLOPPY             ICON "wx/msw/floppy.ico"
-wxICON_SMALL_REMOVEABLE         ICON "wx/msw/removble.ico"
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Bitmaps
-//
-
-// For wxContextHelpButton
-csquery                 BITMAP "wx/msw/csquery.bmp"
-
-// For obtaining the RGB values of standard colours
-wxBITMAP_STD_COLOURS    BITMAP "wx/msw/colours.bmp"
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Manifest file for Windows XP
-//
-
-#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
-#if !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130
-
-// see "about isolated applications" topic in MSDN
-#ifdef ISOLATION_AWARE_ENABLED
-#define wxMANIFEST_ID 2
-#else
-#define wxMANIFEST_ID 1
-#endif
-
-#if defined(WX_CPU_AMD64)
-wxMANIFEST_ID 24 "wx/msw/amd64.manifest"
-#elif defined(WX_CPU_IA64)
-wxMANIFEST_ID 24 "wx/msw/ia64.manifest"
-#elif defined(WX_CPU_X86)
-wxMANIFEST_ID 24 "wx/msw/wx.manifest"
-#endif
-
-#endif // !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130
-#endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
+/////////////////////////////////////////////////////////////////////////////
+// File:        wx.rc
+// Purpose:     wxWindows resource definitions. ALWAYS include
+//              this in your application resource file.
+// Author:      Julian Smart
+// Modified by:
+// Created:
+// Copyright:   (c) Julian Smart
+// RCS-ID:      $Id: wx.rc 43491 2006-11-18 16:46:59Z VZ $
+// Licence:     wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(__MWERKS__)
+#include 
+#else
+#include 
+#endif
+
+#if defined(_WIN32_WCE)
+    #include "wx/msw/wince/wince.rc"
+#endif
+
+#include "wx/msw/rcdefs.h"
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// This is the MDI Window menu
+//
+
+wxWindowMenu MENU DISCARDABLE
+BEGIN
+    POPUP "&Window"
+    BEGIN
+        MENUITEM "&Cascade",                    4002
+        MENUITEM "Tile &Horizontally",          4001
+        MENUITEM "Tile &Vertically",            4005
+	MENUITEM "", -1
+        MENUITEM "&Arrange Icons",              4003
+        MENUITEM "&Next",                       4004
+    END
+END
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Standard wxWindows Cursors
+//
+
+WXCURSOR_HAND           CURSOR  DISCARDABLE     "wx/msw/hand.cur"
+WXCURSOR_BULLSEYE       CURSOR  DISCARDABLE     "wx/msw/bullseye.cur"
+WXCURSOR_PENCIL         CURSOR  DISCARDABLE     "wx/msw/pencil.cur"
+WXCURSOR_MAGNIFIER      CURSOR  DISCARDABLE     "wx/msw/magnif1.cur"
+WXCURSOR_ROLLER         CURSOR  DISCARDABLE     "wx/msw/roller.cur"
+WXCURSOR_PBRUSH         CURSOR  DISCARDABLE     "wx/msw/pbrush.cur"
+WXCURSOR_PLEFT          CURSOR  DISCARDABLE     "wx/msw/pntleft.cur"
+WXCURSOR_PRIGHT         CURSOR  DISCARDABLE     "wx/msw/pntright.cur"
+WXCURSOR_BLANK          CURSOR  DISCARDABLE     "wx/msw/blank.cur"
+WXCURSOR_RIGHT_ARROW    CURSOR  DISCARDABLE     "wx/msw/rightarr.cur"
+WXCURSOR_CROSS          CURSOR  DISCARDABLE     "wx/msw/cross.cur"
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Default Icons
+//
+
+// First wx icon in alphabetical order, so it will be used by Explorer if the
+// application doesn't have any icons of its own
+wxICON_AAA                      ICON "wx/msw/std.ico"
+
+//wxDEFAULT_FRAME               ICON "wx/msw/std.ico"
+//wxDEFAULT_MDIPARENTFRAME      ICON "wx/msw/mdi.ico"
+//wxDEFAULT_MDICHILDFRAME       ICON "wx/msw/child.ico"
+
+// Standard small icons
+wxICON_SMALL_CLOSED_FOLDER      ICON "wx/msw/folder1.ico"
+wxICON_SMALL_OPEN_FOLDER        ICON "wx/msw/folder2.ico"
+wxICON_SMALL_FILE               ICON "wx/msw/file1.ico"
+wxICON_SMALL_COMPUTER           ICON "wx/msw/computer.ico"
+wxICON_SMALL_DRIVE              ICON "wx/msw/drive.ico"
+wxICON_SMALL_CDROM              ICON "wx/msw/cdrom.ico"
+wxICON_SMALL_FLOPPY             ICON "wx/msw/floppy.ico"
+wxICON_SMALL_REMOVEABLE         ICON "wx/msw/removble.ico"
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Bitmaps
+//
+
+// For wxContextHelpButton
+csquery                 BITMAP "wx/msw/csquery.bmp"
+
+// For obtaining the RGB values of standard colours
+wxBITMAP_STD_COLOURS    BITMAP "wx/msw/colours.bmp"
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Manifest file for Windows XP
+//
+
+#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
+#if !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130
+
+// see "about isolated applications" topic in MSDN
+#ifdef ISOLATION_AWARE_ENABLED
+#define wxMANIFEST_ID 2
+#else
+#define wxMANIFEST_ID 1
+#endif
+
+#if defined(WX_CPU_AMD64)
+wxMANIFEST_ID 24 "wx/msw/amd64.manifest"
+#elif defined(WX_CPU_IA64)
+wxMANIFEST_ID 24 "wx/msw/ia64.manifest"
+#elif defined(WX_CPU_X86)
+wxMANIFEST_ID 24 "wx/msw/wx.manifest"
+#endif
+
+#endif // !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130
+#endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
diff --git a/Externals/wxWidgets/include/wx/prntbase.h b/Externals/wxWidgets/include/wx/prntbase.h
index b915915472..196609c74f 100644
--- a/Externals/wxWidgets/include/wx/prntbase.h
+++ b/Externals/wxWidgets/include/wx/prntbase.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: prntbase.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: prntbase.h 54404 2008-06-28 15:32:52Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -575,6 +575,10 @@ protected:
 private:
     void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
 
+    // helpers for RenderPage():
+    bool RenderPageIntoDC(wxDC& dc, int pageNum);
+    bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
+
     DECLARE_NO_COPY_CLASS(wxPrintPreviewBase)
     DECLARE_CLASS(wxPrintPreviewBase)
 };
diff --git a/Externals/wxWidgets/include/wx/radiobox.h b/Externals/wxWidgets/include/wx/radiobox.h
index 27887d38d1..69a09c43ba 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 50255 2007-11-26 13:48:36Z VZ $
+// RCS-ID:      $Id: radiobox.h 54930 2008-08-02 19:45:23Z VZ $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,8 @@ public:
     unsigned int GetColumnCount() const { return m_numCols; }
     unsigned int GetRowCount() const { return m_numRows; }
 
-    // return the item above/below/to the left/right of the given one
+    // return the next active (i.e. shown and not disabled) item above/below/to
+    // the left/right of the given one
     int GetNextItem(int item, wxDirection dir, long style) const;
 
 #if wxUSE_TOOLTIPS
diff --git a/Externals/wxWidgets/include/wx/regex.h b/Externals/wxWidgets/include/wx/regex.h
index be6724bb87..0e69b83590 100644
--- a/Externals/wxWidgets/include/wx/regex.h
+++ b/Externals/wxWidgets/include/wx/regex.h
@@ -4,7 +4,7 @@
 // Author:      Karsten Ballueder
 // Modified by: VZ at 13.07.01 (integrated to wxWin)
 // Created:     05.02.2000
-// RCS-ID:      $Id: regex.h 53135 2008-04-12 02:31:04Z VZ $
+// RCS-ID:      $Id: regex.h 57779 2009-01-02 17:35:16Z PC $
 // Copyright:   (c) 2000 Karsten Ballueder 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -16,7 +16,7 @@
 
 #if wxUSE_REGEX
 
-class WXDLLIMPEXP_FWD_BASE wxString;
+#include "wx/string.h"
 
 // ----------------------------------------------------------------------------
 // constants
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextbuffer.h b/Externals/wxWidgets/include/wx/richtext/richtextbuffer.h
index f52dc890d3..274e47b460 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 53671 2008-05-20 13:23:07Z JS $
+// RCS-ID:      $Id: richtextbuffer.h 58841 2009-02-12 10:16:07Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -73,7 +73,11 @@
 // 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.
+#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
+#define wxRICHTEXT_USE_OWN_CARET 1
+#else
 #define wxRICHTEXT_USE_OWN_CARET 0
+#endif
 
 // Switch off for binary compatibility, on for faster drawing
 #define wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING 0
@@ -310,7 +314,7 @@ public:
 
     void operator =(const wxRichTextRange& range) { m_start = range.m_start; m_end = range.m_end; }
     bool operator ==(const wxRichTextRange& range) const { return (m_start == range.m_start && m_end == range.m_end); }
-    bool operator !=(const wxRichTextRange& range) const { return (m_start != range.m_start && m_end != range.m_end); }
+    bool operator !=(const wxRichTextRange& range) const { return (m_start != range.m_start || m_end != range.m_end); }
     wxRichTextRange operator -(const wxRichTextRange& range) const { return wxRichTextRange(m_start - range.m_start, m_end - range.m_end); }
     wxRichTextRange operator +(const wxRichTextRange& range) const { return wxRichTextRange(m_start + range.m_start, m_end + range.m_end); }
 
@@ -1067,7 +1071,7 @@ public:
     virtual int GetParagraphLength(long paragraphNumber) const;
 
     /// Get the number of paragraphs
-    virtual int GetParagraphCount() const { return GetChildCount(); }
+    virtual int GetParagraphCount() const { return wx_static_cast(int, GetChildCount()); }
 
     /// Get the number of visible lines
     virtual int GetLineCount() const;
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextctrl.h b/Externals/wxWidgets/include/wx/richtext/richtextctrl.h
index 2d203b9666..d73f34c00c 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 52136 2008-02-27 08:54:40Z JS $
+// RCS-ID:      $Id: richtextctrl.h 58256 2009-01-21 12:05:11Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -38,6 +38,8 @@ class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextStyleDefinition;
 
 #define wxRE_READONLY          0x0010
 #define wxRE_MULTILINE         0x0020
+#define wxRE_CENTRE_CARET      0x8000
+#define wxRE_CENTER_CARET      wxRE_CENTRE_CARET
 
 /* Flags
  */
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextprint.h b/Externals/wxWidgets/include/wx/richtext/richtextprint.h
index bbd7477eb3..c0185bbbc9 100644
--- a/Externals/wxWidgets/include/wx/richtext/richtextprint.h
+++ b/Externals/wxWidgets/include/wx/richtext/richtextprint.h
@@ -3,7 +3,7 @@
 // Purpose:     Rich text printing classes
 // Author:      Julian Smart
 // Created:     2006-10-23
-// RCS-ID:      $Id: richtextprint.h 43603 2006-11-22 17:11:53Z JS $
+// RCS-ID:      $Id: richtextprint.h 55146 2008-08-21 16:07:54Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -119,7 +119,7 @@ public:
     const wxRichTextHeaderFooterData& GetHeaderFooterData() const { return m_headerFooterData; }
 
     /// Sets margins in 10ths of millimetre. Defaults to 1 inch for margins.
-    void SetMargins(int top = 252, int bottom = 252, int left = 252, int right = 252);
+    void SetMargins(int top = 254, int bottom = 254, int left = 254, int right = 254);
 
     /// Calculate scaling and rectangles, setting the device context scaling
     void CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& headerRect, wxRect& footerRect);
diff --git a/Externals/wxWidgets/include/wx/richtext/richtextsymboldlg.h b/Externals/wxWidgets/include/wx/richtext/richtextsymboldlg.h
index c955026f34..47bf7d2bc9 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 50950 2007-12-30 16:11:12Z JS $
+// RCS-ID:      $Id: richtextsymboldlg.h 58466 2009-01-27 19:19:40Z BP $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@ class wxSymbolListCtrl;
  */
 
 #define SYMBOL_WXSYMBOLPICKERDIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX)
-#define SYMBOL_WXSYMBOLPICKERDIALOG_TITLE _("Symbols")
+#define SYMBOL_WXSYMBOLPICKERDIALOG_TITLE wxGetTranslation(wxT("Symbols"))
 #define SYMBOL_WXSYMBOLPICKERDIALOG_IDNAME ID_SYMBOLPICKERDIALOG
 #define SYMBOL_WXSYMBOLPICKERDIALOG_SIZE wxSize(400, 300)
 #define SYMBOL_WXSYMBOLPICKERDIALOG_POSITION wxDefaultPosition
diff --git a/Externals/wxWidgets/include/wx/settings.h b/Externals/wxWidgets/include/wx/settings.h
index ca823ba5f3..471ab61258 100644
--- a/Externals/wxWidgets/include/wx/settings.h
+++ b/Externals/wxWidgets/include/wx/settings.h
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: settings.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: settings.h 57542 2008-12-25 13:03:24Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -79,6 +79,7 @@ enum wxSystemColour
     wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
     wxSYS_COLOUR_MENUHILIGHT,
     wxSYS_COLOUR_MENUBAR,
+    wxSYS_COLOUR_LISTBOXTEXT,
 
     wxSYS_COLOUR_MAX
 };
diff --git a/Externals/wxWidgets/include/wx/version.h b/Externals/wxWidgets/include/wx/version.h
index 59cb9804fb..47ae7bfabc 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 53651 2008-05-19 19:09:22Z CE $
+ *  RCS-ID:      $Id: version.h 58872 2009-02-13 09:18:23Z 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     8
+#define wxRELEASE_NUMBER     10
 #define wxSUBRELEASE_NUMBER  0
-#define wxVERSION_STRING   _T("wxWidgets 2.8.8")
+#define wxVERSION_STRING   _T("wxWidgets 2.8.10")
 
 /*  nothing to update below this line when updating the version */
 /*  ---------------------------------------------------------------------------- */
diff --git a/Externals/wxWidgets/include/wx/window.h b/Externals/wxWidgets/include/wx/window.h
index 3e9e302064..54dc38d890 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 52330 2008-03-05 14:19:38Z VS $
+// RCS-ID:      $Id: window.h 56758 2008-11-13 22:32:21Z VS $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -1004,14 +1004,21 @@ public:
     void SetToolTip( const wxString &tip );
         // attach a tooltip to the window
     void SetToolTip( wxToolTip *tip ) { DoSetToolTip(tip); }
+#if wxABI_VERSION >= 20809
+        // more readable synonym for SetToolTip(NULL)
+    void UnsetToolTip() { SetToolTip(NULL); }
+#endif // wxABI_VERSION >= 2.8.9
         // get the associated tooltip or NULL if none
     wxToolTip* GetToolTip() const { return m_tooltip; }
     wxString GetToolTipText() const ;
-#else
+#else // !wxUSE_TOOLTIPS
         // make it much easier to compile apps in an environment
         // that doesn't support tooltips, such as PocketPC
-    inline void SetToolTip( const wxString & WXUNUSED(tip) ) {}
-#endif // wxUSE_TOOLTIPS
+    void SetToolTip( const wxString & WXUNUSED(tip) ) {}
+#if wxABI_VERSION >= 20809
+    void UnsetToolTip() { }
+#endif // wxABI_VERSION >= 2.8.9
+#endif // wxUSE_TOOLTIPS/!wxUSE_TOOLTIPS
 
     // drag and drop
     // -------------
@@ -1020,6 +1027,14 @@ public:
         // NULL; it's owned by the window and will be deleted by it)
     virtual void SetDropTarget( wxDropTarget *dropTarget ) = 0;
     virtual wxDropTarget *GetDropTarget() const { return m_dropTarget; }
+
+#ifndef __WXMSW__ // MSW version is in msw/window.h
+#if wxABI_VERSION >= 20810
+    // Accept files for dragging
+    void DragAcceptFiles(bool accept);
+#endif // wxABI_VERSION >= 20810
+#endif // !__WXMSW__
+
 #endif // wxUSE_DRAG_AND_DROP
 
     // constraints and sizers
diff --git a/Externals/wxWidgets/include/wx/xrc/xmlres.h b/Externals/wxWidgets/include/wx/xrc/xmlres.h
index 381a0f653c..0b41eefb2e 100644
--- a/Externals/wxWidgets/include/wx/xrc/xmlres.h
+++ b/Externals/wxWidgets/include/wx/xrc/xmlres.h
@@ -3,7 +3,7 @@
 // Purpose:     XML resources
 // Author:      Vaclav Slavik
 // Created:     2000/03/05
-// RCS-ID:      $Id: xmlres.h 49563 2007-10-31 20:46:21Z VZ $
+// RCS-ID:      $Id: xmlres.h 55504 2008-09-07 09:15:46Z VS $
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -128,8 +128,6 @@ public:
     // Destructor.
     virtual ~wxXmlResource();
 
-    wxXmlNode *GetFirstRoot();
-    
     // Loads resources from XML files that match given filemask.
     // This method understands VFS (see filesys.h).
     bool Load(const wxString& filemask);
diff --git a/Externals/wxWidgets/include/wx/zstream.h b/Externals/wxWidgets/include/wx/zstream.h
index 3efc68fdb9..8f70513124 100644
--- a/Externals/wxWidgets/include/wx/zstream.h
+++ b/Externals/wxWidgets/include/wx/zstream.h
@@ -4,7 +4,7 @@
 // Author:      Guilhem Lavaux
 // Modified by: Mike Wetherell
 // Created:     11/07/98
-// RCS-ID:      $Id: zstream.h 42713 2006-10-30 11:56:12Z ABX $
+// RCS-ID:      $Id: zstream.h 54688 2008-07-18 08:06:44Z MW $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -125,11 +125,11 @@ public:
     wxFilterInputStream *NewStream(wxInputStream& stream) const
         { return new wxZlibInputStream(stream); }
     wxFilterOutputStream *NewStream(wxOutputStream& stream) const
-        { return new wxZlibOutputStream(stream, -1); }
+        { return new wxZlibOutputStream(stream, -1, wxZLIB_GZIP); }
     wxFilterInputStream *NewStream(wxInputStream *stream) const
         { return new wxZlibInputStream(stream); }
     wxFilterOutputStream *NewStream(wxOutputStream *stream) const
-        { return new wxZlibOutputStream(stream, -1); }
+        { return new wxZlibOutputStream(stream, -1, wxZLIB_GZIP); }
 
     const wxChar * const *GetProtocols(wxStreamProtocolType type
                                        = wxSTREAM_PROTOCOL) const;
diff --git a/Externals/wxWidgets/src/common/artprov.cpp b/Externals/wxWidgets/src/common/artprov.cpp
index 23d2830e26..5fec0e1c9e 100644
--- a/Externals/wxWidgets/src/common/artprov.cpp
+++ b/Externals/wxWidgets/src/common/artprov.cpp
@@ -4,7 +4,7 @@
 // Author:      Vaclav Slavik
 // Modified by:
 // Created:     18/03/2002
-// RCS-ID:      $Id: artprov.cpp 41398 2006-09-23 20:16:18Z VZ $
+// RCS-ID:      $Id: artprov.cpp 57701 2008-12-31 23:40:06Z VS $
 // Copyright:   (c) Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -30,6 +30,10 @@
     #include "wx/module.h"
 #endif
 
+#ifdef __WXMSW__
+    #include "wx/msw/wrapwin.h"
+#endif
+
 // ===========================================================================
 // implementation
 // ===========================================================================
@@ -135,6 +139,11 @@ wxArtProvider::~wxArtProvider()
     sm_providers->Append(provider);
 }
 
+/*static*/ void wxArtProvider::PushBack(wxArtProvider *provider)
+{
+    Insert(provider);
+}
+
 /*static*/ bool wxArtProvider::Pop()
 {
     wxCHECK_MSG( sm_providers, false, _T("no wxArtProvider exists") );
@@ -272,7 +281,14 @@ wxArtProvider::~wxArtProvider()
     else if (client == wxART_MENU)
         return wxSize(16, 15);
     else if (client == wxART_FRAME_ICON)
-        return wxSize(16, 15);
+    {
+#ifdef __WXMSW__
+        return wxSize(::GetSystemMetrics(SM_CXSMICON),
+                      ::GetSystemMetrics(SM_CYSMICON));
+#else
+        return wxSize(16, 16);
+#endif // __WXMSW__/!__WXMSW__
+    }
     else if (client == wxART_CMN_DIALOG || client == wxART_MESSAGE_BOX)
         return wxSize(32, 32);
     else if (client == wxART_HELP_BROWSER)
diff --git a/Externals/wxWidgets/src/common/base.rc b/Externals/wxWidgets/src/common/base.rc
index 56f595a89d..5a814417f0 100644
--- a/Externals/wxWidgets/src/common/base.rc
+++ b/Externals/wxWidgets/src/common/base.rc
@@ -1,49 +1,49 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        src/base/base.rc
-// Purpose:     contains version info resource for wxBase DLL build
-// Author:      Vadim Zeitlin
-// Modified by:
-// Created:     09.07.00
-// RCS-ID:      $Id: base.rc 13410 2002-01-06 14:51:28Z VS $
-// Copyright:   (c) 2000 Vadim Zeitlin
-// Licence:     wxWindows license
-///////////////////////////////////////////////////////////////////////////////
-
-#include "wx/version.h"
-
-#ifdef _DEBUG
-    #define DLL_FLAGS 0x1L
-    #define DLL_SUFFIX "d"
-#else
-    #define DLL_FLAGS 0x0L
-    #define DLL_SUFFIX ""
-#endif
-
-1 VERSIONINFO
- FILEVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER
- PRODUCTVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER
- FILEFLAGSMASK 0x3fL
- FILEFLAGS DLL_FLAGS
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "Comments", "wxBase (part of Windows) cross-platform framework\0"
-            VALUE "CompanyName", "wxWindows development team\0"
-            VALUE "FileDescription", "wxBase is a non GUI part of wxWindows\0"
-            VALUE "FileVersion", wxVERSION_NUM_DOT_STRING "\0"
-            VALUE "InternalName", "wxBase\0"
-            VALUE "LegalCopyright", "Copyright © 1993-2002 wxWindows development team\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", "wxbase" wxVERSION_NUM_STRING DLL_SUFFIX ".dll\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "wxWindows\0"
-            VALUE "ProductVersion", wxVERSION_NUM_DOT_STRING "\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-END
+///////////////////////////////////////////////////////////////////////////////
+// Name:        src/base/base.rc
+// Purpose:     contains version info resource for wxBase DLL build
+// Author:      Vadim Zeitlin
+// Modified by:
+// Created:     09.07.00
+// RCS-ID:      $Id: base.rc 13410 2002-01-06 14:51:28Z VS $
+// Copyright:   (c) 2000 Vadim Zeitlin
+// Licence:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+#include "wx/version.h"
+
+#ifdef _DEBUG
+    #define DLL_FLAGS 0x1L
+    #define DLL_SUFFIX "d"
+#else
+    #define DLL_FLAGS 0x0L
+    #define DLL_SUFFIX ""
+#endif
+
+1 VERSIONINFO
+ FILEVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER
+ PRODUCTVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS DLL_FLAGS
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "Comments", "wxBase (part of Windows) cross-platform framework\0"
+            VALUE "CompanyName", "wxWindows development team\0"
+            VALUE "FileDescription", "wxBase is a non GUI part of wxWindows\0"
+            VALUE "FileVersion", wxVERSION_NUM_DOT_STRING "\0"
+            VALUE "InternalName", "wxBase\0"
+            VALUE "LegalCopyright", "Copyright © 1993-2002 wxWindows development team\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "wxbase" wxVERSION_NUM_STRING DLL_SUFFIX ".dll\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "wxWindows\0"
+            VALUE "ProductVersion", wxVERSION_NUM_DOT_STRING "\0"
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+END
diff --git a/Externals/wxWidgets/src/common/cmdline.cpp b/Externals/wxWidgets/src/common/cmdline.cpp
index 23ed34222c..041b6494de 100644
--- a/Externals/wxWidgets/src/common/cmdline.cpp
+++ b/Externals/wxWidgets/src/common/cmdline.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     05.01.00
-// RCS-ID:      $Id: cmdline.cpp 42197 2006-10-21 14:04:27Z VZ $
+// RCS-ID:      $Id: cmdline.cpp 54704 2008-07-19 01:53:04Z VZ $
 // Copyright:   (c) 2000 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -1235,7 +1235,7 @@ wxArrayString wxCmdLineParser::ConvertStringToArgs(const wxChar *p)
                 break;
             }
 
-            lastBS = *p == _T('\\');
+            lastBS = !lastBS && *p == _T('\\');
 
             arg += *p;
         }
diff --git a/Externals/wxWidgets/src/common/combocmn.cpp b/Externals/wxWidgets/src/common/combocmn.cpp
index 86bd1e01ef..e07f7d93a8 100644
--- a/Externals/wxWidgets/src/common/combocmn.cpp
+++ b/Externals/wxWidgets/src/common/combocmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     Apr-30-2006
-// RCS-ID:      $Id: combocmn.cpp 45512 2007-04-16 20:51:27Z RD $
+// RCS-ID:      $Id: combocmn.cpp 55201 2008-08-23 08:20:00Z RR $
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1138,6 +1138,8 @@ bool wxComboCtrlBase::Enable(bool enable)
         m_btn->Enable(enable);
     if ( m_text )
         m_text->Enable(enable);
+        
+    Refresh();
 
     return true;
 }
@@ -1194,16 +1196,15 @@ void wxComboCtrlBase::SetValidator(const wxValidator& validator)
 
     if ( textCtrl )
         textCtrl->SetValidator( validator );
+    else
+        wxControl::SetValidator( validator );
 }
 
 wxValidator* wxComboCtrlBase::GetValidator()
 {
     wxTextCtrl* textCtrl = GetTextCtrl();
 
-    if ( textCtrl )
-        return textCtrl->GetValidator();
-
-    return wxControl::GetValidator();
+    return textCtrl ? textCtrl->GetValidator() : wxControl::GetValidator();
 }
 #endif // wxUSE_VALIDATORS
 
diff --git a/Externals/wxWidgets/src/common/datetime.cpp b/Externals/wxWidgets/src/common/datetime.cpp
index 616d6463c2..bd0d99a051 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 53900 2008-06-01 14:37:26Z VZ $
+// RCS-ID:      $Id: datetime.cpp 58486 2009-01-28 21:52:37Z VZ $
 // Copyright:   (c) 1999 Vadim Zeitlin 
 //              parts of code taken from sndcal library by Scott E. Lee:
 //
@@ -147,59 +147,26 @@ wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringCon
 #if !defined(WX_TIMEZONE) && !defined(WX_GMTOFF_IN_TM)
     #if defined(__WXPALMOS__)
         #define WX_GMTOFF_IN_TM
-    #elif defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
+    #elif defined(__WXMSW__)
+        static long wxGetTimeZone()
+        {
+            static long s_timezone = MAXLONG; // invalid timezone
+            if (s_timezone == MAXLONG)
+            {
+                TIME_ZONE_INFORMATION info;
+                GetTimeZoneInformation(&info);
+                s_timezone = info.Bias * 60;  // convert minutes to seconds
+            }
+            return s_timezone;
+        }
+        #define WX_TIMEZONE wxGetTimeZone()
+    #elif defined(__VISAGECPP__)
         #define WX_TIMEZONE _timezone
     #elif defined(__MWERKS__)
         long wxmw_timezone = 28800;
         #define WX_TIMEZONE wxmw_timezone
-    #elif defined(__DJGPP__) || defined(__WINE__)
-        #include 
-        #include 
-        static long wxGetTimeZone()
-        {
-            static long timezone = MAXLONG; // invalid timezone
-            if (timezone == MAXLONG)
-            {
-                struct timeb tb;
-                ftime(&tb);
-                timezone = tb.timezone;
-            }
-            return timezone;
-        }
-        #define WX_TIMEZONE wxGetTimeZone()
     #elif defined(__DARWIN__)
         #define WX_GMTOFF_IN_TM
-    #elif defined(__WXWINCE__) && defined(__VISUALC8__)
-        // _timezone is not present in dynamic run-time library
-        #if 0
-        // Solution (1): use the function equivalent of _timezone
-        static long wxGetTimeZone()
-        {
-            static long s_Timezone = MAXLONG; // invalid timezone
-            if (s_Timezone == MAXLONG)
-            {
-                int t;
-                _get_timezone(& t);
-                s_Timezone = (long) t;
-            }
-            return s_Timezone;
-        }
-        #define WX_TIMEZONE wxGetTimeZone()
-        #elif 1
-        // Solution (2): using GetTimeZoneInformation
-        static long wxGetTimeZone()
-        {
-            static long timezone = MAXLONG; // invalid timezone
-            if (timezone == MAXLONG)
-            {
-                TIME_ZONE_INFORMATION tzi;
-                ::GetTimeZoneInformation(&tzi);
-                timezone = tzi.Bias;
-            }
-            return timezone;
-        }
-        #define WX_TIMEZONE wxGetTimeZone()
-        #endif
     #else // unknown platform - try timezone
         #define WX_TIMEZONE timezone
     #endif
@@ -1272,6 +1239,17 @@ wxDateTime wxDateTime::GetBeginDST(int year, Country country)
                             wxFAIL_MSG( _T("no first Sunday in April?") );
                         }
                     }
+                    else if ( year > 2006 )
+                    // Energy Policy Act of 2005, Pub. L. no. 109-58, 119 Stat 594 (2005).
+                    // Starting in 2007, daylight time begins in the United States on the
+                    // second Sunday in March and ends on the first Sunday in November
+                    {
+                        if ( !dt.SetToWeekDay(Sun, 2, Mar, year) )
+                        {
+                            // weird...
+                            wxFAIL_MSG( _T("no second Sunday in March?") );
+                        }
+                    }
                     else
                     {
                         if ( !dt.SetToWeekDay(Sun, 1, Apr, year) )
@@ -1351,21 +1329,36 @@ wxDateTime wxDateTime::GetEndDST(int year, Country country)
                     dt.Set(30, Sep, year);
                     break;
 
-                default:
-                    // DST ends at 2 a.m. on the last Sunday of October
-                    if ( !dt.SetToLastWeekDay(Sun, Oct, year) )
+                default: // default for switch (year)
+                    if ( year > 2006 )
+                      // Energy Policy Act of 2005, Pub. L. no. 109-58, 119 Stat 594 (2005).
+                      // Starting in 2007, daylight time begins in the United States on the
+                      // second Sunday in March and ends on the first Sunday in November
                     {
-                        // weirder and weirder...
-                        wxFAIL_MSG( _T("no last Sunday in October?") );
+                        if ( !dt.SetToWeekDay(Sun, 1, Nov, year) )
+                        {
+                            // weird...
+                            wxFAIL_MSG( _T("no first Sunday in November?") );
+                        }
+                    }
+                    else
+                     // pre-2007
+                     // DST ends at 2 a.m. on the last Sunday of October
+                    {
+                        if ( !dt.SetToLastWeekDay(Sun, Oct, year) )
+                        {
+                            // weirder and weirder...
+                            wxFAIL_MSG( _T("no last Sunday in October?") );
+                        }
                     }
 
                     dt += wxTimeSpan::Hours(2);
 
-                    // TODO what about timezone??
+            // TODO: what about timezone??
             }
             break;
 
-        default:
+        default: // default for switch (country)
             // assume October 26th as the end of the DST - totally bogus too
             dt.Set(26, Oct, year);
     }
@@ -4304,7 +4297,16 @@ enum TimeSpanPart
 //  %l          milliseconds (000 - 999)
 wxString wxTimeSpan::Format(const wxChar *format) const
 {
-    wxCHECK_MSG( format, wxEmptyString, _T("NULL format in wxTimeSpan::Format") );
+    // we deal with only positive time spans here and just add the sign in
+    // front for the negative ones
+    if ( IsNegative() )
+    {
+        wxString str(Negate().Format(format));
+        return _T("-") + str;
+    }
+
+    wxCHECK_MSG( format, wxEmptyString,
+                 _T("NULL format in wxTimeSpan::Format") );
 
     wxString str;
     str.Alloc(wxStrlen(format));
@@ -4374,13 +4376,6 @@ wxString wxTimeSpan::Format(const wxChar *format) const
                     n = GetHours();
                     if ( partBiggest < Part_Hour )
                     {
-                        if ( n < 0 )
-                        {
-                            // the sign has already been taken into account
-                            // when outputting the biggest part
-                            n = -n;
-                        }
-
                         n %= HOURS_PER_DAY;
                     }
                     else
@@ -4395,9 +4390,6 @@ wxString wxTimeSpan::Format(const wxChar *format) const
                     n = GetMilliseconds().ToLong();
                     if ( partBiggest < Part_MSec )
                     {
-                        if ( n < 0 )
-                            n = -n;
-
                         n %= 1000;
                     }
                     //else: no need to reset partBiggest to Part_MSec, it is
@@ -4410,9 +4402,6 @@ wxString wxTimeSpan::Format(const wxChar *format) const
                     n = GetMinutes();
                     if ( partBiggest < Part_Min )
                     {
-                        if ( n < 0 )
-                            n = -n;
-
                         n %= MIN_PER_HOUR;
                     }
                     else
@@ -4427,9 +4416,6 @@ wxString wxTimeSpan::Format(const wxChar *format) const
                     n = GetSeconds().ToLong();
                     if ( partBiggest < Part_Sec )
                     {
-                        if ( n < 0 )
-                            n = -n;
-
                         n %= SEC_PER_MIN;
                     }
                     else
@@ -4443,10 +4429,6 @@ wxString wxTimeSpan::Format(const wxChar *format) const
 
             if ( digits )
             {
-                // negative numbers need one extra position for '-' display
-                if ( n < 0 )
-                    digits++;
-
                 fmtPrefix << _T("0") << digits;
             }
 
diff --git a/Externals/wxWidgets/src/common/dcbase.cpp b/Externals/wxWidgets/src/common/dcbase.cpp
index 0d184a7c33..ecc821d002 100644
--- a/Externals/wxWidgets/src/common/dcbase.cpp
+++ b/Externals/wxWidgets/src/common/dcbase.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     05/25/99
-// RCS-ID:      $Id: dcbase.cpp 48616 2007-09-09 19:36:50Z VZ $
+// RCS-ID:      $Id: dcbase.cpp 56135 2008-10-06 21:04:02Z VZ $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1157,3 +1157,18 @@ void wxDCBase::CalculateEllipticPoints( wxList* points,
 } // CalculateEllipticPoints
 
 #endif
+
+
+float wxDCBase::GetFontPointSizeAdjustment(float dpi)
+{
+    // wxMSW has long-standing bug where wxFont point size is interpreted as
+    // "pixel size corresponding to given point size *on screen*". In other
+    // words, on a typical 600dpi printer and a typical 96dpi screen, fonts
+    // are ~6 times smaller when printing. Unfortunately, this bug is so severe
+    // that *all* printing code has to account for it and consequently, other
+    // ports need to emulate this bug too:
+    const wxSize screenPixels = wxGetDisplaySize();
+    const wxSize screenMM = wxGetDisplaySizeMM();
+    const float screenPPI_y = (screenPixels.y * 25.4) / screenMM.y;
+    return screenPPI_y / dpi;
+}
diff --git a/Externals/wxWidgets/src/common/descrip.mms b/Externals/wxWidgets/src/common/descrip.mms
index 5b9544a245..b5c7b37ae8 100644
--- a/Externals/wxWidgets/src/common/descrip.mms
+++ b/Externals/wxWidgets/src/common/descrip.mms
@@ -1,583 +1,583 @@
-#*****************************************************************************
-#                                                                            *
-# Make file for VMS                                                          *
-# Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
-# Date : 1 December 2006                                                     *
-#                                                                            *
-#*****************************************************************************
-.first
-	define wx [--.include.wx]
-
-.ifdef __WXMOTIF__
-CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
-	   /assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)
-.else
-.ifdef __WXGTK__
-CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
-	   /assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm
-.else
-.ifdef __WXGTK2__
-CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)/ieee=denorm\
-	   /assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)/ieee=denorm
-.else
-.ifdef __WXX11__
-CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
-	/name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
-	/name=(as_is,short)
-.else
-CXX_DEFINE =
-CC_DEFINE =
-.endif
-.endif
-.endif
-.endif
-
-YACC=bison/yacc
-
-SED=gsed
-
-LEX=flex
-
-.suffixes : .cpp
-
-.cpp.obj :
-	cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
-.c.obj :
-	cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c
-
-OBJECTS = \
-		anidecod.obj,\
-		animatecmn.obj,\
-		appbase.obj,\
-		appcmn.obj,\
-		artprov.obj,\
-		artstd.obj,\
-		bmpbase.obj,\
-		bookctrl.obj,\
-		choiccmn.obj,\
-		clipcmn.obj,\
-		clntdata.obj,\
-		cmdline.obj,\
-		cmdproc.obj,\
-		cmndata.obj,\
-		config.obj,\
-		containr.obj,\
-		convauto.obj,\
-		colourcmn.obj,\
-		cshelp.obj,\
-		ctrlcmn.obj,\
-		ctrlsub.obj,\
-		datacmn.obj,\
-		datetime.obj,\
-		datstrm.obj,\
-		db.obj,\
-		dbgrid.obj,\
-		dbtable.obj,\
-		dcbase.obj,\
-		dcbufcmn.obj,\
-		dircmn.obj,\
-		dlgcmn.obj,\
-		dobjcmn.obj,\
-		docmdi.obj,\
-		docview.obj,\
-		dpycmn.obj,\
-		dynarray.obj,\
-		dynlib.obj,\
-		encconv.obj,\
-		event.obj,\
-		evtloopcmn.obj,\
-		extended.obj,\
-		fddlgcmn.obj,\
-		ffile.obj,\
-		file.obj,\
-		fileback.obj,\
-		fileconf.obj,\
-		filename.obj,\
-		filefn.obj,\
-		filesys.obj,\
-		fldlgcmn.obj,\
-		fmapbase.obj,\
-		fontcmn.obj,\
-		fontenumcmn.obj,\
-		fontmap.obj,\
-		framecmn.obj
-
-OBJECTS1=fs_inet.obj,\
-		ftp.obj,\
-		gaugecmn.obj,\
-		gbsizer.obj,\
-		gdicmn.obj,\
-		gifdecod.obj,\
-		hash.obj,\
-		hashmap.obj,\
-		helpbase.obj,\
-		http.obj,\
-		iconbndl.obj,\
-		init.obj,\
-		imagall.obj,\
-		imagbmp.obj,\
-		image.obj,\
-		imagfill.obj,\
-		imaggif.obj,\
-		imagiff.obj,\
-		imagjpeg.obj,\
-		imagpcx.obj,\
-		imagpng.obj,\
-		imagpnm.obj,\
-		imagtga.obj,\
-		imagtiff.obj,\
-		imagxpm.obj,\
-		intl.obj,\
-		ipcbase.obj,\
-		layout.obj,\
-		lboxcmn.obj,\
-		list.obj,\
-		log.obj,\
-		longlong.obj,\
-		memory.obj,\
-		menucmn.obj,\
-		mimecmn.obj,\
-		module.obj,\
-		msgout.obj,\
-		mstream.obj,\
-		nbkbase.obj,\
-		object.obj,\
-		paper.obj,\
-		platinfo.obj,\
-		popupcmn.obj,\
-		prntbase.obj,\
-		process.obj,\
-		protocol.obj,\
-		quantize.obj,\
-		radiocmn.obj,\
-		rendcmn.obj,\
-		sckaddr.obj,\
-		sckfile.obj,\
-		sckipc.obj,\
-		sckstrm.obj,\
-		sizer.obj,\
-		socket.obj,\
-		settcmn.obj,\
-		statbar.obj,\
-		stdpbase.obj,\
-		stockitem.obj,\
-		stopwatch.obj,\
-		strconv.obj,\
-		stream.obj,\
-		string.obj,\
-		sysopt.obj
-
-OBJECTS2=tbarbase.obj,\
-		textbuf.obj,\
-		textcmn.obj,\
-		textfile.obj,\
-		timercmn.obj,\
-		tokenzr.obj,\
-		toplvcmn.obj,\
-		treebase.obj,\
-		txtstrm.obj,\
-		url.obj,\
-		utilscmn.obj,\
-		rgncmn.obj,\
-		uri.obj,\
-		valgen.obj,\
-		validate.obj,\
-		valtext.obj,\
-		variant.obj,\
-		wfstream.obj,\
-		wxchar.obj,\
-		wincmn.obj,\
-		xpmdecod.obj,\
-		zipstrm.obj,\
-		zstream.obj,\
-		clrpickercmn.obj,\
-		filepickercmn.obj,\
-		fontpickercmn.obj,\
-		pickerbase.obj,\
-		listctrlcmn.obj
-
-OBJECTS_MOTIF=radiocmn.obj,combocmn.obj
-
-OBJECTS_X11=accesscmn.obj,dndcmn.obj,dpycmn.obj,dseldlg.obj,\
-	dynload.obj,effects.obj,fddlgcmn.obj,fs_mem.obj,\
-	gbsizer.obj,geometry.obj,matrix.obj,radiocmn.obj,\
-	regex.obj,taskbarcmn.obj,xti.obj,xtistrm.obj,xtixml.obj,\
-	combocmn.obj
-
-OBJECTS_X11_2=socketevtdispatch.obj
-
-SOURCES = \
-		anidecod.cpp,\
-		animatecmn.cpp,\
-		appbase.cpp,\
-		appcmn.cpp,\
-		artprov.cpp,\
-		artstd.cpp,\
-		bmpbase.cpp,\
-		bookctrl.cpp,\
-		choiccmn.cpp,\
-		clipcmn.cpp,\
-		clntdata.cpp,\
-		cmdline.cpp,\
-		cmdproc.cpp,\
-		cmndata.cpp,\
-		config.cpp,\
-		containr.cpp,\
-		convauto.cpp,\
-		colourcmn.cpp,\
-		cshelp.cpp,\
-		ctrlcmn.cpp,\
-		ctrlsub.cpp,\
-		datacmn.cpp,\
-		datetime.cpp,\
-		datstrm.cpp,\
-		db.cpp,\
-		dbgrid.cpp,\
-		dbtable.cpp,\
-		dcbase.cpp,\
-		dcbufcmn.cpp,\
-		dircmn.cpp,\
-		dlgcmn.cpp,\
-		dobjcmn.cpp,\
-		docmdi.cpp,\
-		docview.cpp,\
-		dpycmn.cpp,\
-		dynarray.cpp,\
-		dynlib.cpp,\
-		encconv.cpp,\
-		event.cpp,\
-		evtloopcmn.cpp,\
-		extended.c,\
-		ffile.cpp,\
-		fddlgcmn.cpp,\
-		file.cpp,\
-		fileback.cpp,\
-		fileconf.cpp,\
-		filename.cpp,\
-		filefn.cpp,\
-		filesys.cpp,\
-		fldlgcmn.cpp,\
-		fmapbase.cpp,\
-		fontcmn.cpp,\
-		fontenumcmn.cpp,\
-		fontmap.cpp,\
-		framecmn.cpp,\
-		fs_inet.cpp,\
-		ftp.cpp,\
-		gaugecmn.cpp,\
-		gbsizer.cpp,\
-		gdicmn.cpp,\
-		gifdecod.cpp,\
-		hash.cpp,\
-		hashmap.cpp,\
-		helpbase.cpp,\
-		http.cpp,\
-		iconbndl.cpp,\
-		init.cpp,\
-		imagall.cpp,\
-		imagbmp.cpp,\
-		image.cpp,\
-		imagfill.cpp,\
-		imaggif.cpp,\
-		imagiff.cpp,\
-		imagjpeg.cpp,\
-		imagpcx.cpp,\
-		imagpng.cpp,\
-		imagpnm.cpp,\
-		imagtga.cpp,\
-		imagtiff.cpp,\
-		imagxpm.cpp,\
-		intl.cpp,\
-		ipcbase.cpp,\
-		layout.cpp,\
-		lboxcmn.cpp,\
-		list.cpp,\
-		listctrlcmn.cpp,\
-		log.cpp,\
-		longlong.cpp,\
-		memory.cpp,\
-		menucmn.cpp,\
-		mimecmn.cpp,\
-		module.cpp,\
-		msgout.cpp,\
-		mstream.cpp,\
-		nbkbase.cpp,\
-		object.cpp,\
-		paper.cpp,\
-		platinfo.cpp,\
-		popupcmn.cpp,\
-		prntbase.cpp,\
-		process.cpp,\
-		protocol.cpp,\
-		quantize.cpp,\
-		radiocmn.cpp,\
-		rendcmn.cpp,\
-		rgncmn.cpp,\
-		sckaddr.cpp,\
-		sckfile.cpp,\
-		sckipc.cpp,\
-		sckstrm.cpp,\
-		sizer.cpp,\
-		socket.cpp,\
-		socketevtdispatch.cpp,\
-		settcmn.cpp,\
-		statbar.cpp,\
-		stdpbase.cpp,\
-		stockitem.cpp,\
-		stopwatch.cpp,\
-		strconv.cpp,\
-		stream.cpp,\
-		sysopt.cpp,\
-		string.cpp,\
-		tbarbase.cpp,\
-		textbuf.cpp,\
-		textcmn.cpp,\
-		textfile.cpp,\
-		timercmn.cpp,\
-		tokenzr.cpp,\
-		toplvcmn.cpp,\
-		treebase.cpp,\
-		txtstrm.cpp,\
-		url.cpp,\
-		utilscmn.cpp,\
-		valgen.cpp,\
-		validate.cpp,\
-		valtext.cpp,\
-		variant.cpp,\
-		wfstream.cpp,\
-		wincmn.cpp,\
-		wxchar.cpp,\
-		xpmdecod.cpp,\
-		zipstrm.cpp,\
-		zstream.cpp,\
-		clrpickercmn.cpp,\
-		filepickercmn.cpp,\
-		fontpickercmn.cpp,\
-		pickerbase.cpp,\
-		accesscmn.cpp,\
-		dndcmn.cpp,\
-		dpycmn.cpp,\
-		dseldlg.cpp,\
-		dynload.cpp,\
-		effects.cpp,\
-		fddlgcmn.cpp,\
-		fs_mem.cpp,\
-		gbsizer.cpp,\
-		geometry.cpp,\
-		matrix.cpp,\
-		radiocmn.cpp,\
-		regex.cpp,\
-		taskbarcmn.cpp,\
-		uri.cpp,\
-		xti.cpp,\
-		xtistrm.cpp,\
-		xtixml.cpp
-
-all : $(SOURCES)
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS)
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS1)
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS2)
-.ifdef __WXMOTIF__
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_MOTIF)
-	library [--.lib]libwx_motif.olb $(OBJECTS)
-	library [--.lib]libwx_motif.olb $(OBJECTS1)
-	library [--.lib]libwx_motif.olb $(OBJECTS2)
-	library [--.lib]libwx_motif.olb $(OBJECTS_MOTIF)
-.else
-.ifdef __WXGTK__
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
-	library [--.lib]libwx_gtk.olb $(OBJECTS)
-	library [--.lib]libwx_gtk.olb $(OBJECTS1)
-	library [--.lib]libwx_gtk.olb $(OBJECTS2)
-	library [--.lib]libwx_gtk.olb $(OBJECTS_X11)
-.else
-.ifdef __WXGTK2__
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
-	library [--.lib]libwx_gtk2.olb $(OBJECTS)
-	library [--.lib]libwx_gtk2.olb $(OBJECTS1)
-	library [--.lib]libwx_gtk2.olb $(OBJECTS2)
-	library [--.lib]libwx_gtk2.olb $(OBJECTS_X11)
-.else
-.ifdef __WXX11__
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11_2)
-	library [--.lib]libwx_x11_univ.olb $(OBJECTS)
-	library [--.lib]libwx_x11_univ.olb $(OBJECTS1)
-	library [--.lib]libwx_x11_univ.olb $(OBJECTS2)
-	library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11)
-	library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11_2)
-.endif
-.endif
-.endif
-.endif
-
-anidecod.obj : anidecod.cpp
-animatecmn.obj : animatecmn.cpp
-appbase.obj : appbase.cpp
-appcmn.obj : appcmn.cpp
-artprov.obj : artprov.cpp
-artstd.obj : artstd.cpp
-bmpbase.obj : bmpbase.cpp
-bookctrl.obj : bookctrl.cpp
-choiccmn.obj : choiccmn.cpp
-clipcmn.obj : clipcmn.cpp
-clntdata.obj : clntdata.cpp
-cmdline.obj : cmdline.cpp
-cmdproc.obj : cmdproc.cpp
-cmndata.obj : cmndata.cpp
-config.obj : config.cpp
-containr.obj : containr.cpp
-convauto.obj : convauto.cpp
-colourcmn.obj : colourcmn.cpp
-cshelp.obj : cshelp.cpp
-ctrlcmn.obj : ctrlcmn.cpp
-ctrlsub.obj : ctrlsub.cpp
-datacmn.obj : datacmn.cpp
-datetime.obj : datetime.cpp
-datstrm.obj : datstrm.cpp
-db.obj : db.cpp
-dbgrid.obj : dbgrid.cpp
-dbtable.obj : dbtable.cpp
-dcbase.obj : dcbase.cpp
-dcbufcmn.obj : dcbufcmn.cpp
-dircmn.obj : dircmn.cpp
-dlgcmn.obj : dlgcmn.cpp
-dobjcmn.obj : dobjcmn.cpp
-docmdi.obj : docmdi.cpp
-docview.obj : docview.cpp
-dynarray.obj : dynarray.cpp
-dynlib.obj : dynlib.cpp
-encconv.obj : encconv.cpp
-event.obj : event.cpp
-evtloopcmn.obj : evtloopcmn.cpp
-extended.obj : extended.c
-ffile.obj : ffile.cpp
-fddlgcmn.obj : fddlgcmn.cpp
-file.obj : file.cpp
-fileback.obj : fileback.cpp
-fileconf.obj : fileconf.cpp
-filefn.obj : filefn.cpp
-filename.obj : filename.cpp
-filesys.obj : filesys.cpp
-fldlgcmn.obj : fldlgcmn.cpp
-fmapbase.obj : fmapbase.cpp
-fontcmn.obj : fontcmn.cpp
-fontenumcmn.obj : fontenumcmn.cpp
-fontmap.obj : fontmap.cpp
-framecmn.obj : framecmn.cpp
-fs_inet.obj : fs_inet.cpp
-ftp.obj : ftp.cpp
-gaugecmn.obj : gaugecmn.cpp
-gbsizer.obj : gbsizer.cpp
-gdicmn.obj : gdicmn.cpp
-gifdecod.obj : gifdecod.cpp
-hash.obj : hash.cpp
-hashmap.obj : hashmap.cpp
-helpbase.obj : helpbase.cpp
-http.obj : http.cpp
-iconbndl.obj : iconbndl.cpp
-init.obj : init.cpp
-imagall.obj : imagall.cpp
-imagbmp.obj : imagbmp.cpp
-image.obj : image.cpp
-imagfill.obj : imagfill.cpp
-imaggif.obj : imaggif.cpp
-imagiff.obj : imagiff.cpp
-imagjpeg.obj : imagjpeg.cpp
-imagpcx.obj : imagpcx.cpp
-imagpng.obj : imagpng.cpp
-imagpnm.obj : imagpnm.cpp
-imagtga.obj : imagtga.cpp
-imagtiff.obj : imagtiff.cpp
-imagxpm.obj : imagxpm.cpp
-intl.obj : intl.cpp
-ipcbase.obj : ipcbase.cpp
-layout.obj : layout.cpp
-lboxcmn.obj : lboxcmn.cpp
-list.obj : list.cpp
-log.obj : log.cpp
-longlong.obj : longlong.cpp
-memory.obj : memory.cpp
-menucmn.obj : menucmn.cpp
-mimecmn.obj : mimecmn.cpp
-module.obj : module.cpp
-msgout.obj : msgout.cpp
-mstream.obj : mstream.cpp
-nbkbase.obj : nbkbase.cpp
-object.obj : object.cpp
-paper.obj : paper.cpp
-platinfo.obj : platinfo.cpp
-popupcmn.obj : popupcmn.cpp
-prntbase.obj : prntbase.cpp
-process.obj : process.cpp
-protocol.obj : protocol.cpp
-quantize.obj : quantize.cpp
-radiocmn.obj : radiocmn.cpp
-rendcmn.obj : rendcmn.cpp
-rgncmn.obj : rgncmn.cpp
-sckaddr.obj : sckaddr.cpp
-sckfile.obj : sckfile.cpp
-sckipc.obj : sckipc.cpp
-sckstrm.obj : sckstrm.cpp
-sizer.obj : sizer.cpp
-socket.obj : socket.cpp
-socketevtdispatch.obj : socketevtdispatch.cpp
-settcmn.obj : settcmn.cpp
-statbar.obj : statbar.cpp
-stdpbase.obj : stdpbase.cpp
-stockitem.obj : stockitem.cpp
-stopwatch.obj : stopwatch.cpp
-strconv.obj : strconv.cpp
-stream.obj : stream.cpp
-sysopt.obj : sysopt.cpp
-string.obj : string.cpp
-tbarbase.obj : tbarbase.cpp
-textbuf.obj : textbuf.cpp
-textcmn.obj : textcmn.cpp
-textfile.obj : textfile.cpp
-timercmn.obj : timercmn.cpp
-tokenzr.obj : tokenzr.cpp
-toplvcmn.obj : toplvcmn.cpp
-treebase.obj : treebase.cpp
-txtstrm.obj : txtstrm.cpp
-url.obj : url.cpp
-utilscmn.obj : utilscmn.cpp
-valgen.obj : valgen.cpp
-validate.obj : validate.cpp
-valtext.obj : valtext.cpp
-variant.obj : variant.cpp
-wfstream.obj : wfstream.cpp
-wincmn.obj : wincmn.cpp
-wxchar.obj : wxchar.cpp
-xpmdecod.obj : xpmdecod.cpp
-zipstrm.obj : zipstrm.cpp
-zstream.obj : zstream.cpp
-accesscmn.obj : accesscmn.cpp
-dndcmn.obj : dndcmn.cpp
-dpycmn.obj : dpycmn.cpp
-dseldlg.obj : dseldlg.cpp
-dynload.obj : dynload.cpp
-effects.obj : effects.cpp
-fddlgcmn.obj : fddlgcmn.cpp
-fs_mem.obj : fs_mem.cpp
-gbsizer.obj : gbsizer.cpp
-geometry.obj : geometry.cpp
-matrix.obj : matrix.cpp
-radiocmn.obj : radiocmn.cpp
-regex.obj : regex.cpp
-taskbarcmn.obj : taskbarcmn.cpp
-xti.obj : xti.cpp
-xtistrm.obj : xtistrm.cpp
-xtixml.obj : xtixml.cpp
-uri.obj : uri.cpp
-dpycmn.obj : dpycmn.cpp
-combocmn.obj : combocmn.cpp
-clrpickercmn.obj : clrpickercmn.cpp
-filepickercmn.obj : filepickercmn.cpp
-fontpickercmn.obj : fontpickercmn.cpp
-pickerbase.obj : pickerbase.cpp
-listctrlcmn.obj : listctrlcmn.cpp
+#*****************************************************************************
+#                                                                            *
+# Make file for VMS                                                          *
+# Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
+# Date : 1 December 2006                                                     *
+#                                                                            *
+#*****************************************************************************
+.first
+	define wx [--.include.wx]
+
+.ifdef __WXMOTIF__
+CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
+	   /assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)
+.else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
+	   /assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm
+.else
+.ifdef __WXGTK2__
+CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)/ieee=denorm\
+	   /assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)/ieee=denorm
+.else
+.ifdef __WXX11__
+CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
+	/name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
+	/name=(as_is,short)
+.else
+CXX_DEFINE =
+CC_DEFINE =
+.endif
+.endif
+.endif
+.endif
+
+YACC=bison/yacc
+
+SED=gsed
+
+LEX=flex
+
+.suffixes : .cpp
+
+.cpp.obj :
+	cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
+.c.obj :
+	cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c
+
+OBJECTS = \
+		anidecod.obj,\
+		animatecmn.obj,\
+		appbase.obj,\
+		appcmn.obj,\
+		artprov.obj,\
+		artstd.obj,\
+		bmpbase.obj,\
+		bookctrl.obj,\
+		choiccmn.obj,\
+		clipcmn.obj,\
+		clntdata.obj,\
+		cmdline.obj,\
+		cmdproc.obj,\
+		cmndata.obj,\
+		config.obj,\
+		containr.obj,\
+		convauto.obj,\
+		colourcmn.obj,\
+		cshelp.obj,\
+		ctrlcmn.obj,\
+		ctrlsub.obj,\
+		datacmn.obj,\
+		datetime.obj,\
+		datstrm.obj,\
+		db.obj,\
+		dbgrid.obj,\
+		dbtable.obj,\
+		dcbase.obj,\
+		dcbufcmn.obj,\
+		dircmn.obj,\
+		dlgcmn.obj,\
+		dobjcmn.obj,\
+		docmdi.obj,\
+		docview.obj,\
+		dpycmn.obj,\
+		dynarray.obj,\
+		dynlib.obj,\
+		encconv.obj,\
+		event.obj,\
+		evtloopcmn.obj,\
+		extended.obj,\
+		fddlgcmn.obj,\
+		ffile.obj,\
+		file.obj,\
+		fileback.obj,\
+		fileconf.obj,\
+		filename.obj,\
+		filefn.obj,\
+		filesys.obj,\
+		fldlgcmn.obj,\
+		fmapbase.obj,\
+		fontcmn.obj,\
+		fontenumcmn.obj,\
+		fontmap.obj,\
+		framecmn.obj
+
+OBJECTS1=fs_inet.obj,\
+		ftp.obj,\
+		gaugecmn.obj,\
+		gbsizer.obj,\
+		gdicmn.obj,\
+		gifdecod.obj,\
+		hash.obj,\
+		hashmap.obj,\
+		helpbase.obj,\
+		http.obj,\
+		iconbndl.obj,\
+		init.obj,\
+		imagall.obj,\
+		imagbmp.obj,\
+		image.obj,\
+		imagfill.obj,\
+		imaggif.obj,\
+		imagiff.obj,\
+		imagjpeg.obj,\
+		imagpcx.obj,\
+		imagpng.obj,\
+		imagpnm.obj,\
+		imagtga.obj,\
+		imagtiff.obj,\
+		imagxpm.obj,\
+		intl.obj,\
+		ipcbase.obj,\
+		layout.obj,\
+		lboxcmn.obj,\
+		list.obj,\
+		log.obj,\
+		longlong.obj,\
+		memory.obj,\
+		menucmn.obj,\
+		mimecmn.obj,\
+		module.obj,\
+		msgout.obj,\
+		mstream.obj,\
+		nbkbase.obj,\
+		object.obj,\
+		paper.obj,\
+		platinfo.obj,\
+		popupcmn.obj,\
+		prntbase.obj,\
+		process.obj,\
+		protocol.obj,\
+		quantize.obj,\
+		radiocmn.obj,\
+		rendcmn.obj,\
+		sckaddr.obj,\
+		sckfile.obj,\
+		sckipc.obj,\
+		sckstrm.obj,\
+		sizer.obj,\
+		socket.obj,\
+		settcmn.obj,\
+		statbar.obj,\
+		stdpbase.obj,\
+		stockitem.obj,\
+		stopwatch.obj,\
+		strconv.obj,\
+		stream.obj,\
+		string.obj,\
+		sysopt.obj
+
+OBJECTS2=tbarbase.obj,\
+		textbuf.obj,\
+		textcmn.obj,\
+		textfile.obj,\
+		timercmn.obj,\
+		tokenzr.obj,\
+		toplvcmn.obj,\
+		treebase.obj,\
+		txtstrm.obj,\
+		url.obj,\
+		utilscmn.obj,\
+		rgncmn.obj,\
+		uri.obj,\
+		valgen.obj,\
+		validate.obj,\
+		valtext.obj,\
+		variant.obj,\
+		wfstream.obj,\
+		wxchar.obj,\
+		wincmn.obj,\
+		xpmdecod.obj,\
+		zipstrm.obj,\
+		zstream.obj,\
+		clrpickercmn.obj,\
+		filepickercmn.obj,\
+		fontpickercmn.obj,\
+		pickerbase.obj,\
+		listctrlcmn.obj
+
+OBJECTS_MOTIF=radiocmn.obj,combocmn.obj
+
+OBJECTS_X11=accesscmn.obj,dndcmn.obj,dpycmn.obj,dseldlg.obj,\
+	dynload.obj,effects.obj,fddlgcmn.obj,fs_mem.obj,\
+	gbsizer.obj,geometry.obj,matrix.obj,radiocmn.obj,\
+	regex.obj,taskbarcmn.obj,xti.obj,xtistrm.obj,xtixml.obj,\
+	combocmn.obj
+
+OBJECTS_X11_2=socketevtdispatch.obj
+
+SOURCES = \
+		anidecod.cpp,\
+		animatecmn.cpp,\
+		appbase.cpp,\
+		appcmn.cpp,\
+		artprov.cpp,\
+		artstd.cpp,\
+		bmpbase.cpp,\
+		bookctrl.cpp,\
+		choiccmn.cpp,\
+		clipcmn.cpp,\
+		clntdata.cpp,\
+		cmdline.cpp,\
+		cmdproc.cpp,\
+		cmndata.cpp,\
+		config.cpp,\
+		containr.cpp,\
+		convauto.cpp,\
+		colourcmn.cpp,\
+		cshelp.cpp,\
+		ctrlcmn.cpp,\
+		ctrlsub.cpp,\
+		datacmn.cpp,\
+		datetime.cpp,\
+		datstrm.cpp,\
+		db.cpp,\
+		dbgrid.cpp,\
+		dbtable.cpp,\
+		dcbase.cpp,\
+		dcbufcmn.cpp,\
+		dircmn.cpp,\
+		dlgcmn.cpp,\
+		dobjcmn.cpp,\
+		docmdi.cpp,\
+		docview.cpp,\
+		dpycmn.cpp,\
+		dynarray.cpp,\
+		dynlib.cpp,\
+		encconv.cpp,\
+		event.cpp,\
+		evtloopcmn.cpp,\
+		extended.c,\
+		ffile.cpp,\
+		fddlgcmn.cpp,\
+		file.cpp,\
+		fileback.cpp,\
+		fileconf.cpp,\
+		filename.cpp,\
+		filefn.cpp,\
+		filesys.cpp,\
+		fldlgcmn.cpp,\
+		fmapbase.cpp,\
+		fontcmn.cpp,\
+		fontenumcmn.cpp,\
+		fontmap.cpp,\
+		framecmn.cpp,\
+		fs_inet.cpp,\
+		ftp.cpp,\
+		gaugecmn.cpp,\
+		gbsizer.cpp,\
+		gdicmn.cpp,\
+		gifdecod.cpp,\
+		hash.cpp,\
+		hashmap.cpp,\
+		helpbase.cpp,\
+		http.cpp,\
+		iconbndl.cpp,\
+		init.cpp,\
+		imagall.cpp,\
+		imagbmp.cpp,\
+		image.cpp,\
+		imagfill.cpp,\
+		imaggif.cpp,\
+		imagiff.cpp,\
+		imagjpeg.cpp,\
+		imagpcx.cpp,\
+		imagpng.cpp,\
+		imagpnm.cpp,\
+		imagtga.cpp,\
+		imagtiff.cpp,\
+		imagxpm.cpp,\
+		intl.cpp,\
+		ipcbase.cpp,\
+		layout.cpp,\
+		lboxcmn.cpp,\
+		list.cpp,\
+		listctrlcmn.cpp,\
+		log.cpp,\
+		longlong.cpp,\
+		memory.cpp,\
+		menucmn.cpp,\
+		mimecmn.cpp,\
+		module.cpp,\
+		msgout.cpp,\
+		mstream.cpp,\
+		nbkbase.cpp,\
+		object.cpp,\
+		paper.cpp,\
+		platinfo.cpp,\
+		popupcmn.cpp,\
+		prntbase.cpp,\
+		process.cpp,\
+		protocol.cpp,\
+		quantize.cpp,\
+		radiocmn.cpp,\
+		rendcmn.cpp,\
+		rgncmn.cpp,\
+		sckaddr.cpp,\
+		sckfile.cpp,\
+		sckipc.cpp,\
+		sckstrm.cpp,\
+		sizer.cpp,\
+		socket.cpp,\
+		socketevtdispatch.cpp,\
+		settcmn.cpp,\
+		statbar.cpp,\
+		stdpbase.cpp,\
+		stockitem.cpp,\
+		stopwatch.cpp,\
+		strconv.cpp,\
+		stream.cpp,\
+		sysopt.cpp,\
+		string.cpp,\
+		tbarbase.cpp,\
+		textbuf.cpp,\
+		textcmn.cpp,\
+		textfile.cpp,\
+		timercmn.cpp,\
+		tokenzr.cpp,\
+		toplvcmn.cpp,\
+		treebase.cpp,\
+		txtstrm.cpp,\
+		url.cpp,\
+		utilscmn.cpp,\
+		valgen.cpp,\
+		validate.cpp,\
+		valtext.cpp,\
+		variant.cpp,\
+		wfstream.cpp,\
+		wincmn.cpp,\
+		wxchar.cpp,\
+		xpmdecod.cpp,\
+		zipstrm.cpp,\
+		zstream.cpp,\
+		clrpickercmn.cpp,\
+		filepickercmn.cpp,\
+		fontpickercmn.cpp,\
+		pickerbase.cpp,\
+		accesscmn.cpp,\
+		dndcmn.cpp,\
+		dpycmn.cpp,\
+		dseldlg.cpp,\
+		dynload.cpp,\
+		effects.cpp,\
+		fddlgcmn.cpp,\
+		fs_mem.cpp,\
+		gbsizer.cpp,\
+		geometry.cpp,\
+		matrix.cpp,\
+		radiocmn.cpp,\
+		regex.cpp,\
+		taskbarcmn.cpp,\
+		uri.cpp,\
+		xti.cpp,\
+		xtistrm.cpp,\
+		xtixml.cpp
+
+all : $(SOURCES)
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS)
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS1)
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS2)
+.ifdef __WXMOTIF__
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_MOTIF)
+	library [--.lib]libwx_motif.olb $(OBJECTS)
+	library [--.lib]libwx_motif.olb $(OBJECTS1)
+	library [--.lib]libwx_motif.olb $(OBJECTS2)
+	library [--.lib]libwx_motif.olb $(OBJECTS_MOTIF)
+.else
+.ifdef __WXGTK__
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
+	library [--.lib]libwx_gtk.olb $(OBJECTS)
+	library [--.lib]libwx_gtk.olb $(OBJECTS1)
+	library [--.lib]libwx_gtk.olb $(OBJECTS2)
+	library [--.lib]libwx_gtk.olb $(OBJECTS_X11)
+.else
+.ifdef __WXGTK2__
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
+	library [--.lib]libwx_gtk2.olb $(OBJECTS)
+	library [--.lib]libwx_gtk2.olb $(OBJECTS1)
+	library [--.lib]libwx_gtk2.olb $(OBJECTS2)
+	library [--.lib]libwx_gtk2.olb $(OBJECTS_X11)
+.else
+.ifdef __WXX11__
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11_2)
+	library [--.lib]libwx_x11_univ.olb $(OBJECTS)
+	library [--.lib]libwx_x11_univ.olb $(OBJECTS1)
+	library [--.lib]libwx_x11_univ.olb $(OBJECTS2)
+	library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11)
+	library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11_2)
+.endif
+.endif
+.endif
+.endif
+
+anidecod.obj : anidecod.cpp
+animatecmn.obj : animatecmn.cpp
+appbase.obj : appbase.cpp
+appcmn.obj : appcmn.cpp
+artprov.obj : artprov.cpp
+artstd.obj : artstd.cpp
+bmpbase.obj : bmpbase.cpp
+bookctrl.obj : bookctrl.cpp
+choiccmn.obj : choiccmn.cpp
+clipcmn.obj : clipcmn.cpp
+clntdata.obj : clntdata.cpp
+cmdline.obj : cmdline.cpp
+cmdproc.obj : cmdproc.cpp
+cmndata.obj : cmndata.cpp
+config.obj : config.cpp
+containr.obj : containr.cpp
+convauto.obj : convauto.cpp
+colourcmn.obj : colourcmn.cpp
+cshelp.obj : cshelp.cpp
+ctrlcmn.obj : ctrlcmn.cpp
+ctrlsub.obj : ctrlsub.cpp
+datacmn.obj : datacmn.cpp
+datetime.obj : datetime.cpp
+datstrm.obj : datstrm.cpp
+db.obj : db.cpp
+dbgrid.obj : dbgrid.cpp
+dbtable.obj : dbtable.cpp
+dcbase.obj : dcbase.cpp
+dcbufcmn.obj : dcbufcmn.cpp
+dircmn.obj : dircmn.cpp
+dlgcmn.obj : dlgcmn.cpp
+dobjcmn.obj : dobjcmn.cpp
+docmdi.obj : docmdi.cpp
+docview.obj : docview.cpp
+dynarray.obj : dynarray.cpp
+dynlib.obj : dynlib.cpp
+encconv.obj : encconv.cpp
+event.obj : event.cpp
+evtloopcmn.obj : evtloopcmn.cpp
+extended.obj : extended.c
+ffile.obj : ffile.cpp
+fddlgcmn.obj : fddlgcmn.cpp
+file.obj : file.cpp
+fileback.obj : fileback.cpp
+fileconf.obj : fileconf.cpp
+filefn.obj : filefn.cpp
+filename.obj : filename.cpp
+filesys.obj : filesys.cpp
+fldlgcmn.obj : fldlgcmn.cpp
+fmapbase.obj : fmapbase.cpp
+fontcmn.obj : fontcmn.cpp
+fontenumcmn.obj : fontenumcmn.cpp
+fontmap.obj : fontmap.cpp
+framecmn.obj : framecmn.cpp
+fs_inet.obj : fs_inet.cpp
+ftp.obj : ftp.cpp
+gaugecmn.obj : gaugecmn.cpp
+gbsizer.obj : gbsizer.cpp
+gdicmn.obj : gdicmn.cpp
+gifdecod.obj : gifdecod.cpp
+hash.obj : hash.cpp
+hashmap.obj : hashmap.cpp
+helpbase.obj : helpbase.cpp
+http.obj : http.cpp
+iconbndl.obj : iconbndl.cpp
+init.obj : init.cpp
+imagall.obj : imagall.cpp
+imagbmp.obj : imagbmp.cpp
+image.obj : image.cpp
+imagfill.obj : imagfill.cpp
+imaggif.obj : imaggif.cpp
+imagiff.obj : imagiff.cpp
+imagjpeg.obj : imagjpeg.cpp
+imagpcx.obj : imagpcx.cpp
+imagpng.obj : imagpng.cpp
+imagpnm.obj : imagpnm.cpp
+imagtga.obj : imagtga.cpp
+imagtiff.obj : imagtiff.cpp
+imagxpm.obj : imagxpm.cpp
+intl.obj : intl.cpp
+ipcbase.obj : ipcbase.cpp
+layout.obj : layout.cpp
+lboxcmn.obj : lboxcmn.cpp
+list.obj : list.cpp
+log.obj : log.cpp
+longlong.obj : longlong.cpp
+memory.obj : memory.cpp
+menucmn.obj : menucmn.cpp
+mimecmn.obj : mimecmn.cpp
+module.obj : module.cpp
+msgout.obj : msgout.cpp
+mstream.obj : mstream.cpp
+nbkbase.obj : nbkbase.cpp
+object.obj : object.cpp
+paper.obj : paper.cpp
+platinfo.obj : platinfo.cpp
+popupcmn.obj : popupcmn.cpp
+prntbase.obj : prntbase.cpp
+process.obj : process.cpp
+protocol.obj : protocol.cpp
+quantize.obj : quantize.cpp
+radiocmn.obj : radiocmn.cpp
+rendcmn.obj : rendcmn.cpp
+rgncmn.obj : rgncmn.cpp
+sckaddr.obj : sckaddr.cpp
+sckfile.obj : sckfile.cpp
+sckipc.obj : sckipc.cpp
+sckstrm.obj : sckstrm.cpp
+sizer.obj : sizer.cpp
+socket.obj : socket.cpp
+socketevtdispatch.obj : socketevtdispatch.cpp
+settcmn.obj : settcmn.cpp
+statbar.obj : statbar.cpp
+stdpbase.obj : stdpbase.cpp
+stockitem.obj : stockitem.cpp
+stopwatch.obj : stopwatch.cpp
+strconv.obj : strconv.cpp
+stream.obj : stream.cpp
+sysopt.obj : sysopt.cpp
+string.obj : string.cpp
+tbarbase.obj : tbarbase.cpp
+textbuf.obj : textbuf.cpp
+textcmn.obj : textcmn.cpp
+textfile.obj : textfile.cpp
+timercmn.obj : timercmn.cpp
+tokenzr.obj : tokenzr.cpp
+toplvcmn.obj : toplvcmn.cpp
+treebase.obj : treebase.cpp
+txtstrm.obj : txtstrm.cpp
+url.obj : url.cpp
+utilscmn.obj : utilscmn.cpp
+valgen.obj : valgen.cpp
+validate.obj : validate.cpp
+valtext.obj : valtext.cpp
+variant.obj : variant.cpp
+wfstream.obj : wfstream.cpp
+wincmn.obj : wincmn.cpp
+wxchar.obj : wxchar.cpp
+xpmdecod.obj : xpmdecod.cpp
+zipstrm.obj : zipstrm.cpp
+zstream.obj : zstream.cpp
+accesscmn.obj : accesscmn.cpp
+dndcmn.obj : dndcmn.cpp
+dpycmn.obj : dpycmn.cpp
+dseldlg.obj : dseldlg.cpp
+dynload.obj : dynload.cpp
+effects.obj : effects.cpp
+fddlgcmn.obj : fddlgcmn.cpp
+fs_mem.obj : fs_mem.cpp
+gbsizer.obj : gbsizer.cpp
+geometry.obj : geometry.cpp
+matrix.obj : matrix.cpp
+radiocmn.obj : radiocmn.cpp
+regex.obj : regex.cpp
+taskbarcmn.obj : taskbarcmn.cpp
+xti.obj : xti.cpp
+xtistrm.obj : xtistrm.cpp
+xtixml.obj : xtixml.cpp
+uri.obj : uri.cpp
+dpycmn.obj : dpycmn.cpp
+combocmn.obj : combocmn.cpp
+clrpickercmn.obj : clrpickercmn.cpp
+filepickercmn.obj : filepickercmn.cpp
+fontpickercmn.obj : fontpickercmn.cpp
+pickerbase.obj : pickerbase.cpp
+listctrlcmn.obj : listctrlcmn.cpp
diff --git a/Externals/wxWidgets/src/common/event.cpp b/Externals/wxWidgets/src/common/event.cpp
index e006c58588..d6518ce9c6 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 51404 2008-01-27 12:57:04Z VZ $
+// RCS-ID:      $Id: event.cpp 56712 2008-11-08 22:41:10Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -34,6 +34,7 @@
     #include "wx/module.h"
 
     #if wxUSE_GUI
+        #include "wx/window.h"
         #include "wx/control.h"
         #include "wx/dc.h"
         #include "wx/textctrl.h"
@@ -1039,7 +1040,7 @@ wxEvtHandler::wxEvtHandler()
     m_eventsLocker = new wxCriticalSection;
 #  endif
 #endif
-    
+
     // no client data (yet)
     m_clientData = NULL;
     m_clientDataType = wxClientData_None;
@@ -1141,8 +1142,6 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
 
     m_pendingEvents->Append(eventCopy);
 
-    wxLEAVE_CRIT_SECT( Lock() );
-
     // 2) Add this event handler to list of event handlers that
     //    have pending events.
 
@@ -1154,6 +1153,8 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
 
     wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
 
+    wxLEAVE_CRIT_SECT( Lock() );
+
     // 3) Inform the system that new pending events are somewhere,
     //    and that these should be processed in idle time.
     wxWakeUpIdle();
@@ -1165,7 +1166,7 @@ void wxEvtHandler::ProcessPendingEvents()
     // pending events
     wxCHECK_RET( m_pendingEvents,
                  wxT("Please call wxApp::ProcessPendingEvents() instead") );
-    
+
     wxENTER_CRIT_SECT( Lock() );
 
     // we leave the loop once we have processed all events that were present at
diff --git a/Externals/wxWidgets/src/common/filefn.cpp b/Externals/wxWidgets/src/common/filefn.cpp
index 4a64c2fab8..9ae570985f 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 51858 2008-02-17 09:16:11Z SC $
+// RCS-ID:      $Id: filefn.cpp 58220 2009-01-19 11:40:24Z VZ $
 // Copyright:   (c) 1998 Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1493,7 +1493,7 @@ wxChar *wxDoGetCwd(wxChar *buf, int sz)
         {
             sz -= 3;
             rc = ::DosQueryCurrentDir( 0 // current drive
-                                      ,cbuf + 3
+                                      ,(PBYTE)cbuf + 3
                                       ,(PULONG)&sz
                                      );
             cbuf[0] = char('A' + (ulDriveNum - 1));
diff --git a/Externals/wxWidgets/src/common/filename.cpp b/Externals/wxWidgets/src/common/filename.cpp
index 431fa2e90d..fd1c43a9cc 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 52996 2008-04-03 12:47:16Z VZ $
+// RCS-ID:      $Id: filename.cpp 58751 2009-02-08 10:05:28Z VZ $
 // Copyright:   (c) 2000 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -704,7 +704,6 @@ static wxString wxCreateTempImpl(
         WXFILEARGS(wxFile *fileTemp, wxFFile *ffileTemp),
         bool *deleteOnClose = NULL)
 {
-    static int pid = -1;
 #if wxUSE_FILE && wxUSE_FFILE
     wxASSERT(fileTemp == NULL || ffileTemp == NULL);
 #endif
@@ -823,11 +822,7 @@ static wxString wxCreateTempImpl(
 #else // !HAVE_MKTEMP (includes __DOS__)
     // generate the unique file name ourselves
     #if !defined(__DOS__) && !defined(__PALMOS__) && (!defined(__MWERKS__) || defined(__DARWIN__) )
-
-    if(pid < 0)
-        pid = getpid();
-    
-    path << (unsigned int)pid;
+    path << (unsigned int)getpid();
     #endif
 
     wxString pathTry;
@@ -1266,11 +1261,6 @@ bool wxFileName::Normalize(int flags,
             }
         }
 
-        if ( (flags & wxPATH_NORM_CASE) && !IsCaseSensitive(format) )
-        {
-            dir.MakeLower();
-        }
-
         m_dirs.Add(dir);
     }
 
@@ -1280,26 +1270,12 @@ bool wxFileName::Normalize(int flags,
         wxString filename;
         if (GetShortcutTarget(GetFullPath(format), filename))
         {
-            // Repeat this since we may now have a new path
-            if ( (flags & wxPATH_NORM_CASE) && !IsCaseSensitive(format) )
-            {
-                filename.MakeLower();
-            }
             m_relative = false;
             Assign(filename);
         }
     }
 #endif
 
-    if ( (flags & wxPATH_NORM_CASE) && !IsCaseSensitive(format) )
-    {
-        // VZ: expand env vars here too?
-
-        m_volume.MakeLower();
-        m_name.MakeLower();
-        m_ext.MakeLower();
-    }
-
 #if defined(__WIN32__)
     if ( (flags & wxPATH_NORM_LONG) && (format == wxPATH_DOS) )
     {
@@ -1307,6 +1283,22 @@ bool wxFileName::Normalize(int flags,
     }
 #endif // Win32
 
+    // Change case  (this should be kept at the end of the function, to ensure
+    // that the path doesn't change any more after we normalize its case)
+    if ( (flags & wxPATH_NORM_CASE) && !IsCaseSensitive(format) )
+    {
+        m_volume.MakeLower();
+        m_name.MakeLower();
+        m_ext.MakeLower();
+
+        // directory entries must be made lower case as well
+        count = m_dirs.GetCount();
+        for ( size_t i = 0; i < count; i++ )
+        {
+            m_dirs[i].MakeLower();
+        }
+    }
+
     return true;
 }
 
@@ -2255,7 +2247,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
     // not 9x
     bool ok;
     FILETIME ftAccess, ftCreate, ftWrite;
-    if ( IsDir() ) 
+    if ( IsDir() )
     {
         // implemented in msw/dir.cpp
         extern bool wxGetDirectoryTimes(const wxString& dirname,
diff --git a/Externals/wxWidgets/src/common/filesys.cpp b/Externals/wxWidgets/src/common/filesys.cpp
index d39242b14f..0f850bcf66 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 51940 2008-02-20 16:33:55Z VZ $
+// CVS-ID:      $Id: filesys.cpp 55271 2008-08-26 00:03:04Z VZ $
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -23,6 +23,7 @@
     #include "wx/module.h"
 #endif
 
+#include "wx/sysopt.h"
 #include "wx/wfstream.h"
 #include "wx/mimetype.h"
 #include "wx/filename.h"
@@ -62,64 +63,77 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location)
 
 #if wxUSE_MIMETYPE
     static bool s_MinimalMimeEnsured = false;
-    if (!s_MinimalMimeEnsured)
-    {
-        static const wxFileTypeInfo fallbacks[] =
-        {
-            wxFileTypeInfo(_T("image/jpeg"),
-                           wxEmptyString,
-                           wxEmptyString,
-                           _T("JPEG image (from fallback)"),
-                           _T("jpg"), _T("jpeg"), _T("JPG"), _T("JPEG"), NULL),
-            wxFileTypeInfo(_T("image/gif"),
-                           wxEmptyString,
-                           wxEmptyString,
-                           _T("GIF image (from fallback)"),
-                           _T("gif"), _T("GIF"), NULL),
-            wxFileTypeInfo(_T("image/png"),
-                           wxEmptyString,
-                           wxEmptyString,
-                           _T("PNG image (from fallback)"),
-                           _T("png"), _T("PNG"), NULL),
-            wxFileTypeInfo(_T("image/bmp"),
-                           wxEmptyString,
-                           wxEmptyString,
-                           _T("windows bitmap image (from fallback)"),
-                           _T("bmp"), _T("BMP"), NULL),
-            wxFileTypeInfo(_T("text/html"),
-                           wxEmptyString,
-                           wxEmptyString,
-                           _T("HTML document (from fallback)"),
-                           _T("htm"), _T("html"), _T("HTM"), _T("HTML"), NULL),
-            // must terminate the table with this!
-            wxFileTypeInfo()
-        };
-        wxTheMimeTypesManager->AddFallbacks(fallbacks);
-        s_MinimalMimeEnsured = true;
-    }
 
-    wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext);
-    if ( !ft || !ft -> GetMimeType(&mime) )
-    {
-        mime = wxEmptyString;
-    }
-
-    delete ft;
-
-    return mime;
-#else
-    if ( ext.IsSameAs(wxT("htm"), false) || ext.IsSameAs(_T("html"), false) )
-        return wxT("text/html");
-    if ( ext.IsSameAs(wxT("jpg"), false) || ext.IsSameAs(_T("jpeg"), false) )
-        return wxT("image/jpeg");
-    if ( ext.IsSameAs(wxT("gif"), false) )
-        return wxT("image/gif");
-    if ( ext.IsSameAs(wxT("png"), false) )
-        return wxT("image/png");
-    if ( ext.IsSameAs(wxT("bmp"), false) )
-        return wxT("image/bmp");
-    return wxEmptyString;
+    // Don't use mime types manager if the application doesn't need it and it would be
+    // cause an unacceptable delay, especially on startup.
+    bool useMimeTypesManager = true;
+#if wxUSE_SYSTEM_OPTIONS
+    useMimeTypesManager = (wxSystemOptions::GetOptionInt(wxT("filesys.no-mimetypesmanager")) == 0);
 #endif
+
+    if (useMimeTypesManager)
+    {
+        if (!s_MinimalMimeEnsured)
+        {
+            static const wxFileTypeInfo fallbacks[] =
+            {
+                wxFileTypeInfo(_T("image/jpeg"),
+                    wxEmptyString,
+                    wxEmptyString,
+                    _T("JPEG image (from fallback)"),
+                    _T("jpg"), _T("jpeg"), _T("JPG"), _T("JPEG"), NULL),
+                    wxFileTypeInfo(_T("image/gif"),
+                    wxEmptyString,
+                    wxEmptyString,
+                    _T("GIF image (from fallback)"),
+                    _T("gif"), _T("GIF"), NULL),
+                    wxFileTypeInfo(_T("image/png"),
+                    wxEmptyString,
+                    wxEmptyString,
+                    _T("PNG image (from fallback)"),
+                    _T("png"), _T("PNG"), NULL),
+                    wxFileTypeInfo(_T("image/bmp"),
+                    wxEmptyString,
+                    wxEmptyString,
+                    _T("windows bitmap image (from fallback)"),
+                    _T("bmp"), _T("BMP"), NULL),
+                    wxFileTypeInfo(_T("text/html"),
+                    wxEmptyString,
+                    wxEmptyString,
+                    _T("HTML document (from fallback)"),
+                    _T("htm"), _T("html"), _T("HTM"), _T("HTML"), NULL),
+                    // must terminate the table with this!
+                    wxFileTypeInfo()
+            };
+            wxTheMimeTypesManager->AddFallbacks(fallbacks);
+            s_MinimalMimeEnsured = true;
+        }
+        
+        wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext);
+        if ( !ft || !ft -> GetMimeType(&mime) )
+        {
+            mime = wxEmptyString;
+        }
+        
+        delete ft;
+        
+        return mime;
+    }
+    else
+#endif
+    {
+        if ( ext.IsSameAs(wxT("htm"), false) || ext.IsSameAs(_T("html"), false) )
+            return wxT("text/html");
+        if ( ext.IsSameAs(wxT("jpg"), false) || ext.IsSameAs(_T("jpeg"), false) )
+            return wxT("image/jpeg");
+        if ( ext.IsSameAs(wxT("gif"), false) )
+            return wxT("image/gif");
+        if ( ext.IsSameAs(wxT("png"), false) )
+            return wxT("image/png");
+        if ( ext.IsSameAs(wxT("bmp"), false) )
+            return wxT("image/bmp");
+        return wxEmptyString;
+    }
 }
 
 
@@ -174,8 +188,10 @@ wxString wxFileSystemHandler::GetAnchor(const wxString& location) const
 
     for (int i = l-1; i >= 0; i--) {
         c = location[i];
-        if (c == wxT('#')) return location.Right(l-i-1);
-        else if ((c == wxT('.')) || (c == wxT('/')) || (c == wxT('\\')) || (c == wxT(':'))) return wxEmptyString;
+        if (c == wxT('#'))
+            return location.Right(l-i-1);
+        else if ((c == wxT('/')) || (c == wxT('\\')) || (c == wxT(':')))
+            return wxEmptyString;
     }
     return wxEmptyString;
 }
diff --git a/Externals/wxWidgets/src/common/fontmgrcmn.cpp b/Externals/wxWidgets/src/common/fontmgrcmn.cpp
index eb1e6b7cbc..986d71b490 100644
--- a/Externals/wxWidgets/src/common/fontmgrcmn.cpp
+++ b/Externals/wxWidgets/src/common/fontmgrcmn.cpp
@@ -3,7 +3,7 @@
 // Purpose:     font management for ports that don't have their own
 // Author:      Vaclav Slavik
 // Created:     2006-11-18
-// RCS-ID:      $Id: fontmgrcmn.cpp 43550 2006-11-20 20:45:57Z VS $
+// RCS-ID:      $Id: fontmgrcmn.cpp 54757 2008-07-21 17:34:48Z VZ $
 // Copyright:   (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
 //              (c) 2006 REA Elektronik GmbH
 // Licence:     wxWindows licence
@@ -24,9 +24,15 @@
 WX_DECLARE_LIST(wxFontInstance, wxFontInstanceList);
 WX_DEFINE_LIST(wxFontInstanceList)
 WX_DEFINE_LIST(wxFontBundleList)
+
 WX_DECLARE_HASH_MAP(wxString, wxFontBundle*,
                     wxStringHash, wxStringEqual,
-                    wxFontBundleHash);
+                    wxFontBundleHashBase);
+// in STL build, hash class is typedef to a template, so it can't be forward
+// declared, as we do; solve it by having a dummy class:
+class wxFontBundleHash : public wxFontBundleHashBase
+{
+};
 
 // ============================================================================
 // implementation
@@ -65,17 +71,14 @@ wxFontInstance *wxFontFaceBase::GetFontInstance(float ptSize, bool aa)
 {
     wxASSERT_MSG( m_refCnt > 0, _T("font library not loaded!") );
 
-    wxFontInstance *i;
-    wxFontInstanceList::Node *node;
-
-    for ( node = m_instances->GetFirst(); node; node = node->GetNext() )
+    for ( wxFontInstanceList::const_iterator i = m_instances->begin();
+          i != m_instances->end(); ++i )
     {
-        i = node->GetData();
-        if ( i->GetPointSize() == ptSize && i->IsAntiAliased() == aa )
-            return i;
+        if ( (*i)->GetPointSize() == ptSize && (*i)->IsAntiAliased() == aa )
+            return *i;
     }
 
-    i = CreateFontInstance(ptSize, aa);
+    wxFontInstance *i = CreateFontInstance(ptSize, aa);
     m_instances->Append(i);
     return i;
 }
diff --git a/Externals/wxWidgets/src/common/gbsizer.cpp b/Externals/wxWidgets/src/common/gbsizer.cpp
index 68402aad1c..c81e80c2b1 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 53000 2008-04-03 23:28:16Z RD $
+// RCS-ID:      $Id: gbsizer.cpp 54568 2008-07-10 01:32:23Z RD $
 // Copyright:   (c) Robin Dunn
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -580,7 +580,7 @@ void wxGridBagSizer::AdjustForOverflow()
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->ShouldAccountFor() )
                 continue;
 
             int endrow, endcol;
@@ -623,7 +623,7 @@ void wxGridBagSizer::AdjustForOverflow()
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->ShouldAccountFor() )
                 continue;
 
             int endrow, endcol;
diff --git a/Externals/wxWidgets/src/common/gifdecod.cpp b/Externals/wxWidgets/src/common/gifdecod.cpp
index c4555ce0b0..5f40689dbb 100644
--- a/Externals/wxWidgets/src/common/gifdecod.cpp
+++ b/Externals/wxWidgets/src/common/gifdecod.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxGIFDecoder, GIF reader for wxImage and wxAnimation
 // Author:      Guillermo Rodriguez Garcia 
 // Version:     3.04
-// RCS-ID:      $Id: gifdecod.cpp 43898 2006-12-10 14:18:37Z VZ $
+// RCS-ID:      $Id: gifdecod.cpp 54944 2008-08-03 00:36:52Z VZ $
 // Copyright:   (c) Guillermo Rodriguez Garcia
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -186,7 +186,7 @@ bool wxGIFDecoder::ConvertToImage(unsigned int frame, wxImage *image) const
 
 // Get data for current frame
 
-wxSize wxGIFDecoder::GetFrameSize(unsigned int frame) const 
+wxSize wxGIFDecoder::GetFrameSize(unsigned int frame) const
 {
     return wxSize(GetFrame(frame)->w, GetFrame(frame)->h);
 }
@@ -593,7 +593,7 @@ bool wxGIFDecoder::CanRead(wxInputStream &stream) const
 wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
 {
     unsigned int  global_ncolors = 0;
-    int           bits, interl, transparent, i;
+    int           bits, interl, i;
     wxAnimationDisposal disposal;
     long          size;
     long          delay;
@@ -655,7 +655,7 @@ wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
     }
 
     // transparent colour, disposal method and delay default to unused
-    transparent = -1;
+    int transparent = -1;
     disposal = wxANIM_UNSPECIFIED;
     delay = -1;
 
@@ -705,8 +705,7 @@ wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
                 delay = 10 * (buf[2] + 256 * buf[3]);
 
                 // read transparent colour index, if used
-                if (buf[1] & 0x01)
-                    transparent = buf[4];
+                transparent = buf[1] & 0x01 ? buf[4] : -1;
 
                 // read disposal method
                 disposal = (wxAnimationDisposal)(((buf[1] & 0x1C) >> 2) - 1);
@@ -756,8 +755,8 @@ wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
             pimg->w = buf[4] + 256 * buf[5];
             pimg->h = buf[6] + 256 * buf[7];
 
-            if (anim && ((pimg->w == 0) || (pimg->w > (unsigned int)m_szAnimation.GetWidth()) || 
-			 (pimg->h == 0) || (pimg->h > (unsigned int)m_szAnimation.GetHeight())))
+            if (anim && ((pimg->w == 0) || (pimg->w > (unsigned int)m_szAnimation.GetWidth()) ||
+                (pimg->h == 0) || (pimg->h > (unsigned int)m_szAnimation.GetHeight())))
             {
                 Destroy();
                 return wxGIF_INVFORMAT;
diff --git a/Externals/wxWidgets/src/common/glob.inc b/Externals/wxWidgets/src/common/glob.inc
index ea226977ef..fc1e084d62 100644
--- a/Externals/wxWidgets/src/common/glob.inc
+++ b/Externals/wxWidgets/src/common/glob.inc
@@ -1,367 +1,367 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        glob.inc
-// Purpose:     File and other globbing (included by utils.cpp)
-// Author:      Karsten Ballueder
-// Modified by:
-// Created:     20/5/1998
-// RCS-ID:      $Id: glob.inc 33948 2005-05-04 18:57:50Z JS $
-// Copyright:   (c) Karsten Ballueder
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// This file includes:
-//	wxIsWild(const char *pattern)
-//	wxMatchWild(const char *pattern, const char *str, bool dot_special)
-//
-
-//---------------------------------------------------------------------------------
-#ifndef UNIX_GLOB
-# ifdef wx_x
-#  define UNIX_GLOB 1
-# else
-#  define UNIX_GLOB 0
-# endif
-#endif
-
-#if UNIX_GLOB
-# ifdef wx_msw
-#  error "Can't use Unix file globbing under Windows!"
-# endif
-#endif
-
-/*************************************************************************
- *
- * wxIsWild checks whether the pattern contains wildcards, and
- * returns TRUE if it does, and FALSE if it does not (or if the 
- * pattern is NULL -- i.e. no string).
- *
- * The argument is:
- *   
- * 1) pattern - a character string
- */
-bool 
-wxIsWild (const char *pattern)
-{
-  while (*pattern)
-    {
-      switch (*pattern++)
-	{
-	case '?':
-	case '*':
-#if UNIX_GLOB
-	case '[':
-	case '{':		/* } */
-#endif
-	  return TRUE;
-#if UNIX_GLOB
-	case '\\':
-	  if (!*pattern++)
-	    return FALSE;
-#endif
-	}			/* switch() */
-    }				/* while() */
-  return FALSE;
-}
-
-
-
-#if UNIX_GLOB
-
-// Unix Glob()
-//
-// Pattern        Function
-// -----------------------------------------------------
-//  '*'         = match 0 or more occurances of anything
-// "[abc]"      = match anyof "abc" (ranges supported)
-// "{xx,yy,zz}" = match anyof "xx", "yy", or "zz"
-// '?'          = match any character
-//
-//  '\'  is used to "escape" special characters
-// Recursive
-
-bool 
-wxMatchWild (const char *pattern, const char *str, bool dot_special)
-{
-  char c;
-  const char *cp;
-  bool done = FALSE, ret_code, ok;
-  // Below is for vi fans
-  const char OB = '{', CB = '}';
-
-#if 0
-  if (strcmp(pattern, "*.*") == 0)
-    pattern = "*"; // Hack for MS-DOS compat.
-#endif
-
-  // dot_special means '.' only matches '.'
-  if (dot_special && *str == '.' && *pattern != *str)
-    return FALSE;
-
-  while ((*pattern != '\0') && (!done) && (((*str == '\0') &&
-	       ((*pattern == OB) || (*pattern == '*'))) || (*str != '\0')))
-    {
-      switch (*pattern)
-	{
-	case '\\':
-	  pattern++;
-	  if (*pattern != '\0')
-	    pattern++;
-	  break;
-	case '*':
-	  pattern++;
-	  ret_code = FALSE;
-	  while ((*str != '\0') && (!(ret_code = wxMatchWild (pattern, str++, FALSE))));
-	  if (ret_code)
-	    {
-	      while (*str != '\0')
-		str++;
-	      while (*pattern != '\0')
-		pattern++;
-	    }
-	  break;
-	case '[':
-	  pattern++;
-	repeat:
-	  if ((*pattern == '\0') || (*pattern == ']'))
-	    {
-	      done = TRUE;
-	      break;
-	    }
-	  if (*pattern == '\\')
-	    {
-	      pattern++;
-	      if (*pattern == '\0')
-		{
-		  done = TRUE;
-		  break;
-		}
-	    }
-	  if (*(pattern + 1) == '-')
-	    {
-	      c = *pattern;
-	      pattern += 2;
-	      if (*pattern == ']')
-		{
-		  done = TRUE;
-		  break;
-		}
-	      if (*pattern == '\\')
-		{
-		  pattern++;
-		  if (*pattern == '\0')
-		    {
-		      done = TRUE;
-		      break;
-		    }
-		}
-	      if ((*str < c) || (*str > *pattern))
-		{
-		  pattern++;
-		  goto repeat;
-		}
-	    }
-	  else if (*pattern != *str)
-	    {
-	      pattern++;
-	      goto repeat;
-	    }
-	  pattern++;
-	  while ((*pattern != ']') && (*pattern != '\0'))
-	    {
-	      if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
-		pattern++;
-	      pattern++;
-	    }			// while()
-	  if (*pattern != '\0')
-	    {
-	      pattern++, str++;
-	    }
-	  break;
-	case '?':
-	  pattern++;
-	  str++;
-	  break;
-	case OB:
-	  pattern++;
-         while ((*pattern != CB) && (*pattern != '\0'))
-	    {
-	      cp = str;
-	      ok = TRUE;
-	      while (ok && (*cp != '\0') && (*pattern != '\0') &&
-                 (*pattern != ',') && (*pattern != CB))
-		{
-		  if (*pattern == '\\')
-		    pattern++;
-		  ok = (*pattern++ == *cp++);
-		}		// while()
-	      if (*pattern == '\0')
-		{
-		  ok = FALSE;
-		  done = TRUE;
-		  break;
-		}
-	      else if (ok)
-		{
-		  str = cp;
-                   while ((*pattern != CB) && (*pattern != '\0'))
-		    {
-		      if (*++pattern == '\\')
-			{
-                      if (*++pattern == CB)
-			    pattern++;
-			}
-		    }		// while()
-		}
-	      else
-		{
-                 while (*pattern != CB && *pattern != ',' && *pattern != '\0')
-		    {
-		      if (*++pattern == '\\')
-			{
-                            if (*++pattern == CB || *pattern == ',')
-			    pattern++;
-			}
-		    }		// while()
-		}
-	      if (*pattern != '\0')
-		pattern++;
-	    }			// while()
-	  break;
-	default:
-	  if (*str == *pattern)
-	    {
-	      str++, pattern++;
-	    }
-	  else
-	    {
-	      done = TRUE;
-	    }
-	}			// switch()
-    }				// while()
-  while (*pattern == '*')
-    pattern++;
-  return ((*str == '\0') && (*pattern == '\0'));
-}
-
-#else /* MS-DOS/Windows glob() */
-/*************************************************************************
- *
- *  wxMatchWild matches the given pattern string against 
- *  a text string, and returns TRUE if it matches, FALSE otherwise.
- *
- *  A match means that the entire text string is used up in the matching.
- *  The pattern can contain the following wildcards.
- * 
- *  * -- matches any sequence of characters
- *  ? -- matches one character
- *
- * If one or other or both of the string arguments to wxMatchWild function is  
- * NULL (i.e. there isn't a string), then the function returns FALSE.
- *
- */
-static bool wxPatternMatch (const char *pattern, const char *text, size_t i, size_t j);
-
-// @@@@ dotSpecial is ignored by MS-DOS
-bool 
-wxMatchWild (const char *pattern, const char *text, bool /* dotSpecial */ )
-{
-  if (pattern == NULL || text == NULL || *pattern == '\0' || *text == '\0')
-    return FALSE;
-  return wxPatternMatch (pattern, text, 0, 0);
-}
-
-/*************************************************************************
- *
- *  wxPatternMatch does the work for wxMatchWild. wxPatternMatch  matches 
- *  the given pattern string against a text string, and returns TRUE if 
- *  it matches, FALSE otherwise. It is assumed that the string arguments
- *  to wxPatternMatch exist.
- *
- *  A match means that the entire text string is used up in the matching.
- *  The pattern can contain the following wildcards.
- * 
- *  * -- matches any sequence of characters
- *  ? -- matches one character
- *
- *  wxPatternMatch works by going down the pattern trying to match the
- *  the same index character in the pattern and string arrays, and stops
- *  when the end of the pattern or text string is reached. However, if a
- *  '*' wildcard is met, the algorithm checks to see whether the remaining 
- *  pattern (after the wildcard) matches the rest of the text (i.e. the 
- *  wxPatternMatch function is called recursively).
- */
-// Recursive
-static bool 
-wxPatternMatch (const char *pattern, const char *text, size_t i, size_t j)
-{
-  size_t pattern_length = strlen (pattern);
-  size_t text_length = strlen (text);
-  bool match = FALSE;
-
-#ifdef wx_msw
-// MS-DOS file system is case INDEPENDENT
-# define EQU(x,y) (wxToLower(x) == wxToLower(y))
-#else
-# define EQU(x,y) ((x) == (y))
-#endif
-
-  while (j < pattern_length && i < text_length)
-    {
-      if (EQU(text[i], pattern[j]) || pattern[j] == '?')
-	{
-	  match = TRUE;
-	  i++, j++;
-	}
-      else if (pattern[j] == '*')
-	{
-	  // If pattern ends in '*'
-	  if (++j == pattern_length)
-	    {
-	      match = TRUE;
-	      i = text_length;
-	    }
-	  else
-	    {
-	      match = FALSE;
-// after wildcard check to see whether rest of pattern matches 
-	      // up with rest of text
-	      while (i < text_length && match != TRUE)
-		{
-		  match = wxPatternMatch (pattern, text, i, j);
-		  i++;
-		}
-// text index is decremented so that it points to where 
-	      // the text string starts to match the rest of the pattern
-	      i--;
-	    }
-	}
-      else if (! EQU(text[i], pattern[j]))
-	{
-	  j = pattern_length;
-	  match = FALSE;
-	}
-    }
-  if (j == pattern_length && i == text_length && match == TRUE)
-    {
-      return TRUE;
-    }
-  else
-// special case where pattern and text are the same except that pattern
-    // also only has '*' wildcards on the end
-  if (i == text_length && pattern[j] == '*' && match == TRUE)
-    {
-      for (; j < pattern_length; j++)
-	{
-	  if (pattern[j] != '*')
-	    return FALSE;
-	}
-      return TRUE;
-    }
-  else
-    {
-      return FALSE;
-    }
-}
-
-#endif /* UNIX_GLOB */
-//-----------------------------------------------------------------------------
+/////////////////////////////////////////////////////////////////////////////
+// Name:        glob.inc
+// Purpose:     File and other globbing (included by utils.cpp)
+// Author:      Karsten Ballueder
+// Modified by:
+// Created:     20/5/1998
+// RCS-ID:      $Id: glob.inc 33948 2005-05-04 18:57:50Z JS $
+// Copyright:   (c) Karsten Ballueder
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// This file includes:
+//	wxIsWild(const char *pattern)
+//	wxMatchWild(const char *pattern, const char *str, bool dot_special)
+//
+
+//---------------------------------------------------------------------------------
+#ifndef UNIX_GLOB
+# ifdef wx_x
+#  define UNIX_GLOB 1
+# else
+#  define UNIX_GLOB 0
+# endif
+#endif
+
+#if UNIX_GLOB
+# ifdef wx_msw
+#  error "Can't use Unix file globbing under Windows!"
+# endif
+#endif
+
+/*************************************************************************
+ *
+ * wxIsWild checks whether the pattern contains wildcards, and
+ * returns TRUE if it does, and FALSE if it does not (or if the 
+ * pattern is NULL -- i.e. no string).
+ *
+ * The argument is:
+ *   
+ * 1) pattern - a character string
+ */
+bool 
+wxIsWild (const char *pattern)
+{
+  while (*pattern)
+    {
+      switch (*pattern++)
+	{
+	case '?':
+	case '*':
+#if UNIX_GLOB
+	case '[':
+	case '{':		/* } */
+#endif
+	  return TRUE;
+#if UNIX_GLOB
+	case '\\':
+	  if (!*pattern++)
+	    return FALSE;
+#endif
+	}			/* switch() */
+    }				/* while() */
+  return FALSE;
+}
+
+
+
+#if UNIX_GLOB
+
+// Unix Glob()
+//
+// Pattern        Function
+// -----------------------------------------------------
+//  '*'         = match 0 or more occurances of anything
+// "[abc]"      = match anyof "abc" (ranges supported)
+// "{xx,yy,zz}" = match anyof "xx", "yy", or "zz"
+// '?'          = match any character
+//
+//  '\'  is used to "escape" special characters
+// Recursive
+
+bool 
+wxMatchWild (const char *pattern, const char *str, bool dot_special)
+{
+  char c;
+  const char *cp;
+  bool done = FALSE, ret_code, ok;
+  // Below is for vi fans
+  const char OB = '{', CB = '}';
+
+#if 0
+  if (strcmp(pattern, "*.*") == 0)
+    pattern = "*"; // Hack for MS-DOS compat.
+#endif
+
+  // dot_special means '.' only matches '.'
+  if (dot_special && *str == '.' && *pattern != *str)
+    return FALSE;
+
+  while ((*pattern != '\0') && (!done) && (((*str == '\0') &&
+	       ((*pattern == OB) || (*pattern == '*'))) || (*str != '\0')))
+    {
+      switch (*pattern)
+	{
+	case '\\':
+	  pattern++;
+	  if (*pattern != '\0')
+	    pattern++;
+	  break;
+	case '*':
+	  pattern++;
+	  ret_code = FALSE;
+	  while ((*str != '\0') && (!(ret_code = wxMatchWild (pattern, str++, FALSE))));
+	  if (ret_code)
+	    {
+	      while (*str != '\0')
+		str++;
+	      while (*pattern != '\0')
+		pattern++;
+	    }
+	  break;
+	case '[':
+	  pattern++;
+	repeat:
+	  if ((*pattern == '\0') || (*pattern == ']'))
+	    {
+	      done = TRUE;
+	      break;
+	    }
+	  if (*pattern == '\\')
+	    {
+	      pattern++;
+	      if (*pattern == '\0')
+		{
+		  done = TRUE;
+		  break;
+		}
+	    }
+	  if (*(pattern + 1) == '-')
+	    {
+	      c = *pattern;
+	      pattern += 2;
+	      if (*pattern == ']')
+		{
+		  done = TRUE;
+		  break;
+		}
+	      if (*pattern == '\\')
+		{
+		  pattern++;
+		  if (*pattern == '\0')
+		    {
+		      done = TRUE;
+		      break;
+		    }
+		}
+	      if ((*str < c) || (*str > *pattern))
+		{
+		  pattern++;
+		  goto repeat;
+		}
+	    }
+	  else if (*pattern != *str)
+	    {
+	      pattern++;
+	      goto repeat;
+	    }
+	  pattern++;
+	  while ((*pattern != ']') && (*pattern != '\0'))
+	    {
+	      if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
+		pattern++;
+	      pattern++;
+	    }			// while()
+	  if (*pattern != '\0')
+	    {
+	      pattern++, str++;
+	    }
+	  break;
+	case '?':
+	  pattern++;
+	  str++;
+	  break;
+	case OB:
+	  pattern++;
+         while ((*pattern != CB) && (*pattern != '\0'))
+	    {
+	      cp = str;
+	      ok = TRUE;
+	      while (ok && (*cp != '\0') && (*pattern != '\0') &&
+                 (*pattern != ',') && (*pattern != CB))
+		{
+		  if (*pattern == '\\')
+		    pattern++;
+		  ok = (*pattern++ == *cp++);
+		}		// while()
+	      if (*pattern == '\0')
+		{
+		  ok = FALSE;
+		  done = TRUE;
+		  break;
+		}
+	      else if (ok)
+		{
+		  str = cp;
+                   while ((*pattern != CB) && (*pattern != '\0'))
+		    {
+		      if (*++pattern == '\\')
+			{
+                      if (*++pattern == CB)
+			    pattern++;
+			}
+		    }		// while()
+		}
+	      else
+		{
+                 while (*pattern != CB && *pattern != ',' && *pattern != '\0')
+		    {
+		      if (*++pattern == '\\')
+			{
+                            if (*++pattern == CB || *pattern == ',')
+			    pattern++;
+			}
+		    }		// while()
+		}
+	      if (*pattern != '\0')
+		pattern++;
+	    }			// while()
+	  break;
+	default:
+	  if (*str == *pattern)
+	    {
+	      str++, pattern++;
+	    }
+	  else
+	    {
+	      done = TRUE;
+	    }
+	}			// switch()
+    }				// while()
+  while (*pattern == '*')
+    pattern++;
+  return ((*str == '\0') && (*pattern == '\0'));
+}
+
+#else /* MS-DOS/Windows glob() */
+/*************************************************************************
+ *
+ *  wxMatchWild matches the given pattern string against 
+ *  a text string, and returns TRUE if it matches, FALSE otherwise.
+ *
+ *  A match means that the entire text string is used up in the matching.
+ *  The pattern can contain the following wildcards.
+ * 
+ *  * -- matches any sequence of characters
+ *  ? -- matches one character
+ *
+ * If one or other or both of the string arguments to wxMatchWild function is  
+ * NULL (i.e. there isn't a string), then the function returns FALSE.
+ *
+ */
+static bool wxPatternMatch (const char *pattern, const char *text, size_t i, size_t j);
+
+// @@@@ dotSpecial is ignored by MS-DOS
+bool 
+wxMatchWild (const char *pattern, const char *text, bool /* dotSpecial */ )
+{
+  if (pattern == NULL || text == NULL || *pattern == '\0' || *text == '\0')
+    return FALSE;
+  return wxPatternMatch (pattern, text, 0, 0);
+}
+
+/*************************************************************************
+ *
+ *  wxPatternMatch does the work for wxMatchWild. wxPatternMatch  matches 
+ *  the given pattern string against a text string, and returns TRUE if 
+ *  it matches, FALSE otherwise. It is assumed that the string arguments
+ *  to wxPatternMatch exist.
+ *
+ *  A match means that the entire text string is used up in the matching.
+ *  The pattern can contain the following wildcards.
+ * 
+ *  * -- matches any sequence of characters
+ *  ? -- matches one character
+ *
+ *  wxPatternMatch works by going down the pattern trying to match the
+ *  the same index character in the pattern and string arrays, and stops
+ *  when the end of the pattern or text string is reached. However, if a
+ *  '*' wildcard is met, the algorithm checks to see whether the remaining 
+ *  pattern (after the wildcard) matches the rest of the text (i.e. the 
+ *  wxPatternMatch function is called recursively).
+ */
+// Recursive
+static bool 
+wxPatternMatch (const char *pattern, const char *text, size_t i, size_t j)
+{
+  size_t pattern_length = strlen (pattern);
+  size_t text_length = strlen (text);
+  bool match = FALSE;
+
+#ifdef wx_msw
+// MS-DOS file system is case INDEPENDENT
+# define EQU(x,y) (wxToLower(x) == wxToLower(y))
+#else
+# define EQU(x,y) ((x) == (y))
+#endif
+
+  while (j < pattern_length && i < text_length)
+    {
+      if (EQU(text[i], pattern[j]) || pattern[j] == '?')
+	{
+	  match = TRUE;
+	  i++, j++;
+	}
+      else if (pattern[j] == '*')
+	{
+	  // If pattern ends in '*'
+	  if (++j == pattern_length)
+	    {
+	      match = TRUE;
+	      i = text_length;
+	    }
+	  else
+	    {
+	      match = FALSE;
+// after wildcard check to see whether rest of pattern matches 
+	      // up with rest of text
+	      while (i < text_length && match != TRUE)
+		{
+		  match = wxPatternMatch (pattern, text, i, j);
+		  i++;
+		}
+// text index is decremented so that it points to where 
+	      // the text string starts to match the rest of the pattern
+	      i--;
+	    }
+	}
+      else if (! EQU(text[i], pattern[j]))
+	{
+	  j = pattern_length;
+	  match = FALSE;
+	}
+    }
+  if (j == pattern_length && i == text_length && match == TRUE)
+    {
+      return TRUE;
+    }
+  else
+// special case where pattern and text are the same except that pattern
+    // also only has '*' wildcards on the end
+  if (i == text_length && pattern[j] == '*' && match == TRUE)
+    {
+      for (; j < pattern_length; j++)
+	{
+	  if (pattern[j] != '*')
+	    return FALSE;
+	}
+      return TRUE;
+    }
+  else
+    {
+      return FALSE;
+    }
+}
+
+#endif /* UNIX_GLOB */
+//-----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/common/graphcmn.cpp b/Externals/wxWidgets/src/common/graphcmn.cpp
index d0b4c10760..70f1a34164 100644
--- a/Externals/wxWidgets/src/common/graphcmn.cpp
+++ b/Externals/wxWidgets/src/common/graphcmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     
-// RCS-ID:      $Id: graphcmn.cpp 49287 2007-10-21 11:52:54Z SC $
+// RCS-ID:      $Id: graphcmn.cpp 56801 2008-11-16 23:25:09Z KO $
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -120,10 +120,12 @@ wxObjectRefData* wxGraphicsObject::CloneRefData(const wxObjectRefData* data) con
 IMPLEMENT_DYNAMIC_CLASS(wxGraphicsPen, wxGraphicsObject)
 IMPLEMENT_DYNAMIC_CLASS(wxGraphicsBrush, wxGraphicsObject)
 IMPLEMENT_DYNAMIC_CLASS(wxGraphicsFont, wxGraphicsObject)
+IMPLEMENT_DYNAMIC_CLASS(wxGraphicsBitmap, wxGraphicsObject)
 
 WXDLLIMPEXP_DATA_CORE(wxGraphicsPen) wxNullGraphicsPen;
 WXDLLIMPEXP_DATA_CORE(wxGraphicsBrush) wxNullGraphicsBrush;
 WXDLLIMPEXP_DATA_CORE(wxGraphicsFont) wxNullGraphicsFont;
+WXDLLIMPEXP_DATA_CORE(wxGraphicsBitmap) wxNullGraphicsBitmap;
 
 //-----------------------------------------------------------------------------
 // matrix
@@ -729,6 +731,11 @@ wxGraphicsFont wxGraphicsContext::CreateFont( const wxFont &font , const wxColou
     return GetRenderer()->CreateFont(font,col);
 }
 
+wxGraphicsBitmap wxGraphicsContext::CreateBitmap( const wxBitmap& bmp ) const
+{
+    return GetRenderer()->CreateBitmap(bmp);
+}
+
 wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc) 
 {
     return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
diff --git a/Externals/wxWidgets/src/common/imagbmp.cpp b/Externals/wxWidgets/src/common/imagbmp.cpp
index 0d48451bb8..d0930f464f 100644
--- a/Externals/wxWidgets/src/common/imagbmp.cpp
+++ b/Externals/wxWidgets/src/common/imagbmp.cpp
@@ -2,7 +2,7 @@
 // Name:        src/common/imagbmp.cpp
 // Purpose:     wxImage BMP,ICO and CUR handlers
 // Author:      Robert Roebling, Chris Elliott
-// RCS-ID:      $Id: imagbmp.cpp 41819 2006-10-09 17:51:07Z VZ $
+// RCS-ID:      $Id: imagbmp.cpp 54942 2008-08-03 00:23:38Z VZ $
 // Copyright:   (c) Robert Roebling, Chris Elliott
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -454,9 +454,9 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
                              wxFileOffset bmpOffset, wxInputStream& stream,
                              bool verbose, bool IsBmp, bool hasPalette)
 {
-    wxInt32         aDword, rmask = 0, gmask = 0, bmask = 0;
-    int             rshift = 0, gshift = 0, bshift = 0;
-    int             rbits = 0, gbits = 0, bbits = 0;
+    wxInt32         aDword, rmask = 0, gmask = 0, bmask = 0, amask = 0;
+    int             rshift = 0, gshift = 0, bshift = 0, ashift = 0;
+    int             rbits = 0, gbits = 0, bbits = 0, abits = 0;
     wxInt32         dbuf[4];
     wxInt8          bbuf[4];
     wxUint8         aByte;
@@ -488,11 +488,29 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
     {
         if ( verbose )
             wxLogError( _("BMP: Couldn't allocate memory.") );
-        if ( cmap )
-            delete[] cmap;
+        delete[] cmap;
         return false;
     }
 
+    unsigned char *alpha;
+    if ( bpp == 32 )
+    {
+        // tell the image to allocate an alpha buffer
+        image->SetAlpha();
+        alpha = image->GetAlpha();
+        if ( !alpha )
+        {
+            if ( verbose )
+                wxLogError(_("BMP: Couldn't allocate memory."));
+            delete[] cmap;
+            return false;
+        }
+    }
+    else // no alpha
+    {
+        alpha = NULL;
+    }
+
     // Reading the palette, if it exists:
     if ( bpp < 16 && ncolors != 0 )
     {
@@ -577,9 +595,13 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
             rmask = 0x00FF0000;
             gmask = 0x0000FF00;
             bmask = 0x000000FF;
+            amask = 0xFF000000;
+
+            ashift = 24;
             rshift = 16;
             gshift = 8;
             bshift = 0;
+            abits = 8;
             rbits = 8;
             gbits = 8;
             bbits = 8;
@@ -815,6 +837,11 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
                 ptr[poffset + 1] = temp;
                 temp = (unsigned char)((aDword & bmask) >> bshift);
                 ptr[poffset + 2] = temp;
+                if ( alpha )
+                {
+                    temp = (unsigned char)((aDword & amask) >> ashift);
+                    alpha[line * width + column] = temp;
+                }
                 column++;
             }
         }
diff --git a/Externals/wxWidgets/src/common/image.cpp b/Externals/wxWidgets/src/common/image.cpp
index d63f8fe29c..7885d6486c 100644
--- a/Externals/wxWidgets/src/common/image.cpp
+++ b/Externals/wxWidgets/src/common/image.cpp
@@ -2,7 +2,7 @@
 // Name:        src/common/image.cpp
 // Purpose:     wxImage
 // Author:      Robert Roebling
-// RCS-ID:      $Id: image.cpp 53245 2008-04-17 15:10:20Z RR $
+// RCS-ID:      $Id: image.cpp 59197 2009-02-28 15:44:53Z VZ $
 // Copyright:   (c) Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -234,6 +234,7 @@ bool wxImage::Create( int width, int height, unsigned char* data, unsigned char*
     M_IMGDATA->m_height = height;
     M_IMGDATA->m_ok = true;
     M_IMGDATA->m_static = static_data;
+    M_IMGDATA->m_staticAlpha = static_data;
 
     return true;
 }
@@ -1274,7 +1275,6 @@ void wxImage::Paste( const wxImage &image, int x, int y )
          (GetMaskGreen()==image.GetMaskGreen()) &&
          (GetMaskBlue()==image.GetMaskBlue()))))
     {
-        width *= 3;
         unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth();
         int source_step = image.GetWidth()*3;
 
@@ -1282,11 +1282,10 @@ void wxImage::Paste( const wxImage &image, int x, int y )
         int target_step = M_IMGDATA->m_width*3;
         for (int j = 0; j < height; j++)
         {
-            memcpy( target_data, source_data, width );
+            memcpy( target_data, source_data, width*3 );
             source_data += source_step;
             target_data += target_step;
         }
-        return;
     }
 
     // Copy over the alpha channel from the original image
@@ -1315,7 +1314,6 @@ void wxImage::Paste( const wxImage &image, int x, int y )
         unsigned char g = image.GetMaskGreen();
         unsigned char b = image.GetMaskBlue();
 
-        width *= 3;
         unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth();
         int source_step = image.GetWidth()*3;
 
@@ -1324,7 +1322,7 @@ void wxImage::Paste( const wxImage &image, int x, int y )
 
         for (int j = 0; j < height; j++)
         {
-            for (int i = 0; i < width; i+=3)
+            for (int i = 0; i < width*3; i+=3)
             {
                 if ((source_data[i]   != r) ||
                     (source_data[i+1] != g) ||
diff --git a/Externals/wxWidgets/src/common/imagpcx.cpp b/Externals/wxWidgets/src/common/imagpcx.cpp
index 55740685ee..d77be9b83c 100644
--- a/Externals/wxWidgets/src/common/imagpcx.cpp
+++ b/Externals/wxWidgets/src/common/imagpcx.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxImage PCX handler
 // Author:      Guillermo Rodriguez Garcia 
 // Version:     1.1
-// CVS-ID:      $Id: imagpcx.cpp 40943 2006-08-31 19:31:43Z ABX $
+// CVS-ID:      $Id: imagpcx.cpp 54766 2008-07-22 20:16:03Z VZ $
 // Copyright:   (c) 1999 Guillermo Rodriguez Garcia
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -87,17 +87,15 @@ void RLEencode(unsigned char *p, unsigned int size, wxOutputStream& s)
 
 void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s)
 {
-    unsigned int i, data, cont;
-
     // Read 'size' bytes. The PCX official specs say there will be
     // a decoding break at the end of each scanline (but not at the
     // end of each plane inside a scanline). Only use this function
     // to read one or more _complete_ scanlines. Else, more than
     // 'size' bytes might be read and the buffer might overflow.
 
-    while (size > 0)
+    while (size != 0)
     {
-        data = (unsigned char)s.GetC();
+        unsigned int data = (unsigned char)s.GetC();
 
         // If ((data & 0xC0) != 0xC0), then the value read is a data
         // byte. Else, it is a counter (cont = val & 0x3F) and the
@@ -110,9 +108,11 @@ void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s)
         }
         else
         {
-            cont = data & 0x3F;
+            unsigned int cont = data & 0x3F;
+            if (cont > size) // can happen only if the file is malformed
+                break;
             data = (unsigned char)s.GetC();
-            for (i = 1; i <= cont; i++)
+            for (unsigned int i = 1; i <= cont; i++)
                 *(p++) = (unsigned char)data;
             size -= cont;
         }
diff --git a/Externals/wxWidgets/src/common/intl.cpp b/Externals/wxWidgets/src/common/intl.cpp
index 4d4f9afc3b..550318c533 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 53628 2008-05-17 22:49:30Z VZ $
+// RCS-ID:      $Id: intl.cpp 57501 2008-12-22 19:50:17Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -2504,7 +2504,13 @@ wxFontEncoding wxLocale::GetSystemEncoding()
         // (a.k.a. US-ASCII) which is arguably a bug but keep it like this for
         // backwards compatibility and just take care to not return
         // wxFONTENCODING_DEFAULT from here as this surely doesn't make sense
-        if ( enc != wxFONTENCODING_MAX && enc != wxFONTENCODING_DEFAULT )
+        if ( enc == wxFONTENCODING_DEFAULT )
+        {
+            // we don't have wxFONTENCODING_ASCII, so use the closest one
+            return wxFONTENCODING_ISO8859_1;
+        }
+
+        if ( enc != wxFONTENCODING_MAX )
         {
             return enc;
         }
@@ -3699,9 +3705,9 @@ void wxLocale::InitLanguagesDB()
    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,                    "sr_RS", LANG_SERBIAN   , SUBLANG_DEFAULT                   , wxLayout_LeftToRight, "Serbian")
+   LNG(wxLANGUAGE_SERBIAN_CYRILLIC,           "sr_RS", LANG_SERBIAN   , SUBLANG_SERBIAN_CYRILLIC          , wxLayout_LeftToRight, "Serbian (Cyrillic)")
+   LNG(wxLANGUAGE_SERBIAN_LATIN,              "sr_RS@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@latin", LANG_SERBIAN   , SUBLANG_SERBIAN_LATIN             , wxLayout_LeftToRight, "Serbian (Latin)")
    LNG(wxLANGUAGE_SERBO_CROATIAN,             "sh"   , 0              , 0                                 , wxLayout_LeftToRight, "Serbo-Croatian")
diff --git a/Externals/wxWidgets/src/common/ipcbase.cpp b/Externals/wxWidgets/src/common/ipcbase.cpp
index da6cfa249b..80fa9412d0 100644
--- a/Externals/wxWidgets/src/common/ipcbase.cpp
+++ b/Externals/wxWidgets/src/common/ipcbase.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: ipcbase.cpp 38787 2006-04-18 07:24:35Z ABX $
+// RCS-ID:      $Id: ipcbase.cpp 54615 2008-07-14 02:34:29Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -61,8 +61,8 @@ wxConnectionBase::wxConnectionBase(const wxConnectionBase& copy)
 
 wxConnectionBase::~wxConnectionBase(void)
 {
-  if ( m_deletebufferwhendone && m_buffer )
-   delete m_buffer;
+  if ( m_deletebufferwhendone )
+   delete [] m_buffer;
 }
 
 wxChar *wxConnectionBase::GetBufferAtLeast( size_t bytes )
@@ -73,8 +73,7 @@ wxChar *wxConnectionBase::GetBufferAtLeast( size_t bytes )
   {  // need to resize buffer
     if ( m_deletebufferwhendone )
     { // we're in charge of buffer, increase it
-      if ( m_buffer )
-        delete m_buffer;
+      delete [] m_buffer;
       // the argument specifies **byte size**, but m_buffer is of type
       // wxChar. Under unicode: sizeof(wxChar) > 1, so the buffer size is
       // bytes / sizeof(wxChar) rounded upwards.
diff --git a/Externals/wxWidgets/src/common/menucmn.cpp b/Externals/wxWidgets/src/common/menucmn.cpp
index 241ddb765c..145fe9b01e 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 51361 2008-01-24 18:12:55Z PC $
+// RCS-ID:      $Id: menucmn.cpp 57852 2009-01-06 09:40:34Z SC $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -194,7 +194,11 @@ wxAcceleratorEntry::ParseAccel(const wxString& text, int *flagsOut, int *keyOut)
     {
         if ( (label[n] == '+') || (label[n] == '-') )
         {
+            // differentiate between a ctrl that will be translated to cmd on mac
+            // and an explicit xctrl that will not be translated and remains a ctrl
             if ( CompareAccelString(current, wxTRANSLATE("ctrl")) )
+                accelFlags |= wxACCEL_CMD;
+            else if ( CompareAccelString(current, wxTRANSLATE("xctrl")) )
                 accelFlags |= wxACCEL_CTRL;
             else if ( CompareAccelString(current, wxTRANSLATE("alt")) )
                 accelFlags |= wxACCEL_ALT;
@@ -312,8 +316,12 @@ wxString wxAcceleratorEntry::ToString() const
     int flags = GetFlags();
     if ( flags & wxACCEL_ALT )
         text += _("Alt-");
-    if ( flags & wxACCEL_CTRL )
+    if ( flags & wxACCEL_CMD )
         text += _("Ctrl-");
+#ifdef __WXMAC__
+    if ( flags & wxACCEL_CTRL )
+        text += _("XCtrl-");
+#endif
     if ( flags & wxACCEL_SHIFT )
         text += _("Shift-");
 
diff --git a/Externals/wxWidgets/src/common/object.cpp b/Externals/wxWidgets/src/common/object.cpp
index dc01ccf504..24eddcde72 100644
--- a/Externals/wxWidgets/src/common/object.cpp
+++ b/Externals/wxWidgets/src/common/object.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Ron Lee
 // Created:     04/01/98
-// RCS-ID:      $Id: object.cpp 40111 2006-07-15 22:21:44Z MW $
+// RCS-ID:      $Id: object.cpp 56500 2008-10-23 14:48:31Z MW $
 // Copyright:   (c) 1998 Julian Smart
 //              (c) 2001 Ron Lee 
 // Licence:     wxWindows licence
@@ -205,37 +205,45 @@ wxClassInfo *wxClassInfo::FindClass(const wxChar *className)
     }
 }
 
-// This function wasn't written to be reentrant but there is a possiblity of
-// reentrance if something it does causes a shared lib to load and register
-// classes. On Solaris this happens when the wxHashTable is newed, so the first
-// part of the function has been modified to handle it, and a wxASSERT checks
-// against reentrance in the remainder of the function.
+// Reentrance can occur on some platforms (Solaris for one), as the use of hash
+// and string objects can cause other modules to load and register classes
+// before the original call returns. This is handled by keeping the hash table
+// local when it is first created and only assigning it to the global variable
+// when the function is ready to return.
+//
+// That does make the assumption that after the function has completed the
+// first time the problem will no longer happen; all the modules it depends on
+// will have been loaded. The assumption is checked using the 'entry' variable
+// as a reentrance guard, it checks that once the hash table is global it is
+// not accessed multiple times simulateously.
 
 void wxClassInfo::Register()
 {
-    if ( !sm_classTable )
-    {
-        wxHashTable *classTable = new wxHashTable(wxKEY_STRING);
-
-        // check for reentrance
-        if ( sm_classTable )
-            delete classTable;
-        else
-            sm_classTable = classTable;
-    }
-
 #ifdef __WXDEBUG__
     // reentrance guard - see note above
     static int entry = 0;
-    wxASSERT_MSG(++entry == 1, _T("wxClassInfo::Register() reentrance"));
 #endif
 
+    wxHashTable *classTable;
+
+    if ( !sm_classTable )
+    {
+        // keep the hash local initially, reentrance is possible
+        classTable = new wxHashTable(wxKEY_STRING);
+    }
+    else
+    {
+        // guard againt reentrance once the global has been created
+        wxASSERT_MSG(++entry == 1, _T("wxClassInfo::Register() reentrance"));
+        classTable = sm_classTable;
+    }
+
     // Using IMPLEMENT_DYNAMIC_CLASS() macro twice (which may happen if you
     // link any object module twice mistakenly, or link twice against wx shared
     // library) will break this function because it will enter an infinite loop
     // and eventually die with "out of memory" - as this is quite hard to
     // detect if you're unaware of this, try to do some checks here.
-    wxASSERT_MSG( sm_classTable->Get(m_className) == NULL,
+    wxASSERT_MSG( classTable->Get(m_className) == NULL,
         wxString::Format
         (
             _T("Class \"%s\" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?"),
@@ -243,10 +251,27 @@ void wxClassInfo::Register()
         )
     );
 
-    sm_classTable->Put(m_className, (wxObject *)this);
+    classTable->Put(m_className, (wxObject *)this);
+
+    // if we're using a local hash we need to try to make it global
+    if ( sm_classTable != classTable )
+    {
+        if ( !sm_classTable )
+        {
+            // make the hash global
+            sm_classTable = classTable;
+        }
+        else
+        {
+            // the gobal hash has already been created by a reentrant call,
+            // so delete the local hash and try again
+            delete classTable;
+            Register();
+        }
+    }
 
 #ifdef __WXDEBUG__
-    --entry;
+    entry = 0;
 #endif
 }
 
diff --git a/Externals/wxWidgets/src/common/pickerbase.cpp b/Externals/wxWidgets/src/common/pickerbase.cpp
index 0526b5764c..87c99066c3 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 52566 2008-03-16 13:50:17Z JS $
+// RCS-ID:      $Id: pickerbase.cpp 58463 2009-01-27 17:39:50Z BP $
 // Copyright:   (c) Francesco Montorsi
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -144,12 +144,12 @@ void wxPickerBase::DoSetToolTip(wxToolTip *tip)
 // wxPickerBase - event handlers
 // ----------------------------------------------------------------------------
 
-void wxPickerBase::OnTextCtrlKillFocus(wxFocusEvent &)
+void wxPickerBase::OnTextCtrlKillFocus(wxFocusEvent& event)
 {
-    wxASSERT(m_text);
+    event.Skip();
 
     // don't leave the textctrl empty
-    if (m_text->GetValue().empty())
+    if (m_text && m_text->GetValue().empty())
         UpdateTextCtrlFromPicker();
 }
 
diff --git a/Externals/wxWidgets/src/common/popupcmn.cpp b/Externals/wxWidgets/src/common/popupcmn.cpp
index dafa9609c0..84bb22ed6f 100644
--- a/Externals/wxWidgets/src/common/popupcmn.cpp
+++ b/Externals/wxWidgets/src/common/popupcmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     06.01.01
-// RCS-ID:      $Id: popupcmn.cpp 49643 2007-11-05 16:55:13Z SC $
+// RCS-ID:      $Id: popupcmn.cpp 56979 2008-11-26 15:31:18Z JMS $
 // Copyright:   (c) 2001 Vadim Zeitlin 
 // License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -43,9 +43,10 @@
 
 #ifdef __WXGTK__
     #include 
-#endif
-#ifdef __WXX11__
-#include "wx/x11/private.h"
+#elif defined(__WXMSW__)
+    #include "wx/msw/private.h"
+#elif defined(__WXX11__)
+    #include "wx/x11/private.h"
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
@@ -260,8 +261,16 @@ void wxPopupTransientWindow::Popup(wxWindow *winFocus)
 
     m_child->PushEventHandler(m_handlerPopup);
 
-    m_focus = winFocus ? winFocus : this;
-    m_focus->SetFocus();
+#if defined(__WXMSW__)
+    // Focusing on child of popup window does not work on MSW unless WS_POPUP
+    // style is set. We do not even want to try to set the focus, as it may
+    // provoke errors on some Windows versions (Vista and later).
+    if ( ::GetWindowLong(GetHwnd(), GWL_STYLE) & WS_POPUP )
+#endif
+    {
+        m_focus = winFocus ? winFocus : this;
+        m_focus->SetFocus();
+    }
 
 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
     // MSW doesn't allow to set focus to the popup window, but we need to
diff --git a/Externals/wxWidgets/src/common/prntbase.cpp b/Externals/wxWidgets/src/common/prntbase.cpp
index e007758765..93683c7ca2 100644
--- a/Externals/wxWidgets/src/common/prntbase.cpp
+++ b/Externals/wxWidgets/src/common/prntbase.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: prntbase.cpp 42763 2006-10-30 20:34:25Z VZ $
+// RCS-ID:      $Id: prntbase.cpp 58209 2009-01-18 21:31:36Z RD $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -18,6 +18,17 @@
 
 #if wxUSE_PRINTING_ARCHITECTURE
 
+// change this to 1 to use experimental high-quality printing on Windows
+// (NB: this can't be in msw/printwin.cpp because of binary compatibility)
+#define wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW 0
+
+#if wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+    #if !defined(__WXMSW__) || !wxUSE_IMAGE || !wxUSE_WXDIB
+        #undef wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+        #define wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW 0
+    #endif
+#endif
+
 #include "wx/dcprint.h"
 
 #ifndef WX_PRECOMP
@@ -65,6 +76,19 @@
     #endif
 #endif // __WXMSW__
 
+#if wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+
+#include "wx/msw/dib.h"
+#include "wx/image.h"
+
+typedef bool (wxPrintPreviewBase::*RenderPageIntoDCFunc)(wxDC&, int);
+static bool RenderPageIntoBitmapHQ(wxPrintPreviewBase *preview,
+                                   RenderPageIntoDCFunc RenderPageIntoDC,
+                                   wxPrinterDC& printerDC,
+                                   wxBitmap& bmp, int pageNum,
+                                   int pageWidth, int pageHeight);
+#endif // wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+
 //----------------------------------------------------------------------------
 // wxPrintFactory
 //----------------------------------------------------------------------------
@@ -508,6 +532,7 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
     wxPrinterBase::sm_abortIt = true;
     wxPrinterBase::sm_abortWindow->Show(false);
     wxPrinterBase::sm_abortWindow->Close(true);
+    wxPrinterBase::sm_abortWindow->Destroy();
     wxPrinterBase::sm_abortWindow = (wxWindow *) NULL;
 }
 
@@ -1469,6 +1494,70 @@ void wxPrintPreviewBase::AdjustScrollbars(wxPreviewCanvas *canvas)
         canvas->SetScrollbars(10, 10, scrollUnitsX, scrollUnitsY, 0, 0, true);
 }
 
+bool wxPrintPreviewBase::RenderPageIntoDC(wxDC& dc, int pageNum)
+{
+    m_previewPrintout->SetDC(&dc);
+    m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight);
+
+    // Need to delay OnPreparePrinting() until here, so we have enough
+    // information.
+    if (!m_printingPrepared)
+    {
+        m_previewPrintout->OnPreparePrinting();
+        int selFrom, selTo;
+        m_previewPrintout->GetPageInfo(&m_minPage, &m_maxPage, &selFrom, &selTo);
+        m_printingPrepared = true;
+    }
+
+    m_previewPrintout->OnBeginPrinting();
+
+    if (!m_previewPrintout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))
+    {
+        wxMessageBox(_("Could not start document preview."), _("Print Preview Failure"), wxOK);
+        return false;
+    }
+
+    m_previewPrintout->OnPrintPage(pageNum);
+    m_previewPrintout->OnEndDocument();
+    m_previewPrintout->OnEndPrinting();
+
+    m_previewPrintout->SetDC(NULL);
+
+    return true;
+}
+
+bool wxPrintPreviewBase::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum)
+{
+#if wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+    // try high quality rendering first:
+    static bool s_hqPreviewFailed = false;
+    if ( !s_hqPreviewFailed )
+    {
+        wxPrinterDC printerDC(m_printDialogData.GetPrintData());
+        if ( RenderPageIntoBitmapHQ(this,
+                                    &wxPrintPreviewBase::RenderPageIntoDC,
+                                    printerDC,
+                                    bmp, pageNum,
+                                    m_pageWidth, m_pageHeight) )
+        {
+            return true;
+        }
+        else
+        {
+            wxLogTrace(_T("printing"),
+                       _T("high-quality preview failed, falling back to normal"));
+            s_hqPreviewFailed = true; // don't bother re-trying
+        }
+    }
+#endif // wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+
+    wxMemoryDC memoryDC;
+    memoryDC.SelectObject(bmp);
+    memoryDC.Clear();
+
+    return RenderPageIntoDC(memoryDC, pageNum);
+}
+
 bool wxPrintPreviewBase::RenderPage(int pageNum)
 {
     wxBusyCursor busy;
@@ -1497,44 +1586,15 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
         }
     }
 
-    wxMemoryDC memoryDC;
-    memoryDC.SelectObject(*m_previewBitmap);
-
-    memoryDC.Clear();
-
-    m_previewPrintout->SetDC(&memoryDC);
-    m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight);
-
-    // Need to delay OnPreparePrinting until here, so we have enough information.
-    if (!m_printingPrepared)
-    {
-        m_previewPrintout->OnPreparePrinting();
-        int selFrom, selTo;
-        m_previewPrintout->GetPageInfo(&m_minPage, &m_maxPage, &selFrom, &selTo);
-        m_printingPrepared = true;
-    }
-
-    m_previewPrintout->OnBeginPrinting();
-
-    if (!m_previewPrintout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))
+    if ( !RenderPageIntoBitmap(*m_previewBitmap, pageNum) )
     {
         wxMessageBox(_("Could not start document preview."), _("Print Preview Failure"), wxOK);
 
-        memoryDC.SelectObject(wxNullBitmap);
-
         delete m_previewBitmap;
         m_previewBitmap = NULL;
         return false;
     }
 
-    m_previewPrintout->OnPrintPage(pageNum);
-    m_previewPrintout->OnEndDocument();
-    m_previewPrintout->OnEndPrinting();
-
-    m_previewPrintout->SetDC(NULL);
-
-    memoryDC.SelectObject(wxNullBitmap);
-
 #if wxUSE_STATUSBAR
     wxString status;
     if (m_maxPage != 0)
@@ -1758,4 +1818,273 @@ void wxPrintPreview::DetermineScaling()
     m_pimpl->DetermineScaling();
 }
 
+//----------------------------------------------------------------------------
+// experimental backport of high-quality preview on Windows
+//----------------------------------------------------------------------------
+
+#if wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+
+// The preview, as implemented in wxPrintPreviewBase (and as used prior to wx3)
+// is inexact: it uses screen DC, which has much lower resolution and has
+// other properties different from printer DC, so the preview is not quite
+// right.
+//
+// To make matters worse, if the application depends heavily on GetTextExtent()
+// or does text layout itself, the output in preview and on paper can be very
+// different. In particular, wxHtmlEasyPrinting is affected and the preview
+// can be easily off by several pages.
+//
+// To fix this, we attempt to render the preview into high-resolution bitmap
+// using DC with same resolution etc. as the printer DC. This takes lot of
+// memory, so the code is more complicated than it could be, but the results
+// are much better.
+//
+// Finally, this code is specific to wxMSW, because it doesn't make sense to
+// bother with it on other platforms. Both OSX and modern GNOME/GTK+
+// environments have builtin accurate preview (that applications should use
+// instead) and the differences between screen and printer DC in wxGTK are so
+// large than this trick doesn't help at all.
+
+namespace
+{
+
+// If there's not enough memory, we need to render the preview in parts.
+// Unfortunately we cannot simply use wxMemoryDC, because it reports its size
+// as bitmap's size, and we need to use smaller bitmap while still reporting
+// original ("correct") DC size, because printing code frequently uses
+// GetSize() to determine scaling factor. This DC class handles this.
+
+class PageFragmentDC : public wxMemoryDC
+{
+public:
+    PageFragmentDC(wxDC *printer, wxBitmap& bmp,
+                   const wxPoint& offset,
+                   const wxSize& fullSize)
+        : wxMemoryDC(printer),
+          m_offset(offset),
+          m_fullSize(fullSize)
+    {
+        SetDeviceOrigin(0, 0);
+        SelectObject(bmp);
+    }
+
+    virtual void SetDeviceOrigin(wxCoord x, wxCoord y)
+    {
+        wxMemoryDC::SetDeviceOrigin(x - m_offset.x, y - m_offset.y);
+    }
+
+    virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const
+    {
+        wxMemoryDC::DoGetDeviceOrigin(x, y);
+        if ( x ) *x += m_offset.x;
+        if ( x ) *y += m_offset.y;
+    }
+
+    virtual void DoGetSize(int *width, int *height) const
+    {
+        if ( width )
+            *width = m_fullSize.x;
+        if ( height )
+            *height = m_fullSize.y;
+    }
+
+private:
+    wxPoint m_offset;
+    wxSize m_fullSize;
+};
+
+// estimate how big chunks we can render, given available RAM
+long ComputeFragmentSize(long printerDepth,
+                         long width,
+                         long height)
+{
+    // Compute the amount of memory needed to generate the preview.
+    // Memory requirements of RenderPageFragment() are as follows:
+    //
+    // (memory DC - always)
+    //    width * height * printerDepth/8
+    // (wxImage + wxDIB instance)
+    //    width * height * (3 + 4)
+    //    (this could be reduced to *3 if using wxGraphicsContext)
+    //
+    // So, given amount of memory M, we can render at most
+    //
+    //    height = M / (width * (printerDepth/8 + F))
+    //
+    // where F is 3 or 7 depending on whether wxGraphicsContext is used or not
+
+    wxMemorySize memAvail = wxGetFreeMemory();
+    if ( memAvail == -1 )
+    {
+        // we don't know;  10meg shouldn't be a problem hopefully
+        memAvail = 10000000;
+    }
+    else
+    {
+        // limit ourselves to half of available RAM to have a margin for other
+        // apps, for our rendering code, and for miscalculations
+        memAvail /= 2;
+    }
+
+    const float perPixel = float(printerDepth)/8 + (3 + 4);
+
+    const long perLine = long(width * perPixel);
+    const long maxstep = (memAvail / perLine).GetValue();
+    const long step = wxMin(height, maxstep);
+
+    wxLogTrace(_T("printing"),
+               _T("using %liMB of RAM (%li lines) for preview, %li %lipx fragments"),
+               long((memAvail >> 20).GetValue()),
+               maxstep,
+               (height+step-1) / step,
+               step);
+
+    return step;
+}
+
+} // anonymous namespace
+
+
+static bool RenderPageFragment(wxPrintPreviewBase *preview,
+                               RenderPageIntoDCFunc RenderPageIntoDC,
+                               float scaleX, float scaleY,
+                               int *nextFinalLine,
+                               wxPrinterDC& printer,
+                               wxMemoryDC& finalDC,
+                               const wxRect& rect,
+                               int pageWidth, int pageHeight,
+                               int pageNum)
+{
+    // compute 'rect' equivalent in the small final bitmap:
+    const wxRect smallRect(wxPoint(0, *nextFinalLine),
+                           wxPoint(int(rect.GetRight() * scaleX),
+                                   int(rect.GetBottom() * scaleY)));
+    wxLogTrace(_T("printing"),
+               _T("rendering fragment of page %i: [%i,%i,%i,%i] scaled down to [%i,%i,%i,%i]"),
+               pageNum,
+               rect.x, rect.y, rect.GetRight(), rect.GetBottom(),
+               smallRect.x, smallRect.y, smallRect.GetRight(), smallRect.GetBottom()
+               );
+
+    // create DC and bitmap compatible with printer DC:
+    wxBitmap large(rect.width, rect.height, printer);
+    if ( !large.IsOk() )
+        return false;
+
+    // render part of the page into it:
+    {
+        PageFragmentDC memoryDC(&printer, large,
+                                rect.GetPosition(),
+                                wxSize(pageWidth, pageHeight));
+        if ( !memoryDC.IsOk() )
+            return false;
+
+        memoryDC.Clear();
+
+        if ( !(preview->*RenderPageIntoDC)(memoryDC, pageNum) )
+            return false;
+    } // release bitmap from memoryDC
+
+    // now scale the rendered part down and blit it into final output:
+
+    wxImage img;
+    {
+        wxDIB dib(large);
+        if ( !dib.IsOk() )
+            return false;
+        large = wxNullBitmap; // free memory a.s.a.p.
+        img = dib.ConvertToImage();
+    } // free the DIB now that it's no longer needed, too
+
+    if ( !img.IsOk() )
+        return false;
+
+    img.Rescale(smallRect.width, smallRect.height, wxIMAGE_QUALITY_HIGH);
+    if ( !img.IsOk() )
+        return false;
+
+    wxBitmap bmp(img);
+    if ( !bmp.IsOk() )
+        return false;
+
+    img = wxNullImage;
+    finalDC.DrawBitmap(bmp, smallRect.x, smallRect.y);
+    if ( bmp.IsOk() )
+    {
+        *nextFinalLine += smallRect.height;
+        return true;
+    }
+
+    return false;
+}
+
+static bool RenderPageIntoBitmapHQ(wxPrintPreviewBase *preview,
+                                   RenderPageIntoDCFunc RenderPageIntoDC,
+                                   wxPrinterDC& printerDC,
+                                   wxBitmap& bmp, int pageNum,
+                                   int pageWidth, int pageHeight)
+{
+    wxLogTrace(_T("printing"), _T("rendering HQ preview of page %i"), pageNum);
+
+    if ( !printerDC.IsOk() )
+        return false;
+
+    // compute scale factor
+    const float scaleX = float(bmp.GetWidth()) / float(pageWidth);
+    const float scaleY =  float(bmp.GetHeight()) / float(pageHeight);
+
+    wxMemoryDC bmpDC;
+    bmpDC.SelectObject(bmp);
+    bmpDC.Clear();
+
+    const int initialStep = ComputeFragmentSize(printerDC.GetDepth(),
+                                                pageWidth, pageHeight);
+
+    wxRect todo(0, 0, pageWidth, initialStep); // rect to render
+    int nextFinalLine = 0; // first not-yet-rendered output line
+
+    while ( todo.y < pageHeight )
+    {
+        todo.SetBottom(wxMin(todo.GetBottom(), pageHeight - 1));
+
+        if ( !RenderPageFragment(preview, RenderPageIntoDC,
+                                 scaleX, scaleY,
+                                 &nextFinalLine,
+                                 printerDC,
+                                 bmpDC,
+                                 todo,
+                                 pageWidth, pageHeight,
+                                 pageNum) )
+        {
+            if ( todo.height < 20 )
+            {
+                // something is very wrong if we can't render even at this
+                // slow space, let's bail out and fall back to low quality
+                // preview
+                wxLogTrace(_T("printing"),
+                           _T("it seems that HQ preview doesn't work at all"));
+                return false;
+            }
+
+            // it's possible our memory calculation was off, or conditions
+            // changed, or there's not enough _bitmap_ resources; try if using
+            // smaller bitmap would help:
+            todo.height /= 2;
+
+            wxLogTrace(_T("printing"),
+                       _T("preview of fragment failed, reducing height to %ipx"),
+                       todo.height);
+
+            continue; // retry at the same position again
+        }
+
+        // move to the next segment
+        todo.Offset(0, todo.height);
+    }
+
+    return true;
+}
+
+#endif // wxUSE_HIGH_QUALITY_PREVIEW_IN_WXMSW
+
 #endif // wxUSE_PRINTING_ARCHITECTURE
diff --git a/Externals/wxWidgets/src/common/radiocmn.cpp b/Externals/wxWidgets/src/common/radiocmn.cpp
index 79c2a52c9c..418d4f04f2 100644
--- a/Externals/wxWidgets/src/common/radiocmn.cpp
+++ b/Externals/wxWidgets/src/common/radiocmn.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     03.06.01
-// RCS-ID:      $Id: radiocmn.cpp 39676 2006-06-11 21:13:13Z VZ $
+// RCS-ID:      $Id: radiocmn.cpp 54930 2008-08-02 19:45:23Z VZ $
 // Copyright:   (c) 2001 Vadim Zeitlin 
 // License:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -64,96 +64,106 @@ void wxRadioBoxBase::SetMajorDim(unsigned int majorDim, long style)
 
 int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const
 {
+    const int itemStart = item;
+
     int count = GetCount(),
         numCols = GetColumnCount(),
         numRows = GetRowCount();
 
     bool horz = (style & wxRA_SPECIFY_COLS) != 0;
 
-    switch ( dir )
+    do
     {
-        case wxUP:
-            if ( horz )
-            {
-                item -= numCols;
-            }
-            else // vertical layout
-            {
-                if ( !item-- )
-                    item = count - 1;
-            }
-            break;
+        switch ( dir )
+        {
+            case wxUP:
+                if ( horz )
+                {
+                    item -= numCols;
+                }
+                else // vertical layout
+                {
+                    if ( !item-- )
+                        item = count - 1;
+                }
+                break;
 
-        case wxLEFT:
-            if ( horz )
-            {
-                if ( !item-- )
-                    item = count - 1;
-            }
-            else // vertical layout
-            {
-                item -= numRows;
-            }
-            break;
+            case wxLEFT:
+                if ( horz )
+                {
+                    if ( !item-- )
+                        item = count - 1;
+                }
+                else // vertical layout
+                {
+                    item -= numRows;
+                }
+                break;
 
-        case wxDOWN:
-            if ( horz )
-            {
-                item += numCols;
-            }
-            else // vertical layout
-            {
-                if ( ++item == count )
-                    item = 0;
-            }
-            break;
+            case wxDOWN:
+                if ( horz )
+                {
+                    item += numCols;
+                }
+                else // vertical layout
+                {
+                    if ( ++item == count )
+                        item = 0;
+                }
+                break;
 
-        case wxRIGHT:
-            if ( horz )
-            {
-                if ( ++item == count )
-                    item = 0;
-            }
-            else // vertical layout
-            {
-                item += numRows;
-            }
-            break;
+            case wxRIGHT:
+                if ( horz )
+                {
+                    if ( ++item == count )
+                        item = 0;
+                }
+                else // vertical layout
+                {
+                    item += numRows;
+                }
+                break;
 
-        default:
-            wxFAIL_MSG( _T("unexpected wxDirection value") );
-            return wxNOT_FOUND;
+            default:
+                wxFAIL_MSG( _T("unexpected wxDirection value") );
+                return wxNOT_FOUND;
+        }
+
+        // ensure that the item is in range [0..count)
+        if ( item < 0 )
+        {
+            // first map the item to the one in the same column but in the last
+            // row
+            item += count;
+
+            // now there are 2 cases: either it is the first item of the last
+            // row in which case we need to wrap again and get to the last item
+            // or we can just go to the previous item
+            if ( item % (horz ? numCols : numRows) )
+                item--;
+            else
+                item = count - 1;
+        }
+        else if ( item >= count )
+        {
+            // same logic as above
+            item -= count;
+
+            // ... except that we need to check if this is not the last item,
+            // not the first one
+            if ( (item + 1) % (horz ? numCols : numRows) )
+                item++;
+            else
+                item = 0;
+        }
+
+        wxASSERT_MSG( item < count && item >= 0,
+                      _T("logic error in wxRadioBox::GetNextItem()") );
     }
-
-    // ensure that the item is in range [0..count)
-    if ( item < 0 )
-    {
-        // first map the item to the one in the same column but in the last row
-        item += count;
-
-        // now there are 2 cases: either it is the first item of the last row
-        // in which case we need to wrap again and get to the last item or we
-        // can just go to the previous item
-        if ( item % (horz ? numCols : numRows) )
-            item--;
-        else
-            item = count - 1;
-    }
-    else if ( item >= count )
-    {
-        // same logic as above
-        item -= count;
-
-        // ... except that we need to check if this is not the last item, not
-        // the first one
-        if ( (item + 1) % (horz ? numCols : numRows) )
-            item++;
-        else
-            item = 0;
-    }
-
-    wxASSERT_MSG( item < count && item >= 0,
-                  _T("logic error in wxRadioBox::GetNextItem()") );
+    // we shouldn't select the non-active items, continue looking for a
+    // visible and shown one unless we came back to the item we started from in
+    // which case bail out to avoid infinite loop
+    while ( !(IsItemShown(item) && IsItemEnabled(item)) && item != itemStart );
 
     return item;
 }
diff --git a/Externals/wxWidgets/src/common/regex.cpp b/Externals/wxWidgets/src/common/regex.cpp
index 6591132747..bd77aafe23 100644
--- a/Externals/wxWidgets/src/common/regex.cpp
+++ b/Externals/wxWidgets/src/common/regex.cpp
@@ -4,7 +4,7 @@
 // Author:      Karsten Ballueder and Vadim Zeitlin
 // Modified by:
 // Created:     13.07.01
-// RCS-ID:      $Id: regex.cpp 50711 2007-12-15 02:57:58Z VZ $
+// RCS-ID:      $Id: regex.cpp 57779 2009-01-02 17:35:16Z PC $
 // Copyright:   (c) 2000 Karsten Ballueder 
 //                  2001 Vadim Zeitlin 
 // Licence:     wxWindows licence
@@ -27,9 +27,10 @@
 
 #if wxUSE_REGEX
 
+#include "wx/regex.h"
+
 #ifndef WX_PRECOMP
     #include "wx/object.h"
-    #include "wx/string.h"
     #include "wx/log.h"
     #include "wx/intl.h"
 #endif //WX_PRECOMP
@@ -43,7 +44,6 @@
 #endif
 
 #include 
-#include "wx/regex.h"
 
 // WXREGEX_USING_BUILTIN    defined when using the built-in regex lib
 // WXREGEX_USING_RE_SEARCH  defined when using re_search in the GNU regex lib
@@ -277,12 +277,15 @@ bool wxRegExImpl::Compile(const wxString& expr, int flags)
     // translate our flags to regcomp() ones
     int flagsRE = 0;
     if ( !(flags & wxRE_BASIC) )
+    {
 #ifndef WX_NO_REGEX_ADVANCED
         if (flags & wxRE_ADVANCED)
             flagsRE |= REG_ADVANCED;
         else
 #endif
             flagsRE |= REG_EXTENDED;
+    }
+
     if ( flags & wxRE_ICASE )
         flagsRE |= REG_ICASE;
     if ( flags & wxRE_NOSUB )
diff --git a/Externals/wxWidgets/src/common/stockitem.cpp b/Externals/wxWidgets/src/common/stockitem.cpp
index b026793bbb..8c1cd480b9 100644
--- a/Externals/wxWidgets/src/common/stockitem.cpp
+++ b/Externals/wxWidgets/src/common/stockitem.cpp
@@ -4,7 +4,7 @@
 // Author:      Vaclav Slavik
 // Modified by:
 // Created:     2004-08-15
-// RCS-ID:      $Id: stockitem.cpp 42936 2006-11-02 10:42:42Z JS $
+// RCS-ID:      $Id: stockitem.cpp 58617 2009-02-02 05:12:43Z SC $
 // Copyright:   (c) Vaclav Slavik, 2004
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -235,15 +235,15 @@ wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id)
 
     switch (id)
     {
-        STOCKITEM(wxID_COPY,                wxACCEL_CTRL,'C')
-        STOCKITEM(wxID_CUT,                 wxACCEL_CTRL,'X')
-        STOCKITEM(wxID_FIND,                wxACCEL_CTRL,'F')
-        STOCKITEM(wxID_REPLACE,             wxACCEL_CTRL,'R')
-        STOCKITEM(wxID_HELP,                wxACCEL_CTRL,'H')
-        STOCKITEM(wxID_NEW,                 wxACCEL_CTRL,'N')
-        STOCKITEM(wxID_OPEN,                wxACCEL_CTRL,'O')
-        STOCKITEM(wxID_PASTE,               wxACCEL_CTRL,'V')
-        STOCKITEM(wxID_SAVE,                wxACCEL_CTRL,'S')
+        STOCKITEM(wxID_COPY,                wxACCEL_CMD,'C')
+        STOCKITEM(wxID_CUT,                 wxACCEL_CMD,'X')
+        STOCKITEM(wxID_FIND,                wxACCEL_CMD,'F')
+        STOCKITEM(wxID_REPLACE,             wxACCEL_CMD,'R')
+        STOCKITEM(wxID_HELP,                wxACCEL_CMD,'H')
+        STOCKITEM(wxID_NEW,                 wxACCEL_CMD,'N')
+        STOCKITEM(wxID_OPEN,                wxACCEL_CMD,'O')
+        STOCKITEM(wxID_PASTE,               wxACCEL_CMD,'V')
+        STOCKITEM(wxID_SAVE,                wxACCEL_CMD,'S')
 
         default:
             // set the wxAcceleratorEntry to return into an invalid state:
diff --git a/Externals/wxWidgets/src/common/strconv.cpp b/Externals/wxWidgets/src/common/strconv.cpp
index 56f580de44..095bad7d8b 100644
--- a/Externals/wxWidgets/src/common/strconv.cpp
+++ b/Externals/wxWidgets/src/common/strconv.cpp
@@ -5,7 +5,7 @@
 //              Ryan Norton, Fredrik Roubert (UTF7)
 // Modified by:
 // Created:     29/01/98
-// RCS-ID:      $Id: strconv.cpp 45921 2007-05-09 18:10:26Z VZ $
+// RCS-ID:      $Id: strconv.cpp 56394 2008-10-17 11:31:22Z VZ $
 // Copyright:   (c) 1999 Ove Kaaven, Robert Roebling, Vaclav Slavik
 //              (c) 2000-2003 Vadim Zeitlin
 //              (c) 2004 Ryan Norton, Fredrik Roubert
@@ -66,6 +66,8 @@
 
 // includes Mac headers
 #include "wx/mac/private.h"
+#include "wx/thread.h"
+
 #endif
 
 
@@ -1957,7 +1959,7 @@ size_t wxMBConv_iconv::GetMBNulLen() const
         wxMutexLocker lock(self->m_iconvMutex);
 #endif
 
-        wchar_t *wnul = L"";
+        const wchar_t *wnul = L"";
         char buf[8]; // should be enough for NUL in any encoding
         size_t inLen = sizeof(wchar_t),
                outLen = WXSIZEOF(buf);
@@ -2733,7 +2735,8 @@ public:
 #if wxUSE_FONTMAP
     wxMBConv_mac(const wxChar* name)
     {
-        Init( wxMacGetSystemEncFromFontEnc( wxFontMapperBase::Get()->CharsetToEncoding(name, false) ) );
+        wxFontEncoding enc = wxFontMapperBase::Get()->CharsetToEncoding(name, false);
+        Init( (enc != wxFONTENCODING_SYSTEM) ? wxMacGetSystemEncFromFontEnc( enc ) : kTextEncodingUnknown);
     }
 #endif
 
@@ -2756,13 +2759,22 @@ public:
     {
         m_MB2WC_converter = NULL ;
         m_WC2MB_converter = NULL ;
-        m_char_encoding = CreateTextEncoding(encoding, encodingVariant, encodingFormat) ;
-        m_unicode_encoding = CreateTextEncoding(kTextEncodingUnicodeDefault, 0, kUnicode16BitFormat) ;
+        if ( encoding != kTextEncodingUnknown )
+        {
+            m_char_encoding = CreateTextEncoding(encoding, encodingVariant, encodingFormat) ;
+            m_unicode_encoding = CreateTextEncoding(kTextEncodingUnicodeDefault, 0, kUnicode16BitFormat) ;
+        }
+        else
+        {
+            m_char_encoding = kTextEncodingUnknown;
+            m_unicode_encoding = kTextEncodingUnknown;
+        }
     }
 
     virtual void CreateIfNeeded() const
     {
-        if ( m_MB2WC_converter == NULL && m_WC2MB_converter == NULL )
+        if ( m_MB2WC_converter == NULL && m_WC2MB_converter == NULL && 
+            m_char_encoding != kTextEncodingUnknown && m_unicode_encoding != kTextEncodingUnknown )
         {
             OSStatus status = noErr ;
             status = TECCreateConverter(&m_MB2WC_converter,
@@ -2800,10 +2812,14 @@ public:
 #else
         ubuf = (UniChar*) (buf ? buf : tbuf) ;
 #endif
-
-        status = TECConvertText(
+        {
+#if wxUSE_THREADS
+            wxMutexLocker lock( m_MB2WC_guard );
+#endif
+            status = TECConvertText(
             m_MB2WC_converter, (ConstTextPtr) psz, byteInLen, &byteInLen,
             (TextPtr) ubuf, byteBufferLen, &byteOutLen);
+        }
 
 #if SIZEOF_WCHAR_T == 4
         // we have to terminate here, because n might be larger for the trailing zero, and if UniChar
@@ -2854,10 +2870,15 @@ public:
         ubuf = (UniChar*) psz ;
 #endif
 
-        status = TECConvertText(
+        {
+#if wxUSE_THREADS
+            wxMutexLocker lock( m_WC2MB_guard );
+#endif
+            status = TECConvertText(
             m_WC2MB_converter, (ConstTextPtr) ubuf, byteInLen, &byteInLen,
             (TextPtr) (buf ? buf : tbuf), byteBufferLen, &byteOutLen);
-
+        }
+        
 #if SIZEOF_WCHAR_T == 4
         free( ubuf ) ;
 #endif
@@ -2898,6 +2919,10 @@ public:
 protected :
     mutable TECObjectRef m_MB2WC_converter;
     mutable TECObjectRef m_WC2MB_converter;
+#if wxUSE_THREADS
+    mutable wxMutex m_MB2WC_guard;
+    mutable wxMutex m_WC2MB_guard;
+#endif
 
     TextEncodingBase m_char_encoding;
     TextEncodingBase m_unicode_encoding;
@@ -2958,15 +2983,20 @@ public :
         ByteCount dcubufread , dcubufwritten ;
         UniChar *dcubuf = (UniChar*) malloc( dcubuflen ) ;
 
-        ConvertFromUnicodeToText( m_uni , byteInLen , ubuf ,
-            kUnicodeDefaultDirectionMask, 0, NULL, NULL, NULL, dcubuflen  , &dcubufread , &dcubufwritten , dcubuf ) ;
+        {
+#if wxUSE_THREADS
+            wxMutexLocker lock( m_WC2MB_guard );
+#endif
+            ConvertFromUnicodeToText( m_uni , byteInLen , ubuf ,
+                kUnicodeDefaultDirectionMask, 0, NULL, NULL, NULL, dcubuflen  , &dcubufread , &dcubufwritten , dcubuf ) ;
 
-        // we now convert that decomposed buffer into UTF8
+            // we now convert that decomposed buffer into UTF8
 
-        status = TECConvertText(
+            status = TECConvertText(
             m_WC2MB_converter, (ConstTextPtr) dcubuf, dcubufwritten, &dcubufread,
             (TextPtr) (buf ? buf : tbuf), byteBufferLen, &byteOutLen);
-
+        }
+        
         free( dcubuf );
 
 #if SIZEOF_WCHAR_T == 4
@@ -3015,16 +3045,21 @@ public :
         ByteCount dcubufread , dcubufwritten ;
         UniChar *dcubuf = (UniChar*) malloc( dcubuflen ) ;
 
-        status = TECConvertText(
+        {
+#if wxUSE_THREADS
+            wxMutexLocker lock( m_MB2WC_guard );
+#endif
+            status = TECConvertText(
                                 m_MB2WC_converter, (ConstTextPtr) psz, byteInLen, &byteInLen,
                                 (TextPtr) dcubuf, dcubuflen, &byteOutLen);
-        // we have to terminate here, because n might be larger for the trailing zero, and if UniChar
-        // is not properly terminated we get random characters at the end
-        dcubuf[byteOutLen / sizeof( UniChar ) ] = 0 ;
+            // we have to terminate here, because n might be larger for the trailing zero, and if UniChar
+            // is not properly terminated we get random characters at the end
+            dcubuf[byteOutLen / sizeof( UniChar ) ] = 0 ;
 
-        // now from the decomposed UniChar to properly composed uniChar
-        ConvertFromUnicodeToText( m_uniBack , byteOutLen , dcubuf ,
+            // now from the decomposed UniChar to properly composed uniChar
+            ConvertFromUnicodeToText( m_uniBack , byteOutLen , dcubuf ,
                                   kUnicodeDefaultDirectionMask, 0, NULL, NULL, NULL, dcubuflen  , &dcubufread , &dcubufwritten , ubuf ) ;
+        }
 
         free( dcubuf );
         byteOutLen = dcubufwritten ;
@@ -3205,6 +3240,16 @@ wxCSConv::wxCSConv(const wxChar *charset)
 
 #if wxUSE_FONTMAP
     m_encoding = wxFontMapperBase::GetEncodingFromName(charset);
+    if ( m_encoding == wxFONTENCODING_MAX )
+    {
+        // set to unknown/invalid value
+        m_encoding = wxFONTENCODING_SYSTEM;
+    }
+    else if ( m_encoding == wxFONTENCODING_DEFAULT )
+    {
+        // wxFONTENCODING_DEFAULT is same as US-ASCII in this context
+        m_encoding = wxFONTENCODING_ISO8859_1;
+    }
 #else
     m_encoding = wxFONTENCODING_SYSTEM;
 #endif
@@ -3506,7 +3551,7 @@ void wxCSConv::CreateConvIfNeeded() const
         if ( !m_name && m_encoding == wxFONTENCODING_SYSTEM )
         {
 #if wxUSE_INTL
-            self->m_name = wxStrdup(wxLocale::GetSystemEncodingName());
+            self->m_encoding = wxLocale::GetSystemEncoding();
 #else
             // fallback to some reasonable default:
             self->m_encoding = wxFONTENCODING_ISO8859_1;
@@ -3540,7 +3585,19 @@ size_t wxCSConv::ToWChar(wchar_t *dst, size_t dstLen,
         return m_convReal->ToWChar(dst, dstLen, src, srcLen);
 
     // latin-1 (direct)
-    return wxMBConv::ToWChar(dst, dstLen, src, srcLen);
+    if ( srcLen == wxNO_LEN )
+        srcLen = strlen(src) + 1; // take trailing NUL too
+
+    if ( dst )
+    {
+        if ( dstLen < srcLen )
+            return wxCONV_FAILED;
+
+        for ( size_t n = 0; n < srcLen; n++ )
+            dst[n] = (unsigned char)(src[n]);
+    }
+
+    return srcLen;
 }
 
 size_t wxCSConv::FromWChar(char *dst, size_t dstLen,
@@ -3552,57 +3609,45 @@ size_t wxCSConv::FromWChar(char *dst, size_t dstLen,
         return m_convReal->FromWChar(dst, dstLen, src, srcLen);
 
     // latin-1 (direct)
-    return wxMBConv::FromWChar(dst, dstLen, src, srcLen);
+    if ( srcLen == wxNO_LEN )
+        srcLen = wxWcslen(src) + 1;
+
+    if ( dst )
+    {
+        if ( dstLen < srcLen )
+            return wxCONV_FAILED;
+
+        for ( size_t n = 0; n < srcLen; n++ )
+        {
+            if ( src[n] > 0xFF )
+                return wxCONV_FAILED;
+
+            dst[n] = (char)src[n];
+        }
+
+    }
+    else // still need to check the input validity
+    {
+        for ( size_t n = 0; n < srcLen; n++ )
+        {
+            if ( src[n] > 0xFF )
+                return wxCONV_FAILED;
+        }
+    }
+
+    return srcLen;
 }
 
 size_t wxCSConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
 {
-    CreateConvIfNeeded();
-
-    if (m_convReal)
-        return m_convReal->MB2WC(buf, psz, n);
-
-    // latin-1 (direct)
-    size_t len = strlen(psz);
-
-    if (buf)
-    {
-        for (size_t c = 0; c <= len; c++)
-            buf[c] = (unsigned char)(psz[c]);
-    }
-
-    return len;
+    // this function exists only for ABI-compatibility in 2.8 branch
+    return wxMBConv::MB2WC(buf, psz, n);
 }
 
 size_t wxCSConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const
 {
-    CreateConvIfNeeded();
-
-    if (m_convReal)
-        return m_convReal->WC2MB(buf, psz, n);
-
-    // latin-1 (direct)
-    const size_t len = wxWcslen(psz);
-    if (buf)
-    {
-        for (size_t c = 0; c <= len; c++)
-        {
-            if (psz[c] > 0xFF)
-                return wxCONV_FAILED;
-
-            buf[c] = (char)psz[c];
-        }
-    }
-    else
-    {
-        for (size_t c = 0; c <= len; c++)
-        {
-            if (psz[c] > 0xFF)
-                return wxCONV_FAILED;
-        }
-    }
-
-    return len;
+    // this function exists only for ABI-compatibility in 2.8 branch
+    return wxMBConv::WC2MB(buf, psz, n);
 }
 
 size_t wxCSConv::GetMBNulLen() const
diff --git a/Externals/wxWidgets/src/common/string.cpp b/Externals/wxWidgets/src/common/string.cpp
index d1034c7fe8..58d39955fe 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 53702 2008-05-22 17:22:00Z SN $
+// RCS-ID:      $Id: string.cpp 56758 2008-11-13 22:32:21Z VS $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 //              (c) 2004 Ryan Norton 
 // Licence:     wxWindows licence
@@ -1492,8 +1492,8 @@ wxString wxString::AfterFirst(wxChar ch) const
 }
 
 // replace first (or all) occurences of some substring with another one
-size_t wxString::Replace(const wxChar *szOld,
-                  const wxChar *szNew, bool bReplaceAll)
+size_t
+wxString::Replace(const wxChar *szOld, const wxChar *szNew, bool bReplaceAll)
 {
     // if we tried to replace an empty string we'd enter an infinite loop below
     wxCHECK_MSG( szOld && *szOld && szNew, 0,
@@ -1501,33 +1501,48 @@ size_t wxString::Replace(const wxChar *szOld,
 
     size_t uiCount = 0;   // count of replacements made
 
-    size_t uiOldLen = wxStrlen(szOld);
-    size_t uiNewLen = wxStrlen(szNew);
-
-    size_t dwPos = 0;
-
-    while ( this->c_str()[dwPos] != wxT('\0') )
+    // optimize the special common case of replacing one character with another
+    // one
+    if ( szOld[1] == '\0' && (szNew[0] != '\0' && szNew[1] == '\0') )
     {
-        //DO NOT USE STRSTR HERE
-        //this string can contain embedded null characters,
-        //so strstr will function incorrectly
-        dwPos = find(szOld, dwPos);
-        if ( dwPos == npos )
-            break;                  // exit the loop
-        else
+        // this loop is the simplified version of the one below
+        for ( size_t pos = 0; ; )
         {
-            //replace this occurance of the old string with the new one
-            replace(dwPos, uiOldLen, szNew, uiNewLen);
+            pos = find(*szOld, pos);
+            if ( pos == npos )
+                break;
 
-            //move up pos past the string that was replaced
-            dwPos += uiNewLen;
+            (*this)[pos++] = *szNew;
 
-            //increase replace count
-            ++uiCount;
+            uiCount++;
+
+            if ( !bReplaceAll )
+                break;
+        }
+    }
+    else // general case
+    {
+        const size_t uiOldLen = wxStrlen(szOld);
+        const size_t uiNewLen = wxStrlen(szNew);
+
+        for ( size_t pos = 0; ; )
+        {
+            pos = find(szOld, pos);
+            if ( pos == npos )
+                break;
+
+            // replace this occurrence of the old string with the new one
+            replace(pos, uiOldLen, szNew, uiNewLen);
+
+            // move past the string that was replaced
+            pos += uiNewLen;
+
+            // increase replace count
+            uiCount++;
 
             // stop now?
             if ( !bReplaceAll )
-                break;                  // exit the loop
+                break;
         }
     }
 
@@ -2630,3 +2645,10 @@ int wxCMPFUNC_CONV wxStringSortDescending(wxString* s1, wxString* s2)
 {
     return -s1->Cmp(*s2);
 }
+
+wxString* wxCArrayString::Release()
+{
+    wxString *r = GetStrings();
+    m_strings = NULL;
+    return r;
+}
diff --git a/Externals/wxWidgets/src/common/unictabl.inc b/Externals/wxWidgets/src/common/unictabl.inc
index 13ee276afb..d75491642c 100644
--- a/Externals/wxWidgets/src/common/unictabl.inc
+++ b/Externals/wxWidgets/src/common/unictabl.inc
@@ -1,872 +1,872 @@
-
-
-/*
- *  This file is #included by encconv.cpp
- *
- *  CVS-ID: $Id: unictabl.inc 40398 2006-07-31 16:28:43Z VS $
- *
- *  *** ***  CAUTION! *** ***
- *  Do not modify this file by hand! It is generated by shell
- *  script $(WXWIN)/misc/unictabl/regenerate
- *
- *  Parts of this file are based on tables published by Unicode, Inc.
- *  Original tables are freely available at
- *      ftp://ftp.unicode.org/Public/MAPPINGS
- *
- *  Original copyright info as present in mapping tables follows:
- *
- *
- *  Copyright (c) 1991-1999 Unicode, Inc.  All Rights reserved.
- *
- *  This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
- *  No claims are made as to fitness for any particular purpose.  No
- *  warranties of any kind are expressed or implied.  The recipient
- *  agrees to determine applicability of information provided.  If this
- *  file has been provided on optical media by Unicode, Inc., the sole
- *  remedy for any claim will be exchange of defective media within 90
- *  days of receipt.
- *
- *  Unicode, Inc. hereby grants the right to freely use the information
- *  supplied in this file in the creation of products supporting the
- *  Unicode Standard, and to make copies of this file in any form for
- *  internal or external distribution as long as this notice remains
- *  attached.
- */
-
-
-
-
-/*
- * ISO8859_1 to Unicode recoding table
- * based on file mappings/8859-1.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_1[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
- };
-
-
-/*
- * ISO8859_10 to Unicode recoding table
- * based on file mappings/8859-10.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_10[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7,
-    0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A,
-    0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7,
-    0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B,
-    0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
-    0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF,
-    0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168,
-    0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
-    0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
-    0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
-    0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169,
-    0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138
- };
-
-
-/*
- * ISO8859_13 to Unicode recoding table
- * based on file mappings/8859-13.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_13[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7,
-    0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7,
-    0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
-    0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
-    0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
-    0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
-    0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
-    0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
-    0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
-    0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
-    0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019
- };
-
-
-/*
- * ISO8859_14 to Unicode recoding table
- * based on file mappings/8859-14.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_14[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7,
-    0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178,
-    0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56,
-    0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A,
-    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B,
-    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF
- };
-
-
-/*
- * ISO8859_15 to Unicode recoding table
- * based on file mappings/8859-15.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_15[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
-    0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7,
-    0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
- };
-
-
-/*
- * ISO8859_2 to Unicode recoding table
- * based on file mappings/8859-2.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_2[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
-    0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
-    0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
-    0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
-    0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
-    0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
-    0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
-    0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
-    0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
-    0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
-    0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
-    0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
- };
-
-
-/*
- * ISO8859_3 to Unicode recoding table
- * based on file mappings/8859-3.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_3[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7,
-    0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B,
-    0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
-    0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C,
-    0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
-    0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
-    0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9
- };
-
-
-/*
- * ISO8859_4 to Unicode recoding table
- * based on file mappings/8859-4.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_4[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7,
-    0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF,
-    0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7,
-    0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B,
-    0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
-    0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A,
-    0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-    0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF,
-    0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
-    0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
-    0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-    0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9
- };
-
-
-/*
- * ISO8859_5 to Unicode recoding table
- * based on file mappings/8859-5.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_5[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
-    0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
-    0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
-    0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
-    0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
-    0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
-    0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
-    0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
-    0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-    0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
-    0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
-    0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F
- };
-
-
-/*
- * ISO8859_6 to Unicode recoding table
- * based on file mappings/8859-6.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_6[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0000, 0x0000, 0x0000, 0x00A4, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x060C, 0x00AD, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x061B, 0x0000, 0x0000, 0x0000, 0x061F,
-    0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
-    0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
-    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
-    0x0638, 0x0639, 0x063A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
-    0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
-    0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
- };
-
-
-/*
- * ISO8859_7 to Unicode recoding table
- * based on file mappings/8859-7.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_7[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x2018, 0x2019, 0x00A3, 0x0000, 0x0000, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x0000, 0x2015,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7,
-    0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
-    0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
-    0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
-    0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
-    0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
-    0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
-    0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
-    0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
-    0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
- };
-
-
-/*
- * ISO8859_8 to Unicode recoding table
- * based on file mappings/8859-8.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_8[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
-    0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
-    0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
-    0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
-    0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
- };
-
-
-/*
- * ISO8859_9 to Unicode recoding table
- * based on file mappings/8859-9.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__ISO8859_9[128] = {
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
-    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
-    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
- };
-
-
-/*
- * CP1250 to Unicode recoding table
- * based on file mappings/CP1250.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1250[128] = {
-    0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
-    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
-    0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
-    0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
-    0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
-    0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
-    0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
-    0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
-    0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
-    0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
-    0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
-    0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
- };
-
-
-/*
- * CP1251 to Unicode recoding table
- * based on file mappings/CP1251.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1251[128] = {
-    0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
-    0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x0000, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
-    0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
-    0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
-    0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
-    0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
-    0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
-    0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
-    0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
-    0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
-    0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
-    0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
-    0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-    0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
- };
-
-
-/*
- * CP1252 to Unicode recoding table
- * based on file mappings/CP1252.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1252[128] = {
-    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
-    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
- };
-
-
-/*
- * CP1253 to Unicode recoding table
- * based on file mappings/CP1253.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1253[128] = {
-    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
-    0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
-    0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
-    0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
-    0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
-    0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
-    0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
-    0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
-    0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
-    0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
- };
-
-
-/*
- * CP1254 to Unicode recoding table
- * based on file mappings/CP1254.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1254[128] = {
-    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
-    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
-    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
- };
-
-
-/*
- * CP1255 to Unicode recoding table
- * based on file mappings/CP1255.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1255[128] = {
-    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x02DC, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
-    0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
-    0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
-    0x05F4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-    0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
-    0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
-    0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
-    0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
- };
-
-
-/*
- * CP1256 to Unicode recoding table
- * based on file mappings/CP1256.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1256[128] = {
-    0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
-    0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
-    0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
-    0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
-    0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
-    0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
-    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
-    0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
-    0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
-    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
-    0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
-    0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
- };
-
-
-/*
- * CP1257 to Unicode recoding table
- * based on file mappings/CP1257.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__CP1257[128] = {
-    0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
-    0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
-    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
-    0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000,
-    0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7,
-    0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
-    0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
-    0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
-    0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
-    0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
-    0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
-    0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
-    0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
-    0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
-    0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
- };
-
-
-/*
- * KOI8 to Unicode recoding table
- * based on file mappings/KOI8-R.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__KOI8[128] = {
-    0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
-    0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
-    0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
-    0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
-    0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
-    0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
-    0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
-    0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
-    0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
-    0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
-    0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
-    0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
-    0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
-    0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
-    0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
-    0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
- };
-
-
-/*
- * KOI8_U to Unicode recoding table
- * based on file mappings/KOI8-U.TXT by Unicode Consortium
- */
-
-static const wxUint16 encoding_table__KOI8_U[128] = {
-    0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
-    0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
-    0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
-    0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
-    0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457,
-    0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E,
-    0x255F, 0x2560, 0x2561, 0x0401, 0x0403, 0x2563, 0x0406, 0x0407,
-    0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9,
-    0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
-    0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
-    0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
-    0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
-    0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
-    0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
-    0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
-    0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
- };
-
-
-
-
-
-/*
- *
- * Unicode to 7bit ASCII fallback
- * (for use with wxRECODE_SUBSTITUTE recoding mode)
- *
- */
-
-static const struct {
-    wxUint16 c  /*code*/;
-    wxUint8  s /*inaccurate substitution*/;
-} encoding_unicode_fallback[] = {
-
-    {0x00AB, 0x22},
-    {0x00BB, 0x22},
-    {0x00C0, 0x41},
-    {0x00C1, 0x41},
-    {0x00C2, 0x41},
-    {0x00C3, 0x41},
-    {0x00C4, 0x41},
-    {0x00C5, 0x41},
-    {0x00C7, 0x43},
-    {0x00C8, 0x45},
-    {0x00C9, 0x45},
-    {0x00CA, 0x45},
-    {0x00CB, 0x45},
-    {0x00CC, 0x49},
-    {0x00CD, 0x49},
-    {0x00CE, 0x49},
-    {0x00CF, 0x49},
-    {0x00D1, 0x4E},
-    {0x00D2, 0x4F},
-    {0x00D3, 0x4F},
-    {0x00D4, 0x4F},
-    {0x00D5, 0x4F},
-    {0x00D6, 0x4F},
-    {0x00D8, 0x4F},
-    {0x00D9, 0x55},
-    {0x00DA, 0x55},
-    {0x00DB, 0x55},
-    {0x00DC, 0x55},
-    {0x00DD, 0x59},
-    {0x00E0, 0x61},
-    {0x00E1, 0x61},
-    {0x00E2, 0x61},
-    {0x00E3, 0x61},
-    {0x00E4, 0x61},
-    {0x00E5, 0x61},
-    {0x00E7, 0x63},
-    {0x00E8, 0x65},
-    {0x00E9, 0x65},
-    {0x00EA, 0x65},
-    {0x00EB, 0x65},
-    {0x00EC, 0x69},
-    {0x00ED, 0x69},
-    {0x00EE, 0x69},
-    {0x00EF, 0x69},
-    {0x00F1, 0x6E},
-    {0x00F2, 0x6F},
-    {0x00F3, 0x6F},
-    {0x00F4, 0x6F},
-    {0x00F5, 0x6F},
-    {0x00F6, 0x6F},
-    {0x00F8, 0x6F},
-    {0x00F9, 0x75},
-    {0x00FA, 0x75},
-    {0x00FB, 0x75},
-    {0x00FC, 0x75},
-    {0x00FD, 0x79},
-    {0x00FF, 0x79},
-    {0x0100, 0x41},
-    {0x0101, 0x61},
-    {0x0102, 0x41},
-    {0x0103, 0x61},
-    {0x0104, 0x41},
-    {0x0105, 0x61},
-    {0x0106, 0x43},
-    {0x0107, 0x63},
-    {0x0108, 0x43},
-    {0x0109, 0x63},
-    {0x010A, 0x43},
-    {0x010B, 0x63},
-    {0x010C, 0x43},
-    {0x010D, 0x63},
-    {0x010E, 0x44},
-    {0x010F, 0x64},
-    {0x0110, 0x44},
-    {0x0111, 0x64},
-    {0x0112, 0x45},
-    {0x0113, 0x65},
-    {0x0116, 0x45},
-    {0x0117, 0x65},
-    {0x0118, 0x45},
-    {0x0119, 0x65},
-    {0x011A, 0x45},
-    {0x011B, 0x65},
-    {0x011C, 0x47},
-    {0x011D, 0x67},
-    {0x011E, 0x47},
-    {0x011F, 0x67},
-    {0x0120, 0x47},
-    {0x0121, 0x67},
-    {0x0122, 0x47},
-    {0x0123, 0x67},
-    {0x0124, 0x48},
-    {0x0125, 0x68},
-    {0x0126, 0x48},
-    {0x0127, 0x68},
-    {0x0128, 0x49},
-    {0x0129, 0x69},
-    {0x012A, 0x49},
-    {0x012B, 0x69},
-    {0x012E, 0x49},
-    {0x012F, 0x69},
-    {0x0130, 0x49},
-    {0x0134, 0x4A},
-    {0x0135, 0x6A},
-    {0x0136, 0x4B},
-    {0x0137, 0x6B},
-    {0x0139, 0x4C},
-    {0x013A, 0x6C},
-    {0x013B, 0x4C},
-    {0x013C, 0x6C},
-    {0x013D, 0x4C},
-    {0x013E, 0x6C},
-    {0x0141, 0x4C},
-    {0x0142, 0x6C},
-    {0x0143, 0x4E},
-    {0x0144, 0x6E},
-    {0x0145, 0x4E},
-    {0x0146, 0x6E},
-    {0x0147, 0x4E},
-    {0x0148, 0x6E},
-    {0x014C, 0x4F},
-    {0x014D, 0x6F},
-    {0x0150, 0x4F},
-    {0x0151, 0x6F},
-    {0x0154, 0x52},
-    {0x0155, 0x72},
-    {0x0156, 0x52},
-    {0x0157, 0x72},
-    {0x0158, 0x52},
-    {0x0159, 0x72},
-    {0x015A, 0x53},
-    {0x015B, 0x73},
-    {0x015C, 0x53},
-    {0x015D, 0x73},
-    {0x015E, 0x53},
-    {0x015F, 0x73},
-    {0x0160, 0x53},
-    {0x0161, 0x73},
-    {0x0162, 0x54},
-    {0x0163, 0x74},
-    {0x0164, 0x54},
-    {0x0165, 0x74},
-    {0x0166, 0x54},
-    {0x0167, 0x74},
-    {0x0168, 0x55},
-    {0x0169, 0x75},
-    {0x016A, 0x55},
-    {0x016B, 0x75},
-    {0x016C, 0x55},
-    {0x016D, 0x75},
-    {0x016E, 0x55},
-    {0x016F, 0x75},
-    {0x0170, 0x55},
-    {0x0171, 0x75},
-    {0x0172, 0x55},
-    {0x0173, 0x75},
-    {0x0174, 0x57},
-    {0x0175, 0x77},
-    {0x0176, 0x59},
-    {0x0177, 0x79},
-    {0x0178, 0x59},
-    {0x0179, 0x5A},
-    {0x017A, 0x7A},
-    {0x017B, 0x5A},
-    {0x017C, 0x7A},
-    {0x017D, 0x5A},
-    {0x017E, 0x7A},
-    {0x0192, 0x66},
-    {0x1E02, 0x42},
-    {0x1E03, 0x62},
-    {0x1E0A, 0x44},
-    {0x1E0B, 0x64},
-    {0x1E1E, 0x46},
-    {0x1E1F, 0x66},
-    {0x1E40, 0x4D},
-    {0x1E41, 0x6D},
-    {0x1E56, 0x50},
-    {0x1E57, 0x70},
-    {0x1E60, 0x53},
-    {0x1E61, 0x73},
-    {0x1E6A, 0x54},
-    {0x1E6B, 0x74},
-    {0x1E80, 0x57},
-    {0x1E81, 0x77},
-    {0x1E82, 0x57},
-    {0x1E83, 0x77},
-    {0x1E84, 0x57},
-    {0x1E85, 0x77},
-    {0x1EF2, 0x59},
-    {0x1EF3, 0x79},
-    {0x2013, 0x2D},
-    {0x2014, 0x2D},
-    {0x2018, 0x27},
-    {0x2019, 0x27},
-    {0x201A, 0x27},
-    {0x201C, 0x22},
-    {0x201D, 0x22},
-    {0x201E, 0x22},
-    {0x2039, 0x27},
-    {0x203A, 0x27},
-    {0, 0}
- };
-
-static const unsigned encoding_unicode_fallback_count =  200;
-
-
-
-
-/*
- *
- * Table of all supported encodings:
- *
- */
-
-static const struct {
-    wxFontEncoding encoding; // encoding identifier
-    const wxUint16 *table;         // 8bit to unicode table
-} encodings_list[] = {
-
-    { wxFONTENCODING_ISO8859_1, encoding_table__ISO8859_1},
-    { wxFONTENCODING_ISO8859_10, encoding_table__ISO8859_10},
-    { wxFONTENCODING_ISO8859_13, encoding_table__ISO8859_13},
-    { wxFONTENCODING_ISO8859_14, encoding_table__ISO8859_14},
-    { wxFONTENCODING_ISO8859_15, encoding_table__ISO8859_15},
-    { wxFONTENCODING_ISO8859_2, encoding_table__ISO8859_2},
-    { wxFONTENCODING_ISO8859_3, encoding_table__ISO8859_3},
-    { wxFONTENCODING_ISO8859_4, encoding_table__ISO8859_4},
-    { wxFONTENCODING_ISO8859_5, encoding_table__ISO8859_5},
-    { wxFONTENCODING_ISO8859_6, encoding_table__ISO8859_6},
-    { wxFONTENCODING_ISO8859_7, encoding_table__ISO8859_7},
-    { wxFONTENCODING_ISO8859_8, encoding_table__ISO8859_8},
-    { wxFONTENCODING_ISO8859_9, encoding_table__ISO8859_9},
-    { wxFONTENCODING_CP1250, encoding_table__CP1250},
-    { wxFONTENCODING_CP1251, encoding_table__CP1251},
-    { wxFONTENCODING_CP1252, encoding_table__CP1252},
-    { wxFONTENCODING_CP1253, encoding_table__CP1253},
-    { wxFONTENCODING_CP1254, encoding_table__CP1254},
-    { wxFONTENCODING_CP1255, encoding_table__CP1255},
-    { wxFONTENCODING_CP1256, encoding_table__CP1256},
-    { wxFONTENCODING_CP1257, encoding_table__CP1257},
-    { wxFONTENCODING_KOI8, encoding_table__KOI8},
-    { wxFONTENCODING_KOI8_U, encoding_table__KOI8_U},
-    {wxFONTENCODING_MAX /*anything*/, NULL}
- };
+
+
+/*
+ *  This file is #included by encconv.cpp
+ *
+ *  CVS-ID: $Id: unictabl.inc 40398 2006-07-31 16:28:43Z VS $
+ *
+ *  *** ***  CAUTION! *** ***
+ *  Do not modify this file by hand! It is generated by shell
+ *  script $(WXWIN)/misc/unictabl/regenerate
+ *
+ *  Parts of this file are based on tables published by Unicode, Inc.
+ *  Original tables are freely available at
+ *      ftp://ftp.unicode.org/Public/MAPPINGS
+ *
+ *  Original copyright info as present in mapping tables follows:
+ *
+ *
+ *  Copyright (c) 1991-1999 Unicode, Inc.  All Rights reserved.
+ *
+ *  This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+ *  No claims are made as to fitness for any particular purpose.  No
+ *  warranties of any kind are expressed or implied.  The recipient
+ *  agrees to determine applicability of information provided.  If this
+ *  file has been provided on optical media by Unicode, Inc., the sole
+ *  remedy for any claim will be exchange of defective media within 90
+ *  days of receipt.
+ *
+ *  Unicode, Inc. hereby grants the right to freely use the information
+ *  supplied in this file in the creation of products supporting the
+ *  Unicode Standard, and to make copies of this file in any form for
+ *  internal or external distribution as long as this notice remains
+ *  attached.
+ */
+
+
+
+
+/*
+ * ISO8859_1 to Unicode recoding table
+ * based on file mappings/8859-1.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_1[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+ };
+
+
+/*
+ * ISO8859_10 to Unicode recoding table
+ * based on file mappings/8859-10.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_10[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7,
+    0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A,
+    0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7,
+    0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B,
+    0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
+    0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF,
+    0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168,
+    0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+    0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
+    0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
+    0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169,
+    0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138
+ };
+
+
+/*
+ * ISO8859_13 to Unicode recoding table
+ * based on file mappings/8859-13.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_13[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7,
+    0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7,
+    0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+    0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
+    0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+    0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
+    0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+    0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
+    0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+    0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
+    0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019
+ };
+
+
+/*
+ * ISO8859_14 to Unicode recoding table
+ * based on file mappings/8859-14.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_14[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7,
+    0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178,
+    0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56,
+    0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61,
+    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A,
+    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF
+ };
+
+
+/*
+ * ISO8859_15 to Unicode recoding table
+ * based on file mappings/8859-15.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_15[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
+    0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7,
+    0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
+    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+ };
+
+
+/*
+ * ISO8859_2 to Unicode recoding table
+ * based on file mappings/8859-2.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_2[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
+    0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
+    0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
+    0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
+    0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
+    0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+    0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
+    0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+    0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
+    0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+    0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
+    0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
+ };
+
+
+/*
+ * ISO8859_3 to Unicode recoding table
+ * based on file mappings/8859-3.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_3[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7,
+    0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B,
+    0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
+    0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C,
+    0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
+    0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
+    0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9
+ };
+
+
+/*
+ * ISO8859_4 to Unicode recoding table
+ * based on file mappings/8859-4.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_4[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7,
+    0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF,
+    0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7,
+    0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B,
+    0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
+    0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A,
+    0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF,
+    0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
+    0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
+    0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9
+ };
+
+
+/*
+ * ISO8859_5 to Unicode recoding table
+ * based on file mappings/8859-5.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_5[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
+    0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
+    0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+    0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+    0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+    0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+    0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+    0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+    0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+    0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+    0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+    0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F
+ };
+
+
+/*
+ * ISO8859_6 to Unicode recoding table
+ * based on file mappings/8859-6.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_6[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0000, 0x0000, 0x0000, 0x00A4, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x060C, 0x00AD, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x061B, 0x0000, 0x0000, 0x0000, 0x061F,
+    0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+    0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
+    0x0638, 0x0639, 0x063A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
+    0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
+    0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+ };
+
+
+/*
+ * ISO8859_7 to Unicode recoding table
+ * based on file mappings/8859-7.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_7[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x2018, 0x2019, 0x00A3, 0x0000, 0x0000, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x0000, 0x2015,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7,
+    0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+    0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+    0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+    0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+    0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+    0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+    0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+    0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+    0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
+ };
+
+
+/*
+ * ISO8859_8 to Unicode recoding table
+ * based on file mappings/8859-8.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_8[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
+    0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+    0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+    0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+    0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+ };
+
+
+/*
+ * ISO8859_9 to Unicode recoding table
+ * based on file mappings/8859-9.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__ISO8859_9[128] = {
+    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+    0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
+    0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+    0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
+    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
+ };
+
+
+/*
+ * CP1250 to Unicode recoding table
+ * based on file mappings/CP1250.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1250[128] = {
+    0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
+    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
+    0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
+    0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
+    0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
+    0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
+    0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
+    0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
+    0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
+    0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+    0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
+    0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
+ };
+
+
+/*
+ * CP1251 to Unicode recoding table
+ * based on file mappings/CP1251.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1251[128] = {
+    0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
+    0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x0000, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
+    0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
+    0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
+    0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
+    0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
+    0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+    0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+    0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+    0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+    0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+    0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+    0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+    0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
+ };
+
+
+/*
+ * CP1252 to Unicode recoding table
+ * based on file mappings/CP1252.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1252[128] = {
+    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
+    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
+    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+ };
+
+
+/*
+ * CP1253 to Unicode recoding table
+ * based on file mappings/CP1253.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1253[128] = {
+    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
+    0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
+    0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+    0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+    0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
+    0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
+    0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
+    0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+    0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
+    0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000
+ };
+
+
+/*
+ * CP1254 to Unicode recoding table
+ * based on file mappings/CP1254.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1254[128] = {
+    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178,
+    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
+    0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
+    0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
+    0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
+    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
+    0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
+    0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
+ };
+
+
+/*
+ * CP1255 to Unicode recoding table
+ * based on file mappings/CP1255.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1255[128] = {
+    0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x02DC, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
+    0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
+    0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
+    0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
+    0x05F4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
+    0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+    0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
+    0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000
+ };
+
+
+/*
+ * CP1256 to Unicode recoding table
+ * based on file mappings/CP1256.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1256[128] = {
+    0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
+    0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
+    0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
+    0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
+    0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+    0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
+    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
+    0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
+    0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
+    0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
+    0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
+    0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
+ };
+
+
+/*
+ * CP1257 to Unicode recoding table
+ * based on file mappings/CP1257.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__CP1257[128] = {
+    0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021,
+    0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8,
+    0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+    0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000,
+    0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7,
+    0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
+    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
+    0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
+    0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
+    0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
+    0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
+    0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
+    0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
+    0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
+    0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
+    0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
+ };
+
+
+/*
+ * KOI8 to Unicode recoding table
+ * based on file mappings/KOI8-R.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__KOI8[128] = {
+    0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
+    0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
+    0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
+    0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
+    0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
+    0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
+    0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
+    0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
+    0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
+    0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
+    0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
+    0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
+    0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
+    0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
+    0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
+    0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
+ };
+
+
+/*
+ * KOI8_U to Unicode recoding table
+ * based on file mappings/KOI8-U.TXT by Unicode Consortium
+ */
+
+static const wxUint16 encoding_table__KOI8_U[128] = {
+    0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
+    0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
+    0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
+    0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
+    0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457,
+    0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E,
+    0x255F, 0x2560, 0x2561, 0x0401, 0x0403, 0x2563, 0x0406, 0x0407,
+    0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9,
+    0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
+    0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
+    0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
+    0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
+    0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
+    0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
+    0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
+    0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
+ };
+
+
+
+
+
+/*
+ *
+ * Unicode to 7bit ASCII fallback
+ * (for use with wxRECODE_SUBSTITUTE recoding mode)
+ *
+ */
+
+static const struct {
+    wxUint16 c  /*code*/;
+    wxUint8  s /*inaccurate substitution*/;
+} encoding_unicode_fallback[] = {
+
+    {0x00AB, 0x22},
+    {0x00BB, 0x22},
+    {0x00C0, 0x41},
+    {0x00C1, 0x41},
+    {0x00C2, 0x41},
+    {0x00C3, 0x41},
+    {0x00C4, 0x41},
+    {0x00C5, 0x41},
+    {0x00C7, 0x43},
+    {0x00C8, 0x45},
+    {0x00C9, 0x45},
+    {0x00CA, 0x45},
+    {0x00CB, 0x45},
+    {0x00CC, 0x49},
+    {0x00CD, 0x49},
+    {0x00CE, 0x49},
+    {0x00CF, 0x49},
+    {0x00D1, 0x4E},
+    {0x00D2, 0x4F},
+    {0x00D3, 0x4F},
+    {0x00D4, 0x4F},
+    {0x00D5, 0x4F},
+    {0x00D6, 0x4F},
+    {0x00D8, 0x4F},
+    {0x00D9, 0x55},
+    {0x00DA, 0x55},
+    {0x00DB, 0x55},
+    {0x00DC, 0x55},
+    {0x00DD, 0x59},
+    {0x00E0, 0x61},
+    {0x00E1, 0x61},
+    {0x00E2, 0x61},
+    {0x00E3, 0x61},
+    {0x00E4, 0x61},
+    {0x00E5, 0x61},
+    {0x00E7, 0x63},
+    {0x00E8, 0x65},
+    {0x00E9, 0x65},
+    {0x00EA, 0x65},
+    {0x00EB, 0x65},
+    {0x00EC, 0x69},
+    {0x00ED, 0x69},
+    {0x00EE, 0x69},
+    {0x00EF, 0x69},
+    {0x00F1, 0x6E},
+    {0x00F2, 0x6F},
+    {0x00F3, 0x6F},
+    {0x00F4, 0x6F},
+    {0x00F5, 0x6F},
+    {0x00F6, 0x6F},
+    {0x00F8, 0x6F},
+    {0x00F9, 0x75},
+    {0x00FA, 0x75},
+    {0x00FB, 0x75},
+    {0x00FC, 0x75},
+    {0x00FD, 0x79},
+    {0x00FF, 0x79},
+    {0x0100, 0x41},
+    {0x0101, 0x61},
+    {0x0102, 0x41},
+    {0x0103, 0x61},
+    {0x0104, 0x41},
+    {0x0105, 0x61},
+    {0x0106, 0x43},
+    {0x0107, 0x63},
+    {0x0108, 0x43},
+    {0x0109, 0x63},
+    {0x010A, 0x43},
+    {0x010B, 0x63},
+    {0x010C, 0x43},
+    {0x010D, 0x63},
+    {0x010E, 0x44},
+    {0x010F, 0x64},
+    {0x0110, 0x44},
+    {0x0111, 0x64},
+    {0x0112, 0x45},
+    {0x0113, 0x65},
+    {0x0116, 0x45},
+    {0x0117, 0x65},
+    {0x0118, 0x45},
+    {0x0119, 0x65},
+    {0x011A, 0x45},
+    {0x011B, 0x65},
+    {0x011C, 0x47},
+    {0x011D, 0x67},
+    {0x011E, 0x47},
+    {0x011F, 0x67},
+    {0x0120, 0x47},
+    {0x0121, 0x67},
+    {0x0122, 0x47},
+    {0x0123, 0x67},
+    {0x0124, 0x48},
+    {0x0125, 0x68},
+    {0x0126, 0x48},
+    {0x0127, 0x68},
+    {0x0128, 0x49},
+    {0x0129, 0x69},
+    {0x012A, 0x49},
+    {0x012B, 0x69},
+    {0x012E, 0x49},
+    {0x012F, 0x69},
+    {0x0130, 0x49},
+    {0x0134, 0x4A},
+    {0x0135, 0x6A},
+    {0x0136, 0x4B},
+    {0x0137, 0x6B},
+    {0x0139, 0x4C},
+    {0x013A, 0x6C},
+    {0x013B, 0x4C},
+    {0x013C, 0x6C},
+    {0x013D, 0x4C},
+    {0x013E, 0x6C},
+    {0x0141, 0x4C},
+    {0x0142, 0x6C},
+    {0x0143, 0x4E},
+    {0x0144, 0x6E},
+    {0x0145, 0x4E},
+    {0x0146, 0x6E},
+    {0x0147, 0x4E},
+    {0x0148, 0x6E},
+    {0x014C, 0x4F},
+    {0x014D, 0x6F},
+    {0x0150, 0x4F},
+    {0x0151, 0x6F},
+    {0x0154, 0x52},
+    {0x0155, 0x72},
+    {0x0156, 0x52},
+    {0x0157, 0x72},
+    {0x0158, 0x52},
+    {0x0159, 0x72},
+    {0x015A, 0x53},
+    {0x015B, 0x73},
+    {0x015C, 0x53},
+    {0x015D, 0x73},
+    {0x015E, 0x53},
+    {0x015F, 0x73},
+    {0x0160, 0x53},
+    {0x0161, 0x73},
+    {0x0162, 0x54},
+    {0x0163, 0x74},
+    {0x0164, 0x54},
+    {0x0165, 0x74},
+    {0x0166, 0x54},
+    {0x0167, 0x74},
+    {0x0168, 0x55},
+    {0x0169, 0x75},
+    {0x016A, 0x55},
+    {0x016B, 0x75},
+    {0x016C, 0x55},
+    {0x016D, 0x75},
+    {0x016E, 0x55},
+    {0x016F, 0x75},
+    {0x0170, 0x55},
+    {0x0171, 0x75},
+    {0x0172, 0x55},
+    {0x0173, 0x75},
+    {0x0174, 0x57},
+    {0x0175, 0x77},
+    {0x0176, 0x59},
+    {0x0177, 0x79},
+    {0x0178, 0x59},
+    {0x0179, 0x5A},
+    {0x017A, 0x7A},
+    {0x017B, 0x5A},
+    {0x017C, 0x7A},
+    {0x017D, 0x5A},
+    {0x017E, 0x7A},
+    {0x0192, 0x66},
+    {0x1E02, 0x42},
+    {0x1E03, 0x62},
+    {0x1E0A, 0x44},
+    {0x1E0B, 0x64},
+    {0x1E1E, 0x46},
+    {0x1E1F, 0x66},
+    {0x1E40, 0x4D},
+    {0x1E41, 0x6D},
+    {0x1E56, 0x50},
+    {0x1E57, 0x70},
+    {0x1E60, 0x53},
+    {0x1E61, 0x73},
+    {0x1E6A, 0x54},
+    {0x1E6B, 0x74},
+    {0x1E80, 0x57},
+    {0x1E81, 0x77},
+    {0x1E82, 0x57},
+    {0x1E83, 0x77},
+    {0x1E84, 0x57},
+    {0x1E85, 0x77},
+    {0x1EF2, 0x59},
+    {0x1EF3, 0x79},
+    {0x2013, 0x2D},
+    {0x2014, 0x2D},
+    {0x2018, 0x27},
+    {0x2019, 0x27},
+    {0x201A, 0x27},
+    {0x201C, 0x22},
+    {0x201D, 0x22},
+    {0x201E, 0x22},
+    {0x2039, 0x27},
+    {0x203A, 0x27},
+    {0, 0}
+ };
+
+static const unsigned encoding_unicode_fallback_count =  200;
+
+
+
+
+/*
+ *
+ * Table of all supported encodings:
+ *
+ */
+
+static const struct {
+    wxFontEncoding encoding; // encoding identifier
+    const wxUint16 *table;         // 8bit to unicode table
+} encodings_list[] = {
+
+    { wxFONTENCODING_ISO8859_1, encoding_table__ISO8859_1},
+    { wxFONTENCODING_ISO8859_10, encoding_table__ISO8859_10},
+    { wxFONTENCODING_ISO8859_13, encoding_table__ISO8859_13},
+    { wxFONTENCODING_ISO8859_14, encoding_table__ISO8859_14},
+    { wxFONTENCODING_ISO8859_15, encoding_table__ISO8859_15},
+    { wxFONTENCODING_ISO8859_2, encoding_table__ISO8859_2},
+    { wxFONTENCODING_ISO8859_3, encoding_table__ISO8859_3},
+    { wxFONTENCODING_ISO8859_4, encoding_table__ISO8859_4},
+    { wxFONTENCODING_ISO8859_5, encoding_table__ISO8859_5},
+    { wxFONTENCODING_ISO8859_6, encoding_table__ISO8859_6},
+    { wxFONTENCODING_ISO8859_7, encoding_table__ISO8859_7},
+    { wxFONTENCODING_ISO8859_8, encoding_table__ISO8859_8},
+    { wxFONTENCODING_ISO8859_9, encoding_table__ISO8859_9},
+    { wxFONTENCODING_CP1250, encoding_table__CP1250},
+    { wxFONTENCODING_CP1251, encoding_table__CP1251},
+    { wxFONTENCODING_CP1252, encoding_table__CP1252},
+    { wxFONTENCODING_CP1253, encoding_table__CP1253},
+    { wxFONTENCODING_CP1254, encoding_table__CP1254},
+    { wxFONTENCODING_CP1255, encoding_table__CP1255},
+    { wxFONTENCODING_CP1256, encoding_table__CP1256},
+    { wxFONTENCODING_CP1257, encoding_table__CP1257},
+    { wxFONTENCODING_KOI8, encoding_table__KOI8},
+    { wxFONTENCODING_KOI8_U, encoding_table__KOI8_U},
+    {wxFONTENCODING_MAX /*anything*/, NULL}
+ };
diff --git a/Externals/wxWidgets/src/common/uri.cpp b/Externals/wxWidgets/src/common/uri.cpp
index a2ac7bde62..9ff50a0cc4 100644
--- a/Externals/wxWidgets/src/common/uri.cpp
+++ b/Externals/wxWidgets/src/common/uri.cpp
@@ -3,7 +3,7 @@
 // Purpose:     Implementation of a uri parser
 // Author:      Ryan Norton
 // Created:     10/26/04
-// RCS-ID:      $Id: uri.cpp 37403 2006-02-09 03:09:36Z VZ $
+// RCS-ID:      $Id: uri.cpp 58728 2009-02-07 22:03:30Z VZ $
 // Copyright:   (c) 2004 Ryan Norton
 // Licence:     wxWindows
 /////////////////////////////////////////////////////////////////////////////
@@ -159,22 +159,19 @@ bool wxURI::IsEscape(const wxChar*& uri)
 // ---------------------------------------------------------------------------
 wxString wxURI::GetUser() const
 {
-      size_t dwPasswordPos = m_userinfo.find(':');
-
-      if (dwPasswordPos == wxString::npos)
-          dwPasswordPos = 0;
-          
-      return m_userinfo(0, dwPasswordPos);
+    // if there is no colon at all, find() returns npos and this method returns
+    // the entire string which is correct as it means that password was omitted
+    return m_userinfo(0, m_userinfo.find(':'));
 }
 
 wxString wxURI::GetPassword() const
 {
-      size_t dwPasswordPos = m_userinfo.find(':');
+      size_t posColon = m_userinfo.find(':');
 
-      if (dwPasswordPos == wxString::npos)
+      if ( posColon == wxString::npos )
           return wxT("");
-      else
-          return m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1);    
+
+      return m_userinfo(posColon + 1, wxString::npos);
 }
 
 // ---------------------------------------------------------------------------
@@ -867,7 +864,7 @@ void wxURI::Resolve(const wxURI& base, int flags)
         //                T.path = remove_dot_segments(T.path);
         //             endif;
         //             T.query = R.query;
-        if (m_path[0u] != wxT('/'))
+        if (m_path.empty() || m_path[0u] != wxT('/'))
         {
             //Merge paths
             const wxChar* op = m_path.c_str();
diff --git a/Externals/wxWidgets/src/common/url.cpp b/Externals/wxWidgets/src/common/url.cpp
index e7619b1c97..9adb482412 100644
--- a/Externals/wxWidgets/src/common/url.cpp
+++ b/Externals/wxWidgets/src/common/url.cpp
@@ -4,7 +4,7 @@
 // Author:      Guilhem Lavaux
 // Modified by:
 // Created:     20/07/1997
-// RCS-ID:      $Id: url.cpp 49798 2007-11-09 23:17:49Z VZ $
+// RCS-ID:      $Id: url.cpp 57545 2008-12-25 17:03:20Z VZ $
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -242,11 +242,11 @@ wxInputStream *wxURL::GetInputStream()
         size_t dwPasswordPos = m_userinfo.find(':');
 
         if (dwPasswordPos == wxString::npos)
-            m_protocol->SetUser(m_userinfo);
+            m_protocol->SetUser(Unescape(m_userinfo));
         else
         {
-            m_protocol->SetUser(m_userinfo(0, dwPasswordPos));
-            m_protocol->SetPassword(m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1));
+            m_protocol->SetUser(Unescape(m_userinfo(0, dwPasswordPos)));
+            m_protocol->SetPassword(Unescape(m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1)));
         }
     }
 
diff --git a/Externals/wxWidgets/src/common/variant.cpp b/Externals/wxWidgets/src/common/variant.cpp
index 4f39b6e9c2..eb653c0ff7 100644
--- a/Externals/wxWidgets/src/common/variant.cpp
+++ b/Externals/wxWidgets/src/common/variant.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     10/09/98
-// RCS-ID:      $Id: variant.cpp 45498 2007-04-16 13:03:05Z VZ $
+// RCS-ID:      $Id: variant.cpp 58054 2009-01-12 17:27:53Z JMS $
 // Copyright:   (c)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1223,7 +1223,11 @@ bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
 
 bool wxVariantDataDateTime::Write(wxString& str) const
 {
-    str = m_value.Format();
+    if ( m_value.IsValid() )
+        str = m_value.Format();
+    else
+        str = wxT("Invalid");
+
     return true;
 }
 
@@ -1239,6 +1243,12 @@ bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str))
 
 bool wxVariantDataDateTime::Read(wxString& str)
 {
+    if ( str == wxT("Invalid") )
+    {
+        m_value = wxInvalidDateTime;
+        return true;
+    }
+
     if(! m_value.ParseDateTime(str))
         return false;
     return true;
diff --git a/Externals/wxWidgets/src/common/wfstream.cpp b/Externals/wxWidgets/src/common/wfstream.cpp
index be11ac49e4..c5fe73be66 100644
--- a/Externals/wxWidgets/src/common/wfstream.cpp
+++ b/Externals/wxWidgets/src/common/wfstream.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     11/07/98
-// RCS-ID:      $Id: wfstream.cpp 44013 2006-12-19 13:49:26Z SC $
+// RCS-ID:      $Id: wfstream.cpp 54418 2008-06-29 01:28:43Z VZ $
 // Copyright:   (c) Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -107,9 +107,9 @@ wxFileOffset wxFileInputStream::OnSysTell() const
     return m_file->Tell();
 }
 
-bool wxFileInputStream::IsOk() const 
-{ 
-    return (wxStreamBase::IsOk() && m_file->IsOpened()); 
+bool wxFileInputStream::IsOk() const
+{
+    return (wxStreamBase::IsOk() && m_file->IsOpened());
 }
 
 // ----------------------------------------------------------------------------
@@ -183,9 +183,9 @@ wxFileOffset wxFileOutputStream::GetLength() const
     return m_file->Length();
 }
 
-bool wxFileOutputStream::IsOk() const 
-{ 
-    return (wxStreamBase::IsOk() && m_file->IsOpened()); 
+bool wxFileOutputStream::IsOk() const
+{
+    return (wxStreamBase::IsOk() && m_file->IsOpened());
 }
 
 // ----------------------------------------------------------------------------
@@ -220,9 +220,16 @@ size_t wxTempFileOutputStream::OnSysWrite(const void *buffer, size_t size)
 // ----------------------------------------------------------------------------
 
 wxFileStream::wxFileStream(const wxString& fileName)
-            : wxFileInputStream(fileName)
+            : wxFileInputStream(),
+              wxFileOutputStream()
 {
-    wxFileOutputStream::m_file = wxFileInputStream::m_file;
+    wxFileOutputStream::m_file =
+    wxFileInputStream::m_file = new wxFile(fileName, wxFile::read_write);
+
+    // this is a bit ugly as streams are symmetric but we still have to delete
+    // the file we created above exactly once so we decide to (arbitrarily) do
+    // it in wxFileInputStream
+    wxFileInputStream::m_file_destroy = true;
 }
 
 #endif //wxUSE_FILE
@@ -300,9 +307,9 @@ wxFileOffset wxFFileInputStream::OnSysTell() const
     return m_file->Tell();
 }
 
-bool wxFFileInputStream::IsOk() const 
-{ 
-    return (wxStreamBase::IsOk() && m_file->IsOpened()); 
+bool wxFFileInputStream::IsOk() const
+{
+    return (wxStreamBase::IsOk() && m_file->IsOpened());
 }
 
 // ----------------------------------------------------------------------------
@@ -386,9 +393,9 @@ wxFileOffset wxFFileOutputStream::GetLength() const
     return m_file->Length();
 }
 
-bool wxFFileOutputStream::IsOk() const 
-{ 
-    return (wxStreamBase::IsOk() && m_file->IsOpened()); 
+bool wxFFileOutputStream::IsOk() const
+{
+    return (wxStreamBase::IsOk() && m_file->IsOpened());
 }
 
 // ----------------------------------------------------------------------------
@@ -396,9 +403,14 @@ bool wxFFileOutputStream::IsOk() const
 // ----------------------------------------------------------------------------
 
 wxFFileStream::wxFFileStream(const wxString& fileName)
-             : wxFFileInputStream(fileName)
+             : wxFFileInputStream(),
+               wxFFileOutputStream()
 {
-    wxFFileOutputStream::m_file = wxFFileInputStream::m_file;
+    wxFFileOutputStream::m_file =
+    wxFFileInputStream::m_file = new wxFFile(fileName, _T("w+b"));
+
+    // see comment in wxFileStream ctor
+    wxFFileInputStream::m_file_destroy = true;
 }
 
 #endif //wxUSE_FFILE
diff --git a/Externals/wxWidgets/src/common/wincmn.cpp b/Externals/wxWidgets/src/common/wincmn.cpp
index dd283b3572..1a8c9e177f 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 52330 2008-03-05 14:19:38Z VS $
+// RCS-ID:      $Id: wincmn.cpp 57704 2009-01-01 15:18:40Z VZ $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -2363,7 +2363,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
         msg.Printf(_T("wxWidgets Library (%s port)\n")
                    _T("Version %d.%d.%d%s%s, compiled at %s %s\n")
                    _T("Runtime version of toolkit used is %d.%d.%s\n")
-                   _T("Copyright (c) 1995-2007 wxWidgets team"),
+                   _T("Copyright (c) 1995-2009 wxWidgets team"),
                    wxPlatformInfo::Get().GetPortIdName().c_str(),
                    wxMAJOR_VERSION,
                    wxMINOR_VERSION,
@@ -2749,6 +2749,56 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, MoveKind move)
     return win ? win->GetMainWindowOfCompositeControl() : NULL;
 }
 
+// ----------------------------------------------------------------------------
+// drag and drop
+// ----------------------------------------------------------------------------
+
+#if wxUSE_DRAG_AND_DROP && !defined(__WXMSW__)
+
+class wxDragAcceptFilesImplTarget : public wxFileDropTarget
+{
+public:
+    wxDragAcceptFilesImplTarget(wxWindowBase *win) : m_win(win) {}
+
+    virtual bool OnDropFiles(wxCoord x, wxCoord y,
+                             const wxArrayString& filenames)
+    {
+        wxDropFilesEvent event(wxEVT_DROP_FILES,
+                               filenames.size(),
+                               wxCArrayString(filenames).Release());
+        event.SetEventObject(m_win);
+        event.m_pos.x = x;
+        event.m_pos.y = y;
+
+        return m_win->GetEventHandler()->ProcessEvent(event);
+    }
+
+private:
+    wxWindowBase * const m_win;
+
+    DECLARE_NO_COPY_CLASS(wxDragAcceptFilesImplTarget)
+};
+
+
+// Generic version of DragAcceptFiles(). It works by installing a simple
+// wxFileDropTarget-to-EVT_DROP_FILES adaptor and therefore cannot be used
+// together with explicit SetDropTarget() calls.
+void wxWindowBase::DragAcceptFiles(bool accept)
+{
+    if ( accept )
+    {
+        wxASSERT_MSG( !GetDropTarget(),
+                      _T("cannot use DragAcceptFiles() and SetDropTarget() together") );
+        SetDropTarget(new wxDragAcceptFilesImplTarget(this));
+    }
+    else
+    {
+        SetDropTarget(NULL);
+    }
+}
+
+#endif // wxUSE_DRAG_AND_DROP && !defined(__WXMSW__)
+
 // ----------------------------------------------------------------------------
 // global functions
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/common/wxchar.cpp b/Externals/wxWidgets/src/common/wxchar.cpp
index 99a0977ac8..068a1a09e8 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 54071 2008-06-10 18:22:32Z VZ $
+// RCS-ID:      $Id: wxchar.cpp 58994 2009-02-18 15:49:09Z FM $
 // Copyright:   (c) wxWidgets copyright
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -565,6 +565,8 @@ bool wxPrintfConvSpec::Parse(const wxChar *format)
                 break;
 
             case wxT('c'):
+                m_szFlags[flagofs++] = char(ch);
+                m_szFlags[flagofs] = '\0';
                 if (ilen == -1)
                 {
                     // in Unicode mode %hc == ANSI character
@@ -591,6 +593,8 @@ bool wxPrintfConvSpec::Parse(const wxChar *format)
                 break;
 
             case wxT('s'):
+                m_szFlags[flagofs++] = char(ch);
+                m_szFlags[flagofs] = '\0';
                 if (ilen == -1)
                 {
                     // Unicode mode wx extension: we'll let %hs mean non-Unicode
@@ -615,6 +619,8 @@ bool wxPrintfConvSpec::Parse(const wxChar *format)
                 break;
 
             case wxT('n'):
+                m_szFlags[flagofs++] = char(ch);
+                m_szFlags[flagofs] = '\0';
                 if (ilen == 0)
                     m_type = wxPAT_NINT;
                 else if (ilen == -1)
@@ -671,7 +677,7 @@ void wxPrintfConvSpec::ReplaceAsteriskWith(int width)
 
 bool wxPrintfConvSpec::LoadArg(wxPrintfArg *p, va_list &argptr)
 {
-    // did the '*' width/precision specifier was used ?
+    // was the '*' width/precision specifier used ?
     if (m_nMaxWidth == -1)
     {
         // take the maxwidth specifier from the stack
@@ -1191,7 +1197,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
     // NOTE2: the +1 is because we want to copy also the '\0'
     size_t tocopy = wxStrlen(format) + 1  - ( toparse - format ) ;
 
-    lenCur += wxCopyStrWithPercents(lenMax - lenCur, buf + lenCur, 
+    lenCur += wxCopyStrWithPercents(lenMax - lenCur, buf + lenCur,
                                     tocopy, toparse) - 1;
     if (buf[lenCur])
     {
@@ -1256,7 +1262,7 @@ int WXDLLEXPORT wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, ...)
     int wxSprintf (wchar_t * s, const wchar_t * format, ... )
     {
         va_list arglist;
-    
+
         va_start( arglist, format );
         int iLen = swprintf ( s, -1, format, arglist );
         va_end( arglist );
diff --git a/Externals/wxWidgets/src/common/xpmdecod.cpp b/Externals/wxWidgets/src/common/xpmdecod.cpp
index 2d98dd8750..3b01094c6f 100644
--- a/Externals/wxWidgets/src/common/xpmdecod.cpp
+++ b/Externals/wxWidgets/src/common/xpmdecod.cpp
@@ -2,7 +2,7 @@
 // Name:        src/common/xpmdecod.cpp
 // Purpose:     wxXPMDecoder
 // Author:      John Cristy, Vaclav Slavik
-// RCS-ID:      $Id: xpmdecod.cpp 41689 2006-10-08 08:04:49Z PC $
+// RCS-ID:      $Id: xpmdecod.cpp 54948 2008-08-03 10:54:33Z VZ $
 // Copyright:   (c) John Cristy, Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -108,6 +108,7 @@ license is as follows:
     #include "wx/hashmap.h"
     #include "wx/stream.h"
     #include "wx/image.h"
+    #include "wx/palette.h"
 #endif
 
 #include 
@@ -808,6 +809,24 @@ wxImage wxXPMDecoder::ReadData(const char* const* xpm_data)
         }
     }
 
+#if wxUSE_PALETTE
+    unsigned char* r = new unsigned char[colors_cnt];
+    unsigned char* g = new unsigned char[colors_cnt];
+    unsigned char* b = new unsigned char[colors_cnt];
+
+    for (it = clr_tbl.begin(), i = 0; it != clr_tbl.end(); it++, i++)
+    {
+        r[i] = it->second.R;
+        g[i] = it->second.G;
+        b[i] = it->second.B;
+    }
+    wxASSERT(i == colors_cnt);
+    img.SetPalette(wxPalette(colors_cnt, r, g, b));
+    delete[] r;
+    delete[] g;
+    delete[] b;
+#endif // wxUSE_PALETTE
+
     return img;
 }
 
diff --git a/Externals/wxWidgets/src/generic/aboutdlgg.cpp b/Externals/wxWidgets/src/generic/aboutdlgg.cpp
index 5185af8d6e..e99bb39198 100644
--- a/Externals/wxWidgets/src/generic/aboutdlgg.cpp
+++ b/Externals/wxWidgets/src/generic/aboutdlgg.cpp
@@ -3,7 +3,7 @@
 // Purpose:     implements wxGenericAboutBox() function
 // Author:      Vadim Zeitlin
 // Created:     2006-10-08
-// RCS-ID:      $Id: aboutdlgg.cpp 49560 2007-10-31 16:08:18Z VZ $
+// RCS-ID:      $Id: aboutdlgg.cpp 58761 2009-02-08 14:55:44Z VZ $
 // Copyright:   (c) 2006 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -96,6 +96,19 @@ wxIcon wxAboutDialogInfo::GetIcon() const
     return icon;
 }
 
+wxString wxAboutDialogInfo::GetCopyrightToDisplay() const
+{
+    wxString ret = m_copyright;
+
+#if wxUSE_UNICODE
+    const wxString copyrightSign = wxString::FromUTF8("\xc2\xa9");
+    ret.Replace(_T("(c)"), copyrightSign);
+    ret.Replace(_T("(C)"), copyrightSign);
+#endif // wxUSE_UNICODE
+
+    return ret;
+}
+
 // ----------------------------------------------------------------------------
 // wxGenericAboutDialog
 // ----------------------------------------------------------------------------
@@ -120,7 +133,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
     m_sizerText->Add(label, wxSizerFlags().Centre().Border());
     m_sizerText->AddSpacer(5);
 
-    AddText(info.GetCopyright());
+    AddText(info.GetCopyrightToDisplay());
     AddText(info.GetDescription());
 
     if ( info.HasWebSite() )
diff --git a/Externals/wxWidgets/src/generic/caret.cpp b/Externals/wxWidgets/src/generic/caret.cpp
index f22308f8ff..e51fee59ac 100644
--- a/Externals/wxWidgets/src/generic/caret.cpp
+++ b/Externals/wxWidgets/src/generic/caret.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin (original code by Robert Roebling)
 // Modified by:
 // Created:     25.05.99
-// RCS-ID:      $Id: caret.cpp 42397 2006-10-25 12:12:56Z VS $
+// RCS-ID:      $Id: caret.cpp 55170 2008-08-22 10:34:32Z JS $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -268,10 +268,37 @@ void wxCaret::Refresh()
 
 void wxCaret::DoDraw(wxDC *dc)
 {
-    dc->SetPen( *wxBLACK_PEN );
-
-    dc->SetBrush(*(m_hasFocus ? wxBLACK_BRUSH : wxTRANSPARENT_BRUSH));
-    dc->SetPen(*wxBLACK_PEN);
+#if defined(__WXGTK__) || defined(__WXMAC__)
+    wxClientDC* clientDC = wxDynamicCast(dc, wxClientDC);
+    if (clientDC)
+    {
+        wxPen pen(*wxBLACK_PEN);
+        wxBrush brush(*wxBLACK_BRUSH);
+#ifdef __WXGTK__
+        wxWindow* win = clientDC->m_owner;
+#else
+        wxWindow* win = clientDC->GetWindow();
+#endif
+        if (win)
+        {
+            wxColour backgroundColour(win->GetBackgroundColour());
+            if (backgroundColour.Red() < 100 &&
+                backgroundColour.Green() < 100 &&
+                backgroundColour.Blue() < 100)
+            {
+                pen = *wxWHITE_PEN;
+                brush = *wxWHITE_BRUSH;
+            }
+        }
+        dc->SetPen( pen );
+        dc->SetBrush(m_hasFocus ? brush : *wxTRANSPARENT_BRUSH);
+    }
+    else
+#endif
+    {
+        dc->SetBrush(*(m_hasFocus ? wxBLACK_BRUSH : wxTRANSPARENT_BRUSH));
+        dc->SetPen(*wxBLACK_PEN);
+    }
 
     // VZ: unfortunately, the rectangle comes out a pixel smaller when this is
     //     done under wxGTK - no idea why
diff --git a/Externals/wxWidgets/src/generic/choicbkg.cpp b/Externals/wxWidgets/src/generic/choicbkg.cpp
index 7d7c2f880a..f39524ca8b 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 53045 2008-04-06 15:14:25Z VZ $
+// RCS-ID:      $Id: choicbkg.cpp 58355 2009-01-24 14:12:59Z VZ $
 // Copyright:   (c) Vadim Zeitlin, Wlodzimierz Skiba
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -146,11 +146,15 @@ wxSize wxChoicebook::CalcSizeFromPage(const wxSize& sizePage) const
     wxSize size = sizePage;
     if ( IsVertical() )
     {
+        if ( sizeChoice.x > sizePage.x )
+            size.x = sizeChoice.x;
         size.y += sizeChoice.y + GetInternalBorder();
     }
     else // left/right aligned
     {
         size.x += sizeChoice.x + GetInternalBorder();
+        if ( sizeChoice.y > sizePage.y )
+            size.y = sizeChoice.y;
     }
 
     return size;
diff --git a/Externals/wxWidgets/src/generic/clrpickerg.cpp b/Externals/wxWidgets/src/generic/clrpickerg.cpp
index 0a0a328c4a..9d9fa387a0 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 52835 2008-03-26 15:49:08Z JS $
+// RCS-ID:      $Id: clrpickerg.cpp 58967 2009-02-17 13:31:28Z SC $
 // Copyright:   (c) Vadim Zeitlin, Francesco Montorsi
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@
 // ============================================================================
 
 wxColourData wxGenericColourButton::ms_data;
-IMPLEMENT_DYNAMIC_CLASS(wxGenericColourButton, wxButton)
+IMPLEMENT_DYNAMIC_CLASS(wxGenericColourButton, wxCLRBTN_BASE_CLASS)
 
 // ----------------------------------------------------------------------------
 // wxGenericColourButton
@@ -48,8 +48,14 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
                         const wxValidator& validator, const wxString &name)
 {
     // create this button
+#if wxCLRBTN_USES_BMP_BUTTON
+    wxBitmap empty(1,1);
+    if (!wxBitmapButton::Create( parent, id, empty, pos,
+                           size, style, validator, name ))
+#else
     if (!wxButton::Create( parent, id, wxEmptyString, pos,
                            size, style, validator, name ))
+#endif
     {
         wxFAIL_MSG( wxT("wxGenericColourButton creation failed") );
         return false;
@@ -101,8 +107,13 @@ void wxGenericColourButton::UpdateColour()
 {
     if ( !m_colour.Ok() )
     {
+#if wxCLRBTN_USES_BMP_BUTTON
+        wxBitmap empty(1,1);
+        SetBitmapLabel(empty);
+#else
         if ( HasFlag(wxCLRP_SHOW_LABEL) )
             SetLabel(wxEmptyString);
+#endif
         return;
     }
 
@@ -110,18 +121,63 @@ void wxGenericColourButton::UpdateColour()
     // the colour to make sure fg colour is different enough from m_colour
     wxColour colFg(~m_colour.Red(), ~m_colour.Green(), ~m_colour.Blue());
 
+#if wxCLRBTN_USES_BMP_BUTTON
+    wxSize sz = GetSize();
+    sz.x -= 2*GetMarginX();
+    sz.y -= 2*GetMarginY();
+
+    wxPoint topleft;
+    
+    if ( sz.x < 1 )
+        sz.x = 1;
+    else
+    if ( sz.y < 1 )
+        sz.y = 1;
+    
+    wxBitmap bmp(sz.x, sz.y);
+    {
+        wxMemoryDC memdc(bmp);
+        memdc.SetPen(colFg);
+        memdc.SetBrush(m_colour);
+        memdc.DrawRectangle(topleft,sz);
+        if ( HasFlag(wxCLRP_SHOW_LABEL) )
+        {
+            int x, y, leading, desc;
+            wxString label = m_colour.GetAsString(wxC2S_HTML_SYNTAX);
+            memdc.GetTextExtent(label,&x,&y,&desc,&leading);
+            if ( x <= sz.x && y <= sz.y )
+            {
+                topleft.x += (sz.x-x)/2;
+                topleft.y += (sz.y-y)/2;
+                memdc.SetTextForeground(colFg);
+                memdc.DrawText(label,topleft);
+            }
+        }
+    }
+    SetBitmapLabel(bmp);
+#else
     SetForegroundColour(colFg);
     SetBackgroundColour(m_colour);
 
     if ( HasFlag(wxCLRP_SHOW_LABEL) )
         SetLabel(m_colour.GetAsString(wxC2S_HTML_SYNTAX));
+#endif
 }
 
 wxSize wxGenericColourButton::DoGetBestSize() const
 {
     wxSize sz(wxButton::DoGetBestSize());
     if ( HasFlag(wxCLRP_SHOW_LABEL) )
+    {
+#if wxCLRBTN_USES_BMP_BUTTON
+        int x, y, leading, desc;
+        wxString label = m_colour.GetAsString(wxC2S_HTML_SYNTAX);
+        wxClientDC dc(const_cast(this));
+        dc.GetTextExtent(label,&x,&y,&desc,&leading);
+        sz.x = sz.y+x;
+#endif
         return sz;
+    }
 
     // if we have no label, then make this button a square
     // (like e.g. native GTK version of this control)
diff --git a/Externals/wxWidgets/src/generic/datectlg.cpp b/Externals/wxWidgets/src/generic/datectlg.cpp
index bf79d89085..1554d29142 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 53510 2008-05-09 22:15:55Z RD $
+// RCS-ID:      $Id: datectlg.cpp 54407 2008-06-28 18:58:07Z VZ $
 // Copyright:   (c) 2005 Andreas Pflug 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -169,6 +169,11 @@ public:
         }
     }
 
+    bool IsTextEmpty() const
+    {
+        return m_combo->GetTextCtrl()->IsEmpty();
+    }
+
     bool ParseDateTime(const wxString& s, wxDateTime* pDt)
     {
         wxASSERT(pDt);
@@ -470,6 +475,8 @@ wxDatePickerCtrlGeneric::SetDateRange(const wxDateTime& lowerdate,
 
 wxDateTime wxDatePickerCtrlGeneric::GetValue() const
 {
+    if ( HasFlag(wxDP_ALLOWNONE) && m_popup->IsTextEmpty() )
+        return wxInvalidDateTime;
     return m_popup->GetDate();
 }
 
diff --git a/Externals/wxWidgets/src/generic/dcpsg.cpp b/Externals/wxWidgets/src/generic/dcpsg.cpp
index e23fe15214..e2eadde151 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 50711 2007-12-15 02:57:58Z VZ $
+// RCS-ID:      $Id: dcpsg.cpp 55927 2008-09-28 09:12:16Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -987,8 +987,11 @@ void wxPostScriptDC::SetFont( const wxFont& font )
     PsPrint( name );
     PsPrint( " findfont\n" );
 
+    float size = float(m_font.GetPointSize());
+    size = size * GetFontPointSizeAdjustment(GetResolution());
+
     char buffer[100];
-    sprintf( buffer, "%f scalefont setfont\n", LogicalToDeviceYRel(m_font.GetPointSize() * 1000) / 1000.0F);
+    sprintf( buffer, "%f scalefont setfont\n", size * m_scaleX);
     // this is a hack - we must scale font size (in pts) according to m_scaleY but
     // LogicalToDeviceYRel works with wxCoord type (int or longint). Se we first convert font size
     // to 1/1000th of pt and then back.
@@ -1590,7 +1593,6 @@ bool wxPostScriptDC::StartDoc( const wxString& message )
     m_title = message;
 
     PsPrint( "%!PS-Adobe-2.0\n" );
-    PsPrintf( wxT("%%%%Title: %s\n"), m_title.c_str() );
     PsPrint( "%%Creator: wxWidgets PostScript renderer\n" );
     PsPrintf( wxT("%%%%CreationDate: %s\n"), wxNow().c_str() );
     if (m_printData.GetOrientation() == wxLANDSCAPE)
@@ -1841,7 +1843,8 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
 
     if (!fontToUse) fontToUse = (wxFont*) &m_font;
 
-    wxCHECK_RET( fontToUse, wxT("GetTextExtent: no font defined") );
+    const float fontSize =
+        fontToUse->GetPointSize() * GetFontPointSizeAdjustment(72.0);
 
     if (string.empty())
     {
@@ -1861,15 +1864,10 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
      * Produces accurate results for mono-spaced font
      * such as Courier (aka wxMODERN) */
 
-    int height = 12;
-    if (fontToUse)
-    {
-        height = fontToUse->GetPointSize();
-    }
     if ( x )
-        *x = strlen (strbuf) * height * 72 / 120;
+        *x = strlen (strbuf) * fontSize * 72.0 / 120.0;
     if ( y )
-        *y = (wxCoord) (height * 1.32);    /* allow for descender */
+        *y = (wxCoord) (fontSize * 1.32);    /* allow for descender */
     if (descent) *descent = 0;
     if (externalLeading) *externalLeading = 0;
 #else
@@ -2136,9 +2134,9 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
         // VS: dirty, but is there any better solution?
         double *pt;
         pt = (double*) &m_underlinePosition;
-        *pt = LogicalToDeviceYRel((wxCoord)(UnderlinePosition * fontToUse->GetPointSize())) / 1000.0f;
+        *pt = LogicalToDeviceYRel((wxCoord)(UnderlinePosition * fontSize)) / 1000.0f;
         pt = (double*) &m_underlineThickness;
-        *pt = LogicalToDeviceYRel((wxCoord)(UnderlineThickness * fontToUse->GetPointSize())) / 1000.0f;
+        *pt = LogicalToDeviceYRel((wxCoord)(UnderlineThickness * fontSize)) / 1000.0f;
 
     }
 
@@ -2148,7 +2146,7 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
        /  string. they are given in 1/1000 of the size! */
 
     long sum=0;
-    wxCoord height=Size; /* by default */
+    float height=fontSize; /* by default */
     unsigned char *p;
     for(p=(unsigned char *)wxMBSTRINGCAST strbuf; *p; p++)
     {
@@ -2164,7 +2162,7 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
     }
 
     double widthSum = sum;
-    widthSum *= Size;
+    widthSum *= fontSize;
     widthSum /= 1000.0F;
 
     /* add descender to height (it is usually a negative value) */
@@ -2179,14 +2177,14 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
     if ( x )
         *x = (wxCoord)widthSum;
     if ( y )
-        *y = height;
+        *y = (wxCoord)height;
 
     /* return other parameters */
     if (descent)
     {
         if(lastDescender!=INT_MIN)
         {
-            *descent = (wxCoord)(((-lastDescender)/1000.0F) * Size); /* MATTHEW: forgot scale */
+            *descent = (wxCoord)(((-lastDescender)/1000.0F) * fontSize); /* MATTHEW: forgot scale */
         }
         else
         {
diff --git a/Externals/wxWidgets/src/generic/descrip.mms b/Externals/wxWidgets/src/generic/descrip.mms
index dc636de7b3..742fc28c50 100644
--- a/Externals/wxWidgets/src/generic/descrip.mms
+++ b/Externals/wxWidgets/src/generic/descrip.mms
@@ -1,276 +1,276 @@
-#*****************************************************************************
-#                                                                            *
-# Make file for VMS                                                          *
-# Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
-# Date : 31 October 2006                                                     *
-#                                                                            *
-#*****************************************************************************
-.first
-	define wx [--.include.wx]
-
-.ifdef __WXMOTIF__
-CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
-	   /assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)
-.else
-.ifdef __WXGTK__
-CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
-	   /assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm
-.else
-.ifdef __WXX11__
-CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
-	/name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
-	/name=(as_is,short)
-.else
-.ifdef __WXGTK2__
-CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2==1)/float=ieee\
-	/name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
-CC_DEFINE = /define=(__WX_GTK__=1,VMS_GTK2==1)/float=ieee\
-	/name=(as_is,short)
-.else
-CXX_DEFINE =
-CC_DEFINE =
-.endif
-.endif
-.endif
-.endif
-
-.suffixes : .cpp
-
-.cpp.obj :
-	cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
-.c.obj :
-	cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c
-
-OBJECTS = \
-		aboutdlgg.obj,\
-		animateg.obj,\
-		busyinfo.obj,\
-		calctrl.obj,\
-		caret.obj,\
-		choicbkg.obj,\
-		choicdgg.obj,\
-		colrdlgg.obj,\
-		clrpickerg.obj,\
-		datectlg.obj,\
-		dcpsg.obj,\
-		dirctrlg.obj,\
-		dirdlgg.obj,\
-		fdrepdlg.obj,\
-		fontdlgg.obj,\
-		fontpickerg.obj,\
-		grid.obj,\
-		gridctrl.obj,\
-		gridsel.obj,\
-		helpext.obj,\
-		htmllbox.obj,\
-		imaglist.obj,\
-		laywin.obj,\
-		listbkg.obj,\
-		listctrl.obj,\
-		logg.obj,\
-		msgdlgg.obj,\
-		numdlgg.obj,\
-		odcombo.obj,\
-		panelg.obj,\
-		printps.obj,\
-		prntdlgg.obj,\
-		propdlg.obj,\
-		progdlgg.obj,\
-		renderg.obj,\
-		sashwin.obj,\
-		scrlwing.obj,\
-		selstore.obj,\
-		splitter.obj,\
-		tabg.obj,\
-		textdlgg.obj,\
-		tipdlg.obj,\
-		tipwin.obj,\
-		toolbkg.obj,\
-		treebkg.obj,\
-		treectlg.obj,\
-		wizard.obj,\
-		hyperlink.obj,\
-		filepickerg.obj,\
-		bmpcboxg.obj
-
-SOURCES = \
-		aboutdlgg.cpp,\
-		accel.cpp,\
-		animateg.cpp,\
-		busyinfo.cpp,\
-		calctrl.cpp,\
-		caret.cpp,\
-		choicbkg.cpp,\
-		choicdgg.cpp,\
-		collpaneg.cpp,\
-		colrdlgg.cpp,\
-		clrpickerg.cpp,\
-		datectlg.cpp,\
-		dcpsg.cpp,\
-		dirctrlg.cpp,\
-		dirdlgg.cpp,\
-		filedlgg.cpp,\
-		fdrepdlg.cpp,\
-		fontdlgg.cpp,\
-		fontpickerg.cpp,\
-		grid.cpp,\
-		gridctrl.cpp,\
-		gridsel.cpp,\
-		helpext.cpp,\
-		htmllbox.cpp,\
-		imaglist.cpp,\
-		laywin.cpp,\
-		listbkg.cpp,\
-		listctrl.cpp,\
-		logg.cpp,\
-		msgdlgg.cpp,\
-		notebook.cpp,\
-		numdlgg.cpp,\
-		odcombo.cpp,\
-		paletteg.cpp,\
-		panelg.cpp,\
-		printps.cpp,\
-		prntdlgg.cpp,\
-		propdlg.cpp,\
-		progdlgg.cpp,\
-		renderg.cpp,\
-		sashwin.cpp,\
-		selstore.cpp,\
-		splitter.cpp,\
-		statline.cpp,\
-		statusbr.cpp,\
-		tabg.cpp,\
-		textdlgg.cpp,\
-		tipdlg.cpp,\
-		tipwin.cpp,\
-		toolbkg.cpp,\
-		treebkg.cpp,\
-		treectlg.cpp,\
-		wizard.cpp,\
-		dragimgg.cpp,\
-		fdrepdlg.cpp,\
-		htmllbox.cpp,\
-		listbkg.cpp,\
-		mdig.cpp,\
-		scrlwing.cpp,\
-		spinctlg.cpp,\
-		splash.cpp,\
-		timer.cpp,\
-		vlbox.cpp,\
-		hyperlink.cpp,\
-		filepickerg.cpp,\
-		vscroll.cpp,\
-		icon.cpp,bmpcboxg.cpp
-
-.ifdef __WXMOTIF__
-OBJECTS0=,statusbr.obj,statline.obj,notebook.obj,spinctlg.obj,collpaneg.obj,\
-	combog.obj
-.else
-.ifdef __WXX11__
-OBJECTS0=,accel.obj,filedlgg.obj,dragimgg.obj,fdrepdlg.obj,htmllbox.obj,\
-	listbkg.obj,mdig.obj,spinctlg.obj,splash.obj,timer.obj,\
-	vlbox.obj,vscroll.obj,combog.obj,icon.obj,collpaneg.obj
-.else
-.ifdef __WXGTK__
-OBJECTS0=,accel.obj,statusbr.obj,filedlgg.obj,paletteg.obj,vlbox.obj,\
-	vscroll.obj,combog.obj,icon.obj,collpaneg.obj
-.else
-OBJECTS0=,accel.obj,statusbr.obj,filedlgg.obj,paletteg.obj,vlbox.obj,\
-	vscroll.obj,combog.obj,icon.obj
-.endif
-.endif
-.endif
-
-all : $(SOURCES)
-	$(MMS)$(MMSQUALIFIERS) $(OBJECTS)$(OBJECTS0)
-.ifdef __WXMOTIF__
-	library/crea [--.lib]libwx_motif.olb $(OBJECTS)$(OBJECTS0)
-.else
-.ifdef __WXGTK__
-	library/crea [--.lib]libwx_gtk.olb $(OBJECTS)$(OBJECTS0)
-.else
-.ifdef __WXGTK2__
-	library/crea [--.lib]libwx_gtk2.olb $(OBJECTS)$(OBJECTS0)
-.else
-.ifdef __WXX11__
-	library/crea [--.lib]libwx_x11_univ.olb $(OBJECTS)$(OBJECTS0)
-.endif
-.endif
-.endif
-.endif
-
-aboutdlgg.obj : aboutdlgg.cpp
-accel.obj : accel.cpp
-animateg.obj : animateg.cpp
-busyinfo.obj : busyinfo.cpp
-calctrl.obj : calctrl.cpp
-caret.obj : caret.cpp
-choicdgg.obj : choicdgg.cpp
-clrpickerg.obj : clrpickerg.cpp
-collpaneg.obj : collpaneg.cpp
-colrdlgg.obj : colrdlgg.cpp
-datectlg.obj : datectlg.cpp
-dcpsg.obj : dcpsg.cpp
-dirctrlg.obj : dirctrlg.cpp
-dirdlgg.obj : dirdlgg.cpp
-filedlgg.obj : filedlgg.cpp
-fontdlgg.obj : fontdlgg.cpp
-fdrepdlg.obj : fdrepdlg.cpp
-grid.obj : grid.cpp
-gridctrl.obj : gridctrl.cpp
-gridsel.obj : gridsel.cpp
-helpext.obj : helpext.cpp
-htmllbox.obj : htmllbox.cpp
-icon.obj : icon.cpp
-imaglist.obj : imaglist.cpp
-laywin.obj : laywin.cpp
-listctrl.obj : listctrl.cpp
-logg.obj : logg.cpp
-msgdlgg.obj : msgdlgg.cpp
-notebook.obj : notebook.cpp
-numdlgg.obj : numdlgg.cpp
-odcombo.obj : odcombo.cpp
-paletteg.obj : paletteg.cpp
-panelg.obj : panelg.cpp
-printps.obj : printps.cpp
-prntdlgg.obj : prntdlgg.cpp
-progdlgg.obj : progdlgg.cpp
-propdlg.obj : propdlg.cpp
-scrlwing.obj : scrlwing.cpp
-spinctlg.obj : spinctlg.cpp
-renderg.obj : renderg.cpp
-sashwin.obj : sashwin.cpp
-selstore.obj : selstore.cpp
-splitter.obj : splitter.cpp
-statline.obj : statline.cpp
-statusbr.obj : statusbr.cpp
-tabg.obj : tabg.cpp
-textdlgg.obj : textdlgg.cpp
-tipdlg.obj : tipdlg.cpp
-tipwin.obj : tipwin.cpp
-treectlg.obj : treectlg.cpp
-wizard.obj : wizard.cpp
-dragimgg.obj : dragimgg.cpp
-fdrepdlg.obj : fdrepdlg.cpp
-htmllbox.obj : htmllbox.cpp
-listbkg.obj : listbkg.cpp
-mdig.obj : mdig.cpp
-scrlwing.obj : scrlwing.cpp
-spinctlg.obj : spinctlg.cpp
-splash.obj : splash.cpp
-timer.obj : timer.cpp
-vlbox.obj : vlbox.cpp
-vscroll.obj : vscroll.cpp
-	cxx $(CXXFLAGS)$(CXX_DEFINE)/nowarn vscroll.cpp
-listbkg.obj : listbkg.cpp
-choicbkg.obj : choicbkg.cpp
-toolbkg.obj : toolbkg.cpp
-treebkg.obj : treebkg.cpp
-combog.obj : combog.cpp
-fontpickerg.obj : fontpickerg.cpp
-hyperlink.obj : hyperlink.cpp
-filepickerg.obj : filepickerg.cpp
-bmpcboxg.obj : bmpcboxg.cpp
+#*****************************************************************************
+#                                                                            *
+# Make file for VMS                                                          *
+# Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
+# Date : 31 October 2006                                                     *
+#                                                                            *
+#*****************************************************************************
+.first
+	define wx [--.include.wx]
+
+.ifdef __WXMOTIF__
+CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
+	   /assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)
+.else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
+	   /assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm
+.else
+.ifdef __WXX11__
+CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
+	/name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
+	/name=(as_is,short)
+.else
+.ifdef __WXGTK2__
+CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2==1)/float=ieee\
+	/name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
+CC_DEFINE = /define=(__WX_GTK__=1,VMS_GTK2==1)/float=ieee\
+	/name=(as_is,short)
+.else
+CXX_DEFINE =
+CC_DEFINE =
+.endif
+.endif
+.endif
+.endif
+
+.suffixes : .cpp
+
+.cpp.obj :
+	cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
+.c.obj :
+	cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c
+
+OBJECTS = \
+		aboutdlgg.obj,\
+		animateg.obj,\
+		busyinfo.obj,\
+		calctrl.obj,\
+		caret.obj,\
+		choicbkg.obj,\
+		choicdgg.obj,\
+		colrdlgg.obj,\
+		clrpickerg.obj,\
+		datectlg.obj,\
+		dcpsg.obj,\
+		dirctrlg.obj,\
+		dirdlgg.obj,\
+		fdrepdlg.obj,\
+		fontdlgg.obj,\
+		fontpickerg.obj,\
+		grid.obj,\
+		gridctrl.obj,\
+		gridsel.obj,\
+		helpext.obj,\
+		htmllbox.obj,\
+		imaglist.obj,\
+		laywin.obj,\
+		listbkg.obj,\
+		listctrl.obj,\
+		logg.obj,\
+		msgdlgg.obj,\
+		numdlgg.obj,\
+		odcombo.obj,\
+		panelg.obj,\
+		printps.obj,\
+		prntdlgg.obj,\
+		propdlg.obj,\
+		progdlgg.obj,\
+		renderg.obj,\
+		sashwin.obj,\
+		scrlwing.obj,\
+		selstore.obj,\
+		splitter.obj,\
+		tabg.obj,\
+		textdlgg.obj,\
+		tipdlg.obj,\
+		tipwin.obj,\
+		toolbkg.obj,\
+		treebkg.obj,\
+		treectlg.obj,\
+		wizard.obj,\
+		hyperlink.obj,\
+		filepickerg.obj,\
+		bmpcboxg.obj
+
+SOURCES = \
+		aboutdlgg.cpp,\
+		accel.cpp,\
+		animateg.cpp,\
+		busyinfo.cpp,\
+		calctrl.cpp,\
+		caret.cpp,\
+		choicbkg.cpp,\
+		choicdgg.cpp,\
+		collpaneg.cpp,\
+		colrdlgg.cpp,\
+		clrpickerg.cpp,\
+		datectlg.cpp,\
+		dcpsg.cpp,\
+		dirctrlg.cpp,\
+		dirdlgg.cpp,\
+		filedlgg.cpp,\
+		fdrepdlg.cpp,\
+		fontdlgg.cpp,\
+		fontpickerg.cpp,\
+		grid.cpp,\
+		gridctrl.cpp,\
+		gridsel.cpp,\
+		helpext.cpp,\
+		htmllbox.cpp,\
+		imaglist.cpp,\
+		laywin.cpp,\
+		listbkg.cpp,\
+		listctrl.cpp,\
+		logg.cpp,\
+		msgdlgg.cpp,\
+		notebook.cpp,\
+		numdlgg.cpp,\
+		odcombo.cpp,\
+		paletteg.cpp,\
+		panelg.cpp,\
+		printps.cpp,\
+		prntdlgg.cpp,\
+		propdlg.cpp,\
+		progdlgg.cpp,\
+		renderg.cpp,\
+		sashwin.cpp,\
+		selstore.cpp,\
+		splitter.cpp,\
+		statline.cpp,\
+		statusbr.cpp,\
+		tabg.cpp,\
+		textdlgg.cpp,\
+		tipdlg.cpp,\
+		tipwin.cpp,\
+		toolbkg.cpp,\
+		treebkg.cpp,\
+		treectlg.cpp,\
+		wizard.cpp,\
+		dragimgg.cpp,\
+		fdrepdlg.cpp,\
+		htmllbox.cpp,\
+		listbkg.cpp,\
+		mdig.cpp,\
+		scrlwing.cpp,\
+		spinctlg.cpp,\
+		splash.cpp,\
+		timer.cpp,\
+		vlbox.cpp,\
+		hyperlink.cpp,\
+		filepickerg.cpp,\
+		vscroll.cpp,\
+		icon.cpp,bmpcboxg.cpp
+
+.ifdef __WXMOTIF__
+OBJECTS0=,statusbr.obj,statline.obj,notebook.obj,spinctlg.obj,collpaneg.obj,\
+	combog.obj
+.else
+.ifdef __WXX11__
+OBJECTS0=,accel.obj,filedlgg.obj,dragimgg.obj,fdrepdlg.obj,htmllbox.obj,\
+	listbkg.obj,mdig.obj,spinctlg.obj,splash.obj,timer.obj,\
+	vlbox.obj,vscroll.obj,combog.obj,icon.obj,collpaneg.obj
+.else
+.ifdef __WXGTK__
+OBJECTS0=,accel.obj,statusbr.obj,filedlgg.obj,paletteg.obj,vlbox.obj,\
+	vscroll.obj,combog.obj,icon.obj,collpaneg.obj
+.else
+OBJECTS0=,accel.obj,statusbr.obj,filedlgg.obj,paletteg.obj,vlbox.obj,\
+	vscroll.obj,combog.obj,icon.obj
+.endif
+.endif
+.endif
+
+all : $(SOURCES)
+	$(MMS)$(MMSQUALIFIERS) $(OBJECTS)$(OBJECTS0)
+.ifdef __WXMOTIF__
+	library/crea [--.lib]libwx_motif.olb $(OBJECTS)$(OBJECTS0)
+.else
+.ifdef __WXGTK__
+	library/crea [--.lib]libwx_gtk.olb $(OBJECTS)$(OBJECTS0)
+.else
+.ifdef __WXGTK2__
+	library/crea [--.lib]libwx_gtk2.olb $(OBJECTS)$(OBJECTS0)
+.else
+.ifdef __WXX11__
+	library/crea [--.lib]libwx_x11_univ.olb $(OBJECTS)$(OBJECTS0)
+.endif
+.endif
+.endif
+.endif
+
+aboutdlgg.obj : aboutdlgg.cpp
+accel.obj : accel.cpp
+animateg.obj : animateg.cpp
+busyinfo.obj : busyinfo.cpp
+calctrl.obj : calctrl.cpp
+caret.obj : caret.cpp
+choicdgg.obj : choicdgg.cpp
+clrpickerg.obj : clrpickerg.cpp
+collpaneg.obj : collpaneg.cpp
+colrdlgg.obj : colrdlgg.cpp
+datectlg.obj : datectlg.cpp
+dcpsg.obj : dcpsg.cpp
+dirctrlg.obj : dirctrlg.cpp
+dirdlgg.obj : dirdlgg.cpp
+filedlgg.obj : filedlgg.cpp
+fontdlgg.obj : fontdlgg.cpp
+fdrepdlg.obj : fdrepdlg.cpp
+grid.obj : grid.cpp
+gridctrl.obj : gridctrl.cpp
+gridsel.obj : gridsel.cpp
+helpext.obj : helpext.cpp
+htmllbox.obj : htmllbox.cpp
+icon.obj : icon.cpp
+imaglist.obj : imaglist.cpp
+laywin.obj : laywin.cpp
+listctrl.obj : listctrl.cpp
+logg.obj : logg.cpp
+msgdlgg.obj : msgdlgg.cpp
+notebook.obj : notebook.cpp
+numdlgg.obj : numdlgg.cpp
+odcombo.obj : odcombo.cpp
+paletteg.obj : paletteg.cpp
+panelg.obj : panelg.cpp
+printps.obj : printps.cpp
+prntdlgg.obj : prntdlgg.cpp
+progdlgg.obj : progdlgg.cpp
+propdlg.obj : propdlg.cpp
+scrlwing.obj : scrlwing.cpp
+spinctlg.obj : spinctlg.cpp
+renderg.obj : renderg.cpp
+sashwin.obj : sashwin.cpp
+selstore.obj : selstore.cpp
+splitter.obj : splitter.cpp
+statline.obj : statline.cpp
+statusbr.obj : statusbr.cpp
+tabg.obj : tabg.cpp
+textdlgg.obj : textdlgg.cpp
+tipdlg.obj : tipdlg.cpp
+tipwin.obj : tipwin.cpp
+treectlg.obj : treectlg.cpp
+wizard.obj : wizard.cpp
+dragimgg.obj : dragimgg.cpp
+fdrepdlg.obj : fdrepdlg.cpp
+htmllbox.obj : htmllbox.cpp
+listbkg.obj : listbkg.cpp
+mdig.obj : mdig.cpp
+scrlwing.obj : scrlwing.cpp
+spinctlg.obj : spinctlg.cpp
+splash.obj : splash.cpp
+timer.obj : timer.cpp
+vlbox.obj : vlbox.cpp
+vscroll.obj : vscroll.cpp
+	cxx $(CXXFLAGS)$(CXX_DEFINE)/nowarn vscroll.cpp
+listbkg.obj : listbkg.cpp
+choicbkg.obj : choicbkg.cpp
+toolbkg.obj : toolbkg.cpp
+treebkg.obj : treebkg.cpp
+combog.obj : combog.cpp
+fontpickerg.obj : fontpickerg.cpp
+hyperlink.obj : hyperlink.cpp
+filepickerg.obj : filepickerg.cpp
+bmpcboxg.obj : bmpcboxg.cpp
diff --git a/Externals/wxWidgets/src/generic/graphicc.cpp b/Externals/wxWidgets/src/generic/graphicc.cpp
index 4ba4e04083..8ed7919e9b 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 51312 2008-01-21 16:30:13Z VS $
+// RCS-ID:      $Id: graphicc.cpp 56887 2008-11-22 04:40:08Z KO $
 // Copyright:   (c) 2006 Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -301,6 +301,23 @@ private :
     double m_alpha;
 };
 
+class wxCairoBitmapData : public wxGraphicsObjectRefData
+{
+public:
+    wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp );
+    ~wxCairoBitmapData();
+
+    virtual cairo_surface_t* GetCairoSurface() { return m_surface; }
+    virtual cairo_pattern_t* GetCairoPattern() { return m_pattern; }
+    virtual wxSize GetSize() { return wxSize(m_width, m_height); }
+private :
+    cairo_surface_t* m_surface;
+    cairo_pattern_t* m_pattern;
+    int m_width;
+    int m_height;
+    unsigned char* m_buffer;
+};
+
 class WXDLLIMPEXP_CORE wxCairoContext : public wxGraphicsContext
 {
     DECLARE_NO_COPY_CLASS(wxCairoContext)
@@ -341,6 +358,7 @@ public:
     // gets the matrix of this context
     virtual wxGraphicsMatrix GetTransform() const;
 
+    void DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
     virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
     virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
     virtual void PushState();
@@ -961,6 +979,90 @@ void * wxCairoMatrixData::GetNativeMatrix() const
     return (void*) &m_matrix;
 }
 
+//-----------------------------------------------------------------------------
+// wxCairoBitmap implementation
+//-----------------------------------------------------------------------------
+
+wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) : wxGraphicsObjectRefData( renderer )
+{
+    wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap"));
+
+    int bw = m_width = bmp.GetWidth();
+    int bh = m_height = bmp.GetHeight();
+    wxBitmap bmpSource = bmp;  // we need a non-const instance
+    m_buffer = new unsigned char[bw*bh*4];
+    wxUint32* data = (wxUint32*)m_buffer;
+    
+    // Create a surface object and copy the bitmap pixel data to it.  if the
+    // image has alpha (or a mask represented as alpha) then we'll use a
+    // different format and iterator than if it doesn't...
+    if (bmpSource.HasAlpha() || bmpSource.GetMask())
+    {
+        m_surface = cairo_image_surface_create_for_data(
+            m_buffer, CAIRO_FORMAT_ARGB32, bw, bh, bw*4);
+        wxAlphaPixelData pixData(bmpSource, wxPoint(0,0), wxSize(bw, bh));
+        wxCHECK_RET( pixData, wxT("Failed to gain raw access to bitmap data."));
+        
+        wxAlphaPixelData::Iterator p(pixData);
+        for (int y=0; y(this)->DrawGraphicsBitmapInternal(bmp, x, y, w, h);
+}
+
 void wxCairoContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h )
 {
-    wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap"));
+    wxGraphicsBitmap bitmap = GetRenderer()->CreateBitmap(bmp);
+    DrawGraphicsBitmapInternal(bitmap, x, y, w, h);
+}
 
-    cairo_surface_t* surface;
-    int bw = bmp.GetWidth();
-    int bh = bmp.GetHeight();
-    wxBitmap bmpSource = bmp;  // we need a non-const instance
-    unsigned char* buffer = new unsigned char[bw*bh*4];
-    wxUint32* data = (wxUint32*)buffer;
-    
-    // Create a surface object and copy the bitmap pixel data to it.  if the
-    // image has alpha (or a mask represented as alpha) then we'll use a
-    // different format and iterator than if it doesn't...
-    if (bmpSource.HasAlpha() || bmpSource.GetMask())
-    {
-        surface = cairo_image_surface_create_for_data(
-            buffer, CAIRO_FORMAT_ARGB32, bw, bh, bw*4);
-        wxAlphaPixelData pixData(bmpSource, wxPoint(0,0), wxSize(bw, bh));
-        wxCHECK_RET( pixData, wxT("Failed to gain raw access to bitmap data."));
-        
-        wxAlphaPixelData::Iterator p(pixData);
-        for (int y=0; y(bmp.GetRefData());
+    cairo_pattern_t* pattern = data->GetCairoPattern();
+    wxSize size = data->GetSize();
     PushState();
     
     // In case we're scaling the image by using a width and height different
     // than the bitmap's size create a pattern transformation on the surface and
     // draw the transformed pattern.
-    cairo_pattern_t* pattern = cairo_pattern_create_for_surface(surface);
-    wxDouble scaleX = w / bw;
-    wxDouble scaleY = h / bh;
+    wxDouble scaleX = w / size.GetWidth();
+    wxDouble scaleY = h / size.GetHeight();
     cairo_scale(m_context, scaleX, scaleY);
 
     // prepare to draw the image
     cairo_translate(m_context, x, y);
     cairo_set_source(m_context, pattern);
     // use the original size here since the context is scaled already...
-    cairo_rectangle(m_context, 0, 0, bw, bh);
+    cairo_rectangle(m_context, 0, 0, size.GetWidth(), size.GetHeight());
     // fill the rectangle using the pattern
     cairo_fill(m_context);
 
     // clean up
-    cairo_pattern_destroy(pattern);
-    cairo_surface_destroy(surface);
-    delete [] buffer;
     PopState();
 }
 
@@ -1253,7 +1294,9 @@ void wxCairoContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDou
 
 void wxCairoContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
 {
-    if ( m_font.IsNull() || str.empty())
+    wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::DrawText - no valid font set") );
+
+    if ( str.empty())
         return;
     
     ((wxCairoFontData*)m_font.GetRefData())->Apply(this);
@@ -1271,7 +1314,9 @@ void wxCairoContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
 void wxCairoContext::GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height,
                                     wxDouble *descent, wxDouble *externalLeading ) const
 {
-    if ( m_font.IsNull() || str.empty())
+    wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::GetTextExtent - no valid font set") );
+
+    if ( str.empty())
         return;
 
     ((wxCairoFontData*)m_font.GetRefData())->Apply((wxCairoContext*)this);
@@ -1303,6 +1348,8 @@ void wxCairoContext::GetPartialTextExtents(const wxString& text, wxArrayDouble&
     widths.Empty();
     widths.Add(0, text.length());
 
+    wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::GetPartialTextExtents - no valid font set") );
+
     if (text.empty())
         return;
 
@@ -1366,6 +1413,8 @@ public :
 
     // sets the font
     virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) ;
+    
+    wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) ;
 
 private :
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxCairoRenderer)
@@ -1507,4 +1556,16 @@ wxGraphicsFont wxCairoRenderer::CreateFont( const wxFont &font , const wxColour
         return wxNullGraphicsFont;
 }
 
+wxGraphicsBitmap wxGraphicsRenderer::CreateBitmap( const wxBitmap& bmp )
+{
+    if ( bmp.Ok() )
+    {
+        wxGraphicsBitmap p;
+        p.SetRefData(new wxCairoBitmapData( this , bmp ));
+        return p;
+    }
+    else
+        return wxNullGraphicsBitmap;
+}
+
 #endif  // wxUSE_GRAPHICS_CONTEXT
diff --git a/Externals/wxWidgets/src/generic/grid.cpp b/Externals/wxWidgets/src/generic/grid.cpp
index 08962d6434..7af63d3328 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 54276 2008-06-18 11:21:57Z SN $
+// RCS-ID:      $Id: grid.cpp 58753 2009-02-08 10:23:19Z VZ $
 // Copyright:   (c) Michael Bedward (mbedward@ozemail.com.au)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -96,7 +96,7 @@ struct wxGridCellWithAttr
     {
         if (attr != new_attr)
         {
-	    // "Delete" (i.e. DecRef) the old attribute.
+            // "Delete" (i.e. DecRef) the old attribute.
             attr->DecRef();
             attr = new_attr;
             // Take ownership of the new attribute, i.e. no IncRef.
@@ -943,7 +943,6 @@ void wxGridCellNumberEditor::BeginEdit(int row, int col, wxGrid* grid)
 bool wxGridCellNumberEditor::EndEdit(int row, int col,
                                      wxGrid* grid)
 {
-    bool changed;
     long value = 0;
     wxString text;
 
@@ -951,26 +950,40 @@ bool wxGridCellNumberEditor::EndEdit(int row, int col,
     if ( HasRange() )
     {
         value = Spin()->GetValue();
-        changed = value != m_valueOld;
-        if (changed)
-            text = wxString::Format(wxT("%ld"), value);
+        if ( value == m_valueOld )
+            return false;
+
+        text.Printf(wxT("%ld"), value);
     }
-    else
-#endif
+    else // using unconstrained input
+#endif // wxUSE_SPINCTRL
     {
+        const wxString textOld(grid->GetCellValue(row, col));
         text = Text()->GetValue();
-        changed = (text.empty() || text.ToLong(&value)) && (value != m_valueOld);
+        if ( text.empty() )
+        {
+            if ( textOld.empty() )
+                return false;
+        }
+        else // non-empty text now (maybe 0)
+        {
+            if ( !text.ToLong(&value) )
+                return false;
+
+            // if value == m_valueOld == 0 but old text was "" and new one is
+            // "0" something still did change
+            if ( value == m_valueOld && (value || !textOld.empty()) )
+                return false;
+        }
     }
 
-    if ( changed )
-    {
-        if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER))
-            grid->GetTable()->SetValueAsLong(row, col, value);
-        else
-            grid->GetTable()->SetValue(row, col, text);
-    }
+    wxGridTableBase * const table = grid->GetTable();
+    if ( table->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER) )
+        table->SetValueAsLong(row, col, value);
+    else
+        table->SetValue(row, col, text);
 
-    return changed;
+    return true;
 }
 
 void wxGridCellNumberEditor::Reset()
@@ -1103,7 +1116,7 @@ void wxGridCellFloatEditor::Create(wxWindow* parent,
 void wxGridCellFloatEditor::BeginEdit(int row, int col, wxGrid* grid)
 {
     // first get the value
-    wxGridTableBase *table = grid->GetTable();
+    wxGridTableBase * const table = grid->GetTable();
     if ( table->CanGetValueAs(row, col, wxGRID_VALUE_FLOAT) )
     {
         m_valueOld = table->GetValueAsDouble(row, col);
@@ -1111,35 +1124,53 @@ void wxGridCellFloatEditor::BeginEdit(int row, int col, wxGrid* grid)
     else
     {
         m_valueOld = 0.0;
-        wxString sValue = table->GetValue(row, col);
-        if (! sValue.ToDouble(&m_valueOld) && ! sValue.empty())
+
+        const wxString value = table->GetValue(row, col);
+        if ( !value.empty() )
         {
-            wxFAIL_MSG( _T("this cell doesn't have float value") );
-            return;
+            if ( !value.ToDouble(&m_valueOld) )
+            {
+                wxFAIL_MSG( _T("this cell doesn't have float value") );
+                return;
+            }
         }
     }
 
     DoBeginEdit(GetString());
 }
 
-bool wxGridCellFloatEditor::EndEdit(int row, int col,
-                                     wxGrid* grid)
+bool wxGridCellFloatEditor::EndEdit(int row, int col, wxGrid* grid)
 {
-    double value = 0.0;
-    wxString text(Text()->GetValue());
+    const wxString text(Text()->GetValue()),
+                   textOld(grid->GetCellValue(row, col));
 
-    if ( (text.empty() || text.ToDouble(&value)) &&
-            !wxIsSameDouble(value, m_valueOld) )
+    double value;
+    if ( !text.empty() )
     {
-        if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT))
-            grid->GetTable()->SetValueAsDouble(row, col, value);
-        else
-            grid->GetTable()->SetValue(row, col, text);
+        if ( !text.ToDouble(&value) )
+            return false;
+    }
+    else // new value is empty string
+    {
+        if ( textOld.empty() )
+            return false;           // nothing changed
 
-        return true;
+        value = 0.;
     }
 
-    return false;
+    // the test for empty strings ensures that we don't skip the value setting
+    // when "" is replaced by "0" or vice versa as "" numeric value is also 0.
+    if ( wxIsSameDouble(value, m_valueOld) && !text.empty() && !textOld.empty() )
+        return false;           // nothing changed
+
+    wxGridTableBase * const table = grid->GetTable();
+
+    if ( table->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT) )
+        table->SetValueAsDouble(row, col, value);
+    else
+        table->SetValue(row, col, text);
+
+    return true;
 }
 
 void wxGridCellFloatEditor::Reset()
@@ -2790,7 +2821,7 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol)
         size_t n = (size_t)i;
         if ( m_attrs[n] == attr )
             // nothing to do
-            return; 
+            return;
         if ( attr )
         {
             // change the attribute, handling reference count manually,
@@ -4284,6 +4315,14 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
 
 wxGrid::~wxGrid()
 {
+    if ( m_winCapture && m_winCapture->HasCapture() )
+        m_winCapture->ReleaseMouse();
+
+    // Ensure that the editor control is destroyed before the grid is,
+    // otherwise we crash later when the editor tries to do something with the
+    // half destroyed grid
+    HideCellEditControl();
+
     // Must do this or ~wxScrollHelper will pop the wrong event handler
     SetTargetWindow(this);
     ClearAttrCache();
@@ -5641,6 +5680,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
                     if ( markerX != m_dragLastPos )
                     {
                         wxClientDC dc( m_colLabelWin );
+                        DoPrepareDC(dc);
 
                         int cw, ch;
                         m_colLabelWin->GetClientSize( &cw, &ch );
@@ -6075,7 +6115,8 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
 
 
         }
-        else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW )
+        else if ( event.LeftIsDown() &&
+                  m_cursorMode == WXGRID_CURSOR_RESIZE_ROW )
         {
             int cw, ch, left, dummy;
             m_gridWin->GetClientSize( &cw, &ch );
@@ -6093,7 +6134,8 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
             dc.DrawLine( left, y, left+cw, y );
             m_dragLastPos = y;
         }
-        else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_COL )
+        else if ( event.LeftIsDown() &&
+                  m_cursorMode == WXGRID_CURSOR_RESIZE_COL )
         {
             int cw, ch, dummy, top;
             m_gridWin->GetClientSize( &cw, &ch );
@@ -7817,7 +7859,27 @@ void wxGrid::DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells)
     size_t count = cells.GetCount();
     for ( size_t n = 0; n < count; n++ )
     {
-        if ( cells[n] == m_currentCellCoords )
+        wxGridCellCoords cell = cells[n];
+
+        // If we are using attributes, then we may have just exposed another
+        // cell in a partially-visible merged cluster of cells. If the "anchor"
+        // (upper left) cell of this merged cluster is the cell indicated by
+        // m_currentCellCoords, then we need to refresh the cell highlight even
+        // though the "anchor" itself is not part of our update segment.
+        if ( CanHaveAttributes() )
+        {
+            int rows = 0,
+                cols = 0;
+            GetCellSize(cell.GetRow(), cell.GetCol(), &rows, &cols);
+
+            if ( rows < 0 )
+                cell.SetRow(cell.GetRow() + rows);
+
+            if ( cols < 0 )
+                cell.SetCol(cell.GetCol() + cols);
+        }
+
+        if ( cell == m_currentCellCoords )
         {
             wxGridCellAttr* attr = GetCellAttr(m_currentCellCoords);
             DrawCellHighlight(dc, attr);
@@ -8556,11 +8618,19 @@ void wxGrid::HideCellEditControl()
 
         wxGridCellAttr *attr = GetCellAttr(row, col);
         wxGridCellEditor *editor = attr->GetEditor(this, row, col);
+        const bool
+            editorHadFocus = wxWindow::FindFocus() == editor->GetControl();
         editor->Show( false );
         editor->DecRef();
         attr->DecRef();
 
-        m_gridWin->SetFocus();
+        // return the focus to the grid itself if the editor had it
+        //
+        // note that we must not do this unconditionally to avoid stealing
+        // focus from the window which just received it if we are hiding the
+        // editor precisely because we lost focus
+        if ( editorHadFocus )
+            m_gridWin->SetFocus();
 
         // refresh whole row to the right
         wxRect rect( CellToRect(row, col) );
@@ -9996,9 +10066,14 @@ void wxGrid::ClearAttrCache()
 {
     if ( m_attrCache.row != -1 )
     {
-        wxSafeDecRef(m_attrCache.attr);
+        wxGridCellAttr *oldAttr = m_attrCache.attr;
         m_attrCache.attr = NULL;
         m_attrCache.row = -1;
+        // wxSafeDecRec(...) might cause event processing that accesses
+        // the cached attribute, if one exists (e.g. by deleting the
+        // editor stored within the attribute). Therefore it is important
+        // to invalidate the cache  before calling wxSafeDecRef!
+        wxSafeDecRef(oldAttr);
     }
 }
 
@@ -10239,7 +10314,7 @@ void wxGrid::SetCellSize( int row, int col, int num_rows, int num_cols )
                       wxT("wxGrid::SetCellSize setting cell size to < 1"));
 
         // if this was already a multicell then "turn off" the other cells first
-        if ((cell_rows > 1) || (cell_rows > 1))
+        if ((cell_rows > 1) || (cell_cols > 1))
         {
             int i, j;
             for (j=row; j < row + cell_rows; j++)
@@ -10408,6 +10483,19 @@ void wxGrid::SetRowSize( int row, int height )
 {
     wxCHECK_RET( row >= 0 && row < m_numRows, _T("invalid row index") );
 
+    // if < 0 then calculate new height from label
+    if ( height < 0 )
+    {
+        long w, h;
+        wxArrayString lines;
+        wxClientDC dc(m_rowLabelWin);
+        dc.SetFont(GetLabelFont());
+        StringToLines(GetRowLabelValue( row ), lines);
+        GetTextBoxSize( dc, lines, &w, &h );
+        //check that it is not less than the minimal height
+        height = wxMax(h, GetRowMinimalAcceptableHeight());
+    }
+
     // See comment in SetColSize
     if ( height < GetRowMinimalAcceptableHeight())
         return;
@@ -10452,6 +10540,23 @@ void wxGrid::SetColSize( int col, int width )
 {
     wxCHECK_RET( col >= 0 && col < m_numCols, _T("invalid column index") );
 
+    // if < 0 then calculate new width from label
+    if ( width < 0 )
+    {
+        long w, h;
+        wxArrayString lines;
+        wxClientDC dc(m_colLabelWin);
+        dc.SetFont(GetLabelFont());
+        StringToLines(GetColLabelValue(col), lines);
+        if ( GetColLabelTextOrientation() == wxHORIZONTAL )
+            GetTextBoxSize( dc, lines, &w, &h );
+        else
+            GetTextBoxSize( dc, lines, &h, &w );
+        width = w + 6;
+        //check that it is not less than the minimal width
+        width = wxMax(width, GetColMinimalAcceptableWidth());
+    }
+
     // should we check that it's bigger than GetColMinimalWidth(col) here?
     //                                                                 (VZ)
     // No, because it is reasonable to assume the library user know's
@@ -10469,18 +10574,6 @@ void wxGrid::SetColSize( int col, int width )
         InitColWidths();
     }
 
-    // if < 0 then calculate new width from label
-    if ( width < 0 )
-    {
-        long w, h;
-        wxArrayString lines;
-        wxClientDC dc(m_colLabelWin);
-        dc.SetFont(GetLabelFont());
-        StringToLines(GetColLabelValue(col), lines);
-        GetTextBoxSize(dc, lines, &w, &h);
-        width = w + 6;
-    }
-
     int w = wxMax( 0, width );
     int diff = w - m_colWidths[col];
     m_colWidths[col] = w;
@@ -10851,9 +10944,6 @@ void wxGrid::AutoSize()
 
 void wxGrid::AutoSizeRowLabelSize( int row )
 {
-    wxArrayString lines;
-    long w, h;
-
     // Hide the edit control, so it
     // won't interfere with drag-shrinking.
     if ( IsCellEditControlShown() )
@@ -10863,20 +10953,12 @@ void wxGrid::AutoSizeRowLabelSize( int row )
     }
 
     // autosize row height depending on label text
-    StringToLines( GetRowLabelValue( row ), lines );
-    wxClientDC dc( m_rowLabelWin );
-    GetTextBoxSize( dc, lines, &w, &h );
-    if ( h < m_defaultRowHeight )
-        h = m_defaultRowHeight;
-    SetRowSize(row, h);
+    SetRowSize(row, -1);
     ForceRefresh();
 }
 
 void wxGrid::AutoSizeColLabelSize( int col )
 {
-    wxArrayString lines;
-    long w, h;
-
     // Hide the edit control, so it
     // won't interfere with drag-shrinking.
     if ( IsCellEditControlShown() )
@@ -10886,15 +10968,7 @@ void wxGrid::AutoSizeColLabelSize( int col )
     }
 
     // autosize column width depending on label text
-    StringToLines( GetColLabelValue( col ), lines );
-    wxClientDC dc( m_colLabelWin );
-    if ( GetColLabelTextOrientation() == wxHORIZONTAL )
-        GetTextBoxSize( dc, lines, &w, &h );
-    else
-        GetTextBoxSize( dc, lines, &h, &w );
-    if ( w < m_defaultColWidth )
-        w = m_defaultColWidth;
-    SetColSize(col, w);
+    SetColSize(col, -1);
     ForceRefresh();
 }
 
@@ -11141,37 +11215,36 @@ void wxGrid::ClearSelection()
 // This function returns the rectangle that encloses the given block
 // in device coords clipped to the client size of the grid window.
 //
-wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
-                                  const wxGridCellCoords &bottomRight )
+wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords& topLeft,
+                                  const wxGridCellCoords& bottomRight )
 {
-    wxRect rect( wxGridNoCellRect );
-    wxRect cellRect;
-
-    cellRect = CellToRect( topLeft );
-    if ( cellRect != wxGridNoCellRect )
+    wxRect resultRect;
+    wxRect tempCellRect = CellToRect(topLeft);
+    if ( tempCellRect != wxGridNoCellRect )
     {
-        rect = cellRect;
+        resultRect = tempCellRect;
     }
     else
     {
-        rect = wxRect(0, 0, 0, 0);
+        resultRect = wxRect(0, 0, 0, 0);
     }
 
-    cellRect = CellToRect( bottomRight );
-    if ( cellRect != wxGridNoCellRect )
+    tempCellRect = CellToRect(bottomRight);
+    if ( tempCellRect != wxGridNoCellRect )
     {
-        rect += cellRect;
+        resultRect += tempCellRect;
     }
     else
     {
+        // If both inputs were "wxGridNoCellRect," then there's nothing to do.
         return wxGridNoCellRect;
     }
 
-    int i, j;
-    int left = rect.GetLeft();
-    int top = rect.GetTop();
-    int right = rect.GetRight();
-    int bottom = rect.GetBottom();
+    // Ensure that left/right and top/bottom pairs are in order.
+    int left = resultRect.GetLeft();
+    int top = resultRect.GetTop();
+    int right = resultRect.GetRight();
+    int bottom = resultRect.GetBottom();
 
     int leftCol = topLeft.GetCol();
     int topRow = topLeft.GetRow();
@@ -11180,65 +11253,89 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft,
 
     if (left > right)
     {
-        i = left;
+        int tmp = left;
         left = right;
-        right = i;
-        i = leftCol;
+        right = tmp;
+
+        tmp = leftCol;
         leftCol = rightCol;
-        rightCol = i;
+        rightCol = tmp;
     }
 
     if (top > bottom)
     {
-        i = top;
+        int tmp = top;
         top = bottom;
-        bottom = i;
-        i = topRow;
+        bottom = tmp;
+
+        tmp = topRow;
         topRow = bottomRow;
-        bottomRow = i;
+        bottomRow = tmp;
     }
 
-    for ( j = topRow; j <= bottomRow; j++ )
-    {
-        for ( i = leftCol; i <= rightCol; i++ )
-        {
-            if ((j == topRow) || (j == bottomRow) || (i == leftCol) || (i == rightCol))
-            {
-                cellRect = CellToRect( j, i );
+    // The following loop is ONLY necessary to detect and handle merged cells.
+    int cw, ch;
+    m_gridWin->GetClientSize( &cw, &ch );
 
-                if (cellRect.x < left)
-                    left = cellRect.x;
-                if (cellRect.y < top)
-                    top = cellRect.y;
-                if (cellRect.x + cellRect.width > right)
-                    right = cellRect.x + cellRect.width;
-                if (cellRect.y + cellRect.height > bottom)
-                    bottom = cellRect.y + cellRect.height;
+    // Get the origin coordinates: notice that they will be negative if the
+    // grid is scrolled downwards/to the right.
+    int gridOriginX = 0;
+    int gridOriginY = 0;
+    CalcScrolledPosition(gridOriginX, gridOriginY, &gridOriginX, &gridOriginY);
+
+    int onScreenLeftmostCol = internalXToCol(-gridOriginX);
+    int onScreenUppermostRow = internalYToRow(-gridOriginY);
+
+    int onScreenRightmostCol = internalXToCol(-gridOriginX + cw);
+    int onScreenBottommostRow = internalYToRow(-gridOriginY + ch);
+
+    // Bound our loop so that we only examine the portion of the selected block
+    // that is shown on screen. Therefore, we compare the Top-Left block values
+    // to the Top-Left screen values, and the Bottom-Right block values to the
+    // Bottom-Right screen values, choosing appropriately.
+    const int visibleTopRow = wxMax(topRow, onScreenUppermostRow);
+    const int visibleBottomRow = wxMin(bottomRow, onScreenBottommostRow);
+    const int visibleLeftCol = wxMax(leftCol, onScreenLeftmostCol);
+    const int visibleRightCol = wxMin(rightCol, onScreenRightmostCol);
+
+    for ( int j = visibleTopRow; j <= visibleBottomRow; j++ )
+    {
+        for ( int i = visibleLeftCol; i <= visibleRightCol; i++ )
+        {
+            if ( (j == visibleTopRow) || (j == visibleBottomRow) ||
+                    (i == visibleLeftCol) || (i == visibleRightCol) )
+            {
+                tempCellRect = CellToRect( j, i );
+
+                if (tempCellRect.x < left)
+                    left = tempCellRect.x;
+                if (tempCellRect.y < top)
+                    top = tempCellRect.y;
+                if (tempCellRect.x + tempCellRect.width > right)
+                    right = tempCellRect.x + tempCellRect.width;
+                if (tempCellRect.y + tempCellRect.height > bottom)
+                    bottom = tempCellRect.y + tempCellRect.height;
             }
             else
             {
-                i = rightCol; // jump over inner cells.
+                i = visibleRightCol; // jump over inner cells.
             }
         }
     }
 
-    // convert to scrolled coords
-    //
+    // Convert to scrolled coords
     CalcScrolledPosition( left, top, &left, &top );
     CalcScrolledPosition( right, bottom, &right, &bottom );
 
-    int cw, ch;
-    m_gridWin->GetClientSize( &cw, &ch );
-
     if (right < 0 || bottom < 0 || left > cw || top > ch)
         return wxRect(0,0,0,0);
 
-    rect.SetLeft( wxMax(0, left) );
-    rect.SetTop( wxMax(0, top) );
-    rect.SetRight( wxMin(cw, right) );
-    rect.SetBottom( wxMin(ch, bottom) );
+    resultRect.SetLeft( wxMax(0, left) );
+    resultRect.SetTop( wxMax(0, top) );
+    resultRect.SetRight( wxMin(cw, right) );
+    resultRect.SetBottom( wxMin(ch, bottom) );
 
-    return rect;
+    return resultRect;
 }
 
 // ----------------------------------------------------------------------------
diff --git a/Externals/wxWidgets/src/generic/gridctrl.cpp b/Externals/wxWidgets/src/generic/gridctrl.cpp
index 24eb4ae79a..9af7ad8d65 100644
--- a/Externals/wxWidgets/src/generic/gridctrl.cpp
+++ b/Externals/wxWidgets/src/generic/gridctrl.cpp
@@ -4,7 +4,7 @@
 // Author:      Paul Gammans, Roger Gammans
 // Modified by:
 // Created:     11/04/2001
-// RCS-ID:      $Id: gridctrl.cpp 41587 2006-10-03 14:28:36Z PC $
+// RCS-ID:      $Id: gridctrl.cpp 59121 2009-02-25 00:09:23Z VZ $
 // Copyright:   (c) The Computer Surgery (paul@compsurg.co.uk)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -357,9 +357,19 @@ wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
         dc.GetTextExtent(tok, &x, &y);
         if ( curr_x + x > max_x)
         {
-            lines.Add( wxString(thisline) );
-            thisline = tok;
-            curr_x=x;
+            if ( curr_x == 0 )
+            {
+                // this means that a single token is wider than the maximal
+                // width -- still use it as is as we need to show at least the
+                // part of it which fits
+                lines.Add(tok);
+            }
+            else
+            {
+                lines.Add(thisline);
+                thisline = tok;
+                curr_x = x;
+            }
         }
         else
         {
@@ -380,7 +390,10 @@ wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid,
                                               wxDC& dc,
                                               int row, int col)
 {
-    wxCoord x,y, height , width = grid.GetColSize(col) -10;
+    wxCoord x,y, height , width = grid.GetColSize(col) -20;
+    // for width, subtract 20 because ColSize includes a magin of 10 pixels
+    // that we do not want here and because we always start with an increment
+    // by 10 in the loop below.
     int count = 250; //Limit iterations..
 
     wxRect rect(0,0,width,10);
diff --git a/Externals/wxWidgets/src/generic/imaglist.cpp b/Externals/wxWidgets/src/generic/imaglist.cpp
index 72eb445d73..1200441795 100644
--- a/Externals/wxWidgets/src/generic/imaglist.cpp
+++ b/Externals/wxWidgets/src/generic/imaglist.cpp
@@ -2,7 +2,7 @@
 // Name:        src/generic/imaglist.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $id$
+// Id:          $Id: imaglist.cpp 58031 2009-01-12 05:39:04Z PC $
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -68,6 +68,8 @@ int wxGenericImageList::Add( const wxBitmap &bitmap )
                   _T("invalid bitmap size in wxImageList: this might work ")
                   _T("on this platform but definitely won't under Windows.") );
 
+    const int index = int(m_images.GetCount());
+
     if (bitmap.IsKindOf(CLASSINFO(wxIcon)))
     {
         m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
@@ -98,7 +100,7 @@ int wxGenericImageList::Add( const wxBitmap &bitmap )
         m_height = bitmap.GetHeight();
     }
 
-    return m_images.GetCount()-1;
+    return index;
 }
 
 int wxGenericImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask )
diff --git a/Externals/wxWidgets/src/generic/listctrl.cpp b/Externals/wxWidgets/src/generic/listctrl.cpp
index 380ed1f413..7bbf3e1e1f 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 54201 2008-06-13 22:38:33Z VZ $
+// Id:          $Id: listctrl.cpp 57542 2008-12-25 13:03:24Z VZ $
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -621,6 +621,8 @@ public:
 
     void OnPaint( wxPaintEvent &event );
 
+    void OnChildFocus(wxChildFocusEvent& event);
+    
     void DrawImage( int index, wxDC *dc, int x, int y );
     void GetImageSize( int index, int &width, int &height ) const;
     int GetTextLength( const wxString &s ) const;
@@ -1904,6 +1906,19 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
         x += wCol;
     }
+
+    // Fill in what's missing to the right of the columns, otherwise we will
+    // leave an unpainted area when columns are removed (and it looks better)
+    if ( x < w )
+    {
+        wxRendererNative::Get().DrawHeaderButton
+                                (
+                                    this,
+                                    dc,
+                                    wxRect(x, HEADER_OFFSET_Y, w - x, h),
+                                    0
+                                );
+    }
 }
 
 void wxListHeaderWindow::DrawCurrent()
@@ -2255,6 +2270,7 @@ BEGIN_EVENT_TABLE(wxListMainWindow,wxScrolledWindow)
   EVT_SET_FOCUS      (wxListMainWindow::OnSetFocus)
   EVT_KILL_FOCUS     (wxListMainWindow::OnKillFocus)
   EVT_SCROLLWIN      (wxListMainWindow::OnScroll)
+  EVT_CHILD_FOCUS    (wxListMainWindow::OnChildFocus)
 END_EVENT_TABLE()
 
 void wxListMainWindow::Init()
@@ -2877,6 +2893,13 @@ void wxListMainWindow::HighlightAll( bool on )
     }
 }
 
+void wxListMainWindow::OnChildFocus(wxChildFocusEvent& WXUNUSED(event))
+{
+    // Do nothing here.  This prevents the default handler in wxScrolledWindow
+    // from needlessly scrolling the window when the edit control is
+    // dismissed.  See ticket #9563.
+}
+
 void wxListMainWindow::SendNotify( size_t line,
                                    wxEventType command,
                                    const wxPoint& point )
@@ -3415,16 +3438,9 @@ void wxListMainWindow::OnKeyDown( wxKeyEvent &event )
     wxWindow *parent = GetParent();
 
     // propagate the key event upwards
-    wxKeyEvent ke( wxEVT_KEY_DOWN );
-    ke.m_shiftDown = event.m_shiftDown;
-    ke.m_controlDown = event.m_controlDown;
-    ke.m_altDown = event.m_altDown;
-    ke.m_metaDown = event.m_metaDown;
-    ke.m_keyCode = event.m_keyCode;
-    ke.m_x = event.m_x;
-    ke.m_y = event.m_y;
-    ke.SetEventObject( parent );
-    if (parent->GetEventHandler()->ProcessEvent( ke )) return;
+    wxKeyEvent ke(event);
+    if (parent->GetEventHandler()->ProcessEvent( ke ))
+        return;
 
     event.Skip();
 }
@@ -3434,16 +3450,10 @@ void wxListMainWindow::OnKeyUp( wxKeyEvent &event )
     wxWindow *parent = GetParent();
 
     // propagate the key event upwards
-    wxKeyEvent ke( wxEVT_KEY_UP );
-    ke.m_shiftDown = event.m_shiftDown;
-    ke.m_controlDown = event.m_controlDown;
-    ke.m_altDown = event.m_altDown;
-    ke.m_metaDown = event.m_metaDown;
-    ke.m_keyCode = event.m_keyCode;
-    ke.m_x = event.m_x;
-    ke.m_y = event.m_y;
+    wxKeyEvent ke(event);
     ke.SetEventObject( parent );
-    if (parent->GetEventHandler()->ProcessEvent( ke )) return;
+    if (parent->GetEventHandler()->ProcessEvent( ke ))
+        return;
 
     event.Skip();
 }
@@ -3464,16 +3474,9 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
     }
 
     // propagate the char event upwards
-    wxKeyEvent ke( wxEVT_CHAR );
-    ke.m_shiftDown = event.m_shiftDown;
-    ke.m_controlDown = event.m_controlDown;
-    ke.m_altDown = event.m_altDown;
-    ke.m_metaDown = event.m_metaDown;
-    ke.m_keyCode = event.m_keyCode;
-    ke.m_x = event.m_x;
-    ke.m_y = event.m_y;
-    ke.SetEventObject( parent );
-    if (parent->GetEventHandler()->ProcessEvent( ke )) return;
+    wxKeyEvent ke(event);
+    if (parent->GetEventHandler()->ProcessEvent( ke ))
+        return;
 
     if (event.GetKeyCode() == WXK_TAB)
     {
@@ -4154,8 +4157,9 @@ wxRect wxListMainWindow::GetViewRect() const
     {
         for ( int i = 0; i < count; i++ )
         {
-            wxRect r;
-            GetItemRect(i, r);
+            // we need logical, not physical, coordinates here, so use
+            // GetLineRect() instead of GetItemRect()
+            wxRect r = GetLineRect(i);
 
             wxCoord x = r.GetRight(),
                     y = r.GetBottom();
@@ -4223,9 +4227,9 @@ void wxListMainWindow::RecalculatePositions(bool noRefresh)
     const size_t count = GetItemCount();
 
     int iconSpacing;
-    if ( HasFlag(wxLC_ICON) )
+    if ( HasFlag(wxLC_ICON) && m_normal_image_list )
         iconSpacing = m_normal_spacing;
-    else if ( HasFlag(wxLC_SMALL_ICON) )
+    else if ( HasFlag(wxLC_SMALL_ICON) && m_small_image_list )
         iconSpacing = m_small_spacing;
     else
         iconSpacing = 0;
@@ -5761,7 +5765,7 @@ wxGenericListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
 #else
     wxUnusedVar(variant);
     wxVisualAttributes attr;
-    attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
     attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
     attr.font  = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
     return attr;
diff --git a/Externals/wxWidgets/src/generic/numdlgg.cpp b/Externals/wxWidgets/src/generic/numdlgg.cpp
index 9a2b7dcfc2..1d16bf9c9c 100644
--- a/Externals/wxWidgets/src/generic/numdlgg.cpp
+++ b/Externals/wxWidgets/src/generic/numdlgg.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     23.07.99
-// RCS-ID:      $Id: numdlgg.cpp 41838 2006-10-09 21:08:45Z VZ $
+// RCS-ID:      $Id: numdlgg.cpp 54861 2008-07-30 21:53:26Z VZ $
 // Copyright:   (c) Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -104,10 +104,7 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
     // spin ctrl
     wxString valStr;
     valStr.Printf(wxT("%ld"), m_value);
-    m_spinctrl = new wxSpinCtrl(this, wxID_ANY, valStr, wxDefaultPosition, wxSize( 140, wxDefaultCoord ) );
-#if wxUSE_SPINCTRL
-    m_spinctrl->SetRange((int)m_min, (int)m_max);
-#endif
+    m_spinctrl = new wxSpinCtrl(this, wxID_ANY, valStr, wxDefaultPosition, wxSize( 140, wxDefaultCoord ), wxSP_ARROW_KEYS, (int)m_min, (int)m_max, (int)m_value);
     inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
     // add both
     topsizer->Add( inputsizer, 0, wxEXPAND | wxLEFT|wxRIGHT, 5 );
diff --git a/Externals/wxWidgets/src/generic/odcombo.cpp b/Externals/wxWidgets/src/generic/odcombo.cpp
index 0d0daf8da3..58d96b7d76 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 52747 2008-03-23 20:20:46Z VZ $
+// RCS-ID:      $Id: odcombo.cpp 58203 2009-01-18 20:05:07Z JMS $
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -257,14 +257,23 @@ bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar unicode
     int comboStyle = m_combo->GetWindowStyle();
 
     // this is the character equivalent of the code
-    wxChar keychar=0;
-    if ((keycode >= WXK_SPACE) && (keycode <=255) && (keycode != WXK_DELETE) && wxIsprint(keycode))
+    wxChar keychar = 0;
+    if ( keycode < WXK_START )
     {
-        keychar = (wxChar)keycode;
-    }
-    else if (unicode>0)
-    {
-        keychar = unicode;
+#if wxUSE_UNICODE
+        if ( unicode > 0 )
+        {
+            if ( wxIsprint(unicode) )
+                keychar = unicode;
+        }
+        else
+#else
+        wxUnusedVar(unicode);
+#endif
+        if ( wxIsprint(keycode) )
+        {
+            keychar = (wxChar) keycode;
+        }
     }
 
     if ( keycode == WXK_DOWN || keycode == WXK_RIGHT )
@@ -287,7 +296,7 @@ bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar unicode
         value-=10;
         StopPartialCompletion();
     }
-    else if ( comboStyle & wxCB_READONLY )
+    else if ( keychar && (comboStyle & wxCB_READONLY) )
     {
         // Try partial completion
 
diff --git a/Externals/wxWidgets/src/generic/prntdlgg.cpp b/Externals/wxWidgets/src/generic/prntdlgg.cpp
index bf733b9518..a6b0a03b07 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 50289 2007-11-28 00:24:25Z VZ $
+// RCS-ID:      $Id: prntdlgg.cpp 55256 2008-08-25 14:39:11Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -201,9 +201,9 @@ void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent))
     if (factory->HasStatusLine())
     {
         flex->Add( new wxStaticText( this, wxID_ANY, _("Status:") ),
-            0, wxALIGN_CENTER_VERTICAL|wxALL-wxTOP, 5 );
+            0, wxALIGN_CENTER_VERTICAL|(wxALL-wxTOP), 5 );
         flex->Add( new wxStaticText( this, wxID_ANY, factory->CreateStatusLine() ),
-            0, wxALIGN_CENTER_VERTICAL|wxALL-wxTOP, 5 );
+            0, wxALIGN_CENTER_VERTICAL|(wxALL-wxTOP), 5 );
     }
 
     mainsizer->Add( topsizer, 0, wxLEFT|wxTOP|wxRIGHT|wxGROW, 10 );
@@ -354,10 +354,12 @@ bool wxGenericPrintDialog::TransferDataToWindow()
              if (m_printDialogData.GetToPage() > 0)
                 m_toText->SetValue(wxString::Format(_T("%d"), m_printDialogData.GetToPage()));
              if(m_rangeRadioBox)
+             {
                 if (m_printDialogData.GetAllPages() || m_printDialogData.GetFromPage() == 0)
                    m_rangeRadioBox->SetSelection(0);
                 else
                    m_rangeRadioBox->SetSelection(1);
+             }
           }
           else
           {
diff --git a/Externals/wxWidgets/src/generic/scrlwing.cpp b/Externals/wxWidgets/src/generic/scrlwing.cpp
index 6a28931334..d40c1caf70 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 50982 2008-01-01 20:38:33Z VZ $
+// RCS-ID:      $Id: scrlwing.cpp 55010 2008-08-07 15:58:51Z JS $
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1352,21 +1352,69 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event)
     if ( win == m_targetWindow )
         return; // nothing to do
 
-    while ( win->GetParent() != m_targetWindow )
+#ifdef __WXMAC__
+    if (wxDynamicCast(win, wxScrollBar))
+        return;
+#endif
+
+    // Fixing ticket: http://trac.wxwidgets.org/ticket/9563
+    // When a child inside a wxControlContainer receives a focus, the
+    // wxControlContainer generates an artificial wxChildFocusEvent for
+    // itself, telling its parent that 'it' received the focus. The effect is
+    // that this->HandleOnChildFocus is called twice, first with the
+    // artificial wxChildFocusEvent and then with the original event.  We need
+    // to ignore the artificial event here or otherwise HandleOnChildFocus
+    // would first scroll the target window to make the entire
+    // wxControlContainer visible and immediately afterwards scroll the target
+    // window again to make the child widget visible. This leads to ugly
+    // flickering when using nested wxPanels/wxScrolledWindows.
+    //
+    // Ignore this event if 'win' is derived from wxControlContainer AND its
+    // parent is the m_targetWindow AND 'win' is not actually reciving the
+    // focus (win != FindFocus).  TODO: This affects all wxControlContainer
+    // objects, but wxControlContainer is not part of the wxWidgets RTTI and
+    // so wxDynamicCast(win, wxControlContainer) does not compile.  Find a way
+    // to determine if 'win' derives from wxControlContainer. Until then,
+    // testing if 'win' derives from wxPanel will probably get >90% of all
+    // cases.
+
+    wxWindow *actual_focus=wxWindow::FindFocus();
+    if (win != actual_focus &&
+        wxDynamicCast(win, wxPanel) != 0 &&
+        win->GetParent() == m_targetWindow)
+        // if win is a wxPanel and receives the focus, it should not be
+        // scrolled into view
+        return; 
+
+    wxSize view(m_targetWindow->GetClientSize());
+
+    // For composite controls such as wxComboCtrl we should try to fit the
+    // entire control inside the visible area of the target window, not just
+    // the focused child of the control. Otherwise we'd make only the textctrl
+    // part of a wxComboCtrl visible and the button would still be outside the
+    // scrolled area.  But do so only if the parent fits *entirely* inside the
+    // scrolled window. In other situations, such as nested wxPanel or
+    // wxScrolledWindows, the parent might be way to big to fit inside the
+    // scrolled window. If that is the case, then make only the focused window
+    // visible
+    if ( win->GetParent() != m_targetWindow)
     {
-        win = win->GetParent();
-        if ( !win )
-            return; // event is not from a child of the target window
+        wxWindow *parent=win->GetParent();
+        wxSize parent_size=parent->GetSize();
+        if (parent_size.GetWidth() <= view.GetWidth() &&
+            parent_size.GetHeight() <= view.GetHeight())
+            // make the immediate parent visible instead of the focused control
+            win=parent; 
     }
 
     // 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());
+    // 'win' position coordinates are relative to it's parent
+    // convert them so that they are relative to the m_targetWindow viewing area
+    wxRect winrect(m_targetWindow->ScreenToClient(win->GetScreenPosition()),
+                   win->GetSize());
 
     int startx, starty;
     GetViewStart(&startx, &starty);
diff --git a/Externals/wxWidgets/src/generic/splash.cpp b/Externals/wxWidgets/src/generic/splash.cpp
index d76a73ffef..9f7eef61df 100644
--- a/Externals/wxWidgets/src/generic/splash.cpp
+++ b/Externals/wxWidgets/src/generic/splash.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     28/6/2000
-// RCS-ID:      $Id: splash.cpp 42755 2006-10-30 19:41:46Z VZ $
+// RCS-ID:      $Id: splash.cpp 58746 2009-02-08 09:16:50Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -150,7 +150,8 @@ static void wxDrawSplashBitmap(wxDC& dc, const wxBitmap& bitmap, int WXUNUSED(x)
 #endif // USE_PALETTE_IN_SPLASH
 
     dcMem.SelectObjectAsSource(bitmap);
-    dc.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(), & dcMem, 0, 0);
+    dc.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(), &dcMem, 0, 0, wxCOPY,
+            true /* use mask */);
     dcMem.SelectObject(wxNullBitmap);
 
 #ifdef USE_PALETTE_IN_SPLASH
diff --git a/Externals/wxWidgets/src/generic/splitter.cpp b/Externals/wxWidgets/src/generic/splitter.cpp
index 854ba081e4..b1aaac973f 100644
--- a/Externals/wxWidgets/src/generic/splitter.cpp
+++ b/Externals/wxWidgets/src/generic/splitter.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: splitter.cpp 42816 2006-10-31 08:50:17Z RD $
+// RCS-ID:      $Id: splitter.cpp 59341 2009-03-05 15:44:24Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -84,6 +84,11 @@ bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
     style &= ~wxBORDER_MASK;
     style |= wxBORDER_NONE;
 
+#if defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS
+    // CoreGraphics can't paint sash feedback
+    style |= wxSP_LIVE_UPDATE;
+#endif
+
     if ( !wxWindow::Create(parent, id, pos, size, style, name) )
         return false;
 
@@ -91,7 +96,7 @@ bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
         m_lastSize.x = size.x;
     if (size.y >= 0)
         m_lastSize.y = size.y;
-    
+
     m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0;
 
     // FIXME: with this line the background is not erased at all under GTK1,
@@ -206,8 +211,11 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
     int x = (int)event.GetX(),
         y = (int)event.GetY();
 
-    if (GetWindowStyle() & wxSP_NOSASH)
+    if ( GetWindowStyle() & wxSP_NOSASH )
+    {
+        event.Skip();
         return;
+    }
 
     // with wxSP_LIVE_UPDATE style the splitter windows are always resized
     // following the mouse movement while it drags the sash, without it we only
@@ -389,6 +397,10 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
     {
         OnDoubleClickSash(x, y);
     }
+    else
+    {
+        event.Skip();
+    }
 }
 
 void wxSplitterWindow::OnSize(wxSizeEvent& event)
@@ -600,7 +612,7 @@ int wxSplitterWindow::AdjustSashPosition(int sashPos) const
             minSize = m_minimumPaneSize;
 
         int maxSize = GetWindowSize() - minSize - GetBorderSize() - GetSashSize();
-        if ( maxSize > 0 && sashPos > maxSize )
+        if ( maxSize > 0 && sashPos > maxSize && maxSize >= m_minimumPaneSize)
             sashPos = maxSize;
     }
 
diff --git a/Externals/wxWidgets/src/generic/statusbr.cpp b/Externals/wxWidgets/src/generic/statusbr.cpp
index 6a762b2333..c88b82b734 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 51615 2008-02-09 15:10:13Z VZ $
+// RCS-ID:      $Id: statusbr.cpp 57542 2008-12-25 13:03:24Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -194,6 +194,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
 {
     wxPaintDC dc(this);
 
+    dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
 #ifdef __WXGTK20__
     // Draw grip first
     if (HasFlag( wxST_SIZEGRIP ))
diff --git a/Externals/wxWidgets/src/generic/treebkg.cpp b/Externals/wxWidgets/src/generic/treebkg.cpp
index 0f3501594c..efbad22fe3 100644
--- a/Externals/wxWidgets/src/generic/treebkg.cpp
+++ b/Externals/wxWidgets/src/generic/treebkg.cpp
@@ -4,7 +4,7 @@
 // Author:      Evgeniy Tarassov, Vadim Zeitlin
 // Modified by:
 // Created:     2005-09-15
-// RCS-ID:      $Id: treebkg.cpp 44271 2007-01-21 00:52:05Z VZ $
+// RCS-ID:      $Id: treebkg.cpp 54645 2008-07-15 21:29:10Z JS $
 // Copyright:   (c) 2005 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -104,15 +104,18 @@ wxTreebook::Create(wxWindow *parent,
                             style, wxDefaultValidator, name) )
         return false;
 
+#ifdef __WXMSW__
+    long treeStyle = GetThemedBorderStyle();
+#else
+    long treeStyle = wxBORDER_SUNKEN;
+#endif
     m_bookctrl = new wxTreeCtrl
                  (
                     this,
                     wxID_ANY,
                     wxDefaultPosition,
                     wxDefaultSize,
-#ifndef __WXMSW__
-                    wxBORDER_SIMPLE | // On wxMSW this produces a black border which is wrong
-#endif
+                    treeStyle|
                     wxTR_DEFAULT_STYLE |
                     wxTR_HIDE_ROOT |
                     wxTR_SINGLE
diff --git a/Externals/wxWidgets/src/generic/treectlg.cpp b/Externals/wxWidgets/src/generic/treectlg.cpp
index 35e91f9313..d0dab6d0e8 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 53135 2008-04-12 02:31:04Z VZ $
+// Id:          $Id: treectlg.cpp 57542 2008-12-25 13:03:24Z VZ $
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -92,29 +92,8 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
 public:
     wxTreeTextCtrl(wxGenericTreeCtrl *owner, wxGenericTreeItem *item);
 
-    void EndEdit(bool discardChanges = false)
-    {
-        if ( discardChanges )
-        {
-            StopEditing();
-        }
-        else
-        {
-            m_aboutToFinish = true;
+    void EndEdit(bool discardChanges);
 
-            // Notify the owner about the changes
-            AcceptChanges();
-
-            // Even if vetoed, close the control (consistent with MSW)
-            Finish();
-        }
-    }
-
-    void StopEditing()
-    {
-        Finish();
-        m_owner->OnRenameCancelled(m_itemEdited);
-    }
     const wxGenericTreeItem* item() const { return m_itemEdited; }
 
 protected:
@@ -123,13 +102,12 @@ protected:
     void OnKillFocus( wxFocusEvent &event );
 
     bool AcceptChanges();
-    void Finish();
+    void Finish( bool setfocus = true );
 
 private:
     wxGenericTreeCtrl  *m_owner;
     wxGenericTreeItem  *m_itemEdited;
     wxString            m_startValue;
-    bool                m_finished;
     bool                m_aboutToFinish;
 
     DECLARE_EVENT_TABLE()
@@ -363,7 +341,6 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
               : m_itemEdited(item), m_startValue(item->GetText())
 {
     m_owner = owner;
-    m_finished = false;
     m_aboutToFinish = false;
 
     int w = m_itemEdited->GetWidth(),
@@ -407,6 +384,26 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
                  wxPoint(x - 4, y - 4), wxSize(w + 11, h + 8));
 }
 
+void wxTreeTextCtrl::EndEdit(bool discardChanges)
+{
+    m_aboutToFinish = true;
+
+    if ( discardChanges )
+    {
+        m_owner->OnRenameCancelled(m_itemEdited);
+
+        Finish();
+    }
+    else
+    {
+        // Notify the owner about the changes
+        AcceptChanges();
+
+        // Even if vetoed, close the control (consistent with MSW)
+        Finish();
+    }
+}
+
 bool wxTreeTextCtrl::AcceptChanges()
 {
     const wxString value = GetValue();
@@ -435,18 +432,14 @@ bool wxTreeTextCtrl::AcceptChanges()
     return true;
 }
 
-void wxTreeTextCtrl::Finish()
+void wxTreeTextCtrl::Finish( bool setfocus )
 {
-    if ( !m_finished  )
-    {
-        m_owner->ResetTextControl();
+    m_owner->ResetTextControl();
 
-        wxPendingDelete.Append(this);
-
-        m_finished = true;
+    wxPendingDelete.Append(this);
 
+    if (setfocus)
         m_owner->SetFocus();
-    }
 }
 
 void wxTreeTextCtrl::OnChar( wxKeyEvent &event )
@@ -454,11 +447,11 @@ void wxTreeTextCtrl::OnChar( wxKeyEvent &event )
     switch ( event.m_keyCode )
     {
         case WXK_RETURN:
-            EndEdit();
+            EndEdit( false );
             break;
 
         case WXK_ESCAPE:
-            StopEditing();
+            EndEdit( true );
             break;
 
         default:
@@ -468,7 +461,7 @@ void wxTreeTextCtrl::OnChar( wxKeyEvent &event )
 
 void wxTreeTextCtrl::OnKeyUp( wxKeyEvent &event )
 {
-    if ( !m_finished )
+    if ( !m_aboutToFinish )
     {
         // auto-grow the textctrl:
         wxSize parentSize = m_owner->GetSize();
@@ -488,18 +481,15 @@ void wxTreeTextCtrl::OnKeyUp( wxKeyEvent &event )
 
 void wxTreeTextCtrl::OnKillFocus( wxFocusEvent &event )
 {
-    if ( !m_finished && !m_aboutToFinish )
+    if ( !m_aboutToFinish )
     {
-        // We must finish regardless of success, otherwise we'll get
-        // focus problems:
-        Finish();
-
         if ( !AcceptChanges() )
             m_owner->OnRenameCancelled( m_itemEdited );
+
+        Finish( false );
     }
 
-    // We must let the native text control handle focus, too, otherwise
-    // it could have problems with the cursor (e.g., in wxGTK).
+    // We should let the native text control handle focus, too.
     event.Skip();
 }
 
@@ -820,10 +810,10 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
     style |= wxTR_NO_LINES;
     if (major < 10)
         style |= wxTR_ROW_LINES;
-        
+
     if (style == 0 || style & wxTR_DEFAULT_STYLE)
         style |= wxTR_FULL_ROW_HIGHLIGHT;
-        
+
 #endif // __WXMAC__
 #ifdef __WXGTK20__
     style |= wxTR_NO_LINES;
@@ -1519,7 +1509,7 @@ void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item)
 void wxGenericTreeCtrl::ChildrenClosing(wxGenericTreeItem* item)
 {
     if (m_textCtrl != NULL && item != m_textCtrl->item() && IsDescendantOf(item, m_textCtrl->item())) {
-        m_textCtrl->StopEditing();
+        m_textCtrl->EndEdit( true );
     }
     if (item != m_key_current && IsDescendantOf(item, m_key_current)) {
         m_key_current = NULL;
@@ -1553,7 +1543,7 @@ void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
     if (m_textCtrl != NULL && IsDescendantOf(item, m_textCtrl->item()))
     {
         // can't delete the item being edited, cancel editing it first
-        m_textCtrl->StopEditing();
+        m_textCtrl->EndEdit( true );
     }
 
     wxGenericTreeItem *parent = item->GetParent();
@@ -1607,7 +1597,7 @@ void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId)
 
     delete item;
 
-    InvalidateBestSize();        
+    InvalidateBestSize();
 }
 
 void wxGenericTreeCtrl::DeleteAllItems()
@@ -1905,7 +1895,7 @@ void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId, bool select)
     {
         wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
         wxCHECK_RET( item, wxT("SelectItem(): invalid tree item") );
-        
+
         wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
         if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
             return;
@@ -2262,7 +2252,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
 #else
             rect.x -= 1;
             rect.width += 2;
-        
+
             int flags = wxCONTROL_SELECTED;
             if (m_hasFocus)
                 flags |= wxCONTROL_FOCUSED;
@@ -2289,7 +2279,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
             {
                 rect.x -= 1;
                 rect.width += 2;
-                
+
                 int flags = wxCONTROL_SELECTED;
                 if (m_hasFocus)
                     flags |= wxCONTROL_FOCUSED;
@@ -3629,7 +3619,7 @@ wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
     return wxListBox::GetClassDefaultAttributes(variant);
 #else
     wxVisualAttributes attr;
-    attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+    attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
     attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
     attr.font  = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
     return attr;
diff --git a/Externals/wxWidgets/src/generic/vscroll.cpp b/Externals/wxWidgets/src/generic/vscroll.cpp
index 369b516e19..6fc4a91fcb 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 51579 2008-02-07 14:15:45Z JS $
+// RCS-ID:      $Id: vscroll.cpp 57359 2008-12-15 19:09:31Z BP $
 // Copyright:   (c) 2003 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -373,8 +373,8 @@ bool wxVScrolledWindow::ScrollToLine(size_t line)
 
     // finally refresh the display -- but only redraw as few lines as possible
     // to avoid flicker
-    if ( GetVisibleBegin() >= lineLastOld ||
-            GetVisibleEnd() <= lineFirstOld )
+    if ( GetChildren().empty() &&
+         (GetVisibleBegin() >= lineLastOld || GetVisibleEnd() <= lineFirstOld ) )
     {
         // the simplest case: we don't have any old lines left, just redraw
         // everything
diff --git a/Externals/wxWidgets/src/msw/aboutdlg.cpp b/Externals/wxWidgets/src/msw/aboutdlg.cpp
index 6e056ca788..da24c0bf7c 100644
--- a/Externals/wxWidgets/src/msw/aboutdlg.cpp
+++ b/Externals/wxWidgets/src/msw/aboutdlg.cpp
@@ -3,7 +3,7 @@
 // Purpose:     implementation of wxAboutBox() for wxMSW
 // Author:      Vadim Zeitlin
 // Created:     2006-10-07
-// RCS-ID:      $Id: aboutdlg.cpp 45979 2007-05-11 22:39:15Z VZ $
+// RCS-ID:      $Id: aboutdlg.cpp 58748 2009-02-08 09:46:03Z VZ $
 // Copyright:   (c) 2006 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
         msg << _T('\n');
 
         if ( info.HasCopyright() )
-            msg << info.GetCopyright() << _T('\n');
+            msg << info.GetCopyrightToDisplay() << _T('\n');
 
         // add everything remaining
         msg << info.GetDescriptionAndCredits();
diff --git a/Externals/wxWidgets/src/msw/accel.cpp b/Externals/wxWidgets/src/msw/accel.cpp
index c9d05f7dbf..048023f48e 100644
--- a/Externals/wxWidgets/src/msw/accel.cpp
+++ b/Externals/wxWidgets/src/msw/accel.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: accel.cpp 49804 2007-11-10 01:09:42Z VZ $
+// RCS-ID:      $Id: accel.cpp 56049 2008-10-03 12:13:21Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -152,13 +152,6 @@ WXHACCEL wxAcceleratorTable::GetHACCEL() const
 
 bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const
 {
-#if 0
-    // calling TranslateAccelerator() with child window doesn't do anything so
-    // it's probably a bug
-    wxASSERT_MSG( window->IsTopLevel(),
-                    _T("TranslateAccelerator() needs a top level window") );
-#endif
-
     MSG *msg = (MSG *)wxmsg;
     return Ok() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg);
 }
diff --git a/Externals/wxWidgets/src/msw/app.cpp b/Externals/wxWidgets/src/msw/app.cpp
index ae6c3cb314..a00f5185d3 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 53607 2008-05-16 15:21:40Z SN $
+// RCS-ID:      $Id: app.cpp 58750 2009-02-08 10:01:03Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -611,8 +611,16 @@ int wxApp::GetComCtl32Version()
         wxLogNull noLog;
 
 #if wxUSE_DYNLIB_CLASS
-        // do we have it?
-        wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM);
+        // we don't want to load comctl32.dll, it should be already loaded but,
+        // depending on the OS version and the presence of the manifest, it can
+        // be either v5 or v6 and instead of trying to guess it just get the
+        // handle of the already loaded version
+        wxLoadedDLL dllComCtl32(_T("comctl32.dll"));
+        if ( !dllComCtl32.IsLoaded() )
+        {
+            s_verComCtl32 = 0;
+            return 0;
+        }
 
         // if so, then we can check for the version
         if ( dllComCtl32.IsLoaded() )
@@ -668,7 +676,7 @@ int wxApp::GetComCtl32Version()
                 }
             }
         }
-#endif
+#endif // wxUSE_DYNLIB_CLASS
     }
 
     return s_verComCtl32;
diff --git a/Externals/wxWidgets/src/msw/bitmap.cpp b/Externals/wxWidgets/src/msw/bitmap.cpp
index c87e490f26..8a878f4d63 100644
--- a/Externals/wxWidgets/src/msw/bitmap.cpp
+++ b/Externals/wxWidgets/src/msw/bitmap.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: bitmap.cpp 48236 2007-08-20 23:43:32Z KO $
+// RCS-ID:      $Id: bitmap.cpp 56488 2008-10-22 17:01:02Z RR $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -263,30 +263,33 @@ wxObjectRefData *wxBitmap::CloneRefData(const wxObjectRefData *dataOrig) const
     //        course (except in !wxUSE_WXDIB), but is completely illogical
     wxBitmap *self = wx_const_cast(wxBitmap *, this);
 
+    wxBitmapRefData *selfdata;
 #if wxUSE_WXDIB
     // copy the other bitmap
     if ( data->m_hBitmap )
     {
         wxDIB dib((HBITMAP)(data->m_hBitmap));
         self->CopyFromDIB(dib);
+
+        selfdata = wx_static_cast(wxBitmapRefData *, m_refData);
+        selfdata->m_hasAlpha = data->m_hasAlpha;
     }
     else
 #endif // wxUSE_WXDIB
     {
         // copy the bitmap data
-        self->m_refData = new wxBitmapRefData(*data);
+        selfdata = new wxBitmapRefData(*data);
+        self->m_refData = selfdata;
     }
 
     // copy also the mask
     wxMask * const maskSrc = data->GetMask();
     if ( maskSrc )
     {
-        wxBitmapRefData *selfdata = wx_static_cast(wxBitmapRefData *, m_refData);
-
         selfdata->SetMask(new wxMask(*maskSrc));
     }
 
-    return m_refData;
+    return selfdata;
 }
 
 #ifdef __WIN32__
@@ -808,14 +811,17 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
     if ( !dib.IsOk() )
         return false;
 
-    if ( depth == -1 )
-        depth = dib.GetDepth(); // Get depth from image if none specified
+    const bool hasAlpha = image.HasAlpha();
 
+    if (depth == -1)
+      depth = dib.GetDepth();
+      
     // store the bitmap parameters
-    wxBitmapRefData *refData = new wxBitmapRefData;
+    wxBitmapRefData * const refData = new wxBitmapRefData;
     refData->m_width = w;
     refData->m_height = h;
-    refData->m_hasAlpha = image.HasAlpha();
+    refData->m_hasAlpha = hasAlpha;
+    refData->m_depth = depth;
 
     m_refData = refData;
 
@@ -826,20 +832,17 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
     // are we going to use DIB?
     //
     // NB: DDBs don't support alpha so if we have alpha channel we must use DIB
-    if ( image.HasAlpha() || wxShouldCreateDIB(w, h, depth, hdc) )
+    if ( hasAlpha || wxShouldCreateDIB(w, h, depth, hdc) )
     {
         // don't delete the DIB section in dib object dtor
         hbitmap = dib.Detach();
 
         refData->m_isDIB = true;
-        refData->m_depth = depth;
     }
 #ifndef ALWAYS_USE_DIB
     else // we need to convert DIB to DDB
     {
         hbitmap = dib.CreateDDB((HDC)hdc);
-
-        refData->m_depth = depth;
     }
 #endif // !ALWAYS_USE_DIB
 
diff --git a/Externals/wxWidgets/src/msw/control.cpp b/Externals/wxWidgets/src/msw/control.cpp
index b1f94f1773..45bec7daf3 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 54331 2008-06-22 15:49:12Z VZ $
+// RCS-ID:      $Id: control.cpp 54424 2008-06-29 21:46:29Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -173,7 +173,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
     // 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);
+        ::SetWindowText(GetHwnd(), label.c_str());
 #endif // !wxUSE_UNICODE
 
     // install wxWidgets window proc for this window
diff --git a/Externals/wxWidgets/src/msw/display.cpp b/Externals/wxWidgets/src/msw/display.cpp
index 8590f0e57f..393448f1b5 100644
--- a/Externals/wxWidgets/src/msw/display.cpp
+++ b/Externals/wxWidgets/src/msw/display.cpp
@@ -4,7 +4,7 @@
 // Author:      Royce Mitchell III, Vadim Zeitlin
 // Modified by: Ryan Norton (IsPrimary override)
 // Created:     06/21/02
-// RCS-ID:      $Id: display.cpp 42813 2006-10-31 08:45:16Z VZ $
+// RCS-ID:      $Id: display.cpp 56865 2008-11-20 17:46:46Z VZ $
 // Copyright:   (c) wxWidgets team
 // Copyright:   (c) 2002-2006 wxWidgets team
 // Licence:     wxWindows licence
@@ -86,6 +86,13 @@
      { 0xB3A6F3E0, 0x2B43, 0x11CF, { 0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 } };
 #endif // wxUSE_DIRECTDRAW
 
+// display functions are found in different DLLs under WinCE and normal Win32
+#ifdef __WXWINCE__
+static const wxChar displayDllName[] = _T("coredll.dll");
+#else
+static const wxChar displayDllName[] = _T("user32.dll");
+#endif
+
 // ----------------------------------------------------------------------------
 // typedefs for dynamically loaded Windows functions
 // ----------------------------------------------------------------------------
@@ -511,28 +518,28 @@ wxDisplayFactoryWin32Base::wxDisplayFactoryWin32Base()
     {
         ms_supportsMultimon = 0;
 
-        wxDynamicLibrary dllUser32(_T("user32.dll"));
-
         wxLogNull noLog;
 
+        wxDynamicLibrary dllDisplay(displayDllName, wxDL_VERBATIM);
+
         gs_MonitorFromPoint = (MonitorFromPoint_t)
-            dllUser32.GetSymbol(wxT("MonitorFromPoint"));
+            dllDisplay.GetSymbol(wxT("MonitorFromPoint"));
         if ( !gs_MonitorFromPoint )
             return;
 
         gs_MonitorFromWindow = (MonitorFromWindow_t)
-            dllUser32.GetSymbol(wxT("MonitorFromWindow"));
+            dllDisplay.GetSymbol(wxT("MonitorFromWindow"));
         if ( !gs_MonitorFromWindow )
             return;
 
         gs_GetMonitorInfo = (GetMonitorInfo_t)
-            dllUser32.GetSymbolAorW(wxT("GetMonitorInfo"));
+            dllDisplay.GetSymbolAorW(wxT("GetMonitorInfo"));
         if ( !gs_GetMonitorInfo )
             return;
 
         ms_supportsMultimon = 1;
 
-        // we can safely let dllUser32 go out of scope, the DLL itself will
+        // we can safely let dllDisplay go out of scope, the DLL itself will
         // still remain loaded as all Win32 programs use it
     }
 }
@@ -598,9 +605,9 @@ wxDisplayFactoryMultimon::wxDisplayFactoryMultimon()
     {
         wxLogNull noLog;
 
-        wxDynamicLibrary dllUser32(_T("user32.dll"));
+        wxDynamicLibrary dllDisplay(displayDllName, wxDL_VERBATIM);
         pfnEnumDisplayMonitors = (EnumDisplayMonitors_t)
-            dllUser32.GetSymbol(wxT("EnumDisplayMonitors"));
+            dllDisplay.GetSymbol(wxT("EnumDisplayMonitors"));
         if ( !pfnEnumDisplayMonitors )
             return;
     }
@@ -743,11 +750,11 @@ bool wxDisplayImplMultimon::ChangeMode(const wxVideoMode& mode)
     static ChangeDisplaySettingsEx_t pfnChangeDisplaySettingsEx = NULL;
     if ( !pfnChangeDisplaySettingsEx )
     {
-        wxDynamicLibrary dllUser32(_T("user32.dll"));
-        if ( dllUser32.IsLoaded() )
+        wxDynamicLibrary dllDisplay(displayDllName, wxDL_VERBATIM);
+        if ( dllDisplay.IsLoaded() )
         {
             pfnChangeDisplaySettingsEx = (ChangeDisplaySettingsEx_t)
-                dllUser32.GetSymbolAorW(_T("ChangeDisplaySettingsEx"));
+                dllDisplay.GetSymbolAorW(_T("ChangeDisplaySettingsEx"));
         }
         //else: huh, no user32.dll??
 
diff --git a/Externals/wxWidgets/src/msw/dlmsw.cpp b/Externals/wxWidgets/src/msw/dlmsw.cpp
index b49bf1e7e5..d9723fa6e7 100644
--- a/Externals/wxWidgets/src/msw/dlmsw.cpp
+++ b/Externals/wxWidgets/src/msw/dlmsw.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     2005-01-10 (partly extracted from common/dynlib.cpp)
-// RCS-ID:      $Id: dlmsw.cpp 44151 2007-01-07 23:35:49Z VZ $
+// RCS-ID:      $Id: dlmsw.cpp 58750 2009-02-08 10:01:03Z VZ $
 // Copyright:   (c) 1998-2005 Vadim Zeitlin 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -276,9 +276,11 @@ wxDllType wxDynamicLibrary::GetProgramHandle()
 
 /* static */
 wxDllType
-wxDynamicLibrary::RawLoad(const wxString& libname, int WXUNUSED(flags))
+wxDynamicLibrary::RawLoad(const wxString& libname, int flags)
 {
-    return ::LoadLibrary(libname);
+    return flags & wxDL_GET_LOADED
+            ? ::GetModuleHandle(libname)
+            : ::LoadLibrary(libname);
 }
 
 /* static */
diff --git a/Externals/wxWidgets/src/msw/filedlg.cpp b/Externals/wxWidgets/src/msw/filedlg.cpp
index 7e35130cc7..9598a3a2b9 100644
--- a/Externals/wxWidgets/src/msw/filedlg.cpp
+++ b/Externals/wxWidgets/src/msw/filedlg.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: filedlg.cpp 43833 2006-12-06 17:17:37Z VZ $
+// RCS-ID:      $Id: filedlg.cpp 55642 2008-09-15 13:33:35Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -438,6 +438,19 @@ int wxFileDialog::ShowModal()
     DWORD errCode;
     bool success = DoShowCommFileDialog(&of, m_windowStyle, &errCode);
 
+    if ( !success &&
+            // FNERR_INVALIDFILENAME is not defined under CE (besides we don't
+            // use CommDlgExtendedError() there anyhow)
+#ifndef __WXWINCE__
+            errCode == FNERR_INVALIDFILENAME &&
+#endif // !__WXWINCE__
+                of.lpstrFile[0] )
+    {
+        // this can happen if the default file name is invalid, try without it now
+        of.lpstrFile[0] = _T('\0');
+        success = DoShowCommFileDialog(&of, m_windowStyle, &errCode);
+    }
+
 #ifdef wxTRY_SMALLER_OPENFILENAME
     // the system might be too old to support the new version file dialog
     // boxes, try with the old size
diff --git a/Externals/wxWidgets/src/msw/frame.cpp b/Externals/wxWidgets/src/msw/frame.cpp
index ac5797c63b..4b130a2a8a 100644
--- a/Externals/wxWidgets/src/msw/frame.cpp
+++ b/Externals/wxWidgets/src/msw/frame.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id: frame.cpp 43065 2006-11-04 21:12:31Z VZ $
+// RCS-ID:      $Id: frame.cpp 59086 2009-02-22 16:07:58Z CE $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -425,19 +425,23 @@ void wxFrame::AttachMenuBar(wxMenuBar *menubar)
         SetToolBar(toolBar);
         menubar->SetToolBar(toolBar);
     }
-    // Now adjust size for menu bar
-    int menuHeight = 26;
 
-    //When the main window is created using CW_USEDEFAULT the height of the
-    // is created is not taken into account). So we resize the window after
-    // if a menubar is present
+    // When the main window is created using CW_USEDEFAULT the height of the
+    // menubar is not taken into account, so we resize it afterwards if a
+    // menubar is present
+    HWND hwndMenuBar = SHFindMenuBar(GetHwnd());
+    if ( hwndMenuBar )
     {
+        RECT mbRect;
+        ::GetWindowRect(hwndMenuBar, &mbRect);
+        const int menuHeight = mbRect.bottom - mbRect.top;
+
         RECT rc;
-        ::GetWindowRect((HWND) GetHWND(), &rc);
+        ::GetWindowRect(GetHwnd(), &rc);
         // adjust for menu / titlebar height
         rc.bottom -= (2*menuHeight-1);
 
-        ::MoveWindow((HWND) GetHWND(), rc.left, rc.top, rc.right, rc.bottom, FALSE);
+        ::MoveWindow(GetHwnd(), rc.left, rc.top, rc.right, rc.bottom, FALSE);
     }
 #endif
 
@@ -954,34 +958,20 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
             return win->MSWCommand(cmd, id);
     }
 
-    // handle here commands from menus and accelerators
-    if ( cmd == 0 || cmd == 1 )
+    // handle here commands from menus and accelerators for our menu bar items,
+    // all the rest is handled by wxWindow itself
+    if ( !control && (cmd == 0 /* menu */ || cmd == 1 /* accel */) )
     {
 #if wxUSE_MENUS_NATIVE
-        if ( wxCurrentPopupMenu )
-        {
-            wxMenu *popupMenu = wxCurrentPopupMenu;
-            wxCurrentPopupMenu = NULL;
-
-            return popupMenu->MSWCommand(cmd, id);
-        }
+        if ( !wxCurrentPopupMenu )
 #endif // wxUSE_MENUS_NATIVE
-
-#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
-        // handle here commands from Smartphone menu bar
-        if ( wxTopLevelWindow::HandleCommand(id, cmd, control ) )
         {
-            return true;
-        }
-#endif // __SMARTPHONE__ && __WXWINCE__
-
-        if ( ProcessCommand(id) )
-        {
-            return true;
+            if ( GetMenuBar() && ProcessCommand(id) )
+                return true;
         }
     }
 
-    return false;
+    return wxFrameBase::HandleCommand(id, cmd, control);
 }
 
 bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
@@ -1053,7 +1043,12 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara
                 UnpackCommand((WXWPARAM)wParam, (WXLPARAM)lParam,
                               &id, &hwnd, &cmd);
 
-                processed = HandleCommand(id, cmd, (WXHWND)hwnd);
+                HandleCommand(id, cmd, (WXHWND)hwnd);
+
+                // don't pass WM_COMMAND to the base class as it would generate
+                // another wxCommandEvent which would result in its handler
+                // being called twice if it uses event.Skip()
+                processed = true;
             }
             break;
 
diff --git a/Externals/wxWidgets/src/msw/graphics.cpp b/Externals/wxWidgets/src/msw/graphics.cpp
index 46169a2cb5..ae33bcc207 100644
--- a/Externals/wxWidgets/src/msw/graphics.cpp
+++ b/Externals/wxWidgets/src/msw/graphics.cpp
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     2006-09-30
-// RCS-ID:      $Id: graphics.cpp 49370 2007-10-23 21:31:43Z RD $
+// RCS-ID:      $Id: graphics.cpp 56880 2008-11-21 04:46:57Z KO $
 // Copyright:   (c) 2006 Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -258,6 +258,20 @@ private :
     GraphicsPath* m_brushPath;
 };
 
+class WXDLLIMPEXP_CORE wxGDIPlusBitmapData : public wxGraphicsObjectRefData
+{
+public:
+    wxGDIPlusBitmapData( wxGraphicsRenderer* renderer );
+    wxGDIPlusBitmapData( wxGraphicsRenderer* renderer, const wxBitmap &bmp );
+    ~wxGDIPlusBitmapData ();
+
+    virtual Bitmap* GetGDIPlusBitmap() { return m_bitmap; }
+
+private :
+    Bitmap* m_bitmap;
+    Bitmap* m_helper;
+};
+
 class WXDLLIMPEXP_CORE wxGDIPlusFontData : public wxGraphicsObjectRefData
 {
 public:
@@ -312,6 +326,7 @@ public:
     // gets the matrix of this context
     virtual wxGraphicsMatrix GetTransform() const;
 
+    void DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
     virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
     virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h );
     virtual void PushState();
@@ -612,6 +627,99 @@ void wxGDIPlusBrushData::CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wx
     b->SetSurroundColors(colors, &count);
 }
 
+wxGDIPlusBitmapData::wxGDIPlusBitmapData( wxGraphicsRenderer* renderer, 
+                        const wxBitmap &bmp) : wxGraphicsObjectRefData( renderer )
+{
+    m_bitmap = NULL;
+    m_helper = NULL;
+    Bitmap* image = NULL;
+    if ( bmp.GetMask() )
+    {
+        Bitmap interim((HBITMAP)bmp.GetHBITMAP(),(HPALETTE)bmp.GetPalette()->GetHPALETTE()) ;
+
+        size_t width = interim.GetWidth();
+        size_t height = interim.GetHeight();
+        Rect bounds(0,0,width,height);
+
+        image = new Bitmap(width,height,PixelFormat32bppPARGB) ;
+
+        Bitmap interimMask((HBITMAP)bmp.GetMask()->GetMaskBitmap(),NULL);
+        wxASSERT(interimMask.GetPixelFormat() == PixelFormat1bppIndexed);
+
+        BitmapData dataMask ;
+        interimMask.LockBits(&bounds,ImageLockModeRead,
+            interimMask.GetPixelFormat(),&dataMask);
+
+
+        BitmapData imageData ;
+        image->LockBits(&bounds,ImageLockModeWrite, PixelFormat32bppPARGB, &imageData);
+
+        BYTE maskPattern = 0 ;
+        BYTE maskByte = 0;
+        size_t maskIndex ;
+
+        for ( size_t y = 0 ; y < height ; ++y)
+        {
+            maskIndex = 0 ;
+            for( size_t x = 0 ; x < width; ++x)
+            {
+                if ( x % 8 == 0)
+                {
+                    maskPattern = 0x80;
+                    maskByte = *((BYTE*)dataMask.Scan0 + dataMask.Stride*y + maskIndex);
+                    maskIndex++;
+                }
+                else
+                    maskPattern = maskPattern >> 1;
+
+                ARGB *dest = (ARGB*)((BYTE*)imageData.Scan0 + imageData.Stride*y + x*4);
+                if ( (maskByte & maskPattern) == 0 )
+                    *dest = 0x00000000;
+                else
+                {
+                    Color c ;
+                    interim.GetPixel(x,y,&c) ;
+                    *dest = (c.GetValue() | Color::AlphaMask);
+                }
+            }
+        }
+
+        image->UnlockBits(&imageData);
+
+        interimMask.UnlockBits(&dataMask);
+        interim.UnlockBits(&dataMask);
+    }
+    else
+    {
+        image = Bitmap::FromHBITMAP((HBITMAP)bmp.GetHBITMAP(),(HPALETTE)bmp.GetPalette()->GetHPALETTE());
+        if ( bmp.HasAlpha() && GetPixelFormatSize(image->GetPixelFormat()) == 32 )
+        {
+            size_t width = image->GetWidth();
+            size_t height = image->GetHeight();
+            Rect bounds(0,0,width,height);
+            static BitmapData data ;
+
+            m_helper = image ;
+            image = NULL ;
+            m_helper->LockBits(&bounds, ImageLockModeRead,
+                m_helper->GetPixelFormat(),&data);
+
+            image = new Bitmap(data.Width, data.Height, data.Stride,
+                PixelFormat32bppPARGB , (BYTE*) data.Scan0);
+
+            m_helper->UnlockBits(&data);
+        }
+    }
+    if ( image )
+        m_bitmap = image;
+}
+
+wxGDIPlusBitmapData::~wxGDIPlusBitmapData()
+{
+    delete m_bitmap;
+    delete m_helper;
+}
+
 //-----------------------------------------------------------------------------
 // wxGDIPlusFont implementation
 //-----------------------------------------------------------------------------
@@ -706,7 +814,7 @@ void wxGDIPlusPathData::GetCurrentPoint( wxDouble* x, wxDouble* y) const
 void wxGDIPlusPathData::AddArc( wxDouble x, wxDouble y, wxDouble r, double startAngle, double endAngle, bool clockwise )
 {
     double sweepAngle = endAngle - startAngle ;
-    if( abs(sweepAngle) >= 2*M_PI)
+    if( fabs(sweepAngle) >= 2*M_PI)
     {
         sweepAngle = 2 * M_PI;
     }
@@ -1064,91 +1172,32 @@ void wxGDIPlusContext::PopState()
 // premultiplied format, therefore in the failing cases we create a new bitmap using the non-premultiplied
 // bytes as parameter
 
+void wxGraphicsContext::DrawGraphicsBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h )
+{
+    static_cast(this)->DrawGraphicsBitmapInternal(bmp, x, y, w, h);
+}
+
+void wxGDIPlusContext::DrawGraphicsBitmapInternal( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h )
+{
+    Bitmap* image = static_cast(bmp.GetRefData())->GetGDIPlusBitmap();
+    if ( image )
+    {
+        if( image->GetWidth() != (UINT) w || image->GetHeight() != (UINT) h )
+        {
+            Rect drawRect((REAL) x, (REAL)y, (REAL)w, (REAL)h);
+            m_context->SetPixelOffsetMode( PixelOffsetModeNone );
+            m_context->DrawImage(image, drawRect, 0 , 0 , image->GetWidth()-1, image->GetHeight()-1, UnitPixel ) ;
+            m_context->SetPixelOffsetMode( PixelOffsetModeHalf );
+        }
+        else
+            m_context->DrawImage(image,(REAL) x,(REAL) y,(REAL) w,(REAL) h) ;
+    }
+}
+
 void wxGDIPlusContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h )
 {
-    Bitmap* image = NULL;
-    Bitmap* helper = NULL;
-    if ( bmp.GetMask() )
-    {
-        Bitmap interim((HBITMAP)bmp.GetHBITMAP(),(HPALETTE)bmp.GetPalette()->GetHPALETTE()) ;
-
-        size_t width = interim.GetWidth();
-        size_t height = interim.GetHeight();
-        Rect bounds(0,0,width,height);
-
-        image = new Bitmap(width,height,PixelFormat32bppPARGB) ;
-
-        Bitmap interimMask((HBITMAP)bmp.GetMask()->GetMaskBitmap(),NULL);
-        wxASSERT(interimMask.GetPixelFormat() == PixelFormat1bppIndexed);
-
-        BitmapData dataMask ;
-        interimMask.LockBits(&bounds,ImageLockModeRead,
-            interimMask.GetPixelFormat(),&dataMask);
-
-
-        BitmapData imageData ;
-        image->LockBits(&bounds,ImageLockModeWrite, PixelFormat32bppPARGB, &imageData);
-
-        BYTE maskPattern = 0 ;
-        BYTE maskByte = 0;
-        size_t maskIndex ;
-
-        for ( size_t y = 0 ; y < height ; ++y)
-        {
-            maskIndex = 0 ;
-            for( size_t x = 0 ; x < width; ++x)
-            {
-                if ( x % 8 == 0)
-                {
-                    maskPattern = 0x80;
-                    maskByte = *((BYTE*)dataMask.Scan0 + dataMask.Stride*y + maskIndex);
-                    maskIndex++;
-                }
-                else
-                    maskPattern = maskPattern >> 1;
-
-                ARGB *dest = (ARGB*)((BYTE*)imageData.Scan0 + imageData.Stride*y + x*4);
-                if ( (maskByte & maskPattern) == 0 )
-                    *dest = 0x00000000;
-                else
-                {
-                    Color c ;
-                    interim.GetPixel(x,y,&c) ;
-                    *dest = (c.GetValue() | Color::AlphaMask);
-                }
-            }
-        }
-
-        image->UnlockBits(&imageData);
-
-        interimMask.UnlockBits(&dataMask);
-        interim.UnlockBits(&dataMask);
-    }
-    else
-    {
-        image = Bitmap::FromHBITMAP((HBITMAP)bmp.GetHBITMAP(),(HPALETTE)bmp.GetPalette()->GetHPALETTE());
-        if ( bmp.HasAlpha() && GetPixelFormatSize(image->GetPixelFormat()) == 32 )
-        {
-            size_t width = image->GetWidth();
-            size_t height = image->GetHeight();
-            Rect bounds(0,0,width,height);
-            BitmapData data ;
-
-            helper = image ;
-            image = NULL ;
-            helper->LockBits(&bounds, ImageLockModeRead,
-                helper->GetPixelFormat(),&data);
-
-            image = new Bitmap(data.Width, data.Height, data.Stride,
-                PixelFormat32bppPARGB , (BYTE*) data.Scan0);
-
-            helper->UnlockBits(&data);
-        }
-    }
-    if ( image )
-        m_context->DrawImage(image,(REAL) x,(REAL) y,(REAL) w,(REAL) h) ;
-    delete image ;
-    delete helper ;
+    wxGraphicsBitmap bitmap = GetRenderer()->CreateBitmap(bmp);
+    DrawGraphicsBitmapInternal(bitmap, x, y, w, h);
 }
 
 void wxGDIPlusContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h )
@@ -1214,7 +1263,9 @@ void wxGDIPlusContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxD
 
 void wxGDIPlusContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
 {
-    if ( m_font.IsNull() || str.IsEmpty())
+    wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::DrawText - no valid font set") );
+
+    if ( str.IsEmpty())
         return ;
 
     wxWCharBuffer s = str.wc_str( *wxConvUI );
@@ -1225,6 +1276,8 @@ void wxGDIPlusContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
 void wxGDIPlusContext::GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height,
                                      wxDouble *descent, wxDouble *externalLeading ) const
 {
+    wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::GetTextExtent - no valid font set") );
+
     wxWCharBuffer s = str.wc_str( *wxConvUI );
     FontFamily ffamily ;
     Font* f = ((wxGDIPlusFontData*)m_font.GetRefData())->GetGDIPlusFont();
@@ -1270,6 +1323,8 @@ void wxGDIPlusContext::GetPartialTextExtents(const wxString& text, wxArrayDouble
     widths.Empty();
     widths.Add(0, text.length());
 
+    wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::GetPartialTextExtents - no valid font set") );
+
     if (text.empty())
         return;
 
@@ -1396,6 +1451,8 @@ public :
 
     // sets the font
     virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) ;
+    
+    wxGraphicsBitmap CreateBitmap( const wxBitmap &bmp ) ;
 protected :
     void EnsureIsLoaded();
     void Load();
@@ -1570,4 +1627,16 @@ wxGraphicsFont wxGDIPlusRenderer::CreateFont( const wxFont &font , const wxColou
         return wxNullGraphicsFont;
 }
 
+wxGraphicsBitmap wxGraphicsRenderer::CreateBitmap( const wxBitmap& bmp )
+{
+    if ( bmp.Ok() )
+    {
+        wxGraphicsBitmap p;
+        p.SetRefData(new wxGDIPlusBitmapData( this , bmp ));
+        return p;
+    }
+    else
+        return wxNullGraphicsBitmap;
+}
+
 #endif  // wxUSE_GRAPHICS_CONTEXT
diff --git a/Externals/wxWidgets/src/msw/helpchm.cpp b/Externals/wxWidgets/src/msw/helpchm.cpp
index 26c7759f39..c33dff8176 100644
--- a/Externals/wxWidgets/src/msw/helpchm.cpp
+++ b/Externals/wxWidgets/src/msw/helpchm.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     16/04/2000
-// RCS-ID:      $Id: helpchm.cpp 39725 2006-06-14 17:46:51Z VZ $
+// RCS-ID:      $Id: helpchm.cpp 58145 2009-01-16 16:18:01Z JS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -165,8 +165,8 @@ bool wxCHMHelpController::DisplayContextPopup(int contextId)
     popup.idString = contextId ;
 
     GetCursorPos(& popup.pt);
-    popup.clrForeground = (COLORREF)-1;
-    popup.clrBackground = (COLORREF)-1;
+    popup.clrForeground = ::GetSysColor(COLOR_INFOTEXT);
+    popup.clrBackground = ::GetSysColor(COLOR_INFOBK);;
     popup.rcMargins.top = popup.rcMargins.left = popup.rcMargins.right = popup.rcMargins.bottom = -1;
     popup.pszFont = NULL;
     popup.pszText = NULL;
diff --git a/Externals/wxWidgets/src/msw/listbox.cpp b/Externals/wxWidgets/src/msw/listbox.cpp
index 24a47590c3..d1236182f7 100644
--- a/Externals/wxWidgets/src/msw/listbox.cpp
+++ b/Externals/wxWidgets/src/msw/listbox.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin (owner drawn stuff)
 // Created:
-// RCS-ID:      $Id: listbox.cpp 45959 2007-05-11 13:05:02Z VZ $
+// RCS-ID:      $Id: listbox.cpp 58754 2009-02-08 10:29:09Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -544,12 +544,12 @@ wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 
 int wxListBox::DoListHitTest(const wxPoint& point) const
 {
-    LRESULT lRes =  ::SendMessage(GetHwnd(), LB_ITEMFROMPOINT,
-                                  0L, MAKELONG(point.x, point.y));
+    LRESULT lRes = ::SendMessage(GetHwnd(), LB_ITEMFROMPOINT,
+                                 0, MAKELPARAM(point.x, point.y));
 
     // non zero high-order word means that this item is outside of the client
     // area, IOW the point is outside of the listbox
-    return HIWORD(lRes) ? wxNOT_FOUND : lRes;
+    return HIWORD(lRes) ? wxNOT_FOUND : LOWORD(lRes);
 }
 
 void wxListBox::SetString(unsigned int n, const wxString& s)
@@ -702,13 +702,18 @@ wxSize wxListBox::DoGetBestSize() const
 bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
 {
     wxEventType evtType;
+    int n;
     if ( param == LBN_SELCHANGE )
     {
         evtType = wxEVT_COMMAND_LISTBOX_SELECTED;
+        n = SendMessage(GetHwnd(), LB_GETCARETINDEX, 0, 0);
+
+        // NB: conveniently enough, LB_ERR is the same as wxNOT_FOUND
     }
     else if ( param == LBN_DBLCLK )
     {
         evtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED;
+        n = HitTest(ScreenToClient(wxGetMousePosition()));
     }
     else
     {
@@ -716,23 +721,21 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
         return false;
     }
 
-    wxCommandEvent event(evtType, m_windowId);
-    event.SetEventObject( this );
-
     // retrieve the affected item
-    int n = SendMessage(GetHwnd(), LB_GETCARETINDEX, 0, 0);
-    if ( n != LB_ERR )
-    {
-        if ( HasClientObjectData() )
-            event.SetClientObject( GetClientObject(n) );
-        else if ( HasClientUntypedData() )
-            event.SetClientData( GetClientData(n) );
+    if ( n == wxNOT_FOUND )
+        return false;
 
-        event.SetString(GetString(n));
-        event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true );
-    }
+    wxCommandEvent event(evtType, m_windowId);
+    event.SetEventObject(this);
 
+    if ( HasClientObjectData() )
+        event.SetClientObject( GetClientObject(n) );
+    else if ( HasClientUntypedData() )
+        event.SetClientData( GetClientData(n) );
+
+    event.SetString(GetString(n));
     event.SetInt(n);
+    event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true );
 
     return GetEventHandler()->ProcessEvent(event);
 }
diff --git a/Externals/wxWidgets/src/msw/listctrl.cpp b/Externals/wxWidgets/src/msw/listctrl.cpp
index 6f1d00ce61..2668de2b7b 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 53727 2008-05-23 18:56:24Z VZ $
+// RCS-ID:      $Id: listctrl.cpp 57021 2008-11-29 13:43:32Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -475,10 +475,8 @@ void wxListCtrl::FreeAllInternalData()
     }
 }
 
-wxListCtrl::~wxListCtrl()
+void wxListCtrl::DeleteEditControl()
 {
-    FreeAllInternalData();
-
     if ( m_textCtrl )
     {
         m_textCtrl->UnsubclassWin();
@@ -486,6 +484,13 @@ wxListCtrl::~wxListCtrl()
         delete m_textCtrl;
         m_textCtrl = NULL;
     }
+}
+
+wxListCtrl::~wxListCtrl()
+{
+    FreeAllInternalData();
+
+    DeleteEditControl();
 
     if (m_ownsImageListNormal)
         delete m_imageListNormal;
@@ -686,6 +691,25 @@ int wxListCtrl::GetCountPerPage() const
 // Gets the edit control for editing labels.
 wxTextCtrl* wxListCtrl::GetEditControl() const
 {
+    // first check corresponds to the case when the label editing was started
+    // by user and hence m_textCtrl wasn't created by EditLabel() at all, while
+    // the second case corresponds to us being called from inside EditLabel()
+    // (e.g. from a user wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT handler): in this
+    // case EditLabel() did create the control but it didn't have an HWND to
+    // initialize it with yet
+    if ( !m_textCtrl || !m_textCtrl->GetHWND() )
+    {
+        HWND hwndEdit = ListView_GetEditControl(GetHwnd());
+        if ( hwndEdit )
+        {
+            wxListCtrl * const self = wx_const_cast(wxListCtrl *, this);
+
+            if ( !m_textCtrl )
+                self->m_textCtrl = new wxTextCtrl;
+            self->InitEditControl((WXHWND)hwndEdit);
+        }
+    }
+
     return m_textCtrl;
 }
 
@@ -1369,29 +1393,8 @@ void wxListCtrl::ClearAll()
         DeleteAllColumns();
 }
 
-wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
+void wxListCtrl::InitEditControl(WXHWND hWnd)
 {
-    wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) );
-
-    // ListView_EditLabel requires that the list has focus.
-    SetFocus();
-
-    WXHWND hWnd = (WXHWND) ListView_EditLabel(GetHwnd(), item);
-    if ( !hWnd )
-    {
-        // failed to start editing
-        return NULL;
-    }
-
-    // [re]create the text control wrapping the HWND we got
-    if ( m_textCtrl )
-    {
-        m_textCtrl->UnsubclassWin();
-        m_textCtrl->SetHWND(0);
-        delete m_textCtrl;
-    }
-
-    m_textCtrl = (wxTextCtrl *)textControlClass->CreateObject();
     m_textCtrl->SetHWND(hWnd);
     m_textCtrl->SubclassWin(hWnd);
     m_textCtrl->SetParent(this);
@@ -1401,6 +1404,38 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
     // this line and then pressing TAB while editing an item in  listctrl
     // inside a panel)
     m_textCtrl->SetWindowStyle(m_textCtrl->GetWindowStyle() | wxTE_PROCESS_TAB);
+}
+
+wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
+{
+    wxCHECK_MSG( textControlClass->IsKindOf(CLASSINFO(wxTextCtrl)), NULL,
+                  wxT("control used for label editing must be a wxTextCtrl") );
+
+    // ListView_EditLabel requires that the list has focus.
+    SetFocus();
+
+    // create m_textCtrl here before calling ListView_EditLabel() because it
+    // generates wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT event from inside it and
+    // the user handler for it can call GetEditControl() resulting in an on
+    // demand creation of a stock wxTextCtrl instead of the control of a
+    // (possibly) custom wxClassInfo
+    DeleteEditControl();
+    m_textCtrl = (wxTextCtrl *)textControlClass->CreateObject();
+
+    WXHWND hWnd = (WXHWND) ListView_EditLabel(GetHwnd(), item);
+    if ( !hWnd )
+    {
+        // failed to start editing
+        delete m_textCtrl;
+        m_textCtrl = NULL;
+
+        return NULL;
+    }
+
+    // if GetEditControl() hasn't been called, we need to initialize the edit
+    // control ourselves
+    if ( !m_textCtrl->GetHWND() )
+        InitEditControl(hWnd);
 
     return m_textCtrl;
 }
@@ -1756,7 +1791,7 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
             // We need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
             // but only if none of the modifiers is down.  We'll let normal
             // accelerators handle those.
-            if ( !wxIsCtrlDown() && !wxIsCtrlDown() &&
+            if ( !wxIsCtrlDown() && !wxIsShiftDown() &&
                  !((HIWORD(msg->lParam) & KF_ALTDOWN) == KF_ALTDOWN))
             return false;
         }
@@ -1765,11 +1800,6 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
     return wxControl::MSWShouldPreProcessMessage(msg);
 }
 
-bool wxListCtrl::MSWDrawSubItem(wxPaintDC& WXUNUSED(rPainDC), int WXUNUSED(item), int WXUNUSED(subitem))
-{
-	return false;
-}
-
 bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id)
 {
     if (cmd == EN_UPDATE)
@@ -2145,11 +2175,12 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                                              wxLIST_STATE_SELECTED);
 
                     //  or  activate the selected item if any (but
-                    // not with Shift and/or Ctrl as then they have a predefined
-                    // meaning for the list view)
+                    // not with modified keys pressed as they have a predefined
+                    // meaning for the list view then)
                     if ( lItem != -1 &&
                          (wVKey == VK_RETURN || wVKey == VK_SPACE) &&
-                         !(wxIsShiftDown() || wxIsCtrlDown()) )
+                         !(wxIsShiftDown() || wxIsCtrlDown() ||
+                             (GetKeyState(VK_MENU) < 0)) )
                     {
                         eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED;
                     }
@@ -2342,7 +2373,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                     if ( lvi.mask & LVIF_TEXT )
                     {
                         wxString text = OnGetItemText(item, lvi.iSubItem);
-                        wxStrncpy(lvi.pszText, text, lvi.cchTextMax);
+                        wxStrncpy(lvi.pszText, text, lvi.cchTextMax - 1);
+                        lvi.pszText[lvi.cchTextMax - 1] = _T('\0');
                     }
 
                     // see comment at the end of wxListCtrl::GetColumn()
@@ -2436,6 +2468,12 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 // see comment at the end of wxListCtrl::GetColumn()
 #ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
 
+#if defined(__VISUALC__) && __VISUALC__ >= 1400 && __VISUALC__ < 1500
+// Turn off optimizations for this function to avoid an ICE in the MSVC8
+// 64-bit compiler, observed with the compiler included with the PDSK-2003.
+// If there is a better way to test for this please do.
+#pragma optimize( "", off )
+#endif
 static RECT GetCustomDrawnItemRect(const NMCUSTOMDRAW& nmcd)
 {
     RECT rc;
@@ -2451,6 +2489,12 @@ static RECT GetCustomDrawnItemRect(const NMCUSTOMDRAW& nmcd)
     return rc;
 }
 
+#if defined(__VISUALC__) && __VISUALC__ >= 1400 && __VISUALC__ < 1500
+// Reset optimizations to their former setting
+#pragma optimize( "", on )
+#endif
+
+
 static
 bool HandleSubItemPrepaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont, int colCount)
 {
@@ -2686,53 +2730,34 @@ 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));
+    }
 
-	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);
-
-			if (result)
-				return CDRF_SKIPDEFAULT;
-
-			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/makebase.b32 b/Externals/wxWidgets/src/msw/makebase.b32
index 4190d63a83..9cb1bea264 100644
--- a/Externals/wxWidgets/src/msw/makebase.b32
+++ b/Externals/wxWidgets/src/msw/makebase.b32
@@ -1,456 +1,456 @@
-
-
-
-
-# This file was automatically generated by tmake
-# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
-
-#
-# File:     makebase.b32
-# Author:   Julian Smart
-# Created:  1998
-# Updated:  Michael Fielding, 2002
-# Copyright:
-#
-# "%W% %G%"
-#
-# Makefile : Builds wxWindows library wxbase.lib for MS Windows,
-# and Borland C++ (32-bit).
-
-# BCCDIR now defined in ../makeb32.env
-
-!if "$(WXWIN)" == ""
-!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
-!endif
-
-WXDIR = $(WXWIN)
-THISDIR = $(WXDIR)\src\msw
-
-# Set all these to 1 if you want to build a dynamic library
-!if "$(DLL)" == "1"
-WXMAKINGDLL=1
-WXBUILDDLL=1
-!endif
-
-wxUSE_GUI=0
-
-!include $(WXDIR)\src\makeb32.env
-
-PERIPH_LIBS=
-PERIPH_TARGET=zlib regex $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_zlib clean_regex $(PERIPH_CLEAN_TARGET)
-
-!if "$(DLL)" == "0"
-DUMMY=dummy
-!else
-DUMMY=dummydll
-LIBS= cw32mti import32 ole2w32 odbc32 zlib regex
-!endif
-
-LIBTARGET=$(WXLIB)
-
-GENDIR=..\generic
-COMMDIR=..\common
-HTMLDIR=..\html
-OLEDIR=.\ole
-MSWDIR=.
-
-DOCDIR = $(WXDIR)\docs
-
-COMMONOBJS = \
-    $(OBJ_PATH)\appbase.obj \
-		$(OBJ_PATH)\clntdata.obj \
-		$(OBJ_PATH)\cmdline.obj \
-		$(OBJ_PATH)\config.obj \
-		$(OBJ_PATH)\datetime.obj \
-		$(OBJ_PATH)\datstrm.obj \
-		$(OBJ_PATH)\db.obj \
-		$(OBJ_PATH)\dbtable.obj \
-		$(OBJ_PATH)\dircmn.obj \
-		$(OBJ_PATH)\dynarray.obj \
-		$(OBJ_PATH)\dynlib.obj \
-		$(OBJ_PATH)\dynload.obj \
-		$(OBJ_PATH)\encconv.obj \
-		$(OBJ_PATH)\event.obj \
-		$(OBJ_PATH)\extended.obj \
-		$(OBJ_PATH)\ffile.obj \
-		$(OBJ_PATH)\file.obj \
-		$(OBJ_PATH)\fileconf.obj \
-		$(OBJ_PATH)\filefn.obj \
-		$(OBJ_PATH)\filename.obj \
-		$(OBJ_PATH)\filesys.obj \
-		$(OBJ_PATH)\fmapbase.obj \
-		$(OBJ_PATH)\fs_inet.obj \
-		$(OBJ_PATH)\fs_mem.obj \
-		$(OBJ_PATH)\fs_zip.obj \
-		$(OBJ_PATH)\ftp.obj \
-		$(OBJ_PATH)\hash.obj \
-		$(OBJ_PATH)\hashmap.obj \
-		$(OBJ_PATH)\http.obj \
-		$(OBJ_PATH)\intl.obj \
-		$(OBJ_PATH)\ipcbase.obj \
-		$(OBJ_PATH)\list.obj \
-		$(OBJ_PATH)\log.obj \
-		$(OBJ_PATH)\longlong.obj \
-		$(OBJ_PATH)\memory.obj \
-		$(OBJ_PATH)\mimecmn.obj \
-		$(OBJ_PATH)\module.obj \
-		$(OBJ_PATH)\msgout.obj \
-		$(OBJ_PATH)\mstream.obj \
-		$(OBJ_PATH)\object.obj \
-		$(OBJ_PATH)\process.obj \
-		$(OBJ_PATH)\protocol.obj \
-		$(OBJ_PATH)\regex.obj \
-		$(OBJ_PATH)\sckaddr.obj \
-		$(OBJ_PATH)\sckfile.obj \
-		$(OBJ_PATH)\sckipc.obj \
-		$(OBJ_PATH)\sckstrm.obj \
-		$(OBJ_PATH)\socket.obj \
-		$(OBJ_PATH)\stopwatch.obj \
-		$(OBJ_PATH)\strconv.obj \
-		$(OBJ_PATH)\stream.obj \
-		$(OBJ_PATH)\string.obj \
-		$(OBJ_PATH)\sysopt.obj \
-		$(OBJ_PATH)\textbuf.obj \
-		$(OBJ_PATH)\textfile.obj \
-		$(OBJ_PATH)\tokenzr.obj \
-		$(OBJ_PATH)\txtstrm.obj \
-		$(OBJ_PATH)\unzip.obj \
-		$(OBJ_PATH)\url.obj \
-		$(OBJ_PATH)\utilscmn.obj \
-		$(OBJ_PATH)\variant.obj \
-		$(OBJ_PATH)\wfstream.obj \
-		$(OBJ_PATH)\wxchar.obj \
-		$(OBJ_PATH)\zipstrm.obj \
-		$(OBJ_PATH)\zstream.obj \
-		$(OBJ_PATH)\init.obj
-
-MSWOBJS = $(OBJ_PATH)\basemsw.obj \
-		$(OBJ_PATH)\dde.obj \
-		$(OBJ_PATH)\dir.obj \
-		$(OBJ_PATH)\gsocket.obj \
-		$(OBJ_PATH)\gsockmsw.obj \
-		$(OBJ_PATH)\main.obj \
-		$(OBJ_PATH)\mimetype.obj \
-		$(OBJ_PATH)\mslu.obj \
-		$(OBJ_PATH)\regconf.obj \
-		$(OBJ_PATH)\registry.obj \
-		$(OBJ_PATH)\snglinst.obj \
-		$(OBJ_PATH)\thread.obj \
-		$(OBJ_PATH)\utils.obj \
-		$(OBJ_PATH)\utilsexc.obj \
-		$(OBJ_PATH)\volume.obj
-
-OBJECTS = $(COMMONOBJS) $(MSWOBJS)
-
-default:    wx
-
-wx:    $(ARCHINCDIR)\wx makesetuph makearchsetuph makeoutdir $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
-
-all:    wx
-
-makeoutdir:
-    -mkdir $(OBJ_PATH)
-
-# Copy the in-CVS setup0.h to setup.h if necessary
-makesetuph:
-     cd $(WXDIR)\include\wx\msw
-     if not exist setup.h copy setup0.h setup.h
-     cd $(WXDIR)\src\msw
-
-# Copy include\wx\msw\setup.h to the architecture-specific location
-makearchsetuph:
-     copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
-     cd $(WXDIR)\src\msw
-
-$(ARCHINCDIR)\wx:
-    -mkdir $(ARCHINCDIR)
-    -mkdir $(ARCHINCDIR)\wx
-    -erase $(CFG)
-
-!if "$(DLL)" == "0"
-
-$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
-    -erase $(WXLIB)
-    tlib "$(WXLIB)" /P1024 @&&!
-+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
-!
-
-!else
-
-$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
-    -erase $(WXLIB)
-    -erase $(WXDLL)
-        $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
-c0d32.obj $(OBJECTS)
-$(WXLIBDIR)\$(WXLIBNAME)
-nul
-$(PERIPH_LIBS) $(LIBS)
-wxb32
-!
-        implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll
-!endif
-
-dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
-dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
-
-version.res:
-    brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
-
-$(OBJ_PATH)\basemsw.obj: $(MSWDIR)\basemsw.$(SRCSUFF)
-
-$(OBJ_PATH)\dde.obj: $(MSWDIR)\dde.$(SRCSUFF)
-
-$(OBJ_PATH)\dir.obj: $(MSWDIR)\dir.$(SRCSUFF)
-
-$(OBJ_PATH)\gsocket.obj: $(MSWDIR)\gsocket.c
-
-$(OBJ_PATH)\gsockmsw.obj: $(MSWDIR)\gsockmsw.c
-
-$(OBJ_PATH)\main.obj: $(MSWDIR)\main.$(SRCSUFF)
-
-$(OBJ_PATH)\mimetype.obj: $(MSWDIR)\mimetype.$(SRCSUFF)
-
-$(OBJ_PATH)\mslu.obj: $(MSWDIR)\mslu.$(SRCSUFF)
-
-$(OBJ_PATH)\regconf.obj: $(MSWDIR)\regconf.$(SRCSUFF)
-
-$(OBJ_PATH)\registry.obj: $(MSWDIR)\registry.$(SRCSUFF)
-
-$(OBJ_PATH)\snglinst.obj: $(MSWDIR)\snglinst.$(SRCSUFF)
-
-$(OBJ_PATH)\thread.obj: $(MSWDIR)\thread.$(SRCSUFF)
-
-$(OBJ_PATH)\utils.obj: $(MSWDIR)\utils.$(SRCSUFF)
-
-$(OBJ_PATH)\utilsexc.obj: $(MSWDIR)\utilsexc.$(SRCSUFF)
-
-$(OBJ_PATH)\volume.obj: $(MSWDIR)\volume.$(SRCSUFF)
-
-
-
-########################################################
-# Common objects (always compiled)
-
-$(OBJ_PATH)\appbase.obj: $(COMMDIR)\appbase.$(SRCSUFF)
-
-$(OBJ_PATH)\clntdata.obj: $(COMMDIR)\clntdata.$(SRCSUFF)
-
-$(OBJ_PATH)\cmdline.obj: $(COMMDIR)\cmdline.$(SRCSUFF)
-
-$(OBJ_PATH)\config.obj: $(COMMDIR)\config.$(SRCSUFF)
-
-$(OBJ_PATH)\datetime.obj: $(COMMDIR)\datetime.$(SRCSUFF)
-
-$(OBJ_PATH)\datstrm.obj: $(COMMDIR)\datstrm.$(SRCSUFF)
-
-$(OBJ_PATH)\db.obj: $(COMMDIR)\db.$(SRCSUFF)
-
-$(OBJ_PATH)\dbtable.obj: $(COMMDIR)\dbtable.$(SRCSUFF)
-
-$(OBJ_PATH)\dircmn.obj: $(COMMDIR)\dircmn.$(SRCSUFF)
-
-$(OBJ_PATH)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
-
-$(OBJ_PATH)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
-
-$(OBJ_PATH)\dynload.obj: $(COMMDIR)\dynload.$(SRCSUFF)
-
-$(OBJ_PATH)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF)
-
-$(OBJ_PATH)\event.obj: $(COMMDIR)\event.$(SRCSUFF)
-
-$(OBJ_PATH)\extended.obj: $(COMMDIR)\extended.c
-
-$(OBJ_PATH)\ffile.obj: $(COMMDIR)\ffile.$(SRCSUFF)
-
-$(OBJ_PATH)\file.obj: $(COMMDIR)\file.$(SRCSUFF)
-
-$(OBJ_PATH)\fileconf.obj: $(COMMDIR)\fileconf.$(SRCSUFF)
-
-$(OBJ_PATH)\filefn.obj: $(COMMDIR)\filefn.$(SRCSUFF)
-
-$(OBJ_PATH)\filename.obj: $(COMMDIR)\filename.$(SRCSUFF)
-
-$(OBJ_PATH)\filesys.obj: $(COMMDIR)\filesys.$(SRCSUFF)
-
-$(OBJ_PATH)\fmapbase.obj: $(COMMDIR)\fmapbase.$(SRCSUFF)
-
-$(OBJ_PATH)\fs_inet.obj: $(COMMDIR)\fs_inet.$(SRCSUFF)
-
-$(OBJ_PATH)\fs_mem.obj: $(COMMDIR)\fs_mem.$(SRCSUFF)
-
-$(OBJ_PATH)\fs_zip.obj: $(COMMDIR)\fs_zip.$(SRCSUFF)
-
-$(OBJ_PATH)\ftp.obj: $(COMMDIR)\ftp.$(SRCSUFF)
-
-$(OBJ_PATH)\hash.obj: $(COMMDIR)\hash.$(SRCSUFF)
-
-$(OBJ_PATH)\hashmap.obj: $(COMMDIR)\hashmap.$(SRCSUFF)
-
-$(OBJ_PATH)\http.obj: $(COMMDIR)\http.$(SRCSUFF)
-
-$(OBJ_PATH)\intl.obj: $(COMMDIR)\intl.$(SRCSUFF)
-
-$(OBJ_PATH)\ipcbase.obj: $(COMMDIR)\ipcbase.$(SRCSUFF)
-
-$(OBJ_PATH)\list.obj: $(COMMDIR)\list.$(SRCSUFF)
-
-$(OBJ_PATH)\log.obj: $(COMMDIR)\log.$(SRCSUFF)
-
-$(OBJ_PATH)\longlong.obj: $(COMMDIR)\longlong.$(SRCSUFF)
-
-$(OBJ_PATH)\memory.obj: $(COMMDIR)\memory.$(SRCSUFF)
-
-$(OBJ_PATH)\mimecmn.obj: $(COMMDIR)\mimecmn.$(SRCSUFF)
-
-$(OBJ_PATH)\module.obj: $(COMMDIR)\module.$(SRCSUFF)
-
-$(OBJ_PATH)\msgout.obj: $(COMMDIR)\msgout.$(SRCSUFF)
-
-$(OBJ_PATH)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
-
-$(OBJ_PATH)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
-
-$(OBJ_PATH)\process.obj: $(COMMDIR)\process.$(SRCSUFF)
-
-$(OBJ_PATH)\protocol.obj: $(COMMDIR)\protocol.$(SRCSUFF)
-
-$(OBJ_PATH)\regex.obj: $(COMMDIR)\regex.$(SRCSUFF)
-
-$(OBJ_PATH)\sckaddr.obj: $(COMMDIR)\sckaddr.$(SRCSUFF)
-
-$(OBJ_PATH)\sckfile.obj: $(COMMDIR)\sckfile.$(SRCSUFF)
-
-$(OBJ_PATH)\sckipc.obj: $(COMMDIR)\sckipc.$(SRCSUFF)
-
-$(OBJ_PATH)\sckstrm.obj: $(COMMDIR)\sckstrm.$(SRCSUFF)
-
-$(OBJ_PATH)\socket.obj: $(COMMDIR)\socket.$(SRCSUFF)
-
-$(OBJ_PATH)\stopwatch.obj: $(COMMDIR)\stopwatch.$(SRCSUFF)
-
-$(OBJ_PATH)\strconv.obj: $(COMMDIR)\strconv.$(SRCSUFF)
-
-$(OBJ_PATH)\stream.obj: $(COMMDIR)\stream.$(SRCSUFF)
-
-$(OBJ_PATH)\string.obj: $(COMMDIR)\string.$(SRCSUFF)
-
-$(OBJ_PATH)\sysopt.obj: $(COMMDIR)\sysopt.$(SRCSUFF)
-
-$(OBJ_PATH)\textbuf.obj: $(COMMDIR)\textbuf.$(SRCSUFF)
-
-$(OBJ_PATH)\textfile.obj: $(COMMDIR)\textfile.$(SRCSUFF)
-
-$(OBJ_PATH)\tokenzr.obj: $(COMMDIR)\tokenzr.$(SRCSUFF)
-
-$(OBJ_PATH)\txtstrm.obj: $(COMMDIR)\txtstrm.$(SRCSUFF)
-
-$(OBJ_PATH)\unzip.obj: $(COMMDIR)\unzip.c
-
-$(OBJ_PATH)\url.obj: $(COMMDIR)\url.$(SRCSUFF)
-
-$(OBJ_PATH)\utilscmn.obj: $(COMMDIR)\utilscmn.$(SRCSUFF)
-
-$(OBJ_PATH)\variant.obj: $(COMMDIR)\variant.$(SRCSUFF)
-
-$(OBJ_PATH)\wfstream.obj: $(COMMDIR)\wfstream.$(SRCSUFF)
-
-$(OBJ_PATH)\wxchar.obj: $(COMMDIR)\wxchar.$(SRCSUFF)
-
-$(OBJ_PATH)\zipstrm.obj: $(COMMDIR)\zipstrm.$(SRCSUFF)
-
-$(OBJ_PATH)\zstream.obj: $(COMMDIR)\zstream.$(SRCSUFF)
-
-$(OBJ_PATH)\init.obj: $(COMMDIR)\init.$(SRCSUFF)
-
-
-
-
-all_utils:
-    cd $(WXDIR)\utils
-    ${MAKE} -f makefile.b32
-    cd $(WXDIR)\src\msw
-
-all_samples:
-    cd $(WXDIR)\samples
-    ${MAKE} -f makefile.b32
-    cd $(WXDIR)\src\msw
-
-all_execs:
-    cd $(WXDIR)\utils
-    ${MAKE} -f makefile.b32 all_execs
-    cd $(WXDIR)\src\msw
-
-
-
-zlib:   $(CFG)
-        cd $(WXDIR)\src\zlib
-        ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
-        cd $(WXDIR)\src\msw
-
-clean_zlib:
-        cd $(WXDIR)\src\zlib
-        ${MAKE} -f makefile.b32 clean
-        cd $(WXDIR)\src\msw
-
-
-regex:   $(CFG)
-        cd $(WXDIR)\src\regex
-        ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
-        cd $(WXDIR)\src\msw
-
-clean_regex:
-        cd $(WXDIR)\src\regex
-        ${MAKE} -f makefile.b32 clean
-        cd $(WXDIR)\src\msw
-
-
-
-$(CFG): makebase.b32
-    copy &&!
--Hc
--H=$(WXDIR)\src\msw\wx32.csm
--3
--d
--a1 # byte alignment
--R-
--X
--w-par
--w-aus
--w-hid # virtual function A hides virtual function B
--tWM
--tWC
-
--I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR)
--I$(WXDIR)\include\wx\msw\gnuwin32
-
--L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
--D__WXWIN__
--D__WXMSW__
--D__WINDOWS__
--DWIN32
-$(OPT)
-$(DEBUG_FLAGS)
-$(WIN95FLAG)
-! $(CFG)
-
-clean: $(PERIPH_CLEAN_TARGET)
-    -$(RM) $(WXLIBDIR)\*.tds
-    -$(RM) $(WXLIBDIR)\*.il?
-    -$(RM) $(OBJ_PATH)\*.obj
-    -$(RM) $(OBJ_PATH)\*.pch
-    -$(RM) $(OBJ_PATH)\*.csm
-    -$(RM) $(OBJ_PATH)\"wx32.#??"
-
-cleancfg:
-    -$(RM) $(OBJ_PATH)\*.cfg
-
-
-cleanall: clean cleancfg
-
-
-self:
-    cd $(WXWIN)\distrib\msw\tmake
-    perl -S tmake -tb32base wxwin.pro -o makebase.b32
-    copy makebase.b32 $(WXWIN)\src\msw
+
+
+
+
+# This file was automatically generated by tmake
+# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
+
+#
+# File:     makebase.b32
+# Author:   Julian Smart
+# Created:  1998
+# Updated:  Michael Fielding, 2002
+# Copyright:
+#
+# "%W% %G%"
+#
+# Makefile : Builds wxWindows library wxbase.lib for MS Windows,
+# and Borland C++ (32-bit).
+
+# BCCDIR now defined in ../makeb32.env
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+THISDIR = $(WXDIR)\src\msw
+
+# Set all these to 1 if you want to build a dynamic library
+!if "$(DLL)" == "1"
+WXMAKINGDLL=1
+WXBUILDDLL=1
+!endif
+
+wxUSE_GUI=0
+
+!include $(WXDIR)\src\makeb32.env
+
+PERIPH_LIBS=
+PERIPH_TARGET=zlib regex $(PERIPH_TARGET)
+PERIPH_CLEAN_TARGET=clean_zlib clean_regex $(PERIPH_CLEAN_TARGET)
+
+!if "$(DLL)" == "0"
+DUMMY=dummy
+!else
+DUMMY=dummydll
+LIBS= cw32mti import32 ole2w32 odbc32 zlib regex
+!endif
+
+LIBTARGET=$(WXLIB)
+
+GENDIR=..\generic
+COMMDIR=..\common
+HTMLDIR=..\html
+OLEDIR=.\ole
+MSWDIR=.
+
+DOCDIR = $(WXDIR)\docs
+
+COMMONOBJS = \
+    $(OBJ_PATH)\appbase.obj \
+		$(OBJ_PATH)\clntdata.obj \
+		$(OBJ_PATH)\cmdline.obj \
+		$(OBJ_PATH)\config.obj \
+		$(OBJ_PATH)\datetime.obj \
+		$(OBJ_PATH)\datstrm.obj \
+		$(OBJ_PATH)\db.obj \
+		$(OBJ_PATH)\dbtable.obj \
+		$(OBJ_PATH)\dircmn.obj \
+		$(OBJ_PATH)\dynarray.obj \
+		$(OBJ_PATH)\dynlib.obj \
+		$(OBJ_PATH)\dynload.obj \
+		$(OBJ_PATH)\encconv.obj \
+		$(OBJ_PATH)\event.obj \
+		$(OBJ_PATH)\extended.obj \
+		$(OBJ_PATH)\ffile.obj \
+		$(OBJ_PATH)\file.obj \
+		$(OBJ_PATH)\fileconf.obj \
+		$(OBJ_PATH)\filefn.obj \
+		$(OBJ_PATH)\filename.obj \
+		$(OBJ_PATH)\filesys.obj \
+		$(OBJ_PATH)\fmapbase.obj \
+		$(OBJ_PATH)\fs_inet.obj \
+		$(OBJ_PATH)\fs_mem.obj \
+		$(OBJ_PATH)\fs_zip.obj \
+		$(OBJ_PATH)\ftp.obj \
+		$(OBJ_PATH)\hash.obj \
+		$(OBJ_PATH)\hashmap.obj \
+		$(OBJ_PATH)\http.obj \
+		$(OBJ_PATH)\intl.obj \
+		$(OBJ_PATH)\ipcbase.obj \
+		$(OBJ_PATH)\list.obj \
+		$(OBJ_PATH)\log.obj \
+		$(OBJ_PATH)\longlong.obj \
+		$(OBJ_PATH)\memory.obj \
+		$(OBJ_PATH)\mimecmn.obj \
+		$(OBJ_PATH)\module.obj \
+		$(OBJ_PATH)\msgout.obj \
+		$(OBJ_PATH)\mstream.obj \
+		$(OBJ_PATH)\object.obj \
+		$(OBJ_PATH)\process.obj \
+		$(OBJ_PATH)\protocol.obj \
+		$(OBJ_PATH)\regex.obj \
+		$(OBJ_PATH)\sckaddr.obj \
+		$(OBJ_PATH)\sckfile.obj \
+		$(OBJ_PATH)\sckipc.obj \
+		$(OBJ_PATH)\sckstrm.obj \
+		$(OBJ_PATH)\socket.obj \
+		$(OBJ_PATH)\stopwatch.obj \
+		$(OBJ_PATH)\strconv.obj \
+		$(OBJ_PATH)\stream.obj \
+		$(OBJ_PATH)\string.obj \
+		$(OBJ_PATH)\sysopt.obj \
+		$(OBJ_PATH)\textbuf.obj \
+		$(OBJ_PATH)\textfile.obj \
+		$(OBJ_PATH)\tokenzr.obj \
+		$(OBJ_PATH)\txtstrm.obj \
+		$(OBJ_PATH)\unzip.obj \
+		$(OBJ_PATH)\url.obj \
+		$(OBJ_PATH)\utilscmn.obj \
+		$(OBJ_PATH)\variant.obj \
+		$(OBJ_PATH)\wfstream.obj \
+		$(OBJ_PATH)\wxchar.obj \
+		$(OBJ_PATH)\zipstrm.obj \
+		$(OBJ_PATH)\zstream.obj \
+		$(OBJ_PATH)\init.obj
+
+MSWOBJS = $(OBJ_PATH)\basemsw.obj \
+		$(OBJ_PATH)\dde.obj \
+		$(OBJ_PATH)\dir.obj \
+		$(OBJ_PATH)\gsocket.obj \
+		$(OBJ_PATH)\gsockmsw.obj \
+		$(OBJ_PATH)\main.obj \
+		$(OBJ_PATH)\mimetype.obj \
+		$(OBJ_PATH)\mslu.obj \
+		$(OBJ_PATH)\regconf.obj \
+		$(OBJ_PATH)\registry.obj \
+		$(OBJ_PATH)\snglinst.obj \
+		$(OBJ_PATH)\thread.obj \
+		$(OBJ_PATH)\utils.obj \
+		$(OBJ_PATH)\utilsexc.obj \
+		$(OBJ_PATH)\volume.obj
+
+OBJECTS = $(COMMONOBJS) $(MSWOBJS)
+
+default:    wx
+
+wx:    $(ARCHINCDIR)\wx makesetuph makearchsetuph makeoutdir $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
+
+all:    wx
+
+makeoutdir:
+    -mkdir $(OBJ_PATH)
+
+# Copy the in-CVS setup0.h to setup.h if necessary
+makesetuph:
+     cd $(WXDIR)\include\wx\msw
+     if not exist setup.h copy setup0.h setup.h
+     cd $(WXDIR)\src\msw
+
+# Copy include\wx\msw\setup.h to the architecture-specific location
+makearchsetuph:
+     copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
+     cd $(WXDIR)\src\msw
+
+$(ARCHINCDIR)\wx:
+    -mkdir $(ARCHINCDIR)
+    -mkdir $(ARCHINCDIR)\wx
+    -erase $(CFG)
+
+!if "$(DLL)" == "0"
+
+$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
+    -erase $(WXLIB)
+    tlib "$(WXLIB)" /P1024 @&&!
++$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
+!
+
+!else
+
+$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
+    -erase $(WXLIB)
+    -erase $(WXDLL)
+        $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
+c0d32.obj $(OBJECTS)
+$(WXLIBDIR)\$(WXLIBNAME)
+nul
+$(PERIPH_LIBS) $(LIBS)
+wxb32
+!
+        implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll
+!endif
+
+dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
+dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
+
+version.res:
+    brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
+
+$(OBJ_PATH)\basemsw.obj: $(MSWDIR)\basemsw.$(SRCSUFF)
+
+$(OBJ_PATH)\dde.obj: $(MSWDIR)\dde.$(SRCSUFF)
+
+$(OBJ_PATH)\dir.obj: $(MSWDIR)\dir.$(SRCSUFF)
+
+$(OBJ_PATH)\gsocket.obj: $(MSWDIR)\gsocket.c
+
+$(OBJ_PATH)\gsockmsw.obj: $(MSWDIR)\gsockmsw.c
+
+$(OBJ_PATH)\main.obj: $(MSWDIR)\main.$(SRCSUFF)
+
+$(OBJ_PATH)\mimetype.obj: $(MSWDIR)\mimetype.$(SRCSUFF)
+
+$(OBJ_PATH)\mslu.obj: $(MSWDIR)\mslu.$(SRCSUFF)
+
+$(OBJ_PATH)\regconf.obj: $(MSWDIR)\regconf.$(SRCSUFF)
+
+$(OBJ_PATH)\registry.obj: $(MSWDIR)\registry.$(SRCSUFF)
+
+$(OBJ_PATH)\snglinst.obj: $(MSWDIR)\snglinst.$(SRCSUFF)
+
+$(OBJ_PATH)\thread.obj: $(MSWDIR)\thread.$(SRCSUFF)
+
+$(OBJ_PATH)\utils.obj: $(MSWDIR)\utils.$(SRCSUFF)
+
+$(OBJ_PATH)\utilsexc.obj: $(MSWDIR)\utilsexc.$(SRCSUFF)
+
+$(OBJ_PATH)\volume.obj: $(MSWDIR)\volume.$(SRCSUFF)
+
+
+
+########################################################
+# Common objects (always compiled)
+
+$(OBJ_PATH)\appbase.obj: $(COMMDIR)\appbase.$(SRCSUFF)
+
+$(OBJ_PATH)\clntdata.obj: $(COMMDIR)\clntdata.$(SRCSUFF)
+
+$(OBJ_PATH)\cmdline.obj: $(COMMDIR)\cmdline.$(SRCSUFF)
+
+$(OBJ_PATH)\config.obj: $(COMMDIR)\config.$(SRCSUFF)
+
+$(OBJ_PATH)\datetime.obj: $(COMMDIR)\datetime.$(SRCSUFF)
+
+$(OBJ_PATH)\datstrm.obj: $(COMMDIR)\datstrm.$(SRCSUFF)
+
+$(OBJ_PATH)\db.obj: $(COMMDIR)\db.$(SRCSUFF)
+
+$(OBJ_PATH)\dbtable.obj: $(COMMDIR)\dbtable.$(SRCSUFF)
+
+$(OBJ_PATH)\dircmn.obj: $(COMMDIR)\dircmn.$(SRCSUFF)
+
+$(OBJ_PATH)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
+
+$(OBJ_PATH)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
+
+$(OBJ_PATH)\dynload.obj: $(COMMDIR)\dynload.$(SRCSUFF)
+
+$(OBJ_PATH)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF)
+
+$(OBJ_PATH)\event.obj: $(COMMDIR)\event.$(SRCSUFF)
+
+$(OBJ_PATH)\extended.obj: $(COMMDIR)\extended.c
+
+$(OBJ_PATH)\ffile.obj: $(COMMDIR)\ffile.$(SRCSUFF)
+
+$(OBJ_PATH)\file.obj: $(COMMDIR)\file.$(SRCSUFF)
+
+$(OBJ_PATH)\fileconf.obj: $(COMMDIR)\fileconf.$(SRCSUFF)
+
+$(OBJ_PATH)\filefn.obj: $(COMMDIR)\filefn.$(SRCSUFF)
+
+$(OBJ_PATH)\filename.obj: $(COMMDIR)\filename.$(SRCSUFF)
+
+$(OBJ_PATH)\filesys.obj: $(COMMDIR)\filesys.$(SRCSUFF)
+
+$(OBJ_PATH)\fmapbase.obj: $(COMMDIR)\fmapbase.$(SRCSUFF)
+
+$(OBJ_PATH)\fs_inet.obj: $(COMMDIR)\fs_inet.$(SRCSUFF)
+
+$(OBJ_PATH)\fs_mem.obj: $(COMMDIR)\fs_mem.$(SRCSUFF)
+
+$(OBJ_PATH)\fs_zip.obj: $(COMMDIR)\fs_zip.$(SRCSUFF)
+
+$(OBJ_PATH)\ftp.obj: $(COMMDIR)\ftp.$(SRCSUFF)
+
+$(OBJ_PATH)\hash.obj: $(COMMDIR)\hash.$(SRCSUFF)
+
+$(OBJ_PATH)\hashmap.obj: $(COMMDIR)\hashmap.$(SRCSUFF)
+
+$(OBJ_PATH)\http.obj: $(COMMDIR)\http.$(SRCSUFF)
+
+$(OBJ_PATH)\intl.obj: $(COMMDIR)\intl.$(SRCSUFF)
+
+$(OBJ_PATH)\ipcbase.obj: $(COMMDIR)\ipcbase.$(SRCSUFF)
+
+$(OBJ_PATH)\list.obj: $(COMMDIR)\list.$(SRCSUFF)
+
+$(OBJ_PATH)\log.obj: $(COMMDIR)\log.$(SRCSUFF)
+
+$(OBJ_PATH)\longlong.obj: $(COMMDIR)\longlong.$(SRCSUFF)
+
+$(OBJ_PATH)\memory.obj: $(COMMDIR)\memory.$(SRCSUFF)
+
+$(OBJ_PATH)\mimecmn.obj: $(COMMDIR)\mimecmn.$(SRCSUFF)
+
+$(OBJ_PATH)\module.obj: $(COMMDIR)\module.$(SRCSUFF)
+
+$(OBJ_PATH)\msgout.obj: $(COMMDIR)\msgout.$(SRCSUFF)
+
+$(OBJ_PATH)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
+
+$(OBJ_PATH)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
+
+$(OBJ_PATH)\process.obj: $(COMMDIR)\process.$(SRCSUFF)
+
+$(OBJ_PATH)\protocol.obj: $(COMMDIR)\protocol.$(SRCSUFF)
+
+$(OBJ_PATH)\regex.obj: $(COMMDIR)\regex.$(SRCSUFF)
+
+$(OBJ_PATH)\sckaddr.obj: $(COMMDIR)\sckaddr.$(SRCSUFF)
+
+$(OBJ_PATH)\sckfile.obj: $(COMMDIR)\sckfile.$(SRCSUFF)
+
+$(OBJ_PATH)\sckipc.obj: $(COMMDIR)\sckipc.$(SRCSUFF)
+
+$(OBJ_PATH)\sckstrm.obj: $(COMMDIR)\sckstrm.$(SRCSUFF)
+
+$(OBJ_PATH)\socket.obj: $(COMMDIR)\socket.$(SRCSUFF)
+
+$(OBJ_PATH)\stopwatch.obj: $(COMMDIR)\stopwatch.$(SRCSUFF)
+
+$(OBJ_PATH)\strconv.obj: $(COMMDIR)\strconv.$(SRCSUFF)
+
+$(OBJ_PATH)\stream.obj: $(COMMDIR)\stream.$(SRCSUFF)
+
+$(OBJ_PATH)\string.obj: $(COMMDIR)\string.$(SRCSUFF)
+
+$(OBJ_PATH)\sysopt.obj: $(COMMDIR)\sysopt.$(SRCSUFF)
+
+$(OBJ_PATH)\textbuf.obj: $(COMMDIR)\textbuf.$(SRCSUFF)
+
+$(OBJ_PATH)\textfile.obj: $(COMMDIR)\textfile.$(SRCSUFF)
+
+$(OBJ_PATH)\tokenzr.obj: $(COMMDIR)\tokenzr.$(SRCSUFF)
+
+$(OBJ_PATH)\txtstrm.obj: $(COMMDIR)\txtstrm.$(SRCSUFF)
+
+$(OBJ_PATH)\unzip.obj: $(COMMDIR)\unzip.c
+
+$(OBJ_PATH)\url.obj: $(COMMDIR)\url.$(SRCSUFF)
+
+$(OBJ_PATH)\utilscmn.obj: $(COMMDIR)\utilscmn.$(SRCSUFF)
+
+$(OBJ_PATH)\variant.obj: $(COMMDIR)\variant.$(SRCSUFF)
+
+$(OBJ_PATH)\wfstream.obj: $(COMMDIR)\wfstream.$(SRCSUFF)
+
+$(OBJ_PATH)\wxchar.obj: $(COMMDIR)\wxchar.$(SRCSUFF)
+
+$(OBJ_PATH)\zipstrm.obj: $(COMMDIR)\zipstrm.$(SRCSUFF)
+
+$(OBJ_PATH)\zstream.obj: $(COMMDIR)\zstream.$(SRCSUFF)
+
+$(OBJ_PATH)\init.obj: $(COMMDIR)\init.$(SRCSUFF)
+
+
+
+
+all_utils:
+    cd $(WXDIR)\utils
+    ${MAKE} -f makefile.b32
+    cd $(WXDIR)\src\msw
+
+all_samples:
+    cd $(WXDIR)\samples
+    ${MAKE} -f makefile.b32
+    cd $(WXDIR)\src\msw
+
+all_execs:
+    cd $(WXDIR)\utils
+    ${MAKE} -f makefile.b32 all_execs
+    cd $(WXDIR)\src\msw
+
+
+
+zlib:   $(CFG)
+        cd $(WXDIR)\src\zlib
+        ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
+        cd $(WXDIR)\src\msw
+
+clean_zlib:
+        cd $(WXDIR)\src\zlib
+        ${MAKE} -f makefile.b32 clean
+        cd $(WXDIR)\src\msw
+
+
+regex:   $(CFG)
+        cd $(WXDIR)\src\regex
+        ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
+        cd $(WXDIR)\src\msw
+
+clean_regex:
+        cd $(WXDIR)\src\regex
+        ${MAKE} -f makefile.b32 clean
+        cd $(WXDIR)\src\msw
+
+
+
+$(CFG): makebase.b32
+    copy &&!
+-Hc
+-H=$(WXDIR)\src\msw\wx32.csm
+-3
+-d
+-a1 # byte alignment
+-R-
+-X
+-w-par
+-w-aus
+-w-hid # virtual function A hides virtual function B
+-tWM
+-tWC
+
+-I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR)
+-I$(WXDIR)\include\wx\msw\gnuwin32
+
+-L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
+-D__WXWIN__
+-D__WXMSW__
+-D__WINDOWS__
+-DWIN32
+$(OPT)
+$(DEBUG_FLAGS)
+$(WIN95FLAG)
+! $(CFG)
+
+clean: $(PERIPH_CLEAN_TARGET)
+    -$(RM) $(WXLIBDIR)\*.tds
+    -$(RM) $(WXLIBDIR)\*.il?
+    -$(RM) $(OBJ_PATH)\*.obj
+    -$(RM) $(OBJ_PATH)\*.pch
+    -$(RM) $(OBJ_PATH)\*.csm
+    -$(RM) $(OBJ_PATH)\"wx32.#??"
+
+cleancfg:
+    -$(RM) $(OBJ_PATH)\*.cfg
+
+
+cleanall: clean cleancfg
+
+
+self:
+    cd $(WXWIN)\distrib\msw\tmake
+    perl -S tmake -tb32base wxwin.pro -o makebase.b32
+    copy makebase.b32 $(WXWIN)\src\msw
diff --git a/Externals/wxWidgets/src/msw/makefile.mic b/Externals/wxWidgets/src/msw/makefile.mic
index 0bdbbfbc77..b544a55a3f 100644
--- a/Externals/wxWidgets/src/msw/makefile.mic
+++ b/Externals/wxWidgets/src/msw/makefile.mic
@@ -1,356 +1,356 @@
-##############################################################################
-# Microwindows template Makefile
-# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
-# Licence:   wxWindows Licence
-##############################################################################
-
-TOP=$(MICROWINDOWS)
-ifeq "$(MICROWINDOWS)" ""
-TOP=/home/julians/local/microwindows/microwindows-0.89pre8/src
-endif
-
-CONFIG = $(TOP)/config
-WXDIR = ../..
-OBJSUFF = o
-SRCSUFF = cpp
-WXLIB=$(WXDIR)/lib/libwx.a
-AROPTIONS = ruv
-RANLIB =  ranlib
-RM = rm -f
-
-GENDIR  = $(WXDIR)/src/generic
-COMMDIR = $(WXDIR)/src/common
-HTMLDIR = $(WXDIR)/src/html
-ZLIBDIR = $(WXDIR)/src/zlib
-PNGDIR  = $(WXDIR)/src/png
-JPEGDIR = $(WXDIR)/src/jpeg
-TIFFDIR = $(WXDIR)/src/tiff
-OLEDIR  = $(WXDIR)/src/msw/ole
-MICROWINDIR  = $(WXDIR)/src/msw
-UNIXDIR  = $(WXDIR)/src/unix
-UNIVDIR  = $(WXDIR)/src/univ
-
-ZLIBLIB = $(WXDIR)/lib/libzlib.a
-PNGLIB  = $(WXDIR)/lib/libpng.a
-JPEGLIB = $(WXDIR)/lib/libjpeg.a
-TIFFLIB = $(WXDIR)/lib/libtiff.a
-
-GENERICOBJS = \
-                $(GENDIR)/accel.$(OBJSUFF) \
-                $(GENDIR)/busyinfo.$(OBJSUFF) \
-		$(GENDIR)/calctrl.$(OBJSUFF) \
-		$(GENDIR)/choicdgg.$(OBJSUFF) \
-		$(GENDIR)/colrdlgg.$(OBJSUFF) \
-		$(GENDIR)/dirctrlg.$(OBJSUFF) \
-		$(GENDIR)/dragimgg.$(OBJSUFF) \
-		$(GENDIR)/fontdlgg.$(OBJSUFF) \
-		$(GENDIR)/grid.$(OBJSUFF) \
-		$(GENDIR)/gridctrl.$(OBJSUFF) \
-		$(GENDIR)/gridsel.$(OBJSUFF) \
-		$(GENDIR)/imaglist.$(OBJSUFF) \
-		$(GENDIR)/laywin.$(OBJSUFF) \
-		$(GENDIR)/listctrl.$(OBJSUFF) \
-		$(GENDIR)/logg.$(OBJSUFF) \
-		$(GENDIR)/msgdlgg.$(OBJSUFF) \
-		$(GENDIR)/numdlgg.$(OBJSUFF) \
-		$(GENDIR)/panelg.$(OBJSUFF) \
-		$(GENDIR)/progdlgg.$(OBJSUFF) \
-		$(GENDIR)/sashwin.$(OBJSUFF) \
-		$(GENDIR)/scrlwing.$(OBJSUFF) \
-		$(GENDIR)/spinctlg.$(OBJSUFF) \
-		$(GENDIR)/splash.$(OBJSUFF) \
-		$(GENDIR)/splitter.$(OBJSUFF) \
-		$(GENDIR)/tabg.$(OBJSUFF) \
-		$(GENDIR)/tbarsmpl.$(OBJSUFF) \
-		$(GENDIR)/textdlgg.$(OBJSUFF) \
-		$(GENDIR)/tipdlg.$(OBJSUFF) \
-		$(GENDIR)/tipwin.$(OBJSUFF) \
-		$(GENDIR)/treectlg.$(OBJSUFF) \
-		$(GENDIR)/treelay.$(OBJSUFF) \
-		$(GENDIR)/wizard.$(OBJSUFF)
-
-COMMONOBJS  = \
-		$(COMMDIR)/appcmn.$(OBJSUFF) \
-		$(COMMDIR)/choiccmn.$(OBJSUFF) \
-		$(COMMDIR)/clntdata.$(OBJSUFF) \
-		$(COMMDIR)/clipcmn.$(OBJSUFF) \
-		$(COMMDIR)/cmdline.$(OBJSUFF) \
-		$(COMMDIR)/cmdproc.$(OBJSUFF) \
-		$(COMMDIR)/cmndata.$(OBJSUFF) \
-		$(COMMDIR)/config.$(OBJSUFF) \
-		$(COMMDIR)/containr.$(OBJSUFF) \
-		$(COMMDIR)/cshelp.$(OBJSUFF) \
-		$(COMMDIR)/ctrlcmn.$(OBJSUFF) \
-		$(COMMDIR)/ctrlsub.$(OBJSUFF) \
-		$(COMMDIR)/datetime.$(OBJSUFF) \
-		$(COMMDIR)/datstrm.$(OBJSUFF) \
-		$(COMMDIR)/dcbase.$(OBJSUFF) \
-		$(COMMDIR)/dircmn.$(OBJSUFF) \
-		$(COMMDIR)/dlgcmn.$(OBJSUFF) \
-		$(COMMDIR)/dobjcmn.$(OBJSUFF) \
-		$(COMMDIR)/docview.$(OBJSUFF) \
-		$(COMMDIR)/dynarray.$(OBJSUFF) \
-		$(COMMDIR)/dynlib.$(OBJSUFF) \
-		$(COMMDIR)/effects.$(OBJSUFF) \
-		$(COMMDIR)/encconv.$(OBJSUFF) \
-		$(COMMDIR)/event.$(OBJSUFF) \
-		$(COMMDIR)/extended.$(OBJSUFF) \
-		$(COMMDIR)/ffile.$(OBJSUFF) \
-		$(COMMDIR)/file.$(OBJSUFF) \
-		$(COMMDIR)/fileconf.$(OBJSUFF) \
-		$(COMMDIR)/filefn.$(OBJSUFF) \
-		$(COMMDIR)/filename.$(OBJSUFF) \
-		$(COMMDIR)/filesys.$(OBJSUFF) \
-		$(COMMDIR)/fontcmn.$(OBJSUFF) \
-		$(COMMDIR)/fontmap.$(OBJSUFF) \
-		$(COMMDIR)/framecmn.$(OBJSUFF) \
-		$(COMMDIR)/gaugecmn.$(OBJSUFF) \
-		$(COMMDIR)/gdicmn.$(OBJSUFF) \
-		$(COMMDIR)/geometry.$(OBJSUFF) \
-		$(COMMDIR)/gifdecod.$(OBJSUFF) \
-		$(COMMDIR)/hash.$(OBJSUFF) \
-		$(COMMDIR)/helpbase.$(OBJSUFF) \
-		$(COMMDIR)/imagall.$(OBJSUFF) \
-		$(COMMDIR)/imagbmp.$(OBJSUFF) \
-		$(COMMDIR)/image.$(OBJSUFF) \
-		$(COMMDIR)/imaggif.$(OBJSUFF) \
-		$(COMMDIR)/imagjpeg.$(OBJSUFF) \
-		$(COMMDIR)/imagpcx.$(OBJSUFF) \
-		$(COMMDIR)/imagpng.$(OBJSUFF) \
-		$(COMMDIR)/imagpnm.$(OBJSUFF) \
-		$(COMMDIR)/imagtiff.$(OBJSUFF) \
-		$(COMMDIR)/imagxpm.$(OBJSUFF) \
-		$(COMMDIR)/intl.$(OBJSUFF) \
-		$(COMMDIR)/ipcbase.$(OBJSUFF) \
-		$(COMMDIR)/layout.$(OBJSUFF) \
-		$(COMMDIR)/lboxcmn.$(OBJSUFF) \
-		$(COMMDIR)/list.$(OBJSUFF) \
-		$(COMMDIR)/log.$(OBJSUFF) \
-		$(COMMDIR)/longlong.$(OBJSUFF) \
-		$(COMMDIR)/matrix.$(OBJSUFF) \
-		$(COMMDIR)/memory.$(OBJSUFF) \
-		$(COMMDIR)/menucmn.$(OBJSUFF) \
-		$(COMMDIR)/mimecmn.$(OBJSUFF) \
-		$(COMMDIR)/module.$(OBJSUFF) \
-		$(COMMDIR)/mstream.$(OBJSUFF) \
-		$(COMMDIR)/nbkbase.$(OBJSUFF) \
-		$(COMMDIR)/object.$(OBJSUFF) \
-		$(COMMDIR)/paper.$(OBJSUFF) \
-		$(COMMDIR)/popupcmn.$(OBJSUFF) \
-		$(COMMDIR)/prntbase.$(OBJSUFF) \
-		$(COMMDIR)/process.$(OBJSUFF) \
-		$(COMMDIR)/quantize.$(OBJSUFF) \
-		$(COMMDIR)/radiocmn.$(OBJSUFF) \
-		$(COMMDIR)/sizer.$(OBJSUFF) \
-		$(COMMDIR)/statbar.$(OBJSUFF) \
-		$(COMMDIR)/strconv.$(OBJSUFF) \
-		$(COMMDIR)/stream.$(OBJSUFF) \
-		$(COMMDIR)/string.$(OBJSUFF) \
-		$(COMMDIR)/sysopt.$(OBJSUFF) \
-		$(COMMDIR)/tbarbase.$(OBJSUFF) \
-		$(COMMDIR)/textbuf.$(OBJSUFF) \
-		$(COMMDIR)/textcmn.$(OBJSUFF) \
-		$(COMMDIR)/textfile.$(OBJSUFF) \
-		$(COMMDIR)/timercmn.$(OBJSUFF) \
-		$(COMMDIR)/tokenzr.$(OBJSUFF) \
-		$(COMMDIR)/toplvcmn.$(OBJSUFF) \
-		$(COMMDIR)/treebase.$(OBJSUFF) \
-		$(COMMDIR)/txtstrm.$(OBJSUFF) \
-		$(COMMDIR)/utilscmn.$(OBJSUFF) \
-		$(UNIXDIR)/utilsunx.$(OBJSUFF) \
-		$(COMMDIR)/valgen.$(OBJSUFF) \
-		$(COMMDIR)/validate.$(OBJSUFF) \
-		$(COMMDIR)/valtext.$(OBJSUFF) \
-		$(COMMDIR)/variant.$(OBJSUFF) \
-		$(COMMDIR)/wfstream.$(OBJSUFF) \
-		$(COMMDIR)/wincmn.$(OBJSUFF) \
-		$(COMMDIR)/wxchar.$(OBJSUFF) \
-		$(COMMDIR)/xpmdecod.$(OBJSUFF)
-
-HTMLOBJS = \
-                $(HTMLDIR)/helpctrl.$(OBJSUFF) \
-		$(HTMLDIR)/helpdata.$(OBJSUFF) \
-		$(HTMLDIR)/helpfrm.$(OBJSUFF) \
-		$(HTMLDIR)/htmlcell.$(OBJSUFF) \
-		$(HTMLDIR)/htmlfilt.$(OBJSUFF) \
-		$(HTMLDIR)/htmlpars.$(OBJSUFF) \
-		$(HTMLDIR)/htmltag.$(OBJSUFF) \
-		$(HTMLDIR)/htmlwin.$(OBJSUFF) \
-		$(HTMLDIR)/htmprint.$(OBJSUFF) \
-		$(HTMLDIR)/m_dflist.$(OBJSUFF) \
-		$(HTMLDIR)/m_fonts.$(OBJSUFF) \
-		$(HTMLDIR)/m_hline.$(OBJSUFF) \
-		$(HTMLDIR)/m_image.$(OBJSUFF) \
-		$(HTMLDIR)/m_layout.$(OBJSUFF) \
-		$(HTMLDIR)/m_links.$(OBJSUFF) \
-		$(HTMLDIR)/m_list.$(OBJSUFF) \
-		$(HTMLDIR)/m_meta.$(OBJSUFF) \
-		$(HTMLDIR)/m_pre.$(OBJSUFF) \
-		$(HTMLDIR)/m_tables.$(OBJSUFF) \
-		$(HTMLDIR)/winpars.$(OBJSUFF)
-
-MSWOBJS     = \
-		$(MICROWINDIR)/app.$(OBJSUFF) \
-		$(MICROWINDIR)/bitmap.$(OBJSUFF) \
-		$(MICROWINDIR)/brush.$(OBJSUFF) \
-		$(MICROWINDIR)/caret.$(OBJSUFF) \
-		$(MICROWINDIR)/clipbrd.$(OBJSUFF) \
-		$(MICROWINDIR)/colour.$(OBJSUFF) \
-		$(MICROWINDIR)/cursor.$(OBJSUFF) \
-		$(MICROWINDIR)/data.$(OBJSUFF) \
-		$(MICROWINDIR)/dc.$(OBJSUFF) \
-		$(MICROWINDIR)/dcclient.$(OBJSUFF) \
-		$(MICROWINDIR)/dcmemory.$(OBJSUFF) \
-		$(MICROWINDIR)/dcprint.$(OBJSUFF) \
-		$(MICROWINDIR)/dcscreen.$(OBJSUFF) \
-		$(MICROWINDIR)/dde.$(OBJSUFF) \
-		$(MICROWINDIR)/dialog.$(OBJSUFF) \
-		$(MICROWINDIR)/dialup.$(OBJSUFF) \
-		$(UNIXDIR)/dir.$(OBJSUFF) \
-		$(MICROWINDIR)/evtloop.$(OBJSUFF) \
-		$(MICROWINDIR)/font.$(OBJSUFF) \
-		$(MICROWINDIR)/fontenum.$(OBJSUFF) \
-		$(MICROWINDIR)/fontutil.$(OBJSUFF) \
-		$(MICROWINDIR)/gdiimage.$(OBJSUFF) \
-		$(MICROWINDIR)/gdiobj.$(OBJSUFF) \
-		$(MICROWINDIR)/icon.$(OBJSUFF) \
-		$(MICROWINDIR)/main.$(OBJSUFF) \
-		$(MICROWINDIR)/microwin.$(OBJSUFF) \
-		$(MICROWINDIR)/palette.$(OBJSUFF) \
-		$(MICROWINDIR)/pen.$(OBJSUFF) \
-		$(MICROWINDIR)/region.$(OBJSUFF) \
-		$(MICROWINDIR)/settings.$(OBJSUFF) \
-		$(MICROWINDIR)/snglinst.$(OBJSUFF) \
-		$(MICROWINDIR)/thread.$(OBJSUFF) \
-		$(MICROWINDIR)/timer.$(OBJSUFF) \
-		$(MICROWINDIR)/toplevel.$(OBJSUFF) \
-		$(MICROWINDIR)/utils.$(OBJSUFF) \
-		$(MICROWINDIR)/window.$(OBJSUFF) \
-		$(OLEDIR)/dataobj.$(OBJSUFF)
-
-UNIVOBJS_TODO = $(UNIVDIR)/choice.$(OBJSUFF) \
-		$(UNIVDIR)/colordlg.$(OBJSUFF) \
-
-
-UNIVOBJS     = \
-		$(UNIVDIR)/bmpbuttn.$(OBJSUFF) \
-		$(UNIVDIR)/button.$(OBJSUFF) \
-		$(UNIVDIR)/checkbox.$(OBJSUFF) \
-		$(UNIVDIR)/checklst.$(OBJSUFF) \
-		$(UNIVDIR)/colschem.$(OBJSUFF) \
-		$(UNIVDIR)/combobox.$(OBJSUFF) \
-		$(UNIVDIR)/control.$(OBJSUFF) \
-		$(UNIVDIR)/framuniv.$(OBJSUFF) \
-		$(UNIVDIR)/gauge.$(OBJSUFF) \
-		$(UNIVDIR)/inphand.$(OBJSUFF) \
-		$(UNIVDIR)/inpcons.$(OBJSUFF) \
-		$(UNIVDIR)/listbox.$(OBJSUFF) \
-		$(UNIVDIR)/menu.$(OBJSUFF) \
-		$(UNIVDIR)/notebook.$(OBJSUFF) \
-		$(UNIVDIR)/radiobox.$(OBJSUFF) \
-		$(UNIVDIR)/radiobut.$(OBJSUFF) \
-		$(UNIVDIR)/renderer.$(OBJSUFF) \
-		$(UNIVDIR)/scrarrow.$(OBJSUFF) \
-		$(UNIVDIR)/scrolbar.$(OBJSUFF) \
-		$(UNIVDIR)/scrthumb.$(OBJSUFF) \
-		$(UNIVDIR)/slider.$(OBJSUFF) \
-		$(UNIVDIR)/spinbutt.$(OBJSUFF) \
-		$(UNIVDIR)/statbmp.$(OBJSUFF) \
-		$(UNIVDIR)/statbox.$(OBJSUFF) \
-		$(UNIVDIR)/statline.$(OBJSUFF) \
-		$(UNIVDIR)/stattext.$(OBJSUFF) \
-		$(UNIVDIR)/statusbr.$(OBJSUFF) \
-		$(UNIVDIR)/textctrl.$(OBJSUFF) \
-		$(UNIVDIR)/theme.$(OBJSUFF) \
-		$(UNIVDIR)/topluniv.$(OBJSUFF) \
-		$(UNIVDIR)/winuniv.$(OBJSUFF) \
-		$(UNIVDIR)/themes/gtk.$(OBJSUFF) \
-		$(UNIVDIR)/themes/win32.$(OBJSUFF)
-
-include $(CONFIG)
-
-######################## Additional Flags section ############################
-
-# Directories list for header files
-INCLUDEDIRS += -I$(WXDIR)/include
-# Defines for preprocessor
-DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
-
-# Compilation flags for C files OTHER than include directories
-CFLAGS +=
-# Preprocessor flags OTHER than defines
-CPPFLAGS += 
-# Linking flags
-LDFLAGS +=
-
-############################# targets section ################################
-
-# If you want to create a library with the objects files, define the name here
-LIBNAME =
-
-# If we put it below OBJS=, Makefile.rules includes .depend
-# and it continually looks for .c files to satisfy .o.cpp
-# dependency. What's going on there?
-include $(TOP)/Makefile.rules
-
-# List of objects to compile
-OBJS = $(COMMONOBJS) $(MSWOBJS) $(GENERICOBJS) $(UNIVOBJS)
-
-all: $(WXLIB)
-
-######################### Makefile.rules section #############################
-
-
-
-######################## Tools targets section ###############################
-
-#ntest: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config
-#	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS)
-
-$(WXLIB): $(OBJS)
-	ar $(AROPTIONS) $@ $(OBJS)
-	$(RANLIB) $@
-
-#.SUFFIXES: .cpp .cxx .c
-
-#.c.o:
-#	$(CC) -c $(CFLAGS) $(CFLAGS) -o $@ $*.c
-
-.cxx.o:
-	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cxx
-
-.cpp.o:
-	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cpp
-
-#$(COMMDIR)/appcmn.o:    $(COMMDIR)/appcmn.cpp
-#	$(CC) -c $(CPPFLAGS) -o $@ $*.cpp
-
-#appcmn.o:	$(COMMDIR)/appcmn.cpp
-#	$(CC) $(CPPFLAGS) -c -o $@ $<
-
-cleanwx:
-	-$(RM) *.o
-	-$(RM) *.bak
-	-$(RM) core
-	-$(RM) ole/*.o
-	-$(RM) ../common/y_tab.c
-	-$(RM) ../common/lex_yy.c
-	-$(RM) ../common/*.o
-	-$(RM) ../common/*.bak
-	-$(RM) ../generic/*.o
-	-$(RM) ../generic/*.bak
-	-$(RM) ../univ/*.o
-	-$(RM) ../univ/*.bak
-	-$(RM) ../univ/themes/*.o
-	-$(RM) ../univ/themes/*.bak
-	-$(RM) ../unix/*.o
-	-$(RM) ../unix/*.bak
-	-$(RM) ../html/*.o
-	-$(RM) ../zlib/*.o
-	-$(RM) ../zlib/*.bak
-	-$(RM) ../png/*.o
-	-$(RM) ../png/*.bak
-	-$(RM) ../jpeg/*.o
-	-$(RM) ../jpeg/*.bak
-	-$(RM) ../tiff/*.o
-	-$(RM) ../tiff/*.bak
+##############################################################################
+# Microwindows template Makefile
+# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
+# Licence:   wxWindows Licence
+##############################################################################
+
+TOP=$(MICROWINDOWS)
+ifeq "$(MICROWINDOWS)" ""
+TOP=/home/julians/local/microwindows/microwindows-0.89pre8/src
+endif
+
+CONFIG = $(TOP)/config
+WXDIR = ../..
+OBJSUFF = o
+SRCSUFF = cpp
+WXLIB=$(WXDIR)/lib/libwx.a
+AROPTIONS = ruv
+RANLIB =  ranlib
+RM = rm -f
+
+GENDIR  = $(WXDIR)/src/generic
+COMMDIR = $(WXDIR)/src/common
+HTMLDIR = $(WXDIR)/src/html
+ZLIBDIR = $(WXDIR)/src/zlib
+PNGDIR  = $(WXDIR)/src/png
+JPEGDIR = $(WXDIR)/src/jpeg
+TIFFDIR = $(WXDIR)/src/tiff
+OLEDIR  = $(WXDIR)/src/msw/ole
+MICROWINDIR  = $(WXDIR)/src/msw
+UNIXDIR  = $(WXDIR)/src/unix
+UNIVDIR  = $(WXDIR)/src/univ
+
+ZLIBLIB = $(WXDIR)/lib/libzlib.a
+PNGLIB  = $(WXDIR)/lib/libpng.a
+JPEGLIB = $(WXDIR)/lib/libjpeg.a
+TIFFLIB = $(WXDIR)/lib/libtiff.a
+
+GENERICOBJS = \
+                $(GENDIR)/accel.$(OBJSUFF) \
+                $(GENDIR)/busyinfo.$(OBJSUFF) \
+		$(GENDIR)/calctrl.$(OBJSUFF) \
+		$(GENDIR)/choicdgg.$(OBJSUFF) \
+		$(GENDIR)/colrdlgg.$(OBJSUFF) \
+		$(GENDIR)/dirctrlg.$(OBJSUFF) \
+		$(GENDIR)/dragimgg.$(OBJSUFF) \
+		$(GENDIR)/fontdlgg.$(OBJSUFF) \
+		$(GENDIR)/grid.$(OBJSUFF) \
+		$(GENDIR)/gridctrl.$(OBJSUFF) \
+		$(GENDIR)/gridsel.$(OBJSUFF) \
+		$(GENDIR)/imaglist.$(OBJSUFF) \
+		$(GENDIR)/laywin.$(OBJSUFF) \
+		$(GENDIR)/listctrl.$(OBJSUFF) \
+		$(GENDIR)/logg.$(OBJSUFF) \
+		$(GENDIR)/msgdlgg.$(OBJSUFF) \
+		$(GENDIR)/numdlgg.$(OBJSUFF) \
+		$(GENDIR)/panelg.$(OBJSUFF) \
+		$(GENDIR)/progdlgg.$(OBJSUFF) \
+		$(GENDIR)/sashwin.$(OBJSUFF) \
+		$(GENDIR)/scrlwing.$(OBJSUFF) \
+		$(GENDIR)/spinctlg.$(OBJSUFF) \
+		$(GENDIR)/splash.$(OBJSUFF) \
+		$(GENDIR)/splitter.$(OBJSUFF) \
+		$(GENDIR)/tabg.$(OBJSUFF) \
+		$(GENDIR)/tbarsmpl.$(OBJSUFF) \
+		$(GENDIR)/textdlgg.$(OBJSUFF) \
+		$(GENDIR)/tipdlg.$(OBJSUFF) \
+		$(GENDIR)/tipwin.$(OBJSUFF) \
+		$(GENDIR)/treectlg.$(OBJSUFF) \
+		$(GENDIR)/treelay.$(OBJSUFF) \
+		$(GENDIR)/wizard.$(OBJSUFF)
+
+COMMONOBJS  = \
+		$(COMMDIR)/appcmn.$(OBJSUFF) \
+		$(COMMDIR)/choiccmn.$(OBJSUFF) \
+		$(COMMDIR)/clntdata.$(OBJSUFF) \
+		$(COMMDIR)/clipcmn.$(OBJSUFF) \
+		$(COMMDIR)/cmdline.$(OBJSUFF) \
+		$(COMMDIR)/cmdproc.$(OBJSUFF) \
+		$(COMMDIR)/cmndata.$(OBJSUFF) \
+		$(COMMDIR)/config.$(OBJSUFF) \
+		$(COMMDIR)/containr.$(OBJSUFF) \
+		$(COMMDIR)/cshelp.$(OBJSUFF) \
+		$(COMMDIR)/ctrlcmn.$(OBJSUFF) \
+		$(COMMDIR)/ctrlsub.$(OBJSUFF) \
+		$(COMMDIR)/datetime.$(OBJSUFF) \
+		$(COMMDIR)/datstrm.$(OBJSUFF) \
+		$(COMMDIR)/dcbase.$(OBJSUFF) \
+		$(COMMDIR)/dircmn.$(OBJSUFF) \
+		$(COMMDIR)/dlgcmn.$(OBJSUFF) \
+		$(COMMDIR)/dobjcmn.$(OBJSUFF) \
+		$(COMMDIR)/docview.$(OBJSUFF) \
+		$(COMMDIR)/dynarray.$(OBJSUFF) \
+		$(COMMDIR)/dynlib.$(OBJSUFF) \
+		$(COMMDIR)/effects.$(OBJSUFF) \
+		$(COMMDIR)/encconv.$(OBJSUFF) \
+		$(COMMDIR)/event.$(OBJSUFF) \
+		$(COMMDIR)/extended.$(OBJSUFF) \
+		$(COMMDIR)/ffile.$(OBJSUFF) \
+		$(COMMDIR)/file.$(OBJSUFF) \
+		$(COMMDIR)/fileconf.$(OBJSUFF) \
+		$(COMMDIR)/filefn.$(OBJSUFF) \
+		$(COMMDIR)/filename.$(OBJSUFF) \
+		$(COMMDIR)/filesys.$(OBJSUFF) \
+		$(COMMDIR)/fontcmn.$(OBJSUFF) \
+		$(COMMDIR)/fontmap.$(OBJSUFF) \
+		$(COMMDIR)/framecmn.$(OBJSUFF) \
+		$(COMMDIR)/gaugecmn.$(OBJSUFF) \
+		$(COMMDIR)/gdicmn.$(OBJSUFF) \
+		$(COMMDIR)/geometry.$(OBJSUFF) \
+		$(COMMDIR)/gifdecod.$(OBJSUFF) \
+		$(COMMDIR)/hash.$(OBJSUFF) \
+		$(COMMDIR)/helpbase.$(OBJSUFF) \
+		$(COMMDIR)/imagall.$(OBJSUFF) \
+		$(COMMDIR)/imagbmp.$(OBJSUFF) \
+		$(COMMDIR)/image.$(OBJSUFF) \
+		$(COMMDIR)/imaggif.$(OBJSUFF) \
+		$(COMMDIR)/imagjpeg.$(OBJSUFF) \
+		$(COMMDIR)/imagpcx.$(OBJSUFF) \
+		$(COMMDIR)/imagpng.$(OBJSUFF) \
+		$(COMMDIR)/imagpnm.$(OBJSUFF) \
+		$(COMMDIR)/imagtiff.$(OBJSUFF) \
+		$(COMMDIR)/imagxpm.$(OBJSUFF) \
+		$(COMMDIR)/intl.$(OBJSUFF) \
+		$(COMMDIR)/ipcbase.$(OBJSUFF) \
+		$(COMMDIR)/layout.$(OBJSUFF) \
+		$(COMMDIR)/lboxcmn.$(OBJSUFF) \
+		$(COMMDIR)/list.$(OBJSUFF) \
+		$(COMMDIR)/log.$(OBJSUFF) \
+		$(COMMDIR)/longlong.$(OBJSUFF) \
+		$(COMMDIR)/matrix.$(OBJSUFF) \
+		$(COMMDIR)/memory.$(OBJSUFF) \
+		$(COMMDIR)/menucmn.$(OBJSUFF) \
+		$(COMMDIR)/mimecmn.$(OBJSUFF) \
+		$(COMMDIR)/module.$(OBJSUFF) \
+		$(COMMDIR)/mstream.$(OBJSUFF) \
+		$(COMMDIR)/nbkbase.$(OBJSUFF) \
+		$(COMMDIR)/object.$(OBJSUFF) \
+		$(COMMDIR)/paper.$(OBJSUFF) \
+		$(COMMDIR)/popupcmn.$(OBJSUFF) \
+		$(COMMDIR)/prntbase.$(OBJSUFF) \
+		$(COMMDIR)/process.$(OBJSUFF) \
+		$(COMMDIR)/quantize.$(OBJSUFF) \
+		$(COMMDIR)/radiocmn.$(OBJSUFF) \
+		$(COMMDIR)/sizer.$(OBJSUFF) \
+		$(COMMDIR)/statbar.$(OBJSUFF) \
+		$(COMMDIR)/strconv.$(OBJSUFF) \
+		$(COMMDIR)/stream.$(OBJSUFF) \
+		$(COMMDIR)/string.$(OBJSUFF) \
+		$(COMMDIR)/sysopt.$(OBJSUFF) \
+		$(COMMDIR)/tbarbase.$(OBJSUFF) \
+		$(COMMDIR)/textbuf.$(OBJSUFF) \
+		$(COMMDIR)/textcmn.$(OBJSUFF) \
+		$(COMMDIR)/textfile.$(OBJSUFF) \
+		$(COMMDIR)/timercmn.$(OBJSUFF) \
+		$(COMMDIR)/tokenzr.$(OBJSUFF) \
+		$(COMMDIR)/toplvcmn.$(OBJSUFF) \
+		$(COMMDIR)/treebase.$(OBJSUFF) \
+		$(COMMDIR)/txtstrm.$(OBJSUFF) \
+		$(COMMDIR)/utilscmn.$(OBJSUFF) \
+		$(UNIXDIR)/utilsunx.$(OBJSUFF) \
+		$(COMMDIR)/valgen.$(OBJSUFF) \
+		$(COMMDIR)/validate.$(OBJSUFF) \
+		$(COMMDIR)/valtext.$(OBJSUFF) \
+		$(COMMDIR)/variant.$(OBJSUFF) \
+		$(COMMDIR)/wfstream.$(OBJSUFF) \
+		$(COMMDIR)/wincmn.$(OBJSUFF) \
+		$(COMMDIR)/wxchar.$(OBJSUFF) \
+		$(COMMDIR)/xpmdecod.$(OBJSUFF)
+
+HTMLOBJS = \
+                $(HTMLDIR)/helpctrl.$(OBJSUFF) \
+		$(HTMLDIR)/helpdata.$(OBJSUFF) \
+		$(HTMLDIR)/helpfrm.$(OBJSUFF) \
+		$(HTMLDIR)/htmlcell.$(OBJSUFF) \
+		$(HTMLDIR)/htmlfilt.$(OBJSUFF) \
+		$(HTMLDIR)/htmlpars.$(OBJSUFF) \
+		$(HTMLDIR)/htmltag.$(OBJSUFF) \
+		$(HTMLDIR)/htmlwin.$(OBJSUFF) \
+		$(HTMLDIR)/htmprint.$(OBJSUFF) \
+		$(HTMLDIR)/m_dflist.$(OBJSUFF) \
+		$(HTMLDIR)/m_fonts.$(OBJSUFF) \
+		$(HTMLDIR)/m_hline.$(OBJSUFF) \
+		$(HTMLDIR)/m_image.$(OBJSUFF) \
+		$(HTMLDIR)/m_layout.$(OBJSUFF) \
+		$(HTMLDIR)/m_links.$(OBJSUFF) \
+		$(HTMLDIR)/m_list.$(OBJSUFF) \
+		$(HTMLDIR)/m_meta.$(OBJSUFF) \
+		$(HTMLDIR)/m_pre.$(OBJSUFF) \
+		$(HTMLDIR)/m_tables.$(OBJSUFF) \
+		$(HTMLDIR)/winpars.$(OBJSUFF)
+
+MSWOBJS     = \
+		$(MICROWINDIR)/app.$(OBJSUFF) \
+		$(MICROWINDIR)/bitmap.$(OBJSUFF) \
+		$(MICROWINDIR)/brush.$(OBJSUFF) \
+		$(MICROWINDIR)/caret.$(OBJSUFF) \
+		$(MICROWINDIR)/clipbrd.$(OBJSUFF) \
+		$(MICROWINDIR)/colour.$(OBJSUFF) \
+		$(MICROWINDIR)/cursor.$(OBJSUFF) \
+		$(MICROWINDIR)/data.$(OBJSUFF) \
+		$(MICROWINDIR)/dc.$(OBJSUFF) \
+		$(MICROWINDIR)/dcclient.$(OBJSUFF) \
+		$(MICROWINDIR)/dcmemory.$(OBJSUFF) \
+		$(MICROWINDIR)/dcprint.$(OBJSUFF) \
+		$(MICROWINDIR)/dcscreen.$(OBJSUFF) \
+		$(MICROWINDIR)/dde.$(OBJSUFF) \
+		$(MICROWINDIR)/dialog.$(OBJSUFF) \
+		$(MICROWINDIR)/dialup.$(OBJSUFF) \
+		$(UNIXDIR)/dir.$(OBJSUFF) \
+		$(MICROWINDIR)/evtloop.$(OBJSUFF) \
+		$(MICROWINDIR)/font.$(OBJSUFF) \
+		$(MICROWINDIR)/fontenum.$(OBJSUFF) \
+		$(MICROWINDIR)/fontutil.$(OBJSUFF) \
+		$(MICROWINDIR)/gdiimage.$(OBJSUFF) \
+		$(MICROWINDIR)/gdiobj.$(OBJSUFF) \
+		$(MICROWINDIR)/icon.$(OBJSUFF) \
+		$(MICROWINDIR)/main.$(OBJSUFF) \
+		$(MICROWINDIR)/microwin.$(OBJSUFF) \
+		$(MICROWINDIR)/palette.$(OBJSUFF) \
+		$(MICROWINDIR)/pen.$(OBJSUFF) \
+		$(MICROWINDIR)/region.$(OBJSUFF) \
+		$(MICROWINDIR)/settings.$(OBJSUFF) \
+		$(MICROWINDIR)/snglinst.$(OBJSUFF) \
+		$(MICROWINDIR)/thread.$(OBJSUFF) \
+		$(MICROWINDIR)/timer.$(OBJSUFF) \
+		$(MICROWINDIR)/toplevel.$(OBJSUFF) \
+		$(MICROWINDIR)/utils.$(OBJSUFF) \
+		$(MICROWINDIR)/window.$(OBJSUFF) \
+		$(OLEDIR)/dataobj.$(OBJSUFF)
+
+UNIVOBJS_TODO = $(UNIVDIR)/choice.$(OBJSUFF) \
+		$(UNIVDIR)/colordlg.$(OBJSUFF) \
+
+
+UNIVOBJS     = \
+		$(UNIVDIR)/bmpbuttn.$(OBJSUFF) \
+		$(UNIVDIR)/button.$(OBJSUFF) \
+		$(UNIVDIR)/checkbox.$(OBJSUFF) \
+		$(UNIVDIR)/checklst.$(OBJSUFF) \
+		$(UNIVDIR)/colschem.$(OBJSUFF) \
+		$(UNIVDIR)/combobox.$(OBJSUFF) \
+		$(UNIVDIR)/control.$(OBJSUFF) \
+		$(UNIVDIR)/framuniv.$(OBJSUFF) \
+		$(UNIVDIR)/gauge.$(OBJSUFF) \
+		$(UNIVDIR)/inphand.$(OBJSUFF) \
+		$(UNIVDIR)/inpcons.$(OBJSUFF) \
+		$(UNIVDIR)/listbox.$(OBJSUFF) \
+		$(UNIVDIR)/menu.$(OBJSUFF) \
+		$(UNIVDIR)/notebook.$(OBJSUFF) \
+		$(UNIVDIR)/radiobox.$(OBJSUFF) \
+		$(UNIVDIR)/radiobut.$(OBJSUFF) \
+		$(UNIVDIR)/renderer.$(OBJSUFF) \
+		$(UNIVDIR)/scrarrow.$(OBJSUFF) \
+		$(UNIVDIR)/scrolbar.$(OBJSUFF) \
+		$(UNIVDIR)/scrthumb.$(OBJSUFF) \
+		$(UNIVDIR)/slider.$(OBJSUFF) \
+		$(UNIVDIR)/spinbutt.$(OBJSUFF) \
+		$(UNIVDIR)/statbmp.$(OBJSUFF) \
+		$(UNIVDIR)/statbox.$(OBJSUFF) \
+		$(UNIVDIR)/statline.$(OBJSUFF) \
+		$(UNIVDIR)/stattext.$(OBJSUFF) \
+		$(UNIVDIR)/statusbr.$(OBJSUFF) \
+		$(UNIVDIR)/textctrl.$(OBJSUFF) \
+		$(UNIVDIR)/theme.$(OBJSUFF) \
+		$(UNIVDIR)/topluniv.$(OBJSUFF) \
+		$(UNIVDIR)/winuniv.$(OBJSUFF) \
+		$(UNIVDIR)/themes/gtk.$(OBJSUFF) \
+		$(UNIVDIR)/themes/win32.$(OBJSUFF)
+
+include $(CONFIG)
+
+######################## Additional Flags section ############################
+
+# Directories list for header files
+INCLUDEDIRS += -I$(WXDIR)/include
+# Defines for preprocessor
+DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
+
+# Compilation flags for C files OTHER than include directories
+CFLAGS +=
+# Preprocessor flags OTHER than defines
+CPPFLAGS += 
+# Linking flags
+LDFLAGS +=
+
+############################# targets section ################################
+
+# If you want to create a library with the objects files, define the name here
+LIBNAME =
+
+# If we put it below OBJS=, Makefile.rules includes .depend
+# and it continually looks for .c files to satisfy .o.cpp
+# dependency. What's going on there?
+include $(TOP)/Makefile.rules
+
+# List of objects to compile
+OBJS = $(COMMONOBJS) $(MSWOBJS) $(GENERICOBJS) $(UNIVOBJS)
+
+all: $(WXLIB)
+
+######################### Makefile.rules section #############################
+
+
+
+######################## Tools targets section ###############################
+
+#ntest: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config
+#	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS)
+
+$(WXLIB): $(OBJS)
+	ar $(AROPTIONS) $@ $(OBJS)
+	$(RANLIB) $@
+
+#.SUFFIXES: .cpp .cxx .c
+
+#.c.o:
+#	$(CC) -c $(CFLAGS) $(CFLAGS) -o $@ $*.c
+
+.cxx.o:
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cxx
+
+.cpp.o:
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cpp
+
+#$(COMMDIR)/appcmn.o:    $(COMMDIR)/appcmn.cpp
+#	$(CC) -c $(CPPFLAGS) -o $@ $*.cpp
+
+#appcmn.o:	$(COMMDIR)/appcmn.cpp
+#	$(CC) $(CPPFLAGS) -c -o $@ $<
+
+cleanwx:
+	-$(RM) *.o
+	-$(RM) *.bak
+	-$(RM) core
+	-$(RM) ole/*.o
+	-$(RM) ../common/y_tab.c
+	-$(RM) ../common/lex_yy.c
+	-$(RM) ../common/*.o
+	-$(RM) ../common/*.bak
+	-$(RM) ../generic/*.o
+	-$(RM) ../generic/*.bak
+	-$(RM) ../univ/*.o
+	-$(RM) ../univ/*.bak
+	-$(RM) ../univ/themes/*.o
+	-$(RM) ../univ/themes/*.bak
+	-$(RM) ../unix/*.o
+	-$(RM) ../unix/*.bak
+	-$(RM) ../html/*.o
+	-$(RM) ../zlib/*.o
+	-$(RM) ../zlib/*.bak
+	-$(RM) ../png/*.o
+	-$(RM) ../png/*.bak
+	-$(RM) ../jpeg/*.o
+	-$(RM) ../jpeg/*.bak
+	-$(RM) ../tiff/*.o
+	-$(RM) ../tiff/*.bak
diff --git a/Externals/wxWidgets/src/msw/makefile.sl b/Externals/wxWidgets/src/msw/makefile.sl
index 7ccfdec179..296f76b193 100644
--- a/Externals/wxWidgets/src/msw/makefile.sl
+++ b/Externals/wxWidgets/src/msw/makefile.sl
@@ -1,914 +1,914 @@
-#
-# File:		makefile.wat
-# Author:	Julian Smart
-# Created:	1998
-#
-# Makefile : Builds wxWindows library for Salford C++, WIN32
-
-include ..\makesl.env
-
-LIBTARGET   = $(WXLIB)\wx.lib
-EXTRATARGETS = # xpm png zlib
-EXTRATARGETSCLEAN = # clean_xpm clean_png clean_zlib
-GENDIR=$(WXDIR)\src\generic
-COMMDIR=$(WXDIR)\src\common
-XPMDIR=$(WXDIR)\src\xpm
-OLEDIR=ole
-MSWDIR=$(WXDIR)\src\msw
-
-GENERICOBJS= choicdgg.obj \
-  dirdlgg.obj \
-  gridg.obj \
-  laywin.obj \
-  panelg.obj \
-  prop.obj \
-  progdlgg.obj \
-  propform.obj \
-  proplist.obj \
-  sashwin.obj \
-  scrolwin.obj \
-  splitter.obj \
-  statusbr.obj \
-  tabg.obj \
-  textdlgg.obj
-
-# These are generic things that don't need to be compiled on MSW,
-# but sometimes it's useful to do so for testing purposes.
-NONESSENTIALOBJS= printps.obj \
-  prntdlgg.obj \
-  msgdlgg.obj \
-  colrdlgg.obj \
-  fontdlgg.obj
-
-COMMONOBJS = cmndata.obj \
-  config.obj \
-  dcbase.obj \
-  docview.obj \
-  docmdi.obj \
-  dynarray.obj \
-  dynlib.obj \
-  event.obj \
-  file.obj \
-  filefn.obj \
-  fileconf.obj \
-  framecmn.obj \
-  gdicmn.obj \
-  image.obj \
-  intl.obj \
-  ipcbase.obj \
-  helpbase.obj \
-  layout.obj \
-  log.obj \
-  memory.obj \
-  module.obj \
-  object.obj \
-  prntbase.obj \
-  resource.obj \
-  tbarbase.obj \
-  tbarsmpl.obj \
-  textfile.obj \
-  timercmn.obj \
-  utilscmn.obj \
-  validate.obj \
-  valgen.obj \
-  valtext.obj \
-  date.obj \
-  hash.obj \
-  list.obj \
-  paper.obj \
-  string.obj \
-  socket.obj \
-  sckint.obj \
-  sckaddr.obj \
-  sckfile.obj \
-  sckipc.obj \
-  sckstrm.obj \
-  url.obj \
-  http.obj \
-  protocol.obj \
-  time.obj \
-  tokenzr.obj \
-  wxexpr.obj \
-  y_tab.obj \
-  extended.obj \
-  process.obj \
-  wfstream.obj \
-  mstream.obj \
-  zstream.obj \
-  stream.obj \
-  datstrm.obj \
-  objstrm.obj \
-  variant.obj \
-  wincmn.obj \
-  wxchar.obj
-
-# Can't compile these yet under Salford C++
-#  mimetype.obj \
-#  db.obj \
-#  dbtable.obj \
-
-MSWOBJS = \
-  accel.obj \
-  app.obj \
-  bitmap.obj \
-  bmpbuttn.obj \
-  brush.obj \
-  button.obj \
-  checkbox.obj \
-  checklst.obj \
-  caret.obj \
-  choice.obj \
-  clipbrd.obj \
-  colordlg.obj \
-  colour.obj \
-  combobox.obj \
-  control.obj \
-  curico.obj \
-  cursor.obj \
-  data.obj \
-  dc.obj \
-  dcmemory.obj \
-  dcclient.obj \
-  dcprint.obj \
-  dcscreen.obj \
-  dde.obj \
-  dialog.obj \
-  dib.obj \
-  dibutils.obj \
-  filedlg.obj \
-  font.obj \
-  fontdlg.obj \
-  frame.obj \
-  gauge95.obj \
-  gdiobj.obj \
-  helpwin.obj \
-  icon.obj \
-  imaglist.obj \
-  iniconf.obj \
-  joystick.obj \
-  listbox.obj \
-  listctrl.obj \
-  main.obj \
-  mdi.obj \
-  menu.obj \
-  menuitem.obj \
-  metafile.obj \
-  minifram.obj \
-  msgdlg.obj \
-  nativdlg.obj \
-  notebook.obj \
-  ownerdrw.obj \
-  palette.obj \
-  pen.obj \
-  penwin.obj \
-  printdlg.obj \
-  printwin.obj \
-  radiobox.obj \
-  radiobut.obj \
-  region.obj \
-  registry.obj \
-  regconf.obj \
-  scrolbar.obj \
-  settings.obj \
-  slidrmsw.obj \
-  slider95.obj \
-  spinbutt.obj \
-  statbmp.obj \
-  statbox.obj \
-  statbr95.obj \
-  stattext.obj \
-  tabctrl.obj \
-  taskbar.obj \
-  tbar95.obj \
-  tbarmsw.obj \
-  textctrl.obj \
-  thread.obj \
-  timer.obj \
-  tooltip.obj \
-  treectrl.obj \
-  utils.obj \
-  utilsexc.obj \
-  wave.obj \
-  window.obj
-
-# No OLE functions for wxDirDialog: use generic one instead
-#  dirdlg.obj \
-#  pnghand.obj \
-#  xpmhand.obj \
-
-OLEOBJS = \
-  droptgt.obj \
-  dropsrc.obj \
-  dataobj.obj \
-  oleutils.obj \
-  uuid.obj \
-  automtn.obj
-
-# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
-OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) # $(OLEOBJS)
-
-all:        $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
-
-$(LIBTARGET) : $(OBJECTS)
-    slink $$salford.lnk
-
-clean:   $(EXTRATARGETSCLEAN)
-    -erase *.obj
-    -erase $(LIBTARGET)
-    -erase *.pch
-    -erase *.err
-
-cleanall:   clean
-
-test:   test.obj
-
-test.obj:     test.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) test.cpp
-
-accel.obj:     $(MSWDIR)\accel.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\accel.cpp /BINARY accel.obj
-
-app.obj:     $(MSWDIR)\app.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\app.cpp /BINARY app.obj
-
-bitmap.obj:     $(MSWDIR)\bitmap.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\bitmap.cpp /BINARY bitmap.obj
-
-bmpbuttn.obj:     $(MSWDIR)\bmpbuttn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\bmpbuttn.cpp /BINARY bmpbuttn.obj
-
-brush.obj:     $(MSWDIR)\brush.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\brush.cpp /BINARY brush.obj
-
-button.obj:     $(MSWDIR)\button.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\button.cpp /BINARY button.obj
-
-caret.obj:     $(MSWDIR)\caret.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\caret.cpp /BINARY caret.obj
-
-choice.obj:     $(MSWDIR)\choice.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\choice.cpp /BINARY choice.obj
-
-checkbox.obj:     $(MSWDIR)\checkbox.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\checkbox.cpp /BINARY checkbox.obj
-
-checklst.obj:     $(MSWDIR)\checklst.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\checklst.cpp /BINARY checklst.obj
-
-clipbrd.obj:     $(MSWDIR)\clipbrd.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\clipbrd.cpp /BINARY clipbrd.obj
-
-colordlg.obj:     $(MSWDIR)\colordlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\colordlg.cpp /BINARY colordlg.obj
-
-colour.obj:     $(MSWDIR)\colour.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\colour.cpp /BINARY colour.obj
-
-combobox.obj:     $(MSWDIR)\combobox.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\combobox.cpp /BINARY combobox.obj
-
-control.obj:     $(MSWDIR)\control.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\control.cpp /BINARY control.obj
-
-curico.obj:     $(MSWDIR)\curico.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\curico.cpp /BINARY curico.obj
-
-cursor.obj:     $(MSWDIR)\cursor.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\cursor.cpp /BINARY cursor.obj
-
-data.obj:     $(MSWDIR)\data.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\data.cpp /BINARY data.obj
-
-dde.obj:     $(MSWDIR)\dde.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dde.cpp /BINARY dde.obj
-
-dc.obj:     $(MSWDIR)\dc.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dc.cpp /BINARY dc.obj
-
-dcmemory.obj:     $(MSWDIR)\dcmemory.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcmemory.cpp /BINARY dcmemory.obj
-
-dcclient.obj:     $(MSWDIR)\dcclient.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcclient.cpp /BINARY dcclient.obj
-
-dcprint.obj:     $(MSWDIR)\dcprint.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcprint.cpp /BINARY dcprint.obj
-
-dcscreen.obj:     $(MSWDIR)\dcscreen.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcscreen.cpp /BINARY dcscreen.obj
-
-dialog.obj:     $(MSWDIR)\dialog.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dialog.cpp /BINARY dialog.obj
-
-dib.obj:     $(MSWDIR)\dib.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dib.cpp /BINARY dib.obj
-
-dibutils.obj:     $(MSWDIR)\dibutils.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dibutils.cpp /BINARY dibutils.obj
-
-dirdlg.obj:     $(MSWDIR)\dirdlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dirdlg.cpp /BINARY dirdlg.obj
-
-filedlg.obj:     $(MSWDIR)\filedlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\filedlg.cpp /BINARY filedlg.obj
-
-font.obj:     $(MSWDIR)\font.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\font.cpp /BINARY font.obj
-
-fontdlg.obj:     $(MSWDIR)\fontdlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\fontdlg.cpp /BINARY fontdlg.obj
-
-frame.obj:     $(MSWDIR)\frame.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\frame.cpp /BINARY frame.obj
-
-gauge95.obj:     $(MSWDIR)\gauge95.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\gauge95.cpp /BINARY gauge95.obj
-
-gdiobj.obj:     $(MSWDIR)\gdiobj.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\gdiobj.cpp /BINARY gdiobj.obj
-
-helpwin.obj:     $(MSWDIR)\helpwin.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\helpwin.cpp /BINARY helpwin.obj
-
-icon.obj:     $(MSWDIR)\icon.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\icon.cpp /BINARY icon.obj
-
-imaglist.obj:     $(MSWDIR)\imaglist.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\imaglist.cpp /BINARY imaglist.obj
-
-iniconf.obj:     $(MSWDIR)\iniconf.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\iniconf.cpp /BINARY iniconf.obj
-
-joystick.obj:     $(MSWDIR)\joystick.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\joystick.cpp /BINARY joystick.obj
-
-listbox.obj:     $(MSWDIR)\listbox.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\listbox.cpp /BINARY listbox.obj
-
-listctrl.obj:     $(MSWDIR)\listctrl.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\listctrl.cpp /BINARY listctrl.obj
-
-main.obj:     $(MSWDIR)\main.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\main.cpp /BINARY main.obj
-
-mdi.obj:     $(MSWDIR)\mdi.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\mdi.cpp /BINARY mdi.obj
-
-menu.obj:     $(MSWDIR)\menu.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\menu.cpp /BINARY menu.obj
-
-menuitem.obj:     $(MSWDIR)\menuitem.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\menuitem.cpp /BINARY menuitem.obj
-
-metafile.obj:     $(MSWDIR)\metafile.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\metafile.cpp /BINARY metafile.obj
-
-minifram.obj:     $(MSWDIR)\minifram.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\minifram.cpp /BINARY minifram.obj
-
-msgdlg.obj:     $(MSWDIR)\msgdlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\msgdlg.cpp /BINARY msgdlg.obj
-
-nativdlg.obj:     $(MSWDIR)\nativdlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\nativdlg.cpp /BINARY nativdlg.obj
-
-notebook.obj:     $(MSWDIR)\notebook.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\notebook.cpp /BINARY notebook.obj
-
-ownerdrw.obj:     $(MSWDIR)\ownerdrw.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\ownerdrw.cpp /BINARY ownerdrw.obj
-
-palette.obj:     $(MSWDIR)\palette.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\palette.cpp /BINARY palette.obj
-
-pen.obj:     $(MSWDIR)\pen.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\pen.cpp /BINARY pen.obj
-
-penwin.obj:     $(MSWDIR)\penwin.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\penwin.cpp /BINARY penwin.obj
-
-printdlg.obj:     $(MSWDIR)\printdlg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\printdlg.cpp /BINARY printdlg.obj
-
-printwin.obj:     $(MSWDIR)\printwin.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\printwin.cpp /BINARY printwin.obj
-
-radiobox.obj:     $(MSWDIR)\radiobox.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\radiobox.cpp /BINARY radiobox.obj
-
-radiobut.obj:     $(MSWDIR)\radiobut.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\radiobut.cpp /BINARY radiobut.obj
-
-region.obj:     $(MSWDIR)\region.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\region.cpp /BINARY region.obj
-
-registry.obj:     $(MSWDIR)\registry.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\registry.cpp /BINARY registry.obj
-
-regconf.obj:     $(MSWDIR)\regconf.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\regconf.cpp /BINARY regconf.obj
-
-scrolbar.obj:     $(MSWDIR)\scrolbar.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\scrolbar.cpp /BINARY scrolbar.obj
-
-settings.obj:     $(MSWDIR)\settings.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\settings.cpp /BINARY settings.obj
-
-slidrmsw.obj:     $(MSWDIR)\slidrmsw.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slidrmsw.cpp /BINARY slidrmsw.obj
-
-slider95.obj:     $(MSWDIR)\slider95.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slider95.cpp /BINARY slider95.obj
-
-spinbutt.obj:     $(MSWDIR)\spinbutt.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\spinbutt.cpp /BINARY spinbutt.obj
-
-statbmp.obj:     $(MSWDIR)\statbmp.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\statbmp.cpp /BINARY statbmp.obj
-
-statbox.obj:     $(MSWDIR)\statbox.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\statbox.cpp /BINARY statbox.obj
-
-statbr95.obj:     $(MSWDIR)\statbr95.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\statbr95.cpp /BINARY statbr95.obj
-
-stattext.obj:     $(MSWDIR)\stattext.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\stattext.cpp /BINARY stattext.obj
-
-tabctrl.obj:     $(MSWDIR)\tabctrl.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tabctrl.cpp /BINARY tabctrl.obj
-
-taskbar.obj:     $(MSWDIR)\taskbar.cpp
-        cl @<<
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\taskbar.cpp /BINARY taskbar.obj
-
-tbar95.obj:     $(MSWDIR)\tbar95.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tbar95.cpp /BINARY tbar95.obj
-
-tbarmsw.obj:     $(MSWDIR)\tbarmsw.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tbarmsw.cpp /BINARY tbarmsw.obj
-
-textctrl.obj:     $(MSWDIR)\textctrl.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\textctrl.cpp /BINARY textctrl.obj
-
-thread.obj:     $(MSWDIR)\thread.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\thread.cpp /BINARY thread.obj
-
-timer.obj:     $(MSWDIR)\timer.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\timer.cpp /BINARY timer.obj
-
-tooltip.obj:     $(MSWDIR)\tooltip.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tooltip.cpp /BINARY tooltip.obj
-
-treectrl.obj:     $(MSWDIR)\treectrl.cpp
-        cl @<<
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\treectrl.cpp /BINARY treectrl.obj
-
-utils.obj:     $(MSWDIR)\utils.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\utils.cpp /BINARY utils.obj
-
-utilsexc.obj:     $(MSWDIR)\utilsexc.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\utilsexc.cpp /BINARY utilsexc.obj
-
-wave.obj:     $(MSWDIR)\wave.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\wave.cpp /BINARY wave.obj
-
-window.obj:     $(MSWDIR)\window.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\window.cpp /BINARY window.obj
-
-xpmhand.obj:     $(MSWDIR)\xpmhand.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\xpmhand.cpp /BINARY xpmhand.obj
-
-droptgt.obj:     $(OLEDIR)\droptgt.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\droptgt.cpp /BINARY droptgt.obj
-
-dropsrc.obj:     $(OLEDIR)\dropsrc.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\dropsrc.cpp /BINARY dropsrc.obj
-
-dataobj.obj:     $(OLEDIR)\dataobj.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\dataobj.cpp /BINARY dataobj.obj
-
-oleutils.obj:     $(OLEDIR)\oleutils.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\oleutils.cpp /BINARY oleutils.obj
-
-uuid.obj:     $(OLEDIR)\uuid.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\uuid.cpp /BINARY uuid.obj
-
-automtn.obj:     $(OLEDIR)\automtn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\automtn.cpp /BINARY automtn.obj
-
-########################################################
-# Common objects (always compiled)
-
-cmndata.obj:     $(COMMDIR)\cmndata.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\cmndata.cpp /BINARY cmndata.obj
-
-config.obj:     $(COMMDIR)\config.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\config.cpp /BINARY config.obj
-
-dcbase.obj:     $(COMMDIR)\dcbase.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dcbase.cpp /BINARY dcbase.obj
-
-db.obj:     $(COMMDIR)\db.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\db.cpp /BINARY db.obj
-
-dbtable.obj:     $(COMMDIR)\dbtable.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dbtable.cpp /BINARY dbtable.obj
-
-docview.obj:     $(COMMDIR)\docview.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\docview.cpp /BINARY docview.obj
-
-docmdi.obj:     $(COMMDIR)\docmdi.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\docmdi.cpp /BINARY docmdi.obj
-
-dynarray.obj:     $(COMMDIR)\dynarray.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dynarray.cpp /BINARY dynarray.obj
-
-dynlib.obj:     $(COMMDIR)\dynlib.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dynlib.cpp /BINARY dynlib.obj
-
-event.obj:     $(COMMDIR)\event.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\event.cpp /BINARY event.obj
-
-file.obj:     $(COMMDIR)\file.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\file.cpp /BINARY file.obj
-
-fileconf.obj:     $(COMMDIR)\fileconf.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\fileconf.cpp /BINARY fileconf.obj
-
-filefn.obj:     $(COMMDIR)\filefn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\filefn.cpp /BINARY filefn.obj
-
-framecmn.obj:     $(COMMDIR)\framecmn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\framecmn.cpp /BINARY framecmn.obj
-
-gdicmn.obj:     $(COMMDIR)\gdicmn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\gdicmn.cpp /BINARY gdicmn.obj
-
-image.obj:     $(COMMDIR)\image.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\image.cpp /BINARY image.obj
-
-intl.obj:     $(COMMDIR)\intl.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\intl.cpp /BINARY intl.obj
-
-ipcbase.obj:     $(COMMDIR)\ipcbase.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\ipcbase.cpp /BINARY ipcbase.obj
-
-helpbase.obj:     $(COMMDIR)\helpbase.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\helpbase.cpp /BINARY helpbase.obj
-
-layout.obj:     $(COMMDIR)\layout.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\layout.cpp /BINARY layout.obj
-
-log.obj:     $(COMMDIR)\log.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\log.cpp /BINARY log.obj
-
-memory.obj:     $(COMMDIR)\memory.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\memory.cpp /BINARY memory.obj
-
-mimetype.obj:     $(COMMDIR)\mimetype.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\mimetype.cpp /BINARY mimetype.obj
-
-module.obj:     $(COMMDIR)\module.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\module.cpp /BINARY module.obj
-
-object.obj:     $(COMMDIR)\object.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\object.cpp /BINARY object.obj
-
-prntbase.obj:     $(COMMDIR)\prntbase.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\prntbase.cpp /BINARY prntbase.obj
-
-resource.obj:     $(COMMDIR)\resource.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\resource.cpp /BINARY resource.obj
-
-tbarbase.obj:     $(COMMDIR)\tbarbase.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\tbarbase.cpp /BINARY tbarbase.obj
-
-tbarsmpl.obj:     $(COMMDIR)\tbarsmpl.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\tbarsmpl.cpp /BINARY tbarsmpl.obj
-
-textfile.obj:     $(COMMDIR)\textfile.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\textfile.cpp /BINARY textfile.obj
-
-timercmn.obj:     $(COMMDIR)\timercmn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\timercmn.cpp /BINARY timercmn.obj
-
-utilscmn.obj:     $(COMMDIR)\utilscmn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\utilscmn.cpp /BINARY utilscmn.obj
-
-validate.obj:     $(COMMDIR)\validate.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\validate.cpp /BINARY validate.obj
-
-valgen.obj:     $(COMMDIR)\valgen.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\valgen.cpp /BINARY valgen.obj
-
-valtext.obj:     $(COMMDIR)\valtext.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\valtext.cpp /BINARY valtext.obj
-
-date.obj:     $(COMMDIR)\date.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\date.cpp /BINARY date.obj
-
-wxexpr.obj:     $(COMMDIR)\wxexpr.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wxexpr.cpp /BINARY wxexpr.obj
-
-hash.obj:     $(COMMDIR)\hash.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\hash.cpp /BINARY hash.obj
-
-list.obj:     $(COMMDIR)\list.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\list.cpp /BINARY list.obj
-
-paper.obj:     $(COMMDIR)\paper.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\paper.cpp /BINARY paper.obj
-
-string.obj:     $(COMMDIR)\string.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\string.cpp /BINARY string.obj
-
-socket.obj:     $(COMMDIR)\socket.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\socket.cpp /BINARY socket.obj
-
-sckint.obj:     $(COMMDIR)\sckint.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckint.cpp /BINARY sckint.obj
-
-sckaddr.obj:     $(COMMDIR)\sckaddr.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckaddr.cpp /BINARY sckaddr.obj
-
-sckfile.obj:     $(COMMDIR)\sckfile.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckfile.cpp /BINARY sckfile.obj
-
-sckipc.obj:     $(COMMDIR)\sckipc.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckipc.cpp /BINARY sckipc.obj
-
-sckstrm.obj:     $(COMMDIR)\sckstrm.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckstrm.cpp /BINARY sckstrm.obj
-
-url.obj:     $(COMMDIR)\url.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\url.cpp /BINARY url.obj
-
-http.obj:     $(COMMDIR)\http.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\http.cpp /BINARY http.obj
-
-protocol.obj:     $(COMMDIR)\protocol.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\protocol.cpp /BINARY protocol.obj
-
-tokenzr.obj:     $(COMMDIR)\tokenzr.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\tokenzr.cpp /BINARY tokenzr.obj
-
-matrix.obj:     $(COMMDIR)\matrix.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\matrix.cpp /BINARY matrix.obj
-
-time.obj:     $(COMMDIR)\time.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\time.cpp /BINARY time.obj
-
-stream.obj:     $(COMMDIR)\stream.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\stream.cpp /BINARY stream.obj
-
-wfstream.obj:     $(COMMDIR)\wfstream.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wfstream.cpp /BINARY wfstream.obj
-
-mstream.obj:     $(COMMDIR)\mstream.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\mstream.cpp /BINARY mstream.obj
-
-zstream.obj:     $(COMMDIR)\zstream.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\zstream.cpp /BINARY zstream.obj
-
-datstrm.obj:     $(COMMDIR)\datstrm.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\datstrm.cpp /BINARY datstrm.obj
-
-objstrm.obj:     $(COMMDIR)\objstrm.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\objstrm.cpp /BINARY objstrm.obj
-
-extended.obj:     $(COMMDIR)\extended.c
-  $(CC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\extended.c /BINARY extended.obj
-
-process.obj:     $(COMMDIR)\process.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\process.cpp /BINARY process.obj
-
-variant.obj:     $(COMMDIR)\variant.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\variant.cpp /BINARY variant.obj
-
-wincmn.obj:     $(COMMDIR)\wincmn.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wincmn.cpp /BINARY wincmn.obj
-
-wxchar.obj:     $(COMMDIR)\wxcharp.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wxchar.cpp /BINARY wxchar.obj
-
-########################################################
-# Generic objects (not always compiled, depending on
-# whether platforms have native implementations)
-
-choicdgg.obj:     $(GENDIR)\choicdgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\choicdgg.cpp /BINARY choicdgg.obj
-
-colrdlgg.obj:     $(GENDIR)\colrdgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\colrdgg.cpp /BINARY colordgg.obj
-
-dirdlgg.obj:     $(GENDIR)\dirdlgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\dirdlgg.cpp /BINARY dirdlgg.obj
-
-fontdlgg.obj:     $(GENDIR)\fontdlgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\fontdlgg.cpp /BINARY fontdlgg.obj
-
-gridg.obj:     $(GENDIR)\gridg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\gridg.cpp /BINARY gridg.obj
-
-laywin.obj:     $(GENDIR)\laywin.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\laywin.cpp /BINARY laywin.obj
-
-msgdlgg.obj:     $(GENDIR)\msgdlgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\msgdlgg.cpp /BINARY msgdlgg.obj
-
-panelg.obj:     $(GENDIR)\panelg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\panelg.cpp /BINARY panelg.obj
-
-printps.obj:     $(GENDIR)\printps.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\printps.cpp /BINARY printps.obj
-
-progdlgg.obj:     $(GENDIR)\progdlgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\progdlgg.cpp /BINARY progdlgg.obj
-
-prop.obj:     $(GENDIR)\prop.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\prop.cpp /BINARY prop.obj
-
-propform.obj:     $(GENDIR)\propform.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\propform.cpp /BINARY propform.obj
-
-proplist.obj:     $(GENDIR)\proplist.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\proplist.cpp /BINARY proplist.obj
-
-prntdlgg.obj:     $(GENDIR)\prntdlgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\prntdlgg.cpp /BINARY prntdlgg.obj
-
-sashwin.obj:     $(GENDIR)\sashwin.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\sashwin.cpp /BINARY sashwin.obj
-
-scrolwin.obj:     $(GENDIR)\scrolwin.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\scrolwin.cpp /BINARY scrolwin.obj
-
-splitter.obj:     $(GENDIR)\splitter.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\splitter.cpp /BINARY splitter.obj
-
-statusbr.obj:     $(GENDIR)\statusbr.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\statusbr.cpp /BINARY statusbr.obj
-
-tabg.obj:     $(GENDIR)\tabg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\tabg.cpp /BINARY tabg.obj
-
-textdlgg.obj: $(GENDIR)\textdlgg.cpp
-  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\textdlgg.cpp /BINARY textdlgg.obj
-
-crbuffri.obj: $(XPMDIR)\crbuffri.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crbuffri.c
-
-crbuffrp.obj: $(XPMDIR)\crbuffrp.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crbuffrp.c
-
-crdatfri.obj: $(XPMDIR)\crdatfri.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crdatfri.c
-
-crdatfrp.obj: $(XPMDIR)\crdatfrp.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crdatfrp.c
-
-create.obj: $(XPMDIR)\create.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\create.c
-
-crifrbuf.obj: $(XPMDIR)\crifrbuf.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crifrbuf.c
-
-crifrdat.obj: $(XPMDIR)\crifrdat.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crifrdat.c
-
-crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crpfrbuf.c
-
-crpfrdat.obj: $(XPMDIR)\crpfrdat.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crpfrdat.c
-
-dataxpm.obj: $(XPMDIR)\data.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\data.c /BINARY dataxpm.obj
-
-hashtab.obj: $(XPMDIR)\hashtab.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\hashtab.c
-
-misc.obj: $(XPMDIR)\misc.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\misc.c
-
-parse.obj: $(XPMDIR)\parse.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\parse.c
-
-rdftodat.obj: $(XPMDIR)\rdftodat.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rdftodat.c
-
-rdftoi.obj: $(XPMDIR)\rdftoi.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rdftoi.c
-
-rdftop.obj: $(XPMDIR)\rdftop.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rdftop.c
-
-rgb.obj: $(XPMDIR)\rgb.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rgb.c
-
-scan.obj: $(XPMDIR)\scan.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\scan.c
-
-simx.obj: $(XPMDIR)\simx.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\simx.c
-
-wrffrdat.obj: $(XPMDIR)\wrffrdat.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\wrffrdat.c
-
-wrffri.obj: $(XPMDIR)\wrffri.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\wrffri.c
-
-wrffrp.obj: $(XPMDIR)\wrffrp.c
-  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\wrffrp.c
-
-OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
-  trees$(O) 
-OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
-  infutil$(O) inffast$(O) 
-
-adler32.obj: adler32.c zutil.h zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-compress.obj: compress.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-crc32.obj: crc32.c zutil.h zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
-   infcodes.h infutil.h
-	$(CC) -c $(CFLAGS) $*.c
-
-infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
-   infcodes.h inffast.h
-	$(CC) -c $(CFLAGS) $*.c
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
-	$(CC) -c $(CFLAGS) $*.c
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-	$(CC) -c $(CFLAGS) $*.c
-
-infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
-	$(CC) -c $(CFLAGS) $*.c
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
-	$(CC) -c $(CFLAGS) $*.c
-
-trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-
-y_tab.obj:     $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
-  $(CC) /ANSI_C $(CPPFLAGS) $(IFLAGS) /DEFINE USE_DEFINE $(COMMDIR)\y_tab.c /BINARY y_tab.obj
-
-$(COMMDIR)\y_tab.c:     $(COMMDIR)\dosyacc.c
-        copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
-
-$(COMMDIR)\lex_yy.c:    $(COMMDIR)\doslex.c
-    copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
-
-xpm:   
-    cd $(WXDIR)\src\xpm
-    wmake -f makefile.wat all
-    cd $(WXDIR)\src\msw
-
-clean_xpm:   
-    cd $(WXDIR)\src\xpm
-    wmake -f makefile.wat clean
-    cd $(WXDIR)\src\msw
-
-png:   
-    cd $(WXDIR)\src\png
-    wmake -f makefile.wat all
-    cd $(WXDIR)\src\msw
-
-clean_png:   
-    cd $(WXDIR)\src\png
-    wmake -f makefile.wat clean
-    cd $(WXDIR)\src\msw
-
-zlib:   
-    cd $(WXDIR)\src\zlib
-    wmake -f makefile.wat all
-    cd $(WXDIR)\src\msw
-
-clean_zlib:   
-    cd $(WXDIR)\src\zlib
-    wmake -f makefile.wat clean
-    cd $(WXDIR)\src\msw
-
-
+#
+# File:		makefile.wat
+# Author:	Julian Smart
+# Created:	1998
+#
+# Makefile : Builds wxWindows library for Salford C++, WIN32
+
+include ..\makesl.env
+
+LIBTARGET   = $(WXLIB)\wx.lib
+EXTRATARGETS = # xpm png zlib
+EXTRATARGETSCLEAN = # clean_xpm clean_png clean_zlib
+GENDIR=$(WXDIR)\src\generic
+COMMDIR=$(WXDIR)\src\common
+XPMDIR=$(WXDIR)\src\xpm
+OLEDIR=ole
+MSWDIR=$(WXDIR)\src\msw
+
+GENERICOBJS= choicdgg.obj \
+  dirdlgg.obj \
+  gridg.obj \
+  laywin.obj \
+  panelg.obj \
+  prop.obj \
+  progdlgg.obj \
+  propform.obj \
+  proplist.obj \
+  sashwin.obj \
+  scrolwin.obj \
+  splitter.obj \
+  statusbr.obj \
+  tabg.obj \
+  textdlgg.obj
+
+# These are generic things that don't need to be compiled on MSW,
+# but sometimes it's useful to do so for testing purposes.
+NONESSENTIALOBJS= printps.obj \
+  prntdlgg.obj \
+  msgdlgg.obj \
+  colrdlgg.obj \
+  fontdlgg.obj
+
+COMMONOBJS = cmndata.obj \
+  config.obj \
+  dcbase.obj \
+  docview.obj \
+  docmdi.obj \
+  dynarray.obj \
+  dynlib.obj \
+  event.obj \
+  file.obj \
+  filefn.obj \
+  fileconf.obj \
+  framecmn.obj \
+  gdicmn.obj \
+  image.obj \
+  intl.obj \
+  ipcbase.obj \
+  helpbase.obj \
+  layout.obj \
+  log.obj \
+  memory.obj \
+  module.obj \
+  object.obj \
+  prntbase.obj \
+  resource.obj \
+  tbarbase.obj \
+  tbarsmpl.obj \
+  textfile.obj \
+  timercmn.obj \
+  utilscmn.obj \
+  validate.obj \
+  valgen.obj \
+  valtext.obj \
+  date.obj \
+  hash.obj \
+  list.obj \
+  paper.obj \
+  string.obj \
+  socket.obj \
+  sckint.obj \
+  sckaddr.obj \
+  sckfile.obj \
+  sckipc.obj \
+  sckstrm.obj \
+  url.obj \
+  http.obj \
+  protocol.obj \
+  time.obj \
+  tokenzr.obj \
+  wxexpr.obj \
+  y_tab.obj \
+  extended.obj \
+  process.obj \
+  wfstream.obj \
+  mstream.obj \
+  zstream.obj \
+  stream.obj \
+  datstrm.obj \
+  objstrm.obj \
+  variant.obj \
+  wincmn.obj \
+  wxchar.obj
+
+# Can't compile these yet under Salford C++
+#  mimetype.obj \
+#  db.obj \
+#  dbtable.obj \
+
+MSWOBJS = \
+  accel.obj \
+  app.obj \
+  bitmap.obj \
+  bmpbuttn.obj \
+  brush.obj \
+  button.obj \
+  checkbox.obj \
+  checklst.obj \
+  caret.obj \
+  choice.obj \
+  clipbrd.obj \
+  colordlg.obj \
+  colour.obj \
+  combobox.obj \
+  control.obj \
+  curico.obj \
+  cursor.obj \
+  data.obj \
+  dc.obj \
+  dcmemory.obj \
+  dcclient.obj \
+  dcprint.obj \
+  dcscreen.obj \
+  dde.obj \
+  dialog.obj \
+  dib.obj \
+  dibutils.obj \
+  filedlg.obj \
+  font.obj \
+  fontdlg.obj \
+  frame.obj \
+  gauge95.obj \
+  gdiobj.obj \
+  helpwin.obj \
+  icon.obj \
+  imaglist.obj \
+  iniconf.obj \
+  joystick.obj \
+  listbox.obj \
+  listctrl.obj \
+  main.obj \
+  mdi.obj \
+  menu.obj \
+  menuitem.obj \
+  metafile.obj \
+  minifram.obj \
+  msgdlg.obj \
+  nativdlg.obj \
+  notebook.obj \
+  ownerdrw.obj \
+  palette.obj \
+  pen.obj \
+  penwin.obj \
+  printdlg.obj \
+  printwin.obj \
+  radiobox.obj \
+  radiobut.obj \
+  region.obj \
+  registry.obj \
+  regconf.obj \
+  scrolbar.obj \
+  settings.obj \
+  slidrmsw.obj \
+  slider95.obj \
+  spinbutt.obj \
+  statbmp.obj \
+  statbox.obj \
+  statbr95.obj \
+  stattext.obj \
+  tabctrl.obj \
+  taskbar.obj \
+  tbar95.obj \
+  tbarmsw.obj \
+  textctrl.obj \
+  thread.obj \
+  timer.obj \
+  tooltip.obj \
+  treectrl.obj \
+  utils.obj \
+  utilsexc.obj \
+  wave.obj \
+  window.obj
+
+# No OLE functions for wxDirDialog: use generic one instead
+#  dirdlg.obj \
+#  pnghand.obj \
+#  xpmhand.obj \
+
+OLEOBJS = \
+  droptgt.obj \
+  dropsrc.obj \
+  dataobj.obj \
+  oleutils.obj \
+  uuid.obj \
+  automtn.obj
+
+# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) # $(OLEOBJS)
+
+all:        $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
+
+$(LIBTARGET) : $(OBJECTS)
+    slink $$salford.lnk
+
+clean:   $(EXTRATARGETSCLEAN)
+    -erase *.obj
+    -erase $(LIBTARGET)
+    -erase *.pch
+    -erase *.err
+
+cleanall:   clean
+
+test:   test.obj
+
+test.obj:     test.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) test.cpp
+
+accel.obj:     $(MSWDIR)\accel.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\accel.cpp /BINARY accel.obj
+
+app.obj:     $(MSWDIR)\app.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\app.cpp /BINARY app.obj
+
+bitmap.obj:     $(MSWDIR)\bitmap.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\bitmap.cpp /BINARY bitmap.obj
+
+bmpbuttn.obj:     $(MSWDIR)\bmpbuttn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\bmpbuttn.cpp /BINARY bmpbuttn.obj
+
+brush.obj:     $(MSWDIR)\brush.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\brush.cpp /BINARY brush.obj
+
+button.obj:     $(MSWDIR)\button.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\button.cpp /BINARY button.obj
+
+caret.obj:     $(MSWDIR)\caret.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\caret.cpp /BINARY caret.obj
+
+choice.obj:     $(MSWDIR)\choice.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\choice.cpp /BINARY choice.obj
+
+checkbox.obj:     $(MSWDIR)\checkbox.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\checkbox.cpp /BINARY checkbox.obj
+
+checklst.obj:     $(MSWDIR)\checklst.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\checklst.cpp /BINARY checklst.obj
+
+clipbrd.obj:     $(MSWDIR)\clipbrd.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\clipbrd.cpp /BINARY clipbrd.obj
+
+colordlg.obj:     $(MSWDIR)\colordlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\colordlg.cpp /BINARY colordlg.obj
+
+colour.obj:     $(MSWDIR)\colour.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\colour.cpp /BINARY colour.obj
+
+combobox.obj:     $(MSWDIR)\combobox.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\combobox.cpp /BINARY combobox.obj
+
+control.obj:     $(MSWDIR)\control.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\control.cpp /BINARY control.obj
+
+curico.obj:     $(MSWDIR)\curico.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\curico.cpp /BINARY curico.obj
+
+cursor.obj:     $(MSWDIR)\cursor.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\cursor.cpp /BINARY cursor.obj
+
+data.obj:     $(MSWDIR)\data.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\data.cpp /BINARY data.obj
+
+dde.obj:     $(MSWDIR)\dde.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dde.cpp /BINARY dde.obj
+
+dc.obj:     $(MSWDIR)\dc.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dc.cpp /BINARY dc.obj
+
+dcmemory.obj:     $(MSWDIR)\dcmemory.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcmemory.cpp /BINARY dcmemory.obj
+
+dcclient.obj:     $(MSWDIR)\dcclient.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcclient.cpp /BINARY dcclient.obj
+
+dcprint.obj:     $(MSWDIR)\dcprint.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcprint.cpp /BINARY dcprint.obj
+
+dcscreen.obj:     $(MSWDIR)\dcscreen.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dcscreen.cpp /BINARY dcscreen.obj
+
+dialog.obj:     $(MSWDIR)\dialog.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dialog.cpp /BINARY dialog.obj
+
+dib.obj:     $(MSWDIR)\dib.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dib.cpp /BINARY dib.obj
+
+dibutils.obj:     $(MSWDIR)\dibutils.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dibutils.cpp /BINARY dibutils.obj
+
+dirdlg.obj:     $(MSWDIR)\dirdlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\dirdlg.cpp /BINARY dirdlg.obj
+
+filedlg.obj:     $(MSWDIR)\filedlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\filedlg.cpp /BINARY filedlg.obj
+
+font.obj:     $(MSWDIR)\font.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\font.cpp /BINARY font.obj
+
+fontdlg.obj:     $(MSWDIR)\fontdlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\fontdlg.cpp /BINARY fontdlg.obj
+
+frame.obj:     $(MSWDIR)\frame.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\frame.cpp /BINARY frame.obj
+
+gauge95.obj:     $(MSWDIR)\gauge95.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\gauge95.cpp /BINARY gauge95.obj
+
+gdiobj.obj:     $(MSWDIR)\gdiobj.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\gdiobj.cpp /BINARY gdiobj.obj
+
+helpwin.obj:     $(MSWDIR)\helpwin.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\helpwin.cpp /BINARY helpwin.obj
+
+icon.obj:     $(MSWDIR)\icon.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\icon.cpp /BINARY icon.obj
+
+imaglist.obj:     $(MSWDIR)\imaglist.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\imaglist.cpp /BINARY imaglist.obj
+
+iniconf.obj:     $(MSWDIR)\iniconf.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\iniconf.cpp /BINARY iniconf.obj
+
+joystick.obj:     $(MSWDIR)\joystick.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\joystick.cpp /BINARY joystick.obj
+
+listbox.obj:     $(MSWDIR)\listbox.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\listbox.cpp /BINARY listbox.obj
+
+listctrl.obj:     $(MSWDIR)\listctrl.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\listctrl.cpp /BINARY listctrl.obj
+
+main.obj:     $(MSWDIR)\main.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\main.cpp /BINARY main.obj
+
+mdi.obj:     $(MSWDIR)\mdi.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\mdi.cpp /BINARY mdi.obj
+
+menu.obj:     $(MSWDIR)\menu.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\menu.cpp /BINARY menu.obj
+
+menuitem.obj:     $(MSWDIR)\menuitem.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\menuitem.cpp /BINARY menuitem.obj
+
+metafile.obj:     $(MSWDIR)\metafile.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\metafile.cpp /BINARY metafile.obj
+
+minifram.obj:     $(MSWDIR)\minifram.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\minifram.cpp /BINARY minifram.obj
+
+msgdlg.obj:     $(MSWDIR)\msgdlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\msgdlg.cpp /BINARY msgdlg.obj
+
+nativdlg.obj:     $(MSWDIR)\nativdlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\nativdlg.cpp /BINARY nativdlg.obj
+
+notebook.obj:     $(MSWDIR)\notebook.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\notebook.cpp /BINARY notebook.obj
+
+ownerdrw.obj:     $(MSWDIR)\ownerdrw.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\ownerdrw.cpp /BINARY ownerdrw.obj
+
+palette.obj:     $(MSWDIR)\palette.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\palette.cpp /BINARY palette.obj
+
+pen.obj:     $(MSWDIR)\pen.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\pen.cpp /BINARY pen.obj
+
+penwin.obj:     $(MSWDIR)\penwin.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\penwin.cpp /BINARY penwin.obj
+
+printdlg.obj:     $(MSWDIR)\printdlg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\printdlg.cpp /BINARY printdlg.obj
+
+printwin.obj:     $(MSWDIR)\printwin.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\printwin.cpp /BINARY printwin.obj
+
+radiobox.obj:     $(MSWDIR)\radiobox.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\radiobox.cpp /BINARY radiobox.obj
+
+radiobut.obj:     $(MSWDIR)\radiobut.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\radiobut.cpp /BINARY radiobut.obj
+
+region.obj:     $(MSWDIR)\region.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\region.cpp /BINARY region.obj
+
+registry.obj:     $(MSWDIR)\registry.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\registry.cpp /BINARY registry.obj
+
+regconf.obj:     $(MSWDIR)\regconf.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\regconf.cpp /BINARY regconf.obj
+
+scrolbar.obj:     $(MSWDIR)\scrolbar.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\scrolbar.cpp /BINARY scrolbar.obj
+
+settings.obj:     $(MSWDIR)\settings.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\settings.cpp /BINARY settings.obj
+
+slidrmsw.obj:     $(MSWDIR)\slidrmsw.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slidrmsw.cpp /BINARY slidrmsw.obj
+
+slider95.obj:     $(MSWDIR)\slider95.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\slider95.cpp /BINARY slider95.obj
+
+spinbutt.obj:     $(MSWDIR)\spinbutt.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\spinbutt.cpp /BINARY spinbutt.obj
+
+statbmp.obj:     $(MSWDIR)\statbmp.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\statbmp.cpp /BINARY statbmp.obj
+
+statbox.obj:     $(MSWDIR)\statbox.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\statbox.cpp /BINARY statbox.obj
+
+statbr95.obj:     $(MSWDIR)\statbr95.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\statbr95.cpp /BINARY statbr95.obj
+
+stattext.obj:     $(MSWDIR)\stattext.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\stattext.cpp /BINARY stattext.obj
+
+tabctrl.obj:     $(MSWDIR)\tabctrl.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tabctrl.cpp /BINARY tabctrl.obj
+
+taskbar.obj:     $(MSWDIR)\taskbar.cpp
+        cl @<<
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\taskbar.cpp /BINARY taskbar.obj
+
+tbar95.obj:     $(MSWDIR)\tbar95.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tbar95.cpp /BINARY tbar95.obj
+
+tbarmsw.obj:     $(MSWDIR)\tbarmsw.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tbarmsw.cpp /BINARY tbarmsw.obj
+
+textctrl.obj:     $(MSWDIR)\textctrl.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\textctrl.cpp /BINARY textctrl.obj
+
+thread.obj:     $(MSWDIR)\thread.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\thread.cpp /BINARY thread.obj
+
+timer.obj:     $(MSWDIR)\timer.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\timer.cpp /BINARY timer.obj
+
+tooltip.obj:     $(MSWDIR)\tooltip.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\tooltip.cpp /BINARY tooltip.obj
+
+treectrl.obj:     $(MSWDIR)\treectrl.cpp
+        cl @<<
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\treectrl.cpp /BINARY treectrl.obj
+
+utils.obj:     $(MSWDIR)\utils.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\utils.cpp /BINARY utils.obj
+
+utilsexc.obj:     $(MSWDIR)\utilsexc.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\utilsexc.cpp /BINARY utilsexc.obj
+
+wave.obj:     $(MSWDIR)\wave.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\wave.cpp /BINARY wave.obj
+
+window.obj:     $(MSWDIR)\window.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\window.cpp /BINARY window.obj
+
+xpmhand.obj:     $(MSWDIR)\xpmhand.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(MSWDIR)\xpmhand.cpp /BINARY xpmhand.obj
+
+droptgt.obj:     $(OLEDIR)\droptgt.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\droptgt.cpp /BINARY droptgt.obj
+
+dropsrc.obj:     $(OLEDIR)\dropsrc.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\dropsrc.cpp /BINARY dropsrc.obj
+
+dataobj.obj:     $(OLEDIR)\dataobj.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\dataobj.cpp /BINARY dataobj.obj
+
+oleutils.obj:     $(OLEDIR)\oleutils.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\oleutils.cpp /BINARY oleutils.obj
+
+uuid.obj:     $(OLEDIR)\uuid.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\uuid.cpp /BINARY uuid.obj
+
+automtn.obj:     $(OLEDIR)\automtn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(OLEDIR)\automtn.cpp /BINARY automtn.obj
+
+########################################################
+# Common objects (always compiled)
+
+cmndata.obj:     $(COMMDIR)\cmndata.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\cmndata.cpp /BINARY cmndata.obj
+
+config.obj:     $(COMMDIR)\config.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\config.cpp /BINARY config.obj
+
+dcbase.obj:     $(COMMDIR)\dcbase.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dcbase.cpp /BINARY dcbase.obj
+
+db.obj:     $(COMMDIR)\db.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\db.cpp /BINARY db.obj
+
+dbtable.obj:     $(COMMDIR)\dbtable.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dbtable.cpp /BINARY dbtable.obj
+
+docview.obj:     $(COMMDIR)\docview.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\docview.cpp /BINARY docview.obj
+
+docmdi.obj:     $(COMMDIR)\docmdi.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\docmdi.cpp /BINARY docmdi.obj
+
+dynarray.obj:     $(COMMDIR)\dynarray.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dynarray.cpp /BINARY dynarray.obj
+
+dynlib.obj:     $(COMMDIR)\dynlib.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\dynlib.cpp /BINARY dynlib.obj
+
+event.obj:     $(COMMDIR)\event.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\event.cpp /BINARY event.obj
+
+file.obj:     $(COMMDIR)\file.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\file.cpp /BINARY file.obj
+
+fileconf.obj:     $(COMMDIR)\fileconf.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\fileconf.cpp /BINARY fileconf.obj
+
+filefn.obj:     $(COMMDIR)\filefn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\filefn.cpp /BINARY filefn.obj
+
+framecmn.obj:     $(COMMDIR)\framecmn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\framecmn.cpp /BINARY framecmn.obj
+
+gdicmn.obj:     $(COMMDIR)\gdicmn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\gdicmn.cpp /BINARY gdicmn.obj
+
+image.obj:     $(COMMDIR)\image.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\image.cpp /BINARY image.obj
+
+intl.obj:     $(COMMDIR)\intl.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\intl.cpp /BINARY intl.obj
+
+ipcbase.obj:     $(COMMDIR)\ipcbase.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\ipcbase.cpp /BINARY ipcbase.obj
+
+helpbase.obj:     $(COMMDIR)\helpbase.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\helpbase.cpp /BINARY helpbase.obj
+
+layout.obj:     $(COMMDIR)\layout.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\layout.cpp /BINARY layout.obj
+
+log.obj:     $(COMMDIR)\log.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\log.cpp /BINARY log.obj
+
+memory.obj:     $(COMMDIR)\memory.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\memory.cpp /BINARY memory.obj
+
+mimetype.obj:     $(COMMDIR)\mimetype.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\mimetype.cpp /BINARY mimetype.obj
+
+module.obj:     $(COMMDIR)\module.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\module.cpp /BINARY module.obj
+
+object.obj:     $(COMMDIR)\object.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\object.cpp /BINARY object.obj
+
+prntbase.obj:     $(COMMDIR)\prntbase.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\prntbase.cpp /BINARY prntbase.obj
+
+resource.obj:     $(COMMDIR)\resource.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\resource.cpp /BINARY resource.obj
+
+tbarbase.obj:     $(COMMDIR)\tbarbase.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\tbarbase.cpp /BINARY tbarbase.obj
+
+tbarsmpl.obj:     $(COMMDIR)\tbarsmpl.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\tbarsmpl.cpp /BINARY tbarsmpl.obj
+
+textfile.obj:     $(COMMDIR)\textfile.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\textfile.cpp /BINARY textfile.obj
+
+timercmn.obj:     $(COMMDIR)\timercmn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\timercmn.cpp /BINARY timercmn.obj
+
+utilscmn.obj:     $(COMMDIR)\utilscmn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\utilscmn.cpp /BINARY utilscmn.obj
+
+validate.obj:     $(COMMDIR)\validate.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\validate.cpp /BINARY validate.obj
+
+valgen.obj:     $(COMMDIR)\valgen.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\valgen.cpp /BINARY valgen.obj
+
+valtext.obj:     $(COMMDIR)\valtext.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\valtext.cpp /BINARY valtext.obj
+
+date.obj:     $(COMMDIR)\date.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\date.cpp /BINARY date.obj
+
+wxexpr.obj:     $(COMMDIR)\wxexpr.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wxexpr.cpp /BINARY wxexpr.obj
+
+hash.obj:     $(COMMDIR)\hash.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\hash.cpp /BINARY hash.obj
+
+list.obj:     $(COMMDIR)\list.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\list.cpp /BINARY list.obj
+
+paper.obj:     $(COMMDIR)\paper.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\paper.cpp /BINARY paper.obj
+
+string.obj:     $(COMMDIR)\string.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\string.cpp /BINARY string.obj
+
+socket.obj:     $(COMMDIR)\socket.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\socket.cpp /BINARY socket.obj
+
+sckint.obj:     $(COMMDIR)\sckint.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckint.cpp /BINARY sckint.obj
+
+sckaddr.obj:     $(COMMDIR)\sckaddr.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckaddr.cpp /BINARY sckaddr.obj
+
+sckfile.obj:     $(COMMDIR)\sckfile.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckfile.cpp /BINARY sckfile.obj
+
+sckipc.obj:     $(COMMDIR)\sckipc.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckipc.cpp /BINARY sckipc.obj
+
+sckstrm.obj:     $(COMMDIR)\sckstrm.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\sckstrm.cpp /BINARY sckstrm.obj
+
+url.obj:     $(COMMDIR)\url.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\url.cpp /BINARY url.obj
+
+http.obj:     $(COMMDIR)\http.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\http.cpp /BINARY http.obj
+
+protocol.obj:     $(COMMDIR)\protocol.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\protocol.cpp /BINARY protocol.obj
+
+tokenzr.obj:     $(COMMDIR)\tokenzr.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\tokenzr.cpp /BINARY tokenzr.obj
+
+matrix.obj:     $(COMMDIR)\matrix.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\matrix.cpp /BINARY matrix.obj
+
+time.obj:     $(COMMDIR)\time.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\time.cpp /BINARY time.obj
+
+stream.obj:     $(COMMDIR)\stream.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\stream.cpp /BINARY stream.obj
+
+wfstream.obj:     $(COMMDIR)\wfstream.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wfstream.cpp /BINARY wfstream.obj
+
+mstream.obj:     $(COMMDIR)\mstream.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\mstream.cpp /BINARY mstream.obj
+
+zstream.obj:     $(COMMDIR)\zstream.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\zstream.cpp /BINARY zstream.obj
+
+datstrm.obj:     $(COMMDIR)\datstrm.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\datstrm.cpp /BINARY datstrm.obj
+
+objstrm.obj:     $(COMMDIR)\objstrm.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\objstrm.cpp /BINARY objstrm.obj
+
+extended.obj:     $(COMMDIR)\extended.c
+  $(CC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\extended.c /BINARY extended.obj
+
+process.obj:     $(COMMDIR)\process.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\process.cpp /BINARY process.obj
+
+variant.obj:     $(COMMDIR)\variant.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\variant.cpp /BINARY variant.obj
+
+wincmn.obj:     $(COMMDIR)\wincmn.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wincmn.cpp /BINARY wincmn.obj
+
+wxchar.obj:     $(COMMDIR)\wxcharp.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\wxchar.cpp /BINARY wxchar.obj
+
+########################################################
+# Generic objects (not always compiled, depending on
+# whether platforms have native implementations)
+
+choicdgg.obj:     $(GENDIR)\choicdgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\choicdgg.cpp /BINARY choicdgg.obj
+
+colrdlgg.obj:     $(GENDIR)\colrdgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\colrdgg.cpp /BINARY colordgg.obj
+
+dirdlgg.obj:     $(GENDIR)\dirdlgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\dirdlgg.cpp /BINARY dirdlgg.obj
+
+fontdlgg.obj:     $(GENDIR)\fontdlgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\fontdlgg.cpp /BINARY fontdlgg.obj
+
+gridg.obj:     $(GENDIR)\gridg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\gridg.cpp /BINARY gridg.obj
+
+laywin.obj:     $(GENDIR)\laywin.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\laywin.cpp /BINARY laywin.obj
+
+msgdlgg.obj:     $(GENDIR)\msgdlgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\msgdlgg.cpp /BINARY msgdlgg.obj
+
+panelg.obj:     $(GENDIR)\panelg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\panelg.cpp /BINARY panelg.obj
+
+printps.obj:     $(GENDIR)\printps.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\printps.cpp /BINARY printps.obj
+
+progdlgg.obj:     $(GENDIR)\progdlgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\progdlgg.cpp /BINARY progdlgg.obj
+
+prop.obj:     $(GENDIR)\prop.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\prop.cpp /BINARY prop.obj
+
+propform.obj:     $(GENDIR)\propform.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\propform.cpp /BINARY propform.obj
+
+proplist.obj:     $(GENDIR)\proplist.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\proplist.cpp /BINARY proplist.obj
+
+prntdlgg.obj:     $(GENDIR)\prntdlgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\prntdlgg.cpp /BINARY prntdlgg.obj
+
+sashwin.obj:     $(GENDIR)\sashwin.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\sashwin.cpp /BINARY sashwin.obj
+
+scrolwin.obj:     $(GENDIR)\scrolwin.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\scrolwin.cpp /BINARY scrolwin.obj
+
+splitter.obj:     $(GENDIR)\splitter.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\splitter.cpp /BINARY splitter.obj
+
+statusbr.obj:     $(GENDIR)\statusbr.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\statusbr.cpp /BINARY statusbr.obj
+
+tabg.obj:     $(GENDIR)\tabg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\tabg.cpp /BINARY tabg.obj
+
+textdlgg.obj: $(GENDIR)\textdlgg.cpp
+  $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\textdlgg.cpp /BINARY textdlgg.obj
+
+crbuffri.obj: $(XPMDIR)\crbuffri.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crbuffri.c
+
+crbuffrp.obj: $(XPMDIR)\crbuffrp.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crbuffrp.c
+
+crdatfri.obj: $(XPMDIR)\crdatfri.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crdatfri.c
+
+crdatfrp.obj: $(XPMDIR)\crdatfrp.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crdatfrp.c
+
+create.obj: $(XPMDIR)\create.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\create.c
+
+crifrbuf.obj: $(XPMDIR)\crifrbuf.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crifrbuf.c
+
+crifrdat.obj: $(XPMDIR)\crifrdat.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crifrdat.c
+
+crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crpfrbuf.c
+
+crpfrdat.obj: $(XPMDIR)\crpfrdat.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\crpfrdat.c
+
+dataxpm.obj: $(XPMDIR)\data.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\data.c /BINARY dataxpm.obj
+
+hashtab.obj: $(XPMDIR)\hashtab.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\hashtab.c
+
+misc.obj: $(XPMDIR)\misc.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\misc.c
+
+parse.obj: $(XPMDIR)\parse.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\parse.c
+
+rdftodat.obj: $(XPMDIR)\rdftodat.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rdftodat.c
+
+rdftoi.obj: $(XPMDIR)\rdftoi.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rdftoi.c
+
+rdftop.obj: $(XPMDIR)\rdftop.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rdftop.c
+
+rgb.obj: $(XPMDIR)\rgb.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\rgb.c
+
+scan.obj: $(XPMDIR)\scan.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\scan.c
+
+simx.obj: $(XPMDIR)\simx.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\simx.c
+
+wrffrdat.obj: $(XPMDIR)\wrffrdat.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\wrffrdat.c
+
+wrffri.obj: $(XPMDIR)\wrffri.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\wrffri.c
+
+wrffrp.obj: $(XPMDIR)\wrffrp.c
+  *$(CC) $(CPPFLAGS) $(IFLAGS) $(XPMDIR)\wrffrp.c
+
+OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
+  trees$(O) 
+OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
+  infutil$(O) inffast$(O) 
+
+adler32.obj: adler32.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+compress.obj: compress.c zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+crc32.obj: crc32.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+gzio.obj: gzio.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
+   infcodes.h infutil.h
+	$(CC) -c $(CFLAGS) $*.c
+
+infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
+   infcodes.h inffast.h
+	$(CC) -c $(CFLAGS) $*.c
+
+inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
+	$(CC) -c $(CFLAGS) $*.c
+
+inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
+	$(CC) -c $(CFLAGS) $*.c
+
+infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
+	$(CC) -c $(CFLAGS) $*.c
+
+inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
+	$(CC) -c $(CFLAGS) $*.c
+
+trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+uncompr.obj: uncompr.c zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+zutil.obj: zutil.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+
+y_tab.obj:     $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
+  $(CC) /ANSI_C $(CPPFLAGS) $(IFLAGS) /DEFINE USE_DEFINE $(COMMDIR)\y_tab.c /BINARY y_tab.obj
+
+$(COMMDIR)\y_tab.c:     $(COMMDIR)\dosyacc.c
+        copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
+
+$(COMMDIR)\lex_yy.c:    $(COMMDIR)\doslex.c
+    copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
+
+xpm:   
+    cd $(WXDIR)\src\xpm
+    wmake -f makefile.wat all
+    cd $(WXDIR)\src\msw
+
+clean_xpm:   
+    cd $(WXDIR)\src\xpm
+    wmake -f makefile.wat clean
+    cd $(WXDIR)\src\msw
+
+png:   
+    cd $(WXDIR)\src\png
+    wmake -f makefile.wat all
+    cd $(WXDIR)\src\msw
+
+clean_png:   
+    cd $(WXDIR)\src\png
+    wmake -f makefile.wat clean
+    cd $(WXDIR)\src\msw
+
+zlib:   
+    cd $(WXDIR)\src\zlib
+    wmake -f makefile.wat all
+    cd $(WXDIR)\src\msw
+
+clean_zlib:   
+    cd $(WXDIR)\src\zlib
+    wmake -f makefile.wat clean
+    cd $(WXDIR)\src\msw
+
+
diff --git a/Externals/wxWidgets/src/msw/menu.cpp b/Externals/wxWidgets/src/msw/menu.cpp
index 08a7464e09..b393e5f6e6 100644
--- a/Externals/wxWidgets/src/msw/menu.cpp
+++ b/Externals/wxWidgets/src/msw/menu.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin
 // Created:     04/01/98
-// RCS-ID:      $Id: menu.cpp 48053 2007-08-13 17:07:01Z JS $
+// RCS-ID:      $Id: menu.cpp 54478 2008-07-03 15:42:18Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -354,7 +354,8 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
     UpdateAccel(pItem);
 #endif // wxUSE_ACCEL
 
-    UINT flags = 0;
+    // we should support disabling the item even prior to adding it to the menu
+    UINT flags = pItem->IsEnabled() ? MF_ENABLED : MF_GRAYED;
 
     // if "Break" has just been called, insert a menu break before this item
     // (and don't forget to reset the flag)
diff --git a/Externals/wxWidgets/src/msw/notebook.cpp b/Externals/wxWidgets/src/msw/notebook.cpp
index fc11245bdb..b15ea84f19 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 50855 2007-12-20 10:51:33Z JS $
+// RCS-ID:      $Id: notebook.cpp 57033 2008-11-29 22:39:47Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -656,16 +656,18 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
         tabSize.y = rect.bottom - rect.top;
     }
 
+    const int rows = GetRowCount();
+
     // add an extra margin in both directions
     const int MARGIN = 8;
     if ( IsVertical() )
     {
         sizeTotal.x += MARGIN;
-        sizeTotal.y += tabSize.y + MARGIN;
+        sizeTotal.y += tabSize.y * rows + MARGIN;
     }
     else // horizontal layout
     {
-        sizeTotal.x += tabSize.x + MARGIN;
+        sizeTotal.x += tabSize.x * rows + MARGIN;
         sizeTotal.y += MARGIN;
     }
 
@@ -1027,6 +1029,10 @@ void wxNotebook::OnSize(wxSizeEvent& event)
                     MAKELPARAM(rc.right, rc.bottom));
             s_isInOnSize = false;
         }
+
+        // The best size depends on the number of rows of tabs, which can
+        // change when the notepad is resized.
+        InvalidateBestSize();
     }
 
 #if wxUSE_UXTHEME
diff --git a/Externals/wxWidgets/src/msw/ole/automtn.cpp b/Externals/wxWidgets/src/msw/ole/automtn.cpp
index 26218d9b39..d3c304abff 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 53817 2008-05-29 13:35:52Z VZ $
+// RCS-ID:      $Id: automtn.cpp 55899 2008-09-26 15:18:16Z VZ $
 // Copyright:   (c) 1998, Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -538,8 +538,13 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const
         return false;
     }
 
-    // start a new copy of Excel, grab the IDispatch interface
-    if (FAILED(CoCreateInstance(clsId, NULL, CLSCTX_LOCAL_SERVER, IID_IDispatch, (void**)&m_dispatchPtr)))
+    // get the server IDispatch interface
+    //
+    // NB: using CLSCTX_INPROC_HANDLER results in failure when getting
+    //     Automation interface for Microsoft Office applications so don't use
+    //     CLSCTX_ALL which includes it
+    if (FAILED(CoCreateInstance(clsId, NULL, CLSCTX_SERVER, IID_IDispatch,
+                                (void**)&m_dispatchPtr)))
     {
         wxLogWarning(wxT("Cannot start an instance of this class."));
         return false;
diff --git a/Externals/wxWidgets/src/msw/ole/droptgt.cpp b/Externals/wxWidgets/src/msw/ole/droptgt.cpp
index 7a53e465b0..b7cc6e4ceb 100644
--- a/Externals/wxWidgets/src/msw/ole/droptgt.cpp
+++ b/Externals/wxWidgets/src/msw/ole/droptgt.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:
-// RCS-ID:      $Id: droptgt.cpp 44229 2007-01-15 19:02:29Z VZ $
+// RCS-ID:      $Id: droptgt.cpp 54398 2008-06-28 01:40:42Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -239,15 +239,20 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD   grfKeyState,
         result = wxDragNone;
     }
 
-    // we need client coordinates to pass to wxWin functions
-    if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
-    {
-        wxLogLastError(wxT("ScreenToClient"));
-    }
+    if ( result != wxDragNone ) {
+        // we need client coordinates to pass to wxWin functions
+        if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
+        {
+            wxLogLastError(wxT("ScreenToClient"));
+        }
 
-    *pdwEffect = ConvertDragResultToEffect(
-                    m_pTarget->OnDragOver(pt.x, pt.y, result)
-                 );
+        *pdwEffect = ConvertDragResultToEffect(
+                        m_pTarget->OnDragOver(pt.x, pt.y, result)
+                     );
+    }
+    else {
+        *pdwEffect = DROPEFFECT_NONE;
+    }
 
     return S_OK;
 }
diff --git a/Externals/wxWidgets/src/msw/ole/oleutils.cpp b/Externals/wxWidgets/src/msw/ole/oleutils.cpp
index 334d9f8276..d7afc90a3b 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 51557 2008-02-05 07:24:59Z VZ $
+// RCS-ID:      $Id: oleutils.cpp 59208 2009-02-28 19:34:30Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -95,12 +95,13 @@ WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
     wxString str(bStr, len);
 #else
     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 */) )
+    if (len)
     {
-        str.clear();
+        wxStringBufferLength buf(str, len); // asserts if len == 0
+        buf.SetLength(WideCharToMultiByte(CP_ACP, 0 /* no flags */,
+                                  bStr, len /* not necessarily NUL-terminated */,
+                                  buf, len,
+                                  NULL, NULL /* no default char */));
     }
 #endif
 
@@ -132,9 +133,10 @@ wxBasicString::wxBasicString(const wxString& str)
 // Takes an ANSI string and transforms it to Unicode
 void wxBasicString::Init(const char *sz)
 {
-    // get the size of required buffer
+    // get the size of required buffer: MetroWerks and Cygwin crash if NULL is
+    // passed to mbstowcs()
     UINT lenAnsi = strlen(sz);
-#ifdef __MWERKS__
+#if defined(__MWERKS__) || defined(__CYGWIN__)
     UINT lenWide = lenAnsi * 2 ;
 #else
     UINT lenWide = mbstowcs(NULL, sz, lenAnsi);
diff --git a/Externals/wxWidgets/src/msw/ole/uuid.cpp b/Externals/wxWidgets/src/msw/ole/uuid.cpp
index bd9af1150c..5e26c3023f 100644
--- a/Externals/wxWidgets/src/msw/ole/uuid.cpp
+++ b/Externals/wxWidgets/src/msw/ole/uuid.cpp
@@ -4,7 +4,7 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     12.09.96
-// RCS-ID:      $Id: uuid.cpp 41054 2006-09-07 19:01:45Z ABX $
+// RCS-ID:      $Id: uuid.cpp 55125 2008-08-18 20:04:58Z VZ $
 // Copyright:   (c) 1998 Vadim Zeitlin 
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -82,6 +82,18 @@ Uuid& Uuid::operator=(const Uuid& uuid)
   return *this;
 }
 
+bool Uuid::operator==(const Uuid& uuid) const
+{
+    // IsEqualGUID() returns BOOL and not bool so use an explicit comparison to
+    // avoid MSVC warnings about int->bool conversion
+    return IsEqualGUID(m_uuid, uuid.m_uuid) == TRUE;
+}
+
+bool Uuid::operator!=(const Uuid& uuid) const
+{
+    return !(*this == uuid);
+}
+
 // dtor
 Uuid::~Uuid()
 {
diff --git a/Externals/wxWidgets/src/msw/radiobox.cpp b/Externals/wxWidgets/src/msw/radiobox.cpp
index 309f5ca191..75de66ba36 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 51905 2008-02-19 02:43:29Z VZ $
+// RCS-ID:      $Id: radiobox.cpp 54927 2008-08-02 15:59:13Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -149,6 +149,11 @@ bool wxRadioBox::Create(wxWindow *parent,
     if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) )
         return false;
 
+    // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS
+    // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case
+    if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) )
+        style |= wxRA_SPECIFY_COLS;
+
 #if wxUSE_VALIDATORS
     SetValidator(val);
 #else
diff --git a/Externals/wxWidgets/src/msw/radiobut.cpp b/Externals/wxWidgets/src/msw/radiobut.cpp
index 8d3567fd02..3b3f2c0d68 100644
--- a/Externals/wxWidgets/src/msw/radiobut.cpp
+++ b/Externals/wxWidgets/src/msw/radiobut.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: radiobut.cpp 41144 2006-09-10 23:08:13Z VZ $
+// RCS-ID:      $Id: radiobut.cpp 58752 2009-02-08 10:17:47Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -31,6 +31,7 @@
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
     #include "wx/dcscreen.h"
+    #include "wx/toplevel.h"
 #endif
 
 #include "wx/msw/private.h"
@@ -120,18 +121,14 @@ bool wxRadioButton::Create(wxWindow *parent,
     if ( HasFlag(wxRB_GROUP) )
         msStyle |= WS_GROUP;
 
-    /*
-       wxRB_SINGLE is a temporary workaround for the following problem: if you
-       have 2 radiobuttons in the same group but which are not consecutive in
-       the dialog, Windows can enter an infinite loop! The simplest way to
-       reproduce it is to create radio button, then a panel and then another
-       radio button: then checking the last button hangs the app.
-
-       Ideally, we'd detect (and avoid) such situation automatically but for
-       now, as I don't know how to do it, just allow the user to create
-       BS_RADIOBUTTON buttons for such situations.
-     */
-    msStyle |= HasFlag(wxRB_SINGLE) ? BS_RADIOBUTTON : BS_AUTORADIOBUTTON;
+    // we use BS_RADIOBUTTON and not BS_AUTORADIOBUTTON because the use of the
+    // latter can easily result in the application entering an infinite loop
+    // inside IsDialogMessage()
+    //
+    // we used to use BS_RADIOBUTTON only for wxRB_SINGLE buttons but there
+    // doesn't seem to be any harm to always use it and it prevents some hangs,
+    // see #9786
+    msStyle |= BS_RADIOBUTTON;
 
     if ( HasFlag(wxCLIP_SIBLINGS) )
         msStyle |= WS_CLIPSIBLINGS;
@@ -143,7 +140,7 @@ bool wxRadioButton::Create(wxWindow *parent,
 
     // for compatibility with wxGTK, the first radio button in a group is
     // always checked (this makes sense anyhow as you need to ensure that at
-    // least one button in the group is checked and this is the simlpest way to
+    // least one button in the group is checked and this is the simplest way to
     // do it)
     if ( HasFlag(wxRB_GROUP) )
         SetValue(true);
@@ -157,82 +154,108 @@ bool wxRadioButton::Create(wxWindow *parent,
 
 void wxRadioButton::SetValue(bool value)
 {
-    (void)::SendMessage(GetHwnd(), BM_SETCHECK, (value?BST_CHECKED:BST_UNCHECKED), 0L);
+    ::SendMessage(GetHwnd(), BM_SETCHECK,
+                  value ? BST_CHECKED : BST_UNCHECKED, 0);
 
     m_isChecked = value;
 
+    if ( !value )
+        return;
+
     // if we set the value of one radio button we also must clear all the other
     // buttons in the same group: Windows doesn't do it automatically
-    if ( m_isChecked )
+    //
+    // moreover, if another radiobutton in the group currently has the focus,
+    // we have to set it to this radiobutton, else the old radiobutton will be
+    // reselected automatically, if a parent window loses the focus and regains
+    // it.
+    wxWindow * const focus = FindFocus();
+    wxTopLevelWindow * const
+        tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
+    wxCHECK_RET( tlw, _T("radio button outside of TLW?") );
+    wxWindow * const focusInTLW = tlw->GetLastFocus();
+
+    const wxWindowList& siblings = GetParent()->GetChildren();
+    wxWindowList::compatibility_iterator nodeThis = siblings.Find(this);
+    wxCHECK_RET( nodeThis, _T("radio button not a child of its parent?") );
+
+    // this will be set to true in the code below if the focus is in our TLW
+    // and belongs to one of the other buttons in the same group
+    bool shouldSetFocus = false;
+
+    // this will be set to true if the focus is outside of our TLW currently
+    // but the remembered focus of this TLW is one of the other buttons in the
+    // same group
+    bool shouldSetTLWFocus = false;
+
+    // if it's not the first item of the group ...
+    if ( !HasFlag(wxRB_GROUP) )
     {
-        // If another radiobutton in the group currently has the focus, we have to
-        // set it to this radiobutton, else the old readiobutton will be reselected
-        // automatically, if a parent window loses the focus and regains it.
-        bool shouldSetFocus = false;
-        wxWindow* pFocusWnd = FindFocus();
-
-        const wxWindowList& siblings = GetParent()->GetChildren();
-        wxWindowList::compatibility_iterator nodeThis = siblings.Find(this);
-        wxCHECK_RET( nodeThis, _T("radio button not a child of its parent?") );
-
-        // if it's not the first item of the group ...
-        if ( !HasFlag(wxRB_GROUP) )
+        // ... turn off all radio buttons before it
+        for ( wxWindowList::compatibility_iterator nodeBefore = nodeThis->GetPrevious();
+              nodeBefore;
+              nodeBefore = nodeBefore->GetPrevious() )
         {
-            // ... turn off all radio buttons before it
-            for ( wxWindowList::compatibility_iterator nodeBefore = nodeThis->GetPrevious();
-                  nodeBefore;
-                  nodeBefore = nodeBefore->GetPrevious() )
+            wxRadioButton *btn = wxDynamicCast(nodeBefore->GetData(),
+                                               wxRadioButton);
+            if ( !btn )
             {
-                wxRadioButton *btn = wxDynamicCast(nodeBefore->GetData(),
-                                                   wxRadioButton);
-                if ( btn && btn->HasFlag(wxRB_SINGLE) )
+                // don't stop on non radio buttons, we could have intermixed
+                // buttons and e.g. static labels
+                continue;
+            }
+
+            if ( btn->HasFlag(wxRB_SINGLE) )
                 {
                     // A wxRB_SINGLE button isn't part of this group
                     break;
                 }
 
-                if (btn)
-                {
-                    if (btn == pFocusWnd)
-                        shouldSetFocus = true;
+            if ( btn == focus )
+                shouldSetFocus = true;
+            else if ( btn == focusInTLW )
+                shouldSetTLWFocus = true;
 
-                    btn->SetValue(false);
+            btn->SetValue(false);
 
-                    if ( btn->HasFlag(wxRB_GROUP) )
-                    {
-                        // even if there are other radio buttons before this one,
-                        // they're not in the same group with us
-                        break;
-                    }
-                }
-            }
-        }
-
-        // ... and also turn off all buttons after this one
-        for ( wxWindowList::compatibility_iterator nodeAfter = nodeThis->GetNext();
-              nodeAfter;
-              nodeAfter = nodeAfter->GetNext() )
-        {
-            wxRadioButton *btn = wxDynamicCast(nodeAfter->GetData(),
-                                               wxRadioButton);
-
-            if ( btn && (btn->HasFlag(wxRB_GROUP) || btn->HasFlag(wxRB_SINGLE) ) )
+            if ( btn->HasFlag(wxRB_GROUP) )
             {
-                // no more buttons or the first button of the next group
+                // even if there are other radio buttons before this one,
+                // they're not in the same group with us
                 break;
             }
-
-            if (btn)
-            {
-                if (btn == pFocusWnd)
-                        shouldSetFocus = true;
-
-                btn->SetValue(false);
-            }
         }
-        if (shouldSetFocus)
-            SetFocus();
     }
+
+    // ... and also turn off all buttons after this one
+    for ( wxWindowList::compatibility_iterator nodeAfter = nodeThis->GetNext();
+          nodeAfter;
+          nodeAfter = nodeAfter->GetNext() )
+    {
+        wxRadioButton *btn = wxDynamicCast(nodeAfter->GetData(),
+                                           wxRadioButton);
+
+        if ( !btn )
+            continue;
+
+        if ( btn->HasFlag(wxRB_GROUP | wxRB_SINGLE) )
+        {
+            // no more buttons or the first button of the next group
+            break;
+        }
+
+        if ( btn == focus )
+            shouldSetFocus = true;
+        else if ( btn == focusInTLW )
+            shouldSetTLWFocus = true;
+
+        btn->SetValue(false);
+    }
+
+    if ( shouldSetFocus )
+        SetFocus();
+    else if ( shouldSetTLWFocus )
+        tlw->SetLastFocus(this);
 }
 
 bool wxRadioButton::GetValue() const
@@ -261,9 +284,8 @@ bool wxRadioButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
 
     if ( !m_isChecked )
     {
-        // we have to do this for BS_RADIOBUTTON anyhow and, strangely enough,
-        // sometimes this is needed even for BS_AUTORADIOBUTTON (when we
-        // receive focus the button gets BN_CLICKED but stays unchecked!)
+        // we need to manually update the button state as we use BS_RADIOBUTTON
+        // and not BS_AUTORADIOBUTTON
         SetValue(true);
 
         wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, GetId());
diff --git a/Externals/wxWidgets/src/msw/settings.cpp b/Externals/wxWidgets/src/msw/settings.cpp
index 4389c1c20c..8530806d36 100644
--- a/Externals/wxWidgets/src/msw/settings.cpp
+++ b/Externals/wxWidgets/src/msw/settings.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: settings.cpp 48086 2007-08-15 11:38:07Z VZ $
+// RCS-ID:      $Id: settings.cpp 57542 2008-12-25 13:03:24Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -127,7 +127,12 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
         0,          // MENUBAR (unused)
     };
 
-    if ( index == wxSYS_COLOUR_LISTBOX )
+    if ( index == wxSYS_COLOUR_LISTBOXTEXT)
+    {
+        // there is no standard colour with this index, map to another one
+        index = wxSYS_COLOUR_WINDOWTEXT;
+    }
+    else if ( index == wxSYS_COLOUR_LISTBOX )
     {
         // there is no standard colour with this index, map to another one
         index = wxSYS_COLOUR_WINDOW;
diff --git a/Externals/wxWidgets/src/msw/spinctrl.cpp b/Externals/wxWidgets/src/msw/spinctrl.cpp
index 9df0f06f8b..5ebbed5e52 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 53397 2008-04-28 11:33:47Z VZ $
+// RCS-ID:      $Id: spinctrl.cpp 55622 2008-09-14 19:56:14Z VZ $
 // Copyright:   (c) 1999-2005 Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -176,8 +176,20 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
             break;
 
         case WM_GETDLGCODE:
-            // we want to get WXK_RETURN in order to generate the event for it
-            return DLGC_WANTARROWS;
+            if ( spin->HasFlag(wxTE_PROCESS_ENTER) )
+            {
+                long dlgCode = ::CallWindowProc
+                                 (
+                                    CASTWNDPROC spin->GetBuddyWndProc(),
+                                    hwnd,
+                                    message,
+                                    wParam,
+                                    lParam
+                                 );
+                dlgCode |= DLGC_WANTMESSAGE;
+                return dlgCode;
+            }
+            break;
     }
 
     return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),
diff --git a/Externals/wxWidgets/src/msw/statbmp.cpp b/Externals/wxWidgets/src/msw/statbmp.cpp
index e06752200b..c4dbde759f 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 51824 2008-02-16 01:59:21Z SN $
+// RCS-ID:      $Id: statbmp.cpp 56532 2008-10-27 18:15:19Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -29,6 +29,7 @@
 #include "wx/statbmp.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/app.h"
     #include "wx/window.h"
     #include "wx/icon.h"
     #include "wx/dcclient.h"
@@ -169,13 +170,20 @@ 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 )
+    // painting manually is reported not to work under Windows CE (see #10093),
+    // so don't do it there even if this probably means that alpha is not
+    // supported there -- but at least bitmaps without alpha appear correctly
+#ifndef __WXWINCE__
+    // Windows versions before XP (and even XP if the application has no
+    // manifest and so the old comctl32.dll is used) 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 ( wxTheApp->GetComCtl32Version() < 600 )
     {
-	Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually));
+        Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually));
     }
+#endif // !__WXWINCE__
 
     return true;
 }
@@ -261,8 +269,11 @@ void wxStaticBitmap::DoPaintManually(wxPaintEvent& WXUNUSED(event))
     const wxSize size(GetSize());
     const wxBitmap bmp(GetBitmap());
 
-    // Clear the background
-    dc.SetBrush(GetBackgroundColour());
+    // Clear the background: notice that we're supposed to be transparent, so
+    // use the parent background colour if we don't have our own instead of
+    // falling back to the default
+    const wxWindow *win = UseBgCol() ? this : GetParent();
+    dc.SetBrush(win->GetBackgroundColour());
     dc.SetPen(*wxTRANSPARENT_PEN);
     dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
 
diff --git a/Externals/wxWidgets/src/msw/tbar95.cpp b/Externals/wxWidgets/src/msw/tbar95.cpp
index 0c713e18dd..71042510fb 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 53487 2008-05-08 13:25:00Z VZ $
+// RCS-ID:      $Id: tbar95.cpp 58446 2009-01-26 23:32:16Z VS $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -574,6 +574,23 @@ void wxToolBar::CreateDisabledImageList()
     }
 }
 
+void wxToolBar::AdjustToolBitmapSize()
+{
+    wxSize s(m_defaultWidth, m_defaultHeight);
+    const wxSize orig_s(s);
+
+    for ( wxToolBarToolsList::const_iterator i = m_tools.begin();
+          i != m_tools.end();
+          ++i )
+    {
+        const wxBitmap& bmp = (*i)->GetNormalBitmap();
+        s.IncTo(wxSize(bmp.GetWidth(), bmp.GetHeight()));
+    }
+
+    if ( s != orig_s )
+        SetToolBitmapSize(s);
+}
+
 bool wxToolBar::Realize()
 {
     const size_t nTools = GetToolsCount();
@@ -581,6 +598,10 @@ bool wxToolBar::Realize()
         // nothing to do
         return true;
 
+    // make sure tool size is larger enough for all all bitmaps to fit in
+    // (this is consistent with what other ports do):
+    AdjustToolBitmapSize();
+
 #ifdef wxREMAP_BUTTON_COLOURS
     // don't change the values of these constants, they can be set from the
     // user code via wxSystemOptions
@@ -1129,9 +1150,10 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
 
     bool toggled = false; // just to suppress warnings
 
+    LRESULT state = ::SendMessage(GetHwnd(), TB_GETSTATE, id, 0);
+
     if ( tool->CanBeToggled() )
     {
-        LRESULT state = ::SendMessage(GetHwnd(), TB_GETSTATE, id, 0);
         toggled = (state & TBSTATE_CHECKED) != 0;
 
         // ignore the event when a radio button is released, as this doesn't
@@ -1143,9 +1165,38 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
         UnToggleRadioGroup(tool);
     }
 
+    // Without the two lines of code below, if the toolbar was repainted during
+    // OnLeftClick(), then it could end up without the tool bitmap temporarily
+    // (see http://lists.nongnu.org/archive/html/lmi/2008-10/msg00014.html).
+    // The Update() call bellow ensures that this won't happen, by repainting
+    // invalidated areas of the toolbar immediately.
+    //
+    // To complicate matters, the tool would be drawn in depressed state (this
+    // code is called when mouse button is released, not pressed). That's not
+    // ideal, having the tool pressed for the duration of OnLeftClick()
+    // provides the user with useful visual clue that the app is busy reacting
+    // to the event. So we manually put the tool into pressed state, handle the
+    // event and then finally restore tool's original state.
+    ::SendMessage(GetHwnd(), TB_SETSTATE, id, MAKELONG(state | TBSTATE_PRESSED, 0));
+    Update();
+
+    bool allowLeftClick = OnLeftClick((int)id, toggled);
+
+    // Restore the unpressed state. Enabled/toggled state might have been
+    // changed since so take care of it.
+    if (tool->IsEnabled())
+        state |= TBSTATE_ENABLED;
+    else
+        state &= ~TBSTATE_ENABLED;
+    if (tool->IsToggled())
+        state |= TBSTATE_CHECKED;
+    else
+        state &= ~TBSTATE_CHECKED;
+    ::SendMessage(GetHwnd(), TB_SETSTATE, id, MAKELONG(state, 0));
+
     // OnLeftClick() can veto the button state change - for buttons which
     // may be toggled only, of couse
-    if ( !OnLeftClick((int)id, toggled) && tool->CanBeToggled() )
+    if ( !allowLeftClick && tool->CanBeToggled() )
     {
         // revert back
         tool->Toggle(!toggled);
diff --git a/Externals/wxWidgets/src/msw/textctrl.cpp b/Externals/wxWidgets/src/msw/textctrl.cpp
index b90c7cdc03..156081a467 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 52547 2008-03-15 12:33:04Z VS $
+// RCS-ID:      $Id: textctrl.cpp 56394 2008-10-17 11:31:22Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -947,14 +947,14 @@ wxTextCtrl::StreamIn(const wxString& value,
         return false;
 
 #if wxUSE_WCHAR_T
-    wxWCharBuffer wchBuf(len);
+    wxWCharBuffer wchBuf(len); // allocates one extra character
     wchar_t *wpc = wchBuf.data();
 #else
     wchar_t *wchBuf = (wchar_t *)malloc((len + 1)*sizeof(wchar_t));
     wchar_t *wpc = wchBuf;
 #endif
 
-    conv.MB2WC(wpc, value, value.length());
+    conv.MB2WC(wpc, value, len + 1);
 #endif // wxUSE_UNICODE_MSLU
 
     // finally, stream it in the control
diff --git a/Externals/wxWidgets/src/msw/thread.cpp b/Externals/wxWidgets/src/msw/thread.cpp
index 954e0715da..39c83f6261 100644
--- a/Externals/wxWidgets/src/msw/thread.cpp
+++ b/Externals/wxWidgets/src/msw/thread.cpp
@@ -4,7 +4,7 @@
 // Author:      Original from Wolfram Gloger/Guilhem Lavaux
 // Modified by: Vadim Zeitlin to make it work :-)
 // Created:     04/22/98
-// RCS-ID:      $Id: thread.cpp 46381 2007-06-09 10:55:16Z VZ $
+// RCS-ID:      $Id: thread.cpp 57100 2008-12-04 00:22:04Z VZ $
 // Copyright:   (c) Wolfram Gloger (1996, 1997), Guilhem Lavaux (1998);
 //                  Vadim Zeitlin (1999-2002)
 // Licence:     wxWindows licence
@@ -230,18 +230,14 @@ wxMutexInternal::~wxMutexInternal()
 wxMutexError wxMutexInternal::LockTimeout(DWORD milliseconds)
 {
     DWORD rc = ::WaitForSingleObject(m_mutex, milliseconds);
-    if ( rc == WAIT_ABANDONED )
-    {
-        // the previous caller died without releasing the mutex, but now we can
-        // really lock it
-        wxLogDebug(_T("WaitForSingleObject() returned WAIT_ABANDONED"));
-
-        // use 0 timeout, normally we should always get it
-        rc = ::WaitForSingleObject(m_mutex, 0);
-    }
-
     switch ( rc )
     {
+        case WAIT_ABANDONED:
+            // the previous caller died without releasing the mutex, so even
+            // though we did get it, log a message about this
+            wxLogDebug(_T("WaitForSingleObject() returned WAIT_ABANDONED"));
+            // fall through
+
         case WAIT_OBJECT_0:
             // ok
             break;
@@ -249,7 +245,6 @@ wxMutexError wxMutexInternal::LockTimeout(DWORD milliseconds)
         case WAIT_TIMEOUT:
             return wxMUTEX_BUSY;
 
-        case WAIT_ABANDONED:        // checked for above
         default:
             wxFAIL_MSG(wxT("impossible return value in wxMutex::Lock"));
             // fall through
@@ -542,7 +537,6 @@ THREAD_RETVAL THREAD_CALLCONV wxThreadInternal::WinThreadStart(void *param)
     wxThread * const thread = (wxThread *)param;
 
     // each thread has its own SEH translator so install our own a.s.a.p.
-#pragma warning(disable:4535)	//probably not a good idea, but it won't compile otherwise.
     DisableAutomaticSETranslator();
 
     // first of all, check whether we hadn't been cancelled already and don't
diff --git a/Externals/wxWidgets/src/msw/treectrl.cpp b/Externals/wxWidgets/src/msw/treectrl.cpp
index 7928dbe7dc..fe2f28387a 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 53084 2008-04-07 20:12:57Z VZ $
+// RCS-ID:      $Id: treectrl.cpp 58755 2009-02-08 10:32:23Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -2933,11 +2933,12 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
     switch ( hdr->code )
     {
         case NM_DBLCLK:
-            // we translate NM_DBLCLK into ACTIVATED event, so don't interpret
-            // the return code of this event handler as the return value for
-            // NM_DBLCLK - otherwise, double clicking the item to toggle its
-            // expanded status would never work
-            *result = false;
+            // we translate NM_DBLCLK into ACTIVATED event and if the user
+            // handled the activation of the item we shouldn't proceed with
+            // also using the same double click for toggling the item expanded
+            // state -- but OTOH do let the user to expand/collapse the item by
+            // double clicking on it if the activation is not handled specially
+            *result = processed;
             break;
 
         case NM_RCLICK:
diff --git a/Externals/wxWidgets/src/msw/urlmsw.cpp b/Externals/wxWidgets/src/msw/urlmsw.cpp
index 9dd15dca9f..eed3b2ad10 100644
--- a/Externals/wxWidgets/src/msw/urlmsw.cpp
+++ b/Externals/wxWidgets/src/msw/urlmsw.cpp
@@ -4,7 +4,7 @@
 // Author:      Hajo Kirchhoff
 // Modified by:
 // Created:     06/11/2003
-// RCS-ID:      $Id: urlmsw.cpp 41020 2006-09-05 20:47:48Z VZ $
+// RCS-ID:      $Id: urlmsw.cpp 58116 2009-01-15 12:45:22Z VZ $
 // Copyright:   (c) 2003 Hajo Kirchhoff
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -23,6 +23,7 @@
     #include "wx/string.h"
     #include "wx/utils.h"
     #include "wx/module.h"
+    #include "wx/log.h"
 #endif
 
 #if !wxUSE_PROTOCOL_HTTP
@@ -129,6 +130,7 @@ public:
         { return -1; }
     wxFileOffset TellI() const
         { return -1; }
+    size_t GetSize() const;
 
 protected:
     void SetError(wxStreamError err) { m_lasterror=err; }
@@ -138,6 +140,18 @@ protected:
     DECLARE_NO_COPY_CLASS(wxWinINetInputStream)
 };
 
+size_t wxWinINetInputStream::GetSize() const
+{
+   DWORD contentLength = 0;
+   DWORD dwSize = sizeof(contentLength);
+   DWORD index = 0;
+
+   if ( HttpQueryInfo( m_hFile, HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, &contentLength, &dwSize, &index) )
+      return contentLength;
+   else
+      return 0;
+}
+
 size_t wxWinINetInputStream::OnSysRead(void *buffer, size_t bufsize)
 {
     DWORD bytesread = 0;
@@ -160,7 +174,7 @@ size_t wxWinINetInputStream::OnSysRead(void *buffer, size_t bufsize)
             );
 
             wxLogError(wxT("Read failed with error %d: %s"),
-                       iError, errorString);
+                       iError, errorString.c_str());
         }
     }
 
diff --git a/Externals/wxWidgets/src/msw/utilsexc.cpp b/Externals/wxWidgets/src/msw/utilsexc.cpp
index cc721d92fc..7116ea3b4c 100644
--- a/Externals/wxWidgets/src/msw/utilsexc.cpp
+++ b/Externals/wxWidgets/src/msw/utilsexc.cpp
@@ -4,7 +4,7 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: utilsexc.cpp 40943 2006-08-31 19:31:43Z ABX $
+// RCS-ID:      $Id: utilsexc.cpp 54695 2008-07-18 22:22:16Z VZ $
 // Copyright:   (c) 1998-2002 wxWidgets dev team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -360,8 +360,19 @@ wxPipeInputStream::~wxPipeInputStream()
 
 bool wxPipeInputStream::CanRead() const
 {
+    // we can read if there's something in the put back buffer
+    // even pipe is closed
+    if ( m_wbacksize > m_wbackcur )
+        return true;
+
+    wxPipeInputStream * const self = wxConstCast(this, wxPipeInputStream);
+
     if ( !IsOpened() )
+    {
+        // set back to mark Eof as it may have been unset by Ungetch()
+        self->m_lasterror = wxSTREAM_EOF;
         return false;
+    }
 
     DWORD nAvailable;
 
@@ -387,8 +398,6 @@ bool wxPipeInputStream::CanRead() const
         // it had been closed
         ::CloseHandle(m_hInput);
 
-        wxPipeInputStream *self = wxConstCast(this, wxPipeInputStream);
-
         self->m_hInput = INVALID_HANDLE_VALUE;
         self->m_lasterror = wxSTREAM_EOF;
 
@@ -943,9 +952,47 @@ long wxExecute(wxChar **argv, int flags, wxProcess *handler)
 {
     wxString command;
 
+    wxString arg;
     for ( ;; )
     {
-        command += *argv++;
+        arg = *argv++;
+
+        // we didn't quote the arguments properly in the previous wx versions
+        // and while this is the right thing to do, there is a good chance that
+        // people worked around our bug in their code by quoting the arguments
+        // manually before, so, for compatibility sake, keep the argument
+        // unchanged if it's already quoted
+
+        bool quote;
+        if ( arg.empty() )
+        {
+            // we need to quote empty arguments, otherwise they'd just
+            // disappear
+            quote = true;
+        }
+        else // non-empty
+        {
+            if ( *arg.begin() != _T('"') || *arg.rbegin() != _T('"') )
+            {
+                // escape any quotes present in the string to avoid interfering
+                // with the command line parsing in the child process
+                arg.Replace(_T("\""), _T("\\\""), true /* replace all */);
+
+                // and quote any arguments containing the spaces to prevent
+                // them from being broken down
+                quote = arg.find_first_of(_T(" \t")) != wxString::npos;
+            }
+            else // already quoted
+            {
+                quote = false;
+            }
+        }
+
+        if ( quote )
+            command += _T('\"') + arg + _T('\"');
+        else
+            command += arg;
+
         if ( !*argv )
             break;
 
diff --git a/Externals/wxWidgets/src/msw/version.rc b/Externals/wxWidgets/src/msw/version.rc
index d29e75786d..a14110c9a1 100644
--- a/Externals/wxWidgets/src/msw/version.rc
+++ b/Externals/wxWidgets/src/msw/version.rc
@@ -1,62 +1,62 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        src/msw/version.rc
-// Purpose:     contains version info resource for wxMSW DLL build
-// Author:      Vadim Zeitlin
-// Modified by:
-// Created:     09.07.00
-// RCS-ID:      $Id: version.rc 41690 2006-10-08 10:59:16Z VZ $
-// Copyright:   (c) 2000 Vadim Zeitlin
-// Licence:     wxWidgets license
-///////////////////////////////////////////////////////////////////////////////
-
-#include "wx/version.h"
-
-// see http://msdn.microsoft.com/library/psdk/winui/rc_7x2d.htm for values: we
-// don't use symbolic constants because older compilers might not have them
-#ifdef WXMAKINGDLL
-    #define wxVFT 2 // VFT_DLL
-#else
-    #define wxVFT 1 // VFT_APP
-#endif
-
-#ifdef _DEBUG
-    #define DLL_FLAGS 0x1L
-#else
-    #define DLL_FLAGS 0x0L
-#endif
-
-#ifdef _UNICODE
-    #define LANG "04090000"
-#else
-    #define LANG "040904b0"
-#endif
-
-1 VERSIONINFO
- FILEVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxSUBRELEASE_NUMBER
- PRODUCTVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxSUBRELEASE_NUMBER
- FILEFLAGSMASK 0x3fL
- FILEFLAGS DLL_FLAGS
- FILEOS 0x40004L // VOS_NT_WINDOWS32
- FILETYPE wxVFT
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        // US English Ascii; see http://msdn.microsoft.com/library/psdk/winui/rc_3rxn.htm for codes
-        BLOCK LANG
-        BEGIN
-            VALUE "Comments", "wxWidgets cross-platform GUI framework\0"
-            VALUE "CompanyName", "wxWidgets development team\0"
-            VALUE "FileDescription", "wxWidgets for MSW\0"
-            VALUE "FileVersion", "wxWidgets Library " wxVERSION_NUM_DOT_STRING "\0"
-            VALUE "InternalName", "wxMSW\0"
-            VALUE "LegalCopyright", "Copyright © 1993-2006 wxWidgets development team\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", wxSTRINGIZE(WXDLLNAME) ".dll\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "wxWidgets\0"
-            VALUE "ProductVersion", wxVERSION_NUM_DOT_STRING "\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-END
+///////////////////////////////////////////////////////////////////////////////
+// Name:        src/msw/version.rc
+// Purpose:     contains version info resource for wxMSW DLL build
+// Author:      Vadim Zeitlin
+// Modified by:
+// Created:     09.07.00
+// RCS-ID:      $Id: version.rc 41690 2006-10-08 10:59:16Z VZ $
+// Copyright:   (c) 2000 Vadim Zeitlin
+// Licence:     wxWidgets license
+///////////////////////////////////////////////////////////////////////////////
+
+#include "wx/version.h"
+
+// see http://msdn.microsoft.com/library/psdk/winui/rc_7x2d.htm for values: we
+// don't use symbolic constants because older compilers might not have them
+#ifdef WXMAKINGDLL
+    #define wxVFT 2 // VFT_DLL
+#else
+    #define wxVFT 1 // VFT_APP
+#endif
+
+#ifdef _DEBUG
+    #define DLL_FLAGS 0x1L
+#else
+    #define DLL_FLAGS 0x0L
+#endif
+
+#ifdef _UNICODE
+    #define LANG "04090000"
+#else
+    #define LANG "040904b0"
+#endif
+
+1 VERSIONINFO
+ FILEVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxSUBRELEASE_NUMBER
+ PRODUCTVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxSUBRELEASE_NUMBER
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS DLL_FLAGS
+ FILEOS 0x40004L // VOS_NT_WINDOWS32
+ FILETYPE wxVFT
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        // US English Ascii; see http://msdn.microsoft.com/library/psdk/winui/rc_3rxn.htm for codes
+        BLOCK LANG
+        BEGIN
+            VALUE "Comments", "wxWidgets cross-platform GUI framework\0"
+            VALUE "CompanyName", "wxWidgets development team\0"
+            VALUE "FileDescription", "wxWidgets for MSW\0"
+            VALUE "FileVersion", "wxWidgets Library " wxVERSION_NUM_DOT_STRING "\0"
+            VALUE "InternalName", "wxMSW\0"
+            VALUE "LegalCopyright", "Copyright © 1993-2006 wxWidgets development team\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", wxSTRINGIZE(WXDLLNAME) ".dll\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "wxWidgets\0"
+            VALUE "ProductVersion", wxVERSION_NUM_DOT_STRING "\0"
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+END
diff --git a/Externals/wxWidgets/src/msw/wince/net.cpp b/Externals/wxWidgets/src/msw/wince/net.cpp
index f8b44f9b14..594fff9e53 100644
--- a/Externals/wxWidgets/src/msw/wince/net.cpp
+++ b/Externals/wxWidgets/src/msw/wince/net.cpp
@@ -4,7 +4,7 @@
 // Author:
 // Modified by:
 // Created:
-// RCS-ID:      $Id: net.cpp 41054 2006-09-07 19:01:45Z ABX $
+// RCS-ID:      $Id: net.cpp 58995 2009-02-18 15:58:25Z JS $
 // Copyright:   Copyright 1998, Ben Goetter.  All rights reserved.
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -19,6 +19,64 @@
   getservbyport
   getservbyname
 
+Subject: Re: Could you provide a license for your wxWidgets v2.6.2 files
+From: Ben Goetter 
+Date: Wed, 22 Mar 2006 09:58:32 -0800
+To: Julian Smart 
+Return-Path: 
+Delivered-To: jsmart@gotadsl.co.uk
+Envelope-To: jsmart@gotadsl.co.uk
+Received: (qmail 6858 invoked from network); 22 Mar 2006 17:58:46 -0000
+Received: from unknown (HELO as004.apm-internet.net) (85.119.248.22) by mail001.apm-internet.net with SMTP; 22 Mar 2006 17:58:46 -0000
+Received: (qmail 47565 invoked from network); 22 Mar 2006 17:58:46 -0000
+X-Spam-Score: 0.1
+X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on as004.apm-internet.net
+X-Spam-Report: * 0.1 AWL AWL: From: address is in the auto white-list
+Received: from unknown (HELO av004.apm-internet.net) (85.119.248.18) by as004.apm-internet.net with SMTP; 22 Mar 2006 17:58:46 -0000
+Received: (qmail 33684 invoked by uid 1013); 22 Mar 2006 17:58:44 -0000
+Received: from unknown (HELO relay002.apm-internet.net) (85.119.248.12) by av004.apm-internet.net with SMTP; 22 Mar 2006 17:58:44 -0000
+Received: (qmail 4919 invoked from network); 22 Mar 2006 17:58:43 -0000
+Received: from unknown (HELO mini-131.dolphin-server.co.uk) (80.87.138.131) by relay002.apm-internet.net with SMTP; 22 Mar 2006 17:58:44 -0000
+Received: (qmail 28982 invoked by uid 64020); 22 Mar 2006 09:59:50 -0000
+Delivered-To: anthemion.co.uk-julian@anthemion.co.uk
+Received: (qmail 28980 invoked from network); 22 Mar 2006 09:59:50 -0000
+Received: from unknown (HELO bgkh-household.seattle.mazama.net) (216.231.59.183) by mini-131.dolphin-server.co.uk with SMTP; 22 Mar 2006 09:59:50 -0000
+Received: from [192.168.0.128] (dhcp128.seattle.mazama.net [192.168.0.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bgkh-household.seattle.mazama.net (Postfix) with ESMTP id 5AE2417020 for ; Wed, 22 Mar 2006 09:58:42 -0800 (PST)
+Message-ID: <44219048.9020000@mazama.net>
+User-Agent: Thunderbird 1.5 (Windows/20051201)
+MIME-Version: 1.0
+References: <8C8EF65853BB6842809053B779B8CAB70E416E95@emss07m14.us.lmco.com> <4420DD8C.6090405@mazama.net> <6.2.1.2.2.20060322091301.0315cc90@pop3.gotadsl.co.uk>
+In-Reply-To: <6.2.1.2.2.20060322091301.0315cc90@pop3.gotadsl.co.uk>
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 8bit
+X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.3/RELEASE, bases: 22032006 #172373, status: clean
+
+Certainly.
+
+I hereby release the text of those three functions -- getprotobynumber, getservbyport, and getservbyname, as found in wxWidgets-2.6.2\include\wx\msw\wince\net.h  and wxWidgets-2.6.2\src\msw\wince\net.cpp -- under the wxWindows license.  Please feel free to replace "All rights reserved." with "Licensed under the wxWindows License" or equivalent boilerplate.
+
+Absolutely no problem,
+Ben
+
+
+Julian Smart wrote:
+> Hi Ben,
+>
+> Thanks a lot for the clarification, and indeed for the code! Apologies if
+> we didn't ask for permission to use those functions.
+>
+> Would it be possible to have these 3 functions licensed under
+> the wxWindows License as well? This would simplify the legal
+> position for us rather than having multiple licenses. The wxWindows
+> License is here:
+>
+> http://www.wxwidgets.org/newlicen.htm
+>
+> Best regards,
+>
+> Julian
+
+
 */
 
 // For compilers that support precompilation, includes "wx.h".
diff --git a/Externals/wxWidgets/src/msw/window.cpp b/Externals/wxWidgets/src/msw/window.cpp
index d03e950105..4810bd68d7 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 53929 2008-06-02 18:27:16Z RD $
+// RCS-ID:      $Id: window.cpp 58750 2009-02-08 10:01:03Z VZ $
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -811,7 +811,11 @@ bool wxWindowMSW::SetFont(const wxFont& font)
     HWND hWnd = GetHwnd();
     if ( hWnd != 0 )
     {
-        WXHANDLE hFont = m_font.GetResourceHandle();
+        // note the use of GetFont() instead of m_font: our own font could have
+        // just been reset and in this case we need to change the font used by
+        // the native window to the default for this class, i.e. exactly what
+        // GetFont() returns
+        WXHANDLE hFont = GetFont().GetResourceHandle();
 
         wxASSERT_MSG( hFont, wxT("should have valid font") );
 
@@ -1944,6 +1948,11 @@ void wxWindowMSW::DoMoveWindow(int x, int y, int width, int height)
 #if USE_DEFERRED_SIZING
         m_pendingPosition = wxPoint(x, y);
         m_pendingSize = wxSize(width, height);
+    }
+    else // window was moved immediately, without deferring it
+    {
+        m_pendingPosition = wxDefaultPosition;
+        m_pendingSize = wxDefaultSize;
 #endif // USE_DEFERRED_SIZING
     }
 }
@@ -4008,7 +4017,6 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
         ::DragQueryFile(hFilesInfo, wIndex,
                         wxStringBuffer(files[wIndex], len), len);
     }
-    DragFinish (hFilesInfo);
 
     wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files);
     event.SetEventObject(this);
@@ -4018,6 +4026,8 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
     event.m_pos.x = dropPoint.x;
     event.m_pos.y = dropPoint.y;
 
+    DragFinish(hFilesInfo);
+
     return GetEventHandler()->ProcessEvent(event);
 #endif
 }
@@ -4183,7 +4193,7 @@ bool wxWindowMSW::IsDoubleBuffered() const
             return true;
         wnd = wnd->GetParent();
     } while ( wnd && !wnd->IsTopLevel() );
-        
+
     return false;
 }
 
@@ -5170,9 +5180,9 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags)
             static bool s_initDone = false;
             if ( !s_initDone )
             {
-                wxLogNull noLog;
-
-                wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM);
+                // see comment in wxApp::GetComCtl32Version() explaining the
+                // use of wxLoadedDLL
+                wxLoadedDLL dllComCtl32(_T("comctl32.dll"));
                 if ( dllComCtl32.IsLoaded() )
                 {
                     s_pfn_TrackMouseEvent = (_TrackMouseEvent_t)
@@ -5180,10 +5190,6 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags)
                 }
 
                 s_initDone = true;
-
-                // notice that it's ok to unload comctl32.dll here as it won't
-                // be really unloaded, being still in use because we link to it
-                // statically too
             }
 
             if ( s_pfn_TrackMouseEvent )
@@ -5961,6 +5967,7 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
             break;
 
         default:
+#ifndef __WXWINCE__
             // check to see if its one of the OEM key codes.
             BYTE vks = LOBYTE(VkKeyScan(wxk));
             if ( vks != 0xff )
@@ -5968,6 +5975,7 @@ WXWORD wxCharCodeWXToMSW(int wxk, bool *isVirtual)
                 vk = vks;
             }
             else
+#endif
             {
                 if ( isVirtual )
                     *isVirtual = false;
diff --git a/Externals/wxWidgets/src/png/pngwutil.c b/Externals/wxWidgets/src/png/pngwutil.c
index d7a8faa685..17938d2278 100644
--- a/Externals/wxWidgets/src/png/pngwutil.c
+++ b/Externals/wxWidgets/src/png/pngwutil.c
@@ -631,8 +631,8 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
             if (data[0] != (png_byte)z_cmf)
             {
                data[0] = (png_byte)z_cmf;
-               data[1] &= (png_byte)0xe0;
-               data[1] = (png_byte)(data[1] + 0x1f - ((z_cmf << 8) + data[1]) % 0x1f);
+               data[1] &= 0xe0;
+               data[1] += (png_byte)(0x1f - ((z_cmf << 8) + data[1]) % 0x1f);
             }
          }
       }
@@ -1556,7 +1556,7 @@ png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
 #endif
    png_size_t total_len;
    char wbuf[32], hbuf[32];
-   png_byte bunit = (png_byte)unit;
+   png_byte bunit = unit;
 
    png_debug(1, "in png_write_sCAL\n");