+# define wxALL_FILES_PATTERN wxT("*.*")
+# define wxALL_FILES gettext_noop("All files (*.*)|*.*")
+#else
+# define wxALL_FILES_PATTERN wxT("*")
+# define wxALL_FILES gettext_noop("All files (*)|*")
+#endif
+
+#if defined(__CYGWIN__) && defined(__WXMSW__)
+# if wxUSE_STL || defined(wxUSE_STD_STRING)
+ /*
+ NASTY HACK because the gethostname in sys/unistd.h which the gnu
+ stl includes and wx builds with by default clash with each other
+ (windows version 2nd param is int, sys/unistd.h version is unsigned
+ int).
+ */
+# define gethostname gethostnameHACK
+# include <unistd.h>
+# undef gethostname
+# endif
+#endif
+
+/* --------------------------------------------------------------------------- */
+/* macros that enable wxWidgets apps to be compiled in absence of the */
+/* sytem headers, although some platform specific types are used in the */
+/* platform specific (implementation) parts of the headers */
+/* --------------------------------------------------------------------------- */
+
+#ifdef __WXMAC__
+
+#define WX_OPAQUE_TYPE( name ) struct wxOpaque##name
+
+typedef void* WXHBITMAP;
+typedef void* WXHCURSOR;
+typedef void* WXRECTPTR;
+typedef void* WXPOINTPTR;
+typedef void* WXHWND;
+typedef void* WXEVENTREF;
+typedef void* WXEVENTHANDLERREF;
+typedef void* WXEVENTHANDLERCALLREF;
+typedef void* WXAPPLEEVENTREF;
+
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ;
+#if wxOSX_USE_CARBON
+typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
+typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
+typedef struct __AGLPixelFormatRec *WXGLPixelFormat;
+typedef struct __AGLContextRec *WXGLContext;
+#endif
+
+typedef void* WXDisplay;
+
+/*
+ * core frameworks
+ */
+
+typedef const void * CFTypeRef;
+
+typedef const struct __CFString * CFStringRef;
+typedef struct __CFString * CFMutableStringRef;
+
+typedef struct __CFRunLoopSource * CFRunLoopSourceRef;
+
+#define DECLARE_WXMAC_OPAQUE_CGREF( name ) typedef struct name* name##Ref;
+
+DECLARE_WXMAC_OPAQUE_CGREF( CGColor )
+DECLARE_WXMAC_OPAQUE_CGREF( CGImage )
+DECLARE_WXMAC_OPAQUE_CGREF( CGContext )
+
+typedef CGColorRef WXCOLORREF;
+typedef CGImageRef WXCGIMAGEREF;
+typedef CGContextRef WXHDC;
+
+/*
+ * carbon
+ */
+
+typedef const struct __HIShape * HIShapeRef;
+typedef struct __HIShape * HIMutableShapeRef;
+
+#define DECLARE_WXMAC_OPAQUE_REF( name ) typedef struct Opaque##name* name;
+
+DECLARE_WXMAC_OPAQUE_REF( PasteboardRef )
+DECLARE_WXMAC_OPAQUE_REF( IconRef )
+DECLARE_WXMAC_OPAQUE_REF( MenuRef )
+
+typedef IconRef WXHICON ;
+typedef HIShapeRef WXHRGN;
+#if wxOSX_USE_CARBON
+typedef MenuRef WXHMENU;
+#endif
+
+#endif
+
+#if defined( __WXCOCOA__ ) || defined(__WXMAC__)
+
+/* Definitions of 32-bit/64-bit types
+ * These are typedef'd exactly the same way in newer OS X headers so
+ * redefinition when real headers are included should not be a problem. If
+ * it is, the types are being defined wrongly here.
+ * The purpose of these types is so they can be used from public wx headers.
+ * and also because the older (pre-Leopard) headers don't define them.
+ */
+
+/* NOTE: We don't pollute namespace with CGFLOAT_MIN/MAX/IS_DOUBLE macros
+ * since they are unlikely to be needed in a public header.
+ */
+#if defined(__LP64__) && __LP64__
+ typedef double CGFloat;
+#else
+ typedef float CGFloat;
+#endif
+
+#if (defined(__LP64__) && __LP64__) || (defined(NS_BUILD_32_LIKE_64) && NS_BUILD_32_LIKE_64)
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+#endif
+
+/* Objective-C type declarations.
+ * These are to be used in public headers in lieu of NSSomething* because
+ * Objective-C class names are not available in C/C++ code.
+ */
+
+/* NOTE: This ought to work with other compilers too, but I'm being cautious */
+#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__)
+/* It's desirable to have type safety for Objective-C(++) code as it does
+at least catch typos of method names among other things. However, it
+is not possible to declare an Objective-C class from plain old C or C++
+code. Furthermore, because of C++ name mangling, the type name must
+be the same for both C++ and Objective-C++ code. Therefore, we define
+what should be a pointer to an Objective-C class as a pointer to a plain
+old C struct with the same name. Unfortunately, because the compiler
+does not see a struct as an Objective-C class we cannot declare it
+as a struct in Objective-C(++) mode.
+*/
+#if defined(__OBJC__)
+#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \
+@class klass; \
+typedef klass *WX_##klass
+#else /* not defined(__OBJC__) */
+#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \
+typedef struct klass *WX_##klass
+#endif /* defined(__OBJC__) */
+
+#else /* not Apple's GNU or CodeWarrior */
+#warning "Objective-C types will not be checked by the compiler."
+/* NOTE: typedef struct objc_object *id; */
+/* IOW, we're declaring these using the id type without using that name, */
+/* since "id" is used extensively not only within wxWidgets itself, but */
+/* also in wxWidgets application code. The following works fine when */
+/* compiling C(++) code, and works without typesafety for Obj-C(++) code */
+#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \
+typedef struct objc_object *WX_##klass
+
+#endif /* (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__) */
+
+DECLARE_WXCOCOA_OBJC_CLASS(NSApplication);
+DECLARE_WXCOCOA_OBJC_CLASS(NSBitmapImageRep);
+DECLARE_WXCOCOA_OBJC_CLASS(NSBox);
+DECLARE_WXCOCOA_OBJC_CLASS(NSButton);
+DECLARE_WXCOCOA_OBJC_CLASS(NSColor);
+DECLARE_WXCOCOA_OBJC_CLASS(NSColorPanel);
+DECLARE_WXCOCOA_OBJC_CLASS(NSControl);
+DECLARE_WXCOCOA_OBJC_CLASS(NSCursor);
+DECLARE_WXCOCOA_OBJC_CLASS(NSEvent);
+DECLARE_WXCOCOA_OBJC_CLASS(NSFontPanel);
+DECLARE_WXCOCOA_OBJC_CLASS(NSImage);
+DECLARE_WXCOCOA_OBJC_CLASS(NSLayoutManager);
+DECLARE_WXCOCOA_OBJC_CLASS(NSMenu);
+DECLARE_WXCOCOA_OBJC_CLASS(NSMenuExtra);
+DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
+DECLARE_WXCOCOA_OBJC_CLASS(NSMutableArray);
+DECLARE_WXCOCOA_OBJC_CLASS(NSNotification);
+DECLARE_WXCOCOA_OBJC_CLASS(NSObject);
+DECLARE_WXCOCOA_OBJC_CLASS(NSPanel);
+DECLARE_WXCOCOA_OBJC_CLASS(NSScrollView);
+DECLARE_WXCOCOA_OBJC_CLASS(NSSound);
+DECLARE_WXCOCOA_OBJC_CLASS(NSStatusItem);
+DECLARE_WXCOCOA_OBJC_CLASS(NSTableColumn);
+DECLARE_WXCOCOA_OBJC_CLASS(NSTableView);
+DECLARE_WXCOCOA_OBJC_CLASS(NSTextContainer);
+DECLARE_WXCOCOA_OBJC_CLASS(NSTextField);
+DECLARE_WXCOCOA_OBJC_CLASS(NSTextStorage);
+DECLARE_WXCOCOA_OBJC_CLASS(NSThread);
+DECLARE_WXCOCOA_OBJC_CLASS(NSWindow);
+DECLARE_WXCOCOA_OBJC_CLASS(NSView);
+DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLContext);
+DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLPixelFormat);
+#ifndef __WXMAC__
+typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
+#endif
+#endif /* __WXCOCOA__ || ( __WXMAC__ &__DARWIN__)*/
+
+#ifdef __WXMAC__
+
+DECLARE_WXCOCOA_OBJC_CLASS(NSString);
+
+#if wxOSX_USE_COCOA
+
+typedef WX_NSWindow WXWindow;
+typedef WX_NSView WXWidget;
+typedef WX_NSMenu WXHMENU;
+typedef WX_NSOpenGLPixelFormat WXGLPixelFormat;
+typedef WX_NSOpenGLContext WXGLContext;
+
+#elif wxOSX_USE_IPHONE
+
+DECLARE_WXCOCOA_OBJC_CLASS(UIWindow);
+DECLARE_WXCOCOA_OBJC_CLASS(UIView);
+DECLARE_WXCOCOA_OBJC_CLASS(UIFont);
+
+typedef WX_UIWindow WXWindow;
+typedef WX_UIView WXWidget;
+
+#endif
+
+#endif // __WXMAC__
+
+#if defined(__WXPALMOS__)
+
+typedef void * WXHWND;
+typedef void * WXHANDLE;
+typedef void * WXHICON;
+typedef void * WXHFONT;
+typedef void * WXHMENU;
+typedef void * WXHPEN;
+typedef void * WXHBRUSH;
+typedef void * WXHPALETTE;
+typedef void * WXHCURSOR;
+typedef void * WXHRGN;
+typedef void * WXHACCEL;
+typedef void * WXHINSTANCE;
+typedef void * WXHBITMAP;
+typedef void * WXHIMAGELIST;
+typedef void * WXHGLOBAL;
+typedef void * WXHDC;
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef unsigned long WXCOLORREF;
+typedef struct tagMSG WXMSG;
+
+typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */
+typedef WXWINHANDLE WXWidget;
+
+typedef void * WXFORMPTR;
+typedef void * WXEVENTPTR;
+typedef void * WXRECTANGLEPTR;
+
+#endif /* __WXPALMOS__ */
+
+
+/* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
+#if defined(__WIN32__)
+
+/* the keywords needed for WinMain() declaration */
+#ifndef WXFAR
+# define WXFAR
+#endif
+
+/* Stand-ins for Windows types to avoid #including all of windows.h */
+typedef void * WXHWND;
+typedef void * WXHANDLE;
+typedef void * WXHICON;
+typedef void * WXHFONT;
+typedef void * WXHMENU;
+typedef void * WXHPEN;
+typedef void * WXHBRUSH;
+typedef void * WXHPALETTE;
+typedef void * WXHCURSOR;
+typedef void * WXHRGN;
+typedef void * WXRECTPTR;
+typedef void * WXHACCEL;
+typedef void WXFAR * WXHINSTANCE;
+typedef void * WXHBITMAP;
+typedef void * WXHIMAGELIST;
+typedef void * WXHGLOBAL;
+typedef void * WXHDC;
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef unsigned long WXCOLORREF;
+typedef void * WXRGNDATA;
+typedef struct tagMSG WXMSG;
+typedef void * WXHCONV;
+typedef void * WXHKEY;
+typedef void * WXHTREEITEM;
+
+typedef void * WXDRAWITEMSTRUCT;
+typedef void * WXMEASUREITEMSTRUCT;
+typedef void * WXLPCREATESTRUCT;
+
+typedef WXHWND WXWidget;
+
+#ifdef __WIN64__
+typedef unsigned __int64 WXWPARAM;
+typedef __int64 WXLPARAM;
+typedef __int64 WXLRESULT;
+#else
+typedef wxW64 unsigned int WXWPARAM;
+typedef wxW64 long WXLPARAM;
+typedef wxW64 long WXLRESULT;
+#endif
+
+#if defined(__GNUWIN32__) || defined(__WXMICROWIN__)
+typedef int (*WXFARPROC)();
+#else
+typedef int (__stdcall *WXFARPROC)();
+#endif
+#endif /* __WIN32__ */
+
+
+#if defined(__OS2__)
+typedef unsigned long DWORD;
+typedef unsigned short WORD;
+#endif
+
+#if defined(__WXPM__) || defined(__EMX__)
+#ifdef __WXPM__
+/* Stand-ins for OS/2 types, to avoid #including all of os2.h */