diff --git a/3rdparty/3rdpartyDLL.vsprops b/3rdparty/3rdpartyDLL.vsprops
new file mode 100644
index 0000000000..0c5392da35
--- /dev/null
+++ b/3rdparty/3rdpartyDLL.vsprops
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/3rdparty/DefaultProjectRootDir.vsprops b/3rdparty/DefaultProjectRootDir.vsprops
new file mode 100644
index 0000000000..7d8862f052
--- /dev/null
+++ b/3rdparty/DefaultProjectRootDir.vsprops
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/3rdparty/SoundTouch/SoundTouch.cbp b/3rdparty/SoundTouch/SoundTouch.cbp
new file mode 100644
index 0000000000..00fcdbec23
--- /dev/null
+++ b/3rdparty/SoundTouch/SoundTouch.cbp
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/bzip2/bzip2.cbp b/3rdparty/bzip2/bzip2.cbp
new file mode 100644
index 0000000000..b7a49c1245
--- /dev/null
+++ b/3rdparty/bzip2/bzip2.cbp
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/google/sparsehash/sparseconfig.h b/3rdparty/google/sparsehash/sparseconfig.h
index 0ae597ed5b..0666d49306 100644
--- a/3rdparty/google/sparsehash/sparseconfig.h
+++ b/3rdparty/google/sparsehash/sparseconfig.h
@@ -28,7 +28,7 @@
#define GOOGLE_NAMESPACE google
/* the location of / */
- #define HASH_FUN_H
+ #define HASH_FUN_H
/* the namespace of hash_map/hash_set */
#define HASH_NAMESPACE __gnu_cxx
diff --git a/3rdparty/w32pthreads/include/pthread.h b/3rdparty/w32pthreads/include/pthread.h
index 12b4a169b5..1dc22fa06b 100644
--- a/3rdparty/w32pthreads/include/pthread.h
+++ b/3rdparty/w32pthreads/include/pthread.h
@@ -570,19 +570,14 @@ typedef struct _ptw32_handle_t {
#ifdef __cplusplus
// Added support for various operators so that the struct is
// more pthreads-compliant in behavior. (air)
- const bool operator ==( const void* rightside )
+ const bool operator ==( const struct _ptw32_handle_t rightside ) const
{
- return p == rightside;
+ return p == rightside.p;
}
- const bool operator !=( const void* rightside )
+ const bool operator !=( const struct _ptw32_handle_t rightside ) const
{
- return p != rightside;
- }
-
- bool operator =( void* rightside )
- {
- p = rightside;
+ return p != rightside.p;
}
#endif
@@ -747,6 +742,8 @@ struct ptw32_cleanup_t
};
#ifdef __CLEANUP_SEH
+#include // PCSX2: excpt.h is needed for AbnormalTermination() -- air
+
/*
* WIN32 SEH version of cancel cleanup.
*/
diff --git a/3rdparty/w32pthreads/pthreads_2008.vcproj b/3rdparty/w32pthreads/pthreads_2008.vcproj
index 26f91c289e..d9266cce24 100644
--- a/3rdparty/w32pthreads/pthreads_2008.vcproj
+++ b/3rdparty/w32pthreads/pthreads_2008.vcproj
@@ -2,7 +2,7 @@
@@ -108,11 +105,10 @@
@@ -176,11 +170,10 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1058,6 +3997,34 @@
RelativePath=".\PCSX2.txt"
>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/w32pthreads/resource.h b/3rdparty/w32pthreads/resource.h
new file mode 100644
index 0000000000..fa3ad73e2d
--- /dev/null
+++ b/3rdparty/w32pthreads/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by w32pthreads.v2.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/3rdparty/w32pthreads/w32pthreads.v2.rc b/3rdparty/w32pthreads/w32pthreads.v2.rc
new file mode 100644
index 0000000000..bd048f1815
--- /dev/null
+++ b/3rdparty/w32pthreads/w32pthreads.v2.rc
@@ -0,0 +1,100 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxresmw.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxresmw.h""\r\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 2,8,2,0
+ PRODUCTVERSION 2,8,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "Built for PCSX2 (SEH, CDECL, Align16)"
+ VALUE "FileDescription", "POSIX Threads for Win32"
+ VALUE "FileVersion", "2.8.pxr2"
+ VALUE "InternalName", "w32pthreads"
+ VALUE "LegalCopyright", "Copyright (C) 2009"
+ VALUE "OriginalFilename", "w32pthreads.v2"
+ VALUE "ProductName", "w32pthreads"
+ VALUE "ProductVersion", "2.8"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/3rdparty/wxWidgets/art/addbookm.xpm b/3rdparty/wxWidgets/art/addbookm.xpm
new file mode 100644
index 0000000000..5d5b1c5669
--- /dev/null
+++ b/3rdparty/wxWidgets/art/addbookm.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static const char * addbookm_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 3 1",
+". c Black",
+"X c #00C000",
+" c None",
+/* pixels */
+" ....... ",
+" .XXXXX. ",
+" .. .XXXXX. ",
+" .. .XXXXX. ",
+" ...... .XXXXX. ",
+" ...... .XXXXX. ",
+" .. .XXXXX. ",
+" .. .XXXXX. ",
+" .XXXXX. ",
+" .XXXXX. ",
+" .XXXXX. ",
+" .XXXXX. ",
+" .XX.XX. ",
+" .X. .X. ",
+" .. .. "
+};
diff --git a/3rdparty/wxWidgets/art/back.xpm b/3rdparty/wxWidgets/art/back.xpm
new file mode 100644
index 0000000000..553643a365
--- /dev/null
+++ b/3rdparty/wxWidgets/art/back.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * back_xpm[] = {
+"16 15 3 1",
+" c None",
+". c Black",
+"X c Gray100",
+" ",
+" ",
+" . ",
+" .. ",
+" .X. ",
+" .XX........ ",
+" .XXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXX. ",
+" .XX........ ",
+" .X. ",
+" .. ",
+" . ",
+" "};
diff --git a/3rdparty/wxWidgets/art/cdrom.xpm b/3rdparty/wxWidgets/art/cdrom.xpm
new file mode 100644
index 0000000000..d1468ae2a2
--- /dev/null
+++ b/3rdparty/wxWidgets/art/cdrom.xpm
@@ -0,0 +1,57 @@
+/* XPM */
+static const char * cdrom_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 36 1",
+"= c #9BACC2",
+"y c #547B99",
+"$ c #FFFFFF",
+"@ c #839CB5",
+"o c #547897",
+"4 c #4D7492",
+"% c #F1F4F7",
+"X c #5A809C",
+"< c #8497A5",
+"0 c #7898AD",
+"+ c #CAD2DC",
+"r c #ACAEB2",
+"2 c #BECAD9",
+"* c #65839D",
+"e c #DCE2EA",
+"- c #ADBED2",
+"t c #597B9A",
+" c None",
+"1 c #467291",
+"9 c #D6DFE7",
+"O c #7393AB",
+"u c #49708B",
+"5 c #A0BACB",
+"& c #AABFCD",
+"8 c #B9CBD5",
+"; c #B4C4D3",
+": c #6F90A6",
+"3 c #A8B6CA",
+"# c #ADBACE",
+"w c #E4E9ED",
+". c #8EA9BC",
+"> c #B3BFD1",
+", c #C2CBDB",
+"6 c #C0D1DC",
+"7 c #A2B3C5",
+"q c #5D7C93",
+/* pixels */
+" .XooOo+ ",
+" X@#$$$%o& ",
+" *=-;$$$$$o+ ",
+" +O#;-$$$$$$: ",
+" o=>,-<1<$2-o ",
+" o3>--1$122-* ",
+" o=--$<4<22-X ",
+" o5$$$$$26;7* ",
+" X%$$$$2;-X8 ",
+" 90*9$$$-7Xqo ",
+" wXwe@O44X422222<<*4",
+" ttyyyoo4441uuuo",
+" t>$$$$$$$$$$$>o",
+" XXXtyyyoo44411u"
+};
diff --git a/3rdparty/wxWidgets/art/copy.xpm b/3rdparty/wxWidgets/art/copy.xpm
new file mode 100644
index 0000000000..c6d542fdd2
--- /dev/null
+++ b/3rdparty/wxWidgets/art/copy.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static const char * copy_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 23 1",
+"o c #97C4E7",
+"* c #FFFFFF",
+"@ c #60A9DA",
+"= c #D1E5F5",
+"& c #C3DDF1",
+". c #7EA6C0",
+" c None",
+"X c #2F93CD",
+"O c #85BBE2",
+", c #EFF6FC",
+"; c #DEEDF8",
+"+ c #72B2DD",
+"3 c #F7FBFD",
+"4 c #FAFCFE",
+": c #DAEAF7",
+"< c #E9F3FA",
+"1 c #E2EFF8",
+"- c #FDFDFE",
+"% c #B6D5EE",
+"$ c #A5CCEA",
+"> c #E5F0F9",
+"# c #AFD1EC",
+"2 c #F4F9FD",
+/* pixels */
+" .....XX ",
+" .oO+@X#X ",
+" .$oO+X##X ",
+" .%$o........ ",
+" .&%$.*=o.-. ",
+" .=&%.*;=.--. ",
+" .:=&.*>;=&.... ",
+" .>:=.*,>;=o. ",
+" .<1:.*2,>:=. ",
+" .2<1.*32,>:=&. ",
+" .32<.*432,>:=. ",
+" .32<.*-432,>:. ",
+" .....**-432,>. ",
+" .***-432,. ",
+" .......... "
+};
diff --git a/3rdparty/wxWidgets/art/cross.xpm b/3rdparty/wxWidgets/art/cross.xpm
new file mode 100644
index 0000000000..649b004ce8
--- /dev/null
+++ b/3rdparty/wxWidgets/art/cross.xpm
@@ -0,0 +1,17 @@
+/* XPM */
+static const char * cross_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"10 10 2 1",
+" c Gray0",
+"# c None",
+/* pixels */
+" ######## ",
+" #### ",
+"# ## #",
+"## ##",
+"### ###",
+"### ###",
+"## ##",
+"# ## #",
+" #### ",
+" ###### "};
diff --git a/3rdparty/wxWidgets/art/cut.xpm b/3rdparty/wxWidgets/art/cut.xpm
new file mode 100644
index 0000000000..bbbd7a3b04
--- /dev/null
+++ b/3rdparty/wxWidgets/art/cut.xpm
@@ -0,0 +1,46 @@
+/* XPM */
+static const char * cut_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 25 1",
+"6 c #D8BDC0",
+": c #C3C3C4",
+"- c #FFFFFF",
+". c #6C6D70",
+"2 c #AD3A45",
+"o c #DBDBDB",
+"# c #939495",
+"< c #E42234",
+"& c #C3C5C8",
+"; c #C6CCD3",
+"% c #B7B7B8",
+" c None",
+"* c #DFE0E2",
+"5 c #B69596",
+"3 c #9C2A35",
+"1 c #CFCFD0",
+", c #AB5C64",
+"+ c #D2D3D4",
+"$ c #BCBDBE",
+"@ c #C6C8CA",
+"> c #CDC0C1",
+"O c #826F72",
+"X c #979BA0",
+"4 c #9B8687",
+"= c #9FA0A0",
+/* pixels */
+" .X .o ",
+" O.+ @. ",
+" O. .. ",
+" O#$ %.& ",
+" O.*.. ",
+" #%#.. ",
+" O=-.. ",
+" #%#;. ",
+" OO:=O ",
+" >,,<, ,<,,1 ",
+" ><23<1 1<32<1 ",
+" ,2 4< <5 2, ",
+" <, ,2 2, ,< ",
+" 23,<5 5<,32 ",
+" 6225 522> "
+};
diff --git a/3rdparty/wxWidgets/art/deffile.xpm b/3rdparty/wxWidgets/art/deffile.xpm
new file mode 100644
index 0000000000..45e5a48a1c
--- /dev/null
+++ b/3rdparty/wxWidgets/art/deffile.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+static const char * deffile_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 32 1",
+"= c #97C4E7",
+": c #72A8D2",
+"1 c #FFFFFF",
+"w c #839CB5",
+"X c #6B98B8",
+". c #5A89A6",
+"@ c #3A749C",
+", c #D1E5F5",
+"< c #67A1CF",
+"> c #F1F4F7",
+"e c #85A7BC",
+"% c #C3DDF1",
+"0 c #749BB4",
+"2 c #7EA6C0",
+"; c #5F9BC8",
+" c None",
+"O c #538DB3",
+"- c #85BBE2",
+"$ c #D6DFE7",
+"9 c #EFF6FC",
+"o c #6591AE",
+"4 c #F7FBFD",
+"8 c #FAFCFE",
+"6 c #DAEAF7",
+"7 c #E9F3FA",
+"q c #FDFDFE",
+"3 c #E2EFF8",
+"# c #8EA9BC",
+"& c #B6D5EE",
+"* c #A5CCEA",
+"5 c #F4F9FD",
+"+ c #4581AA",
+/* pixels */
+" ..XooO+@#$ ",
+" .%%&*=-;:;> ",
+" .,,%&*=<1=X> ",
+" #%%%%&*211=X ",
+" #3----- c #5A7BB4",
+"% c #5F7FB5",
+/* pixels */
+" ",
+" .Xo OO ",
+" +@#. $@% ",
+" &@@X .*@*o ",
+" =@= .*@*. ",
+" -@@X*@*. ",
+" .#@@@$. ",
+" ;@@: ",
+" ;@@@+ ",
+" .>@#%@@. ",
+" o*@*oO@@, ",
+" <#@*. .@@= ",
+"&@@$ :@@1 ",
+";#& 2#>. ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/dir_up.xpm b/3rdparty/wxWidgets/art/dir_up.xpm
new file mode 100644
index 0000000000..536d244830
--- /dev/null
+++ b/3rdparty/wxWidgets/art/dir_up.xpm
@@ -0,0 +1,52 @@
+/* XPM */
+static const char * dir_up_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 31 1",
+"6 c #9BACC2",
+"o c #9AEA53",
+"7 c #94A5BD",
+"8 c #547897",
+"5 c #839CB5",
+"@ c #376485",
+"$ c #5A809C",
+"# c #7F99B4",
+": c #D1D9E5",
+"< c #EAEDF3",
+"& c #446A8C",
+"q c #65839D",
+"> c #DCE2EA",
+", c #E1E6EE",
+"2 c #F5F6F7",
+"O c #8DA0B9",
+" c None",
+"% c #467291",
+". c #305F81",
+"X c #7393AB",
+"+ c #6A89A2",
+"4 c #A8B6CA",
+"1 c #EEF1F3",
+"3 c #F8F9FA",
+"0 c #215579",
+"9 c #7F97B0",
+"* c #B3BFD1",
+"w c #7A90AC",
+"- c #C2CBDB",
+"; c #CAD6E1",
+"= c #BBC4D6",
+/* pixels */
+" .. ",
+" X.o. ",
+".... X.ooo. ",
+".OO+....ooooo. ",
+".OOOOOO@@ooo.. ",
+".OOOO#OO@ooo.$ ",
+".OOOOOOO@ooo.$ ",
+".O%............&",
+".O&*=-;:>,<1231.",
+".+.4*=-;:>,<12$.",
+"..564*=-;:>,<1. ",
+".@O764*=-;:>,<. ",
+".89O764*=-;:>$$ ",
+"0qw9O764*=-;:. ",
+"0............. "
+};
diff --git a/3rdparty/wxWidgets/art/down.xpm b/3rdparty/wxWidgets/art/down.xpm
new file mode 100644
index 0000000000..a3a9f1cf2b
--- /dev/null
+++ b/3rdparty/wxWidgets/art/down.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * down_xpm[] = {
+"16 15 3 1",
+" c None",
+". c Black",
+"X c Gray100",
+" ",
+" ...... ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" ....XXXX.... ",
+" .XXXXXXXX. ",
+" .XXXXXX. ",
+" .XXXX. ",
+" .XX. ",
+" .. ",
+" "};
diff --git a/3rdparty/wxWidgets/art/exefile.xpm b/3rdparty/wxWidgets/art/exefile.xpm
new file mode 100644
index 0000000000..50db9a10c7
--- /dev/null
+++ b/3rdparty/wxWidgets/art/exefile.xpm
@@ -0,0 +1,73 @@
+/* XPM */
+static const char * exefile_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 51 1",
+"% c #E8E8EC",
+"= c #E8E8ED",
+"z c #CACAD4",
+"8 c #D9D9E1",
+"p c #D2D2DA",
+"u c #E1E1E7",
+"a c #D2D2DB",
+"< c #E9E9ED",
+"q c #DADAE1",
+"+ c #F1F1F4",
+"g c #D3D3DB",
+"1 c #E2E2E8",
+"x c #D3D3DC",
+"5 c #00A5FF",
+"$ c #EAEAEE",
+"4 c #DBDBE2",
+"h c #CCCCD6",
+"y c #D4D4DC",
+"r c #E3E3E9",
+"d c #D4D4DD",
+"7 c #DCDCE2",
+": c #EBEBEF",
+"0 c #DCDCE3",
+" c None",
+"O c #F3F3F5",
+"> c #E4E4E9",
+"& c #F3F3F6",
+"j c #D5D5DD",
+"6 c #E4E4EA",
+". c #C6C6D5",
+"# c #ECECF0",
+"f c #CECED7",
+"l c #CECED8",
+"e c #D6D6DE",
+"; c #EDEDF0",
+"3 c #DEDEE4",
+", c #EDEDF1",
+"c c #CFCFD8",
+"o c #F5F5F7",
+"- c #E6E6EB",
+"w c #D7D7DF",
+"v c #C8C8D3",
+"i c #DFDFE5",
+"@ c #EEEEF2",
+"s c #D0D0D9",
+"X c #9494AD",
+"9 c #D8D8DF",
+"t c #D8D8E0",
+"* c #EFEFF2",
+"2 c #E0E0E6",
+"k c #D1D1DA",
+/* pixels */
+" ........X ",
+" .oO+@#$%XX ",
+" .&+*#$=-XXX ",
+" .+*;:=->XXXX ",
+" .*,:<->1234X ",
+" .,5:5612378X ",
+" 5,5559530qwX ",
+" 55555550q9eX ",
+" 5555r5555teyX ",
+" 55rui559eypX ",
+" 5555i5555yasX ",
+" 5555555dasfX ",
+" 5355595gsfhX ",
+" .3595jgklhzX ",
+" .0qwjxkchzvX ",
+" XXXXXXXXXXXX "
+};
diff --git a/3rdparty/wxWidgets/art/fileopen.xpm b/3rdparty/wxWidgets/art/fileopen.xpm
new file mode 100644
index 0000000000..59a95618d3
--- /dev/null
+++ b/3rdparty/wxWidgets/art/fileopen.xpm
@@ -0,0 +1,57 @@
+/* XPM */
+static const char * fileopen_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 36 1",
+"6 c #9BACC2",
+"< c #9AEA53",
+"9 c #94A5BD",
+"5 c #839CB5",
+"; c #4D7492",
+". c #376485",
+"$ c #7F99B4",
+"r c #D1D9E5",
+"7 c #EAEDF3",
+"@ c #CAD2DC",
+"% c #718BA7",
+"t c #BECAD9",
+"& c #65839D",
+"0 c #DCE2EA",
+"4 c #F5F6F7",
+"w c #597B9A",
+"O c #8DA0B9",
+" c None",
+"+ c #467291",
+"u c #305F81",
+"= c #B4C4D3",
+"# c #CAE2AA",
+"1 c #FAFCFE",
+"3 c #A8B6CA",
+"q c #E4E9ED",
+"8 c #EEF1F3",
+"X c #215579",
+"2 c #7F97B0",
+": c #B3BFD1",
+"y c #7A90AC",
+", c #C2CBDB",
+"- c #ADD668",
+"* c #B6D791",
+"e c #CAD6E1",
+"o c #DFF0D0",
+"> c #BBC4D6",
+/* pixels */
+" ",
+" .... ",
+"XXXXX .oo. ",
+"XOOOO+@.#o. ",
+"XOOOO$%&.*oXXX ",
+"XOOOOOOO.*oX=X ",
+"XOXXXX...-oXXXX;",
+"XOX:>,.<<<<,.<<>.>.X0q7; ",
+"Xw2O963:>>er0t; ",
+"X&y2O963:>,er; ",
+"uXXXXXXXXXXXX; ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/filesave.xpm b/3rdparty/wxWidgets/art/filesave.xpm
new file mode 100644
index 0000000000..2e20ee2938
--- /dev/null
+++ b/3rdparty/wxWidgets/art/filesave.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static const char * filesave_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 21 1",
+"O c #FFFFFF",
+"> c #D5D6D8",
+"; c #446A8C",
+"1 c #CAD2DC",
+": c #C0C7D1",
+" c #5F666D",
+"% c #A5B0BA",
+"o c #65839D",
+", c #DCE2EA",
+"< c #C3C5C8",
+"- c #E1E6EE",
+"* c #C6CCD3",
+". c None",
+"$ c #305F81",
+"2 c #D6DFE7",
+"= c #D2D9E0",
+"& c #B7BFC7",
+"X c #1B4467",
+"# c #BCBDBE",
+"@ c #7A90AC",
+"+ c #5D7C93",
+/* pixels */
+" .",
+" XoOOOOOOOOO+X .",
+" @oO#######O+@ .",
+" @oOOOOOOOOO+@ .",
+" @oO#######O+@ .",
+" @oOOOOOOOOO+@ .",
+" @@+++++++++@@ .",
+" @@@@@@@@@@@@@ .",
+" @@@$$$$$$$$@@ .",
+" @@$%%%&*=-O$@ .",
+" @@$%X;;*=-O$@ .",
+" @@$%X;;:>,O$@ .",
+" @@$%X;;<12O$@ .",
+" @@$<<2OOOOO$@ .",
+". .."
+};
diff --git a/3rdparty/wxWidgets/art/filesaveas.xpm b/3rdparty/wxWidgets/art/filesaveas.xpm
new file mode 100644
index 0000000000..d4e90bc3d2
--- /dev/null
+++ b/3rdparty/wxWidgets/art/filesaveas.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static const char * filesaveas_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 23 1",
+"X c Black",
+"+ c #FFFFFF",
+"< c #D5D6D8",
+"> c #446A8C",
+"3 c #CAD2DC",
+", c #C0C7D1",
+" c #5F666D",
+"* c #A5B0BA",
+"O c #65839D",
+"1 c #DCE2EA",
+"2 c #C3C5C8",
+": c #E1E6EE",
+". c #FFFF00",
+"- c #C6CCD3",
+"@ c None",
+"& c #305F81",
+"4 c #D6DFE7",
+"; c #D2D9E0",
+"= c #B7BFC7",
+"o c #1B4467",
+"$ c #BCBDBE",
+"# c #7A90AC",
+"% c #5D7C93",
+/* pixels */
+" .X .XX.",
+" oO+++++++.X.X.@",
+" #O+$$$$$XX...XX",
+" #O++++++.......",
+" #O+$$$$$XX...XX",
+" #O+++++++.X.X.@",
+" ##%%%%%%.X%.X .",
+" ############# @",
+" ###&&&&&&&# @",
+" ##&***=-;:+ @",
+" ##&*o>>-;:+ @",
+" ##&*o>>,<1+ @",
+" ##&*o>>234+ @",
+" ##&224+++++ @",
+"@ @@"
+};
diff --git a/3rdparty/wxWidgets/art/find.xpm b/3rdparty/wxWidgets/art/find.xpm
new file mode 100644
index 0000000000..c4530b24e9
--- /dev/null
+++ b/3rdparty/wxWidgets/art/find.xpm
@@ -0,0 +1,62 @@
+/* XPM */
+static const char * find_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 41 1",
+"y c #A06959",
+"9 c #A7DAF2",
+"$ c #B5CAD7",
+"> c #35B4E1",
+"t c #6B98B8",
+"w c #B6E0F4",
+"q c #AEC9D7",
+"1 c #5A89A6",
+"+ c #98B3C6",
+"4 c #EAF6FC",
+"3 c #DEF1FA",
+"= c #4CBCE3",
+"d c #DB916B",
+"X c #85A7BC",
+"s c #D8BCA4",
+"o c #749BB4",
+"e c #BCD9EF",
+"* c #62B4DD",
+"< c #91D2EF",
+"a c #E6DED2",
+"0 c #E9F4FB",
+" c None",
+"@ c #A0BACB",
+"O c #AABFCD",
+"i c #6591AE",
+": c #B9CBD5",
+"- c #71C5E7",
+"5 c #D3ECF8",
+"% c #81A3B9",
+"6 c #8AD0EE",
+"8 c #FDFDFE",
+"p c #8EA9BC",
+"r c #B6D5EE",
+", c #81CCEB",
+". c #ACC4D3",
+"; c #AFD1DE",
+"7 c #EFF8FC",
+"u c #C2CBDB",
+"# c #C0D1DC",
+"2 c #CAD6E1",
+"& c #8FB0C3",
+/* pixels */
+" .XooXO ",
+" +@###$+% ",
+" .*==-;@@ ",
+" o:*>,<--:X ",
+" 12>-345-#% ",
+" 12>678392% ",
+" %$*,3059q& ",
+" @Oq,wwer@@ ",
+" t@q22q&+ ",
+" yyui+%o%p ",
+" yasy ",
+" yasdy ",
+" yasdy ",
+" ysdy ",
+" yy "
+};
diff --git a/3rdparty/wxWidgets/art/findrepl.xpm b/3rdparty/wxWidgets/art/findrepl.xpm
new file mode 100644
index 0000000000..a1f5eda8e0
--- /dev/null
+++ b/3rdparty/wxWidgets/art/findrepl.xpm
@@ -0,0 +1,63 @@
+/* XPM */
+static const char * findrepl_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 42 1",
+"y c #A06959",
+"9 c #A7DAF2",
+"$ c #B5CAD7",
+"> c #35B4E1",
+"t c #6B98B8",
+"w c #B6E0F4",
+"q c #AEC9D7",
+"1 c #5A89A6",
+"+ c #98B3C6",
+"4 c #EAF6FC",
+"d c #008000",
+"3 c #DEF1FA",
+"= c #4CBCE3",
+"f c #DB916B",
+"X c #85A7BC",
+"s c #D8BCA4",
+"o c #749BB4",
+"e c #BCD9EF",
+"* c #62B4DD",
+"< c #91D2EF",
+"a c #E6DED2",
+"0 c #E9F4FB",
+" c None",
+"@ c #A0BACB",
+"O c #AABFCD",
+"i c #6591AE",
+": c #B9CBD5",
+"- c #71C5E7",
+"5 c #D3ECF8",
+"% c #81A3B9",
+"6 c #8AD0EE",
+"8 c #FDFDFE",
+"p c #8EA9BC",
+"r c #B6D5EE",
+", c #81CCEB",
+". c #ACC4D3",
+"; c #AFD1DE",
+"7 c #EFF8FC",
+"u c #C2CBDB",
+"# c #C0D1DC",
+"2 c #CAD6E1",
+"& c #8FB0C3",
+/* pixels */
+" .XooXO ",
+" +@###$+% ",
+" .*==-;@@ ",
+" o:*>,<--:X ",
+" 12>-345-#% ",
+" 12>678392% ",
+" %$*,3059q& ",
+" @Oq,wwer@@ ",
+" t@q22q&+ ",
+" yyui+%o%p ",
+" yasy d d ",
+" yasfy dd dd ",
+"yasfy ddddddddd",
+"ysfy dd dd ",
+" yy d d "
+};
diff --git a/3rdparty/wxWidgets/art/floppy.xpm b/3rdparty/wxWidgets/art/floppy.xpm
new file mode 100644
index 0000000000..949d5a9070
--- /dev/null
+++ b/3rdparty/wxWidgets/art/floppy.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static const char * floppy_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 18 1",
+"& c #E3E4E6",
+"+ c #FFFFFF",
+". c #446A8C",
+"o c #697787",
+"> c #5F666D",
+"* c #B2B3B3",
+" c None",
+", c #4B4C4D",
+"= c #DCDBDA",
+"$ c #1B4467",
+": c #E4E9ED",
+"@ c #979BA0",
+"X c #203646",
+"O c #215579",
+"- c #545B63",
+"; c #636465",
+"# c #CAD6E1",
+"% c #7F8286",
+/* pixels */
+" .XoooooooXO ",
+" .o+++++++.O ",
+" .o+OOOOO+.O ",
+" .o+++++++.O ",
+" .o@@@@@@@.O ",
+" ..........O ",
+" ..#+++++#.O ",
+" ..+$O+++#.O ",
+" ..+$O+++#.O ",
+" %&.........*% ",
+"%=+++++++++++&% ",
+"--------------; ",
+"-:::::::::::::- ",
+"-:X:XXXXXXXXX:> ",
+"-*************, "
+};
diff --git a/3rdparty/wxWidgets/art/folder.xpm b/3rdparty/wxWidgets/art/folder.xpm
new file mode 100644
index 0000000000..57fa2ae633
--- /dev/null
+++ b/3rdparty/wxWidgets/art/folder.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static const char * folder_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 22 1",
+"> c #9BACC2",
+". c #547897",
+"1 c #7F99B4",
+"X c #D1D9E5",
+"< c #EAEDF3",
+"+ c #CAD2DC",
+"3 c #718BA7",
+"O c #BECAD9",
+"$ c #E1E6EE",
+"* c #F5F6F7",
+", c #8DA0B9",
+" c None",
+"# c #D6DFE7",
+"@ c #D2D9E0",
+"- c #FAFCFE",
+"; c #ADBACE",
+"& c #EEF1F3",
+"= c #F8F9FA",
+"o c #B3BFD1",
+"2 c #7A90AC",
+": c #A2B3C5",
+"% c #E5EAF1",
+/* pixels */
+" ",
+" ..... ",
+" .XXXX. ",
+" ............. ",
+" .oO+@#$%&*=-. ",
+" .oO+@#$%&*=-. ",
+" .;oO+X#$%&*=. ",
+" .:;oO+X#$%&*. ",
+" .>:;oO+X#$%&. ",
+" .,>:;oO+X#$<. ",
+" .1,>:;oO+X#$. ",
+" .21,>:;oO+X#. ",
+" .321,>:;oO+X. ",
+" ............. ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/folder_open.xpm b/3rdparty/wxWidgets/art/folder_open.xpm
new file mode 100644
index 0000000000..a27756f970
--- /dev/null
+++ b/3rdparty/wxWidgets/art/folder_open.xpm
@@ -0,0 +1,52 @@
+/* XPM */
+static const char * folder_open_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 31 1",
+"6 c #9BACC2",
+"w c #547B99",
+"5 c #94A5BD",
+". c #376485",
+"; c #F1F4F7",
+"o c #7F99B4",
+"2 c #D1D9E5",
+"- c #EAEDF3",
+"O c #718BA7",
+"0 c #65839D",
+"* c #DCE2EA",
+": c #F5F6F7",
+"7 c #597B9A",
+"X c #8DA0B9",
+" c None",
+"+ c #467291",
+"q c #305F81",
+"& c #D6DFE7",
+"3 c #6A89A2",
+"1 c #A8B6CA",
+"= c #E4E9ED",
+"> c #F8F9FA",
+", c #FDFDFE",
+"9 c #215579",
+"8 c #7F97B0",
+"@ c #B3BFD1",
+"< c #7A90AC",
+"$ c #C2CBDB",
+"4 c #A2B3C5",
+"% c #CAD6E1",
+"# c #BBC4D6",
+/* pixels */
+" ",
+"..... ",
+".XXXo. ",
+".XXXXO........ ",
+".XXXXXXXXXXXX. ",
+".XXXXXXXXXXXX. ",
+".X++++++++++++++",
+".X+@#$%&*=-;:>,+",
+".<.1@#$%2*=-;:23",
+"..X41@#$%2*=-;3 ",
+"..X561@#$%2*=-3 ",
+".78X561@#$%2*%3 ",
+"90<8X561@#$%23 ",
+"q++++++++++++w ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/forward.xpm b/3rdparty/wxWidgets/art/forward.xpm
new file mode 100644
index 0000000000..493c44876c
--- /dev/null
+++ b/3rdparty/wxWidgets/art/forward.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * forward_xpm[] = {
+"16 15 3 1",
+" c None",
+". c Black",
+"X c Gray100",
+" ",
+" ",
+" . ",
+" .. ",
+" .X. ",
+" ........XX. ",
+" .XXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXX. ",
+" ........XX. ",
+" .X. ",
+" .. ",
+" . ",
+" "};
diff --git a/3rdparty/wxWidgets/art/gtk/error.xpm b/3rdparty/wxWidgets/art/gtk/error.xpm
new file mode 100644
index 0000000000..37b2aac857
--- /dev/null
+++ b/3rdparty/wxWidgets/art/gtk/error.xpm
@@ -0,0 +1,58 @@
+/* XPM */
+static const char * error_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 4 1",
+" c None",
+"X c #242424",
+"o c #DCDF00",
+". c #C00000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ..... ",
+" ............. ",
+" ................. ",
+" ................... ",
+" ....................... ",
+" ......................... ",
+" ........................... ",
+" ...........................X ",
+" .............................X ",
+" ............................... ",
+" ...............................X ",
+" .................................X ",
+" .................................X ",
+" .................................XX ",
+" ...ooooooooooooooooooooooooooo...XX ",
+" ....ooooooooooooooooooooooooooo....X ",
+" ....ooooooooooooooooooooooooooo....X ",
+" ....ooooooooooooooooooooooooooo....XX ",
+" ....ooooooooooooooooooooooooooo....XX ",
+" ....ooooooooooooooooooooooooooo....XX ",
+" ...ooooooooooooooooooooooooooo...XXX ",
+" ...ooooooooooooooooooooooooooo...XXX ",
+" .................................XX ",
+" .................................XX ",
+" ...............................XXX ",
+" ...............................XXX ",
+" .............................XXX ",
+" ...........................XXXX ",
+" ...........................XXX ",
+" .........................XXX ",
+" .......................XXXX ",
+" X...................XXXXX ",
+" X.................XXXXX ",
+" X.............XXXXX ",
+" XXXX.....XXXXXXXX ",
+" XXXXXXXXXXXXX ",
+" XXXXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/gtk/info.xpm b/3rdparty/wxWidgets/art/gtk/info.xpm
new file mode 100644
index 0000000000..73dd0fc30a
--- /dev/null
+++ b/3rdparty/wxWidgets/art/gtk/info.xpm
@@ -0,0 +1,63 @@
+/* XPM */
+static const char * info_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 9 1",
+"$ c Black",
+"O c #FFFFFF",
+"@ c #808080",
+"+ c #000080",
+"o c #E8EB01",
+" c None",
+"X c #FFFF40",
+"# c #C0C0C0",
+". c #ABAD01",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ..... ",
+" ..XXXXX.. ",
+" ..XXXXXXXXo.. ",
+" .XXXOXXXXXXXoo. ",
+" .XOOXXX+XXXXXo. ",
+" .XOOOXX+++XXXXoo. ",
+" .XOOXXX+++XXXXXo. ",
+" .XOOOXXX+++XXXXXXo. ",
+" .XOOXXXX+++XXXXXXo. ",
+" .XXXXXXX+++XXXXXXX. ",
+" .XXXXXXX+++XXXXXXo. ",
+" .XXXXXXX+++XXXXXoo. ",
+" .XXXXXX+++XXXXXo. ",
+" .XXXXXXX+XXXXXXo. ",
+" .XXXXXXXXXXXXo. ",
+" .XXXXX+++XXXoo. ",
+" .XXXX+++XXoo. ",
+" .XXXXXXXXo. ",
+" ..XXXXXXo.. ",
+" .XXXXXo.. ",
+" @#######@ ",
+" @@@@@@@@@ ",
+" @#######@ ",
+" @@@@@@@@@ ",
+" @#######@ ",
+" @@@@@@@ ",
+" ### ",
+" $$$ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/gtk/question.xpm b/3rdparty/wxWidgets/art/gtk/question.xpm
new file mode 100644
index 0000000000..cdcc10f393
--- /dev/null
+++ b/3rdparty/wxWidgets/art/gtk/question.xpm
@@ -0,0 +1,75 @@
+/* XPM */
+static const char * question_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 21 1",
+". c Black",
+"> c #696969",
+"O c #1F1F00",
+"+ c #181818",
+"o c #F6F900",
+"; c #3F3F00",
+"$ c #111111",
+" c None",
+"& c #202020",
+"X c #AAAA00",
+"@ c #949400",
+": c #303030",
+"1 c #383838",
+"% c #2A2A00",
+", c #404040",
+"= c #B4B400",
+"- c #484848",
+"# c #151500",
+"< c #9F9F00",
+"2 c #6A6A00",
+"* c #353500",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ......... ",
+" ...XXXXXXX.. ",
+" ..XXXXoooooXXXO+ ",
+" ..XXooooooooooooX@.. ",
+" ..XoooooooooooooooXX#. ",
+" $%XoooooooooooooooooXX#. ",
+" &.XoooooooXXXXXXooooooXX.. ",
+" .XooooooXX.$...$XXoooooX*. ",
+" $.XoooooX%.$ .*oooooo=.. ",
+" .XooooooX.. -.XoooooX.. ",
+" .XoooooX..+ .XoooooX;. ",
+" ...XXXX..: .XoooooX;. ",
+" ........ >.XoooooX;. ",
+" +.XoooooX.. ",
+" ,.Xoooooo<.. ",
+" 1#XooooooXO.. ",
+" ooooooX2.. ",
+" $%XooooooXX.. ",
+" $%XooooooXX.. ",
+" $%XooooooXX.. ",
+" &.XooooooXX.. ",
+" .XooooooXX.. ",
+" &.XoooooXX.. ",
+" ..XooooXX.. ",
+" ..XooooX... ",
+" ..XXooXX..& ",
+" ...XXXXX.. ",
+" ........ ",
+" ",
+" ",
+" ....... ",
+" ..XXXXX.. ",
+" ..XXoooXX.. ",
+" ..XoooooX.. ",
+" ..XoooooX.. ",
+" ..XXoooXX.. ",
+" ..XXXXX.. ",
+" ....... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/gtk/warning.xpm b/3rdparty/wxWidgets/art/gtk/warning.xpm
new file mode 100644
index 0000000000..f3682a60c0
--- /dev/null
+++ b/3rdparty/wxWidgets/art/gtk/warning.xpm
@@ -0,0 +1,63 @@
+/* XPM */
+static const char * warning_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 9 1",
+"@ c Black",
+"o c #A6A800",
+"+ c #8A8C00",
+"$ c #B8BA00",
+" c None",
+"O c #6E7000",
+"X c #DCDF00",
+". c #C00000",
+"# c #373800",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . ",
+" ... ",
+" ... ",
+" ..... ",
+" ...X.. ",
+" ..XXX.. ",
+" ...XXX... ",
+" ..XXXXX.. ",
+" ..XXXXXX... ",
+" ...XXoO+XX.. ",
+" ..XXXO@#XXX.. ",
+" ..XXXXO@#XXX... ",
+" ...XXXXO@#XXXX.. ",
+" ..XXXXXO@#XXXX... ",
+" ...XXXXXo@OXXXXX.. ",
+" ...XXXXXXo@OXXXXXX.. ",
+" ..XXXXXXX$@OXXXXXX... ",
+" ...XXXXXXXX@XXXXXXXX.. ",
+" ...XXXXXXXXXXXXXXXXXX... ",
+" ..XXXXXXXXXXOXXXXXXXXX.. ",
+" ...XXXXXXXXXO@#XXXXXXXXX.. ",
+" ..XXXXXXXXXXX#XXXXXXXXXX... ",
+" ...XXXXXXXXXXXXXXXXXXXXXXX.. ",
+" ...XXXXXXXXXXXXXXXXXXXXXXXX... ",
+" .............................. ",
+" .............................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/harddisk.xpm b/3rdparty/wxWidgets/art/harddisk.xpm
new file mode 100644
index 0000000000..6c802e6be2
--- /dev/null
+++ b/3rdparty/wxWidgets/art/harddisk.xpm
@@ -0,0 +1,60 @@
+/* XPM */
+static const char * harddisk_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 39 1",
+"7 c #E3E4E6",
+"4 c #FFFFFF",
+"5 c #839CB5",
+". c #547897",
+"1 c #4D7492",
+"@ c #376485",
+"o c #7A92A3",
+"u c #D1D9E5",
+"y c #446A8C",
+"i c #51B03D",
+"> c #CAD2DC",
+"O c #718BA7",
+"2 c #65839D",
+"6 c #DCE2EA",
+"0 c #C3C5C8",
+"9 c #F5F6F7",
+": c #EBEBEC",
+"< c #597B9A",
+"t c #C6CCD3",
+" c None",
+"* c #DFE0E2",
+"e c #467291",
+"a c #526E8B",
+", c #7393AB",
+"p c #130A0B",
+"# c #AABFCD",
+"r c #B4C4D3",
+"; c #CFCFD0",
+"X c #6F90A6",
+"+ c #6A89A2",
+"- c #D2D3D4",
+"= c #DCDBDA",
+"w c #E4E9ED",
+"q c #C6C8CA",
+"% c #215579",
+"$ c #E7E7E7",
+"3 c #7F97B0",
+"8 c #C0D1DC",
+"& c #5D7C93",
+/* pixels */
+" ",
+" .XoooXO+@ ",
+" #$$%%%%$$$X ",
+" &$*==-;$$$& ",
+" &:>+,<1234o5 ",
+" ###+67;;78242 ",
+" &4,49*0q*9we4. ",
+" &4+49*,,*9wo4. ",
+"&4%r,67;;782t%4.",
+"&44468rrrr84444,",
+"y11111111111111e",
+"1uu1:::::::::::1",
+"1uu1::::::::ip:1",
+"auu&:::::::::::1",
+"1111111111111111"
+};
diff --git a/3rdparty/wxWidgets/art/helpicon.xpm b/3rdparty/wxWidgets/art/helpicon.xpm
new file mode 100644
index 0000000000..799ac894d3
--- /dev/null
+++ b/3rdparty/wxWidgets/art/helpicon.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static const char * helpicon_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 6 1",
+" c Gray0",
+". c Blue",
+"X c #808080808080",
+"o c #c0c0c0c0c0c0",
+"O c Gray100",
+"+ c None",
+/* pixels */
+"+++++++++++XXXXXXXX+++++++++++++",
+"++++++++XXXoOOOOOOoXXX++++++++++",
+"++++++XXoOOOOOOOOOOOOoXX++++++++",
+"+++++XoOOOOOOOOOOOOOOOOoX+++++++",
+"++++XOOOOOOOOOOOOOOOOOOOO ++++++",
+"+++XOOOOOOOo......oOOOOOOO +++++",
+"++XOOOOOOOo.oOO....oOOOOOOO ++++",
+"+XoOOOOOOO..OOOO....OOOOOOOo +++",
+"+XOOOOOOOO....OO....OOOOOOOO X++",
+"XoOOOOOOOO....Oo....OOOOOOOOo X+",
+"XOOOOOOOOOo..oO....OOOOOOOOOO X+",
+"XOOOOOOOOOOOOOo...OOOOOOOOOOO XX",
+"XOOOOOOOOOOOOO...OOOOOOOOOOOO XX",
+"XOOOOOOOOOOOOO..oOOOOOOOOOOOO XX",
+"XOOOOOOOOOOOOO..OOOOOOOOOOOOO XX",
+"XoOOOOOOOOOOOOOOOOOOOOOOOOOOo XX",
+"+XOOOOOOOOOOOo..oOOOOOOOOOOO XXX",
+"+XoOOOOOOOOOO....OOOOOOOOOOo XXX",
+"++XOOOOOOOOOO....OOOOOOOOOO XXX+",
+"+++ OOOOOOOOOo..oOOOOOOOOO XXXX+",
+"++++ OOOOOOOOOOOOOOOOOOOO XXXX++",
+"+++++ oOOOOOOOOOOOOOOOOo XXXX+++",
+"++++++ oOOOOOOOOOOOOo XXXX++++",
+"+++++++X oOOOOOOo XXXXX+++++",
+"++++++++XXX oOOO XXXXXXX++++++",
+"++++++++++XXXX OOO XXXXX++++++++",
+"+++++++++++++X OOO XX+++++++++++",
+"+++++++++++++++ OO XX+++++++++++",
+"++++++++++++++++ O XX+++++++++++",
+"+++++++++++++++++ XX+++++++++++",
+"++++++++++++++++++XXX+++++++++++",
+"+++++++++++++++++++XX+++++++++++"
+};
diff --git a/3rdparty/wxWidgets/art/home.xpm b/3rdparty/wxWidgets/art/home.xpm
new file mode 100644
index 0000000000..010de974f8
--- /dev/null
+++ b/3rdparty/wxWidgets/art/home.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static const char * home_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 3 1",
+". c Black",
+"X c #FFFFFF",
+" c None",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXXXX. ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .X.....X....X. ",
+" .X. .X. .X. ",
+" .X. .X. .X. ",
+" .X.....X. .X. ",
+" .XXXXXXX. .X. ",
+" ......... ... "
+};
diff --git a/3rdparty/wxWidgets/art/htmbook.xpm b/3rdparty/wxWidgets/art/htmbook.xpm
new file mode 100644
index 0000000000..84a157eb56
--- /dev/null
+++ b/3rdparty/wxWidgets/art/htmbook.xpm
@@ -0,0 +1,25 @@
+/* XPM */
+static const char * htmbook_xpm[] = {
+"16 16 6 1",
+" c None",
+". c Black",
+"X c #000080",
+"o c #c0c0c0",
+"O c #808080",
+"+ c Gray100",
+" ",
+" .. ",
+" ..XX. ",
+" ..XXXXX. ",
+" ..XXXXXXXX. ",
+".oXXXXXXXXXX. ",
+".XoXXXXXXXXXX. ",
+".XXoXXXXXXXXXX. ",
+".XXXoXXXXXXXXX..",
+".XXXXoXXXXXX..O ",
+" .XXXXoXXX..O+O ",
+" .XXXXo..O++o..",
+" .XXX.O+++o.. ",
+" .XX.o+o.. ",
+" .X.o.. ",
+" ... "};
diff --git a/3rdparty/wxWidgets/art/htmfoldr.xpm b/3rdparty/wxWidgets/art/htmfoldr.xpm
new file mode 100644
index 0000000000..ec313c3a9f
--- /dev/null
+++ b/3rdparty/wxWidgets/art/htmfoldr.xpm
@@ -0,0 +1,25 @@
+/* XPM */
+static const char * htmfoldr_xpm[] = {
+"16 16 6 1",
+" c None",
+". c Black",
+"X c #000080",
+"o c #c0c0c0",
+"O c #808080",
+"+ c Gray100",
+" ",
+" .. ",
+" ..XX. ",
+" ..XXXXX. ",
+" ..XXXXXXXX. ",
+".oXXXXXXXXXX. ",
+".XoXXXXXXXXXX. ",
+".XXoXXXXXXXXXX. ",
+".XXXoXXXXXXXXX..",
+".XXXXoXXXXXX..O ",
+" .XXXXoXXX..O+O ",
+" .XXXXo..O++o..",
+" .XXX.O+++o.. ",
+" .XX.o+o.. ",
+" .X.o.. ",
+" ... "};
diff --git a/3rdparty/wxWidgets/art/htmoptns.xpm b/3rdparty/wxWidgets/art/htmoptns.xpm
new file mode 100644
index 0000000000..b47a436168
--- /dev/null
+++ b/3rdparty/wxWidgets/art/htmoptns.xpm
@@ -0,0 +1,20 @@
+/* XPM */
+static const char * htmoptns_xpm[] = {
+"16 15 2 1",
+" c None",
+". c #000000",
+" ",
+" .. ",
+" ... ",
+" .... ",
+" . ... ",
+" .. ... ",
+" . .. ",
+" .. ... ",
+" . .. ",
+" ......... ",
+" .. ... ",
+" . ... ",
+" .. ... ",
+" .... ....... ",
+" "};
diff --git a/3rdparty/wxWidgets/art/htmpage.xpm b/3rdparty/wxWidgets/art/htmpage.xpm
new file mode 100644
index 0000000000..f7ca0219bb
--- /dev/null
+++ b/3rdparty/wxWidgets/art/htmpage.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static const char * htmpage_xpm[] = {
+"16 16 4 1",
+" c None",
+". c #808080",
+"X c Gray100",
+"o c Black",
+" ",
+" .......... ",
+" .XXXXXXXX.. ",
+" .XXXXXXXXooo ",
+" .X......XXXo ",
+" .XXXXXXXXXXo ",
+" .X........Xo ",
+" .XXXXXXXXXXo ",
+" .X........Xo ",
+" .XXXXXXXXXXo ",
+" .X........Xo ",
+" .XXXXXXXXXXo ",
+" .X........Xo ",
+" .XXXXXXXXXXo ",
+" .XXXXXXXXXXo ",
+" oooooooooooo "};
diff --git a/3rdparty/wxWidgets/art/htmsidep.xpm b/3rdparty/wxWidgets/art/htmsidep.xpm
new file mode 100644
index 0000000000..f0d6c5e509
--- /dev/null
+++ b/3rdparty/wxWidgets/art/htmsidep.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static const char * htmsidep_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 6 1",
+". c Black",
+"X c #FFFFFF",
+"+ c #808080",
+" c None",
+"O c #0000C0",
+"o c #C0C0C0",
+/* pixels */
+" ",
+" .............. ",
+" .XXXX.ooooooo. ",
+" .XOXX.oo...oo. ",
+" .XXOX.ooooooo. ",
+" .OOOO.o...+.o. ",
+" .XXOX.ooooooo. ",
+" .XOXX.ooooooo. ",
+" .XXXX.o..+ooo. ",
+" .XXOX.ooooooo. ",
+" .XOXX.o...+.o. ",
+" .OOOO.ooooooo. ",
+" .XOXX.o.+...o. ",
+" .XXOX.ooooooo. ",
+" .............. "
+};
diff --git a/3rdparty/wxWidgets/art/listview.xpm b/3rdparty/wxWidgets/art/listview.xpm
new file mode 100644
index 0000000000..516e8e3a3c
--- /dev/null
+++ b/3rdparty/wxWidgets/art/listview.xpm
@@ -0,0 +1,25 @@
+/* XPM */
+static const char * listview_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 4 1",
+" c Black",
+". c #FFFFFF",
+"X c #000084",
+"o c #848484",
+/* pixels */
+" ",
+" .............. ",
+" .XXX.......... ",
+" .XXX. o o . ",
+" .XXX.......... ",
+" .............. ",
+" .XXX.......... ",
+" .XXX. o . ",
+" .XXX.......... ",
+" .............. ",
+" .XXX.......... ",
+" .XXX. o o . ",
+" .XXX.......... ",
+" .............. ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/missimg.xpm b/3rdparty/wxWidgets/art/missimg.xpm
new file mode 100644
index 0000000000..d9719429ab
--- /dev/null
+++ b/3rdparty/wxWidgets/art/missimg.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static const char * missimg_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 5 1",
+"X c Black",
+"o c #FFFFFF",
+" c None",
+". c #C0C0C0",
+"O c #E0E0E0",
+/* pixels */
+" .............................X ",
+" .ooooooooooooooooooooooooooooX ",
+" .ooooooooooooooooooooooooooooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOXOOOOOOOOOOOOOOOOooX ",
+" XXXOOOOOXX XOOOOOOOOOOOOOOOooX ",
+" XXXXX XOOOOOOOOOOOOOOooX ",
+" XOOOXXXOOOOOOOooX ",
+" XXX XXOOOOOooX ",
+" XOOOOooX ",
+" . XOOOooX ",
+" .. XXOooX ",
+" .o.. XooX ",
+" .ooO... XXX ",
+" .ooOOOO.......... ",
+" .ooOOOOOOOOOOOOOO.. ",
+" .ooOOOOOOOOOOOOOOOO.. ",
+" .ooOOOOOOOOOOOOOOOOOO......... ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ",
+" .ooooooooooooooooooooooooooooX ",
+" .ooooooooooooooooooooooooooooX ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "
+};
diff --git a/3rdparty/wxWidgets/art/motif/error.xpm b/3rdparty/wxWidgets/art/motif/error.xpm
new file mode 100644
index 0000000000..37b2aac857
--- /dev/null
+++ b/3rdparty/wxWidgets/art/motif/error.xpm
@@ -0,0 +1,58 @@
+/* XPM */
+static const char * error_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 4 1",
+" c None",
+"X c #242424",
+"o c #DCDF00",
+". c #C00000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ..... ",
+" ............. ",
+" ................. ",
+" ................... ",
+" ....................... ",
+" ......................... ",
+" ........................... ",
+" ...........................X ",
+" .............................X ",
+" ............................... ",
+" ...............................X ",
+" .................................X ",
+" .................................X ",
+" .................................XX ",
+" ...ooooooooooooooooooooooooooo...XX ",
+" ....ooooooooooooooooooooooooooo....X ",
+" ....ooooooooooooooooooooooooooo....X ",
+" ....ooooooooooooooooooooooooooo....XX ",
+" ....ooooooooooooooooooooooooooo....XX ",
+" ....ooooooooooooooooooooooooooo....XX ",
+" ...ooooooooooooooooooooooooooo...XXX ",
+" ...ooooooooooooooooooooooooooo...XXX ",
+" .................................XX ",
+" .................................XX ",
+" ...............................XXX ",
+" ...............................XXX ",
+" .............................XXX ",
+" ...........................XXXX ",
+" ...........................XXX ",
+" .........................XXX ",
+" .......................XXXX ",
+" X...................XXXXX ",
+" X.................XXXXX ",
+" X.............XXXXX ",
+" XXXX.....XXXXXXXX ",
+" XXXXXXXXXXXXX ",
+" XXXXX ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/motif/info.xpm b/3rdparty/wxWidgets/art/motif/info.xpm
new file mode 100644
index 0000000000..73dd0fc30a
--- /dev/null
+++ b/3rdparty/wxWidgets/art/motif/info.xpm
@@ -0,0 +1,63 @@
+/* XPM */
+static const char * info_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 9 1",
+"$ c Black",
+"O c #FFFFFF",
+"@ c #808080",
+"+ c #000080",
+"o c #E8EB01",
+" c None",
+"X c #FFFF40",
+"# c #C0C0C0",
+". c #ABAD01",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ..... ",
+" ..XXXXX.. ",
+" ..XXXXXXXXo.. ",
+" .XXXOXXXXXXXoo. ",
+" .XOOXXX+XXXXXo. ",
+" .XOOOXX+++XXXXoo. ",
+" .XOOXXX+++XXXXXo. ",
+" .XOOOXXX+++XXXXXXo. ",
+" .XOOXXXX+++XXXXXXo. ",
+" .XXXXXXX+++XXXXXXX. ",
+" .XXXXXXX+++XXXXXXo. ",
+" .XXXXXXX+++XXXXXoo. ",
+" .XXXXXX+++XXXXXo. ",
+" .XXXXXXX+XXXXXXo. ",
+" .XXXXXXXXXXXXo. ",
+" .XXXXX+++XXXoo. ",
+" .XXXX+++XXoo. ",
+" .XXXXXXXXo. ",
+" ..XXXXXXo.. ",
+" .XXXXXo.. ",
+" @#######@ ",
+" @@@@@@@@@ ",
+" @#######@ ",
+" @@@@@@@@@ ",
+" @#######@ ",
+" @@@@@@@ ",
+" ### ",
+" $$$ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/motif/question.xpm b/3rdparty/wxWidgets/art/motif/question.xpm
new file mode 100644
index 0000000000..cdcc10f393
--- /dev/null
+++ b/3rdparty/wxWidgets/art/motif/question.xpm
@@ -0,0 +1,75 @@
+/* XPM */
+static const char * question_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 21 1",
+". c Black",
+"> c #696969",
+"O c #1F1F00",
+"+ c #181818",
+"o c #F6F900",
+"; c #3F3F00",
+"$ c #111111",
+" c None",
+"& c #202020",
+"X c #AAAA00",
+"@ c #949400",
+": c #303030",
+"1 c #383838",
+"% c #2A2A00",
+", c #404040",
+"= c #B4B400",
+"- c #484848",
+"# c #151500",
+"< c #9F9F00",
+"2 c #6A6A00",
+"* c #353500",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ......... ",
+" ...XXXXXXX.. ",
+" ..XXXXoooooXXXO+ ",
+" ..XXooooooooooooX@.. ",
+" ..XoooooooooooooooXX#. ",
+" $%XoooooooooooooooooXX#. ",
+" &.XoooooooXXXXXXooooooXX.. ",
+" .XooooooXX.$...$XXoooooX*. ",
+" $.XoooooX%.$ .*oooooo=.. ",
+" .XooooooX.. -.XoooooX.. ",
+" .XoooooX..+ .XoooooX;. ",
+" ...XXXX..: .XoooooX;. ",
+" ........ >.XoooooX;. ",
+" +.XoooooX.. ",
+" ,.Xoooooo<.. ",
+" 1#XooooooXO.. ",
+" ooooooX2.. ",
+" $%XooooooXX.. ",
+" $%XooooooXX.. ",
+" $%XooooooXX.. ",
+" &.XooooooXX.. ",
+" .XooooooXX.. ",
+" &.XoooooXX.. ",
+" ..XooooXX.. ",
+" ..XooooX... ",
+" ..XXooXX..& ",
+" ...XXXXX.. ",
+" ........ ",
+" ",
+" ",
+" ....... ",
+" ..XXXXX.. ",
+" ..XXoooXX.. ",
+" ..XoooooX.. ",
+" ..XoooooX.. ",
+" ..XXoooXX.. ",
+" ..XXXXX.. ",
+" ....... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/motif/warning.xpm b/3rdparty/wxWidgets/art/motif/warning.xpm
new file mode 100644
index 0000000000..f3682a60c0
--- /dev/null
+++ b/3rdparty/wxWidgets/art/motif/warning.xpm
@@ -0,0 +1,63 @@
+/* XPM */
+static const char * warning_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 9 1",
+"@ c Black",
+"o c #A6A800",
+"+ c #8A8C00",
+"$ c #B8BA00",
+" c None",
+"O c #6E7000",
+"X c #DCDF00",
+". c #C00000",
+"# c #373800",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . ",
+" ... ",
+" ... ",
+" ..... ",
+" ...X.. ",
+" ..XXX.. ",
+" ...XXX... ",
+" ..XXXXX.. ",
+" ..XXXXXX... ",
+" ...XXoO+XX.. ",
+" ..XXXO@#XXX.. ",
+" ..XXXXO@#XXX... ",
+" ...XXXXO@#XXXX.. ",
+" ..XXXXXO@#XXXX... ",
+" ...XXXXXo@OXXXXX.. ",
+" ...XXXXXXo@OXXXXXX.. ",
+" ..XXXXXXX$@OXXXXXX... ",
+" ...XXXXXXXX@XXXXXXXX.. ",
+" ...XXXXXXXXXXXXXXXXXX... ",
+" ..XXXXXXXXXXOXXXXXXXXX.. ",
+" ...XXXXXXXXXO@#XXXXXXXXX.. ",
+" ..XXXXXXXXXXX#XXXXXXXXXX... ",
+" ...XXXXXXXXXXXXXXXXXXXXXXX.. ",
+" ...XXXXXXXXXXXXXXXXXXXXXXXX... ",
+" .............................. ",
+" .............................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/new.xpm b/3rdparty/wxWidgets/art/new.xpm
new file mode 100644
index 0000000000..a776e111eb
--- /dev/null
+++ b/3rdparty/wxWidgets/art/new.xpm
@@ -0,0 +1,50 @@
+/* XPM */
+static const char * new_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 29 1",
+"* c #97C4E7",
+"- c #72A8D2",
+": c #FFFFFF",
+"9 c #839CB5",
+"o c #6B98B8",
+"X c #5A89A6",
+"# c #3A749C",
+", c #D1E5F5",
+"0 c #85A7BC",
+"$ c #C3DDF1",
+"8 c #749BB4",
+"; c #5F9BC8",
+" c None",
+"+ c #538DB3",
+"= c #85BBE2",
+"3 c #EFF6FC",
+"O c #6591AE",
+"5 c #F7FBFD",
+"7 c #FAFCFE",
+"< c #DAEAF7",
+"4 c #E9F3FA",
+"6 c #FDFDFE",
+"1 c #E2EFF8",
+". c #8EA9BC",
+"% c #B6D5EE",
+"& c #A5CCEA",
+"> c #ACE95B",
+"2 c #F4F9FD",
+"@ c #4581AA",
+/* pixels */
+" .XoOO+@#. ",
+" .$$%&*=O-; ",
+" @@@@$%&*O:*o ",
+" @>>@$$%&O::*o ",
+"@@@>>@@@$%OOoO+ ",
+"@>>>>>>@,$%&*=+ ",
+"@>>>>>>@<,$%&*+ ",
+"@@@>>@@@1<,$%&O ",
+" @>>@2341<,$%O ",
+" @@@@52341<,$o ",
+" .:6752341<,8 ",
+" .::6752341<8 ",
+" .:::67523419 ",
+" .::::6752340 ",
+" ............ "
+};
diff --git a/3rdparty/wxWidgets/art/new_dir.xpm b/3rdparty/wxWidgets/art/new_dir.xpm
new file mode 100644
index 0000000000..ced559b3d7
--- /dev/null
+++ b/3rdparty/wxWidgets/art/new_dir.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static const char * new_dir_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 22 1",
+"X c Black",
+"> c #9BACC2",
+"o c #547897",
+"1 c #7F99B4",
+"O c #D1D9E5",
+"< c #EAEDF3",
+"# c #CAD2DC",
+"3 c #718BA7",
+"@ c #BECAD9",
+"& c #E1E6EE",
+"; c #F5F6F7",
+". c #FFFF00",
+", c #8DA0B9",
+" c None",
+"% c #D6DFE7",
+"$ c #D2D9E0",
+"- c #ADBACE",
+"= c #EEF1F3",
+"+ c #B3BFD1",
+"2 c #7A90AC",
+": c #A2B3C5",
+"* c #E5EAF1",
+/* pixels */
+" .X .XX.",
+" ooooo .X.X. ",
+" oOOOOo XX...XX",
+" oooooooo.......",
+" o+@#$%&*XX...XX",
+" o+@#$%&*=.X.X. ",
+" o-+@#O%&.X;.X .",
+" o:-+@#O%&*=;o ",
+" o>:-+@#O%&*=o ",
+" o,>:-+@#O%&:-+@#O%&o ",
+" o21,>:-+@#O%o ",
+" o321,>:-+@#Oo ",
+" ooooooooooooo ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/paste.xpm b/3rdparty/wxWidgets/art/paste.xpm
new file mode 100644
index 0000000000..ec5db2795d
--- /dev/null
+++ b/3rdparty/wxWidgets/art/paste.xpm
@@ -0,0 +1,46 @@
+/* XPM */
+static const char * paste_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 25 1",
+"< c #FEECE4",
+"> c #FEE3D7",
+"O c #FFFFFF",
+"o c #7B767D",
+"% c #F79586",
+"& c #CAE1F3",
+"@ c #F08B62",
+"# c #FCCBB8",
+"- c #FDD8C9",
+"4 c #FFF8F4",
+"5 c #FFF5F0",
+" c None",
+"$ c #F8AA8F",
+", c #EFF6FC",
+"1 c #F7FBFD",
+"2 c #FAFCFE",
+"; c #DAEAF7",
+": c #E9F3FA",
+"6 c #FFFAF8",
+". c #3C78A6",
+"3 c #FFF1ED",
+"X c #9B8687",
+"+ c #FBBCA4",
+"* c #B6D5EE",
+"= c #F4F9FD",
+/* pixels */
+" ...... ",
+" .XoOOOOoo. ",
+".+XOOOOOOX@. ",
+".+XXXXXXXX@. ",
+".#++$$%@..... ",
+".##++$$%.&*.=. ",
+".-##++$$.;&.==. ",
+".--##++$.:;.... ",
+".>--##++.,:;&*. ",
+".<>--##+.1,:;&. ",
+".<<>--##.21,:;. ",
+".3<<>--#.O21=:. ",
+".45<<>--....... ",
+".6453<>----. ",
+"............ "
+};
diff --git a/3rdparty/wxWidgets/art/print.xpm b/3rdparty/wxWidgets/art/print.xpm
new file mode 100644
index 0000000000..d330268c71
--- /dev/null
+++ b/3rdparty/wxWidgets/art/print.xpm
@@ -0,0 +1,60 @@
+/* XPM */
+static const char * print_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 39 1",
+"< c #E3E4E6",
+"+ c #C3C3C4",
+"i c #FFFFFF",
+": c #74879B",
+"# c #5A89A6",
+"a c #F1F4F7",
+"r c #5A809C",
+"@ c #BDCCD9",
+"e c #7A92A4",
+"% c #3F6F93",
+"t c #9FA2A6",
+"3 c #939495",
+"w c #5F666D",
+"9 c #65839E",
+"5 c #4A7291",
+"$ c #4B7F9E",
+" c None",
+"O c #DFE0E2",
+"o c #F3F3F3",
+"; c #84A5BB",
+"& c #467291",
+". c #7897AD",
+"* c #407598",
+"4 c #CFCFD0",
+"7 c #6F90A6",
+"y c #6A89A2",
+"0 c #AAADB2",
+"1 c #D2D3D4",
+"u c #4F7592",
+", c #BCBDBE",
+"p c #57778E",
+"q c #979BA0",
+"2 c #ABABAC",
+"- c #E7E7E7",
+"= c #D6DEE6",
+"> c #9FA0A0",
+"8 c #829EB5",
+"X c #8FB0C3",
+"6 c #5D7C93",
+/* pixels */
+" .XXXXXXXX ",
+" .oooooooX ",
+" .OOOOOOOX ",
+" .+++++++X ",
+"@##$%&&&&&%*##@ ",
+"$=-;:>,<123$-=$ ",
+".44.5678.96$44. ",
+"7,,,,,,,,,,,,,7 ",
+"900qwwwwwwwe009 ",
+"rtt9ryyyyyyuttr ",
+"6qq6iiiiiii%qq6 ",
+"633paiiiiii%336 ",
+"XXX*iiiiiii%XXX ",
+" 6iiiiiii% ",
+" $XXXXXXX# "
+};
diff --git a/3rdparty/wxWidgets/art/quit.xpm b/3rdparty/wxWidgets/art/quit.xpm
new file mode 100644
index 0000000000..7633e8be5d
--- /dev/null
+++ b/3rdparty/wxWidgets/art/quit.xpm
@@ -0,0 +1,90 @@
+/* XPM */
+static const char * quit_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 69 1",
+"@ c Black",
+"i c #9AEA53",
+"D c #7E9BB1",
+"H c #839FB4",
+", c #B7C7D3",
+"8 c #BCCBD6",
+"7 c #C1CFDA",
+"v c #92ABBD",
+"- c #D0DBE2",
+"O c #547897",
+"+ c #376485",
+"L c #7090A8",
+"t c #AEC0CE",
+"g c #B3C4D1",
+"S c #84A0B4",
+"G c #89A4B8",
+"> c #BDCCD7",
+"F c #5A809C",
+"2 c #C2D0DA",
+"k c #93ACBE",
+"= c #D6E0E6",
+"* c #446A8C",
+"z c #A5B9C8",
+"# c #DEE5EB",
+"0 c #AFC1CE",
+"r c #B4C5D2",
+"p c #B9C9D5",
+"A c #8AA5B8",
+"M c #92AABD",
+"j c #A6BAC9",
+"K c #7796AC",
+"l c #ABBECC",
+"o c #E4EAEF",
+"9 c #B5C6D2",
+" c None",
+"; c #C9D6DF",
+"X c #305F81",
+"m c #98AFC0",
+"V c #9DB3C3",
+"% c #D1DBE3",
+"u c #A2B7C6",
+"y c #A7BBCA",
+"h c #ACBFCD",
+"4 c #B6C7D3",
+"w c #C0CFD9",
+"d c #982106",
+"B c #85A0B5",
+"6 c #C8D4DE",
+"c c #99B0C1",
+"x c #9EB4C4",
+"$ c #D7E0E7",
+"q c #A8BCCA",
+"s c #ADC0CD",
+"3 c #BCCCD7",
+"N c #8BA5B9",
+": c #C4D1DB",
+"1 c #C9D5DE",
+"f c #9AB1C2",
+"n c #A4B9C8",
+"a c #B3C5D1",
+". c #215579",
+"J c #7D9AB0",
+"& c #829EB5",
+"e c #BBCAD6",
+"b c #8CA6B9",
+"Z c #91AABC",
+"C c #96AEC0",
+"< c #CFDAE2",
+"5 c #AFC2CF",
+/* pixels */
+" ..XXXXXXXXXX ",
+" XoO+X@@@@@@X ",
+" X#$%&X*@@@@X ",
+" X=-;:>,X@@@X ",
+" X<12345X@@@X ",
+" X67890qX@XXX ",
+" XwertyuX@XiX ",
+" XpasddfX++iiX ",
+" XghjddkXiiiiiX ",
+" XlzxcvbXiiiiiiX",
+" XnxmMNBXiiiiiX ",
+" XVCZASDXXXiiX ",
+" XXFGHJKX XiX ",
+" FXXFLX XX ",
+" XX* "
+};
diff --git a/3rdparty/wxWidgets/art/redo.xpm b/3rdparty/wxWidgets/art/redo.xpm
new file mode 100644
index 0000000000..1d9e192479
--- /dev/null
+++ b/3rdparty/wxWidgets/art/redo.xpm
@@ -0,0 +1,58 @@
+/* XPM */
+static const char * redo_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 37 1",
+"4 c #9BACC2",
+"; c #4C7398",
+"3 c #547B99",
+"* c #547897",
+"# c #5A89A6",
+"8 c #3A749C",
+"5 c #5A809C",
+", c #7F99B4",
+"& c #3F6F93",
+"9 c #85A7BC",
+"+ c #749BB4",
+"> c #718BA7",
+"e c #A5B3C8",
+"w c #BECAD9",
+": c #65839D",
+"u c #E1E6EE",
+"o c #236289",
+"r c #ADBED2",
+"= c #597B9A",
+"2 c #8DA0B9",
+" c None",
+"% c #467291",
+"1 c #7393AB",
+"i c #4C809F",
+"- c #A0BACB",
+"O c #6591AE",
+"X c #407598",
+"6 c #6F90A6",
+"t c #D2D9E0",
+"7 c #ADBACE",
+"@ c #326A8F",
+"0 c #467A9C",
+". c #ACC4D3",
+"< c #7F97B0",
+"y c #B3BFD1",
+"q c #A2B3C5",
+"$ c #8FB0C3",
+/* pixels */
+" .XoooO ",
+" +o@@@@@o# +",
+" $@%%&@&%%&@ +o",
+" X*=@+-+@*=;@#&@",
+" @:=+ @=:=*:@",
+" &>:$ @:>>>@",
+" &,,,,&",
+" +123 @<2222&",
+" X44X #@56<44X",
+" O1748 .9#&o",
+" 0qwe8 ",
+" 8rty8 ",
+" 8wu+ ",
+" i## ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/removable.xpm b/3rdparty/wxWidgets/art/removable.xpm
new file mode 100644
index 0000000000..91efe6300e
--- /dev/null
+++ b/3rdparty/wxWidgets/art/removable.xpm
@@ -0,0 +1,44 @@
+/* XPM */
+static const char * removable_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 23 1",
+"@ c #C3C3C4",
+"4 c #FFFFFF",
+"o c #D5D6D8",
+"> c #7A92A3",
+". c #8497A5",
+"% c #ACAEB2",
+"2 c #4A7898",
+": c #DCE2EA",
+", c #F5F6F7",
+"= c #EBEBEC",
+"$ c #B7B7B8",
+" c None",
+"X c #DFE0E2",
+"* c #A6A8AD",
+"1 c #4C809F",
+"3 c #407598",
+"O c #CFCFD0",
+"; c #9EA2A8",
+"# c #BCBDBE",
+"+ c #C6C8CA",
+"- c #979BA0",
+"& c #E7E7E7",
+"< c #8FB0C3",
+/* pixels */
+" ......... ",
+" .XoO+@#$%. ",
+" .XoO+@#$%. ",
+" .&XoO+@#$%*. ",
+" .&XoO+@#$%*. ",
+" .=&XoO+@#$%*-. ",
+" .=&XoO+@#$%*;. ",
+".:=&XoO+@#$%*;>.",
+".,=&XoO+@#$%*;-.",
+"<..............<",
+"<,=&XoO+@#$%%%%.",
+" c #718BA7",
+"0 c #A5B3C8",
+"q c #BECAD9",
+": c #65839D",
+"u c #E1E6EE",
+"X c #236289",
+"y c #ADBED2",
+"= c #597B9A",
+"1 c #8DA0B9",
+" c None",
+"% c #467291",
+"3 c #7393AB",
+"i c #4C809F",
+"; c #A0BACB",
+". c #6591AE",
+"o c #407598",
+"5 c #6F90A6",
+"t c #D2D9E0",
+"9 c #ADBACE",
+"# c #326A8F",
+"e c #467A9C",
+"O c #ACC4D3",
+"< c #7F97B0",
+"r c #B3BFD1",
+"w c #A2B3C5",
+"& c #8FB0C3",
+/* pixels */
+" .XXXoO ",
+"+ @X#####X+ ",
+"X+ #$%%$#$%%#& ",
+"#$@#*=-#+;+#=-o ",
+"#:-=:=# +=:# ",
+"#>>>:# &:>$ ",
+"$,,,>o o<,$ ",
+"$1111<# 213+ ",
+"o44<56#@ o44o ",
+"X$@7O 8493. ",
+" 80qwe ",
+" 8rty8 ",
+" +uq8 ",
+" @@i ",
+" "
+};
diff --git a/3rdparty/wxWidgets/art/up.xpm b/3rdparty/wxWidgets/art/up.xpm
new file mode 100644
index 0000000000..4347cf6ef7
--- /dev/null
+++ b/3rdparty/wxWidgets/art/up.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char * up_xpm[] = {
+"16 15 3 1",
+" c None",
+". c Black",
+"X c Gray100",
+" ",
+" .. ",
+" .XX. ",
+" .XXXX. ",
+" .XXXXXX. ",
+" .XXXXXXXX. ",
+" ....XXXX.... ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" .XXXX. ",
+" ...... ",
+" "};
diff --git a/3rdparty/wxWidgets/art/wxwin16x16.xpm b/3rdparty/wxWidgets/art/wxwin16x16.xpm
new file mode 100644
index 0000000000..3abfef3c9e
--- /dev/null
+++ b/3rdparty/wxWidgets/art/wxwin16x16.xpm
@@ -0,0 +1,25 @@
+/* XPM */
+static const char * wxwin16x16_xpm[] = {
+"16 16 6 1",
+" c None",
+". c #000000",
+"X c #000084",
+"o c #FFFFFF",
+"O c #FFFF00",
+"+ c #FF0000",
+" ",
+" ",
+" ....... ",
+" .XXXXX. ",
+" .oXXXX. ",
+" .oXXX.......",
+".....oXXX.OOOOO.",
+".+++.XXXX.oOOOO.",
+".o++......oOOOO.",
+".o++++. .oOOOO.",
+".o++++. .OOOOO.",
+".+++++. .......",
+"....... ",
+" ",
+" ",
+" "};
diff --git a/3rdparty/wxWidgets/art/wxwin32x32.xpm b/3rdparty/wxWidgets/art/wxwin32x32.xpm
new file mode 100644
index 0000000000..013676c859
--- /dev/null
+++ b/3rdparty/wxWidgets/art/wxwin32x32.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static const char * wxwin32x32_xpm[] = {
+"32 32 6 1",
+" c None",
+". c #000000",
+"X c #000084",
+"o c #FFFFFF",
+"O c #FFFF00",
+"+ c #FF0000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXXXXX. ",
+" .XooXXXXXX..............",
+" .XooXXXXXX.OOOOOOOOOOOO.",
+".........XooXXXXXX.OOOOOOOOOOOO.",
+".+++++++.XooXXXXXX.OooOOOOOOOOO.",
+".+++++++.XooXXXXXX.OooOOOOOOOOO.",
+".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
+".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
+".+oo++++...........OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OooOOOOOOOOO.",
+".+oo+++++++++. .OOOOOOOOOOOO.",
+".+oo+++++++++. .OOOOOOOOOOOO.",
+".++++++++++++. ..............",
+".++++++++++++. ",
+".............. ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/3rdparty/wxWidgets/build/msw/Common.vsprops b/3rdparty/wxWidgets/build/msw/Common.vsprops
new file mode 100644
index 0000000000..422c8d055c
--- /dev/null
+++ b/3rdparty/wxWidgets/build/msw/Common.vsprops
@@ -0,0 +1,14 @@
+
+
+
+
diff --git a/3rdparty/wxWidgets/build/msw/ProjectRootDir.vsprops b/3rdparty/wxWidgets/build/msw/ProjectRootDir.vsprops
new file mode 100644
index 0000000000..1bac222406
--- /dev/null
+++ b/3rdparty/wxWidgets/build/msw/ProjectRootDir.vsprops
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/3rdparty/wxWidgets/build/msw/wx_adv_2008.vcproj b/3rdparty/wxWidgets/build/msw/wx_adv_2008.vcproj
new file mode 100644
index 0000000000..234ee8b130
--- /dev/null
+++ b/3rdparty/wxWidgets/build/msw/wx_adv_2008.vcproj
@@ -0,0 +1,587 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/wxWidgets/build/msw/wx_base_2008.vcproj b/3rdparty/wxWidgets/build/msw/wx_base_2008.vcproj
new file mode 100644
index 0000000000..db7369a801
--- /dev/null
+++ b/3rdparty/wxWidgets/build/msw/wx_base_2008.vcproj
@@ -0,0 +1,1197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/wxWidgets/build/msw/wx_config_2008.vcproj b/3rdparty/wxWidgets/build/msw/wx_config_2008.vcproj
new file mode 100644
index 0000000000..fff13806da
--- /dev/null
+++ b/3rdparty/wxWidgets/build/msw/wx_config_2008.vcproj
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/wxWidgets/build/msw/wx_core_2008.vcproj b/3rdparty/wxWidgets/build/msw/wx_core_2008.vcproj
new file mode 100644
index 0000000000..1be4120fe5
--- /dev/null
+++ b/3rdparty/wxWidgets/build/msw/wx_core_2008.vcproj
@@ -0,0 +1,4821 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/wxWidgets/include/msvc/wx/setup.h b/3rdparty/wxWidgets/include/msvc/wx/setup.h
new file mode 100644
index 0000000000..6ddc636cb3
--- /dev/null
+++ b/3rdparty/wxWidgets/include/msvc/wx/setup.h
@@ -0,0 +1,291 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: msvc/wx/msw/setup.h
+// Purpose: wrapper around the real wx/setup.h for Visual C++
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 2004-12-12
+// RCS-ID: $Id: setup.h 43687 2006-11-27 15:03:59Z VZ $
+// Copyright: (c) 2004 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+
+// =======================================================
+// A guide to all the setup.h versions
+// -------------
+/* The included setup files are:
+
+ include\msvc\wx\setup.h + This file
+ include\wx\msw\wince\setup.h - Not used in regular builds
+ lib\vc_lib\msw\wx\setup.h + Library configuration, Release and DebugFast builds
+ lib\vc_lib\mswd\wx\setup.h + Library configuration, Debug builds
+ lib\vc_dll\msw\wx\setup.h - Not used, dll version only
+ lib\vc_dll\mswd\wx\setup.h - Not used, dll version only
+
+ These are identical or almost identical and I'm not sure which one that applies
+ in case they are different:
+
+ include\wx\setup.h ?
+ include\wx\msw\setup.h ?
+ include\wx\univ\setup.h ?
+ include\wx\msw\setup0.h - The original msw file, not used
+ include\wx\univ\setup0.h - The original univ file, not used
+
+ The configuration consistency check files:
+
+ include\wx\chkconf.h ?
+ include\wx\msw\chkconf.h ?
+ include\wx\univ\chkconf.h ?
+ include\wx\msw\wince\chkconf.h - Not used in regular builds
+
+ Issues:
+
+ The Debug build will break in CFrame::InitBitmaps() at the ConvertToImage() line
+ with a "assert "wxWidgets Debug Alert, bmp.Ok()" error message, the cause is unknown,
+ to me at least.
+*/
+// =============
+
+
+
+
+// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
+// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
+// explicitly!
+
+#ifdef _MSC_VER
+ #ifdef _UNICODE
+ #ifdef WXUSINGDLL
+ #ifdef _DEBUG
+ #include "../../../lib/vc_dll/mswud/wx/setup.h"
+ #else
+ #include "../../../lib/vc_dll/mswu/wx/setup.h"
+ #endif
+ #else
+ #ifdef _DEBUG
+ #include "../../../lib/vc_lib/mswud/wx/setup.h"
+ #else
+ #include "../../../lib/vc_lib/mswu/wx/setup.h"
+ #endif
+ #endif
+
+ #ifdef _DEBUG
+ #pragma comment(lib,"wxbase28ud")
+ #pragma comment(lib,"wxbase28ud_net")
+ #pragma comment(lib,"wxbase28ud_xml")
+ #if wxUSE_REGEX
+ #pragma comment(lib,"wxregexud")
+ #endif
+
+ #if wxUSE_GUI
+ #if wxUSE_XML
+ #pragma comment(lib,"wxexpatd")
+ #endif
+ #if wxUSE_LIBJPEG
+ #pragma comment(lib,"wxjpegd")
+ #endif
+ #if wxUSE_LIBPNG
+ #pragma comment(lib,"wxpngd")
+ #endif
+ #if wxUSE_LIBTIFF
+ #pragma comment(lib,"wxtiffd")
+ #endif
+ #if wxUSE_ZLIB
+ #pragma comment(lib,"wxzlibd")
+ #endif
+ #pragma comment(lib,"wxmsw28ud_adv")
+ #pragma comment(lib,"wxmsw28ud_core")
+ #pragma comment(lib,"wxmsw28ud_html")
+ #if wxUSE_GLCANVAS
+ #pragma comment(lib,"wxmsw28ud_gl")
+ #endif
+ #if wxUSE_DEBUGREPORT
+ #pragma comment(lib,"wxmsw28ud_qa")
+ #endif
+ #if wxUSE_XRC
+ #pragma comment(lib,"wxmsw28ud_xrc")
+ #endif
+ #if wxUSE_AUI
+ #pragma comment(lib,"wxmsw28ud_aui")
+ #endif
+ #if wxUSE_RICHTEXT
+ #pragma comment(lib,"wxmsw28ud_richtext")
+ #endif
+ #if wxUSE_MEDIACTRL
+ #pragma comment(lib,"wxmsw28ud_media")
+ #endif
+ #if wxUSE_ODBC
+ #pragma comment(lib,"wxbase28ud_odbc")
+ #endif
+ #endif // wxUSE_GUI
+ #else // release
+ #pragma comment(lib,"wxbase28u")
+ #pragma comment(lib,"wxbase28u_net")
+ #pragma comment(lib,"wxbase28u_xml")
+ #if wxUSE_REGEX
+ #pragma comment(lib,"wxregexu")
+ #endif
+
+ #if wxUSE_GUI
+ #if wxUSE_XML
+ #pragma comment(lib,"wxexpat")
+ #endif
+ #if wxUSE_LIBJPEG
+ #pragma comment(lib,"wxjpeg")
+ #endif
+ #if wxUSE_LIBPNG
+ #pragma comment(lib,"wxpng")
+ #endif
+ #if wxUSE_LIBTIFF
+ #pragma comment(lib,"wxtiff")
+ #endif
+ #if wxUSE_ZLIB
+ #pragma comment(lib,"wxzlib")
+ #endif
+ #pragma comment(lib,"wxmsw28u_adv")
+ #pragma comment(lib,"wxmsw28u_core")
+ #pragma comment(lib,"wxmsw28u_html")
+ #if wxUSE_GLCANVAS
+ #pragma comment(lib,"wxmsw28u_gl")
+ #endif
+ #if wxUSE_DEBUGREPORT
+ #pragma comment(lib,"wxmsw28u_qa")
+ #endif
+ #if wxUSE_XRC
+ #pragma comment(lib,"wxmsw28u_xrc")
+ #endif
+ #if wxUSE_AUI
+ #pragma comment(lib,"wxmsw28u_aui")
+ #endif
+ #if wxUSE_RICHTEXT
+ #pragma comment(lib,"wxmsw28u_richtext")
+ #endif
+ #if wxUSE_MEDIACTRL
+ #pragma comment(lib,"wxmsw28u_media")
+ #endif
+ #if wxUSE_ODBC
+ #pragma comment(lib,"wxbase28u_odbc")
+ #endif
+ #endif // wxUSE_GUI
+ #endif // debug/release
+ #else // !_UNICODE
+ #ifdef WXUSINGDLL
+ #ifdef _DEBUG
+ #include "../../../lib/vc_dll/mswd/wx/setup.h"
+ #else
+ #include "../../../lib/vc_dll/msw/wx/setup.h"
+ #endif
+ #else // static lib
+ #ifdef _DEBUG
+ #include "../../../lib/vc_lib/mswd/wx/setup.h"
+ #else
+ #include "../../../lib/vc_lib/msw/wx/setup.h"
+ #endif
+ #endif // shared/static
+
+ #ifdef _DEBUG
+ #pragma comment(lib,"wxbase28d")
+ #pragma comment(lib,"wxbase28d_net")
+ #pragma comment(lib,"wxbase28d_xml")
+ #if wxUSE_REGEX
+ #pragma comment(lib,"wxregexd")
+ #endif
+
+ #if wxUSE_GUI
+ #if wxUSE_XML
+ #pragma comment(lib,"wxexpatd")
+ #endif
+ #if wxUSE_LIBJPEG
+ #pragma comment(lib,"wxjpegd")
+ #endif
+ #if wxUSE_LIBPNG
+ #pragma comment(lib,"wxpngd")
+ #endif
+ #if wxUSE_LIBTIFF
+ #pragma comment(lib,"wxtiffd")
+ #endif
+ #if wxUSE_ZLIB
+ #pragma comment(lib,"wxzlibd")
+ #endif
+ #pragma comment(lib,"wxmsw28d_adv")
+ #pragma comment(lib,"wxmsw28d_core")
+ #pragma comment(lib,"wxmsw28d_html")
+ #if wxUSE_GLCANVAS
+ #pragma comment(lib,"wxmsw28d_gl")
+ #endif
+ #if wxUSE_DEBUGREPORT
+ #pragma comment(lib,"wxmsw28d_qa")
+ #endif
+ #if wxUSE_XRC
+ #pragma comment(lib,"wxmsw28d_xrc")
+ #endif
+ #if wxUSE_AUI
+ #pragma comment(lib,"wxmsw28d_aui")
+ #endif
+ #if wxUSE_RICHTEXT
+ #pragma comment(lib,"wxmsw28d_richtext")
+ #endif
+ #if wxUSE_MEDIACTRL
+ #pragma comment(lib,"wxmsw28d_media")
+ #endif
+ #if wxUSE_ODBC
+ #pragma comment(lib,"wxbase28d_odbc")
+ #endif
+ #endif // wxUSE_GUI
+ #else // release
+ #pragma comment(lib,"wxbase28")
+ #pragma comment(lib,"wxbase28_net")
+ #pragma comment(lib,"wxbase28_xml")
+ #if wxUSE_REGEX
+ #pragma comment(lib,"wxregex")
+ #endif
+
+ #if wxUSE_GUI
+ #if wxUSE_XML
+ #pragma comment(lib,"wxexpat")
+ #endif
+ #if wxUSE_LIBJPEG
+ #pragma comment(lib,"wxjpeg")
+ #endif
+ #if wxUSE_LIBPNG
+ #pragma comment(lib,"wxpng")
+ #endif
+ #if wxUSE_LIBTIFF
+ #pragma comment(lib,"wxtiff")
+ #endif
+ #if wxUSE_ZLIB
+ #pragma comment(lib,"wxzlib")
+ #endif
+ #pragma comment(lib,"wxmsw28_adv")
+ #pragma comment(lib,"wxmsw28_core")
+ #pragma comment(lib,"wxmsw28_html")
+ #if wxUSE_GLCANVAS
+ #pragma comment(lib,"wxmsw28_gl")
+ #endif
+ #if wxUSE_DEBUGREPORT
+ #pragma comment(lib,"wxmsw28_qa")
+ #endif
+ #if wxUSE_XRC
+ #pragma comment(lib,"wxmsw28_xrc")
+ #endif
+ #if wxUSE_AUI
+ #pragma comment(lib,"wxmsw28_aui")
+ #endif
+ #if wxUSE_RICHTEXT
+ #pragma comment(lib,"wxmsw28_richtext")
+ #endif
+ #if wxUSE_MEDIACTRL
+ #pragma comment(lib,"wxmsw28_media")
+ #endif
+ #if wxUSE_ODBC
+ #pragma comment(lib,"wxbase28_odbc")
+ #endif
+ #endif // wxUSE_GUI
+ #endif // debug/release
+ #endif // _UNICODE/!_UNICODE
+#else
+ #error "This file should only be included when using Microsoft Visual C++"
+#endif
+
diff --git a/3rdparty/wxWidgets/include/wx/aboutdlg.h b/3rdparty/wxWidgets/include/wx/aboutdlg.h
new file mode 100644
index 0000000000..19a6fb949c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aboutdlg.h
@@ -0,0 +1,161 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/aboutdlg.h
+// Purpose: declaration of wxAboutDialog class
+// Author: Vadim Zeitlin
+// Created: 2006-10-07
+// RCS-ID: $Id: aboutdlg.h 58748 2009-02-08 09:46:03Z VZ $
+// Copyright: (c) 2006 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ABOUTDLG_H_
+#define _WX_ABOUTDLG_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_ABOUTDLG
+
+#include "wx/app.h"
+#include "wx/icon.h"
+
+// ----------------------------------------------------------------------------
+// wxAboutDialogInfo: information shown by the standard "About" dialog
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxAboutDialogInfo
+{
+public:
+ // all fields are initially uninitialized
+ wxAboutDialogInfo() { }
+
+ // accessors for various simply fields
+ // -----------------------------------
+
+ // name of the program, if not used defaults wxApp::GetAppName()
+ void SetName(const wxString& name) { m_name = name; }
+ wxString GetName() const
+ { return m_name.empty() ? wxTheApp->GetAppName() : m_name; }
+
+ // version of the program, in free format (but without "version" word)
+ void SetVersion(const wxString& version) { m_version = version; }
+ bool HasVersion() const { return !m_version.empty(); }
+ wxString GetVersion() const { return m_version; }
+
+ // brief, but possibly multiline, description of the program
+ void SetDescription(const wxString& desc) { m_description = desc; }
+ bool HasDescription() const { return !m_description.empty(); }
+ wxString GetDescription() const { return m_description; }
+
+ // short string containing the program copyright information
+ void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
+ bool HasCopyright() const { return !m_copyright.empty(); }
+ wxString GetCopyright() const { return m_copyright; }
+
+ // long, multiline string containing the text of the program licence
+ void SetLicence(const wxString& licence) { m_licence = licence; }
+ void SetLicense(const wxString& licence) { m_licence = licence; }
+ bool HasLicence() const { return !m_licence.empty(); }
+ wxString GetLicence() const { return m_licence; }
+
+ // icon to be shown in the dialog, defaults to the main frame icon
+ void SetIcon(const wxIcon& icon) { m_icon = icon; }
+ bool HasIcon() const { return m_icon.Ok(); }
+ wxIcon GetIcon() const;
+
+ // web site for the program and its description (defaults to URL itself if
+ // empty)
+ void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
+ {
+ m_url = url;
+ m_urlDesc = desc.empty() ? url : desc;
+ }
+
+ bool HasWebSite() const { return !m_url.empty(); }
+
+ wxString GetWebSiteURL() const { return m_url; }
+ wxString GetWebSiteDescription() const { return m_urlDesc; }
+
+ // accessors for the arrays
+ // ------------------------
+
+ // the list of developers of the program
+ void SetDevelopers(const wxArrayString& developers)
+ { m_developers = developers; }
+ void AddDeveloper(const wxString& developer)
+ { m_developers.push_back(developer); }
+
+ bool HasDevelopers() const { return !m_developers.empty(); }
+ const wxArrayString& GetDevelopers() const { return m_developers; }
+
+ // the list of documentation writers
+ void SetDocWriters(const wxArrayString& docwriters)
+ { m_docwriters = docwriters; }
+ void AddDocWriter(const wxString& docwriter)
+ { m_docwriters.push_back(docwriter); }
+
+ bool HasDocWriters() const { return !m_docwriters.empty(); }
+ const wxArrayString& GetDocWriters() const { return m_docwriters; }
+
+ // the list of artists for the program art
+ void SetArtists(const wxArrayString& artists)
+ { m_artists = artists; }
+ void AddArtist(const wxString& artist)
+ { m_artists.push_back(artist); }
+
+ bool HasArtists() const { return !m_artists.empty(); }
+ const wxArrayString& GetArtists() const { return m_artists; }
+
+ // the list of translators
+ void SetTranslators(const wxArrayString& translators)
+ { m_translators = translators; }
+ void AddTranslator(const wxString& translator)
+ { m_translators.push_back(translator); }
+
+ bool HasTranslators() const { return !m_translators.empty(); }
+ const wxArrayString& GetTranslators() const { return m_translators; }
+
+
+ // implementation only
+ // -------------------
+
+ // "simple" about dialog shows only textual information (with possibly
+ // default icon but without hyperlink nor any long texts such as the
+ // licence text)
+ bool IsSimple() const
+ { return !HasWebSite() && !HasIcon() && !HasLicence(); }
+
+ // get the description and credits (i.e. all of developers, doc writers,
+ // 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,
+ m_description,
+ m_copyright,
+ m_licence;
+
+ wxIcon m_icon;
+
+ wxString m_url,
+ m_urlDesc;
+
+ wxArrayString m_developers,
+ m_docwriters,
+ m_artists,
+ m_translators;
+};
+
+// functions to show the about dialog box
+WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info);
+
+#endif // wxUSE_ABOUTDLG
+
+#endif // _WX_ABOUTDLG_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/accel.h b/3rdparty/wxWidgets/include/wx/accel.h
new file mode 100644
index 0000000000..78c038f34a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/accel.h
@@ -0,0 +1,171 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/accel.h
+// Purpose: wxAcceleratorEntry and wxAcceleratorTable classes
+// Author: Julian Smart, Robert Roebling, Vadim Zeitlin
+// Modified by:
+// Created: 31.05.01 (extracted from other files)
+// RCS-ID: $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ACCEL_H_BASE_
+#define _WX_ACCEL_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_ACCEL
+
+#include "wx/object.h"
+
+class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
+class WXDLLIMPEXP_FWD_CORE wxMenuItem;
+class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// wxAcceleratorEntry flags
+enum
+{
+ wxACCEL_NORMAL = 0x0000, // no modifiers
+ wxACCEL_ALT = 0x0001, // hold Alt key down
+ wxACCEL_CTRL = 0x0002, // hold Ctrl key down
+ wxACCEL_SHIFT = 0x0004, // hold Shift key down
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ wxACCEL_CMD = 0x0008 // Command key on OS X
+#else
+ wxACCEL_CMD = wxACCEL_CTRL
+#endif
+};
+
+// ----------------------------------------------------------------------------
+// an entry in wxAcceleratorTable corresponds to one accelerator
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxAcceleratorEntry
+{
+public:
+ wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
+ wxMenuItem *item = NULL)
+ : m_flags(flags)
+ , m_keyCode(keyCode)
+ , m_command(cmd)
+ , m_item(item)
+ { }
+
+ wxAcceleratorEntry(const wxAcceleratorEntry& entry)
+ : m_flags(entry.m_flags)
+ , m_keyCode(entry.m_keyCode)
+ , m_command(entry.m_command)
+ , m_item(entry.m_item)
+ { }
+
+ // create accelerator corresponding to the specified string, return NULL if
+ // string couldn't be parsed or a pointer to be deleted by the caller
+ static wxAcceleratorEntry *Create(const wxString& str);
+
+ wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
+ {
+ Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
+ return *this;
+ }
+
+ void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
+ {
+ m_flags = flags;
+ m_keyCode = keyCode;
+ m_command = cmd;
+ m_item = item;
+ }
+
+ void SetMenuItem(wxMenuItem *item) { m_item = item; }
+
+ int GetFlags() const { return m_flags; }
+ int GetKeyCode() const { return m_keyCode; }
+ int GetCommand() const { return m_command; }
+
+ wxMenuItem *GetMenuItem() const { return m_item; }
+
+ bool operator==(const wxAcceleratorEntry& entry) const
+ {
+ return m_flags == entry.m_flags &&
+ m_keyCode == entry.m_keyCode &&
+ m_command == entry.m_command &&
+ m_item == entry.m_item;
+ }
+
+ bool operator!=(const wxAcceleratorEntry& entry) const
+ { return !(*this == entry); }
+
+#if defined(__WXMOTIF__)
+ // Implementation use only
+ bool MatchesEvent(const wxKeyEvent& event) const;
+#endif
+
+ bool IsOk() const
+ {
+ return m_flags != 0 &&
+ m_keyCode != 0;
+ }
+
+
+ // string <-> wxAcceleratorEntry conversion
+ // ----------------------------------------
+
+ // returns a wxString for the this accelerator.
+ // this function formats it using the - format
+ // where maybe a hyphen-separed list of "shift|alt|ctrl"
+ wxString ToString() const;
+
+ // returns true if the given string correctly initialized this object
+ // (i.e. if IsOk() returns true after this call)
+ bool FromString(const wxString& str);
+
+
+private:
+ // common part of Create() and FromString()
+ static bool ParseAccel(const wxString& str, int *flags, int *keycode);
+
+
+ int m_flags; // combination of wxACCEL_XXX constants
+ int m_keyCode; // ASCII or virtual keycode
+ int m_command; // Command id to generate
+
+ // the menu item this entry corresponds to, may be NULL
+ wxMenuItem *m_item;
+
+ // for compatibility with old code, use accessors now!
+ friend class WXDLLIMPEXP_FWD_CORE wxMenu;
+};
+
+// ----------------------------------------------------------------------------
+// include wxAcceleratorTable class declaration, it is only used by the library
+// and so doesn't have any published user visible interface
+// ----------------------------------------------------------------------------
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/generic/accel.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/accel.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/accel.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/accel.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/accel.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/accel.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/generic/accel.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/accel.h"
+#endif
+
+extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable;
+
+#endif // wxUSE_ACCEL
+
+#endif
+ // _WX_ACCEL_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/access.h b/3rdparty/wxWidgets/include/wx/access.h
new file mode 100644
index 0000000000..0a83346ab2
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/access.h
@@ -0,0 +1,377 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/access.h
+// Purpose: Accessibility classes
+// Author: Julian Smart
+// Modified by:
+// Created: 2003-02-12
+// RCS-ID: $Id: access.h 51246 2008-01-16 12:56:37Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ACCESSBASE_H_
+#define _WX_ACCESSBASE_H_
+
+// ----------------------------------------------------------------------------
+// headers we have to include here
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_ACCESSIBILITY
+
+#include "wx/variant.h"
+
+typedef enum
+{
+ wxACC_FAIL,
+ wxACC_FALSE,
+ wxACC_OK,
+ wxACC_NOT_IMPLEMENTED,
+ wxACC_NOT_SUPPORTED
+} wxAccStatus;
+
+// Child ids are integer identifiers from 1 up.
+// So zero represents 'this' object.
+#define wxACC_SELF 0
+
+// Navigation constants
+
+typedef enum
+{
+ wxNAVDIR_DOWN,
+ wxNAVDIR_FIRSTCHILD,
+ wxNAVDIR_LASTCHILD,
+ wxNAVDIR_LEFT,
+ wxNAVDIR_NEXT,
+ wxNAVDIR_PREVIOUS,
+ wxNAVDIR_RIGHT,
+ wxNAVDIR_UP
+} wxNavDir;
+
+// Role constants
+
+typedef enum {
+ wxROLE_NONE,
+ wxROLE_SYSTEM_ALERT,
+ wxROLE_SYSTEM_ANIMATION,
+ wxROLE_SYSTEM_APPLICATION,
+ wxROLE_SYSTEM_BORDER,
+ wxROLE_SYSTEM_BUTTONDROPDOWN,
+ wxROLE_SYSTEM_BUTTONDROPDOWNGRID,
+ wxROLE_SYSTEM_BUTTONMENU,
+ wxROLE_SYSTEM_CARET,
+ wxROLE_SYSTEM_CELL,
+ wxROLE_SYSTEM_CHARACTER,
+ wxROLE_SYSTEM_CHART,
+ wxROLE_SYSTEM_CHECKBUTTON,
+ wxROLE_SYSTEM_CLIENT,
+ wxROLE_SYSTEM_CLOCK,
+ wxROLE_SYSTEM_COLUMN,
+ wxROLE_SYSTEM_COLUMNHEADER,
+ wxROLE_SYSTEM_COMBOBOX,
+ wxROLE_SYSTEM_CURSOR,
+ wxROLE_SYSTEM_DIAGRAM,
+ wxROLE_SYSTEM_DIAL,
+ wxROLE_SYSTEM_DIALOG,
+ wxROLE_SYSTEM_DOCUMENT,
+ wxROLE_SYSTEM_DROPLIST,
+ wxROLE_SYSTEM_EQUATION,
+ wxROLE_SYSTEM_GRAPHIC,
+ wxROLE_SYSTEM_GRIP,
+ wxROLE_SYSTEM_GROUPING,
+ wxROLE_SYSTEM_HELPBALLOON,
+ wxROLE_SYSTEM_HOTKEYFIELD,
+ wxROLE_SYSTEM_INDICATOR,
+ wxROLE_SYSTEM_LINK,
+ wxROLE_SYSTEM_LIST,
+ wxROLE_SYSTEM_LISTITEM,
+ wxROLE_SYSTEM_MENUBAR,
+ wxROLE_SYSTEM_MENUITEM,
+ wxROLE_SYSTEM_MENUPOPUP,
+ wxROLE_SYSTEM_OUTLINE,
+ wxROLE_SYSTEM_OUTLINEITEM,
+ wxROLE_SYSTEM_PAGETAB,
+ wxROLE_SYSTEM_PAGETABLIST,
+ wxROLE_SYSTEM_PANE,
+ wxROLE_SYSTEM_PROGRESSBAR,
+ wxROLE_SYSTEM_PROPERTYPAGE,
+ wxROLE_SYSTEM_PUSHBUTTON,
+ wxROLE_SYSTEM_RADIOBUTTON,
+ wxROLE_SYSTEM_ROW,
+ wxROLE_SYSTEM_ROWHEADER,
+ wxROLE_SYSTEM_SCROLLBAR,
+ wxROLE_SYSTEM_SEPARATOR,
+ wxROLE_SYSTEM_SLIDER,
+ wxROLE_SYSTEM_SOUND,
+ wxROLE_SYSTEM_SPINBUTTON,
+ wxROLE_SYSTEM_STATICTEXT,
+ wxROLE_SYSTEM_STATUSBAR,
+ wxROLE_SYSTEM_TABLE,
+ wxROLE_SYSTEM_TEXT,
+ wxROLE_SYSTEM_TITLEBAR,
+ wxROLE_SYSTEM_TOOLBAR,
+ wxROLE_SYSTEM_TOOLTIP,
+ wxROLE_SYSTEM_WHITESPACE,
+ wxROLE_SYSTEM_WINDOW
+} wxAccRole;
+
+// Object types
+
+typedef enum {
+ wxOBJID_WINDOW = 0x00000000,
+ wxOBJID_SYSMENU = 0xFFFFFFFF,
+ wxOBJID_TITLEBAR = 0xFFFFFFFE,
+ wxOBJID_MENU = 0xFFFFFFFD,
+ wxOBJID_CLIENT = 0xFFFFFFFC,
+ wxOBJID_VSCROLL = 0xFFFFFFFB,
+ wxOBJID_HSCROLL = 0xFFFFFFFA,
+ wxOBJID_SIZEGRIP = 0xFFFFFFF9,
+ wxOBJID_CARET = 0xFFFFFFF8,
+ wxOBJID_CURSOR = 0xFFFFFFF7,
+ wxOBJID_ALERT = 0xFFFFFFF6,
+ wxOBJID_SOUND = 0xFFFFFFF5
+} wxAccObject;
+
+// Accessible states
+
+#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001
+#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002
+#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004
+#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008
+#define wxACC_STATE_SYSTEM_BUSY 0x00000010
+#define wxACC_STATE_SYSTEM_CHECKED 0x00000020
+#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040
+#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080
+#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100
+#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200
+#define wxACC_STATE_SYSTEM_FLOATING 0x00000400
+#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800
+#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000
+#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000
+#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000
+#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000
+#define wxACC_STATE_SYSTEM_MIXED 0x00010000
+#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000
+#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000
+#define wxACC_STATE_SYSTEM_PRESSED 0x00080000
+#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000
+#define wxACC_STATE_SYSTEM_READONLY 0x00200000
+#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000
+#define wxACC_STATE_SYSTEM_SELECTED 0x00800000
+#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000
+#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000
+
+// Selection flag
+
+typedef enum
+{
+ wxACC_SEL_NONE = 0,
+ wxACC_SEL_TAKEFOCUS = 1,
+ wxACC_SEL_TAKESELECTION = 2,
+ wxACC_SEL_EXTENDSELECTION = 4,
+ wxACC_SEL_ADDSELECTION = 8,
+ wxACC_SEL_REMOVESELECTION = 16
+} wxAccSelectionFlags;
+
+// Accessibility event identifiers
+
+#define wxACC_EVENT_SYSTEM_SOUND 0x0001
+#define wxACC_EVENT_SYSTEM_ALERT 0x0002
+#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003
+#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004
+#define wxACC_EVENT_SYSTEM_MENUEND 0x0005
+#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006
+#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007
+#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008
+#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009
+#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A
+#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B
+#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
+#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D
+#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E
+#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F
+#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010
+#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011
+#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012
+#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013
+#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014
+#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015
+#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016
+#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017
+#define wxACC_EVENT_OBJECT_CREATE 0x8000
+#define wxACC_EVENT_OBJECT_DESTROY 0x8001
+#define wxACC_EVENT_OBJECT_SHOW 0x8002
+#define wxACC_EVENT_OBJECT_HIDE 0x8003
+#define wxACC_EVENT_OBJECT_REORDER 0x8004
+#define wxACC_EVENT_OBJECT_FOCUS 0x8005
+#define wxACC_EVENT_OBJECT_SELECTION 0x8006
+#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007
+#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008
+#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009
+#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A
+#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B
+#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C
+#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
+#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E
+#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F
+#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010
+#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011
+#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012
+
+// ----------------------------------------------------------------------------
+// wxAccessible
+// All functions return an indication of success, failure, or not implemented.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxAccessible;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxPoint;
+class WXDLLIMPEXP_FWD_CORE wxRect;
+class WXDLLEXPORT wxAccessibleBase : public wxObject
+{
+ DECLARE_NO_COPY_CLASS(wxAccessibleBase)
+
+public:
+ wxAccessibleBase(wxWindow* win): m_window(win) {}
+ virtual ~wxAccessibleBase() {}
+
+// Overridables
+
+ // Can return either a child object, or an integer
+ // representing the child element, starting from 1.
+ // pt is in screen coordinates.
+ virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns the rectangle for this object (id = 0) or a child element (id > 0).
+ // rect is in screen coordinates.
+ virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Navigates from fromId to toId/toObject.
+ virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId),
+ int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Gets the name of the specified object.
+ virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Gets the number of children.
+ virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Gets the specified child (starting from 1).
+ // If *child is NULL and return value is wxACC_OK,
+ // this means that the child is a simple element and
+ // not an accessible object.
+ virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Gets the parent, or NULL.
+ virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Performs the default action. childId is 0 (the action for this object)
+ // or > 0 (the action for a child).
+ // Return wxACC_NOT_SUPPORTED if there is no default action for this
+ // window (e.g. an edit control).
+ virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Gets the default action for this object (0) or > 0 (the action for a child).
+ // Return wxACC_OK even if there is no action. actionName is the action, or the empty
+ // string if there is no action.
+ // The retrieved string describes the action that is performed on an object,
+ // not what the object does as a result. For example, a toolbar button that prints
+ // a document has a default action of "Press" rather than "Prints the current document."
+ virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns the description for this object or a child.
+ virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns help text for this object or a child, similar to tooltip text.
+ virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns the keyboard shortcut for this object or child.
+ // Return e.g. ALT+K
+ virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns a role constant.
+ virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns a state constant.
+ virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Returns a localized string representing the value for the object
+ // or child.
+ virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Selects the object or child.
+ virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+ // Gets the window with the keyboard focus.
+ // If childId is 0 and child is NULL, no object in
+ // this subhierarchy has the focus.
+ // If this object has the focus, child should be 'this'.
+ virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child))
+ { return wxACC_NOT_IMPLEMENTED; }
+
+#if wxUSE_VARIANT
+ // Gets a variant representing the selected children
+ // of this object.
+ // Acceptable values:
+ // - a null variant (IsNull() returns TRUE)
+ // - a list variant (GetType() == wxT("list"))
+ // - an integer representing the selected child element,
+ // or 0 if this object is selected (GetType() == wxT("long"))
+ // - a "void*" pointer to a wxAccessible child object
+ virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections))
+ { return wxACC_NOT_IMPLEMENTED; }
+#endif // wxUSE_VARIANT
+
+// Accessors
+
+ // Returns the window associated with this object.
+
+ wxWindow* GetWindow() { return m_window; }
+
+ // Sets the window associated with this object.
+
+ void SetWindow(wxWindow* window) { m_window = window; }
+
+// Operations
+
+ // Each platform's implementation must define this
+ // static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType,
+ // int objectId);
+
+private:
+
+// Data members
+
+ wxWindow* m_window;
+};
+
+
+// ----------------------------------------------------------------------------
+// now include the declaration of the real class
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/ole/access.h"
+#endif
+
+#endif // wxUSE_ACCESSIBILITY
+
+#endif // _WX_ACCESSBASE_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/afterstd.h b/3rdparty/wxWidgets/include/wx/afterstd.h
new file mode 100644
index 0000000000..4c1d4a5a25
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/afterstd.h
@@ -0,0 +1,48 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: include/wx/afterstd.h
+// Purpose: #include after STL headers
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 07/07/03
+// RCS-ID: $Id: afterstd.h 42906 2006-11-01 14:16:42Z VZ $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ See the comments in beforestd.h.
+ */
+
+#if defined(__WXMSW__)
+ #include "wx/msw/winundef.h"
+#endif
+
+// undo what we did in wx/beforestd.h
+#if defined(__VISUALC__) && __VISUALC__ <= 1201
+ // MSVC 5 does not have this
+ #if _MSC_VER > 1100
+ // don't restore this one for VC6, it gives it in each try/catch which is a
+ // bit annoying to say the least
+ #if _MSC_VER >= 0x1300
+ // unreachable code
+ #pragma warning(default:4702)
+ #endif // VC++ >= 7
+
+ #pragma warning(pop)
+ #else
+ // 'expression' : signed/unsigned mismatch
+ #pragma warning(default:4018)
+
+ // 'identifier' : unreferenced formal parameter
+ #pragma warning(default:4100)
+
+ // 'conversion' : conversion from 'type1' to 'type2',
+ // possible loss of data
+ #pragma warning(default:4244)
+
+ // C++ language change: to explicitly specialize class template
+ // 'identifier' use the following syntax
+ #pragma warning(default:4663)
+ #endif
+#endif
+
diff --git a/3rdparty/wxWidgets/include/wx/anidecod.h b/3rdparty/wxWidgets/include/wx/anidecod.h
new file mode 100644
index 0000000000..0b664d86b8
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/anidecod.h
@@ -0,0 +1,77 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/anidecod.h
+// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
+// Author: Francesco Montorsi
+// CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $
+// Copyright: (c) 2006 Francesco Montorsi
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ANIDECOD_H
+#define _WX_ANIDECOD_H
+
+#include "wx/defs.h"
+
+#if wxUSE_STREAMS && wxUSE_ICO_CUR
+
+#include "wx/stream.h"
+#include "wx/image.h"
+#include "wx/animdecod.h"
+#include "wx/dynarray.h"
+
+
+class /*WXDLLEXPORT*/ wxANIFrameInfo;
+
+WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
+WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
+
+// --------------------------------------------------------------------------
+// wxANIDecoder class
+// --------------------------------------------------------------------------
+
+class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
+{
+public:
+ // constructor, destructor, etc.
+ wxANIDecoder();
+ ~wxANIDecoder();
+
+
+ virtual wxSize GetFrameSize(unsigned int frame) const;
+ virtual wxPoint GetFramePosition(unsigned int frame) const;
+ virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
+ virtual long GetDelay(unsigned int frame) const;
+ virtual wxColour GetTransparentColour(unsigned int frame) const;
+
+ // implementation of wxAnimationDecoder's pure virtuals
+ virtual bool CanRead( wxInputStream& stream ) const;
+ virtual bool Load( wxInputStream& stream );
+
+ bool ConvertToImage(unsigned int frame, wxImage *image) const;
+
+ wxAnimationDecoder *Clone() const
+ { return new wxANIDecoder; }
+ wxAnimationType GetType() const
+ { return wxANIMATION_TYPE_ANI; }
+
+private:
+ // frames stored as wxImage(s): ANI files are meant to be used mostly for animated
+ // cursors and thus they do not use any optimization to encode differences between
+ // two frames: they are just a list of images to display sequentially.
+ wxImageArray m_images;
+
+ // the info about each image stored in m_images.
+ // NB: m_info.GetCount() may differ from m_images.GetCount()!
+ wxANIFrameInfoArray m_info;
+
+ // this is the wxCURHandler used to load the ICON chunk of the ANI files
+ static wxCURHandler sm_handler;
+
+
+ DECLARE_NO_COPY_CLASS(wxANIDecoder)
+};
+
+
+#endif // wxUSE_STREAM && wxUSE_ICO_CUR
+
+#endif // _WX_ANIDECOD_H
diff --git a/3rdparty/wxWidgets/include/wx/animate.h b/3rdparty/wxWidgets/include/wx/animate.h
new file mode 100644
index 0000000000..451cce52fc
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/animate.h
@@ -0,0 +1,124 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/animate.h
+// Purpose: wxAnimation and wxAnimationCtrl
+// Author: Julian Smart and Guillermo Rodriguez Garcia
+// Modified by: Francesco Montorsi
+// Created: 13/8/99
+// RCS-ID: $Id: animate.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ANIMATE_H_
+#define _WX_ANIMATE_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_ANIMATIONCTRL
+
+#include "wx/animdecod.h"
+#include "wx/control.h"
+#include "wx/timer.h"
+#include "wx/bitmap.h"
+
+class WXDLLIMPEXP_FWD_ADV wxAnimation;
+
+extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation;
+extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[];
+
+
+// ----------------------------------------------------------------------------
+// wxAnimationBase
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject
+{
+public:
+ wxAnimationBase() {}
+
+ virtual bool IsOk() const = 0;
+
+ // can be -1
+ virtual int GetDelay(unsigned int frame) const = 0;
+
+ virtual unsigned int GetFrameCount() const = 0;
+ virtual wxImage GetFrame(unsigned int frame) const = 0;
+ virtual wxSize GetSize() const = 0;
+
+ virtual bool LoadFile(const wxString& name,
+ wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
+ virtual bool Load(wxInputStream& stream,
+ wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
+
+protected:
+ DECLARE_ABSTRACT_CLASS(wxAnimationBase)
+};
+
+
+
+// ----------------------------------------------------------------------------
+// wxAnimationCtrlBase
+// ----------------------------------------------------------------------------
+
+// do not autoresize to the animation's size when SetAnimation() is called
+#define wxAC_NO_AUTORESIZE (0x0010)
+
+// default style does not include wxAC_NO_AUTORESIZE, that is, the control
+// auto-resizes by default to fit the new animation when SetAnimation() is called
+#define wxAC_DEFAULT_STYLE (wxNO_BORDER)
+
+class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl
+{
+public:
+ wxAnimationCtrlBase() { }
+
+ // public API
+ virtual bool LoadFile(const wxString& filename,
+ wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
+
+ virtual void SetAnimation(const wxAnimation &anim) = 0;
+ virtual wxAnimation GetAnimation() const = 0;
+
+ virtual bool Play() = 0;
+ virtual void Stop() = 0;
+
+ virtual bool IsPlaying() const = 0;
+
+ virtual void SetInactiveBitmap(const wxBitmap &bmp);
+
+ // always return the original bitmap set in this control
+ wxBitmap GetInactiveBitmap() const
+ { return m_bmpStatic; }
+
+protected:
+ // the inactive bitmap as it was set by the user
+ wxBitmap m_bmpStatic;
+
+ // the inactive bitmap currently shown in the control
+ // (may differ in the size from m_bmpStatic)
+ wxBitmap m_bmpStaticReal;
+
+ // updates m_bmpStaticReal from m_bmpStatic if needed
+ virtual void UpdateStaticImage();
+
+ // called by SetInactiveBitmap
+ virtual void DisplayStaticImage() = 0;
+
+private:
+ DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
+};
+
+
+// ----------------------------------------------------------------------------
+// include the platform-specific version of the wxAnimationCtrl class
+// ----------------------------------------------------------------------------
+
+#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+ #include "wx/gtk/animate.h"
+#else
+ #include "wx/generic/animate.h"
+#endif
+
+#endif // wxUSE_ANIMATIONCTRL
+
+#endif // _WX_ANIMATE_H_
diff --git a/3rdparty/wxWidgets/include/wx/animdecod.h b/3rdparty/wxWidgets/include/wx/animdecod.h
new file mode 100644
index 0000000000..d6dc9a48df
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/animdecod.h
@@ -0,0 +1,146 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/animdecod.h
+// Purpose: wxAnimationDecoder
+// Author: Francesco Montorsi
+// CVS-ID: $Id: animdecod.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) 2006 Francesco Montorsi
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ANIMDECOD_H
+#define _WX_ANIMDECOD_H
+
+#include "wx/defs.h"
+
+#if wxUSE_STREAMS
+
+#include "wx/colour.h"
+#include "wx/gdicmn.h"
+
+class WXDLLIMPEXP_FWD_BASE wxInputStream;
+class WXDLLIMPEXP_FWD_CORE wxImage;
+
+/*
+
+ Differences between a wxAnimationDecoder and a wxImageHandler:
+
+ 1) wxImageHandlers always load an input stream directly into a given wxImage
+ object converting from the format-specific data representation to the
+ wxImage native format (RGB24).
+ wxAnimationDecoders always load an input stream using some optimized format
+ to store it which is format-depedent. This allows to store a (possibly big)
+ animation using a format which is a good compromise between required memory
+ and time required to blit in on the screen.
+
+ 2) wxAnimationDecoders contain the animation data in some internal var.
+ That's why they derive from wxObjectRefData: they are data which can be shared.
+
+ 3) wxAnimationDecoders can be used by a wxImageHandler to retrieve a frame
+ in wxImage format; the viceversa cannot be done.
+
+ 4) wxAnimationDecoders are decoders only, thus do not support save features.
+
+ 5) wxAnimationDecoders are directly used by wxAnimation (generic implementation)
+ as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for
+ wxImage uses.
+
+*/
+
+
+// --------------------------------------------------------------------------
+// Constants
+// --------------------------------------------------------------------------
+
+// NB: the values of these enum items are not casual but coincide with the
+// GIF disposal codes. Do not change them !!
+enum wxAnimationDisposal
+{
+ // No disposal specified. The decoder is not required to take any action.
+ wxANIM_UNSPECIFIED = -1,
+
+ // Do not dispose. The graphic is to be left in place.
+ wxANIM_DONOTREMOVE = 0,
+
+ // Restore to background color. The area used by the graphic must be
+ // restored to the background color.
+ wxANIM_TOBACKGROUND = 1,
+
+ // Restore to previous. The decoder is required to restore the area
+ // overwritten by the graphic with what was there prior to rendering the graphic.
+ wxANIM_TOPREVIOUS = 2
+};
+
+enum wxAnimationType
+{
+ wxANIMATION_TYPE_INVALID,
+ wxANIMATION_TYPE_GIF,
+ wxANIMATION_TYPE_ANI,
+
+ wxANIMATION_TYPE_ANY
+};
+
+
+// --------------------------------------------------------------------------
+// wxAnimationDecoder class
+// --------------------------------------------------------------------------
+
+class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData
+{
+public:
+ wxAnimationDecoder()
+ {
+ m_background = wxNullColour;
+ m_nFrames = 0;
+ }
+ virtual ~wxAnimationDecoder() { }
+
+
+ virtual bool Load( wxInputStream& stream ) = 0;
+ virtual bool CanRead( wxInputStream& stream ) const = 0;
+
+ virtual wxAnimationDecoder *Clone() const = 0;
+ virtual wxAnimationType GetType() const = 0;
+
+ // convert given frame to wxImage
+ virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;
+
+
+ // frame specific data getters
+
+ // not all frames may be of the same size; e.g. GIF allows to
+ // specify that between two frames only a smaller portion of the
+ // entire animation has changed.
+ virtual wxSize GetFrameSize(unsigned int frame) const = 0;
+
+ // the position of this frame in case it's not as big as m_szAnimation
+ // or wxPoint(0,0) otherwise.
+ virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
+
+ // what should be done after displaying this frame.
+ virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
+
+ // the number of milliseconds this frame should be displayed.
+ // if returns -1 then the frame must be displayed forever.
+ virtual long GetDelay(unsigned int frame) const = 0;
+
+ // the transparent colour for this frame if any or wxNullColour.
+ virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
+
+ // get global data
+ wxSize GetAnimationSize() const { return m_szAnimation; }
+ wxColour GetBackgroundColour() const { return m_background; }
+ unsigned int GetFrameCount() const { return m_nFrames; }
+
+protected:
+ wxSize m_szAnimation;
+ unsigned int m_nFrames;
+
+ // this is the colour to use for the wxANIM_TOBACKGROUND disposal.
+ // if not specified by the animation, it's set to wxNullColour
+ wxColour m_background;
+};
+
+
+#endif // wxUSE_STREAM
+#endif // _WX_ANIMDECOD_H
+
diff --git a/3rdparty/wxWidgets/include/wx/app.h b/3rdparty/wxWidgets/include/wx/app.h
new file mode 100644
index 0000000000..1846d563e2
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/app.h
@@ -0,0 +1,708 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/app.h
+// Purpose: wxAppBase class and macros used for declaration of wxApp
+// derived class in the user code
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: app.h 51592 2008-02-08 08:17:41Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_APP_H_BASE_
+#define _WX_APP_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers we have to include here
+// ----------------------------------------------------------------------------
+
+#include "wx/event.h" // for the base class
+#include "wx/build.h"
+#include "wx/init.h" // we must declare wxEntry()
+#include "wx/intl.h" // for wxLayoutDirection
+
+class WXDLLIMPEXP_FWD_BASE wxAppConsole;
+class WXDLLIMPEXP_FWD_BASE wxAppTraits;
+class WXDLLIMPEXP_FWD_BASE wxCmdLineParser;
+class WXDLLIMPEXP_FWD_BASE wxLog;
+class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
+
+#if wxUSE_GUI
+ class WXDLLIMPEXP_FWD_BASE wxEventLoop;
+ struct WXDLLIMPEXP_FWD_CORE wxVideoMode;
+#endif
+
+// ----------------------------------------------------------------------------
+// typedefs
+// ----------------------------------------------------------------------------
+
+// the type of the function used to create a wxApp object on program start up
+typedef wxAppConsole* (*wxAppInitializerFunction)();
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+enum
+{
+ wxPRINT_WINDOWS = 1,
+ wxPRINT_POSTSCRIPT = 2
+};
+
+// ----------------------------------------------------------------------------
+// wxAppConsole: wxApp for non-GUI applications
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxAppConsole : public wxEvtHandler
+{
+public:
+ // ctor and dtor
+ wxAppConsole();
+ virtual ~wxAppConsole();
+
+
+ // the virtual functions which may/must be overridden in the derived class
+ // -----------------------------------------------------------------------
+
+ // This is the very first function called for a newly created wxApp object,
+ // it is used by the library to do the global initialization. If, for some
+ // reason, you must override it (instead of just overriding OnInit(), as
+ // usual, for app-specific initializations), do not forget to call the base
+ // class version!
+ virtual bool Initialize(int& argc, wxChar **argv);
+
+ // This gives wxCocoa a chance to call OnInit() with a memory pool in place
+ virtual bool CallOnInit() { return OnInit(); }
+
+ // Called before OnRun(), this is a good place to do initialization -- if
+ // anything fails, return false from here to prevent the program from
+ // continuing. The command line is normally parsed here, call the base
+ // class OnInit() to do it.
+ virtual bool OnInit();
+
+ // this is here only temporary hopefully (FIXME)
+ virtual bool OnInitGui() { return true; }
+
+ // This is the replacement for the normal main(): all program work should
+ // be done here. When OnRun() returns, the programs starts shutting down.
+ virtual int OnRun() = 0;
+
+ // This is only called if OnInit() returned true so it's a good place to do
+ // any cleanup matching the initializations done there.
+ virtual int OnExit();
+
+ // This is the very last function called on wxApp object before it is
+ // destroyed. If you override it (instead of overriding OnExit() as usual)
+ // do not forget to call the base class version!
+ virtual void CleanUp();
+
+ // Called when a fatal exception occurs, this function should take care not
+ // to do anything which might provoke a nested exception! It may be
+ // overridden if you wish to react somehow in non-default way (core dump
+ // under Unix, application crash under Windows) to fatal program errors,
+ // however extreme care should be taken if you don't want this function to
+ // crash.
+ virtual void OnFatalException() { }
+
+ // Called from wxExit() function, should terminate the application a.s.a.p.
+ virtual void Exit();
+
+
+ // application info: name, description, vendor
+ // -------------------------------------------
+
+ // NB: all these should be set by the application itself, there are no
+ // reasonable default except for the application name which is taken to
+ // be argv[0]
+
+ // set/get the application name
+ wxString GetAppName() const
+ {
+ return m_appName.empty() ? m_className : m_appName;
+ }
+ void SetAppName(const wxString& name) { m_appName = name; }
+
+ // set/get the app class name
+ wxString GetClassName() const { return m_className; }
+ void SetClassName(const wxString& name) { m_className = name; }
+
+ // set/get the vendor name
+ const wxString& GetVendorName() const { return m_vendorName; }
+ void SetVendorName(const wxString& name) { m_vendorName = name; }
+
+
+ // cmd line parsing stuff
+ // ----------------------
+
+ // all of these methods may be overridden in the derived class to
+ // customize the command line parsing (by default only a few standard
+ // options are handled)
+ //
+ // you also need to call wxApp::OnInit() from YourApp::OnInit() for all
+ // this to work
+
+#if wxUSE_CMDLINE_PARSER
+ // this one is called from OnInit() to add all supported options
+ // to the given parser (don't forget to call the base class version if you
+ // override it!)
+ virtual void OnInitCmdLine(wxCmdLineParser& parser);
+
+ // called after successfully parsing the command line, return true
+ // to continue and false to exit (don't forget to call the base class
+ // version if you override it!)
+ virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
+
+ // called if "--help" option was specified, return true to continue
+ // and false to exit
+ virtual bool OnCmdLineHelp(wxCmdLineParser& parser);
+
+ // called if incorrect command line options were given, return
+ // false to abort and true to continue
+ virtual bool OnCmdLineError(wxCmdLineParser& parser);
+#endif // wxUSE_CMDLINE_PARSER
+
+
+ // miscellaneous customization functions
+ // -------------------------------------
+
+ // create the app traits object to which we delegate for everything which
+ // either should be configurable by the user (then he can change the
+ // default behaviour simply by overriding CreateTraits() and returning his
+ // own traits object) or which is GUI/console dependent as then wxAppTraits
+ // allows us to abstract the differences behind the common façade
+ wxAppTraits *GetTraits();
+
+ // the functions below shouldn't be used now that we have wxAppTraits
+#if WXWIN_COMPATIBILITY_2_4
+
+#if wxUSE_LOG
+ // override this function to create default log target of arbitrary
+ // user-defined class (default implementation creates a wxLogGui
+ // object) -- this log object is used by default by all wxLogXXX()
+ // functions.
+ wxDEPRECATED( virtual wxLog *CreateLogTarget() );
+#endif // wxUSE_LOG
+
+ // similar to CreateLogTarget() but for the global wxMessageOutput
+ // object
+ wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );
+
+#endif // WXWIN_COMPATIBILITY_2_4
+
+
+ // event processing functions
+ // --------------------------
+
+ // this method allows to filter all the events processed by the program, so
+ // you should try to return quickly from it to avoid slowing down the
+ // program to the crawl
+ //
+ // return value should be -1 to continue with the normal event processing,
+ // or TRUE or FALSE to stop further processing and pretend that the event
+ // had been already processed or won't be processed at all, respectively
+ virtual int FilterEvent(wxEvent& event);
+
+#if wxUSE_EXCEPTIONS
+ // call the specified handler on the given object with the given event
+ //
+ // this method only exists to allow catching the exceptions thrown by any
+ // event handler, it would lead to an extra (useless) virtual function call
+ // if the exceptions were not used, so it doesn't even exist in that case
+ virtual void HandleEvent(wxEvtHandler *handler,
+ wxEventFunction func,
+ wxEvent& event) const;
+
+ // Called when an unhandled C++ exception occurs inside OnRun(): note that
+ // the exception type is lost by now, so if you really want to handle the
+ // exception you should override OnRun() and put a try/catch around
+ // MainLoop() call there or use OnExceptionInMainLoop()
+ virtual void OnUnhandledException() { }
+#endif // wxUSE_EXCEPTIONS
+
+ // process all events in the wxPendingEvents list -- it is necessary to
+ // call this function to process posted events. This happens during each
+ // event loop iteration in GUI mode but if there is no main loop, it may be
+ // also called directly.
+ virtual void ProcessPendingEvents();
+
+ // doesn't do anything in this class, just a hook for GUI wxApp
+ virtual bool Yield(bool WXUNUSED(onlyIfNeeded) = false) { return true; }
+
+ // make sure that idle events are sent again
+ virtual void WakeUpIdle() { }
+
+ // this is just a convenience: by providing its implementation here we
+ // avoid #ifdefs in the code using it
+ static bool IsMainLoopRunning() { return false; }
+
+
+ // debugging support
+ // -----------------
+
+#ifdef __WXDEBUG__
+ // this function is called when an assert failure occurs, the base class
+ // version does the normal processing (i.e. shows the usual assert failure
+ // dialog box)
+ //
+ // the arguments are the location of the failed assert (func may be empty
+ // if the compiler doesn't support C99 __FUNCTION__), the text of the
+ // assert itself and the user-specified message
+ virtual void OnAssertFailure(const wxChar *file,
+ int line,
+ const wxChar *func,
+ const wxChar *cond,
+ const wxChar *msg);
+
+ // old version of the function without func parameter, for compatibility
+ // only, override OnAssertFailure() in the new code
+ virtual void OnAssert(const wxChar *file,
+ int line,
+ const wxChar *cond,
+ const wxChar *msg);
+#endif // __WXDEBUG__
+
+ // check that the wxBuildOptions object (constructed in the application
+ // itself, usually the one from IMPLEMENT_APP() macro) matches the build
+ // options of the library and abort if it doesn't
+ static bool CheckBuildOptions(const char *optionsSignature,
+ const char *componentName);
+#if WXWIN_COMPATIBILITY_2_4
+ wxDEPRECATED( static bool CheckBuildOptions(const wxBuildOptions& buildOptions) );
+#endif
+
+ // implementation only from now on
+ // -------------------------------
+
+ // helpers for dynamic wxApp construction
+ static void SetInitializerFunction(wxAppInitializerFunction fn)
+ { ms_appInitFn = fn; }
+ static wxAppInitializerFunction GetInitializerFunction()
+ { return ms_appInitFn; }
+
+ // accessors for ms_appInstance field (external code might wish to modify
+ // it, this is why we provide a setter here as well, but you should really
+ // know what you're doing if you call it), wxTheApp is usually used instead
+ // of GetInstance()
+ static wxAppConsole *GetInstance() { return ms_appInstance; }
+ static void SetInstance(wxAppConsole *app) { ms_appInstance = app; }
+
+
+ // command line arguments (public for backwards compatibility)
+ int argc;
+ wxChar **argv;
+
+protected:
+ // the function which creates the traits object when GetTraits() needs it
+ // for the first time
+ virtual wxAppTraits *CreateTraits();
+
+
+ // function used for dynamic wxApp creation
+ static wxAppInitializerFunction ms_appInitFn;
+
+ // the one and only global application object
+ static wxAppConsole *ms_appInstance;
+
+
+ // application info (must be set from the user code)
+ wxString m_vendorName, // vendor name (ACME Inc)
+ m_appName, // app name
+ m_className; // class name
+
+ // the class defining the application behaviour, NULL initially and created
+ // by GetTraits() when first needed
+ wxAppTraits *m_traits;
+
+
+ // the application object is a singleton anyhow, there is no sense in
+ // copying it
+ DECLARE_NO_COPY_CLASS(wxAppConsole)
+};
+
+// ----------------------------------------------------------------------------
+// wxAppBase: the common part of wxApp implementations for all platforms
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+
+class WXDLLIMPEXP_CORE wxAppBase : public wxAppConsole
+{
+public:
+ wxAppBase();
+ virtual ~wxAppBase();
+
+ // the virtual functions which may/must be overridden in the derived class
+ // -----------------------------------------------------------------------
+
+ // very first initialization function
+ //
+ // Override: very rarely
+ virtual bool Initialize(int& argc, wxChar **argv);
+
+ // a platform-dependent version of OnInit(): the code here is likely to
+ // depend on the toolkit. default version does nothing.
+ //
+ // Override: rarely.
+ virtual bool OnInitGui();
+
+ // called to start program execution - the default version just enters
+ // the main GUI loop in which events are received and processed until
+ // the last window is not deleted (if GetExitOnFrameDelete) or
+ // ExitMainLoop() is called. In console mode programs, the execution
+ // of the program really starts here
+ //
+ // Override: rarely in GUI applications, always in console ones.
+ virtual int OnRun();
+
+ // a matching function for OnInit()
+ virtual int OnExit();
+
+ // very last clean up function
+ //
+ // Override: very rarely
+ virtual void CleanUp();
+
+
+ // the worker functions - usually not used directly by the user code
+ // -----------------------------------------------------------------
+
+ // return true if we're running main loop, i.e. if the events can
+ // (already) be dispatched
+ static bool IsMainLoopRunning()
+ {
+ wxAppBase *app = wx_static_cast(wxAppBase *, GetInstance());
+ return app && app->m_mainLoop != NULL;
+ }
+
+ // execute the main GUI loop, the function returns when the loop ends
+ virtual int MainLoop();
+
+ // exit the main loop thus terminating the application
+ virtual void Exit();
+
+ // exit the main GUI loop during the next iteration (i.e. it does not
+ // stop the program immediately!)
+ virtual void ExitMainLoop();
+
+ // returns true if there are unprocessed events in the event queue
+ virtual bool Pending();
+
+ // process the first event in the event queue (blocks until an event
+ // appears if there are none currently, use Pending() if this is not
+ // wanted), returns false if the event loop should stop and true
+ // otherwise
+ virtual bool Dispatch();
+
+ // process all currently pending events right now
+ //
+ // it is an error to call Yield() recursively unless the value of
+ // onlyIfNeeded is true
+ //
+ // WARNING: this function is dangerous as it can lead to unexpected
+ // reentrancies (i.e. when called from an event handler it
+ // may result in calling the same event handler again), use
+ // with _extreme_ care or, better, don't use at all!
+ virtual bool Yield(bool onlyIfNeeded = false) = 0;
+
+ // this virtual function is called in the GUI mode when the application
+ // becomes idle and normally just sends wxIdleEvent to all interested
+ // parties
+ //
+ // it should return true if more idle events are needed, false if not
+ virtual bool ProcessIdle();
+
+ // Send idle event to window and all subwindows
+ // Returns true if more idle time is requested.
+ virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
+
+
+#if wxUSE_EXCEPTIONS
+ // Function called if an uncaught exception is caught inside the main
+ // event loop: it may return true to continue running the event loop or
+ // false to stop it (in the latter case it may rethrow the exception as
+ // well)
+ virtual bool OnExceptionInMainLoop();
+#endif // wxUSE_EXCEPTIONS
+
+
+ // top level window functions
+ // --------------------------
+
+ // return true if our app has focus
+ virtual bool IsActive() const { return m_isActive; }
+
+ // set the "main" top level window
+ void SetTopWindow(wxWindow *win) { m_topWindow = win; }
+
+ // return the "main" top level window (if it hadn't been set previously
+ // with SetTopWindow(), will return just some top level window and, if
+ // there are none, will return NULL)
+ virtual wxWindow *GetTopWindow() const;
+
+ // control the exit behaviour: by default, the program will exit the
+ // main loop (and so, usually, terminate) when the last top-level
+ // program window is deleted. Beware that if you disable this behaviour
+ // (with SetExitOnFrameDelete(false)), you'll have to call
+ // ExitMainLoop() explicitly from somewhere.
+ void SetExitOnFrameDelete(bool flag)
+ { m_exitOnFrameDelete = flag ? Yes : No; }
+ bool GetExitOnFrameDelete() const
+ { return m_exitOnFrameDelete == Yes; }
+
+
+ // display mode, visual, printing mode, ...
+ // ------------------------------------------------------------------------
+
+ // Get display mode that is used use. This is only used in framebuffer
+ // wxWin ports (such as wxMGL or wxDFB).
+ virtual wxVideoMode GetDisplayMode() const;
+ // Set display mode to use. This is only used in framebuffer wxWin
+ // ports (such as wxMGL or wxDFB). This method should be called from
+ // wxApp::OnInitGui
+ virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; }
+
+ // set use of best visual flag (see below)
+ void SetUseBestVisual( bool flag, bool forceTrueColour = false )
+ { m_useBestVisual = flag; m_forceTrueColour = forceTrueColour; }
+ bool GetUseBestVisual() const { return m_useBestVisual; }
+
+ // set/get printing mode: see wxPRINT_XXX constants.
+ //
+ // default behaviour is the normal one for Unix: always use PostScript
+ // printing.
+ virtual void SetPrintMode(int WXUNUSED(mode)) { }
+ int GetPrintMode() const { return wxPRINT_POSTSCRIPT; }
+
+ // Return the layout direction for the current locale or wxLayout_Default
+ // if it's unknown
+ virtual wxLayoutDirection GetLayoutDirection() const;
+
+
+ // command line parsing (GUI-specific)
+ // ------------------------------------------------------------------------
+
+#if wxUSE_CMDLINE_PARSER
+ virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
+ virtual void OnInitCmdLine(wxCmdLineParser& parser);
+#endif
+
+ // miscellaneous other stuff
+ // ------------------------------------------------------------------------
+
+ // called by toolkit-specific code to set the app status: active (we have
+ // focus) or not and also the last window which had focus before we were
+ // deactivated
+ virtual void SetActive(bool isActive, wxWindow *lastFocus);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // OBSOLETE: don't use, always returns true
+ //
+ // returns true if the program is successfully initialized
+ wxDEPRECATED( bool Initialized() );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ // perform standard OnIdle behaviour, ensure that this is always called
+ void OnIdle(wxIdleEvent& event);
+
+
+protected:
+ // delete all objects in wxPendingDelete list
+ void DeletePendingObjects();
+
+ // override base class method to use GUI traits
+ virtual wxAppTraits *CreateTraits();
+
+
+ // the main event loop of the application (may be NULL if the loop hasn't
+ // been started yet or has already terminated)
+ wxEventLoop *m_mainLoop;
+
+ // the main top level window (may be NULL)
+ wxWindow *m_topWindow;
+
+ // if Yes, exit the main loop when the last top level window is deleted, if
+ // No don't do it and if Later -- only do it once we reach our OnRun()
+ //
+ // the explanation for using this strange scheme is given in appcmn.cpp
+ enum
+ {
+ Later = -1,
+ No,
+ Yes
+ } m_exitOnFrameDelete;
+
+ // true if the app wants to use the best visual on systems where
+ // more than one are available (Sun, SGI, XFree86 4.0 ?)
+ bool m_useBestVisual;
+ // force TrueColour just in case "best" isn't TrueColour
+ bool m_forceTrueColour;
+
+ // does any of our windows have focus?
+ bool m_isActive;
+
+
+ DECLARE_NO_COPY_CLASS(wxAppBase)
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+ inline bool wxAppBase::Initialized() { return true; }
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#endif // wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// now include the declaration of the real class
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+ #if defined(__WXPALMOS__)
+ #include "wx/palmos/app.h"
+ #elif defined(__WXMSW__)
+ #include "wx/msw/app.h"
+ #elif defined(__WXMOTIF__)
+ #include "wx/motif/app.h"
+ #elif defined(__WXMGL__)
+ #include "wx/mgl/app.h"
+ #elif defined(__WXDFB__)
+ #include "wx/dfb/app.h"
+ #elif defined(__WXGTK20__)
+ #include "wx/gtk/app.h"
+ #elif defined(__WXGTK__)
+ #include "wx/gtk1/app.h"
+ #elif defined(__WXX11__)
+ #include "wx/x11/app.h"
+ #elif defined(__WXMAC__)
+ #include "wx/mac/app.h"
+ #elif defined(__WXCOCOA__)
+ #include "wx/cocoa/app.h"
+ #elif defined(__WXPM__)
+ #include "wx/os2/app.h"
+ #endif
+#else // !GUI
+ // allow using just wxApp (instead of wxAppConsole) in console programs
+ typedef wxAppConsole wxApp;
+#endif // GUI/!GUI
+
+// ----------------------------------------------------------------------------
+// the global data
+// ----------------------------------------------------------------------------
+
+// for compatibility, we define this macro to access the global application
+// object of type wxApp
+//
+// note that instead of using of wxTheApp in application code you should
+// consider using DECLARE_APP() after which you may call wxGetApp() which will
+// return the object of the correct type (i.e. MyApp and not wxApp)
+//
+// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
+// console mode it does nothing at all
+#define wxTheApp wx_static_cast(wxApp*, wxApp::GetInstance())
+
+// ----------------------------------------------------------------------------
+// global functions
+// ----------------------------------------------------------------------------
+
+// event loop related functions only work in GUI programs
+// ------------------------------------------------------
+
+// Force an exit from main loop
+extern void WXDLLIMPEXP_BASE wxExit();
+
+// avoid redeclaring this function here if it had been already declated by
+// wx/utils.h, this results in warnings from g++ with -Wredundant-decls
+#ifndef wx_YIELD_DECLARED
+#define wx_YIELD_DECLARED
+
+// Yield to other apps/messages
+extern bool WXDLLIMPEXP_BASE wxYield();
+
+#endif // wx_YIELD_DECLARED
+
+// Yield to other apps/messages
+extern void WXDLLIMPEXP_BASE wxWakeUpIdle();
+
+// ----------------------------------------------------------------------------
+// macros for dynamic creation of the application object
+// ----------------------------------------------------------------------------
+
+// Having a global instance of this class allows wxApp to be aware of the app
+// creator function. wxApp can then call this function to create a new app
+// object. Convoluted, but necessary.
+
+class WXDLLIMPEXP_BASE wxAppInitializer
+{
+public:
+ wxAppInitializer(wxAppInitializerFunction fn)
+ { wxApp::SetInitializerFunction(fn); }
+};
+
+// the code below defines a IMPLEMENT_WXWIN_MAIN macro which you can use if
+// your compiler really, really wants main() to be in your main program (e.g.
+// hello.cpp). Now IMPLEMENT_APP should add this code if required.
+
+#define IMPLEMENT_WXWIN_MAIN_CONSOLE \
+ int main(int argc, char **argv) { return wxEntry(argc, argv); }
+
+// port-specific header could have defined it already in some special way
+#ifndef IMPLEMENT_WXWIN_MAIN
+ #define IMPLEMENT_WXWIN_MAIN IMPLEMENT_WXWIN_MAIN_CONSOLE
+#endif // defined(IMPLEMENT_WXWIN_MAIN)
+
+#ifdef __WXUNIVERSAL__
+ #include "wx/univ/theme.h"
+
+ #ifdef wxUNIV_DEFAULT_THEME
+ #define IMPLEMENT_WX_THEME_SUPPORT \
+ WX_USE_THEME(wxUNIV_DEFAULT_THEME);
+ #else
+ #define IMPLEMENT_WX_THEME_SUPPORT
+ #endif
+#else
+ #define IMPLEMENT_WX_THEME_SUPPORT
+#endif
+
+// Use this macro if you want to define your own main() or WinMain() function
+// and call wxEntry() from there.
+#define IMPLEMENT_APP_NO_MAIN(appname) \
+ wxAppConsole *wxCreateApp() \
+ { \
+ wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
+ "your program"); \
+ return new appname; \
+ } \
+ wxAppInitializer \
+ wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
+ DECLARE_APP(appname) \
+ appname& wxGetApp() { return *wx_static_cast(appname*, wxApp::GetInstance()); }
+
+// Same as IMPLEMENT_APP() normally but doesn't include themes support in
+// wxUniversal builds
+#define IMPLEMENT_APP_NO_THEMES(appname) \
+ IMPLEMENT_APP_NO_MAIN(appname) \
+ IMPLEMENT_WXWIN_MAIN
+
+// Use this macro exactly once, the argument is the name of the wxApp-derived
+// class which is the class of your application.
+#define IMPLEMENT_APP(appname) \
+ IMPLEMENT_APP_NO_THEMES(appname) \
+ IMPLEMENT_WX_THEME_SUPPORT
+
+// Same as IMPLEMENT_APP(), but for console applications.
+#define IMPLEMENT_APP_CONSOLE(appname) \
+ IMPLEMENT_APP_NO_MAIN(appname) \
+ IMPLEMENT_WXWIN_MAIN_CONSOLE
+
+// this macro can be used multiple times and just allows you to use wxGetApp()
+// function
+#define DECLARE_APP(appname) extern appname& wxGetApp();
+
+
+// declare the stuff defined by IMPLEMENT_APP() macro, it's not really needed
+// anywhere else but at the very least it suppresses icc warnings about
+// defining extern symbols without prior declaration, and it shouldn't do any
+// harm
+extern wxAppConsole *wxCreateApp();
+extern wxAppInitializer wxTheAppInitializer;
+
+#endif // _WX_APP_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/apptrait.h b/3rdparty/wxWidgets/include/wx/apptrait.h
new file mode 100644
index 0000000000..3bb91f520a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/apptrait.h
@@ -0,0 +1,272 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/apptrait.h
+// Purpose: declaration of wxAppTraits and derived classes
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 19.06.2003
+// RCS-ID: $Id: apptrait.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_APPTRAIT_H_
+#define _WX_APPTRAIT_H_
+
+#include "wx/string.h"
+#include "wx/platinfo.h"
+
+class WXDLLIMPEXP_FWD_BASE wxObject;
+class WXDLLIMPEXP_FWD_BASE wxAppTraits;
+#if wxUSE_FONTMAP
+ class WXDLLIMPEXP_FWD_CORE wxFontMapper;
+#endif // wxUSE_FONTMAP
+class WXDLLIMPEXP_FWD_BASE wxLog;
+class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
+class WXDLLIMPEXP_FWD_CORE wxRendererNative;
+class WXDLLIMPEXP_FWD_BASE wxString;
+
+class GSocketGUIFunctionsTable;
+
+
+// ----------------------------------------------------------------------------
+// wxAppTraits: this class defines various configurable aspects of wxApp
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase;
+
+class WXDLLIMPEXP_BASE wxAppTraitsBase
+{
+public:
+ // needed since this class declares virtual members
+ virtual ~wxAppTraitsBase() { }
+
+ // hooks for creating the global objects, may be overridden by the user
+ // ------------------------------------------------------------------------
+
+#if wxUSE_LOG
+ // create the default log target
+ virtual wxLog *CreateLogTarget() = 0;
+#endif // wxUSE_LOG
+
+ // create the global object used for printing out messages
+ virtual wxMessageOutput *CreateMessageOutput() = 0;
+
+#if wxUSE_FONTMAP
+ // create the global font mapper object used for encodings/charset mapping
+ virtual wxFontMapper *CreateFontMapper() = 0;
+#endif // wxUSE_FONTMAP
+
+ // get the renderer to use for drawing the generic controls (return value
+ // may be NULL in which case the default renderer for the current platform
+ // is used); this is used in GUI only and always returns NULL in console
+ //
+ // NB: returned pointer will be deleted by the caller
+ virtual wxRendererNative *CreateRenderer() = 0;
+
+#if wxUSE_STDPATHS
+ // wxStandardPaths object is normally the same for wxBase and wxGUI
+ // except in the case of wxMac and wxCocoa
+ virtual wxStandardPathsBase& GetStandardPaths();
+#endif // wxUSE_STDPATHS
+
+ // functions abstracting differences between GUI and console modes
+ // ------------------------------------------------------------------------
+
+#ifdef __WXDEBUG__
+ // show the assert dialog with the specified message in GUI or just print
+ // the string to stderr in console mode
+ //
+ // base class version has an implementation (in spite of being pure
+ // virtual) in base/appbase.cpp which can be called as last resort.
+ //
+ // return true to suppress subsequent asserts, false to continue as before
+ virtual bool ShowAssertDialog(const wxString& msg) = 0;
+#endif // __WXDEBUG__
+
+ // return true if fprintf(stderr) goes somewhere, false otherwise
+ virtual bool HasStderr() = 0;
+
+ // managing "pending delete" list: in GUI mode we can't immediately delete
+ // some objects because there may be unprocessed events for them and so we
+ // only do it during the next idle loop iteration while this is, of course,
+ // unnecessary in wxBase, so we have a few functions to abstract these
+ // operations
+
+ // add the object to the pending delete list in GUI, delete it immediately
+ // in wxBase
+ virtual void ScheduleForDestroy(wxObject *object) = 0;
+
+ // remove this object from the pending delete list in GUI, do nothing in
+ // wxBase
+ virtual void RemoveFromPendingDelete(wxObject *object) = 0;
+
+#if wxUSE_SOCKETS
+ // return table of GUI callbacks for GSocket code or NULL in wxBase. This
+ // is needed because networking classes are in their own library and so
+ // they can't directly call GUI functions (the same net library can be
+ // used in both GUI and base apps). To complicate it further, GUI library
+ // ("wxCore") doesn't depend on networking library and so only a functions
+ // table can be passed around
+ virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
+#endif
+
+ // return information about the (native) toolkit currently used and its
+ // runtime (not compile-time) version.
+ // returns wxPORT_BASE for console applications and one of the remaining
+ // wxPORT_* values for GUI applications.
+ virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0;
+
+ // return true if the port is using wxUniversal for the GUI, false if not
+ virtual bool IsUsingUniversalWidgets() const = 0;
+
+ // return the name of the Desktop Environment such as
+ // "KDE" or "GNOME". May return an empty string.
+ virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
+
+protected:
+#if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
+ // utility function: returns the stack frame as a plain wxString
+ virtual wxString GetAssertStackTrace();
+#endif
+};
+
+// ----------------------------------------------------------------------------
+// include the platform-specific version of the class
+// ----------------------------------------------------------------------------
+
+// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
+// Unix code (and otherwise __UNIX__ wouldn't be defined)
+// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/apptbase.h"
+#elif defined(__WIN32__)
+ #include "wx/msw/apptbase.h"
+#elif defined(__UNIX__) && !defined(__EMX__)
+ #include "wx/unix/apptbase.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/apptbase.h"
+#elif defined(__OS2__)
+ #include "wx/os2/apptbase.h"
+#else // no platform-specific methods to add to wxAppTraits
+ // wxAppTraits must be a class because it was forward declared as class
+ class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
+ {
+ };
+#endif // platform
+
+// ============================================================================
+// standard traits for console and GUI applications
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
+{
+public:
+#if wxUSE_LOG
+ virtual wxLog *CreateLogTarget();
+#endif // wxUSE_LOG
+ virtual wxMessageOutput *CreateMessageOutput();
+#if wxUSE_FONTMAP
+ virtual wxFontMapper *CreateFontMapper();
+#endif // wxUSE_FONTMAP
+ virtual wxRendererNative *CreateRenderer();
+#if wxUSE_SOCKETS
+ virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
+#endif
+
+#ifdef __WXDEBUG__
+ virtual bool ShowAssertDialog(const wxString& msg);
+#endif // __WXDEBUG__
+ virtual bool HasStderr();
+
+ virtual void ScheduleForDestroy(wxObject *object);
+ virtual void RemoveFromPendingDelete(wxObject *object);
+
+ // the GetToolkitVersion for console application is always the same
+ virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const
+ {
+ // no toolkits (wxBase is for console applications without GUI support)
+ // NB: zero means "no toolkit", -1 means "not initialized yet"
+ // so we must use zero here!
+ if (verMaj) *verMaj = 0;
+ if (verMin) *verMin = 0;
+ return wxPORT_BASE;
+ }
+
+ virtual bool IsUsingUniversalWidgets() const { return false; }
+};
+
+// ----------------------------------------------------------------------------
+// wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+
+class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
+{
+public:
+#if wxUSE_LOG
+ virtual wxLog *CreateLogTarget();
+#endif // wxUSE_LOG
+ virtual wxMessageOutput *CreateMessageOutput();
+#if wxUSE_FONTMAP
+ virtual wxFontMapper *CreateFontMapper();
+#endif // wxUSE_FONTMAP
+ virtual wxRendererNative *CreateRenderer();
+#if wxUSE_SOCKETS
+ virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
+#endif
+
+#ifdef __WXDEBUG__
+ virtual bool ShowAssertDialog(const wxString& msg);
+#endif // __WXDEBUG__
+ virtual bool HasStderr();
+
+ virtual void ScheduleForDestroy(wxObject *object);
+ virtual void RemoveFromPendingDelete(wxObject *object);
+
+ virtual bool IsUsingUniversalWidgets() const
+ {
+ #ifdef __WXUNIVERSAL__
+ return true;
+ #else
+ return false;
+ #endif
+ }
+};
+
+#endif // wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// include the platform-specific version of the classes above
+// ----------------------------------------------------------------------------
+
+// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/apptrait.h"
+#elif defined(__WIN32__)
+ #include "wx/msw/apptrait.h"
+#elif defined(__OS2__)
+ #include "wx/os2/apptrait.h"
+#elif defined(__UNIX__)
+ #include "wx/unix/apptrait.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/apptrait.h"
+#elif defined(__DOS__)
+ #include "wx/msdos/apptrait.h"
+#else
+ #if wxUSE_GUI
+ class wxGUIAppTraits : public wxGUIAppTraitsBase
+ {
+ };
+ #endif // wxUSE_GUI
+ class wxConsoleAppTraits: public wxConsoleAppTraitsBase
+ {
+ };
+#endif // platform
+
+#endif // _WX_APPTRAIT_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/archive.h b/3rdparty/wxWidgets/include/wx/archive.h
new file mode 100644
index 0000000000..43b9ec0256
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/archive.h
@@ -0,0 +1,381 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/archive.h
+// Purpose: Streams for archive formats
+// Author: Mike Wetherell
+// RCS-ID: $Id: archive.h 43445 2006-11-16 14:30:20Z MW $
+// Copyright: (c) 2004 Mike Wetherell
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ARCHIVE_H__
+#define _WX_ARCHIVE_H__
+
+#include "wx/defs.h"
+
+#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
+
+#include "wx/stream.h"
+#include "wx/filename.h"
+
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveNotifier
+
+class WXDLLIMPEXP_BASE wxArchiveNotifier
+{
+public:
+ virtual ~wxArchiveNotifier() { }
+
+ virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0;
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveEntry
+//
+// Holds an entry's meta data, such as filename and timestamp.
+
+class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject
+{
+public:
+ virtual ~wxArchiveEntry() { }
+
+ virtual wxDateTime GetDateTime() const = 0;
+ virtual wxFileOffset GetSize() const = 0;
+ virtual wxFileOffset GetOffset() const = 0;
+ virtual bool IsDir() const = 0;
+ virtual bool IsReadOnly() const = 0;
+ virtual wxString GetInternalName() const = 0;
+ virtual wxPathFormat GetInternalFormat() const = 0;
+ virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0;
+
+ virtual void SetDateTime(const wxDateTime& dt) = 0;
+ virtual void SetSize(wxFileOffset size) = 0;
+ virtual void SetIsDir(bool isDir = true) = 0;
+ virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
+ virtual void SetName(const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE) = 0;
+
+ wxArchiveEntry *Clone() const { return DoClone(); }
+
+ void SetNotifier(wxArchiveNotifier& notifier);
+ virtual void UnsetNotifier() { m_notifier = NULL; }
+
+protected:
+ wxArchiveEntry() : m_notifier(NULL) { }
+ wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { }
+
+ virtual void SetOffset(wxFileOffset offset) = 0;
+ virtual wxArchiveEntry* DoClone() const = 0;
+
+ wxArchiveNotifier *GetNotifier() const { return m_notifier; }
+ wxArchiveEntry& operator=(const wxArchiveEntry& entry);
+
+private:
+ wxArchiveNotifier *m_notifier;
+
+ DECLARE_ABSTRACT_CLASS(wxArchiveEntry)
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveInputStream
+//
+// GetNextEntry() returns an wxArchiveEntry object containing the meta-data
+// for the next entry in the archive (and gives away ownership). Reading from
+// the wxArchiveInputStream then returns the entry's data. Eof() becomes true
+// after an attempt has been made to read past the end of the entry's data.
+//
+// When there are no more entries, GetNextEntry() returns NULL and sets Eof().
+
+class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream
+{
+public:
+ typedef wxArchiveEntry entry_type;
+
+ virtual ~wxArchiveInputStream() { }
+
+ virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
+ virtual bool CloseEntry() = 0;
+
+ wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
+
+ virtual char Peek() { return wxInputStream::Peek(); }
+
+protected:
+ wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
+ wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
+
+ virtual wxArchiveEntry *DoGetNextEntry() = 0;
+
+ wxMBConv& GetConv() const { return m_conv; }
+
+private:
+ wxMBConv& m_conv;
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveOutputStream
+//
+// PutNextEntry is used to create a new entry in the output archive, then
+// the entry's data is written to the wxArchiveOutputStream.
+//
+// Only one entry can be open for output at a time; another call to
+// PutNextEntry closes the current entry and begins the next.
+//
+// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
+// of the entry object.
+
+class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream
+{
+public:
+ virtual ~wxArchiveOutputStream() { }
+
+ virtual bool PutNextEntry(wxArchiveEntry *entry) = 0;
+
+ virtual bool PutNextEntry(const wxString& name,
+ const wxDateTime& dt = wxDateTime::Now(),
+ wxFileOffset size = wxInvalidOffset) = 0;
+
+ virtual bool PutNextDirEntry(const wxString& name,
+ const wxDateTime& dt = wxDateTime::Now()) = 0;
+
+ virtual bool CopyEntry(wxArchiveEntry *entry,
+ wxArchiveInputStream& stream) = 0;
+
+ virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0;
+
+ virtual bool CloseEntry() = 0;
+
+protected:
+ wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv);
+ wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv);
+
+ wxMBConv& GetConv() const { return m_conv; }
+
+private:
+ wxMBConv& m_conv;
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveIterator
+//
+// An input iterator that can be used to transfer an archive's catalog to
+// a container.
+
+#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
+#include
+#include
+
+template inline
+void _wxSetArchiveIteratorValue(
+ X& val, Y entry, void *WXUNUSED(d))
+{
+ val = X(entry);
+}
+template inline
+void _wxSetArchiveIteratorValue(
+ std::pair& val, Z entry, Z WXUNUSED(d))
+{
+ val = std::make_pair(X(entry->GetInternalName()), Y(entry));
+}
+
+#if defined _MSC_VER && _MSC_VER < 1300
+template
+#else
+template
+#endif
+class wxArchiveIterator
+{
+public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
+
+ wxArchiveIterator() : m_rep(NULL) { }
+
+ wxArchiveIterator(Arc& arc) {
+ typename Arc::entry_type* entry = arc.GetNextEntry();
+ m_rep = entry ? new Rep(arc, entry) : NULL;
+ }
+
+ wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) {
+ if (m_rep)
+ m_rep->AddRef();
+ }
+
+ ~wxArchiveIterator() {
+ if (m_rep)
+ m_rep->UnRef();
+ }
+
+ const T& operator *() const {
+ return m_rep->GetValue();
+ }
+
+ const T* operator ->() const {
+ return &**this;
+ }
+
+ wxArchiveIterator& operator =(const wxArchiveIterator& it) {
+ if (it.m_rep)
+ it.m_rep.AddRef();
+ if (m_rep)
+ m_rep.UnRef();
+ m_rep = it.m_rep;
+ return *this;
+ }
+
+ wxArchiveIterator& operator ++() {
+ m_rep = m_rep->Next();
+ return *this;
+ }
+
+ wxArchiveIterator operator ++(int) {
+ wxArchiveIterator it(*this);
+ ++(*this);
+ return it;
+ }
+
+ bool operator ==(const wxArchiveIterator& j) const {
+ return m_rep == j.m_rep;
+ }
+
+ bool operator !=(const wxArchiveIterator& j) const {
+ return !(*this == j);
+ }
+
+private:
+ class Rep {
+ Arc& m_arc;
+ typename Arc::entry_type* m_entry;
+ T m_value;
+ int m_ref;
+
+ public:
+ Rep(Arc& arc, typename Arc::entry_type* entry)
+ : m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
+ ~Rep()
+ { delete m_entry; }
+
+ void AddRef() {
+ m_ref++;
+ }
+
+ void UnRef() {
+ if (--m_ref == 0)
+ delete this;
+ }
+
+ Rep *Next() {
+ typename Arc::entry_type* entry = m_arc.GetNextEntry();
+ if (!entry) {
+ UnRef();
+ return NULL;
+ }
+ if (m_ref > 1) {
+ m_ref--;
+ return new Rep(m_arc, entry);
+ }
+ delete m_entry;
+ m_entry = entry;
+ m_value = T();
+ return this;
+ }
+
+ const T& GetValue() {
+ if (m_entry) {
+ _wxSetArchiveIteratorValue(m_value, m_entry, m_entry);
+ m_entry = NULL;
+ }
+ return m_value;
+ }
+ } *m_rep;
+};
+
+typedef wxArchiveIterator wxArchiveIter;
+typedef wxArchiveIterator > wxArchivePairIter;
+
+#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
+
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveClassFactory
+//
+// A wxArchiveClassFactory instance for a particular archive type allows
+// the creation of the other classes that may be needed.
+
+void WXDLLIMPEXP_BASE wxUseArchiveClasses();
+
+class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase
+{
+public:
+ typedef wxArchiveEntry entry_type;
+ typedef wxArchiveInputStream instream_type;
+ typedef wxArchiveOutputStream outstream_type;
+ typedef wxArchiveNotifier notifier_type;
+#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
+ typedef wxArchiveIter iter_type;
+ typedef wxArchivePairIter pairiter_type;
+#endif
+
+ virtual ~wxArchiveClassFactory() { }
+
+ wxArchiveEntry *NewEntry() const
+ { return DoNewEntry(); }
+ wxArchiveInputStream *NewStream(wxInputStream& stream) const
+ { return DoNewStream(stream); }
+ wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
+ { return DoNewStream(stream); }
+ wxArchiveInputStream *NewStream(wxInputStream *stream) const
+ { return DoNewStream(stream); }
+ wxArchiveOutputStream *NewStream(wxOutputStream *stream) const
+ { return DoNewStream(stream); }
+
+ virtual wxString GetInternalName(
+ const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE) const = 0;
+
+ void SetConv(wxMBConv& conv) { m_pConv = &conv; }
+ wxMBConv& GetConv() const
+ { if (m_pConv) return *m_pConv; else return wxConvLocal; }
+
+ static const wxArchiveClassFactory *Find(const wxChar *protocol,
+ wxStreamProtocolType type
+ = wxSTREAM_PROTOCOL);
+
+ static const wxArchiveClassFactory *GetFirst();
+ const wxArchiveClassFactory *GetNext() const { return m_next; }
+
+ void PushFront() { Remove(); m_next = sm_first; sm_first = this; }
+ void Remove();
+
+protected:
+ // old compilers don't support covarient returns, so 'Do' methods are
+ // used to simulate them
+ virtual wxArchiveEntry *DoNewEntry() const = 0;
+ virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
+ virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
+ virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0;
+ virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0;
+
+ wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { }
+ wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
+ { return *this; }
+
+private:
+ wxMBConv *m_pConv;
+ static wxArchiveClassFactory *sm_first;
+ wxArchiveClassFactory *m_next;
+
+ DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
+};
+
+#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
+
+#endif // _WX_ARCHIVE_H__
diff --git a/3rdparty/wxWidgets/include/wx/arrimpl.cpp b/3rdparty/wxWidgets/include/wx/arrimpl.cpp
new file mode 100644
index 0000000000..33e25091b9
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/arrimpl.cpp
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/arrimpl.cpp
+// Purpose: helper file for implementation of dynamic lists
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 16.10.97
+// RCS-ID: $Id: arrimpl.cpp 34241 2005-05-22 12:10:55Z JS $
+// Copyright: (c) 1997 Vadim Zeitlin
+// Licence: wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+/*****************************************************************************
+ * Purpose: implements methods of "template" class declared in *
+ * DECLARE_OBJARRAY macro and which couldn't be implemented inline *
+ * (because they need the full definition of type T in scope) *
+ * *
+ * Usage: 1) #include dynarray.h *
+ * 2) WX_DECLARE_OBJARRAY *
+ * 3) #include arrimpl.cpp *
+ * 4) WX_DEFINE_OBJARRAY *
+ *****************************************************************************/
+
+// needed to resolve the conflict between global T and macro parameter T
+
+#define _WX_ERROR_REMOVE2(x) wxT("bad index in ") wxT(#x) wxT("::RemoveAt()")
+
+// macro implements remaining (not inline) methods of template list
+// (it's private to this file)
+#undef _DEFINE_OBJARRAY
+#define _DEFINE_OBJARRAY(T, name) \
+name::~name() \
+{ \
+ Empty(); \
+} \
+ \
+void name::DoCopy(const name& src) \
+{ \
+ for ( size_t ui = 0; ui < src.size(); ui++ ) \
+ Add(src[ui]); \
+} \
+ \
+name& name::operator=(const name& src) \
+{ \
+ Empty(); \
+ DoCopy(src); \
+ \
+ return *this; \
+} \
+ \
+name::name(const name& src) : wxArrayPtrVoid() \
+{ \
+ DoCopy(src); \
+} \
+ \
+void name::DoEmpty() \
+{ \
+ for ( size_t ui = 0; ui < size(); ui++ ) \
+ delete (T*)base_array::operator[](ui); \
+} \
+ \
+void name::RemoveAt(size_t uiIndex, size_t nRemove) \
+{ \
+ wxCHECK_RET( uiIndex < size(), _WX_ERROR_REMOVE2(name) ); \
+ \
+ for (size_t i = 0; i < nRemove; i++ ) \
+ delete (T*)base_array::operator[](uiIndex + i); \
+ \
+ base_array::erase(begin() + uiIndex, begin() + uiIndex + nRemove); \
+} \
+ \
+void name::Add(const T& item, size_t nInsert) \
+{ \
+ if (nInsert == 0) \
+ return; \
+ T* pItem = new T(item); \
+ size_t nOldSize = size(); \
+ if ( pItem != NULL ) \
+ base_array::insert(end(), nInsert, pItem); \
+ for (size_t i = 1; i < nInsert; i++) \
+ base_array::operator[](nOldSize + i) = new T(item); \
+} \
+ \
+void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \
+{ \
+ if (nInsert == 0) \
+ return; \
+ T* pItem = new T(item); \
+ if ( pItem != NULL ) \
+ base_array::insert(begin() + uiIndex, nInsert, pItem); \
+ for (size_t i = 1; i < nInsert; i++) \
+ base_array::operator[](uiIndex + i) = new T(item); \
+} \
+ \
+int name::Index(const T& Item, bool bFromEnd) const \
+{ \
+ if ( bFromEnd ) { \
+ if ( size() > 0 ) { \
+ size_t ui = size() - 1; \
+ do { \
+ if ( (T*)base_array::operator[](ui) == &Item ) \
+ return wx_static_cast(int, ui); \
+ ui--; \
+ } \
+ while ( ui != 0 ); \
+ } \
+ } \
+ else { \
+ for( size_t ui = 0; ui < size(); ui++ ) { \
+ if( (T*)base_array::operator[](ui) == &Item ) \
+ return wx_static_cast(int, ui); \
+ } \
+ } \
+ \
+ return wxNOT_FOUND; \
+}
+
+// redefine the macro so that now it will generate the class implementation
+// old value would provoke a compile-time error if this file is not included
+#undef WX_DEFINE_OBJARRAY
+#define WX_DEFINE_OBJARRAY(name) _DEFINE_OBJARRAY(_wxObjArray##name, name)
diff --git a/3rdparty/wxWidgets/include/wx/arrstr.h b/3rdparty/wxWidgets/include/wx/arrstr.h
new file mode 100644
index 0000000000..0f1b908878
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/arrstr.h
@@ -0,0 +1,377 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: include/wx/arrstr.h
+// Purpose: wxArrayString class
+// Author: Mattia Barbon and Vadim Zeitlin
+// Modified by:
+// Created: 07/07/03
+// RCS-ID: $Id: arrstr.h 56758 2008-11-13 22:32:21Z VS $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ARRSTR_H
+#define _WX_ARRSTR_H
+
+#include "wx/defs.h"
+#include "wx/string.h"
+
+WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
+WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
+
+#if wxUSE_STL
+
+#include "wx/dynarray.h"
+
+typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*);
+typedef wxString _wxArraywxBaseArrayStringBase;
+_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
+ wxArray_SortFunction,
+ class WXDLLIMPEXP_BASE);
+WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
+ wxBaseArrayStringBase, WXDLLIMPEXP_BASE);
+_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
+ wxBaseArrayStringBase, = wxStringSortAscending,
+ class WXDLLIMPEXP_BASE, CMPFUNCwxString);
+
+class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
+{
+public:
+ // type of function used by wxArrayString::Sort()
+ typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
+ const wxString& second);
+
+ wxArrayString() { }
+ wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
+ wxArrayString(size_t sz, const wxChar** a);
+ wxArrayString(size_t sz, const wxString* a);
+
+ int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
+
+ void Sort(bool reverseOrder = false);
+ void Sort(CompareFunction function);
+ void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }
+
+ size_t Add(const wxString& string, size_t copies = 1)
+ {
+ wxArrayStringBase::Add(string, copies);
+ return size() - copies;
+ }
+};
+
+class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
+{
+public:
+ wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending)
+ { }
+ wxSortedArrayString(const wxSortedArrayString& array)
+ : wxSortedArrayStringBase(array)
+ { }
+ wxSortedArrayString(const wxArrayString& src)
+ : wxSortedArrayStringBase(wxStringSortAscending)
+ {
+ reserve(src.size());
+
+ for ( size_t n = 0; n < src.size(); n++ )
+ Add(src[n]);
+ }
+
+ int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
+};
+
+#else // if !wxUSE_STL
+
+// ----------------------------------------------------------------------------
+// The string array uses it's knowledge of internal structure of the wxString
+// class to optimize string storage. Normally, we would store pointers to
+// string, but as wxString is, in fact, itself a pointer (sizeof(wxString) is
+// sizeof(char *)) we store these pointers instead. The cast to "wxString *" is
+// really all we need to turn such pointer into a string!
+//
+// Of course, it can be called a dirty hack, but we use twice less memory and
+// this approach is also more speed efficient, so it's probably worth it.
+//
+// Usage notes: when a string is added/inserted, a new copy of it is created,
+// so the original string may be safely deleted. When a string is retrieved
+// from the array (operator[] or Item() method), a reference is returned.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxArrayString
+{
+public:
+ // type of function used by wxArrayString::Sort()
+ typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
+ const wxString& second);
+ // type of function used by wxArrayString::Sort(), for compatibility with
+ // wxArray
+ typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first,
+ wxString* second);
+
+ // constructors and destructor
+ // default ctor
+ wxArrayString() { Init(false); }
+ // if autoSort is true, the array is always sorted (in alphabetical order)
+ //
+ // NB: the reason for using int and not bool is that like this we can avoid
+ // using this ctor for implicit conversions from "const char *" (which
+ // we'd like to be implicitly converted to wxString instead!)
+ //
+ // of course, using explicit would be even better - if all compilers
+ // supported it...
+ wxArrayString(int autoSort) { Init(autoSort != 0); }
+ // C string array ctor
+ wxArrayString(size_t sz, const wxChar** a);
+ // wxString string array ctor
+ wxArrayString(size_t sz, const wxString* a);
+ // copy ctor
+ wxArrayString(const wxArrayString& array);
+ // assignment operator
+ wxArrayString& operator=(const wxArrayString& src);
+ // not virtual, this class should not be derived from
+ ~wxArrayString();
+
+ // memory management
+ // empties the list, but doesn't release memory
+ void Empty();
+ // empties the list and releases memory
+ void Clear();
+ // preallocates memory for given number of items
+ void Alloc(size_t nCount);
+ // minimzes the memory usage (by freeing all extra memory)
+ void Shrink();
+
+ // simple accessors
+ // number of elements in the array
+ size_t GetCount() const { return m_nCount; }
+ // is it empty?
+ bool IsEmpty() const { return m_nCount == 0; }
+ // number of elements in the array (GetCount is preferred API)
+ size_t Count() const { return m_nCount; }
+
+ // items access (range checking is done in debug version)
+ // get item at position uiIndex
+ wxString& Item(size_t nIndex) const
+ {
+ wxASSERT_MSG( nIndex < m_nCount,
+ _T("wxArrayString: index out of bounds") );
+
+ return *(wxString *)&(m_pItems[nIndex]);
+ }
+
+ // same as Item()
+ wxString& operator[](size_t nIndex) const { return Item(nIndex); }
+ // get last item
+ wxString& Last() const
+ {
+ wxASSERT_MSG( !IsEmpty(),
+ _T("wxArrayString: index out of bounds") );
+ return Item(Count() - 1);
+ }
+
+ // return a wxString[], useful for the controls which
+ // take one in their ctor. You must delete[] it yourself
+ // once you are done with it. Will return NULL if the
+ // ArrayString was empty.
+#if WXWIN_COMPATIBILITY_2_4
+ wxDEPRECATED( wxString* GetStringArray() const );
+#endif
+
+ // item management
+ // Search the element in the array, starting from the beginning if
+ // bFromEnd is false or from end otherwise. If bCase, comparison is case
+ // sensitive (default). Returns index of the first item matched or
+ // wxNOT_FOUND
+ int Index (const wxChar *sz, bool bCase = true, bool bFromEnd = false) const;
+ // add new element at the end (if the array is not sorted), return its
+ // index
+ size_t Add(const wxString& str, size_t nInsert = 1);
+ // add new element at given position
+ void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1);
+ // expand the array to have count elements
+ void SetCount(size_t count);
+ // remove first item matching this value
+ void Remove(const wxChar *sz);
+ // remove item by index
+#if WXWIN_COMPATIBILITY_2_4
+ wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
+#endif
+ void RemoveAt(size_t nIndex, size_t nRemove = 1);
+
+ // sorting
+ // sort array elements in alphabetical order (or reversed alphabetical
+ // order if reverseOrder parameter is true)
+ void Sort(bool reverseOrder = false);
+ // sort array elements using specified comparaison function
+ void Sort(CompareFunction compareFunction);
+ void Sort(CompareFunction2 compareFunction);
+
+ // comparison
+ // compare two arrays case sensitively
+ bool operator==(const wxArrayString& a) const;
+ // compare two arrays case sensitively
+ bool operator!=(const wxArrayString& a) const { return !(*this == a); }
+
+ // STL-like interface
+ typedef wxString value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type* iterator;
+ typedef const value_type* const_iterator;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef int difference_type;
+ typedef size_t size_type;
+
+ // TODO: this code duplicates the one in dynarray.h
+ class reverse_iterator
+ {
+ typedef wxString value_type;
+ typedef value_type* pointer;
+ typedef value_type& reference;
+ typedef reverse_iterator itor;
+ friend itor operator+(int o, const itor& it);
+ friend itor operator+(const itor& it, int o);
+ friend itor operator-(const itor& it, int o);
+ friend difference_type operator -(const itor& i1, const itor& i2);
+ public:
+ pointer m_ptr;
+ reverse_iterator() : m_ptr(NULL) { }
+ reverse_iterator(pointer ptr) : m_ptr(ptr) { }
+ reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
+ reference operator*() const { return *m_ptr; }
+ pointer operator->() const { return m_ptr; }
+ itor& operator++() { --m_ptr; return *this; }
+ const itor operator++(int)
+ { reverse_iterator tmp = *this; --m_ptr; return tmp; }
+ itor& operator--() { ++m_ptr; return *this; }
+ const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }
+ bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }
+ bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }
+ };
+
+ class const_reverse_iterator
+ {
+ typedef wxString value_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef const_reverse_iterator itor;
+ friend itor operator+(int o, const itor& it);
+ friend itor operator+(const itor& it, int o);
+ friend itor operator-(const itor& it, int o);
+ friend difference_type operator -(const itor& i1, const itor& i2);
+ public:
+ pointer m_ptr;
+ const_reverse_iterator() : m_ptr(NULL) { }
+ const_reverse_iterator(pointer ptr) : m_ptr(ptr) { }
+ const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
+ const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }
+ reference operator*() const { return *m_ptr; }
+ pointer operator->() const { return m_ptr; }
+ itor& operator++() { --m_ptr; return *this; }
+ const itor operator++(int)
+ { itor tmp = *this; --m_ptr; return tmp; }
+ itor& operator--() { ++m_ptr; return *this; }
+ const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }
+ bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }
+ bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }
+ };
+
+ wxArrayString(const_iterator first, const_iterator last)
+ { Init(false); assign(first, last); }
+ wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
+ void assign(const_iterator first, const_iterator last);
+ void assign(size_type n, const_reference v)
+ { clear(); Add(v, n); }
+ reference back() { return *(end() - 1); }
+ const_reference back() const { return *(end() - 1); }
+ iterator begin() { return (wxString *)&(m_pItems[0]); }
+ const_iterator begin() const { return (wxString *)&(m_pItems[0]); }
+ size_type capacity() const { return m_nSize; }
+ void clear() { Clear(); }
+ bool empty() const { return IsEmpty(); }
+ iterator end() { return begin() + GetCount(); }
+ const_iterator end() const { return begin() + GetCount(); }
+ iterator erase(iterator first, iterator last)
+ {
+ size_t idx = first - begin();
+ RemoveAt(idx, last - first);
+ return begin() + idx;
+ }
+ iterator erase(iterator it) { return erase(it, it + 1); }
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+ void insert(iterator it, size_type n, const_reference v)
+ { Insert(v, it - begin(), n); }
+ iterator insert(iterator it, const_reference v = value_type())
+ { size_t idx = it - begin(); Insert(v, idx); return begin() + idx; }
+ void insert(iterator it, const_iterator first, const_iterator last);
+ size_type max_size() const { return INT_MAX; }
+ void pop_back() { RemoveAt(GetCount() - 1); }
+ void push_back(const_reference v) { Add(v); }
+ reverse_iterator rbegin() { return reverse_iterator(end() - 1); }
+ const_reverse_iterator rbegin() const;
+ reverse_iterator rend() { return reverse_iterator(begin() - 1); }
+ const_reverse_iterator rend() const;
+ void reserve(size_type n) /* base::reserve*/;
+ void resize(size_type n, value_type v = value_type());
+ size_type size() const { return GetCount(); }
+
+protected:
+ void Init(bool autoSort); // common part of all ctors
+ void Copy(const wxArrayString& src); // copies the contents of another array
+
+private:
+ void Grow(size_t nIncrement = 0); // makes array bigger if needed
+ void Free(); // free all the strings stored
+
+ void DoSort(); // common part of all Sort() variants
+
+ size_t m_nSize, // current size of the array
+ m_nCount; // current number of elements
+
+ wxChar **m_pItems; // pointer to data
+
+ bool m_autoSort; // if true, keep the array always sorted
+};
+
+class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
+{
+public:
+ wxSortedArrayString() : wxArrayString(true)
+ { }
+ wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
+ { Copy(array); }
+};
+
+#endif // !wxUSE_STL
+
+// this class provides a temporary wxString* from a
+// wxArrayString
+class WXDLLIMPEXP_BASE wxCArrayString
+{
+public:
+ wxCArrayString( const wxArrayString& array )
+ : m_array( array ), m_strings( NULL )
+ { }
+ ~wxCArrayString() { delete[] m_strings; }
+
+ size_t GetCount() const { return m_array.GetCount(); }
+ wxString* GetStrings()
+ {
+ if( m_strings ) return m_strings;
+ size_t count = m_array.GetCount();
+ m_strings = new wxString[count];
+ for( size_t i = 0; i < count; ++i )
+ 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;
+};
+
+#endif
diff --git a/3rdparty/wxWidgets/include/wx/artprov.h b/3rdparty/wxWidgets/include/wx/artprov.h
new file mode 100644
index 0000000000..1d026a74db
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/artprov.h
@@ -0,0 +1,204 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/artprov.h
+// Purpose: wxArtProvider class
+// Author: Vaclav Slavik
+// Modified by:
+// Created: 18/03/2002
+// RCS-ID: $Id: artprov.h 57701 2008-12-31 23:40:06Z VS $
+// Copyright: (c) Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ARTPROV_H_
+#define _WX_ARTPROV_H_
+
+#include "wx/string.h"
+#include "wx/bitmap.h"
+#include "wx/icon.h"
+
+class WXDLLIMPEXP_FWD_CORE wxArtProvidersList;
+class WXDLLIMPEXP_FWD_CORE wxArtProviderCache;
+class wxArtProviderModule;
+
+// ----------------------------------------------------------------------------
+// Types
+// ----------------------------------------------------------------------------
+
+typedef wxString wxArtClient;
+typedef wxString wxArtID;
+
+#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + _T("_C"))
+#define wxART_MAKE_CLIENT_ID(id) _T(#id) _T("_C")
+#define wxART_MAKE_ART_ID_FROM_STR(id) (id)
+#define wxART_MAKE_ART_ID(id) _T(#id)
+
+// ----------------------------------------------------------------------------
+// Art clients
+// ----------------------------------------------------------------------------
+
+#define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR)
+#define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU)
+#define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON)
+
+#define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG)
+#define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER)
+#define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX)
+#define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON)
+
+#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER)
+
+// ----------------------------------------------------------------------------
+// Art IDs
+// ----------------------------------------------------------------------------
+
+#define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_BOOKMARK)
+#define wxART_DEL_BOOKMARK wxART_MAKE_ART_ID(wxART_DEL_BOOKMARK)
+#define wxART_HELP_SIDE_PANEL wxART_MAKE_ART_ID(wxART_HELP_SIDE_PANEL)
+#define wxART_HELP_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS)
+#define wxART_HELP_BOOK wxART_MAKE_ART_ID(wxART_HELP_BOOK)
+#define wxART_HELP_FOLDER wxART_MAKE_ART_ID(wxART_HELP_FOLDER)
+#define wxART_HELP_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE)
+#define wxART_GO_BACK wxART_MAKE_ART_ID(wxART_GO_BACK)
+#define wxART_GO_FORWARD wxART_MAKE_ART_ID(wxART_GO_FORWARD)
+#define wxART_GO_UP wxART_MAKE_ART_ID(wxART_GO_UP)
+#define wxART_GO_DOWN wxART_MAKE_ART_ID(wxART_GO_DOWN)
+#define wxART_GO_TO_PARENT wxART_MAKE_ART_ID(wxART_GO_TO_PARENT)
+#define wxART_GO_HOME wxART_MAKE_ART_ID(wxART_GO_HOME)
+#define wxART_FILE_OPEN wxART_MAKE_ART_ID(wxART_FILE_OPEN)
+#define wxART_FILE_SAVE wxART_MAKE_ART_ID(wxART_FILE_SAVE)
+#define wxART_FILE_SAVE_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS)
+#define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT)
+#define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP)
+#define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP)
+#define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_VIEW)
+#define wxART_LIST_VIEW wxART_MAKE_ART_ID(wxART_LIST_VIEW)
+#define wxART_NEW_DIR wxART_MAKE_ART_ID(wxART_NEW_DIR)
+#define wxART_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK)
+#define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY)
+#define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM)
+#define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE)
+#define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER)
+#define wxART_FOLDER_OPEN wxART_MAKE_ART_ID(wxART_FOLDER_OPEN)
+#define wxART_GO_DIR_UP wxART_MAKE_ART_ID(wxART_GO_DIR_UP)
+#define wxART_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_FILE)
+#define wxART_NORMAL_FILE wxART_MAKE_ART_ID(wxART_NORMAL_FILE)
+#define wxART_TICK_MARK wxART_MAKE_ART_ID(wxART_TICK_MARK)
+#define wxART_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK)
+#define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR)
+#define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION)
+#define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING)
+#define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION)
+#define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE)
+
+#define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY)
+#define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT)
+#define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE)
+#define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE)
+#define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW)
+
+#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO)
+#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO)
+
+#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT)
+
+#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND)
+#define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE)
+
+
+// ----------------------------------------------------------------------------
+// wxArtProvider class
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxArtProvider : public wxObject
+{
+public:
+ // Dtor removes the provider from providers stack if it's still on it
+ virtual ~wxArtProvider();
+
+
+ // Add new provider to the top of providers stack (i.e. the provider will
+ // be queried first of all).
+ static void Push(wxArtProvider *provider);
+
+ // 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.
+ static bool Pop();
+
+ // Remove provider from providers stack but don't delete it.
+ static bool Remove(wxArtProvider *provider);
+
+ // Delete the given provider and remove it from the providers stack.
+ static bool Delete(wxArtProvider *provider);
+
+
+ // Query the providers for bitmap with given ID and return it. Return
+ // wxNullBitmap if no provider provides it.
+ static wxBitmap GetBitmap(const wxArtID& id,
+ const wxArtClient& client = wxART_OTHER,
+ const wxSize& size = wxDefaultSize);
+
+ // Query the providers for icon with given ID and return it. Return
+ // wxNullIcon if no provider provides it.
+ static wxIcon GetIcon(const wxArtID& id,
+ const wxArtClient& client = wxART_OTHER,
+ const wxSize& size = wxDefaultSize);
+
+ // Get the size hint of an icon from a specific wxArtClient, queries
+ // the topmost provider if platform_dependent = false
+ static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // use the corresponding methods without redundant "Provider" suffix
+ wxDEPRECATED( static void PushProvider(wxArtProvider *provider) );
+ wxDEPRECATED( static void InsertProvider(wxArtProvider *provider) );
+ wxDEPRECATED( static bool PopProvider() );
+
+ // use Delete() if this is what you really need, or just delete the
+ // provider pointer, do not use Remove() as it does not delete the pointer
+ // unlike RemoveProvider() which does
+ wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+ friend class wxArtProviderModule;
+ // Initializes default provider
+ static void InitStdProvider();
+ // Initializes platform's native provider, if available (e.g. GTK2)
+ static void InitNativeProvider();
+ // Destroy caches & all providers
+ static void CleanUpProviders();
+
+ // Get the default size of an icon for a specific client
+ virtual wxSize DoGetSizeHint(const wxArtClient& client)
+ {
+ return GetSizeHint(client, true);
+ }
+
+ // Derived classes must override this method to create requested
+ // art resource. This method is called only once per instance's
+ // lifetime for each requested wxArtID.
+ virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id),
+ const wxArtClient& WXUNUSED(client),
+ const wxSize& WXUNUSED(size)) = 0;
+
+private:
+ static void CommonAddingProvider();
+
+private:
+ // list of providers:
+ static wxArtProvidersList *sm_providers;
+ // art resources cache (so that CreateXXX is not called that often):
+ static wxArtProviderCache *sm_cache;
+
+ DECLARE_ABSTRACT_CLASS(wxArtProvider)
+};
+
+
+#endif // _WX_ARTPROV_H_
diff --git a/3rdparty/wxWidgets/include/wx/aui/aui.h b/3rdparty/wxWidgets/include/wx/aui/aui.h
new file mode 100644
index 0000000000..72273dd488
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aui/aui.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/aui/aui.h
+// Purpose: wxaui: wx advanced user interface - docking window manager
+// Author: Benjamin I. Williams
+// Modified by:
+// Created: 2005-05-17
+// 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
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_AUI_H_
+#define _WX_AUI_H_
+
+#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"
+
+#endif // _WX_AUI_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/aui/auibook.h b/3rdparty/wxWidgets/include/wx/aui/auibook.h
new file mode 100644
index 0000000000..0fc290a3c5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aui/auibook.h
@@ -0,0 +1,753 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/aui/auibook.h
+// Purpose: wxaui: wx advanced user interface - notebook
+// Author: Benjamin I. Williams
+// Modified by:
+// Created: 2006-06-28
+// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
+// Licence: wxWindows Library Licence, Version 3.1
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef _WX_AUINOTEBOOK_H_
+#define _WX_AUINOTEBOOK_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_AUI
+
+#include "wx/aui/framemanager.h"
+#include "wx/aui/dockart.h"
+#include "wx/aui/floatpane.h"
+#include "wx/control.h"
+
+
+class wxAuiNotebook;
+
+
+enum wxAuiNotebookOption
+{
+ wxAUI_NB_TOP = 1 << 0,
+ wxAUI_NB_LEFT = 1 << 1, // not implemented yet
+ wxAUI_NB_RIGHT = 1 << 2, // not implemented yet
+ wxAUI_NB_BOTTOM = 1 << 3,
+ wxAUI_NB_TAB_SPLIT = 1 << 4,
+ wxAUI_NB_TAB_MOVE = 1 << 5,
+ wxAUI_NB_TAB_EXTERNAL_MOVE = 1 << 6,
+ wxAUI_NB_TAB_FIXED_WIDTH = 1 << 7,
+ wxAUI_NB_SCROLL_BUTTONS = 1 << 8,
+ wxAUI_NB_WINDOWLIST_BUTTON = 1 << 9,
+ wxAUI_NB_CLOSE_BUTTON = 1 << 10,
+ wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
+ wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
+ wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
+
+ wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
+ wxAUI_NB_TAB_SPLIT |
+ wxAUI_NB_TAB_MOVE |
+ wxAUI_NB_SCROLL_BUTTONS |
+ wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
+ wxAUI_NB_MIDDLE_CLICK_CLOSE
+};
+
+
+
+
+// aui notebook event class
+
+class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxNotifyEvent
+{
+public:
+ wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL,
+ int win_id = 0)
+ : wxNotifyEvent(command_type, win_id)
+ {
+ old_selection = -1;
+ selection = -1;
+ drag_source = NULL;
+ }
+#ifndef SWIG
+ wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxNotifyEvent(c)
+ {
+ old_selection = c.old_selection;
+ selection = c.selection;
+ drag_source = c.drag_source;
+ }
+#endif
+ wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
+
+ void SetSelection(int s) { selection = s; m_commandInt = s; }
+ int GetSelection() const { return selection; }
+
+ void SetOldSelection(int s) { old_selection = s; }
+ int GetOldSelection() const { return old_selection; }
+
+ void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
+ wxAuiNotebook* GetDragSource() const { return drag_source; }
+
+public:
+ int old_selection;
+ int selection;
+ wxAuiNotebook* drag_source;
+
+#ifndef SWIG
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiNotebookEvent)
+#endif
+};
+
+
+class WXDLLIMPEXP_AUI wxAuiNotebookPage
+{
+public:
+ wxWindow* window; // page's associated window
+ wxString caption; // caption displayed on the tab
+ wxBitmap bitmap; // tab's bitmap
+ wxRect rect; // tab's hit rectangle
+ bool active; // true if the page is currently active
+};
+
+class WXDLLIMPEXP_AUI wxAuiTabContainerButton
+{
+public:
+
+ int id; // button's id
+ int cur_state; // current state (normal, hover, pressed, etc.)
+ int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
+ wxBitmap bitmap; // button's hover bitmap
+ wxBitmap dis_bitmap; // button's disabled bitmap
+ wxRect rect; // button's hit rectangle
+};
+
+
+#ifndef SWIG
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiNotebookPage, wxAuiNotebookPageArray, WXDLLIMPEXP_AUI);
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton, wxAuiTabContainerButtonArray, WXDLLIMPEXP_AUI);
+#endif
+
+
+// tab art class
+
+class WXDLLIMPEXP_AUI wxAuiTabArt
+{
+public:
+
+ wxAuiTabArt() { }
+ virtual ~wxAuiTabArt() { }
+
+ virtual wxAuiTabArt* Clone() = 0;
+ virtual void SetFlags(unsigned int flags) = 0;
+
+ virtual void SetSizingInfo(const wxSize& tab_ctrl_size,
+ size_t tab_count) = 0;
+
+ virtual void SetNormalFont(const wxFont& font) = 0;
+ virtual void SetSelectedFont(const wxFont& font) = 0;
+ virtual void SetMeasuringFont(const wxFont& font) = 0;
+
+ virtual void DrawBackground(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect) = 0;
+
+ virtual void DrawTab(wxDC& dc,
+ wxWindow* wnd,
+ const wxAuiNotebookPage& pane,
+ const wxRect& in_rect,
+ int close_button_state,
+ wxRect* out_tab_rect,
+ wxRect* out_button_rect,
+ int* x_extent) = 0;
+
+ virtual void DrawButton(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& in_rect,
+ int bitmap_id,
+ int button_state,
+ int orientation,
+ wxRect* out_rect) = 0;
+
+ virtual wxSize GetTabSize(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxString& caption,
+ const wxBitmap& bitmap,
+ bool active,
+ int close_button_state,
+ int* x_extent) = 0;
+
+ virtual int ShowDropDown(
+ wxWindow* wnd,
+ const wxAuiNotebookPageArray& items,
+ int active_idx) = 0;
+
+ virtual int GetIndentSize() = 0;
+
+ virtual int GetBestTabCtrlSize(
+ wxWindow* wnd,
+ const wxAuiNotebookPageArray& pages,
+ const wxSize& required_bmp_size) = 0;
+};
+
+
+class WXDLLIMPEXP_AUI wxAuiDefaultTabArt : public wxAuiTabArt
+{
+
+public:
+
+ wxAuiDefaultTabArt();
+ virtual ~wxAuiDefaultTabArt();
+
+ wxAuiTabArt* Clone();
+ void SetFlags(unsigned int flags);
+ void SetSizingInfo(const wxSize& tab_ctrl_size,
+ size_t tab_count);
+
+ void SetNormalFont(const wxFont& font);
+ void SetSelectedFont(const wxFont& font);
+ void SetMeasuringFont(const wxFont& font);
+
+ void DrawBackground(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect);
+
+ void DrawTab(wxDC& dc,
+ wxWindow* wnd,
+ const wxAuiNotebookPage& pane,
+ const wxRect& in_rect,
+ int close_button_state,
+ wxRect* out_tab_rect,
+ wxRect* out_button_rect,
+ int* x_extent);
+
+ void DrawButton(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& in_rect,
+ int bitmap_id,
+ int button_state,
+ int orientation,
+ wxRect* out_rect);
+
+ int GetIndentSize();
+
+ wxSize GetTabSize(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxString& caption,
+ const wxBitmap& bitmap,
+ bool active,
+ int close_button_state,
+ int* x_extent);
+
+ int ShowDropDown(
+ wxWindow* wnd,
+ const wxAuiNotebookPageArray& items,
+ int active_idx);
+
+ int GetBestTabCtrlSize(wxWindow* wnd,
+ const wxAuiNotebookPageArray& pages,
+ const wxSize& required_bmp_size);
+
+protected:
+
+ wxFont m_normal_font;
+ wxFont m_selected_font;
+ wxFont m_measuring_font;
+ wxColour m_base_colour;
+ wxPen m_base_colour_pen;
+ wxPen m_border_pen;
+ wxBrush m_base_colour_brush;
+ wxBitmap m_active_close_bmp;
+ wxBitmap m_disabled_close_bmp;
+ wxBitmap m_active_left_bmp;
+ wxBitmap m_disabled_left_bmp;
+ wxBitmap m_active_right_bmp;
+ wxBitmap m_disabled_right_bmp;
+ wxBitmap m_active_windowlist_bmp;
+ wxBitmap m_disabled_windowlist_bmp;
+
+ int m_fixed_tab_width;
+ int m_tab_ctrl_height;
+ unsigned int m_flags;
+};
+
+
+class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt
+{
+
+public:
+
+ wxAuiSimpleTabArt();
+ virtual ~wxAuiSimpleTabArt();
+
+ wxAuiTabArt* Clone();
+ void SetFlags(unsigned int flags);
+
+ void SetSizingInfo(const wxSize& tab_ctrl_size,
+ size_t tab_count);
+
+ void SetNormalFont(const wxFont& font);
+ void SetSelectedFont(const wxFont& font);
+ void SetMeasuringFont(const wxFont& font);
+
+ void DrawBackground(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& rect);
+
+ void DrawTab(wxDC& dc,
+ wxWindow* wnd,
+ const wxAuiNotebookPage& pane,
+ const wxRect& in_rect,
+ int close_button_state,
+ wxRect* out_tab_rect,
+ wxRect* out_button_rect,
+ int* x_extent);
+
+ void DrawButton(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxRect& in_rect,
+ int bitmap_id,
+ int button_state,
+ int orientation,
+ wxRect* out_rect);
+
+ int GetIndentSize();
+
+ wxSize GetTabSize(
+ wxDC& dc,
+ wxWindow* wnd,
+ const wxString& caption,
+ const wxBitmap& bitmap,
+ bool active,
+ int close_button_state,
+ int* x_extent);
+
+ int ShowDropDown(
+ wxWindow* wnd,
+ const wxAuiNotebookPageArray& items,
+ int active_idx);
+
+ int GetBestTabCtrlSize(wxWindow* wnd,
+ const wxAuiNotebookPageArray& pages,
+ const wxSize& required_bmp_size);
+
+protected:
+
+ wxFont m_normal_font;
+ wxFont m_selected_font;
+ wxFont m_measuring_font;
+ wxPen m_normal_bkpen;
+ wxPen m_selected_bkpen;
+ wxBrush m_normal_bkbrush;
+ wxBrush m_selected_bkbrush;
+ wxBrush m_bkbrush;
+ wxBitmap m_active_close_bmp;
+ wxBitmap m_disabled_close_bmp;
+ wxBitmap m_active_left_bmp;
+ wxBitmap m_disabled_left_bmp;
+ wxBitmap m_active_right_bmp;
+ wxBitmap m_disabled_right_bmp;
+ wxBitmap m_active_windowlist_bmp;
+ wxBitmap m_disabled_windowlist_bmp;
+
+ int m_fixed_tab_width;
+ unsigned int m_flags;
+};
+
+
+
+
+
+
+
+
+
+class WXDLLIMPEXP_AUI wxAuiTabContainer
+{
+public:
+
+ wxAuiTabContainer();
+ virtual ~wxAuiTabContainer();
+
+ void SetArtProvider(wxAuiTabArt* art);
+ wxAuiTabArt* GetArtProvider() const;
+
+ void SetFlags(unsigned int flags);
+ unsigned int GetFlags() const;
+
+ bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
+ bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
+ bool MovePage(wxWindow* page, size_t new_idx);
+ bool RemovePage(wxWindow* page);
+ bool SetActivePage(wxWindow* page);
+ bool SetActivePage(size_t page);
+ void SetNoneActive();
+ int GetActivePage() const;
+ bool TabHitTest(int x, int y, wxWindow** hit) const;
+ bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const;
+ wxWindow* GetWindowFromIdx(size_t idx) const;
+ int GetIdxFromWindow(wxWindow* page) const;
+ size_t GetPageCount() const;
+ wxAuiNotebookPage& GetPage(size_t idx);
+ const wxAuiNotebookPage& GetPage(size_t idx) const;
+ wxAuiNotebookPageArray& GetPages();
+ void SetNormalFont(const wxFont& normal_font);
+ void SetSelectedFont(const wxFont& selected_font);
+ void SetMeasuringFont(const wxFont& measuring_font);
+ void DoShowHide();
+ void SetRect(const wxRect& rect);
+
+ void RemoveButton(int id);
+ void AddButton(int id,
+ int location,
+ const wxBitmap& normal_bitmap = wxNullBitmap,
+ const wxBitmap& disabled_bitmap = wxNullBitmap);
+
+ size_t GetTabOffset() const;
+ void SetTabOffset(size_t offset);
+
+ // Is the tab visible?
+ bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd);
+
+ // Make the tab visible if it wasn't already
+ void MakeTabVisible(int tabPage, wxWindow* win);
+
+protected:
+
+ virtual void Render(wxDC* dc, wxWindow* wnd);
+
+protected:
+
+ wxAuiTabArt* m_art;
+ wxAuiNotebookPageArray m_pages;
+ wxAuiTabContainerButtonArray m_buttons;
+ wxAuiTabContainerButtonArray m_tab_close_buttons;
+ wxRect m_rect;
+ size_t m_tab_offset;
+ unsigned int m_flags;
+};
+
+
+
+class WXDLLIMPEXP_AUI wxAuiTabCtrl : public wxControl,
+ public wxAuiTabContainer
+{
+public:
+
+ wxAuiTabCtrl(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0);
+
+ ~wxAuiTabCtrl();
+
+#if wxABI_VERSION >= 20805
+ bool IsDragging() const { return m_is_dragging; }
+#endif
+
+protected:
+
+ void OnPaint(wxPaintEvent& evt);
+ void OnEraseBackground(wxEraseEvent& evt);
+ void OnSize(wxSizeEvent& evt);
+ void OnLeftDown(wxMouseEvent& evt);
+ void OnLeftUp(wxMouseEvent& evt);
+#if wxABI_VERSION >= 20805
+ void OnMiddleDown(wxMouseEvent& evt);
+ void OnMiddleUp(wxMouseEvent& evt);
+ void OnRightDown(wxMouseEvent& evt);
+ void OnRightUp(wxMouseEvent& evt);
+ void OnLeftDClick(wxMouseEvent& evt);
+ 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;
+ wxWindow* m_click_tab;
+ bool m_is_dragging;
+ wxAuiTabContainerButton* m_hover_button;
+ wxAuiTabContainerButton* m_pressed_button;
+
+#ifndef SWIG
+ DECLARE_CLASS(wxAuiTabCtrl)
+ DECLARE_EVENT_TABLE()
+#endif
+};
+
+
+
+
+class WXDLLIMPEXP_AUI wxAuiNotebook : public wxControl
+{
+
+public:
+
+ wxAuiNotebook();
+
+ wxAuiNotebook(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAUI_NB_DEFAULT_STYLE);
+
+ virtual ~wxAuiNotebook();
+
+ bool Create(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0);
+
+ void SetWindowStyleFlag(long style);
+ void SetArtProvider(wxAuiTabArt* art);
+ wxAuiTabArt* GetArtProvider() const;
+
+ virtual void SetUniformBitmapSize(const wxSize& size);
+ virtual void SetTabCtrlHeight(int height);
+
+ bool AddPage(wxWindow* page,
+ const wxString& caption,
+ bool select = false,
+ const wxBitmap& bitmap = wxNullBitmap);
+
+ bool InsertPage(size_t page_idx,
+ wxWindow* page,
+ const wxString& caption,
+ bool select = false,
+ const wxBitmap& bitmap = wxNullBitmap);
+
+ bool DeletePage(size_t page);
+ bool RemovePage(size_t page);
+
+ size_t GetPageCount() const;
+ wxWindow* GetPage(size_t page_idx) const;
+ int GetPageIndex(wxWindow* page_wnd) const;
+
+ bool SetPageText(size_t page, const wxString& text);
+ wxString GetPageText(size_t page_idx) const;
+
+ bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
+ wxBitmap GetPageBitmap(size_t page_idx) const;
+
+ size_t SetSelection(size_t new_page);
+ int GetSelection() const;
+
+ virtual void Split(size_t page, int direction);
+
+#if wxABI_VERSION >= 20801
+ const wxAuiManager& GetAuiManager() const { return m_mgr; }
+#endif
+
+#if wxABI_VERSION >= 20805
+ // Sets the normal font
+ void SetNormalFont(const wxFont& font);
+
+ // Sets the selected tab font
+ void SetSelectedFont(const wxFont& font);
+
+ // Sets the measuring font
+ void SetMeasuringFont(const wxFont& font);
+
+ // Sets the tab font
+ virtual bool SetFont(const wxFont& font);
+
+ // Gets the tab control height
+ int GetTabCtrlHeight() const;
+
+ // Gets the height of the notebook for a given page height
+ int GetHeightForPageHeight(int pageHeight);
+
+ // Advances the selection, generation page selection events
+ void AdvanceSelection(bool forward = true);
+
+ // Shows the window menu
+ bool ShowWindowMenu();
+#endif
+
+protected:
+
+ // these can be overridden
+ virtual void UpdateTabCtrlHeight();
+ virtual int CalculateTabCtrlHeight();
+ virtual wxSize CalculateNewSplitSize();
+
+protected:
+
+ void DoSizing();
+ void InitNotebook(long style);
+ wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
+ wxWindow* GetTabFrameFromTabCtrl(wxWindow* tab_ctrl);
+ wxAuiTabCtrl* GetActiveTabCtrl();
+ bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
+ void RemoveEmptyTabFrames();
+ void UpdateHintWindowSize();
+
+protected:
+
+ void OnChildFocus(wxChildFocusEvent& evt);
+ void OnRender(wxAuiManagerEvent& evt);
+ void OnSize(wxSizeEvent& evt);
+ void OnTabClicked(wxCommandEvent& evt);
+ void OnTabBeginDrag(wxCommandEvent& evt);
+ void OnTabDragMotion(wxCommandEvent& evt);
+ void OnTabEndDrag(wxCommandEvent& evt);
+ void OnTabButton(wxCommandEvent& evt);
+#if wxABI_VERSION >= 20805
+ void OnTabMiddleDown(wxCommandEvent& evt);
+ void OnTabMiddleUp(wxCommandEvent& evt);
+ void OnTabRightDown(wxCommandEvent& evt);
+ void OnTabRightUp(wxCommandEvent& evt);
+ void OnNavigationKey(wxNavigationKeyEvent& event);
+ void OnTabBgDClick(wxCommandEvent& evt);
+#endif
+
+protected:
+
+ wxAuiManager m_mgr;
+ wxAuiTabContainer m_tabs;
+ int m_curpage;
+ int m_tab_id_counter;
+ wxWindow* m_dummy_wnd;
+
+ wxSize m_requested_bmp_size;
+ int m_requested_tabctrl_height;
+ wxFont m_selected_font;
+ wxFont m_normal_font;
+ int m_tab_ctrl_height;
+
+ int m_last_drag_x;
+ unsigned int m_flags;
+
+#ifndef SWIG
+ DECLARE_CLASS(wxAuiNotebook)
+ DECLARE_EVENT_TABLE()
+#endif
+};
+
+
+
+
+// wx event machinery
+
+#ifndef SWIG
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 0)
+#if wxABI_VERSION >= 20805
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 0)
+#endif
+END_DECLARE_EVENT_TYPES()
+
+typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
+
+#define wxAuiNotebookEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiNotebookEventFunction, &func)
+
+#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_BUTTON(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
+
+#if wxABI_VERSION >= 20805
+#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn))
+#define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn))
+#endif
+
+#else
+
+// wxpython/swig event work
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN;
+%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP;
+
+%pythoncode {
+ EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 1 )
+ EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 1 )
+ EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 1 )
+ EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 1 )
+ EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 1 )
+ EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 1 )
+ EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 1 )
+ EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 1 )
+ EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 1 )
+ EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 1 )
+ EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 1 )
+ EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 )
+ EVT_AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP , 1 )
+ EVT_AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 )
+ EVT_AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 1 )
+}
+#endif
+
+
+#endif // wxUSE_AUI
+#endif // _WX_AUINOTEBOOK_H_
diff --git a/3rdparty/wxWidgets/include/wx/aui/dockart.h b/3rdparty/wxWidgets/include/wx/aui/dockart.h
new file mode 100644
index 0000000000..0c5bfe2a6a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aui/dockart.h
@@ -0,0 +1,173 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/aui/dockart.h
+// Purpose: wxaui: wx advanced user interface - docking window manager
+// Author: Benjamin I. Williams
+// Modified by:
+// Created: 2005-05-17
+// RCS-ID: $Id: dockart.h 43154 2006-11-07 10:29:02Z BIW $
+// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
+// Licence: wxWindows Library Licence, Version 3.1
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DOCKART_H_
+#define _WX_DOCKART_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_AUI
+
+#include "wx/pen.h"
+#include "wx/brush.h"
+#include "wx/bitmap.h"
+#include "wx/colour.h"
+
+// dock art provider code - a dock provider provides all drawing
+// functionality to the wxAui dock manager. This allows the dock
+// manager to have plugable look-and-feels
+
+class WXDLLIMPEXP_AUI wxAuiDockArt
+{
+public:
+
+ wxAuiDockArt() { }
+ virtual ~wxAuiDockArt() { }
+
+ virtual int GetMetric(int id) = 0;
+ virtual void SetMetric(int id, int new_val) = 0;
+ virtual void SetFont(int id, const wxFont& font) = 0;
+ virtual wxFont GetFont(int id) = 0;
+ virtual wxColour GetColour(int id) = 0;
+ virtual void SetColour(int id, const wxColor& colour) = 0;
+ wxColour GetColor(int id) { return GetColour(id); }
+ void SetColor(int id, const wxColour& color) { SetColour(id, color); }
+
+ virtual void DrawSash(wxDC& dc,
+ wxWindow* window,
+ int orientation,
+ const wxRect& rect) = 0;
+
+ virtual void DrawBackground(wxDC& dc,
+ wxWindow* window,
+ int orientation,
+ const wxRect& rect) = 0;
+
+ virtual void DrawCaption(wxDC& dc,
+ wxWindow* window,
+ const wxString& text,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane) = 0;
+
+ virtual void DrawGripper(wxDC& dc,
+ wxWindow* window,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane) = 0;
+
+ virtual void DrawBorder(wxDC& dc,
+ wxWindow* window,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane) = 0;
+
+ virtual void DrawPaneButton(wxDC& dc,
+ wxWindow* window,
+ int button,
+ int button_state,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane) = 0;
+};
+
+
+// this is the default art provider for wxAuiManager. Dock art
+// can be customized by creating a class derived from this one,
+// or replacing this class entirely
+
+class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
+{
+public:
+
+ wxAuiDefaultDockArt();
+
+ int GetMetric(int metric_id);
+ void SetMetric(int metric_id, int new_val);
+ wxColour GetColour(int id);
+ void SetColour(int id, const wxColor& colour);
+ void SetFont(int id, const wxFont& font);
+ wxFont GetFont(int id);
+
+ void DrawSash(wxDC& dc,
+ wxWindow *window,
+ int orientation,
+ const wxRect& rect);
+
+ void DrawBackground(wxDC& dc,
+ wxWindow *window,
+ int orientation,
+ const wxRect& rect);
+
+ void DrawCaption(wxDC& dc,
+ wxWindow *window,
+ const wxString& text,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane);
+
+ void DrawGripper(wxDC& dc,
+ wxWindow *window,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane);
+
+ void DrawBorder(wxDC& dc,
+ wxWindow *window,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane);
+
+ void DrawPaneButton(wxDC& dc,
+ wxWindow *window,
+ int button,
+ int button_state,
+ const wxRect& rect,
+ wxAuiPaneInfo& pane);
+
+protected:
+
+ void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
+
+protected:
+
+ wxPen m_border_pen;
+ wxBrush m_sash_brush;
+ wxBrush m_background_brush;
+ wxBrush m_gripper_brush;
+ wxFont m_caption_font;
+ wxBitmap m_inactive_close_bitmap;
+ wxBitmap m_inactive_pin_bitmap;
+ wxBitmap m_inactive_maximize_bitmap;
+ wxBitmap m_inactive_restore_bitmap;
+ wxBitmap m_active_close_bitmap;
+ wxBitmap m_active_pin_bitmap;
+ wxBitmap m_active_maximize_bitmap;
+ wxBitmap m_active_restore_bitmap;
+ wxPen m_gripper_pen1;
+ wxPen m_gripper_pen2;
+ wxPen m_gripper_pen3;
+ wxColour m_base_colour;
+ wxColour m_active_caption_colour;
+ wxColour m_active_caption_gradient_colour;
+ wxColour m_active_caption_text_colour;
+ wxColour m_inactive_caption_colour;
+ wxColour m_inactive_caption_gradient_colour;
+ wxColour m_inactive_caption_text_colour;
+ int m_border_size;
+ int m_caption_size;
+ int m_sash_size;
+ int m_button_size;
+ int m_gripper_size;
+ int m_gradient_type;
+};
+
+
+
+#endif // wxUSE_AUI
+#endif //_WX_DOCKART_H_
diff --git a/3rdparty/wxWidgets/include/wx/aui/floatpane.h b/3rdparty/wxWidgets/include/wx/aui/floatpane.h
new file mode 100644
index 0000000000..7529594771
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aui/floatpane.h
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/aui/floatpane.h
+// Purpose: wxaui: wx advanced user interface - docking window manager
+// Author: Benjamin I. Williams
+// Modified by:
+// Created: 2005-05-17
+// RCS-ID: $Id: floatpane.h 43467 2006-11-17 13:07:01Z BIW $
+// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
+// Licence: wxWindows Library Licence, Version 3.1
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FLOATPANE_H_
+#define _WX_FLOATPANE_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_AUI
+
+#include "wx/frame.h"
+
+#if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
+#include "wx/minifram.h"
+#define wxAuiFloatingFrameBaseClass wxMiniFrame
+#else
+#define wxAuiFloatingFrameBaseClass wxFrame
+#endif
+
+class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
+{
+public:
+ wxAuiFloatingFrame(wxWindow* parent,
+ wxAuiManager* owner_mgr,
+ const wxAuiPaneInfo& pane,
+ wxWindowID id = wxID_ANY,
+ long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
+ wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
+ wxCLIP_CHILDREN
+ );
+ virtual ~wxAuiFloatingFrame();
+ void SetPaneWindow(const wxAuiPaneInfo& pane);
+ wxAuiManager* GetOwnerManager() const;
+
+protected:
+ virtual void OnMoveStart();
+ virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
+ virtual void OnMoveFinished();
+
+private:
+ void OnSize(wxSizeEvent& event);
+ void OnClose(wxCloseEvent& event);
+ void OnMoveEvent(wxMoveEvent& event);
+ void OnIdle(wxIdleEvent& event);
+ void OnActivate(wxActivateEvent& event);
+ static bool isMouseDown();
+
+private:
+ wxWindow* m_pane_window; // pane window being managed
+ bool m_solid_drag; // true if system uses solid window drag
+ bool m_moving;
+ wxRect m_last_rect;
+ wxRect m_last2_rect;
+ wxRect m_last3_rect;
+ wxSize m_last_size;
+ wxDirection m_lastDirection;
+
+ wxAuiManager* m_owner_mgr;
+ wxAuiManager m_mgr;
+
+#ifndef SWIG
+ DECLARE_EVENT_TABLE()
+ DECLARE_CLASS(wxAuiFloatingFrame)
+#endif // SWIG
+};
+
+#endif // wxUSE_AUI
+#endif //_WX_FLOATPANE_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/aui/framemanager.h b/3rdparty/wxWidgets/include/wx/aui/framemanager.h
new file mode 100644
index 0000000000..c267ad233b
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aui/framemanager.h
@@ -0,0 +1,856 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/aui/framemanager.h
+// Purpose: wxaui: wx advanced user interface - docking window manager
+// Author: Benjamin I. Williams
+// Modified by:
+// Created: 2005-05-17
+// 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
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FRAMEMANAGER_H_
+#define _WX_FRAMEMANAGER_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_AUI
+
+#include "wx/dynarray.h"
+#include "wx/gdicmn.h"
+#include "wx/window.h"
+#include "wx/timer.h"
+#include "wx/sizer.h"
+
+enum wxAuiManagerDock
+{
+ wxAUI_DOCK_NONE = 0,
+ wxAUI_DOCK_TOP = 1,
+ wxAUI_DOCK_RIGHT = 2,
+ wxAUI_DOCK_BOTTOM = 3,
+ wxAUI_DOCK_LEFT = 4,
+ wxAUI_DOCK_CENTER = 5,
+ wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
+};
+
+enum wxAuiManagerOption
+{
+ wxAUI_MGR_ALLOW_FLOATING = 1 << 0,
+ wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1,
+ wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2,
+ wxAUI_MGR_TRANSPARENT_HINT = 1 << 3,
+ wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4,
+ 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 |
+ wxAUI_MGR_HINT_FADE |
+ wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
+};
+
+
+enum wxAuiPaneDockArtSetting
+{
+ wxAUI_DOCKART_SASH_SIZE = 0,
+ wxAUI_DOCKART_CAPTION_SIZE = 1,
+ wxAUI_DOCKART_GRIPPER_SIZE = 2,
+ wxAUI_DOCKART_PANE_BORDER_SIZE = 3,
+ wxAUI_DOCKART_PANE_BUTTON_SIZE = 4,
+ wxAUI_DOCKART_BACKGROUND_COLOUR = 5,
+ wxAUI_DOCKART_SASH_COLOUR = 6,
+ wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7,
+ wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8,
+ wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9,
+ wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10,
+ wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11,
+ wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12,
+ wxAUI_DOCKART_BORDER_COLOUR = 13,
+ wxAUI_DOCKART_GRIPPER_COLOUR = 14,
+ wxAUI_DOCKART_CAPTION_FONT = 15,
+ wxAUI_DOCKART_GRADIENT_TYPE = 16
+};
+
+enum wxAuiPaneDockArtGradients
+{
+ wxAUI_GRADIENT_NONE = 0,
+ wxAUI_GRADIENT_VERTICAL = 1,
+ wxAUI_GRADIENT_HORIZONTAL = 2
+};
+
+enum wxAuiPaneButtonState
+{
+ wxAUI_BUTTON_STATE_NORMAL = 0,
+ wxAUI_BUTTON_STATE_HOVER = 1 << 1,
+ wxAUI_BUTTON_STATE_PRESSED = 1 << 2,
+ wxAUI_BUTTON_STATE_DISABLED = 1 << 3,
+ wxAUI_BUTTON_STATE_HIDDEN = 1 << 4,
+ wxAUI_BUTTON_STATE_CHECKED = 1 << 5
+};
+
+enum wxAuiButtonId
+{
+ wxAUI_BUTTON_CLOSE = 101,
+ wxAUI_BUTTON_MAXIMIZE_RESTORE = 102,
+ wxAUI_BUTTON_MINIMIZE = 103,
+ wxAUI_BUTTON_PIN = 104,
+ wxAUI_BUTTON_OPTIONS = 105,
+ wxAUI_BUTTON_WINDOWLIST = 106,
+ wxAUI_BUTTON_LEFT = 107,
+ wxAUI_BUTTON_RIGHT = 108,
+ wxAUI_BUTTON_UP = 109,
+ wxAUI_BUTTON_DOWN = 110,
+ wxAUI_BUTTON_CUSTOM1 = 201,
+ wxAUI_BUTTON_CUSTOM2 = 202,
+ wxAUI_BUTTON_CUSTOM3 = 203
+};
+
+enum wxAuiPaneInsertLevel
+{
+ wxAUI_INSERT_PANE = 0,
+ wxAUI_INSERT_ROW = 1,
+ wxAUI_INSERT_DOCK = 2
+};
+
+
+
+
+// forwards and array declarations
+class wxAuiDockUIPart;
+class wxAuiPaneButton;
+class wxAuiPaneInfo;
+class wxAuiDockInfo;
+class wxAuiDockArt;
+class wxAuiManagerEvent;
+
+#ifndef SWIG
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockInfo, wxAuiDockInfoArray, WXDLLIMPEXP_AUI);
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockUIPart, wxAuiDockUIPartArray, WXDLLIMPEXP_AUI);
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneButton, wxAuiPaneButtonArray, WXDLLIMPEXP_AUI);
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneInfo, wxAuiPaneInfoArray, WXDLLIMPEXP_AUI);
+WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiPaneInfo*, wxAuiPaneInfoPtrArray, class WXDLLIMPEXP_AUI);
+WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiDockInfo*, wxAuiDockInfoPtrArray, class WXDLLIMPEXP_AUI);
+#endif // SWIG
+
+extern WXDLLIMPEXP_AUI wxAuiDockInfo wxAuiNullDockInfo;
+extern WXDLLIMPEXP_AUI wxAuiPaneInfo wxAuiNullPaneInfo;
+
+
+
+class WXDLLIMPEXP_AUI wxAuiPaneInfo
+{
+public:
+
+ wxAuiPaneInfo()
+ {
+ window = NULL;
+ frame = NULL;
+ state = 0;
+ dock_direction = wxAUI_DOCK_LEFT;
+ dock_layer = 0;
+ dock_row = 0;
+ dock_pos = 0;
+ floating_pos = wxDefaultPosition;
+ floating_size = wxDefaultSize;
+ best_size = wxDefaultSize;
+ min_size = wxDefaultSize;
+ max_size = wxDefaultSize;
+ dock_proportion = 0;
+
+ DefaultPane();
+ }
+
+ ~wxAuiPaneInfo() {}
+
+#ifndef SWIG
+ wxAuiPaneInfo(const wxAuiPaneInfo& c)
+ {
+ name = c.name;
+ caption = c.caption;
+ window = c.window;
+ frame = c.frame;
+ state = c.state;
+ dock_direction = c.dock_direction;
+ dock_layer = c.dock_layer;
+ dock_row = c.dock_row;
+ dock_pos = c.dock_pos;
+ best_size = c.best_size;
+ min_size = c.min_size;
+ max_size = c.max_size;
+ floating_pos = c.floating_pos;
+ floating_size = c.floating_size;
+ dock_proportion = c.dock_proportion;
+ buttons = c.buttons;
+ rect = c.rect;
+ }
+
+ wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c)
+ {
+ name = c.name;
+ caption = c.caption;
+ window = c.window;
+ frame = c.frame;
+ state = c.state;
+ dock_direction = c.dock_direction;
+ dock_layer = c.dock_layer;
+ dock_row = c.dock_row;
+ dock_pos = c.dock_pos;
+ best_size = c.best_size;
+ min_size = c.min_size;
+ max_size = c.max_size;
+ floating_pos = c.floating_pos;
+ floating_size = c.floating_size;
+ dock_proportion = c.dock_proportion;
+ buttons = c.buttons;
+ rect = c.rect;
+ return *this;
+ }
+#endif // SWIG
+
+ // Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
+ // used on loading perspectives etc.
+ void SafeSet(wxAuiPaneInfo source)
+ {
+ // note source is not passed by reference so we can overwrite, to keep the
+ // unsafe bits of "dest"
+ source.window = window;
+ source.frame = frame;
+ source.buttons = buttons;
+ // now assign
+ *this = source;
+ }
+
+ bool IsOk() const { return (window != NULL) ? true : false; }
+ bool IsFixed() const { return !HasFlag(optionResizable); }
+ bool IsResizable() const { return HasFlag(optionResizable); }
+ bool IsShown() const { return !HasFlag(optionHidden); }
+ bool IsFloating() const { return HasFlag(optionFloating); }
+ bool IsDocked() const { return !HasFlag(optionFloating); }
+ bool IsToolbar() const { return HasFlag(optionToolbar); }
+ bool IsTopDockable() const { return HasFlag(optionTopDockable); }
+ bool IsBottomDockable() const { return HasFlag(optionBottomDockable); }
+ bool IsLeftDockable() const { return HasFlag(optionLeftDockable); }
+ bool IsRightDockable() const { return HasFlag(optionRightDockable); }
+ bool IsFloatable() const { return HasFlag(optionFloatable); }
+ bool IsMovable() const { return HasFlag(optionMovable); }
+ bool IsDestroyOnClose() const { return HasFlag(optionDestroyOnClose); }
+ bool IsMaximized() const { return HasFlag(optionMaximized); }
+ bool HasCaption() const { return HasFlag(optionCaption); }
+ bool HasGripper() const { return HasFlag(optionGripper); }
+ bool HasBorder() const { return HasFlag(optionPaneBorder); }
+ bool HasCloseButton() const { return HasFlag(buttonClose); }
+ bool HasMaximizeButton() const { return HasFlag(buttonMaximize); }
+ bool HasMinimizeButton() const { return HasFlag(buttonMinimize); }
+ bool HasPinButton() const { return HasFlag(buttonPin); }
+ bool HasGripperTop() const { return HasFlag(optionGripperTop); }
+
+#ifdef SWIG
+ %typemap(out) wxAuiPaneInfo& { $result = $self; Py_INCREF($result); }
+#endif
+ wxAuiPaneInfo& Window(wxWindow* w) { window = w; return *this; }
+ wxAuiPaneInfo& Name(const wxString& n) { name = n; return *this; }
+ wxAuiPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
+ wxAuiPaneInfo& Left() { dock_direction = wxAUI_DOCK_LEFT; return *this; }
+ wxAuiPaneInfo& Right() { dock_direction = wxAUI_DOCK_RIGHT; return *this; }
+ wxAuiPaneInfo& Top() { dock_direction = wxAUI_DOCK_TOP; return *this; }
+ wxAuiPaneInfo& Bottom() { dock_direction = wxAUI_DOCK_BOTTOM; return *this; }
+ wxAuiPaneInfo& Center() { dock_direction = wxAUI_DOCK_CENTER; return *this; }
+ wxAuiPaneInfo& Centre() { dock_direction = wxAUI_DOCK_CENTRE; return *this; }
+ wxAuiPaneInfo& Direction(int direction) { dock_direction = direction; return *this; }
+ wxAuiPaneInfo& Layer(int layer) { dock_layer = layer; return *this; }
+ wxAuiPaneInfo& Row(int row) { dock_row = row; return *this; }
+ wxAuiPaneInfo& Position(int pos) { dock_pos = pos; return *this; }
+ wxAuiPaneInfo& BestSize(const wxSize& size) { best_size = size; return *this; }
+ wxAuiPaneInfo& MinSize(const wxSize& size) { min_size = size; return *this; }
+ wxAuiPaneInfo& MaxSize(const wxSize& size) { max_size = size; return *this; }
+ wxAuiPaneInfo& BestSize(int x, int y) { best_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& MinSize(int x, int y) { min_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& MaxSize(int x, int y) { max_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& FloatingPosition(const wxPoint& pos) { floating_pos = pos; return *this; }
+ wxAuiPaneInfo& FloatingPosition(int x, int y) { floating_pos.x = x; floating_pos.y = y; return *this; }
+ wxAuiPaneInfo& FloatingSize(const wxSize& size) { floating_size = size; return *this; }
+ wxAuiPaneInfo& FloatingSize(int x, int y) { floating_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& Fixed() { return SetFlag(optionResizable, false); }
+ wxAuiPaneInfo& Resizable(bool resizable = true) { return SetFlag(optionResizable, resizable); }
+ wxAuiPaneInfo& Dock() { return SetFlag(optionFloating, false); }
+ wxAuiPaneInfo& Float() { return SetFlag(optionFloating, true); }
+ wxAuiPaneInfo& Hide() { return SetFlag(optionHidden, true); }
+ wxAuiPaneInfo& Show(bool show = true) { return SetFlag(optionHidden, !show); }
+ wxAuiPaneInfo& CaptionVisible(bool visible = true) { return SetFlag(optionCaption, visible); }
+ wxAuiPaneInfo& Maximize() { return SetFlag(optionMaximized, true); }
+ wxAuiPaneInfo& Restore() { return SetFlag(optionMaximized, false); }
+ wxAuiPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); }
+ wxAuiPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); }
+ wxAuiPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); }
+ wxAuiPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); }
+ wxAuiPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); }
+ wxAuiPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); }
+ wxAuiPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); }
+ wxAuiPaneInfo& DestroyOnClose(bool b = true) { return SetFlag(optionDestroyOnClose, b); }
+ wxAuiPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); }
+ wxAuiPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); }
+ wxAuiPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); }
+ wxAuiPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); }
+ wxAuiPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); }
+ wxAuiPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); }
+#if wxABI_VERSION >= 20807
+ wxAuiPaneInfo& DockFixed(bool b = true) { return SetFlag(optionDockFixed, b); }
+#endif
+
+ wxAuiPaneInfo& Dockable(bool b = true)
+ {
+ return TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b);
+ }
+
+ wxAuiPaneInfo& DefaultPane()
+ {
+ state |= optionTopDockable | optionBottomDockable |
+ optionLeftDockable | optionRightDockable |
+ optionFloatable | optionMovable | optionResizable |
+ optionCaption | optionPaneBorder | buttonClose;
+ return *this;
+ }
+
+ wxAuiPaneInfo& CentrePane() { return CenterPane(); }
+ wxAuiPaneInfo& CenterPane()
+ {
+ state = 0;
+ return Center().PaneBorder().Resizable();
+ }
+
+ wxAuiPaneInfo& ToolbarPane()
+ {
+ DefaultPane();
+ state |= (optionToolbar | optionGripper);
+ state &= ~(optionResizable | optionCaption);
+ if (dock_layer == 0)
+ dock_layer = 10;
+ return *this;
+ }
+
+ wxAuiPaneInfo& SetFlag(unsigned int flag, bool option_state)
+ {
+ if (option_state)
+ state |= flag;
+ else
+ state &= ~flag;
+ return *this;
+ }
+
+ bool HasFlag(unsigned int flag) const
+ {
+ return (state & flag) ? true:false;
+ }
+
+#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
+ // perspective string. If you really need to change the
+ // values around, you'll have to ensure backwards-compatibility
+ // in the perspective loading code.
+ enum wxAuiPaneState
+ {
+ optionFloating = 1 << 0,
+ optionHidden = 1 << 1,
+ optionLeftDockable = 1 << 2,
+ optionRightDockable = 1 << 3,
+ optionTopDockable = 1 << 4,
+ optionBottomDockable = 1 << 5,
+ optionFloatable = 1 << 6,
+ optionMovable = 1 << 7,
+ optionResizable = 1 << 8,
+ optionPaneBorder = 1 << 9,
+ optionCaption = 1 << 10,
+ optionGripper = 1 << 11,
+ optionDestroyOnClose = 1 << 12,
+ optionToolbar = 1 << 13,
+ optionActive = 1 << 14,
+ optionGripperTop = 1 << 15,
+ optionMaximized = 1 << 16,
+ optionDockFixed = 1 << 17,
+
+ buttonClose = 1 << 21,
+ 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
+ };
+
+public:
+ wxString name; // name of the pane
+ wxString caption; // caption displayed on the window
+
+ wxWindow* window; // window that is in this pane
+ wxFrame* frame; // floating frame window that holds the pane
+ unsigned int state; // a combination of wxPaneState values
+
+ int dock_direction; // dock direction (top, bottom, left, right, center)
+ int dock_layer; // layer number (0 = innermost layer)
+ int dock_row; // row number on the docking bar (0 = first row)
+ int dock_pos; // position inside the row (0 = first position)
+
+ wxSize best_size; // size that the layout engine will prefer
+ wxSize min_size; // minimum size the pane window can tolerate
+ wxSize max_size; // maximum size the pane window can tolerate
+
+ wxPoint floating_pos; // position while floating
+ wxSize floating_size; // size while floating
+ int dock_proportion; // proportion while docked
+
+ wxAuiPaneButtonArray buttons; // buttons on the pane
+
+ wxRect rect; // current rectangle (populated by wxAUI)
+};
+
+
+
+class WXDLLIMPEXP_FWD_AUI wxAuiFloatingFrame;
+
+class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
+{
+friend class wxAuiFloatingFrame;
+
+public:
+
+ wxAuiManager(wxWindow* managed_wnd = NULL,
+ unsigned int flags = wxAUI_MGR_DEFAULT);
+ virtual ~wxAuiManager();
+ void UnInit();
+
+ void SetFlags(unsigned int flags);
+ unsigned int GetFlags() const;
+
+ void SetManagedWindow(wxWindow* managed_wnd);
+ wxWindow* GetManagedWindow() const;
+
+ static wxAuiManager* GetManager(wxWindow* window);
+
+ void SetArtProvider(wxAuiDockArt* art_provider);
+ wxAuiDockArt* GetArtProvider() const;
+
+ wxAuiPaneInfo& GetPane(wxWindow* window);
+ wxAuiPaneInfo& GetPane(const wxString& name);
+ wxAuiPaneInfoArray& GetAllPanes();
+
+ bool AddPane(wxWindow* window,
+ const wxAuiPaneInfo& pane_info);
+
+ bool AddPane(wxWindow* window,
+ const wxAuiPaneInfo& pane_info,
+ const wxPoint& drop_pos);
+
+ bool AddPane(wxWindow* window,
+ int direction = wxLEFT,
+ const wxString& caption = wxEmptyString);
+
+ bool InsertPane(wxWindow* window,
+ const wxAuiPaneInfo& insert_location,
+ int insert_level = wxAUI_INSERT_PANE);
+
+ bool DetachPane(wxWindow* window);
+
+ void Update();
+
+ wxString SavePaneInfo(wxAuiPaneInfo& pane);
+ void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
+ wxString SavePerspective();
+ bool LoadPerspective(const wxString& perspective, bool update = true);
+
+ 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);
+ void RestoreMaximizedPane();
+
+public:
+
+ virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p);
+
+ void StartPaneDrag(
+ wxWindow* pane_window,
+ const wxPoint& offset);
+
+ wxRect CalculateHintRect(
+ 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();
+
+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,
+ wxAuiDockInfo& dock,
+ wxAuiPaneInfo& pane,
+ wxAuiDockUIPartArray& uiparts,
+ bool spacer_only);
+
+ void LayoutAddDock(wxSizer* container,
+ wxAuiDockInfo& dock,
+ wxAuiDockUIPartArray& uiparts,
+ bool spacer_only);
+
+ wxSizer* LayoutAll(wxAuiPaneInfoArray& panes,
+ wxAuiDockInfoArray& docks,
+ wxAuiDockUIPartArray& uiparts,
+ bool spacer_only = false);
+
+ virtual bool ProcessDockResult(wxAuiPaneInfo& target,
+ const wxAuiPaneInfo& new_pos);
+
+ bool DoDrop(wxAuiDockInfoArray& docks,
+ wxAuiPaneInfoArray& panes,
+ wxAuiPaneInfo& drop,
+ const wxPoint& pt,
+ const wxPoint& action_offset = wxPoint(0,0));
+
+ wxAuiDockUIPart* HitTest(int x, int y);
+ wxAuiDockUIPart* GetPanePart(wxWindow* pane);
+ int GetDockPixelOffset(wxAuiPaneInfo& test);
+ void OnFloatingPaneMoveStart(wxWindow* window);
+ void OnFloatingPaneMoving(wxWindow* window, wxDirection dir );
+ void OnFloatingPaneMoved(wxWindow* window, wxDirection dir);
+ void OnFloatingPaneActivated(wxWindow* window);
+ void OnFloatingPaneClosed(wxWindow* window, wxCloseEvent& evt);
+ void OnFloatingPaneResized(wxWindow* window, const wxSize& size);
+ void Render(wxDC* dc);
+ void Repaint(wxDC* dc = NULL);
+ void ProcessMgrEvent(wxAuiManagerEvent& event);
+ void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
+ const wxMouseEvent& event);
+ void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
+ 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:
+
+ // public events (which can be invoked externally)
+ void OnRender(wxAuiManagerEvent& evt);
+ void OnPaneButton(wxAuiManagerEvent& evt);
+
+protected:
+
+ // protected events
+ void OnPaint(wxPaintEvent& evt);
+ void OnEraseBackground(wxEraseEvent& evt);
+ void OnSize(wxSizeEvent& evt);
+ void OnSetCursor(wxSetCursorEvent& evt);
+ void OnLeftDown(wxMouseEvent& evt);
+ void OnLeftUp(wxMouseEvent& evt);
+ void OnMotion(wxMouseEvent& evt);
+ void OnLeaveWindow(wxMouseEvent& evt);
+ void OnChildFocus(wxChildFocusEvent& evt);
+ void OnHintFadeTimer(wxTimerEvent& evt);
+ void OnFindManager(wxAuiManagerEvent& evt);
+
+protected:
+
+ enum
+ {
+ actionNone = 0,
+ actionResize,
+ actionClickButton,
+ actionClickCaption,
+ actionDragToolbarPane,
+ actionDragFloatingPane
+ };
+
+protected:
+
+ wxWindow* m_frame; // the window being managed
+ wxAuiDockArt* m_art; // dock art object which does all drawing
+ unsigned int m_flags; // manager flags wxAUI_MGR_*
+
+ wxAuiPaneInfoArray m_panes; // array of panes structures
+ wxAuiDockInfoArray m_docks; // array of docks structures
+ wxAuiDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc)
+
+ int m_action; // current mouse action
+ wxPoint m_action_start; // position where the action click started
+ wxPoint m_action_offset; // offset from upper left of the item clicked
+ wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
+ wxWindow* m_action_window; // action frame or window (NULL if none)
+ wxRect m_action_hintrect; // hint rectangle for the action
+ wxRect m_last_rect;
+ wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
+ wxRect m_last_hint; // last hint rectangle
+ wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
+ bool m_skipping;
+ bool m_has_maximized;
+
+ double m_dock_constraint_x; // 0.0 .. 1.0; max pct of window width a dock can consume
+ double m_dock_constraint_y; // 0.0 .. 1.0; max pct of window height a dock can consume
+
+ wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
+ 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
+ DECLARE_EVENT_TABLE()
+ DECLARE_CLASS(wxAuiManager)
+#endif // SWIG
+};
+
+
+
+// event declarations/classes
+
+class WXDLLIMPEXP_AUI wxAuiManagerEvent : public wxEvent
+{
+public:
+ wxAuiManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type)
+ {
+ manager = NULL;
+ pane = NULL;
+ button = 0;
+ veto_flag = false;
+ canveto_flag = true;
+ dc = NULL;
+ }
+#ifndef SWIG
+ wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c)
+ {
+ manager = c.manager;
+ pane = c.pane;
+ button = c.button;
+ veto_flag = c.veto_flag;
+ canveto_flag = c.canveto_flag;
+ dc = c.dc;
+ }
+#endif
+ wxEvent *Clone() const { return new wxAuiManagerEvent(*this); }
+
+ void SetManager(wxAuiManager* mgr) { manager = mgr; }
+ 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;
+ int button;
+ bool veto_flag;
+ bool canveto_flag;
+ wxDC* dc;
+
+#ifndef SWIG
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiManagerEvent)
+#endif
+};
+
+
+class WXDLLIMPEXP_AUI wxAuiDockInfo
+{
+public:
+ wxAuiDockInfo()
+ {
+ dock_direction = 0;
+ dock_layer = 0;
+ dock_row = 0;
+ size = 0;
+ min_size = 0;
+ resizable = true;
+ fixed = false;
+ toolbar = false;
+ reserved1 = false;
+ }
+
+#ifndef SWIG
+ wxAuiDockInfo(const wxAuiDockInfo& c)
+ {
+ dock_direction = c.dock_direction;
+ dock_layer = c.dock_layer;
+ dock_row = c.dock_row;
+ size = c.size;
+ min_size = c.min_size;
+ resizable = c.resizable;
+ fixed = c.fixed;
+ toolbar = c.toolbar;
+ panes = c.panes;
+ rect = c.rect;
+ reserved1 = c.reserved1;
+ }
+
+ wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
+ {
+ dock_direction = c.dock_direction;
+ dock_layer = c.dock_layer;
+ dock_row = c.dock_row;
+ size = c.size;
+ min_size = c.min_size;
+ resizable = c.resizable;
+ fixed = c.fixed;
+ toolbar = c.toolbar;
+ panes = c.panes;
+ rect = c.rect;
+ reserved1 = c.reserved1;
+ return *this;
+ }
+#endif // SWIG
+
+ bool IsOk() const { return (dock_direction != 0) ? true : false; }
+ bool IsHorizontal() const { return (dock_direction == wxAUI_DOCK_TOP ||
+ dock_direction == wxAUI_DOCK_BOTTOM) ? true:false; }
+ bool IsVertical() const { return (dock_direction == wxAUI_DOCK_LEFT ||
+ dock_direction == wxAUI_DOCK_RIGHT ||
+ dock_direction == wxAUI_DOCK_CENTER) ? true:false; }
+public:
+ wxAuiPaneInfoPtrArray panes; // array of panes
+ wxRect rect; // current rectangle
+ int dock_direction; // dock direction (top, bottom, left, right, center)
+ int dock_layer; // layer number (0 = innermost layer)
+ int dock_row; // row number on the docking bar (0 = first row)
+ int size; // size of the dock
+ int min_size; // minimum size of a dock (0 if there is no min)
+ bool resizable; // flag indicating whether the dock is resizable
+ bool toolbar; // flag indicating dock contains only toolbars
+ bool fixed; // flag indicating that the dock operates on
+ // absolute coordinates as opposed to proportional
+ bool reserved1;
+};
+
+
+class WXDLLIMPEXP_AUI wxAuiDockUIPart
+{
+public:
+ enum
+ {
+ typeCaption,
+ typeGripper,
+ typeDock,
+ typeDockSizer,
+ typePane,
+ typePaneSizer,
+ typeBackground,
+ typePaneBorder,
+ typePaneButton
+ };
+
+ int type; // ui part type (see enum above)
+ int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL)
+ wxAuiDockInfo* dock; // which dock the item is associated with
+ wxAuiPaneInfo* pane; // which pane the item is associated with
+ wxAuiPaneButton* button; // which pane button the item is associated with
+ wxSizer* cont_sizer; // the part's containing sizer
+ wxSizerItem* sizer_item; // the sizer item of the part
+ wxRect rect; // client coord rectangle of the part itself
+};
+
+
+class WXDLLIMPEXP_AUI wxAuiPaneButton
+{
+public:
+ int button_id; // id of the button (e.g. buttonClose)
+};
+
+
+
+#ifndef SWIG
+// wx event machinery
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_BUTTON, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, 0)
+END_DECLARE_EVENT_TYPES()
+
+typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
+
+#define wxAuiManagerEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiManagerEventFunction, &func)
+
+#define EVT_AUI_PANE_BUTTON(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_BUTTON, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_CLOSE(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_MAXIMIZE(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_RESTORE(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func))
+#define EVT_AUI_RENDER(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
+#define EVT_AUI_FIND_MANAGER(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_FIND_MANAGER, wxAuiManagerEventHandler(func))
+
+#else
+
+%constant wxEventType wxEVT_AUI_PANE_BUTTON;
+%constant wxEventType wxEVT_AUI_PANE_CLOSE;
+%constant wxEventType wxEVT_AUI_PANE_MAXIMIZE;
+%constant wxEventType wxEVT_AUI_PANE_RESTORE;
+%constant wxEventType wxEVT_AUI_RENDER;
+%constant wxEventType wxEVT_AUI_FIND_MANAGER;
+
+%pythoncode {
+ EVT_AUI_PANE_BUTTON = wx.PyEventBinder( wxEVT_AUI_PANE_BUTTON )
+ EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE )
+ EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE )
+ EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE )
+ EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
+ EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER )
+}
+#endif // SWIG
+
+#endif // wxUSE_AUI
+#endif //_WX_FRAMEMANAGER_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/aui/tabmdi.h b/3rdparty/wxWidgets/include/wx/aui/tabmdi.h
new file mode 100644
index 0000000000..6fa7ac095a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/aui/tabmdi.h
@@ -0,0 +1,269 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/tabmdi.h
+// Purpose: Generic MDI (Multiple Document Interface) classes
+// Author: Hans Van Leemputten
+// Modified by: Benjamin I. Williams / Kirix Corporation
+// Created: 29/07/2002
+// RCS-ID: $Id: tabmdi.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Hans Van Leemputten
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_AUITABMDI_H_
+#define _WX_AUITABMDI_H_
+
+#if wxUSE_AUI
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/frame.h"
+#include "wx/panel.h"
+#include "wx/notebook.h"
+#include "wx/icon.h"
+#include "wx/aui/auibook.h"
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame;
+class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow;
+class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame;
+
+//-----------------------------------------------------------------------------
+// wxAuiMDIParentFrame
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame
+{
+public:
+ wxAuiMDIParentFrame();
+ wxAuiMDIParentFrame(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr);
+
+ ~wxAuiMDIParentFrame();
+
+ bool Create(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr );
+
+ void SetArtProvider(wxAuiTabArt* provider);
+ wxAuiTabArt* GetArtProvider();
+ wxAuiNotebook* GetNotebook() const;
+
+#if wxUSE_MENUS
+ wxMenu* GetWindowMenu() const { return m_pWindowMenu; }
+ void SetWindowMenu(wxMenu* pMenu);
+
+ virtual void SetMenuBar(wxMenuBar *pMenuBar);
+#endif // wxUSE_MENUS
+
+ void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
+
+ virtual bool ProcessEvent(wxEvent& event);
+
+ wxAuiMDIChildFrame *GetActiveChild() const;
+ void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
+
+ wxAuiMDIClientWindow *GetClientWindow() const;
+ virtual wxAuiMDIClientWindow *OnCreateClient();
+
+ virtual void Cascade() { /* Has no effect */ }
+ virtual void Tile(wxOrientation orient = wxHORIZONTAL);
+ virtual void ArrangeIcons() { /* Has no effect */ }
+ virtual void ActivateNext();
+ virtual void ActivatePrevious();
+
+protected:
+ wxAuiMDIClientWindow* m_pClientWindow;
+ wxAuiMDIChildFrame* m_pActiveChild;
+ wxEvent* m_pLastEvt;
+
+#if wxUSE_MENUS
+ wxMenu *m_pWindowMenu;
+ wxMenuBar *m_pMyMenuBar;
+#endif // wxUSE_MENUS
+
+protected:
+ void Init();
+
+#if wxUSE_MENUS
+ void RemoveWindowMenu(wxMenuBar *pMenuBar);
+ void AddWindowMenu(wxMenuBar *pMenuBar);
+
+ void DoHandleMenu(wxCommandEvent &event);
+#endif // wxUSE_MENUS
+
+ virtual void DoGetClientSize(int *width, int *height) const;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame)
+};
+
+//-----------------------------------------------------------------------------
+// wxAuiMDIChildFrame
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel
+{
+public:
+ wxAuiMDIChildFrame();
+ wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+ virtual ~wxAuiMDIChildFrame();
+ bool Create(wxAuiMDIParentFrame *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+#if wxUSE_MENUS
+ virtual void SetMenuBar(wxMenuBar *menu_bar);
+ virtual wxMenuBar *GetMenuBar() const;
+#endif // wxUSE_MENUS
+
+ virtual void SetTitle(const wxString& title);
+ virtual wxString GetTitle() const;
+
+ virtual void SetIcons(const wxIconBundle& icons);
+ virtual const wxIconBundle& GetIcons() const;
+
+ virtual void SetIcon(const wxIcon& icon);
+ virtual const wxIcon& GetIcon() const;
+
+ virtual void Activate();
+ virtual bool Destroy();
+
+#if wxUSE_STATUSBAR
+ // no status bars
+ virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1,
+ long WXUNUSED(style) = 1,
+ wxWindowID WXUNUSED(winid) = 1,
+ const wxString& WXUNUSED(name) = wxEmptyString)
+ { return (wxStatusBar*)NULL; }
+
+ virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
+ virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
+ virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
+#endif
+
+ // no size hints
+ virtual void DoSetSizeHints(int WXUNUSED(minW),
+ int WXUNUSED(minH),
+ int WXUNUSED(maxW) = wxDefaultCoord,
+ int WXUNUSED(maxH) = wxDefaultCoord,
+ int WXUNUSED(incW) = wxDefaultCoord,
+ int WXUNUSED(incH) = wxDefaultCoord) {}
+#if wxUSE_TOOLBAR
+ // no toolbar bars
+ virtual wxToolBar* CreateToolBar(long WXUNUSED(style),
+ wxWindowID WXUNUSED(winid),
+ const wxString& WXUNUSED(name))
+ { return (wxToolBar*)NULL; }
+ virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
+#endif
+
+
+ // no maximize etc
+ virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ }
+ virtual void Restore() { /* Has no effect */ }
+ virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ }
+ virtual bool IsMaximized() const { return true; }
+ virtual bool IsIconized() const { return false; }
+ virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; }
+ virtual bool IsFullScreen() const { return false; }
+
+ virtual bool IsTopLevel() const { return false; }
+
+ void OnMenuHighlight(wxMenuEvent& evt);
+ void OnActivate(wxActivateEvent& evt);
+ void OnCloseWindow(wxCloseEvent& evt);
+
+ void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
+ wxAuiMDIParentFrame* GetMDIParentFrame() const;
+
+protected:
+ void Init();
+ virtual bool Show(bool show = true);
+ virtual void DoSetSize(int x, int y, int width, int height, int size_flags);
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
+public:
+ // This function needs to be called when a size change is confirmed,
+ // we needed this function to prevent anybody from the outside
+ // changing the panel... it messes the UI layout when we would allow it.
+ void ApplyMDIChildFrameRect();
+ void DoShow(bool show);
+
+protected:
+ wxAuiMDIParentFrame* m_pMDIParentFrame;
+ wxRect m_mdi_newrect;
+ wxRect m_mdi_currect;
+ wxString m_title;
+ wxIcon m_icon;
+ wxIconBundle m_icon_bundle;
+ bool m_activate_on_create;
+
+#if wxUSE_MENUS
+ wxMenuBar* m_pMenuBar;
+#endif // wxUSE_MENUS
+
+
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame)
+ DECLARE_EVENT_TABLE()
+
+ friend class wxAuiMDIClientWindow;
+};
+
+//-----------------------------------------------------------------------------
+// wxAuiMDIClientWindow
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
+{
+public:
+ wxAuiMDIClientWindow();
+ wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
+ ~wxAuiMDIClientWindow();
+
+ virtual bool CreateClient(wxAuiMDIParentFrame *parent,
+ long style = wxVSCROLL | wxHSCROLL);
+
+ virtual int SetSelection(size_t page);
+
+protected:
+
+ void PageChanged(int old_selection, int new_selection);
+ void OnPageClose(wxAuiNotebookEvent& evt);
+ void OnPageChanged(wxAuiNotebookEvent& evt);
+ void OnSize(wxSizeEvent& evt);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow)
+ DECLARE_EVENT_TABLE()
+};
+#endif // wxUSE_AUI
+
+#endif // _WX_AUITABMDI_H_
diff --git a/3rdparty/wxWidgets/include/wx/beforestd.h b/3rdparty/wxWidgets/include/wx/beforestd.h
new file mode 100644
index 0000000000..aacfc7c41e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/beforestd.h
@@ -0,0 +1,65 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: include/wx/beforestd.h
+// Purpose: #include before STL headers
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 07/07/03
+// RCS-ID: $Id: beforestd.h 42906 2006-11-01 14:16:42Z VZ $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ Unfortunately, when compiling at maximum warning level, the standard
+ headers themselves may generate warnings -- and really lots of them. So
+ before including them, this header should be included to temporarily
+ suppress the warnings and after this the header afterstd.h should be
+ included to enable them back again.
+
+ Note that there are intentionally no inclusion guards in this file, because
+ it can be included several times.
+ */
+
+// VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which
+// defines _MSC_VER as 1201) does need to be included as it's VC6-like
+#if defined(__VISUALC__) && __VISUALC__ <= 1201
+ // MSVC 5 does not have this
+ #if __VISUALC__ > 1100
+ // we have to disable (and reenable in afterstd.h) this one because,
+ // even though it is of level 4, it is not disabled by warning(push, 1)
+ // below for VC7.1!
+
+ // unreachable code
+ #pragma warning(disable:4702)
+
+ #pragma warning(push, 1)
+ #else // VC 5
+ // 'expression' : signed/unsigned mismatch
+ #pragma warning(disable:4018)
+
+ // 'identifier' : unreferenced formal parameter
+ #pragma warning(disable:4100)
+
+ // 'conversion' : conversion from 'type1' to 'type2',
+ // possible loss of data
+ #pragma warning(disable:4244)
+
+ // C++ language change: to explicitly specialize class template
+ // 'identifier' use the following syntax
+ #pragma warning(disable:4663)
+ #endif
+
+ // these warning have to be disabled and not just temporarily disabled
+ // because they will be given at the end of the compilation of the
+ // current source and there is absolutely nothing we can do about them
+
+ // 'foo': unreferenced inline function has been removed
+ #pragma warning(disable:4514)
+
+ // 'function' : function not inlined
+ #pragma warning(disable:4710)
+
+ // 'id': identifier was truncated to 'num' characters in the debug info
+ #pragma warning(disable:4786)
+#endif // VC++ < 7
+
diff --git a/3rdparty/wxWidgets/include/wx/bitmap.h b/3rdparty/wxWidgets/include/wx/bitmap.h
new file mode 100644
index 0000000000..92d4564780
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/bitmap.h
@@ -0,0 +1,241 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/bitmap.h
+// Purpose: wxBitmap class interface
+// Author: Vaclav Slavik
+// Modified by:
+// Created: 22.04.01
+// RCS-ID: $Id: bitmap.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BITMAP_H_BASE_
+#define _WX_BITMAP_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/string.h"
+#include "wx/gdicmn.h" // for wxBitmapType
+#include "wx/colour.h"
+
+class WXDLLIMPEXP_FWD_CORE wxBitmap;
+class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
+class WXDLLIMPEXP_FWD_CORE wxIcon;
+class WXDLLIMPEXP_FWD_CORE wxImage;
+class WXDLLIMPEXP_FWD_CORE wxMask;
+class WXDLLIMPEXP_FWD_CORE wxPalette;
+
+// ----------------------------------------------------------------------------
+// wxVariant support
+// ----------------------------------------------------------------------------
+
+#if wxUSE_VARIANT
+#include "wx/variant.h"
+DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT)
+#endif
+
+// ----------------------------------------------------------------------------
+// wxMask represents the transparent area of the bitmap
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMaskBase : public wxObject
+{
+public:
+ // create the mask from bitmap pixels of the given colour
+ bool Create(const wxBitmap& bitmap, const wxColour& colour);
+
+#if wxUSE_PALETTE
+ // create the mask from bitmap pixels with the given palette index
+ bool Create(const wxBitmap& bitmap, int paletteIndex);
+#endif // wxUSE_PALETTE
+
+ // create the mask from the given mono bitmap
+ bool Create(const wxBitmap& bitmap);
+
+protected:
+ // this function is called from Create() to free the existing mask data
+ virtual void FreeData() = 0;
+
+ // these functions must be overridden to implement the corresponding public
+ // Create() methods, they shouldn't call FreeData() as it's already called
+ // by the public wrappers
+ virtual bool InitFromColour(const wxBitmap& bitmap,
+ const wxColour& colour) = 0;
+ virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
+};
+
+#if defined(__WXMGL__) || \
+ defined(__WXDFB__) || \
+ defined(__WXMAC__) || \
+ defined(__WXGTK__) || \
+ defined(__WXCOCOA__) || \
+ defined(__WXMOTIF__) || \
+ defined(__WXX11__)
+ #define wxUSE_BITMAP_BASE 1
+#else
+ #define wxUSE_BITMAP_BASE 0
+#endif
+
+// Only used by some ports
+// FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes
+#if wxUSE_BITMAP_BASE
+
+// ----------------------------------------------------------------------------
+// wxBitmapHandler: class which knows how to create/load/save bitmaps in
+// different formats
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBitmapHandlerBase : public wxObject
+{
+public:
+ wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; }
+ virtual ~wxBitmapHandlerBase() { }
+
+ virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
+ int width, int height, int depth = 1);
+ virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
+ int desiredWidth, int desiredHeight);
+ virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name,
+ int type, const wxPalette *palette = NULL);
+
+ void SetName(const wxString& name) { m_name = name; }
+ void SetExtension(const wxString& ext) { m_extension = ext; }
+ void SetType(wxBitmapType type) { m_type = type; }
+ const wxString& GetName() const { return m_name; }
+ const wxString& GetExtension() const { return m_extension; }
+ wxBitmapType GetType() const { return m_type; }
+
+private:
+ wxString m_name;
+ wxString m_extension;
+ wxBitmapType m_type;
+
+ DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase)
+};
+
+class WXDLLEXPORT wxBitmapBase : public wxGDIObject
+{
+public:
+ /*
+ Derived class must implement these:
+
+ wxBitmap();
+ wxBitmap(int width, int height, int depth = -1);
+ wxBitmap(const char bits[], int width, int height, int depth = 1);
+ wxBitmap(const char* const* bits);
+ wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
+ wxBitmap(const wxImage& image, int depth = -1);
+
+ bool Create(int width, int height, int depth = -1);
+
+ static void InitStandardHandlers();
+ */
+
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const = 0;
+
+ virtual int GetHeight() const = 0;
+ virtual int GetWidth() const = 0;
+ virtual int GetDepth() const = 0;
+
+ virtual wxImage ConvertToImage() const = 0;
+
+ virtual wxMask *GetMask() const = 0;
+ virtual void SetMask(wxMask *mask) = 0;
+
+ virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0;
+
+ virtual bool SaveFile(const wxString &name, wxBitmapType type,
+ const wxPalette *palette = (wxPalette *)NULL) const = 0;
+ virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0;
+
+ /*
+ If raw bitmap access is supported (see wx/rawbmp.h), the following
+ methods should be implemented:
+
+ virtual bool GetRawData(wxRawBitmapData *data) = 0;
+ virtual void UngetRawData(wxRawBitmapData *data) = 0;
+ */
+
+#if wxUSE_PALETTE
+ virtual wxPalette *GetPalette() const = 0;
+ virtual void SetPalette(const wxPalette& palette) = 0;
+#endif // wxUSE_PALETTE
+
+ // copies the contents and mask of the given (colour) icon to the bitmap
+ virtual bool CopyFromIcon(const wxIcon& icon) = 0;
+
+ // implementation:
+ virtual void SetHeight(int height) = 0;
+ virtual void SetWidth(int width) = 0;
+ virtual void SetDepth(int depth) = 0;
+
+ // Format handling
+ static inline wxList& GetHandlers() { return sm_handlers; }
+ static void AddHandler(wxBitmapHandlerBase *handler);
+ static void InsertHandler(wxBitmapHandlerBase *handler);
+ static bool RemoveHandler(const wxString& name);
+ static wxBitmapHandler *FindHandler(const wxString& name);
+ static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType);
+ static wxBitmapHandler *FindHandler(wxBitmapType bitmapType);
+
+ //static void InitStandardHandlers();
+ // (wxBitmap must implement this one)
+
+ static void CleanUpHandlers();
+
+ // this method is only used by the generic implementation of wxMask
+ // currently but could be useful elsewhere in the future: it can be
+ // overridden to quantize the colour to correspond to bitmap colour depth
+ // if necessary; default implementation simply returns the colour as is
+ virtual wxColour QuantizeColour(const wxColour& colour) const
+ {
+ return colour;
+ }
+
+protected:
+ static wxList sm_handlers;
+
+ DECLARE_ABSTRACT_CLASS(wxBitmapBase)
+};
+
+#endif // wxUSE_BITMAP_BASE
+
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/bitmap.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/bitmap.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/x11/bitmap.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/bitmap.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/bitmap.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/bitmap.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/bitmap.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/bitmap.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/bitmap.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/bitmap.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/bitmap.h"
+#endif
+
+// we must include generic mask.h after wxBitmap definition
+#if defined(__WXMGL__) || defined(__WXDFB__)
+ #define wxUSE_GENERIC_MASK 1
+#else
+ #define wxUSE_GENERIC_MASK 0
+#endif
+
+#if wxUSE_GENERIC_MASK
+ #include "wx/generic/mask.h"
+#endif
+
+#endif // _WX_BITMAP_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/bmpbuttn.h b/3rdparty/wxWidgets/include/wx/bmpbuttn.h
new file mode 100644
index 0000000000..c37d2cd7c5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/bmpbuttn.h
@@ -0,0 +1,122 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/bmpbutton.h
+// Purpose: wxBitmapButton class interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 25.08.00
+// RCS-ID: $Id: bmpbuttn.h 45498 2007-04-16 13:03:05Z VZ $
+// Copyright: (c) 2000 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BMPBUTTON_H_BASE_
+#define _WX_BMPBUTTON_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_BMPBUTTON
+
+#include "wx/bitmap.h"
+#include "wx/button.h"
+
+extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxBitmapButton: a button which shows bitmaps instead of the usual string.
+// It has different bitmaps for different states (focused/disabled/pressed)
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBitmapButtonBase : public wxButton
+{
+public:
+ wxBitmapButtonBase()
+ {
+ m_marginX =
+ m_marginY = 0;
+ }
+
+ // set the bitmaps
+ void SetBitmapLabel(const wxBitmap& bitmap)
+ { m_bmpNormal = bitmap; OnSetBitmap(); }
+ void SetBitmapSelected(const wxBitmap& sel)
+ { m_bmpSelected = sel; OnSetBitmap(); }
+ void SetBitmapFocus(const wxBitmap& focus)
+ { m_bmpFocus = focus; OnSetBitmap(); }
+ void SetBitmapDisabled(const wxBitmap& disabled)
+ { m_bmpDisabled = disabled; OnSetBitmap(); }
+ void SetBitmapHover(const wxBitmap& hover)
+ { m_bmpHover = hover; OnSetBitmap(); }
+
+ // retrieve the bitmaps
+ const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; }
+ const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; }
+ const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; }
+ const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
+ const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
+ wxBitmap& GetBitmapLabel() { return m_bmpNormal; }
+ wxBitmap& GetBitmapSelected() { return m_bmpSelected; }
+ wxBitmap& GetBitmapFocus() { return m_bmpFocus; }
+ wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; }
+ wxBitmap& GetBitmapHover() { return m_bmpHover; }
+
+ // set/get the margins around the button
+ virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
+ int GetMarginX() const { return m_marginX; }
+ int GetMarginY() const { return m_marginY; }
+
+ // deprecated synonym for SetBitmapLabel()
+#if WXWIN_COMPATIBILITY_2_6
+ wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) );
+
+ // prevent virtual function hiding
+ virtual void SetLabel(const wxString& label)
+ { wxWindow::SetLabel(label); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+ // function called when any of the bitmaps changes
+ virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); }
+
+ // the bitmaps for various states
+ wxBitmap m_bmpNormal,
+ m_bmpSelected,
+ m_bmpFocus,
+ m_bmpDisabled,
+ m_bmpHover;
+
+ // the margins around the bitmap
+ int m_marginX,
+ m_marginY;
+
+
+ DECLARE_NO_COPY_CLASS(wxBitmapButtonBase)
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap)
+{
+ SetBitmapLabel(bitmap);
+}
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/bmpbuttn.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/bmpbuttn.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/bmpbuttn.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/bmpbuttn.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/bmpbuttn.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/bmpbuttn.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/bmpbuttn.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/bmpbuttn.h"
+#endif
+
+#endif // wxUSE_BMPBUTTON
+
+#endif // _WX_BMPBUTTON_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/bmpcbox.h b/3rdparty/wxWidgets/include/wx/bmpcbox.h
new file mode 100644
index 0000000000..09fb32c4cb
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/bmpcbox.h
@@ -0,0 +1,49 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/bmpcbox.h
+// Purpose: wxBitmapComboBox base header
+// Author: Jaakko Salli
+// Modified by:
+// Created: Aug-31-2006
+// Copyright: (c) Jaakko Salli
+// RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BMPCBOX_H_BASE_
+#define _WX_BMPCBOX_H_BASE_
+
+
+#include "wx/defs.h"
+
+#if wxUSE_BITMAPCOMBOBOX
+
+#include "wx/bitmap.h"
+
+
+extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[];
+
+
+class WXDLLIMPEXP_ADV wxBitmapComboBoxBase
+{
+public:
+ // ctors and such
+ wxBitmapComboBoxBase() { }
+
+ virtual ~wxBitmapComboBoxBase() { }
+
+ // Returns the image of the item with the given index.
+ virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
+
+ // Sets the image for the given item.
+ virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
+
+ // Returns size of the image used in list
+ virtual wxSize GetBitmapSize() const = 0;
+};
+
+
+#include "wx/generic/bmpcbox.h"
+
+#endif // wxUSE_BITMAPCOMBOBOX
+
+#endif // _WX_BMPCBOX_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/bookctrl.h b/3rdparty/wxWidgets/include/wx/bookctrl.h
new file mode 100644
index 0000000000..ba1bdfe5bc
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/bookctrl.h
@@ -0,0 +1,403 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/bookctrl.h
+// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 19.08.03
+// RCS-ID: $Id: bookctrl.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BOOKCTRL_H_
+#define _WX_BOOKCTRL_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_BOOKCTRL
+
+#include "wx/control.h"
+#include "wx/dynarray.h"
+
+WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
+
+class WXDLLIMPEXP_FWD_CORE wxImageList;
+class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// wxBookCtrl hit results
+enum
+{
+ wxBK_HITTEST_NOWHERE = 1, // not on tab
+ wxBK_HITTEST_ONICON = 2, // on icon
+ wxBK_HITTEST_ONLABEL = 4, // on label
+ wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL,
+ wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page
+};
+
+// wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook)
+#define wxBK_DEFAULT 0x0000
+#define wxBK_TOP 0x0010
+#define wxBK_BOTTOM 0x0020
+#define wxBK_LEFT 0x0040
+#define wxBK_RIGHT 0x0080
+#define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT)
+
+// ----------------------------------------------------------------------------
+// wxBookCtrlBase
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBookCtrlBase : public wxControl
+{
+public:
+ // construction
+ // ------------
+
+ wxBookCtrlBase()
+ {
+ Init();
+ }
+
+ wxBookCtrlBase(wxWindow *parent,
+ wxWindowID winid,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyString)
+ {
+ Init();
+
+ (void)Create(parent, winid, pos, size, style, name);
+ }
+
+ // quasi ctor
+ bool Create(wxWindow *parent,
+ wxWindowID winid,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyString);
+
+ // dtor
+ virtual ~wxBookCtrlBase();
+
+
+ // accessors
+ // ---------
+
+ // get number of pages in the dialog
+ virtual size_t GetPageCount() const { return m_pages.size(); }
+
+ // get the panel which represents the given page
+ wxWindow *GetPage(size_t n) { return m_pages[n]; }
+ wxWindow *GetPage(size_t n) const { return m_pages[n]; }
+
+ // get the current page or NULL if none
+ wxWindow *GetCurrentPage() const
+ {
+ const int n = GetSelection();
+ return n == wxNOT_FOUND ? NULL : GetPage(n);
+ }
+
+ // get the currently selected page or wxNOT_FOUND if none
+ virtual int GetSelection() const = 0;
+
+ // set/get the title of a page
+ virtual bool SetPageText(size_t n, const wxString& strText) = 0;
+ virtual wxString GetPageText(size_t n) const = 0;
+
+
+ // image list stuff: each page may have an image associated with it (all
+ // images belong to the same image list)
+ // ---------------------------------------------------------------------
+
+ // sets the image list to use, it is *not* deleted by the control
+ virtual void SetImageList(wxImageList *imageList);
+
+ // as SetImageList() but we will delete the image list ourselves
+ void AssignImageList(wxImageList *imageList);
+
+ // get pointer (may be NULL) to the associated image list
+ wxImageList* GetImageList() const { return m_imageList; }
+
+ // sets/returns item's image index in the current image list
+ virtual int GetPageImage(size_t n) const = 0;
+ virtual bool SetPageImage(size_t n, int imageId) = 0;
+
+
+ // geometry
+ // --------
+
+ // resize the notebook so that all pages will have the specified size
+ virtual void SetPageSize(const wxSize& size);
+
+ // calculate the size of the control from the size of its page
+ virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
+
+ // get/set size of area between book control area and page area
+ unsigned int GetInternalBorder() const { return m_internalBorder; }
+ void SetInternalBorder(unsigned int border) { m_internalBorder = border; }
+
+ // Sets/gets the margin around the controller
+ void SetControlMargin(int margin) { m_controlMargin = margin; }
+ int GetControlMargin() const { return m_controlMargin; }
+
+ // returns true if we have wxBK_TOP or wxBK_BOTTOM style
+ bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
+
+ // set/get option to shrink to fit current page
+ void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; }
+ bool GetFitToCurrentPage() const { return m_fitToCurrentPage; }
+
+ // returns the sizer containing the control, if any
+ wxSizer* GetControlSizer() const { return m_controlSizer; }
+
+ // operations
+ // ----------
+
+ // remove one page from the control and delete it
+ virtual bool DeletePage(size_t n);
+
+ // remove one page from the notebook, without deleting it
+ virtual bool RemovePage(size_t n)
+ {
+ DoInvalidateBestSize();
+ return DoRemovePage(n) != NULL;
+ }
+
+ // remove all pages and delete them
+ virtual bool DeleteAllPages()
+ {
+ DoInvalidateBestSize();
+ WX_CLEAR_ARRAY(m_pages);
+ return true;
+ }
+
+ // adds a new page to the control
+ virtual bool AddPage(wxWindow *page,
+ const wxString& text,
+ bool bSelect = false,
+ int imageId = -1)
+ {
+ DoInvalidateBestSize();
+ return InsertPage(GetPageCount(), page, text, bSelect, imageId);
+ }
+
+ // the same as AddPage(), but adds the page at the specified position
+ virtual bool InsertPage(size_t n,
+ wxWindow *page,
+ const wxString& text,
+ bool bSelect = false,
+ int imageId = -1) = 0;
+
+ // set the currently selected page, return the index of the previously
+ // selected one (or -1 on error)
+ //
+ // NB: this function will generate PAGE_CHANGING/ED events
+ virtual int SetSelection(size_t n) = 0;
+
+ // acts as SetSelection but does not generate events
+ virtual int ChangeSelection(size_t n) = 0;
+
+
+ // cycle thru the pages
+ void AdvanceSelection(bool forward = true)
+ {
+ int nPage = GetNextPage(forward);
+ if ( nPage != -1 )
+ {
+ // cast is safe because of the check above
+ SetSelection((size_t)nPage);
+ }
+ }
+
+ // hit test: returns which page is hit and, optionally, where (icon, label)
+ virtual int HitTest(const wxPoint& WXUNUSED(pt),
+ long * WXUNUSED(flags) = NULL) const
+ {
+ return wxNOT_FOUND;
+ }
+
+
+ // we do have multiple pages
+ virtual bool HasMultiplePages() const { return true; }
+
+
+protected:
+ // flags for DoSetSelection()
+ enum
+ {
+ SetSelection_SendEvent = 1
+ };
+
+ // set the selection to the given page, sending the events (which can
+ // possibly prevent the page change from taking place) if SendEvent flag is
+ // included
+ virtual int DoSetSelection(size_t nPage, int flags = 0);
+
+ // if the derived class uses DoSetSelection() for implementing
+ // [Set|Change]Selection, it must override UpdateSelectedPage(),
+ // CreatePageChangingEvent() and MakeChangedEvent(), but as it might not
+ // use it, these functions are not pure virtual
+
+ // called to notify the control about a new current page
+ virtual void UpdateSelectedPage(size_t WXUNUSED(newsel))
+ { wxFAIL_MSG(wxT("Override this function!")); }
+
+ // create a new "page changing" event
+ virtual wxBookCtrlBaseEvent* CreatePageChangingEvent() const
+ { wxFAIL_MSG(wxT("Override this function!")); return NULL; }
+
+ // modify the event created by CreatePageChangingEvent() to "page changed"
+ // event, usually by just calling SetEventType() on it
+ virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event))
+ { wxFAIL_MSG(wxT("Override this function!")); }
+
+
+ // Should we accept NULL page pointers in Add/InsertPage()?
+ //
+ // Default is no but derived classes may override it if they can treat NULL
+ // pages in some sensible way (e.g. wxTreebook overrides this to allow
+ // having nodes without any associated page)
+ virtual bool AllowNullPage() const { return false; }
+
+ // remove the page and return a pointer to it
+ virtual wxWindow *DoRemovePage(size_t page) = 0;
+
+ // our best size is the size which fits all our pages
+ virtual wxSize DoGetBestSize() const;
+
+ // helper: get the next page wrapping if we reached the end
+ int GetNextPage(bool forward) const;
+
+ // Lay out controls
+ void DoSize();
+
+ // This method also invalidates the size of the controller and should be
+ // called instead of just InvalidateBestSize() whenever pages are added or
+ // removed as this also affects the controller
+ void DoInvalidateBestSize();
+
+#if wxUSE_HELP
+ // Show the help for the corresponding page
+ void OnHelp(wxHelpEvent& event);
+#endif // wxUSE_HELP
+
+
+ // the array of all pages of this control
+ wxArrayPages m_pages;
+
+ // the associated image list or NULL
+ wxImageList *m_imageList;
+
+ // true if we must delete m_imageList
+ bool m_ownsImageList;
+
+ // get the page area
+ wxRect GetPageRect() const;
+
+ // event handlers
+ virtual wxSize GetControllerSize() const;
+ void OnSize(wxSizeEvent& event);
+
+ // controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
+ wxControl *m_bookctrl;
+
+ // Whether to shrink to fit current page
+ bool m_fitToCurrentPage;
+
+ // the sizer containing the choice control
+ wxSizer *m_controlSizer;
+
+ // the margin around the choice control
+ int m_controlMargin;
+
+private:
+
+ // common part of all ctors
+ void Init();
+
+ // internal border
+ unsigned int m_internalBorder;
+
+ DECLARE_ABSTRACT_CLASS(wxBookCtrlBase)
+ DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
+ DECLARE_EVENT_TABLE()
+};
+
+// ----------------------------------------------------------------------------
+// wxBookCtrlBaseEvent: page changing events generated by derived classes
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
+{
+public:
+ wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
+ int nSel = -1, int nOldSel = -1)
+ : wxNotifyEvent(commandType, winid)
+ {
+ m_nSel = nSel;
+ m_nOldSel = nOldSel;
+ }
+
+ wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event)
+ : wxNotifyEvent(event)
+ {
+ m_nSel = event.m_nSel;
+ m_nOldSel = event.m_nOldSel;
+ }
+
+ // accessors
+ // the currently selected page (-1 if none)
+ int GetSelection() const { return m_nSel; }
+ void SetSelection(int nSel) { m_nSel = nSel; }
+ // the page that was selected before the change (-1 if none)
+ int GetOldSelection() const { return m_nOldSel; }
+ void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
+
+private:
+ int m_nSel, // currently selected page
+ m_nOldSel; // previously selected page
+};
+
+// make a default book control for given platform
+#if wxUSE_NOTEBOOK
+ // dedicated to majority of desktops
+ #include "wx/notebook.h"
+ #define wxBookCtrl wxNotebook
+ #define wxBookCtrlEvent wxNotebookEvent
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
+ #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn)
+ #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
+ #define wxBookctrlEventHandler(func) wxNotebookEventHandler(func)
+#else
+ // dedicated to Smartphones
+ #include "wx/choicebk.h"
+ #define wxBookCtrl wxChoicebook
+ #define wxBookCtrlEvent wxChoicebookEvent
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING
+ #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn)
+ #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn)
+ #define wxBookctrlEventHandler(func) wxChoicebookEventHandler(func)
+#endif
+
+#if WXWIN_COMPATIBILITY_2_6
+ #define wxBC_TOP wxBK_TOP
+ #define wxBC_BOTTOM wxBK_BOTTOM
+ #define wxBC_LEFT wxBK_LEFT
+ #define wxBC_RIGHT wxBK_RIGHT
+ #define wxBC_DEFAULT wxBK_DEFAULT
+#endif
+
+#endif // wxUSE_BOOKCTRL
+
+#endif // _WX_BOOKCTRL_H_
diff --git a/3rdparty/wxWidgets/include/wx/brush.h b/3rdparty/wxWidgets/include/wx/brush.h
new file mode 100644
index 0000000000..cbf7287282
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/brush.h
@@ -0,0 +1,54 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/brush.h
+// Purpose: Includes platform-specific wxBrush file
+// Author: Julian Smart
+// Modified by:
+// Created:
+// RCS-ID: $Id: brush.h 40865 2006-08-27 09:42:42Z VS $
+// Copyright: Julian Smart
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BRUSH_H_BASE_
+#define _WX_BRUSH_H_BASE_
+
+#include "wx/defs.h"
+#include "wx/object.h"
+#include "wx/gdiobj.h"
+
+// wxBrushBase
+class WXDLLEXPORT wxBrushBase: public wxGDIObject
+{
+public:
+ virtual ~wxBrushBase() { }
+
+ virtual int GetStyle() const = 0;
+
+ virtual bool IsHatch() const
+ { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
+};
+
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/brush.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/brush.h"
+#elif defined(__WXMOTIF__) || defined(__WXX11__)
+ #include "wx/x11/brush.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/brush.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/brush.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/brush.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/brush.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/brush.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/brush.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/brush.h"
+#endif
+
+#endif
+ // _WX_BRUSH_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/buffer.h b/3rdparty/wxWidgets/include/wx/buffer.h
new file mode 100644
index 0000000000..605f4f19c5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/buffer.h
@@ -0,0 +1,314 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/buffer.h
+// Purpose: auto buffer classes: buffers which automatically free memory
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 12.04.99
+// RCS-ID: $Id: buffer.h 45761 2007-05-02 17:09:30Z VS $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BUFFER_H
+#define _WX_BUFFER_H
+
+#include "wx/wxchar.h"
+
+#include // malloc() and free()
+
+// ----------------------------------------------------------------------------
+// Special classes for (wide) character strings: they use malloc/free instead
+// of new/delete
+// ----------------------------------------------------------------------------
+
+#define DEFINE_BUFFER(classname, chartype, strdupfunc) \
+class WXDLLIMPEXP_BASE classname \
+{ \
+public: \
+ classname(const chartype *str = NULL) \
+ : m_str(str ? strdupfunc(str) : NULL) \
+ { \
+ } \
+ \
+ classname(size_t len) \
+ : m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
+ { \
+ m_str[len] = (chartype)0; \
+ } \
+ \
+ /* no need to check for NULL, free() does it */ \
+ ~classname() { free(m_str); } \
+ \
+ /* \
+ WARNING: \
+ \
+ the copy ctor and assignment operators change the passed in object \
+ even although it is declared as "const", so: \
+ \
+ a) it shouldn't be really const \
+ b) you shouldn't use it afterwards (or know that it was reset) \
+ \
+ This is very ugly but is unfortunately needed to make the normal use\
+ of classname buffer objects possible and is very similar to what \
+ std::auto_ptr<> does (as if it were an excuse...) \
+ */ \
+ \
+ /* \
+ because of the remark above, release() is declared const even if it \
+ isn't really const \
+ */ \
+ chartype *release() const \
+ { \
+ chartype *p = m_str; \
+ ((classname *)this)->m_str = NULL; \
+ return p; \
+ } \
+ \
+ void reset() \
+ { \
+ free(m_str); \
+ m_str = NULL; \
+ } \
+ \
+ classname(const classname& src) \
+ : m_str(src.release()) \
+ { \
+ } \
+ \
+ classname& operator=(const chartype *str) \
+ { \
+ free(m_str); \
+ m_str = str ? strdupfunc(str) : NULL; \
+ return *this; \
+ } \
+ \
+ classname& operator=(const classname& src) \
+ { \
+ free(m_str); \
+ m_str = src.release(); \
+ \
+ return *this; \
+ } \
+ \
+ bool extend(size_t len) \
+ { \
+ chartype * \
+ str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \
+ if ( !str ) \
+ return false; \
+ \
+ m_str = str; \
+ \
+ return true; \
+ } \
+ \
+ chartype *data() { return m_str; } \
+ const chartype *data() const { return m_str; } \
+ operator const chartype *() const { return m_str; } \
+ chartype operator[](size_t n) const { return m_str[n]; } \
+ \
+private: \
+ chartype *m_str; \
+}
+
+#if wxABI_VERSION >= 20804
+// needed for wxString::char_str() and wchar_str()
+#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
+class WXDLLIMPEXP_BASE classname : public baseclass \
+{ \
+public: \
+ classname(const baseclass& src) : baseclass(src) {} \
+ classname(const chartype *str = NULL) : baseclass(str) {} \
+ \
+ operator chartype*() { return this->data(); } \
+}
+#endif // wxABI_VERSION >= 20804
+
+DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
+#if wxABI_VERSION >= 20804
+DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
+#endif
+
+#if wxUSE_WCHAR_T
+
+DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
+#if wxABI_VERSION >= 20804
+DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
+#endif
+
+#endif // wxUSE_WCHAR_T
+
+#undef DEFINE_BUFFER
+#undef DEFINE_WRITABLE_BUFFER
+
+#if wxUSE_UNICODE
+ typedef wxWCharBuffer wxWxCharBuffer;
+
+ #define wxMB2WXbuf wxWCharBuffer
+ #define wxWX2MBbuf wxCharBuffer
+ #define wxWC2WXbuf wxChar*
+ #define wxWX2WCbuf wxChar*
+#else // ANSI
+ typedef wxCharBuffer wxWxCharBuffer;
+
+ #define wxMB2WXbuf wxChar*
+ #define wxWX2MBbuf wxChar*
+ #define wxWC2WXbuf wxCharBuffer
+ #define wxWX2WCbuf wxWCharBuffer
+#endif // Unicode/ANSI
+
+// ----------------------------------------------------------------------------
+// A class for holding growable data buffers (not necessarily strings)
+// ----------------------------------------------------------------------------
+
+// This class manages the actual data buffer pointer and is ref-counted.
+class wxMemoryBufferData
+{
+public:
+ // the initial size and also the size added by ResizeIfNeeded()
+ enum { DefBufSize = 1024 };
+
+ friend class wxMemoryBuffer;
+
+ // everyting is private as it can only be used by wxMemoryBuffer
+private:
+ wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize)
+ : m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0)
+ {
+ }
+ ~wxMemoryBufferData() { free(m_data); }
+
+
+ void ResizeIfNeeded(size_t newSize)
+ {
+ if (newSize > m_size)
+ {
+ void *dataOld = m_data;
+ m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize);
+ if ( !m_data )
+ {
+ free(dataOld);
+ }
+
+ m_size = newSize + wxMemoryBufferData::DefBufSize;
+ }
+ }
+
+ void IncRef() { m_ref += 1; }
+ void DecRef()
+ {
+ m_ref -= 1;
+ if (m_ref == 0) // are there no more references?
+ delete this;
+ }
+
+
+ // the buffer containing the data
+ void *m_data;
+
+ // the size of the buffer
+ size_t m_size;
+
+ // the amount of data currently in the buffer
+ size_t m_len;
+
+ // the reference count
+ size_t m_ref;
+
+ DECLARE_NO_COPY_CLASS(wxMemoryBufferData)
+};
+
+
+class wxMemoryBuffer
+{
+public:
+ // ctor and dtor
+ wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize)
+ {
+ m_bufdata = new wxMemoryBufferData(size);
+ m_bufdata->IncRef();
+ }
+
+ ~wxMemoryBuffer() { m_bufdata->DecRef(); }
+
+
+ // copy and assignment
+ wxMemoryBuffer(const wxMemoryBuffer& src)
+ : m_bufdata(src.m_bufdata)
+ {
+ m_bufdata->IncRef();
+ }
+
+ wxMemoryBuffer& operator=(const wxMemoryBuffer& src)
+ {
+ m_bufdata->DecRef();
+ m_bufdata = src.m_bufdata;
+ m_bufdata->IncRef();
+ return *this;
+ }
+
+
+ // Accessors
+ void *GetData() const { return m_bufdata->m_data; }
+ size_t GetBufSize() const { return m_bufdata->m_size; }
+ size_t GetDataLen() const { return m_bufdata->m_len; }
+
+ void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
+ void SetDataLen(size_t len)
+ {
+ wxASSERT(len <= m_bufdata->m_size);
+ m_bufdata->m_len = len;
+ }
+
+ // Ensure the buffer is big enough and return a pointer to it
+ void *GetWriteBuf(size_t sizeNeeded)
+ {
+ m_bufdata->ResizeIfNeeded(sizeNeeded);
+ return m_bufdata->m_data;
+ }
+
+ // Update the length after the write
+ void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); }
+
+ // Like the above, but appends to the buffer
+ void *GetAppendBuf(size_t sizeNeeded)
+ {
+ m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded);
+ return (char*)m_bufdata->m_data + m_bufdata->m_len;
+ }
+
+ // Update the length after the append
+ void UngetAppendBuf(size_t sizeUsed)
+ {
+ SetDataLen(m_bufdata->m_len + sizeUsed);
+ }
+
+ // Other ways to append to the buffer
+ void AppendByte(char data)
+ {
+ wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") );
+
+ m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1);
+ *(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data;
+ m_bufdata->m_len += 1;
+ }
+
+ void AppendData(const void *data, size_t len)
+ {
+ memcpy(GetAppendBuf(len), data, len);
+ UngetAppendBuf(len);
+ }
+
+ operator const char *() const { return (const char*)GetData(); }
+
+private:
+ wxMemoryBufferData* m_bufdata;
+};
+
+// ----------------------------------------------------------------------------
+// template class for any kind of data
+// ----------------------------------------------------------------------------
+
+// TODO
+
+#endif // _WX_BUFFER_H
diff --git a/3rdparty/wxWidgets/include/wx/build.h b/3rdparty/wxWidgets/include/wx/build.h
new file mode 100644
index 0000000000..989d5e611a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/build.h
@@ -0,0 +1,149 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/build.h
+// Purpose: Runtime build options checking
+// Author: Vadim Zeitlin, Vaclav Slavik
+// Modified by:
+// Created: 07.05.02
+// RCS-ID: $Id: build.h 35858 2005-10-09 15:48:42Z MBN $
+// Copyright: (c) 2002 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BUILD_H_
+#define _WX_BUILD_H_
+
+#include "wx/version.h"
+
+// NB: This file contains macros for checking binary compatibility of libraries
+// in multilib buildm, plugins and user components.
+// The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should
+// uniquely identify binary compatible builds: i.e. if two builds of the
+// library are binary compatible, their signature string should be the
+// same; if two builds are binary incompatible, their signatures should
+// be different.
+//
+// Therefore, wxUSE_XXX flags that affect binary compatibility (vtables,
+// function signatures) should be accounted for here. So should compilers
+// and compiler versions (but note that binary compatible compiler versions
+// such as gcc-2.95.2 and gcc-2.95.3 should have same signature!).
+
+// ----------------------------------------------------------------------------
+// WX_BUILD_OPTIONS_SIGNATURE
+// ----------------------------------------------------------------------------
+
+#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x)
+#define __WX_BO_STRINGIZE0(x) #x
+
+#if (wxMINOR_VERSION % 2) == 0
+ #define __WX_BO_VERSION(x,y,z) \
+ __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y)
+#else
+ #define __WX_BO_VERSION(x,y,z) \
+ __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
+#endif
+
+#ifdef __WXDEBUG__
+ #define __WX_BO_DEBUG "debug"
+#else
+ #define __WX_BO_DEBUG "no debug"
+#endif
+
+#if wxUSE_UNICODE
+ #define __WX_BO_UNICODE "Unicode"
+#else
+ #define __WX_BO_UNICODE "ANSI"
+#endif
+
+// GCC and Intel C++ share same C++ ABI (and possibly others in the future),
+// check if compiler versions are compatible:
+#if defined(__GXX_ABI_VERSION)
+ #define __WX_BO_COMPILER \
+ ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
+#elif defined(__INTEL_COMPILER)
+ #define __WX_BO_COMPILER ",Intel C++"
+#elif defined(__GNUG__)
+ #define __WX_BO_COMPILER ",GCC " \
+ __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__)
+#elif defined(__VISUALC__)
+ #define __WX_BO_COMPILER ",Visual C++"
+#elif defined(__BORLANDC__)
+ #define __WX_BO_COMPILER ",Borland C++"
+#elif defined(__DIGITALMARS__)
+ #define __WX_BO_COMPILER ",DigitalMars"
+#elif defined(__WATCOMC__)
+ #define __WX_BO_COMPILER ",Watcom C++"
+#else
+ #define __WX_BO_COMPILER
+#endif
+
+// WXWIN_COMPATIBILITY macros affect presence of virtual functions
+#if WXWIN_COMPATIBILITY_2_4
+ #define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4"
+#else
+ #define __WX_BO_WXWIN_COMPAT_2_4
+#endif
+#if WXWIN_COMPATIBILITY_2_6
+ #define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6"
+#else
+ #define __WX_BO_WXWIN_COMPAT_2_6
+#endif
+
+// deriving wxWin containers from STL ones changes them completely:
+#if wxUSE_STL
+ #define __WX_BO_STL ",STL containers"
+#else
+ #define __WX_BO_STL ",wx containers"
+#endif
+
+// This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
+#define WX_BUILD_OPTIONS_SIGNATURE \
+ __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
+ " (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
+ __WX_BO_COMPILER \
+ __WX_BO_STL \
+ __WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
+ ")"
+
+
+// ----------------------------------------------------------------------------
+// WX_CHECK_BUILD_OPTIONS
+// ----------------------------------------------------------------------------
+
+// Use this macro to check build options. Adding it to a file in DLL will
+// ensure that the DLL checks build options in same way IMPLEMENT_APP() does.
+#define WX_CHECK_BUILD_OPTIONS(libName) \
+ static struct wxBuildOptionsChecker \
+ { \
+ wxBuildOptionsChecker() \
+ { \
+ wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
+ libName); \
+ } \
+ } gs_buildOptionsCheck;
+
+
+#if WXWIN_COMPATIBILITY_2_4
+
+// ----------------------------------------------------------------------------
+// wxBuildOptions
+// ----------------------------------------------------------------------------
+
+// NB: Don't use this class in new code, it relies on the ctor being always
+// inlined. WX_BUILD_OPTIONS_SIGNATURE always works.
+class wxBuildOptions
+{
+public:
+ // the ctor must be inline to get the compilation settings of the code
+ // which included this header
+ wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {}
+
+private:
+ const char *m_signature;
+
+ // actually only CheckBuildOptions() should be our friend but well...
+ friend class wxAppConsole;
+};
+
+#endif // WXWIN_COMPATIBILITY_2_4
+
+#endif // _WX_BUILD_H_
diff --git a/3rdparty/wxWidgets/include/wx/busyinfo.h b/3rdparty/wxWidgets/include/wx/busyinfo.h
new file mode 100644
index 0000000000..ae63552870
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/busyinfo.h
@@ -0,0 +1,21 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/busyinfo.h
+// Purpose: Information window (when app is busy)
+// Author: Vaclav Slavik
+// Copyright: (c) 1999 Vaclav Slavik
+// RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __BUSYINFO_H_BASE__
+#define __BUSYINFO_H_BASE__
+
+#include "wx/defs.h"
+
+#if wxUSE_BUSYINFO
+
+#include "wx/generic/busyinfo.h"
+
+#endif // wxUSE_BUSYINFO
+
+#endif // __BUSYINFO_H_BASE__
diff --git a/3rdparty/wxWidgets/include/wx/button.h b/3rdparty/wxWidgets/include/wx/button.h
new file mode 100644
index 0000000000..a4448f81f9
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/button.h
@@ -0,0 +1,106 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/button.h
+// Purpose: wxButtonBase class
+// Author: Vadim Zetlin
+// Modified by:
+// Created: 15.08.00
+// RCS-ID: $Id: button.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) Vadim Zetlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BUTTON_H_BASE_
+#define _WX_BUTTON_H_BASE_
+
+#include "wx/defs.h"
+
+// ----------------------------------------------------------------------------
+// wxButton flags shared with other classes
+// ----------------------------------------------------------------------------
+
+#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
+
+// These flags affect label alignment
+#define wxBU_LEFT 0x0040
+#define wxBU_TOP 0x0080
+#define wxBU_RIGHT 0x0100
+#define wxBU_BOTTOM 0x0200
+#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
+#endif
+
+#if wxUSE_BUTTON
+
+// ----------------------------------------------------------------------------
+// wxButton specific flags
+// ----------------------------------------------------------------------------
+
+// These two flags are obsolete
+#define wxBU_NOAUTODRAW 0x0000
+#define wxBU_AUTODRAW 0x0004
+
+// by default, the buttons will be created with some (system dependent)
+// minimal size to make them look nicer, giving this style will make them as
+// small as possible
+#define wxBU_EXACTFIT 0x0001
+
+#include "wx/control.h"
+
+class WXDLLIMPEXP_FWD_CORE wxBitmap;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxButton: a push button
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxButtonBase : public wxControl
+{
+public:
+ wxButtonBase() { }
+
+ // show the image in the button in addition to the label
+ virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
+
+ // set the margins around the image
+ virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
+
+ // this wxButton method is called when the button becomes the default one
+ // on its panel
+ virtual void SetDefault() { }
+
+ // Buttons on MSW can look bad if they are not native colours, because
+ // then they become owner-drawn and not theme-drawn. Disable it here
+ // in wxButtonBase to make it consistent.
+ virtual bool ShouldInheritColours() const { return false; }
+
+ // returns the default button size for this platform
+ static wxSize GetDefaultSize();
+
+protected:
+ DECLARE_NO_COPY_CLASS(wxButtonBase)
+};
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/button.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/button.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/button.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/button.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/button.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/button.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/button.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/button.h"
+#elif defined(__WXPALMOS__)
+ #include "wx/palmos/button.h"
+#endif
+
+#endif // wxUSE_BUTTON
+
+#endif
+ // _WX_BUTTON_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/calctrl.h b/3rdparty/wxWidgets/include/wx/calctrl.h
new file mode 100644
index 0000000000..ace3b2262b
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/calctrl.h
@@ -0,0 +1,232 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/calctrl.h
+// Purpose: date-picker control
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 29.12.99
+// RCS-ID: $Id: calctrl.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) 1999 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/*
+ TODO
+
+ 1. implement multiple selections for date ranges
+ 2. background bitmap for the calendar?
+ */
+
+#ifndef _WX_CALCTRL_H_
+#define _WX_CALCTRL_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_CALENDARCTRL
+
+#include "wx/dateevt.h"
+#include "wx/colour.h"
+#include "wx/font.h"
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl flags
+// ----------------------------------------------------------------------------
+
+enum
+{
+ // show Sunday as the first day of the week (default)
+ wxCAL_SUNDAY_FIRST = 0x0000,
+
+ // show Monder as the first day of the week
+ wxCAL_MONDAY_FIRST = 0x0001,
+
+ // highlight holidays
+ wxCAL_SHOW_HOLIDAYS = 0x0002,
+
+ // disable the year change control, show only the month change one
+ wxCAL_NO_YEAR_CHANGE = 0x0004,
+
+ // don't allow changing neither month nor year (implies
+ // wxCAL_NO_YEAR_CHANGE)
+ wxCAL_NO_MONTH_CHANGE = 0x000c,
+
+ // use MS-style month-selection instead of combo-spin combination
+ wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010,
+
+ // show the neighbouring weeks in the previous and next month
+ wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020
+};
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// return values for the HitTest() method
+enum wxCalendarHitTestResult
+{
+ wxCAL_HITTEST_NOWHERE, // outside of anything
+ wxCAL_HITTEST_HEADER, // on the header (weekdays)
+ wxCAL_HITTEST_DAY, // on a day in the calendar
+ wxCAL_HITTEST_INCMONTH,
+ wxCAL_HITTEST_DECMONTH,
+ wxCAL_HITTEST_SURROUNDING_WEEK
+};
+
+// border types for a date
+enum wxCalendarDateBorder
+{
+ wxCAL_BORDER_NONE, // no border (default)
+ wxCAL_BORDER_SQUARE, // a rectangular border
+ wxCAL_BORDER_ROUND // a round border
+};
+
+// ----------------------------------------------------------------------------
+// wxCalendarDateAttr: custom attributes for a calendar date
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxCalendarDateAttr
+{
+#if !defined(__VISAGECPP__)
+protected:
+ // This has to be before the use of Init(), for MSVC++ 1.5
+ // But dorks up Visualage!
+ void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
+ {
+ m_border = border;
+ m_holiday = false;
+ }
+#endif
+public:
+ // ctors
+ wxCalendarDateAttr() { Init(); }
+ wxCalendarDateAttr(const wxColour& colText,
+ const wxColour& colBack = wxNullColour,
+ const wxColour& colBorder = wxNullColour,
+ const wxFont& font = wxNullFont,
+ wxCalendarDateBorder border = wxCAL_BORDER_NONE)
+ : m_colText(colText), m_colBack(colBack),
+ m_colBorder(colBorder), m_font(font)
+ {
+ Init(border);
+ }
+ wxCalendarDateAttr(wxCalendarDateBorder border,
+ const wxColour& colBorder = wxNullColour)
+ : m_colBorder(colBorder)
+ {
+ Init(border);
+ }
+
+ // setters
+ void SetTextColour(const wxColour& colText) { m_colText = colText; }
+ void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
+ void SetBorderColour(const wxColour& col) { m_colBorder = col; }
+ void SetFont(const wxFont& font) { m_font = font; }
+ void SetBorder(wxCalendarDateBorder border) { m_border = border; }
+ void SetHoliday(bool holiday) { m_holiday = holiday; }
+
+ // accessors
+ bool HasTextColour() const { return m_colText.Ok(); }
+ bool HasBackgroundColour() const { return m_colBack.Ok(); }
+ bool HasBorderColour() const { return m_colBorder.Ok(); }
+ bool HasFont() const { return m_font.Ok(); }
+ bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
+
+ bool IsHoliday() const { return m_holiday; }
+
+ const wxColour& GetTextColour() const { return m_colText; }
+ const wxColour& GetBackgroundColour() const { return m_colBack; }
+ const wxColour& GetBorderColour() const { return m_colBorder; }
+ const wxFont& GetFont() const { return m_font; }
+ wxCalendarDateBorder GetBorder() const { return m_border; }
+#if defined(__VISAGECPP__)
+protected:
+ // This has to be here for VisualAge
+ void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
+ {
+ m_border = border;
+ m_holiday = false;
+ }
+#endif
+private:
+ wxColour m_colText,
+ m_colBack,
+ m_colBorder;
+ wxFont m_font;
+ wxCalendarDateBorder m_border;
+ bool m_holiday;
+};
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl events
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
+
+class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
+{
+friend class wxCalendarCtrl;
+public:
+ wxCalendarEvent() { Init(); }
+ inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
+
+ void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
+ wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
+
+protected:
+ void Init()
+ {
+ m_wday = wxDateTime::Inv_WeekDay;
+ }
+
+private:
+ wxDateTime::WeekDay m_wday;
+
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
+};
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl
+// ----------------------------------------------------------------------------
+
+// so far we only have a generic version, so keep it simple
+#include "wx/generic/calctrl.h"
+
+
+// now we can define the inline ctor using wxCalendarCtrl
+inline
+wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
+ : wxDateEvent(cal, cal->GetDate(), type)
+{
+}
+
+// ----------------------------------------------------------------------------
+// calendar event types and macros for handling them
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, 950)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, 951)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, 952)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, 953)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, 954)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, 955)
+END_DECLARE_EVENT_TYPES()
+
+typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
+
+#define wxCalendarEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
+
+#define wx__DECLARE_CALEVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn))
+
+#define EVT_CALENDAR(id, fn) wx__DECLARE_CALEVT(DOUBLECLICKED, id, fn)
+#define EVT_CALENDAR_SEL_CHANGED(id, fn) wx__DECLARE_CALEVT(SEL_CHANGED, id, fn)
+#define EVT_CALENDAR_DAY(id, fn) wx__DECLARE_CALEVT(DAY_CHANGED, id, fn)
+#define EVT_CALENDAR_MONTH(id, fn) wx__DECLARE_CALEVT(MONTH_CHANGED, id, fn)
+#define EVT_CALENDAR_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn)
+#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
+
+#endif // wxUSE_CALENDARCTRL
+
+#endif // _WX_CALCTRL_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/caret.h b/3rdparty/wxWidgets/include/wx/caret.h
new file mode 100644
index 0000000000..25b606699c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/caret.h
@@ -0,0 +1,252 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/caret.h
+// Purpose: wxCaretBase class - the interface of wxCaret
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 23.05.99
+// RCS-ID: $Id: caret.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CARET_H_BASE_
+#define _WX_CARET_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_CARET
+
+// ---------------------------------------------------------------------------
+// forward declarations
+// ---------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindowBase;
+
+// ----------------------------------------------------------------------------
+// headers we have to include
+// ----------------------------------------------------------------------------
+
+#include "wx/gdicmn.h" // for wxPoint, wxSize
+
+// ----------------------------------------------------------------------------
+// A caret is a blinking cursor showing the position where the typed text will
+// appear. It can be either a solid block or a custom bitmap (TODO)
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxCaretBase
+{
+public:
+ // ctors
+ // -----
+ // default - use Create
+ wxCaretBase() { Init(); }
+ // create the caret of given (in pixels) width and height and associate
+ // with the given window
+ wxCaretBase(wxWindowBase *window, int width, int height)
+ {
+ Init();
+
+ (void)Create(window, width, height);
+ }
+ // same as above
+ wxCaretBase(wxWindowBase *window, const wxSize& size)
+ {
+ Init();
+
+ (void)Create(window, size);
+ }
+
+ // a virtual dtor has been provided since this class has virtual members
+ virtual ~wxCaretBase() { }
+
+ // Create() functions - same as ctor but returns the success code
+ // --------------------------------------------------------------
+
+ // same as ctor
+ bool Create(wxWindowBase *window, int width, int height)
+ { return DoCreate(window, width, height); }
+ // same as ctor
+ bool Create(wxWindowBase *window, const wxSize& size)
+ { return DoCreate(window, size.x, size.y); }
+
+ // accessors
+ // ---------
+
+ // is the caret valid?
+ bool IsOk() const { return m_width != 0 && m_height != 0; }
+
+ // is the caret currently shown?
+ bool IsVisible() const { return m_countVisible > 0; }
+
+ // get the caret position
+ void GetPosition(int *x, int *y) const
+ {
+ if ( x ) *x = m_x;
+ if ( y ) *y = m_y;
+ }
+ wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
+
+ // get the caret size
+ void GetSize(int *width, int *height) const
+ {
+ if ( width ) *width = m_width;
+ if ( height ) *height = m_height;
+ }
+ wxSize GetSize() const { return wxSize(m_width, m_height); }
+
+ // get the window we're associated with
+ wxWindow *GetWindow() const { return (wxWindow *)m_window; }
+
+ // change the size of the caret
+ void SetSize(int width, int height) {
+ m_width = width;
+ m_height = height;
+ DoSize();
+ }
+ void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
+
+
+ // operations
+ // ----------
+
+ // move the caret to given position (in logical coords)
+ void Move(int x, int y) { m_x = x; m_y = y; DoMove(); }
+ void Move(const wxPoint& pt) { m_x = pt.x; m_y = pt.y; DoMove(); }
+
+ // show/hide the caret (should be called by wxWindow when needed):
+ // Show() must be called as many times as Hide() + 1 to make the caret
+ // visible
+ virtual void Show(bool show = true)
+ {
+ if ( show )
+ {
+ if ( m_countVisible++ == 0 )
+ DoShow();
+ }
+ else
+ {
+ if ( --m_countVisible == 0 )
+ DoHide();
+ }
+ }
+ virtual void Hide() { Show(false); }
+
+ // blink time is measured in milliseconds and is the time elapsed
+ // between 2 inversions of the caret (blink time of the caret is common
+ // to all carets in the Universe, so these functions are static)
+ static int GetBlinkTime();
+ static void SetBlinkTime(int milliseconds);
+
+ // implementation from now on
+ // --------------------------
+
+ // these functions should be called by wxWindow when the window gets/loses
+ // the focus - we create/show and hide/destroy the caret here
+ virtual void OnSetFocus() { }
+ virtual void OnKillFocus() { }
+
+protected:
+ // these functions may be overriden in the derived classes, but they
+ // should call the base class version first
+ virtual bool DoCreate(wxWindowBase *window, int width, int height)
+ {
+ m_window = window;
+ m_width = width;
+ m_height = height;
+
+ return true;
+ }
+
+ // pure virtuals to implement in the derived class
+ virtual void DoShow() = 0;
+ virtual void DoHide() = 0;
+ virtual void DoMove() = 0;
+ virtual void DoSize() { }
+
+ // the common initialization
+ void Init()
+ {
+ m_window = (wxWindowBase *)NULL;
+ m_x = m_y = 0;
+ m_width = m_height = 0;
+ m_countVisible = 0;
+ }
+
+ // the size of the caret
+ int m_width, m_height;
+
+ // the position of the caret
+ int m_x, m_y;
+
+ // the window we're associated with
+ wxWindowBase *m_window;
+
+ // visibility count: the caret is visible only if it's positive
+ int m_countVisible;
+
+private:
+ DECLARE_NO_COPY_CLASS(wxCaretBase)
+};
+
+// ---------------------------------------------------------------------------
+// now include the real thing
+// ---------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/caret.h"
+#else
+ #include "wx/generic/caret.h"
+#endif // platform
+
+// ----------------------------------------------------------------------------
+// wxCaretSuspend: a simple class which hides the caret in its ctor and
+// restores it in the dtor, this should be used when drawing on the screen to
+// avoid overdrawing the caret
+// ----------------------------------------------------------------------------
+
+#ifdef wxHAS_CARET_USING_OVERLAYS
+
+// we don't need to hide the caret if it's rendered using overlays
+class WXDLLEXPORT wxCaretSuspend
+{
+public:
+ wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
+
+ DECLARE_NO_COPY_CLASS(wxCaretSuspend)
+};
+
+#else // !wxHAS_CARET_USING_OVERLAYS
+
+class WXDLLEXPORT wxCaretSuspend
+{
+public:
+ wxCaretSuspend(wxWindow *win)
+ {
+ m_caret = win->GetCaret();
+ m_show = false;
+ if ( m_caret && m_caret->IsVisible() )
+ {
+ m_caret->Hide();
+ m_show = true;
+ }
+ }
+
+ ~wxCaretSuspend()
+ {
+ if ( m_caret && m_show )
+ m_caret->Show();
+ }
+
+private:
+ wxCaret *m_caret;
+ bool m_show;
+
+ DECLARE_NO_COPY_CLASS(wxCaretSuspend)
+};
+
+#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
+
+#endif // wxUSE_CARET
+
+#endif // _WX_CARET_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/checkbox.h b/3rdparty/wxWidgets/include/wx/checkbox.h
new file mode 100644
index 0000000000..3d76b4a195
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/checkbox.h
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/checkbox.h
+// Purpose: wxCheckBox class interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 07.09.00
+// RCS-ID: $Id: checkbox.h 39901 2006-06-30 10:51:44Z VS $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CHECKBOX_H_BASE_
+#define _WX_CHECKBOX_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_CHECKBOX
+
+#include "wx/control.h"
+
+
+/*
+ * wxCheckBox style flags
+ * (Using wxCHK_* because wxCB_* is used by wxComboBox).
+ * Determine whether to use a 3-state or 2-state
+ * checkbox. 3-state enables to differentiate
+ * between 'unchecked', 'checked' and 'undetermined'.
+ */
+#define wxCHK_2STATE 0x0000
+#define wxCHK_3STATE 0x1000
+
+/*
+ * If this style is set the user can set the checkbox to the
+ * undetermined state. If not set the undetermined set can only
+ * be set programmatically.
+ * This style can only be used with 3 state checkboxes.
+ */
+#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
+
+/*
+ * The possible states of a 3-state checkbox (Compatible
+ * with the 2-state checkbox).
+ */
+enum wxCheckBoxState
+{
+ wxCHK_UNCHECKED,
+ wxCHK_CHECKED,
+ wxCHK_UNDETERMINED /* 3-state checkbox only */
+};
+
+
+extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxCheckBox: a control which shows a label and a box which may be checked
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxCheckBoxBase : public wxControl
+{
+public:
+ wxCheckBoxBase() { }
+
+ // set/get the checked status of the listbox
+ virtual void SetValue(bool value) = 0;
+ virtual bool GetValue() const = 0;
+
+ bool IsChecked() const
+ {
+ wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for")
+ wxT(" a three state checkbox, Use Get3StateValue() instead") );
+
+ return GetValue();
+ }
+
+ wxCheckBoxState Get3StateValue() const
+ {
+ wxCheckBoxState state = DoGet3StateValue();
+
+ if ( state == wxCHK_UNDETERMINED && !Is3State() )
+ {
+ // Undetermined state with a 2-state checkbox??
+ wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ")
+ wxT("in an undetermined/third state") );
+
+ state = wxCHK_UNCHECKED;
+ }
+
+ return state;
+ }
+
+ void Set3StateValue(wxCheckBoxState state)
+ {
+ if ( state == wxCHK_UNDETERMINED && !Is3State() )
+ {
+ wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state"));
+ state = wxCHK_UNCHECKED;
+ }
+
+ DoSet3StateValue(state);
+ }
+
+ bool Is3State() const { return HasFlag(wxCHK_3STATE); }
+
+ bool Is3rdStateAllowedForUser() const
+ {
+ return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER);
+ }
+
+ virtual bool HasTransparentBackground() { return true; }
+
+ // wxCheckBox-specific processing after processing the update event
+ virtual void DoUpdateWindowUI(wxUpdateUIEvent& event)
+ {
+ wxControl::DoUpdateWindowUI(event);
+
+ if ( event.GetSetChecked() )
+ SetValue(event.GetChecked());
+ }
+
+protected:
+ virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; }
+
+ virtual wxCheckBoxState DoGet3StateValue() const
+ {
+ wxFAIL;
+ return wxCHK_UNCHECKED;
+ }
+
+private:
+ DECLARE_NO_COPY_CLASS(wxCheckBoxBase)
+};
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/checkbox.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/checkbox.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/checkbox.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/checkbox.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/checkbox.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/checkbox.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/checkbox.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/checkbox.h"
+#elif defined(__WXPALMOS__)
+ #include "wx/palmos/checkbox.h"
+#endif
+
+#endif // wxUSE_CHECKBOX
+
+#endif
+ // _WX_CHECKBOX_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/checklst.h b/3rdparty/wxWidgets/include/wx/checklst.h
new file mode 100644
index 0000000000..b83c8536f5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/checklst.h
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/checklst.h
+// Purpose: wxCheckListBox class interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 12.09.00
+// RCS-ID: $Id: checklst.h 38319 2006-03-23 22:05:23Z VZ $
+// Copyright: (c) Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CHECKLST_H_BASE_
+#define _WX_CHECKLST_H_BASE_
+
+#if wxUSE_CHECKLISTBOX
+
+#include "wx/listbox.h"
+
+// ----------------------------------------------------------------------------
+// wxCheckListBox: a listbox whose items may be checked
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxCheckListBoxBase : public
+ #ifdef __WXWINCE__
+ // keep virtuals synchronised
+ wxListBoxBase
+ #else
+ wxListBox
+ #endif
+{
+public:
+ wxCheckListBoxBase() { }
+
+ // check list box specific methods
+ virtual bool IsChecked(unsigned int item) const = 0;
+ virtual void Check(unsigned int item, bool check = true) = 0;
+
+ DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
+};
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/checklst.h"
+#elif defined(__WXWINCE__)
+ #include "wx/msw/wince/checklst.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/checklst.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/checklst.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/checklst.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/checklst.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/checklst.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/checklst.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/checklst.h"
+#endif
+
+#endif // wxUSE_CHECKLISTBOX
+
+#endif
+ // _WX_CHECKLST_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/chkconf.h b/3rdparty/wxWidgets/include/wx/chkconf.h
new file mode 100644
index 0000000000..e0717b9d58
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/chkconf.h
@@ -0,0 +1,1871 @@
+/*
+ * Name: wx/chkconf.h
+ * Purpose: check the config settings for consistency
+ * Author: Vadim Zeitlin
+ * Modified by:
+ * Created: 09.08.00
+ * RCS-ID: $Id: chkconf.h 48113 2007-08-15 17:43:50Z DE $
+ * Copyright: (c) 2000 Vadim Zeitlin
+ * Licence: wxWindows licence
+ */
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+/*
+ Platform-specific checking.
+ */
+
+#if defined(__WXPALMOS__)
+# include "wx/palmos/chkconf.h"
+#elif defined(__WXWINCE__)
+# include "wx/msw/wince/chkconf.h"
+#elif defined(__WXMSW__)
+# include "wx/msw/chkconf.h"
+#elif defined(__WXMAC__)
+# include "wx/mac/chkconf.h"
+#elif defined(__OS2__)
+# include "wx/os2/chkconf.h"
+#elif defined(__WXMGL__)
+# include "wx/mgl/chkconf.h"
+#elif defined(__WXDFB__)
+# include "wx/dfb/chkconf.h"
+#elif defined(__WXMOTIF__)
+# include "wx/motif/chkconf.h"
+#elif defined(__WXX11__)
+# include "wx/x11/chkconf.h"
+#endif
+
+#ifdef __WXUNIVERSAL__
+# include "wx/univ/chkconf.h"
+#endif
+
+/*
+ this global setting determines what should we do if the setting FOO
+ requires BAR and BAR is not set: we can either silently unset FOO as well
+ (do this if you're trying to build the smallest possible library) or give an
+ error and abort (default as leads to least surprizing behaviour)
+ */
+#define wxABORT_ON_CONFIG_ERROR
+
+/*
+ global features
+ */
+
+/* GUI build by default */
+#if !defined(wxUSE_GUI)
+# define wxUSE_GUI 1
+#endif /* !defined(wxUSE_GUI) */
+
+/* Turn off wxUSE_ABI_INCOMPATIBLE_FEATURES if not specified. */
+#if !defined(wxUSE_ABI_INCOMPATIBLE_FEATURES)
+# define wxUSE_ABI_INCOMPATIBLE_FEATURES 0
+#endif /* !defined(wxUSE_ABI_INCOMPATIBLE_FEATURES) */
+
+/*
+ If we're compiling without support for threads/exceptions we have to
+ disable the corresponding features.
+ */
+#ifdef wxNO_THREADS
+# undef wxUSE_THREADS
+# define wxUSE_THREADS 0
+#endif /* wxNO_THREADS */
+
+#ifdef wxNO_EXCEPTIONS
+# undef wxUSE_EXCEPTIONS
+# define wxUSE_EXCEPTIONS 0
+#endif /* wxNO_EXCEPTIONS */
+
+/* we also must disable exceptions if compiler doesn't support them */
+#if defined(_MSC_VER) && !defined(_CPPUNWIND)
+# undef wxUSE_EXCEPTIONS
+# define wxUSE_EXCEPTIONS 0
+#endif /* VC++ without exceptions support */
+
+
+/*
+ tests for non GUI features
+
+ please keep the options in alphabetical order!
+ */
+
+#ifndef wxUSE_CRASHREPORT
+ /* this one is special: as currently it is Windows-only, don't force it
+ to be defined on other platforms */
+# if defined(wxABORT_ON_CONFIG_ERROR) && defined(__WXMSW__)
+# error "wxUSE_CRASHREPORT must be defined."
+# else
+# define wxUSE_CRASHREPORT 0
+# endif
+#endif /* !defined(wxUSE_CRASHREPORT) */
+
+#ifndef wxUSE_DYNLIB_CLASS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DYNLIB_CLASS must be defined."
+# else
+# define wxUSE_DYNLIB_CLASS 0
+# endif
+#endif /* !defined(wxUSE_DYNLIB_CLASS) */
+
+#ifndef wxUSE_EXCEPTIONS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_EXCEPTIONS must be defined."
+# else
+# define wxUSE_EXCEPTIONS 0
+# endif
+#endif /* !defined(wxUSE_EXCEPTIONS) */
+
+#ifndef wxUSE_FILESYSTEM
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FILESYSTEM must be defined."
+# else
+# define wxUSE_FILESYSTEM 0
+# endif
+#endif /* !defined(wxUSE_FILESYSTEM) */
+
+#ifndef wxUSE_FS_ARCHIVE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FS_ARCHIVE must be defined."
+# else
+# define wxUSE_FS_ARCHIVE 0
+# endif
+#endif /* !defined(wxUSE_FS_ARCHIVE) */
+
+/* don't give an error about this one yet, it's not fully implemented */
+#ifndef wxUSE_FSVOLUME
+# define wxUSE_FSVOLUME 0
+#endif /* !defined(wxUSE_FSVOLUME) */
+
+#ifndef wxUSE_DYNAMIC_LOADER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DYNAMIC_LOADER must be defined."
+# else
+# define wxUSE_DYNAMIC_LOADER 0
+# endif
+#endif /* !defined(wxUSE_DYNAMIC_LOADER) */
+
+#ifndef wxUSE_LOG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LOG must be defined."
+# else
+# define wxUSE_LOG 0
+# endif
+#endif /* !defined(wxUSE_LOG) */
+
+#ifndef wxUSE_LONGLONG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LONGLONG must be defined."
+# else
+# define wxUSE_LONGLONG 0
+# endif
+#endif /* !defined(wxUSE_LONGLONG) */
+
+#ifndef wxUSE_MIMETYPE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MIMETYPE must be defined."
+# else
+# define wxUSE_MIMETYPE 0
+# endif
+#endif /* !defined(wxUSE_MIMETYPE) */
+
+#ifndef wxUSE_ON_FATAL_EXCEPTION
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ON_FATAL_EXCEPTION must be defined."
+# else
+# define wxUSE_ON_FATAL_EXCEPTION 0
+# endif
+#endif /* !defined(wxUSE_ON_FATAL_EXCEPTION) */
+
+#ifndef wxUSE_PRINTF_POS_PARAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PRINTF_POS_PARAMS must be defined."
+# else
+# define wxUSE_PRINTF_POS_PARAMS 0
+# endif
+#endif /* !defined(wxUSE_PRINTF_POS_PARAMS) */
+
+#ifndef wxUSE_PROTOCOL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL must be defined."
+# else
+# define wxUSE_PROTOCOL 0
+# endif
+#endif /* !defined(wxUSE_PROTOCOL) */
+
+/* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
+#if !wxUSE_PROTOCOL
+# undef wxUSE_PROTOCOL_HTTP
+# undef wxUSE_PROTOCOL_FTP
+# undef wxUSE_PROTOCOL_FILE
+# define wxUSE_PROTOCOL_HTTP 0
+# define wxUSE_PROTOCOL_FTP 0
+# define wxUSE_PROTOCOL_FILE 0
+#endif /* wxUSE_PROTOCOL */
+
+#ifndef wxUSE_PROTOCOL_HTTP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL_HTTP must be defined."
+# else
+# define wxUSE_PROTOCOL_HTTP 0
+# endif
+#endif /* !defined(wxUSE_PROTOCOL_HTTP) */
+
+#ifndef wxUSE_PROTOCOL_FTP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL_FTP must be defined."
+# else
+# define wxUSE_PROTOCOL_FTP 0
+# endif
+#endif /* !defined(wxUSE_PROTOCOL_FTP) */
+
+#ifndef wxUSE_PROTOCOL_FILE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL_FILE must be defined."
+# else
+# define wxUSE_PROTOCOL_FILE 0
+# endif
+#endif /* !defined(wxUSE_PROTOCOL_FILE) */
+
+#ifndef wxUSE_REGEX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_REGEX must be defined."
+# else
+# define wxUSE_REGEX 0
+# endif
+#endif /* !defined(wxUSE_REGEX) */
+
+#ifndef wxUSE_STDPATHS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STDPATHS must be defined."
+# else
+# define wxUSE_STDPATHS 1
+# endif
+#endif /* !defined(wxUSE_STDPATHS) */
+
+#ifndef wxUSE_XML
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_XML must be defined."
+# else
+# define wxUSE_XML 0
+# endif
+#endif /* !defined(wxUSE_XML) */
+
+#ifndef wxUSE_SOCKETS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SOCKETS must be defined."
+# else
+# define wxUSE_SOCKETS 0
+# endif
+#endif /* !defined(wxUSE_SOCKETS) */
+
+#ifndef wxUSE_STREAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STREAMS must be defined."
+# else
+# define wxUSE_STREAMS 0
+# endif
+#endif /* !defined(wxUSE_STREAMS) */
+
+#ifndef wxUSE_STOPWATCH
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STOPWATCH must be defined."
+# else
+# define wxUSE_STOPWATCH 0
+# endif
+#endif /* !defined(wxUSE_STOPWATCH) */
+
+#ifndef wxUSE_TEXTBUFFER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TEXTBUFFER must be defined."
+# else
+# define wxUSE_TEXTBUFFER 0
+# endif
+#endif /* !defined(wxUSE_TEXTBUFFER) */
+
+#ifndef wxUSE_TEXTFILE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TEXTFILE must be defined."
+# else
+# define wxUSE_TEXTFILE 0
+# endif
+#endif /* !defined(wxUSE_TEXTFILE) */
+
+#ifndef wxUSE_UNICODE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_UNICODE must be defined."
+# else
+# define wxUSE_UNICODE 0
+# endif
+#endif /* !defined(wxUSE_UNICODE) */
+
+#ifndef wxUSE_URL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_URL must be defined."
+# else
+# define wxUSE_URL 0
+# endif
+#endif /* !defined(wxUSE_URL) */
+
+#ifndef wxUSE_VARIANT
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_VARIANT must be defined."
+# else
+# define wxUSE_VARIANT 0
+# endif
+#endif /* wxUSE_VARIANT */
+
+/*
+ all these tests are for GUI only
+
+ please keep the options in alphabetical order!
+ */
+#if wxUSE_GUI
+
+/*
+ all of the settings tested below must be defined or we'd get an error from
+ preprocessor about invalid integer expression
+ */
+
+#ifndef wxUSE_ABOUTDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ABOUTDLG must be defined."
+# else
+# define wxUSE_ABOUTDLG 0
+# endif
+#endif /* !defined(wxUSE_ABOUTDLG) */
+
+#ifndef wxUSE_ACCEL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ACCEL must be defined."
+# else
+# define wxUSE_ACCEL 0
+# endif
+#endif /* !defined(wxUSE_ACCEL) */
+
+#ifndef wxUSE_ANIMATIONCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ANIMATIONCTRL must be defined."
+# else
+# define wxUSE_ANIMATIONCTRL 0
+# endif
+#endif /* !defined(wxUSE_ANIMATIONCTRL) */
+
+#ifndef wxUSE_BITMAPCOMBOBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BITMAPCOMBOBOX must be defined."
+# else
+# define wxUSE_BITMAPCOMBOBOX 0
+# endif
+#endif /* !defined(wxUSE_BITMAPCOMBOBOX) */
+
+#ifndef wxUSE_BMPBUTTON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BMPBUTTON must be defined."
+# else
+# define wxUSE_BMPBUTTON 0
+# endif
+#endif /* !defined(wxUSE_BMPBUTTON) */
+
+#ifndef wxUSE_BUTTON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BUTTON must be defined."
+# else
+# define wxUSE_BUTTON 0
+# endif
+#endif /* !defined(wxUSE_BUTTON) */
+
+#ifndef wxUSE_CALENDARCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CALENDARCTRL must be defined."
+# else
+# define wxUSE_CALENDARCTRL 0
+# endif
+#endif /* !defined(wxUSE_CALENDARCTRL) */
+
+#ifndef wxUSE_CARET
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CARET must be defined."
+# else
+# define wxUSE_CARET 0
+# endif
+#endif /* !defined(wxUSE_CARET) */
+
+#ifndef wxUSE_CHECKBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CHECKBOX must be defined."
+# else
+# define wxUSE_CHECKBOX 0
+# endif
+#endif /* !defined(wxUSE_CHECKBOX) */
+
+#ifndef wxUSE_CHECKLISTBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CHECKLISTBOX must be defined."
+# else
+# define wxUSE_CHECKLISTBOX 0
+# endif
+#endif /* !defined(wxUSE_CHECKLISTBOX) */
+
+#ifndef wxUSE_CHOICE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CHOICE must be defined."
+# else
+# define wxUSE_CHOICE 0
+# endif
+#endif /* !defined(wxUSE_CHOICE) */
+
+#ifndef wxUSE_CHOICEBOOK
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CHOICEBOOK must be defined."
+# else
+# define wxUSE_CHOICEBOOK 0
+# endif
+#endif /* !defined(wxUSE_CHOICEBOOK) */
+
+#ifndef wxUSE_CHOICEDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CHOICEDLG must be defined."
+# else
+# define wxUSE_CHOICEDLG 0
+# endif
+#endif /* !defined(wxUSE_CHOICEDLG) */
+
+#ifndef wxUSE_CLIPBOARD
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CLIPBOARD must be defined."
+# else
+# define wxUSE_CLIPBOARD 0
+# endif
+#endif /* !defined(wxUSE_CLIPBOARD) */
+
+#ifndef wxUSE_COLLPANE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_COLLPANE must be defined."
+# else
+# define wxUSE_COLLPANE 0
+# endif
+#endif /* !defined(wxUSE_COLLPANE) */
+
+#ifndef wxUSE_COLOURDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_COLOURDLG must be defined."
+# else
+# define wxUSE_COLOURDLG 0
+# endif
+#endif /* !defined(wxUSE_COLOURDLG) */
+
+#ifndef wxUSE_COLOURPICKERCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_COLOURPICKERCTRL must be defined."
+# else
+# define wxUSE_COLOURPICKERCTRL 0
+# endif
+#endif /* !defined(wxUSE_COLOURPICKERCTRL) */
+
+#ifndef wxUSE_COMBOBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_COMBOBOX must be defined."
+# else
+# define wxUSE_COMBOBOX 0
+# endif
+#endif /* !defined(wxUSE_COMBOBOX) */
+
+#ifndef wxUSE_COMBOCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_COMBOCTRL must be defined."
+# else
+# define wxUSE_COMBOCTRL 0
+# endif
+#endif /* !defined(wxUSE_COMBOCTRL) */
+
+#ifndef wxUSE_DATAOBJ
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DATAOBJ must be defined."
+# else
+# define wxUSE_DATAOBJ 0
+# endif
+#endif /* !defined(wxUSE_DATAOBJ) */
+
+#ifndef wxUSE_DATAVIEWCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DATAVIEWCTRL must be defined."
+# else
+# define wxUSE_DATAVIEWCTRL 0
+# endif
+#endif /* !defined(wxUSE_DATAVIEWCTRL) */
+
+#ifndef wxUSE_DATEPICKCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DATEPICKCTRL must be defined."
+# else
+# define wxUSE_DATEPICKCTRL 0
+# endif
+#endif /* !defined(wxUSE_DATEPICKCTRL) */
+
+#ifndef wxUSE_DIRPICKERCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DIRPICKERCTRL must be defined."
+# else
+# define wxUSE_DIRPICKERCTRL 0
+# endif
+#endif /* !defined(wxUSE_DIRPICKERCTRL) */
+
+#ifndef wxUSE_DISPLAY
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DISPLAY must be defined."
+# else
+# define wxUSE_DISPLAY 0
+# endif
+#endif /* !defined(wxUSE_DISPLAY) */
+
+#ifndef wxUSE_DOC_VIEW_ARCHITECTURE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
+# else
+# define wxUSE_DOC_VIEW_ARCHITECTURE 0
+# endif
+#endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
+
+#ifndef wxUSE_FILEDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FILEDLG must be defined."
+# else
+# define wxUSE_FILEDLG 0
+# endif
+#endif /* !defined(wxUSE_FILEDLG) */
+
+#ifndef wxUSE_FILEPICKERCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FILEPICKERCTRL must be defined."
+# else
+# define wxUSE_FILEPICKERCTRL 0
+# endif
+#endif /* !defined(wxUSE_FILEPICKERCTRL) */
+
+#ifndef wxUSE_FONTDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FONTDLG must be defined."
+# else
+# define wxUSE_FONTDLG 0
+# endif
+#endif /* !defined(wxUSE_FONTDLG) */
+
+#ifndef wxUSE_FONTMAP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FONTMAP must be defined."
+# else
+# define wxUSE_FONTMAP 0
+# endif
+#endif /* !defined(wxUSE_FONTMAP) */
+
+#ifndef wxUSE_FONTPICKERCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FONTPICKERCTRL must be defined."
+# else
+# define wxUSE_FONTPICKERCTRL 0
+# endif
+#endif /* !defined(wxUSE_FONTPICKERCTRL) */
+
+#ifndef wxUSE_GAUGE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_GAUGE must be defined."
+# else
+# define wxUSE_GAUGE 0
+# endif
+#endif /* !defined(wxUSE_GAUGE) */
+
+#ifndef wxUSE_GRAPHICS_CONTEXT
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_GRAPHICS_CONTEXT must be defined."
+# else
+# define wxUSE_GRAPHICS_CONTEXT 0
+# endif
+#endif /* !defined(wxUSE_GRAPHICS_CONTEXT) */
+
+
+#ifndef wxUSE_GRID
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_GRID must be defined."
+# else
+# define wxUSE_GRID 0
+# endif
+#endif /* !defined(wxUSE_GRID) */
+
+#ifndef wxUSE_HELP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_HELP must be defined."
+# else
+# define wxUSE_HELP 0
+# endif
+#endif /* !defined(wxUSE_HELP) */
+
+#ifndef wxUSE_HYPERLINKCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_HYPERLINKCTRL must be defined."
+# else
+# define wxUSE_HYPERLINKCTRL 0
+# endif
+#endif /* !defined(wxUSE_HYPERLINKCTRL) */
+
+#ifndef wxUSE_HTML
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_HTML must be defined."
+# else
+# define wxUSE_HTML 0
+# endif
+#endif /* !defined(wxUSE_HTML) */
+
+#ifndef wxUSE_LIBMSPACK
+# ifndef __UNIX__
+ /* set to 0 on platforms that don't have libmspack */
+# define wxUSE_LIBMSPACK 0
+# else
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LIBMSPACK must be defined."
+# else
+# define wxUSE_LIBMSPACK 0
+# endif
+# endif
+#endif /* !defined(wxUSE_LIBMSPACK) */
+
+#ifndef wxUSE_ICO_CUR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ICO_CUR must be defined."
+# else
+# define wxUSE_ICO_CUR 0
+# endif
+#endif /* !defined(wxUSE_ICO_CUR) */
+
+#ifndef wxUSE_IFF
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_IFF must be defined."
+# else
+# define wxUSE_IFF 0
+# endif
+#endif /* !defined(wxUSE_IFF) */
+
+#ifndef wxUSE_IMAGLIST
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_IMAGLIST must be defined."
+# else
+# define wxUSE_IMAGLIST 0
+# endif
+#endif /* !defined(wxUSE_IMAGLIST) */
+
+#ifndef wxUSE_JOYSTICK
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_JOYSTICK must be defined."
+# else
+# define wxUSE_JOYSTICK 0
+# endif
+#endif /* !defined(wxUSE_JOYSTICK) */
+
+#ifndef wxUSE_LISTBOOK
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LISTBOOK must be defined."
+# else
+# define wxUSE_LISTBOOK 0
+# endif
+#endif /* !defined(wxUSE_LISTBOOK) */
+
+#ifndef wxUSE_LISTBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LISTBOX must be defined."
+# else
+# define wxUSE_LISTBOX 0
+# endif
+#endif /* !defined(wxUSE_LISTBOX) */
+
+#ifndef wxUSE_LISTCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LISTCTRL must be defined."
+# else
+# define wxUSE_LISTCTRL 0
+# endif
+#endif /* !defined(wxUSE_LISTCTRL) */
+
+#ifndef wxUSE_LOGGUI
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LOGGUI must be defined."
+# else
+# define wxUSE_LOGGUI 0
+# endif
+#endif /* !defined(wxUSE_LOGGUI) */
+
+#ifndef wxUSE_LOGWINDOW
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LOGWINDOW must be defined."
+# else
+# define wxUSE_LOGWINDOW 0
+# endif
+#endif /* !defined(wxUSE_LOGWINDOW) */
+
+#ifndef wxUSE_LOG_DIALOG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LOG_DIALOG must be defined."
+# else
+# define wxUSE_LOG_DIALOG 0
+# endif
+#endif /* !defined(wxUSE_LOG_DIALOG) */
+
+#ifndef wxUSE_MDI
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MDI must be defined."
+# else
+# define wxUSE_MDI 0
+# endif
+#endif /* !defined(wxUSE_MDI) */
+
+#ifndef wxUSE_MDI_ARCHITECTURE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MDI_ARCHITECTURE must be defined."
+# else
+# define wxUSE_MDI_ARCHITECTURE 0
+# endif
+#endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
+
+#ifndef wxUSE_MENUS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MENUS must be defined."
+# else
+# define wxUSE_MENUS 0
+# endif
+#endif /* !defined(wxUSE_MENUS) */
+
+#ifndef wxUSE_MSGDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MSGDLG must be defined."
+# else
+# define wxUSE_MSGDLG 0
+# endif
+#endif /* !defined(wxUSE_MSGDLG) */
+
+#ifndef wxUSE_NOTEBOOK
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_NOTEBOOK must be defined."
+# else
+# define wxUSE_NOTEBOOK 0
+# endif
+#endif /* !defined(wxUSE_NOTEBOOK) */
+
+#ifndef wxUSE_ODCOMBOBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ODCOMBOBOX must be defined."
+# else
+# define wxUSE_ODCOMBOBOX 0
+# endif
+#endif /* !defined(wxUSE_ODCOMBOBOX) */
+
+#ifndef wxUSE_PALETTE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PALETTE must be defined."
+# else
+# define wxUSE_PALETTE 0
+# endif
+#endif /* !defined(wxUSE_PALETTE) */
+
+#ifndef wxUSE_POPUPWIN
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_POPUPWIN must be defined."
+# else
+# define wxUSE_POPUPWIN 0
+# endif
+#endif /* !defined(wxUSE_POPUPWIN) */
+
+#ifndef wxUSE_PRINTING_ARCHITECTURE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PRINTING_ARCHITECTURE must be defined."
+# else
+# define wxUSE_PRINTING_ARCHITECTURE 0
+# endif
+#endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
+
+#ifndef wxUSE_RADIOBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_RADIOBOX must be defined."
+# else
+# define wxUSE_RADIOBOX 0
+# endif
+#endif /* !defined(wxUSE_RADIOBOX) */
+
+#ifndef wxUSE_RADIOBTN
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_RADIOBTN must be defined."
+# else
+# define wxUSE_RADIOBTN 0
+# endif
+#endif /* !defined(wxUSE_RADIOBTN) */
+
+#ifndef wxUSE_SASH
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SASH must be defined."
+# else
+# define wxUSE_SASH 0
+# endif
+#endif /* !defined(wxUSE_SASH) */
+
+#ifndef wxUSE_SCROLLBAR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SCROLLBAR must be defined."
+# else
+# define wxUSE_SCROLLBAR 0
+# endif
+#endif /* !defined(wxUSE_SCROLLBAR) */
+
+#ifndef wxUSE_SLIDER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SLIDER must be defined."
+# else
+# define wxUSE_SLIDER 0
+# endif
+#endif /* !defined(wxUSE_SLIDER) */
+
+#ifndef wxUSE_SOUND
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SOUND must be defined."
+# else
+# define wxUSE_SOUND 0
+# endif
+#endif /* !defined(wxUSE_SOUND) */
+
+#ifndef wxUSE_SPINBTN
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SPINBTN must be defined."
+# else
+# define wxUSE_SPINBTN 0
+# endif
+#endif /* !defined(wxUSE_SPINBTN) */
+
+#ifndef wxUSE_SPINCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SPINCTRL must be defined."
+# else
+# define wxUSE_SPINCTRL 0
+# endif
+#endif /* !defined(wxUSE_SPINCTRL) */
+
+#ifndef wxUSE_SPLASH
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SPLASH must be defined."
+# else
+# define wxUSE_SPLASH 0
+# endif
+#endif /* !defined(wxUSE_SPLASH) */
+
+#ifndef wxUSE_SPLITTER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SPLITTER must be defined."
+# else
+# define wxUSE_SPLITTER 0
+# endif
+#endif /* !defined(wxUSE_SPLITTER) */
+
+#ifndef wxUSE_STATBMP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STATBMP must be defined."
+# else
+# define wxUSE_STATBMP 0
+# endif
+#endif /* !defined(wxUSE_STATBMP) */
+
+#ifndef wxUSE_STATBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STATBOX must be defined."
+# else
+# define wxUSE_STATBOX 0
+# endif
+#endif /* !defined(wxUSE_STATBOX) */
+
+#ifndef wxUSE_STATLINE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STATLINE must be defined."
+# else
+# define wxUSE_STATLINE 0
+# endif
+#endif /* !defined(wxUSE_STATLINE) */
+
+#ifndef wxUSE_STATTEXT
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STATTEXT must be defined."
+# else
+# define wxUSE_STATTEXT 0
+# endif
+#endif /* !defined(wxUSE_STATTEXT) */
+
+#ifndef wxUSE_STATUSBAR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STATUSBAR must be defined."
+# else
+# define wxUSE_STATUSBAR 0
+# endif
+#endif /* !defined(wxUSE_STATUSBAR) */
+
+#ifndef wxUSE_TAB_DIALOG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TAB_DIALOG must be defined."
+# else
+# define wxUSE_TAB_DIALOG 0
+# endif
+#endif /* !defined(wxUSE_TAB_DIALOG) */
+
+#ifndef wxUSE_TEXTCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TEXTCTRL must be defined."
+# else
+# define wxUSE_TEXTCTRL 0
+# endif
+#endif /* !defined(wxUSE_TEXTCTRL) */
+
+#ifndef wxUSE_TIPWINDOW
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TIPWINDOW must be defined."
+# else
+# define wxUSE_TIPWINDOW 0
+# endif
+#endif /* !defined(wxUSE_TIPWINDOW) */
+
+#ifndef wxUSE_TOOLBAR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TOOLBAR must be defined."
+# else
+# define wxUSE_TOOLBAR 0
+# endif
+#endif /* !defined(wxUSE_TOOLBAR) */
+
+#ifndef wxUSE_TOOLTIPS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TOOLTIPS must be defined."
+# else
+# define wxUSE_TOOLTIPS 0
+# endif
+#endif /* !defined(wxUSE_TOOLTIPS) */
+
+#ifndef wxUSE_TREECTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TREECTRL must be defined."
+# else
+# define wxUSE_TREECTRL 0
+# endif
+#endif /* !defined(wxUSE_TREECTRL) */
+
+#ifndef wxUSE_VALIDATORS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_VALIDATORS must be defined."
+# else
+# define wxUSE_VALIDATORS 0
+# endif
+#endif /* !defined(wxUSE_VALIDATORS) */
+
+#ifndef wxUSE_WXHTML_HELP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_WXHTML_HELP must be defined."
+# else
+# define wxUSE_WXHTML_HELP 0
+# endif
+#endif /* !defined(wxUSE_WXHTML_HELP) */
+
+#ifndef wxUSE_XRC
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_XRC must be defined."
+# else
+# define wxUSE_XRC 0
+# endif
+#endif /* !defined(wxUSE_XRC) */
+
+#endif /* wxUSE_GUI */
+
+/*
+ check consistency of the settings
+ */
+
+#if WXWIN_COMPATIBILITY_2_4
+# if !WXWIN_COMPATIBILITY_2_6
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "2.4.X compatibility requires 2.6.X compatibility"
+# else
+# undef WXWIN_COMPATIBILITY_2_6
+# define WXWIN_COMPATIBILITY_2_6 1
+# endif
+# endif
+#endif /* WXWIN_COMPATIBILITY_2_4 */
+
+#if wxUSE_ARCHIVE_STREAMS
+# if !wxUSE_DATETIME
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxArchive requires wxUSE_DATETIME"
+# else
+# undef wxUSE_ARCHIVE_STREAMS
+# define wxUSE_ARCHIVE_STREAMS 0
+# endif
+# endif
+#endif /* wxUSE_ARCHIVE_STREAMS */
+
+#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
+# else
+# undef wxUSE_CRASHREPORT
+# define wxUSE_CRASHREPORT 0
+# endif
+#endif /* wxUSE_CRASHREPORT */
+
+#if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
+# if !wxUSE_PROTOCOL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
+# else
+# undef wxUSE_PROTOCOL
+# define wxUSE_PROTOCOL 1
+# endif
+# endif
+#endif /* wxUSE_PROTOCOL_XXX */
+
+#if wxUSE_URL
+# if !wxUSE_PROTOCOL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_URL requires wxUSE_PROTOCOL"
+# else
+# undef wxUSE_PROTOCOL
+# define wxUSE_PROTOCOL 1
+# endif
+# endif
+#endif /* wxUSE_URL */
+
+#if wxUSE_PROTOCOL
+# if !wxUSE_SOCKETS
+# if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
+# else
+# undef wxUSE_SOCKETS
+# define wxUSE_SOCKETS 1
+# endif
+# endif
+# endif
+
+# if !wxUSE_STREAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
+# else
+# undef wxUSE_STREAMS
+# define wxUSE_STREAMS 1
+# endif
+# endif
+#endif /* wxUSE_PROTOCOL */
+
+/* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
+#if wxUSE_HTML
+# if !wxUSE_FILESYSTEM
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxHTML requires wxFileSystem"
+# else
+# undef wxUSE_FILESYSTEM
+# define wxUSE_FILESYSTEM 1
+# endif
+# endif
+#endif /* wxUSE_HTML */
+
+#if wxUSE_FS_ARCHIVE
+# if !wxUSE_FILESYSTEM
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxArchiveFSHandler requires wxFileSystem"
+# else
+# undef wxUSE_FILESYSTEM
+# define wxUSE_FILESYSTEM 1
+# endif
+# endif
+# if !wxUSE_ARCHIVE_STREAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxArchiveFSHandler requires wxArchive"
+# else
+# undef wxUSE_ARCHIVE_STREAMS
+# define wxUSE_ARCHIVE_STREAMS 1
+# endif
+# endif
+#endif /* wxUSE_FS_ARCHIVE */
+
+#if wxUSE_FILESYSTEM
+# if !wxUSE_STREAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
+# else
+# undef wxUSE_STREAMS
+# define wxUSE_STREAMS 1
+# endif
+# endif
+# if !wxUSE_FILE && !wxUSE_FFILE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FILESYSTEM requires either wxUSE_FILE or wxUSE_FFILE"
+# else
+# undef wxUSE_FILE
+# define wxUSE_FILE 1
+# undef wxUSE_FFILE
+# define wxUSE_FFILE 1
+# endif
+# endif
+#endif /* wxUSE_FILESYSTEM */
+
+#if wxUSE_FS_INET
+# if !wxUSE_PROTOCOL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
+# else
+# undef wxUSE_PROTOCOL
+# define wxUSE_PROTOCOL 1
+# endif
+# endif
+#endif /* wxUSE_FS_INET */
+
+#if wxUSE_STOPWATCH || wxUSE_DATETIME
+# if !wxUSE_LONGLONG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
+# else
+# undef wxUSE_LONGLONG
+# define wxUSE_LONGLONG 1
+# endif
+# endif
+#endif /* wxUSE_STOPWATCH */
+
+#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
+# else
+# undef wxUSE_TEXTFILE
+# define wxUSE_TEXTFILE 1
+# endif
+#endif /* wxUSE_MIMETYPE */
+
+#if wxUSE_ODBC
+# if !wxUSE_DATETIME
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxODBC requires wxUSE_DATETIME"
+# else
+# undef wxUSE_ODBC
+# define wxUSE_ODBC 0
+# endif
+# endif
+#endif /* wxUSE_ODBC */
+
+#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
+# else
+# undef wxUSE_TEXTBUFFER
+# define wxUSE_TEXTBUFFER 1
+# endif
+#endif /* wxUSE_TEXTFILE */
+
+#if wxUSE_TEXTFILE && !wxUSE_FILE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TEXTFILE requires wxUSE_FILE"
+# else
+# undef wxUSE_FILE
+# define wxUSE_FILE 1
+# endif
+#endif /* wxUSE_TEXTFILE */
+
+#if wxUSE_XML && !wxUSE_WCHAR_T
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_XML requires wxUSE_WCHAR_T"
+# else
+# undef wxUSE_XML
+# define wxUSE_XML 0
+# endif
+#endif /* wxUSE_XML */
+
+#if !wxUSE_DYNLIB_CLASS
+# if wxUSE_DYNAMIC_LOADER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
+# else
+# define wxUSE_DYNLIB_CLASS 1
+# endif
+# endif
+#endif /* wxUSE_DYNLIB_CLASS */
+
+#if wxUSE_ZIPSTREAM
+# if !wxUSE_ZLIB
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxZip requires wxZlib"
+# else
+# undef wxUSE_ZLIB
+# define wxUSE_ZLIB 1
+# endif
+# endif
+# if !wxUSE_ARCHIVE_STREAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxZip requires wxArchive"
+# else
+# undef wxUSE_ARCHIVE_STREAMS
+# define wxUSE_ARCHIVE_STREAMS 1
+# endif
+# endif
+#endif /* wxUSE_ZIPSTREAM */
+
+#if wxUSE_TARSTREAM
+ /* wxTar doesn't currently compile without wchar_t */
+# if !wxUSE_WCHAR_T
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxTar requires wchar_t"
+# else
+# undef wxUSE_TARSTREAM
+# define wxUSE_TARSTREAM 0
+# endif
+# endif
+#endif /* wxUSE_TARSTREAM */
+
+#if wxUSE_TARSTREAM
+# if !wxUSE_ARCHIVE_STREAMS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxTar requires wxArchive"
+# else
+# undef wxUSE_ARCHIVE_STREAMS
+# define wxUSE_ARCHIVE_STREAMS 1
+# endif
+# endif
+#endif /* wxUSE_TARSTREAM */
+
+/* the rest of the tests is for the GUI settings only */
+#if wxUSE_GUI
+
+#if wxUSE_BUTTON || \
+ wxUSE_CALENDARCTRL || \
+ wxUSE_CARET || \
+ wxUSE_COMBOBOX || \
+ wxUSE_BMPBUTTON || \
+ wxUSE_CHECKBOX || \
+ wxUSE_CHECKLISTBOX || \
+ wxUSE_CHOICE || \
+ wxUSE_GAUGE || \
+ wxUSE_GRID || \
+ wxUSE_LISTBOX || \
+ wxUSE_LISTCTRL || \
+ wxUSE_NOTEBOOK || \
+ wxUSE_RADIOBOX || \
+ wxUSE_RADIOBTN || \
+ wxUSE_SCROLLBAR || \
+ wxUSE_SLIDER || \
+ wxUSE_SPINBTN || \
+ wxUSE_SPINCTRL || \
+ wxUSE_STATBMP || \
+ wxUSE_STATBOX || \
+ wxUSE_STATLINE || \
+ wxUSE_STATTEXT || \
+ wxUSE_STATUSBAR || \
+ wxUSE_TEXTCTRL || \
+ wxUSE_TOOLBAR || \
+ wxUSE_TREECTRL
+# if !wxUSE_CONTROLS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_CONTROLS unset but some controls used"
+# else
+# undef wxUSE_CONTROLS
+# define wxUSE_CONTROLS 1
+# endif
+# endif
+#endif /* controls */
+
+#if wxUSE_BMPBUTTON
+# if !wxUSE_BUTTON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
+# else
+# undef wxUSE_BUTTON
+# define wxUSE_BUTTON 1
+# endif
+# endif
+#endif /* wxUSE_BMPBUTTON */
+
+/*
+ wxUSE_BOOKCTRL should be only used if any of the controls deriving from it
+ are used
+ */
+#ifdef wxUSE_BOOKCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BOOKCTRL is defined automatically, don't define it"
+# else
+# undef wxUSE_BOOKCTRL
+# endif
+#endif
+
+#define wxUSE_BOOKCTRL (wxUSE_NOTEBOOK || \
+ wxUSE_LISTBOOK || \
+ wxUSE_CHOICEBOOK || \
+ wxUSE_TOOLBOOK || \
+ wxUSE_TREEBOOK)
+
+#if wxUSE_COLLPANE
+# if !wxUSE_BUTTON || !wxUSE_STATLINE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_COLLPANE requires wxUSE_BUTTON and wxUSE_STATLINE"
+# else
+# undef wxUSE_COLLPANE
+# define wxUSE_COLLPANE 0
+# endif
+# endif
+#endif /* wxUSE_COLLPANE */
+
+#if wxUSE_LISTBOOK
+# if !wxUSE_LISTCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxListbook requires wxListCtrl"
+# else
+# undef wxUSE_LISTCTRL
+# define wxUSE_LISTCTRL 1
+# endif
+# endif
+#endif /* wxUSE_LISTBOOK */
+
+#if wxUSE_CHOICEBOOK
+# if !wxUSE_CHOICE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxChoicebook requires wxChoice"
+# else
+# undef wxUSE_CHOICE
+# define wxUSE_CHOICE 1
+# endif
+# endif
+#endif /* wxUSE_CHOICEBOOK */
+
+#if wxUSE_TOOLBOOK
+# if !wxUSE_TOOLBAR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxToolbook requires wxToolBar"
+# else
+# undef wxUSE_TOOLBAR
+# define wxUSE_TOOLBAR 1
+# endif
+# endif
+#endif /* wxUSE_TOOLBOOK */
+
+#if !wxUSE_ODCOMBOBOX
+# if wxUSE_BITMAPCOMBOBOX
+# error "wxBitmapComboBox requires wxOwnerDrawnComboBox"
+# else
+# undef wxUSE_BITMAPCOMBOBOX
+# define wxUSE_BITMAPCOMBOBOX 0
+# endif
+#endif /* !wxUSE_ODCOMBOBOX */
+
+/* don't attempt to use native status bar on the platforms not having it */
+#ifndef wxUSE_NATIVE_STATUSBAR
+# define wxUSE_NATIVE_STATUSBAR 0
+#elif wxUSE_NATIVE_STATUSBAR
+# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
+ defined(__WXMAC__) || \
+ defined(__WXPALMOS__) )
+# undef wxUSE_NATIVE_STATUSBAR
+# define wxUSE_NATIVE_STATUSBAR 0
+# endif
+#endif
+
+#if wxUSE_GRAPHICS_CONTEXT && !wxUSE_GEOMETRY
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_GRAPHICS_CONTEXT requires wxUSE_GEOMETRY"
+# else
+# undef wxUSE_GRAPHICS_CONTEXT
+# define wxUSE_GRAPHICS_CONTEXT 0
+# endif
+#endif /* wxUSE_GRAPHICS_CONTEXT */
+
+
+/* wxGTK-specific dependencies */
+#ifdef __WXGTK__
+# ifndef __WXUNIVERSAL__
+# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "MDI requires wxUSE_MENUS in wxGTK"
+# else
+# undef wxUSE_MENUS
+# define wxUSE_MENUS 1
+# endif
+# endif
+# endif /* !__WXUNIVERSAL__ */
+
+# if wxUSE_JOYSTICK
+# if !wxUSE_THREADS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxJoystick requires threads in wxGTK"
+# else
+# undef wxUSE_JOYSTICK
+# define wxUSE_JOYSTICK 0
+# endif
+# endif
+# endif
+#endif /* wxGTK && !wxUniv */
+
+/* Hopefully we can emulate these dialogs in due course */
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
+# ifdef wxUSE_COLOURDLG
+# undef wxUSE_COLOURDLG
+# define wxUSE_COLOURDLG 0
+# endif
+#endif /* __SMARTPHONE__ && __WXWINCE__ */
+
+
+/* generic controls dependencies */
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
+# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
+ /* all common controls are needed by these dialogs */
+# if !defined(wxUSE_CHOICE) || \
+ !defined(wxUSE_TEXTCTRL) || \
+ !defined(wxUSE_BUTTON) || \
+ !defined(wxUSE_CHECKBOX) || \
+ !defined(wxUSE_STATTEXT)
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "These common controls are needed by common dialogs"
+# else
+# undef wxUSE_CHOICE
+# define wxUSE_CHOICE 1
+# undef wxUSE_TEXTCTRL
+# define wxUSE_TEXTCTRL 1
+# undef wxUSE_BUTTON
+# define wxUSE_BUTTON 1
+# undef wxUSE_CHECKBOX
+# define wxUSE_CHECKBOX 1
+# undef wxUSE_STATTEXT
+# define wxUSE_STATTEXT 1
+# endif
+# endif
+# endif
+#endif /* !wxMSW || wxUniv */
+
+/* common dependencies */
+#if wxUSE_CALENDARCTRL
+# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
+# else
+# undef wxUSE_SPINBTN
+# undef wxUSE_COMBOBOX
+# define wxUSE_SPINBTN 1
+# define wxUSE_COMBOBOX 1
+# endif
+# endif
+
+# if !wxUSE_DATETIME
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxCalendarCtrl requires wxUSE_DATETIME"
+# else
+# undef wxUSE_DATETIME
+# define wxUSE_DATETIME 1
+# endif
+# endif
+#endif /* wxUSE_CALENDARCTRL */
+
+#if wxUSE_DATEPICKCTRL
+# if !wxUSE_DATETIME
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxDatePickerCtrl requires wxUSE_DATETIME"
+# else
+# undef wxUSE_DATETIME
+# define wxUSE_DATETIME 1
+# endif
+# endif
+#endif /* wxUSE_DATEPICKCTRL */
+
+#if wxUSE_CHECKLISTBOX
+# if !wxUSE_LISTBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxCheckListBox requires wxListBox"
+# else
+# undef wxUSE_LISTBOX
+# define wxUSE_LISTBOX 1
+# endif
+# endif
+#endif /* wxUSE_CHECKLISTBOX */
+
+#if wxUSE_CHOICEDLG
+# if !wxUSE_LISTBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "Choice dialogs requires wxListBox"
+# else
+# undef wxUSE_LISTBOX
+# define wxUSE_LISTBOX 1
+# endif
+# endif
+#endif /* wxUSE_CHOICEDLG */
+
+#if wxUSE_HELP
+# if !wxUSE_BMPBUTTON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_HELP requires wxUSE_BMPBUTTON"
+# else
+# undef wxUSE_BMPBUTTON
+# define wxUSE_BMPBUTTON 1
+# endif
+# endif
+
+# if !wxUSE_CHOICEDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_HELP requires wxUSE_CHOICEDLG"
+# else
+# undef wxUSE_CHOICEDLG
+# define wxUSE_CHOICEDLG 1
+# endif
+# endif
+#endif /* wxUSE_HELP */
+
+#if wxUSE_MS_HTML_HELP
+ /*
+ this doesn't make sense for platforms other than MSW but we still
+ define it in wx/setup_inc.h so don't complain if it happens to be
+ defined under another platform but just silently fix it.
+ */
+# ifndef __WXMSW__
+# undef wxUSE_MS_HTML_HELP
+# define wxUSE_MS_HTML_HELP 0
+# endif
+#endif /* wxUSE_MS_HTML_HELP */
+
+#if wxUSE_WXHTML_HELP
+# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK || !wxUSE_SPINCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "Built in help controller can't be compiled"
+# else
+# undef wxUSE_HELP
+# define wxUSE_HELP 1
+# undef wxUSE_HTML
+# define wxUSE_HTML 1
+# undef wxUSE_COMBOBOX
+# define wxUSE_COMBOBOX 1
+# undef wxUSE_NOTEBOOK
+# define wxUSE_NOTEBOOK 1
+# undef wxUSE_SPINCTRL
+# define wxUSE_SPINCTRL 1
+# endif
+# endif
+#endif /* wxUSE_WXHTML_HELP */
+
+#if !wxUSE_IMAGE
+/*
+ The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the
+ user explicitly wants this and disable all other features that require
+ wxUSE_IMAGE.
+ */
+# if wxUSE_DRAGIMAGE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE"
+# else
+# undef wxUSE_DRAGIMAGE
+# define wxUSE_DRAGIMAGE 0
+# endif
+# endif
+
+# if wxUSE_LIBPNG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LIBPNG requires wxUSE_IMAGE"
+# else
+# undef wxUSE_LIBPNG
+# define wxUSE_LIBPNG 0
+# endif
+# endif
+
+# if wxUSE_LIBJPEG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LIBJPEG requires wxUSE_IMAGE"
+# else
+# undef wxUSE_LIBJPEG
+# define wxUSE_LIBJPEG 0
+# endif
+# endif
+
+# if wxUSE_LIBTIFF
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LIBTIFF requires wxUSE_IMAGE"
+# else
+# undef wxUSE_LIBTIFF
+# define wxUSE_LIBTIFF 0
+# endif
+# endif
+
+# if wxUSE_GIF
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_GIF requires wxUSE_IMAGE"
+# else
+# undef wxUSE_GIF
+# define wxUSE_GIF 0
+# endif
+# endif
+
+# if wxUSE_PNM
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PNM requires wxUSE_IMAGE"
+# else
+# undef wxUSE_PNM
+# define wxUSE_PNM 0
+# endif
+# endif
+
+# if wxUSE_PCX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_PCX requires wxUSE_IMAGE"
+# else
+# undef wxUSE_PCX
+# define wxUSE_PCX 0
+# endif
+# endif
+
+# if wxUSE_IFF
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_IFF requires wxUSE_IMAGE"
+# else
+# undef wxUSE_IFF
+# define wxUSE_IFF 0
+# endif
+# endif
+
+# if wxUSE_TOOLBAR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TOOLBAR requires wxUSE_IMAGE"
+# else
+# undef wxUSE_TOOLBAR
+# define wxUSE_TOOLBAR 0
+# endif
+# endif
+
+# if wxUSE_XPM
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_XPM requires wxUSE_IMAGE"
+# else
+# undef wxUSE_XPM
+# define wxUSE_XPM 0
+# endif
+# endif
+
+#endif /* !wxUSE_IMAGE */
+
+#if wxUSE_DOC_VIEW_ARCHITECTURE
+# if !wxUSE_MENUS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "DocView requires wxUSE_MENUS"
+# else
+# undef wxUSE_MENUS
+# define wxUSE_MENUS 1
+# endif
+# endif
+
+# if !wxUSE_CHOICEDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "DocView requires wxUSE_CHOICEDLG"
+# else
+# undef wxUSE_CHOICEDLG
+# define wxUSE_CHOICEDLG 1
+# endif
+# endif
+
+# if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
+# else
+# undef wxUSE_STREAMS
+# define wxUSE_STREAMS 1
+# endif
+# endif
+#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
+
+#if wxUSE_PRINTING_ARCHITECTURE
+# if !wxUSE_COMBOBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "Print dialog requires wxUSE_COMBOBOX"
+# else
+# undef wxUSE_COMBOBOX
+# define wxUSE_COMBOBOX 1
+# endif
+# endif
+#endif /* wxUSE_PRINTING_ARCHITECTURE */
+
+#if wxUSE_MDI_ARCHITECTURE
+# if !wxUSE_MDI
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "MDI requires wxUSE_MDI"
+# else
+# undef wxUSE_MDI
+# define wxUSE_MDI 1
+# endif
+# endif
+
+# if !wxUSE_DOC_VIEW_ARCHITECTURE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MDI_ARCHITECTURE requires wxUSE_DOC_VIEW_ARCHITECTURE"
+# else
+# undef wxUSE_DOC_VIEW_ARCHITECTURE
+# define wxUSE_DOC_VIEW_ARCHITECTURE 1
+# endif
+# endif
+#endif /* wxUSE_MDI_ARCHITECTURE */
+
+#if !wxUSE_FILEDLG
+# if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_FILEDLG is required by wxUSE_DOC_VIEW_ARCHITECTURE and wxUSE_WXHTML_HELP!"
+# else
+# undef wxUSE_FILEDLG
+# define wxUSE_FILEDLG 1
+# endif
+# endif
+#endif /* wxUSE_FILEDLG */
+
+#if !wxUSE_GAUGE || !wxUSE_BUTTON
+# if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
+# else
+# undef wxUSE_GAUGE
+# undef wxUSE_BUTTON
+# define wxUSE_GAUGE 1
+# define wxUSE_BUTTON 1
+# endif
+# endif
+#endif /* !wxUSE_GAUGE */
+
+#if !wxUSE_BUTTON
+# if wxUSE_FONTDLG || \
+ wxUSE_FILEDLG || \
+ wxUSE_CHOICEDLG || \
+ wxUSE_NUMBERDLG || \
+ wxUSE_TEXTDLG || \
+ wxUSE_DIRDLG || \
+ wxUSE_STARTUP_TIPS || \
+ wxUSE_WIZARDDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "Common and generic dialogs require wxUSE_BUTTON"
+# else
+# undef wxUSE_BUTTON
+# define wxUSE_BUTTON 1
+# endif
+# endif
+#endif /* !wxUSE_BUTTON */
+
+#if !wxUSE_TOOLBAR
+# if wxUSE_TOOLBAR_NATIVE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
+# else
+# undef wxUSE_TOOLBAR_NATIVE
+# define wxUSE_TOOLBAR_NATIVE 0
+# endif
+# endif
+#endif
+
+#if !wxUSE_IMAGLIST
+# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxImageList must be compiled as well"
+# else
+# undef wxUSE_IMAGLIST
+# define wxUSE_IMAGLIST 1
+# endif
+# endif
+#endif /* !wxUSE_IMAGLIST */
+
+#if !wxUSE_MSGDLG
+# ifdef wxABORT_ON_CONFIG_ERROR
+ /* FIXME: should compile without it, of course, but doesn't */
+# error "wxMessageBox is always needed"
+# else
+# undef wxUSE_MSGDLG
+# define wxUSE_MSGDLG 1
+# endif
+#endif
+
+#if wxUSE_RADIOBOX
+# if !wxUSE_RADIOBTN
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN"
+# else
+# undef wxUSE_RADIOBTN
+# define wxUSE_RADIOBTN 1
+# endif
+# endif
+# if !wxUSE_STATBOX && !defined(__WXPALMOS__)
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
+# else
+# undef wxUSE_STATBOX
+# define wxUSE_STATBOX 1
+# endif
+# endif
+#endif /* wxUSE_RADIOBOX */
+
+#if wxUSE_LOGWINDOW
+# if !wxUSE_TEXTCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
+# else
+# undef wxUSE_TEXTCTRL
+# define wxUSE_TEXTCTRL 1
+# endif
+# endif
+#endif /* wxUSE_LOGWINDOW */
+
+#if wxUSE_LOG_DIALOG
+# if !wxUSE_LISTCTRL || !wxUSE_BUTTON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON"
+# else
+# undef wxUSE_LISTCTRL
+# define wxUSE_LISTCTRL 1
+# undef wxUSE_BUTTON
+# define wxUSE_BUTTON 1
+# endif
+# endif
+#endif /* wxUSE_LOG_DIALOG */
+
+#if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxClipboard requires wxDataObject"
+# else
+# undef wxUSE_DATAOBJ
+# define wxUSE_DATAOBJ 1
+# endif
+#endif /* wxUSE_CLIPBOARD */
+
+#if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxr resources require PrologIO"
+# else
+# undef wxUSE_PROLOGIO
+# define wxUSE_PROLOGIO 1
+# endif
+#endif /* wxUSE_WX_RESOURCES */
+
+#if wxUSE_XRC && !wxUSE_XML
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_XRC requires wxUSE_XML"
+# else
+# undef wxUSE_XRC
+# define wxUSE_XRC 0
+# endif
+#endif /* wxUSE_XRC */
+
+#if wxUSE_SOCKETS && !wxUSE_STOPWATCH
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_SOCKETS requires wxUSE_STOPWATCH"
+# else
+# undef wxUSE_SOCKETS
+# define wxUSE_SOCKETS 0
+# endif
+#endif /* wxUSE_SOCKETS */
+
+#if !wxUSE_VARIANT
+# if wxUSE_DATAVIEWCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxDataViewCtrl requires wxVariant"
+# else
+# undef wxUSE_DATAVIEWCTRL
+# define wxUSE_DATAVIEWCTRL 0
+# endif
+# endif
+
+# if wxUSE_ODBC
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ODBC requires wxVariant"
+# else
+# undef wxUSE_ODBC
+# define wxUSE_ODBC 0
+# endif
+# endif
+#endif /* wxUSE_VARIANT */
+
+#endif /* wxUSE_GUI */
diff --git a/3rdparty/wxWidgets/include/wx/choicdlg.h b/3rdparty/wxWidgets/include/wx/choicdlg.h
new file mode 100644
index 0000000000..29cd37867d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/choicdlg.h
@@ -0,0 +1,22 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/choicdgg.h
+// Purpose: Includes generic choice dialog file
+// Author: Julian Smart
+// Modified by:
+// Created:
+// RCS-ID: $Id: choicdlg.h 33948 2005-05-04 18:57:50Z JS $
+// Copyright: Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CHOICDLG_H_BASE_
+#define _WX_CHOICDLG_H_BASE_
+
+#if wxUSE_CHOICEDLG
+
+#include "wx/generic/choicdgg.h"
+
+#endif
+
+#endif
+ // _WX_CHOICDLG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/choice.h b/3rdparty/wxWidgets/include/wx/choice.h
new file mode 100644
index 0000000000..5c4ebb0cc1
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/choice.h
@@ -0,0 +1,88 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/choice.h
+// Purpose: wxChoice class interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 26.07.99
+// RCS-ID: $Id: choice.h 42727 2006-10-30 16:04:27Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CHOICE_H_BASE_
+#define _WX_CHOICE_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_CHOICE
+
+#include "wx/ctrlsub.h" // the base class
+
+// ----------------------------------------------------------------------------
+// global data
+// ----------------------------------------------------------------------------
+
+extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxChoice allows to select one of a non-modifiable list of strings
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
+{
+public:
+ wxChoiceBase() { }
+ virtual ~wxChoiceBase();
+
+ // all generic methods are in wxControlWithItems
+
+ // get the current selection: this can only be different from the normal
+ // selection if the popup items list is currently opened and the user
+ // selected some item in it but didn't close the list yet; otherwise (and
+ // currently always on platforms other than MSW) this is the same as
+ // GetSelection()
+ virtual int GetCurrentSelection() const { return GetSelection(); }
+
+ // set/get the number of columns in the control (as they're not supported on
+ // most platforms, they do nothing by default)
+ virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
+ virtual int GetColumns() const { return 1 ; }
+
+ // emulate selecting the item event.GetInt()
+ void Command(wxCommandEvent& event);
+
+private:
+ DECLARE_NO_COPY_CLASS(wxChoiceBase)
+};
+
+// ----------------------------------------------------------------------------
+// include the platform-dependent class definition
+// ----------------------------------------------------------------------------
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/choice.h"
+#elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
+ #include "wx/msw/wince/choicece.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/choice.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/choice.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/choice.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/choice.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/choice.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/choice.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/choice.h"
+#endif
+
+#endif // wxUSE_CHOICE
+
+#endif // _WX_CHOICE_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/choicebk.h b/3rdparty/wxWidgets/include/wx/choicebk.h
new file mode 100644
index 0000000000..85182ccbcd
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/choicebk.h
@@ -0,0 +1,154 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/choicebk.h
+// Purpose: wxChoicebook: wxChoice and wxNotebook combination
+// Author: Vadim Zeitlin
+// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
+// Created: 15.09.04
+// RCS-ID: $Id: choicebk.h 56623 2008-10-31 23:07:49Z VZ $
+// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CHOICEBOOK_H_
+#define _WX_CHOICEBOOK_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_CHOICEBOOK
+
+#include "wx/bookctrl.h"
+#include "wx/choice.h"
+
+class WXDLLIMPEXP_FWD_CORE wxChoice;
+
+extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED;
+extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING;
+
+// wxChoicebook flags
+#define wxCHB_DEFAULT wxBK_DEFAULT
+#define wxCHB_TOP wxBK_TOP
+#define wxCHB_BOTTOM wxBK_BOTTOM
+#define wxCHB_LEFT wxBK_LEFT
+#define wxCHB_RIGHT wxBK_RIGHT
+#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
+
+// ----------------------------------------------------------------------------
+// wxChoicebook
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
+{
+public:
+ wxChoicebook()
+ {
+ Init();
+ }
+
+ wxChoicebook(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyString)
+ {
+ Init();
+
+ (void)Create(parent, id, pos, size, style, name);
+ }
+
+ // quasi ctor
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyString);
+
+
+ virtual int GetSelection() const;
+ virtual bool SetPageText(size_t n, const wxString& strText);
+ virtual wxString GetPageText(size_t n) const;
+ virtual int GetPageImage(size_t n) const;
+ virtual bool SetPageImage(size_t n, int imageId);
+ virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
+ virtual bool InsertPage(size_t n,
+ wxWindow *page,
+ const wxString& text,
+ bool bSelect = false,
+ int imageId = -1);
+ virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); }
+ virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }
+ virtual void SetImageList(wxImageList *imageList);
+
+ virtual bool DeleteAllPages();
+
+ // returns the choice control
+ wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
+
+protected:
+ virtual wxWindow *DoRemovePage(size_t page);
+
+ // get the size which the choice control should have
+ virtual wxSize GetControllerSize() const;
+
+ void UpdateSelectedPage(size_t newsel)
+ {
+ m_selection = wx_static_cast(int, newsel);
+ GetChoiceCtrl()->Select(newsel);
+ }
+
+ wxBookCtrlBaseEvent* CreatePageChangingEvent() const;
+ void MakeChangedEvent(wxBookCtrlBaseEvent &event);
+
+ // event handlers
+ void OnChoiceSelected(wxCommandEvent& event);
+
+ // the currently selected page or wxNOT_FOUND if none
+ int m_selection;
+
+private:
+ // common part of all constructors
+ void Init();
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook)
+};
+
+// ----------------------------------------------------------------------------
+// choicebook event class and related stuff
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent
+{
+public:
+ wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
+ int nSel = -1, int nOldSel = -1)
+ : wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
+ {
+ }
+
+ wxChoicebookEvent(const wxChoicebookEvent& event)
+ : wxBookCtrlBaseEvent(event)
+ {
+ }
+
+ virtual wxEvent *Clone() const { return new wxChoicebookEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChoicebookEvent)
+};
+
+typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&);
+
+#define wxChoicebookEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func)
+
+#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn))
+
+#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn))
+
+#endif // wxUSE_CHOICEBOOK
+
+#endif // _WX_CHOICEBOOK_H_
diff --git a/3rdparty/wxWidgets/include/wx/clipbrd.h b/3rdparty/wxWidgets/include/wx/clipbrd.h
new file mode 100644
index 0000000000..6f6ab4bf96
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/clipbrd.h
@@ -0,0 +1,145 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/clipbrd.h
+// Purpose: wxClipboad class and clipboard functions
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 19.10.99
+// RCS-ID: $Id: clipbrd.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) wxWidgets Team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CLIPBRD_H_BASE_
+#define _WX_CLIPBRD_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_CLIPBOARD
+
+
+#include "wx/object.h"
+#include "wx/wxchar.h"
+
+class WXDLLIMPEXP_FWD_CORE wxDataFormat;
+class WXDLLIMPEXP_FWD_CORE wxDataObject;
+class WXDLLIMPEXP_FWD_CORE wxClipboard;
+
+// ----------------------------------------------------------------------------
+// wxClipboard represents the system clipboard. Normally, you should use
+// wxTheClipboard which is a global pointer to the (unique) clipboard.
+//
+// Clipboard can be used to copy data to/paste data from. It works together
+// with wxDataObject.
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxClipboardBase : public wxObject
+{
+public:
+ wxClipboardBase() {}
+
+ // open the clipboard before Add/SetData() and GetData()
+ virtual bool Open() = 0;
+
+ // close the clipboard after Add/SetData() and GetData()
+ virtual void Close() = 0;
+
+ // query whether the clipboard is opened
+ virtual bool IsOpened() const = 0;
+
+ // add to the clipboard data
+ //
+ // NB: the clipboard owns the pointer and will delete it, so data must be
+ // allocated on the heap
+ virtual bool AddData( wxDataObject *data ) = 0;
+
+ // set the clipboard data, this is the same as Clear() followed by
+ // AddData()
+ virtual bool SetData( wxDataObject *data ) = 0;
+
+ // ask if data in correct format is available
+ virtual bool IsSupported( const wxDataFormat& format ) = 0;
+
+ // fill data with data on the clipboard (if available)
+ virtual bool GetData( wxDataObject& data ) = 0;
+
+ // clears wxTheClipboard and the system's clipboard if possible
+ virtual void Clear() = 0;
+
+ // flushes the clipboard: this means that the data which is currently on
+ // clipboard will stay available even after the application exits (possibly
+ // eating memory), otherwise the clipboard will be emptied on exit
+ virtual bool Flush() { return false; }
+
+ // X11 has two clipboards which get selected by this call. Empty on MSW.
+ virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
+
+ // Returns global instance (wxTheClipboard) of the object:
+ static wxClipboard *Get();
+};
+
+// ----------------------------------------------------------------------------
+// globals
+// ----------------------------------------------------------------------------
+
+// The global clipboard object - backward compatible access macro:
+#define wxTheClipboard (wxClipboard::Get())
+
+// ----------------------------------------------------------------------------
+// include platform-specific class declaration
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/clipbrd.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/clipbrd.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/clipbrd.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/clipbrd.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/clipbrd.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/clipbrd.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/clipbrd.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/clipbrd.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/clipbrd.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// helpful class for opening the clipboard and automatically closing it
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxClipboardLocker
+{
+public:
+ wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL)
+ {
+ m_clipboard = clipboard ? clipboard : wxTheClipboard;
+ if ( m_clipboard )
+ {
+ m_clipboard->Open();
+ }
+ }
+
+ bool operator!() const { return !m_clipboard->IsOpened(); }
+
+ ~wxClipboardLocker()
+ {
+ if ( m_clipboard )
+ {
+ m_clipboard->Close();
+ }
+ }
+
+private:
+ wxClipboard *m_clipboard;
+
+ DECLARE_NO_COPY_CLASS(wxClipboardLocker)
+};
+
+#endif // wxUSE_CLIPBOARD
+
+#endif // _WX_CLIPBRD_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/clntdata.h b/3rdparty/wxWidgets/include/wx/clntdata.h
new file mode 100644
index 0000000000..1707ac7648
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/clntdata.h
@@ -0,0 +1,273 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/clntdata.h
+// Purpose: A mixin class for holding a wxClientData or void pointer
+// Author: Robin Dunn
+// Modified by:
+// Created: 9-Oct-2001
+// RCS-ID: $Id: clntdata.h 36973 2006-01-18 16:45:41Z JS $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CLNTDATAH__
+#define _WX_CLNTDATAH__
+
+#include "wx/defs.h"
+#include "wx/string.h"
+#include "wx/hashmap.h"
+
+typedef int (*wxShadowObjectMethod)(void*, void*);
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
+ wxShadowObjectMethod,
+ wxShadowObjectMethods,
+ class WXDLLIMPEXP_BASE
+);
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
+ void *,
+ wxShadowObjectFields,
+ class WXDLLIMPEXP_BASE
+);
+
+class WXDLLIMPEXP_BASE wxShadowObject
+{
+public:
+ wxShadowObject() { }
+
+ void AddMethod( const wxString &name, wxShadowObjectMethod method )
+ {
+ wxShadowObjectMethods::iterator it = m_methods.find( name );
+ if (it == m_methods.end())
+ m_methods[ name ] = method;
+ else
+ it->second = method;
+ }
+
+ bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue )
+ {
+ wxShadowObjectMethods::iterator it = m_methods.find( name );
+ if (it == m_methods.end())
+ return false;
+ wxShadowObjectMethod method = it->second;
+ int ret = (*method)(window, param);
+ if (returnValue)
+ *returnValue = ret;
+ return true;
+ }
+
+ void AddField( const wxString &name, void* initialValue = NULL )
+ {
+ wxShadowObjectFields::iterator it = m_fields.find( name );
+ if (it == m_fields.end())
+ m_fields[ name ] = initialValue;
+ else
+ it->second = initialValue;
+ }
+
+ void SetField( const wxString &name, void* value )
+ {
+ wxShadowObjectFields::iterator it = m_fields.find( name );
+ if (it == m_fields.end())
+ return;
+ it->second = value;
+ }
+
+ void* GetField( const wxString &name, void *defaultValue = NULL )
+ {
+ wxShadowObjectFields::iterator it = m_fields.find( name );
+ if (it == m_fields.end())
+ return defaultValue;
+ return it->second;
+ }
+
+private:
+ wxShadowObjectMethods m_methods;
+ wxShadowObjectFields m_fields;
+};
+
+
+// ----------------------------------------------------------------------------
+
+// what kind of client data do we have?
+enum wxClientDataType
+{
+ wxClientData_None, // we don't know yet because we don't have it at all
+ wxClientData_Object, // our client data is typed and we own it
+ wxClientData_Void // client data is untyped and we don't own it
+};
+
+class WXDLLIMPEXP_BASE wxClientData
+{
+public:
+ wxClientData() { }
+ virtual ~wxClientData() { }
+};
+
+class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData
+{
+public:
+ wxStringClientData() : m_data() { }
+ wxStringClientData( const wxString &data ) : m_data(data) { }
+ void SetData( const wxString &data ) { m_data = data; }
+ const wxString& GetData() const { return m_data; }
+
+private:
+ wxString m_data;
+};
+
+// This class is a mixin that provides storage and management of "client
+// data." The client data stored can either be a pointer to a wxClientData
+// object in which case it is managed by the container (i.e. it will delete
+// the data when it's destroyed) or an untyped pointer which won't be deleted
+// by the container - but not both of them
+//
+// NOTE: This functionality is currently duplicated in wxEvtHandler in order
+// to avoid having more than one vtable in that class hierarchy.
+
+class WXDLLIMPEXP_BASE wxClientDataContainer
+{
+public:
+ wxClientDataContainer();
+ virtual ~wxClientDataContainer();
+
+ void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
+ wxClientData *GetClientObject() const { return DoGetClientObject(); }
+
+ void SetClientData( void *data ) { DoSetClientData(data); }
+ void *GetClientData() const { return DoGetClientData(); }
+
+protected:
+ // The user data: either an object which will be deleted by the container
+ // when it's deleted or some raw pointer which we do nothing with. Only
+ // one type of data can be used with the given window, i.e. you cannot set
+ // the void data and then associate the container with wxClientData or vice
+ // versa.
+ union
+ {
+ wxClientData *m_clientObject;
+ void *m_clientData;
+ };
+
+ // client data accessors
+ virtual void DoSetClientObject( wxClientData *data );
+ virtual wxClientData *DoGetClientObject() const;
+
+ virtual void DoSetClientData( void *data );
+ virtual void *DoGetClientData() const;
+
+ // what kind of data do we have?
+ wxClientDataType m_clientDataType;
+
+};
+
+#include "wx/vector.h"
+
+struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair
+{
+ wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { }
+
+ size_t index;
+ wxClientData* data;
+};
+
+_WX_DECLARE_VECTOR(
+ wxClientDataDictionaryPair,
+ wxClientDataDictionaryPairVector,
+ WXDLLIMPEXP_BASE
+);
+
+// this class is used internally to maintain the association between items
+// of (some subclasses of) wxControlWithItems and their client data
+// NOTE: this class does not keep track of whether it contains
+// wxClientData or void*. The client must ensure that
+// it does not contain a mix of the two, and that
+// DestroyData is called if it contains wxClientData
+class WXDLLIMPEXP_BASE wxClientDataDictionary
+{
+public:
+ wxClientDataDictionary() {}
+
+ // deletes all the data
+ void DestroyData()
+ {
+ for( size_t i = 0, end = m_vec.size(); i != end; ++i )
+ delete m_vec[i].data;
+ m_vec.clear();
+ }
+
+ // if data for the given index is not present, add it,
+ // if it is present, delete the old data and replace it with
+ // the new one
+ void Set( size_t index, wxClientData* data, bool doDelete )
+ {
+ size_t ptr = Find( index );
+
+ if( !data )
+ {
+ if( ptr == m_vec.size() ) return;
+ if( doDelete )
+ delete m_vec[ptr].data;
+ m_vec.erase( ptr );
+ }
+ else
+ {
+ if( ptr == m_vec.size() )
+ {
+ m_vec.push_back( wxClientDataDictionaryPair( index ) );
+ ptr = m_vec.size() - 1;
+ }
+
+ if( doDelete )
+ delete m_vec[ptr].data;
+ m_vec[ptr].data = data;
+ }
+ }
+
+ // get the data associated with the given index,
+ // return 0 if not found
+ wxClientData* Get( size_t index ) const
+ {
+ size_t it = Find( index );
+ if( it == m_vec.size() ) return 0;
+ return (wxClientData*)m_vec[it].data; // const cast
+ }
+
+ // delete the data associated with the given index
+ // it also decreases by one the indices of all the elements
+ // with an index greater than the given index
+ void Delete( size_t index, bool doDelete )
+ {
+ size_t todel = m_vec.size();
+
+ for( size_t i = 0, end = m_vec.size(); i != end; ++i )
+ {
+ if( m_vec[i].index == index )
+ todel = i;
+ else if( m_vec[i].index > index )
+ --(m_vec[i].index);
+ }
+
+ if( todel != m_vec.size() )
+ {
+ if( doDelete )
+ delete m_vec[todel].data;
+ m_vec.erase( todel );
+ }
+ }
+private:
+ // returns MyVec.size() if not found
+ size_t Find( size_t index ) const
+ {
+ for( size_t i = 0, end = m_vec.size(); i != end; ++i )
+ {
+ if( m_vec[i].index == index )
+ return i;
+ }
+
+ return m_vec.size();
+ }
+
+ wxClientDataDictionaryPairVector m_vec;
+};
+
+#endif // _WX_CLNTDATAH__
+
diff --git a/3rdparty/wxWidgets/include/wx/clrpicker.h b/3rdparty/wxWidgets/include/wx/clrpicker.h
new file mode 100644
index 0000000000..1dd2c4b3d0
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/clrpicker.h
@@ -0,0 +1,200 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/clrpicker.h
+// Purpose: wxColourPickerCtrl base header
+// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
+// Modified by:
+// Created: 14/4/2006
+// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
+// RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CLRPICKER_H_BASE_
+#define _WX_CLRPICKER_H_BASE_
+
+#include "wx/defs.h"
+
+
+#if wxUSE_COLOURPICKERCTRL
+
+#include "wx/pickerbase.h"
+
+
+class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
+
+
+// ----------------------------------------------------------------------------
+// wxColourPickerWidgetBase: a generic abstract interface which must be
+// implemented by controls used by wxColourPickerCtrl
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
+{
+public:
+ wxColourPickerWidgetBase() { m_colour = *wxBLACK; }
+ virtual ~wxColourPickerWidgetBase() {}
+
+ wxColour GetColour() const
+ { return m_colour; }
+ virtual void SetColour(const wxColour &col)
+ { m_colour = col; UpdateColour(); }
+ virtual void SetColour(const wxString &col)
+ { m_colour.Set(col); UpdateColour(); }
+
+protected:
+
+ virtual void UpdateColour() = 0;
+
+ // the current colour (may be invalid if none)
+ wxColour m_colour;
+};
+
+
+// Styles which must be supported by all controls implementing wxColourPickerWidgetBase
+// NB: these styles must be defined to carefully-chosen values to
+// avoid conflicts with wxButton's styles
+
+// show the colour in HTML form (#AABBCC) as colour button label
+// (instead of no label at all)
+// NOTE: this style is supported just by wxColourButtonGeneric and
+// thus is not exposed in wxColourPickerCtrl
+#define wxCLRP_SHOW_LABEL 0x0008
+
+// map platform-dependent controls which implement the wxColourPickerWidgetBase
+// under the name "wxColourPickerWidget".
+// NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the
+// fact that all classes being mapped as wxColourPickerWidget have the
+// same prototype for their contructor (and also explains why we use
+// define instead of a typedef)
+// since GTK > 2.4, there is GtkColorButton
+#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
+ #include "wx/gtk/clrpicker.h"
+ #define wxColourPickerWidget wxColourButton
+#else
+ #include "wx/generic/clrpickerg.h"
+ #define wxColourPickerWidget wxGenericColourButton
+#endif
+
+
+// ----------------------------------------------------------------------------
+// wxColourPickerCtrl: platform-independent class which embeds a
+// platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is
+// used, a textctrl next to it.
+// ----------------------------------------------------------------------------
+
+#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+#define wxCLRP_DEFAULT_STYLE 0
+
+class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase
+{
+public:
+ wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {}
+ virtual ~wxColourPickerCtrl() {}
+
+
+ wxColourPickerCtrl(wxWindow *parent, wxWindowID id,
+ const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxColourPickerCtrlNameStr)
+ : m_bIgnoreNextTextCtrlUpdate(false)
+ { Create(parent, id, col, pos, size, style, validator, name); }
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxColour& col = *wxBLACK,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCLRP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxColourPickerCtrlNameStr);
+
+
+public: // public API
+
+ // get the colour chosen
+ wxColour GetColour() const
+ { return ((wxColourPickerWidget *)m_picker)->GetColour(); }
+
+ // set currently displayed color
+ void SetColour(const wxColour& col);
+
+ // set colour using RGB(r,g,b) syntax or considering given text as a colour name;
+ // returns true if the given text was successfully recognized.
+ bool SetColour(const wxString& text);
+
+
+public: // internal functions
+
+ // update the button colour to match the text control contents
+ void UpdatePickerFromTextCtrl();
+
+ // update the text control to match the button's colour
+ void UpdateTextCtrlFromPicker();
+
+ // event handler for our picker
+ void OnColourChange(wxColourPickerEvent &);
+
+protected:
+ virtual long GetPickerStyle(long style) const
+ { return (style & wxCLRP_SHOW_LABEL); }
+
+ // true if the next UpdateTextCtrl() call is to ignore
+ bool m_bIgnoreNextTextCtrlUpdate;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl)
+};
+
+
+// ----------------------------------------------------------------------------
+// wxColourPickerEvent: used by wxColourPickerCtrl only
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102)
+END_DECLARE_EVENT_TYPES()
+
+class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent
+{
+public:
+ wxColourPickerEvent() {}
+ wxColourPickerEvent(wxObject *generator, int id, const wxColour &col)
+ : wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id),
+ m_colour(col)
+ {
+ SetEventObject(generator);
+ }
+
+ wxColour GetColour() const { return m_colour; }
+ void SetColour(const wxColour &c) { m_colour = c; }
+
+
+ // default copy ctor, assignment operator and dtor are ok
+ virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); }
+
+private:
+ wxColour m_colour;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent)
+};
+
+// ----------------------------------------------------------------------------
+// event types and macros
+// ----------------------------------------------------------------------------
+
+typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&);
+
+#define wxColourPickerEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func)
+
+#define EVT_COLOURPICKER_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
+
+
+#endif // wxUSE_COLOURPICKERCTRL
+
+#endif // _WX_CLRPICKER_H_BASE_
+
diff --git a/3rdparty/wxWidgets/include/wx/cmdline.h b/3rdparty/wxWidgets/include/wx/cmdline.h
new file mode 100644
index 0000000000..50a17ce7a7
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cmdline.h
@@ -0,0 +1,239 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/cmdline.h
+// Purpose: wxCmdLineParser and related classes for parsing the command
+// line options
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 04.01.00
+// RCS-ID: $Id: cmdline.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) 2000 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CMDLINE_H_
+#define _WX_CMDLINE_H_
+
+#include "wx/defs.h"
+
+#include "wx/string.h"
+#include "wx/arrstr.h"
+
+#if wxUSE_CMDLINE_PARSER
+
+class WXDLLIMPEXP_FWD_BASE wxDateTime;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// by default, options are optional (sic) and each call to AddParam() allows
+// one more parameter - this may be changed by giving non-default flags to it
+enum
+{
+ wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
+ wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
+ wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
+ wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
+ wxCMD_LINE_NEEDS_SEPARATOR = 0x10 // must have sep before the value
+};
+
+// an option value or parameter may be a string (the most common case), a
+// number or a date
+enum wxCmdLineParamType
+{
+ wxCMD_LINE_VAL_STRING, // should be 0 (default)
+ wxCMD_LINE_VAL_NUMBER,
+ wxCMD_LINE_VAL_DATE,
+ wxCMD_LINE_VAL_NONE
+};
+
+// for constructing the cmd line description using Init()
+enum wxCmdLineEntryType
+{
+ wxCMD_LINE_SWITCH,
+ wxCMD_LINE_OPTION,
+ wxCMD_LINE_PARAM,
+ wxCMD_LINE_NONE // to terminate the list
+};
+
+// ----------------------------------------------------------------------------
+// wxCmdLineEntryDesc is a description of one command line
+// switch/option/parameter
+// ----------------------------------------------------------------------------
+
+struct wxCmdLineEntryDesc
+{
+ wxCmdLineEntryType kind;
+ const wxChar *shortName;
+ const wxChar *longName;
+ const wxChar *description;
+ wxCmdLineParamType type;
+ int flags;
+};
+
+// ----------------------------------------------------------------------------
+// wxCmdLineParser is a class for parsing command line.
+//
+// It has the following features:
+//
+// 1. distinguishes options, switches and parameters; allows option grouping
+// 2. allows both short and long options
+// 3. automatically generates the usage message from the cmd line description
+// 4. does type checks on the options values (number, date, ...)
+//
+// To use it you should:
+//
+// 1. construct it giving it the cmd line to parse and optionally its desc
+// 2. construct the cmd line description using AddXXX() if not done in (1)
+// 3. call Parse()
+// 4. use GetXXX() to retrieve the parsed info
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxCmdLineParser
+{
+public:
+ // ctors and initializers
+ // ----------------------
+
+ // default ctor or ctor giving the cmd line in either Unix or Win form
+ wxCmdLineParser() { Init(); }
+ wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); }
+#if wxUSE_UNICODE
+ wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); }
+#endif // wxUSE_UNICODE
+ wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); }
+
+ // the same as above, but also gives the cmd line description - otherwise,
+ // use AddXXX() later
+ wxCmdLineParser(const wxCmdLineEntryDesc *desc)
+ { Init(); SetDesc(desc); }
+ wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv)
+ { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
+#if wxUSE_UNICODE
+ wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv)
+ { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
+#endif // wxUSE_UNICODE
+ wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline)
+ { Init(); SetCmdLine(cmdline); SetDesc(desc); }
+
+ // set cmd line to parse after using one of the ctors which don't do it
+ void SetCmdLine(int argc, char **argv);
+#if wxUSE_UNICODE
+ void SetCmdLine(int argc, wxChar **argv);
+#endif // wxUSE_UNICODE
+ void SetCmdLine(const wxString& cmdline);
+
+ // not virtual, don't use this class polymorphically
+ ~wxCmdLineParser();
+
+ // set different parser options
+ // ----------------------------
+
+ // by default, '-' is switch char under Unix, '-' or '/' under Win:
+ // switchChars contains all characters with which an option or switch may
+ // start
+ void SetSwitchChars(const wxString& switchChars);
+
+ // long options are not POSIX-compliant, this option allows to disable them
+ void EnableLongOptions(bool enable = true);
+ void DisableLongOptions() { EnableLongOptions(false); }
+
+ bool AreLongOptionsEnabled();
+
+ // extra text may be shown by Usage() method if set by this function
+ void SetLogo(const wxString& logo);
+
+ // construct the cmd line description
+ // ----------------------------------
+
+ // take the cmd line description from the wxCMD_LINE_NONE terminated table
+ void SetDesc(const wxCmdLineEntryDesc *desc);
+
+ // a switch: i.e. an option without value
+ void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
+ const wxString& desc = wxEmptyString,
+ int flags = 0);
+
+ // an option taking a value of the given type
+ void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
+ const wxString& desc = wxEmptyString,
+ wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
+ int flags = 0);
+
+ // a parameter
+ void AddParam(const wxString& desc = wxEmptyString,
+ wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
+ int flags = 0);
+
+ // actions
+ // -------
+
+ // parse the command line, return 0 if ok, -1 if "-h" or "--help" option
+ // was encountered and the help message was given or a positive value if a
+ // syntax error occurred
+ //
+ // if showUsage is true, Usage() is called in case of syntax error or if
+ // help was requested
+ int Parse(bool showUsage = true);
+
+ // give the usage message describing all program options
+ void Usage();
+
+ // get the command line arguments
+ // ------------------------------
+
+ // returns true if the given switch was found
+ bool Found(const wxString& name) const;
+
+ // returns true if an option taking a string value was found and stores the
+ // value in the provided pointer
+ bool Found(const wxString& name, wxString *value) const;
+
+ // returns true if an option taking an integer value was found and stores
+ // the value in the provided pointer
+ bool Found(const wxString& name, long *value) const;
+
+#if wxUSE_DATETIME
+ // returns true if an option taking a date value was found and stores the
+ // value in the provided pointer
+ bool Found(const wxString& name, wxDateTime *value) const;
+#endif // wxUSE_DATETIME
+
+ // gets the number of parameters found
+ size_t GetParamCount() const;
+
+ // gets the value of Nth parameter (as string only for now)
+ wxString GetParam(size_t n = 0u) const;
+
+ // Resets switches and options
+ void Reset();
+
+ // break down the command line in arguments
+ static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
+
+private:
+ // get usage string
+ wxString GetUsageString();
+
+ // common part of all ctors
+ void Init();
+
+ struct wxCmdLineParserData *m_data;
+
+ DECLARE_NO_COPY_CLASS(wxCmdLineParser)
+};
+
+#else // !wxUSE_CMDLINE_PARSER
+
+// this function is always available (even if !wxUSE_CMDLINE_PARSER) because it
+// is used by wxWin itself under Windows
+class WXDLLIMPEXP_BASE wxCmdLineParser
+{
+public:
+ static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
+};
+
+#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
+
+#endif // _WX_CMDLINE_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/cmdproc.h b/3rdparty/wxWidgets/include/wx/cmdproc.h
new file mode 100644
index 0000000000..0b101a14aa
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cmdproc.h
@@ -0,0 +1,144 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/cmdproc.h
+// Purpose: undo/redo capable command processing framework
+// Author: Julian Smart (extracted from docview.h by VZ)
+// Modified by:
+// Created: 05.11.00
+// RCS-ID: $Id: cmdproc.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CMDPROC_H_
+#define _WX_CMDPROC_H_
+
+#include "wx/defs.h"
+#include "wx/object.h"
+#include "wx/list.h"
+
+class WXDLLIMPEXP_FWD_CORE wxMenu;
+
+// ----------------------------------------------------------------------------
+// wxCommand: a single command capable of performing itself
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxCommand : public wxObject
+{
+public:
+ wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
+ virtual ~wxCommand(){}
+
+ // Override this to perform a command
+ virtual bool Do() = 0;
+
+ // Override this to undo a command
+ virtual bool Undo() = 0;
+
+ virtual bool CanUndo() const { return m_canUndo; }
+ virtual wxString GetName() const { return m_commandName; }
+
+protected:
+ bool m_canUndo;
+ wxString m_commandName;
+
+private:
+ DECLARE_CLASS(wxCommand)
+};
+
+// ----------------------------------------------------------------------------
+// wxCommandProcessor: wxCommand manager
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxCommandProcessor : public wxObject
+{
+public:
+ // if max number of commands is -1, it is unlimited
+ wxCommandProcessor(int maxCommands = -1);
+ virtual ~wxCommandProcessor();
+
+ // Pass a command to the processor. The processor calls Do(); if
+ // successful, is appended to the command history unless storeIt is false.
+ virtual bool Submit(wxCommand *command, bool storeIt = true);
+
+ // just store the command without executing it
+ virtual void Store(wxCommand *command);
+
+ virtual bool Undo();
+ virtual bool Redo();
+ virtual bool CanUndo() const;
+ virtual bool CanRedo() const;
+
+ // Initialises the current command and menu strings.
+ virtual void Initialize();
+
+ // Sets the Undo/Redo menu strings for the current menu.
+ virtual void SetMenuStrings();
+
+ // Gets the current Undo menu label.
+ wxString GetUndoMenuLabel() const;
+
+ // Gets the current Undo menu label.
+ wxString GetRedoMenuLabel() const;
+
+#if wxUSE_MENUS
+ // Call this to manage an edit menu.
+ void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
+ wxMenu *GetEditMenu() const { return m_commandEditMenu; }
+#endif // wxUSE_MENUS
+
+ // command list access
+ wxList& GetCommands() { return m_commands; }
+ const wxList& GetCommands() const { return m_commands; }
+ wxCommand *GetCurrentCommand() const
+ {
+ return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL);
+ }
+ int GetMaxCommands() const { return m_maxNoCommands; }
+ virtual void ClearCommands();
+
+ // Has the current project been changed?
+ virtual bool IsDirty() const
+ {
+ return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
+ }
+
+ // Mark the current command as the one where the last save took place
+ void MarkAsSaved()
+ {
+ m_lastSavedCommand = m_currentCommand;
+ }
+
+
+ // By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y"
+ const wxString& GetUndoAccelerator() const { return m_undoAccelerator; }
+ const wxString& GetRedoAccelerator() const { return m_redoAccelerator; }
+
+ void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; }
+ void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; }
+
+protected:
+ // for further flexibility, command processor doesn't call wxCommand::Do()
+ // and Undo() directly but uses these functions which can be overridden in
+ // the derived class
+ virtual bool DoCommand(wxCommand& cmd);
+ virtual bool UndoCommand(wxCommand& cmd);
+
+ int m_maxNoCommands;
+ wxList m_commands;
+ wxList::compatibility_iterator m_currentCommand,
+ m_lastSavedCommand;
+
+#if wxUSE_MENUS
+ wxMenu* m_commandEditMenu;
+#endif // wxUSE_MENUS
+
+ wxString m_undoAccelerator;
+ wxString m_redoAccelerator;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
+ DECLARE_NO_COPY_CLASS(wxCommandProcessor)
+};
+
+#endif // _WX_CMDPROC_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/cmndata.h b/3rdparty/wxWidgets/include/wx/cmndata.h
new file mode 100644
index 0000000000..30310e21c4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cmndata.h
@@ -0,0 +1,454 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/cmndata.h
+// Purpose: Common GDI data classes
+// Author: Julian Smart and others
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c)
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CMNDATA_H_BASE_
+#define _WX_CMNDATA_H_BASE_
+
+#include "wx/window.h"
+#include "wx/font.h"
+#include "wx/encinfo.h"
+#include "wx/colour.h"
+#include "wx/gdicmn.h"
+
+#if wxUSE_STREAMS
+#include "wx/stream.h"
+#endif
+
+
+class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
+
+
+class WXDLLEXPORT wxColourData: public wxObject
+{
+public:
+ wxColourData();
+ wxColourData(const wxColourData& data);
+ virtual ~wxColourData();
+
+ void SetChooseFull(bool flag) { m_chooseFull = flag; }
+ bool GetChooseFull() const { return m_chooseFull; }
+ void SetColour(const wxColour& colour) { m_dataColour = colour; }
+ const wxColour& GetColour() const { return m_dataColour; }
+ wxColour& GetColour() { return m_dataColour; }
+
+ // Array of 16 custom colours
+ void SetCustomColour(int i, const wxColour& colour);
+ wxColour GetCustomColour(int i);
+
+ void operator=(const wxColourData& data);
+
+public:
+ wxColour m_dataColour;
+ wxColour m_custColours[16];
+ bool m_chooseFull;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxColourData)
+};
+
+class WXDLLEXPORT wxFontData : public wxObject
+{
+public:
+ wxFontData();
+ virtual ~wxFontData();
+
+ wxFontData(const wxFontData& data)
+ : wxObject(),
+ m_fontColour(data.m_fontColour),
+ m_showHelp(data.m_showHelp),
+ m_allowSymbols(data.m_allowSymbols),
+ m_enableEffects(data.m_enableEffects),
+ m_initialFont(data.m_initialFont),
+ m_chosenFont(data.m_chosenFont),
+ m_minSize(data.m_minSize),
+ m_maxSize(data.m_maxSize),
+ m_encoding(data.m_encoding),
+ m_encodingInfo(data.m_encodingInfo)
+ {
+ }
+
+ wxFontData& operator=(const wxFontData& data)
+ {
+ wxObject::operator=(data);
+ m_fontColour = data.m_fontColour;
+ m_showHelp = data.m_showHelp;
+ m_allowSymbols = data.m_allowSymbols;
+ m_enableEffects = data.m_enableEffects;
+ m_initialFont = data.m_initialFont;
+ m_chosenFont = data.m_chosenFont;
+ m_minSize = data.m_minSize;
+ m_maxSize = data.m_maxSize;
+ m_encoding = data.m_encoding;
+ m_encodingInfo = data.m_encodingInfo;
+ return *this;
+ }
+
+ void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
+ bool GetAllowSymbols() const { return m_allowSymbols; }
+
+ void SetColour(const wxColour& colour) { m_fontColour = colour; }
+ const wxColour& GetColour() const { return m_fontColour; }
+
+ void SetShowHelp(bool flag) { m_showHelp = flag; }
+ bool GetShowHelp() const { return m_showHelp; }
+
+ void EnableEffects(bool flag) { m_enableEffects = flag; }
+ bool GetEnableEffects() const { return m_enableEffects; }
+
+ void SetInitialFont(const wxFont& font) { m_initialFont = font; }
+ wxFont GetInitialFont() const { return m_initialFont; }
+
+ void SetChosenFont(const wxFont& font) { m_chosenFont = font; }
+ wxFont GetChosenFont() const { return m_chosenFont; }
+
+ void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; }
+
+ // encoding info is split into 2 parts: the logical wxWin encoding
+ // (wxFontEncoding) and a structure containing the native parameters for
+ // it (wxNativeEncodingInfo)
+ wxFontEncoding GetEncoding() const { return m_encoding; }
+ void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; }
+
+ wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; }
+
+
+ // public for backwards compatibility only: don't use directly
+public:
+ wxColour m_fontColour;
+ bool m_showHelp;
+ bool m_allowSymbols;
+ bool m_enableEffects;
+ wxFont m_initialFont;
+ wxFont m_chosenFont;
+ int m_minSize;
+ int m_maxSize;
+
+private:
+ wxFontEncoding m_encoding;
+ wxNativeEncodingInfo m_encodingInfo;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxFontData)
+};
+
+#if wxUSE_PRINTING_ARCHITECTURE
+/*
+ * wxPrintData
+ * Encapsulates printer information (not printer dialog information)
+ */
+
+enum wxPrintBin
+{
+ wxPRINTBIN_DEFAULT,
+
+ wxPRINTBIN_ONLYONE,
+ wxPRINTBIN_LOWER,
+ wxPRINTBIN_MIDDLE,
+ wxPRINTBIN_MANUAL,
+ wxPRINTBIN_ENVELOPE,
+ wxPRINTBIN_ENVMANUAL,
+ wxPRINTBIN_AUTO,
+ wxPRINTBIN_TRACTOR,
+ wxPRINTBIN_SMALLFMT,
+ wxPRINTBIN_LARGEFMT,
+ wxPRINTBIN_LARGECAPACITY,
+ wxPRINTBIN_CASSETTE,
+ wxPRINTBIN_FORMSOURCE,
+
+ wxPRINTBIN_USER
+};
+
+const int wxPRINTMEDIA_DEFAULT = 0;
+
+class WXDLLEXPORT wxPrintData: public wxObject
+{
+public:
+ wxPrintData();
+ wxPrintData(const wxPrintData& printData);
+ virtual ~wxPrintData();
+
+ int GetNoCopies() const { return m_printNoCopies; }
+ bool GetCollate() const { return m_printCollate; }
+ int GetOrientation() const { return m_printOrientation; }
+ bool IsOrientationReversed() const { return m_printOrientationReversed; }
+
+ // Is this data OK for showing the print dialog?
+ bool Ok() const { return IsOk(); }
+ bool IsOk() const ;
+
+ const wxString& GetPrinterName() const { return m_printerName; }
+ bool GetColour() const { return m_colour; }
+ wxDuplexMode GetDuplex() const { return m_duplexMode; }
+ wxPaperSize GetPaperId() const { return m_paperId; }
+ const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size
+ // in wxPageSetupDialogData
+ wxPrintQuality GetQuality() const { return m_printQuality; }
+ wxPrintBin GetBin() const { return m_bin; }
+ wxPrintMode GetPrintMode() const { return m_printMode; }
+ int GetMedia() const { return m_media; }
+
+ void SetNoCopies(int v) { m_printNoCopies = v; }
+ void SetCollate(bool flag) { m_printCollate = flag; }
+ void SetOrientation(int orient) { m_printOrientation = orient; }
+ void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
+
+ void SetPrinterName(const wxString& name) { m_printerName = name; }
+ void SetColour(bool colour) { m_colour = colour; }
+ void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; }
+ void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; }
+ void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
+ void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
+ void SetBin(wxPrintBin bin) { m_bin = bin; }
+ void SetMedia(int media) { m_media = media; }
+ void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
+
+ wxString GetFilename() const { return m_filename; }
+ void SetFilename( const wxString &filename ) { m_filename = filename; }
+
+ void operator=(const wxPrintData& data);
+
+ char* GetPrivData() const { return m_privData; }
+ int GetPrivDataLen() const { return m_privDataLen; }
+ void SetPrivData( char *privData, int len );
+
+
+#if WXWIN_COMPATIBILITY_2_4
+ // PostScript-specific data
+ wxString GetPrinterCommand() const;
+ wxString GetPrinterOptions() const;
+ wxString GetPreviewCommand() const;
+ wxString GetFontMetricPath() const;
+ double GetPrinterScaleX() const;
+ double GetPrinterScaleY() const;
+ long GetPrinterTranslateX() const;
+ long GetPrinterTranslateY() const;
+
+ void SetPrinterCommand(const wxString& command);
+ void SetPrinterOptions(const wxString& options);
+ void SetPreviewCommand(const wxString& command);
+ void SetFontMetricPath(const wxString& path);
+ void SetPrinterScaleX(double x);
+ void SetPrinterScaleY(double y);
+ void SetPrinterScaling(double x, double y);
+ void SetPrinterTranslateX(long x);
+ void SetPrinterTranslateY(long y);
+ void SetPrinterTranslation(long x, long y);
+#endif
+
+ // Convert between wxPrintData and native data
+ void ConvertToNative();
+ void ConvertFromNative();
+ // Holds the native print data
+ wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; }
+
+private:
+ wxPrintBin m_bin;
+ int m_media;
+ wxPrintMode m_printMode;
+
+ int m_printNoCopies;
+ int m_printOrientation;
+ bool m_printOrientationReversed;
+ bool m_printCollate;
+
+ wxString m_printerName;
+ bool m_colour;
+ wxDuplexMode m_duplexMode;
+ wxPrintQuality m_printQuality;
+ wxPaperSize m_paperId;
+ wxSize m_paperSize;
+
+ wxString m_filename;
+
+ char* m_privData;
+ int m_privDataLen;
+
+ wxPrintNativeDataBase *m_nativeData;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPrintData)
+};
+
+/*
+ * wxPrintDialogData
+ * Encapsulates information displayed and edited in the printer dialog box.
+ * Contains a wxPrintData object which is filled in according to the values retrieved
+ * from the dialog.
+ */
+
+class WXDLLEXPORT wxPrintDialogData: public wxObject
+{
+public:
+ wxPrintDialogData();
+ wxPrintDialogData(const wxPrintDialogData& dialogData);
+ wxPrintDialogData(const wxPrintData& printData);
+ virtual ~wxPrintDialogData();
+
+ int GetFromPage() const { return m_printFromPage; }
+ int GetToPage() const { return m_printToPage; }
+ int GetMinPage() const { return m_printMinPage; }
+ int GetMaxPage() const { return m_printMaxPage; }
+ int GetNoCopies() const { return m_printNoCopies; }
+ bool GetAllPages() const { return m_printAllPages; }
+ bool GetSelection() const { return m_printSelection; }
+ bool GetCollate() const { return m_printCollate; }
+ bool GetPrintToFile() const { return m_printToFile; }
+#if WXWIN_COMPATIBILITY_2_4
+ bool GetSetupDialog() const { return m_printSetupDialog; }
+#endif
+ void SetFromPage(int v) { m_printFromPage = v; }
+ void SetToPage(int v) { m_printToPage = v; }
+ void SetMinPage(int v) { m_printMinPage = v; }
+ void SetMaxPage(int v) { m_printMaxPage = v; }
+ void SetNoCopies(int v) { m_printNoCopies = v; }
+ void SetAllPages(bool flag) { m_printAllPages = flag; }
+ void SetSelection(bool flag) { m_printSelection = flag; }
+ void SetCollate(bool flag) { m_printCollate = flag; }
+ void SetPrintToFile(bool flag) { m_printToFile = flag; }
+#if WXWIN_COMPATIBILITY_2_4
+ void SetSetupDialog(bool flag) { m_printSetupDialog = flag; }
+#endif
+ void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }
+ void EnableSelection(bool flag) { m_printEnableSelection = flag; }
+ void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }
+ void EnableHelp(bool flag) { m_printEnableHelp = flag; }
+
+ bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; }
+ bool GetEnableSelection() const { return m_printEnableSelection; }
+ bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; }
+ bool GetEnableHelp() const { return m_printEnableHelp; }
+
+ // Is this data OK for showing the print dialog?
+ bool Ok() const { return IsOk(); }
+ bool IsOk() const { return m_printData.Ok() ; }
+
+ wxPrintData& GetPrintData() { return m_printData; }
+ void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
+
+ void operator=(const wxPrintDialogData& data);
+ void operator=(const wxPrintData& data); // Sets internal m_printData member
+
+private:
+ int m_printFromPage;
+ int m_printToPage;
+ int m_printMinPage;
+ int m_printMaxPage;
+ int m_printNoCopies;
+ bool m_printAllPages;
+ bool m_printCollate;
+ bool m_printToFile;
+ bool m_printSelection;
+ bool m_printEnableSelection;
+ bool m_printEnablePageNumbers;
+ bool m_printEnableHelp;
+ bool m_printEnablePrintToFile;
+#if WXWIN_COMPATIBILITY_2_4
+ bool m_printSetupDialog;
+#endif
+ wxPrintData m_printData;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
+};
+
+/*
+* This is the data used (and returned) by the wxPageSetupDialog.
+*/
+
+// Compatibility with old name
+#define wxPageSetupData wxPageSetupDialogData
+
+class WXDLLEXPORT wxPageSetupDialogData: public wxObject
+{
+public:
+ wxPageSetupDialogData();
+ wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
+ wxPageSetupDialogData(const wxPrintData& printData);
+ virtual ~wxPageSetupDialogData();
+
+ wxSize GetPaperSize() const { return m_paperSize; }
+ wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); }
+ wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; }
+ wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; }
+ wxPoint GetMarginTopLeft() const { return m_marginTopLeft; }
+ wxPoint GetMarginBottomRight() const { return m_marginBottomRight; }
+
+ bool GetDefaultMinMargins() const { return m_defaultMinMargins; }
+ bool GetEnableMargins() const { return m_enableMargins; }
+ bool GetEnableOrientation() const { return m_enableOrientation; }
+ bool GetEnablePaper() const { return m_enablePaper; }
+ bool GetEnablePrinter() const { return m_enablePrinter; }
+ bool GetDefaultInfo() const { return m_getDefaultInfo; }
+ bool GetEnableHelp() const { return m_enableHelp; }
+
+ // Is this data OK for showing the page setup dialog?
+ bool Ok() const { return IsOk(); }
+ bool IsOk() const { return m_printData.Ok() ; }
+
+ // If a corresponding paper type is found in the paper database, will set the m_printData
+ // paper size id member as well.
+ void SetPaperSize(const wxSize& sz);
+
+ void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); }
+
+ // Sets the wxPrintData id, plus the paper width/height if found in the paper database.
+ void SetPaperSize(wxPaperSize id);
+
+ void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }
+ void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }
+ void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }
+ void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }
+ void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }
+ void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }
+
+ void EnableMargins(bool flag) { m_enableMargins = flag; }
+ void EnableOrientation(bool flag) { m_enableOrientation = flag; }
+ void EnablePaper(bool flag) { m_enablePaper = flag; }
+ void EnablePrinter(bool flag) { m_enablePrinter = flag; }
+ void EnableHelp(bool flag) { m_enableHelp = flag; }
+
+ // Use paper size defined in this object to set the wxPrintData
+ // paper id
+ void CalculateIdFromPaperSize();
+
+ // Use paper id in wxPrintData to set this object's paper size
+ void CalculatePaperSizeFromId();
+
+ wxPageSetupDialogData& operator=(const wxPageSetupData& data);
+ wxPageSetupDialogData& operator=(const wxPrintData& data);
+
+ wxPrintData& GetPrintData() { return m_printData; }
+ const wxPrintData& GetPrintData() const { return m_printData; }
+ void SetPrintData(const wxPrintData& printData);
+
+private:
+ wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
+ wxPoint m_minMarginTopLeft;
+ wxPoint m_minMarginBottomRight;
+ wxPoint m_marginTopLeft;
+ wxPoint m_marginBottomRight;
+ bool m_defaultMinMargins;
+ bool m_enableMargins;
+ bool m_enableOrientation;
+ bool m_enablePaper;
+ bool m_enablePrinter;
+ bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
+ bool m_enableHelp;
+ wxPrintData m_printData;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
+};
+
+#endif // wxUSE_PRINTING_ARCHITECTURE
+
+#endif
+// _WX_CMNDATA_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/collpane.h b/3rdparty/wxWidgets/include/wx/collpane.h
new file mode 100644
index 0000000000..1db6bfb540
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/collpane.h
@@ -0,0 +1,104 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/collpane.h
+// Purpose: wxCollapsiblePane
+// Author: Francesco Montorsi
+// Modified by:
+// Created: 8/10/2006
+// RCS-ID: $Id: collpane.h 43300 2006-11-11 07:32:08Z RD $
+// Copyright: (c) Francesco Montorsi
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COLLAPSABLE_PANE_H_BASE_
+#define _WX_COLLAPSABLE_PANE_H_BASE_
+
+#include "wx/defs.h"
+
+
+#if wxUSE_COLLPANE
+
+#include "wx/control.h"
+
+
+// ----------------------------------------------------------------------------
+// wxCollapsiblePaneBase: interface for wxCollapsiblePane
+// ----------------------------------------------------------------------------
+
+#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER)
+#define wxCP_NO_TLW_RESIZE (0x0002)
+
+class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
+{
+public:
+ wxCollapsiblePaneBase() {}
+
+ virtual void Collapse(bool collapse = true) = 0;
+ void Expand() { Collapse(false); }
+
+ virtual bool IsCollapsed() const = 0;
+ bool IsExpanded() const { return !IsCollapsed(); }
+
+ virtual wxWindow *GetPane() const = 0;
+
+ virtual wxString GetLabel() const = 0;
+ virtual void SetLabel(const wxString& label) = 0;
+};
+
+
+// ----------------------------------------------------------------------------
+// event types and macros
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, 1102)
+END_DECLARE_EVENT_TYPES()
+
+class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent
+{
+public:
+ wxCollapsiblePaneEvent() {}
+ wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed)
+ : wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id),
+ m_bCollapsed(collapsed)
+ {
+ SetEventObject(generator);
+ }
+
+ bool GetCollapsed() const { return m_bCollapsed; }
+ void SetCollapsed(bool c) { m_bCollapsed = c; }
+
+
+ // default copy ctor, assignment operator and dtor are ok
+ virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); }
+
+private:
+ bool m_bCollapsed;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent)
+};
+
+// ----------------------------------------------------------------------------
+// event types and macros
+// ----------------------------------------------------------------------------
+
+typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&);
+
+#define wxCollapsiblePaneEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
+
+#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
+
+
+#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
+ #include "wx/gtk/collpane.h"
+#else
+ #include "wx/generic/collpaneg.h"
+
+ // use #define and not a typedef to allow forward declaring the class
+ #define wxCollapsiblePane wxGenericCollapsiblePane
+#endif
+
+#endif // wxUSE_COLLPANE
+
+#endif // _WX_COLLAPSABLE_PANE_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/colordlg.h b/3rdparty/wxWidgets/include/wx/colordlg.h
new file mode 100644
index 0000000000..83e416dcb4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/colordlg.h
@@ -0,0 +1,41 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/colrdlgg.h
+// Purpose: wxColourDialog
+// Author: Vadim Zeitiln
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: colordlg.h 36623 2006-01-02 14:26:36Z JS $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COLORDLG_H_BASE_
+#define _WX_COLORDLG_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_COLOURDLG
+
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+ #include "wx/msw/colordlg.h"
+#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
+ #include "wx/mac/colordlg.h"
+#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+ #include "wx/gtk/colordlg.h"
+#elif defined(__WXPALMOS__)
+ #include "wx/palmos/colordlg.h"
+#else
+ #include "wx/generic/colrdlgg.h"
+
+ #define wxColourDialog wxGenericColourDialog
+#endif
+
+// get the colour from user and return it
+wxColour WXDLLEXPORT
+wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
+ const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
+
+#endif // wxUSE_COLOURDLG
+
+#endif
+ // _WX_COLORDLG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/colour.h b/3rdparty/wxWidgets/include/wx/colour.h
new file mode 100644
index 0000000000..bb396f0fed
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/colour.h
@@ -0,0 +1,154 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/colour.h
+// Purpose: wxColourBase definition
+// Author: Julian Smart
+// Modified by: Francesco Montorsi
+// Created:
+// RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COLOUR_H_BASE_
+#define _WX_COLOUR_H_BASE_
+
+#include "wx/defs.h"
+#include "wx/gdiobj.h"
+
+
+class WXDLLIMPEXP_FWD_CORE wxColour;
+
+// the standard wxColour constructors;
+// this macro avoids to repeat these lines across all colour.h files, since
+// Set() is a virtual function and thus cannot be called by wxColourBase
+// constructors
+#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \
+ wxColour( ChannelType red, ChannelType green, ChannelType blue, \
+ ChannelType alpha = wxALPHA_OPAQUE ) \
+ { Set(red, green, blue, alpha); } \
+ wxColour( unsigned long colRGB ) { Set(colRGB); } \
+ wxColour(const wxString &colourName) { Set(colourName); } \
+ wxColour(const wxChar *colourName) { Set(colourName); }
+
+
+// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
+#define wxC2S_NAME 1 // return colour name, when possible
+#define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax
+#define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax
+
+
+const unsigned char wxALPHA_TRANSPARENT = 0;
+const unsigned char wxALPHA_OPAQUE = 0xff;
+
+// ----------------------------------------------------------------------------
+// wxVariant support
+// ----------------------------------------------------------------------------
+
+#if wxUSE_VARIANT
+#include "wx/variant.h"
+DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
+#endif
+
+//-----------------------------------------------------------------------------
+// wxColourBase: this class has no data members, just some functions to avoid
+// code redundancy in all native wxColour implementations
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxColourBase : public wxGDIObject
+{
+public:
+ // type of a single colour component
+ typedef unsigned char ChannelType;
+
+ wxColourBase() {}
+ virtual ~wxColourBase() {}
+
+
+ // Set() functions
+ // ---------------
+
+ void Set(ChannelType red,
+ ChannelType green,
+ ChannelType blue,
+ ChannelType alpha = wxALPHA_OPAQUE)
+ { InitRGBA(red,green,blue, alpha); }
+
+ // implemented in colourcmn.cpp
+ bool Set(const wxChar *str)
+ { return FromString(str); }
+
+ bool Set(const wxString &str)
+ { return FromString(str); }
+
+ void Set(unsigned long colRGB)
+ {
+ // we don't need to know sizeof(long) here because we assume that the three
+ // least significant bytes contain the R, G and B values
+ Set((ChannelType)(0xFF & colRGB),
+ (ChannelType)(0xFF & (colRGB >> 8)),
+ (ChannelType)(0xFF & (colRGB >> 16)));
+ }
+
+
+
+ // accessors
+ // ---------
+
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const = 0;
+
+ virtual ChannelType Red() const = 0;
+ virtual ChannelType Green() const = 0;
+ virtual ChannelType Blue() const = 0;
+ virtual ChannelType Alpha() const
+ { return wxALPHA_OPAQUE ; }
+
+ // implemented in colourcmn.cpp
+ virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
+
+
+
+ // old, deprecated
+ // ---------------
+
+#if WXWIN_COMPATIBILITY_2_6
+ wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
+ wxDEPRECATED( void InitFromName(const wxString& col) );
+#endif
+
+protected:
+ virtual void
+ InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
+
+ virtual bool FromString(const wxChar *s);
+};
+
+
+
+#if defined(__WXPALMOS__)
+ #include "wx/generic/colour.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/colour.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/colour.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/colour.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/colour.h"
+#elif defined(__WXMGL__)
+ #include "wx/generic/colour.h"
+#elif defined(__WXDFB__)
+ #include "wx/generic/colour.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/colour.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/colour.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/colour.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/colour.h"
+#endif
+
+#define wxColor wxColour
+
+#endif // _WX_COLOUR_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/combo.h b/3rdparty/wxWidgets/include/wx/combo.h
new file mode 100644
index 0000000000..52c8af4fbd
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/combo.h
@@ -0,0 +1,746 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/combo.h
+// Purpose: wxComboCtrl declaration
+// Author: Jaakko Salli
+// Modified by:
+// Created: Apr-30-2006
+// RCS-ID: $Id: combo.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) Jaakko Salli
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COMBOCONTROL_H_BASE_
+#define _WX_COMBOCONTROL_H_BASE_
+
+
+/*
+ A few words about all the classes defined in this file are probably in
+ order: why do we need extra wxComboCtrl and wxComboPopup classes?
+
+ This is because a traditional combobox is a combination of a text control
+ (with a button allowing to open the pop down list) with a listbox and
+ wxComboBox class is exactly such control, however we want to also have other
+ combinations - in fact, we want to allow anything at all to be used as pop
+ down list, not just a wxListBox.
+
+ So we define a base wxComboCtrl which can use any control as pop down
+ list and wxComboBox deriving from it which implements the standard wxWidgets
+ combobox API. wxComboCtrl needs to be told somehow which control to use
+ and this is done by SetPopupControl(). However, we need something more than
+ just a wxControl in this method as, for example, we need to call
+ SetSelection("initial text value") and wxControl doesn't have such method.
+ So we also need a wxComboPopup which is just a very simple interface which
+ must be implemented by a control to be usable as a popup.
+
+ We couldn't derive wxComboPopup from wxControl as this would make it
+ impossible to have a class deriving from both wxListBx and from it, so
+ instead it is just a mix-in.
+ */
+
+
+#include "wx/defs.h"
+
+#if wxUSE_COMBOCTRL
+
+#include "wx/control.h"
+#include "wx/renderer.h" // this is needed for wxCONTROL_XXX flags
+#include "wx/bitmap.h" // wxBitmap used by-value
+
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxComboPopup;
+
+//
+// New window styles for wxComboCtrlBase
+//
+enum
+{
+ // Double-clicking a read-only combo triggers call to popup's OnComboPopup.
+ // In wxOwnerDrawnComboBox, for instance, it cycles item.
+ wxCC_SPECIAL_DCLICK = 0x0100,
+
+ // Dropbutton acts like standard push button.
+ wxCC_STD_BUTTON = 0x0200
+};
+
+
+// wxComboCtrl internal flags
+enum
+{
+ // First those that can be passed to Customize.
+ // It is Windows style for all flags to be clear.
+
+ // Button is preferred outside the border (GTK style)
+ wxCC_BUTTON_OUTSIDE_BORDER = 0x0001,
+ // Show popup on mouse up instead of mouse down (which is the Windows style)
+ wxCC_POPUP_ON_MOUSE_UP = 0x0002,
+ // All text is not automatically selected on click
+ wxCC_NO_TEXT_AUTO_SELECT = 0x0004,
+
+ // Internal use: signals creation is complete
+ wxCC_IFLAG_CREATED = 0x0100,
+ // Internal use: really put button outside
+ wxCC_IFLAG_BUTTON_OUTSIDE = 0x0200,
+ // Internal use: SetTextIndent has been called
+ wxCC_IFLAG_INDENT_SET = 0x0400,
+ // Internal use: Set wxTAB_TRAVERSAL to parent when popup is dismissed
+ wxCC_IFLAG_PARENT_TAB_TRAVERSAL = 0x0800,
+ // Internal use: Secondary popup window type should be used (if available).
+ wxCC_IFLAG_USE_ALT_POPUP = 0x1000,
+ // Internal use: Skip popup animation.
+ wxCC_IFLAG_DISABLE_POPUP_ANIM = 0x2000
+};
+
+
+// Flags used by PreprocessMouseEvent and HandleButtonMouseEvent
+enum
+{
+ wxCC_MF_ON_BUTTON = 0x0001, // cursor is on dropbutton area
+ wxCC_MF_ON_CLICK_AREA = 0x0002 // cursor is on dropbutton or other area
+ // that can be clicked to show the popup.
+};
+
+
+// Namespace for wxComboCtrl feature flags
+struct wxComboCtrlFeatures
+{
+ enum
+ {
+ MovableButton = 0x0001, // Button can be on either side of control
+ BitmapButton = 0x0002, // Button may be replaced with bitmap
+ ButtonSpacing = 0x0004, // Button can have spacing from the edge
+ // of the control
+ TextIndent = 0x0008, // SetTextIndent can be used
+ PaintControl = 0x0010, // Combo control itself can be custom painted
+ PaintWritable = 0x0020, // A variable-width area in front of writable
+ // combo control's textctrl can be custom
+ // painted
+ Borderless = 0x0040, // wxNO_BORDER window style works
+
+ // There are no feature flags for...
+ // PushButtonBitmapBackground - if its in wxRendererNative, then it should be
+ // not an issue to have it automatically under the bitmap.
+
+ All = MovableButton|BitmapButton|
+ ButtonSpacing|TextIndent|
+ PaintControl|PaintWritable|
+ Borderless
+ };
+};
+
+
+class WXDLLEXPORT wxComboCtrlBase : public wxControl
+{
+ friend class wxComboPopup;
+public:
+ // ctors and such
+ wxComboCtrlBase() : wxControl() { Init(); }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name);
+
+ virtual ~wxComboCtrlBase();
+
+ // show/hide popup window
+ virtual void ShowPopup();
+ virtual void HidePopup();
+
+ // Override for totally custom combo action
+ virtual void OnButtonClick();
+
+ // return true if the popup is currently shown
+ bool IsPopupShown() const { return m_popupWinState == Visible; }
+
+ // set interface class instance derived from wxComboPopup
+ // NULL popup can be used to indicate default in a derived class
+ void SetPopupControl( wxComboPopup* popup )
+ {
+ DoSetPopupControl(popup);
+ }
+
+ // get interface class instance derived from wxComboPopup
+ wxComboPopup* GetPopupControl()
+ {
+ EnsurePopupControl();
+ return m_popupInterface;
+ }
+
+ // get the popup window containing the popup control
+ wxWindow *GetPopupWindow() const { return m_winPopup; }
+
+ // Get the text control which is part of the combobox.
+ wxTextCtrl *GetTextCtrl() const { return m_text; }
+
+ // get the dropdown button which is part of the combobox
+ // note: its not necessarily a wxButton or wxBitmapButton
+ wxWindow *GetButton() const { return m_btn; }
+
+ // forward these methods to all subcontrols
+ virtual bool Enable(bool enable = true);
+ virtual bool Show(bool show = true);
+ virtual bool SetFont(const wxFont& font);
+#if wxUSE_VALIDATORS
+ virtual void SetValidator(const wxValidator &validator);
+ virtual wxValidator *GetValidator();
+#endif // wxUSE_VALIDATORS
+
+ // wxTextCtrl methods - for readonly combo they should return
+ // without errors.
+ virtual wxString GetValue() const;
+ virtual void SetValue(const wxString& value);
+ virtual void Copy();
+ virtual void Cut();
+ virtual void Paste();
+ virtual void SetInsertionPoint(long pos);
+ virtual void SetInsertionPointEnd();
+ virtual long GetInsertionPoint() const;
+ virtual long GetLastPosition() const;
+ virtual void Replace(long from, long to, const wxString& value);
+ virtual void Remove(long from, long to);
+ virtual void SetSelection(long from, long to);
+ virtual void Undo();
+
+ // This method sets the text without affecting list selection
+ // (ie. wxComboPopup::SetStringValue doesn't get called).
+ void SetText(const wxString& value);
+
+ // This method sets value and also optionally sends EVT_TEXT
+ // (needed by combo popups)
+ void SetValueWithEvent(const wxString& value, bool withEvent = true);
+
+ //
+ // Popup customization methods
+ //
+
+ // Sets minimum width of the popup. If wider than combo control, it will extend to the left.
+ // Remarks:
+ // * Value -1 indicates the default.
+ // * Custom popup may choose to ignore this (wxOwnerDrawnComboBox does not).
+ void SetPopupMinWidth( int width )
+ {
+ m_widthMinPopup = width;
+ }
+
+ // Sets preferred maximum height of the popup.
+ // Remarks:
+ // * Value -1 indicates the default.
+ // * Custom popup may choose to ignore this (wxOwnerDrawnComboBox does not).
+ void SetPopupMaxHeight( int height )
+ {
+ m_heightPopup = height;
+ }
+
+ // Extends popup size horizontally, relative to the edges of the combo control.
+ // Remarks:
+ // * Popup minimum width may override extLeft (ie. it has higher precedence).
+ // * Values 0 indicate default.
+ // * Custom popup may not take this fully into account (wxOwnerDrawnComboBox takes).
+ void SetPopupExtents( int extLeft, int extRight )
+ {
+ m_extLeft = extLeft;
+ m_extRight = extRight;
+ }
+
+ // Set width, in pixels, of custom paint area in writable combo.
+ // In read-only, used to indicate area that is not covered by the
+ // focus rectangle (which may or may not be drawn, depending on the
+ // popup type).
+ void SetCustomPaintWidth( int width );
+ int GetCustomPaintWidth() const { return m_widthCustomPaint; }
+
+ // Set side of the control to which the popup will align itself.
+ // Valid values are wxLEFT, wxRIGHT and 0. The default value 0 wmeans
+ // that the side of the button will be used.
+ void SetPopupAnchor( int anchorSide )
+ {
+ m_anchorSide = anchorSide;
+ }
+
+ // Set position of dropdown button.
+ // width: button width. <= 0 for default.
+ // height: button height. <= 0 for default.
+ // side: wxLEFT or wxRIGHT, indicates on which side the button will be placed.
+ // spacingX: empty space on sides of the button. Default is 0.
+ // Remarks:
+ // There is no spacingY - the button will be centered vertically.
+ void SetButtonPosition( int width = -1,
+ int height = -1,
+ int side = wxRIGHT,
+ int spacingX = 0 );
+
+ // Returns current size of the dropdown button.
+ wxSize GetButtonSize();
+
+ //
+ // Sets dropbutton to be drawn with custom bitmaps.
+ //
+ // bmpNormal: drawn when cursor is not on button
+ // pushButtonBg: Draw push button background below the image.
+ // NOTE! This is usually only properly supported on platforms with appropriate
+ // method in wxRendererNative.
+ // bmpPressed: drawn when button is depressed
+ // bmpHover: drawn when cursor hovers on button. This is ignored on platforms
+ // that do not generally display hover differently.
+ // bmpDisabled: drawn when combobox is disabled.
+ void SetButtonBitmaps( const wxBitmap& bmpNormal,
+ bool pushButtonBg = false,
+ const wxBitmap& bmpPressed = wxNullBitmap,
+ const wxBitmap& bmpHover = wxNullBitmap,
+ const wxBitmap& bmpDisabled = wxNullBitmap );
+
+ //
+ // This will set the space in pixels between left edge of the control and the
+ // text, regardless whether control is read-only (ie. no wxTextCtrl) or not.
+ // Platform-specific default can be set with value-1.
+ // Remarks
+ // * This method may do nothing on some native implementations.
+ void SetTextIndent( int indent );
+
+ // Returns actual indentation in pixels.
+ wxCoord GetTextIndent() const
+ {
+ return m_absIndent;
+ }
+
+ // Returns area covered by the text field.
+ const wxRect& GetTextRect() const
+ {
+ return m_tcArea;
+ }
+
+ // Call with enable as true to use a type of popup window that guarantees ability
+ // to focus the popup control, and normal function of common native controls.
+ // This alternative popup window is usually a wxDialog, and as such it's parent
+ // frame will appear as if the focus has been lost from it.
+ void UseAltPopupWindow( bool enable = true )
+ {
+ wxASSERT_MSG( !m_winPopup,
+ wxT("call this only before SetPopupControl") );
+
+ if ( enable )
+ m_iFlags |= wxCC_IFLAG_USE_ALT_POPUP;
+ else
+ m_iFlags &= ~wxCC_IFLAG_USE_ALT_POPUP;
+ }
+
+ // Call with false to disable popup animation, if any.
+ void EnablePopupAnimation( bool enable = true )
+ {
+ if ( enable )
+ m_iFlags &= ~wxCC_IFLAG_DISABLE_POPUP_ANIM;
+ else
+ m_iFlags |= wxCC_IFLAG_DISABLE_POPUP_ANIM;
+ }
+
+ //
+ // Utilies needed by the popups or native implementations
+ //
+
+ // Returns true if given key combination should toggle the popup.
+ // NB: This is a separate from other keyboard handling because:
+ // 1) Replaceability.
+ // 2) Centralized code (otherwise it'd be split up between
+ // wxComboCtrl key handler and wxVListBoxComboPopup's
+ // key handler).
+ virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const = 0;
+
+ // Prepare background of combo control or an item in a dropdown list
+ // in a way typical on platform. This includes painting the focus/disabled
+ // background and setting the clipping region.
+ // Unless you plan to paint your own focus indicator, you should always call this
+ // in your wxComboPopup::PaintComboControl implementation.
+ // In addition, it sets pen and text colour to what looks good and proper
+ // against the background.
+ // flags: wxRendererNative flags: wxCONTROL_ISSUBMENU: is drawing a list item instead of combo control
+ // wxCONTROL_SELECTED: list item is selected
+ // wxCONTROL_DISABLED: control/item is disabled
+ virtual void PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const;
+
+ // Returns true if focus indicator should be drawn in the control.
+ bool ShouldDrawFocus() const
+ {
+ const wxWindow* curFocus = FindFocus();
+ return ( !IsPopupShown() &&
+ (curFocus == this || (m_btn && curFocus == m_btn)) &&
+ (m_windowStyle & wxCB_READONLY) );
+ }
+
+ // These methods return references to appropriate dropbutton bitmaps
+ const wxBitmap& GetBitmapNormal() const { return m_bmpNormal; }
+ const wxBitmap& GetBitmapPressed() const { return m_bmpPressed; }
+ const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
+ const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
+
+ // Return internal flags
+ wxUint32 GetInternalFlags() const { return m_iFlags; }
+
+ // Return true if Create has finished
+ bool IsCreated() const { return m_iFlags & wxCC_IFLAG_CREATED ? true : false; }
+
+ // common code to be called on popup hide/dismiss
+ void OnPopupDismiss();
+
+ // PopupShown states
+ enum
+ {
+ Hidden = 0,
+ //Closing = 1,
+ Animating = 2,
+ Visible = 3
+ };
+
+ bool IsPopupWindowState( int state ) const { return (state == m_popupWinState) ? true : false; }
+
+ wxByte GetPopupWindowState() const { return m_popupWinState; }
+
+ // Set value returned by GetMainWindowOfCompositeControl
+ void SetCtrlMainWnd( wxWindow* wnd ) { m_mainCtrlWnd = wnd; }
+
+protected:
+
+ //
+ // Override these for customization purposes
+ //
+
+ // called from wxSizeEvent handler
+ virtual void OnResize() = 0;
+
+ // Return native text identation (for pure text, not textctrl)
+ virtual wxCoord GetNativeTextIndent() const;
+
+ // Called in syscolourchanged handler and base create
+ virtual void OnThemeChange();
+
+ // Creates wxTextCtrl.
+ // extraStyle: Extra style parameters
+ void CreateTextCtrl( int extraStyle, const wxValidator& validator );
+
+ // Installs standard input handler to combo (and optionally to the textctrl)
+ void InstallInputHandlers();
+
+ // flags for DrawButton()
+ enum
+ {
+ Draw_PaintBg = 1
+ };
+
+ // Draws dropbutton. Using wxRenderer or bitmaps, as appropriate.
+ void DrawButton( wxDC& dc, const wxRect& rect, int flags = Draw_PaintBg );
+
+ // Call if cursor is on button area or mouse is captured for the button.
+ //bool HandleButtonMouseEvent( wxMouseEvent& event, bool isInside );
+ bool HandleButtonMouseEvent( wxMouseEvent& event, int flags );
+
+ // returns true if event was consumed or filtered (event type is also set to 0 in this case)
+ bool PreprocessMouseEvent( wxMouseEvent& event, int flags );
+
+ //
+ // This will handle left_down and left_dclick events outside button in a Windows-like manner.
+ // If you need alternate behaviour, it is recommended you manipulate and filter events to it
+ // instead of building your own handling routine (for reference, on wxEVT_LEFT_DOWN it will
+ // toggle popup and on wxEVT_LEFT_DCLICK it will do the same or run the popup's dclick method,
+ // if defined - you should pass events of other types of it for common processing).
+ void HandleNormalMouseEvent( wxMouseEvent& event );
+
+ // Creates popup window, calls interface->Create(), etc
+ void CreatePopup();
+
+ // Destroy popup window and all related constructs
+ void DestroyPopup();
+
+ // override the base class virtuals involved in geometry calculations
+ virtual wxSize DoGetBestSize() const;
+
+ // NULL popup can be used to indicate default in a derived class
+ virtual void DoSetPopupControl(wxComboPopup* popup);
+
+ // ensures there is atleast the default popup
+ void EnsurePopupControl();
+
+ // Recalculates button and textctrl areas. Called when size or button setup change.
+ // btnWidth: default/calculated width of the dropbutton. 0 means unchanged,
+ // just recalculate.
+ void CalculateAreas( int btnWidth = 0 );
+
+ // Standard textctrl positioning routine. Just give it platform-dependant
+ // textctrl coordinate adjustment.
+ void PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust );
+
+ // event handlers
+ void OnSizeEvent( wxSizeEvent& event );
+ void OnFocusEvent(wxFocusEvent& event);
+ void OnIdleEvent(wxIdleEvent& event);
+ void OnTextCtrlEvent(wxCommandEvent& event);
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+ void OnKeyEvent(wxKeyEvent& event);
+
+ // Set customization flags (directs how wxComboCtrlBase helpers behave)
+ void Customize( wxUint32 flags ) { m_iFlags |= flags; }
+
+ // Dispatches size event and refreshes
+ void RecalcAndRefresh();
+
+ // Flags for DoShowPopup and AnimateShow
+ enum
+ {
+ ShowBelow = 0x0000, // Showing popup below the control
+ ShowAbove = 0x0001, // Showing popup above the control
+ CanDeferShow = 0x0002 // Can only return true from AnimateShow if this is set
+ };
+
+ // Shows and positions the popup.
+ virtual void DoShowPopup( const wxRect& rect, int flags );
+
+ // Implement in derived class to create a drop-down animation.
+ // Return true if finished immediately. Otherwise popup is only
+ // shown when the derived class call DoShowPopup.
+ // Flags are same as for DoShowPopup.
+ virtual bool AnimateShow( const wxRect& rect, int flags );
+
+#if wxUSE_TOOLTIPS
+ virtual void DoSetToolTip( wxToolTip *tip );
+#endif
+
+ virtual wxWindow *GetMainWindowOfCompositeControl()
+ { return m_mainCtrlWnd; }
+
+ // This is used when m_text is hidden (readonly).
+ wxString m_valueString;
+
+ // the text control and button we show all the time
+ wxTextCtrl* m_text;
+ wxWindow* m_btn;
+
+ // wxPopupWindow or similar containing the window managed by the interface.
+ wxWindow* m_winPopup;
+
+ // the popup control/panel
+ wxWindow* m_popup;
+
+ // popup interface
+ wxComboPopup* m_popupInterface;
+
+ // this is input etc. handler for the text control
+ wxEvtHandler* m_textEvtHandler;
+
+ // this is for the top level window
+ wxEvtHandler* m_toplevEvtHandler;
+
+ // this is for the control in popup
+ wxEvtHandler* m_popupExtraHandler;
+
+ // this is for the popup window
+ wxEvtHandler* m_popupWinEvtHandler;
+
+ // main (ie. topmost) window of a composite control (default = this)
+ wxWindow* m_mainCtrlWnd;
+
+ // used to prevent immediate re-popupping incase closed popup
+ // by clicking on the combo control (needed because of inconsistent
+ // transient implementation across platforms).
+ wxLongLong m_timeCanAcceptClick;
+
+ // how much popup should expand to the left/right of the control
+ wxCoord m_extLeft;
+ wxCoord m_extRight;
+
+ // minimum popup width
+ wxCoord m_widthMinPopup;
+
+ // preferred popup height
+ wxCoord m_heightPopup;
+
+ // how much of writable combo is custom-paint by callback?
+ // also used to indicate area that is not covered by "blue"
+ // selection indicator.
+ wxCoord m_widthCustomPaint;
+
+ // absolute text indentation, in pixels
+ wxCoord m_absIndent;
+
+ // side on which the popup is aligned
+ int m_anchorSide;
+
+ // Width of the "fake" border
+ wxCoord m_widthCustomBorder;
+
+ // The button and textctrl click/paint areas
+ wxRect m_tcArea;
+ wxRect m_btnArea;
+
+ // current button state (uses renderer flags)
+ int m_btnState;
+
+ // button position
+ int m_btnWid;
+ int m_btnHei;
+ int m_btnSide;
+ int m_btnSpacingX;
+
+ // last default button width
+ int m_btnWidDefault;
+
+ // custom dropbutton bitmaps
+ wxBitmap m_bmpNormal;
+ wxBitmap m_bmpPressed;
+ wxBitmap m_bmpHover;
+ wxBitmap m_bmpDisabled;
+
+ // area used by the button
+ wxSize m_btnSize;
+
+ // platform-dependant customization and other flags
+ wxUint32 m_iFlags;
+
+ // draw blank button background under bitmap?
+ bool m_blankButtonBg;
+
+ // is the popup window currenty shown?
+ wxByte m_popupWinState;
+
+ // should the focus be reset to the textctrl in idle time?
+ bool m_resetFocus;
+
+private:
+ void Init();
+
+ wxByte m_ignoreEvtText; // Number of next EVT_TEXTs to ignore
+
+ // Is popup window wxPopupTransientWindow, wxPopupWindow or wxDialog?
+ wxByte m_popupWinType;
+
+ DECLARE_EVENT_TABLE()
+
+ DECLARE_ABSTRACT_CLASS(wxComboCtrlBase)
+};
+
+
+// ----------------------------------------------------------------------------
+// wxComboPopup is the interface which must be implemented by a control to be
+// used as a popup by wxComboCtrl
+// ----------------------------------------------------------------------------
+
+
+// wxComboPopup internal flags
+enum
+{
+ wxCP_IFLAG_CREATED = 0x0001 // Set by wxComboCtrlBase after Create is called
+};
+
+
+class WXDLLEXPORT wxComboPopup
+{
+ friend class wxComboCtrlBase;
+public:
+ wxComboPopup()
+ {
+ m_combo = (wxComboCtrlBase*) NULL;
+ m_iFlags = 0;
+ }
+
+ // This is called immediately after construction finishes. m_combo member
+ // variable has been initialized before the call.
+ // NOTE: It is not in constructor so the derived class doesn't need to redefine
+ // a default constructor of its own.
+ virtual void Init() { }
+
+ virtual ~wxComboPopup();
+
+ // Create the popup child control.
+ // Return true for success.
+ virtual bool Create(wxWindow* parent) = 0;
+
+ // We must have an associated control which is subclassed by the combobox.
+ virtual wxWindow *GetControl() = 0;
+
+ // Called immediately after the popup is shown
+ virtual void OnPopup();
+
+ // Called when popup is dismissed
+ virtual void OnDismiss();
+
+ // Called just prior to displaying popup.
+ // Default implementation does nothing.
+ virtual void SetStringValue( const wxString& value );
+
+ // Gets displayed string representation of the value.
+ virtual wxString GetStringValue() const = 0;
+
+ // This is called to custom paint in the combo control itself (ie. not the popup).
+ // Default implementation draws value as string.
+ virtual void PaintComboControl( wxDC& dc, const wxRect& rect );
+
+ // Receives key events from the parent wxComboCtrl.
+ // Events not handled should be skipped, as usual.
+ virtual void OnComboKeyEvent( wxKeyEvent& event );
+
+ // Implement if you need to support special action when user
+ // double-clicks on the parent wxComboCtrl.
+ virtual void OnComboDoubleClick();
+
+ // Return final size of popup. Called on every popup, just prior to OnShow.
+ // minWidth = preferred minimum width for window
+ // prefHeight = preferred height. Only applies if > 0,
+ // maxHeight = max height for window, as limited by screen size
+ // and should only be rounded down, if necessary.
+ virtual wxSize GetAdjustedSize( int minWidth, int prefHeight, int maxHeight );
+
+ // Return true if you want delay call to Create until the popup is shown
+ // for the first time. It is more efficient, but note that it is often
+ // more convenient to have the control created immediately.
+ // Default returns false.
+ virtual bool LazyCreate();
+
+ //
+ // Utilies
+ //
+
+ // Hides the popup
+ void Dismiss();
+
+ // Returns true if Create has been called.
+ bool IsCreated() const
+ {
+ return (m_iFlags & wxCP_IFLAG_CREATED) ? true : false;
+ }
+
+ // Default PaintComboControl behaviour
+ static void DefaultPaintComboControl( wxComboCtrlBase* combo,
+ wxDC& dc,
+ const wxRect& rect );
+
+protected:
+ wxComboCtrlBase* m_combo;
+ wxUint32 m_iFlags;
+
+private:
+ // Called in wxComboCtrlBase::SetPopupControl
+ void InitBase(wxComboCtrlBase *combo)
+ {
+ m_combo = combo;
+ }
+};
+
+
+// ----------------------------------------------------------------------------
+// include the platform-dependent header defining the real class
+// ----------------------------------------------------------------------------
+
+#if defined(__WXUNIVERSAL__)
+ // No native universal (but it must still be first in the list)
+#elif defined(__WXMSW__)
+ #include "wx/msw/combo.h"
+#endif
+
+// Any ports may need generic as an alternative
+#include "wx/generic/combo.h"
+
+#endif // wxUSE_COMBOCTRL
+
+#endif
+ // _WX_COMBOCONTROL_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/combobox.h b/3rdparty/wxWidgets/include/wx/combobox.h
new file mode 100644
index 0000000000..1b31705675
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/combobox.h
@@ -0,0 +1,97 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/combobox.h
+// Purpose: wxComboBox declaration
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 24.12.00
+// RCS-ID: $Id: combobox.h 42727 2006-10-30 16:04:27Z VZ $
+// Copyright: (c) 1996-2000 wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COMBOBOX_H_BASE_
+#define _WX_COMBOBOX_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_COMBOBOX
+
+extern WXDLLEXPORT_DATA(const wxChar) wxComboBoxNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxComboBoxBase: this interface defines the methods wxComboBox must implement
+// ----------------------------------------------------------------------------
+
+#include "wx/textctrl.h"
+#include "wx/ctrlsub.h"
+
+class WXDLLEXPORT wxComboBoxBase : public wxItemContainer
+{
+public:
+ // wxTextCtrl-like methods wxComboBox must implement
+ virtual wxString GetValue() const = 0;
+ virtual void SetValue(const wxString& value) = 0;
+
+ virtual void Copy() = 0;
+ virtual void Cut() = 0;
+ virtual void Paste() = 0;
+ virtual void SetInsertionPoint(long pos) = 0;
+ virtual long GetInsertionPoint() const = 0;
+ virtual wxTextPos GetLastPosition() const = 0;
+ virtual void Replace(long from, long to, const wxString& value) = 0;
+ virtual void SetSelection(long from, long to) = 0;
+ virtual void SetEditable(bool editable) = 0;
+
+ virtual void SetInsertionPointEnd()
+ { SetInsertionPoint(GetLastPosition()); }
+ virtual void Remove(long from, long to)
+ { Replace(from, to, wxEmptyString); }
+
+ virtual bool IsEditable() const = 0;
+
+ virtual void Undo() = 0;
+ virtual void Redo() = 0;
+ virtual void SelectAll() = 0;
+
+ virtual bool CanCopy() const = 0;
+ virtual bool CanCut() const = 0;
+ virtual bool CanPaste() const = 0;
+ virtual bool CanUndo() const = 0;
+ virtual bool CanRedo() const = 0;
+
+ // may return value different from GetSelection() when the combobox
+ // dropdown is shown and the user selected, but not yet accepted, a value
+ // different from the old one in it
+ virtual int GetCurrentSelection() const { return GetSelection(); }
+
+ // redeclare inherited SetSelection() overload here as well to avoid
+ // virtual function hiding
+ virtual void SetSelection(int n) = 0;
+};
+
+// ----------------------------------------------------------------------------
+// include the platform-dependent header defining the real class
+// ----------------------------------------------------------------------------
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/combobox.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/combobox.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/combobox.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/combobox.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/combobox.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/combobox.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/combobox.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/combobox.h"
+#endif
+
+#endif // wxUSE_COMBOBOX
+
+#endif
+ // _WX_COMBOBOX_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/confbase.h b/3rdparty/wxWidgets/include/wx/confbase.h
new file mode 100644
index 0000000000..9e0cf54b51
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/confbase.h
@@ -0,0 +1,359 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: confbase.h
+// Purpose: declaration of the base class of all config implementations
+// (see also: fileconf.h and msw/regconf.h and iniconf.h)
+// Author: Karsten Ballueder & Vadim Zeitlin
+// Modified by:
+// Created: 07.04.98 (adapted from appconf.h)
+// RCS-ID: $Id: confbase.h 50711 2007-12-15 02:57:58Z VZ $
+// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net
+// Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CONFBASE_H_
+#define _WX_CONFBASE_H_
+
+#include "wx/defs.h"
+#include "wx/string.h"
+
+class WXDLLIMPEXP_FWD_BASE wxArrayString;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+/// shall we be case sensitive in parsing variable names?
+#ifndef wxCONFIG_CASE_SENSITIVE
+ #define wxCONFIG_CASE_SENSITIVE 0
+#endif
+
+/// separates group and entry names (probably shouldn't be changed)
+#ifndef wxCONFIG_PATH_SEPARATOR
+ #define wxCONFIG_PATH_SEPARATOR _T('/')
+#endif
+
+/// introduces immutable entries
+// (i.e. the ones which can't be changed from the local config file)
+#ifndef wxCONFIG_IMMUTABLE_PREFIX
+ #define wxCONFIG_IMMUTABLE_PREFIX _T('!')
+#endif
+
+#if wxUSE_CONFIG
+
+#include "wx/string.h"
+
+/// should we use registry instead of configuration files under Windows?
+// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
+// false) or wxRegConfig (if it's true and we're under Win32))
+#ifndef wxUSE_CONFIG_NATIVE
+ #define wxUSE_CONFIG_NATIVE 1
+#endif
+
+// Style flags for constructor style parameter
+enum
+{
+ wxCONFIG_USE_LOCAL_FILE = 1,
+ wxCONFIG_USE_GLOBAL_FILE = 2,
+ wxCONFIG_USE_RELATIVE_PATH = 4,
+ wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
+ wxCONFIG_USE_SUBDIR = 16
+};
+
+// ----------------------------------------------------------------------------
+// abstract base class wxConfigBase which defines the interface for derived
+// classes
+//
+// wxConfig organizes the items in a tree-like structure (modeled after the
+// Unix/Dos filesystem). There are groups (directories) and keys (files).
+// There is always one current group given by the current path.
+//
+// Keys are pairs "key_name = value" where value may be of string or integer
+// (long) type (TODO doubles and other types such as wxDate coming soon).
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxConfigBase
+{
+public:
+ // constants
+ // the type of an entry
+ enum EntryType
+ {
+ Type_Unknown,
+ Type_String,
+ Type_Boolean,
+ Type_Integer, // use Read(long *)
+ Type_Float // use Read(double *)
+ };
+
+ // static functions
+ // sets the config object, returns the previous pointer
+ static wxConfigBase *Set(wxConfigBase *pConfig);
+ // get the config object, creates it on demand unless DontCreateOnDemand
+ // was called
+ static wxConfigBase *Get(bool createOnDemand = true)
+ { if ( createOnDemand && (!ms_pConfig) ) Create(); return ms_pConfig; }
+ // create a new config object: this function will create the "best"
+ // implementation of wxConfig available for the current platform, see
+ // comments near definition wxUSE_CONFIG_NATIVE for details. It returns
+ // the created object and also sets it as ms_pConfig.
+ static wxConfigBase *Create();
+ // should Get() try to create a new log object if the current one is NULL?
+ static void DontCreateOnDemand() { ms_bAutoCreate = false; }
+
+ // ctor & virtual dtor
+ // ctor (can be used as default ctor too)
+ //
+ // Not all args will always be used by derived classes, but including
+ // them all in each class ensures compatibility. If appName is empty,
+ // uses wxApp name
+ wxConfigBase(const wxString& appName = wxEmptyString,
+ const wxString& vendorName = wxEmptyString,
+ const wxString& localFilename = wxEmptyString,
+ const wxString& globalFilename = wxEmptyString,
+ long style = 0);
+
+ // empty but ensures that dtor of all derived classes is virtual
+ virtual ~wxConfigBase();
+
+ // path management
+ // set current path: if the first character is '/', it's the absolute path,
+ // otherwise it's a relative path. '..' is supported. If the strPath
+ // doesn't exist it is created.
+ virtual void SetPath(const wxString& strPath) = 0;
+ // retrieve the current path (always as absolute path)
+ virtual const wxString& GetPath() const = 0;
+
+ // enumeration: all functions here return false when there are no more items.
+ // you must pass the same lIndex to GetNext and GetFirst (don't modify it)
+ // enumerate subgroups
+ virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0;
+ virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0;
+ // enumerate entries
+ virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0;
+ virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
+ // get number of entries/subgroups in the current group, with or without
+ // it's subgroups
+ virtual size_t GetNumberOfEntries(bool bRecursive = false) const = 0;
+ virtual size_t GetNumberOfGroups(bool bRecursive = false) const = 0;
+
+ // tests of existence
+ // returns true if the group by this name exists
+ virtual bool HasGroup(const wxString& strName) const = 0;
+ // same as above, but for an entry
+ virtual bool HasEntry(const wxString& strName) const = 0;
+ // returns true if either a group or an entry with a given name exist
+ bool Exists(const wxString& strName) const
+ { return HasGroup(strName) || HasEntry(strName); }
+
+ // get the entry type
+ virtual EntryType GetEntryType(const wxString& name) const
+ {
+ // by default all entries are strings
+ return HasEntry(name) ? Type_String : Type_Unknown;
+ }
+
+ // key access: returns true if value was really read, false if default used
+ // (and if the key is not found the default value is returned.)
+
+ // read a string from the key
+ bool Read(const wxString& key, wxString *pStr) const;
+ bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
+
+ // read a number (long)
+ bool Read(const wxString& key, long *pl) const;
+ bool Read(const wxString& key, long *pl, long defVal) const;
+
+ // read an int
+ bool Read(const wxString& key, int *pi) const;
+ bool Read(const wxString& key, int *pi, int defVal) const;
+
+ // read a double
+ bool Read(const wxString& key, double* val) const;
+ bool Read(const wxString& key, double* val, double defVal) const;
+
+ // read a bool
+ bool Read(const wxString& key, bool* val) const;
+ bool Read(const wxString& key, bool* val, bool defVal) const;
+
+ // convenience functions returning directly the value (we don't have them for
+ // int/double/bool as there would be ambiguities with the long one then)
+ wxString Read(const wxString& key,
+ const wxString& defVal = wxEmptyString) const
+ { wxString s; (void)Read(key, &s, defVal); return s; }
+
+ long Read(const wxString& key, long defVal) const
+ { long l; (void)Read(key, &l, defVal); return l; }
+
+ // write the value (return true on success)
+ bool Write(const wxString& key, const wxString& value)
+ { return DoWriteString(key, value); }
+
+ bool Write(const wxString& key, long value)
+ { return DoWriteLong(key, value); }
+
+ bool Write(const wxString& key, int value)
+ { return DoWriteInt(key, value); }
+
+ bool Write(const wxString& key, double value)
+ { return DoWriteDouble(key, value); }
+
+ bool Write(const wxString& key, bool value)
+ { return DoWriteBool(key, value); }
+
+ // we have to provide a separate version for C strings as otherwise they
+ // would be converted to bool and not to wxString as expected!
+ bool Write(const wxString& key, const wxChar *value)
+ { return Write(key, wxString(value)); }
+
+ // permanently writes all changes
+ virtual bool Flush(bool bCurrentOnly = false) = 0;
+
+ // renaming, all functions return false on failure (probably because the new
+ // name is already taken by an existing entry)
+ // rename an entry
+ virtual bool RenameEntry(const wxString& oldName,
+ const wxString& newName) = 0;
+ // rename a group
+ virtual bool RenameGroup(const wxString& oldName,
+ const wxString& newName) = 0;
+
+ // delete entries/groups
+ // deletes the specified entry and the group it belongs to if
+ // it was the last key in it and the second parameter is true
+ virtual bool DeleteEntry(const wxString& key,
+ bool bDeleteGroupIfEmpty = true) = 0;
+ // delete the group (with all subgroups)
+ virtual bool DeleteGroup(const wxString& key) = 0;
+ // delete the whole underlying object (disk file, registry key, ...)
+ // primarily for use by uninstallation routine.
+ virtual bool DeleteAll() = 0;
+
+ // options
+ // we can automatically expand environment variables in the config entries
+ // (this option is on by default, you can turn it on/off at any time)
+ bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
+ void SetExpandEnvVars(bool bDoIt = true) { m_bExpandEnvVars = bDoIt; }
+ // recording of default values
+ void SetRecordDefaults(bool bDoIt = true) { m_bRecordDefaults = bDoIt; }
+ bool IsRecordingDefaults() const { return m_bRecordDefaults; }
+ // does expansion only if needed
+ wxString ExpandEnvVars(const wxString& str) const;
+
+ // misc accessors
+ wxString GetAppName() const { return m_appName; }
+ wxString GetVendorName() const { return m_vendorName; }
+
+ // Used wxIniConfig to set members in constructor
+ void SetAppName(const wxString& appName) { m_appName = appName; }
+ void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; }
+
+ void SetStyle(long style) { m_style = style; }
+ long GetStyle() const { return m_style; }
+
+protected:
+ static bool IsImmutable(const wxString& key)
+ { return !key.IsEmpty() && key[0] == wxCONFIG_IMMUTABLE_PREFIX; }
+
+ // return the path without trailing separator, if any: this should be called
+ // to sanitize paths referring to the group names before passing them to
+ // wxConfigPathChanger as "/foo/bar/" should be the same as "/foo/bar" and it
+ // isn't interpreted in the same way by it (and this can't be changed there
+ // as it's not the same for the entries names)
+ static wxString RemoveTrailingSeparator(const wxString& key);
+
+ // do read/write the values of different types
+ virtual bool DoReadString(const wxString& key, wxString *pStr) const = 0;
+ virtual bool DoReadLong(const wxString& key, long *pl) const = 0;
+ virtual bool DoReadInt(const wxString& key, int *pi) const;
+ virtual bool DoReadDouble(const wxString& key, double* val) const;
+ virtual bool DoReadBool(const wxString& key, bool* val) const;
+
+ virtual bool DoWriteString(const wxString& key, const wxString& value) = 0;
+ virtual bool DoWriteLong(const wxString& key, long value) = 0;
+ virtual bool DoWriteInt(const wxString& key, int value);
+ virtual bool DoWriteDouble(const wxString& key, double value);
+ virtual bool DoWriteBool(const wxString& key, bool value);
+
+private:
+ // are we doing automatic environment variable expansion?
+ bool m_bExpandEnvVars;
+ // do we record default values?
+ bool m_bRecordDefaults;
+
+ // static variables
+ static wxConfigBase *ms_pConfig;
+ static bool ms_bAutoCreate;
+
+ // Application name and organisation name
+ wxString m_appName;
+ wxString m_vendorName;
+
+ // Style flag
+ long m_style;
+};
+
+// a handy little class which changes current path to the path of given entry
+// and restores it in dtor: so if you declare a local variable of this type,
+// you work in the entry directory and the path is automatically restored
+// when the function returns
+// Taken out of wxConfig since not all compilers can cope with nested classes.
+class WXDLLIMPEXP_BASE wxConfigPathChanger
+{
+public:
+ // ctor/dtor do path changing/restoring of the path
+ wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
+ ~wxConfigPathChanger();
+
+ // get the key name
+ const wxString& Name() const { return m_strName; }
+
+ // this method must be called if the original path (i.e. the current path at
+ // the moment of creation of this object) could have been deleted to prevent
+ // us from restoring the not existing (any more) path
+ //
+ // if the original path doesn't exist any more, the path will be restored to
+ // the deepest still existing component of the old path
+ void UpdateIfDeleted();
+
+private:
+ wxConfigBase *m_pContainer; // object we live in
+ wxString m_strName, // name of entry (i.e. name only)
+ m_strOldPath; // saved path
+ bool m_bChanged; // was the path changed?
+
+ DECLARE_NO_COPY_CLASS(wxConfigPathChanger)
+};
+
+
+// ----------------------------------------------------------------------------
+// the native wxConfigBase implementation
+// ----------------------------------------------------------------------------
+
+// under Windows we prefer to use the native implementation
+// wxIniConfig isn't native anywhere after droping win16 in wxWidgets 2.6
+#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
+ #define wxConfig wxRegConfig
+#else // either we're under Unix or wish to use files even under Windows
+ #define wxConfig wxFileConfig
+#endif
+
+#endif // wxUSE_CONFIG
+
+/*
+ Replace environment variables ($SOMETHING) with their values. The format is
+ $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
+ '_' only. '$' must be escaped ('\$') in order to be taken literally.
+*/
+
+WXDLLIMPEXP_BASE wxString wxExpandEnvVars(const wxString &sz);
+
+/*
+ Split path into parts removing '..' in progress
+ */
+WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
+
+
+#endif
+ // _WX_CONFIG_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/config.h b/3rdparty/wxWidgets/include/wx/config.h
new file mode 100644
index 0000000000..2ef3efcab3
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/config.h
@@ -0,0 +1,31 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: config.h
+// Purpose: wxConfig base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: config.h 33948 2005-05-04 18:57:50Z JS $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CONFIG_H_BASE_
+#define _WX_CONFIG_H_BASE_
+
+#include "wx/defs.h"
+#include "wx/confbase.h"
+
+#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
+# ifdef __WIN32__
+# include "wx/msw/regconf.h"
+# else
+# include "wx/msw/iniconf.h"
+# endif
+#elif defined(__WXPALMOS__) && wxUSE_CONFIG_NATIVE
+# include "wx/palmos/prefconf.h"
+#else
+# include "wx/fileconf.h"
+#endif
+
+#endif
+ // _WX_CONFIG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/containr.h b/3rdparty/wxWidgets/include/wx/containr.h
new file mode 100644
index 0000000000..79eb4f4b8e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/containr.h
@@ -0,0 +1,142 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/containr.h
+// Purpose: wxControlContainer class declration: a "mix-in" class which
+// implements the TAB navigation between the controls
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 06.08.01
+// RCS-ID: $Id: containr.h 50863 2007-12-20 18:32:55Z VS $
+// Copyright: (c) 2001 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CONTAINR_H_
+#define _WX_CONTAINR_H_
+
+class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
+class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindowBase;
+
+/*
+ Implementation note: wxControlContainer is not a real mix-in but rather
+ a class meant to be agregated with (and not inherited from). Although
+ logically it should be a mix-in, doing it like this has no advantage from
+ the point of view of the existing code but does have some problems (we'd
+ need to play tricks with event handlers which may be difficult to do
+ safely). The price we pay for this simplicity is the ugly macros below.
+ */
+
+// ----------------------------------------------------------------------------
+// wxControlContainer
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxControlContainer
+{
+public:
+ // ctors and such
+ wxControlContainer(wxWindow *winParent = NULL);
+ void SetContainerWindow(wxWindow *winParent) { m_winParent = winParent; }
+
+ // the methods to be called from the window event handlers
+ void HandleOnNavigationKey(wxNavigationKeyEvent& event);
+ void HandleOnFocus(wxFocusEvent& event);
+ void HandleOnWindowDestroy(wxWindowBase *child);
+
+ // should be called from SetFocus(), returns false if we did nothing with
+ // the focus and the default processing should take place
+ bool DoSetFocus();
+
+ // can our child get the focus?
+ bool AcceptsFocus() const;
+
+ // called from OnChildFocus() handler, i.e. when one of our (grand)
+ // children gets the focus
+ void SetLastFocus(wxWindow *win);
+
+protected:
+ // set the focus to the child which had it the last time
+ bool SetFocusToChild();
+
+ // the parent window we manage the children for
+ wxWindow *m_winParent;
+
+ // the child which had the focus last time this panel was activated
+ wxWindow *m_winLastFocused;
+
+ // a guard against infinite recursion
+ bool m_inSetFocus;
+
+ DECLARE_NO_COPY_CLASS(wxControlContainer)
+};
+
+// this function is for wxWidgets internal use only
+extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
+
+// ----------------------------------------------------------------------------
+// macros which may be used by the classes wishing to implement TAB navigation
+// among their children
+// ----------------------------------------------------------------------------
+
+// declare the methods to be forwarded
+#define WX_DECLARE_CONTROL_CONTAINER() \
+public: \
+ void OnNavigationKey(wxNavigationKeyEvent& event); \
+ void OnFocus(wxFocusEvent& event); \
+ virtual void OnChildFocus(wxChildFocusEvent& event); \
+ virtual void SetFocus(); \
+ virtual void SetFocusIgnoringChildren(); \
+ virtual void RemoveChild(wxWindowBase *child); \
+ virtual bool AcceptsFocus() const; \
+\
+protected: \
+ wxControlContainer m_container
+
+// implement the event table entries for wxControlContainer
+#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname) \
+ EVT_SET_FOCUS(classname::OnFocus) \
+ EVT_CHILD_FOCUS(classname::OnChildFocus) \
+ EVT_NAVIGATION_KEY(classname::OnNavigationKey)
+
+// implement the methods forwarding to the wxControlContainer
+#define WX_DELEGATE_TO_CONTROL_CONTAINER(classname, basename) \
+void classname::OnNavigationKey( wxNavigationKeyEvent& event ) \
+{ \
+ m_container.HandleOnNavigationKey(event); \
+} \
+ \
+void classname::RemoveChild(wxWindowBase *child) \
+{ \
+ m_container.HandleOnWindowDestroy(child); \
+ \
+ basename::RemoveChild(child); \
+} \
+ \
+void classname::SetFocus() \
+{ \
+ if ( !m_container.DoSetFocus() ) \
+ basename::SetFocus(); \
+} \
+ \
+void classname::SetFocusIgnoringChildren() \
+{ \
+ basename::SetFocus(); \
+} \
+ \
+void classname::OnChildFocus(wxChildFocusEvent& event) \
+{ \
+ m_container.SetLastFocus(event.GetWindow()); \
+ event.Skip(); \
+} \
+ \
+void classname::OnFocus(wxFocusEvent& event) \
+{ \
+ m_container.HandleOnFocus(event); \
+} \
+bool classname::AcceptsFocus() const \
+{ \
+ return m_container.AcceptsFocus(); \
+}
+
+
+#endif // _WX_CONTAINR_H_
diff --git a/3rdparty/wxWidgets/include/wx/control.h b/3rdparty/wxWidgets/include/wx/control.h
new file mode 100644
index 0000000000..b5208d07d5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/control.h
@@ -0,0 +1,117 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/control.h
+// Purpose: wxControl common interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 26.07.99
+// RCS-ID: $Id: control.h 42816 2006-10-31 08:50:17Z RD $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CONTROL_H_BASE_
+#define _WX_CONTROL_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_CONTROLS
+
+#include "wx/window.h" // base class
+
+extern WXDLLEXPORT_DATA(const wxChar) wxControlNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxControl is the base class for all controls
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxControlBase : public wxWindow
+{
+public:
+ wxControlBase() { }
+
+ virtual ~wxControlBase();
+
+ // Create() function adds the validator parameter
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxControlNameStr);
+
+ // get the control alignment (left/right/centre, top/bottom/centre)
+ int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
+
+ // get the string without mnemonic characters ('&')
+ static wxString GetLabelText(const wxString& label);
+
+ // get just the text of the label, without mnemonic characters ('&')
+ wxString GetLabelText() const { return GetLabelText(GetLabel()); }
+
+ // controls by default inherit the colours of their parents, if a
+ // particular control class doesn't want to do it, it can override
+ // ShouldInheritColours() to return false
+ virtual bool ShouldInheritColours() const { return true; }
+
+
+ // WARNING: this doesn't work for all controls nor all platforms!
+ //
+ // simulates the event of given type (i.e. wxButton::Command() is just as
+ // if the button was clicked)
+ virtual void Command(wxCommandEvent &event);
+
+ virtual void SetLabel( const wxString &label );
+ virtual bool SetFont(const wxFont& font);
+
+ // wxControl-specific processing after processing the update event
+ virtual void DoUpdateWindowUI(wxUpdateUIEvent& event);
+
+protected:
+ // creates the control (calls wxWindowBase::CreateBase inside) and adds it
+ // to the list of parents children
+ bool CreateControl(wxWindowBase *parent,
+ wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name);
+
+ // initialize the common fields of wxCommandEvent
+ void InitCommandEvent(wxCommandEvent& event) const;
+
+ DECLARE_NO_COPY_CLASS(wxControlBase)
+};
+
+// ----------------------------------------------------------------------------
+// include platform-dependent wxControl declarations
+// ----------------------------------------------------------------------------
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/control.h"
+#elif defined(__WXPALMOS__)
+ #include "wx/palmos/control.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/control.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/control.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/control.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/control.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/control.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/control.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/control.h"
+#endif
+
+#endif // wxUSE_CONTROLS
+
+#endif
+ // _WX_CONTROL_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/convauto.h b/3rdparty/wxWidgets/include/wx/convauto.h
new file mode 100644
index 0000000000..8d96afa557
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/convauto.h
@@ -0,0 +1,108 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/convauto.h
+// Purpose: wxConvAuto class declaration
+// Author: Vadim Zeitlin
+// Created: 2006-04-03
+// RCS-ID: $Id: convauto.h 45893 2007-05-08 20:05:16Z VZ $
+// Copyright: (c) 2006 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CONVAUTO_H_
+#define _WX_CONVAUTO_H_
+
+#include "wx/strconv.h"
+
+#if wxUSE_WCHAR_T
+
+// ----------------------------------------------------------------------------
+// wxConvAuto: uses BOM to automatically detect input encoding
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv
+{
+public:
+ // default ctor, the real conversion will be created on demand
+ wxConvAuto() { m_conv = NULL; /* the rest will be initialized later */ }
+
+ // copy ctor doesn't initialize anything neither as conversion can only be
+ // deduced on first use
+ wxConvAuto(const wxConvAuto& WXUNUSED(other)) : wxMBConv() { m_conv = NULL; }
+
+ virtual ~wxConvAuto() { if ( m_conv && m_ownsConv ) delete m_conv; }
+
+ // override the base class virtual function(s) to use our m_conv
+ virtual size_t ToWChar(wchar_t *dst, size_t dstLen,
+ const char *src, size_t srcLen = wxNO_LEN) const;
+
+ virtual size_t FromWChar(char *dst, size_t dstLen,
+ const wchar_t *src, size_t srcLen = wxNO_LEN) const;
+
+ virtual size_t GetMBNulLen() const { return m_conv->GetMBNulLen(); }
+
+ virtual wxMBConv *Clone() const { return new wxConvAuto(*this); }
+
+private:
+ // all currently recognized BOM values
+ enum BOMType
+ {
+ BOM_None,
+ BOM_UTF32BE,
+ BOM_UTF32LE,
+ BOM_UTF16BE,
+ BOM_UTF16LE,
+ BOM_UTF8
+ };
+
+ // return the BOM type of this buffer
+ static BOMType DetectBOM(const char *src, size_t srcLen);
+
+ // initialize m_conv with the conversion to use by default (UTF-8)
+ void InitWithDefault()
+ {
+ m_conv = &wxConvUTF8;
+ m_ownsConv = false;
+ }
+
+ // create the correct conversion object for the given BOM type
+ void InitFromBOM(BOMType bomType);
+
+ // create the correct conversion object for the BOM present in the
+ // beginning of the buffer; adjust the buffer to skip the BOM if found
+ void InitFromInput(const char **src, size_t *len);
+
+ // adjust src and len to skip over the BOM (identified by m_bomType) at the
+ // start of the buffer
+ void SkipBOM(const char **src, size_t *len) const;
+
+
+ // conversion object which we really use, NULL until the first call to
+ // either ToWChar() or FromWChar()
+ wxMBConv *m_conv;
+
+ // our BOM type
+ BOMType m_bomType;
+
+ // true if we allocated m_conv ourselves, false if we just use an existing
+ // global conversion
+ bool m_ownsConv;
+
+ // true if we already skipped BOM when converting (and not just calculating
+ // the size)
+ bool m_consumedBOM;
+
+
+ DECLARE_NO_ASSIGN_CLASS(wxConvAuto)
+};
+
+#else // !wxUSE_WCHAR_T
+
+// it doesn't matter how we define it in this case as it's unused anyhow, but
+// do define it to allow the code using wxConvAuto() as default argument (this
+// is done in many places) to compile
+typedef wxMBConv wxConvAuto;
+
+#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
+
+#endif // _WX_CONVAUTO_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/cpp.h b/3rdparty/wxWidgets/include/wx/cpp.h
new file mode 100644
index 0000000000..3e23273acd
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cpp.h
@@ -0,0 +1,57 @@
+/*
+ * Name: wx/cpp.h
+ * Purpose: Various preprocessor helpers
+ * Author: Vadim Zeitlin
+ * Created: 2006-09-30
+ * RCS-ID: $Id: cpp.h 42993 2006-11-03 21:06:57Z VZ $
+ * Copyright: (c) 2006 Vadim Zeitlin
+ * Licence: wxWindows licence
+ */
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+#ifndef _WX_CPP_H_
+#define _WX_CPP_H_
+
+/* wxCONCAT works like preprocessor ## operator but also works with macros */
+#define wxCONCAT_HELPER(text, line) text ## line
+#define wxCONCAT(text, line) wxCONCAT_HELPER(text, line)
+
+/* wxSTRINGIZE works as the preprocessor # operator but also works with macros */
+#define wxSTRINGIZE_HELPER(x) #x
+#define wxSTRINGIZE(x) wxSTRINGIZE_HELPER(x)
+
+/* a Unicode-friendly version of wxSTRINGIZE_T */
+#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x))
+
+/*
+ Helper macros for wxMAKE_UNIQUE_NAME: normally this works by appending the
+ current line number to the given identifier to reduce the probability of the
+ conflict (it may still happen if this is used in the headers, hence you
+ should avoid doing it or provide unique prefixes then) but we have to do it
+ differently for VC++
+ */
+#if defined(__VISUALC__) && (__VISUALC__ >= 1300)
+ /*
+ __LINE__ handling is completely broken in VC++ when using "Edit and
+ Continue" (/ZI option) and results in preprocessor errors if we use it
+ inside the macros. Luckily VC7 has another standard macro which can be
+ used like this and is even better than __LINE__ because it is globally
+ unique.
+ */
+# define wxCONCAT_LINE(text) wxCONCAT(text, __COUNTER__)
+#else /* normal compilers */
+# define wxCONCAT_LINE(text) wxCONCAT(text, __LINE__)
+#endif
+
+/* Create a "unique" name with the given prefix */
+#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text)
+
+/*
+ This macro can be passed as argument to another macro when you don't have
+ anything to pass in fact.
+ */
+#define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */
+
+#endif // _WX_CPP_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/cppunit.h b/3rdparty/wxWidgets/include/wx/cppunit.h
new file mode 100644
index 0000000000..c70cfbd805
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cppunit.h
@@ -0,0 +1,129 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/cppunit.h
+// Purpose: wrapper header for CppUnit headers
+// Author: Vadim Zeitlin
+// Created: 15.02.04
+// RCS-ID: $Id: cppunit.h 53917 2008-06-01 20:32:26Z VZ $
+// Copyright: (c) 2004 Vadim Zeitlin
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CPPUNIT_H_
+#define _WX_CPPUNIT_H_
+
+///////////////////////////////////////////////////////////////////////////////
+// using CPPUNIT_TEST() macro results in this warning, disable it as there is
+// no other way to get rid of it and it's not very useful anyhow
+#ifdef __VISUALC__
+ // typedef-name 'foo' used as synonym for class-name 'bar'
+ #pragma warning(disable:4097)
+
+ // unreachable code: we don't care about warnings in CppUnit headers
+ #pragma warning(disable:4702)
+
+ // 'id': identifier was truncated to 'num' characters in the debug info
+ #pragma warning(disable:4786)
+#endif // __VISUALC__
+
+#ifdef __BORLANDC__
+ #pragma warn -8022
+#endif
+
+#ifndef CPPUNIT_STD_NEED_ALLOCATOR
+ #define CPPUNIT_STD_NEED_ALLOCATOR 0
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+// Set the default format for the errors, which can be used by an IDE to jump
+// to the error location. This default gets overridden by the cppunit headers
+// for some compilers (e.g. VC++).
+
+#ifndef CPPUNIT_COMPILER_LOCATION_FORMAT
+ #define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l:"
+#endif
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Include all needed cppunit headers.
+//
+
+#include "wx/beforestd.h"
+#include
+#include
+#include
+#include
+#include
+#include "wx/afterstd.h"
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Set of helpful test macros.
+//
+
+// Base macro for wrapping CPPUNIT_TEST macros and so making them conditional
+// tests, meaning that the test only get registered and thus run when a given
+// runtime condition is true.
+// In case the condition is evaluated as false a skip message is logged
+// (the message will only be shown in verbose mode).
+#define WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, anyTest) \
+ if (Condition) \
+ { anyTest; } \
+ else \
+ wxLogInfo(wxString::Format(_T("skipping: %s.%s\n reason: %s equals false\n"), \
+ wxString(suiteName, wxConvUTF8).c_str(), \
+ wxString(#testMethod, wxConvUTF8).c_str(), \
+ wxString(#Condition, wxConvUTF8).c_str()))
+
+// Conditional CPPUNIT_TEST macro.
+#define WXTEST_WITH_CONDITION(suiteName, Condition, testMethod) \
+ WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST(testMethod))
+// Conditional CPPUNIT_TEST_FAIL macro.
+#define WXTEST_FAIL_WITH_CONDITION(suiteName, Condition, testMethod) \
+ WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST_FAIL(testMethod))
+
+// Use this macro to compare a wxString with a literal string.
+#define WX_ASSERT_STR_EQUAL(p, s) CPPUNIT_ASSERT_EQUAL(wxString(p), s)
+
+// Use this macro to compare a size_t with a literal integer
+#define WX_ASSERT_SIZET_EQUAL(n, m) CPPUNIT_ASSERT_EQUAL(((size_t)n), m)
+
+// Use this macro to compare the expected time_t value with the result of not
+// necessarily time_t type
+#define WX_ASSERT_TIME_T_EQUAL(t, n) CPPUNIT_ASSERT_EQUAL((t), (time_t)(n))
+
+
+///////////////////////////////////////////////////////////////////////////////
+// stream inserter for wxString
+//
+
+#include "wx/string.h"
+
+inline std::ostream& operator<<(std::ostream& o, const wxString& s)
+{
+ return o << s.mb_str();
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Some more compiler warning tweaking and auto linking.
+//
+
+#ifdef __BORLANDC__
+ #pragma warn .8022
+#endif
+
+#ifdef _MSC_VER
+ #pragma warning(default:4702)
+#endif // _MSC_VER
+
+// for VC++ automatically link in cppunit library
+#ifdef __VISUALC__
+ #ifdef NDEBUG
+ #pragma comment(lib, "cppunit.lib")
+ #else // Debug
+ #pragma comment(lib, "cppunitd.lib")
+ #endif // Release/Debug
+#endif
+
+#endif // _WX_CPPUNIT_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/cshelp.h b/3rdparty/wxWidgets/include/wx/cshelp.h
new file mode 100644
index 0000000000..f77ac4f67e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cshelp.h
@@ -0,0 +1,244 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/cshelp.h
+// Purpose: Context-sensitive help support classes
+// Author: Julian Smart, Vadim Zeitlin
+// Modified by:
+// Created: 08/09/2000
+// RCS-ID: $Id: cshelp.h 39675 2006-06-11 21:10:32Z VZ $
+// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CSHELP_H_
+#define _WX_CSHELP_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_HELP
+
+#include "wx/help.h"
+
+#include "wx/hashmap.h"
+#if wxUSE_BMPBUTTON
+#include "wx/bmpbuttn.h"
+#endif
+
+#include "wx/event.h"
+
+// ----------------------------------------------------------------------------
+// classes used to implement context help UI
+// ----------------------------------------------------------------------------
+
+/*
+ * wxContextHelp
+ * Invokes context-sensitive help. When the user
+ * clicks on a window, a wxEVT_HELP event will be sent to that
+ * window for the application to display help for.
+ */
+
+class WXDLLEXPORT wxContextHelp : public wxObject
+{
+public:
+ wxContextHelp(wxWindow* win = NULL, bool beginHelp = true);
+ virtual ~wxContextHelp();
+
+ bool BeginContextHelp(wxWindow* win);
+ bool EndContextHelp();
+
+ bool EventLoop();
+ bool DispatchEvent(wxWindow* win, const wxPoint& pt);
+
+ void SetStatus(bool status) { m_status = status; }
+
+protected:
+ bool m_inHelp;
+ bool m_status; // true if the user left-clicked
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxContextHelp)
+};
+
+#if wxUSE_BMPBUTTON
+/*
+ * wxContextHelpButton
+ * You can add this to your dialogs (especially on non-Windows platforms)
+ * to put the application into context help mode.
+ */
+
+class WXDLLEXPORT wxContextHelpButton : public wxBitmapButton
+{
+public:
+ wxContextHelpButton(wxWindow* parent,
+ wxWindowID id = wxID_CONTEXT_HELP,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBU_AUTODRAW);
+
+ void OnContextHelp(wxCommandEvent& event);
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxContextHelpButton)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif
+
+// ----------------------------------------------------------------------------
+// classes used to implement context help support
+// ----------------------------------------------------------------------------
+
+// wxHelpProvider is an abstract class used by the program implementing context help to
+// show the help text (or whatever: it may be HTML page or anything else) for
+// the given window.
+//
+// The current help provider must be explicitly set by the application using
+// wxHelpProvider::Set().
+//
+// Special note about ShowHelpAtPoint() and ShowHelp(): we want to be able to
+// override ShowHelpAtPoint() when we need to use different help messages for
+// different parts of the window, but it should also be possible to override
+// just ShowHelp() both for backwards compatibility and just because most
+// often the help does not, in fact, depend on the position and so
+// implementing just ShowHelp() is simpler and more natural, so by default
+// ShowHelpAtPoint() forwards to ShowHelp(). But this means that
+// wxSimpleHelpProvider has to override ShowHelp() and not ShowHelpAtPoint()
+// for backwards compatibility as otherwise the existing code deriving from it
+// and overriding ShowHelp() but calling the base class version wouldn't work
+// any more, which forces us to use a rather ugly hack and pass the extra
+// parameters of ShowHelpAtPoint() to ShowHelp() via member variables.
+class WXDLLEXPORT wxHelpProvider
+{
+public:
+ // get/set the current (application-global) help provider (Set() returns
+ // the previous one)
+ static wxHelpProvider *Set(wxHelpProvider *helpProvider)
+ {
+ wxHelpProvider *helpProviderOld = ms_helpProvider;
+ ms_helpProvider = helpProvider;
+ return helpProviderOld;
+ }
+
+ // unlike some other class, the help provider is not created on demand,
+ // this must be explicitly done by the application
+ static wxHelpProvider *Get() { return ms_helpProvider; }
+
+ // get the help string (whose interpretation is help provider dependent
+ // except that empty string always means that no help is associated with
+ // the window) for this window
+ virtual wxString GetHelp(const wxWindowBase *window) = 0;
+
+ // do show help for the given window (uses window->GetHelpAtPoint()
+ // internally if applicable), return true if it was done or false
+ // if no help available for this window
+ virtual bool ShowHelpAtPoint(wxWindowBase *window,
+ const wxPoint& pt,
+ wxHelpEvent::Origin origin)
+ {
+ wxCHECK_MSG( window, false, _T("window must not be NULL") );
+
+ m_helptextAtPoint = pt;
+ m_helptextOrigin = origin;
+
+ return ShowHelp(window);
+ }
+
+ // show help for the given window, see ShowHelpAtPoint() above
+ virtual bool ShowHelp(wxWindowBase * WXUNUSED(window)) { return false; }
+
+ // associate the text with the given window or id: although all help
+ // providers have these functions to allow making wxWindow::SetHelpText()
+ // work, not all of them implement them
+ virtual void AddHelp(wxWindowBase *window, const wxString& text);
+
+ // this version associates the given text with all window with this id
+ // (may be used to set the same help string for all [Cancel] buttons in
+ // the application, for example)
+ virtual void AddHelp(wxWindowID id, const wxString& text);
+
+ // removes the association
+ virtual void RemoveHelp(wxWindowBase* window);
+
+ // virtual dtor for any base class
+ virtual ~wxHelpProvider();
+
+protected:
+ wxHelpProvider()
+ : m_helptextAtPoint(wxDefaultPosition),
+ m_helptextOrigin(wxHelpEvent::Origin_Unknown)
+ {
+ }
+
+ // helper method used by ShowHelp(): returns the help string to use by
+ // using m_helptextAtPoint/m_helptextOrigin if they're set or just GetHelp
+ // otherwise
+ wxString GetHelpTextMaybeAtPoint(wxWindowBase *window);
+
+
+ // parameters of the last ShowHelpAtPoint() call, used by ShowHelp()
+ wxPoint m_helptextAtPoint;
+ wxHelpEvent::Origin m_helptextOrigin;
+
+private:
+ static wxHelpProvider *ms_helpProvider;
+};
+
+WX_DECLARE_EXPORTED_HASH_MAP( wxUIntPtr, wxString, wxIntegerHash,
+ wxIntegerEqual, wxSimpleHelpProviderHashMap );
+
+// wxSimpleHelpProvider is an implementation of wxHelpProvider which supports
+// only plain text help strings and shows the string associated with the
+// control (if any) in a tooltip
+class WXDLLEXPORT wxSimpleHelpProvider : public wxHelpProvider
+{
+public:
+ // implement wxHelpProvider methods
+ virtual wxString GetHelp(const wxWindowBase *window);
+
+ // override ShowHelp() and not ShowHelpAtPoint() as explained above
+ virtual bool ShowHelp(wxWindowBase *window);
+
+ virtual void AddHelp(wxWindowBase *window, const wxString& text);
+ virtual void AddHelp(wxWindowID id, const wxString& text);
+ virtual void RemoveHelp(wxWindowBase* window);
+
+protected:
+ // we use 2 hashes for storing the help strings associated with windows
+ // and the ids
+ wxSimpleHelpProviderHashMap m_hashWindows,
+ m_hashIds;
+};
+
+// wxHelpControllerHelpProvider is an implementation of wxHelpProvider which supports
+// both context identifiers and plain text help strings. If the help text is an integer,
+// it is passed to wxHelpController::DisplayContextPopup. Otherwise, it shows the string
+// in a tooltip as per wxSimpleHelpProvider.
+class WXDLLEXPORT wxHelpControllerHelpProvider : public wxSimpleHelpProvider
+{
+public:
+ // Note that it doesn't own the help controller. The help controller
+ // should be deleted separately.
+ wxHelpControllerHelpProvider(wxHelpControllerBase* hc = (wxHelpControllerBase*) NULL);
+
+ // implement wxHelpProvider methods
+
+ // again (see above): this should be ShowHelpAtPoint() but we need to
+ // override ShowHelp() to avoid breaking existing code
+ virtual bool ShowHelp(wxWindowBase *window);
+
+ // Other accessors
+ void SetHelpController(wxHelpControllerBase* hc) { m_helpController = hc; }
+ wxHelpControllerBase* GetHelpController() const { return m_helpController; }
+
+protected:
+ wxHelpControllerBase* m_helpController;
+
+ DECLARE_NO_COPY_CLASS(wxHelpControllerHelpProvider)
+};
+
+// Convenience function for turning context id into wxString
+WXDLLEXPORT wxString wxContextId(int id);
+
+#endif // wxUSE_HELP
+
+#endif // _WX_CSHELP_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/ctrlsub.h b/3rdparty/wxWidgets/include/wx/ctrlsub.h
new file mode 100644
index 0000000000..6697bb6b32
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/ctrlsub.h
@@ -0,0 +1,210 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/ctrlsub.h (read: "wxConTRoL with SUBitems")
+// Purpose: wxControlWithItems interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 22.10.99
+// RCS-ID: $Id: ctrlsub.h 42816 2006-10-31 08:50:17Z RD $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CTRLSUB_H_BASE_
+#define _WX_CTRLSUB_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_CONTROLS
+
+#include "wx/control.h" // base class
+
+// ----------------------------------------------------------------------------
+// wxItemContainer defines an interface which is implemented by all controls
+// which have string subitems each of which may be selected.
+//
+// It is decomposed in wxItemContainerImmutable which omits all methods
+// adding/removing items and is used by wxRadioBox and wxItemContainer itself.
+//
+// Examples: wxListBox, wxCheckListBox, wxChoice and wxComboBox (which
+// implements an extended interface deriving from this one)
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxItemContainerImmutable
+{
+public:
+ wxItemContainerImmutable() { }
+ virtual ~wxItemContainerImmutable();
+
+ // accessing strings
+ // -----------------
+
+ virtual unsigned int GetCount() const = 0;
+ bool IsEmpty() const { return GetCount() == 0; }
+
+ virtual wxString GetString(unsigned int n) const = 0;
+ wxArrayString GetStrings() const;
+ virtual void SetString(unsigned int n, const wxString& s) = 0;
+
+ // finding string natively is either case sensitive or insensitive
+ // but never both so fall back to this base version for not
+ // supported search type
+ virtual int FindString(const wxString& s, bool bCase = false) const
+ {
+ unsigned int count = GetCount();
+
+ for ( unsigned int i = 0; i < count ; ++i )
+ {
+ if (GetString(i).IsSameAs( s , bCase ))
+ return (int)i;
+ }
+
+ return wxNOT_FOUND;
+ }
+
+
+ // selection
+ // ---------
+
+ virtual void SetSelection(int n) = 0;
+ virtual int GetSelection() const = 0;
+
+ // set selection to the specified string, return false if not found
+ bool SetStringSelection(const wxString& s);
+
+ // return the selected string or empty string if none
+ wxString GetStringSelection() const;
+
+ // this is the same as SetSelection( for single-selection controls but
+ // reads better for multi-selection ones
+ void Select(int n) { SetSelection(n); }
+
+
+protected:
+
+ // check that the index is valid
+ inline bool IsValid(unsigned int n) const { return n < GetCount(); }
+ inline bool IsValidInsert(unsigned int n) const { return n <= GetCount(); }
+};
+
+class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable
+{
+public:
+ wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
+ virtual ~wxItemContainer();
+
+ // adding items
+ // ------------
+
+ int Append(const wxString& item)
+ { return DoAppend(item); }
+ int Append(const wxString& item, void *clientData)
+ { int n = DoAppend(item); SetClientData(n, clientData); return n; }
+ int Append(const wxString& item, wxClientData *clientData)
+ { int n = DoAppend(item); SetClientObject(n, clientData); return n; }
+
+ // only for rtti needs (separate name)
+ void AppendString( const wxString& item)
+ { Append( item ); }
+
+ // append several items at once to the control
+ void Append(const wxArrayString& strings);
+
+ int Insert(const wxString& item, unsigned int pos)
+ { return DoInsert(item, pos); }
+ int Insert(const wxString& item, unsigned int pos, void *clientData);
+ int Insert(const wxString& item, unsigned int pos, wxClientData *clientData);
+
+ // deleting items
+ // --------------
+
+ virtual void Clear() = 0;
+ virtual void Delete(unsigned int n) = 0;
+
+ // misc
+ // ----
+
+ // client data stuff
+ void SetClientData(unsigned int n, void* clientData);
+ void* GetClientData(unsigned int n) const;
+
+ void SetClientObject(unsigned int n, wxClientData* clientData);
+ wxClientData* GetClientObject(unsigned int n) const;
+
+ bool HasClientObjectData() const
+ { return m_clientDataItemsType == wxClientData_Object; }
+ bool HasClientUntypedData() const
+ { return m_clientDataItemsType == wxClientData_Void; }
+
+protected:
+ virtual int DoAppend(const wxString& item) = 0;
+ virtual int DoInsert(const wxString& item, unsigned int pos) = 0;
+
+ virtual void DoSetItemClientData(unsigned int n, void* clientData) = 0;
+ virtual void* DoGetItemClientData(unsigned int n) const = 0;
+ virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData) = 0;
+ virtual wxClientData* DoGetItemClientObject(unsigned int n) const = 0;
+
+
+ // the type of the client data for the items
+ wxClientDataType m_clientDataItemsType;
+};
+
+// this macro must (unfortunately) be used in any class deriving from both
+// wxItemContainer and wxControl because otherwise there is ambiguity when
+// calling GetClientXXX() functions -- the compiler can't choose between the
+// two versions
+#define wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST \
+ void SetClientData(void *data) \
+ { wxEvtHandler::SetClientData(data); } \
+ void *GetClientData() const \
+ { return wxEvtHandler::GetClientData(); } \
+ void SetClientObject(wxClientData *data) \
+ { wxEvtHandler::SetClientObject(data); } \
+ wxClientData *GetClientObject() const \
+ { return wxEvtHandler::GetClientObject(); } \
+ void SetClientData(unsigned int n, void* clientData) \
+ { wxItemContainer::SetClientData(n, clientData); } \
+ void* GetClientData(unsigned int n) const \
+ { return wxItemContainer::GetClientData(n); } \
+ void SetClientObject(unsigned int n, wxClientData* clientData) \
+ { wxItemContainer::SetClientObject(n, clientData); } \
+ wxClientData* GetClientObject(unsigned int n) const \
+ { return wxItemContainer::GetClientObject(n); }
+
+class WXDLLEXPORT wxControlWithItems : public wxControl, public wxItemContainer
+{
+public:
+ wxControlWithItems() { }
+ virtual ~wxControlWithItems();
+
+ // we have to redefine these functions here to avoid ambiguities in classes
+ // deriving from us which would arise otherwise because both base classses
+ // have the methods with the same names - hopefully, a smart compiler can
+ // optimize away these simple inline wrappers so we don't suffer much from
+ // this
+ wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
+
+ // usually the controls like list/combo boxes have their own background
+ // colour
+ virtual bool ShouldInheritColours() const { return false; }
+
+protected:
+ // fill in the client object or data field of the event as appropriate
+ //
+ // calls InitCommandEvent() and, if n != wxNOT_FOUND, also sets the per
+ // item client data
+ void InitCommandEventWithItems(wxCommandEvent& event, int n);
+
+private:
+ DECLARE_ABSTRACT_CLASS(wxControlWithItems)
+ DECLARE_NO_COPY_CLASS(wxControlWithItems)
+};
+
+
+// ----------------------------------------------------------------------------
+// inline functions
+// ----------------------------------------------------------------------------
+
+#endif // wxUSE_CONTROLS
+
+#endif // _WX_CTRLSUB_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/cursor.h b/3rdparty/wxWidgets/include/wx/cursor.h
new file mode 100644
index 0000000000..39b4e21940
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/cursor.h
@@ -0,0 +1,79 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/cursor.h
+// Purpose: wxCursor base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: cursor.h 40865 2006-08-27 09:42:42Z VS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CURSOR_H_BASE_
+#define _WX_CURSOR_H_BASE_
+
+#include "wx/defs.h"
+
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/cursor.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/cursor.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/cursor.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/cursor.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/cursor.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/cursor.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/cursor.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/cursor.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/cursor.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/cursor.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/cursor.h"
+#endif
+
+#include "wx/utils.h"
+
+/* This is a small class which can be used by all ports
+ to temporarily suspend the busy cursor. Useful in modal
+ dialogs.
+
+ Actually that is not (any longer) quite true.. currently it is
+ only used in wxGTK Dialog::ShowModal() and now uses static
+ wxBusyCursor methods that are only implemented for wxGTK so far.
+ The BusyCursor handling code should probably be implemented in
+ common code somewhere instead of the separate implementations we
+ currently have. Also the name BusyCursorSuspender is a little
+ misleading since it doesn't actually suspend the BusyCursor, just
+ masks one that is already showing.
+ If another call to wxBeginBusyCursor is made while this is active
+ the Busy Cursor will again be shown. But at least now it doesn't
+ interfere with the state of wxIsBusy() -- RL
+
+*/
+class wxBusyCursorSuspender
+{
+public:
+ wxBusyCursorSuspender()
+ {
+ if( wxIsBusy() )
+ {
+ wxSetCursor( wxBusyCursor::GetStoredCursor() );
+ }
+ }
+ ~wxBusyCursorSuspender()
+ {
+ if( wxIsBusy() )
+ {
+ wxSetCursor( wxBusyCursor::GetBusyCursor() );
+ }
+ }
+};
+#endif
+ // _WX_CURSOR_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dataobj.h b/3rdparty/wxWidgets/include/wx/dataobj.h
new file mode 100644
index 0000000000..4c290dc340
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dataobj.h
@@ -0,0 +1,540 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/dataobj.h
+// Purpose: common data object classes
+// Author: Vadim Zeitlin, Robert Roebling
+// Modified by:
+// Created: 26.05.99
+// RCS-ID: $Id: dataobj.h 40772 2006-08-23 13:38:45Z VZ $
+// Copyright: (c) wxWidgets Team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATAOBJ_H_BASE_
+#define _WX_DATAOBJ_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+#include "wx/defs.h"
+
+#if wxUSE_DATAOBJ
+
+#include "wx/string.h"
+#include "wx/bitmap.h"
+#include "wx/list.h"
+#include "wx/arrstr.h"
+
+// ============================================================================
+/*
+ Generic data transfer related classes. The class hierarchy is as follows:
+
+ - wxDataObject-
+ / \
+ / \
+ wxDataObjectSimple wxDataObjectComposite
+ / | \
+ / | \
+ wxTextDataObject | wxBitmapDataObject
+ |
+ wxCustomDataObject
+
+*/
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxDataFormat class is declared in platform-specific headers: it represents
+// a format for data which may be either one of the standard ones (text,
+// bitmap, ...) or a custom one which is then identified by a unique string.
+// ----------------------------------------------------------------------------
+
+/* the class interface looks like this (pseudo code):
+
+class wxDataFormat
+{
+public:
+ typedef NativeFormat;
+
+ wxDataFormat(NativeFormat format = wxDF_INVALID);
+ wxDataFormat(const wxChar *format);
+
+ wxDataFormat& operator=(NativeFormat format);
+ wxDataFormat& operator=(const wxDataFormat& format);
+
+ bool operator==(NativeFormat format) const;
+ bool operator!=(NativeFormat format) const;
+
+ void SetType(NativeFormat format);
+ NativeFormat GetType() const;
+
+ wxString GetId() const;
+ void SetId(const wxChar *format);
+};
+
+*/
+
+#if defined(__WXMSW__)
+ #include "wx/msw/ole/dataform.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/dataform.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/dataform.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/dataform.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/dataform.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/dataform.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dataform.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/dataform.h"
+#endif
+
+// the value for default argument to some functions (corresponds to
+// wxDF_INVALID)
+extern WXDLLEXPORT const wxDataFormat& wxFormatInvalid;
+
+// ----------------------------------------------------------------------------
+// wxDataObject represents a piece of data which knows which formats it
+// supports and knows how to render itself in each of them - GetDataHere(),
+// and how to restore data from the buffer (SetData()).
+//
+// Although this class may be used directly (i.e. custom classes may be
+// derived from it), in many cases it might be simpler to use either
+// wxDataObjectSimple or wxDataObjectComposite classes.
+//
+// A data object may be "read only", i.e. support only GetData() functions or
+// "read-write", i.e. support both GetData() and SetData() (in principle, it
+// might be "write only" too, but this is rare). Moreover, it doesn't have to
+// support the same formats in Get() and Set() directions: for example, a data
+// object containing JPEG image might accept BMPs in GetData() because JPEG
+// image may be easily transformed into BMP but not in SetData(). Accordingly,
+// all methods dealing with formats take an additional "direction" argument
+// which is either SET or GET and which tells the function if the format needs
+// to be supported by SetData() or GetDataHere().
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDataObjectBase
+{
+public:
+ enum Direction
+ {
+ Get = 0x01, // format is supported by GetDataHere()
+ Set = 0x02, // format is supported by SetData()
+ Both = 0x03 // format is supported by both (unused currently)
+ };
+
+ // this class is polymorphic, hence it needs a virtual dtor
+ virtual ~wxDataObjectBase();
+
+ // get the best suited format for rendering our data
+ virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const = 0;
+
+ // get the number of formats we support
+ virtual size_t GetFormatCount(Direction dir = Get) const = 0;
+
+ // return all formats in the provided array (of size GetFormatCount())
+ virtual void GetAllFormats(wxDataFormat *formats,
+ Direction dir = Get) const = 0;
+
+ // get the (total) size of data for the given format
+ virtual size_t GetDataSize(const wxDataFormat& format) const = 0;
+
+ // copy raw data (in the specified format) to the provided buffer, return
+ // true if data copied successfully, false otherwise
+ virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0;
+
+ // get data from the buffer of specified length (in the given format),
+ // return true if the data was read successfully, false otherwise
+ virtual bool SetData(const wxDataFormat& WXUNUSED(format),
+ size_t WXUNUSED(len), const void * WXUNUSED(buf))
+ {
+ return false;
+ }
+
+ // returns true if this format is supported
+ bool IsSupported(const wxDataFormat& format, Direction dir = Get) const;
+};
+
+// ----------------------------------------------------------------------------
+// include the platform-specific declarations of wxDataObject
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/ole/dataobj.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/dataobj.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/dataobj.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/dataobj.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/dataobj.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/dataobj.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dataobj.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/dataobj.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// wxDataObjectSimple is a wxDataObject which only supports one format (in
+// both Get and Set directions, but you may return false from GetDataHere() or
+// SetData() if one of them is not supported). This is the simplest possible
+// wxDataObject implementation.
+//
+// This is still an "abstract base class" (although it doesn't have any pure
+// virtual functions), to use it you should derive from it and implement
+// GetDataSize(), GetDataHere() and SetData() functions because the base class
+// versions don't do anything - they just return "not implemented".
+//
+// This class should be used when you provide data in only one format (no
+// conversion to/from other formats), either a standard or a custom one.
+// Otherwise, you should use wxDataObjectComposite or wxDataObject directly.
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDataObjectSimple : public wxDataObject
+{
+public:
+ // ctor takes the format we support, but it can also be set later with
+ // SetFormat()
+ wxDataObjectSimple(const wxDataFormat& format = wxFormatInvalid)
+ : m_format(format)
+ {
+ }
+
+ // get/set the format we support
+ const wxDataFormat& GetFormat() const { return m_format; }
+ void SetFormat(const wxDataFormat& format) { m_format = format; }
+
+ // virtual functions to override in derived class (the base class versions
+ // just return "not implemented")
+ // -----------------------------------------------------------------------
+
+ // get the size of our data
+ virtual size_t GetDataSize() const
+ { return 0; }
+
+ // copy our data to the buffer
+ virtual bool GetDataHere(void *WXUNUSED(buf)) const
+ { return false; }
+
+ // copy data from buffer to our data
+ virtual bool SetData(size_t WXUNUSED(len), const void *WXUNUSED(buf))
+ { return false; }
+
+ // implement base class pure virtuals
+ // ----------------------------------
+ virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const
+ { return m_format; }
+ virtual size_t GetFormatCount(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const
+ { return 1; }
+ virtual void GetAllFormats(wxDataFormat *formats,
+ wxDataObjectBase::Direction WXUNUSED(dir) = Get) const
+ { *formats = m_format; }
+ virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const
+ { return GetDataSize(); }
+ virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
+ void *buf) const
+ { return GetDataHere(buf); }
+ virtual bool SetData(const wxDataFormat& WXUNUSED(format),
+ size_t len, const void *buf)
+ { return SetData(len, buf); }
+
+private:
+ // the one and only format we support
+ wxDataFormat m_format;
+
+ DECLARE_NO_COPY_CLASS(wxDataObjectSimple)
+};
+
+// ----------------------------------------------------------------------------
+// wxDataObjectComposite is the simplest way to implement wxDataObject
+// supporting multiple formats. It contains several wxDataObjectSimple and
+// supports all formats supported by any of them.
+//
+// This class shouldn't be (normally) derived from, but may be used directly.
+// If you need more flexibility than what it provides, you should probably use
+// wxDataObject directly.
+// ----------------------------------------------------------------------------
+
+WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList);
+
+class WXDLLEXPORT wxDataObjectComposite : public wxDataObject
+{
+public:
+ // ctor
+ wxDataObjectComposite();
+ virtual ~wxDataObjectComposite();
+
+ // add data object (it will be deleted by wxDataObjectComposite, hence it
+ // must be allocated on the heap) whose format will become the preferred
+ // one if preferred == true
+ void Add(wxDataObjectSimple *dataObject, bool preferred = false);
+
+ // Report the format passed to the SetData method. This should be the
+ // format of the data object within the composite that recieved data from
+ // the clipboard or the DnD operation. You can use this method to find
+ // out what kind of data object was recieved.
+ wxDataFormat GetReceivedFormat() const;
+
+ // implement base class pure virtuals
+ // ----------------------------------
+ virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction dir = Get) const;
+ virtual size_t GetFormatCount(wxDataObjectBase::Direction dir = Get) const;
+ virtual void GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir = Get) const;
+ virtual size_t GetDataSize(const wxDataFormat& format) const;
+ virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
+ virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf);
+#if defined(__WXMSW__)
+ virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
+ const wxDataFormat& format );
+ virtual void* SetSizeInBuffer( void* buffer, size_t size,
+ const wxDataFormat& format );
+ virtual size_t GetBufferOffset( const wxDataFormat& format );
+#endif
+
+protected:
+ // returns the pointer to the object which supports this format or NULL
+ wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
+
+private:
+ // the list of all (simple) data objects whose formats we support
+ wxSimpleDataObjectList m_dataObjects;
+
+ // the index of the preferred one (0 initially, so by default the first
+ // one is the preferred)
+ size_t m_preferred;
+
+ wxDataFormat m_receivedFormat;
+
+ DECLARE_NO_COPY_CLASS(wxDataObjectComposite)
+};
+
+// ============================================================================
+// Standard implementations of wxDataObjectSimple which can be used directly
+// (i.e. without having to derive from them) for standard data type transfers.
+//
+// Note that although all of them can work with provided data, you can also
+// override their virtual GetXXX() functions to only provide data on demand.
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxTextDataObject contains text data
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTextDataObject : public wxDataObjectSimple
+{
+public:
+ // ctor: you can specify the text here or in SetText(), or override
+ // GetText()
+ wxTextDataObject(const wxString& text = wxEmptyString)
+ : wxDataObjectSimple(
+#if wxUSE_UNICODE
+ wxDF_UNICODETEXT
+#else
+ wxDF_TEXT
+#endif
+ ),
+ m_text(text)
+ {
+ }
+
+ // virtual functions which you may override if you want to provide text on
+ // demand only - otherwise, the trivial default versions will be used
+ virtual size_t GetTextLength() const { return m_text.Len() + 1; }
+ virtual wxString GetText() const { return m_text; }
+ virtual void SetText(const wxString& text) { m_text = text; }
+
+ // implement base class pure virtuals
+ // ----------------------------------
+
+ // some platforms have 2 and not 1 format for text data
+#if wxUSE_UNICODE && (defined(__WXGTK20__) || defined(__WXMAC__))
+ virtual size_t GetFormatCount(Direction WXUNUSED(dir) = Get) const { return 2; }
+ virtual void GetAllFormats(wxDataFormat *formats,
+ wxDataObjectBase::Direction WXUNUSED(dir) = Get) const;
+
+ virtual size_t GetDataSize() const { return GetDataSize(GetPreferredFormat()); }
+ virtual bool GetDataHere(void *buf) const { return GetDataHere(GetPreferredFormat(), buf); }
+ virtual bool SetData(size_t len, const void *buf) { return SetData(GetPreferredFormat(), len, buf); }
+
+ size_t GetDataSize(const wxDataFormat& format) const;
+ bool GetDataHere(const wxDataFormat& format, void *pBuf) const;
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf);
+#else
+ virtual size_t GetDataSize() const;
+ virtual bool GetDataHere(void *buf) const;
+ virtual bool SetData(size_t len, const void *buf);
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
+#endif
+
+private:
+ wxString m_text;
+
+ DECLARE_NO_COPY_CLASS(wxTextDataObject)
+};
+
+// ----------------------------------------------------------------------------
+// wxBitmapDataObject contains a bitmap
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBitmapDataObjectBase : public wxDataObjectSimple
+{
+public:
+ // ctor: you can specify the bitmap here or in SetBitmap(), or override
+ // GetBitmap()
+ wxBitmapDataObjectBase(const wxBitmap& bitmap = wxNullBitmap)
+ : wxDataObjectSimple(wxDF_BITMAP), m_bitmap(bitmap)
+ {
+ }
+
+ // virtual functions which you may override if you want to provide data on
+ // demand only - otherwise, the trivial default versions will be used
+ virtual wxBitmap GetBitmap() const { return m_bitmap; }
+ virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
+
+protected:
+ wxBitmap m_bitmap;
+
+ DECLARE_NO_COPY_CLASS(wxBitmapDataObjectBase)
+};
+
+// ----------------------------------------------------------------------------
+// wxFileDataObject contains a list of filenames
+//
+// NB: notice that this is a "write only" object, it can only be filled with
+// data from drag and drop operation.
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFileDataObjectBase : public wxDataObjectSimple
+{
+public:
+ // ctor: use AddFile() later to fill the array
+ wxFileDataObjectBase() : wxDataObjectSimple(wxDF_FILENAME) { }
+
+ // get a reference to our array
+ const wxArrayString& GetFilenames() const { return m_filenames; }
+
+protected:
+ wxArrayString m_filenames;
+
+ DECLARE_NO_COPY_CLASS(wxFileDataObjectBase)
+};
+
+// ----------------------------------------------------------------------------
+// wxCustomDataObject contains arbitrary untyped user data.
+//
+// It is understood that this data can be copied bitwise.
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxCustomDataObject : public wxDataObjectSimple
+{
+public:
+ // if you don't specify the format in the ctor, you can still use
+ // SetFormat() later
+ wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid);
+
+ // the dtor calls Free()
+ virtual ~wxCustomDataObject();
+
+ // you can call SetData() to set m_data: it will make a copy of the data
+ // you pass - or you can use TakeData() which won't copy anything, but
+ // will take ownership of data (i.e. will call Free() on it later)
+ void TakeData(size_t size, void *data);
+
+ // this function is called to allocate "size" bytes of memory from
+ // SetData(). The default version uses operator new[].
+ virtual void *Alloc(size_t size);
+
+ // this function is called when the data is freed, you may override it to
+ // anything you want (or may be nothing at all). The default version calls
+ // operator delete[] on m_data
+ virtual void Free();
+
+ // get data: you may override these functions if you wish to provide data
+ // only when it's requested
+ virtual size_t GetSize() const { return m_size; }
+ virtual void *GetData() const { return m_data; }
+
+ // implement base class pure virtuals
+ // ----------------------------------
+ virtual size_t GetDataSize() const;
+ virtual bool GetDataHere(void *buf) const;
+ virtual bool SetData(size_t size, const void *buf);
+ // Must provide overloads to avoid hiding them (and warnings about it)
+ virtual size_t GetDataSize(const wxDataFormat&) const
+ {
+ return GetDataSize();
+ }
+ virtual bool GetDataHere(const wxDataFormat&, void *buf) const
+ {
+ return GetDataHere(buf);
+ }
+ virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
+ {
+ return SetData(len, buf);
+ }
+
+private:
+ size_t m_size;
+ void *m_data;
+
+ DECLARE_NO_COPY_CLASS(wxCustomDataObject)
+};
+
+// ----------------------------------------------------------------------------
+// include platform-specific declarations of wxXXXBase classes
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/ole/dataobj2.h"
+
+ // wxURLDataObject defined in msw/ole/dataobj2.h
+#else // !__WXMSW__
+ #if defined(__WXGTK20__)
+ #include "wx/gtk/dataobj2.h"
+ #elif defined(__WXGTK__)
+ #include "wx/gtk1/dataobj2.h"
+ #elif defined(__WXX11__)
+ #include "wx/x11/dataobj2.h"
+ #elif defined(__WXMOTIF__)
+ #include "wx/motif/dataobj2.h"
+ #elif defined(__WXMAC__)
+ #include "wx/mac/dataobj2.h"
+ #elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dataobj2.h"
+ #elif defined(__WXPM__)
+ #include "wx/os2/dataobj2.h"
+ #endif
+
+ // wxURLDataObject is simply wxTextDataObject with a different name
+ class WXDLLEXPORT wxURLDataObject : public wxTextDataObject
+ {
+ public:
+ wxURLDataObject(const wxString& url = wxEmptyString)
+ : wxTextDataObject(url)
+ {
+ }
+
+ wxString GetURL() const { return GetText(); }
+ void SetURL(const wxString& url) { SetText(url); }
+ };
+#endif // __WXMSW__/!__WXMSW__
+
+#endif // wxUSE_DATAOBJ
+
+#endif // _WX_DATAOBJ_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dataview.h b/3rdparty/wxWidgets/include/wx/dataview.h
new file mode 100644
index 0000000000..249eff71df
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dataview.h
@@ -0,0 +1,462 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dataview.h
+// Purpose: wxDataViewCtrl base classes
+// Author: Robert Roebling
+// Modified by:
+// Created: 08.01.06
+// RCS-ID: $Id: dataview.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Robert Roebling
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATAVIEW_H_BASE_
+#define _WX_DATAVIEW_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_DATAVIEWCTRL
+
+#include "wx/control.h"
+#include "wx/textctrl.h"
+#include "wx/bitmap.h"
+#include "wx/variant.h"
+
+
+#if defined(__WXGTK20__)
+ // for testing
+ // #define wxUSE_GENERICDATAVIEWCTRL 1
+#elif defined(__WXMAC__)
+ #define wxUSE_GENERICDATAVIEWCTRL 1
+#else
+ #define wxUSE_GENERICDATAVIEWCTRL 1
+#endif
+
+// ----------------------------------------------------------------------------
+// wxDataViewCtrl flags
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// wxDataViewCtrl globals
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
+class WXDLLIMPEXP_FWD_ADV wxDataViewListModel;
+class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
+class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
+class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer;
+
+extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[];
+
+// ---------------------------------------------------------
+// wxDataViewModel
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewModel: public wxObject
+{
+public:
+ wxDataViewModel() { }
+ virtual ~wxDataViewModel() { }
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewModel)
+};
+
+// ---------------------------------------------------------
+// wxDataViewListModelNotifier
+// ---------------------------------------------------------
+
+
+class WXDLLIMPEXP_ADV wxDataViewListModelNotifier: public wxObject
+{
+public:
+ wxDataViewListModelNotifier() { }
+ virtual ~wxDataViewListModelNotifier() { }
+
+ virtual bool RowAppended() = 0;
+ virtual bool RowPrepended() = 0;
+ virtual bool RowInserted( unsigned int before ) = 0;
+ virtual bool RowDeleted( unsigned int row ) = 0;
+ virtual bool RowChanged( unsigned int row ) = 0;
+ virtual bool ValueChanged( unsigned int col, unsigned int row ) = 0;
+ virtual bool RowsReordered( unsigned int *new_order ) = 0;
+ virtual bool Cleared() = 0;
+
+ void SetOwner( wxDataViewListModel *owner ) { m_owner = owner; }
+ wxDataViewListModel *GetOwner() { return m_owner; }
+
+private:
+ wxDataViewListModel *m_owner;
+};
+
+// ---------------------------------------------------------
+// wxDataViewListModel
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewViewingColumn: public wxObject
+{
+public:
+ wxDataViewViewingColumn( wxDataViewColumn *view_column, unsigned int model_column )
+ {
+ m_viewColumn = view_column;
+ m_modelColumn = model_column;
+ }
+
+ wxDataViewColumn *m_viewColumn;
+ unsigned int m_modelColumn;
+};
+
+class WXDLLIMPEXP_ADV wxDataViewListModel: public wxDataViewModel
+{
+public:
+ wxDataViewListModel();
+ virtual ~wxDataViewListModel();
+
+ virtual unsigned int GetNumberOfRows() = 0;
+ virtual unsigned int GetNumberOfCols() = 0;
+ // return type as reported by wxVariant
+ virtual wxString GetColType( unsigned int col ) = 0;
+ // get value into a wxVariant
+ virtual void GetValue( wxVariant &variant, unsigned int col, unsigned int row ) = 0;
+ // set value, call ValueChanged() afterwards!
+ virtual bool SetValue( wxVariant &variant, unsigned int col, unsigned int row ) = 0;
+
+ // delegated notifiers
+ virtual bool RowAppended();
+ virtual bool RowPrepended();
+ virtual bool RowInserted( unsigned int before );
+ virtual bool RowDeleted( unsigned int row );
+ virtual bool RowChanged( unsigned int row );
+ virtual bool ValueChanged( unsigned int col, unsigned int row );
+ virtual bool RowsReordered( unsigned int *new_order );
+ virtual bool Cleared();
+
+ // Used internally
+ void AddViewingColumn( wxDataViewColumn *view_column, unsigned int model_column );
+ void RemoveViewingColumn( wxDataViewColumn *column );
+
+ void AddNotifier( wxDataViewListModelNotifier *notifier );
+ void RemoveNotifier( wxDataViewListModelNotifier *notifier );
+
+ wxList m_notifiers;
+ wxList m_viewingColumns;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewListModel)
+};
+
+// ---------------------------------------------------------
+// wxDataViewSortedListModel
+// ---------------------------------------------------------
+
+typedef int (wxCALLBACK *wxDataViewListModelCompare)
+ (unsigned int row1, unsigned int row2, unsigned int col, wxDataViewListModel* model );
+
+WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(unsigned int, wxDataViewSortedIndexArray, WXDLLIMPEXP_ADV);
+
+class WXDLLIMPEXP_ADV wxDataViewSortedListModel: public wxDataViewListModel
+{
+public:
+ wxDataViewSortedListModel( wxDataViewListModel *child );
+ virtual ~wxDataViewSortedListModel();
+
+ void SetAscending( bool ascending ) { m_ascending = ascending; }
+ bool GetAscending() { return m_ascending; }
+
+ virtual unsigned int GetNumberOfRows();
+ virtual unsigned int GetNumberOfCols();
+ // return type as reported by wxVariant
+ virtual wxString GetColType( unsigned int col );
+ // get value into a wxVariant
+ virtual void GetValue( wxVariant &variant, unsigned int col, unsigned int row );
+ // set value, call ValueChanged() afterwards!
+ virtual bool SetValue( wxVariant &variant, unsigned int col, unsigned int row );
+
+ // called from user
+ virtual bool RowAppended();
+ virtual bool RowPrepended();
+ virtual bool RowInserted( unsigned int before );
+ virtual bool RowDeleted( unsigned int row );
+ virtual bool RowChanged( unsigned int row );
+ virtual bool ValueChanged( unsigned int col, unsigned int row );
+ virtual bool RowsReordered( unsigned int *new_order );
+ virtual bool Cleared();
+
+ // called if child's notifiers are called
+ bool ChildRowAppended();
+ bool ChildRowPrepended();
+ bool ChildRowInserted( unsigned int before );
+ bool ChildRowDeleted( unsigned int row );
+ bool ChildRowChanged( unsigned int row );
+ bool ChildValueChanged( unsigned int col, unsigned int row );
+ bool ChildRowsReordered( unsigned int *new_order );
+ bool ChildCleared();
+
+ virtual void Resort();
+
+private:
+ bool m_ascending;
+ wxDataViewListModel *m_child;
+ wxDataViewSortedIndexArray m_array;
+ wxDataViewListModelNotifier *m_notifierOnChild;
+
+ void InitStatics(); // BAD
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewSortedListModel)
+};
+
+// ---------------------------------------------------------
+// wxDataViewRendererBase
+// ---------------------------------------------------------
+
+enum wxDataViewCellMode
+{
+ wxDATAVIEW_CELL_INERT,
+ wxDATAVIEW_CELL_ACTIVATABLE,
+ wxDATAVIEW_CELL_EDITABLE
+};
+
+enum wxDataViewCellRenderState
+{
+ wxDATAVIEW_CELL_SELECTED = 1,
+ wxDATAVIEW_CELL_PRELIT = 2,
+ wxDATAVIEW_CELL_INSENSITIVE = 4,
+ wxDATAVIEW_CELL_FOCUSED = 8
+};
+
+class WXDLLIMPEXP_ADV wxDataViewRendererBase: public wxObject
+{
+public:
+ wxDataViewRendererBase( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+
+ virtual bool SetValue( const wxVariant& WXUNUSED(value) ) { return true; }
+ virtual bool GetValue( wxVariant& WXUNUSED(value) ) { return true; }
+ virtual bool Validate( wxVariant& WXUNUSED(value) ) { return true; }
+
+ wxString GetVariantType() { return m_variantType; }
+ wxDataViewCellMode GetMode() { return m_mode; }
+
+ void SetOwner( wxDataViewColumn *owner ) { m_owner = owner; }
+ wxDataViewColumn* GetOwner() { return m_owner; }
+
+protected:
+ wxDataViewCellMode m_mode;
+ wxString m_variantType;
+ wxDataViewColumn *m_owner;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
+};
+
+// ---------------------------------------------------------
+// wxDataViewColumnBase
+// ---------------------------------------------------------
+
+enum wxDataViewColumnFlags
+{
+ wxDATAVIEW_COL_RESIZABLE = 1,
+ wxDATAVIEW_COL_SORTABLE = 2,
+ wxDATAVIEW_COL_HIDDEN = 4
+};
+
+class WXDLLIMPEXP_ADV wxDataViewColumnBase: public wxObject
+{
+public:
+ wxDataViewColumnBase( const wxString &title, wxDataViewRenderer *renderer, unsigned int model_column,
+ int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE );
+ wxDataViewColumnBase( const wxBitmap &bitmap, wxDataViewRenderer *renderer, unsigned int model_column,
+ int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE );
+ virtual ~wxDataViewColumnBase();
+
+ virtual void SetTitle( const wxString &title );
+ virtual wxString GetTitle();
+
+ virtual void SetBitmap( const wxBitmap &bitmap );
+ virtual const wxBitmap &GetBitmap();
+
+ virtual void SetAlignment( wxAlignment align ) = 0;
+
+ virtual void SetSortable( bool sortable ) = 0;
+ virtual bool GetSortable() = 0;
+ virtual void SetSortOrder( bool ascending ) = 0;
+ virtual bool IsSortOrderAscending() = 0;
+
+ wxDataViewRenderer* GetRenderer() { return m_renderer; }
+
+ unsigned int GetModelColumn() { return m_model_column; }
+
+ virtual void SetOwner( wxDataViewCtrl *owner ) { m_owner = owner; }
+ wxDataViewCtrl *GetOwner() { return m_owner; }
+
+ virtual int GetWidth() = 0;
+
+private:
+ wxDataViewCtrl *m_ctrl;
+ wxDataViewRenderer *m_renderer;
+ int m_model_column;
+ int m_flags;
+ wxString m_title;
+ wxBitmap m_bitmap;
+ wxDataViewCtrl *m_owner;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase)
+};
+
+// ---------------------------------------------------------
+// wxDataViewCtrlBase
+// ---------------------------------------------------------
+
+#define wxDV_SINGLE 0x0000 // for convenience
+#define wxDV_MULTIPLE 0x0020 // can select multiple items
+
+class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
+{
+public:
+ wxDataViewCtrlBase();
+ virtual ~wxDataViewCtrlBase();
+
+ virtual bool AssociateModel( wxDataViewListModel *model );
+ wxDataViewListModel* GetModel();
+
+ // short cuts
+ bool AppendTextColumn( const wxString &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
+ bool AppendToggleColumn( const wxString &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 );
+ bool AppendProgressColumn( const wxString &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 );
+ bool AppendDateColumn( const wxString &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
+ bool AppendBitmapColumn( const wxString &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
+ bool AppendTextColumn( const wxBitmap &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
+ bool AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 );
+ bool AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 );
+ bool AppendDateColumn( const wxBitmap &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
+ bool AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
+
+ virtual bool AppendColumn( wxDataViewColumn *col );
+ virtual unsigned int GetNumberOfColumns();
+ virtual bool DeleteColumn( unsigned int pos );
+ virtual bool ClearColumns();
+ virtual wxDataViewColumn* GetColumn( unsigned int pos );
+
+ virtual void SetSelection( int row ) = 0; // -1 for unselect
+ inline void ClearSelection() { SetSelection( -1 ); }
+ virtual void Unselect( unsigned int row ) = 0;
+ virtual void SetSelectionRange( unsigned int from, unsigned int to ) = 0;
+ virtual void SetSelections( const wxArrayInt& aSelections) = 0;
+
+ virtual bool IsSelected( unsigned int row ) const = 0;
+ virtual int GetSelection() const = 0;
+ virtual int GetSelections(wxArrayInt& aSelections) const = 0;
+
+private:
+ wxDataViewListModel *m_model;
+ wxList m_cols;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase)
+};
+
+
+// ----------------------------------------------------------------------------
+// wxDataViewEvent - the event class for the wxDataViewCtrl notifications
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewEvent : public wxNotifyEvent
+{
+public:
+ wxDataViewEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
+ : wxNotifyEvent(commandType, winid),
+ m_col(-1),
+ m_row(-1),
+ m_model(NULL),
+ m_value(wxNullVariant),
+ m_editCancelled(false),
+ m_column(NULL)
+ { }
+
+ wxDataViewEvent(const wxDataViewEvent& event)
+ : wxNotifyEvent(event),
+ m_col(event.m_col),
+ m_row(event.m_col),
+ m_model(event.m_model),
+ m_value(event.m_value),
+ m_editCancelled(event.m_editCancelled),
+ m_column(event.m_column)
+ { }
+
+ int GetColumn() const { return m_col; }
+ void SetColumn( int col ) { m_col = col; }
+ int GetRow() const { return m_row; }
+ void SetRow( int row ) { m_row = row; }
+ wxDataViewModel* GetModel() const { return m_model; }
+ void SetModel( wxDataViewModel *model ) { m_model = model; }
+ const wxVariant &GetValue() const { return m_value; }
+ void SetValue( const wxVariant &value ) { m_value = value; }
+
+ // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
+ void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
+ wxDataViewColumn *GetDataViewColumn() { return m_column; }
+
+ // was label editing canceled? (for wxEVT_COMMAND_DATVIEW_END_LABEL_EDIT only)
+ bool IsEditCancelled() const { return m_editCancelled; }
+ void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
+
+ virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); }
+
+protected:
+ int m_col;
+ int m_row;
+ wxDataViewModel *m_model;
+ wxVariant m_value;
+ bool m_editCancelled;
+ wxDataViewColumn *m_column;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent)
+};
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, -1)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED, -1)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, -1)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, -1)
+END_DECLARE_EVENT_TYPES()
+
+typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
+
+#define wxDataViewEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
+
+#define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
+
+#define EVT_DATAVIEW_ROW_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_SELECTED, id, fn)
+#define EVT_DATAVIEW_ROW_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_ACTIVATED, id, fn)
+#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
+#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
+
+
+#if defined(wxUSE_GENERICDATAVIEWCTRL)
+ #include "wx/generic/dataview.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/dataview.h"
+#elif defined(__WXMAC__)
+ // TODO
+ // #include "wx/mac/dataview.h"
+#else
+ #include "wx/generic/dataview.h"
+#endif
+
+#endif // wxUSE_DATAVIEWCTRL
+
+#endif
+ // _WX_DATAVIEW_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/datectrl.h b/3rdparty/wxWidgets/include/wx/datectrl.h
new file mode 100644
index 0000000000..0da12775b5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/datectrl.h
@@ -0,0 +1,112 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/datectrl.h
+// Purpose: implements wxDatePickerCtrl
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 2005-01-09
+// RCS-ID: $Id: datectrl.h 37663 2006-02-21 22:14:31Z MR $
+// Copyright: (c) 2005 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATECTRL_H_
+#define _WX_DATECTRL_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_DATEPICKCTRL
+
+#include "wx/control.h" // the base class
+#include "wx/datetime.h"
+
+#define wxDatePickerCtrlNameStr _T("datectrl")
+
+// wxDatePickerCtrl styles
+enum
+{
+ // default style on this platform, either wxDP_SPIN or wxDP_DROPDOWN
+ wxDP_DEFAULT = 0,
+
+ // a spin control-like date picker (not supported in generic version)
+ wxDP_SPIN = 1,
+
+ // a combobox-like date picker (not supported in mac version)
+ wxDP_DROPDOWN = 2,
+
+ // always show century in the default date display (otherwise it depends on
+ // the system date format which may include the century or not)
+ wxDP_SHOWCENTURY = 4,
+
+ // allow not having any valid date in the control (by default it always has
+ // some date, today initially if no valid date specified in ctor)
+ wxDP_ALLOWNONE = 8
+};
+
+// ----------------------------------------------------------------------------
+// wxDatePickerCtrl: allow the user to enter the date
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxControl
+{
+public:
+ /*
+ The derived classes should implement ctor and Create() method with the
+ following signature:
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& dt = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDatePickerCtrlNameStr);
+ */
+
+ // set/get the date
+ virtual void SetValue(const wxDateTime& dt) = 0;
+ virtual wxDateTime GetValue() const = 0;
+
+ // set/get the allowed valid range for the dates, if either/both of them
+ // are invalid, there is no corresponding limit and if neither is set
+ // GetRange() returns false
+ virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
+ virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
+};
+
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/datectrl.h"
+
+ #define wxHAS_NATIVE_DATEPICKCTRL
+#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+ #include "wx/msw/datectrl.h"
+
+ #define wxHAS_NATIVE_DATEPICKCTRL
+#else
+ #include "wx/generic/datectrl.h"
+
+ class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlGeneric
+ {
+ public:
+ wxDatePickerCtrl() { }
+ wxDatePickerCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDatePickerCtrlNameStr)
+ : wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
+ {
+ }
+
+ private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
+ };
+#endif
+
+#endif // wxUSE_DATEPICKCTRL
+
+#endif // _WX_DATECTRL_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/dateevt.h b/3rdparty/wxWidgets/include/wx/dateevt.h
new file mode 100644
index 0000000000..ba62954406
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dateevt.h
@@ -0,0 +1,69 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/dateevt.h
+// Purpose: declares wxDateEvent class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 2005-01-10
+// RCS-ID: $Id: dateevt.h 39637 2006-06-08 18:27:44Z RD $
+// Copyright: (c) 2005 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATEEVT_H_
+#define _WX_DATEEVT_H_
+
+#include "wx/event.h"
+#include "wx/datetime.h"
+#include "wx/window.h"
+
+// ----------------------------------------------------------------------------
+// wxDateEvent: used by wxCalendarCtrl and wxDatePickerCtrl
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent
+{
+public:
+ wxDateEvent() { }
+ wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type)
+ : wxCommandEvent(type, win->GetId()),
+ m_date(dt)
+ {
+ SetEventObject(win);
+ }
+
+ const wxDateTime& GetDate() const { return m_date; }
+ void SetDate(const wxDateTime &date) { m_date = date; }
+
+ // default copy ctor, assignment operator and dtor are ok
+ virtual wxEvent *Clone() const { return new wxDateEvent(*this); }
+
+private:
+ wxDateTime m_date;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDateEvent)
+};
+
+// ----------------------------------------------------------------------------
+// event types and macros for handling them
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, 1101)
+END_DECLARE_EVENT_TYPES()
+
+typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
+
+#define wxDateEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDateEventFunction, &func)
+
+#define EVT_DATE_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
+
+#ifdef _WX_DEFINE_DATE_EVENTS_
+ DEFINE_EVENT_TYPE(wxEVT_DATE_CHANGED)
+
+ IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent)
+#endif
+
+#endif // _WX_DATEEVT_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/datetime.h b/3rdparty/wxWidgets/include/wx/datetime.h
new file mode 100644
index 0000000000..e74dde1c73
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/datetime.h
@@ -0,0 +1,2137 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/datetime.h
+// Purpose: declarations of time/date related classes (wxDateTime,
+// wxTimeSpan)
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 10.02.99
+// RCS-ID: $Id: datetime.h 57502 2008-12-22 19:52:20Z VZ $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATETIME_H
+#define _WX_DATETIME_H
+
+#include "wx/defs.h"
+
+#if wxUSE_DATETIME
+
+#ifndef __WXWINCE__
+#include
+#else
+#include "wx/msw/wince/time.h"
+#endif
+
+#include // for INT_MIN
+
+#include "wx/longlong.h"
+
+class WXDLLIMPEXP_FWD_BASE wxDateTime;
+class WXDLLIMPEXP_FWD_BASE wxTimeSpan;
+class WXDLLIMPEXP_FWD_BASE wxDateSpan;
+
+#include "wx/dynarray.h"
+
+// not all c-runtimes are based on 1/1/1970 being (time_t) 0
+// set this to the corresponding value in seconds 1/1/1970 has on your
+// systems c-runtime
+
+#if defined(__WXMAC__) && !defined(__DARWIN__) && __MSL__ < 0x6000
+ #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L )
+#else
+ #define WX_TIME_BASE_OFFSET 0
+#endif
+/*
+ * TODO
+ *
+ * + 1. Time zones with minutes (make TimeZone a class)
+ * ? 2. getdate() function like under Solaris
+ * + 3. text conversion for wxDateSpan
+ * + 4. pluggable modules for the workdays calculations
+ * 5. wxDateTimeHolidayAuthority for Easter and other christian feasts
+ */
+
+/* Two wrapper functions for thread safety */
+#ifdef HAVE_LOCALTIME_R
+#define wxLocaltime_r localtime_r
+#else
+WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
+#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
+ // On Windows, localtime _is_ threadsafe!
+#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
+#endif
+#endif
+
+#ifdef HAVE_GMTIME_R
+#define wxGmtime_r gmtime_r
+#else
+WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
+#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
+ // On Windows, gmtime _is_ threadsafe!
+#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
+#endif
+#endif
+
+/*
+ The three (main) classes declared in this header represent:
+
+ 1. An absolute moment in the time (wxDateTime)
+ 2. A difference between two moments in the time, positive or negative
+ (wxTimeSpan)
+ 3. A logical difference between two dates expressed in
+ years/months/weeks/days (wxDateSpan)
+
+ The following arithmetic operations are permitted (all others are not):
+
+ addition
+ --------
+
+ wxDateTime + wxTimeSpan = wxDateTime
+ wxDateTime + wxDateSpan = wxDateTime
+ wxTimeSpan + wxTimeSpan = wxTimeSpan
+ wxDateSpan + wxDateSpan = wxDateSpan
+
+ subtraction
+ ------------
+ wxDateTime - wxDateTime = wxTimeSpan
+ wxDateTime - wxTimeSpan = wxDateTime
+ wxDateTime - wxDateSpan = wxDateTime
+ wxTimeSpan - wxTimeSpan = wxTimeSpan
+ wxDateSpan - wxDateSpan = wxDateSpan
+
+ multiplication
+ --------------
+ wxTimeSpan * number = wxTimeSpan
+ number * wxTimeSpan = wxTimeSpan
+ wxDateSpan * number = wxDateSpan
+ number * wxDateSpan = wxDateSpan
+
+ unitary minus
+ -------------
+ -wxTimeSpan = wxTimeSpan
+ -wxDateSpan = wxDateSpan
+
+ For each binary operation OP (+, -, *) we have the following operatorOP=() as
+ a method and the method with a symbolic name OPER (Add, Subtract, Multiply)
+ as a synonym for it and another const method with the same name which returns
+ the changed copy of the object and operatorOP() as a global function which is
+ implemented in terms of the const version of OPEN. For the unary - we have
+ operator-() as a method, Neg() as synonym for it and Negate() which returns
+ the copy of the object with the changed sign.
+*/
+
+// an invalid/default date time object which may be used as the default
+// argument for arguments of type wxDateTime; it is also returned by all
+// functions returning wxDateTime on failure (this is why it is also called
+// wxInvalidDateTime)
+class WXDLLIMPEXP_FWD_BASE wxDateTime;
+
+extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultDateTimeFormat;
+extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultTimeSpanFormat;
+extern WXDLLIMPEXP_DATA_BASE(const wxDateTime) wxDefaultDateTime;
+
+#define wxInvalidDateTime wxDefaultDateTime
+
+// ----------------------------------------------------------------------------
+// wxDateTime represents an absolute moment in the time
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxDateTime
+{
+public:
+ // types
+ // ------------------------------------------------------------------------
+
+ // a small unsigned integer type for storing things like minutes,
+ // seconds &c. It should be at least short (i.e. not char) to contain
+ // the number of milliseconds - it may also be 'int' because there is
+ // no size penalty associated with it in our code, we don't store any
+ // data in this format
+ typedef unsigned short wxDateTime_t;
+
+ // constants
+ // ------------------------------------------------------------------------
+
+ // the timezones
+ enum TZ
+ {
+ // the time in the current time zone
+ Local,
+
+ // zones from GMT (= Greenwhich Mean Time): they're guaranteed to be
+ // consequent numbers, so writing something like `GMT0 + offset' is
+ // safe if abs(offset) <= 12
+
+ // underscore stands for minus
+ GMT_12, GMT_11, GMT_10, GMT_9, GMT_8, GMT_7,
+ GMT_6, GMT_5, GMT_4, GMT_3, GMT_2, GMT_1,
+ GMT0,
+ GMT1, GMT2, GMT3, GMT4, GMT5, GMT6,
+ GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, GMT13,
+ // Note that GMT12 and GMT_12 are not the same: there is a difference
+ // of exactly one day between them
+
+ // some symbolic names for TZ
+
+ // Europe
+ WET = GMT0, // Western Europe Time
+ WEST = GMT1, // Western Europe Summer Time
+ CET = GMT1, // Central Europe Time
+ CEST = GMT2, // Central Europe Summer Time
+ EET = GMT2, // Eastern Europe Time
+ EEST = GMT3, // Eastern Europe Summer Time
+ MSK = GMT3, // Moscow Time
+ MSD = GMT4, // Moscow Summer Time
+
+ // US and Canada
+ AST = GMT_4, // Atlantic Standard Time
+ ADT = GMT_3, // Atlantic Daylight Time
+ EST = GMT_5, // Eastern Standard Time
+ EDT = GMT_4, // Eastern Daylight Saving Time
+ CST = GMT_6, // Central Standard Time
+ CDT = GMT_5, // Central Daylight Saving Time
+ MST = GMT_7, // Mountain Standard Time
+ MDT = GMT_6, // Mountain Daylight Saving Time
+ PST = GMT_8, // Pacific Standard Time
+ PDT = GMT_7, // Pacific Daylight Saving Time
+ HST = GMT_10, // Hawaiian Standard Time
+ AKST = GMT_9, // Alaska Standard Time
+ AKDT = GMT_8, // Alaska Daylight Saving Time
+
+ // Australia
+
+ A_WST = GMT8, // Western Standard Time
+ A_CST = GMT13 + 1, // Central Standard Time (+9.5)
+ A_EST = GMT10, // Eastern Standard Time
+ A_ESST = GMT11, // Eastern Summer Time
+
+ // New Zealand
+ NZST = GMT12, // Standard Time
+ NZDT = GMT13, // Daylight Saving Time
+
+ // TODO add more symbolic timezone names here
+
+ // Universal Coordinated Time = the new and politically correct name
+ // for GMT
+ UTC = GMT0
+ };
+
+ // the calendar systems we know about: notice that it's valid (for
+ // this classes purpose anyhow) to work with any of these calendars
+ // even with the dates before the historical appearance of the
+ // calendar
+ enum Calendar
+ {
+ Gregorian, // current calendar
+ Julian // calendar in use since -45 until the 1582 (or later)
+
+ // TODO Hebrew, Chinese, Maya, ... (just kidding) (or then may be not?)
+ };
+
+ // these values only are used to identify the different dates of
+ // adoption of the Gregorian calendar (see IsGregorian())
+ //
+ // All data and comments taken verbatim from "The Calendar FAQ (v 2.0)"
+ // by Claus Tøndering, http://www.pip.dknet.dk/~c-t/calendar.html
+ // except for the comments "we take".
+ //
+ // Symbol "->" should be read as "was followed by" in the comments
+ // which follow.
+ enum GregorianAdoption
+ {
+ Gr_Unknown, // no data for this country or it's too uncertain to use
+ Gr_Standard, // on the day 0 of Gregorian calendar: 15 Oct 1582
+
+ Gr_Alaska, // Oct 1867 when Alaska became part of the USA
+ Gr_Albania, // Dec 1912
+
+ Gr_Austria = Gr_Unknown, // Different regions on different dates
+ Gr_Austria_Brixen, // 5 Oct 1583 -> 16 Oct 1583
+ Gr_Austria_Salzburg = Gr_Austria_Brixen,
+ Gr_Austria_Tyrol = Gr_Austria_Brixen,
+ Gr_Austria_Carinthia, // 14 Dec 1583 -> 25 Dec 1583
+ Gr_Austria_Styria = Gr_Austria_Carinthia,
+
+ Gr_Belgium, // Then part of the Netherlands
+
+ Gr_Bulgaria = Gr_Unknown, // Unknown precisely (from 1915 to 1920)
+ Gr_Bulgaria_1, // 18 Mar 1916 -> 1 Apr 1916
+ Gr_Bulgaria_2, // 31 Mar 1916 -> 14 Apr 1916
+ Gr_Bulgaria_3, // 3 Sep 1920 -> 17 Sep 1920
+
+ Gr_Canada = Gr_Unknown, // Different regions followed the changes in
+ // Great Britain or France
+
+ Gr_China = Gr_Unknown, // Different authorities say:
+ Gr_China_1, // 18 Dec 1911 -> 1 Jan 1912
+ Gr_China_2, // 18 Dec 1928 -> 1 Jan 1929
+
+ Gr_Czechoslovakia, // (Bohemia and Moravia) 6 Jan 1584 -> 17 Jan 1584
+ Gr_Denmark, // (including Norway) 18 Feb 1700 -> 1 Mar 1700
+ Gr_Egypt, // 1875
+ Gr_Estonia, // 1918
+ Gr_Finland, // Then part of Sweden
+
+ Gr_France, // 9 Dec 1582 -> 20 Dec 1582
+ Gr_France_Alsace, // 4 Feb 1682 -> 16 Feb 1682
+ Gr_France_Lorraine, // 16 Feb 1760 -> 28 Feb 1760
+ Gr_France_Strasbourg, // February 1682
+
+ Gr_Germany = Gr_Unknown, // Different states on different dates:
+ Gr_Germany_Catholic, // 1583-1585 (we take 1584)
+ Gr_Germany_Prussia, // 22 Aug 1610 -> 2 Sep 1610
+ Gr_Germany_Protestant, // 18 Feb 1700 -> 1 Mar 1700
+
+ Gr_GreatBritain, // 2 Sep 1752 -> 14 Sep 1752 (use 'cal(1)')
+
+ Gr_Greece, // 9 Mar 1924 -> 23 Mar 1924
+ Gr_Hungary, // 21 Oct 1587 -> 1 Nov 1587
+ Gr_Ireland = Gr_GreatBritain,
+ Gr_Italy = Gr_Standard,
+
+ Gr_Japan = Gr_Unknown, // Different authorities say:
+ Gr_Japan_1, // 19 Dec 1872 -> 1 Jan 1873
+ Gr_Japan_2, // 19 Dec 1892 -> 1 Jan 1893
+ Gr_Japan_3, // 18 Dec 1918 -> 1 Jan 1919
+
+ Gr_Latvia, // 1915-1918 (we take 1915)
+ Gr_Lithuania, // 1915
+ Gr_Luxemburg, // 14 Dec 1582 -> 25 Dec 1582
+ Gr_Netherlands = Gr_Belgium, // (including Belgium) 1 Jan 1583
+
+ // this is too weird to take into account: the Gregorian calendar was
+ // introduced twice in Groningen, first time 28 Feb 1583 was followed
+ // by 11 Mar 1583, then it has gone back to Julian in the summer of
+ // 1584 and then 13 Dec 1700 -> 12 Jan 1701 - which is
+ // the date we take here
+ Gr_Netherlands_Groningen, // 13 Dec 1700 -> 12 Jan 1701
+ Gr_Netherlands_Gelderland, // 30 Jun 1700 -> 12 Jul 1700
+ Gr_Netherlands_Utrecht, // (and Overijssel) 30 Nov 1700->12 Dec 1700
+ Gr_Netherlands_Friesland, // (and Drenthe) 31 Dec 1700 -> 12 Jan 1701
+
+ Gr_Norway = Gr_Denmark, // Then part of Denmark
+ Gr_Poland = Gr_Standard,
+ Gr_Portugal = Gr_Standard,
+ Gr_Romania, // 31 Mar 1919 -> 14 Apr 1919
+ Gr_Russia, // 31 Jan 1918 -> 14 Feb 1918
+ Gr_Scotland = Gr_GreatBritain,
+ Gr_Spain = Gr_Standard,
+
+ // Sweden has a curious history. Sweden decided to make a gradual
+ // change from the Julian to the Gregorian calendar. By dropping every
+ // leap year from 1700 through 1740 the eleven superfluous days would
+ // be omitted and from 1 Mar 1740 they would be in sync with the
+ // Gregorian calendar. (But in the meantime they would be in sync with
+ // nobody!)
+ //
+ // So 1700 (which should have been a leap year in the Julian calendar)
+ // was not a leap year in Sweden. However, by mistake 1704 and 1708
+ // became leap years. This left Sweden out of synchronisation with
+ // both the Julian and the Gregorian world, so they decided to go back
+ // to the Julian calendar. In order to do this, they inserted an extra
+ // day in 1712, making that year a double leap year! So in 1712,
+ // February had 30 days in Sweden.
+ //
+ // Later, in 1753, Sweden changed to the Gregorian calendar by
+ // dropping 11 days like everyone else.
+ Gr_Sweden = Gr_Finland, // 17 Feb 1753 -> 1 Mar 1753
+
+ Gr_Switzerland = Gr_Unknown,// Different cantons used different dates
+ Gr_Switzerland_Catholic, // 1583, 1584 or 1597 (we take 1584)
+ Gr_Switzerland_Protestant, // 31 Dec 1700 -> 12 Jan 1701
+
+ Gr_Turkey, // 1 Jan 1927
+ Gr_USA = Gr_GreatBritain,
+ Gr_Wales = Gr_GreatBritain,
+ Gr_Yugoslavia // 1919
+ };
+
+ // the country parameter is used so far for calculating the start and
+ // the end of DST period and for deciding whether the date is a work
+ // day or not
+ //
+ // TODO move this to intl.h
+
+// Required for WinCE
+#ifdef USA
+#undef USA
+#endif
+
+ enum Country
+ {
+ Country_Unknown, // no special information for this country
+ Country_Default, // set the default country with SetCountry() method
+ // or use the default country with any other
+
+ // TODO add more countries (for this we must know about DST and/or
+ // holidays for this country)
+
+ // Western European countries: we assume that they all follow the same
+ // DST rules (true or false?)
+ Country_WesternEurope_Start,
+ Country_EEC = Country_WesternEurope_Start,
+ France,
+ Germany,
+ UK,
+ Country_WesternEurope_End = UK,
+
+ Russia,
+ USA
+ };
+ // symbolic names for the months
+ enum Month
+ {
+ Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Inv_Month
+ };
+
+ // symbolic names for the weekdays
+ enum WeekDay
+ {
+ Sun, Mon, Tue, Wed, Thu, Fri, Sat, Inv_WeekDay
+ };
+
+ // invalid value for the year
+ enum Year
+ {
+ Inv_Year = SHRT_MIN // should hold in wxDateTime_t
+ };
+
+ // flags for GetWeekDayName and GetMonthName
+ enum NameFlags
+ {
+ Name_Full = 0x01, // return full name
+ Name_Abbr = 0x02 // return abbreviated name
+ };
+
+ // flags for GetWeekOfYear and GetWeekOfMonth
+ enum WeekFlags
+ {
+ Default_First, // Sunday_First for US, Monday_First for the rest
+ Monday_First, // week starts with a Monday
+ Sunday_First // week starts with a Sunday
+ };
+
+ // helper classes
+ // ------------------------------------------------------------------------
+
+ // a class representing a time zone: basicly, this is just an offset
+ // (in seconds) from GMT
+ class WXDLLIMPEXP_BASE TimeZone
+ {
+ public:
+ TimeZone(TZ tz);
+
+ // don't use this ctor, it doesn't work for negative offsets (but can't
+ // be removed or changed to avoid breaking ABI in 2.8)
+ TimeZone(wxDateTime_t offset = 0) { m_offset = offset; }
+
+#if wxABI_VERSION >= 20808
+ // create time zone object with the given offset
+ static TimeZone Make(long offset)
+ {
+ TimeZone tz;
+ tz.m_offset = offset;
+ return tz;
+ }
+#endif // wxABI 2.8.8+
+
+ long GetOffset() const { return m_offset; }
+
+ private:
+ // offset for this timezone from GMT in seconds
+ long m_offset;
+ };
+
+ // standard struct tm is limited to the years from 1900 (because
+ // tm_year field is the offset from 1900), so we use our own struct
+ // instead to represent broken down time
+ //
+ // NB: this struct should always be kept normalized (i.e. mon should
+ // be < 12, 1 <= day <= 31 &c), so use AddMonths(), AddDays()
+ // instead of modifying the member fields directly!
+ struct WXDLLIMPEXP_BASE Tm
+ {
+ wxDateTime_t msec, sec, min, hour, mday;
+ Month mon;
+ int year;
+
+ // default ctor inits the object to an invalid value
+ Tm();
+
+ // ctor from struct tm and the timezone
+ Tm(const struct tm& tm, const TimeZone& tz);
+
+ // check that the given date/time is valid (in Gregorian calendar)
+ bool IsValid() const;
+
+ // get the week day
+ WeekDay GetWeekDay() // not const because wday may be changed
+ {
+ if ( wday == Inv_WeekDay )
+ ComputeWeekDay();
+
+ return (WeekDay)wday;
+ }
+
+ // add the given number of months to the date keeping it normalized
+ void AddMonths(int monDiff);
+
+ // add the given number of months to the date keeping it normalized
+ void AddDays(int dayDiff);
+
+ private:
+ // compute the weekday from other fields
+ void ComputeWeekDay();
+
+ // the timezone we correspond to
+ TimeZone m_tz;
+
+ // these values can't be accessed directly because they're not always
+ // computed and we calculate them on demand
+ wxDateTime_t wday, yday;
+ };
+
+ // static methods
+ // ------------------------------------------------------------------------
+
+ // set the current country
+ static void SetCountry(Country country);
+ // get the current country
+ static Country GetCountry();
+
+ // return true if the country is a West European one (in practice,
+ // this means that the same DST rules as for EEC apply)
+ static bool IsWestEuropeanCountry(Country country = Country_Default);
+
+ // return the current year
+ static int GetCurrentYear(Calendar cal = Gregorian);
+
+ // convert the year as returned by wxDateTime::GetYear() to a year
+ // suitable for BC/AD notation. The difference is that BC year 1
+ // corresponds to the year 0 (while BC year 0 didn't exist) and AD
+ // year N is just year N.
+ static int ConvertYearToBC(int year);
+
+ // return the current month
+ static Month GetCurrentMonth(Calendar cal = Gregorian);
+
+ // returns true if the given year is a leap year in the given calendar
+ static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
+
+ // get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
+ static int GetCentury(int year);
+
+ // returns the number of days in this year (356 or 355 for Gregorian
+ // calendar usually :-)
+ static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian);
+
+ // get the number of the days in the given month (default value for
+ // the year means the current one)
+ static wxDateTime_t GetNumberOfDays(Month month,
+ int year = Inv_Year,
+ Calendar cal = Gregorian);
+
+ // get the full (default) or abbreviated month name in the current
+ // locale, returns empty string on error
+ static wxString GetMonthName(Month month,
+ NameFlags flags = Name_Full);
+
+ // get the full (default) or abbreviated weekday name in the current
+ // locale, returns empty string on error
+ static wxString GetWeekDayName(WeekDay weekday,
+ NameFlags flags = Name_Full);
+
+ // get the AM and PM strings in the current locale (may be empty)
+ static void GetAmPmStrings(wxString *am, wxString *pm);
+
+ // return true if the given country uses DST for this year
+ static bool IsDSTApplicable(int year = Inv_Year,
+ Country country = Country_Default);
+
+ // get the beginning of DST for this year, will return invalid object
+ // if no DST applicable in this year. The default value of the
+ // parameter means to take the current year.
+ static wxDateTime GetBeginDST(int year = Inv_Year,
+ Country country = Country_Default);
+ // get the end of DST for this year, will return invalid object
+ // if no DST applicable in this year. The default value of the
+ // parameter means to take the current year.
+ static wxDateTime GetEndDST(int year = Inv_Year,
+ Country country = Country_Default);
+
+ // return the wxDateTime object for the current time
+ static inline wxDateTime Now();
+
+ // return the wxDateTime object for the current time with millisecond
+ // precision (if available on this platform)
+ static wxDateTime UNow();
+
+ // return the wxDateTime object for today midnight: i.e. as Now() but
+ // with time set to 0
+ static inline wxDateTime Today();
+
+ // constructors: you should test whether the constructor succeeded with
+ // IsValid() function. The values Inv_Month and Inv_Year for the
+ // parameters mean take current month and/or year values.
+ // ------------------------------------------------------------------------
+
+ // default ctor does not initialize the object, use Set()!
+ 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))
+// VA C++ confuses this with wxDateTime(double jdn) thinking it is a duplicate declaration
+ inline wxDateTime(time_t timet);
+#endif
+ // from broken down time/date (only for standard Unix range)
+ inline wxDateTime(const struct tm& tm);
+ // from broken down time/date (any range)
+ inline wxDateTime(const Tm& tm);
+
+ // from JDN (beware of rounding errors)
+ inline wxDateTime(double jdn);
+
+ // from separate values for each component, date set to today
+ inline wxDateTime(wxDateTime_t hour,
+ wxDateTime_t minute = 0,
+ wxDateTime_t second = 0,
+ wxDateTime_t millisec = 0);
+ // from separate values for each component with explicit date
+ inline wxDateTime(wxDateTime_t day, // day of the month
+ Month month,
+ int year = Inv_Year, // 1999, not 99 please!
+ wxDateTime_t hour = 0,
+ wxDateTime_t minute = 0,
+ wxDateTime_t second = 0,
+ wxDateTime_t millisec = 0);
+
+ // default copy ctor ok
+
+ // no dtor
+
+ // assignment operators and Set() functions: all non const methods return
+ // the reference to this object. IsValid() should be used to test whether
+ // the function succeeded.
+ // ------------------------------------------------------------------------
+
+ // set to the current time
+ inline wxDateTime& SetToCurrent();
+
+#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
+// VA C++ confuses this with wxDateTime(double jdn) thinking it is a duplicate declaration
+ // set to given time_t value
+ inline wxDateTime& Set(time_t timet);
+#endif
+
+ // set to given broken down time/date
+ wxDateTime& Set(const struct tm& tm);
+
+ // set to given broken down time/date
+ inline wxDateTime& Set(const Tm& tm);
+
+ // set to given JDN (beware of rounding errors)
+ wxDateTime& Set(double jdn);
+
+ // set to given time, date = today
+ wxDateTime& Set(wxDateTime_t hour,
+ wxDateTime_t minute = 0,
+ wxDateTime_t second = 0,
+ wxDateTime_t millisec = 0);
+
+ // from separate values for each component with explicit date
+ // (defaults for month and year are the current values)
+ wxDateTime& Set(wxDateTime_t day,
+ Month month,
+ int year = Inv_Year, // 1999, not 99 please!
+ wxDateTime_t hour = 0,
+ wxDateTime_t minute = 0,
+ wxDateTime_t second = 0,
+ wxDateTime_t millisec = 0);
+
+ // resets time to 00:00:00, doesn't change the date
+ wxDateTime& ResetTime();
+
+#if wxABI_VERSION >= 20802
+ // get the date part of this object only, i.e. the object which has the
+ // same date as this one but time of 00:00:00
+ wxDateTime GetDateOnly() const;
+#endif // wxABI 2.8.1+
+
+ // the following functions don't change the values of the other
+ // fields, i.e. SetMinute() won't change either hour or seconds value
+
+ // set the year
+ wxDateTime& SetYear(int year);
+ // set the month
+ wxDateTime& SetMonth(Month month);
+ // set the day of the month
+ wxDateTime& SetDay(wxDateTime_t day);
+ // set hour
+ wxDateTime& SetHour(wxDateTime_t hour);
+ // set minute
+ wxDateTime& SetMinute(wxDateTime_t minute);
+ // set second
+ wxDateTime& SetSecond(wxDateTime_t second);
+ // set millisecond
+ wxDateTime& SetMillisecond(wxDateTime_t millisecond);
+
+ // assignment operator from time_t
+ wxDateTime& operator=(time_t timet) { return Set(timet); }
+
+ // assignment operator from broken down time/date
+ wxDateTime& operator=(const struct tm& tm) { return Set(tm); }
+
+ // assignment operator from broken down time/date
+ wxDateTime& operator=(const Tm& tm) { return Set(tm); }
+
+ // default assignment operator is ok
+
+ // calendar calculations (functions which set the date only leave the time
+ // unchanged, e.g. don't explictly zero it): SetXXX() functions modify the
+ // object itself, GetXXX() ones return a new object.
+ // ------------------------------------------------------------------------
+
+ // set to the given week day in the same week as this one
+ wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday,
+ WeekFlags flags = Monday_First);
+ inline wxDateTime GetWeekDayInSameWeek(WeekDay weekday,
+ WeekFlags flags = Monday_First) const;
+
+ // set to the next week day following this one
+ wxDateTime& SetToNextWeekDay(WeekDay weekday);
+ inline wxDateTime GetNextWeekDay(WeekDay weekday) const;
+
+ // set to the previous week day before this one
+ wxDateTime& SetToPrevWeekDay(WeekDay weekday);
+ inline wxDateTime GetPrevWeekDay(WeekDay weekday) const;
+
+ // set to Nth occurence of given weekday in the given month of the
+ // given year (time is set to 0), return true on success and false on
+ // failure. n may be positive (1..5) or negative to count from the end
+ // of the month (see helper function SetToLastWeekDay())
+ bool SetToWeekDay(WeekDay weekday,
+ int n = 1,
+ Month month = Inv_Month,
+ int year = Inv_Year);
+ inline wxDateTime GetWeekDay(WeekDay weekday,
+ int n = 1,
+ Month month = Inv_Month,
+ int year = Inv_Year) const;
+
+ // sets to the last weekday in the given month, year
+ inline bool SetToLastWeekDay(WeekDay weekday,
+ Month month = Inv_Month,
+ int year = Inv_Year);
+ inline wxDateTime GetLastWeekDay(WeekDay weekday,
+ Month month = Inv_Month,
+ int year = Inv_Year);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // sets the date to the given day of the given week in the year,
+ // returns true on success and false if given date doesn't exist (e.g.
+ // numWeek is > 53)
+ //
+ // these functions are badly defined as they're not the reverse of
+ // GetWeekOfYear(), use SetToTheWeekOfYear() instead
+ wxDEPRECATED( bool SetToTheWeek(wxDateTime_t numWeek,
+ WeekDay weekday = Mon,
+ WeekFlags flags = Monday_First) );
+ wxDEPRECATED( wxDateTime GetWeek(wxDateTime_t numWeek,
+ WeekDay weekday = Mon,
+ WeekFlags flags = Monday_First) const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ // returns the date corresponding to the given week day of the given
+ // week (in ISO notation) of the specified year
+ static wxDateTime SetToWeekOfYear(int year,
+ wxDateTime_t numWeek,
+ WeekDay weekday = Mon);
+
+ // sets the date to the last day of the given (or current) month or the
+ // given (or current) year
+ wxDateTime& SetToLastMonthDay(Month month = Inv_Month,
+ int year = Inv_Year);
+ inline wxDateTime GetLastMonthDay(Month month = Inv_Month,
+ int year = Inv_Year) const;
+
+ // sets to the given year day (1..365 or 366)
+ wxDateTime& SetToYearDay(wxDateTime_t yday);
+ inline wxDateTime GetYearDay(wxDateTime_t yday) const;
+
+ // The definitions below were taken verbatim from
+ //
+ // http://www.capecod.net/~pbaum/date/date0.htm
+ //
+ // (Peter Baum's home page)
+ //
+ // definition: The Julian Day Number, Julian Day, or JD of a
+ // particular instant of time is the number of days and fractions of a
+ // day since 12 hours Universal Time (Greenwich mean noon) on January
+ // 1 of the year -4712, where the year is given in the Julian
+ // proleptic calendar. The idea of using this reference date was
+ // originally proposed by Joseph Scalizer in 1582 to count years but
+ // it was modified by 19th century astronomers to count days. One
+ // could have equivalently defined the reference time to be noon of
+ // November 24, -4713 if were understood that Gregorian calendar rules
+ // were applied. Julian days are Julian Day Numbers and are not to be
+ // confused with Julian dates.
+ //
+ // definition: The Rata Die number is a date specified as the number
+ // of days relative to a base date of December 31 of the year 0. Thus
+ // January 1 of the year 1 is Rata Die day 1.
+
+ // get the Julian Day number (the fractional part specifies the time of
+ // the day, related to noon - beware of rounding errors!)
+ double GetJulianDayNumber() const;
+ double GetJDN() const { return GetJulianDayNumber(); }
+
+ // get the Modified Julian Day number: it is equal to JDN - 2400000.5
+ // and so integral MJDs correspond to the midnights (and not noons).
+ // MJD 0 is Nov 17, 1858
+ double GetModifiedJulianDayNumber() const { return GetJDN() - 2400000.5; }
+ double GetMJD() const { return GetModifiedJulianDayNumber(); }
+
+ // get the Rata Die number
+ double GetRataDie() const;
+
+ // TODO algorithms for calculating some important dates, such as
+ // religious holidays (Easter...) or moon/solar eclipses? Some
+ // algorithms can be found in the calendar FAQ
+
+
+ // Timezone stuff: a wxDateTime object constructed using given
+ // day/month/year/hour/min/sec values is interpreted as this moment in
+ // local time. Using the functions below, it may be converted to another
+ // time zone (e.g., the Unix epoch is wxDateTime(1, Jan, 1970).ToGMT()).
+ //
+ // These functions try to handle DST internally, but there is no magical
+ // way to know all rules for it in all countries in the world, so if the
+ // program can handle it itself (or doesn't want to handle it at all for
+ // whatever reason), the DST handling can be disabled with noDST.
+ // ------------------------------------------------------------------------
+
+ // transform to any given timezone
+ inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const;
+ wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false);
+
+ // interpret current value as being in another timezone and transform
+ // it to local one
+ inline wxDateTime FromTimezone(const TimeZone& tz, bool noDST = false) const;
+ wxDateTime& MakeFromTimezone(const TimeZone& tz, bool noDST = false);
+
+ // transform to/from GMT/UTC
+ wxDateTime ToUTC(bool noDST = false) const { return ToTimezone(UTC, noDST); }
+ wxDateTime& MakeUTC(bool noDST = false) { return MakeTimezone(UTC, noDST); }
+
+ wxDateTime ToGMT(bool noDST = false) const { return ToUTC(noDST); }
+ wxDateTime& MakeGMT(bool noDST = false) { return MakeUTC(noDST); }
+
+ wxDateTime FromUTC(bool noDST = false) const
+ { return FromTimezone(UTC, noDST); }
+ wxDateTime& MakeFromUTC(bool noDST = false)
+ { return MakeFromTimezone(UTC, noDST); }
+
+ // is daylight savings time in effect at this moment according to the
+ // rules of the specified country?
+ //
+ // Return value is > 0 if DST is in effect, 0 if it is not and -1 if
+ // the information is not available (this is compatible with ANSI C)
+ int IsDST(Country country = Country_Default) const;
+
+
+ // accessors: many of them take the timezone parameter which indicates the
+ // timezone for which to make the calculations and the default value means
+ // to do it for the current timezone of this machine (even if the function
+ // only operates with the date it's necessary because a date may wrap as
+ // result of timezone shift)
+ // ------------------------------------------------------------------------
+
+ // is the date valid?
+ inline bool IsValid() const { return m_time != wxInvalidDateTime.m_time; }
+
+ // get the broken down date/time representation in the given timezone
+ //
+ // If you wish to get several time components (day, month and year),
+ // consider getting the whole Tm strcuture first and retrieving the
+ // value from it - this is much more efficient
+ Tm GetTm(const TimeZone& tz = Local) const;
+
+ // get the number of seconds since the Unix epoch - returns (time_t)-1
+ // if the value is out of range
+ inline time_t GetTicks() const;
+
+ // get the century, same as GetCentury(GetYear())
+ int GetCentury(const TimeZone& tz = Local) const
+ { return GetCentury(GetYear(tz)); }
+ // get the year (returns Inv_Year if date is invalid)
+ int GetYear(const TimeZone& tz = Local) const
+ { return GetTm(tz).year; }
+ // get the month (Inv_Month if date is invalid)
+ Month GetMonth(const TimeZone& tz = Local) const
+ { return (Month)GetTm(tz).mon; }
+ // get the month day (in 1..31 range, 0 if date is invalid)
+ wxDateTime_t GetDay(const TimeZone& tz = Local) const
+ { return GetTm(tz).mday; }
+ // get the day of the week (Inv_WeekDay if date is invalid)
+ WeekDay GetWeekDay(const TimeZone& tz = Local) const
+ { return GetTm(tz).GetWeekDay(); }
+ // get the hour of the day
+ wxDateTime_t GetHour(const TimeZone& tz = Local) const
+ { return GetTm(tz).hour; }
+ // get the minute
+ wxDateTime_t GetMinute(const TimeZone& tz = Local) const
+ { return GetTm(tz).min; }
+ // get the second
+ wxDateTime_t GetSecond(const TimeZone& tz = Local) const
+ { return GetTm(tz).sec; }
+ // get milliseconds
+ wxDateTime_t GetMillisecond(const TimeZone& tz = Local) const
+ { return GetTm(tz).msec; }
+
+ // get the day since the year start (1..366, 0 if date is invalid)
+ wxDateTime_t GetDayOfYear(const TimeZone& tz = Local) const;
+ // get the week number since the year start (1..52 or 53, 0 if date is
+ // invalid)
+ wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First,
+ const TimeZone& tz = Local) const;
+ // get the week number since the month start (1..5, 0 if date is
+ // invalid)
+ wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First,
+ const TimeZone& tz = Local) const;
+
+ // is this date a work day? This depends on a country, of course,
+ // because the holidays are different in different countries
+ bool IsWorkDay(Country country = Country_Default) const;
+
+ // is this date later than Gregorian calendar introduction for the
+ // given country (see enum GregorianAdoption)?
+ //
+ // NB: this function shouldn't be considered as absolute authority in
+ // the matter. Besides, for some countries the exact date of
+ // adoption of the Gregorian calendar is simply unknown.
+ bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const;
+
+ // dos date and time format
+ // ------------------------------------------------------------------------
+
+ // set from the DOS packed format
+ wxDateTime& SetFromDOS(unsigned long ddt);
+
+ // pack the date in DOS format
+ unsigned long GetAsDOS() const;
+
+ // comparison (see also functions below for operator versions)
+ // ------------------------------------------------------------------------
+
+ // returns true if the two moments are strictly identical
+ inline bool IsEqualTo(const wxDateTime& datetime) const;
+
+ // returns true if the date is strictly earlier than the given one
+ inline bool IsEarlierThan(const wxDateTime& datetime) const;
+
+ // returns true if the date is strictly later than the given one
+ inline bool IsLaterThan(const wxDateTime& datetime) const;
+
+ // returns true if the date is strictly in the given range
+ inline bool IsStrictlyBetween(const wxDateTime& t1,
+ const wxDateTime& t2) const;
+
+ // returns true if the date is in the given range
+ inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
+
+ // do these two objects refer to the same date?
+ inline bool IsSameDate(const wxDateTime& dt) const;
+
+ // do these two objects have the same time?
+ inline bool IsSameTime(const wxDateTime& dt) const;
+
+ // are these two objects equal up to given timespan?
+ inline bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const;
+
+ inline bool operator<(const wxDateTime& dt) const
+ {
+ wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
+ return GetValue() < dt.GetValue();
+ }
+
+ inline bool operator<=(const wxDateTime& dt) const
+ {
+ wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
+ return GetValue() <= dt.GetValue();
+ }
+
+ inline bool operator>(const wxDateTime& dt) const
+ {
+ wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
+ return GetValue() > dt.GetValue();
+ }
+
+ inline bool operator>=(const wxDateTime& dt) const
+ {
+ wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
+ return GetValue() >= dt.GetValue();
+ }
+
+ inline bool operator==(const wxDateTime& dt) const
+ {
+ wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
+ return GetValue() == dt.GetValue();
+ }
+
+ inline bool operator!=(const wxDateTime& dt) const
+ {
+ wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
+ return GetValue() != dt.GetValue();
+ }
+
+ // arithmetics with dates (see also below for more operators)
+ // ------------------------------------------------------------------------
+
+ // return the sum of the date with a time span (positive or negative)
+ inline wxDateTime Add(const wxTimeSpan& diff) const;
+ // add a time span (positive or negative)
+ inline wxDateTime& Add(const wxTimeSpan& diff);
+ // add a time span (positive or negative)
+ inline wxDateTime& operator+=(const wxTimeSpan& diff);
+ inline wxDateTime operator+(const wxTimeSpan& ts) const
+ {
+ wxDateTime dt(*this);
+ dt.Add(ts);
+ return dt;
+ }
+
+ // return the difference of the date with a time span
+ inline wxDateTime Subtract(const wxTimeSpan& diff) const;
+ // subtract a time span (positive or negative)
+ inline wxDateTime& Subtract(const wxTimeSpan& diff);
+ // subtract a time span (positive or negative)
+ inline wxDateTime& operator-=(const wxTimeSpan& diff);
+ inline wxDateTime operator-(const wxTimeSpan& ts) const
+ {
+ wxDateTime dt(*this);
+ dt.Subtract(ts);
+ return dt;
+ }
+
+ // return the sum of the date with a date span
+ inline wxDateTime Add(const wxDateSpan& diff) const;
+ // add a date span (positive or negative)
+ wxDateTime& Add(const wxDateSpan& diff);
+ // add a date span (positive or negative)
+ inline wxDateTime& operator+=(const wxDateSpan& diff);
+ inline wxDateTime operator+(const wxDateSpan& ds) const
+ {
+ wxDateTime dt(*this);
+ dt.Add(ds);
+ return dt;
+ }
+
+ // return the difference of the date with a date span
+ inline wxDateTime Subtract(const wxDateSpan& diff) const;
+ // subtract a date span (positive or negative)
+ inline wxDateTime& Subtract(const wxDateSpan& diff);
+ // subtract a date span (positive or negative)
+ inline wxDateTime& operator-=(const wxDateSpan& diff);
+ inline wxDateTime operator-(const wxDateSpan& ds) const
+ {
+ wxDateTime dt(*this);
+ dt.Subtract(ds);
+ return dt;
+ }
+
+ // return the difference between two dates
+ inline wxTimeSpan Subtract(const wxDateTime& dt) const;
+ inline wxTimeSpan operator-(const wxDateTime& dt2) const;
+
+ // conversion to/from text: all conversions from text return the pointer to
+ // the next character following the date specification (i.e. the one where
+ // the scan had to stop) or NULL on failure.
+ // ------------------------------------------------------------------------
+
+ // parse a string in RFC 822 format (found e.g. in mail headers and
+ // having the form "Wed, 10 Feb 1999 19:07:07 +0100")
+ const wxChar *ParseRfc822Date(const wxChar* date);
+ // parse a date/time in the given format (see strptime(3)), fill in
+ // the missing (in the string) fields with the values of dateDef (by
+ // default, they will not change if they had valid values or will
+ // default to Today() otherwise)
+ const wxChar *ParseFormat(const wxChar *date,
+ const wxChar *format = wxDefaultDateTimeFormat,
+ const wxDateTime& dateDef = wxDefaultDateTime);
+ // parse a string containing the date/time in "free" format, this
+ // function will try to make an educated guess at the string contents
+ const wxChar *ParseDateTime(const wxChar *datetime);
+ // parse a string containing the date only in "free" format (less
+ // flexible than ParseDateTime)
+ const wxChar *ParseDate(const wxChar *date);
+ // parse a string containing the time only in "free" format
+ const wxChar *ParseTime(const wxChar *time);
+
+ // this function accepts strftime()-like format string (default
+ // argument corresponds to the preferred date and time representation
+ // for the current locale) and returns the string containing the
+ // resulting text representation
+ wxString Format(const wxChar *format = wxDefaultDateTimeFormat,
+ const TimeZone& tz = Local) const;
+ // preferred date representation for the current locale
+ wxString FormatDate() const { return Format(_T("%x")); }
+ // preferred time representation for the current locale
+ wxString FormatTime() const { return Format(_T("%X")); }
+ // returns the string representing the date in ISO 8601 format
+ // (YYYY-MM-DD)
+ wxString FormatISODate() const { return Format(_T("%Y-%m-%d")); }
+ // returns the string representing the time in ISO 8601 format
+ // (HH:MM:SS)
+ wxString FormatISOTime() const { return Format(_T("%H:%M:%S")); }
+
+ // implementation
+ // ------------------------------------------------------------------------
+
+ // construct from internal representation
+ wxDateTime(const wxLongLong& time) { m_time = time; }
+
+ // get the internal representation
+ inline wxLongLong GetValue() const;
+
+ // a helper function to get the current time_t
+ static time_t GetTimeNow() { return time((time_t *)NULL); }
+
+ // another one to get the current time broken down
+ static struct tm *GetTmNow()
+ {
+ static struct tm l_CurrentTime;
+ return GetTmNow(&l_CurrentTime);
+ }
+
+ // get current time using thread-safe function
+ static struct tm *GetTmNow(struct tm *tmstruct);
+
+private:
+ // the current country - as it's the same for all program objects (unless
+ // it runs on a _really_ big cluster system :-), this is a static member:
+ // see SetCountry() and GetCountry()
+ static Country ms_country;
+
+ // this constant is used to transform a time_t value to the internal
+ // representation, as time_t is in seconds and we use milliseconds it's
+ // fixed to 1000
+ static const long TIME_T_FACTOR;
+
+ // returns true if we fall in range in which we can use standard ANSI C
+ // functions
+ inline bool IsInStdRange() const;
+
+ // the internal representation of the time is the amount of milliseconds
+ // elapsed since the origin which is set by convention to the UNIX/C epoch
+ // value: the midnight of January 1, 1970 (UTC)
+ wxLongLong m_time;
+};
+
+// ----------------------------------------------------------------------------
+// This class contains a difference between 2 wxDateTime values, so it makes
+// sense to add it to wxDateTime and it is the result of subtraction of 2
+// objects of that class. See also wxDateSpan.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxTimeSpan
+{
+public:
+ // constructors
+ // ------------------------------------------------------------------------
+
+ // return the timespan for the given number of milliseconds
+ static wxTimeSpan Milliseconds(wxLongLong ms) { return wxTimeSpan(0, 0, 0, ms); }
+ static wxTimeSpan Millisecond() { return Milliseconds(1); }
+
+ // return the timespan for the given number of seconds
+ static wxTimeSpan Seconds(wxLongLong sec) { return wxTimeSpan(0, 0, sec); }
+ static wxTimeSpan Second() { return Seconds(1); }
+
+ // return the timespan for the given number of minutes
+ static wxTimeSpan Minutes(long min) { return wxTimeSpan(0, min, 0 ); }
+ static wxTimeSpan Minute() { return Minutes(1); }
+
+ // return the timespan for the given number of hours
+ static wxTimeSpan Hours(long hours) { return wxTimeSpan(hours, 0, 0); }
+ static wxTimeSpan Hour() { return Hours(1); }
+
+ // return the timespan for the given number of days
+ static wxTimeSpan Days(long days) { return Hours(24 * days); }
+ static wxTimeSpan Day() { return Days(1); }
+
+ // return the timespan for the given number of weeks
+ static wxTimeSpan Weeks(long days) { return Days(7 * days); }
+ static wxTimeSpan Week() { return Weeks(1); }
+
+ // default ctor constructs the 0 time span
+ wxTimeSpan() { }
+
+ // from separate values for each component, date set to 0 (hours are
+ // not restricted to 0..24 range, neither are minutes, seconds or
+ // milliseconds)
+ inline wxTimeSpan(long hours,
+ long minutes = 0,
+ wxLongLong seconds = 0,
+ wxLongLong milliseconds = 0);
+
+ // default copy ctor is ok
+
+ // no dtor
+
+ // arithmetics with time spans (see also below for more operators)
+ // ------------------------------------------------------------------------
+
+ // return the sum of two timespans
+ inline wxTimeSpan Add(const wxTimeSpan& diff) const;
+ // add two timespans together
+ inline wxTimeSpan& Add(const wxTimeSpan& diff);
+ // add two timespans together
+ wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); }
+ inline wxTimeSpan operator+(const wxTimeSpan& ts) const
+ {
+ return wxTimeSpan(GetValue() + ts.GetValue());
+ }
+
+ // return the difference of two timespans
+ inline wxTimeSpan Subtract(const wxTimeSpan& diff) const;
+ // subtract another timespan
+ inline wxTimeSpan& Subtract(const wxTimeSpan& diff);
+ // subtract another timespan
+ wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Subtract(diff); }
+ inline wxTimeSpan operator-(const wxTimeSpan& ts)
+ {
+ return wxTimeSpan(GetValue() - ts.GetValue());
+ }
+
+ // multiply timespan by a scalar
+ inline wxTimeSpan Multiply(int n) const;
+ // multiply timespan by a scalar
+ inline wxTimeSpan& Multiply(int n);
+ // multiply timespan by a scalar
+ wxTimeSpan& operator*=(int n) { return Multiply(n); }
+ inline wxTimeSpan operator*(int n) const
+ {
+ return wxTimeSpan(*this).Multiply(n);
+ }
+
+ // return this timespan with opposite sign
+ wxTimeSpan Negate() const { return wxTimeSpan(-GetValue()); }
+ // negate the value of the timespan
+ wxTimeSpan& Neg() { m_diff = -GetValue(); return *this; }
+ // negate the value of the timespan
+ wxTimeSpan& operator-() { return Neg(); }
+
+ // return the absolute value of the timespan: does _not_ modify the
+ // object
+ inline wxTimeSpan Abs() const;
+
+ // there is intentionally no division because we don't want to
+ // introduce rounding errors in time calculations
+
+ // comparaison (see also operator versions below)
+ // ------------------------------------------------------------------------
+
+ // is the timespan null?
+ bool IsNull() const { return m_diff == 0l; }
+ // returns true if the timespan is null
+ bool operator!() const { return !IsNull(); }
+
+ // is the timespan positive?
+ bool IsPositive() const { return m_diff > 0l; }
+
+ // is the timespan negative?
+ bool IsNegative() const { return m_diff < 0l; }
+
+ // are two timespans equal?
+ inline bool IsEqualTo(const wxTimeSpan& ts) const;
+ // compare two timestamps: works with the absolute values, i.e. -2
+ // hours is longer than 1 hour. Also, it will return false if the
+ // timespans are equal in absolute value.
+ inline bool IsLongerThan(const wxTimeSpan& ts) const;
+ // compare two timestamps: works with the absolute values, i.e. 1
+ // hour is shorter than -2 hours. Also, it will return false if the
+ // timespans are equal in absolute value.
+ bool IsShorterThan(const wxTimeSpan& t) const { return !IsLongerThan(t); }
+
+ inline bool operator<(const wxTimeSpan &ts) const
+ {
+ return GetValue() < ts.GetValue();
+ }
+
+ inline bool operator<=(const wxTimeSpan &ts) const
+ {
+ return GetValue() <= ts.GetValue();
+ }
+
+ inline bool operator>(const wxTimeSpan &ts) const
+ {
+ return GetValue() > ts.GetValue();
+ }
+
+ inline bool operator>=(const wxTimeSpan &ts) const
+ {
+ return GetValue() >= ts.GetValue();
+ }
+
+ inline bool operator==(const wxTimeSpan &ts) const
+ {
+ return GetValue() == ts.GetValue();
+ }
+
+ inline bool operator!=(const wxTimeSpan &ts) const
+ {
+ return GetValue() != ts.GetValue();
+ }
+
+ // breaking into days, hours, minutes and seconds
+ // ------------------------------------------------------------------------
+
+ // get the max number of weeks in this timespan
+ inline int GetWeeks() const;
+ // get the max number of days in this timespan
+ inline int GetDays() const;
+ // get the max number of hours in this timespan
+ inline int GetHours() const;
+ // get the max number of minutes in this timespan
+ inline int GetMinutes() const;
+ // get the max number of seconds in this timespan
+ inline wxLongLong GetSeconds() const;
+ // get the number of milliseconds in this timespan
+ wxLongLong GetMilliseconds() const { return m_diff; }
+
+ // conversion to text
+ // ------------------------------------------------------------------------
+
+ // this function accepts strftime()-like format string (default
+ // argument corresponds to the preferred date and time representation
+ // for the current locale) and returns the string containing the
+ // resulting text representation. Notice that only some of format
+ // specifiers valid for wxDateTime are valid for wxTimeSpan: hours,
+ // minutes and seconds make sense, but not "PM/AM" string for example.
+ wxString Format(const wxChar *format = wxDefaultTimeSpanFormat) const;
+
+ // implementation
+ // ------------------------------------------------------------------------
+
+ // construct from internal representation
+ wxTimeSpan(const wxLongLong& diff) { m_diff = diff; }
+
+ // get the internal representation
+ wxLongLong GetValue() const { return m_diff; }
+
+private:
+ // the (signed) time span in milliseconds
+ wxLongLong m_diff;
+};
+
+// ----------------------------------------------------------------------------
+// This class is a "logical time span" and is useful for implementing program
+// logic for such things as "add one month to the date" which, in general,
+// doesn't mean to add 60*60*24*31 seconds to it, but to take the same date
+// the next month (to understand that this is indeed different consider adding
+// one month to Feb, 15 - we want to get Mar, 15, of course).
+//
+// When adding a month to the date, all lesser components (days, hours, ...)
+// won't be changed unless the resulting date would be invalid: for example,
+// Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31.
+//
+// Because of this feature, adding and subtracting back again the same
+// wxDateSpan will *not*, in general give back the original date: Feb 28 - 1
+// month will be Jan 28, not Jan 31!
+//
+// wxDateSpan can be either positive or negative. They may be
+// multiplied by scalars which multiply all deltas by the scalar: i.e. 2*(1
+// month and 1 day) is 2 months and 2 days. They can be added together and
+// with wxDateTime or wxTimeSpan, but the type of result is different for each
+// case.
+//
+// Beware about weeks: if you specify both weeks and days, the total number of
+// days added will be 7*weeks + days! See also GetTotalDays() function.
+//
+// Equality operators are defined for wxDateSpans. Two datespans are equal if
+// they both give the same target date when added to *every* source date.
+// Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30), because
+// they not give the same date when added to 1 Feb. But wxDateSpan::Days(14) is
+// equal to wxDateSpan::Weeks(2)
+//
+// Finally, notice that for adding hours, minutes &c you don't need this
+// class: wxTimeSpan will do the job because there are no subtleties
+// associated with those.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxDateSpan
+{
+public:
+ // constructors
+ // ------------------------------------------------------------------------
+
+ // this many years/months/weeks/days
+ wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0)
+ {
+ m_years = years;
+ m_months = months;
+ m_weeks = weeks;
+ m_days = days;
+ }
+
+ // get an object for the given number of days
+ static wxDateSpan Days(int days) { return wxDateSpan(0, 0, 0, days); }
+ static wxDateSpan Day() { return Days(1); }
+
+ // get an object for the given number of weeks
+ static wxDateSpan Weeks(int weeks) { return wxDateSpan(0, 0, weeks, 0); }
+ static wxDateSpan Week() { return Weeks(1); }
+
+ // get an object for the given number of months
+ static wxDateSpan Months(int mon) { return wxDateSpan(0, mon, 0, 0); }
+ static wxDateSpan Month() { return Months(1); }
+
+ // get an object for the given number of years
+ static wxDateSpan Years(int years) { return wxDateSpan(years, 0, 0, 0); }
+ static wxDateSpan Year() { return Years(1); }
+
+ // default copy ctor is ok
+
+ // no dtor
+
+ // accessors (all SetXXX() return the (modified) wxDateSpan object)
+ // ------------------------------------------------------------------------
+
+ // set number of years
+ wxDateSpan& SetYears(int n) { m_years = n; return *this; }
+ // set number of months
+ wxDateSpan& SetMonths(int n) { m_months = n; return *this; }
+ // set number of weeks
+ wxDateSpan& SetWeeks(int n) { m_weeks = n; return *this; }
+ // set number of days
+ wxDateSpan& SetDays(int n) { m_days = n; return *this; }
+
+ // get number of years
+ int GetYears() const { return m_years; }
+ // get number of months
+ int GetMonths() const { return m_months; }
+ // get number of weeks
+ int GetWeeks() const { return m_weeks; }
+ // get number of days
+ int GetDays() const { return m_days; }
+ // returns 7*GetWeeks() + GetDays()
+ int GetTotalDays() const { return 7*m_weeks + m_days; }
+
+ // arithmetics with date spans (see also below for more operators)
+ // ------------------------------------------------------------------------
+
+ // return sum of two date spans
+ inline wxDateSpan Add(const wxDateSpan& other) const;
+ // add another wxDateSpan to us
+ inline wxDateSpan& Add(const wxDateSpan& other);
+ // add another wxDateSpan to us
+ inline wxDateSpan& operator+=(const wxDateSpan& other);
+ inline wxDateSpan operator+(const wxDateSpan& ds) const
+ {
+ return wxDateSpan(GetYears() + ds.GetYears(),
+ GetMonths() + ds.GetMonths(),
+ GetWeeks() + ds.GetWeeks(),
+ GetDays() + ds.GetDays());
+ }
+
+ // return difference of two date spans
+ inline wxDateSpan Subtract(const wxDateSpan& other) const;
+ // subtract another wxDateSpan from us
+ inline wxDateSpan& Subtract(const wxDateSpan& other);
+ // subtract another wxDateSpan from us
+ inline wxDateSpan& operator-=(const wxDateSpan& other);
+ inline wxDateSpan operator-(const wxDateSpan& ds) const
+ {
+ return wxDateSpan(GetYears() - ds.GetYears(),
+ GetMonths() - ds.GetMonths(),
+ GetWeeks() - ds.GetWeeks(),
+ GetDays() - ds.GetDays());
+ }
+
+ // return a copy of this time span with changed sign
+ inline wxDateSpan Negate() const;
+ // inverse the sign of this timespan
+ inline wxDateSpan& Neg();
+ // inverse the sign of this timespan
+ wxDateSpan& operator-() { return Neg(); }
+
+ // return the date span proportional to this one with given factor
+ inline wxDateSpan Multiply(int factor) const;
+ // multiply all components by a (signed) number
+ inline wxDateSpan& Multiply(int factor);
+ // multiply all components by a (signed) number
+ inline wxDateSpan& operator*=(int factor) { return Multiply(factor); }
+ inline wxDateSpan operator*(int n) const
+ {
+ return wxDateSpan(*this).Multiply(n);
+ }
+
+ // ds1 == d2 if and only if for every wxDateTime t t + ds1 == t + ds2
+ inline bool operator==(const wxDateSpan& ds) const
+ {
+ return GetYears() == ds.GetYears() &&
+ GetMonths() == ds.GetMonths() &&
+ GetTotalDays() == ds.GetTotalDays();
+ }
+
+ inline bool operator!=(const wxDateSpan& ds) const
+ {
+ return !(*this == ds);
+ }
+
+private:
+ int m_years,
+ m_months,
+ m_weeks,
+ m_days;
+};
+
+// ----------------------------------------------------------------------------
+// wxDateTimeArray: array of dates.
+// ----------------------------------------------------------------------------
+
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray, WXDLLIMPEXP_BASE);
+
+// ----------------------------------------------------------------------------
+// wxDateTimeHolidayAuthority: an object of this class will decide whether a
+// given date is a holiday and is used by all functions working with "work
+// days".
+//
+// NB: the base class is an ABC, derived classes must implement the pure
+// virtual methods to work with the holidays they correspond to.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_BASE wxDateTimeHolidayAuthority;
+WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxDateTimeHolidayAuthority *,
+ wxHolidayAuthoritiesArray,
+ class WXDLLIMPEXP_BASE);
+
+class wxDateTimeHolidaysModule;
+class WXDLLIMPEXP_BASE wxDateTimeHolidayAuthority
+{
+friend class wxDateTimeHolidaysModule;
+public:
+ // returns true if the given date is a holiday
+ static bool IsHoliday(const wxDateTime& dt);
+
+ // fills the provided array with all holidays in the given range, returns
+ // the number of them
+ static size_t GetHolidaysInRange(const wxDateTime& dtStart,
+ const wxDateTime& dtEnd,
+ wxDateTimeArray& holidays);
+
+ // clear the list of holiday authorities
+ static void ClearAllAuthorities();
+
+ // add a new holiday authority (the pointer will be deleted by
+ // wxDateTimeHolidayAuthority)
+ static void AddAuthority(wxDateTimeHolidayAuthority *auth);
+
+ // the base class must have a virtual dtor
+ virtual ~wxDateTimeHolidayAuthority();
+
+protected:
+ // this function is called to determine whether a given day is a holiday
+ virtual bool DoIsHoliday(const wxDateTime& dt) const = 0;
+
+ // this function should fill the array with all holidays between the two
+ // given dates - it is implemented in the base class, but in a very
+ // inefficient way (it just iterates over all days and uses IsHoliday() for
+ // each of them), so it must be overridden in the derived class where the
+ // base class version may be explicitly used if needed
+ //
+ // returns the number of holidays in the given range and fills holidays
+ // array
+ virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart,
+ const wxDateTime& dtEnd,
+ wxDateTimeArray& holidays) const = 0;
+
+private:
+ // all holiday authorities
+ static wxHolidayAuthoritiesArray ms_authorities;
+};
+
+// the holidays for this class are all Saturdays and Sundays
+class WXDLLIMPEXP_BASE wxDateTimeWorkDays : public wxDateTimeHolidayAuthority
+{
+protected:
+ virtual bool DoIsHoliday(const wxDateTime& dt) const;
+ virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart,
+ const wxDateTime& dtEnd,
+ wxDateTimeArray& holidays) const;
+};
+
+// ============================================================================
+// inline functions implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// private macros
+// ----------------------------------------------------------------------------
+
+#define MILLISECONDS_PER_DAY 86400000l
+
+// some broken compilers (HP-UX CC) refuse to compile the "normal" version, but
+// using a temp variable always might prevent other compilers from optimising
+// it away - hence use of this ugly macro
+#ifndef __HPUX__
+ #define MODIFY_AND_RETURN(op) return wxDateTime(*this).op
+#else
+ #define MODIFY_AND_RETURN(op) wxDateTime dt(*this); dt.op; return dt
+#endif
+
+// ----------------------------------------------------------------------------
+// wxDateTime construction
+// ----------------------------------------------------------------------------
+
+inline bool wxDateTime::IsInStdRange() const
+{
+ return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX;
+}
+
+/* static */
+inline wxDateTime wxDateTime::Now()
+{
+ struct tm tmstruct;
+ return wxDateTime(*GetTmNow(&tmstruct));
+}
+
+/* static */
+inline wxDateTime wxDateTime::Today()
+{
+ wxDateTime dt(Now());
+ dt.ResetTime();
+
+ return dt;
+}
+
+#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
+inline wxDateTime& wxDateTime::Set(time_t timet)
+{
+ // assign first to avoid long multiplication overflow!
+ m_time = timet - WX_TIME_BASE_OFFSET ;
+ m_time *= TIME_T_FACTOR;
+
+ return *this;
+}
+#endif
+
+inline wxDateTime& wxDateTime::SetToCurrent()
+{
+ *this = Now();
+ return *this;
+}
+
+#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
+inline wxDateTime::wxDateTime(time_t timet)
+{
+ Set(timet);
+}
+#endif
+
+inline wxDateTime::wxDateTime(const struct tm& tm)
+{
+ Set(tm);
+}
+
+inline wxDateTime::wxDateTime(const Tm& tm)
+{
+ Set(tm);
+}
+
+inline wxDateTime::wxDateTime(double jdn)
+{
+ Set(jdn);
+}
+
+inline wxDateTime& wxDateTime::Set(const Tm& tm)
+{
+ wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") );
+
+ return Set(tm.mday, (Month)tm.mon, tm.year,
+ tm.hour, tm.min, tm.sec, tm.msec);
+}
+
+inline wxDateTime::wxDateTime(wxDateTime_t hour,
+ wxDateTime_t minute,
+ wxDateTime_t second,
+ wxDateTime_t millisec)
+{
+ Set(hour, minute, second, millisec);
+}
+
+inline wxDateTime::wxDateTime(wxDateTime_t day,
+ Month month,
+ int year,
+ wxDateTime_t hour,
+ wxDateTime_t minute,
+ wxDateTime_t second,
+ wxDateTime_t millisec)
+{
+ Set(day, month, year, hour, minute, second, millisec);
+}
+
+// ----------------------------------------------------------------------------
+// wxDateTime accessors
+// ----------------------------------------------------------------------------
+
+inline wxLongLong wxDateTime::GetValue() const
+{
+ wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
+
+ return m_time;
+}
+
+inline time_t wxDateTime::GetTicks() const
+{
+ wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
+ if ( !IsInStdRange() )
+ {
+ return (time_t)-1;
+ }
+
+ return (time_t)((m_time / (long)TIME_T_FACTOR).ToLong()) + WX_TIME_BASE_OFFSET;
+}
+
+inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
+ Month month,
+ int year)
+{
+ return SetToWeekDay(weekday, -1, month, year);
+}
+
+inline wxDateTime
+wxDateTime::GetWeekDayInSameWeek(WeekDay weekday,
+ WeekFlags WXUNUSED(flags)) const
+{
+ MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) );
+}
+
+inline wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const
+{
+ MODIFY_AND_RETURN( SetToNextWeekDay(weekday) );
+}
+
+inline wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const
+{
+ MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) );
+}
+
+inline wxDateTime wxDateTime::GetWeekDay(WeekDay weekday,
+ int n,
+ Month month,
+ int year) const
+{
+ wxDateTime dt(*this);
+
+ return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime;
+}
+
+inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday,
+ Month month,
+ int year)
+{
+ wxDateTime dt(*this);
+
+ return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime;
+}
+
+inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const
+{
+ MODIFY_AND_RETURN( SetToLastMonthDay(month, year) );
+}
+
+inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
+{
+ MODIFY_AND_RETURN( SetToYearDay(yday) );
+}
+
+// ----------------------------------------------------------------------------
+// wxDateTime comparison
+// ----------------------------------------------------------------------------
+
+inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const
+{
+ wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
+
+ return m_time == datetime.m_time;
+}
+
+inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const
+{
+ wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
+
+ return m_time < datetime.m_time;
+}
+
+inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const
+{
+ wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
+
+ return m_time > datetime.m_time;
+}
+
+inline bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1,
+ const wxDateTime& t2) const
+{
+ // no need for assert, will be checked by the functions we call
+ return IsLaterThan(t1) && IsEarlierThan(t2);
+}
+
+inline bool wxDateTime::IsBetween(const wxDateTime& t1,
+ const wxDateTime& t2) const
+{
+ // no need for assert, will be checked by the functions we call
+ return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2);
+}
+
+inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const
+{
+ Tm tm1 = GetTm(),
+ tm2 = dt.GetTm();
+
+ return tm1.year == tm2.year &&
+ tm1.mon == tm2.mon &&
+ tm1.mday == tm2.mday;
+}
+
+inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const
+{
+ // notice that we can't do something like this:
+ //
+ // m_time % MILLISECONDS_PER_DAY == dt.m_time % MILLISECONDS_PER_DAY
+ //
+ // because we have also to deal with (possibly) different DST settings!
+ Tm tm1 = GetTm(),
+ tm2 = dt.GetTm();
+
+ return tm1.hour == tm2.hour &&
+ tm1.min == tm2.min &&
+ tm1.sec == tm2.sec &&
+ tm1.msec == tm2.msec;
+}
+
+inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt,
+ const wxTimeSpan& ts) const
+{
+ return IsBetween(dt.Subtract(ts), dt.Add(ts));
+}
+
+// ----------------------------------------------------------------------------
+// wxDateTime arithmetics
+// ----------------------------------------------------------------------------
+
+inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const
+{
+ wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
+
+ return wxDateTime(m_time + diff.GetValue());
+}
+
+inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
+{
+ wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
+
+ m_time += diff.GetValue();
+
+ return *this;
+}
+
+inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
+{
+ return Add(diff);
+}
+
+inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const
+{
+ wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
+
+ return wxDateTime(m_time - diff.GetValue());
+}
+
+inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff)
+{
+ wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
+
+ m_time -= diff.GetValue();
+
+ return *this;
+}
+
+inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
+{
+ return Subtract(diff);
+}
+
+inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const
+{
+ wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
+
+ return wxTimeSpan(GetValue() - datetime.GetValue());
+}
+
+inline wxTimeSpan wxDateTime::operator-(const wxDateTime& dt2) const
+{
+ return this->Subtract(dt2);
+}
+
+inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const
+{
+ return wxDateTime(*this).Add(diff);
+}
+
+inline wxDateTime& wxDateTime::Subtract(const wxDateSpan& diff)
+{
+ return Add(diff.Negate());
+}
+
+inline wxDateTime wxDateTime::Subtract(const wxDateSpan& diff) const
+{
+ return wxDateTime(*this).Subtract(diff);
+}
+
+inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff)
+{
+ return Subtract(diff);
+}
+
+inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
+{
+ return Add(diff);
+}
+
+// ----------------------------------------------------------------------------
+// wxDateTime and timezones
+// ----------------------------------------------------------------------------
+
+inline wxDateTime
+wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, bool noDST) const
+{
+ MODIFY_AND_RETURN( MakeTimezone(tz, noDST) );
+}
+
+inline wxDateTime
+wxDateTime::FromTimezone(const wxDateTime::TimeZone& tz, bool noDST) const
+{
+ MODIFY_AND_RETURN( MakeFromTimezone(tz, noDST) );
+}
+
+// ----------------------------------------------------------------------------
+// wxTimeSpan construction
+// ----------------------------------------------------------------------------
+
+inline wxTimeSpan::wxTimeSpan(long hours,
+ long minutes,
+ wxLongLong seconds,
+ wxLongLong milliseconds)
+{
+ // assign first to avoid precision loss
+ m_diff = hours;
+ m_diff *= 60l;
+ m_diff += minutes;
+ m_diff *= 60l;
+ m_diff += seconds;
+ m_diff *= 1000l;
+ m_diff += milliseconds;
+}
+
+// ----------------------------------------------------------------------------
+// wxTimeSpan accessors
+// ----------------------------------------------------------------------------
+
+inline wxLongLong wxTimeSpan::GetSeconds() const
+{
+ return m_diff / 1000l;
+}
+
+inline int wxTimeSpan::GetMinutes() const
+{
+ // explicit cast to int suppresses a warning with CodeWarrior and possibly
+ // others (changing the return type to long from int is impossible in 2.8)
+ return (int)((GetSeconds() / 60l).GetLo());
+}
+
+inline int wxTimeSpan::GetHours() const
+{
+ return GetMinutes() / 60;
+}
+
+inline int wxTimeSpan::GetDays() const
+{
+ return GetHours() / 24;
+}
+
+inline int wxTimeSpan::GetWeeks() const
+{
+ return GetDays() / 7;
+}
+
+// ----------------------------------------------------------------------------
+// wxTimeSpan arithmetics
+// ----------------------------------------------------------------------------
+
+inline wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const
+{
+ return wxTimeSpan(m_diff + diff.GetValue());
+}
+
+inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff)
+{
+ m_diff += diff.GetValue();
+
+ return *this;
+}
+
+inline wxTimeSpan wxTimeSpan::Subtract(const wxTimeSpan& diff) const
+{
+ return wxTimeSpan(m_diff - diff.GetValue());
+}
+
+inline wxTimeSpan& wxTimeSpan::Subtract(const wxTimeSpan& diff)
+{
+ m_diff -= diff.GetValue();
+
+ return *this;
+}
+
+inline wxTimeSpan& wxTimeSpan::Multiply(int n)
+{
+ m_diff *= (long)n;
+
+ return *this;
+}
+
+inline wxTimeSpan wxTimeSpan::Multiply(int n) const
+{
+ return wxTimeSpan(m_diff * (long)n);
+}
+
+inline wxTimeSpan wxTimeSpan::Abs() const
+{
+ return wxTimeSpan(GetValue().Abs());
+}
+
+inline bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const
+{
+ return GetValue() == ts.GetValue();
+}
+
+inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
+{
+ return GetValue().Abs() > ts.GetValue().Abs();
+}
+
+// ----------------------------------------------------------------------------
+// wxDateSpan
+// ----------------------------------------------------------------------------
+
+inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other)
+{
+ m_years += other.m_years;
+ m_months += other.m_months;
+ m_weeks += other.m_weeks;
+ m_days += other.m_days;
+
+ return *this;
+}
+
+inline wxDateSpan& wxDateSpan::Add(const wxDateSpan& other)
+{
+ return *this += other;
+}
+
+inline wxDateSpan wxDateSpan::Add(const wxDateSpan& other) const
+{
+ wxDateSpan ds(*this);
+ ds.Add(other);
+ return ds;
+}
+
+inline wxDateSpan& wxDateSpan::Multiply(int factor)
+{
+ m_years *= factor;
+ m_months *= factor;
+ m_weeks *= factor;
+ m_days *= factor;
+
+ return *this;
+}
+
+inline wxDateSpan wxDateSpan::Multiply(int factor) const
+{
+ wxDateSpan ds(*this);
+ ds.Multiply(factor);
+ return ds;
+}
+
+inline wxDateSpan wxDateSpan::Negate() const
+{
+ return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days);
+}
+
+inline wxDateSpan& wxDateSpan::Neg()
+{
+ m_years = -m_years;
+ m_months = -m_months;
+ m_weeks = -m_weeks;
+ m_days = -m_days;
+
+ return *this;
+}
+
+inline wxDateSpan& wxDateSpan::operator-=(const wxDateSpan& other)
+{
+ return *this += other.Negate();
+}
+
+inline wxDateSpan& wxDateSpan::Subtract(const wxDateSpan& other)
+{
+ return *this -= other;
+}
+
+inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const
+{
+ wxDateSpan ds(*this);
+ ds.Subtract(other);
+ return ds;
+}
+
+#undef MILLISECONDS_PER_DAY
+
+#undef MODIFY_AND_RETURN
+
+// ============================================================================
+// binary operators
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxTimeSpan operators
+// ----------------------------------------------------------------------------
+
+wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts);
+
+// ----------------------------------------------------------------------------
+// wxDateSpan
+// ----------------------------------------------------------------------------
+
+wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds);
+
+// ============================================================================
+// other helper functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// iteration helpers: can be used to write a for loop over enum variable like
+// this:
+// for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) )
+// ----------------------------------------------------------------------------
+
+WXDLLIMPEXP_BASE void wxNextMonth(wxDateTime::Month& m);
+WXDLLIMPEXP_BASE void wxPrevMonth(wxDateTime::Month& m);
+WXDLLIMPEXP_BASE void wxNextWDay(wxDateTime::WeekDay& wd);
+WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd);
+
+#endif // wxUSE_DATETIME
+
+#endif // _WX_DATETIME_H
diff --git a/3rdparty/wxWidgets/include/wx/datstrm.h b/3rdparty/wxWidgets/include/wx/datstrm.h
new file mode 100644
index 0000000000..709e1007ba
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/datstrm.h
@@ -0,0 +1,170 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: datstrm.h
+// Purpose: Data stream classes
+// Author: Guilhem Lavaux
+// Modified by: Mickael Gilabert
+// Created: 28/06/1998
+// RCS-ID: $Id: datstrm.h 38576 2006-04-05 16:10:08Z VZ $
+// Copyright: (c) Guilhem Lavaux
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DATSTREAM_H_
+#define _WX_DATSTREAM_H_
+
+#include "wx/stream.h"
+#include "wx/longlong.h"
+#include "wx/convauto.h"
+
+#if wxUSE_STREAMS
+
+class WXDLLIMPEXP_BASE wxDataInputStream
+{
+public:
+#if wxUSE_UNICODE
+ wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto());
+#else
+ wxDataInputStream(wxInputStream& s);
+#endif
+ ~wxDataInputStream();
+
+ bool IsOk() { return m_input->IsOk(); }
+
+#if wxHAS_INT64
+ wxUint64 Read64();
+#endif
+#if wxUSE_LONGLONG
+ wxLongLong ReadLL();
+#endif
+ wxUint32 Read32();
+ wxUint16 Read16();
+ wxUint8 Read8();
+ double ReadDouble();
+ wxString ReadString();
+
+#if wxHAS_INT64
+ void Read64(wxUint64 *buffer, size_t size);
+ void Read64(wxInt64 *buffer, size_t size);
+#endif
+#if defined(wxLongLong_t) && wxUSE_LONGLONG
+ void Read64(wxULongLong *buffer, size_t size);
+ void Read64(wxLongLong *buffer, size_t size);
+#endif
+#if wxUSE_LONGLONG
+ void ReadLL(wxULongLong *buffer, size_t size);
+ void ReadLL(wxLongLong *buffer, size_t size);
+#endif
+ void Read32(wxUint32 *buffer, size_t size);
+ void Read16(wxUint16 *buffer, size_t size);
+ void Read8(wxUint8 *buffer, size_t size);
+ void ReadDouble(double *buffer, size_t size);
+
+ wxDataInputStream& operator>>(wxString& s);
+ wxDataInputStream& operator>>(wxInt8& c);
+ wxDataInputStream& operator>>(wxInt16& i);
+ wxDataInputStream& operator>>(wxInt32& i);
+ wxDataInputStream& operator>>(wxUint8& c);
+ wxDataInputStream& operator>>(wxUint16& i);
+ wxDataInputStream& operator>>(wxUint32& i);
+#if wxHAS_INT64
+ wxDataInputStream& operator>>(wxUint64& i);
+ wxDataInputStream& operator>>(wxInt64& i);
+#endif
+#if defined(wxLongLong_t) && wxUSE_LONGLONG
+ wxDataInputStream& operator>>(wxULongLong& i);
+ wxDataInputStream& operator>>(wxLongLong& i);
+#endif
+ wxDataInputStream& operator>>(double& i);
+ wxDataInputStream& operator>>(float& f);
+
+ void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
+
+protected:
+ wxInputStream *m_input;
+ bool m_be_order;
+#if wxUSE_UNICODE
+ wxMBConv *m_conv;
+#endif
+
+ DECLARE_NO_COPY_CLASS(wxDataInputStream)
+};
+
+class WXDLLIMPEXP_BASE wxDataOutputStream
+{
+public:
+#if wxUSE_UNICODE
+ wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto());
+#else
+ wxDataOutputStream(wxOutputStream& s);
+#endif
+ ~wxDataOutputStream();
+
+ bool IsOk() { return m_output->IsOk(); }
+
+#if wxHAS_INT64
+ void Write64(wxUint64 i);
+ void Write64(wxInt64 i);
+#endif
+#if wxUSE_LONGLONG
+ void WriteLL(const wxLongLong &ll);
+ void WriteLL(const wxULongLong &ll);
+#endif
+ void Write32(wxUint32 i);
+ void Write16(wxUint16 i);
+ void Write8(wxUint8 i);
+ void WriteDouble(double d);
+ void WriteString(const wxString& string);
+
+#if wxHAS_INT64
+ void Write64(const wxUint64 *buffer, size_t size);
+ void Write64(const wxInt64 *buffer, size_t size);
+#endif
+#if defined(wxLongLong_t) && wxUSE_LONGLONG
+ void Write64(const wxULongLong *buffer, size_t size);
+ void Write64(const wxLongLong *buffer, size_t size);
+#endif
+#if wxUSE_LONGLONG
+ void WriteLL(const wxULongLong *buffer, size_t size);
+ void WriteLL(const wxLongLong *buffer, size_t size);
+#endif
+ void Write32(const wxUint32 *buffer, size_t size);
+ void Write16(const wxUint16 *buffer, size_t size);
+ void Write8(const wxUint8 *buffer, size_t size);
+ void WriteDouble(const double *buffer, size_t size);
+
+ wxDataOutputStream& operator<<(const wxChar *string);
+ wxDataOutputStream& operator<<(const wxString& string);
+ wxDataOutputStream& operator<<(wxInt8 c);
+ wxDataOutputStream& operator<<(wxInt16 i);
+ wxDataOutputStream& operator<<(wxInt32 i);
+ wxDataOutputStream& operator<<(wxUint8 c);
+ wxDataOutputStream& operator<<(wxUint16 i);
+ wxDataOutputStream& operator<<(wxUint32 i);
+#if wxHAS_INT64
+ wxDataOutputStream& operator<<(wxUint64 i);
+ wxDataOutputStream& operator<<(wxInt64 i);
+#endif
+#if defined(wxLongLong_t) && wxUSE_LONGLONG
+ wxDataOutputStream& operator<<(const wxULongLong &i);
+ wxDataOutputStream& operator<<(const wxLongLong &i);
+#endif
+ wxDataOutputStream& operator<<(double f);
+ wxDataOutputStream& operator<<(float f);
+
+ void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
+
+protected:
+ wxOutputStream *m_output;
+ bool m_be_order;
+#if wxUSE_UNICODE
+ wxMBConv *m_conv;
+#endif
+
+ DECLARE_NO_COPY_CLASS(wxDataOutputStream)
+};
+
+#endif
+ // wxUSE_STREAMS
+
+#endif
+ // _WX_DATSTREAM_H_
diff --git a/3rdparty/wxWidgets/include/wx/db.h b/3rdparty/wxWidgets/include/wx/db.h
new file mode 100644
index 0000000000..013bc22760
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/db.h
@@ -0,0 +1,853 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/db.h
+// Purpose: Header file wxDb class. The wxDb class represents a connection
+// to an ODBC data source. The wxDb class allows operations on the data
+// source such as opening and closing the data source.
+// Author: Doug Card
+// Modified by: George Tasker
+// Bart Jourquin
+// Mark Johnson, wxWindows@mj10777.de
+// Mods: Dec, 1998:
+// -Added support for SQL statement logging and database cataloging
+// April, 1999
+// -Added QUERY_ONLY mode support to reduce default number of cursors
+// -Added additional SQL logging code
+// -Added DEBUG-ONLY tracking of Ctable objects to detect orphaned DB connections
+// -Set ODBC option to only read committed writes to the DB so all
+// databases operate the same in that respect
+//
+// Created: 9.96
+// RCS-ID: $Id: db.h 56697 2008-11-07 22:45:47Z VZ $
+// Copyright: (c) 1996 Remstar International, Inc.
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DB_H_
+#define _WX_DB_H_
+
+
+// BJO 20000503: introduce new GetColumns members which are more database independent and
+// return columns in the order they were created
+#define OLD_GETCOLUMNS 1
+#define EXPERIMENTAL_WXDB_FUNCTIONS 1
+
+#include "wx/defs.h"
+#include "wx/string.h"
+
+#if defined(__VISUALC__)
+ // we need to include standard Windows headers but we can't include
+ // directly when using MFC because it includes it itself in a
+ // different manner
+ #if wxUSE_MFC
+ #include
+ #else // !wxUSE_MFC
+ #include "wx/msw/wrapwin.h"
+ #endif // wxUSE_MFC/!wxUSE_MFC
+
+ // If you use the wxDbCreateDataSource() function with MSW/VC6,
+ // you cannot use the iODBC headers, you must use the VC headers,
+ // plus the odbcinst.h header - gt Nov 2 2000
+ //
+ // Must add "odbccp32.lib" in \wx2\wxWidgets\src\makevc.env to the WINLIBS= line
+ //
+ #include "sql.h"
+ #include "sqlext.h"
+ //#if wxUSE_UNICODE
+ // #include
+ //#endif
+ #include "odbcinst.h"
+#else
+ #if defined(__WINDOWS__) && ( defined(HAVE_W32API_H) || defined(__BORLANDC__) || defined (__DMC__))
+ #include "wx/msw/wrapwin.h"
+ #endif
+ extern "C" {
+ #if defined(wxUSE_BUILTIN_IODBC) && wxUSE_BUILTIN_IODBC
+ // Use the ones from the library
+ #include "wx/isql.h"
+ #include "wx/isqlext.h"
+ // Not available in v2.x of iODBC
+ #ifndef __WXMSW__
+ #if wxUSE_UNICODE
+ typedef wxChar SQLTCHAR;
+ #else
+ typedef UCHAR SQLTCHAR;
+ #endif
+ #endif
+ #else // !wxUSE_BUILTIN_IODBC
+ // SQL headers define BOOL if it's not defined yet but BOOL is also
+ // 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
+ #ifndef BOOL
+ #define BOOL int
+ #include
+ #include
+ #undef BOOL
+ #else
+ #include
+ #include
+ #endif
+ #endif // wxUSE_BUILTIN_IODBC/!wxUSE_BUILTIN_IODBC
+ }
+#endif
+
+#if wxUSE_UNICODE
+#define SQL_C_WXCHAR SQL_C_WCHAR
+#else
+#define SQL_C_WXCHAR SQL_C_CHAR
+#endif
+
+#ifdef __DIGITALMARS__
+#if wxUSE_UNICODE
+typedef wxChar SQLTCHAR;
+#else
+typedef UCHAR SQLTCHAR;
+#endif
+#endif
+
+typedef float SFLOAT;
+typedef double SDOUBLE;
+typedef unsigned int UINT;
+#define ULONG UDWORD
+
+#ifndef wxODBC_FWD_ONLY_CURSORS
+#define wxODBC_FWD_ONLY_CURSORS 1
+#endif
+
+enum enumDummy {enumDum1};
+
+#ifndef SQL_C_BOOLEAN
+ #define SQL_C_BOOLEAN(datatype) (sizeof(datatype) == 1 ? SQL_C_UTINYINT : (sizeof(datatype) == 2 ? SQL_C_USHORT : SQL_C_ULONG))
+#endif
+
+#ifndef SQL_C_ENUM
+ #define SQL_C_ENUM (sizeof(enumDummy) == 2 ? SQL_C_USHORT : SQL_C_ULONG)
+#endif
+
+// NOTE: If SQL_C_BLOB is defined, and it is not SQL_C_BINARY, iODBC 2.x
+// may not function correctly. Likely best to use SQL_C_BINARY direct
+#ifndef SQL_C_BLOB
+ #ifdef SQL_C_BINARY
+ #define SQL_C_BLOB SQL_C_BINARY
+ #endif
+#endif
+
+#ifndef _WIN64
+#ifndef SQLLEN
+#define SQLLEN SQLINTEGER
+#endif
+#ifndef SQLULEN
+#define SQLULEN SQLUINTEGER
+#endif
+#endif
+
+const int wxDB_PATH_MAX = 254;
+
+extern WXDLLIMPEXP_DATA_ODBC(wxChar const *) SQL_LOG_FILENAME;
+extern WXDLLIMPEXP_DATA_ODBC(wxChar const *) SQL_CATALOG_FILENAME;
+
+// Database Globals
+const int DB_TYPE_NAME_LEN = 40;
+const int DB_MAX_STATEMENT_LEN = 4096;
+const int DB_MAX_WHERE_CLAUSE_LEN = 2048;
+const int DB_MAX_ERROR_MSG_LEN = 512;
+const int DB_MAX_ERROR_HISTORY = 5;
+const int DB_MAX_TABLE_NAME_LEN = 128;
+const int DB_MAX_COLUMN_NAME_LEN = 128;
+
+const int DB_DATA_TYPE_VARCHAR = 1;
+const int DB_DATA_TYPE_INTEGER = 2;
+const int DB_DATA_TYPE_FLOAT = 3;
+const int DB_DATA_TYPE_DATE = 4;
+const int DB_DATA_TYPE_BLOB = 5;
+const int DB_DATA_TYPE_MEMO = 6;
+
+const int DB_SELECT_KEYFIELDS = 1;
+const int DB_SELECT_WHERE = 2;
+const int DB_SELECT_MATCHING = 3;
+const int DB_SELECT_STATEMENT = 4;
+
+const int DB_UPD_KEYFIELDS = 1;
+const int DB_UPD_WHERE = 2;
+
+const int DB_DEL_KEYFIELDS = 1;
+const int DB_DEL_WHERE = 2;
+const int DB_DEL_MATCHING = 3;
+
+const int DB_WHERE_KEYFIELDS = 1;
+const int DB_WHERE_MATCHING = 2;
+
+const int DB_GRANT_SELECT = 1;
+const int DB_GRANT_INSERT = 2;
+const int DB_GRANT_UPDATE = 4;
+const int DB_GRANT_DELETE = 8;
+const int DB_GRANT_ALL = DB_GRANT_SELECT | DB_GRANT_INSERT | DB_GRANT_UPDATE | DB_GRANT_DELETE;
+
+// ODBC Error codes (derived from ODBC SqlState codes)
+enum wxODBC_ERRORS
+{
+ DB_FAILURE = 0,
+ DB_SUCCESS = 1,
+ DB_ERR_NOT_IN_USE,
+ DB_ERR_GENERAL_WARNING, // SqlState = '01000'
+ DB_ERR_DISCONNECT_ERROR, // SqlState = '01002'
+ DB_ERR_DATA_TRUNCATED, // SqlState = '01004'
+ DB_ERR_PRIV_NOT_REVOKED, // SqlState = '01006'
+ DB_ERR_INVALID_CONN_STR_ATTR, // SqlState = '01S00'
+ DB_ERR_ERROR_IN_ROW, // SqlState = '01S01'
+ DB_ERR_OPTION_VALUE_CHANGED, // SqlState = '01S02'
+ DB_ERR_NO_ROWS_UPD_OR_DEL, // SqlState = '01S03'
+ DB_ERR_MULTI_ROWS_UPD_OR_DEL, // SqlState = '01S04'
+ DB_ERR_WRONG_NO_OF_PARAMS, // SqlState = '07001'
+ DB_ERR_DATA_TYPE_ATTR_VIOL, // SqlState = '07006'
+ DB_ERR_UNABLE_TO_CONNECT, // SqlState = '08001'
+ DB_ERR_CONNECTION_IN_USE, // SqlState = '08002'
+ DB_ERR_CONNECTION_NOT_OPEN, // SqlState = '08003'
+ DB_ERR_REJECTED_CONNECTION, // SqlState = '08004'
+ DB_ERR_CONN_FAIL_IN_TRANS, // SqlState = '08007'
+ DB_ERR_COMM_LINK_FAILURE, // SqlState = '08S01'
+ DB_ERR_INSERT_VALUE_LIST_MISMATCH, // SqlState = '21S01'
+ DB_ERR_DERIVED_TABLE_MISMATCH, // SqlState = '21S02'
+ DB_ERR_STRING_RIGHT_TRUNC, // SqlState = '22001'
+ DB_ERR_NUMERIC_VALUE_OUT_OF_RNG, // SqlState = '22003'
+ DB_ERR_ERROR_IN_ASSIGNMENT, // SqlState = '22005'
+ DB_ERR_DATETIME_FLD_OVERFLOW, // SqlState = '22008'
+ DB_ERR_DIVIDE_BY_ZERO, // SqlState = '22012'
+ DB_ERR_STR_DATA_LENGTH_MISMATCH, // SqlState = '22026'
+ DB_ERR_INTEGRITY_CONSTRAINT_VIOL, // SqlState = '23000'
+ DB_ERR_INVALID_CURSOR_STATE, // SqlState = '24000'
+ DB_ERR_INVALID_TRANS_STATE, // SqlState = '25000'
+ DB_ERR_INVALID_AUTH_SPEC, // SqlState = '28000'
+ DB_ERR_INVALID_CURSOR_NAME, // SqlState = '34000'
+ DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL, // SqlState = '37000'
+ DB_ERR_DUPLICATE_CURSOR_NAME, // SqlState = '3C000'
+ DB_ERR_SERIALIZATION_FAILURE, // SqlState = '40001'
+ DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2, // SqlState = '42000'
+ DB_ERR_OPERATION_ABORTED, // SqlState = '70100'
+ DB_ERR_UNSUPPORTED_FUNCTION, // SqlState = 'IM001'
+ DB_ERR_NO_DATA_SOURCE, // SqlState = 'IM002'
+ DB_ERR_DRIVER_LOAD_ERROR, // SqlState = 'IM003'
+ DB_ERR_SQLALLOCENV_FAILED, // SqlState = 'IM004'
+ DB_ERR_SQLALLOCCONNECT_FAILED, // SqlState = 'IM005'
+ DB_ERR_SQLSETCONNECTOPTION_FAILED, // SqlState = 'IM006'
+ DB_ERR_NO_DATA_SOURCE_DLG_PROHIB, // SqlState = 'IM007'
+ DB_ERR_DIALOG_FAILED, // SqlState = 'IM008'
+ DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL, // SqlState = 'IM009'
+ DB_ERR_DATA_SOURCE_NAME_TOO_LONG, // SqlState = 'IM010'
+ DB_ERR_DRIVER_NAME_TOO_LONG, // SqlState = 'IM011'
+ DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR, // SqlState = 'IM012'
+ DB_ERR_TRACE_FILE_ERROR, // SqlState = 'IM013'
+ DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS, // SqlState = 'S0001'
+ DB_ERR_TABLE_NOT_FOUND, // SqlState = 'S0002'
+ DB_ERR_INDEX_ALREADY_EXISTS, // SqlState = 'S0011'
+ DB_ERR_INDEX_NOT_FOUND, // SqlState = 'S0012'
+ DB_ERR_COLUMN_ALREADY_EXISTS, // SqlState = 'S0021'
+ DB_ERR_COLUMN_NOT_FOUND, // SqlState = 'S0022'
+ DB_ERR_NO_DEFAULT_FOR_COLUMN, // SqlState = 'S0023'
+ DB_ERR_GENERAL_ERROR, // SqlState = 'S1000'
+ DB_ERR_MEMORY_ALLOCATION_FAILURE, // SqlState = 'S1001'
+ DB_ERR_INVALID_COLUMN_NUMBER, // SqlState = 'S1002'
+ DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE, // SqlState = 'S1003'
+ DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE, // SqlState = 'S1004'
+ DB_ERR_OPERATION_CANCELLED, // SqlState = 'S1008'
+ DB_ERR_INVALID_ARGUMENT_VALUE, // SqlState = 'S1009'
+ DB_ERR_FUNCTION_SEQUENCE_ERROR, // SqlState = 'S1010'
+ DB_ERR_OPERATION_INVALID_AT_THIS_TIME, // SqlState = 'S1011'
+ DB_ERR_INVALID_TRANS_OPERATION_CODE, // SqlState = 'S1012'
+ DB_ERR_NO_CURSOR_NAME_AVAIL, // SqlState = 'S1015'
+ DB_ERR_INVALID_STR_OR_BUF_LEN, // SqlState = 'S1090'
+ DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE, // SqlState = 'S1091'
+ DB_ERR_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1092'
+ DB_ERR_INVALID_PARAM_NO, // SqlState = 'S1093'
+ DB_ERR_INVALID_SCALE_VALUE, // SqlState = 'S1094'
+ DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1095'
+ DB_ERR_INF_TYPE_OUT_OF_RANGE, // SqlState = 'S1096'
+ DB_ERR_COLUMN_TYPE_OUT_OF_RANGE, // SqlState = 'S1097'
+ DB_ERR_SCOPE_TYPE_OUT_OF_RANGE, // SqlState = 'S1098'
+ DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE, // SqlState = 'S1099'
+ DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1100'
+ DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1101'
+ DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE, // SqlState = 'S1103'
+ DB_ERR_INVALID_PRECISION_VALUE, // SqlState = 'S1104'
+ DB_ERR_INVALID_PARAM_TYPE, // SqlState = 'S1105'
+ DB_ERR_FETCH_TYPE_OUT_OF_RANGE, // SqlState = 'S1106'
+ DB_ERR_ROW_VALUE_OUT_OF_RANGE, // SqlState = 'S1107'
+ DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE, // SqlState = 'S1108'
+ DB_ERR_INVALID_CURSOR_POSITION, // SqlState = 'S1109'
+ DB_ERR_INVALID_DRIVER_COMPLETION, // SqlState = 'S1110'
+ DB_ERR_INVALID_BOOKMARK_VALUE, // SqlState = 'S1111'
+ DB_ERR_DRIVER_NOT_CAPABLE, // SqlState = 'S1C00'
+ DB_ERR_TIMEOUT_EXPIRED // SqlState = 'S1T00'
+};
+
+#ifndef MAXNAME
+ #define MAXNAME 31
+#endif
+
+#ifndef SQL_MAX_AUTHSTR_LEN
+ // There does not seem to be a standard for this, so I am
+ // defaulting to the value that MS uses
+ #define SQL_MAX_AUTHSTR_LEN MAXNAME
+#endif
+
+#ifndef SQL_MAX_CONNECTSTR_LEN
+ // There does not seem to be a standard for this, so I am
+ // defaulting to the value that MS recommends
+ #define SQL_MAX_CONNECTSTR_LEN 1024
+#endif
+
+
+class WXDLLIMPEXP_ODBC wxDbConnectInf
+{
+ private:
+ bool freeHenvOnDestroy;
+ bool useConnectionStr;
+
+ public:
+ HENV Henv;
+ wxChar Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name
+ wxChar Uid[SQL_MAX_USER_NAME_LEN+1]; // User ID
+ wxChar AuthStr[SQL_MAX_AUTHSTR_LEN+1]; // Authorization string (password)
+ wxChar ConnectionStr[SQL_MAX_CONNECTSTR_LEN+1]; // Connection string (password)
+
+ wxString Description; // Not sure what the max length is
+ wxString FileType; // Not sure what the max length is
+
+ // Optionals needed for some databases like dBase
+ wxString DefaultDir; // Directory that db file resides in
+
+ public:
+
+ wxDbConnectInf();
+ wxDbConnectInf(HENV henv, const wxString &dsn, const wxString &userID=wxEmptyString,
+ const wxString &password=wxEmptyString, const wxString &defaultDir=wxEmptyString,
+ const wxString &description=wxEmptyString, const wxString &fileType=wxEmptyString);
+
+ ~wxDbConnectInf();
+
+ bool Initialize();
+
+ bool AllocHenv();
+ void FreeHenv();
+
+ // Accessors
+ const HENV &GetHenv() { return Henv; }
+
+ const wxChar *GetDsn() { return Dsn; }
+
+ const wxChar *GetUid() { return Uid; }
+ const wxChar *GetUserID() { return Uid; }
+
+ const wxChar *GetAuthStr() { return AuthStr; }
+ const wxChar *GetPassword() { return AuthStr; }
+
+ const wxChar *GetConnectionStr() { return ConnectionStr; }
+ bool UseConnectionStr() { return useConnectionStr; }
+
+ const wxChar *GetDescription() { return Description; }
+ const wxChar *GetFileType() { return FileType; }
+ const wxChar *GetDefaultDir() { return DefaultDir; }
+
+ void SetHenv(const HENV henv) { Henv = henv; }
+
+ void SetDsn(const wxString &dsn);
+
+ void SetUserID(const wxString &userID);
+ void SetUid(const wxString &uid) { SetUserID(uid); }
+
+ void SetPassword(const wxString &password);
+ void SetAuthStr(const wxString &authstr) { SetPassword(authstr); }
+
+ void SetConnectionStr(const wxString &connectStr);
+
+ void SetDescription(const wxString &desc) { Description = desc; }
+ void SetFileType(const wxString &fileType) { FileType = fileType; }
+ void SetDefaultDir(const wxString &defDir) { DefaultDir = defDir; }
+}; // class wxDbConnectInf
+
+
+struct WXDLLIMPEXP_ODBC wxDbSqlTypeInfo
+{
+ wxString TypeName;
+ SWORD FsqlType;
+ long Precision;
+ short CaseSensitive;
+ short MaximumScale;
+};
+
+
+class WXDLLIMPEXP_ODBC wxDbColFor
+{
+public:
+ wxString s_Field; // Formatted String for Output
+ wxString s_Format[7]; // Formatted Objects - TIMESTAMP has the biggest (7)
+ wxString s_Amount[7]; // Formatted Objects - amount of things that can be formatted
+ int i_Amount[7]; // Formatted Objects - TT MM YYYY HH MM SS m
+ int i_Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
+ int i_dbDataType; // conversion of the 'sqlDataType' to the generic data type used by these classes
+ SWORD i_sqlDataType;
+
+ wxDbColFor();
+ ~wxDbColFor(){}
+
+ void Initialize();
+ int Format(int Nation, int dbDataType, SWORD sqlDataType, short columnLength, short decimalDigits);
+};
+
+
+class WXDLLIMPEXP_ODBC wxDbColInf
+{
+public:
+ wxChar catalog[128+1];
+ wxChar schema[128+1];
+ wxChar tableName[DB_MAX_TABLE_NAME_LEN+1];
+ wxChar colName[DB_MAX_COLUMN_NAME_LEN+1];
+ SWORD sqlDataType;
+ wxChar typeName[128+1];
+ SWORD columnLength;
+ SWORD bufferSize;
+ short decimalDigits;
+ short numPrecRadix;
+ short nullable;
+ wxChar remarks[254+1];
+ int dbDataType; // conversion of the 'sqlDataType' to the generic data type used by these classes
+ // mj10777.19991224 : new
+ int PkCol; // Primary key column 0=No; 1= First Key, 2 = Second Key etc.
+ wxChar PkTableName[DB_MAX_TABLE_NAME_LEN+1]; // Tables that use this PKey as a FKey
+ int FkCol; // Foreign key column 0=No; 1= First Key, 2 = Second Key etc.
+ wxChar FkTableName[DB_MAX_TABLE_NAME_LEN+1]; // Foreign key table name
+ wxDbColFor *pColFor; // How should this columns be formatted
+
+ wxDbColInf();
+ ~wxDbColInf();
+
+ bool Initialize();
+};
+
+
+class WXDLLIMPEXP_ODBC wxDbTableInf // Description of a Table
+{
+public:
+ wxChar tableName[DB_MAX_TABLE_NAME_LEN+1];
+ wxChar tableType[254+1]; // "TABLE" or "SYSTEM TABLE" etc.
+ wxChar tableRemarks[254+1];
+ UWORD numCols; // How many Columns does this Table have: GetColumnCount(..);
+ wxDbColInf *pColInf; // pColInf = NULL ; User can later call GetColumns(..);
+
+ wxDbTableInf();
+ ~wxDbTableInf();
+
+ bool Initialize();
+};
+
+
+class WXDLLIMPEXP_ODBC wxDbInf // Description of a Database
+{
+public:
+ wxChar catalog[128+1];
+ wxChar schema[128+1];
+ int numTables; // How many tables does this database have
+ wxDbTableInf *pTableInf; // pTableInf = new wxDbTableInf[numTables];
+
+ wxDbInf();
+ ~wxDbInf();
+
+ bool Initialize();
+};
+
+
+enum wxDbSqlLogState
+{
+ sqlLogOFF,
+ sqlLogON
+};
+
+// These are the databases currently tested and working with these classes
+// See the comments in wxDb::Dbms() for exceptions/issues with
+// each of these database engines
+enum wxDBMS
+{
+ dbmsUNIDENTIFIED,
+ dbmsORACLE,
+ dbmsSYBASE_ASA, // Adaptive Server Anywhere
+ dbmsSYBASE_ASE, // Adaptive Server Enterprise
+ dbmsMS_SQL_SERVER,
+ dbmsMY_SQL,
+ dbmsPOSTGRES,
+ dbmsACCESS,
+ dbmsDBASE,
+ dbmsINFORMIX,
+ dbmsVIRTUOSO,
+ dbmsDB2,
+ dbmsINTERBASE,
+ dbmsPERVASIVE_SQL,
+ dbmsXBASE_SEQUITER,
+ dbmsFIREBIRD,
+ dbmsMAXDB,
+ dbmsFuture1,
+ dbmsFuture2,
+ dbmsFuture3,
+ dbmsFuture4,
+ dbmsFuture5,
+ dbmsFuture6,
+ dbmsFuture7,
+ dbmsFuture8,
+ dbmsFuture9,
+ dbmsFuture10
+};
+
+
+// The wxDb::errorList is copied to this variable when the wxDb object
+// is closed. This way, the error list is still available after the
+// database object is closed. This is necessary if the database
+// connection fails so the calling application can show the operator
+// why the connection failed. Note: as each wxDb object is closed, it
+// will overwrite the errors of the previously destroyed wxDb object in
+// this variable.
+
+extern WXDLLIMPEXP_DATA_ODBC(wxChar)
+ DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN+1];
+
+
+class WXDLLIMPEXP_ODBC wxDb
+{
+private:
+ bool dbIsOpen;
+ bool dbIsCached; // Was connection created by caching functions
+ bool dbOpenedWithConnectionString; // Was the database connection opened with a connection string
+ wxString dsn; // Data source name
+ wxString uid; // User ID
+ wxString authStr; // Authorization string (password)
+ wxString inConnectionStr; // Connection string used to connect to the database
+ wxString outConnectionStr;// Connection string returned by the database when a connection is successfully opened
+ FILE *fpSqlLog; // Sql Log file pointer
+ wxDbSqlLogState sqlLogState; // On or Off
+ bool fwdOnlyCursors;
+ wxDBMS dbmsType; // Type of datasource - i.e. Oracle, dBase, SQLServer, etc
+
+ // Private member functions
+ bool getDbInfo(bool failOnDataTypeUnsupported=true);
+ bool getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo);
+ bool setConnectionOptions(void);
+ void logError(const wxString &errMsg, const wxString &SQLState);
+ const wxChar *convertUserID(const wxChar *userID, wxString &UserID);
+ bool determineDataTypes(bool failOnDataTypeUnsupported);
+ void initialize();
+ bool open(bool failOnDataTypeUnsupported=true);
+
+#if !wxODBC_BACKWARD_COMPATABILITY
+ // ODBC handles
+ HENV henv; // ODBC Environment handle
+ HDBC hdbc; // ODBC DB Connection handle
+ HSTMT hstmt; // ODBC Statement handle
+
+ //Error reporting mode
+ bool silent;
+
+ // Number of Ctable objects connected to this db object. FOR INTERNAL USE ONLY!!!
+ unsigned int nTables;
+
+ // Information about logical data types VARCHAR, INTEGER, FLOAT and DATE.
+ //
+ // This information is obtained from the ODBC driver by use of the
+ // SQLGetTypeInfo() function. The key piece of information is the
+ // type name the data source uses for each logical data type.
+ // e.g. VARCHAR; Oracle calls it VARCHAR2.
+ wxDbSqlTypeInfo typeInfVarchar;
+ wxDbSqlTypeInfo typeInfInteger;
+ wxDbSqlTypeInfo typeInfFloat;
+ wxDbSqlTypeInfo typeInfDate;
+ wxDbSqlTypeInfo typeInfBlob;
+ wxDbSqlTypeInfo typeInfMemo;
+#endif
+
+public:
+
+ void setCached(bool cached) { dbIsCached = cached; } // This function must only be called by wxDbGetConnection() and wxDbCloseConnections!!!
+ bool IsCached() { return dbIsCached; }
+
+ bool GetDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo)
+ { return getDataTypeInfo(fSqlType, structSQLTypeInfo); }
+
+#if wxODBC_BACKWARD_COMPATABILITY
+ // ODBC handles
+ HENV henv; // ODBC Environment handle
+ HDBC hdbc; // ODBC DB Connection handle
+ HSTMT hstmt; // ODBC Statement handle
+
+ //Error reporting mode
+ bool silent;
+
+ // Number of Ctable objects connected to this db object. FOR INTERNAL USE ONLY!!!
+ unsigned int nTables;
+#endif
+
+ // The following structure contains database information gathered from the
+ // datasource when the datasource is first opened.
+ struct
+ {
+ wxChar dbmsName[40]; // Name of the dbms product
+ wxChar dbmsVer[64]; // Version # of the dbms product
+ wxChar driverName[40]; // Driver name
+ wxChar odbcVer[60]; // ODBC version of the driver
+ wxChar drvMgrOdbcVer[60]; // ODBC version of the driver manager
+ wxChar driverVer[60]; // Driver version
+ wxChar serverName[80]; // Server Name, typically a connect string
+ wxChar databaseName[128]; // Database filename
+ wxChar outerJoins[2]; // Indicates whether the data source supports outer joins
+ wxChar procedureSupport[2]; // Indicates whether the data source supports stored procedures
+ wxChar accessibleTables[2]; // Indicates whether the data source only reports accessible tables in SQLTables.
+ UWORD maxConnections; // Maximum # of connections the data source supports
+ UWORD maxStmts; // Maximum # of HSTMTs per HDBC
+ UWORD apiConfLvl; // ODBC API conformance level
+ UWORD cliConfLvl; // Indicates whether the data source is SAG compliant
+ UWORD sqlConfLvl; // SQL conformance level
+ UWORD cursorCommitBehavior; // Indicates how cursors are affected by a db commit
+ UWORD cursorRollbackBehavior; // Indicates how cursors are affected by a db rollback
+ UWORD supportNotNullClause; // Indicates if data source supports NOT NULL clause
+ wxChar supportIEF[2]; // Integrity Enhancement Facility (Referential Integrity)
+ UDWORD txnIsolation; // Default transaction isolation level supported by the driver
+ UDWORD txnIsolationOptions; // Transaction isolation level options available
+ UDWORD fetchDirections; // Fetch directions supported
+ UDWORD lockTypes; // Lock types supported in SQLSetPos
+ UDWORD posOperations; // Position operations supported in SQLSetPos
+ UDWORD posStmts; // Position statements supported
+ UDWORD scrollConcurrency; // Concurrency control options supported for scrollable cursors
+ UDWORD scrollOptions; // Scroll Options supported for scrollable cursors
+ UDWORD staticSensitivity; // Indicates if additions, deletions and updates can be detected
+ UWORD txnCapable; // Indicates if the data source supports transactions
+ UDWORD loginTimeout; // Number seconds to wait for a login request
+ } dbInf;
+
+ // ODBC Error Inf.
+ SWORD cbErrorMsg;
+ int DB_STATUS;
+#ifdef __VMS
+ // The DECC compiler chokes when in db.cpp the array is accessed outside
+ // its bounds. Maybe this change should also applied for other platforms.
+ wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN+1];
+#else
+ wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN];
+#endif
+ wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH];
+ SQLINTEGER nativeError;
+ wxChar sqlState[20];
+
+#if wxODBC_BACKWARD_COMPATABILITY
+ // Information about logical data types VARCHAR, INTEGER, FLOAT and DATE.
+ //
+ // This information is obtained from the ODBC driver by use of the
+ // SQLGetTypeInfo() function. The key piece of information is the
+ // type name the data source uses for each logical data type.
+ // e.g. VARCHAR; Oracle calls it VARCHAR2.
+ wxDbSqlTypeInfo typeInfVarchar;
+ wxDbSqlTypeInfo typeInfInteger;
+ wxDbSqlTypeInfo typeInfFloat;
+ wxDbSqlTypeInfo typeInfDate;
+ wxDbSqlTypeInfo typeInfBlob;
+#endif
+
+ // Public member functions
+ wxDb(const HENV &aHenv, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS);
+ ~wxDb();
+
+ // Data Source Name, User ID, Password and whether open should fail on data type not supported
+ bool Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported=true);
+ ///This version of Open will open the odbc source selection dialog. Cast a wxWindow::GetHandle() to SQLHWND to use.
+ bool Open(const wxString& inConnectStr, SQLHWND parentWnd, bool failOnDataTypeUnsupported=true);
+ bool Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported=true);
+ bool Open(wxDbConnectInf *dbConnectInf, bool failOnDataTypeUnsupported=true);
+ bool Open(wxDb *copyDb); // pointer to a wxDb whose connection info should be copied rather than re-queried
+ void Close(void);
+ bool CommitTrans(void);
+ bool RollbackTrans(void);
+ bool DispAllErrors(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
+ bool GetNextError(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
+ void DispNextError(void);
+ bool CreateView(const wxString &viewName, const wxString &colList, const wxString &pSqlStmt, bool attemptDrop=true);
+ bool DropView(const wxString &viewName);
+ bool ExecSql(const wxString &pSqlStmt);
+ bool ExecSql(const wxString &pSqlStmt, wxDbColInf** columns, short& numcols);
+ bool GetNext(void);
+ bool GetData(UWORD colNo, SWORD cType, PTR pData, SDWORD maxLen, SQLLEN FAR *cbReturned);
+ bool Grant(int privileges, const wxString &tableName, const wxString &userList = wxT("PUBLIC"));
+ int TranslateSqlState(const wxString &SQLState);
+ wxDbInf *GetCatalog(const wxChar *userID=NULL);
+ bool Catalog(const wxChar *userID=NULL, const wxString &fileName=SQL_CATALOG_FILENAME);
+ int GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCols);
+
+ wxDbColInf *GetColumns(wxChar *tableName[], const wxChar *userID=NULL);
+ wxDbColInf *GetColumns(const wxString &tableName, UWORD *numCols, const wxChar *userID=NULL);
+
+ int GetColumnCount(const wxString &tableName, const wxChar *userID=NULL);
+ const wxChar *GetDatabaseName(void) {return dbInf.dbmsName;}
+ const wxString &GetDataSource(void) {return dsn;}
+ const wxString &GetDatasourceName(void){return dsn;}
+ const wxString &GetUsername(void) {return uid;}
+ const wxString &GetPassword(void) {return authStr;}
+ const wxString &GetConnectionInStr(void) {return inConnectionStr;}
+ const wxString &GetConnectionOutStr(void) {return outConnectionStr;}
+ bool IsOpen(void) {return dbIsOpen;}
+ bool OpenedWithConnectionString(void) {return dbOpenedWithConnectionString;}
+ HENV GetHENV(void) {return henv;}
+ HDBC GetHDBC(void) {return hdbc;}
+ HSTMT GetHSTMT(void) {return hstmt;}
+ int GetTableCount() {return nTables;} // number of tables using this connection
+ wxDbSqlTypeInfo GetTypeInfVarchar() {return typeInfVarchar;}
+ wxDbSqlTypeInfo GetTypeInfInteger() {return typeInfInteger;}
+ wxDbSqlTypeInfo GetTypeInfFloat() {return typeInfFloat;}
+ wxDbSqlTypeInfo GetTypeInfDate() {return typeInfDate;}
+ wxDbSqlTypeInfo GetTypeInfBlob() {return typeInfBlob;}
+ wxDbSqlTypeInfo GetTypeInfMemo() {return typeInfMemo;}
+
+ // tableName can refer to a table, view, alias or synonym
+ bool TableExists(const wxString &tableName, const wxChar *userID=NULL,
+ const wxString &tablePath=wxEmptyString);
+ bool TablePrivileges(const wxString &tableName, const wxString &priv,
+ const wxChar *userID=NULL, const wxChar *schema=NULL,
+ const wxString &path=wxEmptyString);
+
+ // These two functions return the table name or column name in a form ready
+ // for use in SQL statements. For example, if the datasource allows spaces
+ // in the table name or column name, the returned string will have the
+ // correct enclosing marks around the name to allow it to be properly
+ // included in a SQL statement
+ const wxString SQLTableName(const wxChar *tableName);
+ const wxString SQLColumnName(const wxChar *colName);
+
+ void LogError(const wxString &errMsg, const wxString &SQLState = wxEmptyString)
+ { logError(errMsg, SQLState); }
+ void SetDebugErrorMessages(bool state) { silent = !state; }
+ bool SetSqlLogging(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME,
+ bool append = false);
+ bool WriteSqlLog(const wxString &logMsg);
+
+ wxDBMS Dbms(void);
+ bool ModifyColumn(const wxString &tableName, const wxString &columnName,
+ int dataType, ULONG columnLength=0,
+ const wxString &optionalParam=wxEmptyString);
+
+ bool FwdOnlyCursors(void) {return fwdOnlyCursors;}
+
+ // return the string with all special SQL characters escaped
+ wxString EscapeSqlChars(const wxString& value);
+
+ // These two functions are provided strictly for use by wxDbTable.
+ // DO NOT USE THESE FUNCTIONS, OR MEMORY LEAKS MAY OCCUR
+ void incrementTableCount() { nTables++; return; }
+ void decrementTableCount() { nTables--; return; }
+
+}; // wxDb
+
+
+// This structure forms a node in a linked list. The linked list of "DbList" objects
+// keeps track of allocated database connections. This allows the application to
+// open more than one database connection through ODBC for multiple transaction support
+// or for multiple database support.
+struct wxDbList
+{
+ wxDbList *PtrPrev; // Pointer to previous item in the list
+ wxString Dsn; // Data Source Name
+ wxString Uid; // User ID
+ wxString AuthStr; // Authorization string (password)
+ wxString ConnectionStr; // Connection string used instead of DSN
+ wxDb *PtrDb; // Pointer to the wxDb object
+ bool Free; // Is item free or in use?
+ wxDbList *PtrNext; // Pointer to next item in the list
+};
+
+
+#ifdef __WXDEBUG__
+#include "wx/object.h"
+class wxTablesInUse : public wxObject
+{
+ public:
+ const wxChar *tableName;
+ ULONG tableID;
+ class wxDb *pDb;
+}; // wxTablesInUse
+#endif
+
+
+// The following routines allow a user to get new database connections, free them
+// for other code segments to use, or close all of them when the application has
+// completed.
+wxDb WXDLLIMPEXP_ODBC *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS);
+bool WXDLLIMPEXP_ODBC wxDbFreeConnection(wxDb *pDb);
+void WXDLLIMPEXP_ODBC wxDbCloseConnections(void);
+int WXDLLIMPEXP_ODBC wxDbConnectionsInUse(void);
+
+
+// Writes a message to the wxLog window (stdout usually) when an internal error
+// situation occurs. This function only works in DEBUG builds
+const wxChar WXDLLIMPEXP_ODBC *
+wxDbLogExtendedErrorMsg(const wxChar *userText,
+ wxDb *pDb,
+ const wxChar *ErrFile,
+ int ErrLine);
+
+
+// This function sets the sql log state for all open wxDb objects
+bool WXDLLIMPEXP_ODBC
+wxDbSqlLog(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME);
+
+
+#if 0
+// MSW/VC6 ONLY!!! Experimental
+int WXDLLEXPORT wxDbCreateDataSource(const wxString &driverName, const wxString &dsn, const wxString &description=wxEmptyString,
+ bool sysDSN=false, const wxString &defDir=wxEmptyString, wxWindow *parent=NULL);
+#endif
+
+// This routine allows you to query a driver manager
+// for a list of available datasources. Call this routine
+// the first time using SQL_FETCH_FIRST. Continue to call it
+// using SQL_FETCH_NEXT until you've exhausted the list.
+bool WXDLLIMPEXP_ODBC
+wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMaxLength, wxChar *DsDesc,
+ SWORD DsDescMaxLength, UWORD direction = SQL_FETCH_NEXT);
+
+
+// Change this to 0 to remove use of all deprecated functions
+#if wxODBC_BACKWARD_COMPATABILITY
+//#################################################################################
+//############### DEPRECATED functions for backward compatibility #################
+//#################################################################################
+
+// Backward compability structures/classes. This will eventually go away
+const int DB_PATH_MAX = wxDB_PATH_MAX;
+
+typedef wxDb wxDB;
+typedef wxDbTableInf wxTableInf;
+typedef wxDbColInf wxColInf;
+typedef wxDbColInf CcolInf;
+typedef wxDbColFor wxColFor;
+typedef wxDbSqlTypeInfo SqlTypeInfo;
+typedef wxDbSqlTypeInfo wxSqlTypeInfo;
+typedef enum wxDbSqlLogState sqlLog;
+typedef enum wxDbSqlLogState wxSqlLogState;
+typedef enum wxDBMS dbms;
+typedef enum wxDBMS DBMS;
+typedef wxODBC_ERRORS ODBC_ERRORS;
+typedef wxDbConnectInf DbStuff;
+typedef wxDbList DbList;
+#ifdef __WXDEBUG__
+typedef wxTablesInUse CstructTablesInUse;
+#endif
+
+// Deprecated function names that are replaced by the function names listed above
+wxDB WXDLLIMPEXP_ODBC
+*GetDbConnection(DbStuff *pDbStuff, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS);
+bool WXDLLIMPEXP_ODBC FreeDbConnection(wxDB *pDb);
+void WXDLLIMPEXP_ODBC CloseDbConnections(void);
+int WXDLLIMPEXP_ODBC NumberDbConnectionsInUse(void);
+
+bool SqlLog(sqlLog state, const wxChar *filename = SQL_LOG_FILENAME);
+
+bool WXDLLIMPEXP_ODBC
+GetDataSource(HENV henv, char *Dsn, SWORD DsnMaxLength, char *DsDesc, SWORD DsDescMaxLength,
+ UWORD direction = SQL_FETCH_NEXT);
+
+#endif // Deprecated structures/classes/functions
+
+#endif // _WX_DB_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/dbgrid.h b/3rdparty/wxWidgets/include/wx/dbgrid.h
new file mode 100644
index 0000000000..4e8655cbe1
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dbgrid.h
@@ -0,0 +1,177 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: dbgrid.h
+// Purpose: Displays a wxDbTable in a wxGrid.
+// Author: Roger Gammans, Paul Gammans
+// Modified by:
+// Created:
+// RCS-ID: $Id: dbgrid.h 41020 2006-09-05 20:47:48Z VZ $
+// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+// Branched From : dbgrid.h,v 1.19 2001/03/28 11:16:01
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_DBGRID_H_
+#define _WX_GENERIC_DBGRID_H_
+
+#if wxUSE_ODBC
+#if wxUSE_GRID
+
+#include "wx/log.h"
+#include "wx/dbtable.h"
+#include "wx/dynarray.h"
+#include "wx/grid.h"
+#include "wx/dbkeyg.h"
+
+#define wxGRID_VALUE_DBAUTO _T("dbauto")
+
+WX_DECLARE_USER_EXPORTED_OBJARRAY(GenericKey,keyarray,WXDLLIMPEXP_DBGRID);
+
+static const int wxUSE_QUERY = -1;
+
+class WXDLLIMPEXP_DBGRID wxDbGridColInfoBase
+{
+public:
+ //Default ctor
+ wxDbGridColInfoBase() { }
+ wxDbGridColInfoBase(int colNo,
+ wxString type, wxString title) :
+ DbCol(colNo),
+ wxtypename(type),
+ Title(title)
+ { }
+ //Copy Ctor
+ wxDbGridColInfoBase(const wxDbGridColInfoBase& ref)
+ {
+ DbCol = ref.DbCol;
+ wxtypename = ref.wxtypename;
+ Title = ref.Title;
+ }
+ //Empty destructor for member obj's
+ ~wxDbGridColInfoBase() {}
+
+ int DbCol;
+ wxString wxtypename;
+ wxString Title;
+};
+
+
+class WXDLLIMPEXP_DBGRID wxDbGridColInfo
+{
+public:
+ wxDbGridColInfo(int colNo,
+ wxString type,
+ wxString title,
+ wxDbGridColInfo *next) :
+ m_data(colNo,type,title)
+ {
+ m_next=next;
+ }
+
+ //Empty List
+ ~wxDbGridColInfo() { delete m_next; }
+
+ //Recurse to find length.
+ int Length() { return (m_next ? m_next->Length() +1 : 1); }
+
+ // Adds a new column info (2 step creation)
+ void AddColInfo (int colNo,
+ wxString type,
+ wxString title)
+ {
+ GetLast()->m_next = new wxDbGridColInfo (colNo, type, title, NULL);
+ }
+
+ // Searches last
+ wxDbGridColInfo *GetLast() { return (m_next ? m_next->GetLast() : this); }
+
+
+ protected:
+ wxDbGridColInfoBase m_data;
+ wxDbGridColInfo *m_next;
+
+ friend class wxDbGridTableBase;
+};
+
+
+class WXDLLIMPEXP_DBGRID wxDbGridCellAttrProvider : public wxGridCellAttrProvider
+{
+public:
+ wxDbGridCellAttrProvider();
+ wxDbGridCellAttrProvider(wxDbTable *tab, wxDbGridColInfoBase* ColInfo);
+ virtual ~wxDbGridCellAttrProvider();
+
+ virtual wxGridCellAttr *GetAttr(int row, int col,
+ wxGridCellAttr::wxAttrKind kind) const;
+ virtual void AssignDbTable(wxDbTable *tab);
+private:
+ wxDbTable *m_data;
+ wxDbGridColInfoBase *m_ColInfo;
+};
+
+
+class WXDLLIMPEXP_DBGRID wxDbGridTableBase : public wxGridTableBase
+{
+public:
+ wxDbGridTableBase(wxDbTable *tab, wxDbGridColInfo *ColInfo,
+ int count = wxUSE_QUERY, bool takeOwnership = true);
+ virtual ~wxDbGridTableBase();
+
+ virtual int GetNumberRows()
+ {
+ wxLogDebug(_T(" GetNumberRows() = %i"),m_rowtotal);
+ return m_rowtotal;
+ }
+ virtual int GetNumberCols()
+ {
+ wxLogDebug(_T(" GetNumberCols() = %i"),m_nocols);
+ return m_nocols;
+ }
+ virtual bool IsEmptyCell(int row, int col) ;
+ virtual wxString GetValue(int row, int col) ;
+ virtual void SetValue(int row, int col, const wxString& value);
+ virtual bool CanHaveAttributes();
+ virtual wxString GetTypeName(int row, int col);
+ virtual bool CanGetValueAs(int row, int col, const wxString& typeName);
+ virtual bool CanSetValueAs(int row, int col, const wxString& typeName);
+ virtual long GetValueAsLong(int row, int col);
+ virtual double GetValueAsDouble(int row, int col);
+ virtual bool GetValueAsBool(int row, int col);
+ virtual void SetValueAsLong(int row, int col, long value);
+ virtual void SetValueAsDouble(int row, int col, double value);
+ virtual void SetValueAsBool(int row, int col, bool value);
+ virtual void *GetValueAsCustom(int row, int col, const wxString& typeName);
+ virtual void SetValueAsCustom(int row, int col, const wxString& typeName, void* value);
+
+
+ virtual wxString GetColLabelValue(int col);
+
+ virtual bool AssignDbTable(wxDbTable *tab, int count = wxUSE_QUERY, bool takeOwnership=true);
+ virtual void ValidateRow(int row);
+ virtual bool UpdateRow(int row) const
+ {
+ if (m_row != row)
+ return true;
+ else
+ return Writeback();
+ }
+
+private:
+ //Operates on the current row
+ bool Writeback() const;
+
+ typedef wxGridTableBase inherited;
+ keyarray m_keys;
+ wxDbTable *m_data;
+ bool m_dbowner;
+ int m_rowtotal;
+ int m_nocols;
+ int m_row;
+ wxDbGridColInfoBase *m_ColInfo;
+ bool m_rowmodified;
+};
+
+#endif // #if wxUSE_GRID
+#endif // #if wxUSE_ODBC
+
+#endif // _WX_GENERIC_DBGRID_H_
diff --git a/3rdparty/wxWidgets/include/wx/dbkeyg.h b/3rdparty/wxWidgets/include/wx/dbkeyg.h
new file mode 100644
index 0000000000..eb91f1ce16
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dbkeyg.h
@@ -0,0 +1,41 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: dbkeyg.h
+// Purpose: Generic key support for wxDbTable
+// Author: Roger Gammans
+// Modified by:
+// Created:
+// RCS-ID: $Id: dbkeyg.h 29077 2004-09-10 12:56:07Z ABX $
+// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
+// Licence: wxWindows licence
+//
+// NOTE : There is no CPP file to go along with this
+//
+///////////////////////////////////////////////////////////////////////////////
+// Branched From : gkey.h,v 1.3 2001/06/01 10:31:41
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DBGKEY_H_
+#define _WX_DBGKEY_H_
+
+class GenericKey
+{
+public:
+ GenericKey(void *blk, size_t sz) { clone(blk,sz); }
+ GenericKey(const GenericKey &ref) { clone(ref.m_data,ref.m_sz); }
+ ~GenericKey() { free(m_data); }
+
+ void *GetBlk(void) const { return m_data; }
+
+private:
+ void clone(void *blk, size_t sz)
+ {
+ m_data = malloc(sz);
+ memcpy(m_data,blk,sz);
+ m_sz = sz;
+ }
+
+ void *m_data;
+ size_t m_sz;
+};
+
+#endif // _WX_DBGKEY_H_
diff --git a/3rdparty/wxWidgets/include/wx/dbtable.h b/3rdparty/wxWidgets/include/wx/dbtable.h
new file mode 100644
index 0000000000..1bbef54d76
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dbtable.h
@@ -0,0 +1,377 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: dbtable.h
+// Purpose: Declaration of the wxDbTable class.
+// Author: Doug Card
+// Modified by: George Tasker
+// Bart Jourquin
+// Mark Johnson
+// Created: 9.96
+// RCS-ID: $Id: dbtable.h 35650 2005-09-23 12:56:45Z MR $
+// Copyright: (c) 1996 Remstar International, Inc.
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/*
+// SYNOPSIS START
+// SYNOPSIS STOP
+*/
+
+#ifndef DBTABLE_DOT_H
+#define DBTABLE_DOT_H
+
+#include "wx/defs.h"
+
+#include "wx/db.h"
+
+#include "wx/variant.h"
+#include "wx/dbkeyg.h"
+
+const int wxDB_ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger
+const int wxDB_DEFAULT_CURSOR = 0;
+const bool wxDB_QUERY_ONLY = true;
+const bool wxDB_DISABLE_VIEW = true;
+
+// Used to indicate end of a variable length list of
+// column numbers passed to member functions
+const int wxDB_NO_MORE_COLUMN_NUMBERS = -1;
+
+// The following class is used to define a column of a table.
+// The wxDbTable constructor will dynamically allocate as many of
+// these as there are columns in the table. The class derived
+// from wxDbTable must initialize these column definitions in it's
+// constructor. These column definitions provide inf. to the
+// wxDbTable class which allows it to create a table in the data
+// source, exchange data between the data source and the C++
+// object, and so on.
+class WXDLLIMPEXP_ODBC wxDbColDef
+{
+public:
+ wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name
+ int DbDataType; // Logical Data Type; e.g. DB_DATA_TYPE_INTEGER
+ SWORD SqlCtype; // C data type; e.g. SQL_C_LONG
+ void *PtrDataObj; // Address of the data object
+ int SzDataObj; // Size, in bytes, of the data object
+ bool KeyField; // true if this column is part of the PRIMARY KEY to the table; Date fields should NOT be KeyFields.
+ bool Updateable; // Specifies whether this column is updateable
+ bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
+ bool DerivedCol; // Specifies whether this column is a derived value
+ SQLLEN CbValue; // Internal use only!!!
+ bool Null; // NOT FULLY IMPLEMENTED - Allows NULL values in Inserts and Updates
+
+ wxDbColDef();
+
+ bool Initialize();
+}; // wxDbColDef
+
+
+class WXDLLIMPEXP_ODBC wxDbColDataPtr
+{
+public:
+ void *PtrDataObj;
+ int SzDataObj;
+ SWORD SqlCtype;
+}; // wxDbColDataPtr
+
+
+// This structure is used when creating secondary indexes.
+class WXDLLIMPEXP_ODBC wxDbIdxDef
+{
+public:
+ wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1];
+ bool Ascending;
+}; // wxDbIdxDef
+
+
+class WXDLLIMPEXP_ODBC wxDbTable
+{
+private:
+ ULONG tableID; // Used for debugging. This can help to match up mismatched constructors/destructors
+
+ // Private member variables
+ UDWORD cursorType;
+ bool insertable;
+
+ // Private member functions
+ bool initialize(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
+ const wxString &qryTblName, bool qryOnly, const wxString &tblPath);
+ void cleanup();
+
+ void setCbValueForColumn(int columnIndex);
+ bool bindParams(bool forUpdate); // called by the other 'bind' functions
+ bool bindInsertParams(void);
+ bool bindUpdateParams(void);
+
+ bool bindCols(HSTMT cursor);
+ bool getRec(UWORD fetchType);
+ bool execDelete(const wxString &pSqlStmt);
+ bool execUpdate(const wxString &pSqlStmt);
+ bool query(int queryType, bool forUpdate, bool distinct, const wxString &pSqlStmt=wxEmptyString);
+
+#if !wxODBC_BACKWARD_COMPATABILITY
+// these were public
+ // Where, Order By and From clauses
+ wxString where; // Standard SQL where clause, minus the word WHERE
+ wxString orderBy; // Standard SQL order by clause, minus the ORDER BY
+ wxString from; // Allows for joins in a wxDbTable::Query(). Format: ",tbl,tbl..."
+
+ // ODBC Handles
+ HENV henv; // ODBC Environment handle
+ HDBC hdbc; // ODBC DB Connection handle
+ HSTMT hstmt; // ODBC Statement handle
+ HSTMT *hstmtDefault; // Default cursor
+ HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts
+ HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes
+ HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates
+ HSTMT hstmtInternal; // ODBC Statement handle used internally only
+ HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns)
+
+ // Flags
+ bool selectForUpdate;
+
+ // Pointer to the database object this table belongs to
+ wxDb *pDb;
+
+ // Table Inf.
+ wxString tablePath; // needed for dBase tables
+ wxString tableName; // Table name
+ wxString queryTableName; // Query Table Name
+ UWORD m_numCols; // # of columns in the table
+ bool queryOnly; // Query Only, no inserts, updates or deletes
+
+ // Column Definitions
+ wxDbColDef *colDefs; // Array of wxDbColDef structures
+#endif
+public:
+#if wxODBC_BACKWARD_COMPATABILITY
+ // Where, Order By and From clauses
+ char *where; // Standard SQL where clause, minus the word WHERE
+ char *orderBy; // Standard SQL order by clause, minus the ORDER BY
+ char *from; // Allows for joins in a wxDbTable::Query(). Format: ",tbl,tbl..."
+
+ // ODBC Handles
+ HENV henv; // ODBC Environment handle
+ HDBC hdbc; // ODBC DB Connection handle
+ HSTMT hstmt; // ODBC Statement handle
+ HSTMT *hstmtDefault; // Default cursor
+ HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts
+ HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes
+ HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates
+ HSTMT hstmtInternal; // ODBC Statement handle used internally only
+ HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns)
+
+ // Flags
+ bool selectForUpdate;
+
+ // Pointer to the database object this table belongs to
+ wxDb *pDb;
+
+ // Table Inf.
+ char tablePath[wxDB_PATH_MAX]; // needed for dBase tables
+ char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name
+ char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name
+ UWORD m_numCols; // # of columns in the table
+ bool queryOnly; // Query Only, no inserts, updates or deletes
+
+ // Column Definitions
+ wxDbColDef *colDefs; // Array of wxDbColDef structures
+#endif
+ // Public member functions
+ wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
+ const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
+ const wxString &tblPath=wxEmptyString);
+
+#if WXWIN_COMPATIBILITY_2_4
+ wxDEPRECATED(
+ wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
+ const wxChar *qryTblName, bool qryOnly,
+ const wxString &tblPath)
+ );
+#endif // WXWIN_COMPATIBILITY_2_4
+
+ virtual ~wxDbTable();
+
+ bool Open(bool checkPrivileges=false, bool checkTableExists=true);
+ bool CreateTable(bool attemptDrop=true);
+ bool DropTable(void);
+ bool CreateIndex(const wxString &indexName, bool unique, UWORD numIndexColumns,
+ wxDbIdxDef *pIndexDefs, bool attemptDrop=true);
+ bool DropIndex(const wxString &indexName);
+
+ // Accessors
+
+ // The member variables returned by these accessors are all
+ // set when the wxDbTable instance is created and cannot be
+ // changed, hence there is no corresponding SetXxxx function
+ wxDb *GetDb() { return pDb; }
+ const wxString &GetTableName() { return tableName; }
+ const wxString &GetQueryTableName() { return queryTableName; }
+ const wxString &GetTablePath() { return tablePath; }
+
+ UWORD GetNumberOfColumns() { return m_numCols; } // number of "defined" columns for this wxDbTable instance
+
+ const wxString &GetFromClause() { return from; }
+ const wxString &GetOrderByClause() { return orderBy; }
+ const wxString &GetWhereClause() { return where; }
+
+ bool IsQueryOnly() { return queryOnly; }
+#if wxODBC_BACKWARD_COMPATABILITY
+ void SetFromClause(const char *From) { from = (char *)From; }
+ void SetOrderByClause(const char *OrderBy) { orderBy = (char *)OrderBy; }
+ void SetWhereClause(const char *Where) { where = (char *)Where; }
+#else
+ void SetFromClause(const wxString &From) { from = From; }
+ void SetOrderByClause(const wxString &OrderBy) { orderBy = OrderBy; }
+ bool SetOrderByColNums(UWORD first, ...);
+ void SetWhereClause(const wxString &Where) { where = Where; }
+ void From(const wxString &From) { from = From; }
+ void OrderBy(const wxString &OrderBy) { orderBy = OrderBy; }
+ void Where(const wxString &Where) { where = Where; }
+ const wxString &Where() { return where; }
+ const wxString &OrderBy() { return orderBy; }
+ const wxString &From() { return from; }
+#endif
+ int Insert(void);
+ bool Update(void);
+ bool Update(const wxString &pSqlStmt);
+ bool UpdateWhere(const wxString &pWhereClause);
+ bool Delete(void);
+ bool DeleteWhere(const wxString &pWhereClause);
+ bool DeleteMatching(void);
+ virtual bool Query(bool forUpdate = false, bool distinct = false);
+ bool QueryBySqlStmt(const wxString &pSqlStmt);
+ bool QueryMatching(bool forUpdate = false, bool distinct = false);
+ bool QueryOnKeyFields(bool forUpdate = false, bool distinct = false);
+ bool Refresh(void);
+ bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); }
+ bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); }
+
+ /***** These four functions only work with wxDb instances that are defined *****
+ ***** as not being FwdOnlyCursors *****/
+ bool GetPrev(void);
+ bool operator--(int);
+ bool GetFirst(void);
+ bool GetLast(void);
+
+ bool IsCursorClosedOnCommit(void);
+ UWORD GetRowNum(void);
+
+ void BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool distinct);
+ void BuildSelectStmt(wxChar *pSqlStmt, int typeOfSelect, bool distinct);
+
+ void BuildDeleteStmt(wxString &pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString);
+ void BuildDeleteStmt(wxChar *pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString);
+
+ void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpdate, const wxString &pWhereClause=wxEmptyString);
+ void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpdate, const wxString &pWhereClause=wxEmptyString);
+
+ void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=false);
+ void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=false);
+
+#if wxODBC_BACKWARD_COMPATABILITY
+// The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above)
+ void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct)
+ { BuildSelectStmt(pSqlStmt,typeOfSelect,distinct); }
+ void GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause = NULL)
+ { BuildDeleteStmt(pSqlStmt,typeOfDel,pWhereClause); }
+ void GetUpdateStmt(char *pSqlStmt, int typeOfUpdate, const char *pWhereClause = NULL)
+ { BuildUpdateStmt(pSqlStmt,typeOfUpdate,pWhereClause); }
+ void GetWhereClause(char *pWhereClause, int typeOfWhere,
+ const char *qualTableName = NULL, bool useLikeComparison=false)
+ { BuildWhereClause(pWhereClause,typeOfWhere,qualTableName,useLikeComparison); }
+#endif
+ bool CanSelectForUpdate(void);
+#if wxODBC_BACKWARD_COMPATABILITY
+ bool CanUpdByROWID(void) { return CanUpdateByRowID(); };
+#endif
+ bool CanUpdateByROWID(void);
+ void ClearMemberVar(UWORD colNumber, bool setToNull=false);
+ void ClearMemberVars(bool setToNull=false);
+ bool SetQueryTimeout(UDWORD nSeconds);
+
+ wxDbColDef *GetColDefs() { return colDefs; }
+ bool SetColDefs(UWORD index, const wxString &fieldName, int dataType,
+ void *pData, SWORD cType,
+ int size, bool keyField = false, bool updateable = true,
+ bool insertAllowed = true, bool derivedColumn = false);
+ wxDbColDataPtr *SetColDefs(wxDbColInf *colInfs, UWORD numCols);
+
+ bool CloseCursor(HSTMT cursor);
+ bool DeleteCursor(HSTMT *hstmtDel);
+ void SetCursor(HSTMT *hstmtActivate = (void **) wxDB_DEFAULT_CURSOR);
+ HSTMT GetCursor(void) { return(hstmt); }
+ HSTMT *GetNewCursor(bool setCursor = false, bool bindColumns = true);
+#if wxODBC_BACKWARD_COMPATABILITY
+// The following member function is deprecated. You should use the GetNewCursor
+ HSTMT *NewCursor(bool setCursor = false, bool bindColumns = true) { return GetNewCursor(setCursor,bindColumns); }
+#endif
+
+ ULONG Count(const wxString &args=_T("*"));
+ int DB_STATUS(void) { return(pDb->DB_STATUS); }
+
+ bool IsColNull(UWORD colNumber) const;
+ bool SetColNull(UWORD colNumber, bool set=true);
+ bool SetColNull(const wxString &colName, bool set=true);
+#if wxODBC_BACKWARD_COMPATABILITY
+// The following member functions are deprecated. You should use the SetColNull()
+ bool SetNull(int colNumber, bool set=true) { return (SetNull(colNumber,set)); }
+ bool SetNull(const char *colName, bool set=true) { return (SetNull(colName,set)); }
+#endif
+#ifdef __WXDEBUG__
+ ULONG GetTableID() { return tableID; }
+#endif
+
+//TODO: Need to Document
+ typedef enum { WX_ROW_MODE_QUERY , WX_ROW_MODE_INDIVIDUAL } rowmode_t;
+ virtual void SetRowMode(const rowmode_t rowmode);
+#if wxODBC_BACKWARD_COMPATABILITY
+ virtual wxVariant GetCol(const int colNumber) const { return GetColumn(colNumber); };
+ virtual void SetCol(const int colNumber, const wxVariant value) { return SetColumn(colNumber, value); };
+#endif
+ virtual wxVariant GetColumn(const int colNumber) const ;
+ virtual void SetColumn(const int colNumber, const wxVariant value);
+ virtual GenericKey GetKey(void);
+ virtual void SetKey(const GenericKey &key);
+
+ private:
+ HSTMT *m_hstmtGridQuery;
+ rowmode_t m_rowmode;
+ size_t m_keysize;
+
+// typedef enum {unmodified=0, UpdatePending, InsertPending } recStatus;
+
+// recStatus get_ModifiedStatus() { return m_recstatus; }
+
+// void modify() {
+// if (m_recstatus==unmodified)
+// m_recstatus=UpdatePending;
+// }
+// protected:
+// void insertify() {m_recstatus=InsertPending; }
+// void unmodify() {m_recstatus=unmodified; }
+// recStatus m_recstatus;
+//TODO: Need to Document
+}; // wxDbTable
+
+
+// Change this to 0 to remove use of all deprecated functions
+#if wxODBC_BACKWARD_COMPATABILITY
+//#################################################################################
+//############### DEPRECATED functions for backward compatibility #################
+//#################################################################################
+
+// Backward compability. These will eventually go away
+typedef wxDbTable wxTable;
+typedef wxDbIdxDef wxIdxDef;
+typedef wxDbIdxDef CidxDef;
+typedef wxDbColDef wxColDef;
+typedef wxDbColDef CcolDef;
+typedef wxDbColDataPtr wxColDataPtr;
+typedef wxDbColDataPtr CcolDataPtr;
+
+const int ROWID = wxDB_ROWID_LEN;
+const int DEFAULT_CURSOR = wxDB_DEFAULT_CURSOR;
+const bool QUERY_ONLY = wxDB_QUERY_ONLY;
+const bool DISABLE_VIEW = wxDB_DISABLE_VIEW;
+#endif
+
+#endif
diff --git a/3rdparty/wxWidgets/include/wx/dc.h b/3rdparty/wxWidgets/include/wx/dc.h
new file mode 100644
index 0000000000..d4790403a1
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dc.h
@@ -0,0 +1,1003 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dc.h
+// Purpose: wxDC class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 05/25/99
+// RCS-ID: $Id: dc.h 55927 2008-09-28 09:12:16Z VS $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DC_H_BASE_
+#define _WX_DC_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers which we must include here
+// ----------------------------------------------------------------------------
+
+#include "wx/object.h" // the base class
+
+#include "wx/intl.h" // for wxLayoutDirection
+#include "wx/cursor.h" // we have member variables of these classes
+#include "wx/font.h" // so we can't do without them
+#include "wx/colour.h"
+#include "wx/bitmap.h" // for wxNullBitmap
+#include "wx/brush.h"
+#include "wx/pen.h"
+#include "wx/palette.h"
+#include "wx/list.h" // we use wxList in inline functions
+#include "wx/dynarray.h"
+#include "wx/math.h"
+
+class WXDLLIMPEXP_FWD_CORE wxDC;
+class WXDLLIMPEXP_FWD_CORE wxDCBase;
+
+class WXDLLEXPORT wxDrawObject
+{
+public:
+
+ wxDrawObject()
+ : m_isBBoxValid(false)
+ , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
+ { }
+
+ virtual ~wxDrawObject() { }
+
+ virtual void Draw(wxDCBase&) const { }
+
+ virtual void CalcBoundingBox(wxCoord x, wxCoord y)
+ {
+ if ( m_isBBoxValid )
+ {
+ if ( x < m_minX ) m_minX = x;
+ if ( y < m_minY ) m_minY = y;
+ if ( x > m_maxX ) m_maxX = x;
+ if ( y > m_maxY ) m_maxY = y;
+ }
+ else
+ {
+ m_isBBoxValid = true;
+
+ m_minX = x;
+ m_minY = y;
+ m_maxX = x;
+ m_maxY = y;
+ }
+ }
+
+ void ResetBoundingBox()
+ {
+ m_isBBoxValid = false;
+
+ m_minX = m_maxX = m_minY = m_maxY = 0;
+ }
+
+ // Get the final bounding box of the PostScript or Metafile picture.
+
+ wxCoord MinX() const { return m_minX; }
+ wxCoord MaxX() const { return m_maxX; }
+ wxCoord MinY() const { return m_minY; }
+ wxCoord MaxY() const { return m_maxY; }
+
+ //to define the type of object for derived objects
+ virtual int GetType()=0;
+
+protected:
+ //for boundingbox calculation
+ bool m_isBBoxValid:1;
+ //for boundingbox calculation
+ wxCoord m_minX, m_minY, m_maxX, m_maxY;
+};
+
+// ---------------------------------------------------------------------------
+// global variables
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+// wxDC is the device context - object on which any drawing is done
+// ---------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDCBase : public wxObject
+{
+public:
+ wxDCBase()
+ : m_colour(wxColourDisplay())
+ , m_ok(true)
+ , m_clipping(false)
+ , m_isInteractive(0)
+ , m_isBBoxValid(false)
+ , m_logicalOriginX(0), m_logicalOriginY(0)
+ , m_deviceOriginX(0), m_deviceOriginY(0)
+ , m_logicalScaleX(1.0), m_logicalScaleY(1.0)
+ , m_userScaleX(1.0), m_userScaleY(1.0)
+ , m_scaleX(1.0), m_scaleY(1.0)
+ , m_signX(1), m_signY(1)
+ , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
+ , m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0)
+ , m_logicalFunction(wxCOPY)
+ , m_backgroundMode(wxTRANSPARENT)
+ , m_mappingMode(wxMM_TEXT)
+ , m_pen()
+ , m_brush()
+ , m_backgroundBrush(*wxTRANSPARENT_BRUSH)
+ , m_textForegroundColour(*wxBLACK)
+ , m_textBackgroundColour(*wxWHITE)
+ , m_font()
+#if wxUSE_PALETTE
+ , m_palette()
+ , m_hasCustomPalette(false)
+#endif // wxUSE_PALETTE
+ {
+ ResetBoundingBox();
+ ResetClipping();
+ }
+
+ virtual ~wxDCBase() { }
+
+ // graphic primitives
+ // ------------------
+
+ virtual void DrawObject(wxDrawObject* drawobject)
+ {
+ drawobject->Draw(*this);
+ CalcBoundingBox(drawobject->MinX(),drawobject->MinY());
+ CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY());
+ }
+
+ bool FloodFill(wxCoord x, wxCoord y, const wxColour& col,
+ int style = wxFLOOD_SURFACE)
+ { return DoFloodFill(x, y, col, style); }
+ bool FloodFill(const wxPoint& pt, const wxColour& col,
+ int style = wxFLOOD_SURFACE)
+ { return DoFloodFill(pt.x, pt.y, col, style); }
+
+ // fill the area specified by rect with a radial gradient, starting from
+ // initialColour in the centre of the cercle and fading to destColour.
+ void GradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour)
+ { GradientFillConcentric(rect, initialColour, destColour,
+ wxPoint(rect.GetWidth() / 2,
+ rect.GetHeight() / 2)); }
+
+ void GradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ const wxPoint& circleCenter)
+ { DoGradientFillConcentric(rect, initialColour, destColour, circleCenter); }
+
+ // fill the area specified by rect with a linear gradient
+ void GradientFillLinear(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ wxDirection nDirection = wxEAST)
+ { DoGradientFillLinear(rect, initialColour, destColour, nDirection); }
+
+ bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const
+ { return DoGetPixel(x, y, col); }
+ bool GetPixel(const wxPoint& pt, wxColour *col) const
+ { return DoGetPixel(pt.x, pt.y, col); }
+
+ void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
+ { DoDrawLine(x1, y1, x2, y2); }
+ void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
+ { DoDrawLine(pt1.x, pt1.y, pt2.x, pt2.y); }
+
+ void CrossHair(wxCoord x, wxCoord y)
+ { DoCrossHair(x, y); }
+ void CrossHair(const wxPoint& pt)
+ { DoCrossHair(pt.x, pt.y); }
+
+ void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
+ wxCoord xc, wxCoord yc)
+ { DoDrawArc(x1, y1, x2, y2, xc, yc); }
+ void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
+ { DoDrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); }
+
+ void DrawCheckMark(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height)
+ { DoDrawCheckMark(x, y, width, height); }
+ void DrawCheckMark(const wxRect& rect)
+ { DoDrawCheckMark(rect.x, rect.y, rect.width, rect.height); }
+
+ void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
+ double sa, double ea)
+ { DoDrawEllipticArc(x, y, w, h, sa, ea); }
+ void DrawEllipticArc(const wxPoint& pt, const wxSize& sz,
+ double sa, double ea)
+ { DoDrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); }
+
+ void DrawPoint(wxCoord x, wxCoord y)
+ { DoDrawPoint(x, y); }
+ void DrawPoint(const wxPoint& pt)
+ { DoDrawPoint(pt.x, pt.y); }
+
+ void DrawLines(int n, wxPoint points[],
+ wxCoord xoffset = 0, wxCoord yoffset = 0)
+ { DoDrawLines(n, points, xoffset, yoffset); }
+ void DrawLines(const wxList *list,
+ wxCoord xoffset = 0, wxCoord yoffset = 0);
+
+ void DrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset = 0, wxCoord yoffset = 0,
+ int fillStyle = wxODDEVEN_RULE)
+ { DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); }
+
+ void DrawPolygon(const wxList *list,
+ wxCoord xoffset = 0, wxCoord yoffset = 0,
+ int fillStyle = wxODDEVEN_RULE);
+
+ void DrawPolyPolygon(int n, int count[], wxPoint points[],
+ wxCoord xoffset = 0, wxCoord yoffset = 0,
+ int fillStyle = wxODDEVEN_RULE)
+ { DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); }
+
+ void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+ { DoDrawRectangle(x, y, width, height); }
+ void DrawRectangle(const wxPoint& pt, const wxSize& sz)
+ { DoDrawRectangle(pt.x, pt.y, sz.x, sz.y); }
+ void DrawRectangle(const wxRect& rect)
+ { DoDrawRectangle(rect.x, rect.y, rect.width, rect.height); }
+
+ void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height,
+ double radius)
+ { DoDrawRoundedRectangle(x, y, width, height, radius); }
+ void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz,
+ double radius)
+ { DoDrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); }
+ void DrawRoundedRectangle(const wxRect& r, double radius)
+ { DoDrawRoundedRectangle(r.x, r.y, r.width, r.height, radius); }
+
+ void DrawCircle(wxCoord x, wxCoord y, wxCoord radius)
+ { DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); }
+ void DrawCircle(const wxPoint& pt, wxCoord radius)
+ { DrawCircle(pt.x, pt.y, radius); }
+
+ void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+ { DoDrawEllipse(x, y, width, height); }
+ void DrawEllipse(const wxPoint& pt, const wxSize& sz)
+ { DoDrawEllipse(pt.x, pt.y, sz.x, sz.y); }
+ void DrawEllipse(const wxRect& rect)
+ { DoDrawEllipse(rect.x, rect.y, rect.width, rect.height); }
+
+ void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
+ { DoDrawIcon(icon, x, y); }
+ void DrawIcon(const wxIcon& icon, const wxPoint& pt)
+ { DoDrawIcon(icon, pt.x, pt.y); }
+
+ void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
+ bool useMask = false)
+ { DoDrawBitmap(bmp, x, y, useMask); }
+ void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt,
+ bool useMask = false)
+ { DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
+
+ void DrawText(const wxString& text, wxCoord x, wxCoord y)
+ { DoDrawText(text, x, y); }
+ void DrawText(const wxString& text, const wxPoint& pt)
+ { DoDrawText(text, pt.x, pt.y); }
+
+ void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
+ { DoDrawRotatedText(text, x, y, angle); }
+ void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle)
+ { DoDrawRotatedText(text, pt.x, pt.y, angle); }
+
+ // this version puts both optional bitmap and the text into the given
+ // rectangle and aligns is as specified by alignment parameter; it also
+ // will emphasize the character with the given index if it is != -1 and
+ // return the bounding rectangle if required
+ virtual void DrawLabel(const wxString& text,
+ const wxBitmap& image,
+ const wxRect& rect,
+ int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+ int indexAccel = -1,
+ wxRect *rectBounding = NULL);
+
+ void DrawLabel(const wxString& text, const wxRect& rect,
+ int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+ int indexAccel = -1)
+ { DrawLabel(text, wxNullBitmap, rect, alignment, indexAccel); }
+
+ bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc,
+ int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
+ {
+ return DoBlit(xdest, ydest, width, height,
+ source, xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask);
+ }
+ bool Blit(const wxPoint& destPt, const wxSize& sz,
+ wxDC *source, const wxPoint& srcPt,
+ int rop = wxCOPY, bool useMask = false, const wxPoint& srcPtMask = wxDefaultPosition)
+ {
+ return DoBlit(destPt.x, destPt.y, sz.x, sz.y,
+ source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y);
+ }
+
+ wxBitmap GetAsBitmap(const wxRect *subrect = (const wxRect *) NULL) const
+ {
+ return DoGetAsBitmap(subrect);
+ }
+
+#if wxUSE_SPLINES
+ // TODO: this API needs fixing (wxPointList, why (!const) "wxList *"?)
+ void DrawSpline(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord x3, wxCoord y3);
+ void DrawSpline(int n, wxPoint points[]);
+
+ void DrawSpline(wxList *points) { DoDrawSpline(points); }
+#endif // wxUSE_SPLINES
+
+ // Eventually we will have wxUSE_GENERIC_DRAWELLIPSE
+#ifdef __WXWINCE__
+ //! Generic method to draw ellipses, circles and arcs with current pen and brush.
+ /*! \param x Upper left corner of bounding box.
+ * \param y Upper left corner of bounding box.
+ * \param w Width of bounding box.
+ * \param h Height of bounding box.
+ * \param sa Starting angle of arc
+ * (counterclockwise, start at 3 o'clock, 360 is full circle).
+ * \param ea Ending angle of arc.
+ * \param angle Rotation angle, the Arc will be rotated after
+ * calculating begin and end.
+ */
+ void DrawEllipticArcRot( wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height,
+ double sa = 0, double ea = 0, double angle = 0 )
+ { DoDrawEllipticArcRot( x, y, width, height, sa, ea, angle ); }
+
+ void DrawEllipticArcRot( const wxPoint& pt,
+ const wxSize& sz,
+ double sa = 0, double ea = 0, double angle = 0 )
+ { DoDrawEllipticArcRot( pt.x, pt.y, sz.x, sz.y, sa, ea, angle ); }
+
+ void DrawEllipticArcRot( const wxRect& rect,
+ double sa = 0, double ea = 0, double angle = 0 )
+ { DoDrawEllipticArcRot( rect.x, rect.y, rect.width, rect.height, sa, ea, angle ); }
+
+ virtual void DoDrawEllipticArcRot( wxCoord x, wxCoord y,
+ wxCoord w, wxCoord h,
+ double sa = 0, double ea = 0, double angle = 0 );
+
+ //! Rotates points around center.
+ /*! This is a quite straight method, it calculates in pixels
+ * and so it produces rounding errors.
+ * \param points The points inside will be rotated.
+ * \param angle Rotating angle (counterclockwise, start at 3 o'clock, 360 is full circle).
+ * \param center Center of rotation.
+ */
+ void Rotate( wxList* points, double angle, wxPoint center = wxPoint(0,0) );
+
+ // used by DrawEllipticArcRot
+ // Careful: wxList gets filled with points you have to delete later.
+ void CalculateEllipticPoints( wxList* points,
+ wxCoord xStart, wxCoord yStart,
+ wxCoord w, wxCoord h,
+ double sa, double ea );
+#endif
+
+ // global DC operations
+ // --------------------
+
+ virtual void Clear() = 0;
+
+ virtual bool StartDoc(const wxString& WXUNUSED(message)) { return true; }
+ virtual void EndDoc() { }
+
+ virtual void StartPage() { }
+ virtual void EndPage() { }
+
+#if WXWIN_COMPATIBILITY_2_6
+ wxDEPRECATED( void BeginDrawing() );
+ wxDEPRECATED( void EndDrawing() );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+
+ // set objects to use for drawing
+ // ------------------------------
+
+ virtual void SetFont(const wxFont& font) = 0;
+ virtual void SetPen(const wxPen& pen) = 0;
+ virtual void SetBrush(const wxBrush& brush) = 0;
+ virtual void SetBackground(const wxBrush& brush) = 0;
+ virtual void SetBackgroundMode(int mode) = 0;
+#if wxUSE_PALETTE
+ virtual void SetPalette(const wxPalette& palette) = 0;
+#endif // wxUSE_PALETTE
+
+ // clipping region
+ // ---------------
+
+ void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+ { DoSetClippingRegion(x, y, width, height); }
+ void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
+ { DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); }
+ void SetClippingRegion(const wxRect& rect)
+ { DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); }
+ void SetClippingRegion(const wxRegion& region)
+ { DoSetClippingRegionAsRegion(region); }
+
+ virtual void DestroyClippingRegion() { ResetClipping(); }
+
+ void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const
+ { DoGetClippingBox(x, y, w, h); }
+ void GetClippingBox(wxRect& rect) const
+ {
+ DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height);
+ }
+
+ // text extent
+ // -----------
+
+ virtual wxCoord GetCharHeight() const = 0;
+ virtual wxCoord GetCharWidth() const = 0;
+
+ // only works for single line strings
+ void GetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const
+ { DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
+
+ wxSize GetTextExtent(const wxString& string) const
+ {
+ wxCoord w, h;
+ DoGetTextExtent(string, &w, &h);
+ return wxSize(w, h);
+ }
+
+ // works for single as well as multi-line strings
+ virtual void GetMultiLineTextExtent(const wxString& string,
+ wxCoord *width,
+ wxCoord *height,
+ wxCoord *heightLine = NULL,
+ wxFont *font = NULL) const;
+
+ wxSize GetMultiLineTextExtent(const wxString& string) const
+ {
+ wxCoord w, h;
+ GetMultiLineTextExtent(string, &w, &h);
+ return wxSize(w, h);
+ }
+
+ // Measure cumulative width of text after each character
+ bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
+ { return DoGetPartialTextExtents(text, widths); }
+
+ // size and resolution
+ // -------------------
+
+ // in device units
+ void GetSize(int *width, int *height) const
+ { DoGetSize(width, height); }
+ wxSize GetSize() const
+ {
+ int w, h;
+ DoGetSize(&w, &h);
+
+ return wxSize(w, h);
+ }
+
+ // in mm
+ void GetSizeMM(int* width, int* height) const
+ { DoGetSizeMM(width, height); }
+ wxSize GetSizeMM() const
+ {
+ int w, h;
+ DoGetSizeMM(&w, &h);
+
+ return wxSize(w, h);
+ }
+
+ // coordinates conversions
+ // -----------------------
+
+ // This group of functions does actual conversion of the input, as you'd
+ // expect.
+ wxCoord DeviceToLogicalX(wxCoord x) const;
+ wxCoord DeviceToLogicalY(wxCoord y) const;
+ wxCoord DeviceToLogicalXRel(wxCoord x) const;
+ wxCoord DeviceToLogicalYRel(wxCoord y) const;
+ wxCoord LogicalToDeviceX(wxCoord x) const;
+ wxCoord LogicalToDeviceY(wxCoord y) const;
+ wxCoord LogicalToDeviceXRel(wxCoord x) const;
+ wxCoord LogicalToDeviceYRel(wxCoord y) const;
+
+ // query DC capabilities
+ // ---------------------
+
+ virtual bool CanDrawBitmap() const = 0;
+ virtual bool CanGetTextExtent() const = 0;
+
+ // colour depth
+ virtual int GetDepth() const = 0;
+
+ // Resolution in Pixels per inch
+ virtual wxSize GetPPI() const = 0;
+
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const { return m_ok; }
+
+ // accessors and setters
+ // ---------------------
+
+ virtual int GetBackgroundMode() const { return m_backgroundMode; }
+ virtual const wxBrush& GetBackground() const { return m_backgroundBrush; }
+ virtual const wxBrush& GetBrush() const { return m_brush; }
+ virtual const wxFont& GetFont() const { return m_font; }
+ virtual const wxPen& GetPen() const { return m_pen; }
+
+ virtual const wxColour& GetTextForeground() const { return m_textForegroundColour; }
+ virtual const wxColour& GetTextBackground() const { return m_textBackgroundColour; }
+ virtual void SetTextForeground(const wxColour& colour)
+ { m_textForegroundColour = colour; }
+ virtual void SetTextBackground(const wxColour& colour)
+ { m_textBackgroundColour = colour; }
+
+ virtual int GetMapMode() const { return m_mappingMode; }
+ virtual void SetMapMode(int mode) = 0;
+
+ virtual void GetUserScale(double *x, double *y) const
+ {
+ if ( x ) *x = m_userScaleX;
+ if ( y ) *y = m_userScaleY;
+ }
+ virtual void SetUserScale(double x, double y) = 0;
+
+ virtual void GetLogicalScale(double *x, double *y)
+ {
+ if ( x ) *x = m_logicalScaleX;
+ if ( y ) *y = m_logicalScaleY;
+ }
+ virtual void SetLogicalScale(double x, double y)
+ {
+ m_logicalScaleX = x;
+ m_logicalScaleY = y;
+ }
+
+ void GetLogicalOrigin(wxCoord *x, wxCoord *y) const
+ { DoGetLogicalOrigin(x, y); }
+ wxPoint GetLogicalOrigin() const
+ { wxCoord x, y; DoGetLogicalOrigin(&x, &y); return wxPoint(x, y); }
+ virtual void SetLogicalOrigin(wxCoord x, wxCoord y) = 0;
+
+ void GetDeviceOrigin(wxCoord *x, wxCoord *y) const
+ { DoGetDeviceOrigin(x, y); }
+ wxPoint GetDeviceOrigin() const
+ { wxCoord x, y; DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); }
+ virtual void SetDeviceOrigin(wxCoord x, wxCoord y) = 0;
+
+ virtual void ComputeScaleAndOrigin() {}
+
+ virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) = 0;
+
+ virtual int GetLogicalFunction() const { return m_logicalFunction; }
+ virtual void SetLogicalFunction(int function) = 0;
+
+#if WXWIN_COMPATIBILITY_2_4
+ virtual void SetOptimization(bool WXUNUSED(opt)) { }
+ virtual bool GetOptimization() { return false; }
+#endif
+
+ // bounding box
+ // ------------
+
+ virtual void CalcBoundingBox(wxCoord x, wxCoord y)
+ {
+ if ( m_isBBoxValid )
+ {
+ if ( x < m_minX ) m_minX = x;
+ if ( y < m_minY ) m_minY = y;
+ if ( x > m_maxX ) m_maxX = x;
+ if ( y > m_maxY ) m_maxY = y;
+ }
+ else
+ {
+ m_isBBoxValid = true;
+
+ m_minX = x;
+ m_minY = y;
+ m_maxX = x;
+ m_maxY = y;
+ }
+ }
+
+ void ResetBoundingBox()
+ {
+ m_isBBoxValid = false;
+
+ m_minX = m_maxX = m_minY = m_maxY = 0;
+ }
+
+ // Get the final bounding box of the PostScript or Metafile picture.
+ wxCoord MinX() const { return m_minX; }
+ wxCoord MaxX() const { return m_maxX; }
+ wxCoord MinY() const { return m_minY; }
+ wxCoord MaxY() const { return m_maxY; }
+
+ // misc old functions
+ // ------------------
+
+ // for compatibility with the old code when wxCoord was long everywhere
+ void GetTextExtent(const wxString& string,
+ long *x, long *y,
+ long *descent = NULL,
+ long *externalLeading = NULL,
+ wxFont *theFont = NULL) const
+ {
+ wxCoord x2, y2, descent2, externalLeading2;
+ DoGetTextExtent(string, &x2, &y2,
+ &descent2, &externalLeading2,
+ theFont);
+ if ( x )
+ *x = x2;
+ if ( y )
+ *y = y2;
+ if ( descent )
+ *descent = descent2;
+ if ( externalLeading )
+ *externalLeading = externalLeading2;
+ }
+
+ void GetLogicalOrigin(long *x, long *y) const
+ {
+ wxCoord x2, y2;
+ DoGetLogicalOrigin(&x2, &y2);
+ if ( x )
+ *x = x2;
+ if ( y )
+ *y = y2;
+ }
+
+ void GetDeviceOrigin(long *x, long *y) const
+ {
+ wxCoord x2, y2;
+ DoGetDeviceOrigin(&x2, &y2);
+ if ( x )
+ *x = x2;
+ if ( y )
+ *y = y2;
+ }
+ void GetClippingBox(long *x, long *y, long *w, long *h) const
+ {
+ wxCoord xx,yy,ww,hh;
+ DoGetClippingBox(&xx, &yy, &ww, &hh);
+ if (x) *x = xx;
+ if (y) *y = yy;
+ if (w) *w = ww;
+ if (h) *h = hh;
+ }
+
+ // RTL related functions
+ // ---------------------
+
+ // get or change the layout direction (LTR or RTL) for this dc,
+ // wxLayout_Default is returned if layout direction is not supported
+ virtual wxLayoutDirection GetLayoutDirection() const
+ { return wxLayout_Default; }
+ virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir))
+ { }
+
+protected:
+ // the pure virtual functions which should be implemented by wxDC
+ virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
+ int style = wxFLOOD_SURFACE) = 0;
+
+ virtual void DoGradientFillLinear(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ wxDirection nDirection = wxEAST);
+
+ virtual void DoGradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ const wxPoint& circleCenter);
+
+ virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0;
+
+ virtual void DoDrawPoint(wxCoord x, wxCoord y) = 0;
+ virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) = 0;
+
+ virtual void DoDrawArc(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord xc, wxCoord yc) = 0;
+ virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height);
+ virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
+ double sa, double ea) = 0;
+
+ virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) = 0;
+ virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height,
+ double radius) = 0;
+ virtual void DoDrawEllipse(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height) = 0;
+
+ virtual void DoCrossHair(wxCoord x, wxCoord y) = 0;
+
+ virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) = 0;
+ virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
+ bool useMask = false) = 0;
+
+ virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) = 0;
+ virtual void DoDrawRotatedText(const wxString& text,
+ wxCoord x, wxCoord y, double angle) = 0;
+
+ virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
+ wxCoord width, wxCoord height,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc,
+ int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) = 0;
+
+ virtual wxBitmap DoGetAsBitmap(const wxRect *WXUNUSED(subrect)) const { return wxNullBitmap; }
+
+ virtual void DoGetSize(int *width, int *height) const = 0;
+ virtual void DoGetSizeMM(int* width, int* height) const = 0;
+
+ virtual void DoDrawLines(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset) = 0;
+ virtual void DoDrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ int fillStyle = wxODDEVEN_RULE) = 0;
+ virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ int fillStyle);
+
+ virtual void DoSetClippingRegionAsRegion(const wxRegion& region) = 0;
+ virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height) = 0;
+
+#if WXWIN_COMPATIBILITY_2_4
+ // this was only for confusing people, use DoGetClippingBox only
+ virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y,
+ wxCoord *w, wxCoord *h)
+ { DoGetClippingBox(x, y, w, h); }
+#endif
+
+ virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
+ wxCoord *w, wxCoord *h) const
+ {
+ if ( x )
+ *x = m_clipX1;
+ if ( y )
+ *y = m_clipY1;
+ if ( w )
+ *w = m_clipX2 - m_clipX1;
+ if ( h )
+ *h = m_clipY2 - m_clipY1;
+ }
+
+ virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const
+ {
+ if ( x ) *x = m_logicalOriginX;
+ if ( y ) *y = m_logicalOriginY;
+ }
+
+ virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const
+ {
+ if ( x ) *x = m_deviceOriginX;
+ if ( y ) *y = m_deviceOriginY;
+ }
+
+ virtual void DoGetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const = 0;
+
+ virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
+
+#if wxUSE_SPLINES
+ 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()
+ {
+ m_clipping = false;
+
+ m_clipX1 = m_clipX2 = m_clipY1 = m_clipY2 = 0;
+ }
+
+ // flags
+ bool m_colour:1;
+ bool m_ok:1;
+ bool m_clipping:1;
+ bool m_isInteractive:1;
+ bool m_isBBoxValid:1;
+
+ // coordinate system variables
+
+ // TODO short descriptions of what exactly they are would be nice...
+
+ wxCoord m_logicalOriginX, m_logicalOriginY;
+ wxCoord m_deviceOriginX, m_deviceOriginY;
+
+ double m_logicalScaleX, m_logicalScaleY;
+ double m_userScaleX, m_userScaleY;
+ double m_scaleX, m_scaleY;
+
+ // Used by SetAxisOrientation() to invert the axes
+ int m_signX, m_signY;
+
+ // bounding and clipping boxes
+ wxCoord m_minX, m_minY, m_maxX, m_maxY;
+ wxCoord m_clipX1, m_clipY1, m_clipX2, m_clipY2;
+
+ int m_logicalFunction;
+ int m_backgroundMode;
+ int m_mappingMode;
+
+ // GDI objects
+ wxPen m_pen;
+ wxBrush m_brush;
+ wxBrush m_backgroundBrush;
+ wxColour m_textForegroundColour;
+ wxColour m_textBackgroundColour;
+ wxFont m_font;
+
+#if wxUSE_PALETTE
+ wxPalette m_palette;
+ bool m_hasCustomPalette;
+#endif // wxUSE_PALETTE
+
+private:
+ DECLARE_NO_COPY_CLASS(wxDCBase)
+ DECLARE_ABSTRACT_CLASS(wxDCBase)
+};
+
+// ----------------------------------------------------------------------------
+// now include the declaration of wxDC class
+// ----------------------------------------------------------------------------
+
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/dc.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/dc.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/dc.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/dc.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/dc.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/dc.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/dc.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/dc.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/dc.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dc.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/dc.h"
+#endif
+
+#if wxUSE_GRAPHICS_CONTEXT
+ #include "wx/dcgraph.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// helper class: you can use it to temporarily change the DC text colour and
+// restore it automatically when the object goes out of scope
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDCTextColourChanger
+{
+public:
+ wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { }
+
+ wxDCTextColourChanger(wxDC& dc, const wxColour& col) : m_dc(dc)
+ {
+ Set(col);
+ }
+
+ ~wxDCTextColourChanger()
+ {
+ if ( m_colFgOld.Ok() )
+ m_dc.SetTextForeground(m_colFgOld);
+ }
+
+ void Set(const wxColour& col)
+ {
+ if ( !m_colFgOld.Ok() )
+ m_colFgOld = m_dc.GetTextForeground();
+ m_dc.SetTextForeground(col);
+ }
+
+private:
+ wxDC& m_dc;
+
+ wxColour m_colFgOld;
+
+ DECLARE_NO_COPY_CLASS(wxDCTextColourChanger)
+};
+
+// ----------------------------------------------------------------------------
+// helper class: you can use it to temporarily change the DC pen and
+// restore it automatically when the object goes out of scope
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDCPenChanger
+{
+public:
+ wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen())
+ {
+ m_dc.SetPen(pen);
+ }
+
+ ~wxDCPenChanger()
+ {
+ if ( m_penOld.Ok() )
+ m_dc.SetPen(m_penOld);
+ }
+
+private:
+ wxDC& m_dc;
+
+ wxPen m_penOld;
+
+ DECLARE_NO_COPY_CLASS(wxDCPenChanger)
+};
+
+// ----------------------------------------------------------------------------
+// helper class: you can use it to temporarily change the DC brush and
+// restore it automatically when the object goes out of scope
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDCBrushChanger
+{
+public:
+ wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush())
+ {
+ m_dc.SetBrush(brush);
+ }
+
+ ~wxDCBrushChanger()
+ {
+ if ( m_brushOld.Ok() )
+ m_dc.SetBrush(m_brushOld);
+ }
+
+private:
+ wxDC& m_dc;
+
+ wxBrush m_brushOld;
+
+ DECLARE_NO_COPY_CLASS(wxDCBrushChanger)
+};
+
+// ----------------------------------------------------------------------------
+// another small helper class: sets the clipping region in its ctor and
+// destroys it in the dtor
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDCClipper
+{
+public:
+ wxDCClipper(wxDC& dc, const wxRegion& r) : m_dc(dc)
+ { dc.SetClippingRegion(r); }
+ wxDCClipper(wxDC& dc, const wxRect& r) : m_dc(dc)
+ { dc.SetClippingRegion(r.x, r.y, r.width, r.height); }
+ wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h) : m_dc(dc)
+ { dc.SetClippingRegion(x, y, w, h); }
+
+ ~wxDCClipper() { m_dc.DestroyClippingRegion(); }
+
+private:
+ wxDC& m_dc;
+
+ DECLARE_NO_COPY_CLASS(wxDCClipper)
+};
+
+#endif // _WX_DC_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dcbuffer.h b/3rdparty/wxWidgets/include/wx/dcbuffer.h
new file mode 100644
index 0000000000..46c28ba536
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcbuffer.h
@@ -0,0 +1,276 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcbuffer.h
+// Purpose: wxBufferedDC class
+// Author: Ron Lee
+// Modified by: Vadim Zeitlin (refactored, added bg preservation)
+// Created: 16/03/02
+// RCS-ID: $Id: dcbuffer.h 44609 2007-03-05 08:58:09Z VZ $
+// Copyright: (c) Ron Lee
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCBUFFER_H_
+#define _WX_DCBUFFER_H_
+
+#include "wx/dcmemory.h"
+#include "wx/dcclient.h"
+#include "wx/window.h"
+
+// Split platforms into two groups - those which have well-working
+// double-buffering by default, and those which do not.
+#if defined(__WXMAC__) || defined(__WXGTK20__) || defined(__WXDFB__)
+ #define wxALWAYS_NATIVE_DOUBLE_BUFFER 1
+#else
+ #define wxALWAYS_NATIVE_DOUBLE_BUFFER 0
+#endif
+
+
+// ----------------------------------------------------------------------------
+// Double buffering helper.
+// ----------------------------------------------------------------------------
+
+// Assumes the buffer bitmap covers the entire scrolled window,
+// and prepares the window DC accordingly
+#define wxBUFFER_VIRTUAL_AREA 0x01
+
+// Assumes the buffer bitmap only covers the client area;
+// does not prepare the window DC
+#define wxBUFFER_CLIENT_AREA 0x02
+
+class WXDLLEXPORT wxBufferedDC : public wxMemoryDC
+{
+public:
+ // Default ctor, must subsequently call Init for two stage construction.
+ wxBufferedDC()
+ : m_dc(NULL),
+ m_buffer(NULL),
+ m_style(0)
+ {
+ }
+
+ // Construct a wxBufferedDC using a user supplied buffer.
+ wxBufferedDC(wxDC *dc,
+ wxBitmap& buffer = wxNullBitmap,
+ int style = wxBUFFER_CLIENT_AREA)
+ : m_dc(NULL), m_buffer(NULL)
+ {
+ Init(dc, buffer, style);
+ }
+
+ // Construct a wxBufferedDC with an internal buffer of 'area'
+ // (where area is usually something like the size of the window
+ // being buffered)
+ wxBufferedDC(wxDC *dc, const wxSize& area, int style = wxBUFFER_CLIENT_AREA)
+ : m_dc(NULL), m_buffer(NULL)
+ {
+ Init(dc, area, style);
+ }
+
+ // The usually desired action in the dtor is to blit the buffer.
+ virtual ~wxBufferedDC()
+ {
+ if ( m_dc )
+ UnMask();
+ }
+
+ // These reimplement the actions of the ctors for two stage creation
+ void Init(wxDC *dc,
+ wxBitmap& buffer = wxNullBitmap,
+ int style = wxBUFFER_CLIENT_AREA)
+ {
+ InitCommon(dc, style);
+
+ m_buffer = &buffer;
+
+ UseBuffer();
+ }
+
+ void Init(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA)
+ {
+ InitCommon(dc, style);
+
+ UseBuffer(area.x, area.y);
+ }
+
+ // Blits the buffer to the dc, and detaches the dc from the buffer (so it
+ // can be effectively used once only).
+ //
+ // Usually called in the dtor or by the dtor of derived classes if the
+ // BufferedDC must blit before the derived class (which may own the dc it's
+ // blitting to) is destroyed.
+ void UnMask()
+ {
+ wxCHECK_RET( m_dc, _T("no underlying wxDC?") );
+ wxASSERT_MSG( m_buffer && m_buffer->IsOk(), _T("invalid backing store") );
+
+ wxCoord x = 0,
+ y = 0;
+
+ if ( m_style & wxBUFFER_CLIENT_AREA )
+ GetDeviceOrigin(&x, &y);
+
+ m_dc->Blit(0, 0, m_buffer->GetWidth(), m_buffer->GetHeight(),
+ this, -x, -y );
+ m_dc = NULL;
+ }
+
+ // Set and get the style
+ void SetStyle(int style) { m_style = style; }
+ int GetStyle() const { return m_style; }
+
+private:
+ // common part of Init()s
+ void InitCommon(wxDC *dc, int style)
+ {
+ wxASSERT_MSG( !m_dc, _T("wxBufferedDC already initialised") );
+
+ m_dc = dc;
+ m_style = style;
+
+ // inherit the same layout direction as the original DC
+ if (dc && dc->IsOk())
+ SetLayoutDirection(dc->GetLayoutDirection());
+ }
+
+ // check that the bitmap is valid and use it
+ void UseBuffer(wxCoord w = -1, wxCoord h = -1);
+
+ // the underlying DC to which we copy everything drawn on this one in
+ // UnMask()
+ //
+ // NB: Without the existence of a wxNullDC, this must be a pointer, else it
+ // could probably be a reference.
+ wxDC *m_dc;
+
+ // the buffer (selected in this DC), initially invalid
+ wxBitmap *m_buffer;
+
+ // the buffering style
+ int m_style;
+
+ DECLARE_DYNAMIC_CLASS(wxBufferedDC)
+ DECLARE_NO_COPY_CLASS(wxBufferedDC)
+};
+
+
+// ----------------------------------------------------------------------------
+// Double buffered PaintDC.
+// ----------------------------------------------------------------------------
+
+// Creates a double buffered wxPaintDC, optionally allowing the
+// user to specify their own buffer to use.
+class WXDLLEXPORT wxBufferedPaintDC : public wxBufferedDC
+{
+public:
+ // If no bitmap is supplied by the user, a temporary one will be created.
+ wxBufferedPaintDC(wxWindow *window, wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA)
+ : m_paintdc(window)
+ {
+ // If we're buffering the virtual window, scale the paint DC as well
+ if (style & wxBUFFER_VIRTUAL_AREA)
+ window->PrepareDC( m_paintdc );
+
+ if( buffer.IsOk() )
+ Init(&m_paintdc, buffer, style);
+ else
+ Init(&m_paintdc, GetBufferedSize(window, style), style);
+ }
+
+ // If no bitmap is supplied by the user, a temporary one will be created.
+ wxBufferedPaintDC(wxWindow *window, int style = wxBUFFER_CLIENT_AREA)
+ : m_paintdc(window)
+ {
+ // If we're using the virtual window, scale the paint DC as well
+ if (style & wxBUFFER_VIRTUAL_AREA)
+ window->PrepareDC( m_paintdc );
+
+ Init(&m_paintdc, GetBufferedSize(window, style), style);
+ }
+
+ // default copy ctor ok.
+
+ virtual ~wxBufferedPaintDC()
+ {
+ // We must UnMask here, else by the time the base class
+ // does it, the PaintDC will have already been destroyed.
+ UnMask();
+ }
+
+protected:
+ // return the size needed by the buffer: this depends on whether we're
+ // buffering just the currently shown part or the total (scrolled) window
+ static wxSize GetBufferedSize(wxWindow *window, int style)
+ {
+ return style & wxBUFFER_VIRTUAL_AREA ? window->GetVirtualSize()
+ : window->GetClientSize();
+ }
+
+private:
+ wxPaintDC m_paintdc;
+
+ DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC)
+ DECLARE_NO_COPY_CLASS(wxBufferedPaintDC)
+};
+
+
+
+//
+// wxAutoBufferedPaintDC is a wxPaintDC in toolkits which have double-
+// buffering by default. Otherwise it is a wxBufferedPaintDC. Thus,
+// you can only expect it work with a simple constructor that
+// accepts single wxWindow* argument.
+//
+#if wxALWAYS_NATIVE_DOUBLE_BUFFER
+ #define wxAutoBufferedPaintDCBase wxPaintDC
+#else
+ #define wxAutoBufferedPaintDCBase wxBufferedPaintDC
+#endif
+
+
+#ifdef __WXDEBUG__
+
+class wxAutoBufferedPaintDC : public wxAutoBufferedPaintDCBase
+{
+public:
+
+ wxAutoBufferedPaintDC(wxWindow* win)
+ : wxAutoBufferedPaintDCBase(win)
+ {
+ TestWinStyle(win);
+ }
+
+ virtual ~wxAutoBufferedPaintDC() { }
+
+private:
+
+ void TestWinStyle(wxWindow* win)
+ {
+ // Help the user to get the double-buffering working properly.
+ wxASSERT_MSG( win->GetBackgroundStyle() == wxBG_STYLE_CUSTOM,
+ wxT("In constructor, you need to call SetBackgroundStyle(wxBG_STYLE_CUSTOM), ")
+ wxT("and also, if needed, paint the background manually in the paint event handler."));
+ }
+
+ DECLARE_NO_COPY_CLASS(wxAutoBufferedPaintDC)
+};
+
+#else // !__WXDEBUG__
+
+// In release builds, just use typedef
+typedef wxAutoBufferedPaintDCBase wxAutoBufferedPaintDC;
+
+#endif
+
+
+// Check if the window is natively double buffered and will return a wxPaintDC
+// if it is, a wxBufferedPaintDC otherwise. It is the caller's responsibility
+// to delete the wxDC pointer when finished with it.
+inline wxDC* wxAutoBufferedPaintDCFactory(wxWindow* window)
+{
+ if ( window->IsDoubleBuffered() )
+ return new wxPaintDC(window);
+ else
+ return new wxBufferedPaintDC(window);
+}
+
+#endif // _WX_DCBUFFER_H_
diff --git a/3rdparty/wxWidgets/include/wx/dcclient.h b/3rdparty/wxWidgets/include/wx/dcclient.h
new file mode 100644
index 0000000000..c8bc31a151
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcclient.h
@@ -0,0 +1,42 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcclient.h
+// Purpose: wxClientDC base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcclient.h 40865 2006-08-27 09:42:42Z VS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCCLIENT_H_BASE_
+#define _WX_DCCLIENT_H_BASE_
+
+#include "wx/defs.h"
+
+#if defined(__WXPALMOS__)
+#include "wx/palmos/dcclient.h"
+#elif defined(__WXMSW__)
+#include "wx/msw/dcclient.h"
+#elif defined(__WXMOTIF__)
+#include "wx/motif/dcclient.h"
+#elif defined(__WXGTK20__)
+#include "wx/gtk/dcclient.h"
+#elif defined(__WXGTK__)
+#include "wx/gtk1/dcclient.h"
+#elif defined(__WXX11__)
+#include "wx/x11/dcclient.h"
+#elif defined(__WXMGL__)
+#include "wx/mgl/dcclient.h"
+#elif defined(__WXDFB__)
+#include "wx/dfb/dcclient.h"
+#elif defined(__WXMAC__)
+#include "wx/mac/dcclient.h"
+#elif defined(__WXCOCOA__)
+#include "wx/cocoa/dcclient.h"
+#elif defined(__WXPM__)
+#include "wx/os2/dcclient.h"
+#endif
+
+#endif
+ // _WX_DCCLIENT_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dcgraph.h b/3rdparty/wxWidgets/include/wx/dcgraph.h
new file mode 100644
index 0000000000..e94996657f
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcgraph.h
@@ -0,0 +1,190 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/graphdc.h
+// Purpose: graphics context device bridge header
+// Author: Stefan Csomor
+// Modified by:
+// Created:
+// Copyright: (c) Stefan Csomor
+// RCS-ID: $Id: dcgraph.h 53390 2008-04-28 04:19:15Z KO $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GRAPHICS_DC_H_
+#define _WX_GRAPHICS_DC_H_
+
+#if wxUSE_GRAPHICS_CONTEXT
+
+#include "wx/geometry.h"
+#include "wx/dynarray.h"
+#include "wx/graphics.h"
+
+class WXDLLEXPORT wxWindowDC;
+
+#ifdef __WXMAC__
+#define wxGCDC wxDC
+#endif
+
+class WXDLLEXPORT wxGCDC:
+#ifdef __WXMAC__
+ public wxDCBase
+#else
+ public wxDC
+#endif
+{
+ DECLARE_DYNAMIC_CLASS(wxGCDC)
+ DECLARE_NO_COPY_CLASS(wxGCDC)
+
+public:
+ wxGCDC(const wxWindowDC& dc);
+#ifdef __WXMSW__
+ wxGCDC( const wxMemoryDC& dc);
+#endif
+ wxGCDC();
+ virtual ~wxGCDC();
+
+ void Init();
+
+
+ // implement base class pure virtuals
+ // ----------------------------------
+
+ virtual void Clear();
+
+ virtual bool StartDoc( const wxString& message );
+ virtual void EndDoc();
+
+ virtual void StartPage();
+ virtual void EndPage();
+
+ // to be virtualized on next major
+ // flushing the content of this dc immediately onto screen
+ void Flush();
+
+ virtual void SetFont(const wxFont& font);
+ virtual void SetPen(const wxPen& pen);
+ virtual void SetBrush(const wxBrush& brush);
+ virtual void SetBackground(const wxBrush& brush);
+ virtual void SetBackgroundMode(int mode);
+ virtual void SetPalette(const wxPalette& palette);
+
+ virtual void DestroyClippingRegion();
+
+ virtual wxCoord GetCharHeight() const;
+ virtual wxCoord GetCharWidth() const;
+
+ virtual bool CanDrawBitmap() const;
+ virtual bool CanGetTextExtent() const;
+ virtual int GetDepth() const;
+ virtual wxSize GetPPI() const;
+
+ virtual void SetMapMode(int mode);
+ virtual void SetUserScale(double x, double y);
+
+ virtual void SetLogicalScale(double x, double y);
+ virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
+ virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
+ virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
+ virtual void SetLogicalFunction(int function);
+
+ virtual void SetTextForeground(const wxColour& colour);
+ virtual void SetTextBackground(const wxColour& colour);
+
+ virtual void ComputeScaleAndOrigin();
+
+ wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
+ virtual void SetGraphicsContext( wxGraphicsContext* ctx );
+
+protected:
+ // the true implementations
+ virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
+ int style = wxFLOOD_SURFACE);
+
+ virtual void DoGradientFillLinear(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ wxDirection nDirection = wxEAST);
+
+ virtual void DoGradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ const wxPoint& circleCenter);
+
+ virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
+
+ virtual void DoDrawPoint(wxCoord x, wxCoord y);
+
+#if wxUSE_SPLINES
+ virtual void DoDrawSpline(wxList *points);
+#endif
+
+ virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
+
+ virtual void DoDrawArc(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord xc, wxCoord yc);
+
+ virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height);
+
+ virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
+ double sa, double ea);
+
+ virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height,
+ double radius);
+ virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+
+ virtual void DoCrossHair(wxCoord x, wxCoord y);
+
+ virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
+ virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
+ bool useMask = false);
+
+ virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
+ virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
+ double angle);
+
+ virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc,
+ int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
+
+ virtual void DoGetSize(int *,int *) const;
+ virtual void DoGetSizeMM(int* width, int* height) const;
+
+ virtual void DoDrawLines(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset);
+ virtual void DoDrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ int fillStyle = wxODDEVEN_RULE);
+ virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ int fillStyle);
+
+ virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
+ virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height);
+
+ virtual void DoGetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const;
+
+ virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
+
+protected:
+ // scaling variables
+ bool m_logicalFunctionSupported;
+ double m_mm_to_pix_x, m_mm_to_pix_y;
+ wxGraphicsMatrix m_matrixOriginal;
+ wxGraphicsMatrix m_matrixCurrent;
+
+ double m_formerScaleX, m_formerScaleY;
+
+ wxGraphicsContext* m_graphicContext;
+};
+
+#endif
+
+#endif // _WX_GRAPHICS_DC_H_
diff --git a/3rdparty/wxWidgets/include/wx/dcmemory.h b/3rdparty/wxWidgets/include/wx/dcmemory.h
new file mode 100644
index 0000000000..68d4355ac9
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcmemory.h
@@ -0,0 +1,76 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcmemory.h
+// Purpose: wxMemoryDC base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcmemory.h 43843 2006-12-07 05:44:44Z PC $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCMEMORY_H_BASE_
+#define _WX_DCMEMORY_H_BASE_
+
+#include "wx/bitmap.h"
+
+// NOTE: different native implementations of wxMemoryDC will derive from
+// different wxDC classes (wxPaintDC, wxWindowDC, etc), so that
+// we cannot derive wxMemoryDCBase from wxDC and then use it as the
+// only base class for native impl of wxMemoryDC...
+class WXDLLEXPORT wxMemoryDCBase
+{
+public:
+ wxMemoryDCBase() { }
+
+ // avoid warnings about having virtual functions but non virtual dtor
+ virtual ~wxMemoryDCBase() { }
+
+ // select the given bitmap to draw on it
+ void SelectObject(wxBitmap& bmp)
+ {
+ // make sure that the given wxBitmap is not sharing its data with other
+ // wxBitmap instances as its contents will be modified by any drawing
+ // operation done on this DC
+ if (bmp.IsOk())
+ bmp.UnShare();
+
+ DoSelect(bmp);
+ }
+
+ // select the given bitmap for read-only
+ virtual void SelectObjectAsSource(const wxBitmap& bmp)
+ {
+ DoSelect(bmp);
+ }
+
+protected:
+ virtual void DoSelect(const wxBitmap& bmp) = 0;
+};
+
+#if defined(__WXPALMOS__)
+#include "wx/palmos/dcmemory.h"
+#elif defined(__WXMSW__)
+#include "wx/msw/dcmemory.h"
+#elif defined(__WXMOTIF__)
+#include "wx/motif/dcmemory.h"
+#elif defined(__WXGTK20__)
+#include "wx/gtk/dcmemory.h"
+#elif defined(__WXGTK__)
+#include "wx/gtk1/dcmemory.h"
+#elif defined(__WXX11__)
+#include "wx/x11/dcmemory.h"
+#elif defined(__WXMGL__)
+#include "wx/mgl/dcmemory.h"
+#elif defined(__WXDFB__)
+#include "wx/dfb/dcmemory.h"
+#elif defined(__WXMAC__)
+#include "wx/mac/dcmemory.h"
+#elif defined(__WXCOCOA__)
+#include "wx/cocoa/dcmemory.h"
+#elif defined(__WXPM__)
+#include "wx/os2/dcmemory.h"
+#endif
+
+#endif
+ // _WX_DCMEMORY_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dcmirror.h b/3rdparty/wxWidgets/include/wx/dcmirror.h
new file mode 100644
index 0000000000..bc15a398e4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcmirror.h
@@ -0,0 +1,287 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcmirror.h
+// Purpose: wxMirrorDC class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 21.07.2003
+// RCS-ID: $Id: dcmirror.h 41751 2006-10-08 21:56:55Z VZ $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCMIRROR_H_
+#define _WX_DCMIRROR_H_
+
+#include "wx/dc.h"
+
+// ----------------------------------------------------------------------------
+// wxMirrorDC allows to write the same code for horz/vertical layout
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMirrorDC : public wxDC
+{
+public:
+ // constructs a mirror DC associated with the given real DC
+ //
+ // if mirror parameter is true, all vertical and horizontal coordinates are
+ // exchanged, otherwise this class behaves in exactly the same way as a
+ // plain DC
+ //
+ // the cast to wxMirrorDC is a dirty hack done to allow us to call the
+ // protected methods of wxDCBase directly in our code below, without it it
+ // would be impossible (this is correct from C++ point of view but doesn't
+ // make any sense in this particular situation)
+ wxMirrorDC(wxDC& dc, bool mirror) : m_dc((wxMirrorDC&)dc)
+ { m_mirror = mirror; }
+
+ // wxDCBase operations
+ virtual void Clear() { m_dc.Clear(); }
+ virtual void SetFont(const wxFont& font) { m_dc.SetFont(font); }
+ virtual void SetPen(const wxPen& pen) { m_dc.SetPen(pen); }
+ virtual void SetBrush(const wxBrush& brush) { m_dc.SetBrush(brush); }
+ virtual void SetBackground(const wxBrush& brush)
+ { m_dc.SetBackground(brush); }
+ virtual void SetBackgroundMode(int mode) { m_dc.SetBackgroundMode(mode); }
+#if wxUSE_PALETTE
+ virtual void SetPalette(const wxPalette& palette)
+ { m_dc.SetPalette(palette); }
+#endif // wxUSE_PALETTE
+ virtual void DestroyClippingRegion() { m_dc.DestroyClippingRegion(); }
+ virtual wxCoord GetCharHeight() const { return m_dc.GetCharHeight(); }
+ virtual wxCoord GetCharWidth() const { return m_dc.GetCharWidth(); }
+ virtual bool CanDrawBitmap() const { return m_dc.CanDrawBitmap(); }
+ virtual bool CanGetTextExtent() const { return m_dc.CanGetTextExtent(); }
+ virtual int GetDepth() const { return m_dc.GetDepth(); }
+ virtual wxSize GetPPI() const { return m_dc.GetPPI(); }
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const { return m_dc.Ok(); }
+ virtual void SetMapMode(int mode) { m_dc.SetMapMode(mode); }
+ virtual void SetUserScale(double x, double y)
+ { m_dc.SetUserScale(GetX(x, y), GetY(x, y)); }
+ virtual void SetLogicalOrigin(wxCoord x, wxCoord y)
+ { m_dc.SetLogicalOrigin(GetX(x, y), GetY(x, y)); }
+ virtual void SetDeviceOrigin(wxCoord x, wxCoord y)
+ { m_dc.SetDeviceOrigin(GetX(x, y), GetY(x, y)); }
+ virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
+ { m_dc.SetAxisOrientation(GetX(xLeftRight, yBottomUp),
+ GetY(xLeftRight, yBottomUp)); }
+ virtual void SetLogicalFunction(int function)
+ { m_dc.SetLogicalFunction(function); }
+
+ // helper functions which may be useful for the users of this class
+ wxSize Reflect(const wxSize& sizeOrig)
+ {
+ return m_mirror ? wxSize(sizeOrig.y, sizeOrig.x) : sizeOrig;
+ }
+
+protected:
+ // returns x and y if not mirroring or y and x if mirroring
+ wxCoord GetX(wxCoord x, wxCoord y) const { return m_mirror ? y : x; }
+ wxCoord GetY(wxCoord x, wxCoord y) const { return m_mirror ? x : y; }
+ double GetX(double x, double y) const { return m_mirror ? y : x; }
+ double GetY(double x, double y) const { return m_mirror ? x : y; }
+ bool GetX(bool x, bool y) const { return m_mirror ? y : x; }
+ bool GetY(bool x, bool y) const { return m_mirror ? x : y; }
+
+ // same thing but for pointers
+ wxCoord *GetX(wxCoord *x, wxCoord *y) const { return m_mirror ? y : x; }
+ wxCoord *GetY(wxCoord *x, wxCoord *y) const { return m_mirror ? x : y; }
+
+ // exchange x and y unconditionally
+ static void Swap(wxCoord& x, wxCoord& y)
+ {
+ wxCoord t = x;
+ x = y;
+ y = t;
+ }
+
+ // exchange x and y components of all points in the array if necessary
+ void Mirror(int n, wxPoint points[]) const
+ {
+ if ( m_mirror )
+ {
+ for ( int i = 0; i < n; i++ )
+ {
+ Swap(points[i].x, points[i].y);
+ }
+ }
+ }
+
+
+ // wxDCBase functions
+ virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
+ int style = wxFLOOD_SURFACE)
+ {
+ return m_dc.DoFloodFill(GetX(x, y), GetY(x, y), col, style);
+ }
+
+ virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
+ {
+ return m_dc.DoGetPixel(GetX(x, y), GetY(x, y), col);
+ }
+
+
+ virtual void DoDrawPoint(wxCoord x, wxCoord y)
+ {
+ m_dc.DoDrawPoint(GetX(x, y), GetY(x, y));
+ }
+
+ virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
+ {
+ m_dc.DoDrawLine(GetX(x1, y1), GetY(x1, y1), GetX(x2, y2), GetY(x2, y2));
+ }
+
+ virtual void DoDrawArc(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord xc, wxCoord yc)
+ {
+ wxFAIL_MSG( _T("this is probably wrong") );
+
+ m_dc.DoDrawArc(GetX(x1, y1), GetY(x1, y1),
+ GetX(x2, y2), GetY(x2, y2),
+ xc, yc);
+ }
+
+ virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
+ wxCoord w, wxCoord h)
+ {
+ m_dc.DoDrawCheckMark(GetX(x, y), GetY(x, y),
+ GetX(w, h), GetY(w, h));
+ }
+
+ virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
+ double sa, double ea)
+ {
+ wxFAIL_MSG( _T("this is probably wrong") );
+
+ m_dc.DoDrawEllipticArc(GetX(x, y), GetY(x, y),
+ GetX(w, h), GetY(w, h),
+ sa, ea);
+ }
+
+ virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
+ {
+ m_dc.DoDrawRectangle(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h));
+ }
+
+ virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
+ wxCoord w, wxCoord h,
+ double radius)
+ {
+ m_dc.DoDrawRoundedRectangle(GetX(x, y), GetY(x, y),
+ GetX(w, h), GetY(w, h),
+ radius);
+ }
+
+ virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
+ {
+ m_dc.DoDrawEllipse(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h));
+ }
+
+ virtual void DoCrossHair(wxCoord x, wxCoord y)
+ {
+ m_dc.DoCrossHair(GetX(x, y), GetY(x, y));
+ }
+
+ virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
+ {
+ m_dc.DoDrawIcon(icon, GetX(x, y), GetY(x, y));
+ }
+
+ virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
+ bool useMask = false)
+ {
+ m_dc.DoDrawBitmap(bmp, GetX(x, y), GetY(x, y), useMask);
+ }
+
+ virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y)
+ {
+ // this is never mirrored
+ m_dc.DoDrawText(text, x, y);
+ }
+
+ virtual void DoDrawRotatedText(const wxString& text,
+ wxCoord x, wxCoord y, double angle)
+ {
+ // this is never mirrored
+ m_dc.DoDrawRotatedText(text, x, y, angle);
+ }
+
+ virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
+ wxCoord w, wxCoord h,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc,
+ int rop = wxCOPY, bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
+ {
+ return m_dc.DoBlit(GetX(xdest, ydest), GetY(xdest, ydest),
+ GetX(w, h), GetY(w, h),
+ source, GetX(xsrc, ysrc), GetY(xsrc, ysrc),
+ rop, useMask,
+ GetX(xsrcMask, ysrcMask), GetX(xsrcMask, ysrcMask));
+ }
+
+ virtual void DoGetSize(int *w, int *h) const
+ {
+ m_dc.DoGetSize(GetX(w, h), GetY(w, h));
+ }
+
+ virtual void DoGetSizeMM(int *w, int *h) const
+ {
+ m_dc.DoGetSizeMM(GetX(w, h), GetY(w, h));
+ }
+
+ virtual void DoDrawLines(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset)
+ {
+ Mirror(n, points);
+
+ m_dc.DoDrawLines(n, points,
+ GetX(xoffset, yoffset), GetY(xoffset, yoffset));
+
+ Mirror(n, points);
+ }
+
+ virtual void DoDrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ int fillStyle = wxODDEVEN_RULE)
+ {
+ Mirror(n, points);
+
+ m_dc.DoDrawPolygon(n, points,
+ GetX(xoffset, yoffset), GetY(xoffset, yoffset),
+ fillStyle);
+
+ Mirror(n, points);
+ }
+
+ virtual void DoSetClippingRegionAsRegion(const wxRegion& WXUNUSED(region))
+ {
+ wxFAIL_MSG( _T("not implemented") );
+ }
+
+ virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
+ wxCoord w, wxCoord h)
+ {
+ m_dc.DoSetClippingRegion(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h));
+ }
+
+ virtual void DoGetTextExtent(const wxString& string,
+ wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const
+ {
+ // never mirrored
+ m_dc.DoGetTextExtent(string, x, y, descent, externalLeading, theFont);
+ }
+
+private:
+ wxMirrorDC& m_dc;
+
+ bool m_mirror;
+
+ DECLARE_NO_COPY_CLASS(wxMirrorDC)
+};
+
+#endif // _WX_DCMIRROR_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/dcprint.h b/3rdparty/wxWidgets/include/wx/dcprint.h
new file mode 100644
index 0000000000..5a40911d18
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcprint.h
@@ -0,0 +1,33 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcprint.h
+// Purpose: wxPrinterDC base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcprint.h 41240 2006-09-15 16:45:48Z PC $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCPRINT_H_BASE_
+#define _WX_DCPRINT_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_PRINTING_ARCHITECTURE
+
+#if defined(__WXPALMOS__)
+#include "wx/palmos/dcprint.h"
+#elif defined(__WXMSW__)
+#include "wx/msw/dcprint.h"
+#endif
+#if defined(__WXPM__)
+#include "wx/os2/dcprint.h"
+#endif
+#if defined(__WXMAC__)
+#include "wx/mac/dcprint.h"
+#endif
+
+#endif // wxUSE_PRINTING_ARCHITECTURE
+#endif
+ // _WX_DCPRINT_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dcps.h b/3rdparty/wxWidgets/include/wx/dcps.h
new file mode 100644
index 0000000000..2615d33243
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcps.h
@@ -0,0 +1,18 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcps.h
+// Purpose: wxPostScriptDC base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcps.h 33948 2005-05-04 18:57:50Z JS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCPS_H_BASE_
+#define _WX_DCPS_H_BASE_
+
+#include "wx/generic/dcpsg.h"
+
+#endif
+
diff --git a/3rdparty/wxWidgets/include/wx/dcscreen.h b/3rdparty/wxWidgets/include/wx/dcscreen.h
new file mode 100644
index 0000000000..7e59787efa
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dcscreen.h
@@ -0,0 +1,42 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dcscreen.h
+// Purpose: wxScreenDC base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcscreen.h 40865 2006-08-27 09:42:42Z VS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCSCREEN_H_BASE_
+#define _WX_DCSCREEN_H_BASE_
+
+#include "wx/defs.h"
+
+#if defined(__WXPALMOS__)
+#include "wx/palmos/dcscreen.h"
+#elif defined(__WXMSW__)
+#include "wx/msw/dcscreen.h"
+#elif defined(__WXMOTIF__)
+#include "wx/motif/dcscreen.h"
+#elif defined(__WXGTK20__)
+#include "wx/gtk/dcscreen.h"
+#elif defined(__WXGTK__)
+#include "wx/gtk1/dcscreen.h"
+#elif defined(__WXX11__)
+#include "wx/x11/dcscreen.h"
+#elif defined(__WXMGL__)
+#include "wx/mgl/dcscreen.h"
+#elif defined(__WXDFB__)
+#include "wx/dfb/dcscreen.h"
+#elif defined(__WXMAC__)
+#include "wx/mac/dcscreen.h"
+#elif defined(__WXCOCOA__)
+#include "wx/cocoa/dcscreen.h"
+#elif defined(__WXPM__)
+#include "wx/os2/dcscreen.h"
+#endif
+
+#endif
+ // _WX_DCSCREEN_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dde.h b/3rdparty/wxWidgets/include/wx/dde.h
new file mode 100644
index 0000000000..402a6ec70d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dde.h
@@ -0,0 +1,32 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dde.h
+// Purpose: DDE base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dde.h 53135 2008-04-12 02:31:04Z VZ $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DDE_H_BASE_
+#define _WX_DDE_H_BASE_
+
+#include "wx/list.h"
+
+class WXDLLIMPEXP_FWD_BASE wxDDEClient;
+class WXDLLIMPEXP_FWD_BASE wxDDEServer;
+class WXDLLIMPEXP_FWD_BASE wxDDEConnection;
+
+WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE);
+
+#if defined(__WXMSW__)
+ #include "wx/msw/dde.h"
+#else
+ #error DDE is only supported on MSW
+#endif
+
+#endif
+ // _WX_DDE_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/debug.h b/3rdparty/wxWidgets/include/wx/debug.h
new file mode 100644
index 0000000000..fd389d516c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/debug.h
@@ -0,0 +1,316 @@
+/**
+* Name: wx/debug.h
+* Purpose: Misc debug functions and macros
+* Author: Vadim Zeitlin
+* Modified by: Ryan Norton (Converted to C)
+* Created: 29/01/98
+* RCS-ID: $Id: debug.h 54492 2008-07-05 17:54:03Z SN $
+* Copyright: (c) 1998 Vadim Zeitlin
+* Licence: wxWindows licence
+*/
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+#ifndef _WX_DEBUG_H_
+#define _WX_DEBUG_H_
+
+#ifndef __WXWINCE__
+#include
+#endif
+#include /* for CHAR_BIT used below */
+
+#include "wx/wxchar.h" /* for __TFILE__ and wxChar */
+
+/* ---------------------------------------------------------------------------- */
+/* Defines controlling the debugging macros */
+/* ---------------------------------------------------------------------------- */
+
+/* if _DEBUG is defined (MS VC++ and others use it in debug builds), define */
+/* __WXDEBUG__ too */
+#ifdef _DEBUG
+ #ifndef __WXDEBUG__
+ #define __WXDEBUG__
+ #endif /* !__WXDEBUG__ */
+#endif /* _DEBUG */
+
+/* if NDEBUG is defined ( uses it), undef __WXDEBUG__ and WXDEBUG */
+#ifdef NDEBUG
+ #undef __WXDEBUG__
+ #undef WXDEBUG
+#endif /* NDEBUG */
+
+/* if __WXDEBUG__ is defined, make sure that WXDEBUG is defined and >= 1 */
+#ifdef __WXDEBUG__
+ #if !defined(WXDEBUG) || !WXDEBUG
+ #undef WXDEBUG
+ #define WXDEBUG 1
+ #endif /* !WXDEBUG */
+#endif /* __WXDEBUG__ */
+
+#ifndef __WXFUNCTION__
+ /* TODO: add more compilers supporting __FUNCTION__ */
+ #if defined(__DMC__)
+ /*
+ __FUNCTION__ happens to be not defined within class members
+ http://www.digitalmars.com/drn-bin/wwwnews?c%2B%2B.beta/485
+ */
+ #define __WXFUNCTION__ (NULL)
+ #elif defined(__GNUC__) || \
+ (defined(_MSC_VER) && _MSC_VER >= 1300) || \
+ defined(__FUNCTION__)
+ #define __WXFUNCTION__ __FUNCTION__
+ #else
+ /* still define __WXFUNCTION__ to avoid #ifdefs elsewhere */
+ #define __WXFUNCTION__ (NULL)
+ #endif
+#endif /* __WXFUNCTION__ already defined */
+
+/* ---------------------------------------------------------------------------- */
+/* Debugging macros */
+/* */
+/* All debugging macros rely on ASSERT() which in turn calls the user-defined */
+/* OnAssert() function. To keep things simple, it's called even when the */
+/* expression is true (i.e. everything is ok) and by default does nothing: just */
+/* returns the same value back. But if you redefine it to do something more sexy */
+/* (popping up a message box in your favourite GUI, sending you e-mail or */
+/* whatever) it will affect all ASSERTs, FAILs and CHECKs in your code. */
+/* */
+/* Warning: if you don't like advice on programming style, don't read */
+/* further! ;-) */
+/* */
+/* Extensive use of these macros is recommended! Remember that ASSERTs are */
+/* disabled in final build (without __WXDEBUG__ defined), so they add strictly */
+/* nothing to your program's code. On the other hand, CHECK macros do stay */
+/* even in release builds, but in general are not much of a burden, while */
+/* a judicious use of them might increase your program's stability. */
+/* ---------------------------------------------------------------------------- */
+
+/* Macros which are completely disabled in 'release' mode */
+/* */
+/* NB: these functions are implemented in src/common/appcmn.cpp */
+#if defined(__cplusplus) && defined(__WXDEBUG__)
+ /*
+ This function is called whenever one of debugging macros fails (i.e.
+ condition is false in an assertion). To customize its behaviour, override
+ wxApp::OnAssert().
+
+ Parameters:
+ szFile and nLine - file name and line number of the ASSERT
+ szFunc - function name of the ASSERT, may be NULL (NB: ASCII)
+ szCond - text form of the condition which failed
+ szMsg - optional message explaining the reason
+ */
+ extern void WXDLLIMPEXP_BASE wxOnAssert(const wxChar *szFile,
+ int nLine,
+ const char *szFunc,
+ const wxChar *szCond,
+ const wxChar *szMsg = NULL);
+
+ /* call this function to break into the debugger unconditionally (assuming */
+ /* the program is running under debugger, of course) */
+ extern void WXDLLIMPEXP_BASE wxTrap();
+
+ /* generic assert macro */
+ #define wxASSERT(cond) wxASSERT_MSG(cond, NULL)
+
+
+ /* assert with additional message explaining its cause */
+
+ /* compilers can give a warning (such as "possible unwanted ;") when using */
+ /* the default definition of wxASSERT_MSG so we provide an alternative */
+ #if defined(__MWERKS__)
+ #define wxASSERT_MSG(cond, msg) \
+ if ( cond ) \
+ {} \
+ else \
+ wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg)
+ #else
+ #define wxASSERT_MSG(cond, msg) \
+ if ( cond ) \
+ ; \
+ else \
+ wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg)
+ #endif
+
+ /* special form of assert: always triggers it (in debug mode) */
+ #define wxFAIL wxFAIL_MSG(NULL)
+
+ /* FAIL with some message */
+ #define wxFAIL_MSG(msg) wxFAIL_COND_MSG("wxAssertFailure", msg)
+
+ /* FAIL with some message and a condition */
+ #define wxFAIL_COND_MSG(cond, msg) \
+ wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(cond), msg)
+
+ /* An assert helper used to avoid warning when testing constant expressions, */
+ /* i.e. wxASSERT( sizeof(int) == 4 ) can generate a compiler warning about */
+ /* expression being always true, but not using */
+ /* wxASSERT( wxAssertIsEqual(sizeof(int), 4) ) */
+ /* */
+ /* NB: this is made obsolete by wxCOMPILE_TIME_ASSERT() and should no */
+ /* longer be used. */
+ extern bool WXDLLIMPEXP_BASE wxAssertIsEqual(int x, int y);
+#else
+ #define wxTrap()
+
+ /* nothing to do in release mode (hopefully at this moment there are */
+ /* no more bugs ;-) */
+ #define wxASSERT(cond)
+ #define wxASSERT_MSG(cond, msg)
+ #define wxFAIL
+ #define wxFAIL_MSG(msg)
+ #define wxFAIL_COND_MSG(cond, msg)
+#endif /* __WXDEBUG__ */
+
+#ifdef __cplusplus
+ /* Use of wxFalse instead of false suppresses compiler warnings about testing */
+ /* constant expression */
+ extern WXDLLIMPEXP_DATA_BASE(const bool) wxFalse;
+#endif
+
+#define wxAssertFailure wxFalse
+
+/* NB: the following macros also work in release mode! */
+
+/*
+ These macros must be used only in invalid situation: for example, an
+ invalid parameter (e.g. a NULL pointer) is passed to a function. Instead of
+ dereferencing it and causing core dump the function might try using
+ CHECK( p != NULL ) or CHECK( p != NULL, return LogError("p is NULL!!") )
+*/
+
+/* check that expression is true, "return" if not (also FAILs in debug mode) */
+#define wxCHECK(cond, rc) wxCHECK_MSG(cond, rc, NULL)
+
+/* as wxCHECK but with a message explaining why we fail */
+#define wxCHECK_MSG(cond, rc, msg) wxCHECK2_MSG(cond, return rc, msg)
+
+/* check that expression is true, perform op if not */
+#define wxCHECK2(cond, op) wxCHECK2_MSG(cond, op, NULL)
+
+/* 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) \
+ if ( cond ) \
+ {} \
+ else \
+ { \
+ wxFAIL_COND_MSG(#cond, msg); \
+ op; \
+ } \
+ struct wxDummyCheckStruct /* just to force a semicolon */
+#else
+ #define wxCHECK2_MSG(cond, op, msg) \
+ if ( cond ) \
+ ; \
+ else \
+ { \
+ wxFAIL_COND_MSG(#cond, msg); \
+ op; \
+ } \
+ wxFORCE_SEMICOLON /* just to force a semicolon */
+#endif
+
+/* special form of wxCHECK2: as wxCHECK, but for use in void functions */
+/* */
+/* NB: there is only one form (with msg parameter) and it's intentional: */
+/* there is no other way to tell the caller what exactly went wrong */
+/* from the void function (of course, the function shouldn't be void */
+/* to begin with...) */
+#define wxCHECK_RET(cond, msg) wxCHECK2_MSG(cond, return, msg)
+
+/* ---------------------------------------------------------------------------- */
+/* Compile time asserts */
+/* */
+/* Unlike the normal assert and related macros above which are checked during */
+/* the program tun-time the macros below will result in a compilation error if */
+/* the condition they check is false. This is usually used to check the */
+/* expressions containing sizeof()s which cannot be tested with the */
+/* preprocessor. If you can use the #if's, do use them as you can give a more */
+/* detailed error message then. */
+/* ---------------------------------------------------------------------------- */
+
+/*
+ How this works (you don't have to understand it to be able to use the
+ macros): we rely on the fact that it is invalid to define a named bit field
+ in a struct of width 0. All the rest are just the hacks to minimize the
+ possibility of the compiler warnings when compiling this macro: in
+ particular, this is why we define a struct and not an object (which would
+ result in a warning about unused variable) and a named struct (otherwise we'd
+ get a warning about an unnamed struct not used to define an object!).
+ */
+
+#define wxMAKE_UNIQUE_ASSERT_NAME wxMAKE_UNIQUE_NAME(wxAssert_)
+
+/*
+ The second argument of this macro must be a valid C++ identifier and not a
+ string. I.e. you should use it like this:
+
+ wxCOMPILE_TIME_ASSERT( sizeof(int) >= 2, YourIntsAreTooSmall );
+
+ It may be used both within a function and in the global scope.
+*/
+#if defined(__WATCOMC__) && defined(__cplusplus)
+ /* avoid "unused symbol" warning */
+ #define wxCOMPILE_TIME_ASSERT(expr, msg) \
+ class wxMAKE_UNIQUE_ASSERT_NAME { \
+ unsigned int msg: expr; \
+ wxMAKE_UNIQUE_ASSERT_NAME() { wxUnusedVar(msg); } \
+ }
+#else
+ #define wxCOMPILE_TIME_ASSERT(expr, msg) \
+ struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
+#endif
+
+/*
+ When using VC++ 6 with "Edit and Continue" on, the compiler completely
+ mishandles __LINE__ and so wxCOMPILE_TIME_ASSERT() doesn't work, provide a
+ way to make "unique" assert names by specifying a unique prefix explicitly
+ */
+#define wxMAKE_UNIQUE_ASSERT_NAME2(text) wxCONCAT(wxAssert_, text)
+
+#define wxCOMPILE_TIME_ASSERT2(expr, msg, text) \
+ struct wxMAKE_UNIQUE_ASSERT_NAME2(text) { unsigned int msg: expr; }
+
+/* helpers for wxCOMPILE_TIME_ASSERT below, for private use only */
+#define wxMAKE_BITSIZE_MSG(type, size) type ## SmallerThan ## size ## Bits
+
+/* a special case of compile time assert: check that the size of the given type */
+/* is at least the given number of bits */
+#define wxASSERT_MIN_BITSIZE(type, size) \
+ wxCOMPILE_TIME_ASSERT(sizeof(type) * CHAR_BIT >= size, \
+ wxMAKE_BITSIZE_MSG(type, size))
+
+/* ---------------------------------------------------------------------------- */
+/* other miscellaneous debugger-related functions */
+/* ---------------------------------------------------------------------------- */
+
+/*
+ Return true if we're running under debugger.
+
+ Currently this only really works under Win32 and Mac in CodeWarrior builds,
+ it always returns false in other cases.
+ */
+#ifdef __cplusplus
+ /* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
+ #if defined(__WXMAC__) || defined(__WIN32__)
+ extern bool WXDLLIMPEXP_BASE wxIsDebuggerRunning();
+ #else /* !Mac */
+ inline bool wxIsDebuggerRunning() { return false; }
+ #endif /* Mac/!Mac */
+#endif /* __cplusplus */
+
+#endif /* _WX_DEBUG_H_ */
diff --git a/3rdparty/wxWidgets/include/wx/debugrpt.h b/3rdparty/wxWidgets/include/wx/debugrpt.h
new file mode 100644
index 0000000000..a50f1cbd08
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/debugrpt.h
@@ -0,0 +1,235 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/debugrpt.h
+// Purpose: declaration of wxDebugReport class
+// Author: Vadim Zeitlin
+// Created: 2005-01-17
+// RCS-ID: $Id: debugrpt.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) 2005 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DEBUGRPT_H_
+#define _WX_DEBUGRPT_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_DEBUGREPORT && wxUSE_XML
+
+#include "wx/string.h"
+#include "wx/arrstr.h"
+
+class WXDLLIMPEXP_FWD_XML wxXmlNode;
+
+// ----------------------------------------------------------------------------
+// wxDebugReport: generate a debug report, processing is done in derived class
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_QA wxDebugReport
+{
+public:
+ // this is used for the functions which may report either the current state
+ // or the state during the last (fatal) exception
+ enum Context { Context_Current, Context_Exception };
+
+
+ // ctor creates a temporary directory where we create the files which will
+ // be included in the report, use IsOk() to check for errors
+ wxDebugReport();
+
+ // dtor normally destroys the temporary directory created in the ctor (with
+ // all the files it contains), call Reset() to prevent this from happening
+ virtual ~wxDebugReport();
+
+ // return the name of the directory used for this report
+ const wxString& GetDirectory() const { return m_dir; }
+
+ // return true if the object was successfully initialized
+ bool IsOk() const { return !GetDirectory().empty(); }
+
+ // reset the directory name we use, the object can't be used any more after
+ // this as it becomes invalid/uninitialized
+ void Reset() { m_dir.clear(); }
+
+
+ // add another file to the report: the file must already exist, its name
+ // can be either absolute in which case it is copied to the debug report
+ // directory or relative to GetDirectory()
+ //
+ // description is shown to the user in the report summary
+ virtual void AddFile(const wxString& filename, const wxString& description);
+
+ // convenience function: write the given text to a file with the given name
+ // and then add it to the report (the difference with AddFile() is that the
+ // file will be created by this function and doesn't have to already exist)
+ bool AddText(const wxString& filename,
+ const wxString& text,
+ const wxString& description);
+
+#if wxUSE_STACKWALKER
+ // add an XML file containing the current or exception context and the
+ // stack trace
+ bool AddCurrentContext() { return AddContext(Context_Current); }
+ bool AddExceptionContext() { return AddContext(Context_Exception); }
+ virtual bool AddContext(Context ctx);
+#endif
+
+#if wxUSE_CRASHREPORT
+ // add a file with crash report
+ bool AddCurrentDump() { return AddDump(Context_Current); }
+ bool AddExceptionDump() { return AddDump(Context_Exception); }
+ virtual bool AddDump(Context ctx);
+#endif // wxUSE_CRASHREPORT
+
+ // add all available information to the report
+ void AddAll(Context context = Context_Exception);
+
+
+ // process this report: the base class simply notifies the user that the
+ // report has been generated, this is usually not enough -- instead you
+ // should override this method to do something more useful to you
+ bool Process();
+
+ // get the name used as base name for various files, by default
+ // wxApp::GetName()
+ virtual wxString GetReportName() const;
+
+ // get the files in this report
+ size_t GetFilesCount() const { return m_files.GetCount(); }
+ bool GetFile(size_t n, wxString *name, wxString *desc) const;
+
+ // remove the file from report: this is used by wxDebugReportPreview to
+ // allow the user to remove files potentially containing private
+ // information from the report
+ void RemoveFile(const wxString& name);
+
+protected:
+#if wxUSE_STACKWALKER
+ // used by AddContext()
+ virtual bool DoAddSystemInfo(wxXmlNode *nodeSystemInfo);
+ virtual bool DoAddLoadedModules(wxXmlNode *nodeModules);
+ virtual bool DoAddExceptionInfo(wxXmlNode *nodeContext);
+ virtual void DoAddCustomContext(wxXmlNode * WXUNUSED(nodeRoot)) { }
+#endif
+
+ // used by Process()
+ virtual bool DoProcess();
+
+private:
+ // name of the report directory
+ wxString m_dir;
+
+ // the arrays of files in this report and their descriptions
+ wxArrayString m_files,
+ m_descriptions;
+};
+
+#if wxUSE_ZIPSTREAM
+
+// ----------------------------------------------------------------------------
+// wxDebugReportCompress: compress all files of this debug report in a .ZIP
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_QA wxDebugReportCompress : public wxDebugReport
+{
+public:
+ wxDebugReportCompress() { }
+
+ // returns the full path of the compressed file (empty if creation failed)
+ const wxString& GetCompressedFileName() const { return m_zipfile; }
+
+protected:
+ virtual bool DoProcess();
+
+private:
+ // full path to the ZIP file we created
+ wxString m_zipfile;
+};
+
+// ----------------------------------------------------------------------------
+// wxDebugReportUploader: uploads compressed file using HTTP POST request
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_QA wxDebugReportUpload : public wxDebugReportCompress
+{
+public:
+ // this class will upload the compressed file created by its base class to
+ // an HTML multipart/form-data form at the specified address
+ //
+ // the URL is the base address, input is the name of the "type=file"
+ // control on the form used for the file name and action is the value of
+ // the form action field
+ wxDebugReportUpload(const wxString& url,
+ const wxString& input,
+ const wxString& action,
+ const wxString& curl = _T("curl"));
+
+protected:
+ virtual bool DoProcess();
+
+ // this function may be overridden in a derived class to show the output
+ // from curl: this may be an HTML page or anything else that the server
+ // returned
+ //
+ // return value becomes the return value of Process()
+ virtual bool OnServerReply(const wxArrayString& WXUNUSED(reply))
+ {
+ return true;
+ }
+
+private:
+ // the full URL to use with HTTP POST request
+ wxString m_uploadURL;
+
+ // the name of the input field containing the file name in the form at
+ // above URL
+ wxString m_inputField;
+
+ // the curl command (by default it is just "curl" but could be full path to
+ // curl or a wrapper script with curl-compatible syntax)
+ wxString m_curlCmd;
+};
+
+#endif // wxUSE_ZIPSTREAM
+
+
+// ----------------------------------------------------------------------------
+// wxDebugReportPreview: presents the debug report to the user and allows him
+// to veto report entirely or remove some parts of it
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_QA wxDebugReportPreview
+{
+public:
+ // ctor is trivial
+ wxDebugReportPreview() { }
+
+ // present the report to the user and allow him to modify it by removing
+ // some or all of the files and, potentially, adding some notes
+ //
+ // return true if the report should be processed or false if the user chose
+ // to cancel report generation or removed all files from it
+ virtual bool Show(wxDebugReport& dbgrpt) const = 0;
+
+ // dtor is trivial as well but should be virtual for a base class
+ virtual ~wxDebugReportPreview() { }
+};
+
+#if wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// wxDebugReportPreviewStd: standard debug report preview window
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_QA wxDebugReportPreviewStd : public wxDebugReportPreview
+{
+public:
+ wxDebugReportPreviewStd() { }
+
+ virtual bool Show(wxDebugReport& dbgrpt) const;
+};
+
+#endif // wxUSE_GUI
+
+#endif // wxUSE_DEBUGREPORT && wxUSE_XML
+
+#endif // _WX_DEBUGRPT_H_
diff --git a/3rdparty/wxWidgets/include/wx/defs.h b/3rdparty/wxWidgets/include/wx/defs.h
new file mode 100644
index 0000000000..0e2ca0c5d4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/defs.h
@@ -0,0 +1,2900 @@
+/*
+ * Name: wx/defs.h
+ * Purpose: Declarations/definitions common to all wx source files
+ * Author: Julian Smart and others
+ * Modified by: Ryan Norton (Converted to C)
+ * Created: 01/02/97
+ * RCS-ID: $Id: defs.h 53370 2008-04-26 05:43:41Z KO $
+ * Copyright: (c) Julian Smart
+ * Licence: wxWindows licence
+ */
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+#ifndef _WX_DEFS_H_
+#define _WX_DEFS_H_
+
+/* ---------------------------------------------------------------------------- */
+/* compiler and OS identification */
+/* ---------------------------------------------------------------------------- */
+
+#include "wx/platform.h"
+
+#ifdef __cplusplus
+/* Make sure the environment is set correctly */
+# if defined(__WXMSW__) && defined(__X__)
+# error "Target can't be both X and Windows"
+# elif defined(__WXMSW__) && defined(__PALMOS__)
+# error "Target can't be both PalmOS and Windows"
+# elif !defined(__WXMOTIF__) && \
+ !defined(__WXMSW__) && \
+ !defined(__WXPALMOS__)&& \
+ !defined(__WXGTK__) && \
+ !defined(__WXPM__) && \
+ !defined(__WXMAC__) && \
+ !defined(__WXCOCOA__) && \
+ !defined(__X__) && \
+ !defined(__WXMGL__) && \
+ !defined(__WXDFB__) && \
+ !defined(__WXX11__) && \
+ wxUSE_GUI
+# ifdef __UNIX__
+# error "No Target! You should use wx-config program for compilation flags!"
+# else /* !Unix */
+# error "No Target! You should use supplied makefiles for compilation!"
+# endif /* Unix/!Unix */
+# endif
+#endif /*__cplusplus*/
+
+#ifndef __WXWINDOWS__
+ #define __WXWINDOWS__ 1
+#endif
+
+#ifndef wxUSE_BASE
+ /* by default consider that this is a monolithic build */
+ #define wxUSE_BASE 1
+#endif
+
+#if !wxUSE_GUI && !defined(__WXBASE__)
+ #define __WXBASE__
+#endif
+
+/* include the feature test macros */
+#include "wx/features.h"
+
+/* suppress some Visual C++ warnings */
+#ifdef __VISUALC__
+ /* the only "real" warning here is 4244 but there are just too many of them */
+ /* in our code... one day someone should go and fix them but until then... */
+# pragma warning(disable:4097) /* typedef used as class */
+# pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */
+# pragma warning(disable:4244) /* conversion from double to float */
+# pragma warning(disable:4355) /* 'this' used in base member initializer list */
+# pragma warning(disable:4511) /* copy ctor couldn't be generated */
+# pragma warning(disable:4512) /* operator=() couldn't be generated */
+# pragma warning(disable:4710) /* function not inlined */
+
+ /* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
+ /* is buggy, and occurs for code that does actually get executed */
+# if !defined __WXDEBUG__ && __VISUALC__ <= 1100
+# pragma warning(disable:4702) /* unreachable code */
+# endif
+ /* The VC++ 5.0 warning 'C4003: not enough actual parameters for macro'
+ * is incompatible with the wxWidgets headers since it is given when
+ * parameters are empty but not missing. */
+# if __VISUALC__ <= 1100
+# pragma warning(disable:4003) /* not enough actual parameters for macro */
+# endif
+
+ /*
+ VC++ 8 gives a warning when using standard functions such as sprintf,
+ localtime, ... -- stop this madness, unless the user had already done it
+ */
+ #if __VISUALC__ >= 1400
+ #ifndef _CRT_SECURE_NO_DEPRECATE
+ #define _CRT_SECURE_NO_DEPRECATE 1
+ #endif
+ #ifndef _CRT_NON_CONFORMING_SWPRINTFS
+ #define _CRT_NON_CONFORMING_SWPRINTFS 1
+ #endif
+ #endif /* VC++ 8 */
+#endif /* __VISUALC__ */
+
+/* suppress some Salford C++ warnings */
+#ifdef __SALFORDC__
+# pragma suppress 353 /* Possible nested comments */
+# pragma suppress 593 /* Define not used */
+# pragma suppress 61 /* enum has no name (doesn't suppress!) */
+# pragma suppress 106 /* unnamed, unused parameter */
+# pragma suppress 571 /* Virtual function hiding */
+#endif /* __SALFORDC__ */
+
+/* suppress some Borland C++ warnings */
+#ifdef __BORLANDC__
+# pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */
+#endif /* __BORLANDC__ */
+
+/*
+ g++ gives a warning when a class has private dtor if it has no friends but
+ this is a perfectly valid situation for a ref-counted class which destroys
+ itself when its ref count drops to 0, so provide a macro to suppress this
+ warning
+ */
+#ifdef __GNUG__
+# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) \
+ friend class wxDummyFriendFor ## name;
+#else /* !g++ */
+# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name)
+#endif
+
+/* ---------------------------------------------------------------------------- */
+/* wxWidgets version and compatibility defines */
+/* ---------------------------------------------------------------------------- */
+
+#include "wx/version.h"
+
+/* ============================================================================ */
+/* non portable C++ features */
+/* ============================================================================ */
+
+/* ---------------------------------------------------------------------------- */
+/* compiler defects workarounds */
+/* ---------------------------------------------------------------------------- */
+
+/*
+ Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files,
+ so define it ourselves (newer versions do it for all files, though, and
+ don't allow it to be redefined)
+ */
+#if defined(__DECCXX) && !defined(__VMS) && !defined(__cplusplus)
+#define __cplusplus
+#endif /* __DECCXX */
+
+/* Resolves linking problems under HP-UX when compiling with gcc/g++ */
+#if defined(__HPUX__) && defined(__GNUG__)
+#define va_list __gnuc_va_list
+#endif /* HP-UX */
+
+/* ---------------------------------------------------------------------------- */
+/* check for native bool type and TRUE/FALSE constants */
+/* ---------------------------------------------------------------------------- */
+
+/* Add more tests here for Windows compilers that already define bool */
+/* (under Unix, configure tests for this) */
+#ifndef HAVE_BOOL
+ #if defined( __MWERKS__ )
+ #if (__MWERKS__ >= 0x1000) && __option(bool)
+ #define HAVE_BOOL
+ #endif
+ #elif defined(__APPLE__) && defined(__APPLE_CC__)
+ /* Apple bundled gcc supports bool */
+ #define HAVE_BOOL
+ #elif defined(__VISUALC__) && (__VISUALC__ == 1020)
+ /* in VC++ 4.2 the bool keyword is reserved (hence can't be typedefed) */
+ /* but not implemented, so we must #define it */
+ #define bool unsigned int
+ #elif defined(__VISUALC__) && (__VISUALC__ == 1010)
+ /* For VisualC++ 4.1, we need to define */
+ /* bool as something between 4.0 & 5.0... */
+ typedef unsigned int wxbool;
+ #define bool wxbool
+ #define HAVE_BOOL
+ #elif defined(__VISUALC__) && (__VISUALC__ > 1020)
+ /* VC++ supports bool since 4.2 */
+ #define HAVE_BOOL
+ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)
+ /* Borland 5.0+ supports bool */
+ #define HAVE_BOOL
+ #elif wxCHECK_WATCOM_VERSION(1,0)
+ /* Watcom 11+ supports bool */
+ #define HAVE_BOOL
+ #elif defined(__DIGITALMARS__)
+ /* DigitalMars supports bool */
+ #define HAVE_BOOL
+ #elif defined(__GNUWIN32__) || defined(__MINGW32__) || defined(__CYGWIN__)
+ /* Cygwin supports bool */
+ #define HAVE_BOOL
+ #elif defined(__VISAGECPP__)
+ #if __IBMCPP__ < 400
+ typedef unsigned long bool;
+ #define true ((bool)1)
+ #define false ((bool)0)
+ #endif
+ #define HAVE_BOOL
+ #endif /* compilers */
+#endif /* HAVE_BOOL */
+
+#if !defined(__MWERKS__) || !defined(true)
+#if !defined(HAVE_BOOL) && !defined(bool) && !defined(VMS)
+ /* NB: of course, this doesn't replace the standard type, because, for */
+ /* example, overloading based on bool/int parameter doesn't work and */
+ /* so should be avoided in portable programs */
+ typedef unsigned int bool;
+#endif /* bool */
+
+/* deal with TRUE/true stuff: we assume that if the compiler supports bool, it */
+/* supports true/false as well and that, OTOH, if it does _not_ support bool, */
+/* it doesn't support these keywords (this is less sure, in particular VC++ */
+/* 4.x could be a problem here) */
+#ifndef HAVE_BOOL
+ #define true ((bool)1)
+ #define false ((bool)0)
+#endif
+#endif
+
+/* for backwards compatibility, also define TRUE and FALSE */
+/* */
+/* note that these definitions should work both in C++ and C code, so don't */
+/* use true/false below */
+#ifndef TRUE
+ #define TRUE 1
+#endif
+
+#ifndef FALSE
+ #define FALSE 0
+#endif
+
+typedef short int WXTYPE;
+
+/* special care should be taken with this type under Windows where the real */
+/* window id is unsigned, so we must always do the cast before comparing them */
+/* (or else they would be always different!). Using wxGetWindowId() which does */
+/* the cast itself is recommended. Note that this type can't be unsigned */
+/* because wxID_ANY == -1 is a valid (and largely used) value for window id. */
+typedef int wxWindowID;
+
+/* ---------------------------------------------------------------------------- */
+/* other feature tests */
+/* ---------------------------------------------------------------------------- */
+
+/* Every ride down a slippery slope begins with a single step.. */
+/* */
+/* Yes, using nested classes is indeed against our coding standards in */
+/* general, but there are places where you can use them to advantage */
+/* without totally breaking ports that cannot use them. If you do, then */
+/* wrap it in this guard, but such cases should still be relatively rare. */
+#define wxUSE_NESTED_CLASSES 1
+
+/* check for explicit keyword support */
+#ifndef HAVE_EXPLICIT
+ #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
+ /* VC++ 6.0 and 5.0 have explicit (what about earlier versions?) */
+ #define HAVE_EXPLICIT
+ #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
+ && wxCHECK_GCC_VERSION(2, 95)
+ /* GCC 2.95 has explicit, what about earlier versions? */
+ #define HAVE_EXPLICIT
+ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520)
+ /* BC++ 4.52 doesn't support explicit, CBuilder 1 does */
+ #define HAVE_EXPLICIT
+ #elif defined(__MWERKS__) && (__MWERKS__ >= 0x2400)
+ /* Metrowerks CW6 or higher has explicit */
+ #define HAVE_EXPLICIT
+ #elif defined(__DIGITALMARS__)
+ #define HAVE_EXPLICIT
+ #endif
+#endif /* !HAVE_EXPLICIT */
+
+#ifdef HAVE_EXPLICIT
+ #define wxEXPLICIT explicit
+#else /* !HAVE_EXPLICIT */
+ #define wxEXPLICIT
+#endif /* HAVE_EXPLICIT/!HAVE_EXPLICIT */
+
+/* check for static/const_cast<>() (we don't use the other ones for now) */
+#ifndef HAVE_CXX_CASTS
+ #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
+ /* VC++ 6.0 and 5.0 have C++ casts (what about earlier versions?) */
+ #define HAVE_CXX_CASTS
+ #elif defined(__MINGW32__) || defined(__CYGWIN32__)
+ #if wxCHECK_GCC_VERSION(2, 95)
+ /* GCC 2.95 has C++ casts, what about earlier versions? */
+ #define HAVE_CXX_CASTS
+ #endif
+ #endif
+#endif /* !HAVE_CXX_CASTS */
+
+#ifdef HAVE_CXX_CASTS
+ #ifndef HAVE_CONST_CAST
+ #define HAVE_CONST_CAST
+ #endif
+ #ifndef HAVE_REINTERPRET_CAST
+ #define HAVE_REINTERPRET_CAST
+ #endif
+ #ifndef HAVE_STATIC_CAST
+ #define HAVE_STATIC_CAST
+ #endif
+ #ifndef HAVE_DYNAMIC_CAST
+ #define HAVE_DYNAMIC_CAST
+ #endif
+#endif /* HAVE_CXX_CASTS */
+
+#ifdef HAVE_STATIC_CAST
+ #define wx_static_cast(t, x) static_cast(x)
+#else
+ #define wx_static_cast(t, x) ((t)(x))
+#endif
+
+#ifdef HAVE_CONST_CAST
+ #define wx_const_cast(t, x) const_cast(x)
+#else
+ #define wx_const_cast(t, x) ((t)(x))
+#endif
+
+#ifdef HAVE_REINTERPRET_CAST
+ #define wx_reinterpret_cast(t, x) reinterpret_cast(x)
+#else
+ #define wx_reinterpret_cast(t, x) ((t)(x))
+#endif
+
+/*
+ This one is a wx invention: like static cast but used when we intentionally
+ truncate from a larger to smaller type, static_cast<> can't be used for it
+ as it results in warnings when using some compilers (SGI mipspro for example)
+ */
+#if defined(__INTELC__) && defined(__cplusplus)
+ template
+ inline T wx_truncate_cast_impl(X x)
+ {
+ #pragma warning(push)
+ /* implicit conversion of a 64-bit integral type to a smaller integral type */
+ #pragma warning(disable: 1682)
+ /* conversion from "X" to "T" may lose significant bits */
+ #pragma warning(disable: 810)
+
+ return x;
+
+ #pragma warning(pop)
+ }
+
+ #define wx_truncate_cast(t, x) wx_truncate_cast_impl(x)
+
+#elif defined(__cplusplus) && defined(__VISUALC__) && __VISUALC__ >= 1310
+ template
+ inline T wx_truncate_cast_impl(X x)
+ {
+ #pragma warning(push)
+ /* conversion from 'X' to 'T', possible loss of data */
+ #pragma warning(disable: 4267)
+
+ return x;
+
+ #pragma warning(pop)
+ }
+
+ #define wx_truncate_cast(t, x) wx_truncate_cast_impl(x)
+#else
+ #define wx_truncate_cast(t, x) ((t)(x))
+#endif
+
+/* for consistency with wxStatic/DynamicCast defined in wx/object.h */
+#define wxConstCast(obj, className) wx_const_cast(className *, obj)
+
+#ifndef HAVE_STD_WSTRING
+ #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
+ /* VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?) */
+ #define HAVE_STD_WSTRING
+ #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
+ && wxCHECK_GCC_VERSION(3, 3)
+ /* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */
+ #define HAVE_STD_WSTRING
+ #endif
+#endif
+
+#ifndef HAVE_STD_STRING_COMPARE
+ #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
+ /* VC++ 6.0 and 5.0 have std::string::compare */
+ /* (what about earlier versions?) */
+ #define HAVE_STD_STRING_COMPARE
+ #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
+ && wxCHECK_GCC_VERSION(3, 1)
+ /* GCC 3.1 has std::string::compare; */
+ /* 3.0 never was in MinGW, 2.95 hasn't it */
+ #define HAVE_STD_STRING_COMPARE
+ #endif
+#endif
+
+/* provide replacement for C99 va_copy() if the compiler doesn't have it */
+
+/* could be already defined by configure or the user */
+#ifndef wxVaCopy
+ /* if va_copy is a macro or configure detected that we have it, use it */
+ #if defined(va_copy) || defined(HAVE_VA_COPY)
+ #define wxVaCopy va_copy
+ #else /* no va_copy, try to provide a replacement */
+ /*
+ configure tries to determine whether va_list is an array or struct
+ type, but it may not be used under Windows, so deal with a few
+ special cases.
+ */
+
+ #ifdef __WATCOMC__
+ /* Watcom uses array type for va_list except for PPC and Alpha */
+ #if !defined(__PPC__) && !defined(__AXP__)
+ #define VA_LIST_IS_ARRAY
+ #endif
+ #endif /* __WATCOMC__ */
+
+ #if defined(__PPC__) && (defined(_CALL_SYSV) || defined (_WIN32))
+ /*
+ PPC using SysV ABI and NT/PPC are special in that they use an
+ extra level of indirection.
+ */
+ #define VA_LIST_IS_POINTER
+ #endif /* SysV or Win32 on __PPC__ */
+
+ /*
+ note that we use memmove(), not memcpy(), in case anybody tries
+ to do wxVaCopy(ap, ap)
+ */
+ #if defined(VA_LIST_IS_POINTER)
+ #define wxVaCopy(d, s) memmove(*(d), *(s), sizeof(va_list))
+ #elif defined(VA_LIST_IS_ARRAY)
+ #define wxVaCopy(d, s) memmove((d), (s), sizeof(va_list))
+ #else /* we can only hope that va_lists are simple lvalues */
+ #define wxVaCopy(d, s) ((d) = (s))
+ #endif
+ #endif /* va_copy/!va_copy */
+#endif /* wxVaCopy */
+
+
+/* ---------------------------------------------------------------------------- */
+/* portable calling conventions macros */
+/* ---------------------------------------------------------------------------- */
+
+/* stdcall is used for all functions called by Windows under Windows */
+#if defined(__WINDOWS__)
+ #if defined(__GNUWIN32__)
+ #define wxSTDCALL __attribute__((stdcall))
+ #else
+ /* both VC++ and Borland understand this */
+ #define wxSTDCALL _stdcall
+ #endif
+
+#else /* Win */
+ /* no such stupidness under Unix */
+ #define wxSTDCALL
+#endif /* platform */
+
+/* LINKAGEMODE mode is empty for everyting except OS/2 */
+#ifndef LINKAGEMODE
+ #define LINKAGEMODE
+#endif /* LINKAGEMODE */
+
+/* wxCALLBACK should be used for the functions which are called back by */
+/* Windows (such as compare function for wxListCtrl) */
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
+ #define wxCALLBACK wxSTDCALL
+#else
+ /* no stdcall under Unix nor Win16 */
+ #define wxCALLBACK
+#endif /* platform */
+
+/* generic calling convention for the extern "C" functions */
+
+#if defined(__VISUALC__)
+ #define wxC_CALLING_CONV _cdecl
+#elif defined(__VISAGECPP__)
+ #define wxC_CALLING_CONV _Optlink
+#else /* !Visual C++ */
+ #define wxC_CALLING_CONV
+#endif /* compiler */
+
+/* callling convention for the qsort(3) callback */
+#define wxCMPFUNC_CONV wxC_CALLING_CONV
+
+/* compatibility :-( */
+#define CMPFUNC_CONV wxCMPFUNC_CONV
+
+/* DLL import/export declarations */
+#include "wx/dlimpexp.h"
+
+/* ---------------------------------------------------------------------------- */
+/* Very common macros */
+/* ---------------------------------------------------------------------------- */
+
+/* Printf-like attribute definitions to obtain warnings with GNU C/C++ */
+#ifndef ATTRIBUTE_PRINTF
+# if defined(__GNUC__) && !wxUSE_UNICODE
+# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+# else
+# define ATTRIBUTE_PRINTF(m, n)
+# endif
+
+# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
+# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
+# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
+# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
+# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
+#endif /* !defined(ATTRIBUTE_PRINTF) */
+
+/* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */
+#if wxCHECK_GCC_VERSION(3, 1)
+ #define wxDEPRECATED(x) x __attribute__ ((deprecated))
+#elif defined(__VISUALC__) && (__VISUALC__ >= 1300)
+ #define wxDEPRECATED(x) __declspec(deprecated) x
+#else
+ #define wxDEPRECATED(x) x
+#endif
+
+/* everybody gets the assert and other debug macros */
+#include "wx/debug.h"
+
+/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */
+/* it must not be defined as "(void *)0" which is standard for C but completely */
+/* breaks C++ code) */
+#ifndef __HANDHELDPC__
+#include
+#endif
+
+/* delete pointer if it is not NULL and NULL it afterwards */
+/* (checking that it's !NULL before passing it to delete is just a */
+/* a question of style, because delete will do it itself anyhow, but it might */
+/* be considered as an error by some overzealous debugging implementations of */
+/* the library, so we do it ourselves) */
+#define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; }
+
+/* delete an array and NULL it (see comments above) */
+#define wxDELETEA(p) if ( (p) ) { delete [] (p); p = NULL; }
+
+/* size of statically declared array */
+#define WXSIZEOF(array) (sizeof(array)/sizeof(array[0]))
+
+/* symbolic constant used by all Find()-like functions returning positive */
+/* integer on success as failure indicator */
+#define wxNOT_FOUND (-1)
+
+/* ---------------------------------------------------------------------------- */
+/* macros to avoid compiler warnings */
+/* ---------------------------------------------------------------------------- */
+
+/* Macro to cut down on compiler warnings. */
+#if 1 /* there should be no more any compilers needing the "#else" version */
+ #define WXUNUSED(identifier) /* identifier */
+#else /* stupid, broken compiler */
+ #define WXUNUSED(identifier) identifier
+#endif
+
+/* some arguments are only used in debug mode, but unused in release one */
+#ifdef __WXDEBUG__
+ #define WXUNUSED_UNLESS_DEBUG(param) param
+#else
+ #define WXUNUSED_UNLESS_DEBUG(param) WXUNUSED(param)
+#endif
+
+/* some arguments are not used in unicode mode */
+#if wxUSE_UNICODE
+ #define WXUNUSED_IN_UNICODE(param) WXUNUSED(param)
+#else
+ #define WXUNUSED_IN_UNICODE(param) param
+#endif
+
+/* some arguments are not used in WinCE build */
+#ifdef __WXWINCE__
+ #define WXUNUSED_IN_WINCE(param) WXUNUSED(param)
+#else
+ #define WXUNUSED_IN_WINCE(param) param
+#endif
+
+/* unused parameters in non stream builds */
+#if wxUSE_STREAMS
+ #define WXUNUSED_UNLESS_STREAMS(param) param
+#else
+ #define WXUNUSED_UNLESS_STREAMS(param) WXUNUSED(param)
+#endif
+
+/* some compilers give warning about a possibly unused variable if it is */
+/* initialized in both branches of if/else and shut up if it is initialized */
+/* when declared, but other compilers then give warnings about unused variable */
+/* value -- this should satisfy both of them */
+#if defined(__VISUALC__)
+ #define wxDUMMY_INITIALIZE(val) = val
+#else
+ #define wxDUMMY_INITIALIZE(val)
+#endif
+
+/* sometimes the value of a variable is *really* not used, to suppress the */
+/* resulting warning you may pass it to this function */
+#ifdef __cplusplus
+# ifdef __BORLANDC__
+# define wxUnusedVar(identifier) identifier
+# else
+ template
+ inline void wxUnusedVar(const T& WXUNUSED(t)) { }
+# endif
+#endif
+
+/* ---------------------------------------------------------------------------- */
+/* compiler specific settings */
+/* ---------------------------------------------------------------------------- */
+
+/* to allow compiling with warning level 4 under Microsoft Visual C++ some */
+/* warnings just must be disabled */
+#ifdef __VISUALC__
+ #pragma warning(disable: 4514) /* unreferenced inline func has been removed */
+/*
+ you might be tempted to disable this one also: triggered by CHECK and FAIL
+ macros in debug.h, but it's, overall, a rather useful one, so I leave it and
+ will try to find some way to disable this warning just for CHECK/FAIL. Anyone?
+*/
+ #pragma warning(disable: 4127) /* conditional expression is constant */
+#endif /* VC++ */
+
+#if defined(__MWERKS__)
+ #undef try
+ #undef except
+ #undef finally
+ #define except(x) catch(...)
+#endif /* Metrowerks */
+
+#if wxONLY_WATCOM_EARLIER_THAN(1,4)
+ typedef short mode_t;
+#endif
+
+/* where should i put this? we need to make sure of this as it breaks */
+/* the code. */
+#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
+# ifndef __MWERKS__
+/* #undef __WXDEBUG__ */
+# ifdef wxUSE_DEBUG_NEW_ALWAYS
+# undef wxUSE_DEBUG_NEW_ALWAYS
+# define wxUSE_DEBUG_NEW_ALWAYS 0
+# endif
+# endif
+#endif
+
+/* ---------------------------------------------------------------------------- */
+/* standard wxWidgets types */
+/* ---------------------------------------------------------------------------- */
+
+/* the type for screen and DC coordinates */
+typedef int wxCoord;
+
+enum { wxDefaultCoord = -1 };
+
+/* ---------------------------------------------------------------------------- */
+/* define fixed length types */
+/* ---------------------------------------------------------------------------- */
+
+#if defined(__WXPALMOS__) || defined(__MINGW32__)
+ #include
+#endif
+
+/* chars are always one byte (by definition), shorts are always two (in */
+/* practice) */
+
+/* 8bit */
+#ifndef SIZEOF_CHAR
+ #define SIZEOF_CHAR 1
+#endif
+typedef signed char wxInt8;
+typedef unsigned char wxUint8;
+typedef wxUint8 wxByte;
+
+
+/* 16bit */
+#ifdef SIZEOF_SHORT
+ #if SIZEOF_SHORT != 2
+ #error "wxWidgets assumes sizeof(short) == 2, please fix the code"
+ #endif
+#else
+ #define SIZEOF_SHORT 2
+#endif
+
+typedef signed short wxInt16;
+typedef unsigned short wxUint16;
+
+typedef wxUint16 wxWord;
+
+/*
+ things are getting more interesting with ints, longs and pointers
+
+ there are several different standard data models described by this table:
+
+ +-----------+----------------------------+
+ |type\model | LP64 ILP64 LLP64 ILP32 LP32|
+ +-----------+----------------------------+
+ |char | 8 8 8 8 8 |
+ |short | 16 16 16 16 16 |
+ |int | 32 64 32 32 16 |
+ |long | 64 64 32 32 32 |
+ |long long | 64 |
+ |void * | 64 64 64 32 32 |
+ +-----------+----------------------------+
+
+ Win16 used LP32 (but we don't support it any longer), Win32 obviously used
+ ILP32 and Win64 uses LLP64 (a.k.a. P64)
+
+ Under Unix LP64 is the most widely used (the only I've ever seen, in fact)
+ */
+
+/* 32bit */
+#ifdef __PALMOS__
+ typedef int wxInt32;
+ typedef unsigned int wxUint32;
+ #define SIZEOF_INT 4
+ #define SIZEOF_LONG 4
+ #define SIZEOF_WCHAR_T 2
+ #define SIZEOF_SIZE_T 4
+ #define wxSIZE_T_IS_UINT
+ #define SIZEOF_VOID_P 4
+ #define SIZEOF_SIZE_T 4
+#elif defined(__WINDOWS__)
+ /* Win64 uses LLP64 model and so ints and longs have the same size as in */
+ /* Win32 */
+ #if defined(__WIN32__)
+ typedef int wxInt32;
+ typedef unsigned int wxUint32;
+
+ /* Assume that if SIZEOF_INT is defined that all the other ones except
+ SIZEOF_SIZE_T, are too. See next #if below. */
+ #ifndef SIZEOF_INT
+ #define SIZEOF_INT 4
+ #define SIZEOF_LONG 4
+ #define SIZEOF_WCHAR_T 2
+
+ /*
+ under Win64 sizeof(size_t) == 8 and so it is neither unsigned
+ int nor unsigned long!
+ */
+ #ifdef __WIN64__
+ #define SIZEOF_SIZE_T 8
+
+ #undef wxSIZE_T_IS_UINT
+ #else /* Win32 */
+ #define SIZEOF_SIZE_T 4
+
+ #define wxSIZE_T_IS_UINT
+ #endif
+ #undef wxSIZE_T_IS_ULONG
+
+ #ifdef __WIN64__
+ #define SIZEOF_VOID_P 8
+ #else /* Win32 */
+ #define SIZEOF_VOID_P 4
+ #endif /* Win64/32 */
+ #endif /* !defined(SIZEOF_INT) */
+
+ /*
+ If Python.h was included first, it defines all of the SIZEOF's above
+ except for SIZEOF_SIZE_T, so we need to do it here to avoid
+ triggering the #error in the ssize_t typedefs below...
+ */
+ #ifndef SIZEOF_SIZE_T
+ #ifdef __WIN64__
+ #define SIZEOF_SIZE_T 8
+ #else /* Win32 */
+ #define SIZEOF_SIZE_T 4
+ #endif
+ #endif
+ #else
+ #error "Unsupported Windows version"
+ #endif
+#else /* !Windows */
+ /* SIZEOF_XXX are normally defined by configure */
+ #ifdef SIZEOF_INT
+ #if SIZEOF_INT == 8
+ /* must be ILP64 data model, there is normally a special 32 bit */
+ /* type in it but we don't know what it is... */
+ #error "No 32bit int type on this platform"
+ #elif SIZEOF_INT == 4
+ typedef int wxInt32;
+ typedef unsigned int wxUint32;
+ #elif SIZEOF_INT == 2
+ /* must be LP32 */
+ #if SIZEOF_LONG != 4
+ #error "No 32bit int type on this platform"
+ #endif
+
+ typedef long wxInt32;
+ typedef unsigned long wxUint32;
+ #else
+ /* wxWidgets is not ready for 128bit systems yet... */
+ #error "Unknown sizeof(int) value, what are you compiling for?"
+ #endif
+ #else /* !defined(SIZEOF_INT) */
+ /* assume default 32bit machine -- what else can we do? */
+ wxCOMPILE_TIME_ASSERT( sizeof(int) == 4, IntMustBeExactly4Bytes);
+ wxCOMPILE_TIME_ASSERT( sizeof(size_t) == 4, SizeTMustBeExactly4Bytes);
+ wxCOMPILE_TIME_ASSERT( sizeof(void *) == 4, PtrMustBeExactly4Bytes);
+
+ #define SIZEOF_INT 4
+ #define SIZEOF_SIZE_T 4
+ #define SIZEOF_VOID_P 4
+
+ typedef int wxInt32;
+ typedef unsigned int wxUint32;
+
+ #if defined(__MACH__) && !defined(SIZEOF_WCHAR_T)
+ #define SIZEOF_WCHAR_T 4
+ #endif
+ #if wxUSE_WCHAR_T && !defined(SIZEOF_WCHAR_T)
+ /* also assume that sizeof(wchar_t) == 2 (under Unix the most */
+ /* common case is 4 but there configure would have defined */
+ /* SIZEOF_WCHAR_T for us) */
+ /* the most common case */
+ wxCOMPILE_TIME_ASSERT( sizeof(wchar_t) == 2,
+ Wchar_tMustBeExactly2Bytes);
+
+ #define SIZEOF_WCHAR_T 2
+ #endif /* wxUSE_WCHAR_T */
+ #endif
+#endif /* Win/!Win */
+
+typedef wxUint32 wxDword;
+
+/*
+ Define an integral type big enough to contain all of long, size_t and void *.
+ */
+#if SIZEOF_LONG >= SIZEOF_VOID_P && SIZEOF_LONG >= SIZEOF_SIZE_T
+ /* normal case */
+ typedef unsigned long wxUIntPtr;
+#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P
+ /* Win64 case */
+ typedef size_t wxUIntPtr;
+#else
+ /*
+ This should never happen for the current architectures but if you're
+ using one where it does, please contact wx-dev@lists.wxwidgets.org.
+ */
+ #error "Pointers can't be stored inside integer types."
+#endif
+
+#ifdef __cplusplus
+/* And also define a couple of simple functions to cast pointer to/from it. */
+inline wxUIntPtr wxPtrToUInt(const void *p)
+{
+ /*
+ VC++ 7.1 gives warnings about casts such as below even when they're
+ explicit with /Wp64 option, suppress them as we really know what we're
+ doing here. Same thing with icc with -Wall.
+ */
+#ifdef __VISUALC__
+ #if __VISUALC__ >= 1200
+ #pragma warning(push)
+ #endif
+ /* pointer truncation from '' to '' */
+ #pragma warning(disable: 4311)
+#elif defined(__INTELC__)
+ #pragma warning(push)
+ /* conversion from pointer to same-sized integral type */
+ #pragma warning(disable: 1684)
+#endif
+
+ return wx_reinterpret_cast(wxUIntPtr, p);
+
+#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__)
+ #pragma warning(pop)
+#endif
+}
+
+inline void *wxUIntToPtr(wxUIntPtr p)
+{
+#ifdef __VISUALC__
+ #if __VISUALC__ >= 1200
+ #pragma warning(push)
+ #endif
+ /* conversion to type of greater size */
+ #pragma warning(disable: 4312)
+#elif defined(__INTELC__)
+ #pragma warning(push)
+ /* invalid type conversion: "wxUIntPtr={unsigned long}" to "void *" */
+ #pragma warning(disable: 171)
+#endif
+
+ return wx_reinterpret_cast(void *, p);
+
+#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__)
+ #pragma warning(pop)
+#endif
+}
+#endif /*__cplusplus*/
+
+
+/* 64 bit */
+
+/* NB: we #define and not typedef wxLongLong_t because we use "#ifdef */
+/* wxLongLong_t" in wx/longlong.h */
+
+/* wxULongLong_t is set later (usually to unsigned wxLongLong_t) */
+
+/* to avoid compilation problems on 64bit machines with ambiguous method calls */
+/* we will need to define this */
+#undef wxLongLongIsLong
+
+/*
+ First check for specific compilers which have known 64 bit integer types,
+ this avoids clashes with SIZEOF_LONG[_LONG] being defined incorrectly for
+ e.g. MSVC builds (Python.h defines it as 8 even for MSVC).
+
+ Also notice that we check for "long long" before checking for 64 bit long as
+ we still want to use "long long" and not "long" for wxLongLong_t on 64 bit
+ architectures to be able to pass wxLongLong_t to the standard functions
+ prototyped as taking "long long" such as strtoll().
+ */
+#if (defined(__VISUALC__) && defined(__WIN32__))
+ #define wxLongLong_t __int64
+ #define wxLongLongSuffix i64
+ #define wxLongLongFmtSpec _T("I64")
+#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
+ #define wxLongLong_t __int64
+ #define wxLongLongSuffix i64
+ #define wxLongLongFmtSpec _T("L")
+#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__)))
+ #define wxLongLong_t __int64
+ #define wxLongLongSuffix i64
+ #define wxLongLongFmtSpec _T("L")
+#elif defined(__DIGITALMARS__)
+ #define wxLongLong_t __int64
+ #define wxLongLongSuffix LL
+ #define wxLongLongFmtSpec _T("ll")
+#elif defined(__MINGW32__)
+ #define wxLongLong_t long long
+ #define wxLongLongSuffix ll
+ #define wxLongLongFmtSpec _T("I64")
+#elif defined(__MWERKS__)
+ #if __option(longlong)
+ #define wxLongLong_t long long
+ #define wxLongLongSuffix ll
+ #define wxLongLongFmtSpec _T("ll")
+ #else
+ #error "The 64 bit integer support in CodeWarrior has been disabled."
+ #error "See the documentation on the 'longlong' pragma."
+ #endif
+#elif defined(__WXPALMOS__)
+ #define wxLongLong_t int64_t
+ #define wxLongLongSuffix ll
+ #define wxLongLongFmtSpec _T("ll")
+#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
+ #define wxLongLong_t long long
+#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
+ defined(__GNUC__) || \
+ defined(__CYGWIN__) || \
+ defined(__WXMICROWIN__) || \
+ (defined(__DJGPP__) && __DJGPP__ >= 2)
+ #define wxLongLong_t long long
+ #define wxLongLongSuffix ll
+ #define wxLongLongFmtSpec _T("ll")
+#elif defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
+ #define wxLongLong_t long
+ #define wxLongLongSuffix l
+ #define wxLongLongFmtSpec _T("l")
+ #define wxLongLongIsLong
+#endif
+
+
+#ifdef wxLongLong_t
+
+ #ifdef __WXPALMOS__
+ #define wxULongLong_t uint64_t
+ #else
+ #define wxULongLong_t unsigned wxLongLong_t
+ #endif
+
+ /* these macros allow to define 64 bit constants in a portable way */
+ #define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
+ #define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
+
+ typedef wxLongLong_t wxInt64;
+ typedef wxULongLong_t wxUint64;
+
+ #define wxHAS_INT64 1
+
+#elif wxUSE_LONGLONG
+ /* these macros allow to define 64 bit constants in a portable way */
+ #define wxLL(x) wxLongLong(x)
+ #define wxULL(x) wxULongLong(x)
+
+ #define wxInt64 wxLongLong
+ #define wxUint64 wxULongLong
+
+ #define wxHAS_INT64 1
+
+#else /* !wxUSE_LONGLONG */
+
+ #define wxHAS_INT64 0
+
+#endif
+
+
+/* Make sure ssize_t is defined (a signed type the same size as size_t) */
+/* HAVE_SSIZE_T should be defined for compiliers that already have it */
+#ifdef __MINGW32__
+ #if defined(_SSIZE_T_) && !defined(HAVE_SSIZE_T)
+ #define HAVE_SSIZE_T
+ #endif
+#endif
+#if defined(__PALMOS__) && !defined(HAVE_SSIZE_T)
+ #define HAVE_SSIZE_T
+#endif
+#if wxCHECK_WATCOM_VERSION(1,4)
+ #define HAVE_SSIZE_T
+#endif
+#ifndef HAVE_SSIZE_T
+ #if SIZEOF_SIZE_T == 4
+ typedef wxInt32 ssize_t;
+ #elif SIZEOF_SIZE_T == 8
+ typedef wxInt64 ssize_t;
+ #else
+ #error "error defining ssize_t, size_t is not 4 or 8 bytes"
+ #endif
+#endif
+
+
+/* base floating point types */
+/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits */
+/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits */
+/* wxDouble: native fastest representation that has at least wxFloat64 */
+/* precision, so use the IEEE types for storage, and this for */
+/* calculations */
+
+typedef float wxFloat32;
+#if (defined( __WXMAC__ ) || defined(__WXCOCOA__)) && defined (__MWERKS__)
+ typedef short double wxFloat64;
+#else
+ typedef double wxFloat64;
+#endif
+
+typedef double wxDouble;
+
+/*
+ Some (non standard) compilers typedef wchar_t as an existing type instead
+ of treating it as a real fundamental type, set wxWCHAR_T_IS_REAL_TYPE to 0
+ for them and to 1 for all the others.
+ */
+#if wxUSE_WCHAR_T
+ /*
+ VC++ typedefs wchar_t as unsigned short by default, that is unless
+ /Za or /Zc:wchar_t option is used in which case _WCHAR_T_DEFINED is
+ defined.
+ */
+# if defined(__VISUALC__) && !defined(_NATIVE_WCHAR_T_DEFINED)
+# define wxWCHAR_T_IS_REAL_TYPE 0
+# else /* compiler having standard-conforming wchar_t */
+# define wxWCHAR_T_IS_REAL_TYPE 1
+# endif
+#endif /* wxUSE_WCHAR_T */
+
+/* ---------------------------------------------------------------------------- */
+/* byte ordering related definition and macros */
+/* ---------------------------------------------------------------------------- */
+
+/* byte sex */
+
+#define wxBIG_ENDIAN 4321
+#define wxLITTLE_ENDIAN 1234
+#define wxPDP_ENDIAN 3412
+
+#ifdef WORDS_BIGENDIAN
+#define wxBYTE_ORDER wxBIG_ENDIAN
+#else
+#define wxBYTE_ORDER wxLITTLE_ENDIAN
+#endif
+
+/* byte swapping */
+
+#if defined (__MWERKS__) && ( (__MWERKS__ < 0x0900) || macintosh )
+/* assembler versions for these */
+#ifdef __POWERPC__
+ inline wxUint16 wxUINT16_SWAP_ALWAYS( wxUint16 i )
+ {return (__lhbrx( &i , 0 ) );}
+ inline wxInt16 wxINT16_SWAP_ALWAYS( wxInt16 i )
+ {return (__lhbrx( &i , 0 ) );}
+ inline wxUint32 wxUINT32_SWAP_ALWAYS( wxUint32 i )
+ {return (__lwbrx( &i , 0 ) );}
+ inline wxInt32 wxINT32_SWAP_ALWAYS( wxInt32 i )
+ {return (__lwbrx( &i , 0 ) );}
+#else
+ #pragma parameter __D0 wxUINT16_SWAP_ALWAYS(__D0)
+ pascal wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value)
+ = { 0xE158 };
+
+ #pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0)
+ pascal wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value)
+ = { 0xE158 };
+
+ #pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0)
+ pascal wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value)
+ = { 0xE158, 0x4840, 0xE158 };
+
+ #pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0)
+ pascal wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value)
+ = { 0xE158, 0x4840, 0xE158 };
+
+#endif
+#else /* !MWERKS */
+#define wxUINT16_SWAP_ALWAYS(val) \
+ ((wxUint16) ( \
+ (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
+ (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8)))
+
+#define wxINT16_SWAP_ALWAYS(val) \
+ ((wxInt16) ( \
+ (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
+ (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8)))
+
+#define wxUINT32_SWAP_ALWAYS(val) \
+ ((wxUint32) ( \
+ (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
+ (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
+ (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
+ (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
+
+#define wxINT32_SWAP_ALWAYS(val) \
+ ((wxInt32) ( \
+ (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
+ (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
+ (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
+ (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
+#endif
+/* machine specific byte swapping */
+
+#ifdef wxLongLong_t
+ #define wxUINT64_SWAP_ALWAYS(val) \
+ ((wxUint64) ( \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56)))
+
+ #define wxINT64_SWAP_ALWAYS(val) \
+ ((wxInt64) ( \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \
+ (((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56)))
+#elif wxUSE_LONGLONG /* !wxLongLong_t */
+ #define wxUINT64_SWAP_ALWAYS(val) \
+ ((wxUint64) ( \
+ ((wxULongLong(val) & wxULongLong(0L, 0x000000ffU)) << 56) | \
+ ((wxULongLong(val) & wxULongLong(0L, 0x0000ff00U)) << 40) | \
+ ((wxULongLong(val) & wxULongLong(0L, 0x00ff0000U)) << 24) | \
+ ((wxULongLong(val) & wxULongLong(0L, 0xff000000U)) << 8) | \
+ ((wxULongLong(val) & wxULongLong(0x000000ffL, 0U)) >> 8) | \
+ ((wxULongLong(val) & wxULongLong(0x0000ff00L, 0U)) >> 24) | \
+ ((wxULongLong(val) & wxULongLong(0x00ff0000L, 0U)) >> 40) | \
+ ((wxULongLong(val) & wxULongLong(0xff000000L, 0U)) >> 56)))
+
+ #define wxINT64_SWAP_ALWAYS(val) \
+ ((wxInt64) ( \
+ ((wxLongLong(val) & wxLongLong(0L, 0x000000ffU)) << 56) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0x0000ff00U)) << 40) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0x00ff0000U)) << 24) | \
+ ((wxLongLong(val) & wxLongLong(0L, 0xff000000U)) << 8) | \
+ ((wxLongLong(val) & wxLongLong(0x000000ffL, 0U)) >> 8) | \
+ ((wxLongLong(val) & wxLongLong(0x0000ff00L, 0U)) >> 24) | \
+ ((wxLongLong(val) & wxLongLong(0x00ff0000L, 0U)) >> 40) | \
+ ((wxLongLong(val) & wxLongLong(0xff000000L, 0U)) >> 56)))
+#endif /* wxLongLong_t/!wxLongLong_t */
+
+#ifdef WORDS_BIGENDIAN
+ #define wxUINT16_SWAP_ON_BE(val) wxUINT16_SWAP_ALWAYS(val)
+ #define wxINT16_SWAP_ON_BE(val) wxINT16_SWAP_ALWAYS(val)
+ #define wxUINT16_SWAP_ON_LE(val) (val)
+ #define wxINT16_SWAP_ON_LE(val) (val)
+ #define wxUINT32_SWAP_ON_BE(val) wxUINT32_SWAP_ALWAYS(val)
+ #define wxINT32_SWAP_ON_BE(val) wxINT32_SWAP_ALWAYS(val)
+ #define wxUINT32_SWAP_ON_LE(val) (val)
+ #define wxINT32_SWAP_ON_LE(val) (val)
+ #if wxHAS_INT64
+ #define wxUINT64_SWAP_ON_BE(val) wxUINT64_SWAP_ALWAYS(val)
+ #define wxUINT64_SWAP_ON_LE(val) (val)
+ #endif
+#else
+ #define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val)
+ #define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val)
+ #define wxUINT16_SWAP_ON_BE(val) (val)
+ #define wxINT16_SWAP_ON_BE(val) (val)
+ #define wxUINT32_SWAP_ON_LE(val) wxUINT32_SWAP_ALWAYS(val)
+ #define wxINT32_SWAP_ON_LE(val) wxINT32_SWAP_ALWAYS(val)
+ #define wxUINT32_SWAP_ON_BE(val) (val)
+ #define wxINT32_SWAP_ON_BE(val) (val)
+ #if wxHAS_INT64
+ #define wxUINT64_SWAP_ON_LE(val) wxUINT64_SWAP_ALWAYS(val)
+ #define wxUINT64_SWAP_ON_BE(val) (val)
+ #endif
+#endif
+
+/* ---------------------------------------------------------------------------- */
+/* Geometric flags */
+/* ---------------------------------------------------------------------------- */
+
+enum wxGeometryCentre
+{
+ wxCENTRE = 0x0001,
+ wxCENTER = wxCENTRE
+};
+
+/* centering into frame rather than screen (obsolete) */
+#define wxCENTER_FRAME 0x0000
+/* centre on screen rather than parent */
+#define wxCENTRE_ON_SCREEN 0x0002
+#define wxCENTER_ON_SCREEN wxCENTRE_ON_SCREEN
+
+enum wxOrientation
+{
+ /* don't change the values of these elements, they are used elsewhere */
+ wxHORIZONTAL = 0x0004,
+ wxVERTICAL = 0x0008,
+
+ wxBOTH = wxVERTICAL | wxHORIZONTAL
+};
+
+enum wxDirection
+{
+ wxLEFT = 0x0010,
+ wxRIGHT = 0x0020,
+ wxUP = 0x0040,
+ wxDOWN = 0x0080,
+
+ wxTOP = wxUP,
+ wxBOTTOM = wxDOWN,
+
+ wxNORTH = wxUP,
+ wxSOUTH = wxDOWN,
+ wxWEST = wxLEFT,
+ wxEAST = wxRIGHT,
+
+ wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT)
+};
+
+enum wxAlignment
+{
+ wxALIGN_NOT = 0x0000,
+ wxALIGN_CENTER_HORIZONTAL = 0x0100,
+ wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL,
+ wxALIGN_LEFT = wxALIGN_NOT,
+ wxALIGN_TOP = wxALIGN_NOT,
+ wxALIGN_RIGHT = 0x0200,
+ wxALIGN_BOTTOM = 0x0400,
+ wxALIGN_CENTER_VERTICAL = 0x0800,
+ wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL,
+
+ wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL),
+ wxALIGN_CENTRE = wxALIGN_CENTER,
+
+ /* a mask to extract alignment from the combination of flags */
+ wxALIGN_MASK = 0x0f00
+};
+
+enum wxStretch
+{
+ wxSTRETCH_NOT = 0x0000,
+ wxSHRINK = 0x1000,
+ wxGROW = 0x2000,
+ wxEXPAND = wxGROW,
+ wxSHAPED = 0x4000,
+ wxFIXED_MINSIZE = 0x8000,
+#if wxABI_VERSION >= 20808
+ wxRESERVE_SPACE_EVEN_IF_HIDDEN = 0x0002,
+#endif
+ wxTILE = 0xc000,
+
+ /* for compatibility only, default now, don't use explicitly any more */
+#if WXWIN_COMPATIBILITY_2_4
+ wxADJUST_MINSIZE = 0x00100000
+#else
+ wxADJUST_MINSIZE = 0
+#endif
+};
+
+/* border flags: the values are chosen for backwards compatibility */
+enum wxBorder
+{
+ /* this is different from wxBORDER_NONE as by default the controls do have */
+ /* border */
+ wxBORDER_DEFAULT = 0,
+
+ wxBORDER_NONE = 0x00200000,
+ wxBORDER_STATIC = 0x01000000,
+ wxBORDER_SIMPLE = 0x02000000,
+ wxBORDER_RAISED = 0x04000000,
+ wxBORDER_SUNKEN = 0x08000000,
+ wxBORDER_DOUBLE = 0x10000000, /* deprecated */
+ wxBORDER_THEME = 0x10000000,
+
+ /* a mask to extract border style from the combination of flags */
+ wxBORDER_MASK = 0x1f200000
+};
+
+/* This makes it easier to specify a 'normal' border for a control */
+#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
+#define wxDEFAULT_CONTROL_BORDER wxBORDER_SIMPLE
+#else
+#define wxDEFAULT_CONTROL_BORDER wxBORDER_SUNKEN
+#endif
+
+/* ---------------------------------------------------------------------------- */
+/* Window style flags */
+/* ---------------------------------------------------------------------------- */
+
+/*
+ * Values are chosen so they can be |'ed in a bit list.
+ * Some styles are used across more than one group,
+ * so the values mustn't clash with others in the group.
+ * Otherwise, numbers can be reused across groups.
+ *
+ * From version 1.66:
+ * Window (cross-group) styles now take up the first half
+ * of the flag, and control-specific styles the
+ * second half.
+ *
+ */
+
+/*
+ * Window (Frame/dialog/subwindow/panel item) style flags
+ */
+#define wxVSCROLL 0x80000000
+#define wxHSCROLL 0x40000000
+#define wxCAPTION 0x20000000
+
+/* New styles (border styles are now in their own enum) */
+#define wxDOUBLE_BORDER wxBORDER_DOUBLE
+#define wxSUNKEN_BORDER wxBORDER_SUNKEN
+#define wxRAISED_BORDER wxBORDER_RAISED
+#define wxBORDER wxBORDER_SIMPLE
+#define wxSIMPLE_BORDER wxBORDER_SIMPLE
+#define wxSTATIC_BORDER wxBORDER_STATIC
+#define wxNO_BORDER wxBORDER_NONE
+
+/* wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed, */
+/* disable it - but still show (see also wxLB_ALWAYS_SB style) */
+/* */
+/* NB: as this style is only supported by wxUniversal and wxMSW so far */
+#define wxALWAYS_SHOW_SB 0x00800000
+
+/* Clip children when painting, which reduces flicker in e.g. frames and */
+/* splitter windows, but can't be used in a panel where a static box must be */
+/* 'transparent' (panel paints the background for it) */
+#define wxCLIP_CHILDREN 0x00400000
+
+/* Note we're reusing the wxCAPTION style because we won't need captions */
+/* for subwindows/controls */
+#define wxCLIP_SIBLINGS 0x20000000
+
+#define wxTRANSPARENT_WINDOW 0x00100000
+
+/* Add this style to a panel to get tab traversal working outside of dialogs */
+/* (on by default for wxPanel, wxDialog, wxScrolledWindow) */
+#define wxTAB_TRAVERSAL 0x00080000
+
+/* Add this style if the control wants to get all keyboard messages (under */
+/* Windows, it won't normally get the dialog navigation key events) */
+#define wxWANTS_CHARS 0x00040000
+
+/* Make window retained (Motif only, see src/generic/scrolwing.cpp)
+ * This is non-zero only under wxMotif, to avoid a clash with wxPOPUP_WINDOW
+ * on other platforms
+ */
+
+#ifdef __WXMOTIF__
+#define wxRETAINED 0x00020000
+#else
+#define wxRETAINED 0x00000000
+#endif
+#define wxBACKINGSTORE wxRETAINED
+
+/* set this flag to create a special popup window: it will be always shown on */
+/* top of other windows, will capture the mouse and will be dismissed when the */
+/* mouse is clicked outside of it or if it loses focus in any other way */
+#define wxPOPUP_WINDOW 0x00020000
+
+/* force a full repaint when the window is resized (instead of repainting just */
+/* the invalidated area) */
+#define wxFULL_REPAINT_ON_RESIZE 0x00010000
+
+/* obsolete: now this is the default behaviour */
+/* */
+/* don't invalidate the whole window (resulting in a PAINT event) when the */
+/* window is resized (currently, makes sense for wxMSW only) */
+#define wxNO_FULL_REPAINT_ON_RESIZE 0
+
+/* A mask which can be used to filter (out) all wxWindow-specific styles.
+ */
+#define wxWINDOW_STYLE_MASK \
+ (wxVSCROLL|wxHSCROLL|wxBORDER_MASK|wxALWAYS_SHOW_SB|wxCLIP_CHILDREN| \
+ wxCLIP_SIBLINGS|wxTRANSPARENT_WINDOW|wxTAB_TRAVERSAL|wxWANTS_CHARS| \
+ wxRETAINED|wxPOPUP_WINDOW|wxFULL_REPAINT_ON_RESIZE)
+
+/*
+ * Extra window style flags (use wxWS_EX prefix to make it clear that they
+ * should be passed to wxWindow::SetExtraStyle(), not SetWindowStyle())
+ */
+
+/* by default, TransferDataTo/FromWindow() only work on direct children of the */
+/* window (compatible behaviour), set this flag to make them recursively */
+/* descend into all subwindows */
+#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
+
+/* wxCommandEvents and the objects of the derived classes are forwarded to the */
+/* parent window and so on recursively by default. Using this flag for the */
+/* given window allows to block this propagation at this window, i.e. prevent */
+/* the events from being propagated further upwards. The dialogs have this */
+/* flag on by default. */
+#define wxWS_EX_BLOCK_EVENTS 0x00000002
+
+/* don't use this window as an implicit parent for the other windows: this must */
+/* be used with transient windows as otherwise there is the risk of creating a */
+/* dialog/frame with this window as a parent which would lead to a crash if the */
+/* parent is destroyed before the child */
+#define wxWS_EX_TRANSIENT 0x00000004
+
+/* don't paint the window background, we'll assume it will */
+/* be done by a theming engine. This is not yet used but could */
+/* possibly be made to work in the future, at least on Windows */
+#define wxWS_EX_THEMED_BACKGROUND 0x00000008
+
+/* this window should always process idle events */
+#define wxWS_EX_PROCESS_IDLE 0x00000010
+
+/* this window should always process UI update events */
+#define wxWS_EX_PROCESS_UI_UPDATES 0x00000020
+
+/* Draw the window in a metal theme on Mac */
+#define wxFRAME_EX_METAL 0x00000040
+#define wxDIALOG_EX_METAL 0x00000040
+
+/* Use this style to add a context-sensitive help to the window (currently for */
+/* Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) */
+#define wxWS_EX_CONTEXTHELP 0x00000080
+
+/* synonyms for wxWS_EX_CONTEXTHELP for compatibility */
+#define wxFRAME_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
+#define wxDIALOG_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
+
+/* Create a window which is attachable to another top level window */
+#define wxFRAME_DRAWER 0x0020
+
+/*
+ * MDI parent frame style flags
+ * Can overlap with some of the above.
+ */
+
+#define wxFRAME_NO_WINDOW_MENU 0x0100
+
+/*
+ * wxMenuBar style flags
+ */
+/* use native docking */
+#define wxMB_DOCKABLE 0x0001
+
+/*
+ * wxMenu style flags
+ */
+#define wxMENU_TEAROFF 0x0001
+
+/*
+ * Apply to all panel items
+ */
+#define wxCOLOURED 0x0800
+#define wxFIXED_LENGTH 0x0400
+
+/*
+ * Styles for wxListBox
+ */
+#define wxLB_SORT 0x0010
+#define wxLB_SINGLE 0x0020
+#define wxLB_MULTIPLE 0x0040
+#define wxLB_EXTENDED 0x0080
+/* wxLB_OWNERDRAW is Windows-only */
+#define wxLB_OWNERDRAW 0x0100
+#define wxLB_NEEDED_SB 0x0200
+#define wxLB_ALWAYS_SB 0x0400
+#define wxLB_HSCROLL wxHSCROLL
+/* always show an entire number of rows */
+#define wxLB_INT_HEIGHT 0x0800
+
+#if WXWIN_COMPATIBILITY_2_6
+ /* deprecated synonyms */
+ #define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */
+ #define wxPASSWORD 0x0800 /* wxTE_PASSWORD */
+#endif
+
+/*
+ * wxComboBox style flags
+ */
+#define wxCB_SIMPLE 0x0004
+#define wxCB_SORT 0x0008
+#define wxCB_READONLY 0x0010
+#define wxCB_DROPDOWN 0x0020
+
+/*
+ * wxRadioBox style flags
+ */
+/* should we number the items from left to right or from top to bottom in a 2d */
+/* radiobox? */
+#define wxRA_LEFTTORIGHT 0x0001
+#define wxRA_TOPTOBOTTOM 0x0002
+
+/* New, more intuitive names to specify majorDim argument */
+#define wxRA_SPECIFY_COLS wxHORIZONTAL
+#define wxRA_SPECIFY_ROWS wxVERTICAL
+
+/* Old names for compatibility */
+#define wxRA_HORIZONTAL wxHORIZONTAL
+#define wxRA_VERTICAL wxVERTICAL
+#define wxRA_USE_CHECKBOX 0x0010 /* alternative native subcontrols (wxPalmOS) */
+
+/*
+ * wxRadioButton style flag
+ */
+#define wxRB_GROUP 0x0004
+#define wxRB_SINGLE 0x0008
+#define wxRB_USE_CHECKBOX 0x0010 /* alternative native control (wxPalmOS) */
+
+/*
+ * wxScrollBar flags
+ */
+#define wxSB_HORIZONTAL wxHORIZONTAL
+#define wxSB_VERTICAL wxVERTICAL
+
+/*
+ * wxSpinButton flags.
+ * Note that a wxSpinCtrl is sometimes defined as
+ * a wxTextCtrl, and so the flags must be different
+ * from wxTextCtrl's.
+ */
+#define wxSP_HORIZONTAL wxHORIZONTAL /* 4 */
+#define wxSP_VERTICAL wxVERTICAL /* 8 */
+#define wxSP_ARROW_KEYS 0x1000
+#define wxSP_WRAP 0x2000
+
+/*
+ * wxTabCtrl flags
+ */
+#define wxTC_RIGHTJUSTIFY 0x0010
+#define wxTC_FIXEDWIDTH 0x0020
+#define wxTC_TOP 0x0000 /* default */
+#define wxTC_LEFT 0x0020
+#define wxTC_RIGHT 0x0040
+#define wxTC_BOTTOM 0x0080
+#define wxTC_MULTILINE 0x0200 /* == wxNB_MULTILINE */
+#define wxTC_OWNERDRAW 0x0400
+
+/*
+ * wxStatusBar95 flags
+ */
+#define wxST_SIZEGRIP 0x0010
+
+/*
+ * wxStaticText flags
+ */
+#define wxST_NO_AUTORESIZE 0x0001
+#define wxST_DOTS_MIDDLE 0x0002
+#define wxST_DOTS_END 0x0004
+
+/*
+ * wxStaticBitmap flags
+ */
+#define wxBI_EXPAND wxEXPAND
+
+/*
+ * wxStaticLine flags
+ */
+#define wxLI_HORIZONTAL wxHORIZONTAL
+#define wxLI_VERTICAL wxVERTICAL
+
+
+/*
+ * extended dialog specifiers. these values are stored in a different
+ * flag and thus do not overlap with other style flags. note that these
+ * values do not correspond to the return values of the dialogs (for
+ * those values, look at the wxID_XXX defines).
+ */
+
+/* wxCENTRE already defined as 0x00000001 */
+#define wxYES 0x00000002
+#define wxOK 0x00000004
+#define wxNO 0x00000008
+#define wxYES_NO (wxYES | wxNO)
+#define wxCANCEL 0x00000010
+
+#define wxYES_DEFAULT 0x00000000 /* has no effect (default) */
+#define wxNO_DEFAULT 0x00000080
+
+#define wxICON_EXCLAMATION 0x00000100
+#define wxICON_HAND 0x00000200
+#define wxICON_WARNING wxICON_EXCLAMATION
+#define wxICON_ERROR wxICON_HAND
+#define wxICON_QUESTION 0x00000400
+#define wxICON_INFORMATION 0x00000800
+#define wxICON_STOP wxICON_HAND
+#define wxICON_ASTERISK wxICON_INFORMATION
+#define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800)
+
+#define wxFORWARD 0x00001000
+#define wxBACKWARD 0x00002000
+#define wxRESET 0x00004000
+#define wxHELP 0x00008000
+#define wxMORE 0x00010000
+#define wxSETUP 0x00020000
+
+/*
+ * Background styles. See wxWindow::SetBackgroundStyle
+ */
+
+enum wxBackgroundStyle
+{
+ wxBG_STYLE_SYSTEM,
+ wxBG_STYLE_COLOUR,
+ wxBG_STYLE_CUSTOM
+};
+
+/* ---------------------------------------------------------------------------- */
+/* standard IDs */
+/* ---------------------------------------------------------------------------- */
+
+/* Standard menu IDs */
+enum
+{
+ /* no id matches this one when compared to it */
+ wxID_NONE = -3,
+
+ /* id for a separator line in the menu (invalid for normal item) */
+ wxID_SEPARATOR = -2,
+
+ /* any id: means that we don't care about the id, whether when installing
+ * an event handler or when creating a new window */
+ wxID_ANY = -1,
+
+
+ /* all predefined ids are between wxID_LOWEST and wxID_HIGHEST */
+ wxID_LOWEST = 4999,
+
+ wxID_OPEN,
+ wxID_CLOSE,
+ wxID_NEW,
+ wxID_SAVE,
+ wxID_SAVEAS,
+ wxID_REVERT,
+ wxID_EXIT,
+ wxID_UNDO,
+ wxID_REDO,
+ wxID_HELP,
+ wxID_PRINT,
+ wxID_PRINT_SETUP,
+ wxID_PAGE_SETUP,
+ wxID_PREVIEW,
+ wxID_ABOUT,
+ wxID_HELP_CONTENTS,
+ wxID_HELP_INDEX,
+ wxID_HELP_SEARCH,
+ wxID_HELP_COMMANDS,
+ wxID_HELP_PROCEDURES,
+ wxID_HELP_CONTEXT,
+ wxID_CLOSE_ALL,
+ wxID_PREFERENCES,
+
+ wxID_EDIT = 5030,
+ wxID_CUT,
+ wxID_COPY,
+ wxID_PASTE,
+ wxID_CLEAR,
+ wxID_FIND,
+ wxID_DUPLICATE,
+ wxID_SELECTALL,
+ wxID_DELETE,
+ wxID_REPLACE,
+ wxID_REPLACE_ALL,
+ wxID_PROPERTIES,
+
+ wxID_VIEW_DETAILS,
+ wxID_VIEW_LARGEICONS,
+ wxID_VIEW_SMALLICONS,
+ wxID_VIEW_LIST,
+ wxID_VIEW_SORTDATE,
+ wxID_VIEW_SORTNAME,
+ wxID_VIEW_SORTSIZE,
+ wxID_VIEW_SORTTYPE,
+
+ wxID_FILE = 5050,
+ wxID_FILE1,
+ wxID_FILE2,
+ wxID_FILE3,
+ wxID_FILE4,
+ wxID_FILE5,
+ wxID_FILE6,
+ wxID_FILE7,
+ wxID_FILE8,
+ wxID_FILE9,
+
+ /* Standard button and menu IDs */
+ wxID_OK = 5100,
+ wxID_CANCEL,
+ wxID_APPLY,
+ wxID_YES,
+ wxID_NO,
+ wxID_STATIC,
+ wxID_FORWARD,
+ wxID_BACKWARD,
+ wxID_DEFAULT,
+ wxID_MORE,
+ wxID_SETUP,
+ wxID_RESET,
+ wxID_CONTEXT_HELP,
+ wxID_YESTOALL,
+ wxID_NOTOALL,
+ wxID_ABORT,
+ wxID_RETRY,
+ wxID_IGNORE,
+ wxID_ADD,
+ wxID_REMOVE,
+
+ wxID_UP,
+ wxID_DOWN,
+ wxID_HOME,
+ wxID_REFRESH,
+ wxID_STOP,
+ wxID_INDEX,
+
+ wxID_BOLD,
+ wxID_ITALIC,
+ wxID_JUSTIFY_CENTER,
+ wxID_JUSTIFY_FILL,
+ wxID_JUSTIFY_RIGHT,
+ wxID_JUSTIFY_LEFT,
+ wxID_UNDERLINE,
+ wxID_INDENT,
+ wxID_UNINDENT,
+ wxID_ZOOM_100,
+ wxID_ZOOM_FIT,
+ wxID_ZOOM_IN,
+ wxID_ZOOM_OUT,
+ wxID_UNDELETE,
+ wxID_REVERT_TO_SAVED,
+
+ /* System menu IDs (used by wxUniv): */
+ wxID_SYSTEM_MENU = 5200,
+ wxID_CLOSE_FRAME,
+ wxID_MOVE_FRAME,
+ wxID_RESIZE_FRAME,
+ wxID_MAXIMIZE_FRAME,
+ wxID_ICONIZE_FRAME,
+ wxID_RESTORE_FRAME,
+
+ /* IDs used by generic file dialog (13 consecutive starting from this value) */
+ wxID_FILEDLGG = 5900,
+
+ wxID_HIGHEST = 5999
+};
+
+/* ---------------------------------------------------------------------------- */
+/* other constants */
+/* ---------------------------------------------------------------------------- */
+
+/* menu and toolbar item kinds */
+enum wxItemKind
+{
+ wxITEM_SEPARATOR = -1,
+ wxITEM_NORMAL,
+ wxITEM_CHECK,
+ wxITEM_RADIO,
+ wxITEM_MAX
+};
+
+/* hit test results */
+enum wxHitTest
+{
+ wxHT_NOWHERE,
+
+ /* scrollbar */
+ wxHT_SCROLLBAR_FIRST = wxHT_NOWHERE,
+ wxHT_SCROLLBAR_ARROW_LINE_1, /* left or upper arrow to scroll by line */
+ wxHT_SCROLLBAR_ARROW_LINE_2, /* right or down */
+ wxHT_SCROLLBAR_ARROW_PAGE_1, /* left or upper arrow to scroll by page */
+ wxHT_SCROLLBAR_ARROW_PAGE_2, /* right or down */
+ wxHT_SCROLLBAR_THUMB, /* on the thumb */
+ wxHT_SCROLLBAR_BAR_1, /* bar to the left/above the thumb */
+ wxHT_SCROLLBAR_BAR_2, /* bar to the right/below the thumb */
+ wxHT_SCROLLBAR_LAST,
+
+ /* window */
+ wxHT_WINDOW_OUTSIDE, /* not in this window at all */
+ wxHT_WINDOW_INSIDE, /* in the client area */
+ wxHT_WINDOW_VERT_SCROLLBAR, /* on the vertical scrollbar */
+ wxHT_WINDOW_HORZ_SCROLLBAR, /* on the horizontal scrollbar */
+ wxHT_WINDOW_CORNER, /* on the corner between 2 scrollbars */
+
+ wxHT_MAX
+};
+
+/* ---------------------------------------------------------------------------- */
+/* Possible SetSize flags */
+/* ---------------------------------------------------------------------------- */
+
+/* Use internally-calculated width if -1 */
+#define wxSIZE_AUTO_WIDTH 0x0001
+/* Use internally-calculated height if -1 */
+#define wxSIZE_AUTO_HEIGHT 0x0002
+/* Use internally-calculated width and height if each is -1 */
+#define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT)
+/* Ignore missing (-1) dimensions (use existing). */
+/* For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. */
+#define wxSIZE_USE_EXISTING 0x0000
+/* Allow -1 as a valid position */
+#define wxSIZE_ALLOW_MINUS_ONE 0x0004
+/* Don't do parent client adjustments (for implementation only) */
+#define wxSIZE_NO_ADJUSTMENTS 0x0008
+/* Change the window position even if it seems to be already correct */
+#define wxSIZE_FORCE 0x0010
+
+/* ---------------------------------------------------------------------------- */
+/* GDI descriptions */
+/* ---------------------------------------------------------------------------- */
+
+enum
+{
+ /* Text font families */
+ wxDEFAULT = 70,
+ wxDECORATIVE,
+ wxROMAN,
+ wxSCRIPT,
+ wxSWISS,
+ wxMODERN,
+ wxTELETYPE, /* @@@@ */
+
+ /* Proportional or Fixed width fonts (not yet used) */
+ wxVARIABLE = 80,
+ wxFIXED,
+
+ wxNORMAL = 90,
+ wxLIGHT,
+ wxBOLD,
+ /* Also wxNORMAL for normal (non-italic text) */
+ wxITALIC,
+ wxSLANT,
+
+ /* Pen styles */
+ wxSOLID = 100,
+ wxDOT,
+ wxLONG_DASH,
+ wxSHORT_DASH,
+ wxDOT_DASH,
+ wxUSER_DASH,
+
+ wxTRANSPARENT,
+
+ /* Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */
+ /* Note also that stippling a Pen IS meaningfull, because a Line is */
+ wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */
+ wxSTIPPLE_MASK, /* mask is used for masking areas in the stipple bitmap (TO DO) */
+ /* drawn with a Pen, and without any Brush -- and it can be stippled. */
+ wxSTIPPLE = 110,
+
+ wxBDIAGONAL_HATCH, /* In wxWidgets < 2.6 use WX_HATCH macro */
+ wxCROSSDIAG_HATCH, /* to verify these wx*_HATCH are in style */
+ wxFDIAGONAL_HATCH, /* of wxBrush. In wxWidgets >= 2.6 use */
+ wxCROSS_HATCH, /* wxBrush::IsHatch() instead. */
+ wxHORIZONTAL_HATCH,
+ wxVERTICAL_HATCH,
+ wxFIRST_HATCH = wxBDIAGONAL_HATCH,
+ wxLAST_HATCH = wxVERTICAL_HATCH,
+
+ wxJOIN_BEVEL = 120,
+ wxJOIN_MITER,
+ wxJOIN_ROUND,
+
+ wxCAP_ROUND = 130,
+ wxCAP_PROJECTING,
+ wxCAP_BUTT
+};
+
+#if WXWIN_COMPATIBILITY_2_4
+ #define IS_HATCH(s) ((s)>=wxFIRST_HATCH && (s)<=wxLAST_HATCH)
+#else
+ /* use wxBrush::IsHatch() instead thought wxMotif still uses it in src/motif/dcclient.cpp */
+#endif
+
+/* Logical ops */
+typedef enum
+{
+ wxCLEAR, wxROP_BLACK = wxCLEAR, wxBLIT_BLACKNESS = wxCLEAR, /* 0 */
+ wxXOR, wxROP_XORPEN = wxXOR, wxBLIT_SRCINVERT = wxXOR, /* src XOR dst */
+ wxINVERT, wxROP_NOT = wxINVERT, wxBLIT_DSTINVERT = wxINVERT, /* NOT dst */
+ wxOR_REVERSE, wxROP_MERGEPENNOT = wxOR_REVERSE, wxBLIT_00DD0228 = wxOR_REVERSE, /* src OR (NOT dst) */
+ wxAND_REVERSE, wxROP_MASKPENNOT = wxAND_REVERSE, wxBLIT_SRCERASE = wxAND_REVERSE, /* src AND (NOT dst) */
+ wxCOPY, wxROP_COPYPEN = wxCOPY, wxBLIT_SRCCOPY = wxCOPY, /* src */
+ wxAND, wxROP_MASKPEN = wxAND, wxBLIT_SRCAND = wxAND, /* src AND dst */
+ wxAND_INVERT, wxROP_MASKNOTPEN = wxAND_INVERT, wxBLIT_00220326 = wxAND_INVERT, /* (NOT src) AND dst */
+ wxNO_OP, wxROP_NOP = wxNO_OP, wxBLIT_00AA0029 = wxNO_OP, /* dst */
+ wxNOR, wxROP_NOTMERGEPEN = wxNOR, wxBLIT_NOTSRCERASE = wxNOR, /* (NOT src) AND (NOT dst) */
+ wxEQUIV, wxROP_NOTXORPEN = wxEQUIV, wxBLIT_00990066 = wxEQUIV, /* (NOT src) XOR dst */
+ wxSRC_INVERT, wxROP_NOTCOPYPEN = wxSRC_INVERT, wxBLIT_NOTSCRCOPY = wxSRC_INVERT, /* (NOT src) */
+ wxOR_INVERT, wxROP_MERGENOTPEN = wxOR_INVERT, wxBLIT_MERGEPAINT = wxOR_INVERT, /* (NOT src) OR dst */
+ wxNAND, wxROP_NOTMASKPEN = wxNAND, wxBLIT_007700E6 = wxNAND, /* (NOT src) OR (NOT dst) */
+ wxOR, wxROP_MERGEPEN = wxOR, wxBLIT_SRCPAINT = wxOR, /* src OR dst */
+ wxSET, wxROP_WHITE = wxSET, wxBLIT_WHITENESS = wxSET /* 1 */
+} form_ops_t;
+
+/* Flood styles */
+enum
+{
+ wxFLOOD_SURFACE = 1,
+ wxFLOOD_BORDER
+};
+
+/* Polygon filling mode */
+enum
+{
+ wxODDEVEN_RULE = 1,
+ wxWINDING_RULE
+};
+
+/* ToolPanel in wxFrame (VZ: unused?) */
+enum
+{
+ wxTOOL_TOP = 1,
+ wxTOOL_BOTTOM,
+ wxTOOL_LEFT,
+ wxTOOL_RIGHT
+};
+
+/* the values of the format constants should be the same as corresponding */
+/* CF_XXX constants in Windows API */
+enum wxDataFormatId
+{
+ wxDF_INVALID = 0,
+ wxDF_TEXT = 1, /* CF_TEXT */
+ wxDF_BITMAP = 2, /* CF_BITMAP */
+ wxDF_METAFILE = 3, /* CF_METAFILEPICT */
+ wxDF_SYLK = 4,
+ wxDF_DIF = 5,
+ wxDF_TIFF = 6,
+ wxDF_OEMTEXT = 7, /* CF_OEMTEXT */
+ wxDF_DIB = 8, /* CF_DIB */
+ wxDF_PALETTE = 9,
+ wxDF_PENDATA = 10,
+ wxDF_RIFF = 11,
+ wxDF_WAVE = 12,
+ wxDF_UNICODETEXT = 13,
+ wxDF_ENHMETAFILE = 14,
+ wxDF_FILENAME = 15, /* CF_HDROP */
+ wxDF_LOCALE = 16,
+ wxDF_PRIVATE = 20,
+ wxDF_HTML = 30, /* Note: does not correspond to CF_ constant */
+ wxDF_MAX
+};
+
+/* Virtual keycodes */
+enum wxKeyCode
+{
+ WXK_BACK = 8,
+ WXK_TAB = 9,
+ WXK_RETURN = 13,
+ WXK_ESCAPE = 27,
+ WXK_SPACE = 32,
+ WXK_DELETE = 127,
+
+ /* These are, by design, not compatible with unicode characters.
+ If you want to get a unicode character from a key event, use
+ wxKeyEvent::GetUnicodeKey instead. */
+ WXK_START = 300,
+ WXK_LBUTTON,
+ WXK_RBUTTON,
+ WXK_CANCEL,
+ WXK_MBUTTON,
+ WXK_CLEAR,
+ WXK_SHIFT,
+ WXK_ALT,
+ WXK_CONTROL,
+ WXK_MENU,
+ WXK_PAUSE,
+ WXK_CAPITAL,
+ WXK_END,
+ WXK_HOME,
+ WXK_LEFT,
+ WXK_UP,
+ WXK_RIGHT,
+ WXK_DOWN,
+ WXK_SELECT,
+ WXK_PRINT,
+ WXK_EXECUTE,
+ WXK_SNAPSHOT,
+ WXK_INSERT,
+ WXK_HELP,
+ WXK_NUMPAD0,
+ WXK_NUMPAD1,
+ WXK_NUMPAD2,
+ WXK_NUMPAD3,
+ WXK_NUMPAD4,
+ WXK_NUMPAD5,
+ WXK_NUMPAD6,
+ WXK_NUMPAD7,
+ WXK_NUMPAD8,
+ WXK_NUMPAD9,
+ WXK_MULTIPLY,
+ WXK_ADD,
+ WXK_SEPARATOR,
+ WXK_SUBTRACT,
+ WXK_DECIMAL,
+ WXK_DIVIDE,
+ WXK_F1,
+ WXK_F2,
+ WXK_F3,
+ WXK_F4,
+ WXK_F5,
+ WXK_F6,
+ WXK_F7,
+ WXK_F8,
+ WXK_F9,
+ WXK_F10,
+ WXK_F11,
+ WXK_F12,
+ WXK_F13,
+ WXK_F14,
+ WXK_F15,
+ WXK_F16,
+ WXK_F17,
+ WXK_F18,
+ WXK_F19,
+ WXK_F20,
+ WXK_F21,
+ WXK_F22,
+ WXK_F23,
+ WXK_F24,
+ WXK_NUMLOCK,
+ WXK_SCROLL,
+ WXK_PAGEUP,
+ WXK_PAGEDOWN,
+#if WXWIN_COMPATIBILITY_2_6
+ WXK_PRIOR = WXK_PAGEUP,
+ WXK_NEXT = WXK_PAGEDOWN,
+#endif
+
+ WXK_NUMPAD_SPACE,
+ WXK_NUMPAD_TAB,
+ WXK_NUMPAD_ENTER,
+ WXK_NUMPAD_F1,
+ WXK_NUMPAD_F2,
+ WXK_NUMPAD_F3,
+ WXK_NUMPAD_F4,
+ WXK_NUMPAD_HOME,
+ WXK_NUMPAD_LEFT,
+ WXK_NUMPAD_UP,
+ WXK_NUMPAD_RIGHT,
+ WXK_NUMPAD_DOWN,
+ WXK_NUMPAD_PAGEUP,
+ WXK_NUMPAD_PAGEDOWN,
+#if WXWIN_COMPATIBILITY_2_6
+ WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP,
+ WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN,
+#endif
+ WXK_NUMPAD_END,
+ WXK_NUMPAD_BEGIN,
+ WXK_NUMPAD_INSERT,
+ WXK_NUMPAD_DELETE,
+ WXK_NUMPAD_EQUAL,
+ WXK_NUMPAD_MULTIPLY,
+ WXK_NUMPAD_ADD,
+ WXK_NUMPAD_SEPARATOR,
+ WXK_NUMPAD_SUBTRACT,
+ WXK_NUMPAD_DECIMAL,
+ WXK_NUMPAD_DIVIDE,
+
+ WXK_WINDOWS_LEFT,
+ WXK_WINDOWS_RIGHT,
+ WXK_WINDOWS_MENU ,
+ WXK_COMMAND,
+
+ /* Hardware-specific buttons */
+ WXK_SPECIAL1 = 193,
+ WXK_SPECIAL2,
+ WXK_SPECIAL3,
+ WXK_SPECIAL4,
+ WXK_SPECIAL5,
+ WXK_SPECIAL6,
+ WXK_SPECIAL7,
+ WXK_SPECIAL8,
+ WXK_SPECIAL9,
+ WXK_SPECIAL10,
+ WXK_SPECIAL11,
+ WXK_SPECIAL12,
+ WXK_SPECIAL13,
+ WXK_SPECIAL14,
+ WXK_SPECIAL15,
+ WXK_SPECIAL16,
+ WXK_SPECIAL17,
+ WXK_SPECIAL18,
+ WXK_SPECIAL19,
+ WXK_SPECIAL20
+};
+
+/* This enum contains bit mask constants used in wxKeyEvent */
+enum wxKeyModifier
+{
+ wxMOD_NONE = 0x0000,
+ wxMOD_ALT = 0x0001,
+ wxMOD_CONTROL = 0x0002,
+ wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL,
+ wxMOD_SHIFT = 0x0004,
+ wxMOD_META = 0x0008,
+ wxMOD_WIN = wxMOD_META,
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ wxMOD_CMD = wxMOD_META,
+#else
+ wxMOD_CMD = wxMOD_CONTROL,
+#endif
+ wxMOD_ALL = 0xffff
+};
+
+/* Mapping modes (same values as used by Windows, don't change) */
+enum
+{
+ wxMM_TEXT = 1,
+ wxMM_LOMETRIC,
+ wxMM_HIMETRIC,
+ wxMM_LOENGLISH,
+ wxMM_HIENGLISH,
+ wxMM_TWIPS,
+ wxMM_ISOTROPIC,
+ wxMM_ANISOTROPIC,
+ wxMM_POINTS,
+ wxMM_METRIC
+};
+
+/* Shortcut for easier dialog-unit-to-pixel conversion */
+#define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
+
+/* Paper types */
+typedef enum
+{
+ wxPAPER_NONE, /* Use specific dimensions */
+ wxPAPER_LETTER, /* Letter, 8 1/2 by 11 inches */
+ wxPAPER_LEGAL, /* Legal, 8 1/2 by 14 inches */
+ wxPAPER_A4, /* A4 Sheet, 210 by 297 millimeters */
+ wxPAPER_CSHEET, /* C Sheet, 17 by 22 inches */
+ wxPAPER_DSHEET, /* D Sheet, 22 by 34 inches */
+ wxPAPER_ESHEET, /* E Sheet, 34 by 44 inches */
+ wxPAPER_LETTERSMALL, /* Letter Small, 8 1/2 by 11 inches */
+ wxPAPER_TABLOID, /* Tabloid, 11 by 17 inches */
+ wxPAPER_LEDGER, /* Ledger, 17 by 11 inches */
+ wxPAPER_STATEMENT, /* Statement, 5 1/2 by 8 1/2 inches */
+ wxPAPER_EXECUTIVE, /* Executive, 7 1/4 by 10 1/2 inches */
+ wxPAPER_A3, /* A3 sheet, 297 by 420 millimeters */
+ wxPAPER_A4SMALL, /* A4 small sheet, 210 by 297 millimeters */
+ wxPAPER_A5, /* A5 sheet, 148 by 210 millimeters */
+ wxPAPER_B4, /* B4 sheet, 250 by 354 millimeters */
+ wxPAPER_B5, /* B5 sheet, 182-by-257-millimeter paper */
+ wxPAPER_FOLIO, /* Folio, 8-1/2-by-13-inch paper */
+ wxPAPER_QUARTO, /* Quarto, 215-by-275-millimeter paper */
+ wxPAPER_10X14, /* 10-by-14-inch sheet */
+ wxPAPER_11X17, /* 11-by-17-inch sheet */
+ wxPAPER_NOTE, /* Note, 8 1/2 by 11 inches */
+ wxPAPER_ENV_9, /* #9 Envelope, 3 7/8 by 8 7/8 inches */
+ wxPAPER_ENV_10, /* #10 Envelope, 4 1/8 by 9 1/2 inches */
+ wxPAPER_ENV_11, /* #11 Envelope, 4 1/2 by 10 3/8 inches */
+ wxPAPER_ENV_12, /* #12 Envelope, 4 3/4 by 11 inches */
+ wxPAPER_ENV_14, /* #14 Envelope, 5 by 11 1/2 inches */
+ wxPAPER_ENV_DL, /* DL Envelope, 110 by 220 millimeters */
+ wxPAPER_ENV_C5, /* C5 Envelope, 162 by 229 millimeters */
+ wxPAPER_ENV_C3, /* C3 Envelope, 324 by 458 millimeters */
+ wxPAPER_ENV_C4, /* C4 Envelope, 229 by 324 millimeters */
+ wxPAPER_ENV_C6, /* C6 Envelope, 114 by 162 millimeters */
+ wxPAPER_ENV_C65, /* C65 Envelope, 114 by 229 millimeters */
+ wxPAPER_ENV_B4, /* B4 Envelope, 250 by 353 millimeters */
+ wxPAPER_ENV_B5, /* B5 Envelope, 176 by 250 millimeters */
+ wxPAPER_ENV_B6, /* B6 Envelope, 176 by 125 millimeters */
+ wxPAPER_ENV_ITALY, /* Italy Envelope, 110 by 230 millimeters */
+ wxPAPER_ENV_MONARCH, /* Monarch Envelope, 3 7/8 by 7 1/2 inches */
+ wxPAPER_ENV_PERSONAL, /* 6 3/4 Envelope, 3 5/8 by 6 1/2 inches */
+ wxPAPER_FANFOLD_US, /* US Std Fanfold, 14 7/8 by 11 inches */
+ wxPAPER_FANFOLD_STD_GERMAN, /* German Std Fanfold, 8 1/2 by 12 inches */
+ wxPAPER_FANFOLD_LGL_GERMAN, /* German Legal Fanfold, 8 1/2 by 13 inches */
+
+ wxPAPER_ISO_B4, /* B4 (ISO) 250 x 353 mm */
+ wxPAPER_JAPANESE_POSTCARD, /* Japanese Postcard 100 x 148 mm */
+ wxPAPER_9X11, /* 9 x 11 in */
+ wxPAPER_10X11, /* 10 x 11 in */
+ wxPAPER_15X11, /* 15 x 11 in */
+ wxPAPER_ENV_INVITE, /* Envelope Invite 220 x 220 mm */
+ wxPAPER_LETTER_EXTRA, /* Letter Extra 9 \275 x 12 in */
+ wxPAPER_LEGAL_EXTRA, /* Legal Extra 9 \275 x 15 in */
+ wxPAPER_TABLOID_EXTRA, /* Tabloid Extra 11.69 x 18 in */
+ wxPAPER_A4_EXTRA, /* A4 Extra 9.27 x 12.69 in */
+ wxPAPER_LETTER_TRANSVERSE, /* Letter Transverse 8 \275 x 11 in */
+ wxPAPER_A4_TRANSVERSE, /* A4 Transverse 210 x 297 mm */
+ wxPAPER_LETTER_EXTRA_TRANSVERSE, /* Letter Extra Transverse 9\275 x 12 in */
+ wxPAPER_A_PLUS, /* SuperA/SuperA/A4 227 x 356 mm */
+ wxPAPER_B_PLUS, /* SuperB/SuperB/A3 305 x 487 mm */
+ wxPAPER_LETTER_PLUS, /* Letter Plus 8.5 x 12.69 in */
+ wxPAPER_A4_PLUS, /* A4 Plus 210 x 330 mm */
+ wxPAPER_A5_TRANSVERSE, /* A5 Transverse 148 x 210 mm */
+ wxPAPER_B5_TRANSVERSE, /* B5 (JIS) Transverse 182 x 257 mm */
+ wxPAPER_A3_EXTRA, /* A3 Extra 322 x 445 mm */
+ wxPAPER_A5_EXTRA, /* A5 Extra 174 x 235 mm */
+ wxPAPER_B5_EXTRA, /* B5 (ISO) Extra 201 x 276 mm */
+ wxPAPER_A2, /* A2 420 x 594 mm */
+ wxPAPER_A3_TRANSVERSE, /* A3 Transverse 297 x 420 mm */
+ wxPAPER_A3_EXTRA_TRANSVERSE, /* A3 Extra Transverse 322 x 445 mm */
+
+ wxPAPER_DBL_JAPANESE_POSTCARD,/* Japanese Double Postcard 200 x 148 mm */
+ wxPAPER_A6, /* A6 105 x 148 mm */
+ wxPAPER_JENV_KAKU2, /* Japanese Envelope Kaku #2 */
+ wxPAPER_JENV_KAKU3, /* Japanese Envelope Kaku #3 */
+ wxPAPER_JENV_CHOU3, /* Japanese Envelope Chou #3 */
+ wxPAPER_JENV_CHOU4, /* Japanese Envelope Chou #4 */
+ wxPAPER_LETTER_ROTATED, /* Letter Rotated 11 x 8 1/2 in */
+ wxPAPER_A3_ROTATED, /* A3 Rotated 420 x 297 mm */
+ wxPAPER_A4_ROTATED, /* A4 Rotated 297 x 210 mm */
+ wxPAPER_A5_ROTATED, /* A5 Rotated 210 x 148 mm */
+ wxPAPER_B4_JIS_ROTATED, /* B4 (JIS) Rotated 364 x 257 mm */
+ wxPAPER_B5_JIS_ROTATED, /* B5 (JIS) Rotated 257 x 182 mm */
+ wxPAPER_JAPANESE_POSTCARD_ROTATED,/* Japanese Postcard Rotated 148 x 100 mm */
+ wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED,/* Double Japanese Postcard Rotated 148 x 200 mm */
+ wxPAPER_A6_ROTATED, /* A6 Rotated 148 x 105 mm */
+ wxPAPER_JENV_KAKU2_ROTATED, /* Japanese Envelope Kaku #2 Rotated */
+ wxPAPER_JENV_KAKU3_ROTATED, /* Japanese Envelope Kaku #3 Rotated */
+ wxPAPER_JENV_CHOU3_ROTATED, /* Japanese Envelope Chou #3 Rotated */
+ wxPAPER_JENV_CHOU4_ROTATED, /* Japanese Envelope Chou #4 Rotated */
+ wxPAPER_B6_JIS, /* B6 (JIS) 128 x 182 mm */
+ wxPAPER_B6_JIS_ROTATED, /* B6 (JIS) Rotated 182 x 128 mm */
+ wxPAPER_12X11, /* 12 x 11 in */
+ wxPAPER_JENV_YOU4, /* Japanese Envelope You #4 */
+ wxPAPER_JENV_YOU4_ROTATED, /* Japanese Envelope You #4 Rotated */
+ wxPAPER_P16K, /* PRC 16K 146 x 215 mm */
+ wxPAPER_P32K, /* PRC 32K 97 x 151 mm */
+ wxPAPER_P32KBIG, /* PRC 32K(Big) 97 x 151 mm */
+ wxPAPER_PENV_1, /* PRC Envelope #1 102 x 165 mm */
+ wxPAPER_PENV_2, /* PRC Envelope #2 102 x 176 mm */
+ wxPAPER_PENV_3, /* PRC Envelope #3 125 x 176 mm */
+ wxPAPER_PENV_4, /* PRC Envelope #4 110 x 208 mm */
+ wxPAPER_PENV_5, /* PRC Envelope #5 110 x 220 mm */
+ wxPAPER_PENV_6, /* PRC Envelope #6 120 x 230 mm */
+ wxPAPER_PENV_7, /* PRC Envelope #7 160 x 230 mm */
+ wxPAPER_PENV_8, /* PRC Envelope #8 120 x 309 mm */
+ wxPAPER_PENV_9, /* PRC Envelope #9 229 x 324 mm */
+ wxPAPER_PENV_10, /* PRC Envelope #10 324 x 458 mm */
+ wxPAPER_P16K_ROTATED, /* PRC 16K Rotated */
+ wxPAPER_P32K_ROTATED, /* PRC 32K Rotated */
+ wxPAPER_P32KBIG_ROTATED, /* PRC 32K(Big) Rotated */
+ wxPAPER_PENV_1_ROTATED, /* PRC Envelope #1 Rotated 165 x 102 mm */
+ wxPAPER_PENV_2_ROTATED, /* PRC Envelope #2 Rotated 176 x 102 mm */
+ wxPAPER_PENV_3_ROTATED, /* PRC Envelope #3 Rotated 176 x 125 mm */
+ wxPAPER_PENV_4_ROTATED, /* PRC Envelope #4 Rotated 208 x 110 mm */
+ wxPAPER_PENV_5_ROTATED, /* PRC Envelope #5 Rotated 220 x 110 mm */
+ wxPAPER_PENV_6_ROTATED, /* PRC Envelope #6 Rotated 230 x 120 mm */
+ wxPAPER_PENV_7_ROTATED, /* PRC Envelope #7 Rotated 230 x 160 mm */
+ wxPAPER_PENV_8_ROTATED, /* PRC Envelope #8 Rotated 309 x 120 mm */
+ wxPAPER_PENV_9_ROTATED, /* PRC Envelope #9 Rotated 324 x 229 mm */
+ wxPAPER_PENV_10_ROTATED /* PRC Envelope #10 Rotated 458 x 324 m */
+} wxPaperSize;
+
+/* Printing orientation */
+#ifndef wxPORTRAIT
+#define wxPORTRAIT 1
+#define wxLANDSCAPE 2
+#endif
+
+/* Duplex printing modes
+ */
+
+enum wxDuplexMode
+{
+ wxDUPLEX_SIMPLEX, /* Non-duplex */
+ wxDUPLEX_HORIZONTAL,
+ wxDUPLEX_VERTICAL
+};
+
+/* Print quality.
+ */
+
+#define wxPRINT_QUALITY_HIGH -1
+#define wxPRINT_QUALITY_MEDIUM -2
+#define wxPRINT_QUALITY_LOW -3
+#define wxPRINT_QUALITY_DRAFT -4
+
+typedef int wxPrintQuality;
+
+/* Print mode (currently PostScript only)
+ */
+
+enum wxPrintMode
+{
+ wxPRINT_MODE_NONE = 0,
+ wxPRINT_MODE_PREVIEW = 1, /* Preview in external application */
+ wxPRINT_MODE_FILE = 2, /* Print to file */
+ wxPRINT_MODE_PRINTER = 3, /* Send to printer */
+ wxPRINT_MODE_STREAM = 4 /* Send postscript data into a stream */
+};
+
+/* ---------------------------------------------------------------------------- */
+/* UpdateWindowUI flags */
+/* ---------------------------------------------------------------------------- */
+
+enum wxUpdateUI
+{
+ wxUPDATE_UI_NONE = 0x0000,
+ wxUPDATE_UI_RECURSE = 0x0001,
+ wxUPDATE_UI_FROMIDLE = 0x0002 /* Invoked from On(Internal)Idle */
+};
+
+/* ---------------------------------------------------------------------------- */
+/* Notification Event flags - used for dock icon bouncing, etc. */
+/* ---------------------------------------------------------------------------- */
+
+enum wxNotificationOptions
+{
+ wxNOTIFY_NONE = 0x0000,
+ wxNOTIFY_ONCE = 0x0001,
+ wxNOTIFY_REPEAT = 0x0002
+};
+
+/* ---------------------------------------------------------------------------- */
+/* miscellaneous */
+/* ---------------------------------------------------------------------------- */
+
+/* define this macro if font handling is done using the X font names */
+#if (defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__X__)
+ #define _WX_X_FONTLIKE
+#endif
+
+/* macro to specify "All Files" on different platforms */
+#if defined(__WXMSW__) || defined(__WXPM__)
+# 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
+# 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 unsigned char WXCOLORREF[6];
+typedef void* WXCGIMAGEREF;
+typedef void* WXHBITMAP;
+typedef void* WXHCURSOR;
+typedef void* WXHRGN;
+typedef void* WXRECTPTR;
+typedef void* WXPOINTPTR;
+typedef void* WXHWND;
+typedef void* WXEVENTREF;
+typedef void* WXEVENTHANDLERREF;
+typedef void* WXEVENTHANDLERCALLREF;
+typedef void* WXAPPLEEVENTREF;
+typedef void* WXHDC;
+typedef void* WXHMENU;
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef WX_OPAQUE_TYPE(CIconHandle ) * WXHICON ;
+typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ;
+
+
+/* typedef void* WXWidget; */
+/* typedef void* WXWindow; */
+typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
+typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
+typedef void* WXDisplay;
+
+/* typedef WindowPtr WXHWND; */
+/* typedef Handle WXHANDLE; */
+/* typedef CIconHandle WXHICON; */
+/* typedef unsigned long WXHFONT; */
+/* typedef MenuHandle WXHMENU; */
+/* typedef unsigned long WXHPEN; */
+/* typedef unsigned long WXHBRUSH; */
+/* typedef unsigned long WXHPALETTE; */
+/* typedef CursHandle WXHCURSOR; */
+/* typedef RgnHandle WXHRGN; */
+/* typedef unsigned long WXHACCEL; */
+/* typedef unsigned long WXHINSTANCE; */
+/* typedef unsigned long WXHIMAGELIST; */
+/* typedef unsigned long WXHGLOBAL; */
+/* typedef GrafPtr WXHDC; */
+/* typedef unsigned int WXWPARAM; */
+/* typedef long WXLPARAM; */
+/* typedef void * WXRGNDATA; */
+/* typedef void * WXMSG; */
+/* typedef unsigned long WXHCONV; */
+/* typedef unsigned long WXHKEY; */
+/* typedef void * WXDRAWITEMSTRUCT; */
+/* typedef void * WXMEASUREITEMSTRUCT; */
+/* typedef void * WXLPCREATESTRUCT; */
+/* typedef int (*WXFARPROC)(); */
+
+/* typedef WindowPtr WXWindow; */
+/* typedef ControlHandle WXWidget; */
+
+#endif
+
+#if defined( __WXCOCOA__ ) || ( defined(__WXMAC__) && defined(__DARWIN__) )
+
+/* 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);
+#ifdef __WXMAC__
+// things added for __WXMAC__
+DECLARE_WXCOCOA_OBJC_CLASS(NSString);
+#else
+// things only for __WXCOCOA__
+typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
+#endif
+#endif /* __WXCOCOA__ || ( __WXMAC__ &__DARWIN__)*/
+
+#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 unsigned int WXWPARAM;
+typedef long WXLPARAM;
+typedef 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 */
+typedef unsigned long WXHWND;
+typedef unsigned long WXHANDLE;
+typedef unsigned long WXHICON;
+typedef unsigned long WXHFONT;
+typedef unsigned long WXHMENU;
+typedef unsigned long WXHPEN;
+typedef unsigned long WXHBRUSH;
+typedef unsigned long WXHPALETTE;
+typedef unsigned long WXHCURSOR;
+typedef unsigned long WXHRGN;
+typedef unsigned long WXHACCEL;
+typedef unsigned long WXHBITMAP;
+typedef unsigned long WXHDC;
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef unsigned long WXCOLORREF;
+typedef void * WXMSG;
+typedef unsigned long WXHTREEITEM;
+
+typedef void * WXDRAWITEMSTRUCT;
+typedef void * WXMEASUREITEMSTRUCT;
+typedef void * WXLPCREATESTRUCT;
+
+typedef WXHWND WXWidget;
+#endif
+#ifdef __EMX__
+/* Need a well-known type for WXFARPROC
+ below. MPARAM is typedef'ed too late. */
+#define WXWPARAM void *
+#define WXLPARAM void *
+#else
+#define WXWPARAM MPARAM
+#define WXLPARAM MPARAM
+#endif
+#define RECT RECTL
+#define LOGFONT FATTRS
+#define LOWORD SHORT1FROMMP
+#define HIWORD SHORT2FROMMP
+
+typedef unsigned long WXMPARAM;
+typedef unsigned long WXMSGID;
+typedef void* WXRESULT;
+/* typedef int (*WXFARPROC)(); */
+/* some windows handles not defined by PM */
+typedef unsigned long HANDLE;
+typedef unsigned long HICON;
+typedef unsigned long HFONT;
+typedef unsigned long HMENU;
+typedef unsigned long HPEN;
+typedef unsigned long HBRUSH;
+typedef unsigned long HPALETTE;
+typedef unsigned long HCURSOR;
+typedef unsigned long HINSTANCE;
+typedef unsigned long HIMAGELIST;
+typedef unsigned long HGLOBAL;
+#endif /* WXPM || EMX */
+
+#if defined (__WXPM__)
+/* WIN32 graphics types for OS/2 GPI */
+
+/* RGB under OS2 is more like a PALETTEENTRY struct under Windows so we need a real RGB def */
+#define OS2RGB(r,g,b) ((DWORD)((unsigned char)(b) | ((unsigned char)(g) << 8)) | ((unsigned char)(r) << 16))
+
+typedef unsigned long COLORREF;
+#define GetRValue(rgb) ((unsigned char)((rgb) >> 16))
+#define GetGValue(rgb) ((unsigned char)(((unsigned short)(rgb)) >> 8))
+#define GetBValue(rgb) ((unsigned char)(rgb))
+#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
+#define PALETTERGB(r,g,b) (0x02000000 | OS2RGB(r,g,b))
+/* OS2's RGB/RGB2 is backwards from this */
+typedef struct tagPALETTEENTRY
+{
+ char bRed;
+ char bGreen;
+ char bBlue;
+ char bFlags;
+} PALETTEENTRY;
+typedef struct tagLOGPALETTE
+{
+ WORD palVersion;
+ WORD palNumentries;
+ WORD PALETTEENTRY[1];
+} LOGPALETTE;
+
+#if (defined(__VISAGECPP__) && (__IBMCPP__ < 400)) || defined (__WATCOMC__)
+ /* VA 3.0 for some reason needs base data types when typedefing a proc proto??? */
+typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*);
+#else
+#if defined(__EMX__) && !defined(_System)
+#define _System
+#endif
+typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM);
+#endif
+
+#endif /* __WXPM__ */
+
+
+#if defined(__WXMOTIF__) || defined(__WXX11__)
+/* Stand-ins for X/Xt/Motif types */
+typedef void* WXWindow;
+typedef void* WXWidget;
+typedef void* WXAppContext;
+typedef void* WXColormap;
+typedef void* WXColor;
+typedef void WXDisplay;
+typedef void WXEvent;
+typedef void* WXCursor;
+typedef void* WXPixmap;
+typedef void* WXFontStructPtr;
+typedef void* WXGC;
+typedef void* WXRegion;
+typedef void* WXFont;
+typedef void* WXImage;
+typedef void* WXFontList;
+typedef void* WXFontSet;
+typedef void* WXRendition;
+typedef void* WXRenderTable;
+typedef void* WXFontType; /* either a XmFontList or XmRenderTable */
+typedef void* WXString;
+
+typedef unsigned long Atom; /* this might fail on a few architectures */
+typedef long WXPixel; /* safety catch in src/motif/colour.cpp */
+
+#endif /* Motif */
+
+#ifdef __WXGTK__
+
+/* Stand-ins for GLIB types */
+typedef char gchar;
+typedef signed char gint8;
+typedef int gint;
+typedef unsigned guint;
+typedef unsigned long gulong;
+typedef void* gpointer;
+typedef struct _GSList GSList;
+
+/* Stand-ins for GDK types */
+typedef struct _GdkColor GdkColor;
+typedef struct _GdkColormap GdkColormap;
+typedef struct _GdkFont GdkFont;
+typedef struct _GdkGC GdkGC;
+typedef struct _GdkVisual GdkVisual;
+
+#ifdef __WXGTK20__
+typedef struct _GdkAtom *GdkAtom;
+typedef struct _GdkDrawable GdkWindow;
+typedef struct _GdkDrawable GdkBitmap;
+typedef struct _GdkDrawable GdkPixmap;
+#else /* GTK+ 1.2 */
+typedef gulong GdkAtom;
+typedef struct _GdkWindow GdkWindow;
+typedef struct _GdkWindow GdkBitmap;
+typedef struct _GdkWindow GdkPixmap;
+#endif /* GTK+ 1.2/2.0 */
+
+typedef struct _GdkCursor GdkCursor;
+typedef struct _GdkRegion GdkRegion;
+typedef struct _GdkDragContext GdkDragContext;
+
+#ifdef HAVE_XIM
+typedef struct _GdkIC GdkIC;
+typedef struct _GdkICAttr GdkICAttr;
+#endif
+
+/* Stand-ins for GTK types */
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkRcStyle GtkRcStyle;
+typedef struct _GtkAdjustment GtkAdjustment;
+typedef struct _GtkList GtkList;
+typedef struct _GtkToolbar GtkToolbar;
+typedef struct _GtkTooltips GtkTooltips;
+typedef struct _GtkNotebook GtkNotebook;
+typedef struct _GtkNotebookPage GtkNotebookPage;
+typedef struct _GtkAccelGroup GtkAccelGroup;
+typedef struct _GtkItemFactory GtkItemFactory;
+typedef struct _GtkSelectionData GtkSelectionData;
+typedef struct _GtkTextBuffer GtkTextBuffer;
+typedef struct _GtkRange GtkRange;
+
+typedef GtkWidget *WXWidget;
+
+#ifndef __WXGTK20__
+#define GTK_OBJECT_GET_CLASS(object) (GTK_OBJECT(object)->klass)
+#define GTK_CLASS_TYPE(klass) ((klass)->type)
+#endif
+
+#endif /* __WXGTK__ */
+
+#if defined(__WXGTK20__) || (defined(__WXX11__) && wxUSE_UNICODE)
+#define wxUSE_PANGO 1
+#else
+#define wxUSE_PANGO 0
+#endif
+
+#if wxUSE_PANGO
+/* Stand-ins for Pango types */
+typedef struct _PangoContext PangoContext;
+typedef struct _PangoLayout PangoLayout;
+typedef struct _PangoFontDescription PangoFontDescription;
+#endif
+
+#ifdef __WXMGL__
+typedef struct window_t *WXWidget;
+#endif /* MGL */
+
+#ifdef __WXDFB__
+/* DirectFB doesn't have the concept of non-TLW window, so use
+ something arbitrary */
+typedef const void* WXWidget;
+#endif /* DFB */
+
+/* This is required because of clashing macros in windows.h, which may be */
+/* included before or after wxWidgets classes, and therefore must be */
+/* disabled here before any significant wxWidgets headers are included. */
+#ifdef __WXMSW__
+#include "wx/msw/winundef.h"
+#endif /* __WXMSW__ */
+
+/* --------------------------------------------------------------------------- */
+/* macro to define a class without copy ctor nor assignment operator */
+/* --------------------------------------------------------------------------- */
+
+#define DECLARE_NO_COPY_CLASS(classname) \
+ private: \
+ classname(const classname&); \
+ classname& operator=(const classname&);
+
+#define DECLARE_NO_ASSIGN_CLASS(classname) \
+ private: \
+ classname& operator=(const classname&);
+
+/* --------------------------------------------------------------------------- */
+/* If a manifest is being automatically generated, add common controls 6 to it */
+/* --------------------------------------------------------------------------- */
+
+#if (!defined wxUSE_NO_MANIFEST || wxUSE_NO_MANIFEST == 0 ) && \
+ ( defined _MSC_FULL_VER && _MSC_FULL_VER >= 140040130 )
+
+#define WX_CC_MANIFEST(cpu) \
+ "/manifestdependency:\"type='win32' \
+ name='Microsoft.Windows.Common-Controls' \
+ version='6.0.0.0' \
+ processorArchitecture='"cpu"' \
+ publicKeyToken='6595b64144ccf1df' \
+ language='*'\""
+
+#if defined _M_IX86
+ #pragma comment(linker, WX_CC_MANIFEST("x86"))
+#elif defined _M_X64
+ #pragma comment(linker, WX_CC_MANIFEST("amd64"))
+#elif defined _M_IA64
+ #pragma comment(linker, WX_CC_MANIFEST("ia64"))
+#else
+ #pragma comment(linker, WX_CC_MANIFEST("*"))
+#endif
+
+#endif /* !wxUSE_NO_MANIFEST && _MSC_FULL_VER >= 140040130 */
+
+#endif
+ /* _WX_DEFS_H_ */
diff --git a/3rdparty/wxWidgets/include/wx/dialog.h b/3rdparty/wxWidgets/include/wx/dialog.h
new file mode 100644
index 0000000000..ffb69db186
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dialog.h
@@ -0,0 +1,167 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dialog.h
+// Purpose: wxDialogBase class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 29.06.99
+// RCS-ID: $Id: dialog.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIALOG_H_BASE_
+#define _WX_DIALOG_H_BASE_
+
+#include "wx/defs.h"
+#include "wx/containr.h"
+#include "wx/toplevel.h"
+
+class WXDLLIMPEXP_FWD_CORE wxSizer;
+class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer;
+
+#define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
+
+#ifdef __WXWINCE__
+#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER)
+#else
+#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX)
+#endif
+
+extern WXDLLEXPORT_DATA(const wxChar) wxDialogNameStr[];
+
+class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
+{
+public:
+ enum
+ {
+ // all flags allowed in wxDialogBase::CreateButtonSizer()
+ ButtonSizerFlags = wxOK|wxCANCEL|wxYES|wxNO|wxHELP|wxNO_DEFAULT
+ };
+
+ wxDialogBase() { Init(); }
+ virtual ~wxDialogBase() { }
+
+ // define public wxDialog methods to be implemented by the derived classes
+ virtual int ShowModal() = 0;
+ virtual void EndModal(int retCode) = 0;
+ virtual bool IsModal() const = 0;
+
+
+ // Modal dialogs have a return code - usually the id of the last
+ // pressed button
+ void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
+ int GetReturnCode() const { return m_returnCode; }
+
+ // Set the identifier for the affirmative button: this button will close
+ // the dialog after validating data and calling TransferDataFromWindow()
+ void SetAffirmativeId(int affirmativeId);
+ int GetAffirmativeId() const { return m_affirmativeId; }
+
+ // Set identifier for Esc key translation: the button with this id will
+ // close the dialog without doing anything else; special value wxID_NONE
+ // means to not handle Esc at all while wxID_ANY means to map Esc to
+ // wxID_CANCEL if present and GetAffirmativeId() otherwise
+ void SetEscapeId(int escapeId);
+ int GetEscapeId() const { return m_escapeId; }
+
+#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
+ // splits text up at newlines and places the
+ // lines into a vertical wxBoxSizer
+ wxSizer *CreateTextSizer( const wxString &message );
+#endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
+
+ // returns a horizontal wxBoxSizer containing the given buttons
+ //
+ // notice that the returned sizer can be NULL if no buttons are put in the
+ // sizer (this mostly happens under smart phones and other atypical
+ // platforms which have hardware buttons replacing OK/Cancel and such)
+ wxSizer *CreateButtonSizer(long flags);
+
+ // returns the sizer containing CreateButtonSizer() below a separating
+ // static line for the platforms which use static lines for items
+ // separation (i.e. not Mac)
+ wxSizer *CreateSeparatedButtonSizer(long flags);
+
+#if wxUSE_BUTTON
+ wxStdDialogButtonSizer *CreateStdDialogButtonSizer( long flags );
+#endif // wxUSE_BUTTON
+
+protected:
+ // emulate click of a button with the given id if it's present in the dialog
+ //
+ // return true if button was "clicked" or false if we don't have it
+ bool EmulateButtonClickIfPresent(int id);
+
+ // this function is used by OnCharHook() to decide whether the given key
+ // should close the dialog
+ //
+ // for most platforms the default implementation (which just checks for
+ // Esc) is sufficient, but Mac port also adds Cmd-. here and other ports
+ // could do something different if needed
+ virtual bool IsEscapeKey(const wxKeyEvent& event);
+
+ // end either modal or modeless dialog, for the modal dialog rc is used as
+ // the dialog return code
+ void EndDialog(int rc);
+
+ // call Validate() and TransferDataFromWindow() and close dialog with
+ // wxID_OK return code
+ void AcceptAndClose();
+
+
+ // The return code from modal dialog
+ int m_returnCode;
+
+ // The identifier for the affirmative button (usually wxID_OK)
+ int m_affirmativeId;
+
+ // The identifier for cancel button (usually wxID_CANCEL)
+ int m_escapeId;
+
+private:
+ // common part of all ctors
+ void Init();
+
+ // handle Esc key presses
+ void OnCharHook(wxKeyEvent& event);
+
+ // handle closing the dialog window
+ void OnCloseWindow(wxCloseEvent& event);
+
+ // handle the standard buttons
+ void OnButton(wxCommandEvent& event);
+
+ // update the background colour
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+
+ DECLARE_NO_COPY_CLASS(wxDialogBase)
+ DECLARE_EVENT_TABLE()
+ WX_DECLARE_CONTROL_CONTAINER();
+};
+
+
+#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
+ #include "wx/univ/dialog.h"
+#else
+ #if defined(__WXPALMOS__)
+ #include "wx/palmos/dialog.h"
+ #elif defined(__WXMSW__)
+ #include "wx/msw/dialog.h"
+ #elif defined(__WXMOTIF__)
+ #include "wx/motif/dialog.h"
+ #elif defined(__WXGTK20__)
+ #include "wx/gtk/dialog.h"
+ #elif defined(__WXGTK__)
+ #include "wx/gtk1/dialog.h"
+ #elif defined(__WXMAC__)
+ #include "wx/mac/dialog.h"
+ #elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dialog.h"
+ #elif defined(__WXPM__)
+ #include "wx/os2/dialog.h"
+ #endif
+#endif
+
+#endif
+ // _WX_DIALOG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dialup.h b/3rdparty/wxWidgets/include/wx/dialup.h
new file mode 100644
index 0000000000..c2dd296def
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dialup.h
@@ -0,0 +1,201 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dialup.h
+// Purpose: Network related wxWidgets classes and functions
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 07.07.99
+// RCS-ID: $Id: dialup.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIALUP_H
+#define _WX_DIALUP_H
+
+#if wxUSE_DIALUP_MANAGER
+
+#include "wx/event.h"
+
+// ----------------------------------------------------------------------------
+// misc
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_BASE wxArrayString;
+
+#define WXDIALUP_MANAGER_DEFAULT_BEACONHOST wxT("www.yahoo.com")
+
+// ----------------------------------------------------------------------------
+// A class which groups functions dealing with connecting to the network from a
+// workstation using dial-up access to the net. There is at most one instance
+// of this class in the program accessed via GetDialUpManager().
+// ----------------------------------------------------------------------------
+
+/* TODO
+ *
+ * 1. more configurability for Unix: i.e. how to initiate the connection, how
+ * to check for online status, &c.
+ * 2. a function to enumerate all connections (ISPs) and show a dialog in
+ * Dial() allowing to choose between them if no ISP given
+ * 3. add an async version of dialing functions which notify the caller about
+ * the progress (or may be even start another thread to monitor it)
+ * 4. the static creation/accessor functions are not MT-safe - but is this
+ * really crucial? I think we may suppose they're always called from the
+ * main thread?
+ */
+
+class WXDLLEXPORT wxDialUpManager
+{
+public:
+ // this function should create and return the object of the
+ // platform-specific class derived from wxDialUpManager. It's implemented
+ // in the platform-specific source files.
+ static wxDialUpManager *Create();
+
+ // could the dialup manager be initialized correctly? If this function
+ // returns false, no other functions will work neither, so it's a good idea
+ // to call this function and check its result before calling any other
+ // wxDialUpManager methods
+ virtual bool IsOk() const = 0;
+
+ // virtual dtor for any base class
+ virtual ~wxDialUpManager() { }
+
+ // operations
+ // ----------
+
+ // fills the array with the names of all possible values for the first
+ // parameter to Dial() on this machine and returns their number (may be 0)
+ virtual size_t GetISPNames(wxArrayString& names) const = 0;
+
+ // dial the given ISP, use username and password to authentificate
+ //
+ // if no nameOfISP is given, the function will select the default one
+ //
+ // if no username/password are given, the function will try to do without
+ // them, but will ask the user if really needed
+ //
+ // if async parameter is false, the function waits until the end of dialing
+ // and returns true upon successful completion.
+ // if async is true, the function only initiates the connection and returns
+ // immediately - the result is reported via events (an event is sent
+ // anyhow, but if dialing failed it will be a DISCONNECTED one)
+ virtual bool Dial(const wxString& nameOfISP = wxEmptyString,
+ const wxString& username = wxEmptyString,
+ const wxString& password = wxEmptyString,
+ bool async = true) = 0;
+
+ // returns true if (async) dialing is in progress
+ virtual bool IsDialing() const = 0;
+
+ // cancel dialing the number initiated with Dial(async = true)
+ // NB: this won't result in DISCONNECTED event being sent
+ virtual bool CancelDialing() = 0;
+
+ // hang up the currently active dial up connection
+ virtual bool HangUp() = 0;
+
+ // online status
+ // -------------
+
+ // returns true if the computer has a permanent network connection (i.e. is
+ // on a LAN) and so there is no need to use Dial() function to go online
+ //
+ // NB: this functions tries to guess the result and it is not always
+ // guaranteed to be correct, so it's better to ask user for
+ // confirmation or give him a possibility to override it
+ virtual bool IsAlwaysOnline() const = 0;
+
+ // returns true if the computer is connected to the network: under Windows,
+ // this just means that a RAS connection exists, under Unix we check that
+ // the "well-known host" (as specified by SetWellKnownHost) is reachable
+ virtual bool IsOnline() const = 0;
+
+ // sometimes the built-in logic for determining the online status may fail,
+ // so, in general, the user should be allowed to override it. This function
+ // allows to forcefully set the online status - whatever our internal
+ // algorithm may think about it.
+ virtual void SetOnlineStatus(bool isOnline = true) = 0;
+
+ // set misc wxDialUpManager options
+ // --------------------------------
+
+ // enable automatical checks for the connection status and sending of
+ // wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval
+ // parameter is only for Unix where we do the check manually: under
+ // Windows, the notification about the change of connection status is
+ // instantenous.
+ //
+ // Returns false if couldn't set up automatic check for online status.
+ virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds = 60) = 0;
+
+ // disable automatic check for connection status change - notice that the
+ // wxEVT_DIALUP_XXX events won't be sent any more neither.
+ virtual void DisableAutoCheckOnlineStatus() = 0;
+
+ // additional Unix-only configuration
+ // ----------------------------------
+
+ // under Unix, the value of well-known host is used to check whether we're
+ // connected to the internet. It's unused under Windows, but this function
+ // is always safe to call. The default value is www.yahoo.com.
+ virtual void SetWellKnownHost(const wxString& hostname,
+ int portno = 80) = 0;
+
+ // Sets the commands to start up the network and to hang up again. Used by
+ // the Unix implementations only.
+ virtual void
+ SetConnectCommand(const wxString& commandDial = wxT("/usr/bin/pon"),
+ const wxString& commandHangup = wxT("/usr/bin/poff")) = 0;
+};
+
+// ----------------------------------------------------------------------------
+// wxDialUpManager events
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED, 450)
+ DECLARE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED, 451)
+END_DECLARE_EVENT_TYPES()
+
+// the event class for the dialup events
+class WXDLLEXPORT wxDialUpEvent : public wxEvent
+{
+public:
+ wxDialUpEvent(bool isConnected, bool isOwnEvent) : wxEvent(isOwnEvent)
+ {
+ SetEventType(isConnected ? wxEVT_DIALUP_CONNECTED
+ : wxEVT_DIALUP_DISCONNECTED);
+ }
+
+ // is this a CONNECTED or DISCONNECTED event?
+ bool IsConnectedEvent() const
+ { return GetEventType() == wxEVT_DIALUP_CONNECTED; }
+
+ // does this event come from wxDialUpManager::Dial() or from some extrenal
+ // process (i.e. does it result from our own attempt to establish the
+ // connection)?
+ bool IsOwnEvent() const { return m_id != 0; }
+
+ // implement the base class pure virtual
+ virtual wxEvent *Clone() const { return new wxDialUpEvent(*this); }
+
+private:
+ DECLARE_NO_ASSIGN_CLASS(wxDialUpEvent)
+};
+
+// the type of dialup event handler function
+typedef void (wxEvtHandler::*wxDialUpEventFunction)(wxDialUpEvent&);
+
+#define wxDialUpEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDialUpEventFunction, &func)
+
+// macros to catch dialup events
+#define EVT_DIALUP_CONNECTED(func) \
+ wx__DECLARE_EVT0(wxEVT_DIALUP_CONNECTED, wxDialUpEventHandler(func))
+#define EVT_DIALUP_DISCONNECTED(func) \
+ wx__DECLARE_EVT0(wxEVT_DIALUP_DISCONNECTED, wxDialUpEventHandler(func))
+
+
+#endif // wxUSE_DIALUP_MANAGER
+
+#endif // _WX_DIALUP_H
diff --git a/3rdparty/wxWidgets/include/wx/dir.h b/3rdparty/wxWidgets/include/wx/dir.h
new file mode 100644
index 0000000000..0a5b2cffea
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dir.h
@@ -0,0 +1,161 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dir.h
+// Purpose: wxDir is a class for enumerating the files in a directory
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 08.12.99
+// RCS-ID: $Id: dir.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) 1999 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIR_H_
+#define _WX_DIR_H_
+
+#include "wx/longlong.h"
+#include "wx/string.h"
+
+class WXDLLIMPEXP_FWD_BASE wxArrayString;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// these flags define what kind of filenames is included in the list of files
+// enumerated by GetFirst/GetNext
+enum
+{
+ wxDIR_FILES = 0x0001, // include files
+ wxDIR_DIRS = 0x0002, // include directories
+ wxDIR_HIDDEN = 0x0004, // include hidden files
+ wxDIR_DOTDOT = 0x0008, // include '.' and '..'
+
+ // by default, enumerate everything except '.' and '..'
+ wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN
+};
+
+// these constants are possible return value of wxDirTraverser::OnDir()
+enum wxDirTraverseResult
+{
+ wxDIR_IGNORE = -1, // ignore this directory but continue with others
+ wxDIR_STOP, // stop traversing
+ wxDIR_CONTINUE // continue into this directory
+};
+
+// ----------------------------------------------------------------------------
+// wxDirTraverser: helper class for wxDir::Traverse()
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxDirTraverser
+{
+public:
+ /// a virtual dtor has been provided since this class has virtual members
+ virtual ~wxDirTraverser() { }
+ // called for each file found by wxDir::Traverse()
+ //
+ // return wxDIR_STOP or wxDIR_CONTINUE from here (wxDIR_IGNORE doesn't
+ // make sense)
+ virtual wxDirTraverseResult OnFile(const wxString& filename) = 0;
+
+ // called for each directory found by wxDir::Traverse()
+ //
+ // return one of the enum elements defined above
+ virtual wxDirTraverseResult OnDir(const wxString& dirname) = 0;
+
+ // called for each directory which we couldn't open during our traversal
+ // of the directory tyree
+ //
+ // this method can also return either wxDIR_STOP, wxDIR_IGNORE or
+ // wxDIR_CONTINUE but the latter is treated specially: it means to retry
+ // opening the directory and so may lead to infinite loop if it is
+ // returned unconditionally, be careful with this!
+ //
+ // the base class version always returns wxDIR_IGNORE
+ virtual wxDirTraverseResult OnOpenError(const wxString& dirname);
+};
+
+// ----------------------------------------------------------------------------
+// wxDir: portable equivalent of {open/read/close}dir functions
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_BASE wxDirData;
+
+class WXDLLIMPEXP_BASE wxDir
+{
+public:
+ // test for existence of a directory with the given name
+ static bool Exists(const wxString& dir);
+
+ // ctors
+ // -----
+
+ // default, use Open()
+ wxDir() { m_data = NULL; }
+
+ // opens the directory for enumeration, use IsOpened() to test success
+ wxDir(const wxString& dir);
+
+ // dtor cleans up the associated ressources
+ ~wxDir();
+
+ // open the directory for enumerating
+ bool Open(const wxString& dir);
+
+ // returns true if the directory was successfully opened
+ bool IsOpened() const;
+
+ // get the full name of the directory (without '/' at the end)
+ wxString GetName() const;
+
+ // file enumeration routines
+ // -------------------------
+
+ // start enumerating all files matching filespec (or all files if it is
+ // empty) and flags, return true on success
+ bool GetFirst(wxString *filename,
+ const wxString& filespec = wxEmptyString,
+ int flags = wxDIR_DEFAULT) const;
+
+ // get next file in the enumeration started with GetFirst()
+ bool GetNext(wxString *filename) const;
+
+ // return true if this directory has any files in it
+ bool HasFiles(const wxString& spec = wxEmptyString);
+
+ // return true if this directory has any subdirectories
+ bool HasSubDirs(const wxString& spec = wxEmptyString);
+
+ // enumerate all files in this directory and its subdirectories
+ //
+ // return the number of files found
+ size_t Traverse(wxDirTraverser& sink,
+ const wxString& filespec = wxEmptyString,
+ int flags = wxDIR_DEFAULT) const;
+
+ // simplest version of Traverse(): get the names of all files under this
+ // directory into filenames array, return the number of files
+ static size_t GetAllFiles(const wxString& dirname,
+ wxArrayString *files,
+ const wxString& filespec = wxEmptyString,
+ int flags = wxDIR_DEFAULT);
+
+ // check if there any files matching the given filespec under the given
+ // directory (i.e. searches recursively), return the file path if found or
+ // empty string otherwise
+ static wxString FindFirst(const wxString& dirname,
+ const wxString& filespec,
+ int flags = wxDIR_DEFAULT);
+
+ // returns the size of all directories recursively found in given path
+ static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL);
+
+private:
+ friend class wxDirData;
+
+ wxDirData *m_data;
+
+ DECLARE_NO_COPY_CLASS(wxDir)
+};
+
+#endif // _WX_DIR_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/dirctrl.h b/3rdparty/wxWidgets/include/wx/dirctrl.h
new file mode 100644
index 0000000000..704f8bb768
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dirctrl.h
@@ -0,0 +1,18 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dirctrl.h
+// Purpose: Directory control base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dirctrl.h 33948 2005-05-04 18:57:50Z JS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIRCTRL_H_BASE_
+#define _WX_DIRCTRL_H_BASE_
+
+#include "wx/generic/dirctrlg.h"
+
+#endif
+ // _WX_DIRCTRL_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dirdlg.h b/3rdparty/wxWidgets/include/wx/dirdlg.h
new file mode 100644
index 0000000000..22ae354714
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dirdlg.h
@@ -0,0 +1,141 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dirdlg.h
+// Purpose: wxDirDialog base class
+// Author: Robert Roebling
+// Modified by:
+// Created:
+// Copyright: (c) Robert Roebling
+// RCS-ID: $Id: dirdlg.h 44027 2006-12-21 19:26:48Z VZ $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIRDLG_H_BASE_
+#define _WX_DIRDLG_H_BASE_
+
+#if wxUSE_DIRDLG
+
+#include "wx/dialog.h"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogDefaultFolderStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
+
+#define wxDD_CHANGE_DIR 0x0100
+#define wxDD_DIR_MUST_EXIST 0x0200
+
+// deprecated, on by default now, use wxDD_DIR_MUST_EXIST to disable it
+#define wxDD_NEW_DIR_BUTTON 0
+
+#ifdef __WXWINCE__
+ #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
+#else
+ #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
+#endif
+
+//-------------------------------------------------------------------------
+// wxDirDialogBase
+//-------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDirDialogBase : public wxDialog
+{
+public:
+ wxDirDialogBase() {}
+ wxDirDialogBase(wxWindow *parent,
+ const wxString& title = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxDirDialogNameStr)
+ {
+ Create(parent, title, defaultPath, style, pos, sz, name);
+ }
+
+ virtual ~wxDirDialogBase() {}
+
+
+ bool Create(wxWindow *parent,
+ const wxString& title = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxDirDialogNameStr)
+ {
+ if (!wxDialog::Create(parent, wxID_ANY, title, pos, sz, style, name))
+ return false;
+ m_path = defaultPath;
+ m_message = title;
+ return true;
+ }
+
+#if WXWIN_COMPATIBILITY_2_6
+
+ wxDEPRECATED( long GetStyle() const );
+ wxDEPRECATED( void SetStyle(long style) );
+
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ virtual void SetMessage(const wxString& message) { m_message = message; }
+ virtual void SetPath(const wxString& path) { m_path = path; }
+
+ virtual wxString GetMessage() const { return m_message; }
+ virtual wxString GetPath() const { return m_path; }
+
+protected:
+ wxString m_message;
+ wxString m_path;
+};
+
+
+// Universal and non-port related switches with need for generic implementation
+#if defined(__WXUNIVERSAL__)
+ #include "wx/generic/dirdlgg.h"
+ #define wxDirDialog wxGenericDirDialog
+#elif defined(__WXMSW__) && (defined(__SALFORDC__) || \
+ !wxUSE_OLE || \
+ (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS))
+ #include "wx/generic/dirdlgg.h"
+ #define wxDirDialog wxGenericDirDialog
+#elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__)
+ #include "wx/generic/dirdlgg.h" // MS PocketPC or MS Smartphone
+ #define wxDirDialog wxGenericDirDialog
+#elif defined(__WXMSW__)
+ #include "wx/msw/dirdlg.h" // Native MSW
+#elif defined(__WXGTK24__)
+ #include "wx/gtk/dirdlg.h" // Native GTK for gtk2.4
+#elif defined(__WXGTK__)
+ #include "wx/generic/dirdlgg.h"
+ #define wxDirDialog wxGenericDirDialog
+#elif defined(__WXMAC__)
+ #include "wx/mac/dirdlg.h" // Native Mac
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/dirdlg.h" // Native Cocoa
+#elif defined(__WXMOTIF__) || \
+ defined(__WXX11__) || \
+ defined(__WXMGL__) || \
+ defined(__WXCOCOA__) || \
+ defined(__WXPM__)
+ #include "wx/generic/dirdlgg.h" // Other ports use generic implementation
+ #define wxDirDialog wxGenericDirDialog
+#endif
+
+// ----------------------------------------------------------------------------
+// common ::wxDirSelector() function
+// ----------------------------------------------------------------------------
+
+WXDLLEXPORT wxString
+wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ wxWindow *parent = NULL);
+
+#endif // wxUSE_DIRDLG
+
+#endif
+ // _WX_DIRDLG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/display.h b/3rdparty/wxWidgets/include/wx/display.h
new file mode 100644
index 0000000000..81f812c601
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/display.h
@@ -0,0 +1,128 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/display.h
+// Purpose: wxDisplay class
+// Author: Royce Mitchell III, Vadim Zeitlin
+// Created: 06/21/02
+// RCS-ID: $Id: display.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) 2002-2006 wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DISPLAY_H_BASE_
+#define _WX_DISPLAY_H_BASE_
+
+// NB: no #if wxUSE_DISPLAY here, the display geometry part of this class (but
+// not the video mode stuff) is always available but if wxUSE_DISPLAY == 0
+// it becomes just a trivial wrapper around the old wxDisplayXXX() functions
+
+#if wxUSE_DISPLAY
+ #include "wx/dynarray.h"
+ #include "wx/vidmode.h"
+
+ WX_DECLARE_EXPORTED_OBJARRAY(wxVideoMode, wxArrayVideoModes);
+
+ // default, uninitialized, video mode object
+ extern WXDLLEXPORT_DATA(const wxVideoMode) wxDefaultVideoMode;
+#endif // wxUSE_DISPLAY
+
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxPoint;
+class WXDLLIMPEXP_FWD_CORE wxRect;
+class WXDLLIMPEXP_FWD_BASE wxString;
+
+class WXDLLIMPEXP_FWD_CORE wxDisplayFactory;
+class WXDLLIMPEXP_FWD_CORE wxDisplayImpl;
+
+// ----------------------------------------------------------------------------
+// wxDisplay: represents a display/monitor attached to the system
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDisplay
+{
+public:
+ // initialize the object containing all information about the given
+ // display
+ //
+ // the displays are numbered from 0 to GetCount() - 1, 0 is always the
+ // primary display and the only one which is always supported
+ wxDisplay(unsigned n = 0);
+
+ // dtor is not virtual as this is a concrete class not meant to be derived
+ // from
+ ~wxDisplay();
+
+
+ // return the number of available displays, valid parameters to
+ // wxDisplay ctor are from 0 up to this number
+ static unsigned GetCount();
+
+ // find the display where the given point lies, return wxNOT_FOUND if
+ // it doesn't belong to any display
+ static int GetFromPoint(const wxPoint& pt);
+
+ // find the display where the given window lies, return wxNOT_FOUND if it
+ // is not shown at all
+ static int GetFromWindow(wxWindow *window);
+
+
+ // return true if the object was initialized successfully
+ bool IsOk() const { return m_impl != NULL; }
+
+ // get the full display size
+ wxRect GetGeometry() const;
+
+ // get the client area of the display, i.e. without taskbars and such
+ wxRect GetClientArea() const;
+
+ // name may be empty
+ wxString GetName() const;
+
+ // display 0 is usually the primary display
+ bool IsPrimary() const;
+
+
+#if wxUSE_DISPLAY
+ // enumerate all video modes supported by this display matching the given
+ // one (in the sense of wxVideoMode::Match())
+ //
+ // as any mode matches the default value of the argument and there is
+ // always at least one video mode supported by display, the returned array
+ // is only empty for the default value of the argument if this function is
+ // not supported at all on this platform
+ wxArrayVideoModes
+ GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const;
+
+ // get current video mode
+ wxVideoMode GetCurrentMode() const;
+
+ // change current mode, return true if succeeded, false otherwise
+ //
+ // for the default value of the argument restores the video mode to default
+ bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
+
+ // restore the default video mode (just a more readable synonym)
+ void ResetMode() { (void)ChangeMode(); }
+#endif // wxUSE_DISPLAY
+
+private:
+ // returns the factory used to implement our static methods and create new
+ // displays
+ static wxDisplayFactory& Factory();
+
+ // creates the factory object, called by Factory() when it is called for
+ // the first time and should return a pointer allocated with new (the
+ // caller will delete it)
+ //
+ // this method must be implemented in platform-specific code if
+ // wxUSE_DISPLAY == 1 (if it is 0 we provide the stub in common code)
+ static wxDisplayFactory *CreateFactory();
+
+
+ // the real implementation
+ wxDisplayImpl *m_impl;
+
+
+ DECLARE_NO_COPY_CLASS(wxDisplay)
+};
+
+#endif // _WX_DISPLAY_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/display_impl.h b/3rdparty/wxWidgets/include/wx/display_impl.h
new file mode 100644
index 0000000000..f79766e030
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/display_impl.h
@@ -0,0 +1,110 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/display_impl.h
+// Purpose: wxDisplayImpl class declaration
+// Author: Vadim Zeitlin
+// Created: 2006-03-15
+// RCS-ID: $Id: display_impl.h 41548 2006-10-02 05:38:05Z PC $
+// Copyright: (c) 2002-2006 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DISPLAY_IMPL_H_BASE_
+#define _WX_DISPLAY_IMPL_H_BASE_
+
+#include "wx/gdicmn.h" // for wxRect
+
+// ----------------------------------------------------------------------------
+// wxDisplayFactory: allows to create wxDisplay objects
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDisplayFactory
+{
+public:
+ wxDisplayFactory() { }
+ virtual ~wxDisplayFactory() { }
+
+ // create a new display object
+ //
+ // it can return a NULL pointer if the display creation failed
+ virtual wxDisplayImpl *CreateDisplay(unsigned n) = 0;
+
+ // get the total number of displays
+ virtual unsigned GetCount() = 0;
+
+ // return the display for the given point or wxNOT_FOUND
+ virtual int GetFromPoint(const wxPoint& pt) = 0;
+
+ // return the display for the given window or wxNOT_FOUND
+ //
+ // the window pointer must not be NULL (i.e. caller should check it)
+ virtual int GetFromWindow(wxWindow *window);
+};
+
+// ----------------------------------------------------------------------------
+// wxDisplayImpl: base class for all wxDisplay implementations
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDisplayImpl
+{
+public:
+ // virtual dtor for this base class
+ virtual ~wxDisplayImpl() { }
+
+
+ // return the full area of this display
+ virtual wxRect GetGeometry() const = 0;
+
+ // return the area of the display available for normal windows
+ virtual wxRect GetClientArea() const { return GetGeometry(); }
+
+ // return the name (may be empty)
+ virtual wxString GetName() const = 0;
+
+ // return the index of this display
+ unsigned GetIndex() const { return m_index; }
+
+ // return true if this is the primary monitor (usually one with index 0)
+ virtual bool IsPrimary() const { return GetIndex() == 0; }
+
+
+#if wxUSE_DISPLAY
+ // implements wxDisplay::GetModes()
+ virtual wxArrayVideoModes GetModes(const wxVideoMode& mode) const = 0;
+
+ // get current video mode
+ virtual wxVideoMode GetCurrentMode() const = 0;
+
+ // change current mode, return true if succeeded, false otherwise
+ virtual bool ChangeMode(const wxVideoMode& mode) = 0;
+#endif // wxUSE_DISPLAY
+
+protected:
+ // create the object providing access to the display with the given index
+ wxDisplayImpl(unsigned n) : m_index(n) { }
+
+
+ // the index of this display (0 is always the primary one)
+ const unsigned m_index;
+
+
+ friend class wxDisplayFactory;
+
+ DECLARE_NO_COPY_CLASS(wxDisplayImpl)
+};
+
+// ----------------------------------------------------------------------------
+// wxDisplayFactorySingle
+// ----------------------------------------------------------------------------
+
+// this is a stub implementation using single/main display only, it is
+// available even if wxUSE_DISPLAY == 0
+class WXDLLEXPORT wxDisplayFactorySingle : public wxDisplayFactory
+{
+public:
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
+ virtual unsigned GetCount() { return 1; }
+ virtual int GetFromPoint(const wxPoint& pt);
+};
+
+#endif // _WX_DISPLAY_IMPL_H_BASE_
+
diff --git a/3rdparty/wxWidgets/include/wx/dlimpexp.h b/3rdparty/wxWidgets/include/wx/dlimpexp.h
new file mode 100644
index 0000000000..c6fc095cee
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dlimpexp.h
@@ -0,0 +1,275 @@
+/*
+ * Name: wx/dlimpexp.h
+ * Purpose: Macros for declaring DLL-imported/exported functions
+ * Author: Vadim Zeitlin
+ * Modified by:
+ * Created: 16.10.2003 (extracted from wx/defs.h)
+ * RCS-ID: $Id: dlimpexp.h 49563 2007-10-31 20:46:21Z VZ $
+ * Copyright: (c) 2003 Vadim Zeitlin
+ * Licence: wxWindows licence
+ */
+
+/*
+ This is a C file, not C++ one, do not use C++ comments here!
+ */
+
+#ifndef _WX_DLIMPEXP_H_
+#define _WX_DLIMPEXP_H_
+
+#if defined(__WXMSW__)
+ /*
+ __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
+ as VC++ and gcc
+ */
+# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
+# define WXEXPORT __declspec(dllexport)
+# define WXIMPORT __declspec(dllimport)
+# else /* compiler doesn't support __declspec() */
+# define WXEXPORT
+# define WXIMPORT
+# endif
+#elif defined(__WXPM__)
+# if defined (__WATCOMC__)
+# define WXEXPORT __declspec(dllexport)
+ /*
+ __declspec(dllimport) prepends __imp to imported symbols. We do NOT
+ want that!
+ */
+# define WXIMPORT
+# elif defined(__EMX__)
+# define WXEXPORT
+# define WXIMPORT
+# elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
+# define WXEXPORT _Export
+# define WXIMPORT _Export
+# endif
+#elif defined(__WXMAC__) || defined(__WXCOCOA__)
+# ifdef __MWERKS__
+# define WXEXPORT __declspec(export)
+# define WXIMPORT __declspec(import)
+# endif
+#elif defined(__CYGWIN__)
+# define WXEXPORT __declspec(dllexport)
+# define WXIMPORT __declspec(dllimport)
+#endif
+
+/* for other platforms/compilers we don't anything */
+#ifndef WXEXPORT
+# define WXEXPORT
+# define WXIMPORT
+#endif
+
+/*
+ We support building wxWidgets as a set of several libraries but we don't
+ support arbitrary combinations of libs/DLLs: either we build all of them as
+ DLLs (in which case WXMAKINGDLL is defined) or none (it isn't).
+
+ However we have a problem because we need separate WXDLLEXPORT versions for
+ different libraries as, for example, wxString class should be dllexported
+ when compiled in wxBase and dllimported otherwise, so we do define separate
+ WXMAKING/USINGDLL_XYZ constants for each component XYZ.
+ */
+#ifdef WXMAKINGDLL
+# if wxUSE_BASE
+# define WXMAKINGDLL_BASE
+# endif
+
+# define WXMAKINGDLL_NET
+# define WXMAKINGDLL_CORE
+# define WXMAKINGDLL_ADV
+# define WXMAKINGDLL_QA
+# define WXMAKINGDLL_ODBC
+# define WXMAKINGDLL_DBGRID
+# define WXMAKINGDLL_HTML
+# define WXMAKINGDLL_GL
+# define WXMAKINGDLL_XML
+# define WXMAKINGDLL_XRC
+# define WXMAKINGDLL_AUI
+# define WXMAKINGDLL_RICHTEXT
+# define WXMAKINGDLL_MEDIA
+#endif /* WXMAKINGDLL */
+
+/*
+ WXDLLEXPORT maps to export declaration when building the DLL, to import
+ declaration if using it or to nothing at all if we don't use wxWin as DLL
+ */
+#ifdef WXMAKINGDLL_BASE
+# define WXDLLIMPEXP_BASE WXEXPORT
+# define WXDLLIMPEXP_DATA_BASE(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_BASE WXIMPORT
+# define WXDLLIMPEXP_DATA_BASE(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_BASE
+# define WXDLLIMPEXP_DATA_BASE(type) type
+#endif
+
+#ifdef WXMAKINGDLL_NET
+# define WXDLLIMPEXP_NET WXEXPORT
+# define WXDLLIMPEXP_DATA_NET(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_NET WXIMPORT
+# define WXDLLIMPEXP_DATA_NET(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_NET
+# define WXDLLIMPEXP_DATA_NET(type) type
+#endif
+
+#ifdef WXMAKINGDLL_CORE
+# define WXDLLIMPEXP_CORE WXEXPORT
+# define WXDLLIMPEXP_DATA_CORE(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_CORE WXIMPORT
+# define WXDLLIMPEXP_DATA_CORE(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_CORE
+# define WXDLLIMPEXP_DATA_CORE(type) type
+#endif
+
+#ifdef WXMAKINGDLL_ADV
+# define WXDLLIMPEXP_ADV WXEXPORT
+# define WXDLLIMPEXP_DATA_ADV(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_ADV WXIMPORT
+# define WXDLLIMPEXP_DATA_ADV(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_ADV
+# define WXDLLIMPEXP_DATA_ADV(type) type
+#endif
+
+#ifdef WXMAKINGDLL_ODBC
+# define WXDLLIMPEXP_ODBC WXEXPORT
+# define WXDLLIMPEXP_DATA_ODBC(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_ODBC WXIMPORT
+# define WXDLLIMPEXP_DATA_ODBC(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_ODBC
+# define WXDLLIMPEXP_DATA_ODBC(type) type
+#endif
+
+#ifdef WXMAKINGDLL_QA
+# define WXDLLIMPEXP_QA WXEXPORT
+# define WXDLLIMPEXP_DATA_QA(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_QA WXIMPORT
+# define WXDLLIMPEXP_DATA_QA(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_QA
+# define WXDLLIMPEXP_DATA_QA(type) type
+#endif
+
+#ifdef WXMAKINGDLL_DBGRID
+# define WXDLLIMPEXP_DBGRID WXEXPORT
+# define WXDLLIMPEXP_DATA_DBGRID(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_DBGRID WXIMPORT
+# define WXDLLIMPEXP_DATA_DBGRID(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_DBGRID
+# define WXDLLIMPEXP_DATA_DBGRID(type) type
+#endif
+
+#ifdef WXMAKINGDLL_HTML
+# define WXDLLIMPEXP_HTML WXEXPORT
+# define WXDLLIMPEXP_DATA_HTML(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_HTML WXIMPORT
+# define WXDLLIMPEXP_DATA_HTML(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_HTML
+# define WXDLLIMPEXP_DATA_HTML(type) type
+#endif
+
+#ifdef WXMAKINGDLL_GL
+# define WXDLLIMPEXP_GL WXEXPORT
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_GL WXIMPORT
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_GL
+#endif
+
+#ifdef WXMAKINGDLL_XML
+# define WXDLLIMPEXP_XML WXEXPORT
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_XML WXIMPORT
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_XML
+#endif
+
+#ifdef WXMAKINGDLL_XRC
+# define WXDLLIMPEXP_XRC WXEXPORT
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_XRC WXIMPORT
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_XRC
+#endif
+
+#ifdef WXMAKINGDLL_AUI
+# define WXDLLIMPEXP_AUI WXEXPORT
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_AUI WXIMPORT
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_AUI
+#endif
+
+#ifdef WXMAKINGDLL_RICHTEXT
+# define WXDLLIMPEXP_RICHTEXT WXEXPORT
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_RICHTEXT WXIMPORT
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_RICHTEXT
+#endif
+
+#ifdef WXMAKINGDLL_MEDIA
+# define WXDLLIMPEXP_MEDIA WXEXPORT
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_MEDIA WXIMPORT
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_MEDIA
+#endif
+
+/* for backwards compatibility, define suffix-less versions too */
+#define WXDLLEXPORT WXDLLIMPEXP_CORE
+#define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE
+
+/* wx-2.9 introduces new macros for forward declarations, include them
+ * here for forward compatibility:
+
+ GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
+ forward declarations while MSVC complains about forward declarations without
+ __declspec for the classes later declared with it, so we need a separate set
+ of macros for forward declarations to hide this difference:
+ */
+#if defined(__WINDOWS__) && defined(__GNUC__)
+ #define WXDLLIMPEXP_FWD_BASE
+ #define WXDLLIMPEXP_FWD_NET
+ #define WXDLLIMPEXP_FWD_CORE
+ #define WXDLLIMPEXP_FWD_ADV
+ #define WXDLLIMPEXP_FWD_QA
+ #define WXDLLIMPEXP_FWD_HTML
+ #define WXDLLIMPEXP_FWD_GL
+ #define WXDLLIMPEXP_FWD_XML
+ #define WXDLLIMPEXP_FWD_XRC
+ #define WXDLLIMPEXP_FWD_AUI
+ #define WXDLLIMPEXP_FWD_RICHTEXT
+ #define WXDLLIMPEXP_FWD_MEDIA
+ #define WXDLLIMPEXP_FWD_STC
+#else
+ #define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
+ #define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
+ #define WXDLLIMPEXP_FWD_CORE WXDLLIMPEXP_CORE
+ #define WXDLLIMPEXP_FWD_ADV WXDLLIMPEXP_ADV
+ #define WXDLLIMPEXP_FWD_QA WXDLLIMPEXP_QA
+ #define WXDLLIMPEXP_FWD_HTML WXDLLIMPEXP_HTML
+ #define WXDLLIMPEXP_FWD_GL WXDLLIMPEXP_GL
+ #define WXDLLIMPEXP_FWD_XML WXDLLIMPEXP_XML
+ #define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC
+ #define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI
+ #define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
+ #define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
+ #define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
+#endif
+
+#endif /* _WX_DLIMPEXP_H_ */
+
diff --git a/3rdparty/wxWidgets/include/wx/dnd.h b/3rdparty/wxWidgets/include/wx/dnd.h
new file mode 100644
index 0000000000..2eab71e654
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dnd.h
@@ -0,0 +1,267 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/dnd.h
+// Purpose: Drag and drop classes declarations
+// Author: Vadim Zeitlin, Robert Roebling
+// Modified by:
+// Created: 26.05.99
+// RCS-ID: $Id: dnd.h 43636 2006-11-25 14:08:27Z VZ $
+// Copyright: (c) wxWidgets Team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DND_H_BASE_
+#define _WX_DND_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_DRAG_AND_DROP
+
+#include "wx/dataobj.h"
+#include "wx/cursor.h"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// flags for wxDropSource::DoDragDrop()
+//
+// NB: wxDrag_CopyOnly must be 0 (== FALSE) and wxDrag_AllowMove must be 1
+// (== TRUE) for compatibility with the old DoDragDrop(bool) method!
+enum
+{
+ wxDrag_CopyOnly = 0, // allow only copying
+ wxDrag_AllowMove = 1, // allow moving (copying is always allowed)
+ wxDrag_DefaultMove = 3 // the default operation is move, not copy
+};
+
+// result of wxDropSource::DoDragDrop() call
+enum wxDragResult
+{
+ wxDragError, // error prevented the d&d operation from completing
+ wxDragNone, // drag target didn't accept the data
+ wxDragCopy, // the data was successfully copied
+ wxDragMove, // the data was successfully moved (MSW only)
+ wxDragLink, // operation is a drag-link
+ wxDragCancel // the operation was cancelled by user (not an error)
+};
+
+// return true if res indicates that something was done during a dnd operation,
+// i.e. is neither error nor none nor cancel
+WXDLLEXPORT bool wxIsDragResultOk(wxDragResult res);
+
+// ----------------------------------------------------------------------------
+// wxDropSource is the object you need to create (and call DoDragDrop on it)
+// to initiate a drag-and-drop operation
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDropSourceBase
+{
+public:
+ wxDropSourceBase(const wxCursor &cursorCopy = wxNullCursor,
+ const wxCursor &cursorMove = wxNullCursor,
+ const wxCursor &cursorStop = wxNullCursor)
+ : m_cursorCopy(cursorCopy),
+ m_cursorMove(cursorMove),
+ m_cursorStop(cursorStop)
+ { m_data = (wxDataObject *)NULL; }
+ virtual ~wxDropSourceBase() { }
+
+ // set the data which is transfered by drag and drop
+ void SetData(wxDataObject& data)
+ { m_data = &data; }
+
+ wxDataObject *GetDataObject()
+ { return m_data; }
+
+ // set the icon corresponding to given drag result
+ void SetCursor(wxDragResult res, const wxCursor& cursor)
+ {
+ if ( res == wxDragCopy )
+ m_cursorCopy = cursor;
+ else if ( res == wxDragMove )
+ m_cursorMove = cursor;
+ else
+ m_cursorStop = cursor;
+ }
+
+ // start drag action, see enum wxDragResult for return value description
+ //
+ // if flags contains wxDrag_AllowMove, moving (and only copying) data is
+ // allowed, if it contains wxDrag_DefaultMove (which includes the previous
+ // flag), it is even the default operation
+ virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly) = 0;
+
+ // override to give feedback depending on the current operation result
+ // "effect" and return true if you did something, false to let the library
+ // give the default feedback
+ virtual bool GiveFeedback(wxDragResult WXUNUSED(effect)) { return false; }
+
+protected:
+ const wxCursor& GetCursor(wxDragResult res) const
+ {
+ if ( res == wxDragCopy )
+ return m_cursorCopy;
+ else if ( res == wxDragMove )
+ return m_cursorMove;
+ else
+ return m_cursorStop;
+ }
+
+ // the data we're dragging
+ wxDataObject *m_data;
+
+ // the cursors to use for feedback
+ wxCursor m_cursorCopy,
+ m_cursorMove,
+ m_cursorStop;
+
+ DECLARE_NO_COPY_CLASS(wxDropSourceBase)
+};
+
+// ----------------------------------------------------------------------------
+// wxDropTarget should be associated with a window if it wants to be able to
+// receive data via drag and drop.
+//
+// To use this class, you should derive from wxDropTarget and implement
+// OnData() pure virtual method. You may also wish to override OnDrop() if you
+// want to accept the data only inside some region of the window (this may
+// avoid having to copy the data to this application which happens only when
+// OnData() is called)
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDropTargetBase
+{
+public:
+ // ctor takes a pointer to heap-allocated wxDataObject which will be owned
+ // by wxDropTarget and deleted by it automatically. If you don't give it
+ // here, you can use SetDataObject() later.
+ wxDropTargetBase(wxDataObject *dataObject = (wxDataObject*)NULL)
+ { m_dataObject = dataObject; m_defaultAction = wxDragNone; }
+ // dtor deletes our data object
+ virtual ~wxDropTargetBase()
+ { delete m_dataObject; }
+
+ // get/set the associated wxDataObject
+ wxDataObject *GetDataObject() const
+ { return m_dataObject; }
+ void SetDataObject(wxDataObject *dataObject)
+ { if (m_dataObject) delete m_dataObject;
+ m_dataObject = dataObject; }
+
+ // these functions are called when data is moved over position (x, y) and
+ // may return either wxDragCopy, wxDragMove or wxDragNone depending on
+ // what would happen if the data were dropped here.
+ //
+ // the last parameter is what would happen by default and is determined by
+ // the platform-specific logic (for example, under Windows it's wxDragCopy
+ // if Ctrl key is pressed and wxDragMove otherwise) except that it will
+ // always be wxDragNone if the carried data is in an unsupported format.
+
+ // called when the mouse enters the window (only once until OnLeave())
+ virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def)
+ { return OnDragOver(x, y, def); }
+
+ // called when the mouse moves in the window - shouldn't take long to
+ // execute or otherwise mouse movement would be too slow
+ virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
+ wxDragResult def)
+ { return def; }
+
+ // called when mouse leaves the window: might be used to remove the
+ // feedback which was given in OnEnter()
+ virtual void OnLeave() { }
+
+ // this function is called when data is dropped at position (x, y) - if it
+ // returns true, OnData() will be called immediately afterwards which will
+ // allow to retrieve the data dropped.
+ virtual bool OnDrop(wxCoord x, wxCoord y) = 0;
+
+ // called after OnDrop() returns TRUE: you will usually just call
+ // GetData() from here and, probably, also refresh something to update the
+ // new data and, finally, return the code indicating how did the operation
+ // complete (returning default value in case of success and wxDragError on
+ // failure is usually ok)
+ virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def) = 0;
+
+ // may be called *only* from inside OnData() and will fill m_dataObject
+ // with the data from the drop source if it returns true
+ virtual bool GetData() = 0;
+
+ // sets the default action for drag and drop:
+ // use wxDragMove or wxDragCopy to set deafult action to move or copy
+ // and use wxDragNone (default) to set default action specified by
+ // initialization of draging (see wxDropSourceBase::DoDragDrop())
+ void SetDefaultAction(wxDragResult action)
+ { m_defaultAction = action; }
+
+ // returns default action for drag and drop or
+ // wxDragNone if this not specified
+ wxDragResult GetDefaultAction()
+ { return m_defaultAction; }
+
+protected:
+ wxDataObject *m_dataObject;
+ wxDragResult m_defaultAction;
+
+ DECLARE_NO_COPY_CLASS(wxDropTargetBase)
+};
+
+// ----------------------------------------------------------------------------
+// include platform dependent class declarations
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__)
+ #include "wx/msw/ole/dropsrc.h"
+ #include "wx/msw/ole/droptgt.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/dnd.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/dnd.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/dnd.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/dnd.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/dnd.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/dnd.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// standard wxDropTarget implementations (implemented in common/dobjcmn.cpp)
+// ----------------------------------------------------------------------------
+
+// A simple wxDropTarget derived class for text data: you only need to
+// override OnDropText() to get something working
+class WXDLLEXPORT wxTextDropTarget : public wxDropTarget
+{
+public:
+ wxTextDropTarget();
+
+ virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0;
+
+ virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
+
+private:
+ DECLARE_NO_COPY_CLASS(wxTextDropTarget)
+};
+
+// A drop target which accepts files (dragged from File Manager or Explorer)
+class WXDLLEXPORT wxFileDropTarget : public wxDropTarget
+{
+public:
+ wxFileDropTarget();
+
+ // parameters are the number of files and the array of file names
+ virtual bool OnDropFiles(wxCoord x, wxCoord y,
+ const wxArrayString& filenames) = 0;
+
+ virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
+
+private:
+ DECLARE_NO_COPY_CLASS(wxFileDropTarget)
+};
+
+#endif // wxUSE_DRAG_AND_DROP
+
+#endif // _WX_DND_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/docmdi.h b/3rdparty/wxWidgets/include/wx/docmdi.h
new file mode 100644
index 0000000000..c8ab803c12
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/docmdi.h
@@ -0,0 +1,107 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: docmdi.h
+// Purpose: Frame classes for MDI document/view applications
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: docmdi.h 41020 2006-09-05 20:47:48Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DOCMDI_H_
+#define _WX_DOCMDI_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_MDI_ARCHITECTURE
+
+#include "wx/docview.h"
+#include "wx/mdi.h"
+
+/*
+ * Use this instead of wxMDIParentFrame
+ */
+
+class WXDLLEXPORT wxDocMDIParentFrame: public wxMDIParentFrame
+{
+public:
+ wxDocMDIParentFrame();
+ wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
+ const wxString& title, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
+
+ bool Create(wxDocManager *manager, wxFrame *parent, wxWindowID id,
+ const wxString& title, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
+
+ // Extend event processing to search the document manager's event table
+ virtual bool ProcessEvent(wxEvent& event);
+
+ wxDocManager *GetDocumentManager(void) const { return m_docManager; }
+
+ void OnExit(wxCommandEvent& event);
+ void OnMRUFile(wxCommandEvent& event);
+ void OnCloseWindow(wxCloseEvent& event);
+
+protected:
+ void Init();
+ wxDocManager *m_docManager;
+
+private:
+ DECLARE_CLASS(wxDocMDIParentFrame)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxDocMDIParentFrame)
+};
+
+/*
+ * Use this instead of wxMDIChildFrame
+ */
+
+class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
+{
+public:
+ wxDocMDIChildFrame();
+ wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
+ const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+ long type = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
+ virtual ~wxDocMDIChildFrame();
+
+ bool Create(wxDocument *doc,
+ wxView *view,
+ wxMDIParentFrame *frame,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long type = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+ // Extend event processing to search the view's event table
+ virtual bool ProcessEvent(wxEvent& event);
+
+ void OnActivate(wxActivateEvent& event);
+ void OnCloseWindow(wxCloseEvent& event);
+
+ inline wxDocument *GetDocument() const { return m_childDocument; }
+ inline wxView *GetView(void) const { return m_childView; }
+ inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
+ inline void SetView(wxView *view) { m_childView = view; }
+ bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
+
+protected:
+ void Init();
+ wxDocument* m_childDocument;
+ wxView* m_childView;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_CLASS(wxDocMDIChildFrame)
+ DECLARE_NO_COPY_CLASS(wxDocMDIChildFrame)
+};
+
+#endif
+ // wxUSE_MDI_ARCHITECTURE
+
+#endif
+ // _WX_DOCMDI_H_
diff --git a/3rdparty/wxWidgets/include/wx/docview.h b/3rdparty/wxWidgets/include/wx/docview.h
new file mode 100644
index 0000000000..60ed159071
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/docview.h
@@ -0,0 +1,675 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/docview.h
+// Purpose: Doc/View classes
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: docview.h 53546 2008-05-10 21:02:36Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DOCH__
+#define _WX_DOCH__
+
+#include "wx/defs.h"
+
+#if wxUSE_DOC_VIEW_ARCHITECTURE
+
+#include "wx/list.h"
+#include "wx/string.h"
+#include "wx/frame.h"
+
+#if wxUSE_PRINTING_ARCHITECTURE
+ #include "wx/print.h"
+#endif
+
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxDocument;
+class WXDLLIMPEXP_FWD_CORE wxView;
+class WXDLLIMPEXP_FWD_CORE wxDocTemplate;
+class WXDLLIMPEXP_FWD_CORE wxDocManager;
+class WXDLLIMPEXP_FWD_CORE wxPrintInfo;
+class WXDLLIMPEXP_FWD_CORE wxCommandProcessor;
+class WXDLLIMPEXP_FWD_CORE wxFileHistory;
+class WXDLLIMPEXP_FWD_BASE wxConfigBase;
+
+#if wxUSE_STD_IOSTREAM
+ #include "wx/iosfwrap.h"
+#else
+ #include "wx/stream.h"
+#endif
+
+// Document manager flags
+enum
+{
+ wxDOC_SDI = 1,
+ wxDOC_MDI,
+ wxDOC_NEW,
+ wxDOC_SILENT,
+ wxDEFAULT_DOCMAN_FLAGS = wxDOC_SDI
+};
+
+// Document template flags
+enum
+{
+ wxTEMPLATE_VISIBLE = 1,
+ wxTEMPLATE_INVISIBLE,
+ wxDEFAULT_TEMPLATE_FLAGS = wxTEMPLATE_VISIBLE
+};
+
+#define wxMAX_FILE_HISTORY 9
+
+class WXDLLEXPORT wxDocument : public wxEvtHandler
+{
+public:
+ wxDocument(wxDocument *parent = (wxDocument *) NULL);
+ virtual ~wxDocument();
+
+ // accessors
+ void SetFilename(const wxString& filename, bool notifyViews = false);
+ wxString GetFilename() const { return m_documentFile; }
+
+ void SetTitle(const wxString& title) { m_documentTitle = title; }
+ wxString GetTitle() const { return m_documentTitle; }
+
+ void SetDocumentName(const wxString& name) { m_documentTypeName = name; }
+ wxString GetDocumentName() const { return m_documentTypeName; }
+
+ bool GetDocumentSaved() const { return m_savedYet; }
+ void SetDocumentSaved(bool saved = true) { m_savedYet = saved; }
+
+ virtual bool Close();
+ virtual bool Save();
+ virtual bool SaveAs();
+ virtual bool Revert();
+
+#if wxUSE_STD_IOSTREAM
+ virtual wxSTD ostream& SaveObject(wxSTD ostream& stream);
+ virtual wxSTD istream& LoadObject(wxSTD istream& stream);
+#else
+ virtual wxOutputStream& SaveObject(wxOutputStream& stream);
+ virtual wxInputStream& LoadObject(wxInputStream& stream);
+#endif
+
+ // Called by wxWidgets
+ virtual bool OnSaveDocument(const wxString& filename);
+ virtual bool OnOpenDocument(const wxString& filename);
+ virtual bool OnNewDocument();
+ virtual bool OnCloseDocument();
+
+ // Prompts for saving if about to close a modified document. Returns true
+ // if ok to close the document (may have saved in the meantime, or set
+ // modified to false)
+ virtual bool OnSaveModified();
+
+ // Called by framework if created automatically by the default document
+ // manager: gives document a chance to initialise and (usually) create a
+ // view
+ virtual bool OnCreate(const wxString& path, long flags);
+
+ // By default, creates a base wxCommandProcessor.
+ virtual wxCommandProcessor *OnCreateCommandProcessor();
+ virtual wxCommandProcessor *GetCommandProcessor() const { return m_commandProcessor; }
+ virtual void SetCommandProcessor(wxCommandProcessor *proc) { m_commandProcessor = proc; }
+
+ // Called after a view is added or removed. The default implementation
+ // deletes the document if this is there are no more views.
+ virtual void OnChangedViewList();
+
+ virtual bool DeleteContents();
+
+ virtual bool Draw(wxDC&);
+ virtual bool IsModified() const { return m_documentModified; }
+ virtual void Modify(bool mod) { m_documentModified = mod; }
+
+ virtual bool AddView(wxView *view);
+ virtual bool RemoveView(wxView *view);
+ wxList& GetViews() { return m_documentViews; }
+ const wxList& GetViews() const { return m_documentViews; }
+ wxView *GetFirstView() const;
+
+ virtual void UpdateAllViews(wxView *sender = (wxView *) NULL, wxObject *hint = (wxObject *) NULL);
+ virtual void NotifyClosing();
+
+ // Remove all views (because we're closing the document)
+ virtual bool DeleteAllViews();
+
+ // Other stuff
+ virtual wxDocManager *GetDocumentManager() const;
+ virtual wxDocTemplate *GetDocumentTemplate() const { return m_documentTemplate; }
+ virtual void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; }
+
+ // Get title, or filename if no title, else [unnamed]
+ //
+ // NB: this method will be deprecated in wxWidgets 3.0, you still need to
+ // override it if you need to modify the existing behaviour in this
+ // version but use GetUserReadableName() below if you just need to call
+ // it
+ virtual bool GetPrintableName(wxString& buf) const;
+
+#if wxABI_VERSION >= 20805
+ wxString GetUserReadableName() const
+ {
+ wxString s;
+ GetPrintableName(s);
+ return s;
+ }
+#endif // wxABI 2.8.5+
+
+ // Returns a window that can be used as a parent for document-related
+ // dialogs. Override if necessary.
+ virtual wxWindow *GetDocumentWindow() const;
+
+protected:
+ wxList m_documentViews;
+ wxString m_documentFile;
+ wxString m_documentTitle;
+ wxString m_documentTypeName;
+ wxDocTemplate* m_documentTemplate;
+ bool m_documentModified;
+ wxDocument* m_documentParent;
+ wxCommandProcessor* m_commandProcessor;
+ bool m_savedYet;
+
+ // Called by OnSaveDocument and OnOpenDocument to implement standard
+ // Save/Load behavior. Re-implement in derived class for custom
+ // behavior.
+ virtual bool DoSaveDocument(const wxString& file);
+ virtual bool DoOpenDocument(const wxString& file);
+
+private:
+ DECLARE_ABSTRACT_CLASS(wxDocument)
+ DECLARE_NO_COPY_CLASS(wxDocument)
+};
+
+class WXDLLEXPORT wxView: public wxEvtHandler
+{
+public:
+ // wxView(wxDocument *doc = (wxDocument *) NULL);
+ wxView();
+ virtual ~wxView();
+
+ wxDocument *GetDocument() const { return m_viewDocument; }
+ virtual void SetDocument(wxDocument *doc);
+
+ wxString GetViewName() const { return m_viewTypeName; }
+ void SetViewName(const wxString& name) { m_viewTypeName = name; }
+
+ wxWindow *GetFrame() const { return m_viewFrame ; }
+ void SetFrame(wxWindow *frame) { m_viewFrame = frame; }
+
+ virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView);
+ virtual void OnDraw(wxDC *dc) = 0;
+ virtual void OnPrint(wxDC *dc, wxObject *info);
+ virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
+ virtual void OnClosingDocument() {}
+ virtual void OnChangeFilename();
+
+ // Called by framework if created automatically by the default document
+ // manager class: gives view a chance to initialise
+ virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) { return true; }
+
+ // Checks if the view is the last one for the document; if so, asks user
+ // to confirm save data (if modified). If ok, deletes itself and returns
+ // true.
+ virtual bool Close(bool deleteWindow = true);
+
+ // Override to do cleanup/veto close
+ virtual bool OnClose(bool deleteWindow);
+
+ // Extend event processing to search the document's event table
+ virtual bool ProcessEvent(wxEvent& event);
+
+ // A view's window can call this to notify the view it is (in)active.
+ // The function then notifies the document manager.
+ virtual void Activate(bool activate);
+
+ wxDocManager *GetDocumentManager() const
+ { return m_viewDocument->GetDocumentManager(); }
+
+#if wxUSE_PRINTING_ARCHITECTURE
+ virtual wxPrintout *OnCreatePrintout();
+#endif
+
+protected:
+ wxDocument* m_viewDocument;
+ wxString m_viewTypeName;
+ wxWindow* m_viewFrame;
+
+private:
+ DECLARE_ABSTRACT_CLASS(wxView)
+ DECLARE_NO_COPY_CLASS(wxView)
+};
+
+// Represents user interface (and other) properties of documents and views
+class WXDLLEXPORT wxDocTemplate: public wxObject
+{
+
+friend class WXDLLIMPEXP_FWD_CORE wxDocManager;
+
+public:
+ // Associate document and view types. They're for identifying what view is
+ // associated with what template/document type
+ wxDocTemplate(wxDocManager *manager,
+ const wxString& descr,
+ const wxString& filter,
+ const wxString& dir,
+ const wxString& ext,
+ const wxString& docTypeName,
+ const wxString& viewTypeName,
+ wxClassInfo *docClassInfo = (wxClassInfo *) NULL,
+ wxClassInfo *viewClassInfo = (wxClassInfo *)NULL,
+ long flags = wxDEFAULT_TEMPLATE_FLAGS);
+
+ virtual ~wxDocTemplate();
+
+ // By default, these two member functions dynamically creates document and
+ // view using dynamic instance construction. Override these if you need a
+ // different method of construction.
+ virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
+ virtual wxView *CreateView(wxDocument *doc, long flags = 0);
+
+ // Helper method for CreateDocument; also allows you to do your own document
+ // creation
+ virtual bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0);
+
+ wxString GetDefaultExtension() const { return m_defaultExt; }
+ wxString GetDescription() const { return m_description; }
+ wxString GetDirectory() const { return m_directory; }
+ wxDocManager *GetDocumentManager() const { return m_documentManager; }
+ void SetDocumentManager(wxDocManager *manager) { m_documentManager = manager; }
+ wxString GetFileFilter() const { return m_fileFilter; }
+ long GetFlags() const { return m_flags; }
+ virtual wxString GetViewName() const { return m_viewTypeName; }
+ virtual wxString GetDocumentName() const { return m_docTypeName; }
+
+ void SetFileFilter(const wxString& filter) { m_fileFilter = filter; }
+ void SetDirectory(const wxString& dir) { m_directory = dir; }
+ void SetDescription(const wxString& descr) { m_description = descr; }
+ void SetDefaultExtension(const wxString& ext) { m_defaultExt = ext; }
+ void SetFlags(long flags) { m_flags = flags; }
+
+ bool IsVisible() const { return ((m_flags & wxTEMPLATE_VISIBLE) == wxTEMPLATE_VISIBLE); }
+
+ wxClassInfo* GetDocClassInfo() const { return m_docClassInfo; }
+ wxClassInfo* GetViewClassInfo() const { return m_viewClassInfo; }
+
+ virtual bool FileMatchesTemplate(const wxString& path);
+
+protected:
+ long m_flags;
+ wxString m_fileFilter;
+ wxString m_directory;
+ wxString m_description;
+ wxString m_defaultExt;
+ wxString m_docTypeName;
+ wxString m_viewTypeName;
+ wxDocManager* m_documentManager;
+
+ // For dynamic creation of appropriate instances.
+ wxClassInfo* m_docClassInfo;
+ wxClassInfo* m_viewClassInfo;
+
+ // Called by CreateDocument and CreateView to create the actual document/view object.
+ // By default uses the ClassInfo provided to the constructor. Override these functions
+ // to provide a different method of creation.
+ virtual wxDocument *DoCreateDocument();
+ virtual wxView *DoCreateView();
+
+private:
+ DECLARE_CLASS(wxDocTemplate)
+ DECLARE_NO_COPY_CLASS(wxDocTemplate)
+};
+
+// One object of this class may be created in an application, to manage all
+// the templates and documents.
+class WXDLLEXPORT wxDocManager: public wxEvtHandler
+{
+public:
+ wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true);
+ virtual ~wxDocManager();
+
+ virtual bool Initialize();
+
+ // Handlers for common user commands
+ void OnFileClose(wxCommandEvent& event);
+ void OnFileCloseAll(wxCommandEvent& event);
+ void OnFileNew(wxCommandEvent& event);
+ void OnFileOpen(wxCommandEvent& event);
+ void OnFileRevert(wxCommandEvent& event);
+ void OnFileSave(wxCommandEvent& event);
+ void OnFileSaveAs(wxCommandEvent& event);
+ void OnPrint(wxCommandEvent& event);
+ void OnPreview(wxCommandEvent& event);
+ void OnUndo(wxCommandEvent& event);
+ void OnRedo(wxCommandEvent& event);
+
+ // Handlers for UI update commands
+ void OnUpdateFileOpen(wxUpdateUIEvent& event);
+ void OnUpdateFileClose(wxUpdateUIEvent& event);
+ void OnUpdateFileRevert(wxUpdateUIEvent& event);
+ void OnUpdateFileNew(wxUpdateUIEvent& event);
+ void OnUpdateFileSave(wxUpdateUIEvent& event);
+ void OnUpdateFileSaveAs(wxUpdateUIEvent& event);
+ void OnUpdateUndo(wxUpdateUIEvent& event);
+ void OnUpdateRedo(wxUpdateUIEvent& event);
+
+ void OnUpdatePrint(wxUpdateUIEvent& event);
+ void OnUpdatePreview(wxUpdateUIEvent& event);
+
+ // Extend event processing to search the view's event table
+ virtual bool ProcessEvent(wxEvent& event);
+
+ // called when file format detection didn't work, can be overridden to do
+ // something in this case
+ virtual void OnOpenFileFailure() { }
+
+ virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
+ virtual wxView *CreateView(wxDocument *doc, long flags = 0);
+ virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
+ virtual bool FlushDoc(wxDocument *doc);
+ virtual wxDocTemplate *MatchTemplate(const wxString& path);
+ virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates,
+ int noTemplates, wxString& path, long flags, bool save = false);
+ virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates,
+ int noTemplates, bool sort = false);
+ virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates,
+ int noTemplates, bool sort = false);
+ virtual wxDocTemplate *FindTemplateForPath(const wxString& path);
+
+ void AssociateTemplate(wxDocTemplate *temp);
+ void DisassociateTemplate(wxDocTemplate *temp);
+
+ wxDocument *GetCurrentDocument() const;
+
+ void SetMaxDocsOpen(int n) { m_maxDocsOpen = n; }
+ int GetMaxDocsOpen() const { return m_maxDocsOpen; }
+
+ // Add and remove a document from the manager's list
+ void AddDocument(wxDocument *doc);
+ void RemoveDocument(wxDocument *doc);
+
+ // closes all currently open documents
+ bool CloseDocuments(bool force = true);
+
+ // closes the specified document
+ bool CloseDocument(wxDocument* doc, bool force = false);
+
+ // Clear remaining documents and templates
+ bool Clear(bool force = true);
+
+ // Views or windows should inform the document manager
+ // when a view is going in or out of focus
+ virtual void ActivateView(wxView *view, bool activate = true);
+ virtual wxView *GetCurrentView() const;
+
+ wxList& GetDocuments() { return m_docs; }
+ wxList& GetTemplates() { return m_templates; }
+
+ // Make a default document name
+ //
+ // NB: this method is renamed to MakeNewDocumentName() in wx 3.0, you still
+ // need to override it if your code needs to customize the default name
+ // generation but if you just use it from your code, prefer the version
+ // below which is forward-compatible with wx 3.0
+ virtual bool MakeDefaultName(wxString& buf);
+
+#if wxABI_VERSION >= 20808
+ wxString MakeNewDocumentName() const
+ {
+ wxString s;
+ wx_const_cast(wxDocManager *, this)->MakeDefaultName(s);
+ return s;
+ }
+#endif // wx ABI >= 2.8.8
+
+ // Make a frame title (override this to do something different)
+ virtual wxString MakeFrameTitle(wxDocument* doc);
+
+ virtual wxFileHistory *OnCreateFileHistory();
+ virtual wxFileHistory *GetFileHistory() const { return m_fileHistory; }
+
+ // File history management
+ virtual void AddFileToHistory(const wxString& file);
+ virtual void RemoveFileFromHistory(size_t i);
+ virtual size_t GetHistoryFilesCount() const;
+ virtual wxString GetHistoryFile(size_t i) const;
+ virtual void FileHistoryUseMenu(wxMenu *menu);
+ virtual void FileHistoryRemoveMenu(wxMenu *menu);
+#if wxUSE_CONFIG
+ virtual void FileHistoryLoad(wxConfigBase& config);
+ virtual void FileHistorySave(wxConfigBase& config);
+#endif // wxUSE_CONFIG
+
+ virtual void FileHistoryAddFilesToMenu();
+ virtual void FileHistoryAddFilesToMenu(wxMenu* menu);
+
+ wxString GetLastDirectory() const { return m_lastDirectory; }
+ void SetLastDirectory(const wxString& dir) { m_lastDirectory = dir; }
+
+ // Get the current document manager
+ static wxDocManager* GetDocumentManager() { return sm_docManager; }
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated, use GetHistoryFilesCount() instead
+ wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+ long m_flags;
+ int m_defaultDocumentNameCounter;
+ int m_maxDocsOpen;
+ wxList m_docs;
+ wxList m_templates;
+ wxView* m_currentView;
+ wxFileHistory* m_fileHistory;
+ wxString m_lastDirectory;
+ static wxDocManager* sm_docManager;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxDocManager)
+ DECLARE_NO_COPY_CLASS(wxDocManager)
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+inline size_t wxDocManager::GetNoHistoryFiles() const
+{
+ return GetHistoryFilesCount();
+}
+#endif // WXWIN_COMPATIBILITY_2_6
+
+// ----------------------------------------------------------------------------
+// A default child frame
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDocChildFrame : public wxFrame
+{
+public:
+ wxDocChildFrame(wxDocument *doc,
+ wxView *view,
+ wxFrame *frame,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long type = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxT("frame"));
+ virtual ~wxDocChildFrame(){}
+
+ // Extend event processing to search the view's event table
+ virtual bool ProcessEvent(wxEvent& event);
+
+ void OnActivate(wxActivateEvent& event);
+ void OnCloseWindow(wxCloseEvent& event);
+
+ wxDocument *GetDocument() const { return m_childDocument; }
+ wxView *GetView() const { return m_childView; }
+ void SetDocument(wxDocument *doc) { m_childDocument = doc; }
+ void SetView(wxView *view) { m_childView = view; }
+ bool Destroy() { m_childView = (wxView *)NULL; return wxFrame::Destroy(); }
+
+protected:
+ wxDocument* m_childDocument;
+ wxView* m_childView;
+
+private:
+ DECLARE_CLASS(wxDocChildFrame)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxDocChildFrame)
+};
+
+// ----------------------------------------------------------------------------
+// A default parent frame
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDocParentFrame : public wxFrame
+{
+public:
+ wxDocParentFrame();
+ wxDocParentFrame(wxDocManager *manager,
+ wxFrame *frame,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+ bool Create(wxDocManager *manager,
+ wxFrame *frame,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+ // Extend event processing to search the document manager's event table
+ virtual bool ProcessEvent(wxEvent& event);
+
+ wxDocManager *GetDocumentManager() const { return m_docManager; }
+
+ void OnExit(wxCommandEvent& event);
+ void OnMRUFile(wxCommandEvent& event);
+ void OnCloseWindow(wxCloseEvent& event);
+
+protected:
+ wxDocManager *m_docManager;
+
+private:
+ typedef wxFrame base_type;
+ DECLARE_CLASS(wxDocParentFrame)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxDocParentFrame)
+};
+
+// ----------------------------------------------------------------------------
+// Provide simple default printing facilities
+// ----------------------------------------------------------------------------
+
+#if wxUSE_PRINTING_ARCHITECTURE
+class WXDLLEXPORT wxDocPrintout : public wxPrintout
+{
+public:
+ wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = wxT("Printout"));
+ bool OnPrintPage(int page);
+ bool HasPage(int page);
+ bool OnBeginDocument(int startPage, int endPage);
+ void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
+
+ virtual wxView *GetView() { return m_printoutView; }
+
+protected:
+ wxView* m_printoutView;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxDocPrintout)
+ DECLARE_NO_COPY_CLASS(wxDocPrintout)
+};
+#endif // wxUSE_PRINTING_ARCHITECTURE
+
+// ----------------------------------------------------------------------------
+// File history management
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFileHistory : public wxObject
+{
+public:
+ wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
+ virtual ~wxFileHistory();
+
+ // Operations
+ virtual void AddFileToHistory(const wxString& file);
+ virtual void RemoveFileFromHistory(size_t i);
+ virtual int GetMaxFiles() const { return (int)m_fileMaxFiles; }
+ virtual void UseMenu(wxMenu *menu);
+
+ // Remove menu from the list (MDI child may be closing)
+ virtual void RemoveMenu(wxMenu *menu);
+
+#if wxUSE_CONFIG
+ virtual void Load(wxConfigBase& config);
+ virtual void Save(wxConfigBase& config);
+#endif // wxUSE_CONFIG
+
+ virtual void AddFilesToMenu();
+ virtual void AddFilesToMenu(wxMenu* menu); // Single menu
+
+ // Accessors
+ virtual wxString GetHistoryFile(size_t i) const;
+ virtual size_t GetCount() const { return m_fileHistoryN; }
+
+ const wxList& GetMenus() const { return m_fileMenus; }
+
+#if wxABI_VERSION >= 20802
+ // Set/get base id
+ void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
+ wxWindowID GetBaseId() const { return m_idBase; }
+#endif // wxABI 2.8.2+
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated, use GetCount() instead
+ wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+ // Last n files
+ wxChar** m_fileHistory;
+ // Number of files saved
+ size_t m_fileHistoryN;
+ // Menus to maintain (may need several for an MDI app)
+ wxList m_fileMenus;
+ // Max files to maintain
+ size_t m_fileMaxFiles;
+
+private:
+ // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
+ wxWindowID m_idBase;
+
+ DECLARE_DYNAMIC_CLASS(wxFileHistory)
+ DECLARE_NO_COPY_CLASS(wxFileHistory)
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+inline size_t wxFileHistory::GetNoHistoryFiles() const
+{
+ return m_fileHistoryN;
+}
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#if wxUSE_STD_IOSTREAM
+// For compatibility with existing file formats:
+// converts from/to a stream to/from a temporary file.
+bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream);
+bool WXDLLEXPORT wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename);
+#else
+// For compatibility with existing file formats:
+// converts from/to a stream to/from a temporary file.
+bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxOutputStream& stream);
+bool WXDLLEXPORT wxTransferStreamToFile(wxInputStream& stream, const wxString& filename);
+#endif // wxUSE_STD_IOSTREAM
+
+#endif // wxUSE_DOC_VIEW_ARCHITECTURE
+
+#endif // _WX_DOCH__
diff --git a/3rdparty/wxWidgets/include/wx/dragimag.h b/3rdparty/wxWidgets/include/wx/dragimag.h
new file mode 100644
index 0000000000..279cd56837
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dragimag.h
@@ -0,0 +1,54 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dragimag.h
+// Purpose: wxDragImage base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dragimag.h 33948 2005-05-04 18:57:50Z JS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DRAGIMAG_H_BASE_
+#define _WX_DRAGIMAG_H_BASE_
+
+#if wxUSE_DRAGIMAGE
+
+class WXDLLEXPORT wxRect;
+class WXDLLEXPORT wxMemoryDC;
+class WXDLLEXPORT wxDC;
+
+#if defined(__WXMSW__)
+# if defined(__WXUNIVERSAL__)
+# include "wx/generic/dragimgg.h"
+# define wxDragImage wxGenericDragImage
+# else
+# include "wx/msw/dragimag.h"
+# endif
+
+#elif defined(__WXMOTIF__)
+# include "wx/generic/dragimgg.h"
+# define wxDragImage wxGenericDragImage
+
+#elif defined(__WXGTK__)
+# include "wx/generic/dragimgg.h"
+# define wxDragImage wxGenericDragImage
+
+#elif defined(__WXX11__)
+# include "wx/generic/dragimgg.h"
+# define wxDragImage wxGenericDragImage
+
+#elif defined(__WXMAC__)
+# include "wx/generic/dragimgg.h"
+# define wxDragImage wxGenericDragImage
+
+#elif defined(__WXPM__)
+# include "wx/generic/dragimgg.h"
+# define wxDragImage wxGenericDragImage
+
+#endif
+
+#endif // wxUSE_DRAGIMAGE
+
+#endif
+ // _WX_DRAGIMAG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/dynarray.h b/3rdparty/wxWidgets/include/wx/dynarray.h
new file mode 100644
index 0000000000..5dfb8bf269
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dynarray.h
@@ -0,0 +1,1044 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/dynarray.h
+// Purpose: auto-resizable (i.e. dynamic) array support
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 12.09.97
+// RCS-ID: $Id: dynarray.h 45498 2007-04-16 13:03:05Z VZ $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _DYNARRAY_H
+#define _DYNARRAY_H
+
+#include "wx/defs.h"
+
+#if wxUSE_STL
+ #include "wx/beforestd.h"
+ #include
+ #include
+ #include "wx/afterstd.h"
+#endif
+
+/*
+ This header defines the dynamic arrays and object arrays (i.e. arrays which
+ own their elements). Dynamic means that the arrays grow automatically as
+ needed.
+
+ These macros are ugly (especially if you look in the sources ;-), but they
+ allow us to define "template" classes without actually using templates and so
+ this works with all compilers (and may be also much faster to compile even
+ with a compiler which does support templates). The arrays defined with these
+ macros are type-safe.
+
+ Range checking is performed in debug build for both arrays and objarrays but
+ not in release build - so using an invalid index will just lead to a crash
+ then.
+
+ Note about memory usage: arrays never shrink automatically (although you may
+ use Shrink() function explicitly), they only grow, so loading 10 millions in
+ an array only to delete them 2 lines below might be a bad idea if the array
+ object is not going to be destroyed soon. However, as it does free memory
+ when destroyed, it is ok if the array is a local variable.
+ */
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+/*
+ The initial size by which an array grows when an element is added default
+ value avoids allocate one or two bytes when the array is created which is
+ rather inefficient
+*/
+#define WX_ARRAY_DEFAULT_INITIAL_SIZE (16)
+
+// ----------------------------------------------------------------------------
+// types
+// ----------------------------------------------------------------------------
+
+/*
+ Callback compare function for quick sort.
+
+ It must return negative value, 0 or positive value if the first item is
+ less than, equal to or greater than the second one.
+ */
+extern "C"
+{
+typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
+}
+
+// ----------------------------------------------------------------------------
+// Base class managing data having size of type 'long' (not used directly)
+//
+// NB: for efficiency this often used class has no virtual functions (hence no
+// virtual table), even dtor is *not* virtual. If used as expected it
+// won't create any problems because ARRAYs from DEFINE_ARRAY have no dtor
+// at all, so it's not too important if it's not called (this happens when
+// you cast "SomeArray *" as "BaseArray *" and then delete it)
+// ----------------------------------------------------------------------------
+
+#if wxUSE_STL
+
+template
+class WXDLLIMPEXP_BASE wxArray_SortFunction
+{
+public:
+ typedef int (wxCMPFUNC_CONV *CMPFUNC)(T* pItem1, T* pItem2);
+
+ wxArray_SortFunction(CMPFUNC f) : m_f(f) { }
+ bool operator()(const T& i1, const T& i2)
+ { return m_f((T*)&i1, (T*)&i2) < 0; }
+private:
+ CMPFUNC m_f;
+};
+
+template
+class WXDLLIMPEXP_BASE wxSortedArray_SortFunction
+{
+public:
+ typedef F CMPFUNC;
+
+ wxSortedArray_SortFunction(CMPFUNC f) : m_f(f) { }
+ bool operator()(const T& i1, const T& i2)
+ { return m_f(i1, i2) < 0; }
+private:
+ CMPFUNC m_f;
+};
+
+#define _WX_DECLARE_BASEARRAY(T, name, classexp) \
+ typedef int (wxCMPFUNC_CONV *CMPFUN##name)(T pItem1, T pItem2); \
+ typedef wxSortedArray_SortFunction name##_Predicate; \
+ _WX_DECLARE_BASEARRAY_2(T, name, name##_Predicate, classexp)
+
+#define _WX_DECLARE_BASEARRAY_2(T, name, predicate, classexp) \
+classexp name : public std::vector \
+{ \
+ typedef predicate Predicate; \
+ typedef predicate::CMPFUNC SCMPFUNC; \
+public: \
+ typedef wxArray_SortFunction::CMPFUNC CMPFUNC; \
+public: \
+ void Empty() { clear(); } \
+ void Clear() { clear(); } \
+ void Alloc(size_t uiSize) { reserve(uiSize); } \
+ void Shrink(); \
+ \
+ size_t GetCount() const { return size(); } \
+ void SetCount(size_t n, T v = T()) { resize(n, v); } \
+ bool IsEmpty() const { return empty(); } \
+ size_t Count() const { return size(); } \
+ \
+ typedef T base_type; \
+ \
+protected: \
+ T& Item(size_t uiIndex) const \
+ { wxASSERT( uiIndex < size() ); return (T&)operator[](uiIndex); } \
+ \
+ int Index(T e, bool bFromEnd = false) const; \
+ int Index(T lItem, CMPFUNC fnCompare) const; \
+ size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \
+ void Add(T lItem, size_t nInsert = 1) \
+ { insert(end(), nInsert, lItem); } \
+ size_t Add(T lItem, CMPFUNC fnCompare); \
+ void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
+ { insert(begin() + uiIndex, nInsert, lItem); } \
+ void Remove(T lItem); \
+ void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
+ { erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
+ \
+ void Sort(CMPFUNC fCmp) \
+ { \
+ wxArray_SortFunction p(fCmp); \
+ std::sort(begin(), end(), p); \
+ } \
+}
+
+#else // if !wxUSE_STL
+
+#define _WX_DECLARE_BASEARRAY(T, name, classexp) \
+classexp name \
+{ \
+ typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STL */ \
+public: \
+ name(); \
+ name(const name& array); \
+ name& operator=(const name& src); \
+ ~name(); \
+ \
+ void Empty() { m_nCount = 0; } \
+ void Clear(); \
+ void Alloc(size_t n) { if ( n > m_nSize ) Realloc(n); } \
+ void Shrink(); \
+ \
+ size_t GetCount() const { return m_nCount; } \
+ void SetCount(size_t n, T defval = T()); \
+ bool IsEmpty() const { return m_nCount == 0; } \
+ size_t Count() const { return m_nCount; } \
+ \
+ typedef T base_type; \
+ \
+protected: \
+ T& Item(size_t uiIndex) const \
+ { wxASSERT( uiIndex < m_nCount ); return m_pItems[uiIndex]; } \
+ T& operator[](size_t uiIndex) const { return Item(uiIndex); } \
+ \
+ int Index(T lItem, bool bFromEnd = false) const; \
+ int Index(T lItem, CMPFUNC fnCompare) const; \
+ size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \
+ void Add(T lItem, size_t nInsert = 1); \
+ size_t Add(T lItem, CMPFUNC fnCompare); \
+ void Insert(T lItem, size_t uiIndex, size_t nInsert = 1); \
+ void Remove(T lItem); \
+ void RemoveAt(size_t uiIndex, size_t nRemove = 1); \
+ \
+ void Sort(CMPFUNC fnCompare); \
+ \
+ /* *minimal* STL-ish interface, for derived classes */ \
+ typedef T value_type; \
+ typedef value_type* iterator; \
+ typedef const value_type* const_iterator; \
+ typedef value_type& reference; \
+ typedef const value_type& const_reference; \
+ typedef int difference_type; \
+ typedef size_t size_type; \
+ \
+ void assign(const_iterator first, const_iterator last); \
+ void assign(size_type n, const_reference v); \
+ size_type capacity() const { return m_nSize; } \
+ iterator erase(iterator first, iterator last) \
+ { \
+ size_type idx = first - begin(); \
+ RemoveAt(idx, last - first); \
+ return begin() + idx; \
+ } \
+ iterator erase(iterator it) { return erase(it, it + 1); } \
+ void insert(iterator it, size_type n, const value_type& v) \
+ { Insert(v, it - begin(), n); } \
+ iterator insert(iterator it, const value_type& v = value_type()) \
+ { \
+ size_type idx = it - begin(); \
+ Insert(v, idx); \
+ return begin() + idx; \
+ } \
+ void insert(iterator it, const_iterator first, const_iterator last);\
+ void pop_back() { RemoveAt(size() - 1); } \
+ void push_back(const value_type& v) { Add(v); } \
+ void reserve(size_type n) { Alloc(n); } \
+ void resize(size_type n, value_type v = value_type()) \
+ { SetCount(n, v); } \
+ \
+ iterator begin() { return m_pItems; } \
+ iterator end() { return m_pItems + m_nCount; } \
+ const_iterator begin() const { return m_pItems; } \
+ const_iterator end() const { return m_pItems + m_nCount; } \
+ \
+ /* the following functions may be made directly public because */ \
+ /* they don't use the type of the elements at all */ \
+public: \
+ void clear() { Clear(); } \
+ bool empty() const { return IsEmpty(); } \
+ size_type max_size() const { return INT_MAX; } \
+ size_type size() const { return GetCount(); } \
+ \
+private: \
+ void Grow(size_t nIncrement = 0); \
+ bool Realloc(size_t nSize); \
+ \
+ size_t m_nSize, \
+ m_nCount; \
+ \
+ T *m_pItems; \
+}
+
+#endif // !wxUSE_STL
+
+// ============================================================================
+// The private helper macros containing the core of the array classes
+// ============================================================================
+
+// Implementation notes:
+//
+// JACS: Salford C++ doesn't like 'var->operator=' syntax, as in:
+// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
+// so using a temporary variable instead.
+//
+// The classes need a (even trivial) ~name() to link under Mac X
+//
+// _WX_ERROR_REMOVE is needed to resolve the name conflict between the wxT()
+// macro and T typedef: we can't use wxT() inside WX_DEFINE_ARRAY!
+
+#define _WX_ERROR_REMOVE wxT("removing inexisting element in wxArray::Remove")
+
+// ----------------------------------------------------------------------------
+// _WX_DEFINE_TYPEARRAY: array for simple types
+// ----------------------------------------------------------------------------
+
+#if wxUSE_STL
+
+#define _WX_DEFINE_TYPEARRAY(T, name, base, classexp) \
+typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
+classexp name : public base \
+{ \
+public: \
+ T& operator[](size_t uiIndex) const \
+ { return (T&)(base::operator[](uiIndex)); } \
+ T& Item(size_t uiIndex) const \
+ { return (T&)/*const cast*/base::operator[](uiIndex); } \
+ T& Last() const \
+ { return Item(Count() - 1); } \
+ \
+ int Index(T e, bool bFromEnd = false) const \
+ { return base::Index(e, bFromEnd); } \
+ \
+ void Add(T lItem, size_t nInsert = 1) \
+ { insert(end(), nInsert, lItem); } \
+ void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
+ { insert(begin() + uiIndex, nInsert, lItem); } \
+ \
+ void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
+ { base::RemoveAt(uiIndex, nRemove); } \
+ void Remove(T lItem) \
+ { int iIndex = Index(lItem); \
+ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
+ _WX_ERROR_REMOVE); \
+ RemoveAt((size_t)iIndex); } \
+ \
+ void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \
+}
+
+#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
+ _WX_DEFINE_TYPEARRAY(T, name, base, classexp)
+
+#else // if !wxUSE_STL
+
+// common declaration used by both _WX_DEFINE_TYPEARRAY and
+// _WX_DEFINE_TYPEARRAY_PTR
+#define _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, ptrop) \
+wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type), \
+ TypeTooBigToBeStoredIn##base, \
+ name); \
+typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
+classexp name : public base \
+{ \
+public: \
+ name() { } \
+ ~name() { } \
+ \
+ name& operator=(const name& src) \
+ { base* temp = (base*) this; \
+ (*temp) = ((const base&)src); \
+ return *this; } \
+ \
+ T& operator[](size_t uiIndex) const \
+ { return (T&)(base::operator[](uiIndex)); } \
+ T& Item(size_t uiIndex) const \
+ { return (T&)(base::operator[](uiIndex)); } \
+ T& Last() const \
+ { return (T&)(base::operator[](Count() - 1)); } \
+ \
+ int Index(T lItem, bool bFromEnd = false) const \
+ { return base::Index((base_type)lItem, bFromEnd); } \
+ \
+ void Add(T lItem, size_t nInsert = 1) \
+ { base::Add((base_type)lItem, nInsert); } \
+ void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
+ { base::Insert((base_type)lItem, uiIndex, nInsert) ; } \
+ \
+ void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
+ { base::RemoveAt(uiIndex, nRemove); } \
+ void Remove(T lItem) \
+ { int iIndex = Index(lItem); \
+ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
+ _WX_ERROR_REMOVE); \
+ base::RemoveAt((size_t)iIndex); } \
+ \
+ void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \
+ \
+ /* STL-like interface */ \
+private: \
+ typedef base::iterator biterator; \
+ typedef base::const_iterator bconst_iterator; \
+ typedef base::value_type bvalue_type; \
+ typedef base::const_reference bconst_reference; \
+public: \
+ typedef T value_type; \
+ typedef value_type* pointer; \
+ typedef const value_type* const_pointer; \
+ typedef value_type* iterator; \
+ typedef const value_type* const_iterator; \
+ typedef value_type& reference; \
+ typedef const value_type& const_reference; \
+ typedef base::difference_type difference_type; \
+ typedef base::size_type size_type; \
+ \
+ class reverse_iterator \
+ { \
+ typedef T value_type; \
+ typedef value_type& reference; \
+ typedef value_type* pointer; \
+ typedef reverse_iterator itor; \
+ friend inline itor operator+(int o, const itor& it) \
+ { return it.m_ptr - o; } \
+ friend inline itor operator+(const itor& it, int o) \
+ { return it.m_ptr - o; } \
+ friend inline itor operator-(const itor& it, int o) \
+ { return it.m_ptr + o; } \
+ friend inline difference_type operator-(const itor& i1, \
+ const itor& i2) \
+ { return i1.m_ptr - i2.m_ptr; } \
+ \
+ public: \
+ pointer m_ptr; \
+ reverse_iterator() : m_ptr(NULL) { } \
+ reverse_iterator(pointer ptr) : m_ptr(ptr) { } \
+ reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } \
+ reference operator*() const { return *m_ptr; } \
+ ptrop \
+ itor& operator++() { --m_ptr; return *this; } \
+ const itor operator++(int) \
+ { reverse_iterator tmp = *this; --m_ptr; return tmp; } \
+ itor& operator--() { ++m_ptr; return *this; } \
+ const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
+ bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
+ bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
+ }; \
+ \
+ class const_reverse_iterator \
+ { \
+ typedef T value_type; \
+ typedef const value_type& reference; \
+ typedef const value_type* pointer; \
+ typedef const_reverse_iterator itor; \
+ friend inline itor operator+(int o, const itor& it) \
+ { return it.m_ptr - o; } \
+ friend inline itor operator+(const itor& it, int o) \
+ { return it.m_ptr - o; } \
+ friend inline itor operator-(const itor& it, int o) \
+ { return it.m_ptr + o; } \
+ friend inline difference_type operator-(const itor& i1, \
+ const itor& i2) \
+ { return i1.m_ptr - i2.m_ptr; } \
+ \
+ public: \
+ pointer m_ptr; \
+ const_reverse_iterator() : m_ptr(NULL) { } \
+ const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } \
+ const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } \
+ const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }\
+ reference operator*() const { return *m_ptr; } \
+ ptrop \
+ itor& operator++() { --m_ptr; return *this; } \
+ const itor operator++(int) \
+ { itor tmp = *this; --m_ptr; return tmp; } \
+ itor& operator--() { ++m_ptr; return *this; } \
+ const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
+ bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
+ bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
+ }; \
+ \
+ name(size_type n, const_reference v) { assign(n, v); } \
+ name(const_iterator first, const_iterator last) \
+ { assign(first, last); } \
+ void assign(const_iterator first, const_iterator last) \
+ { base::assign((bconst_iterator)first, (bconst_iterator)last); } \
+ void assign(size_type n, const_reference v) \
+ { base::assign(n, (bconst_reference)v); } \
+ reference back() { return *(end() - 1); } \
+ const_reference back() const { return *(end() - 1); } \
+ iterator begin() { return (iterator)base::begin(); } \
+ const_iterator begin() const { return (const_iterator)base::begin(); }\
+ size_type capacity() const { return base::capacity(); } \
+ iterator end() { return (iterator)base::end(); } \
+ const_iterator end() const { return (const_iterator)base::end(); } \
+ iterator erase(iterator first, iterator last) \
+ { return (iterator)base::erase((biterator)first, (biterator)last); }\
+ iterator erase(iterator it) \
+ { return (iterator)base::erase((biterator)it); } \
+ reference front() { return *begin(); } \
+ const_reference front() const { return *begin(); } \
+ void insert(iterator it, size_type n, const_reference v) \
+ { base::insert((biterator)it, n, (bconst_reference)v); } \
+ iterator insert(iterator it, const_reference v = value_type()) \
+ { return (iterator)base::insert((biterator)it, (bconst_reference)v); }\
+ void insert(iterator it, const_iterator first, const_iterator last) \
+ { base::insert((biterator)it, (bconst_iterator)first, \
+ (bconst_iterator)last); } \
+ void pop_back() { base::pop_back(); } \
+ void push_back(const_reference v) \
+ { base::push_back((bconst_reference)v); } \
+ reverse_iterator rbegin() { return reverse_iterator(end() - 1); } \
+ const_reverse_iterator rbegin() const; \
+ reverse_iterator rend() { return reverse_iterator(begin() - 1); } \
+ const_reverse_iterator rend() const; \
+ void reserve(size_type n) { base::reserve(n); } \
+ void resize(size_type n, value_type v = value_type()) \
+ { base::resize(n, v); } \
+}
+
+#define _WX_PTROP pointer operator->() const { return m_ptr; }
+#define _WX_PTROP_NONE
+
+#define _WX_DEFINE_TYPEARRAY(T, name, base, classexp) \
+ _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP)
+#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
+ _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE)
+
+#endif // !wxUSE_STL
+
+// ----------------------------------------------------------------------------
+// _WX_DEFINE_SORTED_TYPEARRAY: sorted array for simple data types
+// cannot handle types with size greater than pointer because of sorting
+// ----------------------------------------------------------------------------
+
+#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classexp, comptype)\
+wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type), \
+ TypeTooBigToBeStoredInSorted##base, \
+ name); \
+classexp name : public base \
+{ \
+ typedef comptype SCMPFUNC; \
+public: \
+ name(comptype fn defcomp) { m_fnCompare = fn; } \
+ \
+ name& operator=(const name& src) \
+ { base* temp = (base*) this; \
+ (*temp) = ((const base&)src); \
+ m_fnCompare = src.m_fnCompare; \
+ return *this; } \
+ \
+ T& operator[](size_t uiIndex) const \
+ { return (T&)(base::operator[](uiIndex)); } \
+ T& Item(size_t uiIndex) const \
+ { return (T&)(base::operator[](uiIndex)); } \
+ T& Last() const \
+ { return (T&)(base::operator[](size() - 1)); } \
+ \
+ int Index(T lItem) const \
+ { return base::Index(lItem, (CMPFUNC)m_fnCompare); } \
+ \
+ size_t IndexForInsert(T lItem) const \
+ { return base::IndexForInsert(lItem, (CMPFUNC)m_fnCompare); } \
+ \
+ void AddAt(T item, size_t index) \
+ { base::insert(begin() + index, item); } \
+ \
+ size_t Add(T lItem) \
+ { return base::Add(lItem, (CMPFUNC)m_fnCompare); } \
+ \
+ void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
+ { base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
+ void Remove(T lItem) \
+ { int iIndex = Index(lItem); \
+ wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
+ _WX_ERROR_REMOVE ); \
+ base::erase(begin() + iIndex); } \
+ \
+private: \
+ comptype m_fnCompare; \
+}
+
+
+// ----------------------------------------------------------------------------
+// _WX_DECLARE_OBJARRAY: an array for pointers to type T with owning semantics
+// ----------------------------------------------------------------------------
+
+#define _WX_DECLARE_OBJARRAY(T, name, base, classexp) \
+typedef int (CMPFUNC_CONV *CMPFUNC##T)(T **pItem1, T **pItem2); \
+classexp name : protected base \
+{ \
+typedef int (CMPFUNC_CONV *CMPFUNC##base)(void **pItem1, void **pItem2); \
+typedef base base_array; \
+public: \
+ name() { } \
+ name(const name& src); \
+ name& operator=(const name& src); \
+ \
+ ~name(); \
+ \
+ void Alloc(size_t count) { reserve(count); } \
+ size_t GetCount() const { return base_array::size(); } \
+ size_t size() const { return base_array::size(); } \
+ bool IsEmpty() const { return base_array::empty(); } \
+ bool empty() const { return base_array::empty(); } \
+ size_t Count() const { return base_array::size(); } \
+ void Shrink() { base::Shrink(); } \
+ \
+ T& operator[](size_t uiIndex) const \
+ { return *(T*)base::operator[](uiIndex); } \
+ T& Item(size_t uiIndex) const \
+ { return *(T*)base::operator[](uiIndex); } \
+ T& Last() const \
+ { return *(T*)(base::operator[](size() - 1)); } \
+ \
+ int Index(const T& lItem, bool bFromEnd = false) const; \
+ \
+ void Add(const T& lItem, size_t nInsert = 1); \
+ void Add(const T* pItem) \
+ { base::push_back((T*)pItem); } \
+ void push_back(const T* pItem) \
+ { base::push_back((T*)pItem); } \
+ void push_back(const T& lItem) \
+ { Add(lItem); } \
+ \
+ void Insert(const T& lItem, size_t uiIndex, size_t nInsert = 1); \
+ void Insert(const T* pItem, size_t uiIndex) \
+ { base::insert(begin() + uiIndex, (T*)pItem); } \
+ \
+ void Empty() { DoEmpty(); base::clear(); } \
+ void Clear() { DoEmpty(); base::clear(); } \
+ \
+ T* Detach(size_t uiIndex) \
+ { T* p = (T*)base::operator[](uiIndex); \
+ base::erase(begin() + uiIndex); return p; } \
+ void RemoveAt(size_t uiIndex, size_t nRemove = 1); \
+ \
+ void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC##base)fCmp); } \
+ \
+private: \
+ void DoEmpty(); \
+ void DoCopy(const name& src); \
+}
+
+// ============================================================================
+// The public macros for declaration and definition of the dynamic arrays
+// ============================================================================
+
+// Please note that for each macro WX_FOO_ARRAY we also have
+// WX_FOO_EXPORTED_ARRAY and WX_FOO_USER_EXPORTED_ARRAY which are exactly the
+// same except that they use an additional __declspec(dllexport) or equivalent
+// under Windows if needed.
+//
+// The first (just EXPORTED) macros do it if wxWidgets was compiled as a DLL
+// and so must be used used inside the library. The second kind (USER_EXPORTED)
+// allow the user code to do it when it wants. This is needed if you have a dll
+// that wants to export a wxArray daubed with your own import/export goo.
+//
+// Finally, you can define the macro below as something special to modify the
+// arrays defined by a simple WX_FOO_ARRAY as well. By default is is empty.
+#define wxARRAY_DEFAULT_EXPORT
+
+// ----------------------------------------------------------------------------
+// WX_DECLARE_BASEARRAY(T, name) declare an array class named "name" containing
+// the elements of type T
+// ----------------------------------------------------------------------------
+
+#define WX_DECLARE_BASEARRAY(T, name) \
+ WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, wxARRAY_DEFAULT_EXPORT)
+
+#define WX_DECLARE_EXPORTED_BASEARRAY(T, name) \
+ WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, WXDLLEXPORT)
+
+#define WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, expmode) \
+ typedef T _wxArray##name; \
+ _WX_DECLARE_BASEARRAY(_wxArray##name, name, class expmode)
+
+// ----------------------------------------------------------------------------
+// WX_DEFINE_TYPEARRAY(T, name, base) define an array class named "name" deriving
+// from class "base" containing the elements of type T
+//
+// Note that the class defined has only inline function and doesn't take any
+// space at all so there is no size penalty for defining multiple array classes
+// ----------------------------------------------------------------------------
+
+#define WX_DEFINE_TYPEARRAY(T, name, base) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class wxARRAY_DEFAULT_EXPORT)
+
+#define WX_DEFINE_TYPEARRAY_PTR(T, name, base) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class wxARRAY_DEFAULT_EXPORT)
+
+#define WX_DEFINE_EXPORTED_TYPEARRAY(T, name, base) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class WXDLLEXPORT)
+
+#define WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, base) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class WXDLLEXPORT)
+
+#define WX_DEFINE_USER_EXPORTED_TYPEARRAY(T, name, base, expdecl) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class expdecl)
+
+#define WX_DEFINE_USER_EXPORTED_TYPEARRAY_PTR(T, name, base, expdecl) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class expdecl)
+
+#define WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, classdecl) \
+ typedef T _wxArray##name; \
+ _WX_DEFINE_TYPEARRAY(_wxArray##name, name, base, classdecl)
+
+#define WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, classdecl) \
+ typedef T _wxArray##name; \
+ _WX_DEFINE_TYPEARRAY_PTR(_wxArray##name, name, base, classdecl)
+
+// ----------------------------------------------------------------------------
+// WX_DEFINE_SORTED_TYPEARRAY: this is the same as the previous macro, but it
+// defines a sorted array.
+//
+// Differences:
+// 1) it must be given a COMPARE function in ctor which takes 2 items of type
+// T* and should return -1, 0 or +1 if the first one is less/greater
+// than/equal to the second one.
+// 2) the Add() method inserts the item in such was that the array is always
+// sorted (it uses the COMPARE function)
+// 3) it has no Sort() method because it's always sorted
+// 4) Index() method is much faster (the sorted arrays use binary search
+// instead of linear one), but Add() is slower.
+// 5) there is no Insert() method because you can't insert an item into the
+// given position in a sorted array but there is IndexForInsert()/AddAt()
+// pair which may be used to optimize a common operation of "insert only if
+// not found"
+//
+// Note that you have to specify the comparison function when creating the
+// objects of this array type. If, as in 99% of cases, the comparison function
+// is the same for all objects of a class, WX_DEFINE_SORTED_TYPEARRAY_CMP below
+// is more convenient.
+//
+// Summary: use this class when the speed of Index() function is important, use
+// the normal arrays otherwise.
+// ----------------------------------------------------------------------------
+
+// we need a macro which expands to nothing to pass correct number of
+// parameters to a nested macro invocation even when we don't have anything to
+// pass it
+#define wxARRAY_EMPTY
+
+#define WX_DEFINE_SORTED_TYPEARRAY(T, name, base) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, \
+ wxARRAY_DEFAULT_EXPORT)
+
+#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, base) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, WXDLLEXPORT)
+
+#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, expmode) \
+ typedef T _wxArray##name; \
+ typedef int (CMPFUNC_CONV *SCMPFUNC##name)(T pItem1, T pItem2); \
+ _WX_DEFINE_SORTED_TYPEARRAY_2(_wxArray##name, name, base, \
+ wxARRAY_EMPTY, class expmode, SCMPFUNC##name)
+
+// ----------------------------------------------------------------------------
+// WX_DEFINE_SORTED_TYPEARRAY_CMP: exactly the same as above but the comparison
+// function is provided by this macro and the objects of this class have a
+// default constructor which just uses it.
+//
+// The arguments are: the element type, the comparison function and the array
+// name
+//
+// NB: this is, of course, how WX_DEFINE_SORTED_TYPEARRAY() should have worked
+// from the very beginning - unfortunately I didn't think about this earlier
+// ----------------------------------------------------------------------------
+
+#define WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
+ wxARRAY_DEFAULT_EXPORT)
+
+#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
+ WXDLLEXPORT)
+
+#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
+ expmode) \
+ typedef T _wxArray##name; \
+ typedef int (CMPFUNC_CONV *SCMPFUNC##name)(T pItem1, T pItem2); \
+ _WX_DEFINE_SORTED_TYPEARRAY_2(_wxArray##name, name, base, = cmpfunc, \
+ class expmode, SCMPFUNC##name)
+
+// ----------------------------------------------------------------------------
+// WX_DECLARE_OBJARRAY(T, name): this macro generates a new array class
+// named "name" which owns the objects of type T it contains, i.e. it will
+// delete them when it is destroyed.
+//
+// An element is of type T*, but arguments of type T& are taken (see below!)
+// and T& is returned.
+//
+// Don't use this for simple types such as "int" or "long"!
+//
+// Note on Add/Insert functions:
+// 1) function(T*) gives the object to the array, i.e. it will delete the
+// object when it's removed or in the array's dtor
+// 2) function(T&) will create a copy of the object and work with it
+//
+// Also:
+// 1) Remove() will delete the object after removing it from the array
+// 2) Detach() just removes the object from the array (returning pointer to it)
+//
+// NB1: Base type T should have an accessible copy ctor if Add(T&) is used
+// NB2: Never ever cast a array to it's base type: as dtor is not virtual
+// and so you risk having at least the memory leaks and probably worse
+//
+// Some functions of this class are not inline, so it takes some space to
+// define new class from this template even if you don't use it - which is not
+// the case for the simple (non-object) array classes
+//
+// To use an objarray class you must
+// #include "dynarray.h"
+// WX_DECLARE_OBJARRAY(element_type, list_class_name)
+// #include "arrimpl.cpp"
+// WX_DEFINE_OBJARRAY(list_class_name) // name must be the same as above!
+//
+// This is necessary because at the moment of DEFINE_OBJARRAY class parsing the
+// element_type must be fully defined (i.e. forward declaration is not
+// enough), while WX_DECLARE_OBJARRAY may be done anywhere. The separation of
+// two allows to break cicrcular dependencies with classes which have member
+// variables of objarray type.
+// ----------------------------------------------------------------------------
+
+#define WX_DECLARE_OBJARRAY(T, name) \
+ WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, wxARRAY_DEFAULT_EXPORT)
+
+#define WX_DECLARE_EXPORTED_OBJARRAY(T, name) \
+ WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, WXDLLEXPORT)
+
+#define WX_DECLARE_OBJARRAY_WITH_DECL(T, name, decl) \
+ typedef T _wxObjArray##name; \
+ _WX_DECLARE_OBJARRAY(_wxObjArray##name, name, wxArrayPtrVoid, decl)
+
+#define WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, expmode) \
+ WX_DECLARE_OBJARRAY_WITH_DECL(T, name, class expmode)
+
+// WX_DEFINE_OBJARRAY is going to be redefined when arrimpl.cpp is included,
+// try to provoke a human-understandable error if it used incorrectly.
+//
+// there is no real need for 3 different macros in the DEFINE case but do it
+// anyhow for consistency
+#define WX_DEFINE_OBJARRAY(name) DidYouIncludeArrimplCpp
+#define WX_DEFINE_EXPORTED_OBJARRAY(name) WX_DEFINE_OBJARRAY(name)
+#define WX_DEFINE_USER_EXPORTED_OBJARRAY(name) WX_DEFINE_OBJARRAY(name)
+
+// ----------------------------------------------------------------------------
+// Some commonly used predefined base arrays
+// ----------------------------------------------------------------------------
+
+WX_DECLARE_USER_EXPORTED_BASEARRAY(const void *, wxBaseArrayPtrVoid,
+ WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_BASEARRAY(char, wxBaseArrayChar, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_BASEARRAY(short, wxBaseArrayShort, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_BASEARRAY(int, wxBaseArrayInt, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_BASEARRAY(long, wxBaseArrayLong, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_BASEARRAY(size_t, wxBaseArraySizeT, WXDLLIMPEXP_BASE);
+WX_DECLARE_USER_EXPORTED_BASEARRAY(double, wxBaseArrayDouble, WXDLLIMPEXP_BASE);
+
+// ----------------------------------------------------------------------------
+// Convenience macros to define arrays from base arrays
+// ----------------------------------------------------------------------------
+
+#define WX_DEFINE_ARRAY(T, name) \
+ WX_DEFINE_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_ARRAY_PTR(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_EXPORTED_ARRAY(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_EXPORTED_ARRAY_PTR(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_ARRAY_WITH_DECL_PTR(T, name, decl) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayPtrVoid, decl)
+#define WX_DEFINE_USER_EXPORTED_ARRAY(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_PTR(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_ARRAY_CHAR(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayChar)
+#define WX_DEFINE_EXPORTED_ARRAY_CHAR(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayChar)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_CHAR(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayChar, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_ARRAY_SHORT(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayShort)
+#define WX_DEFINE_EXPORTED_ARRAY_SHORT(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayShort)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_SHORT(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayShort, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_ARRAY_INT(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayInt)
+#define WX_DEFINE_EXPORTED_ARRAY_INT(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayInt)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_INT(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayInt, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_ARRAY_LONG(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayLong)
+#define WX_DEFINE_EXPORTED_ARRAY_LONG(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayLong)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_LONG(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayLong, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_ARRAY_SIZE_T(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArraySizeT)
+#define WX_DEFINE_EXPORTED_ARRAY_SIZE_T(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArraySizeT)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArraySizeT, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_ARRAY_DOUBLE(T, name) \
+ WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayDouble)
+#define WX_DEFINE_EXPORTED_ARRAY_DOUBLE(T, name) \
+ WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayDouble)
+#define WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(T, name, expmode) \
+ WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayDouble, wxARRAY_EMPTY expmode)
+
+// ----------------------------------------------------------------------------
+// Convenience macros to define sorted arrays from base arrays
+// ----------------------------------------------------------------------------
+
+#define WX_DEFINE_SORTED_ARRAY(T, name) \
+ WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_CHAR(T, name) \
+ WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayChar)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CHAR(T, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayChar)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CHAR(T, name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayChar, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_SHORT(T, name) \
+ WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayShort)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_SHORT(T, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayShort)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SHORT(T, name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayShort, wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_INT(T, name) \
+ WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayInt)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_INT(T, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayInt)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_INT(T, name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayInt, expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_LONG(T, name) \
+ WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayLong)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_LONG(T, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayLong)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_LONG(T, name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayLong, expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_SIZE_T(T, name) \
+ WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArraySizeT)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_SIZE_T(T, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArraySizeT)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(T, name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArraySizeT, wxARRAY_EMPTY expmode)
+
+// ----------------------------------------------------------------------------
+// Convenience macros to define sorted arrays from base arrays
+// ----------------------------------------------------------------------------
+
+#define WX_DEFINE_SORTED_ARRAY_CMP(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayPtrVoid)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP(T, cmpfunc, \
+ name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
+ wxBaseArrayPtrVoid, \
+ wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_CMP_CHAR(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayChar)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_CHAR(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayChar)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_CHAR(T, cmpfunc, \
+ name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
+ wxBaseArrayChar, \
+ wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_CMP_SHORT(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayShort)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_SHORT(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayShort)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_SHORT(T, cmpfunc, \
+ name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
+ wxBaseArrayShort, \
+ wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_CMP_INT(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayInt)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_INT(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayInt)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_INT(T, cmpfunc, \
+ name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
+ wxBaseArrayInt, \
+ wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_CMP_LONG(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayLong)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_LONG(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayLong)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_LONG(T, cmpfunc, \
+ name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
+ wxBaseArrayLong, \
+ wxARRAY_EMPTY expmode)
+
+#define WX_DEFINE_SORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArraySizeT)
+#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, name) \
+ WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArraySizeT)
+#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, \
+ name, expmode) \
+ WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
+ wxBaseArraySizeT, \
+ wxARRAY_EMPTY expmode)
+
+// ----------------------------------------------------------------------------
+// Some commonly used predefined arrays
+// ----------------------------------------------------------------------------
+
+WX_DEFINE_USER_EXPORTED_ARRAY_SHORT(short, wxArrayShort, class WXDLLIMPEXP_BASE);
+WX_DEFINE_USER_EXPORTED_ARRAY_INT(int, wxArrayInt, class WXDLLIMPEXP_BASE);
+WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(double, wxArrayDouble, class WXDLLIMPEXP_BASE);
+WX_DEFINE_USER_EXPORTED_ARRAY_LONG(long, wxArrayLong, class WXDLLIMPEXP_BASE);
+WX_DEFINE_USER_EXPORTED_ARRAY_PTR(void *, wxArrayPtrVoid, class WXDLLIMPEXP_BASE);
+
+// -----------------------------------------------------------------------------
+// convenience macros
+// -----------------------------------------------------------------------------
+
+// prepend all element of one array to another one; e.g. if first array contains
+// elements X,Y,Z and the second contains A,B,C (in those orders), then the
+// first array will be result as A,B,C,X,Y,Z
+#define WX_PREPEND_ARRAY(array, other) \
+ { \
+ size_t wxAAcnt = (other).size(); \
+ (array).Alloc(wxAAcnt); \
+ for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
+ { \
+ (array).Insert((other)[wxAAn], wxAAn); \
+ } \
+ }
+
+// append all element of one array to another one
+#define WX_APPEND_ARRAY(array, other) \
+ { \
+ size_t wxAAcnt = (other).size(); \
+ (array).Alloc(wxAAcnt); \
+ for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
+ { \
+ (array).push_back((other)[wxAAn]); \
+ } \
+ }
+
+// delete all array elements
+//
+// NB: the class declaration of the array elements must be visible from the
+// place where you use this macro, otherwise the proper destructor may not
+// be called (a decent compiler should give a warning about it, but don't
+// count on it)!
+#define WX_CLEAR_ARRAY(array) \
+ { \
+ size_t wxAAcnt = (array).size(); \
+ for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
+ { \
+ delete (array)[wxAAn]; \
+ } \
+ \
+ (array).clear(); \
+ }
+
+#endif // _DYNARRAY_H
diff --git a/3rdparty/wxWidgets/include/wx/dynlib.h b/3rdparty/wxWidgets/include/wx/dynlib.h
new file mode 100644
index 0000000000..3552bdcaaf
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dynlib.h
@@ -0,0 +1,359 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/dynlib.h
+// Purpose: Dynamic library loading classes
+// Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik
+// Modified by:
+// Created: 20/07/98
+// RCS-ID: $Id: dynlib.h 58750 2009-02-08 10:01:03Z VZ $
+// Copyright: (c) 1998 Guilhem Lavaux
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DYNLIB_H__
+#define _WX_DYNLIB_H__
+
+#include "wx/defs.h"
+
+#if wxUSE_DYNLIB_CLASS
+
+#include "wx/string.h"
+#include "wx/dynarray.h"
+
+#if defined(__OS2__) || defined(__EMX__)
+#include "wx/os2/private.h"
+#endif
+
+#ifdef __WXMSW__
+#include "wx/msw/private.h"
+#endif
+
+// note that we have our own dlerror() implementation under Darwin
+#if (defined(HAVE_DLERROR) && !defined(__EMX__)) || defined(__DARWIN__)
+ #define wxHAVE_DYNLIB_ERROR
+#endif
+
+class WXDLLIMPEXP_FWD_BASE wxDynamicLibraryDetailsCreator;
+
+// ----------------------------------------------------------------------------
+// conditional compilation
+// ----------------------------------------------------------------------------
+
+// Note: __OS2__/EMX has to be tested first, since we want to use
+// native version, even if configure detected presence of DLOPEN.
+#if defined(__OS2__) || defined(__EMX__) || defined(__WINDOWS__)
+ typedef HMODULE wxDllType;
+#elif defined(__DARWIN__)
+ // Don't include dlfcn.h on Darwin, we may be using our own replacements.
+ typedef void *wxDllType;
+#elif defined(HAVE_DLOPEN)
+ #include
+ typedef void *wxDllType;
+#elif defined(HAVE_SHL_LOAD)
+ #include
+ typedef shl_t wxDllType;
+#elif defined(__WXMAC__)
+ #include
+ typedef CFragConnectionID wxDllType;
+#else
+ #error "Dynamic Loading classes can't be compiled on this platform, sorry."
+#endif
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+enum wxDLFlags
+{
+ wxDL_LAZY = 0x00000001, // resolve undefined symbols at first use
+ // (only works on some Unix versions)
+ wxDL_NOW = 0x00000002, // resolve undefined symbols on load
+ // (default, always the case under Win32)
+ wxDL_GLOBAL = 0x00000004, // export extern symbols to subsequently
+ // loaded libs.
+ wxDL_VERBATIM = 0x00000008, // attempt to load the supplied library
+ // name without appending the usual dll
+ // filename extension.
+ 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
+};
+
+enum wxDynamicLibraryCategory
+{
+ wxDL_LIBRARY, // standard library
+ wxDL_MODULE // loadable module/plugin
+};
+
+enum wxPluginCategory
+{
+ wxDL_PLUGIN_GUI, // plugin that uses GUI classes
+ wxDL_PLUGIN_BASE // wxBase-only plugin
+};
+
+// ----------------------------------------------------------------------------
+// macros
+// ----------------------------------------------------------------------------
+
+// when loading a function from a DLL you always have to cast the returned
+// "void *" pointer to the correct type and, even more annoyingly, you have to
+// repeat this type twice if you want to declare and define a function pointer
+// all in one line
+//
+// this macro makes this slightly less painful by allowing you to specify the
+// type only once, as the first parameter, and creating a variable of this type
+// called "pfn" initialized with the "name" from the "dynlib"
+#define wxDYNLIB_FUNCTION(type, name, dynlib) \
+ type pfn ## name = (type)(dynlib).GetSymbol(_T(#name))
+
+// ----------------------------------------------------------------------------
+// wxDynamicLibraryDetails: contains details about a loaded wxDynamicLibrary
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxDynamicLibraryDetails
+{
+public:
+ // ctor, normally never used as these objects are only created by
+ // wxDynamicLibrary::ListLoaded()
+ wxDynamicLibraryDetails() { m_address = NULL; m_length = 0; }
+
+ // get the (base) name
+ wxString GetName() const { return m_name; }
+
+ // get the full path of this object
+ wxString GetPath() const { return m_path; }
+
+ // get the load address and the extent, return true if this information is
+ // available
+ bool GetAddress(void **addr, size_t *len) const
+ {
+ if ( !m_address )
+ return false;
+
+ if ( addr )
+ *addr = m_address;
+ if ( len )
+ *len = m_length;
+
+ return true;
+ }
+
+ // return the version of the DLL (may be empty if no version info)
+ wxString GetVersion() const
+ {
+ return m_version;
+ }
+
+private:
+ wxString m_name,
+ m_path,
+ m_version;
+
+ void *m_address;
+ size_t m_length;
+
+ friend class wxDynamicLibraryDetailsCreator;
+};
+
+WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDynamicLibraryDetails,
+ wxDynamicLibraryDetailsArray,
+ WXDLLIMPEXP_BASE);
+
+// ----------------------------------------------------------------------------
+// wxDynamicLibrary: represents a handle to a DLL/shared object
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxDynamicLibrary
+{
+public:
+ // return a valid handle for the main program itself or NULL if back
+ // linking is not supported by the current platform (e.g. Win32)
+ static wxDllType GetProgramHandle();
+
+ // return the platform standard DLL extension (with leading dot)
+ static const wxChar *GetDllExt() { return ms_dllext; }
+
+ wxDynamicLibrary() : m_handle(0) { }
+ wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT)
+ : m_handle(0)
+ {
+ Load(libname, flags);
+ }
+
+ // NOTE: this class is (deliberately) not virtual, do not attempt
+ // to use it polymorphically.
+ ~wxDynamicLibrary() { Unload(); }
+
+ // return true if the library was loaded successfully
+ bool IsLoaded() const { return m_handle != 0; }
+
+ // load the library with the given name (full or not), return true if ok
+ bool Load(const wxString& libname, int flags = wxDL_DEFAULT);
+
+ // raw function for loading dynamic libs: always behaves as if
+ // wxDL_VERBATIM were specified and doesn't log error message if the
+ // library couldn't be loaded but simply returns NULL
+ static wxDllType RawLoad(const wxString& libname, int flags = wxDL_DEFAULT);
+
+ // detach the library object from its handle, i.e. prevent the object from
+ // unloading the library in its dtor -- the caller is now responsible for
+ // doing this
+ wxDllType Detach() { wxDllType h = m_handle; m_handle = 0; return h; }
+
+ // unload the given library handle (presumably returned by Detach() before)
+ static void Unload(wxDllType handle);
+
+ // unload the library, also done automatically in dtor
+ void Unload() { if ( IsLoaded() ) { Unload(m_handle); m_handle = 0; } }
+
+ // Return the raw handle from dlopen and friends.
+ wxDllType GetLibHandle() const { return m_handle; }
+
+ // check if the given symbol is present in the library, useful to verify if
+ // a loadable module is our plugin, for example, without provoking error
+ // messages from GetSymbol()
+ bool HasSymbol(const wxString& name) const
+ {
+ bool ok;
+ DoGetSymbol(name, &ok);
+ return ok;
+ }
+
+ // resolve a symbol in a loaded DLL, such as a variable or function name.
+ // 'name' is the (possibly mangled) name of the symbol. (use extern "C" to
+ // export unmangled names)
+ //
+ // Since it is perfectly valid for the returned symbol to actually be NULL,
+ // that is not always indication of an error. Pass and test the parameter
+ // 'success' for a true indication of success or failure to load the
+ // symbol.
+ //
+ // Returns a pointer to the symbol on success, or NULL if an error occurred
+ // or the symbol wasn't found.
+ void *GetSymbol(const wxString& name, bool *success = NULL) const;
+
+ // low-level version of GetSymbol()
+ static void *RawGetSymbol(wxDllType handle, const wxString& name);
+ void *RawGetSymbol(const wxString& name) const
+ {
+#if defined (__WXPM__) || defined(__EMX__)
+ return GetSymbol(name);
+#else
+ return RawGetSymbol(m_handle, name);
+#endif
+ }
+
+#ifdef __WXMSW__
+ // this function is useful for loading functions from the standard Windows
+ // DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or
+ // wide character build) suffix if they take string parameters
+ static void *RawGetSymbolAorW(wxDllType handle, const wxString& name)
+ {
+ return RawGetSymbol
+ (
+ handle,
+ name +
+#if wxUSE_UNICODE
+ L'W'
+#else
+ 'A'
+#endif
+ );
+ }
+
+ void *GetSymbolAorW(const wxString& name) const
+ {
+ return RawGetSymbolAorW(m_handle, name);
+ }
+#endif // __WXMSW__
+
+ // return all modules/shared libraries in the address space of this process
+ //
+ // returns an empty array if not implemented or an error occurred
+ static wxDynamicLibraryDetailsArray ListLoaded();
+
+ // return platform-specific name of dynamic library with proper extension
+ // and prefix (e.g. "foo.dll" on Windows or "libfoo.so" on Linux)
+ static wxString CanonicalizeName(const wxString& name,
+ wxDynamicLibraryCategory cat = wxDL_LIBRARY);
+
+ // return name of wxWidgets plugin (adds compiler and version info
+ // to the filename):
+ static wxString
+ CanonicalizePluginName(const wxString& name,
+ wxPluginCategory cat = wxDL_PLUGIN_GUI);
+
+ // return plugin directory on platforms where it makes sense and empty
+ // string on others:
+ static wxString GetPluginsDirectory();
+
+
+protected:
+ // common part of GetSymbol() and HasSymbol()
+ void *DoGetSymbol(const wxString& name, bool *success = 0) const;
+
+#ifdef wxHAVE_DYNLIB_ERROR
+ // log the error after a dlxxx() function failure
+ static void Error();
+#endif // wxHAVE_DYNLIB_ERROR
+
+
+ // platform specific shared lib suffix.
+ static const wxChar *ms_dllext;
+
+ // the handle to DLL or NULL
+ wxDllType m_handle;
+
+ // no copy ctor/assignment operators (or we'd try to unload the library
+ // twice)
+ 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
+// ----------------------------------------------------------------------------
+
+#define WXDLL_ENTRY_FUNCTION() \
+extern "C" WXEXPORT const wxClassInfo *wxGetClassFirst(); \
+const wxClassInfo *wxGetClassFirst() { \
+ return wxClassInfo::GetFirst(); \
+}
+
+#endif // wxUSE_DYNLIB_CLASS
+
+#endif // _WX_DYNLIB_H__
diff --git a/3rdparty/wxWidgets/include/wx/dynload.h b/3rdparty/wxWidgets/include/wx/dynload.h
new file mode 100644
index 0000000000..68c63c1eb8
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/dynload.h
@@ -0,0 +1,153 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: dynload.h
+// Purpose: Dynamic loading framework
+// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's
+// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux)
+// Modified by:
+// Created: 03/12/01
+// RCS-ID: $Id: dynload.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) 2001 Ron Lee
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DYNAMICLOADER_H__
+#define _WX_DYNAMICLOADER_H__
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h"
+
+#if wxUSE_DYNAMIC_LOADER
+
+#include "wx/dynlib.h"
+#include "wx/hashmap.h"
+#include "wx/module.h"
+
+class WXDLLIMPEXP_FWD_BASE wxPluginLibrary;
+
+
+WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPluginLibrary *, wxDLManifest,
+ class WXDLLIMPEXP_BASE);
+typedef wxDLManifest wxDLImports;
+
+// ---------------------------------------------------------------------------
+// wxPluginLibrary
+// ---------------------------------------------------------------------------
+
+// NOTE: Do not attempt to use a base class pointer to this class.
+// wxDL is not virtual and we deliberately hide some of it's
+// methods here.
+//
+// Unless you know exacty why you need to, you probably shouldn't
+// instantiate this class directly anyway, use wxPluginManager
+// instead.
+
+class WXDLLIMPEXP_BASE wxPluginLibrary : public wxDynamicLibrary
+{
+public:
+
+ static wxDLImports* ms_classes; // Static hash of all imported classes.
+
+ wxPluginLibrary( const wxString &libname, int flags = wxDL_DEFAULT );
+ ~wxPluginLibrary();
+
+ wxPluginLibrary *RefLib();
+ bool UnrefLib();
+
+ // These two are called by the PluginSentinel on (PLUGGABLE) object
+ // creation/destruction. There is usually no reason for the user to
+ // call them directly. We have to separate this from the link count,
+ // since the two are not interchangeable.
+
+ // FIXME: for even better debugging PluginSentinel should register
+ // the name of the class created too, then we can state
+ // exactly which object was not destroyed which may be
+ // difficult to find otherwise. Also this code should
+ // probably only be active in DEBUG mode, but let's just
+ // get it right first.
+
+ void RefObj() { ++m_objcount; }
+ void UnrefObj()
+ {
+ wxASSERT_MSG( m_objcount > 0, _T("Too many objects deleted??") );
+ --m_objcount;
+ }
+
+ // Override/hide some base class methods
+
+ bool IsLoaded() const { return m_linkcount > 0; }
+ void Unload() { UnrefLib(); }
+
+private:
+
+ wxClassInfo *m_before; // sm_first before loading this lib
+ wxClassInfo *m_after; // ..and after.
+
+ size_t m_linkcount; // Ref count of library link calls
+ size_t m_objcount; // ..and (pluggable) object instantiations.
+ wxModuleList m_wxmodules; // any wxModules that we initialised.
+
+ void UpdateClasses(); // Update ms_classes
+ void RestoreClasses(); // Removes this library from ms_classes
+ void RegisterModules(); // Init any wxModules in the lib.
+ void UnregisterModules(); // Cleanup any wxModules we installed.
+
+ DECLARE_NO_COPY_CLASS(wxPluginLibrary)
+};
+
+
+class WXDLLIMPEXP_BASE wxPluginManager
+{
+public:
+
+ // Static accessors.
+
+ static wxPluginLibrary *LoadLibrary( const wxString &libname,
+ int flags = wxDL_DEFAULT );
+ static bool UnloadLibrary(const wxString &libname);
+
+ // Instance methods.
+
+ wxPluginManager() : m_entry(NULL) {}
+ wxPluginManager(const wxString &libname, int flags = wxDL_DEFAULT)
+ {
+ Load(libname, flags);
+ }
+ ~wxPluginManager() { if ( IsLoaded() ) Unload(); }
+
+ bool Load(const wxString &libname, int flags = wxDL_DEFAULT);
+ void Unload();
+
+ bool IsLoaded() const { return m_entry && m_entry->IsLoaded(); }
+ void *GetSymbol(const wxString &symbol, bool *success = 0)
+ {
+ return m_entry->GetSymbol( symbol, success );
+ }
+
+ static void CreateManifest() { ms_manifest = new wxDLManifest(wxKEY_STRING); }
+ static void ClearManifest() { delete ms_manifest; ms_manifest = NULL; }
+
+private:
+ // return the pointer to the entry for the library with given name in
+ // ms_manifest or NULL if none
+ static wxPluginLibrary *FindByName(const wxString& name)
+ {
+ const wxDLManifest::iterator i = ms_manifest->find(name);
+
+ return i == ms_manifest->end() ? NULL : i->second;
+ }
+
+ static wxDLManifest* ms_manifest; // Static hash of loaded libs.
+ wxPluginLibrary* m_entry; // Cache our entry in the manifest.
+
+ // We could allow this class to be copied if we really
+ // wanted to, but not without modification.
+ DECLARE_NO_COPY_CLASS(wxPluginManager)
+};
+
+
+#endif // wxUSE_DYNAMIC_LOADER
+#endif // _WX_DYNAMICLOADER_H__
+
diff --git a/3rdparty/wxWidgets/include/wx/effects.h b/3rdparty/wxWidgets/include/wx/effects.h
new file mode 100644
index 0000000000..b04a3ba635
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/effects.h
@@ -0,0 +1,75 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/effects.h
+// Purpose: wxEffects class
+// Draws 3D effects.
+// Author: Julian Smart et al
+// Modified by:
+// Created: 25/4/2000
+// RCS-ID: $Id: effects.h 39109 2006-05-08 11:31:03Z ABX $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_EFFECTS_H_
+#define _WX_EFFECTS_H_
+
+/*
+ * wxEffects: various 3D effects
+ */
+
+#include "wx/object.h"
+#include "wx/colour.h"
+#include "wx/gdicmn.h"
+#include "wx/dc.h"
+
+class WXDLLEXPORT wxEffects: public wxObject
+{
+DECLARE_CLASS(wxEffects)
+
+public:
+ // Assume system colours
+ wxEffects() ;
+ // Going from lightest to darkest
+ wxEffects(const wxColour& highlightColour, const wxColour& lightShadow,
+ const wxColour& faceColour, const wxColour& mediumShadow,
+ const wxColour& darkShadow) ;
+
+ // Accessors
+ wxColour GetHighlightColour() const { return m_highlightColour; }
+ wxColour GetLightShadow() const { return m_lightShadow; }
+ wxColour GetFaceColour() const { return m_faceColour; }
+ wxColour GetMediumShadow() const { return m_mediumShadow; }
+ wxColour GetDarkShadow() const { return m_darkShadow; }
+
+ void SetHighlightColour(const wxColour& c) { m_highlightColour = c; }
+ void SetLightShadow(const wxColour& c) { m_lightShadow = c; }
+ void SetFaceColour(const wxColour& c) { m_faceColour = c; }
+ void SetMediumShadow(const wxColour& c) { m_mediumShadow = c; }
+ void SetDarkShadow(const wxColour& c) { m_darkShadow = c; }
+
+ void Set(const wxColour& highlightColour, const wxColour& lightShadow,
+ const wxColour& faceColour, const wxColour& mediumShadow,
+ const wxColour& darkShadow)
+ {
+ SetHighlightColour(highlightColour);
+ SetLightShadow(lightShadow);
+ SetFaceColour(faceColour);
+ SetMediumShadow(mediumShadow);
+ SetDarkShadow(darkShadow);
+ }
+
+ // Draw a sunken edge
+ void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
+
+ // Tile a bitmap
+ bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);
+
+protected:
+ wxColour m_highlightColour; // Usually white
+ wxColour m_lightShadow; // Usually light grey
+ wxColour m_faceColour; // Usually grey
+ wxColour m_mediumShadow; // Usually dark grey
+ wxColour m_darkShadow; // Usually black
+};
+
+#endif
diff --git a/3rdparty/wxWidgets/include/wx/encconv.h b/3rdparty/wxWidgets/include/wx/encconv.h
new file mode 100644
index 0000000000..6a54439eeb
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/encconv.h
@@ -0,0 +1,159 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/encconv.h
+// Purpose: wxEncodingConverter class for converting between different
+// font encodings
+// Author: Vaclav Slavik
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ENCCONV_H_
+#define _WX_ENCCONV_H_
+
+#include "wx/defs.h"
+
+#include "wx/object.h"
+#include "wx/fontenc.h"
+#include "wx/dynarray.h"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+enum
+{
+ wxCONVERT_STRICT,
+ wxCONVERT_SUBSTITUTE
+};
+
+
+enum
+{
+ wxPLATFORM_CURRENT = -1,
+
+ wxPLATFORM_UNIX = 0,
+ wxPLATFORM_WINDOWS,
+ wxPLATFORM_OS2,
+ wxPLATFORM_MAC
+};
+
+// ----------------------------------------------------------------------------
+// types
+// ----------------------------------------------------------------------------
+
+WX_DEFINE_ARRAY_INT(wxFontEncoding, wxFontEncodingArray);
+
+//--------------------------------------------------------------------------------
+// wxEncodingConverter
+// This class is capable of converting strings between any two
+// 8bit encodings/charsets. It can also convert from/to Unicode
+//--------------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject
+{
+ public:
+
+ wxEncodingConverter();
+ virtual ~wxEncodingConverter() { if (m_Table) delete[] m_Table; }
+
+ // Initialize conversion. Both output or input encoding may
+ // be wxFONTENCODING_UNICODE, but only if wxUSE_WCHAR_T is set to 1.
+ //
+ // All subsequent calls to Convert() will interpret it's argument
+ // as a string in input_enc encoding and will output string in
+ // output_enc encoding.
+ //
+ // You must call this method before calling Convert. You may call
+ // it more than once in order to switch to another conversion
+ //
+ // Method affects behaviour of Convert() in case input character
+ // cannot be converted because it does not exist in output encoding:
+ // wxCONVERT_STRICT --
+ // follow behaviour of GNU Recode - just copy unconvertable
+ // characters to output and don't change them (it's integer
+ // value will stay the same)
+ // wxCONVERT_SUBSTITUTE --
+ // try some (lossy) substitutions - e.g. replace
+ // unconvertable latin capitals with acute by ordinary
+ // capitals, replace en-dash or em-dash by '-' etc.
+ // both modes gurantee that output string will have same length
+ // as input string
+ //
+ // Returns false if given conversion is impossible, true otherwise
+ // (conversion may be impossible either if you try to convert
+ // to Unicode with non-Unicode build of wxWidgets or if input
+ // or output encoding is not supported.)
+ bool Init(wxFontEncoding input_enc, wxFontEncoding output_enc, int method = wxCONVERT_STRICT);
+
+ // Convert input string according to settings passed to Init.
+ // Note that you must call Init before using Convert!
+ bool Convert(const char* input, char* output) const;
+ bool Convert(char* str) const { return Convert(str, str); }
+ wxString Convert(const wxString& input) const;
+
+#if wxUSE_WCHAR_T
+ bool Convert(const char* input, wchar_t* output) const;
+ bool Convert(const wchar_t* input, char* output) const;
+ bool Convert(const wchar_t* input, wchar_t* output) const;
+ bool Convert(wchar_t* str) const { return Convert(str, str); }
+#endif
+ // Return equivalent(s) for given font that are used
+ // under given platform. wxPLATFORM_CURRENT means the plaform
+ // this binary was compiled for
+ //
+ // Examples:
+ // current platform enc returned value
+ // -----------------------------------------------------
+ // unix CP1250 {ISO8859_2}
+ // unix ISO8859_2 {}
+ // windows ISO8859_2 {CP1250}
+ //
+ // Equivalence is defined in terms of convertibility:
+ // 2 encodings are equivalent if you can convert text between
+ // then without loosing information (it may - and will - happen
+ // that you loose special chars like quotation marks or em-dashes
+ // but you shouldn't loose any diacritics and language-specific
+ // characters when converting between equivalent encodings).
+ //
+ // Convert() method is not limited to converting between
+ // equivalent encodings, it can convert between arbitrary
+ // two encodings!
+ //
+ // Remember that this function does _NOT_ check for presence of
+ // fonts in system. It only tells you what are most suitable
+ // encodings. (It usually returns only one encoding)
+ //
+ // Note that argument enc itself may be present in returned array!
+ // (so that you can -- as a side effect -- detect whether the
+ // encoding is native for this platform or not)
+ static wxFontEncodingArray GetPlatformEquivalents(wxFontEncoding enc, int platform = wxPLATFORM_CURRENT);
+
+ // Similar to GetPlatformEquivalent, but this one will return ALL
+ // equivalent encodings, regardless the platform, including itself.
+ static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc);
+
+ // Return true if [any text in] one multibyte encoding can be
+ // converted to another one losslessly.
+ //
+ // Do not call this with wxFONTENCODING_UNICODE, it doesn't make
+ // sense (always works in one sense and always depends on the text
+ // to convert in the other)
+ static bool CanConvert(wxFontEncoding encIn, wxFontEncoding encOut)
+ {
+ return GetAllEquivalents(encIn).Index(encOut) != wxNOT_FOUND;
+ }
+
+ private:
+
+#if wxUSE_WCHAR_T
+ wchar_t *m_Table;
+#else
+ char *m_Table;
+#endif
+ bool m_UnicodeInput, m_UnicodeOutput;
+ bool m_JustCopy;
+
+ DECLARE_NO_COPY_CLASS(wxEncodingConverter)
+};
+
+#endif // _WX_ENCCONV_H_
diff --git a/3rdparty/wxWidgets/include/wx/encinfo.h b/3rdparty/wxWidgets/include/wx/encinfo.h
new file mode 100644
index 0000000000..99dbddb81d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/encinfo.h
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/encinfo.h
+// Purpose: declares wxNativeEncodingInfo struct
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 19.09.2003 (extracted from wx/fontenc.h)
+// RCS-ID: $Id: encinfo.h 40865 2006-08-27 09:42:42Z VS $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_ENCINFO_H_
+#define _WX_ENCINFO_H_
+
+#include "wx/string.h"
+
+// ----------------------------------------------------------------------------
+// wxNativeEncodingInfo contains all encoding parameters for this platform
+// ----------------------------------------------------------------------------
+
+// This private structure specifies all the parameters needed to create a font
+// with the given encoding on this platform.
+//
+// Under X, it contains the last 2 elements of the font specifications
+// (registry and encoding).
+//
+// Under Windows, it contains a number which is one of predefined CHARSET_XXX
+// values.
+//
+// Under all platforms it also contains a facename string which should be
+// used, if not empty, to create fonts in this encoding (this is the only way
+// to create a font of non-standard encoding (like KOI8) under Windows - the
+// facename specifies the encoding then)
+
+struct WXDLLEXPORT wxNativeEncodingInfo
+{
+ wxString facename; // may be empty meaning "any"
+#ifndef __WXPALMOS__
+ wxFontEncoding encoding; // so that we know what this struct represents
+
+#if defined(__WXMSW__) || \
+ defined(__WXPM__) || \
+ defined(__WXMAC__) || \
+ defined(__WXCOCOA__) // FIXME: __WXCOCOA__
+
+ wxNativeEncodingInfo()
+ : facename()
+ , encoding(wxFONTENCODING_SYSTEM)
+ , charset(0) /* ANSI_CHARSET */
+ { }
+
+ int charset;
+#elif defined(_WX_X_FONTLIKE)
+ wxString xregistry,
+ xencoding;
+#elif defined(__WXGTK20__)
+ // No way to specify this in Pango as this
+ // seems to be handled internally.
+#elif defined(__WXMGL__)
+ int mglEncoding;
+#elif defined(__WXDFB__)
+ // DirectFB uses UTF-8 internally, doesn't use font encodings
+#else
+ #error "Unsupported toolkit"
+#endif
+#endif // !__WXPALMOS__
+ // this struct is saved in config by wxFontMapper, so it should know to
+ // serialise itself (implemented in platform-specific code)
+ bool FromString(const wxString& s);
+ wxString ToString() const;
+};
+
+#endif // _WX_ENCINFO_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/event.h b/3rdparty/wxWidgets/include/wx/event.h
new file mode 100644
index 0000000000..26fab62c9f
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/event.h
@@ -0,0 +1,3116 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/event.h
+// Purpose: Event classes
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: event.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_EVENT_H__
+#define _WX_EVENT_H__
+
+#include "wx/defs.h"
+#include "wx/cpp.h"
+#include "wx/object.h"
+#include "wx/clntdata.h"
+
+#if wxUSE_GUI
+ #include "wx/gdicmn.h"
+ #include "wx/cursor.h"
+#endif
+
+#include "wx/thread.h"
+
+#include "wx/dynarray.h"
+
+// ----------------------------------------------------------------------------
+// forward declarations
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_BASE wxList;
+
+#if wxUSE_GUI
+ class WXDLLIMPEXP_FWD_CORE wxDC;
+ class WXDLLIMPEXP_FWD_CORE wxMenu;
+ class WXDLLIMPEXP_FWD_CORE wxWindow;
+ class WXDLLIMPEXP_FWD_CORE wxWindowBase;
+#endif // wxUSE_GUI
+
+class WXDLLIMPEXP_FWD_BASE wxEvtHandler;
+
+// ----------------------------------------------------------------------------
+// Event types
+// ----------------------------------------------------------------------------
+
+typedef int wxEventType;
+
+// this is used to make the event table entry type safe, so that for an event
+// handler only a function with proper parameter list can be given.
+#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
+
+// in previous versions of wxWidgets the event types used to be constants
+// which created difficulties with custom/user event types definition
+//
+// starting from wxWidgets 2.4 the event types are now dynamically assigned
+// using wxNewEventType() which solves this problem, however at price of
+// several incompatibilities:
+//
+// a) event table macros declaration changed, it now uses wxEventTableEntry
+// ctor instead of initialisation from an agregate - the macro
+// DECLARE_EVENT_TABLE_ENTRY may be used to write code which can compile
+// with all versions of wxWidgets
+//
+// b) event types can't be used as switch() cases as they're not really
+// constant any more - there is no magic solution here, you just have to
+// change the switch()es to if()s
+//
+// if these are real problems for you, define WXWIN_COMPATIBILITY_EVENT_TYPES
+// as 1 to get 100% old behaviour, however you won't be able to use the
+// libraries using the new dynamic event type allocation in such case, so avoid
+// it if possible.
+#ifndef WXWIN_COMPATIBILITY_EVENT_TYPES
+ #define WXWIN_COMPATIBILITY_EVENT_TYPES 0
+#endif
+
+#if WXWIN_COMPATIBILITY_EVENT_TYPES
+
+#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
+ { type, winid, idLast, fn, obj }
+
+#define BEGIN_DECLARE_EVENT_TYPES() enum {
+#define END_DECLARE_EVENT_TYPES() };
+#define DECLARE_EVENT_TYPE(name, value) name = wxEVT_FIRST + value,
+#define DECLARE_LOCAL_EVENT_TYPE(name, value) name = wxEVT_USER_FIRST + value,
+#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
+ DECLARE_LOCAL_EVENT_TYPE(name, value)
+#define DEFINE_EVENT_TYPE(name)
+#define DEFINE_LOCAL_EVENT_TYPE(name)
+
+
+#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
+
+#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
+ wxEventTableEntry(type, winid, idLast, fn, obj)
+
+#define BEGIN_DECLARE_EVENT_TYPES()
+#define END_DECLARE_EVENT_TYPES()
+#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
+ extern expdecl const wxEventType name;
+#define DECLARE_EVENT_TYPE(name, value) \
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
+#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
+ DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value)
+#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
+#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)
+
+// generate a new unique event type
+extern WXDLLIMPEXP_BASE wxEventType wxNewEventType();
+
+#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
+
+BEGIN_DECLARE_EVENT_TYPES()
+
+#if WXWIN_COMPATIBILITY_EVENT_TYPES
+ wxEVT_NULL = 0,
+ wxEVT_FIRST = 10000,
+ wxEVT_USER_FIRST = wxEVT_FIRST + 2000,
+#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
+ // it is important to still have these as constants to avoid
+ // initialization order related problems
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_NULL, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_FIRST, 10000)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_USER_FIRST, wxEVT_FIRST + 2000)
+#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
+
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_BUTTON_CLICKED, 1)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHECKBOX_CLICKED, 2)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHOICE_SELECTED, 3)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_SELECTED, 4)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 5)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 6)
+ // now they are in wx/textctrl.h
+#if WXWIN_COMPATIBILITY_EVENT_TYPES
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED, 7)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER, 8)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_URL, 13)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_MAXLEN, 14)
+#endif // WXWIN_COMPATIBILITY_EVENT_TYPES
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_MENU_SELECTED, 9)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_SLIDER_UPDATED, 10)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_RADIOBOX_SELECTED, 11)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_RADIOBUTTON_SELECTED, 12)
+
+ // wxEVT_COMMAND_SCROLLBAR_UPDATED is now obsolete since we use
+ // wxEVT_SCROLL... events
+
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_SCROLLBAR_UPDATED, 13)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_VLBOX_SELECTED, 14)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_COMBOBOX_SELECTED, 15)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_RCLICKED, 16)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER, 17)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED, 18)
+
+ // Sockets and timers send events, too
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_SOCKET, 50)
+ DECLARE_EVENT_TYPE(wxEVT_TIMER , 80)
+
+ // Mouse event types
+ DECLARE_EVENT_TYPE(wxEVT_LEFT_DOWN, 100)
+ DECLARE_EVENT_TYPE(wxEVT_LEFT_UP, 101)
+ DECLARE_EVENT_TYPE(wxEVT_MIDDLE_DOWN, 102)
+ DECLARE_EVENT_TYPE(wxEVT_MIDDLE_UP, 103)
+ DECLARE_EVENT_TYPE(wxEVT_RIGHT_DOWN, 104)
+ DECLARE_EVENT_TYPE(wxEVT_RIGHT_UP, 105)
+ DECLARE_EVENT_TYPE(wxEVT_MOTION, 106)
+ DECLARE_EVENT_TYPE(wxEVT_ENTER_WINDOW, 107)
+ DECLARE_EVENT_TYPE(wxEVT_LEAVE_WINDOW, 108)
+ DECLARE_EVENT_TYPE(wxEVT_LEFT_DCLICK, 109)
+ DECLARE_EVENT_TYPE(wxEVT_MIDDLE_DCLICK, 110)
+ DECLARE_EVENT_TYPE(wxEVT_RIGHT_DCLICK, 111)
+ DECLARE_EVENT_TYPE(wxEVT_SET_FOCUS, 112)
+ DECLARE_EVENT_TYPE(wxEVT_KILL_FOCUS, 113)
+ DECLARE_EVENT_TYPE(wxEVT_CHILD_FOCUS, 114)
+ DECLARE_EVENT_TYPE(wxEVT_MOUSEWHEEL, 115)
+
+ // Non-client mouse events
+ DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_DOWN, 200)
+ DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_UP, 201)
+ DECLARE_EVENT_TYPE(wxEVT_NC_MIDDLE_DOWN, 202)
+ DECLARE_EVENT_TYPE(wxEVT_NC_MIDDLE_UP, 203)
+ DECLARE_EVENT_TYPE(wxEVT_NC_RIGHT_DOWN, 204)
+ DECLARE_EVENT_TYPE(wxEVT_NC_RIGHT_UP, 205)
+ DECLARE_EVENT_TYPE(wxEVT_NC_MOTION, 206)
+ DECLARE_EVENT_TYPE(wxEVT_NC_ENTER_WINDOW, 207)
+ DECLARE_EVENT_TYPE(wxEVT_NC_LEAVE_WINDOW, 208)
+ DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_DCLICK, 209)
+ DECLARE_EVENT_TYPE(wxEVT_NC_MIDDLE_DCLICK, 210)
+ DECLARE_EVENT_TYPE(wxEVT_NC_RIGHT_DCLICK, 211)
+
+ // Character input event type
+ DECLARE_EVENT_TYPE(wxEVT_CHAR, 212)
+ DECLARE_EVENT_TYPE(wxEVT_CHAR_HOOK, 213)
+ DECLARE_EVENT_TYPE(wxEVT_NAVIGATION_KEY, 214)
+ DECLARE_EVENT_TYPE(wxEVT_KEY_DOWN, 215)
+ DECLARE_EVENT_TYPE(wxEVT_KEY_UP, 216)
+#if wxUSE_HOTKEY
+ DECLARE_EVENT_TYPE(wxEVT_HOTKEY, 217)
+#endif
+ // Set cursor event
+ DECLARE_EVENT_TYPE(wxEVT_SET_CURSOR, 230)
+
+ // wxScrollBar and wxSlider event identifiers
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_TOP, 300)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_BOTTOM, 301)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_LINEUP, 302)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_LINEDOWN, 303)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_PAGEUP, 304)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_PAGEDOWN, 305)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK, 306)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE, 307)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLL_CHANGED, 308)
+
+ // Scroll events from wxWindow
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP, 320)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_BOTTOM, 321)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_LINEUP, 322)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_LINEDOWN, 323)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_PAGEUP, 324)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_PAGEDOWN, 325)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_THUMBTRACK, 326)
+ DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_THUMBRELEASE, 327)
+
+ // System events
+ DECLARE_EVENT_TYPE(wxEVT_SIZE, 400)
+ DECLARE_EVENT_TYPE(wxEVT_MOVE, 401)
+ DECLARE_EVENT_TYPE(wxEVT_CLOSE_WINDOW, 402)
+ DECLARE_EVENT_TYPE(wxEVT_END_SESSION, 403)
+ DECLARE_EVENT_TYPE(wxEVT_QUERY_END_SESSION, 404)
+ DECLARE_EVENT_TYPE(wxEVT_ACTIVATE_APP, 405)
+ // 406..408 are power events
+ DECLARE_EVENT_TYPE(wxEVT_ACTIVATE, 409)
+ DECLARE_EVENT_TYPE(wxEVT_CREATE, 410)
+ DECLARE_EVENT_TYPE(wxEVT_DESTROY, 411)
+ DECLARE_EVENT_TYPE(wxEVT_SHOW, 412)
+ DECLARE_EVENT_TYPE(wxEVT_ICONIZE, 413)
+ DECLARE_EVENT_TYPE(wxEVT_MAXIMIZE, 414)
+ DECLARE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_CHANGED, 415)
+ DECLARE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_LOST, 416)
+ DECLARE_EVENT_TYPE(wxEVT_PAINT, 417)
+ DECLARE_EVENT_TYPE(wxEVT_ERASE_BACKGROUND, 418)
+ DECLARE_EVENT_TYPE(wxEVT_NC_PAINT, 419)
+ DECLARE_EVENT_TYPE(wxEVT_PAINT_ICON, 420)
+ DECLARE_EVENT_TYPE(wxEVT_MENU_OPEN, 421)
+ DECLARE_EVENT_TYPE(wxEVT_MENU_CLOSE, 422)
+ DECLARE_EVENT_TYPE(wxEVT_MENU_HIGHLIGHT, 423)
+ DECLARE_EVENT_TYPE(wxEVT_CONTEXT_MENU, 424)
+ DECLARE_EVENT_TYPE(wxEVT_SYS_COLOUR_CHANGED, 425)
+ DECLARE_EVENT_TYPE(wxEVT_DISPLAY_CHANGED, 426)
+ DECLARE_EVENT_TYPE(wxEVT_SETTING_CHANGED, 427)
+ DECLARE_EVENT_TYPE(wxEVT_QUERY_NEW_PALETTE, 428)
+ DECLARE_EVENT_TYPE(wxEVT_PALETTE_CHANGED, 429)
+ DECLARE_EVENT_TYPE(wxEVT_JOY_BUTTON_DOWN, 430)
+ DECLARE_EVENT_TYPE(wxEVT_JOY_BUTTON_UP, 431)
+ DECLARE_EVENT_TYPE(wxEVT_JOY_MOVE, 432)
+ DECLARE_EVENT_TYPE(wxEVT_JOY_ZMOVE, 433)
+ DECLARE_EVENT_TYPE(wxEVT_DROP_FILES, 434)
+ DECLARE_EVENT_TYPE(wxEVT_DRAW_ITEM, 435)
+ DECLARE_EVENT_TYPE(wxEVT_MEASURE_ITEM, 436)
+ DECLARE_EVENT_TYPE(wxEVT_COMPARE_ITEM, 437)
+ DECLARE_EVENT_TYPE(wxEVT_INIT_DIALOG, 438)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_IDLE, 439)
+ DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 440)
+ DECLARE_EVENT_TYPE(wxEVT_SIZING, 441)
+ DECLARE_EVENT_TYPE(wxEVT_MOVING, 442)
+ DECLARE_EVENT_TYPE(wxEVT_HIBERNATE, 443)
+ // more power events follow -- see wx/power.h
+
+ // Clipboard events
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_COPY, 444)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_CUT, 445)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_PASTE, 446)
+
+ // Generic command events
+ // Note: a click is a higher-level event than button down/up
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_LEFT_CLICK, 500)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_LEFT_DCLICK, 501)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_RIGHT_CLICK, 502)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_RIGHT_DCLICK, 503)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_SET_FOCUS, 504)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_KILL_FOCUS, 505)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_ENTER, 506)
+
+ // Help events
+ DECLARE_EVENT_TYPE(wxEVT_HELP, 1050)
+ DECLARE_EVENT_TYPE(wxEVT_DETAILED_HELP, 1051)
+
+END_DECLARE_EVENT_TYPES()
+
+// these 2 events are the same
+#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED
+
+// ----------------------------------------------------------------------------
+// Compatibility
+// ----------------------------------------------------------------------------
+
+// this event is also used by wxComboBox and wxSpinCtrl which don't include
+// wx/textctrl.h in all ports [yet], so declare it here as well
+//
+// still, any new code using it should include wx/textctrl.h explicitly
+#if !WXWIN_COMPATIBILITY_EVENT_TYPES
+ extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
+#endif
+
+// the predefined constants for the number of times we propagate event
+// upwards window child-parent chain
+enum Propagation_state
+{
+ // don't propagate it at all
+ wxEVENT_PROPAGATE_NONE = 0,
+
+ // propagate it until it is processed
+ wxEVENT_PROPAGATE_MAX = INT_MAX
+};
+
+/*
+ * wxWidgets events, covering all interesting things that might happen
+ * (button clicking, resizing, setting text in widgets, etc.).
+ *
+ * For each completely new event type, derive a new event class.
+ * An event CLASS represents a C++ class defining a range of similar event TYPES;
+ * examples are canvas events, panel item command events.
+ * An event TYPE is a unique identifier for a particular system event,
+ * such as a button press or a listbox deselection.
+ *
+ */
+
+class WXDLLIMPEXP_BASE wxEvent : public wxObject
+{
+private:
+ wxEvent& operator=(const wxEvent&);
+
+protected:
+ wxEvent(const wxEvent&); // for implementing Clone()
+
+public:
+ wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL );
+
+ void SetEventType(wxEventType typ) { m_eventType = typ; }
+ wxEventType GetEventType() const { return m_eventType; }
+ wxObject *GetEventObject() const { return m_eventObject; }
+ void SetEventObject(wxObject *obj) { m_eventObject = obj; }
+ long GetTimestamp() const { return m_timeStamp; }
+ void SetTimestamp(long ts = 0) { m_timeStamp = ts; }
+ int GetId() const { return m_id; }
+ void SetId(int Id) { m_id = Id; }
+
+ // Can instruct event processor that we wish to ignore this event
+ // (treat as if the event table entry had not been found): this must be done
+ // to allow the event processing by the base classes (calling event.Skip()
+ // is the analog of calling the base class version of a virtual function)
+ void Skip(bool skip = true) { m_skipped = skip; }
+ bool GetSkipped() const { return m_skipped; }
+
+ // this function is used to create a copy of the event polymorphically and
+ // all derived classes must implement it because otherwise wxPostEvent()
+ // for them wouldn't work (it needs to do a copy of the event)
+ virtual wxEvent *Clone() const = 0;
+
+ // Implementation only: this test is explicitly anti OO and this function
+ // exists only for optimization purposes.
+ bool IsCommandEvent() const { return m_isCommandEvent; }
+
+ // Determine if this event should be propagating to the parent window.
+ bool ShouldPropagate() const
+ { return m_propagationLevel != wxEVENT_PROPAGATE_NONE; }
+
+ // Stop an event from propagating to its parent window, returns the old
+ // propagation level value
+ int StopPropagation()
+ {
+ int propagationLevel = m_propagationLevel;
+ m_propagationLevel = wxEVENT_PROPAGATE_NONE;
+ return propagationLevel;
+ }
+
+ // Resume the event propagation by restoring the propagation level
+ // (returned by StopPropagation())
+ void ResumePropagation(int propagationLevel)
+ {
+ m_propagationLevel = propagationLevel;
+ }
+
+#if WXWIN_COMPATIBILITY_2_4
+public:
+#else
+protected:
+#endif
+ wxObject* m_eventObject;
+ wxEventType m_eventType;
+ long m_timeStamp;
+ int m_id;
+
+public:
+ // m_callbackUserData is for internal usage only
+ wxObject* m_callbackUserData;
+
+protected:
+ // the propagation level: while it is positive, we propagate the event to
+ // the parent window (if any)
+ //
+ // this one doesn't have to be public, we don't have to worry about
+ // backwards compatibility as it is new
+ int m_propagationLevel;
+
+#if WXWIN_COMPATIBILITY_2_4
+public:
+#else
+protected:
+#endif
+ bool m_skipped;
+ bool m_isCommandEvent;
+
+private:
+ // it needs to access our m_propagationLevel
+ friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce;
+
+ DECLARE_ABSTRACT_CLASS(wxEvent)
+};
+
+/*
+ * Helper class to temporarily change an event not to propagate.
+ */
+class WXDLLIMPEXP_BASE wxPropagationDisabler
+{
+public:
+ wxPropagationDisabler(wxEvent& event) : m_event(event)
+ {
+ m_propagationLevelOld = m_event.StopPropagation();
+ }
+
+ ~wxPropagationDisabler()
+ {
+ m_event.ResumePropagation(m_propagationLevelOld);
+ }
+
+private:
+ wxEvent& m_event;
+ int m_propagationLevelOld;
+
+ DECLARE_NO_COPY_CLASS(wxPropagationDisabler)
+};
+
+/*
+ * Another one to temporarily lower propagation level.
+ */
+class WXDLLIMPEXP_BASE wxPropagateOnce
+{
+public:
+ wxPropagateOnce(wxEvent& event) : m_event(event)
+ {
+ wxASSERT_MSG( m_event.m_propagationLevel > 0,
+ _T("shouldn't be used unless ShouldPropagate()!") );
+
+ m_event.m_propagationLevel--;
+ }
+
+ ~wxPropagateOnce()
+ {
+ m_event.m_propagationLevel++;
+ }
+
+private:
+ wxEvent& m_event;
+
+ DECLARE_NO_COPY_CLASS(wxPropagateOnce)
+};
+
+#if wxUSE_GUI
+
+
+// Item or menu event class
+/*
+ wxEVT_COMMAND_BUTTON_CLICKED
+ wxEVT_COMMAND_CHECKBOX_CLICKED
+ wxEVT_COMMAND_CHOICE_SELECTED
+ wxEVT_COMMAND_LISTBOX_SELECTED
+ wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
+ wxEVT_COMMAND_TEXT_UPDATED
+ wxEVT_COMMAND_TEXT_ENTER
+ wxEVT_COMMAND_MENU_SELECTED
+ wxEVT_COMMAND_SLIDER_UPDATED
+ wxEVT_COMMAND_RADIOBOX_SELECTED
+ wxEVT_COMMAND_RADIOBUTTON_SELECTED
+ wxEVT_COMMAND_SCROLLBAR_UPDATED
+ wxEVT_COMMAND_VLBOX_SELECTED
+ wxEVT_COMMAND_COMBOBOX_SELECTED
+ wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
+*/
+
+#if WXWIN_COMPATIBILITY_2_4
+// Backwards compatibility for wxCommandEvent::m_commandString, will lead to compilation errors in some cases of usage
+class WXDLLIMPEXP_CORE wxCommandEvent;
+
+class WXDLLIMPEXP_CORE wxCommandEventStringHelper
+{
+public:
+ wxCommandEventStringHelper(wxCommandEvent * evt)
+ : m_evt(evt)
+ { }
+
+ void operator=(const wxString &str);
+ operator wxString();
+ const wxChar* c_str() const;
+
+private:
+ wxCommandEvent* m_evt;
+};
+#endif
+
+class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent
+{
+public:
+ wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0);
+
+ wxCommandEvent(const wxCommandEvent& event)
+ : wxEvent(event),
+#if WXWIN_COMPATIBILITY_2_4
+ m_commandString(this),
+#endif
+ m_cmdString(event.m_cmdString),
+ m_commandInt(event.m_commandInt),
+ m_extraLong(event.m_extraLong),
+ m_clientData(event.m_clientData),
+ m_clientObject(event.m_clientObject)
+ { }
+
+ // Set/Get client data from controls
+ void SetClientData(void* clientData) { m_clientData = clientData; }
+ void *GetClientData() const { return m_clientData; }
+
+ // Set/Get client object from controls
+ void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; }
+ wxClientData *GetClientObject() const { return m_clientObject; }
+
+ // Get listbox selection if single-choice
+ int GetSelection() const { return m_commandInt; }
+
+ // Set/Get listbox/choice selection string
+ void SetString(const wxString& s) { m_cmdString = s; }
+ wxString GetString() const;
+
+ // Get checkbox value
+ bool IsChecked() const { return m_commandInt != 0; }
+
+ // true if the listbox event was a selection.
+ bool IsSelection() const { return (m_extraLong != 0); }
+
+ void SetExtraLong(long extraLong) { m_extraLong = extraLong; }
+ long GetExtraLong() const { return m_extraLong; }
+
+ void SetInt(int i) { m_commandInt = i; }
+ int GetInt() const { return m_commandInt; }
+
+ virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
+
+#if WXWIN_COMPATIBILITY_2_4
+public:
+ wxCommandEventStringHelper m_commandString;
+#else
+protected:
+#endif
+ wxString m_cmdString; // String event argument
+ int m_commandInt;
+ long m_extraLong; // Additional information (e.g. select/deselect)
+ void* m_clientData; // Arbitrary client data
+ wxClientData* m_clientObject; // Arbitrary client object
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent)
+};
+
+#if WXWIN_COMPATIBILITY_2_4
+inline void wxCommandEventStringHelper::operator=(const wxString &str)
+{
+ m_evt->SetString(str);
+}
+
+inline wxCommandEventStringHelper::operator wxString()
+{
+ return m_evt->GetString();
+}
+
+inline const wxChar* wxCommandEventStringHelper::c_str() const
+{
+ return m_evt->GetString().c_str();
+}
+#endif
+
+// this class adds a possibility to react (from the user) code to a control
+// notification: allow or veto the operation being reported.
+class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent
+{
+public:
+ wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
+ : wxCommandEvent(commandType, winid)
+ { m_bAllow = true; }
+
+ wxNotifyEvent(const wxNotifyEvent& event)
+ : wxCommandEvent(event)
+ { m_bAllow = event.m_bAllow; }
+
+ // veto the operation (usually it's allowed by default)
+ void Veto() { m_bAllow = false; }
+
+ // allow the operation if it was disabled by default
+ void Allow() { m_bAllow = true; }
+
+ // for implementation code only: is the operation allowed?
+ bool IsAllowed() const { return m_bAllow; }
+
+ virtual wxEvent *Clone() const { return new wxNotifyEvent(*this); }
+
+private:
+ bool m_bAllow;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNotifyEvent)
+};
+
+// Scroll event class, derived form wxCommandEvent. wxScrollEvents are
+// sent by wxSlider and wxScrollBar.
+/*
+ wxEVT_SCROLL_TOP
+ wxEVT_SCROLL_BOTTOM
+ wxEVT_SCROLL_LINEUP
+ wxEVT_SCROLL_LINEDOWN
+ wxEVT_SCROLL_PAGEUP
+ wxEVT_SCROLL_PAGEDOWN
+ wxEVT_SCROLL_THUMBTRACK
+ wxEVT_SCROLL_THUMBRELEASE
+ wxEVT_SCROLL_CHANGED
+*/
+
+class WXDLLIMPEXP_CORE wxScrollEvent : public wxCommandEvent
+{
+public:
+ wxScrollEvent(wxEventType commandType = wxEVT_NULL,
+ int winid = 0, int pos = 0, int orient = 0);
+
+ int GetOrientation() const { return (int) m_extraLong; }
+ int GetPosition() const { return m_commandInt; }
+ void SetOrientation(int orient) { m_extraLong = (long) orient; }
+ void SetPosition(int pos) { m_commandInt = pos; }
+
+ virtual wxEvent *Clone() const { return new wxScrollEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollEvent)
+};
+
+// ScrollWin event class, derived fom wxEvent. wxScrollWinEvents
+// are sent by wxWindow.
+/*
+ wxEVT_SCROLLWIN_TOP
+ wxEVT_SCROLLWIN_BOTTOM
+ wxEVT_SCROLLWIN_LINEUP
+ wxEVT_SCROLLWIN_LINEDOWN
+ wxEVT_SCROLLWIN_PAGEUP
+ wxEVT_SCROLLWIN_PAGEDOWN
+ wxEVT_SCROLLWIN_THUMBTRACK
+ wxEVT_SCROLLWIN_THUMBRELEASE
+*/
+
+class WXDLLIMPEXP_CORE wxScrollWinEvent : public wxEvent
+{
+public:
+ wxScrollWinEvent(wxEventType commandType = wxEVT_NULL,
+ int pos = 0, int orient = 0);
+ wxScrollWinEvent(const wxScrollWinEvent & event) : wxEvent(event)
+ { m_commandInt = event.m_commandInt;
+ m_extraLong = event.m_extraLong; }
+
+ int GetOrientation() const { return (int) m_extraLong; }
+ int GetPosition() const { return m_commandInt; }
+ void SetOrientation(int orient) { m_extraLong = (long) orient; }
+ void SetPosition(int pos) { m_commandInt = pos; }
+
+ virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); }
+
+#if WXWIN_COMPATIBILITY_2_4
+public:
+#else
+protected:
+#endif
+ int m_commandInt;
+ long m_extraLong;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollWinEvent)
+};
+
+// Mouse event class
+
+/*
+ wxEVT_LEFT_DOWN
+ wxEVT_LEFT_UP
+ wxEVT_MIDDLE_DOWN
+ wxEVT_MIDDLE_UP
+ wxEVT_RIGHT_DOWN
+ wxEVT_RIGHT_UP
+ wxEVT_MOTION
+ wxEVT_ENTER_WINDOW
+ wxEVT_LEAVE_WINDOW
+ wxEVT_LEFT_DCLICK
+ wxEVT_MIDDLE_DCLICK
+ wxEVT_RIGHT_DCLICK
+ wxEVT_NC_LEFT_DOWN
+ wxEVT_NC_LEFT_UP,
+ wxEVT_NC_MIDDLE_DOWN,
+ wxEVT_NC_MIDDLE_UP,
+ wxEVT_NC_RIGHT_DOWN,
+ wxEVT_NC_RIGHT_UP,
+ wxEVT_NC_MOTION,
+ wxEVT_NC_ENTER_WINDOW,
+ wxEVT_NC_LEAVE_WINDOW,
+ wxEVT_NC_LEFT_DCLICK,
+ wxEVT_NC_MIDDLE_DCLICK,
+ wxEVT_NC_RIGHT_DCLICK,
+*/
+
+// the symbolic names for the mouse buttons
+enum
+{
+ wxMOUSE_BTN_ANY = -1,
+ wxMOUSE_BTN_NONE = 0,
+ wxMOUSE_BTN_LEFT = 1,
+ wxMOUSE_BTN_MIDDLE = 2,
+ wxMOUSE_BTN_RIGHT = 3
+};
+
+class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent
+{
+public:
+ wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
+ wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
+ { Assign(event); }
+
+ // Was it a button event? (*doesn't* mean: is any button *down*?)
+ bool IsButton() const { return Button(wxMOUSE_BTN_ANY); }
+
+ // Was it a down event from this (or any) button?
+ bool ButtonDown(int but = wxMOUSE_BTN_ANY) const;
+
+ // Was it a dclick event from this (or any) button?
+ bool ButtonDClick(int but = wxMOUSE_BTN_ANY) const;
+
+ // Was it a up event from this (or any) button?
+ bool ButtonUp(int but = wxMOUSE_BTN_ANY) const;
+
+ // Was the given button?
+ bool Button(int but) const;
+
+ // Was the given button in Down state?
+ bool ButtonIsDown(int but) const;
+
+ // Get the button which is changing state (wxMOUSE_BTN_NONE if none)
+ int GetButton() const;
+
+ // Find state of shift/control keys
+ bool ControlDown() const { return m_controlDown; }
+ bool MetaDown() const { return m_metaDown; }
+ bool AltDown() const { return m_altDown; }
+ bool ShiftDown() const { return m_shiftDown; }
+ bool CmdDown() const
+ {
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ return MetaDown();
+#else
+ return ControlDown();
+#endif
+ }
+
+ // Find which event was just generated
+ bool LeftDown() const { return (m_eventType == wxEVT_LEFT_DOWN); }
+ bool MiddleDown() const { return (m_eventType == wxEVT_MIDDLE_DOWN); }
+ bool RightDown() const { return (m_eventType == wxEVT_RIGHT_DOWN); }
+
+ bool LeftUp() const { return (m_eventType == wxEVT_LEFT_UP); }
+ bool MiddleUp() const { return (m_eventType == wxEVT_MIDDLE_UP); }
+ bool RightUp() const { return (m_eventType == wxEVT_RIGHT_UP); }
+
+ bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); }
+ bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); }
+ bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); }
+
+ // Find the current state of the mouse buttons (regardless
+ // of current event type)
+ bool LeftIsDown() const { return m_leftDown; }
+ bool MiddleIsDown() const { return m_middleDown; }
+ bool RightIsDown() const { return m_rightDown; }
+
+ // True if a button is down and the mouse is moving
+ bool Dragging() const
+ {
+ return (m_eventType == wxEVT_MOTION) && ButtonIsDown(wxMOUSE_BTN_ANY);
+ }
+
+ // True if the mouse is moving, and no button is down
+ bool Moving() const
+ {
+ return (m_eventType == wxEVT_MOTION) && !ButtonIsDown(wxMOUSE_BTN_ANY);
+ }
+
+ // True if the mouse is just entering the window
+ bool Entering() const { return (m_eventType == wxEVT_ENTER_WINDOW); }
+
+ // True if the mouse is just leaving the window
+ bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
+
+ // Find the position of the event
+ void GetPosition(wxCoord *xpos, wxCoord *ypos) const
+ {
+ if (xpos)
+ *xpos = m_x;
+ if (ypos)
+ *ypos = m_y;
+ }
+
+ void GetPosition(long *xpos, long *ypos) const
+ {
+ if (xpos)
+ *xpos = (long)m_x;
+ if (ypos)
+ *ypos = (long)m_y;
+ }
+
+ // Find the position of the event
+ wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
+
+ // Find the logical position of the event given the DC
+ wxPoint GetLogicalPosition(const wxDC& dc) const;
+
+ // Get X position
+ wxCoord GetX() const { return m_x; }
+
+ // Get Y position
+ wxCoord GetY() const { return m_y; }
+
+ // Get wheel rotation, positive or negative indicates direction of
+ // rotation. Current devices all send an event when rotation is equal to
+ // +/-WheelDelta, but this allows for finer resolution devices to be
+ // created in the future. Because of this you shouldn't assume that one
+ // event is equal to 1 line or whatever, but you should be able to either
+ // do partial line scrolling or wait until +/-WheelDelta rotation values
+ // have been accumulated before scrolling.
+ int GetWheelRotation() const { return m_wheelRotation; }
+
+ // Get wheel delta, normally 120. This is the threshold for action to be
+ // taken, and one such action (for example, scrolling one increment)
+ // should occur for each delta.
+ int GetWheelDelta() const { return m_wheelDelta; }
+
+ // Returns the configured number of lines (or whatever) to be scrolled per
+ // wheel action. Defaults to one.
+ int GetLinesPerAction() const { return m_linesPerAction; }
+
+ // Is the system set to do page scrolling?
+ bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); }
+
+ virtual wxEvent *Clone() const { return new wxMouseEvent(*this); }
+
+ wxMouseEvent& operator=(const wxMouseEvent& event) { Assign(event); return *this; }
+
+public:
+ wxCoord m_x, m_y;
+
+ bool m_leftDown;
+ bool m_middleDown;
+ bool m_rightDown;
+
+ bool m_controlDown;
+ bool m_shiftDown;
+ bool m_altDown;
+ bool m_metaDown;
+
+ int m_wheelRotation;
+ int m_wheelDelta;
+ int m_linesPerAction;
+
+protected:
+ void Assign(const wxMouseEvent& evt);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxMouseEvent)
+};
+
+// Cursor set event
+
+/*
+ wxEVT_SET_CURSOR
+ */
+
+class WXDLLIMPEXP_CORE wxSetCursorEvent : public wxEvent
+{
+public:
+ wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0)
+ : wxEvent(0, wxEVT_SET_CURSOR),
+ m_x(x), m_y(y), m_cursor()
+ { }
+
+ wxSetCursorEvent(const wxSetCursorEvent & event)
+ : wxEvent(event),
+ m_x(event.m_x),
+ m_y(event.m_y),
+ m_cursor(event.m_cursor)
+ { }
+
+ wxCoord GetX() const { return m_x; }
+ wxCoord GetY() const { return m_y; }
+
+ void SetCursor(const wxCursor& cursor) { m_cursor = cursor; }
+ const wxCursor& GetCursor() const { return m_cursor; }
+ bool HasCursor() const { return m_cursor.Ok(); }
+
+ virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); }
+
+private:
+ wxCoord m_x, m_y;
+ wxCursor m_cursor;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSetCursorEvent)
+};
+
+// Keyboard input event class
+
+/*
+ wxEVT_CHAR
+ wxEVT_CHAR_HOOK
+ wxEVT_KEY_DOWN
+ wxEVT_KEY_UP
+ wxEVT_HOTKEY
+ */
+
+class WXDLLIMPEXP_CORE wxKeyEvent : public wxEvent
+{
+public:
+ wxKeyEvent(wxEventType keyType = wxEVT_NULL);
+ wxKeyEvent(const wxKeyEvent& evt);
+
+ // can be used check if the key event has exactly the given modifiers:
+ // "GetModifiers() = wxMOD_CONTROL" is easier to write than "ControlDown()
+ // && !MetaDown() && !AltDown() && !ShiftDown()"
+ int GetModifiers() const
+ {
+ return (m_controlDown ? wxMOD_CONTROL : 0) |
+ (m_shiftDown ? wxMOD_SHIFT : 0) |
+ (m_metaDown ? wxMOD_META : 0) |
+ (m_altDown ? wxMOD_ALT : 0);
+ }
+
+ // Find state of shift/control keys
+ bool ControlDown() const { return m_controlDown; }
+ bool ShiftDown() const { return m_shiftDown; }
+ bool MetaDown() const { return m_metaDown; }
+ bool AltDown() const { return m_altDown; }
+
+ // "Cmd" is a pseudo key which is Control for PC and Unix platforms but
+ // Apple ("Command") key under Macs: it makes often sense to use it instead
+ // of, say, ControlDown() because Cmd key is used for the same thing under
+ // Mac as Ctrl elsewhere (but Ctrl still exists, just not used for this
+ // purpose under Mac)
+ bool CmdDown() const
+ {
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ return MetaDown();
+#else
+ return ControlDown();
+#endif
+ }
+
+ // exclude MetaDown() from HasModifiers() because NumLock under X is often
+ // configured as mod2 modifier, yet the key events even when it is pressed
+ // should be processed normally, not like Ctrl- or Alt-key
+ bool HasModifiers() const { return ControlDown() || AltDown(); }
+
+ // get the key code: an ASCII7 char or an element of wxKeyCode enum
+ int GetKeyCode() const { return (int)m_keyCode; }
+
+#if wxUSE_UNICODE
+ // get the Unicode character corresponding to this key
+ wxChar GetUnicodeKey() const { return m_uniChar; }
+#endif // wxUSE_UNICODE
+
+ // get the raw key code (platform-dependent)
+ wxUint32 GetRawKeyCode() const { return m_rawCode; }
+
+ // get the raw key flags (platform-dependent)
+ wxUint32 GetRawKeyFlags() const { return m_rawFlags; }
+
+ // Find the position of the event
+ void GetPosition(wxCoord *xpos, wxCoord *ypos) const
+ {
+ if (xpos) *xpos = m_x;
+ if (ypos) *ypos = m_y;
+ }
+
+ void GetPosition(long *xpos, long *ypos) const
+ {
+ if (xpos) *xpos = (long)m_x;
+ if (ypos) *ypos = (long)m_y;
+ }
+
+ wxPoint GetPosition() const
+ { return wxPoint(m_x, m_y); }
+
+ // Get X position
+ wxCoord GetX() const { return m_x; }
+
+ // Get Y position
+ wxCoord GetY() const { return m_y; }
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated, Use GetKeyCode instead.
+ wxDEPRECATED( long KeyCode() const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ virtual wxEvent *Clone() const { return new wxKeyEvent(*this); }
+
+ // we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for
+ // example)
+ wxKeyEvent& operator=(const wxKeyEvent& evt)
+ {
+ m_x = evt.m_x;
+ m_y = evt.m_y;
+
+ m_keyCode = evt.m_keyCode;
+
+ m_controlDown = evt.m_controlDown;
+ m_shiftDown = evt.m_shiftDown;
+ m_altDown = evt.m_altDown;
+ m_metaDown = evt.m_metaDown;
+ m_scanCode = evt.m_scanCode;
+ m_rawCode = evt.m_rawCode;
+ m_rawFlags = evt.m_rawFlags;
+#if wxUSE_UNICODE
+ m_uniChar = evt.m_uniChar;
+#endif
+
+ return *this;
+ }
+
+public:
+ wxCoord m_x, m_y;
+
+ long m_keyCode;
+
+ // TODO: replace those with a single m_modifiers bitmask of wxMOD_XXX?
+ bool m_controlDown;
+ bool m_shiftDown;
+ bool m_altDown;
+ bool m_metaDown;
+
+ // FIXME: what is this for? relation to m_rawXXX?
+ bool m_scanCode;
+
+#if wxUSE_UNICODE
+ // This contains the full Unicode character
+ // in a character events in Unicode mode
+ wxChar m_uniChar;
+#endif
+
+ // these fields contain the platform-specific information about
+ // key that was pressed
+ wxUint32 m_rawCode;
+ wxUint32 m_rawFlags;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxKeyEvent)
+};
+
+// Size event class
+/*
+ wxEVT_SIZE
+ */
+
+class WXDLLIMPEXP_CORE wxSizeEvent : public wxEvent
+{
+public:
+ wxSizeEvent() : wxEvent(0, wxEVT_SIZE)
+ { }
+ wxSizeEvent(const wxSize& sz, int winid = 0)
+ : wxEvent(winid, wxEVT_SIZE),
+ m_size(sz)
+ { }
+ wxSizeEvent(const wxSizeEvent & event)
+ : wxEvent(event),
+ m_size(event.m_size), m_rect(event.m_rect)
+ { }
+ wxSizeEvent(const wxRect& rect, int id = 0)
+ : m_size(rect.GetSize()), m_rect(rect)
+ { m_eventType = wxEVT_SIZING; m_id = id; }
+
+ wxSize GetSize() const { return m_size; }
+ wxRect GetRect() const { return m_rect; }
+ void SetRect(const wxRect& rect) { m_rect = rect; }
+
+ virtual wxEvent *Clone() const { return new wxSizeEvent(*this); }
+
+public:
+ // For internal usage only. Will be converted to protected members.
+ wxSize m_size;
+ wxRect m_rect; // Used for wxEVT_SIZING
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSizeEvent)
+};
+
+// Move event class
+
+/*
+ wxEVT_MOVE
+ */
+
+class WXDLLIMPEXP_CORE wxMoveEvent : public wxEvent
+{
+public:
+ wxMoveEvent()
+ : wxEvent(0, wxEVT_MOVE)
+ { }
+ wxMoveEvent(const wxPoint& pos, int winid = 0)
+ : wxEvent(winid, wxEVT_MOVE),
+ m_pos(pos)
+ { }
+ wxMoveEvent(const wxMoveEvent& event)
+ : wxEvent(event),
+ m_pos(event.m_pos)
+ { }
+ wxMoveEvent(const wxRect& rect, int id = 0)
+ : m_pos(rect.GetPosition()), m_rect(rect)
+ { m_eventType = wxEVT_MOVING; m_id = id; }
+
+ wxPoint GetPosition() const { return m_pos; }
+ void SetPosition(const wxPoint& pos) { m_pos = pos; }
+ wxRect GetRect() const { return m_rect; }
+ void SetRect(const wxRect& rect) { m_rect = rect; }
+
+ virtual wxEvent *Clone() const { return new wxMoveEvent(*this); }
+
+#if WXWIN_COMPATIBILITY_2_4
+public:
+#else
+protected:
+#endif
+ wxPoint m_pos;
+ wxRect m_rect;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMoveEvent)
+};
+
+// Paint event class
+/*
+ wxEVT_PAINT
+ wxEVT_NC_PAINT
+ wxEVT_PAINT_ICON
+ */
+
+#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__))
+ // see comments in src/msw|os2/dcclient.cpp where g_isPainting is defined
+ extern WXDLLIMPEXP_CORE int g_isPainting;
+#endif // debug
+
+class WXDLLIMPEXP_CORE wxPaintEvent : public wxEvent
+{
+public:
+ wxPaintEvent(int Id = 0)
+ : wxEvent(Id, wxEVT_PAINT)
+ {
+#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__))
+ // set the internal flag for the duration of processing of WM_PAINT
+ g_isPainting++;
+#endif // debug
+ }
+
+ // default copy ctor and dtor are normally fine, we only need them to keep
+ // g_isPainting updated in debug build
+#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__))
+ wxPaintEvent(const wxPaintEvent& event)
+ : wxEvent(event)
+ {
+ g_isPainting++;
+ }
+
+ virtual ~wxPaintEvent()
+ {
+ g_isPainting--;
+ }
+#endif // debug
+
+ virtual wxEvent *Clone() const { return new wxPaintEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaintEvent)
+};
+
+class WXDLLIMPEXP_CORE wxNcPaintEvent : public wxEvent
+{
+public:
+ wxNcPaintEvent(int winid = 0)
+ : wxEvent(winid, wxEVT_NC_PAINT)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxNcPaintEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNcPaintEvent)
+};
+
+// Erase background event class
+/*
+ wxEVT_ERASE_BACKGROUND
+ */
+
+class WXDLLIMPEXP_CORE wxEraseEvent : public wxEvent
+{
+public:
+ wxEraseEvent(int Id = 0, wxDC *dc = (wxDC *) NULL)
+ : wxEvent(Id, wxEVT_ERASE_BACKGROUND),
+ m_dc(dc)
+ { }
+
+ wxEraseEvent(const wxEraseEvent& event)
+ : wxEvent(event),
+ m_dc(event.m_dc)
+ { }
+
+ wxDC *GetDC() const { return m_dc; }
+
+ virtual wxEvent *Clone() const { return new wxEraseEvent(*this); }
+
+#if WXWIN_COMPATIBILITY_2_4
+public:
+#else
+protected:
+#endif
+ wxDC *m_dc;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxEraseEvent)
+};
+
+// Focus event class
+/*
+ wxEVT_SET_FOCUS
+ wxEVT_KILL_FOCUS
+ */
+
+class WXDLLIMPEXP_CORE wxFocusEvent : public wxEvent
+{
+public:
+ wxFocusEvent(wxEventType type = wxEVT_NULL, int winid = 0)
+ : wxEvent(winid, type)
+ { m_win = NULL; }
+
+ wxFocusEvent(const wxFocusEvent& event)
+ : wxEvent(event)
+ { m_win = event.m_win; }
+
+ // The window associated with this event is the window which had focus
+ // before for SET event and the window which will have focus for the KILL
+ // one. NB: it may be NULL in both cases!
+ wxWindow *GetWindow() const { return m_win; }
+ void SetWindow(wxWindow *win) { m_win = win; }
+
+ virtual wxEvent *Clone() const { return new wxFocusEvent(*this); }
+
+private:
+ wxWindow *m_win;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFocusEvent)
+};
+
+// wxChildFocusEvent notifies the parent that a child has got the focus: unlike
+// wxFocusEvent it is propagated upwards the window chain
+class WXDLLIMPEXP_CORE wxChildFocusEvent : public wxCommandEvent
+{
+public:
+ wxChildFocusEvent(wxWindow *win = NULL);
+
+ wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
+
+ virtual wxEvent *Clone() const { return new wxChildFocusEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChildFocusEvent)
+};
+
+// Activate event class
+/*
+ wxEVT_ACTIVATE
+ wxEVT_ACTIVATE_APP
+ wxEVT_HIBERNATE
+ */
+
+class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
+{
+public:
+ wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0)
+ : wxEvent(Id, type)
+ { m_active = active; }
+ wxActivateEvent(const wxActivateEvent& event)
+ : wxEvent(event)
+ { m_active = event.m_active; }
+
+ bool GetActive() const { return m_active; }
+
+ virtual wxEvent *Clone() const { return new wxActivateEvent(*this); }
+
+private:
+ bool m_active;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent)
+};
+
+// InitDialog event class
+/*
+ wxEVT_INIT_DIALOG
+ */
+
+class WXDLLIMPEXP_CORE wxInitDialogEvent : public wxEvent
+{
+public:
+ wxInitDialogEvent(int Id = 0)
+ : wxEvent(Id, wxEVT_INIT_DIALOG)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxInitDialogEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxInitDialogEvent)
+};
+
+// Miscellaneous menu event class
+/*
+ wxEVT_MENU_OPEN,
+ wxEVT_MENU_CLOSE,
+ wxEVT_MENU_HIGHLIGHT,
+*/
+
+class WXDLLIMPEXP_CORE wxMenuEvent : public wxEvent
+{
+public:
+ wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = NULL)
+ : wxEvent(winid, type)
+ { m_menuId = winid; m_menu = menu; }
+ wxMenuEvent(const wxMenuEvent & event)
+ : wxEvent(event)
+ { m_menuId = event.m_menuId; m_menu = event.m_menu; }
+
+ // only for wxEVT_MENU_HIGHLIGHT
+ int GetMenuId() const { return m_menuId; }
+
+ // only for wxEVT_MENU_OPEN/CLOSE
+ bool IsPopup() const { return m_menuId == wxID_ANY; }
+
+ // only for wxEVT_MENU_OPEN/CLOSE
+ wxMenu* GetMenu() const { return m_menu; }
+
+ virtual wxEvent *Clone() const { return new wxMenuEvent(*this); }
+
+private:
+ int m_menuId;
+ wxMenu* m_menu;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMenuEvent)
+};
+
+// Window close or session close event class
+/*
+ wxEVT_CLOSE_WINDOW,
+ wxEVT_END_SESSION,
+ wxEVT_QUERY_END_SESSION
+ */
+
+class WXDLLIMPEXP_CORE wxCloseEvent : public wxEvent
+{
+public:
+ wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0)
+ : wxEvent(winid, type),
+ m_loggingOff(true),
+ m_veto(false), // should be false by default
+ m_canVeto(true) {}
+
+ wxCloseEvent(const wxCloseEvent & event)
+ : wxEvent(event),
+ m_loggingOff(event.m_loggingOff),
+ m_veto(event.m_veto),
+ m_canVeto(event.m_canVeto) {}
+
+ void SetLoggingOff(bool logOff) { m_loggingOff = logOff; }
+ bool GetLoggingOff() const
+ {
+ // m_loggingOff flag is only used by wxEVT_[QUERY_]END_SESSION, it
+ // doesn't make sense for wxEVT_CLOSE_WINDOW
+ wxASSERT_MSG( m_eventType != wxEVT_CLOSE_WINDOW,
+ _T("this flag is for end session events only") );
+
+ return m_loggingOff;
+ }
+
+ void Veto(bool veto = true)
+ {
+ // GetVeto() will return false anyhow...
+ wxCHECK_RET( m_canVeto,
+ wxT("call to Veto() ignored (can't veto this event)") );
+
+ m_veto = veto;
+ }
+ void SetCanVeto(bool canVeto) { m_canVeto = canVeto; }
+ bool CanVeto() const { return m_canVeto; }
+ bool GetVeto() const { return m_canVeto && m_veto; }
+
+ virtual wxEvent *Clone() const { return new wxCloseEvent(*this); }
+
+protected:
+ bool m_loggingOff,
+ m_veto,
+ m_canVeto;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent)
+};
+
+/*
+ wxEVT_SHOW
+ */
+
+class WXDLLIMPEXP_CORE wxShowEvent : public wxEvent
+{
+public:
+ wxShowEvent(int winid = 0, bool show = false)
+ : wxEvent(winid, wxEVT_SHOW)
+ { m_show = show; }
+ wxShowEvent(const wxShowEvent & event)
+ : wxEvent(event)
+ { m_show = event.m_show; }
+
+ void SetShow(bool show) { m_show = show; }
+ bool GetShow() const { return m_show; }
+
+ virtual wxEvent *Clone() const { return new wxShowEvent(*this); }
+
+protected:
+ bool m_show;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxShowEvent)
+};
+
+/*
+ wxEVT_ICONIZE
+ */
+
+class WXDLLIMPEXP_CORE wxIconizeEvent : public wxEvent
+{
+public:
+ wxIconizeEvent(int winid = 0, bool iconized = true)
+ : wxEvent(winid, wxEVT_ICONIZE)
+ { m_iconized = iconized; }
+ wxIconizeEvent(const wxIconizeEvent & event)
+ : wxEvent(event)
+ { m_iconized = event.m_iconized; }
+
+ // return true if the frame was iconized, false if restored
+ bool Iconized() const { return m_iconized; }
+
+ virtual wxEvent *Clone() const { return new wxIconizeEvent(*this); }
+
+protected:
+ bool m_iconized;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIconizeEvent)
+};
+/*
+ wxEVT_MAXIMIZE
+ */
+
+class WXDLLIMPEXP_CORE wxMaximizeEvent : public wxEvent
+{
+public:
+ wxMaximizeEvent(int winid = 0)
+ : wxEvent(winid, wxEVT_MAXIMIZE)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxMaximizeEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMaximizeEvent)
+};
+
+// Joystick event class
+/*
+ wxEVT_JOY_BUTTON_DOWN,
+ wxEVT_JOY_BUTTON_UP,
+ wxEVT_JOY_MOVE,
+ wxEVT_JOY_ZMOVE
+*/
+
+// Which joystick? Same as Windows ids so no conversion necessary.
+enum
+{
+ wxJOYSTICK1,
+ wxJOYSTICK2
+};
+
+// Which button is down?
+enum
+{
+ wxJOY_BUTTON_ANY = -1,
+ wxJOY_BUTTON1 = 1,
+ wxJOY_BUTTON2 = 2,
+ wxJOY_BUTTON3 = 4,
+ wxJOY_BUTTON4 = 8
+};
+
+class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent
+{
+#if WXWIN_COMPATIBILITY_2_4
+public:
+#else
+protected:
+#endif
+ wxPoint m_pos;
+ int m_zPosition;
+ int m_buttonChange; // Which button changed?
+ int m_buttonState; // Which buttons are down?
+ int m_joyStick; // Which joystick?
+
+public:
+ wxJoystickEvent(wxEventType type = wxEVT_NULL,
+ int state = 0,
+ int joystick = wxJOYSTICK1,
+ int change = 0)
+ : wxEvent(0, type),
+ m_pos(),
+ m_zPosition(0),
+ m_buttonChange(change),
+ m_buttonState(state),
+ m_joyStick(joystick)
+ {
+ }
+ wxJoystickEvent(const wxJoystickEvent & event)
+ : wxEvent(event),
+ m_pos(event.m_pos),
+ m_zPosition(event.m_zPosition),
+ m_buttonChange(event.m_buttonChange),
+ m_buttonState(event.m_buttonState),
+ m_joyStick(event.m_joyStick)
+ { }
+
+ wxPoint GetPosition() const { return m_pos; }
+ int GetZPosition() const { return m_zPosition; }
+ int GetButtonState() const { return m_buttonState; }
+ int GetButtonChange() const { return m_buttonChange; }
+ int GetJoystick() const { return m_joyStick; }
+
+ void SetJoystick(int stick) { m_joyStick = stick; }
+ void SetButtonState(int state) { m_buttonState = state; }
+ void SetButtonChange(int change) { m_buttonChange = change; }
+ void SetPosition(const wxPoint& pos) { m_pos = pos; }
+ void SetZPosition(int zPos) { m_zPosition = zPos; }
+
+ // Was it a button event? (*doesn't* mean: is any button *down*?)
+ bool IsButton() const { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) ||
+ (GetEventType() == wxEVT_JOY_BUTTON_UP)); }
+
+ // Was it a move event?
+ bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE); }
+
+ // Was it a zmove event?
+ bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE); }
+
+ // Was it a down event from button 1, 2, 3, 4 or any?
+ bool ButtonDown(int but = wxJOY_BUTTON_ANY) const
+ { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) &&
+ ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); }
+
+ // Was it a up event from button 1, 2, 3 or any?
+ bool ButtonUp(int but = wxJOY_BUTTON_ANY) const
+ { return ((GetEventType() == wxEVT_JOY_BUTTON_UP) &&
+ ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); }
+
+ // Was the given button 1,2,3,4 or any in Down state?
+ bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const
+ { return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) ||
+ ((m_buttonState & but) == but)); }
+
+ virtual wxEvent *Clone() const { return new wxJoystickEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxJoystickEvent)
+};
+
+// Drop files event class
+/*
+ wxEVT_DROP_FILES
+ */
+
+class WXDLLIMPEXP_CORE wxDropFilesEvent : public wxEvent
+{
+public:
+ int m_noFiles;
+ wxPoint m_pos;
+ wxString* m_files;
+
+ wxDropFilesEvent(wxEventType type = wxEVT_NULL,
+ int noFiles = 0,
+ wxString *files = (wxString *) NULL)
+ : wxEvent(0, type),
+ m_noFiles(noFiles),
+ m_pos(),
+ m_files(files)
+ { }
+
+ // we need a copy ctor to avoid deleting m_files pointer twice
+ wxDropFilesEvent(const wxDropFilesEvent& other)
+ : wxEvent(other),
+ m_noFiles(other.m_noFiles),
+ m_pos(other.m_pos),
+ m_files(NULL)
+ {
+ m_files = new wxString[m_noFiles];
+ for ( int n = 0; n < m_noFiles; n++ )
+ {
+ m_files[n] = other.m_files[n];
+ }
+ }
+
+ virtual ~wxDropFilesEvent()
+ {
+ delete [] m_files;
+ }
+
+ wxPoint GetPosition() const { return m_pos; }
+ int GetNumberOfFiles() const { return m_noFiles; }
+ wxString *GetFiles() const { return m_files; }
+
+ virtual wxEvent *Clone() const { return new wxDropFilesEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDropFilesEvent)
+};
+
+// Update UI event
+/*
+ wxEVT_UPDATE_UI
+ */
+
+// Whether to always send update events to windows, or
+// to only send update events to those with the
+// wxWS_EX_PROCESS_UI_UPDATES style.
+
+enum wxUpdateUIMode
+{
+ // Send UI update events to all windows
+ wxUPDATE_UI_PROCESS_ALL,
+
+ // Send UI update events to windows that have
+ // the wxWS_EX_PROCESS_UI_UPDATES flag specified
+ wxUPDATE_UI_PROCESS_SPECIFIED
+};
+
+class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent
+{
+public:
+ wxUpdateUIEvent(wxWindowID commandId = 0)
+ : wxCommandEvent(wxEVT_UPDATE_UI, commandId)
+ {
+ m_checked =
+ m_enabled =
+ m_shown =
+ m_setEnabled =
+ m_setShown =
+ m_setText =
+ m_setChecked = false;
+ }
+ wxUpdateUIEvent(const wxUpdateUIEvent & event)
+ : wxCommandEvent(event),
+ m_checked(event.m_checked),
+ m_enabled(event.m_enabled),
+ m_shown(event.m_shown),
+ m_setEnabled(event.m_setEnabled),
+ m_setShown(event.m_setShown),
+ m_setText(event.m_setText),
+ m_setChecked(event.m_setChecked),
+ m_text(event.m_text)
+ { }
+
+ bool GetChecked() const { return m_checked; }
+ bool GetEnabled() const { return m_enabled; }
+ bool GetShown() const { return m_shown; }
+ wxString GetText() const { return m_text; }
+ bool GetSetText() const { return m_setText; }
+ bool GetSetChecked() const { return m_setChecked; }
+ bool GetSetEnabled() const { return m_setEnabled; }
+ bool GetSetShown() const { return m_setShown; }
+
+ void Check(bool check) { m_checked = check; m_setChecked = true; }
+ void Enable(bool enable) { m_enabled = enable; m_setEnabled = true; }
+ void Show(bool show) { m_shown = show; m_setShown = true; }
+ void SetText(const wxString& text) { m_text = text; m_setText = true; }
+
+ // Sets the interval between updates in milliseconds.
+ // Set to -1 to disable updates, or to 0 to update as frequently as possible.
+ static void SetUpdateInterval(long updateInterval) { sm_updateInterval = updateInterval; }
+
+ // Returns the current interval between updates in milliseconds
+ static long GetUpdateInterval() { return sm_updateInterval; }
+
+ // Can we update this window?
+ static bool CanUpdate(wxWindowBase *win);
+
+ // Reset the update time to provide a delay until the next
+ // time we should update
+ static void ResetUpdateTime();
+
+ // Specify how wxWidgets will send update events: to
+ // all windows, or only to those which specify that they
+ // will process the events.
+ static void SetMode(wxUpdateUIMode mode) { sm_updateMode = mode; }
+
+ // Returns the UI update mode
+ static wxUpdateUIMode GetMode() { return sm_updateMode; }
+
+ virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); }
+
+protected:
+ bool m_checked;
+ bool m_enabled;
+ bool m_shown;
+ bool m_setEnabled;
+ bool m_setShown;
+ bool m_setText;
+ bool m_setChecked;
+ wxString m_text;
+#if wxUSE_LONGLONG
+ static wxLongLong sm_lastUpdate;
+#endif
+ static long sm_updateInterval;
+ static wxUpdateUIMode sm_updateMode;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxUpdateUIEvent)
+};
+
+/*
+ wxEVT_SYS_COLOUR_CHANGED
+ */
+
+// TODO: shouldn't all events record the window ID?
+class WXDLLIMPEXP_CORE wxSysColourChangedEvent : public wxEvent
+{
+public:
+ wxSysColourChangedEvent()
+ : wxEvent(0, wxEVT_SYS_COLOUR_CHANGED)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxSysColourChangedEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSysColourChangedEvent)
+};
+
+/*
+ wxEVT_MOUSE_CAPTURE_CHANGED
+ The window losing the capture receives this message
+ (even if it released the capture itself).
+ */
+
+class WXDLLIMPEXP_CORE wxMouseCaptureChangedEvent : public wxEvent
+{
+public:
+ wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = NULL)
+ : wxEvent(winid, wxEVT_MOUSE_CAPTURE_CHANGED),
+ m_gainedCapture(gainedCapture)
+ { }
+
+ wxMouseCaptureChangedEvent(const wxMouseCaptureChangedEvent& event)
+ : wxEvent(event),
+ m_gainedCapture(event.m_gainedCapture)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxMouseCaptureChangedEvent(*this); }
+
+ wxWindow* GetCapturedWindow() const { return m_gainedCapture; }
+
+private:
+ wxWindow* m_gainedCapture;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureChangedEvent)
+};
+
+/*
+ wxEVT_MOUSE_CAPTURE_LOST
+ The window losing the capture receives this message, unless it released it
+ it itself or unless wxWindow::CaptureMouse was called on another window
+ (and so capture will be restored when the new capturer releases it).
+ */
+
+class WXDLLIMPEXP_CORE wxMouseCaptureLostEvent : public wxEvent
+{
+public:
+ wxMouseCaptureLostEvent(wxWindowID winid = 0)
+ : wxEvent(winid, wxEVT_MOUSE_CAPTURE_LOST)
+ {}
+
+ wxMouseCaptureLostEvent(const wxMouseCaptureLostEvent& event)
+ : wxEvent(event)
+ {}
+
+ virtual wxEvent *Clone() const { return new wxMouseCaptureLostEvent(*this); }
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureLostEvent)
+};
+
+/*
+ wxEVT_DISPLAY_CHANGED
+ */
+class WXDLLIMPEXP_CORE wxDisplayChangedEvent : public wxEvent
+{
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDisplayChangedEvent)
+
+public:
+ wxDisplayChangedEvent()
+ : wxEvent(0, wxEVT_DISPLAY_CHANGED)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxDisplayChangedEvent(*this); }
+};
+
+/*
+ wxEVT_PALETTE_CHANGED
+ */
+
+class WXDLLIMPEXP_CORE wxPaletteChangedEvent : public wxEvent
+{
+public:
+ wxPaletteChangedEvent(wxWindowID winid = 0)
+ : wxEvent(winid, wxEVT_PALETTE_CHANGED),
+ m_changedWindow((wxWindow *) NULL)
+ { }
+
+ wxPaletteChangedEvent(const wxPaletteChangedEvent& event)
+ : wxEvent(event),
+ m_changedWindow(event.m_changedWindow)
+ { }
+
+ void SetChangedWindow(wxWindow* win) { m_changedWindow = win; }
+ wxWindow* GetChangedWindow() const { return m_changedWindow; }
+
+ virtual wxEvent *Clone() const { return new wxPaletteChangedEvent(*this); }
+
+protected:
+ wxWindow* m_changedWindow;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaletteChangedEvent)
+};
+
+/*
+ wxEVT_QUERY_NEW_PALETTE
+ Indicates the window is getting keyboard focus and should re-do its palette.
+ */
+
+class WXDLLIMPEXP_CORE wxQueryNewPaletteEvent : public wxEvent
+{
+public:
+ wxQueryNewPaletteEvent(wxWindowID winid = 0)
+ : wxEvent(winid, wxEVT_QUERY_NEW_PALETTE),
+ m_paletteRealized(false)
+ { }
+ wxQueryNewPaletteEvent(const wxQueryNewPaletteEvent & event)
+ : wxEvent(event),
+ m_paletteRealized(event.m_paletteRealized)
+ { }
+
+ // App sets this if it changes the palette.
+ void SetPaletteRealized(bool realized) { m_paletteRealized = realized; }
+ bool GetPaletteRealized() const { return m_paletteRealized; }
+
+ virtual wxEvent *Clone() const { return new wxQueryNewPaletteEvent(*this); }
+
+protected:
+ bool m_paletteRealized;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryNewPaletteEvent)
+};
+
+/*
+ Event generated by dialog navigation keys
+ wxEVT_NAVIGATION_KEY
+ */
+// NB: don't derive from command event to avoid being propagated to the parent
+class WXDLLIMPEXP_CORE wxNavigationKeyEvent : public wxEvent
+{
+public:
+ wxNavigationKeyEvent()
+ : wxEvent(0, wxEVT_NAVIGATION_KEY),
+ m_flags(IsForward | FromTab), // defaults are for TAB
+ m_focus((wxWindow *)NULL)
+ {
+ m_propagationLevel = wxEVENT_PROPAGATE_NONE;
+ }
+
+ wxNavigationKeyEvent(const wxNavigationKeyEvent& event)
+ : wxEvent(event),
+ m_flags(event.m_flags),
+ m_focus(event.m_focus)
+ { }
+
+ // direction: forward (true) or backward (false)
+ bool GetDirection() const
+ { return (m_flags & IsForward) != 0; }
+ void SetDirection(bool bForward)
+ { if ( bForward ) m_flags |= IsForward; else m_flags &= ~IsForward; }
+
+ // it may be a window change event (MDI, notebook pages...) or a control
+ // change event
+ bool IsWindowChange() const
+ { return (m_flags & WinChange) != 0; }
+ void SetWindowChange(bool bIs)
+ { if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; }
+
+ // Set to true under MSW if the event was generated using the tab key.
+ // This is required for proper navogation over radio buttons
+ bool IsFromTab() const
+ { return (m_flags & FromTab) != 0; }
+ void SetFromTab(bool bIs)
+ { if ( bIs ) m_flags |= FromTab; else m_flags &= ~FromTab; }
+
+ // the child which has the focus currently (may be NULL - use
+ // wxWindow::FindFocus then)
+ wxWindow* GetCurrentFocus() const { return m_focus; }
+ void SetCurrentFocus(wxWindow *win) { m_focus = win; }
+
+ // Set flags
+ void SetFlags(long flags) { m_flags = flags; }
+
+ virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); }
+
+ enum
+ {
+ IsBackward = 0x0000,
+ IsForward = 0x0001,
+ WinChange = 0x0002,
+ FromTab = 0x0004
+ };
+
+ long m_flags;
+ wxWindow *m_focus;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNavigationKeyEvent)
+};
+
+// Window creation/destruction events: the first is sent as soon as window is
+// created (i.e. the underlying GUI object exists), but when the C++ object is
+// fully initialized (so virtual functions may be called). The second,
+// wxEVT_DESTROY, is sent right before the window is destroyed - again, it's
+// still safe to call virtual functions at this moment
+/*
+ wxEVT_CREATE
+ wxEVT_DESTROY
+ */
+
+class WXDLLIMPEXP_CORE wxWindowCreateEvent : public wxCommandEvent
+{
+public:
+ wxWindowCreateEvent(wxWindow *win = NULL);
+
+ wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
+
+ virtual wxEvent *Clone() const { return new wxWindowCreateEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowCreateEvent)
+};
+
+class WXDLLIMPEXP_CORE wxWindowDestroyEvent : public wxCommandEvent
+{
+public:
+ wxWindowDestroyEvent(wxWindow *win = NULL);
+
+ wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
+
+ virtual wxEvent *Clone() const { return new wxWindowDestroyEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowDestroyEvent)
+};
+
+// A help event is sent when the user clicks on a window in context-help mode.
+/*
+ wxEVT_HELP
+ wxEVT_DETAILED_HELP
+*/
+
+class WXDLLIMPEXP_CORE wxHelpEvent : public wxCommandEvent
+{
+public:
+ // how was this help event generated?
+ enum Origin
+ {
+ Origin_Unknown, // unrecognized event source
+ Origin_Keyboard, // event generated from F1 key press
+ Origin_HelpButton // event from [?] button on the title bar (Windows)
+ };
+
+ wxHelpEvent(wxEventType type = wxEVT_NULL,
+ wxWindowID winid = 0,
+ const wxPoint& pt = wxDefaultPosition,
+ Origin origin = Origin_Unknown)
+ : wxCommandEvent(type, winid),
+ m_pos(pt),
+ m_origin(GuessOrigin(origin))
+ { }
+ wxHelpEvent(const wxHelpEvent & event)
+ : wxCommandEvent(event),
+ m_pos(event.m_pos),
+ m_target(event.m_target),
+ m_link(event.m_link),
+ m_origin(event.m_origin)
+ { }
+
+ // Position of event (in screen coordinates)
+ const wxPoint& GetPosition() const { return m_pos; }
+ void SetPosition(const wxPoint& pos) { m_pos = pos; }
+
+ // Optional link to further help
+ const wxString& GetLink() const { return m_link; }
+ void SetLink(const wxString& link) { m_link = link; }
+
+ // Optional target to display help in. E.g. a window specification
+ const wxString& GetTarget() const { return m_target; }
+ void SetTarget(const wxString& target) { m_target = target; }
+
+ virtual wxEvent *Clone() const { return new wxHelpEvent(*this); }
+
+ // optional indication of the event source
+ Origin GetOrigin() const { return m_origin; }
+ void SetOrigin(Origin origin) { m_origin = origin; }
+
+protected:
+ wxPoint m_pos;
+ wxString m_target;
+ wxString m_link;
+ Origin m_origin;
+
+ // we can try to guess the event origin ourselves, even if none is
+ // specified in the ctor
+ static Origin GuessOrigin(Origin origin);
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHelpEvent)
+};
+
+// A Clipboard Text event is sent when a window intercepts text copy/cut/paste
+// message, i.e. the user has cut/copied/pasted data from/into a text control
+// via ctrl-C/X/V, ctrl/shift-del/insert, a popup menu command, etc.
+// NOTE : under windows these events are *NOT* generated automatically
+// for a Rich Edit text control.
+/*
+wxEVT_COMMAND_TEXT_COPY
+wxEVT_COMMAND_TEXT_CUT
+wxEVT_COMMAND_TEXT_PASTE
+*/
+
+class WXDLLIMPEXP_CORE wxClipboardTextEvent : public wxCommandEvent
+{
+public:
+ wxClipboardTextEvent(wxEventType type = wxEVT_NULL,
+ wxWindowID winid = 0)
+ : wxCommandEvent(type, winid)
+ { }
+ wxClipboardTextEvent(const wxClipboardTextEvent & event)
+ : wxCommandEvent(event)
+ { }
+
+ virtual wxEvent *Clone() const { return new wxClipboardTextEvent(*this); }
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardTextEvent)
+};
+
+// A Context event is sent when the user right clicks on a window or
+// presses Shift-F10
+// NOTE : Under windows this is a repackaged WM_CONTETXMENU message
+// Under other systems it may have to be generated from a right click event
+/*
+ wxEVT_CONTEXT_MENU
+*/
+
+class WXDLLIMPEXP_CORE wxContextMenuEvent : public wxCommandEvent
+{
+public:
+ wxContextMenuEvent(wxEventType type = wxEVT_NULL,
+ wxWindowID winid = 0,
+ const wxPoint& pt = wxDefaultPosition)
+ : wxCommandEvent(type, winid),
+ m_pos(pt)
+ { }
+ wxContextMenuEvent(const wxContextMenuEvent & event)
+ : wxCommandEvent(event),
+ m_pos(event.m_pos)
+ { }
+
+ // Position of event (in screen coordinates)
+ const wxPoint& GetPosition() const { return m_pos; }
+ void SetPosition(const wxPoint& pos) { m_pos = pos; }
+
+ virtual wxEvent *Clone() const { return new wxContextMenuEvent(*this); }
+
+protected:
+ wxPoint m_pos;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent)
+};
+
+// Idle event
+/*
+ wxEVT_IDLE
+ */
+
+// Whether to always send idle events to windows, or
+// to only send update events to those with the
+// wxWS_EX_PROCESS_IDLE style.
+
+enum wxIdleMode
+{
+ // Send idle events to all windows
+ wxIDLE_PROCESS_ALL,
+
+ // Send idle events to windows that have
+ // the wxWS_EX_PROCESS_IDLE flag specified
+ wxIDLE_PROCESS_SPECIFIED
+};
+
+class WXDLLIMPEXP_CORE wxIdleEvent : public wxEvent
+{
+public:
+ wxIdleEvent()
+ : wxEvent(0, wxEVT_IDLE),
+ m_requestMore(false)
+ { }
+ wxIdleEvent(const wxIdleEvent & event)
+ : wxEvent(event),
+ m_requestMore(event.m_requestMore)
+ { }
+
+ void RequestMore(bool needMore = true) { m_requestMore = needMore; }
+ bool MoreRequested() const { return m_requestMore; }
+
+ virtual wxEvent *Clone() const { return new wxIdleEvent(*this); }
+
+ // Specify how wxWidgets will send idle events: to
+ // all windows, or only to those which specify that they
+ // will process the events.
+ static void SetMode(wxIdleMode mode) { sm_idleMode = mode; }
+
+ // Returns the idle event mode
+ static wxIdleMode GetMode() { return sm_idleMode; }
+
+ // Can we send an idle event?
+ static bool CanSend(wxWindow* win);
+
+protected:
+ bool m_requestMore;
+ static wxIdleMode sm_idleMode;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
+};
+
+#endif // wxUSE_GUI
+
+/* TODO
+ wxEVT_MOUSE_CAPTURE_CHANGED,
+ wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95)
+// wxEVT_FONT_CHANGED, // WM_FONTCHANGE: roll into wxEVT_SETTING_CHANGED, but remember to propagate
+ // wxEVT_FONT_CHANGED to all other windows (maybe).
+ wxEVT_DRAW_ITEM, // Leave these three as virtual functions in wxControl?? Platform-specific.
+ wxEVT_MEASURE_ITEM,
+ wxEVT_COMPARE_ITEM
+*/
+
+
+// ============================================================================
+// event handler and related classes
+// ============================================================================
+
+// for backwards compatibility and to prevent eVC 4 for ARM from crashing with
+// internal compiler error when compiling wx, we define wxObjectEventFunction
+// as a wxObject method even though it can only be a wxEvtHandler one
+typedef void (wxObject::*wxObjectEventFunction)(wxEvent&);
+
+// we can't have ctors nor base struct in backwards compatibility mode or
+// otherwise we won't be able to initialize the objects with an agregate, so
+// we have to keep both versions
+#if WXWIN_COMPATIBILITY_EVENT_TYPES
+
+struct WXDLLIMPEXP_BASE wxEventTableEntry
+{
+ // For some reason, this can't be wxEventType, or VC++ complains.
+ int m_eventType; // main event type
+ int m_id; // control/menu/toolbar id
+ int m_lastId; // used for ranges of ids
+ wxObjectEventFunction m_fn; // function to call: not wxEventFunction,
+ // because of dependency problems
+
+ wxObject* m_callbackUserData;
+};
+
+#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
+
+// struct containing the members common to static and dynamic event tables
+// entries
+struct WXDLLIMPEXP_BASE wxEventTableEntryBase
+{
+private:
+ wxEventTableEntryBase& operator=(const wxEventTableEntryBase& event);
+
+public:
+ wxEventTableEntryBase(int winid, int idLast,
+ wxObjectEventFunction fn, wxObject *data)
+ : m_id(winid),
+ m_lastId(idLast),
+ m_fn(fn),
+ m_callbackUserData(data)
+ { }
+
+ wxEventTableEntryBase(const wxEventTableEntryBase& event)
+ : m_id(event.m_id),
+ m_lastId(event.m_lastId),
+ m_fn(event.m_fn),
+ m_callbackUserData(event.m_callbackUserData)
+ { }
+
+ // the range of ids for this entry: if m_lastId == wxID_ANY, the range
+ // consists only of m_id, otherwise it is m_id..m_lastId inclusive
+ int m_id,
+ m_lastId;
+
+ // function to call: not wxEventFunction, because of dependency problems
+ wxObjectEventFunction m_fn;
+
+ // arbitrary user data asosciated with the callback
+ wxObject* m_callbackUserData;
+};
+
+// an entry from a static event table
+struct WXDLLIMPEXP_BASE wxEventTableEntry : public wxEventTableEntryBase
+{
+ wxEventTableEntry(const int& evType, int winid, int idLast,
+ wxObjectEventFunction fn, wxObject *data)
+ : wxEventTableEntryBase(winid, idLast, fn, data),
+ m_eventType(evType)
+ { }
+
+ // the reference to event type: this allows us to not care about the
+ // (undefined) order in which the event table entries and the event types
+ // are initialized: initially the value of this reference might be
+ // invalid, but by the time it is used for the first time, all global
+ // objects will have been initialized (including the event type constants)
+ // and so it will have the correct value when it is needed
+ const int& m_eventType;
+
+private:
+ wxEventTableEntry& operator=(const wxEventTableEntry&);
+};
+
+// an entry used in dynamic event table managed by wxEvtHandler::Connect()
+struct WXDLLIMPEXP_BASE wxDynamicEventTableEntry : public wxEventTableEntryBase
+{
+ wxDynamicEventTableEntry(int evType, int winid, int idLast,
+ wxObjectEventFunction fn, wxObject *data, wxEvtHandler* eventSink)
+ : wxEventTableEntryBase(winid, idLast, fn, data),
+ m_eventType(evType),
+ m_eventSink(eventSink)
+ { }
+
+ // not a reference here as we can't keep a reference to a temporary int
+ // created to wrap the constant value typically passed to Connect() - nor
+ // do we need it
+ int m_eventType;
+
+ // Pointer to object whose function is fn - so we don't assume the
+ // EventFunction is always a member of the EventHandler receiving the
+ // message
+ wxEvtHandler* m_eventSink;
+
+ DECLARE_NO_COPY_CLASS(wxDynamicEventTableEntry)
+};
+
+#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES
+
+// ----------------------------------------------------------------------------
+// wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0}
+// ----------------------------------------------------------------------------
+
+struct WXDLLIMPEXP_BASE wxEventTable
+{
+ const wxEventTable *baseTable; // base event table (next in chain)
+ const wxEventTableEntry *entries; // bottom of entry array
+};
+
+// ----------------------------------------------------------------------------
+// wxEventHashTable: a helper of wxEvtHandler to speed up wxEventTable lookups.
+// ----------------------------------------------------------------------------
+
+WX_DEFINE_ARRAY_PTR(const wxEventTableEntry*, wxEventTableEntryPointerArray);
+
+class WXDLLIMPEXP_BASE wxEventHashTable
+{
+private:
+ // Internal data structs
+ struct EventTypeTable
+ {
+ wxEventType eventType;
+ wxEventTableEntryPointerArray eventEntryTable;
+ };
+ typedef EventTypeTable* EventTypeTablePointer;
+
+public:
+ // Constructor, needs the event table it needs to hash later on.
+ // Note: hashing of the event table is not done in the constructor as it
+ // can be that the event table is not yet full initialize, the hash
+ // will gets initialized when handling the first event look-up request.
+ wxEventHashTable(const wxEventTable &table);
+ // Destructor.
+ ~wxEventHashTable();
+
+ // Handle the given event, in other words search the event table hash
+ // and call self->ProcessEvent() if a match was found.
+ bool HandleEvent(wxEvent &event, wxEvtHandler *self);
+
+ // Clear table
+ void Clear();
+
+ // Clear all tables
+ static void ClearAll();
+ // Rebuild all tables
+ static void ReconstructAll();
+
+protected:
+ // Init the hash table with the entries of the static event table.
+ void InitHashTable();
+ // Helper funtion of InitHashTable() to insert 1 entry into the hash table.
+ void AddEntry(const wxEventTableEntry &entry);
+ // Allocate and init with null pointers the base hash table.
+ void AllocEventTypeTable(size_t size);
+ // Grow the hash table in size and transfer all items currently
+ // in the table to the correct location in the new table.
+ void GrowEventTypeTable();
+
+protected:
+ const wxEventTable &m_table;
+ bool m_rebuildHash;
+
+ size_t m_size;
+ EventTypeTablePointer *m_eventTypeTable;
+
+ static wxEventHashTable* sm_first;
+ wxEventHashTable* m_previous;
+ wxEventHashTable* m_next;
+
+ DECLARE_NO_COPY_CLASS(wxEventHashTable)
+};
+
+// ----------------------------------------------------------------------------
+// wxEvtHandler: the base class for all objects handling wxWidgets events
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject
+{
+public:
+ wxEvtHandler();
+ virtual ~wxEvtHandler();
+
+ wxEvtHandler *GetNextHandler() const { return m_nextHandler; }
+ wxEvtHandler *GetPreviousHandler() const { return m_previousHandler; }
+ void SetNextHandler(wxEvtHandler *handler) { m_nextHandler = handler; }
+ void SetPreviousHandler(wxEvtHandler *handler) { m_previousHandler = handler; }
+
+ void SetEvtHandlerEnabled(bool enabled) { m_enabled = enabled; }
+ bool GetEvtHandlerEnabled() const { return m_enabled; }
+
+ // process an event right now
+ virtual bool ProcessEvent(wxEvent& event);
+
+ // add an event to be processed later
+ void AddPendingEvent(wxEvent& event);
+
+ void ProcessPendingEvents();
+
+#if wxUSE_THREADS
+ bool ProcessThreadEvent(wxEvent& event);
+#endif
+
+ // Dynamic association of a member function handler with the event handler,
+ // winid and event type
+ void Connect(int winid,
+ int lastId,
+ int eventType,
+ wxObjectEventFunction func,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL);
+
+ // Convenience function: take just one id
+ void Connect(int winid,
+ int eventType,
+ wxObjectEventFunction func,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
+ { Connect(winid, wxID_ANY, eventType, func, userData, eventSink); }
+
+ // Even more convenient: without id (same as using id of wxID_ANY)
+ void Connect(int eventType,
+ wxObjectEventFunction func,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
+ { Connect(wxID_ANY, wxID_ANY, eventType, func, userData, eventSink); }
+
+ bool Disconnect(int winid,
+ int lastId,
+ wxEventType eventType,
+ wxObjectEventFunction func = NULL,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL);
+
+ bool Disconnect(int winid = wxID_ANY,
+ wxEventType eventType = wxEVT_NULL,
+ wxObjectEventFunction func = NULL,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
+ { return Disconnect(winid, wxID_ANY, eventType, func, userData, eventSink); }
+
+ bool Disconnect(wxEventType eventType,
+ wxObjectEventFunction func,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
+ { return Disconnect(wxID_ANY, eventType, func, userData, eventSink); }
+
+ wxList* GetDynamicEventTable() const { return m_dynamicEvents ; }
+
+ // User data can be associated with each wxEvtHandler
+ void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
+ wxClientData *GetClientObject() const { return DoGetClientObject(); }
+
+ void SetClientData( void *data ) { DoSetClientData(data); }
+ void *GetClientData() const { return DoGetClientData(); }
+
+ // check if the given event table entry matches this event and call the
+ // handler if it does
+ //
+ // return true if the event was processed, false otherwise (no match or the
+ // handler decided to skip the event)
+ static bool ProcessEventIfMatches(const wxEventTableEntryBase& tableEntry,
+ wxEvtHandler *handler,
+ wxEvent& event);
+
+ // implementation from now on
+ virtual bool SearchEventTable(wxEventTable& table, wxEvent& event);
+ bool SearchDynamicEventTable( wxEvent& event );
+
+#if wxUSE_THREADS
+ void ClearEventLocker();
+#endif // wxUSE_THREADS
+
+ // Avoid problems at exit by cleaning up static hash table gracefully
+ void ClearEventHashTable() { GetEventHashTable().Clear(); }
+
+private:
+ static const wxEventTableEntry sm_eventTableEntries[];
+
+protected:
+ // hooks for wxWindow used by ProcessEvent()
+ // -----------------------------------------
+
+ // This one is called before trying our own event table to allow plugging
+ // in the validators.
+ //
+ // NB: This method is intentionally *not* inside wxUSE_VALIDATORS!
+ // It is part of wxBase which doesn't use validators and the code
+ // is compiled out when building wxBase w/o GUI classes, which affects
+ // binary compatibility and wxBase library can't be used by GUI
+ // ports.
+ virtual bool TryValidator(wxEvent& WXUNUSED(event)) { return false; }
+
+ // this one is called after failing to find the event handle in our own
+ // table to give a chance to the other windows to process it
+ //
+ // base class implementation passes the event to wxTheApp
+ virtual bool TryParent(wxEvent& event);
+
+
+ static const wxEventTable sm_eventTable;
+ virtual const wxEventTable *GetEventTable() const;
+
+ static wxEventHashTable sm_eventHashTable;
+ virtual wxEventHashTable& GetEventHashTable() const;
+
+ wxEvtHandler* m_nextHandler;
+ wxEvtHandler* m_previousHandler;
+ wxList* m_dynamicEvents;
+ wxList* m_pendingEvents;
+
+#if wxUSE_THREADS
+#if defined (__VISAGECPP__)
+ const wxCriticalSection& Lock() const { return m_eventsLocker; }
+ wxCriticalSection& Lock() { return m_eventsLocker; }
+
+ wxCriticalSection m_eventsLocker;
+# else
+ const wxCriticalSection& Lock() const { return *m_eventsLocker; }
+ wxCriticalSection& Lock() { return *m_eventsLocker; }
+
+ wxCriticalSection* m_eventsLocker;
+# endif
+#endif
+
+ // Is event handler enabled?
+ bool m_enabled;
+
+
+ // The user data: either an object which will be deleted by the container
+ // when it's deleted or some raw pointer which we do nothing with - only
+ // one type of data can be used with the given window (i.e. you cannot set
+ // the void data and then associate the container with wxClientData or vice
+ // versa)
+ union
+ {
+ wxClientData *m_clientObject;
+ void *m_clientData;
+ };
+
+ // what kind of data do we have?
+ wxClientDataType m_clientDataType;
+
+ // client data accessors
+ virtual void DoSetClientObject( wxClientData *data );
+ virtual wxClientData *DoGetClientObject() const;
+
+ virtual void DoSetClientData( void *data );
+ virtual void *DoGetClientData() const;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxEvtHandler)
+};
+
+// Post a message to the given eventhandler which will be processed during the
+// next event loop iteration
+inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event)
+{
+ wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") );
+
+ dest->AddPendingEvent(event);
+}
+
+typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
+
+#define wxEventHandler(func) \
+ (wxObjectEventFunction)wxStaticCastEvent(wxEventFunction, &func)
+
+#if wxUSE_GUI
+
+typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&);
+typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&);
+typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&);
+typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&);
+typedef void (wxEvtHandler::*wxMoveEventFunction)(wxMoveEvent&);
+typedef void (wxEvtHandler::*wxPaintEventFunction)(wxPaintEvent&);
+typedef void (wxEvtHandler::*wxNcPaintEventFunction)(wxNcPaintEvent&);
+typedef void (wxEvtHandler::*wxEraseEventFunction)(wxEraseEvent&);
+typedef void (wxEvtHandler::*wxMouseEventFunction)(wxMouseEvent&);
+typedef void (wxEvtHandler::*wxCharEventFunction)(wxKeyEvent&);
+typedef void (wxEvtHandler::*wxFocusEventFunction)(wxFocusEvent&);
+typedef void (wxEvtHandler::*wxChildFocusEventFunction)(wxChildFocusEvent&);
+typedef void (wxEvtHandler::*wxActivateEventFunction)(wxActivateEvent&);
+typedef void (wxEvtHandler::*wxMenuEventFunction)(wxMenuEvent&);
+typedef void (wxEvtHandler::*wxJoystickEventFunction)(wxJoystickEvent&);
+typedef void (wxEvtHandler::*wxDropFilesEventFunction)(wxDropFilesEvent&);
+typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&);
+typedef void (wxEvtHandler::*wxSysColourChangedEventFunction)(wxSysColourChangedEvent&);
+typedef void (wxEvtHandler::*wxDisplayChangedEventFunction)(wxDisplayChangedEvent&);
+typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&);
+typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&);
+typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&);
+typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&);
+typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&);
+typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxMaximizeEvent&);
+typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&);
+typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&);
+typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&);
+typedef void (wxEvtHandler::*wxWindowCreateEventFunction)(wxWindowCreateEvent&);
+typedef void (wxEvtHandler::*wxWindowDestroyEventFunction)(wxWindowDestroyEvent&);
+typedef void (wxEvtHandler::*wxSetCursorEventFunction)(wxSetCursorEvent&);
+typedef void (wxEvtHandler::*wxNotifyEventFunction)(wxNotifyEvent&);
+typedef void (wxEvtHandler::*wxHelpEventFunction)(wxHelpEvent&);
+typedef void (wxEvtHandler::*wxContextMenuEventFunction)(wxContextMenuEvent&);
+typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureChangedEvent&);
+typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&);
+typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&);
+
+// these typedefs don't have the same name structure as the others, keep for
+// backwards compatibility only
+#if WXWIN_COMPATIBILITY_2_4
+ typedef wxSysColourChangedEventFunction wxSysColourChangedFunction;
+ typedef wxDisplayChangedEventFunction wxDisplayChangedFunction;
+#endif // WXWIN_COMPATIBILITY_2_4
+
+
+#define wxCommandEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
+#define wxScrollEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScrollEventFunction, &func)
+#define wxScrollWinEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScrollWinEventFunction, &func)
+#define wxSizeEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSizeEventFunction, &func)
+#define wxMoveEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMoveEventFunction, &func)
+#define wxPaintEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxPaintEventFunction, &func)
+#define wxNcPaintEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNcPaintEventFunction, &func)
+#define wxEraseEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxEraseEventFunction, &func)
+#define wxMouseEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseEventFunction, &func)
+#define wxCharEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCharEventFunction, &func)
+#define wxKeyEventHandler(func) wxCharEventHandler(func)
+#define wxFocusEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFocusEventFunction, &func)
+#define wxChildFocusEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChildFocusEventFunction, &func)
+#define wxActivateEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxActivateEventFunction, &func)
+#define wxMenuEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMenuEventFunction, &func)
+#define wxJoystickEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxJoystickEventFunction, &func)
+#define wxDropFilesEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDropFilesEventFunction, &func)
+#define wxInitDialogEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxInitDialogEventFunction, &func)
+#define wxSysColourChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSysColourChangedEventFunction, &func)
+#define wxDisplayChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDisplayChangedEventFunction, &func)
+#define wxUpdateUIEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxUpdateUIEventFunction, &func)
+#define wxIdleEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIdleEventFunction, &func)
+#define wxCloseEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCloseEventFunction, &func)
+#define wxShowEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxShowEventFunction, &func)
+#define wxIconizeEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIconizeEventFunction, &func)
+#define wxMaximizeEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMaximizeEventFunction, &func)
+#define wxNavigationKeyEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNavigationKeyEventFunction, &func)
+#define wxPaletteChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxPaletteChangedEventFunction, &func)
+#define wxQueryNewPaletteEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxQueryNewPaletteEventFunction, &func)
+#define wxWindowCreateEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWindowCreateEventFunction, &func)
+#define wxWindowDestroyEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWindowDestroyEventFunction, &func)
+#define wxSetCursorEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSetCursorEventFunction, &func)
+#define wxNotifyEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNotifyEventFunction, &func)
+#define wxHelpEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxHelpEventFunction, &func)
+#define wxContextMenuEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxContextMenuEventFunction, &func)
+#define wxMouseCaptureChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseCaptureChangedEventFunction, &func)
+#define wxMouseCaptureLostEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseCaptureLostEventFunction, &func)
+#define wxClipboardTextEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxClipboardTextEventFunction, &func)
+
+#endif // wxUSE_GUI
+
+// N.B. In GNU-WIN32, you *have* to take the address of a member function
+// (use &) or the compiler crashes...
+
+#define DECLARE_EVENT_TABLE() \
+ private: \
+ static const wxEventTableEntry sm_eventTableEntries[]; \
+ protected: \
+ static const wxEventTable sm_eventTable; \
+ virtual const wxEventTable* GetEventTable() const; \
+ static wxEventHashTable sm_eventHashTable; \
+ virtual wxEventHashTable& GetEventHashTable() const;
+
+// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize
+// sm_eventTable before using it in GetEventTable() or the compiler gives
+// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews)
+
+#define BEGIN_EVENT_TABLE(theClass, baseClass) \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE1(theClass, baseClass, T1) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE2(theClass, baseClass, T1, T2) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE4(theClass, baseClass, T1, T2, T3, T4) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE5(theClass, baseClass, T1, T2, T3, T4, T5) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE7(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define BEGIN_EVENT_TABLE_TEMPLATE8(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7, T8) \
+ template \
+ const wxEventTable theClass::sm_eventTable = \
+ { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+ template \
+ const wxEventTable *theClass::GetEventTable() const \
+ { return &theClass::sm_eventTable; } \
+ template \
+ wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
+ template \
+ wxEventHashTable &theClass::GetEventHashTable() const \
+ { return theClass::sm_eventHashTable; } \
+ template \
+ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
+
+#define END_EVENT_TABLE() DECLARE_EVENT_TABLE_ENTRY( wxEVT_NULL, 0, 0, 0, 0 ) };
+
+/*
+ * Event table macros
+ */
+
+// helpers for writing shorter code below: declare an event macro taking 2, 1
+// or none ids (the missing ids default to wxID_ANY)
+//
+// macro arguments:
+// - evt one of wxEVT_XXX constants
+// - id1, id2 ids of the first/last id
+// - fn the function (should be cast to the right type)
+#define wx__DECLARE_EVT2(evt, id1, id2, fn) \
+ DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
+#define wx__DECLARE_EVT1(evt, id, fn) \
+ wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
+#define wx__DECLARE_EVT0(evt, fn) \
+ wx__DECLARE_EVT1(evt, wxID_ANY, fn)
+
+
+// Generic events
+#define EVT_CUSTOM(event, winid, func) \
+ wx__DECLARE_EVT1(event, winid, wxEventHandler(func))
+#define EVT_CUSTOM_RANGE(event, id1, id2, func) \
+ wx__DECLARE_EVT2(event, id1, id2, wxEventHandler(func))
+
+// EVT_COMMAND
+#define EVT_COMMAND(winid, event, func) \
+ wx__DECLARE_EVT1(event, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_RANGE(id1, id2, event, func) \
+ wx__DECLARE_EVT2(event, id1, id2, wxCommandEventHandler(func))
+
+#define EVT_NOTIFY(event, winid, func) \
+ wx__DECLARE_EVT1(event, winid, wxNotifyEventHandler(func))
+#define EVT_NOTIFY_RANGE(event, id1, id2, func) \
+ wx__DECLARE_EVT2(event, id1, id2, wxNotifyEventHandler(func))
+
+// Miscellaneous
+#define EVT_SIZE(func) wx__DECLARE_EVT0(wxEVT_SIZE, wxSizeEventHandler(func))
+#define EVT_SIZING(func) wx__DECLARE_EVT0(wxEVT_SIZING, wxSizeEventHandler(func))
+#define EVT_MOVE(func) wx__DECLARE_EVT0(wxEVT_MOVE, wxMoveEventHandler(func))
+#define EVT_MOVING(func) wx__DECLARE_EVT0(wxEVT_MOVING, wxMoveEventHandler(func))
+#define EVT_CLOSE(func) wx__DECLARE_EVT0(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(func))
+#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func))
+#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func))
+#define EVT_PAINT(func) wx__DECLARE_EVT0(wxEVT_PAINT, wxPaintEventHandler(func))
+#define EVT_NC_PAINT(func) wx__DECLARE_EVT0(wxEVT_NC_PAINT, wxNcPaintEventHandler(func))
+#define EVT_ERASE_BACKGROUND(func) wx__DECLARE_EVT0(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(func))
+#define EVT_CHAR(func) wx__DECLARE_EVT0(wxEVT_CHAR, wxCharEventHandler(func))
+#define EVT_KEY_DOWN(func) wx__DECLARE_EVT0(wxEVT_KEY_DOWN, wxKeyEventHandler(func))
+#define EVT_KEY_UP(func) wx__DECLARE_EVT0(wxEVT_KEY_UP, wxKeyEventHandler(func))
+#if wxUSE_HOTKEY
+#define EVT_HOTKEY(winid, func) wx__DECLARE_EVT1(wxEVT_HOTKEY, winid, wxCharEventHandler(func))
+#endif
+#define EVT_CHAR_HOOK(func) wx__DECLARE_EVT0(wxEVT_CHAR_HOOK, wxCharEventHandler(func))
+#define EVT_MENU_OPEN(func) wx__DECLARE_EVT0(wxEVT_MENU_OPEN, wxMenuEventHandler(func))
+#define EVT_MENU_CLOSE(func) wx__DECLARE_EVT0(wxEVT_MENU_CLOSE, wxMenuEventHandler(func))
+#define EVT_MENU_HIGHLIGHT(winid, func) wx__DECLARE_EVT1(wxEVT_MENU_HIGHLIGHT, winid, wxMenuEventHandler(func))
+#define EVT_MENU_HIGHLIGHT_ALL(func) wx__DECLARE_EVT0(wxEVT_MENU_HIGHLIGHT, wxMenuEventHandler(func))
+#define EVT_SET_FOCUS(func) wx__DECLARE_EVT0(wxEVT_SET_FOCUS, wxFocusEventHandler(func))
+#define EVT_KILL_FOCUS(func) wx__DECLARE_EVT0(wxEVT_KILL_FOCUS, wxFocusEventHandler(func))
+#define EVT_CHILD_FOCUS(func) wx__DECLARE_EVT0(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(func))
+#define EVT_ACTIVATE(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE, wxActivateEventHandler(func))
+#define EVT_ACTIVATE_APP(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE_APP, wxActivateEventHandler(func))
+#define EVT_HIBERNATE(func) wx__DECLARE_EVT0(wxEVT_HIBERNATE, wxActivateEventHandler(func))
+#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func))
+#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func))
+#define EVT_DROP_FILES(func) wx__DECLARE_EVT0(wxEVT_DROP_FILES, wxDropFilesEventHandler(func))
+#define EVT_INIT_DIALOG(func) wx__DECLARE_EVT0(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(func))
+#define EVT_SYS_COLOUR_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEventHandler(func))
+#define EVT_DISPLAY_CHANGED(func) wx__DECLARE_EVT0(wxEVT_DISPLAY_CHANGED, wxDisplayChangedEventHandler(func))
+#define EVT_SHOW(func) wx__DECLARE_EVT0(wxEVT_SHOW, wxShowEventHandler(func))
+#define EVT_MAXIMIZE(func) wx__DECLARE_EVT0(wxEVT_MAXIMIZE, wxMaximizeEventHandler(func))
+#define EVT_ICONIZE(func) wx__DECLARE_EVT0(wxEVT_ICONIZE, wxIconizeEventHandler(func))
+#define EVT_NAVIGATION_KEY(func) wx__DECLARE_EVT0(wxEVT_NAVIGATION_KEY, wxNavigationKeyEventHandler(func))
+#define EVT_PALETTE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_PALETTE_CHANGED, wxPaletteChangedEventHandler(func))
+#define EVT_QUERY_NEW_PALETTE(func) wx__DECLARE_EVT0(wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEventHandler(func))
+#define EVT_WINDOW_CREATE(func) wx__DECLARE_EVT0(wxEVT_CREATE, wxWindowCreateEventHandler(func))
+#define EVT_WINDOW_DESTROY(func) wx__DECLARE_EVT0(wxEVT_DESTROY, wxWindowDestroyEventHandler(func))
+#define EVT_SET_CURSOR(func) wx__DECLARE_EVT0(wxEVT_SET_CURSOR, wxSetCursorEventHandler(func))
+#define EVT_MOUSE_CAPTURE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEventHandler(func))
+#define EVT_MOUSE_CAPTURE_LOST(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(func))
+
+// Mouse events
+#define EVT_LEFT_DOWN(func) wx__DECLARE_EVT0(wxEVT_LEFT_DOWN, wxMouseEventHandler(func))
+#define EVT_LEFT_UP(func) wx__DECLARE_EVT0(wxEVT_LEFT_UP, wxMouseEventHandler(func))
+#define EVT_MIDDLE_DOWN(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(func))
+#define EVT_MIDDLE_UP(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_UP, wxMouseEventHandler(func))
+#define EVT_RIGHT_DOWN(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DOWN, wxMouseEventHandler(func))
+#define EVT_RIGHT_UP(func) wx__DECLARE_EVT0(wxEVT_RIGHT_UP, wxMouseEventHandler(func))
+#define EVT_MOTION(func) wx__DECLARE_EVT0(wxEVT_MOTION, wxMouseEventHandler(func))
+#define EVT_LEFT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_LEFT_DCLICK, wxMouseEventHandler(func))
+#define EVT_MIDDLE_DCLICK(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(func))
+#define EVT_RIGHT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DCLICK, wxMouseEventHandler(func))
+#define EVT_LEAVE_WINDOW(func) wx__DECLARE_EVT0(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(func))
+#define EVT_ENTER_WINDOW(func) wx__DECLARE_EVT0(wxEVT_ENTER_WINDOW, wxMouseEventHandler(func))
+#define EVT_MOUSEWHEEL(func) wx__DECLARE_EVT0(wxEVT_MOUSEWHEEL, wxMouseEventHandler(func))
+
+// All mouse events
+#define EVT_MOUSE_EVENTS(func) \
+ EVT_LEFT_DOWN(func) \
+ EVT_LEFT_UP(func) \
+ EVT_MIDDLE_DOWN(func) \
+ EVT_MIDDLE_UP(func) \
+ EVT_RIGHT_DOWN(func) \
+ EVT_RIGHT_UP(func) \
+ EVT_MOTION(func) \
+ EVT_LEFT_DCLICK(func) \
+ EVT_MIDDLE_DCLICK(func) \
+ EVT_RIGHT_DCLICK(func) \
+ EVT_LEAVE_WINDOW(func) \
+ EVT_ENTER_WINDOW(func) \
+ EVT_MOUSEWHEEL(func)
+
+// Scrolling from wxWindow (sent to wxScrolledWindow)
+#define EVT_SCROLLWIN_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_TOP, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEUP, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(func))
+#define EVT_SCROLLWIN_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEventHandler(func))
+
+#define EVT_SCROLLWIN(func) \
+ EVT_SCROLLWIN_TOP(func) \
+ EVT_SCROLLWIN_BOTTOM(func) \
+ EVT_SCROLLWIN_LINEUP(func) \
+ EVT_SCROLLWIN_LINEDOWN(func) \
+ EVT_SCROLLWIN_PAGEUP(func) \
+ EVT_SCROLLWIN_PAGEDOWN(func) \
+ EVT_SCROLLWIN_THUMBTRACK(func) \
+ EVT_SCROLLWIN_THUMBRELEASE(func)
+
+// Scrolling from wxSlider and wxScrollBar
+#define EVT_SCROLL_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_TOP, wxScrollEventHandler(func))
+#define EVT_SCROLL_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(func))
+#define EVT_SCROLL_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(func))
+#define EVT_SCROLL_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(func))
+#define EVT_SCROLL_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(func))
+#define EVT_SCROLL_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(func))
+#define EVT_SCROLL_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(func))
+#define EVT_SCROLL_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(func))
+#define EVT_SCROLL_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(func))
+
+#define EVT_SCROLL(func) \
+ EVT_SCROLL_TOP(func) \
+ EVT_SCROLL_BOTTOM(func) \
+ EVT_SCROLL_LINEUP(func) \
+ EVT_SCROLL_LINEDOWN(func) \
+ EVT_SCROLL_PAGEUP(func) \
+ EVT_SCROLL_PAGEDOWN(func) \
+ EVT_SCROLL_THUMBTRACK(func) \
+ EVT_SCROLL_THUMBRELEASE(func) \
+ EVT_SCROLL_CHANGED(func)
+
+// Scrolling from wxSlider and wxScrollBar, with an id
+#define EVT_COMMAND_SCROLL_TOP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_TOP, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_BOTTOM(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_BOTTOM, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_LINEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEUP, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_LINEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEDOWN, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_PAGEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEUP, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEDOWN, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBRELEASE, winid, wxScrollEventHandler(func))
+#define EVT_COMMAND_SCROLL_CHANGED(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_CHANGED, winid, wxScrollEventHandler(func))
+
+#define EVT_COMMAND_SCROLL(winid, func) \
+ EVT_COMMAND_SCROLL_TOP(winid, func) \
+ EVT_COMMAND_SCROLL_BOTTOM(winid, func) \
+ EVT_COMMAND_SCROLL_LINEUP(winid, func) \
+ EVT_COMMAND_SCROLL_LINEDOWN(winid, func) \
+ EVT_COMMAND_SCROLL_PAGEUP(winid, func) \
+ EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) \
+ EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) \
+ EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \
+ EVT_COMMAND_SCROLL_CHANGED(winid, func)
+
+#if WXWIN_COMPATIBILITY_2_6
+ // compatibility macros for the old name, deprecated in 2.8
+ #define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED
+ #define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED
+ #define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED
+#endif // WXWIN_COMPATIBILITY_2_6
+
+// Convenience macros for commonly-used commands
+#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func))
+#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICE_SELECTED, winid, wxCommandEventHandler(func))
+#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_SELECTED, winid, wxCommandEventHandler(func))
+#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, winid, wxCommandEventHandler(func))
+#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func))
+#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_MENU_SELECTED, id1, id2, wxCommandEventHandler(func))
+#if defined(__SMARTPHONE__)
+# define EVT_BUTTON(winid, func) EVT_MENU(winid, func)
+#else
+# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func))
+#endif
+#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SLIDER_UPDATED, winid, wxCommandEventHandler(func))
+#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBOX_SELECTED, winid, wxCommandEventHandler(func))
+#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBUTTON_SELECTED, winid, wxCommandEventHandler(func))
+// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events
+#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SCROLLBAR_UPDATED, winid, wxCommandEventHandler(func))
+#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_VLBOX_SELECTED, winid, wxCommandEventHandler(func))
+#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxCommandEventHandler(func))
+#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_CLICKED, winid, wxCommandEventHandler(func))
+#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_CLICKED, id1, id2, wxCommandEventHandler(func))
+#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_RCLICKED, winid, wxCommandEventHandler(func))
+#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func))
+#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_ENTER, winid, wxCommandEventHandler(func))
+#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, winid, wxCommandEventHandler(func))
+
+// Generic command events
+#define EVT_COMMAND_LEFT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_CLICK, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_LEFT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_DCLICK, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_RIGHT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_CLICK, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_RIGHT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_DCLICK, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_SET_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SET_FOCUS, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_KILL_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_KILL_FOCUS, winid, wxCommandEventHandler(func))
+#define EVT_COMMAND_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_ENTER, winid, wxCommandEventHandler(func))
+
+// Joystick events
+
+#define EVT_JOY_BUTTON_DOWN(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_DOWN, wxJoystickEventHandler(func))
+#define EVT_JOY_BUTTON_UP(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_UP, wxJoystickEventHandler(func))
+#define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func))
+#define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func))
+
+// These are obsolete, see _BUTTON_ events
+#if WXWIN_COMPATIBILITY_2_4
+ #define EVT_JOY_DOWN(func) EVT_JOY_BUTTON_DOWN(func)
+ #define EVT_JOY_UP(func) EVT_JOY_BUTTON_UP(func)
+#endif // WXWIN_COMPATIBILITY_2_4
+
+// All joystick events
+#define EVT_JOYSTICK_EVENTS(func) \
+ EVT_JOY_BUTTON_DOWN(func) \
+ EVT_JOY_BUTTON_UP(func) \
+ EVT_JOY_MOVE(func) \
+ EVT_JOY_ZMOVE(func)
+
+// Idle event
+#define EVT_IDLE(func) wx__DECLARE_EVT0(wxEVT_IDLE, wxIdleEventHandler(func))
+
+// Update UI event
+#define EVT_UPDATE_UI(winid, func) wx__DECLARE_EVT1(wxEVT_UPDATE_UI, winid, wxUpdateUIEventHandler(func))
+#define EVT_UPDATE_UI_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_UPDATE_UI, id1, id2, wxUpdateUIEventHandler(func))
+
+// Help events
+#define EVT_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_HELP, winid, wxHelpEventHandler(func))
+#define EVT_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_HELP, id1, id2, wxHelpEventHandler(func))
+#define EVT_DETAILED_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_DETAILED_HELP, winid, wxHelpEventHandler(func))
+#define EVT_DETAILED_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_DETAILED_HELP, id1, id2, wxHelpEventHandler(func))
+
+// Context Menu Events
+#define EVT_CONTEXT_MENU(func) wx__DECLARE_EVT0(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(func))
+#define EVT_COMMAND_CONTEXT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_CONTEXT_MENU, winid, wxContextMenuEventHandler(func))
+
+// Clipboard text Events
+#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_CUT, winid, wxClipboardTextEventHandler(func))
+#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_COPY, winid, wxClipboardTextEventHandler(func))
+#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_PASTE, winid, wxClipboardTextEventHandler(func))
+
+// ----------------------------------------------------------------------------
+// Global data
+// ----------------------------------------------------------------------------
+
+// for pending event processing - notice that there is intentionally no
+// WXDLLEXPORT here
+extern WXDLLIMPEXP_BASE wxList *wxPendingEvents;
+#if wxUSE_THREADS
+ extern WXDLLIMPEXP_BASE wxCriticalSection *wxPendingEventsLocker;
+#endif
+
+// ----------------------------------------------------------------------------
+// Helper functions
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+
+// Find a window with the focus, that is also a descendant of the given window.
+// This is used to determine the window to initially send commands to.
+WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor);
+
+#endif // wxUSE_GUI
+
+#endif // _WX_EVENT_H__
diff --git a/3rdparty/wxWidgets/include/wx/evtloop.h b/3rdparty/wxWidgets/include/wx/evtloop.h
new file mode 100644
index 0000000000..51b58eb55e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/evtloop.h
@@ -0,0 +1,229 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/evtloop.h
+// Purpose: declares wxEventLoop class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 01.06.01
+// RCS-ID: $Id: evtloop.h 53607 2008-05-16 15:21:40Z SN $
+// Copyright: (c) 2001 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_EVTLOOP_H_
+#define _WX_EVTLOOP_H_
+
+#include "wx/utils.h"
+
+class WXDLLIMPEXP_FWD_CORE wxEventLoop;
+
+// ----------------------------------------------------------------------------
+// wxEventLoop: a GUI event loop
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxEventLoopBase
+{
+public:
+ // trivial, but needed (because of wxEventLoopBase) ctor
+ wxEventLoopBase() { }
+
+ // dtor
+ virtual ~wxEventLoopBase() { }
+
+ // start the event loop, return the exit code when it is finished
+ virtual int Run() = 0;
+
+ // exit from the loop with the given exit code
+ virtual void Exit(int rc = 0) = 0;
+
+ // return true if any events are available
+ virtual bool Pending() const = 0;
+
+ // dispatch a single event, return false if we should exit from the loop
+ virtual bool Dispatch() = 0;
+
+ // return currently active (running) event loop, may be NULL
+ static wxEventLoop *GetActive() { return ms_activeLoop; }
+
+ // set currently active (running) event loop
+ static void SetActive(wxEventLoop* loop) { ms_activeLoop = loop; }
+
+ // is this event loop running now?
+ //
+ // notice that even if this event loop hasn't terminated yet but has just
+ // spawned a nested (e.g. modal) event loop, this would return false
+ bool IsRunning() const;
+
+protected:
+ // this function should be called before the event loop terminates, whether
+ // this happens normally (because of Exit() call) or abnormally (because of
+ // an exception thrown from inside the loop)
+ virtual void OnExit() { }
+
+
+ // the pointer to currently active loop
+ static wxEventLoop *ms_activeLoop;
+
+ DECLARE_NO_COPY_CLASS(wxEventLoopBase)
+};
+
+#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXDFB__)
+
+// this class can be used to implement a standard event loop logic using
+// Pending() and Dispatch()
+//
+// it also handles idle processing automatically
+class WXDLLEXPORT wxEventLoopManual : public wxEventLoopBase
+{
+public:
+ wxEventLoopManual();
+
+ // enters a loop calling OnNextIteration(), Pending() and Dispatch() and
+ // terminating when Exit() is called
+ virtual int Run();
+
+ // sets the "should exit" flag and wakes up the loop so that it terminates
+ // soon
+ virtual void Exit(int rc = 0);
+
+protected:
+ // implement this to wake up the loop: usually done by posting a dummy event
+ // to it (called from Exit())
+ virtual void WakeUp() = 0;
+
+ // may be overridden to perform some action at the start of each new event
+ // loop iteration
+ virtual void OnNextIteration() { }
+
+
+ // the loop exit code
+ int m_exitcode;
+
+ // should we exit the loop?
+ bool m_shouldExit;
+};
+
+#endif // platforms using "manual" loop
+
+// we're moving away from old m_impl wxEventLoop model as otherwise the user
+// code doesn't have access to platform-specific wxEventLoop methods and this
+// can sometimes be very useful (e.g. under MSW this is necessary for
+// integration with MFC) but currently this is done for MSW only, other ports
+// should follow a.s.a.p.
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/evtloop.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/evtloop.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/evtloop.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/evtloop.h"
+#else // other platform
+
+class WXDLLEXPORT wxEventLoopImpl;
+
+class WXDLLEXPORT wxEventLoop : public wxEventLoopBase
+{
+public:
+ wxEventLoop() { m_impl = NULL; }
+ virtual ~wxEventLoop();
+
+ virtual int Run();
+ virtual void Exit(int rc = 0);
+ virtual bool Pending() const;
+ virtual bool Dispatch();
+
+protected:
+ // the pointer to the port specific implementation class
+ wxEventLoopImpl *m_impl;
+
+ DECLARE_NO_COPY_CLASS(wxEventLoop)
+};
+
+#endif // platforms
+
+inline bool wxEventLoopBase::IsRunning() const { return GetActive() == this; }
+
+// ----------------------------------------------------------------------------
+// wxModalEventLoop
+// ----------------------------------------------------------------------------
+
+// this is a naive generic implementation which uses wxWindowDisabler to
+// implement modality, we will surely need platform-specific implementations
+// too, this generic implementation is here only temporarily to see how it
+// works
+class WXDLLEXPORT wxModalEventLoop : public wxEventLoop
+{
+public:
+ wxModalEventLoop(wxWindow *winModal)
+ {
+ m_windowDisabler = new wxWindowDisabler(winModal);
+ }
+
+protected:
+ virtual void OnExit()
+ {
+ delete m_windowDisabler;
+ m_windowDisabler = NULL;
+
+ wxEventLoop::OnExit();
+ }
+
+private:
+ wxWindowDisabler *m_windowDisabler;
+};
+
+// ----------------------------------------------------------------------------
+// wxEventLoopActivator: helper class for wxEventLoop implementations
+// ----------------------------------------------------------------------------
+
+// this object sets the wxEventLoop given to the ctor as the currently active
+// one and unsets it in its dtor, this is especially useful in presence of
+// exceptions but is more tidy even when we don't use them
+class wxEventLoopActivator
+{
+public:
+ wxEventLoopActivator(wxEventLoop *evtLoop)
+ {
+ m_evtLoopOld = wxEventLoop::GetActive();
+ wxEventLoop::SetActive(evtLoop);
+ }
+
+ ~wxEventLoopActivator()
+ {
+ // restore the previously active event loop
+ wxEventLoop::SetActive(m_evtLoopOld);
+ }
+
+private:
+ wxEventLoop *m_evtLoopOld;
+};
+
+#if wxABI_VERSION >= 20808
+class wxEventLoopGuarantor
+{
+public:
+ wxEventLoopGuarantor()
+ {
+ m_evtLoopNew = NULL;
+ if (!wxEventLoop::GetActive())
+ {
+ m_evtLoopNew = new wxEventLoop;
+ wxEventLoop::SetActive(m_evtLoopNew);
+ }
+ }
+
+ ~wxEventLoopGuarantor()
+ {
+ if (m_evtLoopNew)
+ {
+ wxEventLoop::SetActive(NULL);
+ delete m_evtLoopNew;
+ }
+ }
+
+private:
+ wxEventLoop *m_evtLoopNew;
+};
+#endif // wxABI_VERSION >= 20805
+
+#endif // _WX_EVTLOOP_H_
diff --git a/3rdparty/wxWidgets/include/wx/except.h b/3rdparty/wxWidgets/include/wx/except.h
new file mode 100644
index 0000000000..9276db65ba
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/except.h
@@ -0,0 +1,30 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/except.h
+// Purpose: C++ exception related stuff
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 17.09.2003
+// RCS-ID: $Id: except.h 27408 2004-05-23 20:53:33Z JS $
+// Copyright: (c) 2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_EXCEPT_H_
+#define _WX_EXCEPT_H_
+
+#include "wx/defs.h"
+
+// ----------------------------------------------------------------------------
+// macros working whether wxUSE_EXCEPTIONS is 0 or 1
+// ----------------------------------------------------------------------------
+
+#if wxUSE_EXCEPTIONS
+ #define wxTRY try
+ #define wxCATCH_ALL(code) catch ( ... ) { code }
+#else // !wxUSE_EXCEPTIONS
+ #define wxTRY
+ #define wxCATCH_ALL(code)
+#endif // wxUSE_EXCEPTIONS/!wxUSE_EXCEPTIONS
+
+#endif // _WX_EXCEPT_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/fdrepdlg.h b/3rdparty/wxWidgets/include/wx/fdrepdlg.h
new file mode 100644
index 0000000000..43e8c4cef4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fdrepdlg.h
@@ -0,0 +1,195 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fdrepdlg.h
+// Purpose: wxFindReplaceDialog class
+// Author: Markus Greither and Vadim Zeitlin
+// Modified by:
+// Created: 23/03/2001
+// RCS-ID:
+// Copyright: (c) Markus Greither
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FINDREPLACEDLG_H_
+#define _WX_FINDREPLACEDLG_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FINDREPLDLG
+
+#include "wx/dialog.h"
+
+class WXDLLIMPEXP_FWD_CORE wxFindDialogEvent;
+class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialog;
+class WXDLLIMPEXP_FWD_CORE wxFindReplaceData;
+class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialogImpl;
+
+// ----------------------------------------------------------------------------
+// Flags for wxFindReplaceData.Flags
+// ----------------------------------------------------------------------------
+
+// flages used by wxFindDialogEvent::GetFlags()
+enum wxFindReplaceFlags
+{
+ // downward search/replace selected (otherwise - upwards)
+ wxFR_DOWN = 1,
+
+ // whole word search/replace selected
+ wxFR_WHOLEWORD = 2,
+
+ // case sensitive search/replace selected (otherwise - case insensitive)
+ wxFR_MATCHCASE = 4
+};
+
+// these flags can be specified in wxFindReplaceDialog ctor or Create()
+enum wxFindReplaceDialogStyles
+{
+ // replace dialog (otherwise find dialog)
+ wxFR_REPLACEDIALOG = 1,
+
+ // don't allow changing the search direction
+ wxFR_NOUPDOWN = 2,
+
+ // don't allow case sensitive searching
+ wxFR_NOMATCHCASE = 4,
+
+ // don't allow whole word searching
+ wxFR_NOWHOLEWORD = 8
+};
+
+// ----------------------------------------------------------------------------
+// wxFindReplaceData: holds Setup Data/Feedback Data for wxFindReplaceDialog
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFindReplaceData : public wxObject
+{
+public:
+ wxFindReplaceData() { Init(); }
+ wxFindReplaceData(wxUint32 flags) { Init(); SetFlags(flags); }
+
+ // accessors
+ const wxString& GetFindString() { return m_FindWhat; }
+ const wxString& GetReplaceString() { return m_ReplaceWith; }
+
+ int GetFlags() const { return m_Flags; }
+
+ // setters: may only be called before showing the dialog, no effect later
+ void SetFlags(wxUint32 flags) { m_Flags = flags; }
+
+ void SetFindString(const wxString& str) { m_FindWhat = str; }
+ void SetReplaceString(const wxString& str) { m_ReplaceWith = str; }
+
+protected:
+ void Init();
+
+private:
+ wxUint32 m_Flags;
+ wxString m_FindWhat,
+ m_ReplaceWith;
+
+ friend class wxFindReplaceDialogBase;
+};
+
+// ----------------------------------------------------------------------------
+// wxFindReplaceDialogBase
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFindReplaceDialogBase : public wxDialog
+{
+public:
+ // ctors and such
+ wxFindReplaceDialogBase() { m_FindReplaceData = NULL; }
+ wxFindReplaceDialogBase(wxWindow * WXUNUSED(parent),
+ wxFindReplaceData *data,
+ const wxString& WXUNUSED(title),
+ int WXUNUSED(style) = 0)
+ {
+ m_FindReplaceData = data;
+ }
+
+ virtual ~wxFindReplaceDialogBase();
+
+ // find dialog data access
+ const wxFindReplaceData *GetData() const { return m_FindReplaceData; }
+ void SetData(wxFindReplaceData *data) { m_FindReplaceData = data; }
+
+ // implementation only, don't use
+ void Send(wxFindDialogEvent& event);
+
+protected:
+ wxFindReplaceData *m_FindReplaceData;
+
+ // the last string we searched for
+ wxString m_lastSearch;
+
+ DECLARE_NO_COPY_CLASS(wxFindReplaceDialogBase)
+};
+
+// include wxFindReplaceDialog declaration
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__WXWINCE__)
+ #include "wx/msw/fdrepdlg.h"
+#else
+ #define wxGenericFindReplaceDialog wxFindReplaceDialog
+
+ #include "wx/generic/fdrepdlg.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// wxFindReplaceDialog events
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFindDialogEvent : public wxCommandEvent
+{
+public:
+ wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
+ : wxCommandEvent(commandType, id) { }
+
+ int GetFlags() const { return GetInt(); }
+ wxString GetFindString() const { return GetString(); }
+ const wxString& GetReplaceString() const { return m_strReplace; }
+
+ wxFindReplaceDialog *GetDialog() const
+ { return wxStaticCast(GetEventObject(), wxFindReplaceDialog); }
+
+ // implementation only
+ void SetFlags(int flags) { SetInt(flags); }
+ void SetFindString(const wxString& str) { SetString(str); }
+ void SetReplaceString(const wxString& str) { m_strReplace = str; }
+
+private:
+ wxString m_strReplace;
+
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxFindDialogEvent)
+};
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND, 510)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_NEXT, 511)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_REPLACE, 512)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_REPLACE_ALL, 513)
+ DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_CLOSE, 514)
+END_DECLARE_EVENT_TYPES()
+
+typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&);
+
+#define wxFindDialogEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFindDialogEventFunction, &func)
+
+#define EVT_FIND(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FIND, id, wxFindDialogEventHandler(fn))
+
+#define EVT_FIND_NEXT(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_NEXT, id, wxFindDialogEventHandler(fn))
+
+#define EVT_FIND_REPLACE(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE, id, wxFindDialogEventHandler(fn))
+
+#define EVT_FIND_REPLACE_ALL(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn))
+
+#define EVT_FIND_CLOSE(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_CLOSE, id, wxFindDialogEventHandler(fn))
+
+#endif // wxUSE_FINDREPLDLG
+
+#endif
+ // _WX_FDREPDLG_H
diff --git a/3rdparty/wxWidgets/include/wx/features.h b/3rdparty/wxWidgets/include/wx/features.h
new file mode 100644
index 0000000000..e9c0554955
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/features.h
@@ -0,0 +1,64 @@
+/**
+* Name: wx/features.h
+* Purpose: test macros for the features which might be available in some
+* wxWidgets ports but not others
+* Author: Vadim Zeitlin
+* Modified by: Ryan Norton (Converted to C)
+* Created: 18.03.02
+* RCS-ID: $Id: features.h 40865 2006-08-27 09:42:42Z VS $
+* Copyright: (c) 2002 Vadim Zeitlin
+* Licence: wxWindows licence
+*/
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+#ifndef _WX_FEATURES_H_
+#define _WX_FEATURES_H_
+
+/* radio menu items are currently not implemented in wxMotif, use this
+ symbol (kept for compatibility from the time when they were not implemented
+ under other platforms as well) to test for this */
+#if !defined(__WXMOTIF__)
+ #define wxHAS_RADIO_MENU_ITEMS
+#else
+ #undef wxHAS_RADIO_MENU_ITEMS
+#endif
+
+/* the raw keyboard codes are generated under wxGTK and wxMSW only */
+#if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__) \
+ || defined(__WXDFB__)
+ #define wxHAS_RAW_KEY_CODES
+#else
+ #undef wxHAS_RAW_KEY_CODES
+#endif
+
+/* taskbar is implemented in the major ports */
+#if defined(__WXMSW__) || defined(__WXCOCOA__) \
+ || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \
+ || defined(__WXMAC_OSX__) || defined(__WXCOCOA__)
+ #define wxHAS_TASK_BAR_ICON
+#else
+ #undef wxHAS_TASK_BAR_ICON
+#endif
+
+/* wxIconLocation appeared in the middle of 2.5.0 so it's handy to have a */
+/* separate define for it */
+#define wxHAS_ICON_LOCATION
+
+/* same for wxCrashReport */
+#ifdef __WXMSW__
+ #define wxHAS_CRASH_REPORT
+#else
+ #undef wxHAS_CRASH_REPORT
+#endif
+
+/* wxRE_ADVANCED is not always available, depending on regex library used
+ * (it's unavailable only if compiling via configure against system library) */
+#ifndef WX_NO_REGEX_ADVANCED
+ #define wxHAS_REGEX_ADVANCED
+#else
+ #undef wxHAS_REGEX_ADVANCED
+#endif
+
+#endif /* _WX_FEATURES_H_ */
+
diff --git a/3rdparty/wxWidgets/include/wx/ffile.h b/3rdparty/wxWidgets/include/wx/ffile.h
new file mode 100644
index 0000000000..c3dda75d4e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/ffile.h
@@ -0,0 +1,115 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/ffile.h
+// Purpose: wxFFile - encapsulates "FILE *" stream
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 14.07.99
+// RCS-ID: $Id: ffile.h 38570 2006-04-05 14:37:47Z VZ $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FFILE_H_
+#define _WX_FFILE_H_
+
+#include "wx/defs.h" // for wxUSE_FFILE
+
+#if wxUSE_FFILE
+
+#include "wx/string.h"
+#include "wx/filefn.h"
+#include "wx/convauto.h"
+
+#include
+
+// ----------------------------------------------------------------------------
+// class wxFFile: standard C stream library IO
+//
+// NB: for space efficiency this class has no virtual functions, including
+// dtor which is _not_ virtual, so it shouldn't be used as a base class.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFFile
+{
+public:
+ // ctors
+ // -----
+ // def ctor
+ wxFFile() { m_fp = NULL; }
+ // open specified file (may fail, use IsOpened())
+ wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
+ // attach to (already opened) file
+ wxFFile(FILE *lfp) { m_fp = lfp; }
+
+ // open/close
+ // open a file (existing or not - the mode controls what happens)
+ bool Open(const wxChar *filename, const wxChar *mode = _T("r"));
+ // closes the opened file (this is a NOP if not opened)
+ bool Close();
+
+ // assign an existing file descriptor and get it back from wxFFile object
+ void Attach(FILE *lfp, const wxString& name = wxEmptyString)
+ { Close(); m_fp = lfp; m_name = name; }
+ void Detach() { m_fp = NULL; }
+ FILE *fp() const { return m_fp; }
+
+ // read/write (unbuffered)
+ // read all data from the file into a string (useful for text files)
+ bool ReadAll(wxString *str, const wxMBConv& conv = wxConvAuto());
+ // returns number of bytes read - use Eof() and Error() to see if an error
+ // occurred or not
+ size_t Read(void *pBuf, size_t nCount);
+ // returns the number of bytes written
+ size_t Write(const void *pBuf, size_t nCount);
+ // returns true on success
+ bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto())
+ {
+ const wxWX2MBbuf buf = s.mb_str(conv);
+ size_t size = strlen(buf);
+ return Write((const char *)buf, size) == size;
+ }
+ // flush data not yet written
+ bool Flush();
+
+ // file pointer operations (return ofsInvalid on failure)
+ // move ptr ofs bytes related to start/current pos/end of file
+ bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
+ // move ptr to ofs bytes before the end
+ bool SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); }
+ // get current position in the file
+ wxFileOffset Tell() const;
+ // get current file length
+ wxFileOffset Length() const;
+
+ // simple accessors: note that Eof() and Error() may only be called if
+ // IsOpened()!
+ // is file opened?
+ bool IsOpened() const { return m_fp != NULL; }
+ // is end of file reached?
+ bool Eof() const { return feof(m_fp) != 0; }
+ // has an error occurred?
+ bool Error() const { return ferror(m_fp) != 0; }
+ // get the file name
+ const wxString& GetName() const { return m_name; }
+ // type such as disk or pipe
+ wxFileKind GetKind() const { return wxGetFileKind(m_fp); }
+
+ // dtor closes the file if opened
+ ~wxFFile() { Close(); }
+
+private:
+ // copy ctor and assignment operator are private because it doesn't make
+ // sense to copy files this way: attempt to do it will provoke a compile-time
+ // error.
+ wxFFile(const wxFFile&);
+ wxFFile& operator=(const wxFFile&);
+
+ FILE *m_fp; // IO stream or NULL if not opened
+
+ wxString m_name; // the name of the file (for diagnostic messages)
+};
+
+#endif // wxUSE_FFILE
+
+#endif // _WX_FFILE_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/file.h b/3rdparty/wxWidgets/include/wx/file.h
new file mode 100644
index 0000000000..1691dc0c4d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/file.h
@@ -0,0 +1,201 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: file.h
+// Purpose: wxFile - encapsulates low-level "file descriptor"
+// wxTempFile - safely replace the old file
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 29/01/98
+// RCS-ID: $Id: file.h 46331 2007-06-05 13:16:11Z JS $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILEH__
+#define _WX_FILEH__
+
+#include "wx/defs.h"
+
+#if wxUSE_FILE
+
+#include "wx/string.h"
+#include "wx/filefn.h"
+#include "wx/strconv.h"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// we redefine these constants here because S_IREAD &c are _not_ standard
+// however, we do assume that the values correspond to the Unix umask bits
+#define wxS_IRUSR 00400
+#define wxS_IWUSR 00200
+#define wxS_IXUSR 00100
+
+#define wxS_IRGRP 00040
+#define wxS_IWGRP 00020
+#define wxS_IXGRP 00010
+
+#define wxS_IROTH 00004
+#define wxS_IWOTH 00002
+#define wxS_IXOTH 00001
+
+// default mode for the new files: corresponds to umask 022
+#define wxS_DEFAULT (wxS_IRUSR | wxS_IWUSR | wxS_IRGRP | wxS_IWGRP |\
+ wxS_IROTH | wxS_IWOTH)
+
+// ----------------------------------------------------------------------------
+// class wxFile: raw file IO
+//
+// NB: for space efficiency this class has no virtual functions, including
+// dtor which is _not_ virtual, so it shouldn't be used as a base class.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFile
+{
+public:
+ // more file constants
+ // -------------------
+ // opening mode
+ enum OpenMode { read, write, read_write, write_append, write_excl };
+ // standard values for file descriptor
+ enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr };
+
+ // static functions
+ // ----------------
+ // check whether a regular file by this name exists
+ static bool Exists(const wxChar *name);
+ // check whether we can access the given file in given mode
+ // (only read and write make sense here)
+ static bool Access(const wxChar *name, OpenMode mode);
+
+ // ctors
+ // -----
+ // def ctor
+ wxFile() { m_fd = fd_invalid; m_error = false; }
+ // open specified file (may fail, use IsOpened())
+ wxFile(const wxChar *szFileName, OpenMode mode = read);
+ // attach to (already opened) file
+ wxFile(int lfd) { m_fd = lfd; m_error = false; }
+
+ // open/close
+ // create a new file (with the default value of bOverwrite, it will fail if
+ // the file already exists, otherwise it will overwrite it and succeed)
+ bool Create(const wxChar *szFileName, bool bOverwrite = false,
+ int access = wxS_DEFAULT);
+ bool Open(const wxChar *szFileName, OpenMode mode = read,
+ int access = wxS_DEFAULT);
+ bool Close(); // Close is a NOP if not opened
+
+ // assign an existing file descriptor and get it back from wxFile object
+ void Attach(int lfd) { Close(); m_fd = lfd; m_error = false; }
+ void Detach() { m_fd = fd_invalid; }
+ int fd() const { return m_fd; }
+
+ // read/write (unbuffered)
+ // returns number of bytes read or wxInvalidOffset on error
+ ssize_t Read(void *pBuf, size_t nCount);
+ // returns the number of bytes written
+ size_t Write(const void *pBuf, size_t nCount);
+ // returns true on success
+ bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8)
+ {
+ const wxWX2MBbuf buf = s.mb_str(conv);
+ if (!buf)
+ return false;
+ size_t size = strlen(buf);
+ return Write((const char *) buf, size) == size;
+ }
+ // flush data not yet written
+ bool Flush();
+
+ // file pointer operations (return wxInvalidOffset on failure)
+ // move ptr ofs bytes related to start/current offset/end of file
+ wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
+ // move ptr to ofs bytes before the end
+ wxFileOffset SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); }
+ // get current offset
+ wxFileOffset Tell() const;
+ // get current file length
+ wxFileOffset Length() const;
+
+ // simple accessors
+ // is file opened?
+ bool IsOpened() const { return m_fd != fd_invalid; }
+ // is end of file reached?
+ bool Eof() const;
+ // has an error occurred?
+ bool Error() const { return m_error; }
+ // type such as disk or pipe
+ wxFileKind GetKind() const { return wxGetFileKind(m_fd); }
+
+ // dtor closes the file if opened
+ ~wxFile() { Close(); }
+
+private:
+ // copy ctor and assignment operator are private because
+ // it doesn't make sense to copy files this way:
+ // attempt to do it will provoke a compile-time error.
+ wxFile(const wxFile&);
+ wxFile& operator=(const wxFile&);
+
+ int m_fd; // file descriptor or INVALID_FD if not opened
+ bool m_error; // error memory
+};
+
+// ----------------------------------------------------------------------------
+// class wxTempFile: if you want to replace another file, create an instance
+// of wxTempFile passing the name of the file to be replaced to the ctor. Then
+// you can write to wxTempFile and call Commit() function to replace the old
+// file (and close this one) or call Discard() to cancel the modification. If
+// you call neither of them, dtor will call Discard().
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxTempFile
+{
+public:
+ // ctors
+ // default
+ wxTempFile() { }
+ // associates the temp file with the file to be replaced and opens it
+ wxTempFile(const wxString& strName);
+
+ // open the temp file (strName is the name of file to be replaced)
+ bool Open(const wxString& strName);
+
+ // is the file opened?
+ bool IsOpened() const { return m_file.IsOpened(); }
+ // get current file length
+ wxFileOffset Length() const { return m_file.Length(); }
+ // move ptr ofs bytes related to start/current offset/end of file
+ wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart)
+ { return m_file.Seek(ofs, mode); }
+ // get current offset
+ wxFileOffset Tell() const { return m_file.Tell(); }
+
+ // I/O (both functions return true on success, false on failure)
+ bool Write(const void *p, size_t n) { return m_file.Write(p, n) == n; }
+ bool Write(const wxString& str, const wxMBConv& conv = wxConvUTF8)
+ { return m_file.Write(str, conv); }
+
+ // different ways to close the file
+ // validate changes and delete the old file of name m_strName
+ bool Commit();
+ // discard changes
+ void Discard();
+
+ // dtor calls Discard() if file is still opened
+ ~wxTempFile();
+
+private:
+ // no copy ctor/assignment operator
+ wxTempFile(const wxTempFile&);
+ wxTempFile& operator=(const wxTempFile&);
+
+ wxString m_strName, // name of the file to replace in Commit()
+ m_strTemp; // temporary file name
+ wxFile m_file; // the temporary file
+};
+
+#endif // wxUSE_FILE
+
+#endif // _WX_FILEH__
diff --git a/3rdparty/wxWidgets/include/wx/fileconf.h b/3rdparty/wxWidgets/include/wx/fileconf.h
new file mode 100644
index 0000000000..0a76ab4c8a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fileconf.h
@@ -0,0 +1,246 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/fileconf.h
+// Purpose: wxFileConfig derivation of wxConfigBase
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 07.04.98 (adapted from appconf.cpp)
+// RCS-ID: $Id: fileconf.h 50711 2007-12-15 02:57:58Z VZ $
+// Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin
+// Ballueder@usa.net
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _FILECONF_H
+#define _FILECONF_H
+
+#include "wx/defs.h"
+
+#if wxUSE_CONFIG
+
+#include "wx/textfile.h"
+#include "wx/string.h"
+#include "wx/confbase.h"
+
+// ----------------------------------------------------------------------------
+// wxFileConfig
+// ----------------------------------------------------------------------------
+
+/*
+ wxFileConfig derives from base Config and implements file based config class,
+ i.e. it uses ASCII disk files to store the information. These files are
+ alternatively called INI, .conf or .rc in the documentation. They are
+ organized in groups or sections, which can nest (i.e. a group contains
+ subgroups, which contain their own subgroups &c). Each group has some
+ number of entries, which are "key = value" pairs. More precisely, the format
+ is:
+
+ # comments are allowed after either ';' or '#' (Win/UNIX standard)
+
+ # blank lines (as above) are ignored
+
+ # global entries are members of special (no name) top group
+ written_for = Windows
+ platform = Linux
+
+ # the start of the group 'Foo'
+ [Foo] # may put comments like this also
+ # following 3 lines are entries
+ key = value
+ another_key = " strings with spaces in the beginning should be quoted, \
+ otherwise the spaces are lost"
+ last_key = but you don't have to put " normally (nor quote them, like here)
+
+ # subgroup of the group 'Foo'
+ # (order is not important, only the name is: separator is '/', as in paths)
+ [Foo/Bar]
+ # entries prefixed with "!" are immutable, i.e. can't be changed if they are
+ # set in the system-wide config file
+ !special_key = value
+ bar_entry = whatever
+
+ [Foo/Bar/Fubar] # depth is (theoretically :-) unlimited
+ # may have the same name as key in another section
+ bar_entry = whatever not
+
+ You have {read/write/delete}Entry functions (guess what they do) and also
+ setCurrentPath to select current group. enum{Subgroups/Entries} allow you
+ to get all entries in the config file (in the current group). Finally,
+ flush() writes immediately all changed entries to disk (otherwise it would
+ be done automatically in dtor)
+
+ wxFileConfig manages not less than 2 config files for each program: global
+ and local (or system and user if you prefer). Entries are read from both of
+ them and the local entries override the global ones unless the latter is
+ immutable (prefixed with '!') in which case a warning message is generated
+ and local value is ignored. Of course, the changes are always written to local
+ file only.
+
+ The names of these files can be specified in a number of ways. First of all,
+ you can use the standard convention: using the ctor which takes 'strAppName'
+ parameter will probably be sufficient for 90% of cases. If, for whatever
+ reason you wish to use the files with some other names, you can always use the
+ second ctor.
+
+ wxFileConfig also may automatically expand the values of environment variables
+ in the entries it reads: for example, if you have an entry
+ score_file = $HOME/.score
+ a call to Read(&str, "score_file") will return a complete path to .score file
+ unless the expansion was previously disabled with SetExpandEnvVars(false) call
+ (it's on by default, the current status can be retrieved with
+ IsExpandingEnvVars function).
+*/
+class WXDLLIMPEXP_FWD_BASE wxFileConfigGroup;
+class WXDLLIMPEXP_FWD_BASE wxFileConfigEntry;
+class WXDLLIMPEXP_FWD_BASE wxFileConfigLineList;
+
+#if wxUSE_STREAMS
+class WXDLLIMPEXP_FWD_BASE wxInputStream;
+class WXDLLIMPEXP_FWD_BASE wxOutputStream;
+#endif // wxUSE_STREAMS
+
+class WXDLLIMPEXP_BASE wxFileConfig : public wxConfigBase
+{
+public:
+ // construct the "standard" full name for global (system-wide) and
+ // local (user-specific) config files from the base file name.
+ //
+ // the following are the filenames returned by this functions:
+ // global local
+ // Unix /etc/file.ext ~/.file
+ // Win %windir%\file.ext %USERPROFILE%\file.ext
+ //
+ // where file is the basename of szFile, ext is its extension
+ // or .conf (Unix) or .ini (Win) if it has none
+ static wxString GetGlobalFileName(const wxChar *szFile);
+ static wxString GetLocalFileName(const wxChar *szFile);
+
+ // ctor & dtor
+ // New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or
+ // wxCONFIG_USE_GLOBAL_FILE to say which files should be used.
+ wxFileConfig(const wxString& appName = wxEmptyString,
+ const wxString& vendorName = wxEmptyString,
+ const wxString& localFilename = wxEmptyString,
+ const wxString& globalFilename = wxEmptyString,
+ long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE,
+ const wxMBConv& conv = wxConvAuto());
+
+#if wxUSE_STREAMS
+ // ctor that takes an input stream.
+ wxFileConfig(wxInputStream &inStream, const wxMBConv& conv = wxConvAuto());
+#endif // wxUSE_STREAMS
+
+ // dtor will save unsaved data
+ virtual ~wxFileConfig();
+
+ // under Unix, set the umask to be used for the file creation, do nothing
+ // under other systems
+#ifdef __UNIX__
+ void SetUmask(int mode) { m_umask = mode; }
+#else // !__UNIX__
+ void SetUmask(int WXUNUSED(mode)) { }
+#endif // __UNIX__/!__UNIX__
+
+ // implement inherited pure virtual functions
+ virtual void SetPath(const wxString& strPath);
+ virtual const wxString& GetPath() const { return m_strPath; }
+
+ virtual bool GetFirstGroup(wxString& str, long& lIndex) const;
+ virtual bool GetNextGroup (wxString& str, long& lIndex) const;
+ virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
+ virtual bool GetNextEntry (wxString& str, long& lIndex) const;
+
+ virtual size_t GetNumberOfEntries(bool bRecursive = false) const;
+ virtual size_t GetNumberOfGroups(bool bRecursive = false) const;
+
+ virtual bool HasGroup(const wxString& strName) const;
+ virtual bool HasEntry(const wxString& strName) const;
+
+ virtual bool Flush(bool bCurrentOnly = false);
+
+ virtual bool RenameEntry(const wxString& oldName, const wxString& newName);
+ virtual bool RenameGroup(const wxString& oldName, const wxString& newName);
+
+ virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso = true);
+ virtual bool DeleteGroup(const wxString& szKey);
+ virtual bool DeleteAll();
+
+ // additional, wxFileConfig-specific, functionality
+#if wxUSE_STREAMS
+ // save the entire config file text to the given stream, note that the text
+ // won't be saved again in dtor when Flush() is called if you use this method
+ // as it won't be "changed" any more
+ virtual bool Save(wxOutputStream& os, const wxMBConv& conv = wxConvAuto());
+#endif // wxUSE_STREAMS
+
+public:
+ // functions to work with this list
+ wxFileConfigLineList *LineListAppend(const wxString& str);
+ wxFileConfigLineList *LineListInsert(const wxString& str,
+ wxFileConfigLineList *pLine); // NULL => Prepend()
+ void LineListRemove(wxFileConfigLineList *pLine);
+ bool LineListIsEmpty();
+
+protected:
+ virtual bool DoReadString(const wxString& key, wxString *pStr) const;
+ virtual bool DoReadLong(const wxString& key, long *pl) const;
+
+ virtual bool DoWriteString(const wxString& key, const wxString& szValue);
+ virtual bool DoWriteLong(const wxString& key, long lValue);
+
+private:
+ // GetXXXFileName helpers: return ('/' terminated) directory names
+ static wxString GetGlobalDir();
+ static wxString GetLocalDir();
+
+ // common part of all ctors (assumes that m_str{Local|Global}File are already
+ // initialized
+ void Init();
+
+ // common part of from dtor and DeleteAll
+ void CleanUp();
+
+ // parse the whole file
+ void Parse(const wxTextBuffer& buffer, bool bLocal);
+
+ // the same as SetPath("/")
+ void SetRootPath();
+
+ // real SetPath() implementation, returns true if path could be set or false
+ // if path doesn't exist and createMissingComponents == false
+ bool DoSetPath(const wxString& strPath, bool createMissingComponents);
+
+ // set/test the dirty flag
+ void SetDirty() { m_isDirty = true; }
+ void ResetDirty() { m_isDirty = false; }
+ bool IsDirty() const { return m_isDirty; }
+
+
+ // member variables
+ // ----------------
+ wxFileConfigLineList *m_linesHead, // head of the linked list
+ *m_linesTail; // tail
+
+ wxString m_strLocalFile, // local file name passed to ctor
+ m_strGlobalFile; // global
+ wxString m_strPath; // current path (not '/' terminated)
+
+ wxFileConfigGroup *m_pRootGroup, // the top (unnamed) group
+ *m_pCurrentGroup; // the current group
+
+ wxMBConv *m_conv;
+
+#ifdef __UNIX__
+ int m_umask; // the umask to use for file creation
+#endif // __UNIX__
+
+ bool m_isDirty; // if true, we have unsaved changes
+
+ DECLARE_NO_COPY_CLASS(wxFileConfig)
+};
+
+#endif
+ // wxUSE_CONFIG
+
+#endif
+ //_FILECONF_H
+
diff --git a/3rdparty/wxWidgets/include/wx/filedlg.h b/3rdparty/wxWidgets/include/wx/filedlg.h
new file mode 100644
index 0000000000..8f3fc48d59
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/filedlg.h
@@ -0,0 +1,226 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/filedlg.h
+// Purpose: wxFileDialog base header
+// Author: Robert Roebling
+// Modified by:
+// Created: 8/17/99
+// Copyright: (c) Robert Roebling
+// RCS-ID: $Id: filedlg.h 44027 2006-12-21 19:26:48Z VZ $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILEDLG_H_BASE_
+#define _WX_FILEDLG_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_FILEDLG
+
+#include "wx/dialog.h"
+#include "wx/arrstr.h"
+
+//----------------------------------------------------------------------------
+// wxFileDialog data
+//----------------------------------------------------------------------------
+
+/*
+ The flags below must coexist with the following flags in m_windowStyle
+ #define wxCAPTION 0x20000000
+ #define wxMAXIMIZE 0x00002000
+ #define wxCLOSE_BOX 0x00001000
+ #define wxSYSTEM_MENU 0x00000800
+ wxBORDER_NONE = 0x00200000
+ #define wxRESIZE_BORDER 0x00000040
+*/
+
+enum
+{
+ wxFD_OPEN = 0x0001,
+ wxFD_SAVE = 0x0002,
+ wxFD_OVERWRITE_PROMPT = 0x0004,
+ wxFD_FILE_MUST_EXIST = 0x0010,
+ wxFD_MULTIPLE = 0x0020,
+ wxFD_CHANGE_DIR = 0x0080,
+ wxFD_PREVIEW = 0x0100
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+enum
+{
+ wxOPEN = wxFD_OPEN,
+ wxSAVE = wxFD_SAVE,
+ wxOVERWRITE_PROMPT = wxFD_OVERWRITE_PROMPT,
+#if WXWIN_COMPATIBILITY_2_4
+ wxHIDE_READONLY = 0x0008,
+#endif
+ wxFILE_MUST_EXIST = wxFD_FILE_MUST_EXIST,
+ wxMULTIPLE = wxFD_MULTIPLE,
+ wxCHANGE_DIR = wxFD_CHANGE_DIR
+};
+#endif
+
+#define wxFD_DEFAULT_STYLE wxFD_OPEN
+
+extern WXDLLEXPORT_DATA(const wxChar) wxFileDialogNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorPromptStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorDefaultWildcardStr[];
+
+//----------------------------------------------------------------------------
+// wxFileDialogBase
+//----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFileDialogBase: public wxDialog
+{
+public:
+ wxFileDialogBase () { Init(); }
+
+ wxFileDialogBase(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = wxFD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxFileDialogNameStr)
+ {
+ Init();
+ Create(parent, message, defaultDir, defaultFile, wildCard, style, pos, sz, name);
+ }
+
+ bool Create(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = wxFD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxFileDialogNameStr);
+
+ bool HasFdFlag(int flag) const { return HasFlag(flag); }
+
+ virtual void SetMessage(const wxString& message) { m_message = message; }
+ virtual void SetPath(const wxString& path) { m_path = path; }
+ virtual void SetDirectory(const wxString& dir) { m_dir = dir; }
+ virtual void SetFilename(const wxString& name) { m_fileName = name; }
+ virtual void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
+ virtual void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
+
+ virtual wxString GetMessage() const { return m_message; }
+ virtual wxString GetPath() const { return m_path; }
+ virtual void GetPaths(wxArrayString& paths) const { paths.Empty(); paths.Add(m_path); }
+ virtual wxString GetDirectory() const { return m_dir; }
+ virtual wxString GetFilename() const { return m_fileName; }
+ virtual void GetFilenames(wxArrayString& files) const { files.Empty(); files.Add(m_fileName); }
+ virtual wxString GetWildcard() const { return m_wildCard; }
+ virtual int GetFilterIndex() const { return m_filterIndex; }
+
+ // Utility functions
+
+#if WXWIN_COMPATIBILITY_2_4
+ // Parses the wildCard, returning the number of filters.
+ // Returns 0 if none or if there's a problem,
+ // The arrays will contain an equal number of items found before the error.
+ // wildCard is in the form:
+ // "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
+ wxDEPRECATED( static int ParseWildcard(const wxString& wildCard,
+ wxArrayString& descriptions,
+ wxArrayString& filters) );
+#endif // WXWIN_COMPATIBILITY_2_4
+
+#if WXWIN_COMPATIBILITY_2_6
+
+ wxDEPRECATED( long GetStyle() const );
+ wxDEPRECATED( void SetStyle(long style) );
+
+#endif // WXWIN_COMPATIBILITY_2_6
+
+
+ // Append first extension to filePath from a ';' separated extensionList
+ // if filePath = "path/foo.bar" just return it as is
+ // if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg"
+ // if the extension is "*.j?g" (has wildcards) or "jpg" then return filePath
+ static wxString AppendExtension(const wxString &filePath,
+ const wxString &extensionList);
+
+protected:
+ wxString m_message;
+ wxString m_dir;
+ wxString m_path; // Full path
+ wxString m_fileName;
+ wxString m_wildCard;
+ int m_filterIndex;
+
+private:
+ void Init();
+ DECLARE_DYNAMIC_CLASS(wxFileDialogBase)
+ DECLARE_NO_COPY_CLASS(wxFileDialogBase)
+};
+
+//----------------------------------------------------------------------------
+// wxFileDialog convenience functions
+//----------------------------------------------------------------------------
+
+// File selector - backward compatibility
+WXDLLEXPORT wxString
+wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
+ const wxChar *default_path = NULL,
+ const wxChar *default_filename = NULL,
+ const wxChar *default_extension = NULL,
+ const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
+ int flags = 0,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord, int y = wxDefaultCoord);
+
+// An extended version of wxFileSelector
+WXDLLEXPORT wxString
+wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
+ const wxChar *default_path = NULL,
+ const wxChar *default_filename = NULL,
+ int *indexDefaultExtension = NULL,
+ const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
+ int flags = 0,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord, int y = wxDefaultCoord);
+
+// Ask for filename to load
+WXDLLEXPORT wxString
+wxLoadFileSelector(const wxChar *what,
+ const wxChar *extension,
+ const wxChar *default_name = (const wxChar *)NULL,
+ wxWindow *parent = (wxWindow *) NULL);
+
+// Ask for filename to save
+WXDLLEXPORT wxString
+wxSaveFileSelector(const wxChar *what,
+ const wxChar *extension,
+ const wxChar *default_name = (const wxChar *) NULL,
+ wxWindow *parent = (wxWindow *) NULL);
+
+
+#if defined (__WXUNIVERSAL__)
+#define wxUSE_GENERIC_FILEDIALOG
+#include "wx/generic/filedlgg.h"
+#elif defined(__WXMSW__)
+#include "wx/msw/filedlg.h"
+#elif defined(__WXMOTIF__)
+#include "wx/motif/filedlg.h"
+#elif defined(__WXGTK24__)
+#include "wx/gtk/filedlg.h" // GTK+ > 2.4 has native version
+#elif defined(__WXGTK20__)
+#define wxUSE_GENERIC_FILEDIALOG
+#include "wx/generic/filedlgg.h"
+#elif defined(__WXGTK__)
+#include "wx/gtk1/filedlg.h"
+#elif defined(__WXMAC__)
+#include "wx/mac/filedlg.h"
+#elif defined(__WXCOCOA__)
+#include "wx/cocoa/filedlg.h"
+#elif defined(__WXPM__)
+#include "wx/os2/filedlg.h"
+#endif
+
+#endif // wxUSE_FILEDLG
+
+#endif // _WX_FILEDLG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/filefn.h b/3rdparty/wxWidgets/include/wx/filefn.h
new file mode 100644
index 0000000000..56c01c7bc4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/filefn.h
@@ -0,0 +1,741 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/filefn.h
+// Purpose: File- and directory-related functions
+// Author: Julian Smart
+// Modified by:
+// Created: 29/01/98
+// RCS-ID: $Id: filefn.h 53877 2008-05-31 12:43:44Z SN $
+// Copyright: (c) 1998 Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _FILEFN_H_
+#define _FILEFN_H_
+
+#include "wx/list.h"
+#include "wx/arrstr.h"
+
+#ifdef __WXWINCE__
+ #include "wx/msw/wince/time.h"
+ #include "wx/msw/private.h"
+#else
+ #include
+#endif
+
+#ifdef __WXWINCE__
+// Nothing
+#elif !defined(__MWERKS__)
+ #include
+ #include
+#else
+ #ifdef __MACH__
+ #include
+ #include
+ #include
+ #include
+ #else
+ #include
+ #include
+ #include
+ #endif
+#endif
+
+#ifdef __OS2__
+// need to check for __OS2__ first since currently both
+// __OS2__ and __UNIX__ are defined.
+ #include
+ #include "wx/os2/private.h"
+ #ifdef __WATCOMC__
+ #include
+ #endif
+ #include
+ #ifdef __EMX__
+ #include
+ #endif
+#elif defined(__UNIX__)
+ #include
+ #include
+#endif
+
+#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
+#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__) && !defined(__WXWINCE__) && !defined(__CYGWIN__)
+ #include
+ #include
+ #include
+#endif // __WINDOWS__
+#endif // native Win compiler
+
+#if defined(__DOS__)
+ #ifdef __WATCOMC__
+ #include
+ #include
+ #include
+ #endif
+ #ifdef __DJGPP__
+ #include
+ #include
+ #endif
+#endif
+
+#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs
+ // this (3.1 I believe) and how to test for it.
+ // If this works for Borland 4.0 as well, then no worries.
+ #include
+#endif
+
+#ifdef __SALFORDC__
+ #include
+ #include
+#endif
+
+#ifndef __WXWINCE__
+ #include // O_RDONLY &c
+#endif
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+#ifdef __WXWINCE__
+ typedef long off_t;
+#else
+ // define off_t
+ #if !defined(__WXMAC__) || defined(__UNIX__) || defined(__MACH__)
+ #include
+ #else
+ typedef long off_t;
+ #endif
+#endif
+
+#if (defined(__VISUALC__) && !defined(__WXWINCE__)) || ( defined(__MWERKS__) && defined( __INTEL__) )
+ typedef _off_t off_t;
+#elif defined(__SYMANTEC__)
+ typedef long off_t;
+#elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__)
+ typedef long off_t;
+#endif
+
+enum wxSeekMode
+{
+ wxFromStart,
+ wxFromCurrent,
+ wxFromEnd
+};
+
+enum wxFileKind
+{
+ wxFILE_KIND_UNKNOWN,
+ wxFILE_KIND_DISK, // a file supporting seeking to arbitrary offsets
+ wxFILE_KIND_TERMINAL, // a tty
+ wxFILE_KIND_PIPE // a pipe
+};
+
+// ----------------------------------------------------------------------------
+// declare our versions of low level file functions: some compilers prepend
+// underscores to the usual names, some also have Unicode versions of them
+// ----------------------------------------------------------------------------
+
+// Wrappers around Win32 api functions like CreateFile, ReadFile and such
+// Implemented in filefnwce.cpp
+#if defined( __WXWINCE__)
+ typedef __int64 wxFileOffset;
+ #define wxFileOffsetFmtSpec _("I64")
+ int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode));
+ int wxAccess(const wxChar *name, int WXUNUSED(how));
+ int wxClose(int fd);
+ int wxFsync(int WXUNUSED(fd));
+ int wxRead(int fd, void *buf, unsigned int count);
+ int wxWrite(int fd, const void *buf, unsigned int count);
+ int wxEof(int fd);
+ wxFileOffset wxSeek(int fd, wxFileOffset offset, int origin);
+ #define wxLSeek wxSeek
+ wxFileOffset wxTell(int fd);
+
+ // always Unicode under WinCE
+ #define wxMkDir _wmkdir
+ #define wxRmDir _wrmdir
+ #define wxStat _wstat
+ #define wxStructStat struct _stat
+#elif (defined(__WXMSW__) || defined(__OS2__)) && !defined(__WXPALMOS__) && \
+ ( \
+ defined(__VISUALC__) || \
+ (defined(__MINGW32__) && !defined(__WINE__) && \
+ wxCHECK_W32API_VERSION(0, 5)) || \
+ defined(__MWERKS__) || \
+ defined(__DMC__) || \
+ defined(__WATCOMC__) || \
+ defined(__BORLANDC__) \
+ )
+
+ #undef wxHAS_HUGE_FILES
+
+ // detect compilers which have support for huge files
+ #if defined(__VISUALC__)
+ #define wxHAS_HUGE_FILES 1
+ #elif defined(__MINGW32__)
+ #define wxHAS_HUGE_FILES 1
+ #elif defined(_LARGE_FILES)
+ #define wxHAS_HUGE_FILES 1
+ #endif
+
+ // other Windows compilers (DMC, Watcom, Metrowerks and Borland) don't have
+ // huge file support (or at least not all functions needed for it by wx)
+ // currently
+
+ #ifdef wxHAS_HUGE_FILES
+ typedef wxLongLong_t wxFileOffset;
+ #define wxFileOffsetFmtSpec wxLongLongFmtSpec
+ #else
+ typedef off_t wxFileOffset;
+ #endif
+
+
+ // functions
+
+ // MSVC and compatible compilers prepend underscores to the POSIX function
+ // names, other compilers don't and even if their later versions usually do
+ // define the versions with underscores for MSVC compatibility, it's better
+ // to avoid using them as they're not present in earlier versions and
+ // always using the native functions spelling is easier than testing for
+ // the versions
+ #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__)
+ #define wxPOSIX_IDENT(func) ::func
+ #else // by default assume MSVC-compatible names
+ #define wxPOSIX_IDENT(func) _ ## func
+ #define wxHAS_UNDERSCORES_IN_POSIX_IDENTS
+ #endif
+
+ // at least Borland 5.5 doesn't like "struct ::stat" so don't use the scope
+ // resolution operator present in wxPOSIX_IDENT for it
+ #ifdef __BORLANDC__
+ #define wxPOSIX_STRUCT(s) struct s
+ #else
+ #define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
+ #endif
+
+ // first functions not working with strings, i.e. without ANSI/Unicode
+ // complications
+ #define wxClose wxPOSIX_IDENT(close)
+
+ #if defined(__MWERKS__)
+ #if __MSL__ >= 0x6000
+ #define wxRead(fd, buf, nCount) _read(fd, (void *)buf, nCount)
+ #define wxWrite(fd, buf, nCount) _write(fd, (void *)buf, nCount)
+ #else
+ #define wxRead(fd, buf, nCount)\
+ _read(fd, (const char *)buf, nCount)
+ #define wxWrite(fd, buf, nCount)\
+ _write(fd, (const char *)buf, nCount)
+ #endif
+ #else // __MWERKS__
+ #define wxRead wxPOSIX_IDENT(read)
+ #define wxWrite wxPOSIX_IDENT(write)
+ #endif
+
+ #ifdef wxHAS_HUGE_FILES
+ #ifndef __MINGW64__
+ #define wxSeek wxPOSIX_IDENT(lseeki64)
+ #define wxLseek wxPOSIX_IDENT(lseeki64)
+ #define wxTell wxPOSIX_IDENT(telli64)
+ #else
+ // unfortunately, mingw-W64 is somewhat inconsistent...
+ #define wxSeek _lseeki64
+ #define wxLseek _lseeki64
+ #define wxTell _telli64
+ #endif
+ #else // !wxHAS_HUGE_FILES
+ #define wxSeek wxPOSIX_IDENT(lseek)
+ #define wxLseek wxPOSIX_IDENT(lseek)
+ #define wxTell wxPOSIX_IDENT(tell)
+ #endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES
+
+ #ifndef __WATCOMC__
+ #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540)
+ // NB: this one is not POSIX and always has the underscore
+ #define wxFsync _commit
+
+ // could be already defined by configure (Cygwin)
+ #ifndef HAVE_FSYNC
+ #define HAVE_FSYNC
+ #endif
+ #endif // BORLANDC
+ #endif
+
+ #define wxEof wxPOSIX_IDENT(eof)
+
+ // then the functions taking strings
+ #if wxUSE_UNICODE
+ #if wxUSE_UNICODE_MSLU
+ // implement the missing file functions in Win9x ourselves
+ #if defined( __VISUALC__ ) \
+ || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
+ || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
+ || ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) ) \
+ || defined(__DMC__)
+
+ WXDLLIMPEXP_BASE int wxMSLU__wopen(const wxChar *name,
+ int flags, int mode);
+ WXDLLIMPEXP_BASE int wxMSLU__waccess(const wxChar *name,
+ int mode);
+ WXDLLIMPEXP_BASE int wxMSLU__wmkdir(const wxChar *name);
+ WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name);
+
+ WXDLLIMPEXP_BASE int
+ wxMSLU__wstat(const wxChar *name, wxPOSIX_STRUCT(stat) *buffer);
+ WXDLLIMPEXP_BASE int
+ wxMSLU__wstati64(const wxChar *name,
+ wxPOSIX_STRUCT(stati64) *buffer);
+ #endif // Windows compilers with MSLU support
+
+ #define wxOpen wxMSLU__wopen
+
+ #define wxAccess wxMSLU__waccess
+ #define wxMkDir wxMSLU__wmkdir
+ #define wxRmDir wxMSLU__wrmdir
+ #ifdef wxHAS_HUGE_FILES
+ #define wxStat wxMSLU__wstati64
+ #else
+ #define wxStat wxMSLU__wstat
+ #endif
+ #else // !wxUSE_UNICODE_MSLU
+ #ifdef __BORLANDC__
+ #if __BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551
+ WXDLLIMPEXP_BASE int wxOpen(const wxChar *pathname,
+ int flags, mode_t mode);
+ #else
+ #define wxOpen _wopen
+ #endif
+ #define wxAccess _waccess
+ #define wxMkDir _wmkdir
+ #define wxRmDir _wrmdir
+ #ifdef wxHAS_HUGE_FILES
+ #define wxStat _wstati64
+ #else
+ #define wxStat _wstat
+ #endif
+ #else
+ #define wxOpen _wopen
+ #define wxAccess _waccess
+ #define wxMkDir _wmkdir
+ #define wxRmDir _wrmdir
+ #ifdef wxHAS_HUGE_FILES
+ #define wxStat _wstati64
+ #else
+ #define wxStat _wstat
+ #endif
+ #endif
+ #endif // wxUSE_UNICODE_MSLU/!wxUSE_UNICODE_MSLU
+ #else // !wxUSE_UNICODE
+ #define wxOpen wxPOSIX_IDENT(open)
+ #define wxAccess wxPOSIX_IDENT(access)
+ #define wxMkDir wxPOSIX_IDENT(mkdir)
+ #define wxRmDir wxPOSIX_IDENT(rmdir)
+ #ifdef wxHAS_HUGE_FILES
+ #define wxStat wxPOSIX_IDENT(stati64)
+ #else
+ // Unfortunately Watcom is not consistent, so:-
+ #if defined(__OS2__) && defined(__WATCOMC__)
+ #define wxStat _stat
+ #else
+ #if defined (__BORLANDC__)
+ #define wxStat _stat //wxPOSIX_IDENT(stat)
+ #else
+ #define wxStat wxPOSIX_IDENT(stat)
+ #endif // !borland
+ #endif // !watcom
+ #endif
+ #endif // wxUSE_UNICODE/!wxUSE_UNICODE
+
+ // Types: Notice that Watcom is the only compiler to have a wide char
+ // version of struct stat as well as a wide char stat function variant.
+ // This was droped since OW 1.4 "for consistency across platforms".
+ #ifdef wxHAS_HUGE_FILES
+ #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
+ #define wxStructStat struct _wstati64
+ #else
+ #define wxStructStat struct _stati64
+ #endif
+ #else
+ #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
+ #define wxStructStat struct _wstat
+ #else
+ #define wxStructStat struct _stat
+ #endif
+ #endif
+
+ // constants (unless already defined by the user code)
+ #ifdef wxHAS_UNDERSCORES_IN_POSIX_IDENTS
+ #ifndef O_RDONLY
+ #define O_RDONLY _O_RDONLY
+ #define O_WRONLY _O_WRONLY
+ #define O_RDWR _O_RDWR
+ #define O_EXCL _O_EXCL
+ #define O_CREAT _O_CREAT
+ #define O_BINARY _O_BINARY
+ #endif
+
+ #ifndef S_IFMT
+ #define S_IFMT _S_IFMT
+ #define S_IFDIR _S_IFDIR
+ #define S_IFREG _S_IFREG
+ #endif
+ #endif // wxHAS_UNDERSCORES_IN_POSIX_IDENTS
+
+ #ifdef wxHAS_HUGE_FILES
+ // wxFile is present and supports large files. Currently wxFFile
+ // doesn't have large file support with any Windows compiler (even
+ // Win64 ones).
+ #if wxUSE_FILE
+ #define wxHAS_LARGE_FILES
+ #endif
+ #endif
+
+ // it's a private define, undefine it so that nobody gets tempted to use it
+ #undef wxHAS_HUGE_FILES
+#else // Unix or Windows using unknown compiler, assume POSIX supported
+ typedef off_t wxFileOffset;
+ #ifdef _LARGE_FILES
+ #define wxFileOffsetFmtSpec wxLongLongFmtSpec
+ wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t),
+ BadFileSizeType );
+ // wxFile is present and supports large files
+ #ifdef wxUSE_FILE
+ #define wxHAS_LARGE_FILES
+ #endif
+ // wxFFile is present and supports large files
+ #if SIZEOF_LONG == 8 || defined HAVE_FSEEKO
+ #define wxHAS_LARGE_FFILES
+ #endif
+ #else
+ #define wxFileOffsetFmtSpec _T("")
+ #endif
+ // functions
+ #define wxClose close
+ #define wxRead ::read
+ #define wxWrite ::write
+ #define wxLseek lseek
+ #define wxSeek lseek
+ #define wxFsync fsync
+ #define wxEof eof
+
+ #define wxMkDir mkdir
+ #define wxRmDir rmdir
+
+ #define wxTell(fd) lseek(fd, 0, SEEK_CUR)
+
+ #define wxStructStat struct stat
+
+ #if wxUSE_UNICODE
+ #define wxNEED_WX_UNISTD_H
+ #if defined(__DMC__)
+ typedef unsigned long mode_t;
+ #endif
+ WXDLLIMPEXP_BASE int wxStat( const wxChar *file_name, wxStructStat *buf );
+ WXDLLIMPEXP_BASE int wxLstat( const wxChar *file_name, wxStructStat *buf );
+ WXDLLIMPEXP_BASE int wxAccess( const wxChar *pathname, int mode );
+ WXDLLIMPEXP_BASE int wxOpen( const wxChar *pathname, int flags, mode_t mode );
+ #else
+ #define wxOpen open
+ #define wxStat stat
+ #define wxLstat lstat
+ #define wxAccess access
+ #endif
+
+ #define wxHAS_NATIVE_LSTAT
+#endif // platforms
+
+#ifdef O_BINARY
+ #define wxO_BINARY O_BINARY
+#else
+ #define wxO_BINARY 0
+#endif
+
+// if the platform doesn't have symlinks, define wxLstat to be the same as
+// wxStat to avoid #ifdefs in the code using it
+#ifndef wxHAS_NATIVE_LSTAT
+ #define wxLstat wxStat
+#endif
+
+#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
+//
+// VisualAge C++ V4.0 cannot have any external linkage const decs
+// in headers included by more than one primary source
+//
+extern const int wxInvalidOffset;
+#else
+const int wxInvalidOffset = -1;
+#endif
+
+// ----------------------------------------------------------------------------
+// functions
+// ----------------------------------------------------------------------------
+WXDLLIMPEXP_BASE bool wxFileExists(const wxString& filename);
+
+// does the path exist? (may have or not '/' or '\\' at the end)
+WXDLLIMPEXP_BASE bool wxDirExists(const wxChar *pszPathName);
+
+WXDLLIMPEXP_BASE bool wxIsAbsolutePath(const wxString& filename);
+
+// Get filename
+WXDLLIMPEXP_BASE wxChar* wxFileNameFromPath(wxChar *path);
+WXDLLIMPEXP_BASE wxString wxFileNameFromPath(const wxString& path);
+
+// Get directory
+WXDLLIMPEXP_BASE wxString wxPathOnly(const wxString& path);
+
+// wxString version
+WXDLLIMPEXP_BASE wxString wxRealPath(const wxString& path);
+
+WXDLLIMPEXP_BASE void wxDos2UnixFilename(wxChar *s);
+
+WXDLLIMPEXP_BASE void wxUnix2DosFilename(wxChar *s);
+
+// Strip the extension, in situ
+WXDLLIMPEXP_BASE void wxStripExtension(wxChar *buffer);
+WXDLLIMPEXP_BASE void wxStripExtension(wxString& buffer);
+
+// Get a temporary filename
+WXDLLIMPEXP_BASE wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL);
+WXDLLIMPEXP_BASE bool wxGetTempFileName(const wxString& prefix, wxString& buf);
+
+// Expand file name (~/ and ${OPENWINHOME}/ stuff)
+WXDLLIMPEXP_BASE wxChar* wxExpandPath(wxChar *dest, const wxChar *path);
+WXDLLIMPEXP_BASE bool wxExpandPath(wxString& dest, const wxChar *path);
+
+// Contract w.r.t environment ( -> ${OPENWINHOME}/lib)
+// and make (if under the home tree) relative to home
+// [caller must copy-- volatile]
+WXDLLIMPEXP_BASE wxChar* wxContractPath(const wxString& filename,
+ const wxString& envname = wxEmptyString,
+ const wxString& user = wxEmptyString);
+
+// Destructive removal of /./ and /../ stuff
+WXDLLIMPEXP_BASE wxChar* wxRealPath(wxChar *path);
+
+// Allocate a copy of the full absolute path
+WXDLLIMPEXP_BASE wxChar* wxCopyAbsolutePath(const wxString& path);
+
+// Get first file name matching given wild card.
+// Flags are reserved for future use.
+#define wxFILE 1
+#define wxDIR 2
+WXDLLIMPEXP_BASE wxString wxFindFirstFile(const wxChar *spec, int flags = wxFILE);
+WXDLLIMPEXP_BASE wxString wxFindNextFile();
+
+// Does the pattern contain wildcards?
+WXDLLIMPEXP_BASE bool wxIsWild(const wxString& pattern);
+
+// Does the pattern match the text (usually a filename)?
+// If dot_special is true, doesn't match * against . (eliminating
+// `hidden' dot files)
+WXDLLIMPEXP_BASE bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = true);
+
+// Concatenate two files to form third
+WXDLLIMPEXP_BASE bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3);
+
+// Copy file1 to file2
+WXDLLIMPEXP_BASE bool wxCopyFile(const wxString& file1, const wxString& file2,
+ bool overwrite = true);
+
+// Remove file
+WXDLLIMPEXP_BASE bool wxRemoveFile(const wxString& file);
+
+// Rename file
+WXDLLIMPEXP_BASE bool wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite = true);
+
+// Get current working directory.
+#if WXWIN_COMPATIBILITY_2_6
+// If buf is NULL, allocates space using new, else
+// copies into buf.
+// IMPORTANT NOTE getcwd is know not to work under some releases
+// of Win32s 1.3, according to MS release notes!
+wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000) );
+// new and preferred version of wxGetWorkingDirectory
+// NB: can't have the same name because of overloading ambiguity
+#endif // WXWIN_COMPATIBILITY_2_6
+WXDLLIMPEXP_BASE wxString wxGetCwd();
+
+// Set working directory
+WXDLLIMPEXP_BASE bool wxSetWorkingDirectory(const wxString& d);
+
+// Make directory
+WXDLLIMPEXP_BASE bool wxMkdir(const wxString& dir, int perm = 0777);
+
+// Remove directory. Flags reserved for future use.
+WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0);
+
+// Return the type of an open file
+WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(int fd);
+WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(FILE *fp);
+
+#if WXWIN_COMPATIBILITY_2_6
+// compatibility defines, don't use in new code
+wxDEPRECATED( inline bool wxPathExists(const wxChar *pszPathName) );
+inline bool wxPathExists(const wxChar *pszPathName)
+{
+ return wxDirExists(pszPathName);
+}
+#endif //WXWIN_COMPATIBILITY_2_6
+
+// permissions; these functions work both on files and directories:
+WXDLLIMPEXP_BASE bool wxIsWritable(const wxString &path);
+WXDLLIMPEXP_BASE bool wxIsReadable(const wxString &path);
+WXDLLIMPEXP_BASE bool wxIsExecutable(const wxString &path);
+
+// ----------------------------------------------------------------------------
+// separators in file names
+// ----------------------------------------------------------------------------
+
+// between file name and extension
+#define wxFILE_SEP_EXT wxT('.')
+
+// between drive/volume name and the path
+#define wxFILE_SEP_DSK wxT(':')
+
+// between the path components
+#define wxFILE_SEP_PATH_DOS wxT('\\')
+#define wxFILE_SEP_PATH_UNIX wxT('/')
+#define wxFILE_SEP_PATH_MAC wxT(':')
+#define wxFILE_SEP_PATH_VMS wxT('.') // VMS also uses '[' and ']'
+
+// separator in the path list (as in PATH environment variable)
+// there is no PATH variable in Classic Mac OS so just use the
+// semicolon (it must be different from the file name separator)
+// NB: these are strings and not characters on purpose!
+#define wxPATH_SEP_DOS wxT(";")
+#define wxPATH_SEP_UNIX wxT(":")
+#define wxPATH_SEP_MAC wxT(";")
+
+// platform independent versions
+#if defined(__UNIX__) && !defined(__OS2__)
+ // CYGWIN also uses UNIX settings
+ #define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
+ #define wxPATH_SEP wxPATH_SEP_UNIX
+#elif defined(__MAC__)
+ #define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
+ #define wxPATH_SEP wxPATH_SEP_MAC
+#else // Windows and OS/2
+ #define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
+ #define wxPATH_SEP wxPATH_SEP_DOS
+#endif // Unix/Windows
+
+// this is useful for wxString::IsSameAs(): to compare two file names use
+// filename1.IsSameAs(filename2, wxARE_FILENAMES_CASE_SENSITIVE)
+#if defined(__UNIX__) && !defined(__DARWIN__) && !defined(__OS2__)
+ #define wxARE_FILENAMES_CASE_SENSITIVE true
+#else // Windows, Mac OS and OS/2
+ #define wxARE_FILENAMES_CASE_SENSITIVE false
+#endif // Unix/Windows
+
+// is the char a path separator?
+inline bool wxIsPathSeparator(wxChar c)
+{
+ // under DOS/Windows we should understand both Unix and DOS file separators
+#if ( defined(__UNIX__) && !defined(__OS2__) )|| defined(__MAC__)
+ return c == wxFILE_SEP_PATH;
+#else
+ return c == wxFILE_SEP_PATH_DOS || c == wxFILE_SEP_PATH_UNIX;
+#endif
+}
+
+// does the string ends with path separator?
+WXDLLIMPEXP_BASE bool wxEndsWithPathSeparator(const wxChar *pszFileName);
+
+// split the full path into path (including drive for DOS), name and extension
+// (understands both '/' and '\\')
+WXDLLIMPEXP_BASE void wxSplitPath(const wxChar *pszFileName,
+ wxString *pstrPath,
+ wxString *pstrName,
+ wxString *pstrExt);
+
+// find a file in a list of directories, returns false if not found
+WXDLLIMPEXP_BASE bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile);
+
+// Get the OS directory if appropriate (such as the Windows directory).
+// On non-Windows platform, probably just return the empty string.
+WXDLLIMPEXP_BASE wxString wxGetOSDirectory();
+
+#if wxUSE_DATETIME
+
+// Get file modification time
+WXDLLIMPEXP_BASE time_t wxFileModificationTime(const wxString& filename);
+
+#endif // wxUSE_DATETIME
+
+// Parses the wildCard, returning the number of filters.
+// Returns 0 if none or if there's a problem,
+// The arrays will contain an equal number of items found before the error.
+// wildCard is in the form:
+// "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
+WXDLLIMPEXP_BASE int wxParseCommonDialogsFilter(const wxString& wildCard, wxArrayString& descriptions, wxArrayString& filters);
+
+// ----------------------------------------------------------------------------
+// classes
+// ----------------------------------------------------------------------------
+
+#ifdef __UNIX__
+
+// set umask to the given value in ctor and reset it to the old one in dtor
+class WXDLLIMPEXP_BASE wxUmaskChanger
+{
+public:
+ // change the umask to the given one if it is not -1: this allows to write
+ // the same code whether you really want to change umask or not, as is in
+ // wxFileConfig::Flush() for example
+ wxUmaskChanger(int umaskNew)
+ {
+ m_umaskOld = umaskNew == -1 ? -1 : (int)umask((mode_t)umaskNew);
+ }
+
+ ~wxUmaskChanger()
+ {
+ if ( m_umaskOld != -1 )
+ umask((mode_t)m_umaskOld);
+ }
+
+private:
+ int m_umaskOld;
+};
+
+// this macro expands to an "anonymous" wxUmaskChanger object under Unix and
+// nothing elsewhere
+#define wxCHANGE_UMASK(m) wxUmaskChanger wxMAKE_UNIQUE_NAME(umaskChanger_)(m)
+
+#else // !__UNIX__
+
+#define wxCHANGE_UMASK(m)
+
+#endif // __UNIX__/!__UNIX__
+
+
+// Path searching
+class WXDLLIMPEXP_BASE wxPathList : public wxArrayString
+{
+public:
+ wxPathList() {}
+ wxPathList(const wxArrayString &arr)
+ { Add(arr); }
+
+ // Adds all paths in environment variable
+ void AddEnvList(const wxString& envVariable);
+
+ // Adds given path to this list
+ bool Add(const wxString& path);
+ void Add(const wxArrayString &paths);
+
+ // Find the first full path for which the file exists
+ wxString FindValidPath(const wxString& filename) const;
+
+ // Find the first full path for which the file exists; ensure it's an
+ // absolute path that gets returned.
+ wxString FindAbsoluteValidPath(const wxString& filename) const;
+
+ // Given full path and filename, add path to list
+ bool EnsureFileAccessible(const wxString& path);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // Returns true if the path is in the list
+ wxDEPRECATED( bool Member(const wxString& path) const );
+#endif
+};
+
+#endif // _WX_FILEFN_H_
diff --git a/3rdparty/wxWidgets/include/wx/filename.h b/3rdparty/wxWidgets/include/wx/filename.h
new file mode 100644
index 0000000000..0a3abb58fb
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/filename.h
@@ -0,0 +1,541 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/filename.h
+// Purpose: wxFileName - encapsulates a file path
+// Author: Robert Roebling, Vadim Zeitlin
+// Modified by:
+// Created: 28.12.00
+// RCS-ID: $Id: filename.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) 2000 Robert Roebling
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILENAME_H_
+#define _WX_FILENAME_H_
+
+/*
+ TODO:
+
+ 1. support for drives under Windows
+ 2. more file operations:
+ a) chmod()
+ b) [acm]time() - get and set
+ c) rename()?
+ 3. SameFileAs() function to compare inodes under Unix
+ */
+
+#include "wx/arrstr.h"
+#include "wx/filefn.h"
+#include "wx/datetime.h"
+#include "wx/intl.h"
+
+#if wxUSE_FILE
+class WXDLLIMPEXP_FWD_BASE wxFile;
+#endif
+
+#if wxUSE_FFILE
+class WXDLLIMPEXP_FWD_BASE wxFFile;
+#endif
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// the various values for the path format: this mainly affects the path
+// separator but also whether or not the path has the drive part (as under
+// Windows)
+enum wxPathFormat
+{
+ wxPATH_NATIVE = 0, // the path format for the current platform
+ wxPATH_UNIX,
+ wxPATH_BEOS = wxPATH_UNIX,
+ wxPATH_MAC,
+ wxPATH_DOS,
+ wxPATH_WIN = wxPATH_DOS,
+ wxPATH_OS2 = wxPATH_DOS,
+ wxPATH_VMS,
+
+ wxPATH_MAX // Not a valid value for specifying path format
+};
+
+// the kind of normalization to do with the file name: these values can be
+// or'd together to perform several operations at once
+enum wxPathNormalize
+{
+ wxPATH_NORM_ENV_VARS = 0x0001, // replace env vars with their values
+ wxPATH_NORM_DOTS = 0x0002, // squeeze all .. and . and prepend cwd
+ wxPATH_NORM_TILDE = 0x0004, // Unix only: replace ~ and ~user
+ wxPATH_NORM_CASE = 0x0008, // if case insensitive => tolower
+ wxPATH_NORM_ABSOLUTE = 0x0010, // make the path absolute
+ wxPATH_NORM_LONG = 0x0020, // make the path the long form
+ wxPATH_NORM_SHORTCUT = 0x0040, // resolve the shortcut, if it is a shortcut
+ wxPATH_NORM_ALL = 0x00ff & ~wxPATH_NORM_CASE
+};
+
+// what exactly should GetPath() return?
+enum
+{
+ wxPATH_GET_VOLUME = 0x0001, // include the volume if applicable
+ wxPATH_GET_SEPARATOR = 0x0002 // terminate the path with the separator
+};
+
+// MkDir flags
+enum
+{
+ wxPATH_MKDIR_FULL = 0x0001 // create directories recursively
+};
+
+// error code of wxFileName::GetSize()
+extern WXDLLIMPEXP_DATA_BASE(wxULongLong) wxInvalidSize;
+
+
+
+// ----------------------------------------------------------------------------
+// wxFileName: encapsulates a file path
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFileName
+{
+public:
+ // constructors and assignment
+
+ // the usual stuff
+ wxFileName() { Clear(); }
+ wxFileName(const wxFileName& filepath) { Assign(filepath); }
+
+ // from a full filename: if it terminates with a '/', a directory path
+ // is contructed (the name will be empty), otherwise a file name and
+ // extension are extracted from it
+ wxFileName( const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE )
+ { Assign( fullpath, format ); }
+
+ // from a directory name and a file name
+ wxFileName(const wxString& path,
+ const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(path, name, format); }
+
+ // from a volume, directory name, file base name and extension
+ wxFileName(const wxString& volume,
+ const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(volume, path, name, ext, format); }
+
+ // from a directory name, file base name and extension
+ wxFileName(const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(path, name, ext, format); }
+
+ // the same for delayed initialization
+
+ void Assign(const wxFileName& filepath);
+
+ void Assign(const wxString& fullpath,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void Assign(const wxString& volume,
+ const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ bool hasExt,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void Assign(const wxString& volume,
+ const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(volume, path, name, ext, !ext.empty(), format); }
+
+ void Assign(const wxString& path,
+ const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void Assign(const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE);
+
+ // assorted assignment operators
+
+ wxFileName& operator=(const wxFileName& filename)
+ { Assign(filename); return *this; }
+
+ wxFileName& operator=(const wxString& filename)
+ { Assign(filename); return *this; }
+
+ // reset all components to default, uninitialized state
+ void Clear();
+
+ // static pseudo constructors
+ static wxFileName FileName(const wxString& file,
+ wxPathFormat format = wxPATH_NATIVE);
+ static wxFileName DirName(const wxString& dir,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ // file tests
+
+ // is the filename valid at all?
+ bool IsOk() const
+ {
+ // we're fine if we have the path or the name or if we're a root dir
+ return m_dirs.size() != 0 || !m_name.empty() || !m_relative ||
+ !m_ext.empty() || m_hasExt;
+ }
+
+ // does the file with this name exists?
+ bool FileExists() const;
+ static bool FileExists( const wxString &file );
+
+ // does the directory with this name exists?
+ bool DirExists() const;
+ static bool DirExists( const wxString &dir );
+
+ // checks on most common flags for files/directories;
+ // more platform-specific features (like e.g. Unix permissions) are not
+ // available in wxFileName
+
+ bool IsDirWritable() const { return wxIsWritable(GetPath()); }
+ static bool IsDirWritable(const wxString &path) { return wxDirExists(path) && wxIsWritable(path); }
+
+ bool IsDirReadable() const { return wxIsReadable(GetPath()); }
+ static bool IsDirReadable(const wxString &path) { return wxDirExists(path) && wxIsReadable(path); }
+
+ // NOTE: IsDirExecutable() is not present because the meaning of "executable"
+ // directory is very platform-dependent and also not so useful
+
+ bool IsFileWritable() const { return wxIsWritable(GetFullPath()); }
+ static bool IsFileWritable(const wxString &path) { return wxFileExists(path) && wxIsWritable(path); }
+
+ bool IsFileReadable() const { return wxIsReadable(GetFullPath()); }
+ static bool IsFileReadable(const wxString &path) { return wxFileExists(path) && wxIsReadable(path); }
+
+ bool IsFileExecutable() const { return wxIsExecutable(GetFullPath()); }
+ static bool IsFileExecutable(const wxString &path) { return wxFileExists(path) && wxIsExecutable(path); }
+
+
+ // time functions
+#if wxUSE_DATETIME
+ // set the file last access/mod and creation times
+ // (any of the pointers may be NULL)
+ bool SetTimes(const wxDateTime *dtAccess,
+ const wxDateTime *dtMod,
+ const wxDateTime *dtCreate);
+
+ // set the access and modification times to the current moment
+ bool Touch();
+
+ // return the last access, last modification and create times
+ // (any of the pointers may be NULL)
+ bool GetTimes(wxDateTime *dtAccess,
+ wxDateTime *dtMod,
+ wxDateTime *dtCreate) const;
+
+ // convenience wrapper: get just the last mod time of the file
+ wxDateTime GetModificationTime() const
+ {
+ wxDateTime dtMod;
+ (void)GetTimes(NULL, &dtMod, NULL);
+ return dtMod;
+ }
+#endif // wxUSE_DATETIME
+
+#ifdef __WXMAC__
+ bool MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) ;
+ bool MacGetTypeAndCreator( wxUint32 *type , wxUint32 *creator ) ;
+ // gets the 'common' type and creator for a certain extension
+ static bool MacFindDefaultTypeAndCreator( const wxString& ext , wxUint32 *type , wxUint32 *creator ) ;
+ // registers application defined extensions and their default type and creator
+ static void MacRegisterDefaultTypeAndCreator( const wxString& ext , wxUint32 type , wxUint32 creator ) ;
+ // looks up the appropriate type and creator from the registration and then sets
+ bool MacSetDefaultTypeAndCreator() ;
+#endif
+
+ // various file/dir operations
+
+ // retrieve the value of the current working directory
+ void AssignCwd(const wxString& volume = wxEmptyString);
+ static wxString GetCwd(const wxString& volume = wxEmptyString);
+
+ // change the current working directory
+ bool SetCwd();
+ static bool SetCwd( const wxString &cwd );
+
+ // get the value of user home (Unix only mainly)
+ void AssignHomeDir();
+ static wxString GetHomeDir();
+
+ // get the system temporary directory
+ static wxString GetTempDir();
+
+#if wxUSE_FILE || wxUSE_FFILE
+ // get a temp file name starting with the specified prefix
+ void AssignTempFileName(const wxString& prefix);
+ static wxString CreateTempFileName(const wxString& prefix);
+#endif // wxUSE_FILE
+
+#if wxUSE_FILE
+ // get a temp file name starting with the specified prefix and open the
+ // file passed to us using this name for writing (atomically if
+ // possible)
+ void AssignTempFileName(const wxString& prefix, wxFile *fileTemp);
+ static wxString CreateTempFileName(const wxString& prefix,
+ wxFile *fileTemp);
+#endif // wxUSE_FILE
+
+#if wxUSE_FFILE
+ // get a temp file name starting with the specified prefix and open the
+ // file passed to us using this name for writing (atomically if
+ // possible)
+ void AssignTempFileName(const wxString& prefix, wxFFile *fileTemp);
+ static wxString CreateTempFileName(const wxString& prefix,
+ wxFFile *fileTemp);
+#endif // wxUSE_FFILE
+
+ // directory creation and removal.
+ bool Mkdir( int perm = 0777, int flags = 0);
+ static bool Mkdir( const wxString &dir, int perm = 0777, int flags = 0 );
+
+ bool Rmdir();
+ static bool Rmdir( const wxString &dir );
+
+ // operations on the path
+
+ // normalize the path: with the default flags value, the path will be
+ // made absolute, without any ".." and "." and all environment
+ // variables will be expanded in it
+ //
+ // this may be done using another (than current) value of cwd
+ bool Normalize(int flags = wxPATH_NORM_ALL,
+ const wxString& cwd = wxEmptyString,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ // get a path path relative to the given base directory, i.e. opposite
+ // of Normalize
+ //
+ // pass an empty string to get a path relative to the working directory
+ //
+ // returns true if the file name was modified, false if we failed to do
+ // anything with it (happens when the file is on a different volume,
+ // for example)
+ bool MakeRelativeTo(const wxString& pathBase = wxEmptyString,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ // make the path absolute
+ //
+ // this may be done using another (than current) value of cwd
+ bool MakeAbsolute(const wxString& cwd = wxEmptyString,
+ wxPathFormat format = wxPATH_NATIVE)
+ { return Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE |
+ wxPATH_NORM_TILDE, cwd, format); }
+
+#if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE
+ // if the path is a shortcut, return the target and optionally,
+ // the arguments
+ bool GetShortcutTarget(const wxString& shortcutPath,
+ wxString& targetFilename,
+ wxString* arguments = NULL);
+#endif
+
+ // Comparison
+
+ // compares with the rules of the given platforms format
+ bool SameAs(const wxFileName& filepath,
+ wxPathFormat format = wxPATH_NATIVE) const;
+
+ // compare with another filename object
+ bool operator==(const wxFileName& filename) const
+ { return SameAs(filename); }
+ bool operator!=(const wxFileName& filename) const
+ { return !SameAs(filename); }
+
+ // compare with a filename string interpreted as a native file name
+ bool operator==(const wxString& filename) const
+ { return SameAs(wxFileName(filename)); }
+ bool operator!=(const wxString& filename) const
+ { return !SameAs(wxFileName(filename)); }
+
+ // are the file names of this type cases sensitive?
+ static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE );
+
+ // is this filename absolute?
+ bool IsAbsolute(wxPathFormat format = wxPATH_NATIVE) const;
+
+ // is this filename relative?
+ bool IsRelative(wxPathFormat format = wxPATH_NATIVE) const
+ { return !IsAbsolute(format); }
+
+ // Returns the characters that aren't allowed in filenames
+ // on the specified platform.
+ static wxString GetForbiddenChars(wxPathFormat format = wxPATH_NATIVE);
+
+ // Information about path format
+
+ // get the string separating the volume from the path for this format,
+ // return an empty string if this format doesn't support the notion of
+ // volumes at all
+ static wxString GetVolumeSeparator(wxPathFormat format = wxPATH_NATIVE);
+
+ // get the string of path separators for this format
+ static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE);
+
+ // get the string of path terminators, i.e. characters which terminate the
+ // path
+ static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE);
+
+ // get the canonical path separator for this format
+ static wxChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
+ { return GetPathSeparators(format)[0u]; }
+
+ // is the char a path separator for this format?
+ static bool IsPathSeparator(wxChar ch, wxPathFormat format = wxPATH_NATIVE);
+
+ // Dir accessors
+ size_t GetDirCount() const { return m_dirs.size(); }
+ void AppendDir(const wxString& dir);
+ void PrependDir(const wxString& dir);
+ void InsertDir(size_t before, const wxString& dir);
+ void RemoveDir(size_t pos);
+ void RemoveLastDir() { RemoveDir(GetDirCount() - 1); }
+
+ // Other accessors
+ void SetExt( const wxString &ext ) { m_ext = ext; m_hasExt = !m_ext.empty(); }
+ void ClearExt() { m_ext = wxEmptyString; m_hasExt = false; }
+ void SetEmptyExt() { m_ext = wxT(""); m_hasExt = true; }
+ wxString GetExt() const { return m_ext; }
+ bool HasExt() const { return m_hasExt; }
+
+ void SetName( const wxString &name ) { m_name = name; }
+ wxString GetName() const { return m_name; }
+ bool HasName() const { return !m_name.empty(); }
+
+ void SetVolume( const wxString &volume ) { m_volume = volume; }
+ wxString GetVolume() const { return m_volume; }
+ bool HasVolume() const { return !m_volume.empty(); }
+
+ // full name is the file name + extension (but without the path)
+ void SetFullName(const wxString& fullname);
+ wxString GetFullName() const;
+
+ const wxArrayString& GetDirs() const { return m_dirs; }
+
+ // flags are combination of wxPATH_GET_XXX flags
+ wxString GetPath(int flags = wxPATH_GET_VOLUME,
+ wxPathFormat format = wxPATH_NATIVE) const;
+
+ // Replace current path with this one
+ void SetPath( const wxString &path, wxPathFormat format = wxPATH_NATIVE );
+
+ // Construct full path with name and ext
+ wxString GetFullPath( wxPathFormat format = wxPATH_NATIVE ) const;
+
+ // Return the short form of the path (returns identity on non-Windows platforms)
+ wxString GetShortPath() const;
+
+ // Return the long form of the path (returns identity on non-Windows platforms)
+ wxString GetLongPath() const;
+
+ // Is this a file or directory (not necessarily an existing one)
+ bool IsDir() const { return m_name.empty() && m_ext.empty(); }
+
+ // various helpers
+
+ // get the canonical path format for this platform
+ static wxPathFormat GetFormat( wxPathFormat format = wxPATH_NATIVE );
+
+ // split a fullpath into the volume, path, (base) name and extension
+ // (all of the pointers can be NULL)
+ static void SplitPath(const wxString& fullpath,
+ wxString *volume,
+ wxString *path,
+ wxString *name,
+ wxString *ext,
+ bool *hasExt = NULL,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ static void SplitPath(const wxString& fullpath,
+ wxString *volume,
+ wxString *path,
+ wxString *name,
+ wxString *ext,
+ wxPathFormat format)
+ {
+ SplitPath(fullpath, volume, path, name, ext, NULL, format);
+ }
+
+ // compatibility version: volume is part of path
+ static void SplitPath(const wxString& fullpath,
+ wxString *path,
+ wxString *name,
+ wxString *ext,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ // split a path into volume and pure path part
+ static void SplitVolume(const wxString& fullpathWithVolume,
+ wxString *volume,
+ wxString *path,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ // Filesize
+
+ // returns the size of the given filename
+ wxULongLong GetSize() const;
+ static wxULongLong GetSize(const wxString &file);
+
+ // returns the size in a human readable form
+ wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(_T("Not available")),
+ int precision = 1) const;
+ static wxString GetHumanReadableSize(const wxULongLong &sz,
+ const wxString &nullsize = wxGetTranslation(_T("Not available")),
+ int precision = 1);
+
+
+ // deprecated methods, don't use any more
+ // --------------------------------------
+
+#ifndef __DIGITALMARS__
+ wxString GetPath( bool withSep, wxPathFormat format = wxPATH_NATIVE ) const
+ { return GetPath(withSep ? wxPATH_GET_SEPARATOR : 0, format); }
+#endif
+ wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const
+ { return GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, format); }
+
+private:
+ // check whether this dir is valid for Append/Prepend/InsertDir()
+ static bool IsValidDirComponent(const wxString& dir);
+
+ // the drive/volume/device specification (always empty for Unix)
+ wxString m_volume;
+
+ // the path components of the file
+ wxArrayString m_dirs;
+
+ // the file name and extension (empty for directories)
+ wxString m_name,
+ m_ext;
+
+ // when m_dirs is empty it may mean either that we have no path at all or
+ // that our path is '/', i.e. the root directory
+ //
+ // we use m_relative to distinguish between these two cases, it will be
+ // true in the former and false in the latter
+ //
+ // NB: the path is not absolute just because m_relative is false, it still
+ // needs the drive (i.e. volume) in some formats (Windows)
+ bool m_relative;
+
+ // when m_ext is empty, it may be because we don't have any extension or
+ // because we have an empty extension
+ //
+ // the difference is important as file with name "foo" and without
+ // extension has full name "foo" while with empty extension it is "foo."
+ bool m_hasExt;
+};
+
+#endif // _WX_FILENAME_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/filepicker.h b/3rdparty/wxWidgets/include/wx/filepicker.h
new file mode 100644
index 0000000000..aad2a4f652
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/filepicker.h
@@ -0,0 +1,398 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/filepicker.h
+// Purpose: wxFilePickerCtrl, wxDirPickerCtrl base header
+// Author: Francesco Montorsi
+// Modified by:
+// Created: 14/4/2006
+// Copyright: (c) Francesco Montorsi
+// RCS-ID: $Id: filepicker.h 49804 2007-11-10 01:09:42Z VZ $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILEDIRPICKER_H_BASE_
+#define _WX_FILEDIRPICKER_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
+
+#include "wx/pickerbase.h"
+
+class WXDLLIMPEXP_FWD_CORE wxDialog;
+class WXDLLIMPEXP_FWD_CORE wxFileDirPickerEvent;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetLabel[];
+extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerCtrlNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorPromptStr[];
+
+extern WXDLLEXPORT_DATA(const wxChar) wxDirPickerWidgetLabel[];
+extern WXDLLEXPORT_DATA(const wxChar) wxDirPickerWidgetNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxDirPickerCtrlNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
+
+
+// ----------------------------------------------------------------------------
+// wxFileDirPickerWidgetBase: a generic abstract interface which must be
+// implemented by controls used by wxFileDirPickerCtrlBase
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxFileDirPickerWidgetBase
+{
+public:
+ wxFileDirPickerWidgetBase() { }
+ virtual ~wxFileDirPickerWidgetBase() { }
+
+ wxString GetPath() const { return m_path; }
+ virtual void SetPath(const wxString &str) { m_path=str; }
+
+ // returns the picker widget cast to wxControl
+ virtual wxControl *AsControl() = 0;
+
+protected:
+ virtual void UpdateDialogPath(wxDialog *) = 0;
+ virtual void UpdatePathFromDialog(wxDialog *) = 0;
+
+ wxString m_path;
+};
+
+// Styles which must be supported by all controls implementing wxFileDirPickerWidgetBase
+// NB: these styles must be defined to carefully-chosen values to
+// avoid conflicts with wxButton's styles
+
+#define wxFLP_OPEN 0x0400
+#define wxFLP_SAVE 0x0800
+#define wxFLP_OVERWRITE_PROMPT 0x1000
+#define wxFLP_FILE_MUST_EXIST 0x2000
+#define wxFLP_CHANGE_DIR 0x4000
+
+// NOTE: wxMULTIPLE is not supported !
+
+
+#define wxDIRP_DIR_MUST_EXIST 0x0008
+#define wxDIRP_CHANGE_DIR 0x0010
+
+
+// map platform-dependent controls which implement the wxFileDirPickerWidgetBase
+// under the name "wxFilePickerWidget" and "wxDirPickerWidget".
+// NOTE: wxFileDirPickerCtrlBase will allocate a wx{File|Dir}PickerWidget and this
+// requires that all classes being mapped as wx{File|Dir}PickerWidget have the
+// same prototype for the contructor...
+// since GTK >= 2.6, there is GtkFileButton
+#if defined(__WXGTK26__) && !defined(__WXUNIVERSAL__)
+ #include "wx/gtk/filepicker.h"
+ #define wxFilePickerWidget wxFileButton
+ #define wxDirPickerWidget wxDirButton
+#else
+ #include "wx/generic/filepickerg.h"
+ #define wxFilePickerWidget wxGenericFileButton
+ #define wxDirPickerWidget wxGenericDirButton
+#endif
+
+
+
+// ----------------------------------------------------------------------------
+// wxFileDirPickerCtrlBase
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxFileDirPickerCtrlBase : public wxPickerBase
+{
+public:
+ wxFileDirPickerCtrlBase() : m_bIgnoreNextTextCtrlUpdate(false) {}
+
+protected:
+ // NB: no default values since this function will never be used
+ // directly by the user and derived classes wouldn't use them
+ bool CreateBase(wxWindow *parent,
+ wxWindowID id,
+ const wxString& path,
+ const wxString &message,
+ const wxString &wildcard,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name);
+
+public: // public API
+
+ wxString GetPath() const;
+ void SetPath(const wxString &str);
+
+public: // internal functions
+
+ void UpdatePickerFromTextCtrl();
+ void UpdateTextCtrlFromPicker();
+
+ // event handler for our picker
+ void OnFileDirChange(wxFileDirPickerEvent &);
+
+ // Returns TRUE if the current path is a valid one
+ // (i.e. a valid file for a wxFilePickerWidget or a valid
+ // folder for a wxDirPickerWidget).
+ virtual bool CheckPath(const wxString &str) const = 0;
+
+ // TRUE if any textctrl change should update the current working directory
+ virtual bool IsCwdToUpdate() const = 0;
+
+ // Returns the event type sent by this picker
+ virtual wxEventType GetEventType() const = 0;
+
+ // Returns the filtered value currently placed in the text control (if present).
+ virtual wxString GetTextCtrlValue() const = 0;
+
+protected:
+ // creates the picker control
+ virtual
+ wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent,
+ const wxString& path,
+ const wxString& message,
+ const wxString& wildcard) = 0;
+
+protected:
+
+ // true if the next UpdateTextCtrl() call is to ignore
+ bool m_bIgnoreNextTextCtrlUpdate;
+
+ // m_picker object as wxFileDirPickerWidgetBase interface
+ wxFileDirPickerWidgetBase *m_pickerIface;
+};
+
+#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
+
+
+#if wxUSE_FILEPICKERCTRL
+
+// ----------------------------------------------------------------------------
+// wxFilePickerCtrl: platform-independent class which embeds the
+// platform-dependent wxFilePickerWidget and, if wxFLP_USE_TEXTCTRL style is
+// used, a textctrl next to it.
+// ----------------------------------------------------------------------------
+
+#define wxFLP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+
+#ifdef __WXGTK__
+ // GTK apps usually don't have a textctrl next to the picker
+ #define wxFLP_DEFAULT_STYLE (wxFLP_OPEN|wxFLP_FILE_MUST_EXIST)
+#else
+ #define wxFLP_DEFAULT_STYLE (wxFLP_USE_TEXTCTRL|wxFLP_OPEN|wxFLP_FILE_MUST_EXIST)
+#endif
+
+class WXDLLIMPEXP_CORE wxFilePickerCtrl : public wxFileDirPickerCtrlBase
+{
+public:
+ wxFilePickerCtrl() {}
+
+ wxFilePickerCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxString& path = wxEmptyString,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFLP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFilePickerCtrlNameStr)
+ {
+ Create(parent, id, path, message, wildcard, pos, size, style,
+ validator, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& path = wxEmptyString,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFLP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFilePickerCtrlNameStr)
+ {
+ return wxFileDirPickerCtrlBase::CreateBase(parent, id, path,
+ message, wildcard,
+ pos, size, style,
+ validator, name);
+ }
+
+
+public: // overrides
+
+ // return true if the given path is valid for this control
+ bool CheckPath(const wxString& path) const;
+
+ // return the text control value in canonical form
+ wxString GetTextCtrlValue() const;
+
+ bool IsCwdToUpdate() const
+ { return HasFlag(wxFLP_CHANGE_DIR); }
+
+ wxEventType GetEventType() const
+ { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
+
+protected:
+ wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent,
+ const wxString& path,
+ const wxString& message,
+ const wxString& wildcard)
+ {
+ return new wxFilePickerWidget(parent, wxID_ANY,
+ wxFilePickerWidgetLabel,
+ path, message, wildcard,
+ wxDefaultPosition, wxDefaultSize,
+ GetPickerStyle(GetWindowStyle()));
+ }
+
+ // extracts the style for our picker from wxFileDirPickerCtrlBase's style
+ long GetPickerStyle(long style) const
+ {
+ return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
+ wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR));
+ }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxFilePickerCtrl)
+};
+
+#endif // wxUSE_FILEPICKERCTRL
+
+
+#if wxUSE_DIRPICKERCTRL
+
+// ----------------------------------------------------------------------------
+// wxDirPickerCtrl: platform-independent class which embeds the
+// platform-dependent wxDirPickerWidget and eventually a textctrl
+// (see wxDIRP_USE_TEXTCTRL) next to it.
+// ----------------------------------------------------------------------------
+
+#define wxDIRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+
+#ifdef __WXGTK__
+ // GTK apps usually don't have a textctrl next to the picker
+ #define wxDIRP_DEFAULT_STYLE (wxDIRP_DIR_MUST_EXIST)
+#else
+ #define wxDIRP_DEFAULT_STYLE (wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST)
+#endif
+
+class WXDLLIMPEXP_CORE wxDirPickerCtrl : public wxFileDirPickerCtrlBase
+{
+public:
+ wxDirPickerCtrl() {}
+
+ wxDirPickerCtrl(wxWindow *parent, wxWindowID id,
+ const wxString& path = wxEmptyString,
+ const wxString& message = wxDirSelectorPromptStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDIRP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDirPickerCtrlNameStr)
+ {
+ Create(parent, id, path, message, pos, size, style, validator, name);
+ }
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxString& path = wxEmptyString,
+ const wxString& message = wxDirSelectorPromptStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDIRP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDirPickerCtrlNameStr)
+ {
+ return wxFileDirPickerCtrlBase::CreateBase
+ (
+ parent, id, path, message, wxEmptyString,
+ pos, size, style, validator, name
+ );
+ }
+
+
+public: // overrides
+
+ bool CheckPath(const wxString &path) const;
+
+ wxString GetTextCtrlValue() const;
+
+ bool IsCwdToUpdate() const
+ { return HasFlag(wxDIRP_CHANGE_DIR); }
+
+ wxEventType GetEventType() const
+ { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
+
+protected:
+ wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent,
+ const wxString& path,
+ const wxString& message,
+ const wxString& WXUNUSED(wildcard))
+ {
+ return new wxDirPickerWidget(parent, wxID_ANY, wxDirPickerWidgetLabel,
+ path, message,
+ wxDefaultPosition, wxDefaultSize,
+ GetPickerStyle(GetWindowStyle()));
+ }
+
+ // extracts the style for our picker from wxFileDirPickerCtrlBase's style
+ long GetPickerStyle(long style) const
+ { return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR)); }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxDirPickerCtrl)
+};
+
+#endif // wxUSE_DIRPICKERCTRL
+
+
+#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
+
+// ----------------------------------------------------------------------------
+// wxFileDirPickerEvent: used by wxFilePickerCtrl and wxDirPickerCtrl only
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, 1102)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, 1103)
+END_DECLARE_EVENT_TYPES()
+
+class WXDLLIMPEXP_CORE wxFileDirPickerEvent : public wxCommandEvent
+{
+public:
+ wxFileDirPickerEvent() {}
+ wxFileDirPickerEvent(wxEventType type, wxObject *generator, int id, const wxString &path)
+ : wxCommandEvent(type, id),
+ m_path(path)
+ {
+ SetEventObject(generator);
+ }
+
+ wxString GetPath() const { return m_path; }
+ void SetPath(const wxString &p) { m_path = p; }
+
+ // default copy ctor, assignment operator and dtor are ok
+ virtual wxEvent *Clone() const { return new wxFileDirPickerEvent(*this); }
+
+private:
+ wxString m_path;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileDirPickerEvent)
+};
+
+// ----------------------------------------------------------------------------
+// event types and macros
+// ----------------------------------------------------------------------------
+
+typedef void (wxEvtHandler::*wxFileDirPickerEventFunction)(wxFileDirPickerEvent&);
+
+#define wxFileDirPickerEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFileDirPickerEventFunction, &func)
+
+#define EVT_FILEPICKER_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn))
+#define EVT_DIRPICKER_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn))
+
+
+#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
+
+#endif // _WX_FILEDIRPICKER_H_BASE_
+
diff --git a/3rdparty/wxWidgets/include/wx/filesys.h b/3rdparty/wxWidgets/include/wx/filesys.h
new file mode 100644
index 0000000000..7d1ad27e82
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/filesys.h
@@ -0,0 +1,300 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/filesys.h
+// Purpose: class for opening files - virtual file system
+// Author: Vaclav Slavik
+// Copyright: (c) 1999 Vaclav Slavik
+// RCS-ID: $Id: filesys.h 53135 2008-04-12 02:31:04Z VZ $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __FILESYS_H__
+#define __FILESYS_H__
+
+#include "wx/defs.h"
+
+#if !wxUSE_STREAMS
+#error You cannot compile virtual file systems without wxUSE_STREAMS
+#endif
+
+#if wxUSE_HTML && !wxUSE_FILESYSTEM
+#error You cannot compile wxHTML without virtual file systems
+#endif
+
+#if wxUSE_FILESYSTEM
+
+#include "wx/stream.h"
+#include "wx/datetime.h"
+#include "wx/filename.h"
+#include "wx/hashmap.h"
+
+class WXDLLIMPEXP_FWD_BASE wxFSFile;
+class WXDLLIMPEXP_FWD_BASE wxFileSystemHandler;
+class WXDLLIMPEXP_FWD_BASE wxFileSystem;
+
+//--------------------------------------------------------------------------------
+// wxFSFile
+// This class is a file opened using wxFileSystem. It consists of
+// input stream, location, mime type & optional anchor
+// (in 'index.htm#chapter2', 'chapter2' is anchor)
+//--------------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFSFile : public wxObject
+{
+public:
+ wxFSFile(wxInputStream *stream, const wxString& loc,
+ const wxString& mimetype, const wxString& anchor
+#if wxUSE_DATETIME
+ , wxDateTime modif
+#endif // wxUSE_DATETIME
+ )
+ {
+ m_Stream = stream;
+ m_Location = loc;
+ m_MimeType = mimetype; m_MimeType.MakeLower();
+ m_Anchor = anchor;
+#if wxUSE_DATETIME
+ m_Modif = modif;
+#endif // wxUSE_DATETIME
+ }
+
+ virtual ~wxFSFile() { delete m_Stream; }
+
+ // returns stream. This doesn't give away ownership of the stream object.
+ wxInputStream *GetStream() const { return m_Stream; }
+
+ // gives away the ownership of the current stream.
+ wxInputStream *DetachStream()
+ {
+ wxInputStream *stream = m_Stream;
+ m_Stream = NULL;
+ return stream;
+ }
+
+ // deletes the current stream and takes ownership of another.
+ void SetStream(wxInputStream *stream)
+ {
+ delete m_Stream;
+ m_Stream = stream;
+ }
+
+ // returns file's mime type
+ const wxString& GetMimeType() const { return m_MimeType; }
+
+ // returns the original location (aka filename) of the file
+ const wxString& GetLocation() const { return m_Location; }
+
+ const wxString& GetAnchor() const { return m_Anchor; }
+
+#if wxUSE_DATETIME
+ wxDateTime GetModificationTime() const { return m_Modif; }
+#endif // wxUSE_DATETIME
+
+private:
+ wxInputStream *m_Stream;
+ wxString m_Location;
+ wxString m_MimeType;
+ wxString m_Anchor;
+#if wxUSE_DATETIME
+ wxDateTime m_Modif;
+#endif // wxUSE_DATETIME
+
+ DECLARE_ABSTRACT_CLASS(wxFSFile)
+ DECLARE_NO_COPY_CLASS(wxFSFile)
+};
+
+
+
+
+
+//--------------------------------------------------------------------------------
+// wxFileSystemHandler
+// This class is FS handler for wxFileSystem. It provides
+// interface to access certain
+// kinds of files (HTPP, FTP, local, tar.gz etc..)
+//--------------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFileSystemHandler : public wxObject
+{
+public:
+ wxFileSystemHandler() : wxObject() {}
+
+ // returns true if this handler is able to open given location
+ virtual bool CanOpen(const wxString& location) = 0;
+
+ // opens given file and returns pointer to input stream.
+ // Returns NULL if opening failed.
+ // The location is always absolute path.
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) = 0;
+
+ // Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
+ // the query to directories or wxFILE for files only or 0 for either.
+ // Returns filename or empty string if no more matching file exists
+ virtual wxString FindFirst(const wxString& spec, int flags = 0);
+ virtual wxString FindNext();
+
+protected:
+ // returns protocol ("file", "http", "tar" etc.) The last (most right)
+ // protocol is used:
+ // {it returns "tar" for "file:subdir/archive.tar.gz#tar:/README.txt"}
+ wxString GetProtocol(const wxString& location) const;
+
+ // returns left part of address:
+ // {it returns "file:subdir/archive.tar.gz" for "file:subdir/archive.tar.gz#tar:/README.txt"}
+ wxString GetLeftLocation(const wxString& location) const;
+
+ // returns anchor part of address:
+ // {it returns "anchor" for "file:subdir/archive.tar.gz#tar:/README.txt#anchor"}
+ // NOTE: anchor is NOT a part of GetLeftLocation()'s return value
+ wxString GetAnchor(const wxString& location) const;
+
+ // returns right part of address:
+ // {it returns "/README.txt" for "file:subdir/archive.tar.gz#tar:/README.txt"}
+ wxString GetRightLocation(const wxString& location) const;
+
+ // Returns MIME type of the file - w/o need to open it
+ // (default behaviour is that it returns type based on extension)
+ wxString GetMimeTypeFromExt(const wxString& location);
+
+ DECLARE_ABSTRACT_CLASS(wxFileSystemHandler)
+};
+
+
+
+
+//--------------------------------------------------------------------------------
+// wxFileSystem
+// This class provides simple interface for opening various
+// kinds of files (HTPP, FTP, local, tar.gz etc..)
+//--------------------------------------------------------------------------------
+
+// Open Bit Flags
+enum {
+ wxFS_READ = 1, // Open for reading
+ wxFS_SEEKABLE = 4 // Returned stream will be seekable
+};
+
+WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL(wxFileSystemHandler*, wxFSHandlerHash, class WXDLLIMPEXP_BASE);
+
+class WXDLLIMPEXP_BASE wxFileSystem : public wxObject
+{
+public:
+ wxFileSystem() : wxObject() { m_FindFileHandler = NULL;}
+ virtual ~wxFileSystem();
+
+ // sets the current location. Every call to OpenFile is
+ // relative to this location.
+ // NOTE !!
+ // unless is_dir = true 'location' is *not* the directory but
+ // file contained in this directory
+ // (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/")
+ void ChangePathTo(const wxString& location, bool is_dir = false);
+
+ wxString GetPath() const {return m_Path;}
+
+ // opens given file and returns pointer to input stream.
+ // Returns NULL if opening failed.
+ // It first tries to open the file in relative scope
+ // (based on ChangePathTo()'s value) and then as an absolute
+ // path.
+ wxFSFile* OpenFile(const wxString& location, int flags = wxFS_READ);
+
+ // Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
+ // the query to directories or wxFILE for files only or 0 for either.
+ // Returns filename or empty string if no more matching file exists
+ wxString FindFirst(const wxString& spec, int flags = 0);
+ wxString FindNext();
+
+ // find a file in a list of directories, returns false if not found
+ bool FindFileInPath(wxString *pStr, const wxChar *path, const wxChar *file);
+
+ // Adds FS handler.
+ // In fact, this class is only front-end to the FS handlers :-)
+ static void AddHandler(wxFileSystemHandler *handler);
+
+ // Removes FS handler
+ static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler);
+
+ // Returns true if there is a handler which can open the given location.
+ static bool HasHandlerForPath(const wxString& location);
+
+ // remove all items from the m_Handlers list
+ static void CleanUpHandlers();
+
+ // Returns the native path for a file URL
+ static wxFileName URLToFileName(const wxString& url);
+
+ // Returns the file URL for a native path
+ static wxString FileNameToURL(const wxFileName& filename);
+
+
+protected:
+ wxFileSystemHandler *MakeLocal(wxFileSystemHandler *h);
+
+ wxString m_Path;
+ // the path (location) we are currently in
+ // this is path, not file!
+ // (so if you opened test/demo.htm, it is
+ // "test/", not "test/demo.htm")
+ wxString m_LastName;
+ // name of last opened file (full path)
+ static wxList m_Handlers;
+ // list of FS handlers
+ wxFileSystemHandler *m_FindFileHandler;
+ // handler that succeed in FindFirst query
+ wxFSHandlerHash m_LocalHandlers;
+ // Handlers local to this instance
+
+ DECLARE_DYNAMIC_CLASS(wxFileSystem)
+ DECLARE_NO_COPY_CLASS(wxFileSystem)
+};
+
+
+/*
+
+'location' syntax:
+
+To determine FS type, we're using standard KDE notation:
+file:/absolute/path/file.htm
+file:relative_path/xxxxx.html
+/some/path/x.file ('file:' is default)
+http://www.gnome.org
+file:subdir/archive.tar.gz#tar:/README.txt
+
+special characters :
+ ':' - FS identificator is before this char
+ '#' - separator. It can be either HTML anchor ("index.html#news")
+ (in case there is no ':' in the string to the right from it)
+ or FS separator
+ (example : http://www.wxhtml.org/wxhtml-0.1.tar.gz#tar:/include/wxhtml/filesys.h"
+ this would access tgz archive stored on web)
+ '/' - directory (path) separator. It is used to determine upper-level path.
+ HEY! Don't use \ even if you're on Windows!
+
+*/
+
+
+class WXDLLIMPEXP_BASE wxLocalFSHandler : public wxFileSystemHandler
+{
+public:
+ virtual bool CanOpen(const wxString& location);
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
+ virtual wxString FindFirst(const wxString& spec, int flags = 0);
+ virtual wxString FindNext();
+
+ // wxLocalFSHandler will prefix all filenames with 'root' before accessing
+ // files on disk. This effectively makes 'root' the top-level directory
+ // and prevents access to files outside this directory.
+ // (This is similar to Unix command 'chroot'.)
+ static void Chroot(const wxString& root) { ms_root = root; }
+
+protected:
+ static wxString ms_root;
+};
+
+
+
+#endif
+ // wxUSE_FILESYSTEM
+
+#endif
+ // __FILESYS_H__
diff --git a/3rdparty/wxWidgets/include/wx/flags.h b/3rdparty/wxWidgets/include/wx/flags.h
new file mode 100644
index 0000000000..a266e4dde3
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/flags.h
@@ -0,0 +1,165 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/flags.h
+// Purpose: a bitset suited for replacing the current style flags
+// Author: Stefan Csomor
+// Modified by:
+// Created: 27/07/03
+// RCS-ID: $Id: flags.h 35650 2005-09-23 12:56:45Z MR $
+// Copyright: (c) 2003 Stefan Csomor
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_SETH__
+#define _WX_SETH__
+
+// wxBitset should be applied to an enum, then this can be used like
+// bitwise operators but keeps the type safety and information, the
+// enums must be in a sequence , their value determines the bit position
+// that they represent
+// The api is made as close as possible to
+
+template class wxBitset
+{
+ friend class wxEnumData ;
+public:
+ // creates a wxBitset<> object with all flags initialized to 0
+ wxBitset() { m_data = 0; }
+
+ // created a wxBitset<> object initialized according to the bits of the
+ // integral value val
+ wxBitset(unsigned long val) { m_data = val ; }
+
+ // copies the content in the new wxBitset<> object from another one
+ wxBitset(const wxBitset &src) { m_data = src.m_data; }
+
+ // creates a wxBitset<> object that has the specific flag set
+ wxBitset(const T el) { m_data |= 1 << el; }
+
+ // returns the integral value that the bits of this object represent
+ unsigned long to_ulong() const { return m_data ; }
+
+ // assignment
+ wxBitset &operator =(const wxBitset &rhs)
+ {
+ m_data = rhs.m_data;
+ return *this;
+ }
+
+ // bitwise or operator, sets all bits that are in rhs and leaves
+ // the rest unchanged
+ wxBitset &operator |=(const wxBitset &rhs)
+ {
+ m_data |= rhs.m_data;
+ return *this;
+ }
+
+ // bitwsie exclusive-or operator, toggles the value of all bits
+ // that are set in bits and leaves all others unchanged
+ wxBitset &operator ^=(const wxBitset &rhs) // difference
+ {
+ m_data ^= rhs.m_data;
+ return *this;
+ }
+
+ // bitwise and operator, resets all bits that are not in rhs and leaves
+ // all others unchanged
+ wxBitset &operator &=(const wxBitset &rhs) // intersection
+ {
+ m_data &= rhs.m_data;
+ return *this;
+ }
+
+ // bitwise or operator, returns a new bitset that has all bits set that set are in
+ // bitset2 or in this bitset
+ wxBitset operator |(const wxBitset &bitset2) const // union
+ {
+ wxBitset s;
+ s.m_data = m_data | bitset2.m_data;
+ return s;
+ }
+
+ // bitwise exclusive-or operator, returns a new bitset that has all bits set that are set either in
+ // bitset2 or in this bitset but not in both
+ wxBitset operator ^(const wxBitset &bitset2) const // difference
+ {
+ wxBitset s;
+ s.m_data = m_data ^ bitset2.m_data;
+ return s;
+ }
+
+ // bitwise and operator, returns a new bitset that has all bits set that are set both in
+ // bitset2 and in this bitset
+ wxBitset operator &(const wxBitset &bitset2) const // intersection
+ {
+ wxBitset s;
+ s.m_data = m_data & bitset2.m_data;
+ return s;
+ }
+
+ // sets appropriate the bit to true
+ wxBitset& set(const T el) //Add element
+ {
+ m_data |= 1 << el;
+ return *this;
+ }
+
+ // clears the appropriate flag to false
+ wxBitset& reset(const T el) //remove element
+ {
+ m_data &= ~(1 << el);
+ return *this;
+ }
+
+ // clear all flags
+ wxBitset& reset()
+ {
+ m_data = 0;
+ return *this;
+ }
+
+ // true if this flag is set
+ bool test(const T el) const
+ {
+ return (m_data & (1 << el)) ? true : false;
+ }
+
+ // true if no flag is set
+ bool none() const
+ {
+ return m_data == 0;
+ }
+
+ // true if any flag is set
+ bool any() const
+ {
+ return m_data != 0;
+ }
+
+ // true if both have the same flags
+ bool operator ==(const wxBitset &rhs) const
+ {
+ return m_data == rhs.m_data;
+ }
+
+ // true if both differ in their flags set
+ bool operator !=(const wxBitset &rhs) const
+ {
+ return !operator==(rhs);
+ }
+
+ bool operator[] (const T el) const { return test(el) ; }
+
+private :
+ unsigned long m_data;
+};
+
+#define WX_DEFINE_FLAGS( flags ) \
+ class WXDLLEXPORT flags \
+ {\
+ public : \
+ flags(long data=0) :m_data(data) {} \
+ long m_data ;\
+ bool operator ==(const flags &rhs) const { return m_data == rhs.m_data; }\
+ } ;
+
+#endif
diff --git a/3rdparty/wxWidgets/include/wx/fmappriv.h b/3rdparty/wxWidgets/include/wx/fmappriv.h
new file mode 100644
index 0000000000..06cf2cdb2c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fmappriv.h
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/fmappriv.h
+// Purpose: private wxFontMapper stuff, not to be used by the library users
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 21.06.2003 (extracted from common/fontmap.cpp)
+// RCS-ID: $Id: fmappriv.h 27454 2004-05-26 10:49:43Z JS $
+// Copyright: (c) 1999-2003 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FMAPPRIV_H_
+#define _WX_FMAPPRIV_H_
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// a special pseudo encoding which means "don't ask me about this charset
+// any more" -- we need it to avoid driving the user crazy with asking him
+// time after time about the same charset which he [presumably] doesn't
+// have the fonts for
+enum { wxFONTENCODING_UNKNOWN = -2 };
+
+// the config paths we use
+#if wxUSE_CONFIG
+
+#define FONTMAPPER_ROOT_PATH wxT("/wxWindows/FontMapper")
+#define FONTMAPPER_CHARSET_PATH wxT("Charsets")
+#define FONTMAPPER_CHARSET_ALIAS_PATH wxT("Aliases")
+
+#endif // wxUSE_CONFIG
+
+// ----------------------------------------------------------------------------
+// wxFontMapperPathChanger: change the config path during our lifetime
+// ----------------------------------------------------------------------------
+
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
+
+class wxFontMapperPathChanger
+{
+public:
+ wxFontMapperPathChanger(wxFontMapperBase *fontMapper, const wxString& path)
+ {
+ m_fontMapper = fontMapper;
+ m_ok = m_fontMapper->ChangePath(path, &m_pathOld);
+ }
+
+ bool IsOk() const { return m_ok; }
+
+ ~wxFontMapperPathChanger()
+ {
+ if ( IsOk() )
+ m_fontMapper->RestorePath(m_pathOld);
+ }
+
+private:
+ // the fontmapper object we're working with
+ wxFontMapperBase *m_fontMapper;
+
+ // the old path to be restored if m_ok
+ wxString m_pathOld;
+
+ // have we changed the path successfully?
+ bool m_ok;
+
+
+ DECLARE_NO_COPY_CLASS(wxFontMapperPathChanger)
+};
+
+#endif // wxUSE_CONFIG
+
+#endif // _WX_FMAPPRIV_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/font.h b/3rdparty/wxWidgets/include/wx/font.h
new file mode 100644
index 0000000000..2fd044c990
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/font.h
@@ -0,0 +1,251 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/font.h
+// Purpose: wxFontBase class: the interface of wxFont
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 20.09.99
+// RCS-ID: $Id: font.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONT_H_BASE_
+#define _WX_FONT_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/defs.h" // for wxDEFAULT &c
+#include "wx/fontenc.h" // the font encoding constants
+#include "wx/gdiobj.h" // the base class
+
+// ----------------------------------------------------------------------------
+// forward declarations
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxFontData;
+class WXDLLIMPEXP_FWD_CORE wxFontBase;
+class WXDLLIMPEXP_FWD_CORE wxFont;
+class WXDLLIMPEXP_FWD_CORE wxSize;
+
+// ----------------------------------------------------------------------------
+// font constants
+// ----------------------------------------------------------------------------
+
+// standard font families: these may be used only for the font creation, it
+// doesn't make sense to query an existing font for its font family as,
+// especially if the font had been created from a native font description, it
+// may be unknown
+enum wxFontFamily
+{
+ wxFONTFAMILY_DEFAULT = wxDEFAULT,
+ wxFONTFAMILY_DECORATIVE = wxDECORATIVE,
+ wxFONTFAMILY_ROMAN = wxROMAN,
+ wxFONTFAMILY_SCRIPT = wxSCRIPT,
+ wxFONTFAMILY_SWISS = wxSWISS,
+ wxFONTFAMILY_MODERN = wxMODERN,
+ wxFONTFAMILY_TELETYPE = wxTELETYPE,
+ wxFONTFAMILY_MAX,
+ wxFONTFAMILY_UNKNOWN = wxFONTFAMILY_MAX
+};
+
+// font styles
+enum wxFontStyle
+{
+ wxFONTSTYLE_NORMAL = wxNORMAL,
+ wxFONTSTYLE_ITALIC = wxITALIC,
+ wxFONTSTYLE_SLANT = wxSLANT,
+ wxFONTSTYLE_MAX
+};
+
+// font weights
+enum wxFontWeight
+{
+ wxFONTWEIGHT_NORMAL = wxNORMAL,
+ wxFONTWEIGHT_LIGHT = wxLIGHT,
+ wxFONTWEIGHT_BOLD = wxBOLD,
+ wxFONTWEIGHT_MAX
+};
+
+// the font flag bits for the new font ctor accepting one combined flags word
+enum
+{
+ // no special flags: font with default weight/slant/anti-aliasing
+ wxFONTFLAG_DEFAULT = 0,
+
+ // slant flags (default: no slant)
+ wxFONTFLAG_ITALIC = 1 << 0,
+ wxFONTFLAG_SLANT = 1 << 1,
+
+ // weight flags (default: medium)
+ wxFONTFLAG_LIGHT = 1 << 2,
+ wxFONTFLAG_BOLD = 1 << 3,
+
+ // anti-aliasing flag: force on or off (default: the current system default)
+ wxFONTFLAG_ANTIALIASED = 1 << 4,
+ wxFONTFLAG_NOT_ANTIALIASED = 1 << 5,
+
+ // underlined/strikethrough flags (default: no lines)
+ wxFONTFLAG_UNDERLINED = 1 << 6,
+ wxFONTFLAG_STRIKETHROUGH = 1 << 7,
+
+ // the mask of all currently used flags
+ wxFONTFLAG_MASK = wxFONTFLAG_ITALIC |
+ wxFONTFLAG_SLANT |
+ wxFONTFLAG_LIGHT |
+ wxFONTFLAG_BOLD |
+ wxFONTFLAG_ANTIALIASED |
+ wxFONTFLAG_NOT_ANTIALIASED |
+ wxFONTFLAG_UNDERLINED |
+ wxFONTFLAG_STRIKETHROUGH
+};
+
+// ----------------------------------------------------------------------------
+// wxFontBase represents a font object
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxNativeFontInfo;
+
+class WXDLLEXPORT wxFontBase : public wxGDIObject
+{
+public:
+ // creator function
+ virtual ~wxFontBase();
+
+ // from the font components
+ static wxFont *New(
+ int pointSize, // size of the font in points
+ int family, // see wxFontFamily enum
+ int style, // see wxFontStyle enum
+ int weight, // see wxFontWeight enum
+ bool underlined = false, // not underlined by default
+ const wxString& face = wxEmptyString, // facename
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ...
+
+ // from the font components but using the font flags instead of separate
+ // parameters for each flag
+ static wxFont *New(int pointSize,
+ wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+
+ // from the font components
+ static wxFont *New(
+ const wxSize& pixelSize, // size of the font in pixels
+ int family, // see wxFontFamily enum
+ int style, // see wxFontStyle enum
+ int weight, // see wxFontWeight enum
+ bool underlined = false, // not underlined by default
+ const wxString& face = wxEmptyString, // facename
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ...
+
+ // from the font components but using the font flags instead of separate
+ // parameters for each flag
+ static wxFont *New(const wxSize& pixelSize,
+ wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+
+ // from the (opaque) native font description object
+ static wxFont *New(const wxNativeFontInfo& nativeFontDesc);
+
+ // from the string representation of wxNativeFontInfo
+ static wxFont *New(const wxString& strNativeFontDesc);
+
+ // was the font successfully created?
+ bool Ok() const { return IsOk(); }
+ bool IsOk() const { return m_refData != NULL; }
+
+ // comparison
+ bool operator == (const wxFont& font) const;
+ bool operator != (const wxFont& font) const;
+
+ // accessors: get the font characteristics
+ virtual int GetPointSize() const = 0;
+ virtual wxSize GetPixelSize() const;
+ virtual bool IsUsingSizeInPixels() const;
+ virtual int GetFamily() const = 0;
+ virtual int GetStyle() const = 0;
+ virtual int GetWeight() const = 0;
+ virtual bool GetUnderlined() const = 0;
+ virtual wxString GetFaceName() const = 0;
+ virtual wxFontEncoding GetEncoding() const = 0;
+ virtual const wxNativeFontInfo *GetNativeFontInfo() const = 0;
+
+ virtual bool IsFixedWidth() const;
+
+ wxString GetNativeFontInfoDesc() const;
+ wxString GetNativeFontInfoUserDesc() const;
+
+ // change the font characteristics
+ virtual void SetPointSize( int pointSize ) = 0;
+ virtual void SetPixelSize( const wxSize& pixelSize );
+ virtual void SetFamily( int family ) = 0;
+ virtual void SetStyle( int style ) = 0;
+ virtual void SetWeight( int weight ) = 0;
+ virtual void SetUnderlined( bool underlined ) = 0;
+ virtual void SetEncoding(wxFontEncoding encoding) = 0;
+ virtual bool SetFaceName( const wxString& faceName );
+ void SetNativeFontInfo(const wxNativeFontInfo& info)
+ { DoSetNativeFontInfo(info); }
+
+ bool SetNativeFontInfo(const wxString& info);
+ bool SetNativeFontInfoUserDesc(const wxString& info);
+
+ // translate the fonts into human-readable string (i.e. GetStyleString()
+ // will return "wxITALIC" for an italic font, ...)
+ wxString GetFamilyString() const;
+ wxString GetStyleString() const;
+ wxString GetWeightString() const;
+
+ // Unofficial API, don't use
+ virtual void SetNoAntiAliasing( bool WXUNUSED(no) = true ) { }
+ virtual bool GetNoAntiAliasing() const { return false; }
+
+ // the default encoding is used for creating all fonts with default
+ // encoding parameter
+ static wxFontEncoding GetDefaultEncoding() { return ms_encodingDefault; }
+ static void SetDefaultEncoding(wxFontEncoding encoding);
+
+protected:
+ // the function called by both overloads of SetNativeFontInfo()
+ virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
+
+private:
+ // the currently default encoding: by default, it's the default system
+ // encoding, but may be changed by the application using
+ // SetDefaultEncoding() to make all subsequent fonts created without
+ // specifying encoding parameter using this encoding
+ static wxFontEncoding ms_encodingDefault;
+};
+
+// include the real class declaration
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/font.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/font.h"
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/font.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/font.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/font.h"
+#elif defined(__WXX11__)
+ #include "wx/x11/font.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/font.h"
+#elif defined(__WXDFB__)
+ #include "wx/dfb/font.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/font.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/font.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/font.h"
+#endif
+
+#endif
+ // _WX_FONT_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/fontdlg.h b/3rdparty/wxWidgets/include/wx/fontdlg.h
new file mode 100644
index 0000000000..280a567bb7
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fontdlg.h
@@ -0,0 +1,118 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/fontdlg.h
+// Purpose: common interface for different wxFontDialog classes
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 12.05.02
+// RCS-ID: $Id: fontdlg.h 41846 2006-10-09 22:56:48Z VZ $
+// Copyright: (c) 1997-2002 wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONTDLG_H_BASE_
+#define _WX_FONTDLG_H_BASE_
+
+#include "wx/defs.h" // for wxUSE_FONTDLG
+
+#if wxUSE_FONTDLG
+
+#include "wx/dialog.h" // the base class
+#include "wx/cmndata.h" // wxFontData
+
+// ----------------------------------------------------------------------------
+// wxFontDialog interface
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFontDialogBase : public wxDialog
+{
+public:
+ // create the font dialog
+ wxFontDialogBase() { }
+ wxFontDialogBase(wxWindow *parent) { m_parent = parent; }
+ wxFontDialogBase(wxWindow *parent, const wxFontData& data)
+ { m_parent = parent; InitFontData(&data); }
+
+ bool Create(wxWindow *parent)
+ { return DoCreate(parent); }
+ bool Create(wxWindow *parent, const wxFontData& data)
+ { InitFontData(&data); return Create(parent); }
+
+ virtual ~wxFontDialogBase();
+
+ // retrieve the font data
+ const wxFontData& GetFontData() const { return m_fontData; }
+ wxFontData& GetFontData() { return m_fontData; }
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated interface, for compatibility only, don't use
+ wxDEPRECATED( wxFontDialogBase(wxWindow *parent, const wxFontData *data) );
+
+ wxDEPRECATED( bool Create(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+ virtual bool DoCreate(wxWindow *parent) { m_parent = parent; return true; }
+
+ void InitFontData(const wxFontData *data = NULL)
+ { if ( data ) m_fontData = *data; }
+
+ wxFontData m_fontData;
+
+ DECLARE_NO_COPY_CLASS(wxFontDialogBase)
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated interface, for compatibility only, don't use
+inline wxFontDialogBase::wxFontDialogBase(wxWindow *parent, const wxFontData *data)
+{ m_parent = parent; InitFontData(data); }
+
+inline bool wxFontDialogBase::Create(wxWindow *parent, const wxFontData *data)
+{ InitFontData(data); return Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
+// ----------------------------------------------------------------------------
+// platform-specific wxFontDialog implementation
+// ----------------------------------------------------------------------------
+
+#if defined( __WXMAC_OSX__ ) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
+//set to 1 to use native mac font and color dialogs
+#define USE_NATIVE_FONT_DIALOG_FOR_MACOSX 1
+#else
+//not supported on these platforms, leave 0
+#define USE_NATIVE_FONT_DIALOG_FOR_MACOSX 0
+#endif
+
+#if defined(__WXUNIVERSAL__) || \
+ defined(__WXMOTIF__) || \
+ defined(__WXCOCOA__) || \
+ defined(__WXWINCE__) || \
+ defined(__WXGPE__)
+
+ #include "wx/generic/fontdlgg.h"
+ #define wxFontDialog wxGenericFontDialog
+#elif defined(__WXMSW__)
+ #include "wx/msw/fontdlg.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/fontdlg.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/fontdlg.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/fontdlg.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/fontdlg.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// global public functions
+// ----------------------------------------------------------------------------
+
+// get the font from user and return it, returns wxNullFont if the dialog was
+// cancelled
+wxFont WXDLLEXPORT
+wxGetFontFromUser(wxWindow *parent = (wxWindow *)NULL,
+ const wxFont& fontInit = wxNullFont, const wxString& caption = wxEmptyString);
+
+#endif // wxUSE_FONTDLG
+
+#endif
+ // _WX_FONTDLG_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/fontenc.h b/3rdparty/wxWidgets/include/wx/fontenc.h
new file mode 100644
index 0000000000..7ac0d63a3e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fontenc.h
@@ -0,0 +1,151 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fontenc.h
+// Purpose: wxFontEncoding constants
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 29.03.00
+// RCS-ID: $Id: fontenc.h 29139 2004-09-14 12:08:28Z ABX $
+// Copyright: (c) Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONTENC_H_
+#define _WX_FONTENC_H_
+
+// font encodings
+enum wxFontEncoding
+{
+ wxFONTENCODING_SYSTEM = -1, // system default
+ wxFONTENCODING_DEFAULT, // current default encoding
+
+ // ISO8859 standard defines a number of single-byte charsets
+ wxFONTENCODING_ISO8859_1, // West European (Latin1)
+ wxFONTENCODING_ISO8859_2, // Central and East European (Latin2)
+ wxFONTENCODING_ISO8859_3, // Esperanto (Latin3)
+ wxFONTENCODING_ISO8859_4, // Baltic (old) (Latin4)
+ wxFONTENCODING_ISO8859_5, // Cyrillic
+ wxFONTENCODING_ISO8859_6, // Arabic
+ wxFONTENCODING_ISO8859_7, // Greek
+ wxFONTENCODING_ISO8859_8, // Hebrew
+ wxFONTENCODING_ISO8859_9, // Turkish (Latin5)
+ wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6)
+ wxFONTENCODING_ISO8859_11, // Thai
+ wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it
+ // here anyhow to make all ISO8859
+ // consecutive numbers
+ wxFONTENCODING_ISO8859_13, // Baltic (Latin7)
+ wxFONTENCODING_ISO8859_14, // Latin8
+ wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro)
+ wxFONTENCODING_ISO8859_MAX,
+
+ // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html)
+ wxFONTENCODING_KOI8, // KOI8 Russian
+ wxFONTENCODING_KOI8_U, // KOI8 Ukrainian
+ wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866
+ wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria
+
+ // what would we do without Microsoft? They have their own encodings
+ // for DOS
+ wxFONTENCODING_CP437, // original MS-DOS codepage
+ wxFONTENCODING_CP850, // CP437 merged with Latin1
+ wxFONTENCODING_CP852, // CP437 merged with Latin2
+ wxFONTENCODING_CP855, // another cyrillic encoding
+ wxFONTENCODING_CP866, // and another one
+ // and for Windows
+ wxFONTENCODING_CP874, // WinThai
+ wxFONTENCODING_CP932, // Japanese (shift-JIS)
+ wxFONTENCODING_CP936, // Chinese simplified (GB)
+ wxFONTENCODING_CP949, // Korean (Hangul charset)
+ wxFONTENCODING_CP950, // Chinese (traditional - Big5)
+ wxFONTENCODING_CP1250, // WinLatin2
+ wxFONTENCODING_CP1251, // WinCyrillic
+ wxFONTENCODING_CP1252, // WinLatin1
+ wxFONTENCODING_CP1253, // WinGreek (8859-7)
+ wxFONTENCODING_CP1254, // WinTurkish
+ wxFONTENCODING_CP1255, // WinHebrew
+ wxFONTENCODING_CP1256, // WinArabic
+ wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7)
+ wxFONTENCODING_CP12_MAX,
+
+ wxFONTENCODING_UTF7, // UTF-7 Unicode encoding
+ wxFONTENCODING_UTF8, // UTF-8 Unicode encoding
+ wxFONTENCODING_EUC_JP, // Extended Unix Codepage for Japanese
+ wxFONTENCODING_UTF16BE, // UTF-16 Big Endian Unicode encoding
+ wxFONTENCODING_UTF16LE, // UTF-16 Little Endian Unicode encoding
+ wxFONTENCODING_UTF32BE, // UTF-32 Big Endian Unicode encoding
+ wxFONTENCODING_UTF32LE, // UTF-32 Little Endian Unicode encoding
+
+ wxFONTENCODING_MACROMAN, // the standard mac encodings
+ wxFONTENCODING_MACJAPANESE,
+ wxFONTENCODING_MACCHINESETRAD,
+ wxFONTENCODING_MACKOREAN,
+ wxFONTENCODING_MACARABIC,
+ wxFONTENCODING_MACHEBREW,
+ wxFONTENCODING_MACGREEK,
+ wxFONTENCODING_MACCYRILLIC,
+ wxFONTENCODING_MACDEVANAGARI,
+ wxFONTENCODING_MACGURMUKHI,
+ wxFONTENCODING_MACGUJARATI,
+ wxFONTENCODING_MACORIYA,
+ wxFONTENCODING_MACBENGALI,
+ wxFONTENCODING_MACTAMIL,
+ wxFONTENCODING_MACTELUGU,
+ wxFONTENCODING_MACKANNADA,
+ wxFONTENCODING_MACMALAJALAM,
+ wxFONTENCODING_MACSINHALESE,
+ wxFONTENCODING_MACBURMESE,
+ wxFONTENCODING_MACKHMER,
+ wxFONTENCODING_MACTHAI,
+ wxFONTENCODING_MACLAOTIAN,
+ wxFONTENCODING_MACGEORGIAN,
+ wxFONTENCODING_MACARMENIAN,
+ wxFONTENCODING_MACCHINESESIMP,
+ wxFONTENCODING_MACTIBETAN,
+ wxFONTENCODING_MACMONGOLIAN,
+ wxFONTENCODING_MACETHIOPIC,
+ wxFONTENCODING_MACCENTRALEUR,
+ wxFONTENCODING_MACVIATNAMESE,
+ wxFONTENCODING_MACARABICEXT,
+ wxFONTENCODING_MACSYMBOL,
+ wxFONTENCODING_MACDINGBATS,
+ wxFONTENCODING_MACTURKISH,
+ wxFONTENCODING_MACCROATIAN,
+ wxFONTENCODING_MACICELANDIC,
+ wxFONTENCODING_MACROMANIAN,
+ wxFONTENCODING_MACCELTIC,
+ wxFONTENCODING_MACGAELIC,
+ wxFONTENCODING_MACKEYBOARD,
+
+ wxFONTENCODING_MAX, // highest enumerated encoding value
+
+ wxFONTENCODING_MACMIN = wxFONTENCODING_MACROMAN ,
+ wxFONTENCODING_MACMAX = wxFONTENCODING_MACKEYBOARD ,
+
+ // aliases for endian-dependent UTF encodings
+#ifdef WORDS_BIGENDIAN
+ wxFONTENCODING_UTF16 = wxFONTENCODING_UTF16BE, // native UTF-16
+ wxFONTENCODING_UTF32 = wxFONTENCODING_UTF32BE, // native UTF-32
+#else // WORDS_BIGENDIAN
+ wxFONTENCODING_UTF16 = wxFONTENCODING_UTF16LE, // native UTF-16
+ wxFONTENCODING_UTF32 = wxFONTENCODING_UTF32LE, // native UTF-32
+#endif // WORDS_BIGENDIAN
+
+ // alias for the native Unicode encoding on this platform
+ // (this is used by wxEncodingConverter and wxUTFFile only for now)
+#if SIZEOF_WCHAR_T == 2
+ wxFONTENCODING_UNICODE = wxFONTENCODING_UTF16,
+#else // SIZEOF_WCHAR_T == 4
+ wxFONTENCODING_UNICODE = wxFONTENCODING_UTF32,
+#endif
+
+ // alternative names for Far Eastern encodings
+ // Chinese
+ wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, // Simplified Chinese
+ wxFONTENCODING_BIG5 = wxFONTENCODING_CP950, // Traditional Chinese
+
+ // Japanese (see http://zsigri.tripod.com/fontboard/cjk/jis.html)
+ wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932 // Shift JIS
+};
+
+#endif // _WX_FONTENC_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/fontenum.h b/3rdparty/wxWidgets/include/wx/fontenum.h
new file mode 100644
index 0000000000..c4f8d98819
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fontenum.h
@@ -0,0 +1,88 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fontenum.h
+// Purpose: wxFontEnumerator class for getting available fonts
+// Author: Julian Smart, Vadim Zeitlin
+// Modified by: extended to enumerate more than just font facenames and works
+// not only on Windows now (VZ)
+// Created: 04/01/98
+// RCS-ID: $Id: fontenum.h 43727 2006-12-01 10:14:28Z VS $
+// Copyright: (c) Julian Smart, Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONTENUM_H_
+#define _WX_FONTENUM_H_
+
+#include "wx/fontenc.h"
+#include "wx/arrstr.h"
+
+#if wxUSE_PANGO || defined(__WXDFB__)
+ // defined if the port uses only UTF-8 font encodings internally
+ #define wxHAS_UTF8_FONTS
+#endif
+
+// ----------------------------------------------------------------------------
+// wxFontEnumerator enumerates all available fonts on the system or only the
+// fonts with given attributes
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFontEnumerator
+{
+public:
+ wxFontEnumerator() {}
+
+ // virtual dtor for the base class
+ virtual ~wxFontEnumerator() {}
+
+ // start enumerating font facenames (either all of them or those which
+ // support the given encoding) - will result in OnFacename() being
+ // called for each available facename (until they are exhausted or
+ // OnFacename returns false)
+ virtual bool EnumerateFacenames
+ (
+ wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
+ bool fixedWidthOnly = false
+ );
+
+ // enumerate the different encodings either for given font facename or for
+ // all facenames - will result in OnFontEncoding() being called for each
+ // available (facename, encoding) couple
+ virtual bool EnumerateEncodings(const wxString& facename = wxEmptyString);
+
+ // callbacks which are called after one of EnumerateXXX() functions from
+ // above is invoked - all of them may return false to stop enumeration or
+ // true to continue with it
+
+ // called by EnumerateFacenames
+ virtual bool OnFacename(const wxString& WXUNUSED(facename))
+ { return true; }
+
+ // called by EnumerateEncodings
+ virtual bool OnFontEncoding(const wxString& WXUNUSED(facename),
+ const wxString& WXUNUSED(encoding))
+ { return true; }
+
+
+
+ // convenience function that returns array of facenames.
+ static wxArrayString
+ GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
+ bool fixedWidthOnly = false);
+
+ // convenience function that returns array of all available encodings.
+ static wxArrayString GetEncodings(const wxString& facename = wxEmptyString);
+
+ // convenience function that returns true if the given face name exist
+ // in the user's system
+ static bool IsValidFacename(const wxString &str);
+
+private:
+#ifdef wxHAS_UTF8_FONTS
+ // helper for ports that only use UTF-8 encoding natively
+ bool EnumerateEncodingsUTF8(const wxString& facename);
+#endif
+
+ DECLARE_NO_COPY_CLASS(wxFontEnumerator)
+};
+
+#endif // _WX_FONTENUM_H_
diff --git a/3rdparty/wxWidgets/include/wx/fontmap.h b/3rdparty/wxWidgets/include/wx/fontmap.h
new file mode 100644
index 0000000000..ff6684fa6e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fontmap.h
@@ -0,0 +1,290 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fontmap.h
+// Purpose: wxFontMapper class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 04.11.99
+// RCS-ID: $Id: fontmap.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONTMAPPER_H_
+#define _WX_FONTMAPPER_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#if wxUSE_FONTMAP
+
+#include "wx/fontenc.h" // for wxFontEncoding
+
+#if wxUSE_GUI
+ #include "wx/fontutil.h" // for wxNativeEncodingInfo
+#endif // wxUSE_GUI
+
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
+ class WXDLLIMPEXP_FWD_BASE wxConfigBase;
+#endif // wxUSE_CONFIG
+
+class WXDLLIMPEXP_FWD_CORE wxFontMapper;
+
+#if wxUSE_GUI
+ class WXDLLIMPEXP_FWD_CORE wxWindow;
+#endif // wxUSE_GUI
+
+// ============================================================================
+// wxFontMapper manages user-definable correspondence between wxWidgets font
+// encodings and the fonts present on the machine.
+//
+// This is a singleton class, font mapper objects can only be accessed using
+// wxFontMapper::Get().
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxFontMapperBase: this is a non-interactive class which just uses its built
+// in knowledge of the encodings equivalence
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFontMapperBase
+{
+public:
+ // constructtor and such
+ // ---------------------
+
+ // default ctor
+ wxFontMapperBase();
+
+ // virtual dtor for any base class
+ virtual ~wxFontMapperBase();
+
+ // return instance of the wxFontMapper singleton
+ // wxBase code only cares that it's a wxFontMapperBase
+ // In wxBase, wxFontMapper is only forward declared
+ // so one cannot implicitly cast from it to wxFontMapperBase.
+ static wxFontMapperBase *Get();
+
+ // set the singleton to 'mapper' instance and return previous one
+ static wxFontMapper *Set(wxFontMapper *mapper);
+
+ // delete the existing font mapper if any
+ static void Reset();
+
+
+ // translates charset strings to encoding
+ // --------------------------------------
+
+ // returns the encoding for the given charset (in the form of RFC 2046) or
+ // wxFONTENCODING_SYSTEM if couldn't decode it
+ //
+ // interactive parameter is ignored in the base class, we behave as if it
+ // were always false
+ virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
+ bool interactive = true);
+
+ // information about supported encodings
+ // -------------------------------------
+
+ // get the number of font encodings we know about
+ static size_t GetSupportedEncodingsCount();
+
+ // get the n-th supported encoding
+ static wxFontEncoding GetEncoding(size_t n);
+
+ // return canonical name of this encoding (this is a short string,
+ // GetEncodingDescription() returns a longer one)
+ static wxString GetEncodingName(wxFontEncoding encoding);
+
+ // return a list of all names of this encoding (see GetEncodingName)
+ static const wxChar** GetAllEncodingNames(wxFontEncoding encoding);
+
+ // return user-readable string describing the given encoding
+ //
+ // NB: hard-coded now, but might change later (read it from config?)
+ static wxString GetEncodingDescription(wxFontEncoding encoding);
+
+ // find the encoding corresponding to the given name, inverse of
+ // GetEncodingName() and less general than CharsetToEncoding()
+ //
+ // returns wxFONTENCODING_MAX if the name is not a supported encoding
+ static wxFontEncoding GetEncodingFromName(const wxString& name);
+
+
+ // functions which allow to configure the config object used: by default,
+ // the global one (from wxConfigBase::Get() will be used) and the default
+ // root path for the config settings is the string returned by
+ // GetDefaultConfigPath()
+ // ----------------------------------------------------------------------
+
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
+ // set the root config path to use (should be an absolute path)
+ void SetConfigPath(const wxString& prefix);
+
+ // return default config path
+ static const wxChar *GetDefaultConfigPath();
+#endif // wxUSE_CONFIG
+
+
+ // returns true for the base class and false for a "real" font mapper object
+ // (implementation-only)
+ virtual bool IsDummy() { return true; }
+
+protected:
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
+ // get the config object we're using -- either the global config object
+ // or a wxMemoryConfig object created by this class otherwise
+ wxConfigBase *GetConfig();
+
+ // gets the root path for our settings -- if it wasn't set explicitly, use
+ // GetDefaultConfigPath()
+ const wxString& GetConfigPath();
+
+ // change to the given (relative) path in the config, return true if ok
+ // (then GetConfig() will return something !NULL), false if no config
+ // object
+ //
+ // caller should provide a pointer to the string variable which should be
+ // later passed to RestorePath()
+ bool ChangePath(const wxString& pathNew, wxString *pathOld);
+
+ // restore the config path after use
+ void RestorePath(const wxString& pathOld);
+
+ // config object and path (in it) to use
+ wxConfigBase *m_configDummy;
+
+ wxString m_configRootPath;
+#endif // wxUSE_CONFIG
+
+ // the real implementation of the base class version of CharsetToEncoding()
+ //
+ // returns wxFONTENCODING_UNKNOWN if encoding is unknown and we shouldn't
+ // ask the user about it, wxFONTENCODING_SYSTEM if it is unknown but we
+ // should/could ask the user
+ int NonInteractiveCharsetToEncoding(const wxString& charset);
+
+private:
+ // the global fontmapper object or NULL
+ static wxFontMapper *sm_instance;
+
+ friend class wxFontMapperPathChanger;
+
+ DECLARE_NO_COPY_CLASS(wxFontMapperBase)
+};
+
+// ----------------------------------------------------------------------------
+// wxFontMapper: interactive extension of wxFontMapperBase
+//
+// The default implementations of all functions will ask the user if they are
+// not capable of finding the answer themselves and store the answer in a
+// config file (configurable via SetConfigXXX functions). This behaviour may
+// be disabled by giving the value of false to "interactive" parameter.
+// However, the functions will always consult the config file to allow the
+// user-defined values override the default logic and there is no way to
+// disable this -- which shouldn't be ever needed because if "interactive" was
+// never true, the config file is never created anyhow.
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+
+class WXDLLIMPEXP_CORE wxFontMapper : public wxFontMapperBase
+{
+public:
+ // default ctor
+ wxFontMapper();
+
+ // virtual dtor for a base class
+ virtual ~wxFontMapper();
+
+ // working with the encodings
+ // --------------------------
+
+ // returns the encoding for the given charset (in the form of RFC 2046) or
+ // wxFONTENCODING_SYSTEM if couldn't decode it
+ virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
+ bool interactive = true);
+
+ // find an alternative for the given encoding (which is supposed to not be
+ // available on this system). If successful, return true and fill info
+ // structure with the parameters required to create the font, otherwise
+ // return false
+ virtual bool GetAltForEncoding(wxFontEncoding encoding,
+ wxNativeEncodingInfo *info,
+ const wxString& facename = wxEmptyString,
+ bool interactive = true);
+
+ // version better suitable for 'public' use. Returns wxFontEcoding
+ // that can be used it wxFont ctor
+ bool GetAltForEncoding(wxFontEncoding encoding,
+ wxFontEncoding *alt_encoding,
+ const wxString& facename = wxEmptyString,
+ bool interactive = true);
+
+ // checks whether given encoding is available in given face or not.
+ //
+ // if no facename is given (default), return true if it's available in any
+ // facename at alll.
+ virtual bool IsEncodingAvailable(wxFontEncoding encoding,
+ const wxString& facename = wxEmptyString);
+
+
+ // configure the appearance of the dialogs we may popup
+ // ----------------------------------------------------
+
+ // the parent window for modal dialogs
+ void SetDialogParent(wxWindow *parent) { m_windowParent = parent; }
+
+ // the title for the dialogs (note that default is quite reasonable)
+ void SetDialogTitle(const wxString& title) { m_titleDialog = title; }
+
+ // GUI code needs to know it's a wxFontMapper because there
+ // are additional methods in the subclass.
+ static wxFontMapper *Get();
+
+ // pseudo-RTTI since we aren't a wxObject.
+ virtual bool IsDummy() { return false; }
+
+protected:
+ // GetAltForEncoding() helper: tests for the existence of the given
+ // encoding and saves the result in config if ok - this results in the
+ // following (desired) behaviour: when an unknown/unavailable encoding is
+ // requested for the first time, the user is asked about a replacement,
+ // but if he doesn't choose any and the default logic finds one, it will
+ // be saved in the config so that the user won't be asked about it any
+ // more
+ bool TestAltEncoding(const wxString& configEntry,
+ wxFontEncoding encReplacement,
+ wxNativeEncodingInfo *info);
+
+ // the title for our dialogs
+ wxString m_titleDialog;
+
+ // the parent window for our dialogs
+ wxWindow *m_windowParent;
+
+private:
+ DECLARE_NO_COPY_CLASS(wxFontMapper)
+};
+
+#endif // wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// global variables
+// ----------------------------------------------------------------------------
+
+// the default font mapper for wxWidgets programs do NOT use! This is for
+// backward compatibility, use wxFontMapper::Get() instead
+#define wxTheFontMapper (wxFontMapper::Get())
+
+#else // !wxUSE_FONTMAP
+
+#if wxUSE_GUI
+ // wxEncodingToCodepage (utils.cpp) needs wxGetNativeFontEncoding
+ #include "wx/fontutil.h"
+#endif
+
+#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
+
+#endif // _WX_FONTMAPPER_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/fontpicker.h b/3rdparty/wxWidgets/include/wx/fontpicker.h
new file mode 100644
index 0000000000..ff02eddd5c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fontpicker.h
@@ -0,0 +1,223 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fontpicker.h
+// Purpose: wxFontPickerCtrl base header
+// Author: Francesco Montorsi
+// Modified by:
+// Created: 14/4/2006
+// Copyright: (c) Francesco Montorsi
+// RCS-ID: $Id: fontpicker.h 53135 2008-04-12 02:31:04Z VZ $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONTPICKER_H_BASE_
+#define _WX_FONTPICKER_H_BASE_
+
+#include "wx/defs.h"
+
+
+#if wxUSE_FONTPICKERCTRL
+
+#include "wx/pickerbase.h"
+
+
+class WXDLLIMPEXP_FWD_CORE wxFontPickerEvent;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerWidgetNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerCtrlNameStr[];
+
+
+// ----------------------------------------------------------------------------
+// wxFontPickerWidgetBase: a generic abstract interface which must be
+// implemented by controls used by wxFontPickerCtrl
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxFontPickerWidgetBase
+{
+public:
+ wxFontPickerWidgetBase() { m_selectedFont = *wxNORMAL_FONT; }
+ virtual ~wxFontPickerWidgetBase() {}
+
+ wxFont GetSelectedFont() const
+ { return m_selectedFont; }
+ virtual void SetSelectedFont(const wxFont &f)
+ { m_selectedFont = f; UpdateFont(); }
+
+protected:
+
+ virtual void UpdateFont() = 0;
+
+ // the current font (may be invalid if none)
+ // NOTE: don't call this m_font as wxWindow::m_font already exists
+ wxFont m_selectedFont;
+};
+
+// Styles which must be supported by all controls implementing wxFontPickerWidgetBase
+// NB: these styles must be defined to carefully-chosen values to
+// avoid conflicts with wxButton's styles
+
+
+// keeps the label of the button updated with the fontface name + font size
+// E.g. choosing "Times New Roman bold, italic with size 10" from the fontdialog,
+// updates the wxFontButtonGeneric's label (overwriting any previous label)
+// with the "Times New Roman, 10" text (only fontface + fontsize is displayed
+// to avoid extralong labels).
+#define wxFNTP_FONTDESC_AS_LABEL 0x0008
+
+// uses the currently selected font to draw the label of the button
+#define wxFNTP_USEFONT_FOR_LABEL 0x0010
+
+// since GTK > 2.4, there is GtkFontButton
+#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
+ #include "wx/gtk/fontpicker.h"
+ #define wxFontPickerWidget wxFontButton
+#else
+ #include "wx/generic/fontpickerg.h"
+ #define wxFontPickerWidget wxGenericFontButton
+#endif
+
+
+// ----------------------------------------------------------------------------
+// wxFontPickerCtrl specific flags
+// ----------------------------------------------------------------------------
+
+#define wxFNTP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+#define wxFNTP_DEFAULT_STYLE (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)
+
+// not a style but rather the default value of the maximum pointsize allowed
+#define wxFNTP_MAXPOINT_SIZE 100
+
+
+// ----------------------------------------------------------------------------
+// wxFontPickerCtrl: platform-independent class which embeds the
+// platform-dependent wxFontPickerWidget andm if wxFNTP_USE_TEXTCTRL style is
+// used, a textctrl next to it.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxFontPickerCtrl : public wxPickerBase
+{
+public:
+ wxFontPickerCtrl()
+ : m_bIgnoreNextTextCtrlUpdate(false),
+ m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE)
+ {
+ }
+
+ virtual ~wxFontPickerCtrl() {}
+
+
+ wxFontPickerCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxFont& initial = wxNullFont,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFNTP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFontPickerCtrlNameStr)
+ : m_bIgnoreNextTextCtrlUpdate(false),
+ m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE)
+ {
+ Create(parent, id, initial, pos, size, style, validator, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxFont& initial = wxNullFont,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFNTP_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFontPickerCtrlNameStr);
+
+
+public: // public API
+
+ // get the font chosen
+ wxFont GetSelectedFont() const
+ { return ((wxFontPickerWidget *)m_picker)->GetSelectedFont(); }
+
+ // sets currently displayed font
+ void SetSelectedFont(const wxFont& f);
+
+ // set/get the max pointsize
+ void SetMaxPointSize(unsigned int max)
+ { m_nMaxPointSize=max; }
+ unsigned int GetMaxPointSize() const
+ { return m_nMaxPointSize; }
+
+public: // internal functions
+
+ void UpdatePickerFromTextCtrl();
+ void UpdateTextCtrlFromPicker();
+
+ // event handler for our picker
+ void OnFontChange(wxFontPickerEvent &);
+
+ // used to convert wxString <-> wxFont
+ virtual wxString Font2String(const wxFont &font);
+ virtual wxFont String2Font(const wxString &font);
+
+protected:
+
+ // extracts the style for our picker from wxFontPickerCtrl's style
+ long GetPickerStyle(long style) const
+ { return (style & (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)); }
+
+ // true if the next UpdateTextCtrl() call is to ignore
+ bool m_bIgnoreNextTextCtrlUpdate;
+
+ // the maximum pointsize allowed to the user
+ unsigned int m_nMaxPointSize;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxFontPickerCtrl)
+};
+
+
+// ----------------------------------------------------------------------------
+// wxFontPickerEvent: used by wxFontPickerCtrl only
+// ----------------------------------------------------------------------------
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_FONTPICKER_CHANGED, 1102)
+END_DECLARE_EVENT_TYPES()
+
+class WXDLLIMPEXP_CORE wxFontPickerEvent : public wxCommandEvent
+{
+public:
+ wxFontPickerEvent() {}
+ wxFontPickerEvent(wxObject *generator, int id, const wxFont &f)
+ : wxCommandEvent(wxEVT_COMMAND_FONTPICKER_CHANGED, id),
+ m_font(f)
+ {
+ SetEventObject(generator);
+ }
+
+ wxFont GetFont() const { return m_font; }
+ void SetFont(const wxFont &c) { m_font = c; }
+
+ // default copy ctor, assignment operator and dtor are ok
+ virtual wxEvent *Clone() const { return new wxFontPickerEvent(*this); }
+
+private:
+ wxFont m_font;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFontPickerEvent)
+};
+
+// ----------------------------------------------------------------------------
+// event types and macros
+// ----------------------------------------------------------------------------
+
+typedef void (wxEvtHandler::*wxFontPickerEventFunction)(wxFontPickerEvent&);
+
+#define wxFontPickerEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFontPickerEventFunction, &func)
+
+#define EVT_FONTPICKER_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn))
+
+
+#endif // wxUSE_FONTPICKERCTRL
+
+#endif
+ // _WX_FONTPICKER_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/fontutil.h b/3rdparty/wxWidgets/include/wx/fontutil.h
new file mode 100644
index 0000000000..a2a1124098
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fontutil.h
@@ -0,0 +1,242 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fontutil.h
+// Purpose: font-related helper functions
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 05.11.99
+// RCS-ID: $Id: fontutil.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// General note: this header is private to wxWidgets and is not supposed to be
+// included by user code. The functions declared here are implemented in
+// msw/fontutil.cpp for Windows, unix/fontutil.cpp for GTK/Motif &c.
+
+#ifndef _WX_FONTUTIL_H_
+#define _WX_FONTUTIL_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/font.h" // for wxFont and wxFontEncoding
+
+#if defined(__WXMSW__)
+ #include "wx/msw/wrapwin.h"
+#endif
+
+class WXDLLIMPEXP_FWD_BASE wxArrayString;
+struct WXDLLIMPEXP_FWD_CORE wxNativeEncodingInfo;
+
+#if defined(_WX_X_FONTLIKE)
+
+// the symbolic names for the XLFD fields (with examples for their value)
+//
+// NB: we suppose that the font always starts with the empty token (font name
+// registry field) as we never use nor generate it anyhow
+enum wxXLFDField
+{
+ wxXLFD_FOUNDRY, // adobe
+ wxXLFD_FAMILY, // courier, times, ...
+ wxXLFD_WEIGHT, // black, bold, demibold, medium, regular, light
+ wxXLFD_SLANT, // r/i/o (roman/italique/oblique)
+ wxXLFD_SETWIDTH, // condensed, expanded, ...
+ wxXLFD_ADDSTYLE, // whatever - usually nothing
+ wxXLFD_PIXELSIZE, // size in pixels
+ wxXLFD_POINTSIZE, // size in points
+ wxXLFD_RESX, // 72, 75, 100, ...
+ wxXLFD_RESY,
+ wxXLFD_SPACING, // m/p/c (monospaced/proportional/character cell)
+ wxXLFD_AVGWIDTH, // average width in 1/10 pixels
+ wxXLFD_REGISTRY, // iso8859, rawin, koi8, ...
+ wxXLFD_ENCODING, // 1, r, r, ...
+ wxXLFD_MAX
+};
+
+#endif // _WX_X_FONTLIKE
+
+// ----------------------------------------------------------------------------
+// types
+// ----------------------------------------------------------------------------
+
+// wxNativeFontInfo is platform-specific font representation: this struct
+// should be considered as opaque font description only used by the native
+// functions, the user code can only get the objects of this type from
+// somewhere and pass it somewhere else (possibly save them somewhere using
+// ToString() and restore them using FromString())
+class WXDLLEXPORT wxNativeFontInfo
+{
+public:
+#if wxUSE_PANGO
+ PangoFontDescription *description;
+#elif defined(_WX_X_FONTLIKE)
+ // the members can't be accessed directly as we only parse the
+ // xFontName on demand
+private:
+ // the components of the XLFD
+ wxString fontElements[wxXLFD_MAX];
+
+ // the full XLFD
+ wxString xFontName;
+
+ // true until SetXFontName() is called
+ bool m_isDefault;
+
+ // return true if we have already initialized fontElements
+ inline bool HasElements() const;
+
+public:
+ // init the elements from an XLFD, return true if ok
+ bool FromXFontName(const wxString& xFontName);
+
+ // return false if we were never initialized with a valid XLFD
+ bool IsDefault() const { return m_isDefault; }
+
+ // return the XLFD (using the fontElements if necessary)
+ wxString GetXFontName() const;
+
+ // get the given XFLD component
+ wxString GetXFontComponent(wxXLFDField field) const;
+
+ // change the font component
+ void SetXFontComponent(wxXLFDField field, const wxString& value);
+
+ // set the XFLD
+ void SetXFontName(const wxString& xFontName);
+#elif defined(__WXMSW__)
+ LOGFONT lf;
+#elif defined(__WXPM__)
+ // OS/2 native structures that define a font
+ FATTRS fa;
+ FONTMETRICS fm;
+ FACENAMEDESC fn;
+#else // other platforms
+ //
+ // This is a generic implementation that should work on all ports
+ // without specific support by the port.
+ //
+ #define wxNO_NATIVE_FONTINFO
+
+ int pointSize;
+ wxFontFamily family;
+ wxFontStyle style;
+ wxFontWeight weight;
+ bool underlined;
+ wxString faceName;
+ wxFontEncoding encoding;
+#endif // platforms
+
+ // default ctor (default copy ctor is ok)
+ wxNativeFontInfo() { Init(); }
+
+#if wxUSE_PANGO
+private:
+ void Init(const wxNativeFontInfo& info);
+ void Free();
+
+public:
+ wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); }
+ ~wxNativeFontInfo() { Free(); }
+
+ wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
+ {
+ Free();
+ Init(info);
+ return *this;
+ }
+#endif // wxUSE_PANGO
+
+ // reset to the default state
+ void Init();
+
+ // init with the parameters of the given font
+ void InitFromFont(const wxFont& font)
+ {
+ // translate all font parameters
+ SetStyle((wxFontStyle)font.GetStyle());
+ SetWeight((wxFontWeight)font.GetWeight());
+ SetUnderlined(font.GetUnderlined());
+#if defined(__WXMSW__)
+ if ( font.IsUsingSizeInPixels() )
+ SetPixelSize(font.GetPixelSize());
+ else
+ SetPointSize(font.GetPointSize());
+#else
+ SetPointSize(font.GetPointSize());
+#endif
+
+ // set the family/facename
+ SetFamily((wxFontFamily)font.GetFamily());
+ const wxString& facename = font.GetFaceName();
+ if ( !facename.empty() )
+ {
+ SetFaceName(facename);
+ }
+
+ // deal with encoding now (it may override the font family and facename
+ // so do it after setting them)
+ SetEncoding(font.GetEncoding());
+ }
+
+ // accessors and modifiers for the font elements
+ int GetPointSize() const;
+ wxSize GetPixelSize() const;
+ wxFontStyle GetStyle() const;
+ wxFontWeight GetWeight() const;
+ bool GetUnderlined() const;
+ wxString GetFaceName() const;
+ wxFontFamily GetFamily() const;
+ wxFontEncoding GetEncoding() const;
+
+ void SetPointSize(int pointsize);
+ void SetPixelSize(const wxSize& pixelSize);
+ void SetStyle(wxFontStyle style);
+ void SetWeight(wxFontWeight weight);
+ void SetUnderlined(bool underlined);
+ bool SetFaceName(const wxString& facename);
+ void SetFamily(wxFontFamily family);
+ void SetEncoding(wxFontEncoding encoding);
+
+ // sets the first facename in the given array which is found
+ // to be valid. If no valid facename is given, sets the
+ // first valid facename returned by wxFontEnumerator::GetFacenames().
+ // Does not return a bool since it cannot fail.
+ void SetFaceName(const wxArrayString &facenames);
+
+
+ // it is important to be able to serialize wxNativeFontInfo objects to be
+ // able to store them (in config file, for example)
+ bool FromString(const wxString& s);
+ wxString ToString() const;
+
+ // we also want to present the native font descriptions to the user in some
+ // human-readable form (it is not platform independent neither, but can
+ // hopefully be understood by the user)
+ bool FromUserString(const wxString& s);
+ wxString ToUserString() const;
+};
+
+// ----------------------------------------------------------------------------
+// font-related functions (common)
+// ----------------------------------------------------------------------------
+
+// translate a wxFontEncoding into native encoding parameter (defined above),
+// returning true if an (exact) macth could be found, false otherwise (without
+// attempting any substitutions)
+extern bool wxGetNativeFontEncoding(wxFontEncoding encoding,
+ wxNativeEncodingInfo *info);
+
+// test for the existence of the font described by this facename/encoding,
+// return true if such font(s) exist, false otherwise
+extern bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
+
+// ----------------------------------------------------------------------------
+// font-related functions (X and GTK)
+// ----------------------------------------------------------------------------
+
+#ifdef _WX_X_FONTLIKE
+ #include "wx/unix/fontutil.h"
+#endif // X || GDK
+
+#endif // _WX_FONTUTIL_H_
diff --git a/3rdparty/wxWidgets/include/wx/frame.h b/3rdparty/wxWidgets/include/wx/frame.h
new file mode 100644
index 0000000000..cecbf1b5d4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/frame.h
@@ -0,0 +1,262 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/frame.h
+// Purpose: wxFrame class interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 15.11.99
+// RCS-ID: $Id: frame.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FRAME_H_BASE_
+#define _WX_FRAME_H_BASE_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/toplevel.h" // the base class
+
+// the default names for various classs
+extern WXDLLEXPORT_DATA(const wxChar) wxStatusLineNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxToolBarNameStr[];
+
+class WXDLLIMPEXP_FWD_CORE wxFrame;
+class WXDLLIMPEXP_FWD_CORE wxMenuBar;
+class WXDLLIMPEXP_FWD_CORE wxStatusBar;
+class WXDLLIMPEXP_FWD_CORE wxToolBar;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// wxFrame-specific (i.e. not for wxDialog) styles
+#define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only)
+#define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu
+#define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent
+#define wxFRAME_SHAPED 0x0010 // Create a window that is able to be shaped
+
+// ----------------------------------------------------------------------------
+// wxFrame is a top-level window with optional menubar, statusbar and toolbar
+//
+// For each of *bars, a frame may have several of them, but only one is
+// managed by the frame, i.e. resized/moved when the frame is and whose size
+// is accounted for in client size calculations - all others should be taken
+// care of manually. The CreateXXXBar() functions create this, main, XXXBar,
+// but the actual creation is done in OnCreateXXXBar() functions which may be
+// overridden to create custom objects instead of standard ones when
+// CreateXXXBar() is called.
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFrameBase : public wxTopLevelWindow
+{
+public:
+ // construction
+ wxFrameBase();
+ virtual ~wxFrameBase();
+
+ wxFrame *New(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+ // frame state
+ // -----------
+
+ // get the origin of the client area (which may be different from (0, 0)
+ // if the frame has a toolbar) in client coordinates
+ virtual wxPoint GetClientAreaOrigin() const;
+
+ // sends a size event to the window using its current size -- this has an
+ // effect of refreshing the window layout
+ virtual void SendSizeEvent();
+
+ // menu bar functions
+ // ------------------
+
+#if wxUSE_MENUS
+ virtual void SetMenuBar(wxMenuBar *menubar);
+ virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; }
+#endif // wxUSE_MENUS
+
+ // process menu command: returns true if processed
+ bool ProcessCommand(int winid);
+
+ // status bar functions
+ // --------------------
+#if wxUSE_STATUSBAR
+ // create the main status bar by calling OnCreateStatusBar()
+ virtual wxStatusBar* CreateStatusBar(int number = 1,
+ long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
+ wxWindowID winid = 0,
+ const wxString& name =
+ wxStatusLineNameStr);
+ // return a new status bar
+ virtual wxStatusBar *OnCreateStatusBar(int number,
+ long style,
+ wxWindowID winid,
+ const wxString& name);
+ // get the main status bar
+ virtual wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
+
+ // sets the main status bar
+ virtual void SetStatusBar(wxStatusBar *statBar);
+
+ // forward these to status bar
+ virtual void SetStatusText(const wxString &text, int number = 0);
+ virtual void SetStatusWidths(int n, const int widths_field[]);
+ void PushStatusText(const wxString &text, int number = 0);
+ void PopStatusText(int number = 0);
+
+ // set the status bar pane the help will be shown in
+ void SetStatusBarPane(int n) { m_statusBarPane = n; }
+ int GetStatusBarPane() const { return m_statusBarPane; }
+#endif // wxUSE_STATUSBAR
+
+ // toolbar functions
+ // -----------------
+
+#if wxUSE_TOOLBAR
+ // create main toolbar bycalling OnCreateToolBar()
+ virtual wxToolBar* CreateToolBar(long style = -1,
+ wxWindowID winid = wxID_ANY,
+ const wxString& name = wxToolBarNameStr);
+ // return a new toolbar
+ virtual wxToolBar *OnCreateToolBar(long style,
+ wxWindowID winid,
+ const wxString& name );
+
+ // get/set the main toolbar
+ virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
+ virtual void SetToolBar(wxToolBar *toolbar);
+#endif // wxUSE_TOOLBAR
+
+ // implementation only from now on
+ // -------------------------------
+
+ // event handlers
+#if wxUSE_MENUS
+#if wxUSE_STATUSBAR
+ void OnMenuOpen(wxMenuEvent& event);
+ void OnMenuClose(wxMenuEvent& event);
+ void OnMenuHighlight(wxMenuEvent& event);
+#endif // wxUSE_STATUSBAR
+
+ // send wxUpdateUIEvents for all menu items in the menubar,
+ // or just for menu if non-NULL
+ virtual void DoMenuUpdates(wxMenu* menu = NULL);
+#endif // wxUSE_MENUS
+
+ // do the UI update processing for this window
+ virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
+
+ // Implement internal behaviour (menu updating on some platforms)
+ virtual void OnInternalIdle();
+
+ // if there is no real wxTopLevelWindow on this platform we have to define
+ // some wxTopLevelWindowBase pure virtual functions here to avoid breaking
+ // old ports (wxMotif) which don't define them in wxFrame
+#ifndef wxTopLevelWindowNative
+ virtual bool ShowFullScreen(bool WXUNUSED(show),
+ long WXUNUSED(style) = wxFULLSCREEN_ALL)
+ { return false; }
+ virtual bool IsFullScreen() const
+ { return false; }
+#endif // no wxTopLevelWindowNative
+
+#if wxUSE_MENUS || wxUSE_TOOLBAR
+ // show help text (typically in the statusbar); show is false
+ // if you are hiding the help, true otherwise
+ virtual void DoGiveHelp(const wxString& text, bool show);
+#endif
+
+protected:
+ // the frame main menu/status/tool bars
+ // ------------------------------------
+
+ // this (non virtual!) function should be called from dtor to delete the
+ // main menubar, statusbar and toolbar (if any)
+ void DeleteAllBars();
+
+ // test whether this window makes part of the frame
+ virtual bool IsOneOfBars(const wxWindow *win) const;
+
+#if wxUSE_MENUS
+ // override to update menu bar position when the frame size changes
+ virtual void PositionMenuBar() { }
+
+ // override to do something special when the menu bar is being removed
+ // from the frame
+ virtual void DetachMenuBar();
+
+ // override to do something special when the menu bar is attached to the
+ // frame
+ virtual void AttachMenuBar(wxMenuBar *menubar);
+
+ wxMenuBar *m_frameMenuBar;
+#endif // wxUSE_MENUS
+
+#if wxUSE_STATUSBAR && (wxUSE_MENUS || wxUSE_TOOLBAR)
+ // the saved status bar text overwritten by DoGiveHelp()
+ wxString m_oldStatusText;
+#endif
+
+#if wxUSE_STATUSBAR
+ // override to update status bar position (or anything else) when
+ // something changes
+ virtual void PositionStatusBar() { }
+
+ // show the help string for this menu item in the given status bar: the
+ // status bar pointer can be NULL; return true if help was shown
+ bool ShowMenuHelp(wxStatusBar *statbar, int helpid);
+
+ wxStatusBar *m_frameStatusBar;
+#endif // wxUSE_STATUSBAR
+
+
+ int m_statusBarPane;
+
+#if wxUSE_TOOLBAR
+ // override to update status bar position (or anything else) when
+ // something changes
+ virtual void PositionToolBar() { }
+
+ wxToolBar *m_frameToolBar;
+#endif // wxUSE_TOOLBAR
+
+#if wxUSE_MENUS && wxUSE_STATUSBAR
+ DECLARE_EVENT_TABLE()
+#endif // wxUSE_MENUS && wxUSE_STATUSBAR
+
+ DECLARE_NO_COPY_CLASS(wxFrameBase)
+};
+
+// include the real class declaration
+#if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__)
+ #include "wx/univ/frame.h"
+#else // !__WXUNIVERSAL__
+ #if defined(__WXPALMOS__)
+ #include "wx/palmos/frame.h"
+ #elif defined(__WXMSW__)
+ #include "wx/msw/frame.h"
+ #elif defined(__WXGTK20__)
+ #include "wx/gtk/frame.h"
+ #elif defined(__WXGTK__)
+ #include "wx/gtk1/frame.h"
+ #elif defined(__WXMOTIF__)
+ #include "wx/motif/frame.h"
+ #elif defined(__WXMAC__)
+ #include "wx/mac/frame.h"
+ #elif defined(__WXCOCOA__)
+ #include "wx/cocoa/frame.h"
+ #elif defined(__WXPM__)
+ #include "wx/os2/frame.h"
+ #endif
+#endif
+
+#endif
+ // _WX_FRAME_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/fs_arc.h b/3rdparty/wxWidgets/include/wx/fs_arc.h
new file mode 100644
index 0000000000..c66f14b207
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fs_arc.h
@@ -0,0 +1,56 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fs_arc.h
+// Purpose: Archive file system
+// Author: Vaclav Slavik, Mike Wetherell
+// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
+// CVS-ID: $Id: fs_arc.h 42713 2006-10-30 11:56:12Z ABX $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FS_ARC_H_
+#define _WX_FS_ARC_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FS_ARCHIVE
+
+#include "wx/filesys.h"
+#include "wx/hashmap.h"
+
+WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap);
+
+//---------------------------------------------------------------------------
+// wxArchiveFSHandler
+//---------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxArchiveFSHandler : public wxFileSystemHandler
+{
+public:
+ wxArchiveFSHandler();
+ virtual bool CanOpen(const wxString& location);
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
+ virtual wxString FindFirst(const wxString& spec, int flags = 0);
+ virtual wxString FindNext();
+ void Cleanup();
+ virtual ~wxArchiveFSHandler();
+
+private:
+ class wxArchiveFSCache *m_cache;
+ wxFileSystem m_fs;
+
+ // these vars are used by FindFirst/Next:
+ class wxArchiveFSCacheData *m_Archive;
+ struct wxArchiveFSEntry *m_FindEntry;
+ wxString m_Pattern, m_BaseDir, m_ZipFile;
+ bool m_AllowDirs, m_AllowFiles;
+ wxArchiveFilenameHashMap *m_DirsFound;
+
+ wxString DoFind();
+
+ DECLARE_NO_COPY_CLASS(wxArchiveFSHandler)
+ DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler)
+};
+
+#endif // wxUSE_FS_ARCHIVE
+
+#endif // _WX_FS_ARC_H_
diff --git a/3rdparty/wxWidgets/include/wx/fs_filter.h b/3rdparty/wxWidgets/include/wx/fs_filter.h
new file mode 100644
index 0000000000..f4e7e13870
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fs_filter.h
@@ -0,0 +1,41 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fs_filter.h
+// Purpose: Filter file system handler
+// Author: Mike Wetherell
+// Copyright: (c) 2006 Mike Wetherell
+// CVS-ID: $Id: fs_filter.h 42713 2006-10-30 11:56:12Z ABX $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FS_FILTER_H_
+#define _WX_FS_FILTER_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FILESYSTEM
+
+#include "wx/filesys.h"
+
+//---------------------------------------------------------------------------
+// wxFilterFSHandler
+//---------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxFilterFSHandler : public wxFileSystemHandler
+{
+public:
+ wxFilterFSHandler() : wxFileSystemHandler() { }
+ virtual ~wxFilterFSHandler() { }
+
+ virtual bool CanOpen(const wxString& location);
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
+
+ virtual wxString FindFirst(const wxString& spec, int flags = 0);
+ virtual wxString FindNext();
+
+private:
+ DECLARE_NO_COPY_CLASS(wxFilterFSHandler)
+};
+
+#endif // wxUSE_FILESYSTEM
+
+#endif // _WX_FS_FILTER_H_
diff --git a/3rdparty/wxWidgets/include/wx/fs_inet.h b/3rdparty/wxWidgets/include/wx/fs_inet.h
new file mode 100644
index 0000000000..3e29572b05
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fs_inet.h
@@ -0,0 +1,33 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: fs_inet.h
+// Purpose: HTTP and FTP file system
+// Author: Vaclav Slavik
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FS_INET_H_
+#define _WX_FS_INET_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
+
+#include "wx/filesys.h"
+
+// ----------------------------------------------------------------------------
+// wxInternetFSHandler
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_NET wxInternetFSHandler : public wxFileSystemHandler
+{
+ public:
+ virtual bool CanOpen(const wxString& location);
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
+};
+
+#endif
+ // wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
+
+#endif // _WX_FS_INET_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/fs_mem.h b/3rdparty/wxWidgets/include/wx/fs_mem.h
new file mode 100644
index 0000000000..5c93134854
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fs_mem.h
@@ -0,0 +1,127 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: fs_mem.h
+// Purpose: in-memory file system
+// Author: Vaclav Slavik
+// Copyright: (c) 2000 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FS_MEM_H_
+#define _WX_FS_MEM_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FILESYSTEM
+
+#include "wx/filesys.h"
+
+#if wxUSE_GUI
+ class WXDLLIMPEXP_FWD_CORE wxBitmap;
+ class WXDLLIMPEXP_FWD_CORE wxImage;
+#endif // wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// wxMemoryFSHandlerBase
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxMemoryFSHandlerBase : public wxFileSystemHandler
+{
+public:
+ wxMemoryFSHandlerBase();
+ virtual ~wxMemoryFSHandlerBase();
+
+ // Add file to list of files stored in memory. Stored data (bitmap, text or
+ // raw data) will be copied into private memory stream and available under
+ // name "memory:" + filename
+ static void AddFile(const wxString& filename, const wxString& textdata);
+ static void AddFile(const wxString& filename, const void *binarydata, size_t size);
+#if wxABI_VERSION >= 20805
+ static void AddFileWithMimeType(const wxString& filename,
+ const wxString& textdata,
+ const wxString& mimetype);
+ static void AddFileWithMimeType(const wxString& filename,
+ const void *binarydata, size_t size,
+ const wxString& mimetype);
+#endif // wxABI_VERSION >= 20805
+
+ // Remove file from memory FS and free occupied memory
+ static void RemoveFile(const wxString& filename);
+
+ virtual bool CanOpen(const wxString& location);
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
+ virtual wxString FindFirst(const wxString& spec, int flags = 0);
+ virtual wxString FindNext();
+
+protected:
+ static bool CheckHash(const wxString& filename);
+ static wxHashTable *m_Hash;
+};
+
+// ----------------------------------------------------------------------------
+// wxMemoryFSHandler
+// ----------------------------------------------------------------------------
+
+#if wxUSE_GUI
+
+// add GUI-only operations to the base class
+class WXDLLIMPEXP_CORE wxMemoryFSHandler : public wxMemoryFSHandlerBase
+{
+public:
+ // bring the base class versions into the scope, otherwise they would be
+ // inaccessible in wxMemoryFSHandler
+ // (unfortunately "using" can't be used as gcc 2.95 doesn't have it...)
+ static void AddFile(const wxString& filename, const wxString& textdata)
+ {
+ wxMemoryFSHandlerBase::AddFile(filename, textdata);
+ }
+
+ static void AddFile(const wxString& filename,
+ const void *binarydata,
+ size_t size)
+ {
+ wxMemoryFSHandlerBase::AddFile(filename, binarydata, size);
+ }
+#if wxABI_VERSION >= 20805
+ static void AddFileWithMimeType(const wxString& filename,
+ const wxString& textdata,
+ const wxString& mimetype)
+ {
+ wxMemoryFSHandlerBase::AddFileWithMimeType(filename,
+ textdata,
+ mimetype);
+ }
+ static void AddFileWithMimeType(const wxString& filename,
+ const void *binarydata, size_t size,
+ const wxString& mimetype)
+ {
+ wxMemoryFSHandlerBase::AddFileWithMimeType(filename,
+ binarydata, size,
+ mimetype);
+ }
+#endif // wxABI_VERSION >= 20805
+
+#if wxUSE_IMAGE
+ static void AddFile(const wxString& filename,
+ const wxImage& image,
+ long type);
+
+ static void AddFile(const wxString& filename,
+ const wxBitmap& bitmap,
+ long type);
+#endif // wxUSE_IMAGE
+
+};
+
+#else // !wxUSE_GUI
+
+// just the same thing as the base class in wxBase
+class WXDLLIMPEXP_BASE wxMemoryFSHandler : public wxMemoryFSHandlerBase
+{
+};
+
+#endif // wxUSE_GUI/!wxUSE_GUI
+
+#endif // wxUSE_FILESYSTEM
+
+#endif // _WX_FS_MEM_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/fs_zip.h b/3rdparty/wxWidgets/include/wx/fs_zip.h
new file mode 100644
index 0000000000..8d39e9fc4d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/fs_zip.h
@@ -0,0 +1,23 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/fs_zip.h
+// Purpose: wxZipFSHandler typedef for compatibility
+// Author: Mike Wetherell
+// Copyright: (c) 2006 Mike Wetherell
+// CVS-ID: $Id: fs_zip.h 42713 2006-10-30 11:56:12Z ABX $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FS_ZIP_H_
+#define _WX_FS_ZIP_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FS_ZIP
+
+#include "wx/fs_arc.h"
+
+typedef wxArchiveFSHandler wxZipFSHandler;
+
+#endif // wxUSE_FS_ZIP
+
+#endif // _WX_FS_ZIP_H_
diff --git a/3rdparty/wxWidgets/include/wx/gauge.h b/3rdparty/wxWidgets/include/wx/gauge.h
new file mode 100644
index 0000000000..a8accc082a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/gauge.h
@@ -0,0 +1,126 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/gauge.h
+// Purpose: wxGauge interface
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 20.02.01
+// RCS-ID: $Id: gauge.h 41089 2006-09-09 13:36:54Z RR $
+// Copyright: (c) 1996-2001 wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GAUGE_H_BASE_
+#define _WX_GAUGE_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_GAUGE
+
+#include "wx/control.h"
+
+// ----------------------------------------------------------------------------
+// wxGauge style flags
+// ----------------------------------------------------------------------------
+
+#define wxGA_HORIZONTAL wxHORIZONTAL
+#define wxGA_VERTICAL wxVERTICAL
+
+// Win32 only, is default (and only) on some other platforms
+#define wxGA_SMOOTH 0x0020
+
+#if WXWIN_COMPATIBILITY_2_6
+ // obsolete style
+ #define wxGA_PROGRESSBAR 0
+#endif // WXWIN_COMPATIBILITY_2_6
+
+// GTK and Mac always have native implementation of the indeterminate mode
+// wxMSW has native implementation only if comctl32.dll >= 6.00
+#if !defined(__WXGTK20__) && !defined(__WXMAC__) && !defined(__WXCOCOA__)
+ #define wxGAUGE_EMULATE_INDETERMINATE_MODE 1
+#else
+ #define wxGAUGE_EMULATE_INDETERMINATE_MODE 0
+#endif
+
+extern WXDLLEXPORT_DATA(const wxChar) wxGaugeNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxGauge: a progress bar
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGaugeBase : public wxControl
+{
+public:
+ wxGaugeBase() { m_rangeMax = m_gaugePos = 0; }
+ virtual ~wxGaugeBase();
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ int range,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxGA_HORIZONTAL,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxGaugeNameStr);
+
+ // determinate mode API
+
+ // set/get the control range
+ virtual void SetRange(int range);
+ virtual int GetRange() const;
+
+ virtual void SetValue(int pos);
+ virtual int GetValue() const;
+
+ // indeterminate mode API
+ virtual void Pulse();
+
+ // simple accessors
+ bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
+
+ // appearance params (not implemented for most ports)
+ virtual void SetShadowWidth(int w);
+ virtual int GetShadowWidth() const;
+
+ virtual void SetBezelFace(int w);
+ virtual int GetBezelFace() const;
+
+ // overriden base class virtuals
+ virtual bool AcceptsFocus() const { return false; }
+
+protected:
+ // the max position
+ int m_rangeMax;
+
+ // the current position
+ int m_gaugePos;
+
+#if wxGAUGE_EMULATE_INDETERMINATE_MODE
+ int m_nDirection; // can be wxRIGHT or wxLEFT
+#endif
+
+ DECLARE_NO_COPY_CLASS(wxGaugeBase)
+};
+
+#if defined(__WXUNIVERSAL__)
+ #include "wx/univ/gauge.h"
+#elif defined(__WXMSW__)
+ #include "wx/msw/gauge95.h"
+ #define wxGauge wxGauge95
+#elif defined(__WXMOTIF__)
+ #include "wx/motif/gauge.h"
+#elif defined(__WXGTK20__)
+ #include "wx/gtk/gauge.h"
+#elif defined(__WXGTK__)
+ #include "wx/gtk1/gauge.h"
+#elif defined(__WXMAC__)
+ #include "wx/mac/gauge.h"
+#elif defined(__WXCOCOA__)
+ #include "wx/cocoa/gauge.h"
+#elif defined(__WXPM__)
+ #include "wx/os2/gauge.h"
+#endif
+
+#endif // wxUSE_GAUGE
+
+#endif
+ // _WX_GAUGE_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/gbsizer.h b/3rdparty/wxWidgets/include/wx/gbsizer.h
new file mode 100644
index 0000000000..9ea8b9e91e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/gbsizer.h
@@ -0,0 +1,303 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: gbsizer.h
+// Purpose: wxGridBagSizer: A sizer that can lay out items in a grid,
+// with items at specified cells, and with the option of row
+// and/or column spanning
+//
+// Author: Robin Dunn
+// Created: 03-Nov-2003
+// RCS-ID: $Id: gbsizer.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Robin Dunn
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __WXGBSIZER_H__
+#define __WXGBSIZER_H__
+
+#include "wx/sizer.h"
+
+
+//---------------------------------------------------------------------------
+// Classes to represent a position in the grid and a size of an item in the
+// grid, IOW, the number of rows and columns it occupies. I chose to use these
+// instead of wxPoint and wxSize because they are (x,y) and usually pixel
+// oriented while grids and tables are usually thought of as (row,col) so some
+// confusion would definitely result in using wxPoint...
+//
+// NOTE: This should probably be refactored to a common RowCol data type which
+// is used for this and also for wxGridCellCoords.
+//---------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGBPosition
+{
+public:
+ wxGBPosition() : m_row(0), m_col(0) {}
+ wxGBPosition(int row, int col) : m_row(row), m_col(col) {}
+
+ // default copy ctor and assignment operator are okay.
+
+ int GetRow() const { return m_row; }
+ int GetCol() const { return m_col; }
+ void SetRow(int row) { m_row = row; }
+ void SetCol(int col) { m_col = col; }
+
+ bool operator==(const wxGBPosition& p) const { return m_row == p.m_row && m_col == p.m_col; }
+ bool operator!=(const wxGBPosition& p) const { return !(*this == p); }
+
+private:
+ int m_row;
+ int m_col;
+};
+
+
+class WXDLLEXPORT wxGBSpan
+{
+public:
+ wxGBSpan() : m_rowspan(1), m_colspan(1) {}
+ wxGBSpan(int rowspan, int colspan) : m_rowspan(rowspan), m_colspan(colspan) {}
+
+ // default copy ctor and assignment operator are okay.
+
+ int GetRowspan() const { return m_rowspan; }
+ int GetColspan() const { return m_colspan; }
+ void SetRowspan(int rowspan) { m_rowspan = rowspan; }
+ void SetColspan(int colspan) { m_colspan = colspan; }
+
+ bool operator==(const wxGBSpan& o) const { return m_rowspan == o.m_rowspan && m_colspan == o.m_colspan; }
+ bool operator!=(const wxGBSpan& o) const { return !(*this == o); }
+
+private:
+ int m_rowspan;
+ int m_colspan;
+};
+
+
+extern WXDLLEXPORT_DATA(const wxGBSpan) wxDefaultSpan;
+
+
+//---------------------------------------------------------------------------
+// wxGBSizerItem
+//---------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxGridBagSizer;
+
+
+class WXDLLEXPORT wxGBSizerItem : public wxSizerItem
+{
+public:
+ // spacer
+ wxGBSizerItem( int width,
+ int height,
+ const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag,
+ int border,
+ wxObject* userData);
+
+ // window
+ wxGBSizerItem( wxWindow *window,
+ const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag,
+ int border,
+ wxObject* userData );
+
+ // subsizer
+ wxGBSizerItem( wxSizer *sizer,
+ const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag,
+ int border,
+ wxObject* userData );
+
+ // default ctor
+ wxGBSizerItem();
+
+
+ // Get the grid position of the item
+ wxGBPosition GetPos() const { return m_pos; }
+ void GetPos(int& row, int& col) const;
+
+ // Get the row and column spanning of the item
+ wxGBSpan GetSpan() const { return m_span; }
+ void GetSpan(int& rowspan, int& colspan) const;
+
+ // If the item is already a member of a sizer then first ensure that there
+ // is no other item that would intersect with this one at the new
+ // position, then set the new position. Returns true if the change is
+ // successful and after the next Layout the item will be moved.
+ bool SetPos( const wxGBPosition& pos );
+
+ // If the item is already a member of a sizer then first ensure that there
+ // is no other item that would intersect with this one with its new
+ // spanning size, then set the new spanning. Returns true if the change
+ // is successful and after the next Layout the item will be resized.
+ bool SetSpan( const wxGBSpan& span );
+
+ // Returns true if this item and the other item instersect
+ bool Intersects(const wxGBSizerItem& other);
+
+ // Returns true if the given pos/span would intersect with this item.
+ bool Intersects(const wxGBPosition& pos, const wxGBSpan& span);
+
+ // Get the row and column of the endpoint of this item
+ void GetEndPos(int& row, int& col);
+
+
+ wxGridBagSizer* GetGBSizer() const { return m_gbsizer; }
+ void SetGBSizer(wxGridBagSizer* sizer) { m_gbsizer = sizer; }
+
+
+protected:
+ wxGBPosition m_pos;
+ wxGBSpan m_span;
+ wxGridBagSizer* m_gbsizer; // so SetPos/SetSpan can check for intersects
+
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGBSizerItem)
+ DECLARE_NO_COPY_CLASS(wxGBSizerItem)
+};
+
+
+//---------------------------------------------------------------------------
+// wxGridBagSizer
+//---------------------------------------------------------------------------
+
+
+class WXDLLEXPORT wxGridBagSizer : public wxFlexGridSizer
+{
+public:
+ wxGridBagSizer(int vgap = 0, int hgap = 0 );
+
+ // The Add methods return true if the item was successfully placed at the
+ // given position, false if something was already there.
+ wxSizerItem* Add( wxWindow *window,
+ const wxGBPosition& pos,
+ const wxGBSpan& span = wxDefaultSpan,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = NULL );
+ wxSizerItem* Add( wxSizer *sizer,
+ const wxGBPosition& pos,
+ const wxGBSpan& span = wxDefaultSpan,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = NULL );
+ wxSizerItem* Add( int width,
+ int height,
+ const wxGBPosition& pos,
+ const wxGBSpan& span = wxDefaultSpan,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = NULL );
+ wxSizerItem* Add( wxGBSizerItem *item );
+
+
+ // Get/Set the size used for cells in the grid with no item.
+ wxSize GetEmptyCellSize() const { return m_emptyCellSize; }
+ void SetEmptyCellSize(const wxSize& sz) { m_emptyCellSize = sz; }
+
+ // Get the size of the specified cell, including hgap and vgap. Only
+ // valid after a Layout.
+ wxSize GetCellSize(int row, int col) const;
+
+ // Get the grid position of the specified item (non-recursive)
+ wxGBPosition GetItemPosition(wxWindow *window);
+ wxGBPosition GetItemPosition(wxSizer *sizer);
+ wxGBPosition GetItemPosition(size_t index);
+
+ // Set the grid position of the specified item. Returns true on success.
+ // If the move is not allowed (because an item is already there) then
+ // false is returned. (non-recursive)
+ bool SetItemPosition(wxWindow *window, const wxGBPosition& pos);
+ bool SetItemPosition(wxSizer *sizer, const wxGBPosition& pos);
+ bool SetItemPosition(size_t index, const wxGBPosition& pos);
+
+ // Get the row/col spanning of the specified item (non-recursive)
+ wxGBSpan GetItemSpan(wxWindow *window);
+ wxGBSpan GetItemSpan(wxSizer *sizer);
+ wxGBSpan GetItemSpan(size_t index);
+
+ // Set the row/col spanning of the specified item. Returns true on
+ // success. If the move is not allowed (because an item is already there)
+ // then false is returned. (non-recursive)
+ bool SetItemSpan(wxWindow *window, const wxGBSpan& span);
+ bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span);
+ bool SetItemSpan(size_t index, const wxGBSpan& span);
+
+
+ // Find the sizer item for the given window or subsizer, returns NULL if
+ // not found. (non-recursive)
+ wxGBSizerItem* FindItem(wxWindow* window);
+ wxGBSizerItem* FindItem(wxSizer* sizer);
+
+
+ // Return the sizer item for the given grid cell, or NULL if there is no
+ // item at that position. (non-recursive)
+ wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos);
+
+
+ // Return the sizer item located at the point given in pt, or NULL if
+ // there is no item at that point. The (x,y) coordinates in pt correspond
+ // to the client coordinates of the window using the sizer for
+ // layout. (non-recursive)
+ wxGBSizerItem* FindItemAtPoint(const wxPoint& pt);
+
+
+ // Return the sizer item that has a matching user data (it only compares
+ // pointer values) or NULL if not found. (non-recursive)
+ wxGBSizerItem* FindItemWithData(const wxObject* userData);
+
+
+ // These are what make the sizer do size calculations and layout
+ virtual void RecalcSizes();
+ virtual wxSize CalcMin();
+
+
+ // Look at all items and see if any intersect (or would overlap) the given
+ // item. Returns true if so, false if there would be no overlap. If an
+ // excludeItem is given then it will not be checked for intersection, for
+ // example it may be the item we are checking the position of.
+ bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL);
+ bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL);
+
+
+ // The Add base class virtuals should not be used with this class, but
+ // we'll try to make them automatically select a location for the item
+ // anyway.
+ virtual wxSizerItem* Add( wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Add( wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Add( int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+
+ // The Insert and Prepend base class virtuals that are not appropriate for
+ // this class and should not be used. Their implementation in this class
+ // simply fails.
+ virtual wxSizerItem* Add( wxSizerItem *item );
+ virtual wxSizerItem* Insert( size_t index, wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Insert( size_t index, wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Insert( size_t index, int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Insert( size_t index, wxSizerItem *item );
+ virtual wxSizerItem* Prepend( wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Prepend( wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Prepend( int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL );
+ virtual wxSizerItem* Prepend( wxSizerItem *item );
+
+
+protected:
+ wxGBPosition FindEmptyCell();
+#if wxABI_VERSION >= 20808
+ void AdjustForOverflow();
+#endif
+
+ wxSize m_emptyCellSize;
+
+
+private:
+
+ DECLARE_CLASS(wxGridBagSizer)
+ DECLARE_NO_COPY_CLASS(wxGridBagSizer)
+};
+
+//---------------------------------------------------------------------------
+#endif
diff --git a/3rdparty/wxWidgets/include/wx/gdicmn.h b/3rdparty/wxWidgets/include/wx/gdicmn.h
new file mode 100644
index 0000000000..3ec1f6ac63
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/gdicmn.h
@@ -0,0 +1,755 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/gdicmn.h
+// Purpose: Common GDI classes, types and declarations
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: gdicmn.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GDICMNH__
+#define _WX_GDICMNH__
+
+// ---------------------------------------------------------------------------
+// headers
+// ---------------------------------------------------------------------------
+
+#include "wx/defs.h"
+#include "wx/list.h"
+#include "wx/string.h"
+#include "wx/fontenc.h"
+#include "wx/hashmap.h"
+#include "wx/math.h"
+
+// ---------------------------------------------------------------------------
+// forward declarations
+// ---------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxBitmap;
+class WXDLLIMPEXP_FWD_CORE wxBrush;
+class WXDLLIMPEXP_FWD_CORE wxColour;
+class WXDLLIMPEXP_FWD_CORE wxCursor;
+class WXDLLIMPEXP_FWD_CORE wxFont;
+class WXDLLIMPEXP_FWD_CORE wxIcon;
+class WXDLLIMPEXP_FWD_CORE wxPalette;
+class WXDLLIMPEXP_FWD_CORE wxPen;
+class WXDLLIMPEXP_FWD_CORE wxRegion;
+class WXDLLIMPEXP_FWD_BASE wxString;
+
+// ---------------------------------------------------------------------------
+// constants
+// ---------------------------------------------------------------------------
+
+// Bitmap flags
+enum wxBitmapType
+{
+ wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility!
+ wxBITMAP_TYPE_BMP,
+ wxBITMAP_TYPE_BMP_RESOURCE,
+ wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
+ wxBITMAP_TYPE_ICO,
+ wxBITMAP_TYPE_ICO_RESOURCE,
+ wxBITMAP_TYPE_CUR,
+ wxBITMAP_TYPE_CUR_RESOURCE,
+ wxBITMAP_TYPE_XBM,
+ wxBITMAP_TYPE_XBM_DATA,
+ wxBITMAP_TYPE_XPM,
+ wxBITMAP_TYPE_XPM_DATA,
+ wxBITMAP_TYPE_TIF,
+ wxBITMAP_TYPE_TIF_RESOURCE,
+ wxBITMAP_TYPE_GIF,
+ wxBITMAP_TYPE_GIF_RESOURCE,
+ wxBITMAP_TYPE_PNG,
+ wxBITMAP_TYPE_PNG_RESOURCE,
+ wxBITMAP_TYPE_JPEG,
+ wxBITMAP_TYPE_JPEG_RESOURCE,
+ wxBITMAP_TYPE_PNM,
+ wxBITMAP_TYPE_PNM_RESOURCE,
+ wxBITMAP_TYPE_PCX,
+ wxBITMAP_TYPE_PCX_RESOURCE,
+ wxBITMAP_TYPE_PICT,
+ wxBITMAP_TYPE_PICT_RESOURCE,
+ wxBITMAP_TYPE_ICON,
+ wxBITMAP_TYPE_ICON_RESOURCE,
+ wxBITMAP_TYPE_ANI,
+ wxBITMAP_TYPE_IFF,
+ wxBITMAP_TYPE_TGA,
+ wxBITMAP_TYPE_MACCURSOR,
+ wxBITMAP_TYPE_MACCURSOR_RESOURCE,
+ wxBITMAP_TYPE_ANY = 50
+};
+
+// Standard cursors
+enum wxStockCursor
+{
+ wxCURSOR_NONE, // should be 0
+ wxCURSOR_ARROW,
+ wxCURSOR_RIGHT_ARROW,
+ wxCURSOR_BULLSEYE,
+ wxCURSOR_CHAR,
+ wxCURSOR_CROSS,
+ wxCURSOR_HAND,
+ wxCURSOR_IBEAM,
+ wxCURSOR_LEFT_BUTTON,
+ wxCURSOR_MAGNIFIER,
+ wxCURSOR_MIDDLE_BUTTON,
+ wxCURSOR_NO_ENTRY,
+ wxCURSOR_PAINT_BRUSH,
+ wxCURSOR_PENCIL,
+ wxCURSOR_POINT_LEFT,
+ wxCURSOR_POINT_RIGHT,
+ wxCURSOR_QUESTION_ARROW,
+ wxCURSOR_RIGHT_BUTTON,
+ wxCURSOR_SIZENESW,
+ wxCURSOR_SIZENS,
+ wxCURSOR_SIZENWSE,
+ wxCURSOR_SIZEWE,
+ wxCURSOR_SIZING,
+ wxCURSOR_SPRAYCAN,
+ wxCURSOR_WAIT,
+ wxCURSOR_WATCH,
+ wxCURSOR_BLANK,
+#ifdef __WXGTK__
+ wxCURSOR_DEFAULT, // standard X11 cursor
+#endif
+#ifdef __WXMAC__
+ wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
+#endif
+#ifdef __X__
+ // Not yet implemented for Windows
+ wxCURSOR_CROSS_REVERSE,
+ wxCURSOR_DOUBLE_ARROW,
+ wxCURSOR_BASED_ARROW_UP,
+ wxCURSOR_BASED_ARROW_DOWN,
+#endif // X11
+
+ wxCURSOR_ARROWWAIT,
+
+ wxCURSOR_MAX
+};
+
+#ifndef __WXGTK__
+ #define wxCURSOR_DEFAULT wxCURSOR_ARROW
+#endif
+
+// ---------------------------------------------------------------------------
+// macros
+// ---------------------------------------------------------------------------
+
+/* Useful macro for creating icons portably, for example:
+
+ wxIcon *icon = new wxICON(mondrian);
+
+ expands into:
+
+ wxIcon *icon = new wxIcon("mondrian"); // On wxMSW
+ wxIcon *icon = new wxIcon(mondrian_xpm); // On wxGTK
+ */
+
+#ifdef __WXMSW__
+ // Load from a resource
+ #define wxICON(X) wxIcon(wxT(#X))
+#elif defined(__WXPM__)
+ // Load from a resource
+ #define wxICON(X) wxIcon(wxT(#X))
+#elif defined(__WXMGL__)
+ // Initialize from an included XPM
+ #define wxICON(X) wxIcon( (const char**) X##_xpm )
+#elif defined(__WXDFB__)
+ // Initialize from an included XPM
+ #define wxICON(X) wxIcon( (const char**) X##_xpm )
+#elif defined(__WXGTK__)
+ // Initialize from an included XPM
+ #define wxICON(X) wxIcon( (const char**) X##_xpm )
+#elif defined(__WXMAC__)
+ // Initialize from an included XPM
+ #define wxICON(X) wxIcon( (const char**) X##_xpm )
+#elif defined(__WXMOTIF__)
+ // Initialize from an included XPM
+ #define wxICON(X) wxIcon( X##_xpm )
+#elif defined(__WXX11__)
+ // Initialize from an included XPM
+ #define wxICON(X) wxIcon( X##_xpm )
+#else
+ // This will usually mean something on any platform
+ #define wxICON(X) wxIcon(wxT(#X))
+#endif // platform
+
+/* Another macro: this one is for portable creation of bitmaps. We assume that
+ under Unix bitmaps live in XPMs and under Windows they're in ressources.
+ */
+
+#if defined(__WXMSW__) || defined(__WXPM__)
+ #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE)
+#elif defined(__WXGTK__) || \
+ defined(__WXMOTIF__) || \
+ defined(__WXX11__) || \
+ defined(__WXMAC__) || \
+ defined(__WXMGL__) || \
+ defined(__WXDFB__) || \
+ defined(__WXCOCOA__)
+ // Initialize from an included XPM
+ #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
+#else // other platforms
+ #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM)
+#endif // platform
+
+// ===========================================================================
+// classes
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// wxSize
+// ---------------------------------------------------------------------------
+
+class WXDLLEXPORT wxSize
+{
+public:
+ // members are public for compatibility, don't use them directly.
+ int x, y;
+
+ // constructors
+ wxSize() : x(0), y(0) { }
+ wxSize(int xx, int yy) : x(xx), y(yy) { }
+
+ // no copy ctor or assignment operator - the defaults are ok
+
+ bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
+ bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; }
+
+ wxSize operator+(const wxSize& sz) const { return wxSize(x + sz.x, y + sz.y); }
+ wxSize operator-(const wxSize& sz) const { return wxSize(x - sz.x, y - sz.y); }
+ wxSize operator/(int i) const { return wxSize(x / i, y / i); }
+ wxSize operator*(int i) const { return wxSize(x * i, y * i); }
+
+ wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; }
+ wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }
+ wxSize& operator/=(const int i) { x /= i; y /= i; return *this; }
+ wxSize& operator*=(const int i) { x *= i; y *= i; return *this; }
+
+ void IncTo(const wxSize& sz)
+ { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
+ void DecTo(const wxSize& sz)
+ { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; }
+
+ void IncBy(int dx, int dy) { x += dx; y += dy; }
+ void IncBy(const wxSize& sz) { IncBy(sz.x, sz.y); }
+ void IncBy(int d) { IncBy(d, d); }
+
+ void DecBy(int dx, int dy) { IncBy(-dx, -dy); }
+ void DecBy(const wxSize& sz) { DecBy(sz.x, sz.y); }
+ void DecBy(int d) { DecBy(d, d); }
+
+
+ wxSize& Scale(float xscale, float yscale)
+ { x = (int)(x*xscale); y = (int)(y*yscale); return *this; }
+
+ // accessors
+ void Set(int xx, int yy) { x = xx; y = yy; }
+ void SetWidth(int w) { x = w; }
+ void SetHeight(int h) { y = h; }
+
+ int GetWidth() const { return x; }
+ int GetHeight() const { return y; }
+
+ bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
+
+ // combine this size with the other one replacing the default (i.e. equal
+ // to wxDefaultCoord) components of this object with those of the other
+ void SetDefaults(const wxSize& size)
+ {
+ if ( x == wxDefaultCoord )
+ x = size.x;
+ if ( y == wxDefaultCoord )
+ y = size.y;
+ }
+
+ // compatibility
+ int GetX() const { return x; }
+ int GetY() const { return y; }
+};
+
+// ---------------------------------------------------------------------------
+// Point classes: with real or integer coordinates
+// ---------------------------------------------------------------------------
+
+class WXDLLEXPORT wxRealPoint
+{
+public:
+ double x;
+ double y;
+
+ wxRealPoint() : x(0.0), y(0.0) { }
+ wxRealPoint(double xx, double yy) : x(xx), y(yy) { }
+
+ wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); }
+ wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); }
+
+ bool operator==(const wxRealPoint& pt) const
+ {
+ return wxIsSameDouble(x, pt.x) && wxIsSameDouble(y, pt.y);
+ }
+ bool operator!=(const wxRealPoint& pt) const { return !(*this == pt); }
+};
+
+
+class WXDLLEXPORT wxPoint
+{
+public:
+ int x, y;
+
+ wxPoint() : x(0), y(0) { }
+ wxPoint(int xx, int yy) : x(xx), y(yy) { }
+
+ // no copy ctor or assignment operator - the defaults are ok
+
+ // comparison
+ bool operator==(const wxPoint& p) const { return x == p.x && y == p.y; }
+ bool operator!=(const wxPoint& p) const { return !(*this == p); }
+
+ // arithmetic operations (component wise)
+ wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); }
+ wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); }
+
+ wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
+ wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
+
+ wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
+ wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
+
+ wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
+ wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }
+
+ wxPoint operator-() const { return wxPoint(-x, -y); }
+};
+
+// ---------------------------------------------------------------------------
+// wxRect
+// ---------------------------------------------------------------------------
+
+class WXDLLEXPORT wxRect
+{
+public:
+ wxRect()
+ : x(0), y(0), width(0), height(0)
+ { }
+ wxRect(int xx, int yy, int ww, int hh)
+ : x(xx), y(yy), width(ww), height(hh)
+ { }
+ wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
+ wxRect(const wxPoint& pt, const wxSize& size)
+ : x(pt.x), y(pt.y), width(size.x), height(size.y)
+ { }
+ wxRect(const wxSize& size)
+ : x(0), y(0), width(size.x), height(size.y)
+ { }
+
+ // default copy ctor and assignment operators ok
+
+ int GetX() const { return x; }
+ void SetX(int xx) { x = xx; }
+
+ int GetY() const { return y; }
+ void SetY(int yy) { y = yy; }
+
+ int GetWidth() const { return width; }
+ void SetWidth(int w) { width = w; }
+
+ int GetHeight() const { return height; }
+ void SetHeight(int h) { height = h; }
+
+ wxPoint GetPosition() const { return wxPoint(x, y); }
+ void SetPosition( const wxPoint &p ) { x = p.x; y = p.y; }
+
+ wxSize GetSize() const { return wxSize(width, height); }
+ void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); }
+
+ bool IsEmpty() const { return (width <= 0) || (height <= 0); }
+
+ int GetLeft() const { return x; }
+ int GetTop() const { return y; }
+ int GetBottom() const { return y + height - 1; }
+ int GetRight() const { return x + width - 1; }
+
+ void SetLeft(int left) { x = left; }
+ void SetRight(int right) { width = right - x + 1; }
+ void SetTop(int top) { y = top; }
+ void SetBottom(int bottom) { height = bottom - y + 1; }
+
+ wxPoint GetTopLeft() const { return GetPosition(); }
+ wxPoint GetLeftTop() const { return GetTopLeft(); }
+ void SetTopLeft(const wxPoint &p) { SetPosition(p); }
+ void SetLeftTop(const wxPoint &p) { SetTopLeft(p); }
+
+ wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); }
+ wxPoint GetRightBottom() const { return GetBottomRight(); }
+ void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); }
+ void SetRightBottom(const wxPoint &p) { SetBottomRight(p); }
+
+ wxPoint GetTopRight() const { return wxPoint(GetRight(), GetTop()); }
+ wxPoint GetRightTop() const { return GetTopRight(); }
+ void SetTopRight(const wxPoint &p) { SetRight(p.x); SetTop(p.y); }
+ void SetRightTop(const wxPoint &p) { SetTopLeft(p); }
+
+ wxPoint GetBottomLeft() const { return wxPoint(GetLeft(), GetBottom()); }
+ wxPoint GetLeftBottom() const { return GetBottomLeft(); }
+ void SetBottomLeft(const wxPoint &p) { SetLeft(p.x); SetBottom(p.y); }
+ void SetLeftBottom(const wxPoint &p) { SetBottomLeft(p); }
+
+ // operations with rect
+ wxRect& Inflate(wxCoord dx, wxCoord dy);
+ wxRect& Inflate(const wxSize& d) { return Inflate(d.x, d.y); }
+ wxRect& Inflate(wxCoord d) { return Inflate(d, d); }
+ wxRect Inflate(wxCoord dx, wxCoord dy) const
+ {
+ wxRect r = *this;
+ r.Inflate(dx, dy);
+ return r;
+ }
+
+ wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); }
+ wxRect& Deflate(const wxSize& d) { return Inflate(-d.x, -d.y); }
+ wxRect& Deflate(wxCoord d) { return Inflate(-d); }
+ wxRect Deflate(wxCoord dx, wxCoord dy) const
+ {
+ wxRect r = *this;
+ r.Deflate(dx, dy);
+ return r;
+ }
+
+ void Offset(wxCoord dx, wxCoord dy) { x += dx; y += dy; }
+ void Offset(const wxPoint& pt) { Offset(pt.x, pt.y); }
+
+ wxRect& Intersect(const wxRect& rect);
+ wxRect Intersect(const wxRect& rect) const
+ {
+ wxRect r = *this;
+ r.Intersect(rect);
+ return r;
+ }
+
+ wxRect& Union(const wxRect& rect);
+ wxRect Union(const wxRect& rect) const
+ {
+ wxRect r = *this;
+ r.Union(rect);
+ return r;
+ }
+
+ // compare rectangles
+ bool operator==(const wxRect& rect) const;
+ bool operator!=(const wxRect& rect) const { return !(*this == rect); }
+
+ // return true if the point is (not strcitly) inside the rect
+ bool Contains(int x, int y) const;
+ bool Contains(const wxPoint& pt) const { return Contains(pt.x, pt.y); }
+ // return true if the rectangle is (not strcitly) inside the rect
+ bool Contains(const wxRect& rect) const;
+
+#if WXWIN_COMPATIBILITY_2_6
+ // use Contains() instead
+ wxDEPRECATED( bool Inside(int x, int y) const );
+ wxDEPRECATED( bool Inside(const wxPoint& pt) const );
+ wxDEPRECATED( bool Inside(const wxRect& rect) const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ // return true if the rectangles have a non empty intersection
+ bool Intersects(const wxRect& rect) const;
+
+
+ // these are like Union() but don't ignore empty rectangles
+ wxRect operator+(const wxRect& rect) const;
+ wxRect& operator+=(const wxRect& rect)
+ {
+ *this = *this + rect;
+ return *this;
+ }
+
+
+ // centre this rectangle in the given (usually, but not necessarily,
+ // larger) one
+ wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const
+ {
+ return wxRect(dir & wxHORIZONTAL ? r.x + (r.width - width)/2 : x,
+ dir & wxVERTICAL ? r.y + (r.height - height)/2 : y,
+ width, height);
+ }
+
+ wxRect CenterIn(const wxRect& r, int dir = wxBOTH) const
+ {
+ return CentreIn(r, dir);
+ }
+
+public:
+ int x, y, width, height;
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+inline bool wxRect::Inside(int cx, int cy) const { return Contains(cx, cy); }
+inline bool wxRect::Inside(const wxPoint& pt) const { return Contains(pt); }
+inline bool wxRect::Inside(const wxRect& rect) const { return Contains(rect); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
+
+// ---------------------------------------------------------------------------
+// Management of pens, brushes and fonts
+// ---------------------------------------------------------------------------
+
+typedef wxInt8 wxDash;
+
+class WXDLLIMPEXP_CORE wxGDIObjListBase {
+public:
+ wxGDIObjListBase();
+ ~wxGDIObjListBase();
+
+protected:
+ wxList list;
+};
+
+class WXDLLIMPEXP_CORE wxPenList: public wxGDIObjListBase
+{
+public:
+ wxPen *FindOrCreatePen(const wxColour& colour, int width, int style);
+#if WXWIN_COMPATIBILITY_2_6
+ wxDEPRECATED( void AddPen(wxPen*) );
+ wxDEPRECATED( void RemovePen(wxPen*) );
+#endif
+};
+
+class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
+{
+public:
+ wxBrush *FindOrCreateBrush(const wxColour& colour, int style = wxSOLID);
+#if WXWIN_COMPATIBILITY_2_6
+ wxDEPRECATED( void AddBrush(wxBrush*) );
+ wxDEPRECATED( void RemoveBrush(wxBrush*) );
+#endif
+};
+
+class WXDLLIMPEXP_CORE wxFontList: public wxGDIObjListBase
+{
+public:
+ wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
+ bool underline = false,
+ const wxString& face = wxEmptyString,
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+#if WXWIN_COMPATIBILITY_2_6
+ wxDEPRECATED( void AddFont(wxFont*) );
+ wxDEPRECATED( void RemoveFont(wxFont*) );
+#endif
+};
+
+WX_DECLARE_STRING_HASH_MAP(wxColour*, wxStringToColourHashMap);
+
+class WXDLLEXPORT wxColourDatabase
+{
+public:
+ wxColourDatabase();
+ ~wxColourDatabase();
+
+ // find colour by name or name for the given colour
+ wxColour Find(const wxString& name) const;
+ wxString FindName(const wxColour& colour) const;
+
+ // add a new colour to the database
+ void AddColour(const wxString& name, const wxColour& colour);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated, use Find() instead
+ wxDEPRECATED( wxColour *FindColour(const wxString& name) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+
+#ifdef __WXPM__
+ // PM keeps its own type of colour table
+ long* m_palTable;
+ size_t m_nSize;
+#endif
+
+private:
+ // load the database with the built in colour values when called for the
+ // first time, do nothing after this
+ void Initialize();
+
+ wxStringToColourHashMap *m_map;
+};
+
+class WXDLLEXPORT wxResourceCache: public wxList
+{
+public:
+ wxResourceCache() { }
+#if !wxUSE_STL
+ wxResourceCache(const unsigned int keyType) : wxList(keyType) { }
+#endif
+ virtual ~wxResourceCache();
+};
+
+// ---------------------------------------------------------------------------
+// global variables
+// ---------------------------------------------------------------------------
+
+// Lists of GDI objects
+extern WXDLLEXPORT_DATA(wxPenList*) wxThePenList;
+extern WXDLLEXPORT_DATA(wxBrushList*) wxTheBrushList;
+extern WXDLLEXPORT_DATA(wxFontList*) wxTheFontList;
+
+/* Stock objects
+
+ wxStockGDI creates the stock GDI objects on demand. Pointers to the
+ created objects are stored in the ms_stockObject array, which is indexed
+ by the Item enum values. Platorm-specific fonts can be created by
+ implementing a derived class with an override for the GetFont function.
+ wxStockGDI operates as a singleton, accessed through the ms_instance
+ pointer. By default this pointer is set to an instance of wxStockGDI.
+ A derived class must arrange to set this pointer to an instance of itself.
+*/
+class WXDLLIMPEXP_CORE wxStockGDI
+{
+public:
+ enum Item {
+ BRUSH_BLACK,
+ BRUSH_BLUE,
+ BRUSH_CYAN,
+ BRUSH_GREEN,
+ BRUSH_GREY,
+ BRUSH_LIGHTGREY,
+ BRUSH_MEDIUMGREY,
+ BRUSH_RED,
+ BRUSH_TRANSPARENT,
+ BRUSH_WHITE,
+ COLOUR_BLACK,
+ COLOUR_BLUE,
+ COLOUR_CYAN,
+ COLOUR_GREEN,
+ COLOUR_LIGHTGREY,
+ COLOUR_RED,
+ COLOUR_WHITE,
+ CURSOR_CROSS,
+ CURSOR_HOURGLASS,
+ CURSOR_STANDARD,
+ FONT_ITALIC,
+ FONT_NORMAL,
+ FONT_SMALL,
+ FONT_SWISS,
+ PEN_BLACK,
+ PEN_BLACKDASHED,
+ PEN_CYAN,
+ PEN_GREEN,
+ PEN_GREY,
+ PEN_LIGHTGREY,
+ PEN_MEDIUMGREY,
+ PEN_RED,
+ PEN_TRANSPARENT,
+ PEN_WHITE,
+ ITEMCOUNT
+ };
+
+ wxStockGDI();
+ virtual ~wxStockGDI();
+ static void DeleteAll();
+
+ static wxStockGDI& instance() { return *ms_instance; }
+
+ static const wxBrush* GetBrush(Item item);
+ static const wxColour* GetColour(Item item);
+ static const wxCursor* GetCursor(Item item);
+ // Can be overridden by platform-specific derived classes
+ virtual const wxFont* GetFont(Item item);
+ static const wxPen* GetPen(Item item);
+
+protected:
+ static wxStockGDI* ms_instance;
+
+ static wxObject* ms_stockObject[ITEMCOUNT];
+
+ DECLARE_NO_COPY_CLASS(wxStockGDI)
+};
+
+#define wxITALIC_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_ITALIC)
+#define wxNORMAL_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_NORMAL)
+#define wxSMALL_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_SMALL)
+#define wxSWISS_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_SWISS)
+
+#define wxBLACK_DASHED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACKDASHED)
+#define wxBLACK_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACK)
+#define wxCYAN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_CYAN)
+#define wxGREEN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREEN)
+#define wxGREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREY)
+#define wxLIGHT_GREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_LIGHTGREY)
+#define wxMEDIUM_GREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_MEDIUMGREY)
+#define wxRED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_RED)
+#define wxTRANSPARENT_PEN wxStockGDI::GetPen(wxStockGDI::PEN_TRANSPARENT)
+#define wxWHITE_PEN wxStockGDI::GetPen(wxStockGDI::PEN_WHITE)
+
+#define wxBLACK_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLACK)
+#define wxBLUE_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLUE)
+#define wxCYAN_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_CYAN)
+#define wxGREEN_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREEN)
+#define wxGREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREY)
+#define wxLIGHT_GREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_LIGHTGREY)
+#define wxMEDIUM_GREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_MEDIUMGREY)
+#define wxRED_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_RED)
+#define wxTRANSPARENT_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_TRANSPARENT)
+#define wxWHITE_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_WHITE)
+
+#define wxBLACK wxStockGDI::GetColour(wxStockGDI::COLOUR_BLACK)
+#define wxBLUE wxStockGDI::GetColour(wxStockGDI::COLOUR_BLUE)
+#define wxCYAN wxStockGDI::GetColour(wxStockGDI::COLOUR_CYAN)
+#define wxGREEN wxStockGDI::GetColour(wxStockGDI::COLOUR_GREEN)
+#define wxLIGHT_GREY wxStockGDI::GetColour(wxStockGDI::COLOUR_LIGHTGREY)
+#define wxRED wxStockGDI::GetColour(wxStockGDI::COLOUR_RED)
+#define wxWHITE wxStockGDI::GetColour(wxStockGDI::COLOUR_WHITE)
+
+#define wxCROSS_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_CROSS)
+#define wxHOURGLASS_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_HOURGLASS)
+#define wxSTANDARD_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_STANDARD)
+
+// 'Null' objects
+extern WXDLLEXPORT_DATA(wxBitmap) wxNullBitmap;
+extern WXDLLEXPORT_DATA(wxIcon) wxNullIcon;
+extern WXDLLEXPORT_DATA(wxCursor) wxNullCursor;
+extern WXDLLEXPORT_DATA(wxPen) wxNullPen;
+extern WXDLLEXPORT_DATA(wxBrush) wxNullBrush;
+extern WXDLLEXPORT_DATA(wxPalette) wxNullPalette;
+extern WXDLLEXPORT_DATA(wxFont) wxNullFont;
+extern WXDLLEXPORT_DATA(wxColour) wxNullColour;
+
+extern WXDLLEXPORT_DATA(wxColourDatabase*) wxTheColourDatabase;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[];
+
+extern WXDLLEXPORT_DATA(const wxSize) wxDefaultSize;
+extern WXDLLEXPORT_DATA(const wxPoint) wxDefaultPosition;
+
+// ---------------------------------------------------------------------------
+// global functions
+// ---------------------------------------------------------------------------
+
+// resource management
+extern void WXDLLEXPORT wxInitializeStockLists();
+extern void WXDLLEXPORT wxDeleteStockLists();
+
+// is the display colour (or monochrome)?
+extern bool WXDLLEXPORT wxColourDisplay();
+
+// Returns depth of screen
+extern int WXDLLEXPORT wxDisplayDepth();
+#define wxGetDisplayDepth wxDisplayDepth
+
+// get the display size
+extern void WXDLLEXPORT wxDisplaySize(int *width, int *height);
+extern wxSize WXDLLEXPORT wxGetDisplaySize();
+extern void WXDLLEXPORT wxDisplaySizeMM(int *width, int *height);
+extern wxSize WXDLLEXPORT wxGetDisplaySizeMM();
+
+// Get position and size of the display workarea
+extern void WXDLLEXPORT wxClientDisplayRect(int *x, int *y, int *width, int *height);
+extern wxRect WXDLLEXPORT wxGetClientDisplayRect();
+
+// set global cursor
+extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor);
+
+#endif
+ // _WX_GDICMNH__
diff --git a/3rdparty/wxWidgets/include/wx/gdiobj.h b/3rdparty/wxWidgets/include/wx/gdiobj.h
new file mode 100644
index 0000000000..55e722bf61
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/gdiobj.h
@@ -0,0 +1,51 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/gdiobj.h
+// Purpose: wxGDIObject base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: gdiobj.h 42211 2006-10-21 17:19:11Z SN $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GDIOBJ_H_BASE_
+#define _WX_GDIOBJ_H_BASE_
+
+#include "wx/object.h"
+
+// ----------------------------------------------------------------------------
+// wxGDIRefData is the base class for wxXXXData structures which contain the
+// real data for the GDI object and are shared among all wxWin objects sharing
+// the same native GDI object
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxGDIRefData: public wxObjectRefData { };
+
+// ----------------------------------------------------------------------------
+// wxGDIObject
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxGDIObject: public wxObject
+{
+public:
+ bool IsNull() const { return m_refData == NULL; }
+
+#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXPALMOS__)
+ // Creates the resource
+ virtual bool RealizeResource() { return false; }
+
+ // Frees the resource
+ virtual bool FreeResource(bool WXUNUSED(force) = false) { return false; }
+
+ virtual bool IsFree() const { return false; }
+
+ // Returns handle.
+ virtual WXHANDLE GetResourceHandle() const { return 0; }
+#endif // defined(__WXMSW__) || defined(__WXPM__)
+
+ DECLARE_DYNAMIC_CLASS(wxGDIObject)
+};
+
+#endif
+ // _WX_GDIOBJ_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/generic/aboutdlgg.h b/3rdparty/wxWidgets/include/wx/generic/aboutdlgg.h
new file mode 100644
index 0000000000..ce524a5c91
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/aboutdlgg.h
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/aboutdlgg.h
+// Purpose: generic wxAboutBox() implementation
+// Author: Vadim Zeitlin
+// Created: 2006-10-07
+// RCS-ID: $Id: aboutdlgg.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) 2006 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_ABOUTDLGG_H_
+#define _WX_GENERIC_ABOUTDLGG_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_ABOUTDLG
+
+#include "wx/dialog.h"
+
+class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo;
+class WXDLLIMPEXP_FWD_CORE wxSizer;
+class WXDLLIMPEXP_FWD_CORE wxSizerFlags;
+
+// ----------------------------------------------------------------------------
+// wxGenericAboutDialog: generic "About" dialog implementation
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGenericAboutDialog : public wxDialog
+{
+public:
+ // constructors and Create() method
+ // --------------------------------
+
+ // default ctor, you must use Create() to really initialize the dialog
+ wxGenericAboutDialog() { Init(); }
+
+ // ctor which fully initializes the object
+ wxGenericAboutDialog(const wxAboutDialogInfo& info)
+ {
+ Init();
+
+ (void)Create(info);
+ }
+
+ // this method must be called if and only if the default ctor was used
+ bool Create(const wxAboutDialogInfo& info);
+
+protected:
+ // this virtual method may be overridden to add some more controls to the
+ // dialog
+ //
+ // notice that for this to work you must call Create() from the derived
+ // class ctor and not use the base class ctor directly as otherwise the
+ // virtual function of the derived class wouldn't be called
+ virtual void DoAddCustomControls() { }
+
+ // add arbitrary control to the text sizer contents with the specified
+ // flags
+ void AddControl(wxWindow *win, const wxSizerFlags& flags);
+
+ // add arbitrary control to the text sizer contents and center it
+ void AddControl(wxWindow *win);
+
+ // add the text, if it's not empty, to the text sizer contents
+ void AddText(const wxString& text);
+
+#if wxUSE_COLLPANE
+ // add a wxCollapsiblePane containing the given text
+ void AddCollapsiblePane(const wxString& title, const wxString& text);
+#endif // wxUSE_COLLPANE
+
+private:
+ // common part of all ctors
+ void Init() { m_sizerText = NULL; }
+
+
+ wxSizer *m_sizerText;
+};
+
+// unlike wxAboutBox which can show either the native or generic about dialog,
+// this function always shows the generic one
+WXDLLIMPEXP_ADV void wxGenericAboutBox(const wxAboutDialogInfo& info);
+
+#endif // wxUSE_ABOUTDLG
+
+#endif // _WX_GENERIC_ABOUTDLGG_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/accel.h b/3rdparty/wxWidgets/include/wx/generic/accel.h
new file mode 100644
index 0000000000..c22e08643e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/accel.h
@@ -0,0 +1,50 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/accel.h
+// Purpose: wxAcceleratorTable class
+// Author: Robert Roebling
+// RCS-ID: $Id: accel.h 42752 2006-10-30 19:26:48Z VZ $
+// Copyright: (c) Robert Roebling
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_ACCEL_H_
+#define _WX_GENERIC_ACCEL_H_
+
+class WXDLLEXPORT wxKeyEvent;
+
+// ----------------------------------------------------------------------------
+// wxAcceleratorTable
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxAcceleratorTable : public wxObject
+{
+public:
+ wxAcceleratorTable();
+ wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
+ virtual ~wxAcceleratorTable();
+
+ bool Ok() const { return IsOk(); }
+ bool IsOk() const;
+
+ void Add(const wxAcceleratorEntry& entry);
+ void Remove(const wxAcceleratorEntry& entry);
+
+ // implementation
+ // --------------
+
+ wxMenuItem *GetMenuItem(const wxKeyEvent& event) const;
+ int GetCommand(const wxKeyEvent& event) const;
+
+ const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const;
+
+protected:
+ // ref counting code
+ virtual wxObjectRefData *CreateRefData() const;
+ virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
+};
+
+#endif // _WX_GENERIC_ACCEL_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/animate.h b/3rdparty/wxWidgets/include/wx/generic/animate.h
new file mode 100644
index 0000000000..28cb4b8bbf
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/animate.h
@@ -0,0 +1,178 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/animate.h
+// Purpose: wxAnimation and wxAnimationCtrl
+// Author: Julian Smart and Guillermo Rodriguez Garcia
+// Modified by: Francesco Montorsi
+// Created: 13/8/99
+// RCS-ID: $Id: animate.h 58350 2009-01-24 10:00:38Z FM $
+// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_ANIMATEH__
+#define _WX_GENERIC_ANIMATEH__
+
+#include "wx/bitmap.h"
+
+// ----------------------------------------------------------------------------
+// wxAnimation
+// ----------------------------------------------------------------------------
+
+WX_DECLARE_LIST_WITH_DECL(wxAnimationDecoder, wxAnimationDecoderList, class WXDLLIMPEXP_ADV);
+
+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; }
+
+ virtual unsigned int GetFrameCount() const;
+ virtual int GetDelay(unsigned int i) const;
+ virtual wxImage GetFrame(unsigned int i) const;
+ virtual wxSize GetSize() const;
+
+ virtual bool LoadFile(const wxString& filename,
+ wxAnimationType type = wxANIMATION_TYPE_ANY);
+ virtual bool Load(wxInputStream& stream,
+ wxAnimationType type = wxANIMATION_TYPE_ANY);
+
+ // extended interface used by the generic implementation of wxAnimationCtrl
+ wxPoint GetFramePosition(unsigned int frame) const;
+ wxSize GetFrameSize(unsigned int frame) const;
+ wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
+ wxColour GetTransparentColour(unsigned int frame) const;
+ wxColour GetBackgroundColour() const;
+
+protected:
+ static wxAnimationDecoderList sm_handlers;
+
+public:
+ static inline wxAnimationDecoderList& GetHandlers() { return sm_handlers; }
+ static void AddHandler(wxAnimationDecoder *handler);
+ static void InsertHandler(wxAnimationDecoder *handler);
+ static const wxAnimationDecoder *FindHandler( wxAnimationType animType );
+
+ static void CleanUpHandlers();
+ static void InitStandardHandlers();
+
+ DECLARE_DYNAMIC_CLASS(wxAnimation)
+};
+
+
+// ----------------------------------------------------------------------------
+// wxAnimationCtrl
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxAnimationCtrl: public wxAnimationCtrlBase
+{
+public:
+ wxAnimationCtrl() { Init(); }
+ wxAnimationCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxAnimation& anim = wxNullAnimation,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAC_DEFAULT_STYLE,
+ const wxString& name = wxAnimationCtrlNameStr)
+ {
+ Init();
+
+ Create(parent, id, anim, pos, size, style, name);
+ }
+
+ void Init();
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxAnimation& anim = wxNullAnimation,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAC_DEFAULT_STYLE,
+ const wxString& name = wxAnimationCtrlNameStr);
+
+ ~wxAnimationCtrl();
+
+public:
+ virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY);
+
+ virtual void Stop();
+ virtual bool Play()
+ { return Play(true /* looped */); }
+ virtual bool IsPlaying() const
+ { return m_isPlaying; }
+
+ void SetAnimation(const wxAnimation &animation);
+ wxAnimation GetAnimation() const
+ { return m_animation; }
+
+ virtual void SetInactiveBitmap(const wxBitmap &bmp);
+
+ // override base class method
+ virtual bool SetBackgroundColour(const wxColour& col);
+
+public: // event handlers
+
+ void OnPaint(wxPaintEvent& event);
+ void OnTimer(wxTimerEvent& event);
+ void OnSize(wxSizeEvent& event);
+
+public: // extended API specific to this implementation of wxAnimateCtrl
+
+ // Specify whether the animation's background colour is to be shown (the default),
+ // or whether the window background should show through
+ void SetUseWindowBackgroundColour(bool useWinBackground = true)
+ { m_useWinBackgroundColour = useWinBackground; }
+ bool IsUsingWindowBackgroundColour() const
+ { return m_useWinBackgroundColour; }
+
+ // This overload of Play() lets you specify if the animation must loop or not
+ bool Play(bool looped);
+
+ // Draw the current frame of the animation into given DC.
+ // This is fast as current frame is always cached.
+ void DrawCurrentFrame(wxDC& dc);
+
+ // Returns a wxBitmap with the current frame drawn in it
+ wxBitmap& GetBackingStore()
+ { return m_backingStore; }
+
+protected: // internal utilities
+
+ // resize this control to fit m_animation
+ void FitToAnimation();
+
+ // Draw the background; use this when e.g. previous frame had wxANIM_TOBACKGROUND disposal.
+ void DisposeToBackground();
+ void DisposeToBackground(wxDC& dc);
+ void DisposeToBackground(wxDC& dc, const wxPoint &pos, const wxSize &sz);
+
+ void IncrementalUpdateBackingStore();
+ bool RebuildBackingStoreUpToFrame(unsigned int);
+ void DrawFrame(wxDC &dc, unsigned int);
+
+ virtual void DisplayStaticImage();
+ virtual wxSize DoGetBestSize() const;
+
+protected:
+ unsigned int m_currentFrame; // Current frame
+ bool m_looped; // Looped, or not
+ wxTimer m_timer; // The timer
+ wxAnimation m_animation; // The animation
+
+ bool m_isPlaying; // Is the animation playing?
+ bool m_useWinBackgroundColour; // Use animation bg colour or window bg colour?
+
+ wxBitmap m_backingStore; // The frames are drawn here and then blitted
+ // on the screen
+
+private:
+ typedef wxAnimationCtrlBase base_type;
+ DECLARE_DYNAMIC_CLASS(wxAnimationCtrl)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // _WX_GENERIC_ANIMATEH__
diff --git a/3rdparty/wxWidgets/include/wx/generic/bmpcbox.h b/3rdparty/wxWidgets/include/wx/generic/bmpcbox.h
new file mode 100644
index 0000000000..e91e0afdd5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/bmpcbox.h
@@ -0,0 +1,170 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/bmpcbox.h
+// Purpose: wxBitmapComboBox
+// Author: Jaakko Salli
+// Modified by:
+// Created: Aug-30-2006
+// RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
+// Copyright: (c) Jaakko Salli
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_BMPCBOX_H_
+#define _WX_GENERIC_BMPCBOX_H_
+
+
+#define wxGENERIC_BITMAPCOMBOBOX 1
+
+#include "wx/odcombo.h"
+
+// ----------------------------------------------------------------------------
+// wxBitmapComboBox: a wxComboBox that allows images to be shown
+// in front of string items.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxOwnerDrawnComboBox,
+ public wxBitmapComboBoxBase
+{
+public:
+
+ // ctors and such
+ wxBitmapComboBox() : wxOwnerDrawnComboBox(), wxBitmapComboBoxBase()
+ {
+ Init();
+ }
+
+ wxBitmapComboBox(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0,
+ const wxString choices[] = NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxBitmapComboBoxNameStr)
+ : wxOwnerDrawnComboBox(),
+ wxBitmapComboBoxBase()
+ {
+ Init();
+
+ (void)Create(parent, id, value, pos, size, n,
+ choices, style, validator, name);
+ }
+
+ wxBitmapComboBox(wxWindow *parent,
+ wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxBitmapComboBoxNameStr);
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ int n,
+ const wxString choices[],
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxBitmapComboBoxNameStr);
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxBitmapComboBoxNameStr);
+
+ virtual ~wxBitmapComboBox();
+
+ // Adds item with image to the end of the combo box.
+ int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap)
+ { return DoAppendWithImage(item, bitmap); }
+
+ int Append(const wxString& item, const wxBitmap& bitmap, void *clientData)
+ { int n = DoAppendWithImage(item, bitmap); SetClientData(n, clientData); return n; }
+ int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData)
+ { int n = DoAppendWithImage(item, bitmap); SetClientObject(n, clientData); return n; }
+
+ // Returns size of image used in list.
+ virtual wxSize GetBitmapSize() const
+ {
+ return m_usedImgSize;
+ }
+
+ // Returns the image of the item with the given index.
+ virtual wxBitmap GetItemBitmap(unsigned int n) const;
+
+ // Inserts item with image into the list before pos. Not valid for wxCB_SORT or wxCB_SORT
+ // styles, use Append instead.
+ int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos)
+ { return DoInsertWithImage(item, bitmap, pos); }
+
+ int Insert(const wxString& item, const wxBitmap& bitmap,
+ unsigned int pos, void *clientData);
+ int Insert(const wxString& item, const wxBitmap& bitmap,
+ unsigned int pos, wxClientData *clientData);
+
+ // Sets the image for the given item.
+ virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
+
+ virtual void Clear();
+ virtual void Delete(unsigned int n);
+
+protected:
+
+ virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const;
+ virtual void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const;
+ virtual wxCoord OnMeasureItem(size_t item) const;
+ virtual wxCoord OnMeasureItemWidth(size_t item) const;
+
+ virtual int DoAppendWithImage(const wxString& item, const wxBitmap& bitmap);
+ virtual int DoInsertWithImage(const wxString& item, const wxBitmap& bitmap,
+ unsigned int pos);
+
+ virtual int DoAppend(const wxString& item);
+ virtual int DoInsert(const wxString& item, unsigned int pos);
+
+ virtual bool SetFont(const wxFont& font);
+
+ virtual wxSize DoGetBestSize() const;
+
+ // Event handlers
+ void OnSize(wxSizeEvent& event);
+
+ // Recalculates amount of empty space needed in front of
+ // text in control itself.
+ void DetermineIndent();
+
+ bool OnAddBitmap(const wxBitmap& bitmap);
+
+ // Adds image to position - called in Append/Insert before
+ // string is added.
+ bool DoInsertBitmap(const wxBitmap& image, unsigned int pos);
+
+
+ wxArrayPtrVoid m_bitmaps; // Images associated with items
+ wxSize m_usedImgSize; // Size of bitmaps
+
+private:
+ int m_imgAreaWidth; // Width and height of area next to text field
+ int m_fontHeight;
+ bool m_inResize;
+
+ void Init();
+ void PostCreate();
+
+ DECLARE_EVENT_TABLE()
+
+ DECLARE_DYNAMIC_CLASS(wxBitmapComboBox)
+};
+
+#endif // _WX_GENERIC_BMPCBOX_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/busyinfo.h b/3rdparty/wxWidgets/include/wx/generic/busyinfo.h
new file mode 100644
index 0000000000..c29a0f96d5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/busyinfo.h
@@ -0,0 +1,42 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/busyinfo.h
+// Purpose: Information window (when app is busy)
+// Author: Vaclav Slavik
+// Copyright: (c) 1999 Vaclav Slavik
+// RCS-ID: $Id: busyinfo.h 49804 2007-11-10 01:09:42Z VZ $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __BUSYINFO_H__
+#define __BUSYINFO_H__
+
+#include "wx/defs.h"
+
+#if wxUSE_BUSYINFO
+
+class WXDLLIMPEXP_FWD_CORE wxFrame;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+
+//--------------------------------------------------------------------------------
+// wxBusyInfo
+// Displays progress information
+// Can be used in exactly same way as wxBusyCursor
+//--------------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBusyInfo : public wxObject
+{
+public:
+ wxBusyInfo(const wxString& message, wxWindow *parent = NULL);
+
+ virtual ~wxBusyInfo();
+
+private:
+ wxFrame *m_InfoFrame;
+
+ DECLARE_NO_COPY_CLASS(wxBusyInfo)
+};
+
+
+#endif // wxUSE_BUSYINFO
+
+#endif // __BUSYINFO_H__
diff --git a/3rdparty/wxWidgets/include/wx/generic/buttonbar.h b/3rdparty/wxWidgets/include/wx/generic/buttonbar.h
new file mode 100644
index 0000000000..6fa2c702a0
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/buttonbar.h
@@ -0,0 +1,123 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/buttonbar.h
+// Purpose: wxButtonToolBar declaration
+// Author: Julian Smart, after Robert Roebling, Vadim Zeitlin, SciTech
+// Modified by:
+// Created: 2006-04-13
+// Id: $Id: buttonbar.h 38714 2006-04-14 15:49:57Z JS $
+// Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin,
+// SciTech Software, Inc.
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_BUTTONBAR_H_
+#define _WX_BUTTONBAR_H_
+
+#include "wx/bmpbuttn.h"
+#include "wx/toolbar.h"
+
+class WXDLLEXPORT wxButtonToolBarTool;
+
+// ----------------------------------------------------------------------------
+// wxButtonToolBar
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxButtonToolBar : public wxToolBarBase
+{
+public:
+ // construction/destruction
+ wxButtonToolBar() { Init(); }
+ wxButtonToolBar(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxToolBarNameStr)
+ {
+ Init();
+
+ Create(parent, id, pos, size, style, name);
+ }
+
+ bool Create( wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxToolBarNameStr );
+
+ virtual ~wxButtonToolBar();
+
+ virtual bool Realize();
+
+ virtual void SetToolShortHelp(int id, const wxString& helpString);
+ virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
+
+protected:
+ // common part of all ctors
+ void Init();
+
+ // implement base class pure virtuals
+ virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
+ virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
+
+ virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
+ virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
+ virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
+
+ virtual wxToolBarToolBase *CreateTool(int id,
+ const wxString& label,
+ const wxBitmap& bmpNormal,
+ const wxBitmap& bmpDisabled,
+ wxItemKind kind,
+ wxObject *clientData,
+ const wxString& shortHelp,
+ const wxString& longHelp);
+ virtual wxToolBarToolBase *CreateTool(wxControl *control);
+
+ virtual wxSize DoGetBestClientSize() const;
+
+ // calculate layout
+ void DoLayout();
+
+ // get the bounding rect for the given tool
+ wxRect GetToolRect(wxToolBarToolBase *tool) const;
+
+ // get the rect limits depending on the orientation: top/bottom for a
+ // vertical toolbar, left/right for a horizontal one
+ void GetRectLimits(const wxRect& rect, wxCoord *start, wxCoord *end) const;
+
+ // receives button commands
+ void OnCommand(wxCommandEvent& event);
+
+ // paints a border
+ void OnPaint(wxPaintEvent& event);
+
+ // detects mouse clicks outside buttons
+ void OnLeftUp(wxMouseEvent& event);
+
+private:
+ // have we calculated the positions of our tools?
+ bool m_needsLayout;
+
+ // the width of a separator
+ wxCoord m_widthSeparator;
+
+ // the total size of all toolbar elements
+ wxCoord m_maxWidth,
+ m_maxHeight;
+
+ // the height of a label
+ int m_labelHeight;
+
+ // the space above the label
+ int m_labelMargin;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxButtonToolBar)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif
+ // _WX_BUTTONBAR_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/calctrl.h b/3rdparty/wxWidgets/include/wx/generic/calctrl.h
new file mode 100644
index 0000000000..43b854c64a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/calctrl.h
@@ -0,0 +1,324 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: generic/calctrl.h
+// Purpose: generic implementation of date-picker control
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 29.12.99
+// RCS-ID: $Id: calctrl.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) 1999 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_CALCTRL_H
+#define _WX_GENERIC_CALCTRL_H
+
+#include "wx/control.h" // the base class
+#include "wx/dcclient.h" // for wxPaintDC
+
+class WXDLLIMPEXP_FWD_CORE wxComboBox;
+class WXDLLIMPEXP_FWD_CORE wxStaticText;
+class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
+
+#define wxCalendarNameStr _T("CalendarCtrl")
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl: a control allowing the user to pick a date interactively
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxControl
+{
+public:
+ // construction
+ wxCalendarCtrl() { Init(); }
+ wxCalendarCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
+ const wxString& name = wxCalendarNameStr);
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
+ const wxString& name = wxCalendarNameStr);
+
+ virtual ~wxCalendarCtrl();
+
+ virtual bool Destroy();
+
+ // set/get the current date
+ // ------------------------
+
+ bool SetDate(const wxDateTime& date); // we need to be able to control if the event should be sent in SetDateAndNotify(...)
+ const wxDateTime& GetDate() const { return m_date; }
+
+ // set/get the range in which selection can occur
+ // ---------------------------------------------
+
+ bool SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime);
+ const wxDateTime& GetLowerDateLimit() const { return m_lowdate; }
+ bool SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime);
+ const wxDateTime& GetUpperDateLimit() const { return m_highdate; }
+
+ bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, const wxDateTime& upperdate = wxDefaultDateTime);
+
+ // calendar mode
+ // -------------
+
+ // some calendar styles can't be changed after the control creation by
+ // just using SetWindowStyle() and Refresh() and the functions below
+ // should be used instead for them
+
+ // corresponds to wxCAL_NO_YEAR_CHANGE bit
+ void EnableYearChange(bool enable = true);
+
+ // corresponds to wxCAL_NO_MONTH_CHANGE bit
+ void EnableMonthChange(bool enable = true);
+
+ // corresponds to wxCAL_SHOW_HOLIDAYS bit
+ void EnableHolidayDisplay(bool display = true);
+
+ // customization
+ // -------------
+
+ // header colours are used for painting the weekdays at the top
+ void SetHeaderColours(const wxColour& colFg, const wxColour& colBg)
+ {
+ m_colHeaderFg = colFg;
+ m_colHeaderBg = colBg;
+ }
+
+ const wxColour& GetHeaderColourFg() const { return m_colHeaderFg; }
+ const wxColour& GetHeaderColourBg() const { return m_colHeaderBg; }
+
+ // highlight colour is used for the currently selected date
+ void SetHighlightColours(const wxColour& colFg, const wxColour& colBg)
+ {
+ m_colHighlightFg = colFg;
+ m_colHighlightBg = colBg;
+ }
+
+ const wxColour& GetHighlightColourFg() const { return m_colHighlightFg; }
+ const wxColour& GetHighlightColourBg() const { return m_colHighlightBg; }
+
+ // holiday colour is used for the holidays (if style & wxCAL_SHOW_HOLIDAYS)
+ void SetHolidayColours(const wxColour& colFg, const wxColour& colBg)
+ {
+ m_colHolidayFg = colFg;
+ m_colHolidayBg = colBg;
+ }
+
+ const wxColour& GetHolidayColourFg() const { return m_colHolidayFg; }
+ const wxColour& GetHolidayColourBg() const { return m_colHolidayBg; }
+
+ // an item without custom attributes is drawn with the default colours and
+ // font and without border, setting custom attributes allows to modify this
+ //
+ // the day parameter should be in 1..31 range, for days 29, 30, 31 the
+ // corresponding attribute is just unused if there is no such day in the
+ // current month
+
+ wxCalendarDateAttr *GetAttr(size_t day) const
+ {
+ wxCHECK_MSG( day > 0 && day < 32, NULL, _T("invalid day") );
+
+ return m_attrs[day - 1];
+ }
+
+ void SetAttr(size_t day, wxCalendarDateAttr *attr)
+ {
+ wxCHECK_RET( day > 0 && day < 32, _T("invalid day") );
+
+ delete m_attrs[day - 1];
+ m_attrs[day - 1] = attr;
+ }
+
+ void SetHoliday(size_t day);
+
+ void ResetAttr(size_t day) { SetAttr(day, (wxCalendarDateAttr *)NULL); }
+
+ // returns one of wxCAL_HITTEST_XXX constants and fills either date or wd
+ // with the corresponding value (none for NOWHERE, the date for DAY and wd
+ // for HEADER)
+ wxCalendarHitTestResult HitTest(const wxPoint& pos,
+ wxDateTime *date = NULL,
+ wxDateTime::WeekDay *wd = NULL);
+
+ // implementation only from now on
+ // -------------------------------
+
+ // forward these functions to all subcontrols
+ virtual bool Enable(bool enable = true);
+ virtual bool Show(bool show = true);
+
+ virtual void SetWindowStyleFlag(long style);
+
+ virtual wxVisualAttributes GetDefaultAttributes() const
+ { return GetClassDefaultAttributes(GetWindowVariant()); }
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+protected:
+ // override some base class virtuals
+ virtual wxSize DoGetBestSize() const;
+ virtual void DoGetPosition(int *x, int *y) const;
+ virtual void DoGetSize(int *width, int *height) const;
+ virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
+private:
+ // common part of all ctors
+ void Init();
+
+ // startup colours and reinitialization after colour changes in system
+ void InitColours();
+
+ // event handlers
+ void OnPaint(wxPaintEvent& event);
+ void OnClick(wxMouseEvent& event);
+ void OnDClick(wxMouseEvent& event);
+ void OnChar(wxKeyEvent& event);
+ void OnMonthChange(wxCommandEvent& event);
+ void OnYearChange(wxCommandEvent& event);
+ void OnYearTextChange(wxCommandEvent& event);
+
+ // (re)calc m_widthCol and m_heightRow
+ void RecalcGeometry();
+
+ // set the date and send the notification
+ void SetDateAndNotify(const wxDateTime& date);
+
+ // get the week (row, in range 1..6) for the given date
+ size_t GetWeek(const wxDateTime& date) const;
+
+ // get the date from which we start drawing days
+ wxDateTime GetStartDate() const;
+
+ // is this date shown?
+ bool IsDateShown(const wxDateTime& date) const;
+
+ // is this date in the given range?
+ bool IsDateInRange(const wxDateTime& date) const;
+
+ // range helpers
+ bool ChangeYear(wxDateTime* target) const;
+ bool ChangeMonth(wxDateTime* target) const;
+
+ // redraw the given date
+ void RefreshDate(const wxDateTime& date);
+
+ // change the date inside the same month/year
+ void ChangeDay(const wxDateTime& date);
+
+ // set the attributes for the holidays if needed
+ void SetHolidayAttrs();
+
+ // reset all holidays
+ void ResetHolidayAttrs();
+
+ // generate the given calendar event(s)
+ void GenerateEvent(wxEventType type)
+ {
+ wxCalendarEvent event(this, type);
+ (void)GetEventHandler()->ProcessEvent(event);
+ }
+
+ void GenerateEvents(wxEventType type1, wxEventType type2)
+ {
+ GenerateEvent(type1);
+ GenerateEvent(type2);
+ }
+
+ // do we allow changing the month/year?
+ bool AllowMonthChange() const
+ {
+ return (GetWindowStyle() & wxCAL_NO_MONTH_CHANGE)
+ != wxCAL_NO_MONTH_CHANGE;
+ }
+ bool AllowYearChange() const
+ {
+ return !(GetWindowStyle() & wxCAL_NO_YEAR_CHANGE);
+ }
+
+ // show the correct controls
+ void ShowCurrentControls();
+
+ // create the month combo and year spin controls
+ void CreateMonthComboBox();
+ void CreateYearSpinCtrl();
+
+public:
+ // get the currently shown control for month/year
+ wxControl *GetMonthControl() const;
+ wxControl *GetYearControl() const;
+
+private:
+ // OnPaint helper-methods
+
+ // Highlight the [fromdate : todate] range using pen and brush
+ void HighlightRange(wxPaintDC* dc, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pen, const wxBrush* brush);
+
+ // Get the "coordinates" for the date relative to the month currently displayed.
+ // using (day, week): upper left coord is (1, 1), lower right coord is (7, 6)
+ // if the date isn't visible (-1, -1) is put in (day, week) and false is returned
+ bool GetDateCoord(const wxDateTime& date, int *day, int *week) const;
+
+ // Set the flag for SetDate(): otherwise it would overwrite the year
+ // typed in by the user
+ void SetUserChangedYear() { m_userChangedYear = true; }
+
+ // the subcontrols
+ wxStaticText *m_staticMonth;
+ wxComboBox *m_comboMonth;
+
+ wxStaticText *m_staticYear;
+ wxSpinCtrl *m_spinYear;
+
+ // the current selection
+ wxDateTime m_date;
+
+ // the date-range
+ wxDateTime m_lowdate;
+ wxDateTime m_highdate;
+
+ // default attributes
+ wxColour m_colHighlightFg,
+ m_colHighlightBg,
+ m_colHolidayFg,
+ m_colHolidayBg,
+ m_colHeaderFg,
+ m_colHeaderBg,
+ m_colBackground,
+ m_colSorrounding;
+
+ // the attributes for each of the month days
+ wxCalendarDateAttr *m_attrs[31];
+
+ // the width and height of one column/row in the calendar
+ wxCoord m_widthCol,
+ m_heightRow,
+ m_rowOffset;
+
+ wxRect m_leftArrowRect,
+ m_rightArrowRect;
+
+ // the week day names
+ wxString m_weekdays[7];
+
+ // true if SetDate() is being called as the result of changing the year in
+ // the year control
+ bool m_userChangedYear;
+
+ DECLARE_DYNAMIC_CLASS(wxCalendarCtrl)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxCalendarCtrl)
+};
+
+#endif // _WX_GENERIC_CALCTRL_H
diff --git a/3rdparty/wxWidgets/include/wx/generic/caret.h b/3rdparty/wxWidgets/include/wx/generic/caret.h
new file mode 100644
index 0000000000..5b8de00ed8
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/caret.h
@@ -0,0 +1,95 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: generic/caret.h
+// Purpose: generic wxCaret class
+// Author: Vadim Zeitlin (original code by Robert Roebling)
+// Modified by:
+// Created: 25.05.99
+// RCS-ID: $Id: caret.h 42397 2006-10-25 12:12:56Z VS $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CARET_H_
+#define _WX_CARET_H_
+
+#include "wx/timer.h"
+#include "wx/dc.h"
+#include "wx/overlay.h"
+
+#ifdef wxHAS_NATIVE_OVERLAY
+ #define wxHAS_CARET_USING_OVERLAYS
+#endif
+
+class WXDLLIMPEXP_CORE wxCaret;
+
+class WXDLLEXPORT wxCaretTimer : public wxTimer
+{
+public:
+ wxCaretTimer(wxCaret *caret);
+ virtual void Notify();
+
+private:
+ wxCaret *m_caret;
+};
+
+class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
+{
+public:
+ // ctors
+ // -----
+ // default - use Create()
+ wxCaret() : m_timer(this) { InitGeneric(); }
+ // creates a block caret associated with the given window
+ wxCaret(wxWindowBase *window, int width, int height)
+ : wxCaretBase(window, width, height), m_timer(this) { InitGeneric(); }
+ wxCaret(wxWindowBase *window, const wxSize& size)
+ : wxCaretBase(window, size), m_timer(this) { InitGeneric(); }
+
+ virtual ~wxCaret();
+
+ // implementation
+ // --------------
+
+ // called by wxWindow (not using the event tables)
+ virtual void OnSetFocus();
+ virtual void OnKillFocus();
+
+ // called by wxCaretTimer
+ void OnTimer();
+
+protected:
+ virtual void DoShow();
+ virtual void DoHide();
+ virtual void DoMove();
+ virtual void DoSize();
+
+ // blink the caret once
+ void Blink();
+
+ // refresh the caret
+ void Refresh();
+
+ // draw the caret on the given DC
+ void DoDraw(wxDC *dc);
+
+private:
+ // GTK specific initialization
+ void InitGeneric();
+
+#ifdef wxHAS_CARET_USING_OVERLAYS
+ // the overlay for displaying the caret
+ wxOverlay m_overlay;
+#else
+ // the bitmap holding the part of window hidden by the caret when it was
+ // at (m_xOld, m_yOld)
+ wxBitmap m_bmpUnderCaret;
+ int m_xOld,
+ m_yOld;
+#endif
+
+ wxCaretTimer m_timer;
+ bool m_blinkedOut, // true => caret hidden right now
+ m_hasFocus; // true => our window has focus
+};
+
+#endif // _WX_CARET_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/choicdgg.h b/3rdparty/wxWidgets/include/wx/generic/choicdgg.h
new file mode 100644
index 0000000000..79bc395d35
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/choicdgg.h
@@ -0,0 +1,320 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/choicdgg.h
+// Purpose: Generic choice dialogs
+// Author: Julian Smart
+// Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions
+// Created: 01/02/97
+// RCS-ID: $Id: choicdgg.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_CHOICDGG_H_
+#define _WX_GENERIC_CHOICDGG_H_
+
+#include "wx/dynarray.h"
+#include "wx/dialog.h"
+
+class WXDLLIMPEXP_FWD_CORE wxListBoxBase;
+
+// ----------------------------------------------------------------------------
+// some (ugly...) constants
+// ----------------------------------------------------------------------------
+
+#define wxCHOICE_HEIGHT 150
+#define wxCHOICE_WIDTH 200
+
+#ifdef __WXWINCE__
+#define wxCHOICEDLG_STYLE \
+ (wxDEFAULT_DIALOG_STYLE | wxOK | wxCANCEL | wxCENTRE)
+#else
+#define wxCHOICEDLG_STYLE \
+ (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE)
+#endif
+
+// ----------------------------------------------------------------------------
+// wxAnyChoiceDialog: a base class for dialogs containing a listbox
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxAnyChoiceDialog : public wxDialog
+{
+public:
+ wxAnyChoiceDialog() { }
+
+ wxAnyChoiceDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ long styleDlg = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ long styleLbox = wxLB_ALWAYS_SB)
+ {
+ (void)Create(parent, message, caption, n, choices,
+ styleDlg, pos, styleLbox);
+ }
+ wxAnyChoiceDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ long styleDlg = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ long styleLbox = wxLB_ALWAYS_SB)
+ {
+ (void)Create(parent, message, caption, choices,
+ styleDlg, pos, styleLbox);
+ }
+
+ bool Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ long styleDlg = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ long styleLbox = wxLB_ALWAYS_SB);
+ bool Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ long styleDlg = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ long styleLbox = wxLB_ALWAYS_SB);
+
+protected:
+ wxListBoxBase *m_listbox;
+
+ virtual wxListBoxBase *CreateList(int n,
+ const wxString *choices,
+ long styleLbox);
+
+ DECLARE_NO_COPY_CLASS(wxAnyChoiceDialog)
+};
+
+// ----------------------------------------------------------------------------
+// wxSingleChoiceDialog: a dialog with single selection listbox
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxSingleChoiceDialog : public wxAnyChoiceDialog
+{
+public:
+ wxSingleChoiceDialog()
+ {
+ m_selection = -1;
+ }
+
+ wxSingleChoiceDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString *choices,
+ char **clientData = (char **)NULL,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
+ wxSingleChoiceDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ char **clientData = (char **)NULL,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
+
+ bool Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString *choices,
+ char **clientData = (char **)NULL,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
+ bool Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ char **clientData = (char **)NULL,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
+
+ void SetSelection(int sel);
+ int GetSelection() const { return m_selection; }
+ wxString GetStringSelection() const { return m_stringSelection; }
+
+ // obsolete function (NB: no need to make it return wxChar, it's untyped)
+ char *GetSelectionClientData() const { return (char *)m_clientData; }
+
+ // implementation from now on
+ void OnOK(wxCommandEvent& event);
+#ifndef __SMARTPHONE__
+ void OnListBoxDClick(wxCommandEvent& event);
+#endif
+#ifdef __WXWINCE__
+ void OnJoystickButtonDown(wxJoystickEvent& event);
+#endif
+
+protected:
+ int m_selection;
+ wxString m_stringSelection;
+
+ void DoChoice();
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxSingleChoiceDialog)
+ DECLARE_EVENT_TABLE()
+};
+
+// ----------------------------------------------------------------------------
+// wxMultiChoiceDialog: a dialog with multi selection listbox
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMultiChoiceDialog : public wxAnyChoiceDialog
+{
+public:
+ wxMultiChoiceDialog() { }
+
+ wxMultiChoiceDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString *choices,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition)
+ {
+ (void)Create(parent, message, caption, n, choices, style, pos);
+ }
+ wxMultiChoiceDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition)
+ {
+ (void)Create(parent, message, caption, choices, style, pos);
+ }
+
+ bool Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString *choices,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
+ bool Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
+
+ void SetSelections(const wxArrayInt& selections);
+ wxArrayInt GetSelections() const { return m_selections; }
+
+ // implementation from now on
+ virtual bool TransferDataFromWindow();
+
+protected:
+#if wxUSE_CHECKLISTBOX
+ virtual wxListBoxBase *CreateList(int n,
+ const wxString *choices,
+ long styleLbox);
+#endif // wxUSE_CHECKLISTBOX
+
+ wxArrayInt m_selections;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxMultiChoiceDialog)
+};
+
+// ----------------------------------------------------------------------------
+// wrapper functions which can be used to get selection(s) from the user
+// ----------------------------------------------------------------------------
+
+// get the user selection as a string
+WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+// Same as above but gets position in list of strings, instead of string,
+// or -1 if no selection
+WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+// Return client data instead or NULL if cancelled
+WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ void **client_data,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ void **client_data,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+// fill the array with the indices of the chosen items, it will be empty
+// if no items were selected or Cancel was pressed - return the number of
+// selections
+WXDLLEXPORT size_t wxGetMultipleChoices(wxArrayInt& selections,
+ const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+WXDLLEXPORT size_t wxGetMultipleChoices(wxArrayInt& selections,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ wxWindow *parent = NULL,
+ int x = wxDefaultCoord,
+ int y = wxDefaultCoord,
+ bool centre = true,
+ int width = wxCHOICE_WIDTH,
+ int height = wxCHOICE_HEIGHT);
+
+#endif // _WX_GENERIC_CHOICDGG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/clrpickerg.h b/3rdparty/wxWidgets/include/wx/generic/clrpickerg.h
new file mode 100644
index 0000000000..a67f1181f3
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/clrpickerg.h
@@ -0,0 +1,98 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/clrpickerg.h
+// Purpose: wxGenericColourButton header
+// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
+// Modified by:
+// Created: 14/4/2006
+// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
+// RCS-ID: $Id: clrpickerg.h 58967 2009-02-17 13:31:28Z SC $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CLRPICKER_H_
+#define _WX_CLRPICKER_H_
+
+#include "wx/button.h"
+#include "wx/cmndata.h"
+
+//-----------------------------------------------------------------------------
+// wxGenericColourButton: a button which brings up a wxColourDialog
+//-----------------------------------------------------------------------------
+
+// show the colour in HTML form (#AABBCC) as colour button label
+#define wxCLRBTN_SHOW_LABEL 100
+
+// the default style
+#define wxCLRBTN_DEFAULT_STYLE (wxCLRBTN_SHOW_LABEL)
+
+#ifndef wxCLRBTN_USES_BMP_BUTTON
+ #define wxCLRBTN_USES_BMP_BUTTON 0
+#endif
+
+#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:
+ wxGenericColourButton() {}
+ wxGenericColourButton(wxWindow *parent,
+ wxWindowID id,
+ const wxColour& col = *wxBLACK,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCLRBTN_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxColourPickerWidgetNameStr)
+ {
+ Create(parent, id, col, pos, size, style, validator, name);
+ }
+
+ virtual ~wxGenericColourButton() {}
+
+
+public: // API extensions specific for wxGenericColourButton
+
+ // user can override this to init colour data in a different way
+ virtual void InitColourData();
+
+ // returns the colour data shown in wxColourDialog
+ wxColourData *GetColourData() { return &ms_data; }
+
+
+public:
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxColour& col = *wxBLACK,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCLRBTN_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxColourPickerWidgetNameStr);
+
+ void OnButtonClick(wxCommandEvent &);
+
+
+protected:
+
+ wxSize DoGetBestSize() const;
+
+ void UpdateColour();
+
+ // the colour data shown in wxColourPickerCtrlGeneric
+ // controls. This member is static so that all colour pickers
+ // in the program share the same set of custom colours.
+ static wxColourData ms_data;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericColourButton)
+};
+
+
+#endif // _WX_CLRPICKER_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/collpaneg.h b/3rdparty/wxWidgets/include/wx/generic/collpaneg.h
new file mode 100644
index 0000000000..412c679803
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/collpaneg.h
@@ -0,0 +1,105 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/collpaneg.h
+// Purpose: wxGenericCollapsiblePane
+// Author: Francesco Montorsi
+// Modified by:
+// Created: 8/10/2006
+// RCS-ID: $Id: collpaneg.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) Francesco Montorsi
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COLLAPSABLE_PANE_H_GENERIC_
+#define _WX_COLLAPSABLE_PANE_H_GENERIC_
+
+// forward declared
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxStaticLine;
+
+// class name
+extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxGenericCollapsiblePane
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxGenericCollapsiblePane : public wxCollapsiblePaneBase
+{
+public:
+ wxGenericCollapsiblePane() { Init(); }
+
+ wxGenericCollapsiblePane(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCP_DEFAULT_STYLE,
+ const wxValidator& val = wxDefaultValidator,
+ const wxString& name = wxCollapsiblePaneNameStr)
+ {
+ Init();
+
+ Create(parent, winid, label, pos, size, style, val, name);
+ }
+
+ void Init()
+ {
+ m_pButton = NULL;
+ m_pPane = NULL;
+ m_pStaticLine = NULL;
+ m_sz = NULL;
+ }
+
+ ~wxGenericCollapsiblePane();
+
+ bool Create(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCP_DEFAULT_STYLE,
+ const wxValidator& val = wxDefaultValidator,
+ const wxString& name = wxCollapsiblePaneNameStr);
+
+ // public wxCollapsiblePane API
+ virtual void Collapse(bool collapse = true);
+ virtual void SetLabel(const wxString &label);
+
+ virtual bool IsCollapsed() const
+ { return m_pPane==NULL || !m_pPane->IsShown(); }
+ virtual wxWindow *GetPane() const
+ { return m_pPane; }
+ virtual wxString GetLabel() const
+ { return m_strLabel; }
+
+ virtual bool Layout();
+
+ // implementation only, don't use
+ void OnStateChange(const wxSize& sizeNew);
+
+protected:
+ // overridden methods
+ virtual wxSize DoGetBestSize() const;
+
+ wxString GetBtnLabel() const;
+ int GetBorder() const;
+
+ // child controls
+ wxButton *m_pButton;
+ wxStaticLine *m_pStaticLine;
+ wxWindow *m_pPane;
+ wxSizer *m_sz;
+
+ // the button label without ">>" or "<<"
+ wxString m_strLabel;
+
+private:
+ // event handlers
+ void OnButton(wxCommandEvent &ev);
+ void OnSize(wxSizeEvent &ev);
+
+ DECLARE_DYNAMIC_CLASS(wxGenericCollapsiblePane)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // _WX_COLLAPSABLE_PANE_H_GENERIC_
diff --git a/3rdparty/wxWidgets/include/wx/generic/colour.h b/3rdparty/wxWidgets/include/wx/generic/colour.h
new file mode 100644
index 0000000000..826e2c363c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/colour.h
@@ -0,0 +1,75 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/colour.h
+// Purpose: wxColour class
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: colour.h 41751 2006-10-08 21:56:55Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_COLOUR_H_
+#define _WX_GENERIC_COLOUR_H_
+
+#include "wx/object.h"
+
+// Colour
+class WXDLLEXPORT wxColour: public wxColourBase
+{
+public:
+ // constructors
+ // ------------
+
+ // default
+ wxColour();
+ DEFINE_STD_WXCOLOUR_CONSTRUCTORS
+
+ // copy ctors and assignment operators
+ wxColour(const wxColour& col);
+ wxColour& operator=(const wxColour& col);
+
+ // dtor
+ virtual ~wxColour();
+
+ // accessors
+ bool Ok() const { return IsOk(); }
+ bool IsOk() const { return m_isInit; }
+
+ unsigned char Red() const { return m_red; }
+ unsigned char Green() const { return m_green; }
+ unsigned char Blue() const { return m_blue; }
+ unsigned char Alpha() const { return m_alpha; }
+
+ // comparison
+ bool operator==(const wxColour& colour) const
+ {
+ return (m_red == colour.m_red &&
+ m_green == colour.m_green &&
+ m_blue == colour.m_blue &&
+ m_alpha == colour.m_alpha &&
+ m_isInit == colour.m_isInit);
+ }
+
+ bool operator!=(const wxColour& colour) const { return !(*this == colour); }
+
+protected:
+
+ // Helper function
+ void Init();
+
+ virtual void
+ InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
+
+private:
+ bool m_isInit;
+ unsigned char m_red;
+ unsigned char m_blue;
+ unsigned char m_green;
+ unsigned char m_alpha;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxColour)
+};
+
+#endif // _WX_GENERIC_COLOUR_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/colrdlgg.h b/3rdparty/wxWidgets/include/wx/generic/colrdlgg.h
new file mode 100644
index 0000000000..77a3d6e3d9
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/colrdlgg.h
@@ -0,0 +1,120 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/colrdlgg.h
+// Purpose: wxGenericColourDialog
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: colrdlgg.h 37164 2006-01-26 17:20:50Z ABX $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __COLORDLGH_G__
+#define __COLORDLGH_G__
+
+#include "wx/defs.h"
+#include "wx/gdicmn.h"
+#include "wx/dialog.h"
+#include "wx/cmndata.h"
+
+#define wxID_ADD_CUSTOM 3000
+
+#if wxUSE_SLIDER
+
+ #define wxID_RED_SLIDER 3001
+ #define wxID_GREEN_SLIDER 3002
+ #define wxID_BLUE_SLIDER 3003
+
+ class WXDLLEXPORT wxSlider;
+
+#endif // wxUSE_SLIDER
+
+class WXDLLEXPORT wxGenericColourDialog : public wxDialog
+{
+public:
+ wxGenericColourDialog();
+ wxGenericColourDialog(wxWindow *parent,
+ wxColourData *data = (wxColourData *) NULL);
+ virtual ~wxGenericColourDialog();
+
+ bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
+
+ wxColourData &GetColourData() { return colourData; }
+
+ virtual int ShowModal();
+
+ // Internal functions
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnPaint(wxPaintEvent& event);
+
+ virtual void CalculateMeasurements();
+ virtual void CreateWidgets();
+ virtual void InitializeColours();
+
+ virtual void PaintBasicColours(wxDC& dc);
+ virtual void PaintCustomColours(wxDC& dc);
+ virtual void PaintCustomColour(wxDC& dc);
+ virtual void PaintHighlight(wxDC& dc, bool draw);
+
+ virtual void OnBasicColourClick(int which);
+ virtual void OnCustomColourClick(int which);
+
+ void OnAddCustom(wxCommandEvent& event);
+
+#if wxUSE_SLIDER
+ void OnRedSlider(wxCommandEvent& event);
+ void OnGreenSlider(wxCommandEvent& event);
+ void OnBlueSlider(wxCommandEvent& event);
+#endif // wxUSE_SLIDER
+
+ void OnCloseWindow(wxCloseEvent& event);
+
+protected:
+ wxColourData colourData;
+ wxWindow *dialogParent;
+
+ // Area reserved for grids of colours
+ wxRect standardColoursRect;
+ wxRect customColoursRect;
+ wxRect singleCustomColourRect;
+
+ // Size of each colour rectangle
+ wxPoint smallRectangleSize;
+
+ // For single customizable colour
+ wxPoint customRectangleSize;
+
+ // Grid spacing (between rectangles)
+ int gridSpacing;
+
+ // Section spacing (between left and right halves of dialog box)
+ int sectionSpacing;
+
+ // 48 'standard' colours
+ wxColour standardColours[48];
+
+ // 16 'custom' colours
+ wxColour customColours[16];
+
+ // Which colour is selected? An index into one of the two areas.
+ int colourSelection;
+ int whichKind; // 1 for standard colours, 2 for custom colours,
+
+#if wxUSE_SLIDER
+ wxSlider *redSlider;
+ wxSlider *greenSlider;
+ wxSlider *blueSlider;
+#endif // wxUSE_SLIDER
+
+ int buttonY;
+
+ int okButtonX;
+ int customButtonX;
+
+ // static bool colourDialogCancelled;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericColourDialog)
+};
+
+#endif
diff --git a/3rdparty/wxWidgets/include/wx/generic/combo.h b/3rdparty/wxWidgets/include/wx/generic/combo.h
new file mode 100644
index 0000000000..1b2518539e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/combo.h
@@ -0,0 +1,140 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/combo.h
+// Purpose: Generic wxComboCtrl
+// Author: Jaakko Salli
+// Modified by:
+// Created: Apr-30-2006
+// RCS-ID: $Id: combo.h 41835 2006-10-09 20:12:19Z RR $
+// Copyright: (c) Jaakko Salli
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_COMBOCTRL_H_
+#define _WX_GENERIC_COMBOCTRL_H_
+
+#if wxUSE_COMBOCTRL
+
+// Only define generic if native doesn't have all the features
+#if !defined(wxCOMBOCONTROL_FULLY_FEATURED)
+
+// ----------------------------------------------------------------------------
+// Generic wxComboCtrl
+// ----------------------------------------------------------------------------
+
+#if defined(__WXUNIVERSAL__)
+
+// all actions of single line text controls are supported
+
+// popup/dismiss the choice window
+#define wxACTION_COMBOBOX_POPUP _T("popup")
+#define wxACTION_COMBOBOX_DISMISS _T("dismiss")
+
+#endif
+
+extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxComboBoxNameStr[];
+
+class WXDLLEXPORT wxGenericComboCtrl : public wxComboCtrlBase
+{
+public:
+ // ctors and such
+ wxGenericComboCtrl() : wxComboCtrlBase() { Init(); }
+
+ wxGenericComboCtrl(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxComboBoxNameStr)
+ : wxComboCtrlBase()
+ {
+ Init();
+
+ (void)Create(parent, id, value, pos, size, style, validator, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxComboBoxNameStr);
+
+ virtual ~wxGenericComboCtrl();
+
+ void SetCustomPaintWidth( int width );
+
+ virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const;
+
+ static int GetFeatures() { return wxComboCtrlFeatures::All; }
+
+#if defined(__WXUNIVERSAL__)
+ // we have our own input handler and our own actions
+ virtual bool PerformAction(const wxControlAction& action,
+ long numArg = 0l,
+ const wxString& strArg = wxEmptyString);
+#endif
+
+protected:
+
+ // Mandatory virtuals
+ virtual void OnResize();
+
+ // Event handlers
+ void OnPaintEvent( wxPaintEvent& event );
+ void OnMouseEvent( wxMouseEvent& event );
+
+private:
+ void Init();
+
+ DECLARE_EVENT_TABLE()
+
+ DECLARE_DYNAMIC_CLASS(wxGenericComboCtrl)
+};
+
+
+#ifndef _WX_COMBOCONTROL_H_
+
+// If native wxComboCtrl was not defined, then prepare a simple
+// front-end so that wxRTTI works as expected.
+
+class WXDLLEXPORT wxComboCtrl : public wxGenericComboCtrl
+{
+public:
+ wxComboCtrl() : wxGenericComboCtrl() {}
+
+ wxComboCtrl(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxComboBoxNameStr)
+ : wxGenericComboCtrl()
+ {
+ (void)Create(parent, id, value, pos, size, style, validator, name);
+ }
+
+ virtual ~wxComboCtrl() {}
+
+protected:
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxComboCtrl)
+};
+
+#endif // _WX_COMBOCONTROL_H_
+
+#else
+
+#define wxGenericComboCtrl wxComboCtrl
+
+#endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED)
+
+#endif // wxUSE_COMBOCTRL
+#endif
+ // _WX_GENERIC_COMBOCTRL_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/dataview.h b/3rdparty/wxWidgets/include/wx/generic/dataview.h
new file mode 100644
index 0000000000..e6222abc68
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/dataview.h
@@ -0,0 +1,311 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/dataview.h
+// Purpose: wxDataViewCtrl generic implementation header
+// Author: Robert Roebling
+// Id: $Id: dataview.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) 1998 Robert Roebling
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __GENERICDATAVIEWCTRLH__
+#define __GENERICDATAVIEWCTRLH__
+
+#include "wx/defs.h"
+#include "wx/object.h"
+#include "wx/list.h"
+#include "wx/control.h"
+#include "wx/scrolwin.h"
+#include "wx/icon.h"
+
+// ---------------------------------------------------------
+// classes
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
+class WXDLLIMPEXP_FWD_ADV wxDataViewMainWindow;
+class WXDLLIMPEXP_FWD_ADV wxDataViewHeaderWindow;
+
+// ---------------------------------------------------------
+// wxDataViewRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewRendererBase
+{
+public:
+ wxDataViewRenderer( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+ virtual ~wxDataViewRenderer();
+
+ virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0;
+ virtual wxSize GetSize() = 0;
+
+ virtual bool Activate( wxRect WXUNUSED(cell),
+ wxDataViewListModel *WXUNUSED(model),
+ unsigned int WXUNUSED(col),
+ unsigned int WXUNUSED(row) )
+ { return false; }
+
+ virtual bool LeftClick( wxPoint WXUNUSED(cursor),
+ wxRect WXUNUSED(cell),
+ wxDataViewListModel *WXUNUSED(model),
+ unsigned int WXUNUSED(col),
+ unsigned int WXUNUSED(row) )
+ { return false; }
+ virtual bool RightClick( wxPoint WXUNUSED(cursor),
+ wxRect WXUNUSED(cell),
+ wxDataViewListModel *WXUNUSED(model),
+ unsigned int WXUNUSED(col),
+ unsigned int WXUNUSED(row) )
+ { return false; }
+ virtual bool StartDrag( wxPoint WXUNUSED(cursor),
+ wxRect WXUNUSED(cell),
+ wxDataViewListModel *WXUNUSED(model),
+ unsigned int WXUNUSED(col),
+ unsigned int WXUNUSED(row) )
+ { return false; }
+
+ // Create DC on request
+ virtual wxDC *GetDC();
+
+private:
+ wxDC *m_dc;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewCustomRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewCustomRenderer: public wxDataViewRenderer
+{
+public:
+ wxDataViewCustomRenderer( const wxString &varianttype = wxT("string"),
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewTextRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewCustomRenderer
+{
+public:
+ wxDataViewTextRenderer( const wxString &varianttype = wxT("string"),
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+
+ bool SetValue( const wxVariant &value );
+ bool GetValue( wxVariant &value );
+
+ bool Render( wxRect cell, wxDC *dc, int state );
+ wxSize GetSize();
+
+private:
+ wxString m_text;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewBitmapRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewCustomRenderer
+{
+public:
+ wxDataViewBitmapRenderer( const wxString &varianttype = wxT("wxBitmap"),
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+
+ bool SetValue( const wxVariant &value );
+ bool GetValue( wxVariant &value );
+
+ bool Render( wxRect cell, wxDC *dc, int state );
+ wxSize GetSize();
+
+private:
+ wxIcon m_icon;
+ wxBitmap m_bitmap;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewToggleRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewCustomRenderer
+{
+public:
+ wxDataViewToggleRenderer( const wxString &varianttype = wxT("bool"),
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+
+ bool SetValue( const wxVariant &value );
+ bool GetValue( wxVariant &value );
+
+ bool Render( wxRect cell, wxDC *dc, int state );
+ bool Activate( wxRect cell, wxDataViewListModel *model, unsigned int col, unsigned int row );
+ wxSize GetSize();
+
+private:
+ bool m_toggle;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewProgressRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewCustomRenderer
+{
+public:
+ wxDataViewProgressRenderer( const wxString &label = wxEmptyString,
+ const wxString &varianttype = wxT("long"),
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
+ virtual ~wxDataViewProgressRenderer();
+
+ bool SetValue( const wxVariant &value );
+
+ virtual bool Render( wxRect cell, wxDC *dc, int state );
+ virtual wxSize GetSize();
+
+private:
+ wxString m_label;
+ int m_value;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewDateRenderer
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewCustomRenderer
+{
+public:
+ wxDataViewDateRenderer( const wxString &varianttype = wxT("datetime"),
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE );
+
+ bool SetValue( const wxVariant &value );
+
+ virtual bool Render( wxRect cell, wxDC *dc, int state );
+ virtual wxSize GetSize();
+ virtual bool Activate( wxRect cell,
+ wxDataViewListModel *model, unsigned int col, unsigned int row );
+
+private:
+ wxDateTime m_date;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
+};
+
+// ---------------------------------------------------------
+// wxDataViewColumn
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewColumn: public wxDataViewColumnBase
+{
+public:
+ wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer, unsigned int model_column,
+ int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE );
+ wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer, unsigned int model_column,
+ int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE );
+ virtual ~wxDataViewColumn();
+
+ virtual void SetTitle( const wxString &title );
+ virtual void SetBitmap( const wxBitmap &bitmap );
+
+ virtual void SetAlignment( wxAlignment align );
+
+ virtual void SetSortable( bool sortable );
+ virtual bool GetSortable();
+ virtual void SetSortOrder( bool ascending );
+ virtual bool IsSortOrderAscending();
+
+ virtual int GetWidth();
+
+private:
+ int m_width;
+ int m_fixedWidth;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
+};
+
+// ---------------------------------------------------------
+// wxDataViewCtrl
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase,
+ public wxScrollHelperNative
+{
+public:
+ wxDataViewCtrl() : wxScrollHelperNative(this)
+ {
+ Init();
+ }
+
+ wxDataViewCtrl( wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator )
+ : wxScrollHelperNative(this)
+ {
+ Create(parent, id, pos, size, style, validator );
+ }
+
+ virtual ~wxDataViewCtrl();
+
+ void Init();
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator );
+
+ virtual bool AssociateModel( wxDataViewListModel *model );
+ virtual bool AppendColumn( wxDataViewColumn *col );
+
+ virtual void SetSelection( int row ); // -1 for unselect
+ virtual void SetSelectionRange( unsigned int from, unsigned int to );
+ virtual void SetSelections( const wxArrayInt& aSelections);
+ virtual void Unselect( unsigned int row );
+
+ virtual bool IsSelected( unsigned int row ) const;
+ virtual int GetSelection() const;
+ virtual int GetSelections(wxArrayInt& aSelections) const;
+
+private:
+ friend class wxDataViewMainWindow;
+ friend class wxDataViewHeaderWindow;
+ wxDataViewListModelNotifier *m_notifier;
+ wxDataViewMainWindow *m_clientArea;
+ wxDataViewHeaderWindow *m_headerArea;
+
+private:
+ void OnSize( wxSizeEvent &event );
+
+ // we need to return a special WM_GETDLGCODE value to process just the
+ // arrows but let the other navigation characters through
+#ifdef __WXMSW__
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+#endif // __WXMSW__
+
+ WX_FORWARD_TO_SCROLL_HELPER()
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
+ DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
+ DECLARE_EVENT_TABLE()
+};
+
+
+#endif // __GENERICDATAVIEWCTRLH__
diff --git a/3rdparty/wxWidgets/include/wx/generic/datectrl.h b/3rdparty/wxWidgets/include/wx/generic/datectrl.h
new file mode 100644
index 0000000000..bb3f01efcc
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/datectrl.h
@@ -0,0 +1,91 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: generic/datectrl.h
+// Purpose: generic wxDatePickerCtrl implementation
+// Author: Andreas Pflug
+// Modified by:
+// Created: 2005-01-19
+// RCS-ID: $Id: datectrl.h 42539 2006-10-27 18:02:21Z RR $
+// Copyright: (c) 2005 Andreas Pflug
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_DATECTRL_H_
+#define _WX_GENERIC_DATECTRL_H_
+
+class WXDLLIMPEXP_ADV wxCalendarDateAttr;
+class WXDLLIMPEXP_ADV wxCalendarCtrl;
+class WXDLLIMPEXP_ADV wxCalendarEvent;
+class WXDLLIMPEXP_ADV wxComboCtrl;
+class WXDLLIMPEXP_ADV wxCalendarComboPopup;
+
+class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric : public wxDatePickerCtrlBase
+{
+public:
+ // creating the control
+ wxDatePickerCtrlGeneric() { Init(); }
+ virtual ~wxDatePickerCtrlGeneric();
+ wxDatePickerCtrlGeneric(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDatePickerCtrlNameStr)
+ {
+ Init();
+
+ (void)Create(parent, id, date, pos, size, style, validator, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDatePickerCtrlNameStr);
+
+ // wxDatePickerCtrl methods
+ void SetValue(const wxDateTime& date);
+ wxDateTime GetValue() const;
+
+ bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
+ void SetRange(const wxDateTime &dt1, const wxDateTime &dt2);
+
+ bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
+ const wxDateTime& upperdate = wxDefaultDateTime);
+
+ // extra methods available only in this (generic) implementation
+ bool SetFormat(const wxChar *fmt);
+ wxCalendarCtrl *GetCalendar() const { return m_cal; }
+
+
+ // implementation only from now on
+ // -------------------------------
+
+ // overridden base class methods
+ virtual bool Destroy();
+
+protected:
+ virtual wxSize DoGetBestSize() const;
+
+private:
+ void Init();
+
+ void OnText(wxCommandEvent &event);
+ void OnSize(wxSizeEvent& event);
+ void OnFocus(wxFocusEvent& event);
+
+ wxCalendarCtrl *m_cal;
+ wxComboCtrl* m_combo;
+ wxCalendarComboPopup* m_popup;
+
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxDatePickerCtrlGeneric)
+};
+
+#endif // _WX_GENERIC_DATECTRL_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/dcpsg.h b/3rdparty/wxWidgets/include/wx/generic/dcpsg.h
new file mode 100644
index 0000000000..5477bb961d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/dcpsg.h
@@ -0,0 +1,154 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/dcps.h
+// Purpose: wxPostScriptDC class
+// Author: Julian Smart and others
+// Modified by:
+// RCS-ID: $Id: dcpsg.h 41751 2006-10-08 21:56:55Z VZ $
+// Copyright: (c) Julian Smart and Robert Roebling
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DCPSG_H_
+#define _WX_DCPSG_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_PRINTING_ARCHITECTURE
+
+#if wxUSE_POSTSCRIPT
+
+#include "wx/dc.h"
+#include "wx/dialog.h"
+#include "wx/module.h"
+#include "wx/cmndata.h"
+
+extern WXDLLIMPEXP_DATA_CORE(int) wxPageNumber;
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class wxPostScriptDC;
+
+//-----------------------------------------------------------------------------
+// wxPostScriptDC
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPostScriptDC: public wxDC
+{
+public:
+ wxPostScriptDC();
+
+ // Recommended constructor
+ wxPostScriptDC(const wxPrintData& printData);
+
+ // Recommended destructor :-)
+ virtual ~wxPostScriptDC();
+
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const;
+
+ bool CanDrawBitmap() const { return true; }
+
+ void Clear();
+ void SetFont( const wxFont& font );
+ void SetPen( const wxPen& pen );
+ void SetBrush( const wxBrush& brush );
+ void SetLogicalFunction( int function );
+ void SetBackground( const wxBrush& brush );
+
+ void DestroyClippingRegion();
+
+ bool StartDoc(const wxString& message);
+ void EndDoc();
+ void StartPage();
+ void EndPage();
+
+ wxCoord GetCharHeight() const;
+ wxCoord GetCharWidth() const;
+ bool CanGetTextExtent() const { return true; }
+
+ // Resolution in pixels per logical inch
+ wxSize GetPPI() const;
+
+ void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
+ void SetDeviceOrigin( wxCoord x, wxCoord y );
+
+ void SetBackgroundMode(int WXUNUSED(mode)) { }
+ void SetPalette(const wxPalette& WXUNUSED(palette)) { }
+
+ wxPrintData& GetPrintData() { return m_printData; }
+ void SetPrintData(const wxPrintData& data) { m_printData = data; }
+
+ virtual int GetDepth() const { return 24; }
+
+ static void SetResolution(int ppi);
+ static int GetResolution();
+
+ void PsPrintf( const wxChar* fmt, ... );
+ void PsPrint( const char* psdata );
+ void PsPrint( int ch );
+
+#if wxUSE_UNICODE
+ void PsPrint( const wxChar* psdata ) { PsPrint( wxConvUTF8.cWX2MB( psdata ) ); }
+#endif
+
+private:
+ static float ms_PSScaleFactor;
+
+protected:
+ bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE);
+ bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
+ void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
+ void DoCrossHair(wxCoord x, wxCoord y) ;
+ void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
+ void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
+ void DoDrawPoint(wxCoord x, wxCoord y);
+ void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
+ void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle = wxODDEVEN_RULE);
+ void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, int fillStyle = wxODDEVEN_RULE);
+ void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
+ void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+#if wxUSE_SPLINES
+ void DoDrawSpline(wxList *points);
+#endif // wxUSE_SPLINES
+ bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
+ void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
+ void DoDrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false);
+ void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
+ void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
+ void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip)) { }
+ void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
+ wxCoord *descent = NULL,
+ wxCoord *externalLeading = NULL,
+ wxFont *theFont = NULL) const;
+ void DoGetSize(int* width, int* height) const;
+ void DoGetSizeMM(int *width, int *height) const;
+
+ FILE* m_pstream; // PostScript output stream
+ wxString m_title;
+ unsigned char m_currentRed;
+ unsigned char m_currentGreen;
+ unsigned char m_currentBlue;
+ int m_pageNumber;
+ bool m_clipping;
+ double m_underlinePosition;
+ double m_underlineThickness;
+ wxPrintData m_printData;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPostScriptDC)
+};
+
+#endif
+ // wxUSE_POSTSCRIPT
+
+#endif
+ // wxUSE_PRINTING_ARCHITECTURE
+
+#endif
+ // _WX_DCPSG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/dirctrlg.h b/3rdparty/wxWidgets/include/wx/generic/dirctrlg.h
new file mode 100644
index 0000000000..190850ce9f
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/dirctrlg.h
@@ -0,0 +1,295 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: dirctrlg.h
+// Purpose: wxGenericDirCtrl class
+// Builds on wxDirCtrl class written by Robert Roebling for the
+// wxFile application, modified by Harm van der Heijden.
+// Further modified for Windows.
+// Author: Robert Roebling, Harm van der Heijden, Julian Smart et al
+// Modified by:
+// Created: 21/3/2000
+// RCS-ID: $Id: dirctrlg.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIRCTRL_H_
+#define _WX_DIRCTRL_H_
+
+#if wxUSE_DIRDLG || wxUSE_FILEDLG
+ #include "wx/imaglist.h"
+#endif
+
+#if wxUSE_DIRDLG
+
+#include "wx/treectrl.h"
+#include "wx/dialog.h"
+#include "wx/dirdlg.h"
+#include "wx/choice.h"
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxImageList;
+class WXDLLIMPEXP_FWD_BASE wxHashTable;
+
+//-----------------------------------------------------------------------------
+// Extra styles for wxGenericDirCtrl
+//-----------------------------------------------------------------------------
+
+enum
+{
+ // Only allow directory viewing/selection, no files
+ wxDIRCTRL_DIR_ONLY = 0x0010,
+ // When setting the default path, select the first file in the directory
+ wxDIRCTRL_SELECT_FIRST = 0x0020,
+ // Show the filter list
+ wxDIRCTRL_SHOW_FILTERS = 0x0040,
+ // Use 3D borders on internal controls
+ wxDIRCTRL_3D_INTERNAL = 0x0080,
+ // Editable labels
+ wxDIRCTRL_EDIT_LABELS = 0x0100
+};
+
+//-----------------------------------------------------------------------------
+// wxDirItemData
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDirItemData : public wxTreeItemData
+{
+public:
+ wxDirItemData(const wxString& path, const wxString& name, bool isDir);
+ virtual ~wxDirItemData(){}
+ void SetNewDirName(const wxString& path);
+
+ bool HasSubDirs() const;
+ bool HasFiles(const wxString& spec = wxEmptyString) const;
+
+ wxString m_path, m_name;
+ bool m_isHidden;
+ bool m_isExpanded;
+ bool m_isDir;
+};
+
+//-----------------------------------------------------------------------------
+// wxDirCtrl
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxDirFilterListCtrl;
+
+class WXDLLEXPORT wxGenericDirCtrl: public wxControl
+{
+public:
+ wxGenericDirCtrl();
+ wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = wxID_ANY,
+ const wxString &dir = wxDirDialogDefaultFolderStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
+ const wxString& filter = wxEmptyString,
+ int defaultFilter = 0,
+ const wxString& name = wxTreeCtrlNameStr )
+ {
+ Init();
+ Create(parent, id, dir, pos, size, style, filter, defaultFilter, name);
+ }
+
+ bool Create(wxWindow *parent, const wxWindowID id = wxID_ANY,
+ const wxString &dir = wxDirDialogDefaultFolderStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
+ const wxString& filter = wxEmptyString,
+ int defaultFilter = 0,
+ const wxString& name = wxTreeCtrlNameStr );
+
+ virtual void Init();
+
+ virtual ~wxGenericDirCtrl();
+
+ void OnExpandItem(wxTreeEvent &event );
+ void OnCollapseItem(wxTreeEvent &event );
+ void OnBeginEditItem(wxTreeEvent &event );
+ void OnEndEditItem(wxTreeEvent &event );
+ void OnSize(wxSizeEvent &event );
+
+ // Try to expand as much of the given path as possible.
+ virtual bool ExpandPath(const wxString& path);
+ // collapse the path
+ virtual bool CollapsePath(const wxString& path);
+
+ // Accessors
+
+ virtual inline wxString GetDefaultPath() const { return m_defaultPath; }
+ virtual void SetDefaultPath(const wxString& path) { m_defaultPath = path; }
+
+ // Get dir or filename
+ virtual wxString GetPath() const;
+
+ // Get selected filename path only (else empty string).
+ // I.e. don't count a directory as a selection
+ virtual wxString GetFilePath() const;
+ virtual void SetPath(const wxString& path);
+
+ virtual void ShowHidden( bool show );
+ virtual bool GetShowHidden() { return m_showHidden; }
+
+ virtual wxString GetFilter() const { return m_filter; }
+ virtual void SetFilter(const wxString& filter);
+
+ virtual int GetFilterIndex() const { return m_currentFilter; }
+ virtual void SetFilterIndex(int n);
+
+ virtual wxTreeItemId GetRootId() { return m_rootId; }
+
+ virtual wxTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; }
+ virtual wxDirFilterListCtrl* GetFilterListCtrl() const { return m_filterListCtrl; }
+
+ // Helper
+ virtual void SetupSections();
+
+#if WXWIN_COMPATIBILITY_2_4
+ // Parse the filter into an array of filters and an array of descriptions
+ virtual int ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions);
+#endif // WXWIN_COMPATIBILITY_2_4
+
+ // Find the child that matches the first part of 'path'.
+ // E.g. if a child path is "/usr" and 'path' is "/usr/include"
+ // then the child for /usr is returned.
+ // If the path string has been used (we're at the leaf), done is set to true
+ virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done);
+
+ // Resize the components of the control
+ virtual void DoResize();
+
+ // Collapse & expand the tree, thus re-creating it from scratch:
+ virtual void ReCreateTree();
+
+ // Collapse the entire tree
+ virtual void CollapseTree();
+
+protected:
+ virtual void ExpandRoot();
+ virtual void ExpandDir(wxTreeItemId parentId);
+ virtual void CollapseDir(wxTreeItemId parentId);
+ virtual const wxTreeItemId AddSection(const wxString& path, const wxString& name, int imageId = 0);
+ virtual wxTreeItemId AppendItem (const wxTreeItemId & parent,
+ const wxString & text,
+ int image = -1, int selectedImage = -1,
+ wxTreeItemData * data = NULL);
+ //void FindChildFiles(wxTreeItemId id, int dirFlags, wxArrayString& filenames);
+ virtual wxTreeCtrl* CreateTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long treeStyle);
+
+ // Extract description and actual filter from overall filter string
+ bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description);
+
+private:
+ bool m_showHidden;
+ wxTreeItemId m_rootId;
+ wxString m_defaultPath; // Starting path
+ long m_styleEx; // Extended style
+ wxString m_filter; // Wildcards in same format as per wxFileDialog
+ int m_currentFilter; // The current filter index
+ wxString m_currentFilterStr; // Current filter string
+ wxTreeCtrl* m_treeCtrl;
+ wxDirFilterListCtrl* m_filterListCtrl;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericDirCtrl)
+ DECLARE_NO_COPY_CLASS(wxGenericDirCtrl)
+};
+
+//-----------------------------------------------------------------------------
+// wxDirFilterListCtrl
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxDirFilterListCtrl: public wxChoice
+{
+public:
+ wxDirFilterListCtrl() { Init(); }
+ wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0)
+ {
+ Init();
+ Create(parent, id, pos, size, style);
+ }
+
+ bool Create(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0);
+
+ void Init();
+
+ virtual ~wxDirFilterListCtrl() {}
+
+ //// Operations
+ void FillFilterList(const wxString& filter, int defaultFilter);
+
+ //// Events
+ void OnSelFilter(wxCommandEvent& event);
+
+protected:
+ wxGenericDirCtrl* m_dirCtrl;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_CLASS(wxDirFilterListCtrl)
+ DECLARE_NO_COPY_CLASS(wxDirFilterListCtrl)
+};
+
+#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXPM__)
+ #define wxDirCtrl wxGenericDirCtrl
+#endif
+
+// Symbols for accessing individual controls
+#define wxID_TREECTRL 7000
+#define wxID_FILTERLISTCTRL 7001
+
+#endif // wxUSE_DIRDLG
+
+//-------------------------------------------------------------------------
+// wxFileIconsTable - use wxTheFileIconsTable which is created as necessary
+//-------------------------------------------------------------------------
+
+#if wxUSE_DIRDLG || wxUSE_FILEDLG
+
+class WXDLLEXPORT wxFileIconsTable
+{
+public:
+ wxFileIconsTable();
+ ~wxFileIconsTable();
+
+ enum iconId_Type
+ {
+ folder,
+ folder_open,
+ computer,
+ drive,
+ cdrom,
+ floppy,
+ removeable,
+ file,
+ executable
+ };
+
+ int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString);
+ wxImageList *GetSmallImageList();
+
+protected:
+ void Create(); // create on first use
+
+ wxImageList *m_smallImageList;
+ wxHashTable *m_HashTable;
+};
+
+// The global fileicons table
+extern WXDLLEXPORT_DATA(wxFileIconsTable *) wxTheFileIconsTable;
+
+#endif // wxUSE_DIRDLG || wxUSE_FILEDLG
+
+#endif
+ // _WX_DIRCTRLG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/dirdlgg.h b/3rdparty/wxWidgets/include/wx/generic/dirdlgg.h
new file mode 100644
index 0000000000..73b61b5297
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/dirdlgg.h
@@ -0,0 +1,89 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/dirdlgg.h
+// Purpose: wxGenericDirCtrl class
+// Builds on wxDirCtrl class written by Robert Roebling for the
+// wxFile application, modified by Harm van der Heijden.
+// Further modified for Windows.
+// Author: Robert Roebling, Harm van der Heijden, Julian Smart et al
+// Modified by:
+// Created: 21/3/2000
+// RCS-ID: $Id: dirdlgg.h 39402 2006-05-28 23:32:12Z VZ $
+// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DIRDLGG_H_
+#define _WX_DIRDLGG_H_
+
+class WXDLLEXPORT wxGenericDirCtrl;
+class WXDLLEXPORT wxTextCtrl;
+class WXDLLEXPORT wxTreeEvent;
+
+// we may be included directly as well as from wx/dirdlg.h (FIXME)
+extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
+
+#ifndef wxDD_DEFAULT_STYLE
+#ifdef __WXWINCE__
+ #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
+#else
+ #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
+#endif
+#endif
+
+#include "wx/dialog.h"
+
+//-----------------------------------------------------------------------------
+// wxGenericDirDialog
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericDirDialog : public wxDirDialogBase
+{
+public:
+ wxGenericDirDialog() : wxDirDialogBase() { }
+
+ wxGenericDirDialog(wxWindow* parent,
+ const wxString& title = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,//Size(450, 550),
+ const wxString& name = wxDirDialogNameStr);
+
+ bool Create(wxWindow* parent,
+ const wxString& title = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,//Size(450, 550),
+ const wxString& name = wxDirDialogNameStr);
+
+ //// Accessors
+ void SetPath(const wxString& path);
+ wxString GetPath() const;
+
+ //// Overrides
+ virtual int ShowModal();
+ virtual void EndModal(int retCode);
+
+ // this one is specific to wxGenericDirDialog
+ wxTextCtrl* GetInputCtrl() const { return m_input; }
+
+protected:
+ //// Event handlers
+ void OnCloseWindow(wxCloseEvent& event);
+ void OnOK(wxCommandEvent& event);
+ void OnTreeSelected(wxTreeEvent &event);
+ void OnTreeKeyDown(wxTreeEvent &event);
+ void OnNew(wxCommandEvent& event);
+ void OnGoHome(wxCommandEvent& event);
+ void OnShowHidden(wxCommandEvent& event);
+
+ wxGenericDirCtrl* m_dirCtrl;
+ wxTextCtrl* m_input;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericDirDialog)
+};
+
+#endif // _WX_DIRDLGG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/dragimgg.h b/3rdparty/wxWidgets/include/wx/generic/dragimgg.h
new file mode 100644
index 0000000000..f5cdd447f4
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/dragimgg.h
@@ -0,0 +1,271 @@
+//////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/dragimgg.h
+// Purpose: wxDragImage class: a kind of a cursor, that can cope
+// with more sophisticated images
+// Author: Julian Smart
+// Modified by:
+// Created: 29/2/2000
+// RCS-ID: $Id: dragimgg.h 42397 2006-10-25 12:12:56Z VS $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_DRAGIMGG_H_
+#define _WX_DRAGIMGG_H_
+
+#include "wx/bitmap.h"
+#include "wx/icon.h"
+#include "wx/cursor.h"
+#include "wx/treectrl.h"
+#include "wx/listctrl.h"
+#include "wx/log.h"
+#include "wx/overlay.h"
+
+/*
+ To use this class, create a wxDragImage when you start dragging, for example:
+
+ void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event)
+ {
+#ifdef __WXMSW__
+ ::UpdateWindow((HWND) GetHWND()); // We need to implement this in wxWidgets
+#endif
+
+ CaptureMouse();
+
+ m_dragImage = new wxDragImage(* this, itemId);
+ m_dragImage->BeginDrag(wxPoint(0, 0), this);
+ m_dragImage->Move(pt, this);
+ m_dragImage->Show(this);
+ ...
+ }
+
+ In your OnMouseMove function, hide the image, do any display updating required,
+ then move and show the image again:
+
+ void MyTreeCtrl::OnMouseMove(wxMouseEvent& event)
+ {
+ if (m_dragMode == MY_TREE_DRAG_NONE)
+ {
+ event.Skip();
+ return;
+ }
+
+ // Prevent screen corruption by hiding the image
+ if (m_dragImage)
+ m_dragImage->Hide(this);
+
+ // Do some updating of the window, such as highlighting the drop target
+ ...
+
+#ifdef __WXMSW__
+ if (updateWindow)
+ ::UpdateWindow((HWND) GetHWND());
+#endif
+
+ // Move and show the image again
+ m_dragImage->Move(event.GetPosition(), this);
+ m_dragImage->Show(this);
+ }
+
+ Eventually we end the drag and delete the drag image.
+
+ void MyTreeCtrl::OnLeftUp(wxMouseEvent& event)
+ {
+ ...
+
+ // End the drag and delete the drag image
+ if (m_dragImage)
+ {
+ m_dragImage->EndDrag(this);
+ delete m_dragImage;
+ m_dragImage = NULL;
+ }
+ ReleaseMouse();
+ }
+*/
+
+/*
+ * wxGenericDragImage
+ */
+
+class WXDLLEXPORT wxGenericDragImage: public wxObject
+{
+public:
+
+ // Ctors & dtor
+ ////////////////////////////////////////////////////////////////////////////
+
+ wxGenericDragImage(const wxCursor& cursor = wxNullCursor)
+ {
+ Init();
+ Create(cursor);
+ }
+
+ wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor)
+ {
+ Init();
+
+ Create(image, cursor);
+ }
+
+ wxGenericDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor)
+ {
+ Init();
+
+ Create(image, cursor);
+ }
+
+ wxGenericDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor)
+ {
+ Init();
+
+ Create(str, cursor);
+ }
+
+#if WXWIN_COMPATIBILITY_2_6
+ // don't use in new code, use versions without hot spot parameter
+ wxDEPRECATED( wxGenericDragImage(const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( wxGenericDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( wxGenericDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( bool Create(const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+ wxDEPRECATED( bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#if wxUSE_TREECTRL
+ wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
+ {
+ Init();
+
+ Create(treeCtrl, id);
+ }
+#endif
+
+#if wxUSE_LISTCTRL
+ wxGenericDragImage(const wxListCtrl& listCtrl, long id)
+ {
+ Init();
+
+ Create(listCtrl, id);
+ }
+#endif
+
+ virtual ~wxGenericDragImage();
+
+ // Attributes
+ ////////////////////////////////////////////////////////////////////////////
+
+ // For efficiency, tell wxGenericDragImage to use a bitmap that's already
+ // created (e.g. from last drag)
+ void SetBackingBitmap(wxBitmap* bitmap) {
+#ifndef wxHAS_NATIVE_OVERLAY
+ m_pBackingBitmap = bitmap;
+#endif
+ }
+
+ // Operations
+ ////////////////////////////////////////////////////////////////////////////
+
+ // Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect)
+ bool Create(const wxCursor& cursor = wxNullCursor);
+
+ // Create a drag image from a bitmap and optional cursor
+ bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
+
+ // Create a drag image from an icon and optional cursor
+ bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
+
+ // Create a drag image from a string and optional cursor
+ bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
+
+#if wxUSE_TREECTRL
+ // Create a drag image for the given tree control item
+ bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
+#endif
+
+#if wxUSE_LISTCTRL
+ // Create a drag image for the given list control item
+ bool Create(const wxListCtrl& listCtrl, long id);
+#endif
+
+ // Begin drag. hotspot is the location of the drag position relative to the upper-left
+ // corner of the image.
+ bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = (wxRect*) NULL);
+
+ // Begin drag. hotspot is the location of the drag position relative to the upper-left
+ // corner of the image. This is full screen only. fullScreenRect gives the
+ // position of the window on the screen, to restrict the drag to.
+ bool BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect);
+
+ // End drag
+ bool EndDrag();
+
+ // Move the image: call from OnMouseMove. Pt is in window client coordinates if window
+ // is non-NULL, or in screen coordinates if NULL.
+ bool Move(const wxPoint& pt);
+
+ // Show the image
+ bool Show();
+
+ // Hide the image
+ bool Hide();
+
+ // Implementation
+ ////////////////////////////////////////////////////////////////////////////
+
+ void Init();
+
+ // Override this if you are using a virtual image (drawing your own image)
+ virtual wxRect GetImageRect(const wxPoint& pos) const;
+
+ // Override this if you are using a virtual image (drawing your own image)
+ virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos) const;
+
+ // Override this if you wish to draw the window contents to the backing bitmap
+ // yourself. This can be desirable if you wish to avoid flicker by not having to
+ // redraw the window itself before dragging in order to be graphic-minus-dragged-objects.
+ // Instead, paint the drag image's backing bitmap to be correct, and leave the window
+ // to be updated only when dragging the objects away (thus giving a smoother appearance).
+ virtual bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC,
+ const wxRect& sourceRect, const wxRect& destRect) const;
+
+ // Erase and redraw simultaneously if possible
+ virtual bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew);
+
+protected:
+ wxBitmap m_bitmap;
+ wxIcon m_icon;
+ wxCursor m_cursor;
+ wxCursor m_oldCursor;
+// wxPoint m_hotspot;
+ wxPoint m_offset; // The hostpot value passed to BeginDrag
+ wxPoint m_position;
+ bool m_isDirty;
+ bool m_isShown;
+ wxWindow* m_window;
+ wxDC* m_windowDC;
+
+#ifdef wxHAS_NATIVE_OVERLAY
+ wxOverlay m_overlay;
+ wxDCOverlay* m_dcOverlay;
+#else
+ // Stores the window contents while we're dragging the image around
+ wxBitmap m_backingBitmap;
+ wxBitmap* m_pBackingBitmap; // Pointer to existing backing bitmap
+ // (pass to wxGenericDragImage as an efficiency measure)
+ // A temporary bitmap for repairing/redrawing
+ wxBitmap m_repairBitmap;
+#endif // !wxHAS_NATIVE_OVERLAY
+
+ wxRect m_boundingRect;
+ bool m_fullScreen;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericDragImage)
+ DECLARE_NO_COPY_CLASS(wxGenericDragImage)
+};
+
+#endif
+ // _WX_DRAGIMGG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/fdrepdlg.h b/3rdparty/wxWidgets/include/wx/generic/fdrepdlg.h
new file mode 100644
index 0000000000..c287322134
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/fdrepdlg.h
@@ -0,0 +1,71 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/msw/fdrepdlg.h
+// Purpose: wxGenericFindReplaceDialog class
+// Author: Markus Greither
+// Modified by:
+// Created: 25/05/2001
+// RCS-ID:
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_FDREPDLG_H_
+#define _WX_GENERIC_FDREPDLG_H_
+
+class WXDLLEXPORT wxCheckBox;
+class WXDLLEXPORT wxRadioBox;
+class WXDLLEXPORT wxTextCtrl;
+
+// ----------------------------------------------------------------------------
+// wxGenericFindReplaceDialog: dialog for searching / replacing text
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericFindReplaceDialog : public wxFindReplaceDialogBase
+{
+public:
+ wxGenericFindReplaceDialog() { Init(); }
+
+ wxGenericFindReplaceDialog(wxWindow *parent,
+ wxFindReplaceData *data,
+ const wxString& title,
+ int style = 0)
+ {
+ Init();
+
+ (void)Create(parent, data, title, style);
+ }
+
+ bool Create(wxWindow *parent,
+ wxFindReplaceData *data,
+ const wxString& title,
+ int style = 0);
+
+protected:
+ void Init();
+
+ void SendEvent(const wxEventType& evtType);
+
+ void OnFind(wxCommandEvent& event);
+ void OnReplace(wxCommandEvent& event);
+ void OnReplaceAll(wxCommandEvent& event);
+ void OnCancel(wxCommandEvent& event);
+
+ void OnUpdateFindUI(wxUpdateUIEvent& event);
+
+ void OnCloseWindow(wxCloseEvent& event);
+
+ wxCheckBox *m_chkCase,
+ *m_chkWord;
+
+ wxRadioBox *m_radioDir;
+
+ wxTextCtrl *m_textFind,
+ *m_textRepl;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericFindReplaceDialog)
+
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // _WX_GENERIC_FDREPDLG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/filedlgg.h b/3rdparty/wxWidgets/include/wx/generic/filedlgg.h
new file mode 100644
index 0000000000..70da48c382
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/filedlgg.h
@@ -0,0 +1,307 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/filedlgg.h
+// Purpose: wxGenericFileDialog
+// Author: Robert Roebling
+// Modified by:
+// Created: 8/17/99
+// Copyright: (c) Robert Roebling
+// RCS-ID: $Id: filedlgg.h 39631 2006-06-08 10:05:42Z RR $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILEDLGG_H_
+#define _WX_FILEDLGG_H_
+
+#include "wx/listctrl.h"
+#include "wx/datetime.h"
+#include "wx/filefn.h"
+#include "wx/filedlg.h"
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxBitmapButton;
+class WXDLLEXPORT wxCheckBox;
+class WXDLLEXPORT wxChoice;
+class WXDLLEXPORT wxFileData;
+class WXDLLEXPORT wxFileCtrl;
+class WXDLLEXPORT wxGenericFileDialog;
+class WXDLLEXPORT wxListEvent;
+class WXDLLEXPORT wxListItem;
+class WXDLLEXPORT wxStaticText;
+class WXDLLEXPORT wxTextCtrl;
+
+//-------------------------------------------------------------------------
+// wxGenericFileDialog
+//-------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericFileDialog: public wxFileDialogBase
+{
+public:
+ wxGenericFileDialog() : wxFileDialogBase() { Init(); }
+
+ wxGenericFileDialog(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = wxFD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxFileDialogNameStr,
+ bool bypassGenericImpl = false );
+
+ bool Create( wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = wxFD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxFileDialogNameStr,
+ bool bypassGenericImpl = false );
+
+ virtual ~wxGenericFileDialog();
+
+ virtual void SetMessage(const wxString& message) { SetTitle(message); }
+ virtual void SetPath(const wxString& path);
+ virtual void SetFilterIndex(int filterIndex);
+ virtual void SetWildcard(const wxString& wildCard);
+
+ // for multiple file selection
+ virtual void GetPaths(wxArrayString& paths) const;
+ virtual void GetFilenames(wxArrayString& files) const;
+
+ // implementation only from now on
+ // -------------------------------
+
+ virtual int ShowModal();
+ virtual bool Show( bool show = true );
+
+ void OnSelected( wxListEvent &event );
+ void OnActivated( wxListEvent &event );
+ void OnList( wxCommandEvent &event );
+ void OnReport( wxCommandEvent &event );
+ void OnUp( wxCommandEvent &event );
+ void OnHome( wxCommandEvent &event );
+ void OnListOk( wxCommandEvent &event );
+ void OnNew( wxCommandEvent &event );
+ void OnChoiceFilter( wxCommandEvent &event );
+ void OnTextEnter( wxCommandEvent &event );
+ void OnTextChange( wxCommandEvent &event );
+ void OnCheck( wxCommandEvent &event );
+
+ virtual void HandleAction( const wxString &fn );
+
+ virtual void UpdateControls();
+
+private:
+ // Don't use this implementation at all :-)
+ bool m_bypassGenericImpl;
+
+protected:
+ // use the filter with the given index
+ void DoSetFilterIndex(int filterindex);
+
+ wxString m_filterExtension;
+ wxChoice *m_choice;
+ wxTextCtrl *m_text;
+ wxFileCtrl *m_list;
+ wxCheckBox *m_check;
+ wxStaticText *m_static;
+ wxBitmapButton *m_upDirButton;
+ wxBitmapButton *m_newDirButton;
+
+private:
+ void Init();
+ DECLARE_DYNAMIC_CLASS(wxGenericFileDialog)
+ DECLARE_EVENT_TABLE()
+
+ // these variables are preserved between wxGenericFileDialog calls
+ static long ms_lastViewStyle; // list or report?
+ static bool ms_lastShowHidden; // did we show hidden files?
+};
+
+#ifdef wxUSE_GENERIC_FILEDIALOG
+
+class WXDLLEXPORT wxFileDialog: public wxGenericFileDialog
+{
+public:
+ wxFileDialog() {}
+
+ wxFileDialog(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = 0,
+ const wxPoint& pos = wxDefaultPosition)
+ :wxGenericFileDialog(parent, message, defaultDir, defaultFile, wildCard, style, pos)
+ {
+ }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxFileDialog)
+};
+
+#endif // wxUSE_GENERIC_FILEDIALOG
+
+//-----------------------------------------------------------------------------
+// wxFileData - a class to hold the file info for the wxFileCtrl
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFileData
+{
+public:
+ enum fileType
+ {
+ is_file = 0x0000,
+ is_dir = 0x0001,
+ is_link = 0x0002,
+ is_exe = 0x0004,
+ is_drive = 0x0008
+ };
+
+ wxFileData() { Init(); }
+ // Full copy constructor
+ wxFileData( const wxFileData& fileData ) { Copy(fileData); }
+ // Create a filedata from this information
+ wxFileData( const wxString &filePath, const wxString &fileName,
+ fileType type, int image_id );
+
+ // make a full copy of the other wxFileData
+ void Copy( const wxFileData &other );
+
+ // (re)read the extra data about the file from the system
+ void ReadData();
+
+ // get the name of the file, dir, drive
+ wxString GetFileName() const { return m_fileName; }
+ // get the full path + name of the file, dir, path
+ wxString GetFilePath() const { return m_filePath; }
+ // Set the path + name and name of the item
+ void SetNewName( const wxString &filePath, const wxString &fileName );
+
+ // Get the size of the file in bytes
+ wxFileOffset GetSize() const { return m_size; }
+ // Get the type of file, either file extension or , ,
+ wxString GetFileType() const;
+ // get the last modification time
+ wxDateTime GetDateTime() const { return m_dateTime; }
+ // Get the time as a formatted string
+ wxString GetModificationTime() const;
+ // in UNIX get rwx for file, in MSW get attributes ARHS
+ wxString GetPermissions() const { return m_permissions; }
+ // Get the id of the image used in a wxImageList
+ int GetImageId() const { return m_image; }
+
+ bool IsFile() const { return !IsDir() && !IsLink() && !IsDrive(); }
+ bool IsDir() const { return (m_type & is_dir ) != 0; }
+ bool IsLink() const { return (m_type & is_link ) != 0; }
+ bool IsExe() const { return (m_type & is_exe ) != 0; }
+ bool IsDrive() const { return (m_type & is_drive) != 0; }
+
+ // Get/Set the type of file, file/dir/drive/link
+ int GetType() const { return m_type; }
+
+ // the wxFileCtrl fields in report view
+ enum fileListFieldType
+ {
+ FileList_Name,
+ FileList_Size,
+ FileList_Type,
+ FileList_Time,
+#if defined(__UNIX__) || defined(__WIN32__)
+ FileList_Perm,
+#endif // defined(__UNIX__) || defined(__WIN32__)
+ FileList_Max
+ };
+
+ // Get the entry for report view of wxFileCtrl
+ wxString GetEntry( fileListFieldType num ) const;
+
+ // Get a string representation of the file info
+ wxString GetHint() const;
+ // initialize a wxListItem attributes
+ void MakeItem( wxListItem &item );
+
+ // operators
+ wxFileData& operator = (const wxFileData& fd) { Copy(fd); return *this; }
+
+protected:
+ wxString m_fileName;
+ wxString m_filePath;
+ wxFileOffset m_size;
+ wxDateTime m_dateTime;
+ wxString m_permissions;
+ int m_type;
+ int m_image;
+
+private:
+ void Init();
+};
+
+//-----------------------------------------------------------------------------
+// wxFileCtrl
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFileCtrl : public wxListCtrl
+{
+public:
+ wxFileCtrl();
+ wxFileCtrl( wxWindow *win,
+ wxWindowID id,
+ const wxString &wild,
+ bool showHidden,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long style = wxLC_LIST,
+ const wxValidator &validator = wxDefaultValidator,
+ const wxString &name = wxT("filelist") );
+ virtual ~wxFileCtrl();
+
+ virtual void ChangeToListMode();
+ virtual void ChangeToReportMode();
+ virtual void ChangeToSmallIconMode();
+ virtual void ShowHidden( bool show = true );
+ bool GetShowHidden() const { return m_showHidden; }
+
+ virtual long Add( wxFileData *fd, wxListItem &item );
+ virtual void UpdateItem(const wxListItem &item);
+ virtual void UpdateFiles();
+ virtual void MakeDir();
+ virtual void GoToParentDir();
+ virtual void GoToHomeDir();
+ virtual void GoToDir( const wxString &dir );
+ virtual void SetWild( const wxString &wild );
+ wxString GetWild() const { return m_wild; }
+ wxString GetDir() const { return m_dirName; }
+
+ void OnListDeleteItem( wxListEvent &event );
+ void OnListDeleteAllItems( wxListEvent &event );
+ void OnListEndLabelEdit( wxListEvent &event );
+ void OnListColClick( wxListEvent &event );
+
+ virtual void SortItems(wxFileData::fileListFieldType field, bool foward);
+ bool GetSortDirection() const { return m_sort_foward; }
+ wxFileData::fileListFieldType GetSortField() const { return m_sort_field; }
+
+protected:
+ void FreeItemData(wxListItem& item);
+ void FreeAllItemsData();
+
+ wxString m_dirName;
+ bool m_showHidden;
+ wxString m_wild;
+
+ bool m_sort_foward;
+ wxFileData::fileListFieldType m_sort_field;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxFileCtrl)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // _WX_FILEDLGG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/filepickerg.h b/3rdparty/wxWidgets/include/wx/generic/filepickerg.h
new file mode 100644
index 0000000000..502587bea6
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/filepickerg.h
@@ -0,0 +1,213 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/filepickerg.h
+// Purpose: wxGenericFileDirButton, wxGenericFileButton, wxGenericDirButton
+// Author: Francesco Montorsi
+// Modified by:
+// Created: 14/4/2006
+// Copyright: (c) Francesco Montorsi
+// RCS-ID: $Id: filepickerg.h 40100 2006-07-15 15:13:04Z VS $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILEDIRPICKER_H_
+#define _WX_FILEDIRPICKER_H_
+
+#include "wx/button.h"
+#include "wx/filedlg.h"
+#include "wx/dirdlg.h"
+
+
+extern WXDLLEXPORT_DATA(const wxEventType) wxEVT_COMMAND_DIRPICKER_CHANGED;
+extern WXDLLEXPORT_DATA(const wxEventType) wxEVT_COMMAND_FILEPICKER_CHANGED;
+
+
+//-----------------------------------------------------------------------------
+// wxGenericFileDirButton: a button which brings up a wx{File|Dir}Dialog
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton,
+ public wxFileDirPickerWidgetBase
+{
+public:
+ wxGenericFileDirButton() { }
+ wxGenericFileDirButton(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label = wxFilePickerWidgetLabel,
+ const wxString& path = wxEmptyString,
+ const wxString &message = wxFileSelectorPromptStr,
+ const wxString &wildcard = wxFileSelectorDefaultWildcardStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFilePickerWidgetNameStr)
+ {
+ Create(parent, id, label, path, message, wildcard,
+ pos, size, style, validator, name);
+ }
+
+ virtual ~wxGenericFileDirButton() {}
+
+ virtual wxControl *AsControl() { return this; }
+
+public: // overrideable
+
+ virtual wxDialog *CreateDialog() = 0;
+
+ virtual wxWindow *GetDialogParent()
+ { return GetParent(); }
+
+ virtual wxEventType GetEventType() const = 0;
+
+public:
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxString& label = wxFilePickerWidgetLabel,
+ const wxString& path = wxEmptyString,
+ const wxString &message = wxFileSelectorPromptStr,
+ const wxString &wildcard = wxFileSelectorDefaultWildcardStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFilePickerWidgetNameStr);
+
+ // event handler for the click
+ void OnButtonClick(wxCommandEvent &);
+
+protected:
+ wxString m_message, m_wildcard;
+};
+
+
+//-----------------------------------------------------------------------------
+// wxGenericFileButton: a button which brings up a wxFileDialog
+//-----------------------------------------------------------------------------
+
+#define wxFILEBTN_DEFAULT_STYLE (wxFLP_OPEN)
+
+class WXDLLIMPEXP_CORE wxGenericFileButton : public wxGenericFileDirButton
+{
+public:
+ wxGenericFileButton() {}
+ wxGenericFileButton(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label = wxFilePickerWidgetLabel,
+ const wxString& path = wxEmptyString,
+ const wxString &message = wxFileSelectorPromptStr,
+ const wxString &wildcard = wxFileSelectorDefaultWildcardStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFILEBTN_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFilePickerWidgetNameStr)
+ {
+ Create(parent, id, label, path, message, wildcard,
+ pos, size, style, validator, name);
+ }
+
+public: // overrideable
+
+ virtual long GetDialogStyle() const
+ {
+ long filedlgstyle = 0;
+
+ if (this->HasFlag(wxFLP_OPEN))
+ filedlgstyle |= wxFD_OPEN;
+ if (this->HasFlag(wxFLP_SAVE))
+ filedlgstyle |= wxFD_SAVE;
+ if (this->HasFlag(wxFLP_OVERWRITE_PROMPT))
+ filedlgstyle |= wxFD_OVERWRITE_PROMPT;
+ if (this->HasFlag(wxFLP_FILE_MUST_EXIST))
+ filedlgstyle |= wxFD_FILE_MUST_EXIST;
+ if (this->HasFlag(wxFLP_CHANGE_DIR))
+ filedlgstyle |= wxFD_CHANGE_DIR;
+
+ return filedlgstyle;
+ }
+
+ virtual wxDialog *CreateDialog()
+ {
+ wxFileDialog *p = new wxFileDialog(GetDialogParent(), m_message,
+ wxEmptyString, wxEmptyString,
+ m_wildcard, GetDialogStyle());
+
+ // this sets both the default folder and the default file of the dialog
+ p->SetPath(m_path);
+ return p;
+ }
+
+ wxEventType GetEventType() const
+ { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
+
+protected:
+ void UpdateDialogPath(wxDialog *p)
+ { wxStaticCast(p, wxFileDialog)->SetPath(m_path); }
+ void UpdatePathFromDialog(wxDialog *p)
+ { m_path = wxStaticCast(p, wxFileDialog)->GetPath(); }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericFileButton)
+};
+
+
+//-----------------------------------------------------------------------------
+// wxGenericDirButton: a button which brings up a wxDirDialog
+//-----------------------------------------------------------------------------
+
+#define wxDIRBTN_DEFAULT_STYLE 0
+
+class WXDLLIMPEXP_CORE wxGenericDirButton : public wxGenericFileDirButton
+{
+public:
+ wxGenericDirButton() {}
+ wxGenericDirButton(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label = wxDirPickerWidgetLabel,
+ const wxString& path = wxEmptyString,
+ const wxString &message = wxDirSelectorPromptStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDIRBTN_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDirPickerWidgetNameStr)
+ {
+ Create(parent, id, label, path, message, wxEmptyString,
+ pos, size, style, validator, name);
+ }
+
+public: // overrideable
+
+ virtual long GetDialogStyle() const
+ {
+ long dirdlgstyle = wxDD_DEFAULT_STYLE;
+
+ if (this->HasFlag(wxDIRP_DIR_MUST_EXIST))
+ dirdlgstyle |= wxDD_DIR_MUST_EXIST;
+ if (this->HasFlag(wxDIRP_CHANGE_DIR))
+ dirdlgstyle |= wxDD_CHANGE_DIR;
+
+ return dirdlgstyle;
+ }
+
+ virtual wxDialog *CreateDialog()
+ {
+ return new wxDirDialog(GetDialogParent(), m_message, m_path,
+ GetDialogStyle());
+ }
+
+ wxEventType GetEventType() const
+ { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
+
+protected:
+ void UpdateDialogPath(wxDialog *p)
+ { wxStaticCast(p, wxDirDialog)->SetPath(m_path); }
+ void UpdatePathFromDialog(wxDialog *p)
+ { m_path = wxStaticCast(p, wxDirDialog)->GetPath(); }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericDirButton)
+};
+
+
+#endif // _WX_FILEDIRPICKER_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/fontdlgg.h b/3rdparty/wxWidgets/include/wx/generic/fontdlgg.h
new file mode 100644
index 0000000000..6a4b80b291
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/fontdlgg.h
@@ -0,0 +1,120 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/fontdlgg.h
+// Purpose: wxGenericFontDialog
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: fontdlgg.h 39286 2006-05-23 11:16:47Z JS $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_FONTDLGG_H
+#define _WX_GENERIC_FONTDLGG_H
+
+#include "wx/defs.h"
+#include "wx/gdicmn.h"
+#include "wx/font.h"
+#include "wx/dialog.h"
+#include "wx/cmndata.h"
+
+#ifdef __WXWINCE__
+#define USE_SPINCTRL_FOR_POINT_SIZE 1
+class WXDLLEXPORT wxSpinEvent;
+#else
+#define USE_SPINCTRL_FOR_POINT_SIZE 0
+#endif
+
+/*
+ * FONT DIALOG
+ */
+
+class WXDLLEXPORT wxChoice;
+class WXDLLEXPORT wxText;
+class WXDLLEXPORT wxCheckBox;
+class WXDLLEXPORT wxFontPreviewer;
+
+enum
+{
+ wxID_FONT_UNDERLINE = 3000,
+ wxID_FONT_STYLE,
+ wxID_FONT_WEIGHT,
+ wxID_FONT_FAMILY,
+ wxID_FONT_COLOUR,
+ wxID_FONT_SIZE
+};
+
+class WXDLLEXPORT wxGenericFontDialog : public wxFontDialogBase
+{
+public:
+ wxGenericFontDialog() { Init(); }
+ wxGenericFontDialog(wxWindow *parent)
+ : wxFontDialogBase(parent) { Init(); }
+ wxGenericFontDialog(wxWindow *parent, const wxFontData& data)
+ : wxFontDialogBase(parent, data) { Init(); }
+ virtual ~wxGenericFontDialog();
+
+ virtual int ShowModal();
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated, for backwards compatibility only
+ wxDEPRECATED( wxGenericFontDialog(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ // Internal functions
+ void OnCloseWindow(wxCloseEvent& event);
+
+ virtual void CreateWidgets();
+ virtual void InitializeFont();
+
+ void OnChangeFont(wxCommandEvent& event);
+
+#if USE_SPINCTRL_FOR_POINT_SIZE
+ void OnChangeSize(wxSpinEvent& event);
+#endif
+
+protected:
+
+ virtual bool DoCreate(wxWindow *parent);
+
+private:
+
+ // common part of all ctors
+ void Init();
+
+ void DoChangeFont();
+
+ wxFont m_dialogFont;
+
+ wxChoice *m_familyChoice;
+ wxChoice *m_styleChoice;
+ wxChoice *m_weightChoice;
+ wxChoice *m_colourChoice;
+ wxCheckBox *m_underLineCheckBox;
+
+#if !USE_SPINCTRL_FOR_POINT_SIZE
+ wxChoice *m_pointSizeChoice;
+#endif
+
+ wxFontPreviewer *m_previewer;
+ bool m_useEvents;
+
+ // static bool fontDialogCancelled;
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
+};
+
+WXDLLEXPORT const wxChar *wxFontFamilyIntToString(int family);
+WXDLLEXPORT const wxChar *wxFontWeightIntToString(int weight);
+WXDLLEXPORT const wxChar *wxFontStyleIntToString(int style);
+WXDLLEXPORT int wxFontFamilyStringToInt(wxChar *family);
+WXDLLEXPORT int wxFontWeightStringToInt(wxChar *weight);
+WXDLLEXPORT int wxFontStyleStringToInt(wxChar *style);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // deprecated, for backwards compatibility only
+inline wxGenericFontDialog::wxGenericFontDialog(wxWindow *parent, const wxFontData *data)
+ :wxFontDialogBase(parent) { Init(); InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#endif // _WX_GENERIC_FONTDLGG_H
diff --git a/3rdparty/wxWidgets/include/wx/generic/fontpickerg.h b/3rdparty/wxWidgets/include/wx/generic/fontpickerg.h
new file mode 100644
index 0000000000..ead7645139
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/fontpickerg.h
@@ -0,0 +1,82 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/fontpickerg.h
+// Purpose: wxGenericFontButton header
+// Author: Francesco Montorsi
+// Modified by:
+// Created: 14/4/2006
+// Copyright: (c) Francesco Montorsi
+// RCS-ID: $Id: fontpickerg.h 42999 2006-11-03 21:54:13Z VZ $
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FONTPICKER_H_
+#define _WX_FONTPICKER_H_
+
+#include "wx/button.h"
+#include "wx/cmndata.h"
+
+//-----------------------------------------------------------------------------
+// wxGenericFontButton: a button which brings up a wxColourDialog
+//-----------------------------------------------------------------------------
+
+#define wxFONTBTN_DEFAULT_STYLE \
+ (wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL)
+
+class WXDLLIMPEXP_CORE wxGenericFontButton : public wxButton,
+ public wxFontPickerWidgetBase
+{
+public:
+ wxGenericFontButton() {}
+ wxGenericFontButton(wxWindow *parent,
+ wxWindowID id,
+ const wxFont &initial = wxNullFont,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFONTBTN_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFontPickerWidgetNameStr)
+ {
+ Create(parent, id, initial, pos, size, style, validator, name);
+ }
+
+ virtual ~wxGenericFontButton() {}
+
+
+public: // API extensions specific for wxGenericFontButton
+
+ // user can override this to init font data in a different way
+ virtual void InitFontData();
+
+ // returns the font data shown in wxColourDialog
+ wxFontData *GetFontData() { return &ms_data; }
+
+
+public:
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxFont &initial = *wxNORMAL_FONT,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxFONTBTN_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxFontPickerWidgetNameStr);
+
+ void OnButtonClick(wxCommandEvent &);
+
+
+protected:
+
+ void UpdateFont();
+
+ // the colour data shown in wxColourPickerCtrlGeneric
+ // controls. This member is static so that all colour pickers
+ // in the program share the same set of custom colours.
+ static wxFontData ms_data;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericFontButton)
+};
+
+
+#endif // _WX_FONTPICKER_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/grid.h b/3rdparty/wxWidgets/include/wx/generic/grid.h
new file mode 100644
index 0000000000..e84bb7dd73
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/grid.h
@@ -0,0 +1,2302 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/grid.h
+// Purpose: wxGrid and related classes
+// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn)
+// Modified by: Santiago Palacios
+// Created: 1/08/1999
+// RCS-ID: $Id: grid.h 55568 2008-09-12 12:49:11Z VZ $
+// Copyright: (c) Michael Bedward
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_GRID_H_
+#define _WX_GENERIC_GRID_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_GRID
+
+#include "wx/scrolwin.h"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxGridNameStr[];
+
+// Default parameters for wxGrid
+//
+#define WXGRID_DEFAULT_NUMBER_ROWS 10
+#define WXGRID_DEFAULT_NUMBER_COLS 10
+#if defined(__WXMSW__) || defined(__WXGTK20__)
+#define WXGRID_DEFAULT_ROW_HEIGHT 25
+#else
+#define WXGRID_DEFAULT_ROW_HEIGHT 30
+#endif // __WXMSW__
+#define WXGRID_DEFAULT_COL_WIDTH 80
+#define WXGRID_DEFAULT_COL_LABEL_HEIGHT 32
+#define WXGRID_DEFAULT_ROW_LABEL_WIDTH 82
+#define WXGRID_LABEL_EDGE_ZONE 2
+#define WXGRID_MIN_ROW_HEIGHT 15
+#define WXGRID_MIN_COL_WIDTH 15
+#define WXGRID_DEFAULT_SCROLLBAR_WIDTH 16
+
+// type names for grid table values
+#define wxGRID_VALUE_STRING _T("string")
+#define wxGRID_VALUE_BOOL _T("bool")
+#define wxGRID_VALUE_NUMBER _T("long")
+#define wxGRID_VALUE_FLOAT _T("double")
+#define wxGRID_VALUE_CHOICE _T("choice")
+
+#define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING
+#define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER
+
+#if wxABI_VERSION >= 20808
+ // magic constant which tells (to some functions) to automatically
+ // calculate the appropriate size
+ #define wxGRID_AUTOSIZE (-1)
+#endif // wxABI_VERSION >= 20808
+
+// ----------------------------------------------------------------------------
+// forward declarations
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_ADV wxGrid;
+class WXDLLIMPEXP_FWD_ADV wxGridCellAttr;
+class WXDLLIMPEXP_FWD_ADV wxGridCellAttrProviderData;
+class WXDLLIMPEXP_FWD_ADV wxGridColLabelWindow;
+class WXDLLIMPEXP_FWD_ADV wxGridCornerLabelWindow;
+class WXDLLIMPEXP_FWD_ADV wxGridRowLabelWindow;
+class WXDLLIMPEXP_FWD_ADV wxGridWindow;
+class WXDLLIMPEXP_FWD_ADV wxGridTypeRegistry;
+class WXDLLIMPEXP_FWD_ADV wxGridSelection;
+
+class WXDLLIMPEXP_FWD_CORE wxCheckBox;
+class WXDLLIMPEXP_FWD_CORE wxComboBox;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+#if wxUSE_SPINCTRL
+class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
+#endif
+
+// ----------------------------------------------------------------------------
+// macros
+// ----------------------------------------------------------------------------
+
+#define wxSafeIncRef(p) if ( p ) (p)->IncRef()
+#define wxSafeDecRef(p) if ( p ) (p)->DecRef()
+
+// ----------------------------------------------------------------------------
+// wxGridCellWorker: common base class for wxGridCellRenderer and
+// wxGridCellEditor
+//
+// NB: this is more an implementation convenience than a design issue, so this
+// class is not documented and is not public at all
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGridCellWorker : public wxClientDataContainer
+{
+public:
+ wxGridCellWorker() { m_nRef = 1; }
+
+ // this class is ref counted: it is created with ref count of 1, so
+ // calling DecRef() once will delete it. Calling IncRef() allows to lock
+ // it until the matching DecRef() is called
+ void IncRef() { m_nRef++; }
+ void DecRef() { if ( --m_nRef == 0 ) delete this; }
+
+ // interpret renderer parameters: arbitrary string whose interpretatin is
+ // left to the derived classes
+ virtual void SetParameters(const wxString& params);
+
+protected:
+ // virtual dtor for any base class - private because only DecRef() can
+ // delete us
+ virtual ~wxGridCellWorker();
+
+private:
+ size_t m_nRef;
+
+ // suppress the stupid gcc warning about the class having private dtor and
+ // no friends
+ friend class wxGridCellWorkerDummyFriend;
+};
+
+// ----------------------------------------------------------------------------
+// wxGridCellRenderer: this class is responsible for actually drawing the cell
+// in the grid. You may pass it to the wxGridCellAttr (below) to change the
+// format of one given cell or to wxGrid::SetDefaultRenderer() to change the
+// view of all cells. This is an ABC, you will normally use one of the
+// predefined derived classes or derive your own class from it.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGridCellRenderer : public wxGridCellWorker
+{
+public:
+ // draw the given cell on the provided DC inside the given rectangle
+ // using the style specified by the attribute and the default or selected
+ // state corresponding to the isSelected value.
+ //
+ // this pure virtual function has a default implementation which will
+ // prepare the DC using the given attribute: it will draw the rectangle
+ // with the bg colour from attr and set the text colour and font
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected) = 0;
+
+ // get the preferred size of the cell for its contents
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col) = 0;
+
+ // create a new object which is the copy of this one
+ virtual wxGridCellRenderer *Clone() const = 0;
+};
+
+// the default renderer for the cells containing string data
+class WXDLLIMPEXP_ADV wxGridCellStringRenderer : public wxGridCellRenderer
+{
+public:
+ // draw the string
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ // return the string extent
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ virtual wxGridCellRenderer *Clone() const
+ { return new wxGridCellStringRenderer; }
+
+protected:
+ // set the text colours before drawing
+ void SetTextColoursAndFont(const wxGrid& grid,
+ const wxGridCellAttr& attr,
+ wxDC& dc,
+ bool isSelected);
+
+ // calc the string extent for given string/font
+ wxSize DoGetBestSize(const wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxString& text);
+};
+
+// the default renderer for the cells containing numeric (long) data
+class WXDLLIMPEXP_ADV wxGridCellNumberRenderer : public wxGridCellStringRenderer
+{
+public:
+ // draw the string right aligned
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ virtual wxGridCellRenderer *Clone() const
+ { return new wxGridCellNumberRenderer; }
+
+protected:
+ wxString GetString(const wxGrid& grid, int row, int col);
+};
+
+class WXDLLIMPEXP_ADV wxGridCellFloatRenderer : public wxGridCellStringRenderer
+{
+public:
+ wxGridCellFloatRenderer(int width = -1, int precision = -1);
+
+ // get/change formatting parameters
+ int GetWidth() const { return m_width; }
+ void SetWidth(int width) { m_width = width; m_format.clear(); }
+ int GetPrecision() const { return m_precision; }
+ void SetPrecision(int precision) { m_precision = precision; m_format.clear(); }
+
+ // draw the string right aligned with given width/precision
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ // parameters string format is "width[,precision]"
+ virtual void SetParameters(const wxString& params);
+
+ virtual wxGridCellRenderer *Clone() const;
+
+protected:
+ wxString GetString(const wxGrid& grid, int row, int col);
+
+private:
+ // formatting parameters
+ int m_width,
+ m_precision;
+
+ wxString m_format;
+};
+
+// renderer for boolean fields
+class WXDLLIMPEXP_ADV wxGridCellBoolRenderer : public wxGridCellRenderer
+{
+public:
+ // draw a check mark or nothing
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ // return the checkmark size
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ virtual wxGridCellRenderer *Clone() const
+ { return new wxGridCellBoolRenderer; }
+
+private:
+ static wxSize ms_sizeCheckMark;
+};
+
+// ----------------------------------------------------------------------------
+// wxGridCellEditor: This class is responsible for providing and manipulating
+// the in-place edit controls for the grid. Instances of wxGridCellEditor
+// (actually, instances of derived classes since it is an ABC) can be
+// associated with the cell attributes for individual cells, rows, columns, or
+// even for the entire grid.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGridCellEditor : public wxGridCellWorker
+{
+public:
+ wxGridCellEditor();
+
+ bool IsCreated() { return m_control != NULL; }
+ wxControl* GetControl() { return m_control; }
+ void SetControl(wxControl* control) { m_control = control; }
+
+ wxGridCellAttr* GetCellAttr() { return m_attr; }
+ void SetCellAttr(wxGridCellAttr* attr) { m_attr = attr; }
+
+ // Creates the actual edit control
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler) = 0;
+
+ // Size and position the edit control
+ virtual void SetSize(const wxRect& rect);
+
+ // Show or hide the edit control, use the specified attributes to set
+ // colours/fonts for it
+ virtual void Show(bool show, wxGridCellAttr *attr = (wxGridCellAttr *)NULL);
+
+ // Draws the part of the cell not occupied by the control: the base class
+ // version just fills it with background colour from the attribute
+ virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
+
+ // Fetch the value from the table and prepare the edit control
+ // to begin editing. Set the focus to the edit control.
+ virtual void BeginEdit(int row, int col, wxGrid* grid) = 0;
+
+ // Complete the editing of the current cell. Returns true if the value has
+ // changed. If necessary, the control may be destroyed.
+ virtual bool EndEdit(int row, int col, wxGrid* grid) = 0;
+
+ // Reset the value in the control back to its starting value
+ virtual void Reset() = 0;
+
+ // return true to allow the given key to start editing: the base class
+ // version only checks that the event has no modifiers. The derived
+ // classes are supposed to do "if ( base::IsAcceptedKey() && ... )" in
+ // their IsAcceptedKey() implementation, although, of course, it is not a
+ // mandatory requirment.
+ //
+ // NB: if the key is F2 (special), editing will always start and this
+ // method will not be called at all (but StartingKey() will)
+ virtual bool IsAcceptedKey(wxKeyEvent& event);
+
+ // If the editor is enabled by pressing keys on the grid, this will be
+ // called to let the editor do something about that first key if desired
+ virtual void StartingKey(wxKeyEvent& event);
+
+ // if the editor is enabled by clicking on the cell, this method will be
+ // called
+ virtual void StartingClick();
+
+ // Some types of controls on some platforms may need some help
+ // with the Return key.
+ virtual void HandleReturn(wxKeyEvent& event);
+
+ // Final cleanup
+ virtual void Destroy();
+
+ // create a new object which is the copy of this one
+ virtual wxGridCellEditor *Clone() const = 0;
+
+ // added GetValue so we can get the value which is in the control
+ virtual wxString GetValue() const = 0;
+
+protected:
+ // the dtor is private because only DecRef() can delete us
+ virtual ~wxGridCellEditor();
+
+ // the control we show on screen
+ wxControl* m_control;
+
+ // a temporary pointer to the attribute being edited
+ wxGridCellAttr* m_attr;
+
+ // if we change the colours/font of the control from the default ones, we
+ // must restore the default later and we save them here between calls to
+ // Show(true) and Show(false)
+ wxColour m_colFgOld,
+ m_colBgOld;
+ wxFont m_fontOld;
+
+ // suppress the stupid gcc warning about the class having private dtor and
+ // no friends
+ friend class wxGridCellEditorDummyFriend;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellEditor)
+};
+
+#if wxUSE_TEXTCTRL
+
+// the editor for string/text data
+class WXDLLIMPEXP_ADV wxGridCellTextEditor : public wxGridCellEditor
+{
+public:
+ wxGridCellTextEditor();
+
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler);
+ virtual void SetSize(const wxRect& rect);
+
+ virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
+
+ virtual bool IsAcceptedKey(wxKeyEvent& event);
+ virtual void BeginEdit(int row, int col, wxGrid* grid);
+ virtual bool EndEdit(int row, int col, wxGrid* grid);
+
+ virtual void Reset();
+ virtual void StartingKey(wxKeyEvent& event);
+ virtual void HandleReturn(wxKeyEvent& event);
+
+ // parameters string format is "max_width"
+ virtual void SetParameters(const wxString& params);
+
+ virtual wxGridCellEditor *Clone() const
+ { return new wxGridCellTextEditor; }
+
+ // added GetValue so we can get the value which is in the control
+ virtual wxString GetValue() const;
+
+protected:
+ wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; }
+
+ // parts of our virtual functions reused by the derived classes
+ void DoBeginEdit(const wxString& startValue);
+ void DoReset(const wxString& startValue);
+
+private:
+ size_t m_maxChars; // max number of chars allowed
+ wxString m_startValue;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellTextEditor)
+};
+
+// the editor for numeric (long) data
+class WXDLLIMPEXP_ADV wxGridCellNumberEditor : public wxGridCellTextEditor
+{
+public:
+ // allows to specify the range - if min == max == -1, no range checking is
+ // done
+ wxGridCellNumberEditor(int min = -1, int max = -1);
+
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler);
+
+ virtual bool IsAcceptedKey(wxKeyEvent& event);
+ virtual void BeginEdit(int row, int col, wxGrid* grid);
+ virtual bool EndEdit(int row, int col, wxGrid* grid);
+
+ virtual void Reset();
+ virtual void StartingKey(wxKeyEvent& event);
+
+ // parameters string format is "min,max"
+ virtual void SetParameters(const wxString& params);
+
+ virtual wxGridCellEditor *Clone() const
+ { return new wxGridCellNumberEditor(m_min, m_max); }
+
+ // added GetValue so we can get the value which is in the control
+ virtual wxString GetValue() const;
+
+protected:
+#if wxUSE_SPINCTRL
+ wxSpinCtrl *Spin() const { return (wxSpinCtrl *)m_control; }
+#endif
+
+ // if HasRange(), we use wxSpinCtrl - otherwise wxTextCtrl
+ bool HasRange() const
+ {
+#if wxUSE_SPINCTRL
+ return m_min != m_max;
+#else
+ return false;
+#endif
+ }
+
+ // string representation of m_valueOld
+ wxString GetString() const
+ { return wxString::Format(_T("%ld"), m_valueOld); }
+
+private:
+ int m_min,
+ m_max;
+
+ long m_valueOld;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellNumberEditor)
+};
+
+// the editor for floating point numbers (double) data
+class WXDLLIMPEXP_ADV wxGridCellFloatEditor : public wxGridCellTextEditor
+{
+public:
+ wxGridCellFloatEditor(int width = -1, int precision = -1);
+
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler);
+
+ virtual bool IsAcceptedKey(wxKeyEvent& event);
+ virtual void BeginEdit(int row, int col, wxGrid* grid);
+ virtual bool EndEdit(int row, int col, wxGrid* grid);
+
+ virtual void Reset();
+ virtual void StartingKey(wxKeyEvent& event);
+
+ virtual wxGridCellEditor *Clone() const
+ { return new wxGridCellFloatEditor(m_width, m_precision); }
+
+ // parameters string format is "width,precision"
+ virtual void SetParameters(const wxString& params);
+
+protected:
+ // string representation of m_valueOld
+ wxString GetString() const;
+
+private:
+ int m_width,
+ m_precision;
+ double m_valueOld;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellFloatEditor)
+};
+
+#endif // wxUSE_TEXTCTRL
+
+#if wxUSE_CHECKBOX
+
+// the editor for boolean data
+class WXDLLIMPEXP_ADV wxGridCellBoolEditor : public wxGridCellEditor
+{
+public:
+ wxGridCellBoolEditor() { }
+
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler);
+
+ virtual void SetSize(const wxRect& rect);
+ virtual void Show(bool show, wxGridCellAttr *attr = NULL);
+
+ virtual bool IsAcceptedKey(wxKeyEvent& event);
+ virtual void BeginEdit(int row, int col, wxGrid* grid);
+ virtual bool EndEdit(int row, int col, wxGrid* grid);
+
+ virtual void Reset();
+ virtual void StartingClick();
+ virtual void StartingKey(wxKeyEvent& event);
+
+ virtual wxGridCellEditor *Clone() const
+ { return new wxGridCellBoolEditor; }
+
+ // added GetValue so we can get the value which is in the control, see
+ // also UseStringValues()
+ virtual wxString GetValue() const;
+
+ // set the string values returned by GetValue() for the true and false
+ // states, respectively
+ static void UseStringValues(const wxString& valueTrue = _T("1"),
+ const wxString& valueFalse = wxEmptyString);
+
+ // return true if the given string is equal to the string representation of
+ // true value which we currently use
+ static bool IsTrueValue(const wxString& value);
+
+protected:
+ wxCheckBox *CBox() const { return (wxCheckBox *)m_control; }
+
+private:
+ bool m_startValue;
+
+ static wxString ms_stringValues[2];
+
+ DECLARE_NO_COPY_CLASS(wxGridCellBoolEditor)
+};
+
+#endif // wxUSE_CHECKBOX
+
+#if wxUSE_COMBOBOX
+
+// the editor for string data allowing to choose from the list of strings
+class WXDLLIMPEXP_ADV wxGridCellChoiceEditor : public wxGridCellEditor
+{
+public:
+ // if !allowOthers, user can't type a string not in choices array
+ wxGridCellChoiceEditor(size_t count = 0,
+ const wxString choices[] = NULL,
+ bool allowOthers = false);
+ wxGridCellChoiceEditor(const wxArrayString& choices,
+ bool allowOthers = false);
+
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler);
+
+ virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
+
+ virtual void BeginEdit(int row, int col, wxGrid* grid);
+ virtual bool EndEdit(int row, int col, wxGrid* grid);
+
+ virtual void Reset();
+
+ // parameters string format is "item1[,item2[...,itemN]]"
+ virtual void SetParameters(const wxString& params);
+
+ virtual wxGridCellEditor *Clone() const;
+
+ // added GetValue so we can get the value which is in the control
+ virtual wxString GetValue() const;
+
+protected:
+ wxComboBox *Combo() const { return (wxComboBox *)m_control; }
+
+// DJC - (MAPTEK) you at least need access to m_choices if you
+// wish to override this class
+protected:
+ wxString m_startValue;
+ wxArrayString m_choices;
+ bool m_allowOthers;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellChoiceEditor)
+};
+
+#endif // wxUSE_COMBOBOX
+
+// ----------------------------------------------------------------------------
+// wxGridCellAttr: this class can be used to alter the cells appearance in
+// the grid by changing their colour/font/... from default. An object of this
+// class may be returned by wxGridTable::GetAttr().
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGridCellAttr : public wxClientDataContainer
+{
+public:
+ enum wxAttrKind
+ {
+ Any,
+ Default,
+ Cell,
+ Row,
+ Col,
+ Merged
+ };
+
+ // ctors
+ wxGridCellAttr(wxGridCellAttr *attrDefault = NULL)
+ {
+ Init(attrDefault);
+
+ // MB: args used to be 0,0 here but wxALIGN_LEFT is 0
+ SetAlignment(-1, -1);
+ }
+
+ // VZ: considering the number of members wxGridCellAttr has now, this ctor
+ // seems to be pretty useless... may be we should just remove it?
+ wxGridCellAttr(const wxColour& colText,
+ const wxColour& colBack,
+ const wxFont& font,
+ int hAlign,
+ int vAlign)
+ : m_colText(colText), m_colBack(colBack), m_font(font)
+ {
+ Init();
+ SetAlignment(hAlign, vAlign);
+ }
+
+ // creates a new copy of this object
+ wxGridCellAttr *Clone() const;
+ void MergeWith(wxGridCellAttr *mergefrom);
+
+ // this class is ref counted: it is created with ref count of 1, so
+ // calling DecRef() once will delete it. Calling IncRef() allows to lock
+ // it until the matching DecRef() is called
+ void IncRef() { m_nRef++; }
+ void DecRef() { if ( --m_nRef == 0 ) delete this; }
+
+ // setters
+ void SetTextColour(const wxColour& colText) { m_colText = colText; }
+ void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
+ void SetFont(const wxFont& font) { m_font = font; }
+ void SetAlignment(int hAlign, int vAlign)
+ {
+ m_hAlign = hAlign;
+ m_vAlign = vAlign;
+ }
+ void SetSize(int num_rows, int num_cols);
+ void SetOverflow(bool allow = true)
+ { m_overflow = allow ? Overflow : SingleCell; }
+ void SetReadOnly(bool isReadOnly = true)
+ { m_isReadOnly = isReadOnly ? ReadOnly : ReadWrite; }
+
+ // takes ownership of the pointer
+ void SetRenderer(wxGridCellRenderer *renderer)
+ { wxSafeDecRef(m_renderer); m_renderer = renderer; }
+ void SetEditor(wxGridCellEditor* editor)
+ { wxSafeDecRef(m_editor); m_editor = editor; }
+
+ void SetKind(wxAttrKind kind) { m_attrkind = kind; }
+
+ // accessors
+ bool HasTextColour() const { return m_colText.Ok(); }
+ bool HasBackgroundColour() const { return m_colBack.Ok(); }
+ bool HasFont() const { return m_font.Ok(); }
+ bool HasAlignment() const { return (m_hAlign != -1 || m_vAlign != -1); }
+ bool HasRenderer() const { return m_renderer != NULL; }
+ bool HasEditor() const { return m_editor != NULL; }
+ bool HasReadWriteMode() const { return m_isReadOnly != Unset; }
+ bool HasOverflowMode() const { return m_overflow != UnsetOverflow; }
+ bool HasSize() const { return m_sizeRows != 1 || m_sizeCols != 1; }
+
+ const wxColour& GetTextColour() const;
+ const wxColour& GetBackgroundColour() const;
+ const wxFont& GetFont() const;
+ void GetAlignment(int *hAlign, int *vAlign) const;
+ void GetSize(int *num_rows, int *num_cols) const;
+ bool GetOverflow() const
+ { return m_overflow != SingleCell; }
+ wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const;
+ wxGridCellEditor *GetEditor(wxGrid* grid, int row, int col) const;
+
+ bool IsReadOnly() const { return m_isReadOnly == wxGridCellAttr::ReadOnly; }
+
+ wxAttrKind GetKind() { return m_attrkind; }
+
+ void SetDefAttr(wxGridCellAttr* defAttr) { m_defGridAttr = defAttr; }
+
+protected:
+ // the dtor is private because only DecRef() can delete us
+ virtual ~wxGridCellAttr()
+ {
+ wxSafeDecRef(m_renderer);
+ wxSafeDecRef(m_editor);
+ }
+
+private:
+ enum wxAttrReadMode
+ {
+ Unset = -1,
+ ReadWrite,
+ ReadOnly
+ };
+
+ enum wxAttrOverflowMode
+ {
+ UnsetOverflow = -1,
+ Overflow,
+ SingleCell
+ };
+
+ // the common part of all ctors
+ void Init(wxGridCellAttr *attrDefault = NULL);
+
+
+ // the ref count - when it goes to 0, we die
+ size_t m_nRef;
+
+ wxColour m_colText,
+ m_colBack;
+ wxFont m_font;
+ int m_hAlign,
+ m_vAlign;
+ int m_sizeRows,
+ m_sizeCols;
+
+ wxAttrOverflowMode m_overflow;
+
+ wxGridCellRenderer* m_renderer;
+ wxGridCellEditor* m_editor;
+ wxGridCellAttr* m_defGridAttr;
+
+ wxAttrReadMode m_isReadOnly;
+
+ wxAttrKind m_attrkind;
+
+ // use Clone() instead
+ DECLARE_NO_COPY_CLASS(wxGridCellAttr)
+
+ // suppress the stupid gcc warning about the class having private dtor and
+ // no friends
+ friend class wxGridCellAttrDummyFriend;
+};
+
+// ----------------------------------------------------------------------------
+// wxGridCellAttrProvider: class used by wxGridTableBase to retrieve/store the
+// cell attributes.
+// ----------------------------------------------------------------------------
+
+// implementation note: we separate it from wxGridTableBase because we wish to
+// avoid deriving a new table class if possible, and sometimes it will be
+// enough to just derive another wxGridCellAttrProvider instead
+//
+// the default implementation is reasonably efficient for the generic case,
+// but you might still wish to implement your own for some specific situations
+// if you have performance problems with the stock one
+class WXDLLIMPEXP_ADV wxGridCellAttrProvider : public wxClientDataContainer
+{
+public:
+ wxGridCellAttrProvider();
+ virtual ~wxGridCellAttrProvider();
+
+ // DecRef() must be called on the returned pointer
+ virtual wxGridCellAttr *GetAttr(int row, int col,
+ wxGridCellAttr::wxAttrKind kind ) const;
+
+ // all these functions take ownership of the pointer, don't call DecRef()
+ // on it
+ virtual void SetAttr(wxGridCellAttr *attr, int row, int col);
+ virtual void SetRowAttr(wxGridCellAttr *attr, int row);
+ virtual void SetColAttr(wxGridCellAttr *attr, int col);
+
+ // these functions must be called whenever some rows/cols are deleted
+ // because the internal data must be updated then
+ void UpdateAttrRows( size_t pos, int numRows );
+ void UpdateAttrCols( size_t pos, int numCols );
+
+private:
+ void InitData();
+
+ wxGridCellAttrProviderData *m_data;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellAttrProvider)
+};
+
+//////////////////////////////////////////////////////////////////////
+//
+// Grid table classes
+//
+//////////////////////////////////////////////////////////////////////
+
+
+class WXDLLIMPEXP_ADV wxGridTableBase : public wxObject, public wxClientDataContainer
+{
+public:
+ wxGridTableBase();
+ virtual ~wxGridTableBase();
+
+ // You must override these functions in a derived table class
+ //
+ virtual int GetNumberRows() = 0;
+ virtual int GetNumberCols() = 0;
+ virtual bool IsEmptyCell( int row, int col ) = 0;
+ virtual wxString GetValue( int row, int col ) = 0;
+ virtual void SetValue( int row, int col, const wxString& value ) = 0;
+
+ // Data type determination and value access
+ virtual wxString GetTypeName( int row, int col );
+ virtual bool CanGetValueAs( int row, int col, const wxString& typeName );
+ virtual bool CanSetValueAs( int row, int col, const wxString& typeName );
+
+ virtual long GetValueAsLong( int row, int col );
+ virtual double GetValueAsDouble( int row, int col );
+ virtual bool GetValueAsBool( int row, int col );
+
+ virtual void SetValueAsLong( int row, int col, long value );
+ virtual void SetValueAsDouble( int row, int col, double value );
+ virtual void SetValueAsBool( int row, int col, bool value );
+
+ // For user defined types
+ virtual void* GetValueAsCustom( int row, int col, const wxString& typeName );
+ virtual void SetValueAsCustom( int row, int col, const wxString& typeName, void* value );
+
+
+ // Overriding these is optional
+ //
+ virtual void SetView( wxGrid *grid ) { m_view = grid; }
+ virtual wxGrid * GetView() const { return m_view; }
+
+ virtual void Clear() {}
+ virtual bool InsertRows( size_t pos = 0, size_t numRows = 1 );
+ virtual bool AppendRows( size_t numRows = 1 );
+ virtual bool DeleteRows( size_t pos = 0, size_t numRows = 1 );
+ virtual bool InsertCols( size_t pos = 0, size_t numCols = 1 );
+ virtual bool AppendCols( size_t numCols = 1 );
+ virtual bool DeleteCols( size_t pos = 0, size_t numCols = 1 );
+
+ virtual wxString GetRowLabelValue( int row );
+ virtual wxString GetColLabelValue( int col );
+ virtual void SetRowLabelValue( int WXUNUSED(row), const wxString& ) {}
+ virtual void SetColLabelValue( int WXUNUSED(col), const wxString& ) {}
+
+ // Attribute handling
+ //
+
+ // give us the attr provider to use - we take ownership of the pointer
+ void SetAttrProvider(wxGridCellAttrProvider *attrProvider);
+
+ // get the currently used attr provider (may be NULL)
+ wxGridCellAttrProvider *GetAttrProvider() const { return m_attrProvider; }
+
+ // Does this table allow attributes? Default implementation creates
+ // a wxGridCellAttrProvider if necessary.
+ virtual bool CanHaveAttributes();
+
+ // by default forwarded to wxGridCellAttrProvider if any. May be
+ // overridden to handle attributes directly in the table.
+ virtual wxGridCellAttr *GetAttr( int row, int col,
+ wxGridCellAttr::wxAttrKind kind );
+
+
+ // these functions take ownership of the pointer
+ virtual void SetAttr(wxGridCellAttr* attr, int row, int col);
+ virtual void SetRowAttr(wxGridCellAttr *attr, int row);
+ virtual void SetColAttr(wxGridCellAttr *attr, int col);
+
+private:
+ wxGrid * m_view;
+ wxGridCellAttrProvider *m_attrProvider;
+
+ DECLARE_ABSTRACT_CLASS(wxGridTableBase)
+ DECLARE_NO_COPY_CLASS(wxGridTableBase)
+};
+
+
+// ----------------------------------------------------------------------------
+// wxGridTableMessage
+// ----------------------------------------------------------------------------
+
+// IDs for messages sent from grid table to view
+//
+enum wxGridTableRequest
+{
+ wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000,
+ wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES,
+ wxGRIDTABLE_NOTIFY_ROWS_INSERTED,
+ wxGRIDTABLE_NOTIFY_ROWS_APPENDED,
+ wxGRIDTABLE_NOTIFY_ROWS_DELETED,
+ wxGRIDTABLE_NOTIFY_COLS_INSERTED,
+ wxGRIDTABLE_NOTIFY_COLS_APPENDED,
+ wxGRIDTABLE_NOTIFY_COLS_DELETED
+};
+
+class WXDLLIMPEXP_ADV wxGridTableMessage
+{
+public:
+ wxGridTableMessage();
+ wxGridTableMessage( wxGridTableBase *table, int id,
+ int comInt1 = -1,
+ int comInt2 = -1 );
+
+ void SetTableObject( wxGridTableBase *table ) { m_table = table; }
+ wxGridTableBase * GetTableObject() const { return m_table; }
+ void SetId( int id ) { m_id = id; }
+ int GetId() { return m_id; }
+ void SetCommandInt( int comInt1 ) { m_comInt1 = comInt1; }
+ int GetCommandInt() { return m_comInt1; }
+ void SetCommandInt2( int comInt2 ) { m_comInt2 = comInt2; }
+ int GetCommandInt2() { return m_comInt2; }
+
+private:
+ wxGridTableBase *m_table;
+ int m_id;
+ int m_comInt1;
+ int m_comInt2;
+
+ DECLARE_NO_COPY_CLASS(wxGridTableMessage)
+};
+
+
+
+// ------ wxGridStringArray
+// A 2-dimensional array of strings for data values
+//
+
+WX_DECLARE_OBJARRAY_WITH_DECL(wxArrayString, wxGridStringArray,
+ class WXDLLIMPEXP_ADV);
+
+
+
+// ------ wxGridStringTable
+//
+// Simplest type of data table for a grid for small tables of strings
+// that are stored in memory
+//
+
+class WXDLLIMPEXP_ADV wxGridStringTable : public wxGridTableBase
+{
+public:
+ wxGridStringTable();
+ wxGridStringTable( int numRows, int numCols );
+ virtual ~wxGridStringTable();
+
+ // these are pure virtual in wxGridTableBase
+ //
+ int GetNumberRows();
+ int GetNumberCols();
+ wxString GetValue( int row, int col );
+ void SetValue( int row, int col, const wxString& s );
+ bool IsEmptyCell( int row, int col );
+
+ // overridden functions from wxGridTableBase
+ //
+ void Clear();
+ bool InsertRows( size_t pos = 0, size_t numRows = 1 );
+ bool AppendRows( size_t numRows = 1 );
+ bool DeleteRows( size_t pos = 0, size_t numRows = 1 );
+ bool InsertCols( size_t pos = 0, size_t numCols = 1 );
+ bool AppendCols( size_t numCols = 1 );
+ bool DeleteCols( size_t pos = 0, size_t numCols = 1 );
+
+ void SetRowLabelValue( int row, const wxString& );
+ void SetColLabelValue( int col, const wxString& );
+ wxString GetRowLabelValue( int row );
+ wxString GetColLabelValue( int col );
+
+private:
+ wxGridStringArray m_data;
+
+ // These only get used if you set your own labels, otherwise the
+ // GetRow/ColLabelValue functions return wxGridTableBase defaults
+ //
+ wxArrayString m_rowLabels;
+ wxArrayString m_colLabels;
+
+ DECLARE_DYNAMIC_CLASS_NO_COPY( wxGridStringTable )
+};
+
+
+
+// ============================================================================
+// Grid view classes
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxGridCellCoords: location of a cell in the grid
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGridCellCoords
+{
+public:
+ wxGridCellCoords() { m_row = m_col = -1; }
+ wxGridCellCoords( int r, int c ) { m_row = r; m_col = c; }
+
+ // default copy ctor is ok
+
+ int GetRow() const { return m_row; }
+ void SetRow( int n ) { m_row = n; }
+ int GetCol() const { return m_col; }
+ void SetCol( int n ) { m_col = n; }
+ void Set( int row, int col ) { m_row = row; m_col = col; }
+
+ wxGridCellCoords& operator=( const wxGridCellCoords& other )
+ {
+ if ( &other != this )
+ {
+ m_row=other.m_row;
+ m_col=other.m_col;
+ }
+ return *this;
+ }
+
+ bool operator==( const wxGridCellCoords& other ) const
+ {
+ return (m_row == other.m_row && m_col == other.m_col);
+ }
+
+ bool operator!=( const wxGridCellCoords& other ) const
+ {
+ return (m_row != other.m_row || m_col != other.m_col);
+ }
+
+ bool operator!() const
+ {
+ return (m_row == -1 && m_col == -1 );
+ }
+
+private:
+ int m_row;
+ int m_col;
+};
+
+
+// For comparisons...
+//
+extern WXDLLIMPEXP_ADV wxGridCellCoords wxGridNoCellCoords;
+extern WXDLLIMPEXP_ADV wxRect wxGridNoCellRect;
+
+// An array of cell coords...
+//
+WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellCoords, wxGridCellCoordsArray,
+ class WXDLLIMPEXP_ADV);
+
+// ----------------------------------------------------------------------------
+// wxGrid
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGrid : public wxScrolledWindow
+{
+public:
+ wxGrid() ;
+
+ wxGrid( wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxWANTS_CHARS,
+ const wxString& name = wxGridNameStr );
+
+ bool Create( wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxWANTS_CHARS,
+ const wxString& name = wxGridNameStr );
+
+ virtual ~wxGrid();
+
+ enum wxGridSelectionModes {wxGridSelectCells,
+ wxGridSelectRows,
+ wxGridSelectColumns};
+
+ bool CreateGrid( int numRows, int numCols,
+ wxGrid::wxGridSelectionModes selmode =
+ wxGrid::wxGridSelectCells );
+
+ void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
+ wxGrid::wxGridSelectionModes GetSelectionMode() const;
+
+ // ------ grid dimensions
+ //
+ int GetNumberRows() { return m_numRows; }
+ int GetNumberCols() { return m_numCols; }
+
+
+ // ------ display update functions
+ //
+ wxArrayInt CalcRowLabelsExposed( const wxRegion& reg );
+
+ wxArrayInt CalcColLabelsExposed( const wxRegion& reg );
+ wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg );
+
+
+ // ------ event handlers
+ //
+ void ProcessRowLabelMouseEvent( wxMouseEvent& event );
+ void ProcessColLabelMouseEvent( wxMouseEvent& event );
+ void ProcessCornerLabelMouseEvent( wxMouseEvent& event );
+ void ProcessGridCellMouseEvent( wxMouseEvent& event );
+ bool ProcessTableMessage( wxGridTableMessage& );
+
+ void DoEndDragResizeRow();
+ void DoEndDragResizeCol();
+ void DoEndDragMoveCol();
+
+ wxGridTableBase * GetTable() const { return m_table; }
+ bool SetTable( wxGridTableBase *table, bool takeOwnership = false,
+ wxGrid::wxGridSelectionModes selmode =
+ wxGrid::wxGridSelectCells );
+
+ void ClearGrid();
+ bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels = true );
+ bool AppendRows( int numRows = 1, bool updateLabels = true );
+ bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels = true );
+ bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels = true );
+ bool AppendCols( int numCols = 1, bool updateLabels = true );
+ bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels = true );
+
+ void DrawGridCellArea( wxDC& dc , const wxGridCellCoordsArray& cells );
+ void DrawGridSpace( wxDC& dc );
+ void DrawCellBorder( wxDC& dc, const wxGridCellCoords& );
+ void DrawAllGridLines( wxDC& dc, const wxRegion & reg );
+ void DrawCell( wxDC& dc, const wxGridCellCoords& );
+ void DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells);
+
+ // this function is called when the current cell highlight must be redrawn
+ // and may be overridden by the user
+ virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr );
+
+ virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows );
+ virtual void DrawRowLabel( wxDC& dc, int row );
+
+ virtual void DrawColLabels( wxDC& dc, const wxArrayInt& cols );
+ virtual void DrawColLabel( wxDC& dc, int col );
+
+
+ // ------ Cell text drawing functions
+ //
+ void DrawTextRectangle( wxDC& dc, const wxString&, const wxRect&,
+ int horizontalAlignment = wxALIGN_LEFT,
+ int verticalAlignment = wxALIGN_TOP,
+ int textOrientation = wxHORIZONTAL );
+
+ void DrawTextRectangle( wxDC& dc, const wxArrayString& lines, const wxRect&,
+ int horizontalAlignment = wxALIGN_LEFT,
+ int verticalAlignment = wxALIGN_TOP,
+ int textOrientation = wxHORIZONTAL );
+
+
+ // Split a string containing newline chararcters into an array of
+ // strings and return the number of lines
+ //
+ void StringToLines( const wxString& value, wxArrayString& lines );
+
+ void GetTextBoxSize( const wxDC& dc,
+ const wxArrayString& lines,
+ long *width, long *height );
+
+
+ // ------
+ // Code that does a lot of grid modification can be enclosed
+ // between BeginBatch() and EndBatch() calls to avoid screen
+ // flicker
+ //
+ void BeginBatch() { m_batchCount++; }
+ void EndBatch();
+
+ int GetBatchCount() { return m_batchCount; }
+
+ virtual void Refresh(bool eraseb = true,
+ const wxRect* rect = (const wxRect *) NULL);
+
+ // Use this, rather than wxWindow::Refresh(), to force an
+ // immediate repainting of the grid. Has no effect if you are
+ // already inside a BeginBatch / EndBatch block.
+ //
+ // This function is necessary because wxGrid has a minimal OnPaint()
+ // handler to reduce screen flicker.
+ //
+ void ForceRefresh();
+
+
+ // ------ edit control functions
+ //
+ bool IsEditable() const { return m_editable; }
+ void EnableEditing( bool edit );
+
+ void EnableCellEditControl( bool enable = true );
+ void DisableCellEditControl() { EnableCellEditControl(false); }
+ bool CanEnableCellControl() const;
+ bool IsCellEditControlEnabled() const;
+ bool IsCellEditControlShown() const;
+
+ bool IsCurrentCellReadOnly() const;
+
+ void ShowCellEditControl();
+ void HideCellEditControl();
+ void SaveEditControlValue();
+
+
+ // ------ grid location functions
+ // Note that all of these functions work with the logical coordinates of
+ // grid cells and labels so you will need to convert from device
+ // coordinates for mouse events etc.
+ //
+ void XYToCell( int x, int y, wxGridCellCoords& );
+ int YToRow( int y );
+ int XToCol( int x, bool clipToMinMax = false );
+
+ int YToEdgeOfRow( int y );
+ int XToEdgeOfCol( int x );
+
+ wxRect CellToRect( int row, int col );
+ wxRect CellToRect( const wxGridCellCoords& coords )
+ { return CellToRect( coords.GetRow(), coords.GetCol() ); }
+
+ int GetGridCursorRow() { return m_currentCellCoords.GetRow(); }
+ int GetGridCursorCol() { return m_currentCellCoords.GetCol(); }
+
+ // check to see if a cell is either wholly visible (the default arg) or
+ // at least partially visible in the grid window
+ //
+ bool IsVisible( int row, int col, bool wholeCellVisible = true );
+ bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = true )
+ { return IsVisible( coords.GetRow(), coords.GetCol(), wholeCellVisible ); }
+ void MakeCellVisible( int row, int col );
+ void MakeCellVisible( const wxGridCellCoords& coords )
+ { MakeCellVisible( coords.GetRow(), coords.GetCol() ); }
+
+
+ // ------ grid cursor movement functions
+ //
+ void SetGridCursor( int row, int col )
+ { SetCurrentCell( wxGridCellCoords(row, col) ); }
+
+ bool MoveCursorUp( bool expandSelection );
+ bool MoveCursorDown( bool expandSelection );
+ bool MoveCursorLeft( bool expandSelection );
+ bool MoveCursorRight( bool expandSelection );
+ bool MovePageDown();
+ bool MovePageUp();
+ bool MoveCursorUpBlock( bool expandSelection );
+ bool MoveCursorDownBlock( bool expandSelection );
+ bool MoveCursorLeftBlock( bool expandSelection );
+ bool MoveCursorRightBlock( bool expandSelection );
+
+
+ // ------ label and gridline formatting
+ //
+ int GetDefaultRowLabelSize() { return WXGRID_DEFAULT_ROW_LABEL_WIDTH; }
+ int GetRowLabelSize() { return m_rowLabelWidth; }
+ int GetDefaultColLabelSize() { return WXGRID_DEFAULT_COL_LABEL_HEIGHT; }
+ int GetColLabelSize() { return m_colLabelHeight; }
+ wxColour GetLabelBackgroundColour() { return m_labelBackgroundColour; }
+ wxColour GetLabelTextColour() { return m_labelTextColour; }
+ wxFont GetLabelFont() { return m_labelFont; }
+ void GetRowLabelAlignment( int *horiz, int *vert );
+ void GetColLabelAlignment( int *horiz, int *vert );
+ int GetColLabelTextOrientation();
+ wxString GetRowLabelValue( int row );
+ wxString GetColLabelValue( int col );
+ wxColour GetGridLineColour() { return m_gridLineColour; }
+
+ // these methods may be overridden to customize individual grid lines
+ // appearance
+ virtual wxPen GetDefaultGridLinePen();
+ virtual wxPen GetRowGridLinePen(int row);
+ virtual wxPen GetColGridLinePen(int col);
+ wxColour GetCellHighlightColour() { return m_cellHighlightColour; }
+ int GetCellHighlightPenWidth() { return m_cellHighlightPenWidth; }
+ int GetCellHighlightROPenWidth() { return m_cellHighlightROPenWidth; }
+
+ void SetRowLabelSize( int width );
+ void SetColLabelSize( int height );
+ void SetLabelBackgroundColour( const wxColour& );
+ void SetLabelTextColour( const wxColour& );
+ void SetLabelFont( const wxFont& );
+ void SetRowLabelAlignment( int horiz, int vert );
+ void SetColLabelAlignment( int horiz, int vert );
+ void SetColLabelTextOrientation( int textOrientation );
+ void SetRowLabelValue( int row, const wxString& );
+ void SetColLabelValue( int col, const wxString& );
+ void SetGridLineColour( const wxColour& );
+ void SetCellHighlightColour( const wxColour& );
+ void SetCellHighlightPenWidth(int width);
+ void SetCellHighlightROPenWidth(int width);
+
+ void EnableDragRowSize( bool enable = true );
+ void DisableDragRowSize() { EnableDragRowSize( false ); }
+ bool CanDragRowSize() { return m_canDragRowSize; }
+ void EnableDragColSize( bool enable = true );
+ void DisableDragColSize() { EnableDragColSize( false ); }
+ bool CanDragColSize() { return m_canDragColSize; }
+ void EnableDragColMove( bool enable = true );
+ void DisableDragColMove() { EnableDragColMove( false ); }
+ bool CanDragColMove() { return m_canDragColMove; }
+ void EnableDragGridSize(bool enable = true);
+ void DisableDragGridSize() { EnableDragGridSize(false); }
+ bool CanDragGridSize() { return m_canDragGridSize; }
+
+ void EnableDragCell( bool enable = true );
+ void DisableDragCell() { EnableDragCell( false ); }
+ bool CanDragCell() { return m_canDragCell; }
+
+ // this sets the specified attribute for this cell or in this row/col
+ void SetAttr(int row, int col, wxGridCellAttr *attr);
+ void SetRowAttr(int row, wxGridCellAttr *attr);
+ void SetColAttr(int col, wxGridCellAttr *attr);
+
+ // returns the attribute we may modify in place: a new one if this cell
+ // doesn't have any yet or the existing one if it does
+ //
+ // DecRef() must be called on the returned pointer, as usual
+ wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const;
+
+
+ // shortcuts for setting the column parameters
+
+ // set the format for the data in the column: default is string
+ void SetColFormatBool(int col);
+ void SetColFormatNumber(int col);
+ void SetColFormatFloat(int col, int width = -1, int precision = -1);
+ void SetColFormatCustom(int col, const wxString& typeName);
+
+ void EnableGridLines( bool enable = true );
+ bool GridLinesEnabled() { return m_gridLinesEnabled; }
+
+ // ------ row and col formatting
+ //
+ int GetDefaultRowSize();
+ int GetRowSize( int row );
+ int GetDefaultColSize();
+ int GetColSize( int col );
+ wxColour GetDefaultCellBackgroundColour();
+ wxColour GetCellBackgroundColour( int row, int col );
+ wxColour GetDefaultCellTextColour();
+ wxColour GetCellTextColour( int row, int col );
+ wxFont GetDefaultCellFont();
+ wxFont GetCellFont( int row, int col );
+ void GetDefaultCellAlignment( int *horiz, int *vert );
+ void GetCellAlignment( int row, int col, int *horiz, int *vert );
+ bool GetDefaultCellOverflow();
+ bool GetCellOverflow( int row, int col );
+ void GetCellSize( int row, int col, int *num_rows, int *num_cols );
+
+ void SetDefaultRowSize( int height, bool resizeExistingRows = false );
+ void SetRowSize( int row, int height );
+ void SetDefaultColSize( int width, bool resizeExistingCols = false );
+
+ void SetColSize( int col, int width );
+
+ //Column positions
+ int GetColAt( int colPos ) const
+ {
+ if ( m_colAt.IsEmpty() )
+ return colPos;
+ else
+ return m_colAt[colPos];
+ }
+
+ void SetColPos( int colID, int newPos );
+
+ int GetColPos( int colID ) const
+ {
+ if ( m_colAt.IsEmpty() )
+ return colID;
+ else
+ {
+ for ( int i = 0; i < m_numCols; i++ )
+ {
+ if ( m_colAt[i] == colID )
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ // automatically size the column or row to fit to its contents, if
+ // setAsMin is true, this optimal width will also be set as minimal width
+ // for this column
+ void AutoSizeColumn( int col, bool setAsMin = true )
+ { AutoSizeColOrRow(col, setAsMin, true); }
+ void AutoSizeRow( int row, bool setAsMin = true )
+ { AutoSizeColOrRow(row, setAsMin, false); }
+
+ // auto size all columns (very ineffective for big grids!)
+ void AutoSizeColumns( bool setAsMin = true )
+ { (void)SetOrCalcColumnSizes(false, setAsMin); }
+
+ void AutoSizeRows( bool setAsMin = true )
+ { (void)SetOrCalcRowSizes(false, setAsMin); }
+
+ // auto size the grid, that is make the columns/rows of the "right" size
+ // and also set the grid size to just fit its contents
+ void AutoSize();
+
+ // autosize row height depending on label text
+ void AutoSizeRowLabelSize( int row );
+
+ // autosize column width depending on label text
+ void AutoSizeColLabelSize( int col );
+
+ // column won't be resized to be lesser width - this must be called during
+ // the grid creation because it won't resize the column if it's already
+ // narrower than the minimal width
+ void SetColMinimalWidth( int col, int width );
+ void SetRowMinimalHeight( int row, int width );
+
+ /* These members can be used to query and modify the minimal
+ * acceptable size of grid rows and columns. Call this function in
+ * your code which creates the grid if you want to display cells
+ * with a size smaller than the default acceptable minimum size.
+ * Like the members SetColMinimalWidth and SetRowMinimalWidth,
+ * the existing rows or columns will not be checked/resized.
+ */
+ void SetColMinimalAcceptableWidth( int width );
+ void SetRowMinimalAcceptableHeight( int width );
+ int GetColMinimalAcceptableWidth() const;
+ int GetRowMinimalAcceptableHeight() const;
+
+ void SetDefaultCellBackgroundColour( const wxColour& );
+ void SetCellBackgroundColour( int row, int col, const wxColour& );
+ void SetDefaultCellTextColour( const wxColour& );
+
+ void SetCellTextColour( int row, int col, const wxColour& );
+ void SetDefaultCellFont( const wxFont& );
+ void SetCellFont( int row, int col, const wxFont& );
+ void SetDefaultCellAlignment( int horiz, int vert );
+ void SetCellAlignment( int row, int col, int horiz, int vert );
+ void SetDefaultCellOverflow( bool allow );
+ void SetCellOverflow( int row, int col, bool allow );
+ void SetCellSize( int row, int col, int num_rows, int num_cols );
+
+ // takes ownership of the pointer
+ void SetDefaultRenderer(wxGridCellRenderer *renderer);
+ void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer);
+ wxGridCellRenderer *GetDefaultRenderer() const;
+ wxGridCellRenderer* GetCellRenderer(int row, int col);
+
+ // takes ownership of the pointer
+ void SetDefaultEditor(wxGridCellEditor *editor);
+ void SetCellEditor(int row, int col, wxGridCellEditor *editor);
+ wxGridCellEditor *GetDefaultEditor() const;
+ wxGridCellEditor* GetCellEditor(int row, int col);
+
+
+
+ // ------ cell value accessors
+ //
+ wxString GetCellValue( int row, int col )
+ {
+ if ( m_table )
+ {
+ return m_table->GetValue( row, col );
+ }
+ else
+ {
+ return wxEmptyString;
+ }
+ }
+
+ wxString GetCellValue( const wxGridCellCoords& coords )
+ { return GetCellValue( coords.GetRow(), coords.GetCol() ); }
+
+ void SetCellValue( int row, int col, const wxString& s );
+ void SetCellValue( const wxGridCellCoords& coords, const wxString& s )
+ { SetCellValue( coords.GetRow(), coords.GetCol(), s ); }
+
+ // returns true if the cell can't be edited
+ bool IsReadOnly(int row, int col) const;
+
+ // make the cell editable/readonly
+ void SetReadOnly(int row, int col, bool isReadOnly = true);
+
+ // ------ select blocks of cells
+ //
+ void SelectRow( int row, bool addToSelected = false );
+ void SelectCol( int col, bool addToSelected = false );
+
+ void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
+ bool addToSelected = false );
+
+ void SelectBlock( const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ bool addToSelected = false )
+ { SelectBlock( topLeft.GetRow(), topLeft.GetCol(),
+ bottomRight.GetRow(), bottomRight.GetCol(),
+ addToSelected ); }
+
+ void SelectAll();
+
+ bool IsSelection();
+
+ // ------ deselect blocks or cells
+ //
+ void DeselectRow( int row );
+ void DeselectCol( int col );
+ void DeselectCell( int row, int col );
+
+ void ClearSelection();
+
+ bool IsInSelection( int row, int col ) const;
+
+ bool IsInSelection( const wxGridCellCoords& coords ) const
+ { return IsInSelection( coords.GetRow(), coords.GetCol() ); }
+
+ wxGridCellCoordsArray GetSelectedCells() const;
+ wxGridCellCoordsArray GetSelectionBlockTopLeft() const;
+ wxGridCellCoordsArray GetSelectionBlockBottomRight() const;
+ wxArrayInt GetSelectedRows() const;
+ wxArrayInt GetSelectedCols() const;
+
+ // This function returns the rectangle that encloses the block of cells
+ // limited by TopLeft and BottomRight cell in device coords and clipped
+ // to the client size of the grid window.
+ //
+ wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft,
+ const wxGridCellCoords & bottomRight );
+
+ // Access or update the selection fore/back colours
+ wxColour GetSelectionBackground() const
+ { return m_selectionBackground; }
+ wxColour GetSelectionForeground() const
+ { return m_selectionForeground; }
+
+ void SetSelectionBackground(const wxColour& c) { m_selectionBackground = c; }
+ void SetSelectionForeground(const wxColour& c) { m_selectionForeground = c; }
+
+
+ // Methods for a registry for mapping data types to Renderers/Editors
+ void RegisterDataType(const wxString& typeName,
+ wxGridCellRenderer* renderer,
+ wxGridCellEditor* editor);
+ // DJC MAPTEK
+ virtual wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const;
+ wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const
+ { return GetDefaultEditorForCell(c.GetRow(), c.GetCol()); }
+ virtual wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const;
+ virtual wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const;
+ virtual wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const;
+
+ // grid may occupy more space than needed for its rows/columns, this
+ // function allows to set how big this extra space is
+ void SetMargins(int extraWidth, int extraHeight)
+ {
+ m_extraWidth = extraWidth;
+ m_extraHeight = extraHeight;
+
+ CalcDimensions();
+ }
+
+ // Accessors for component windows
+ wxWindow* GetGridWindow() { return (wxWindow*)m_gridWin; }
+ wxWindow* GetGridRowLabelWindow() { return (wxWindow*)m_rowLabelWin; }
+ wxWindow* GetGridColLabelWindow() { return (wxWindow*)m_colLabelWin; }
+ wxWindow* GetGridCornerLabelWindow() { return (wxWindow*)m_cornerLabelWin; }
+
+ // Allow adjustment of scroll increment. The default is (15, 15).
+ void SetScrollLineX(int x) { m_scrollLineX = x; }
+ void SetScrollLineY(int y) { m_scrollLineY = y; }
+ int GetScrollLineX() const { return m_scrollLineX; }
+ int GetScrollLineY() const { return m_scrollLineY; }
+
+ // Implementation
+ int GetScrollX(int x) const
+ {
+ return (x + GetScrollLineX() - 1) / GetScrollLineX();
+ }
+
+ int GetScrollY(int y) const
+ {
+ return (y + GetScrollLineY() - 1) / GetScrollLineY();
+ }
+
+
+ // override some base class functions
+ virtual bool Enable(bool enable = true);
+
+
+ // ------ For compatibility with previous wxGrid only...
+ //
+ // ************************************************
+ // ** Don't use these in new code because they **
+ // ** are liable to disappear in a future **
+ // ** revision **
+ // ************************************************
+ //
+
+ wxGrid( wxWindow *parent,
+ int x, int y, int w = wxDefaultCoord, int h = wxDefaultCoord,
+ long style = wxWANTS_CHARS,
+ const wxString& name = wxPanelNameStr )
+ : wxScrolledWindow( parent, wxID_ANY, wxPoint(x,y), wxSize(w,h),
+ (style|wxWANTS_CHARS), name )
+ {
+ Create();
+ }
+
+ void SetCellValue( const wxString& val, int row, int col )
+ { SetCellValue( row, col, val ); }
+
+ void UpdateDimensions()
+ { CalcDimensions(); }
+
+ int GetRows() { return GetNumberRows(); }
+ int GetCols() { return GetNumberCols(); }
+ int GetCursorRow() { return GetGridCursorRow(); }
+ int GetCursorColumn() { return GetGridCursorCol(); }
+
+ int GetScrollPosX() { return 0; }
+ int GetScrollPosY() { return 0; }
+
+ void SetScrollX( int WXUNUSED(x) ) { }
+ void SetScrollY( int WXUNUSED(y) ) { }
+
+ void SetColumnWidth( int col, int width )
+ { SetColSize( col, width ); }
+
+ int GetColumnWidth( int col )
+ { return GetColSize( col ); }
+
+ void SetRowHeight( int row, int height )
+ { SetRowSize( row, height ); }
+
+ // GetRowHeight() is below
+
+ int GetViewHeight() // returned num whole rows visible
+ { return 0; }
+
+ int GetViewWidth() // returned num whole cols visible
+ { return 0; }
+
+ void SetLabelSize( int orientation, int sz )
+ {
+ if ( orientation == wxHORIZONTAL )
+ SetColLabelSize( sz );
+ else
+ SetRowLabelSize( sz );
+ }
+
+ int GetLabelSize( int orientation )
+ {
+ if ( orientation == wxHORIZONTAL )
+ return GetColLabelSize();
+ else
+ return GetRowLabelSize();
+ }
+
+ void SetLabelAlignment( int orientation, int align )
+ {
+ if ( orientation == wxHORIZONTAL )
+ SetColLabelAlignment( align, -1 );
+ else
+ SetRowLabelAlignment( align, -1 );
+ }
+
+ int GetLabelAlignment( int orientation, int WXUNUSED(align) )
+ {
+ int h, v;
+ if ( orientation == wxHORIZONTAL )
+ {
+ GetColLabelAlignment( &h, &v );
+ return h;
+ }
+ else
+ {
+ GetRowLabelAlignment( &h, &v );
+ return h;
+ }
+ }
+
+ void SetLabelValue( int orientation, const wxString& val, int pos )
+ {
+ if ( orientation == wxHORIZONTAL )
+ SetColLabelValue( pos, val );
+ else
+ SetRowLabelValue( pos, val );
+ }
+
+ wxString GetLabelValue( int orientation, int pos)
+ {
+ if ( orientation == wxHORIZONTAL )
+ return GetColLabelValue( pos );
+ else
+ return GetRowLabelValue( pos );
+ }
+
+ wxFont GetCellTextFont() const
+ { return m_defaultCellAttr->GetFont(); }
+
+ wxFont GetCellTextFont(int WXUNUSED(row), int WXUNUSED(col)) const
+ { return m_defaultCellAttr->GetFont(); }
+
+ void SetCellTextFont(const wxFont& fnt)
+ { SetDefaultCellFont( fnt ); }
+
+ void SetCellTextFont(const wxFont& fnt, int row, int col)
+ { SetCellFont( row, col, fnt ); }
+
+ void SetCellTextColour(const wxColour& val, int row, int col)
+ { SetCellTextColour( row, col, val ); }
+
+ void SetCellTextColour(const wxColour& col)
+ { SetDefaultCellTextColour( col ); }
+
+ void SetCellBackgroundColour(const wxColour& col)
+ { SetDefaultCellBackgroundColour( col ); }
+
+ void SetCellBackgroundColour(const wxColour& colour, int row, int col)
+ { SetCellBackgroundColour( row, col, colour ); }
+
+ bool GetEditable() { return IsEditable(); }
+ void SetEditable( bool edit = true ) { EnableEditing( edit ); }
+ bool GetEditInPlace() { return IsCellEditControlEnabled(); }
+
+ void SetEditInPlace(bool WXUNUSED(edit) = true) { }
+
+ void SetCellAlignment( int align, int row, int col)
+ { SetCellAlignment(row, col, align, wxALIGN_CENTER); }
+ void SetCellAlignment( int WXUNUSED(align) ) {}
+ void SetCellBitmap(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(row), int WXUNUSED(col))
+ { }
+ void SetDividerPen(const wxPen& WXUNUSED(pen)) { }
+ wxPen& GetDividerPen() const;
+ void OnActivate(bool WXUNUSED(active)) {}
+
+ // ******** End of compatibility functions **********
+
+
+
+ // ------ control IDs
+ enum { wxGRID_CELLCTRL = 2000,
+ wxGRID_TOPCTRL };
+
+ // ------ control types
+ enum { wxGRID_TEXTCTRL = 2100,
+ wxGRID_CHECKBOX,
+ wxGRID_CHOICE,
+ wxGRID_COMBOBOX };
+
+ // overridden wxWindow methods
+ virtual void Fit();
+
+protected:
+ virtual wxSize DoGetBestSize() const;
+
+ bool m_created;
+
+ wxGridWindow *m_gridWin;
+ wxGridRowLabelWindow *m_rowLabelWin;
+ wxGridColLabelWindow *m_colLabelWin;
+ wxGridCornerLabelWindow *m_cornerLabelWin;
+
+ wxGridTableBase *m_table;
+ bool m_ownTable;
+
+ int m_numRows;
+ int m_numCols;
+
+ wxGridCellCoords m_currentCellCoords;
+
+ wxGridCellCoords m_selectingTopLeft;
+ wxGridCellCoords m_selectingBottomRight;
+ wxGridCellCoords m_selectingKeyboard;
+ wxGridSelection *m_selection;
+ wxColour m_selectionBackground;
+ wxColour m_selectionForeground;
+
+ // NB: *never* access m_row/col arrays directly because they are created
+ // on demand, *always* use accessor functions instead!
+
+ // init the m_rowHeights/Bottoms arrays with default values
+ void InitRowHeights();
+
+ int m_defaultRowHeight;
+ int m_minAcceptableRowHeight;
+ wxArrayInt m_rowHeights;
+ wxArrayInt m_rowBottoms;
+
+ // init the m_colWidths/Rights arrays
+ void InitColWidths();
+
+ int m_defaultColWidth;
+ int m_minAcceptableColWidth;
+ wxArrayInt m_colWidths;
+ wxArrayInt m_colRights;
+
+ // get the col/row coords
+ int GetColWidth(int col) const;
+ int GetColLeft(int col) const;
+ int GetColRight(int col) const;
+
+ // this function must be public for compatibility...
+public:
+ int GetRowHeight(int row) const;
+protected:
+
+ int GetRowTop(int row) const;
+ int GetRowBottom(int row) const;
+
+ int m_rowLabelWidth;
+ int m_colLabelHeight;
+
+ // the size of the margin left to the right and bottom of the cell area
+ int m_extraWidth,
+ m_extraHeight;
+
+ wxColour m_labelBackgroundColour;
+ wxColour m_labelTextColour;
+ wxFont m_labelFont;
+
+ int m_rowLabelHorizAlign;
+ int m_rowLabelVertAlign;
+ int m_colLabelHorizAlign;
+ int m_colLabelVertAlign;
+ int m_colLabelTextOrientation;
+
+ bool m_defaultRowLabelValues;
+ bool m_defaultColLabelValues;
+
+ wxColour m_gridLineColour;
+ bool m_gridLinesEnabled;
+ wxColour m_cellHighlightColour;
+ int m_cellHighlightPenWidth;
+ int m_cellHighlightROPenWidth;
+
+
+ // common part of AutoSizeColumn/Row() and GetBestSize()
+ int SetOrCalcColumnSizes(bool calcOnly, bool setAsMin = true);
+ int SetOrCalcRowSizes(bool calcOnly, bool setAsMin = true);
+
+ // common part of AutoSizeColumn/Row()
+ void AutoSizeColOrRow(int n, bool setAsMin, bool column /* or row? */);
+
+ // if a column has a minimal width, it will be the value for it in this
+ // hash table
+ wxLongToLongHashMap m_colMinWidths,
+ m_rowMinHeights;
+
+ // get the minimal width of the given column/row
+ int GetColMinimalWidth(int col) const;
+ int GetRowMinimalHeight(int col) const;
+
+ // do we have some place to store attributes in?
+ bool CanHaveAttributes();
+
+ // cell attribute cache (currently we only cache 1, may be will do
+ // more/better later)
+ struct CachedAttr
+ {
+ int row, col;
+ wxGridCellAttr *attr;
+ } m_attrCache;
+
+ // invalidates the attribute cache
+ void ClearAttrCache();
+
+ // adds an attribute to cache
+ void CacheAttr(int row, int col, wxGridCellAttr *attr) const;
+
+ // looks for an attr in cache, returns true if found
+ bool LookupAttr(int row, int col, wxGridCellAttr **attr) const;
+
+ // looks for the attr in cache, if not found asks the table and caches the
+ // result
+ wxGridCellAttr *GetCellAttr(int row, int col) const;
+ wxGridCellAttr *GetCellAttr(const wxGridCellCoords& coords )
+ { return GetCellAttr( coords.GetRow(), coords.GetCol() ); }
+
+ // the default cell attr object for cells that don't have their own
+ wxGridCellAttr* m_defaultCellAttr;
+
+
+ bool m_inOnKeyDown;
+ int m_batchCount;
+
+
+ wxGridTypeRegistry* m_typeRegistry;
+
+ enum CursorMode
+ {
+ WXGRID_CURSOR_SELECT_CELL,
+ WXGRID_CURSOR_RESIZE_ROW,
+ WXGRID_CURSOR_RESIZE_COL,
+ WXGRID_CURSOR_SELECT_ROW,
+ WXGRID_CURSOR_SELECT_COL,
+ WXGRID_CURSOR_MOVE_COL
+ };
+
+ // this method not only sets m_cursorMode but also sets the correct cursor
+ // for the given mode and, if captureMouse is not false releases the mouse
+ // if it was captured and captures it if it must be captured
+ //
+ // for this to work, you should always use it and not set m_cursorMode
+ // directly!
+ void ChangeCursorMode(CursorMode mode,
+ wxWindow *win = (wxWindow *)NULL,
+ bool captureMouse = true);
+
+ wxWindow *m_winCapture; // the window which captured the mouse
+ CursorMode m_cursorMode;
+
+ //Column positions
+ wxArrayInt m_colAt;
+ int m_moveToCol;
+
+ bool m_canDragRowSize;
+ bool m_canDragColSize;
+ bool m_canDragColMove;
+ bool m_canDragGridSize;
+ bool m_canDragCell;
+ int m_dragLastPos;
+ int m_dragRowOrCol;
+ bool m_isDragging;
+ wxPoint m_startDragPos;
+
+ bool m_waitForSlowClick;
+
+ wxGridCellCoords m_selectionStart;
+
+ wxCursor m_rowResizeCursor;
+ wxCursor m_colResizeCursor;
+
+ bool m_editable; // applies to whole grid
+ bool m_cellEditCtrlEnabled; // is in-place edit currently shown?
+
+ int m_scrollLineX; // X scroll increment
+ int m_scrollLineY; // Y scroll increment
+
+ void Create();
+ void Init();
+ void CalcDimensions();
+ void CalcWindowSizes();
+ bool Redimension( wxGridTableMessage& );
+
+
+ int SendEvent( const wxEventType, int row, int col, wxMouseEvent& );
+ int SendEvent( const wxEventType, int row, int col );
+ int SendEvent( const wxEventType type)
+ {
+ return SendEvent(type,
+ m_currentCellCoords.GetRow(),
+ m_currentCellCoords.GetCol());
+ }
+
+ void OnPaint( wxPaintEvent& );
+ void OnSize( wxSizeEvent& );
+ void OnKeyDown( wxKeyEvent& );
+ void OnKeyUp( wxKeyEvent& );
+ void OnChar( wxKeyEvent& );
+ void OnEraseBackground( wxEraseEvent& );
+
+
+ void SetCurrentCell( const wxGridCellCoords& coords );
+ void SetCurrentCell( int row, int col )
+ { SetCurrentCell( wxGridCellCoords(row, col) ); }
+
+ void HighlightBlock( int topRow, int leftCol, int bottomRow, int rightCol );
+
+ void HighlightBlock( const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight )
+ { HighlightBlock( topLeft.GetRow(), topLeft.GetCol(),
+ bottomRight.GetRow(), bottomRight.GetCol() ); }
+
+ // ------ functions to get/send data (see also public functions)
+ //
+ bool GetModelValues();
+ bool SetModelValues();
+
+private:
+ // Calculate the minimum acceptable size for labels area
+ wxCoord CalcColOrRowLabelAreaMinSize(bool column /* or row? */);
+
+ friend class WXDLLIMPEXP_FWD_ADV wxGridSelection;
+
+ DECLARE_DYNAMIC_CLASS( wxGrid )
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxGrid)
+};
+
+
+// ----------------------------------------------------------------------------
+// Grid event class and event types
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxGridEvent : public wxNotifyEvent
+{
+public:
+ wxGridEvent()
+ : wxNotifyEvent(), m_row(-1), m_col(-1), m_x(-1), m_y(-1),
+ m_selecting(0), m_control(0), m_meta(0), m_shift(0), m_alt(0)
+ {
+ }
+
+ wxGridEvent(int id, wxEventType type, wxObject* obj,
+ int row=-1, int col=-1, int x=-1, int y=-1, bool sel = true,
+ bool control = false, bool shift = false, bool alt = false, bool meta = false);
+
+ virtual int GetRow() { return m_row; }
+ virtual int GetCol() { return m_col; }
+ wxPoint GetPosition() { return wxPoint( m_x, m_y ); }
+ bool Selecting() { return m_selecting; }
+ bool ControlDown() { return m_control; }
+ bool MetaDown() { return m_meta; }
+ bool ShiftDown() { return m_shift; }
+ bool AltDown() { return m_alt; }
+ bool CmdDown()
+ {
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ return MetaDown();
+#else
+ return ControlDown();
+#endif
+ }
+
+ virtual wxEvent *Clone() const { return new wxGridEvent(*this); }
+
+protected:
+ int m_row;
+ int m_col;
+ int m_x;
+ int m_y;
+ bool m_selecting;
+ bool m_control;
+ bool m_meta;
+ bool m_shift;
+ bool m_alt;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEvent)
+};
+
+class WXDLLIMPEXP_ADV wxGridSizeEvent : public wxNotifyEvent
+{
+public:
+ wxGridSizeEvent()
+ : wxNotifyEvent(), m_rowOrCol(-1), m_x(-1), m_y(-1),
+ m_control(0), m_meta(0), m_shift(0), m_alt(0)
+ {
+ }
+
+ wxGridSizeEvent(int id, wxEventType type, wxObject* obj,
+ int rowOrCol=-1, int x=-1, int y=-1,
+ bool control = false, bool shift = false, bool alt = false, bool meta = false);
+
+ int GetRowOrCol() { return m_rowOrCol; }
+ wxPoint GetPosition() { return wxPoint( m_x, m_y ); }
+ bool ControlDown() { return m_control; }
+ bool MetaDown() { return m_meta; }
+ bool ShiftDown() { return m_shift; }
+ bool AltDown() { return m_alt; }
+ bool CmdDown()
+ {
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ return MetaDown();
+#else
+ return ControlDown();
+#endif
+ }
+
+ virtual wxEvent *Clone() const { return new wxGridSizeEvent(*this); }
+
+protected:
+ int m_rowOrCol;
+ int m_x;
+ int m_y;
+ bool m_control;
+ bool m_meta;
+ bool m_shift;
+ bool m_alt;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridSizeEvent)
+};
+
+
+class WXDLLIMPEXP_ADV wxGridRangeSelectEvent : public wxNotifyEvent
+{
+public:
+ wxGridRangeSelectEvent()
+ : wxNotifyEvent()
+ {
+ m_topLeft = wxGridNoCellCoords;
+ m_bottomRight = wxGridNoCellCoords;
+ m_selecting = false;
+ m_control = false;
+ m_meta = false;
+ m_shift = false;
+ m_alt = false;
+ }
+
+ wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj,
+ const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ bool sel = true,
+ bool control = false, bool shift = false,
+ bool alt = false, bool meta = false);
+
+ wxGridCellCoords GetTopLeftCoords() { return m_topLeft; }
+ wxGridCellCoords GetBottomRightCoords() { return m_bottomRight; }
+ int GetTopRow() { return m_topLeft.GetRow(); }
+ int GetBottomRow() { return m_bottomRight.GetRow(); }
+ int GetLeftCol() { return m_topLeft.GetCol(); }
+ int GetRightCol() { return m_bottomRight.GetCol(); }
+ bool Selecting() { return m_selecting; }
+ bool ControlDown() { return m_control; }
+ bool MetaDown() { return m_meta; }
+ bool ShiftDown() { return m_shift; }
+ bool AltDown() { return m_alt; }
+ bool CmdDown()
+ {
+#if defined(__WXMAC__) || defined(__WXCOCOA__)
+ return MetaDown();
+#else
+ return ControlDown();
+#endif
+ }
+
+ virtual wxEvent *Clone() const { return new wxGridRangeSelectEvent(*this); }
+
+protected:
+ wxGridCellCoords m_topLeft;
+ wxGridCellCoords m_bottomRight;
+ bool m_selecting;
+ bool m_control;
+ bool m_meta;
+ bool m_shift;
+ bool m_alt;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridRangeSelectEvent)
+};
+
+
+class WXDLLIMPEXP_ADV wxGridEditorCreatedEvent : public wxCommandEvent {
+public:
+ wxGridEditorCreatedEvent()
+ : wxCommandEvent()
+ {
+ m_row = 0;
+ m_col = 0;
+ m_ctrl = NULL;
+ }
+
+ wxGridEditorCreatedEvent(int id, wxEventType type, wxObject* obj,
+ int row, int col, wxControl* ctrl);
+
+ int GetRow() { return m_row; }
+ int GetCol() { return m_col; }
+ wxControl* GetControl() { return m_ctrl; }
+ void SetRow(int row) { m_row = row; }
+ void SetCol(int col) { m_col = col; }
+ void SetControl(wxControl* ctrl) { m_ctrl = ctrl; }
+
+ virtual wxEvent *Clone() const { return new wxGridEditorCreatedEvent(*this); }
+
+private:
+ int m_row;
+ int m_col;
+ wxControl* m_ctrl;
+
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEditorCreatedEvent)
+};
+
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_LEFT_CLICK, 1580)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_RIGHT_CLICK, 1581)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_LEFT_DCLICK, 1582)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_RIGHT_DCLICK, 1583)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_LEFT_CLICK, 1584)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_RIGHT_CLICK, 1585)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_LEFT_DCLICK, 1586)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_RIGHT_DCLICK, 1587)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_ROW_SIZE, 1588)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_COL_SIZE, 1589)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_RANGE_SELECT, 1590)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_CHANGE, 1591)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_SELECT_CELL, 1592)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_SHOWN, 1593)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_HIDDEN, 1594)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_CREATED, 1595)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_BEGIN_DRAG, 1596)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_GRID_COL_MOVE, 1597)
+END_DECLARE_EVENT_TYPES()
+
+
+typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
+typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&);
+typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEvent&);
+typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreatedEvent&);
+
+#define wxGridEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridEventFunction, &func)
+
+#define wxGridSizeEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridSizeEventFunction, &func)
+
+#define wxGridRangeSelectEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridRangeSelectEventFunction, &func)
+
+#define wxGridEditorCreatedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridEditorCreatedEventFunction, &func)
+
+#define wx__DECLARE_GRIDEVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEventHandler(fn))
+
+#define wx__DECLARE_GRIDSIZEEVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridSizeEventHandler(fn))
+
+#define wx__DECLARE_GRIDRANGESELEVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridRangeSelectEventHandler(fn))
+
+#define wx__DECLARE_GRIDEDITOREVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEditorCreatedEventHandler(fn))
+
+#define EVT_GRID_CMD_CELL_LEFT_CLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_LEFT_CLICK, id, fn)
+#define EVT_GRID_CMD_CELL_RIGHT_CLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_RIGHT_CLICK, id, fn)
+#define EVT_GRID_CMD_CELL_LEFT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_LEFT_DCLICK, id, fn)
+#define EVT_GRID_CMD_CELL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_RIGHT_DCLICK, id, fn)
+#define EVT_GRID_CMD_LABEL_LEFT_CLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_LEFT_CLICK, id, fn)
+#define EVT_GRID_CMD_LABEL_RIGHT_CLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_CLICK, id, fn)
+#define EVT_GRID_CMD_LABEL_LEFT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_LEFT_DCLICK, id, fn)
+#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_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)
+#define EVT_GRID_CMD_EDITOR_SHOWN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_SHOWN, id, fn)
+#define EVT_GRID_CMD_EDITOR_HIDDEN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_HIDDEN, id, fn)
+#define EVT_GRID_CMD_EDITOR_CREATED(id, fn) wx__DECLARE_GRIDEDITOREVT(EDITOR_CREATED, id, fn)
+#define EVT_GRID_CMD_CELL_BEGIN_DRAG(id, fn) wx__DECLARE_GRIDEVT(CELL_BEGIN_DRAG, id, fn)
+
+// same as above but for any id (exists mainly for backwards compatibility but
+// then it's also true that you rarely have multiple grid in the same window)
+#define EVT_GRID_CELL_LEFT_CLICK(fn) EVT_GRID_CMD_CELL_LEFT_CLICK(wxID_ANY, fn)
+#define EVT_GRID_CELL_RIGHT_CLICK(fn) EVT_GRID_CMD_CELL_RIGHT_CLICK(wxID_ANY, fn)
+#define EVT_GRID_CELL_LEFT_DCLICK(fn) EVT_GRID_CMD_CELL_LEFT_DCLICK(wxID_ANY, fn)
+#define EVT_GRID_CELL_RIGHT_DCLICK(fn) EVT_GRID_CMD_CELL_RIGHT_DCLICK(wxID_ANY, fn)
+#define EVT_GRID_LABEL_LEFT_CLICK(fn) EVT_GRID_CMD_LABEL_LEFT_CLICK(wxID_ANY, fn)
+#define EVT_GRID_LABEL_RIGHT_CLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_CLICK(wxID_ANY, fn)
+#define EVT_GRID_LABEL_LEFT_DCLICK(fn) EVT_GRID_CMD_LABEL_LEFT_DCLICK(wxID_ANY, fn)
+#define EVT_GRID_LABEL_RIGHT_DCLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_DCLICK(wxID_ANY, fn)
+#define EVT_GRID_ROW_SIZE(fn) EVT_GRID_CMD_ROW_SIZE(wxID_ANY, fn)
+#define EVT_GRID_COL_SIZE(fn) EVT_GRID_CMD_COL_SIZE(wxID_ANY, fn)
+#define EVT_GRID_COL_MOVE(fn) EVT_GRID_CMD_COL_MOVE(wxID_ANY, fn)
+#define EVT_GRID_RANGE_SELECT(fn) EVT_GRID_CMD_RANGE_SELECT(wxID_ANY, fn)
+#define EVT_GRID_CELL_CHANGE(fn) EVT_GRID_CMD_CELL_CHANGE(wxID_ANY, fn)
+#define EVT_GRID_SELECT_CELL(fn) EVT_GRID_CMD_SELECT_CELL(wxID_ANY, fn)
+#define EVT_GRID_EDITOR_SHOWN(fn) EVT_GRID_CMD_EDITOR_SHOWN(wxID_ANY, fn)
+#define EVT_GRID_EDITOR_HIDDEN(fn) EVT_GRID_CMD_EDITOR_HIDDEN(wxID_ANY, fn)
+#define EVT_GRID_EDITOR_CREATED(fn) EVT_GRID_CMD_EDITOR_CREATED(wxID_ANY, fn)
+#define EVT_GRID_CELL_BEGIN_DRAG(fn) EVT_GRID_CMD_CELL_BEGIN_DRAG(wxID_ANY, fn)
+
+#if 0 // TODO: implement these ? others ?
+
+extern const int wxEVT_GRID_CREATE_CELL;
+extern const int wxEVT_GRID_CHANGE_LABELS;
+extern const int wxEVT_GRID_CHANGE_SEL_LABEL;
+
+#define EVT_GRID_CREATE_CELL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CREATE_CELL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
+#define EVT_GRID_CHANGE_LABELS(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_LABELS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
+#define EVT_GRID_CHANGE_SEL_LABEL(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_SEL_LABEL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ),
+
+#endif
+
+#endif // wxUSE_GRID
+#endif // _WX_GENERIC_GRID_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/gridctrl.h b/3rdparty/wxWidgets/include/wx/generic/gridctrl.h
new file mode 100644
index 0000000000..2581fd288f
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/gridctrl.h
@@ -0,0 +1,158 @@
+///////////////////////////////////////////////////////////////////////////
+// Name: generic/gridctrl.h
+// Purpose: wxGrid controls
+// Author: Paul Gammans, Roger Gammans
+// Modified by:
+// Created: 11/04/2001
+// RCS-ID: $Id: gridctrl.h 48089 2007-08-15 11:46:57Z VZ $
+// Copyright: (c) The Computer Surgery (paul@compsurg.co.uk)
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_GRIDCTRL_H_
+#define _WX_GENERIC_GRIDCTRL_H_
+
+#include "wx/grid.h"
+
+#if wxUSE_GRID
+
+#define wxGRID_VALUE_CHOICEINT _T("choiceint")
+#define wxGRID_VALUE_DATETIME _T("datetime")
+
+#if wxUSE_DATETIME
+
+#include "wx/datetime.h"
+
+// the default renderer for the cells containing Time and dates..
+class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellStringRenderer
+{
+public:
+ wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat,
+ const wxString& informat = wxDefaultDateTimeFormat);
+
+ // draw the string right aligned
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ virtual wxGridCellRenderer *Clone() const;
+
+ // parameters string format is "width[,precision]"
+ virtual void SetParameters(const wxString& params);
+
+protected:
+ wxString GetString(const wxGrid& grid, int row, int col);
+
+ wxString m_iformat;
+ wxString m_oformat;
+ wxDateTime m_dateDef;
+ wxDateTime::TimeZone m_tz;
+};
+
+#endif // wxUSE_DATETIME
+
+// the default renderer for the cells containing Time and dates..
+class WXDLLIMPEXP_ADV wxGridCellEnumRenderer : public wxGridCellStringRenderer
+{
+public:
+ wxGridCellEnumRenderer( const wxString& choices = wxEmptyString );
+
+ // draw the string right aligned
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ virtual wxGridCellRenderer *Clone() const;
+
+ // parameters string format is "item1[,item2[...,itemN]]"
+ virtual void SetParameters(const wxString& params);
+
+protected:
+ wxString GetString(const wxGrid& grid, int row, int col);
+
+ wxArrayString m_choices;
+};
+
+
+#if wxUSE_COMBOBOX
+
+class WXDLLIMPEXP_ADV wxGridCellEnumEditor : public wxGridCellChoiceEditor
+{
+public:
+ wxGridCellEnumEditor( const wxString& choices = wxEmptyString );
+ virtual ~wxGridCellEnumEditor() {}
+
+ virtual wxGridCellEditor* Clone() const;
+
+ virtual bool EndEdit(int row, int col, wxGrid* grid);
+ virtual void BeginEdit(int row, int col, wxGrid* grid);
+
+private:
+ long int m_startint;
+
+ DECLARE_NO_COPY_CLASS(wxGridCellEnumEditor)
+};
+
+#endif // wxUSE_COMBOBOX
+
+class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringEditor : public wxGridCellTextEditor
+{
+public:
+ wxGridCellAutoWrapStringEditor() : wxGridCellTextEditor() { }
+ virtual void Create(wxWindow* parent,
+ wxWindowID id,
+ wxEvtHandler* evtHandler);
+
+ virtual wxGridCellEditor *Clone() const
+ { return new wxGridCellAutoWrapStringEditor; }
+
+ DECLARE_NO_COPY_CLASS(wxGridCellAutoWrapStringEditor)
+};
+
+class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringRenderer : public wxGridCellStringRenderer
+{
+public:
+ wxGridCellAutoWrapStringRenderer() : wxGridCellStringRenderer() { }
+
+ virtual void Draw(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ const wxRect& rect,
+ int row, int col,
+ bool isSelected);
+
+ virtual wxSize GetBestSize(wxGrid& grid,
+ wxGridCellAttr& attr,
+ wxDC& dc,
+ int row, int col);
+
+ virtual wxGridCellRenderer *Clone() const
+ { return new wxGridCellAutoWrapStringRenderer; }
+
+private:
+ wxArrayString GetTextLines( wxGrid& grid,
+ wxDC& dc,
+ const wxGridCellAttr& attr,
+ const wxRect& rect,
+ int row, int col);
+
+};
+
+#endif // wxUSE_GRID
+#endif // _WX_GENERIC_GRIDCTRL_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/gridsel.h b/3rdparty/wxWidgets/include/wx/generic/gridsel.h
new file mode 100644
index 0000000000..fff21a3684
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/gridsel.h
@@ -0,0 +1,88 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/gridsel.h
+// Purpose: wxGridSelection
+// Author: Stefan Neis
+// Modified by:
+// Created: 20/02/2000
+// RCS-ID: $$
+// Copyright: (c) Stefan Neis
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_GRIDSEL_H_
+#define _WX_GENERIC_GRIDSEL_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_GRID
+
+#include "wx/grid.h"
+
+class WXDLLIMPEXP_ADV wxGridSelection
+{
+public:
+ wxGridSelection( wxGrid * grid, wxGrid::wxGridSelectionModes sel =
+ wxGrid::wxGridSelectCells );
+ bool IsSelection();
+ bool IsInSelection ( int row, int col );
+ void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
+ wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; }
+ void SelectRow( int row,
+ bool ControlDown = false, bool ShiftDown = false,
+ bool AltDown = false, bool MetaDown = false );
+ void SelectCol( int col,
+ bool ControlDown = false, bool ShiftDown = false,
+ bool AltDown = false, bool MetaDown = false );
+ void SelectBlock( int topRow, int leftCol,
+ int bottomRow, int rightCol,
+ bool ControlDown = false, bool ShiftDown = false,
+ bool AltDown = false, bool MetaDown = false,
+ bool sendEvent = true );
+ void SelectCell( int row, int col,
+ bool ControlDown = false, bool ShiftDown = false,
+ bool AltDown = false, bool MetaDown = false,
+ bool sendEvent = true );
+ void ToggleCellSelection( int row, int col,
+ bool ControlDown = false,
+ bool ShiftDown = false,
+ bool AltDown = false, bool MetaDown = false );
+ void ClearSelection();
+
+ void UpdateRows( size_t pos, int numRows );
+ void UpdateCols( size_t pos, int numCols );
+
+private:
+ int BlockContain( int topRow1, int leftCol1,
+ int bottomRow1, int rightCol1,
+ int topRow2, int leftCol2,
+ int bottomRow2, int rightCol2 );
+ // returns 1, if Block1 contains Block2,
+ // -1, if Block2 contains Block1,
+ // 0, otherwise
+
+ int BlockContainsCell( int topRow, int leftCol,
+ int bottomRow, int rightCol,
+ int row, int col )
+ // returns 1, if Block contains Cell,
+ // 0, otherwise
+ {
+ return ( topRow <= row && row <= bottomRow &&
+ leftCol <= col && col <= rightCol );
+ }
+
+ wxGridCellCoordsArray m_cellSelection;
+ wxGridCellCoordsArray m_blockSelectionTopLeft;
+ wxGridCellCoordsArray m_blockSelectionBottomRight;
+ wxArrayInt m_rowSelection;
+ wxArrayInt m_colSelection;
+
+ wxGrid *m_grid;
+ wxGrid::wxGridSelectionModes m_selectionMode;
+
+ friend class WXDLLIMPEXP_FWD_ADV wxGrid;
+
+ DECLARE_NO_COPY_CLASS(wxGridSelection)
+};
+
+#endif // wxUSE_GRID
+#endif // _WX_GENERIC_GRIDSEL_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/helpext.h b/3rdparty/wxWidgets/include/wx/generic/helpext.h
new file mode 100644
index 0000000000..62d5c67482
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/helpext.h
@@ -0,0 +1,166 @@
+/*-*- c++ -*-********************************************************
+ * helpext.h - an external help controller for wxWidgets *
+ * *
+ * (C) 1998 by Karsten Ballueder (Ballueder@usa.net) *
+ * License: wxWindows licence *
+ * *
+ * $Id: helpext.h 50711 2007-12-15 02:57:58Z VZ $
+ *******************************************************************/
+
+#ifndef __WX_HELPEXT_H_
+#define __WX_HELPEXT_H_
+
+#if wxUSE_HELP
+
+#include "wx/helpbase.h"
+
+/**
+ This class implements help via an external browser.
+ It requires the name of a directory containing the documentation
+ and a file mapping numerical Section numbers to relative URLS.
+
+ The map file contains two or three fields per line:
+ numeric_id relative_URL [; comment/documentation]
+
+ The numeric_id is the id used to look up the entry in
+ DisplaySection()/DisplayBlock(). The relative_URL is a filename of
+ an html file, relative to the help directory. The optional
+ comment/documentation field (after a ';') is used for keyword
+ searches, so some meaningful text here does not hurt.
+ If the documentation itself contains a ';', only the part before
+ that will be displayed in the listbox, but all of it used for search.
+
+ Lines starting with ';' will be ignored.
+*/
+
+class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase
+{
+public:
+ wxExtHelpController(wxWindow* parentWindow = NULL);
+ virtual ~wxExtHelpController();
+
+ /** Tell it which browser to use.
+ The Netscape support will check whether Netscape is already
+ running (by looking at the .netscape/lock file in the user's
+ home directory) and tell it to load the page into the existing
+ window.
+ @param browsername The command to call a browser/html viewer.
+ @param isNetscape Set this to true if the browser is some variant of Netscape.
+ */
+ void SetBrowser(const wxString& browsername = wxEmptyString,
+ bool isNetscape = false);
+
+ // Set viewer: new name for SetBrowser
+ virtual void SetViewer(const wxString& viewer = wxEmptyString,
+ long flags = wxHELP_NETSCAPE);
+
+ /** This must be called to tell the controller where to find the
+ documentation.
+ If a locale is set, look in file/localename, i.e.
+ If passed "/usr/local/myapp/help" and the current wxLocale is
+ set to be "de", then look in "/usr/local/myapp/help/de/"
+ first and fall back to "/usr/local/myapp/help" if that
+ doesn't exist.
+
+ @param file - NOT a filename, but a directory name.
+ @return true on success
+ */
+ virtual bool Initialize(const wxString& dir, int WXUNUSED(server))
+ { return Initialize(dir); }
+
+ /** This must be called to tell the controller where to find the
+ documentation.
+ If a locale is set, look in file/localename, i.e.
+ If passed "/usr/local/myapp/help" and the current wxLocale is
+ set to be "de", then look in "/usr/local/myapp/help/de/"
+ first and fall back to "/usr/local/myapp/help" if that
+ doesn't exist.
+ @param dir - directory name where to fine the help files
+ @return true on success
+ */
+ virtual bool Initialize(const wxString& dir);
+
+ /** If file is "", reloads file given in Initialize.
+ @file Name of help directory.
+ @return true on success
+ */
+ virtual bool LoadFile(const wxString& file = wxEmptyString);
+
+ /** Display list of all help entries.
+ @return true on success
+ */
+ virtual bool DisplayContents(void);
+ /** Display help for id sectionNo.
+ @return true on success
+ */
+ virtual bool DisplaySection(int sectionNo);
+ /** Display help for id sectionNo -- identical with DisplaySection().
+ @return true on success
+ */
+ virtual bool DisplaySection(const wxString& section);
+ /** Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
+ @return true on success
+ */
+ virtual bool DisplayBlock(long blockNo);
+ /** Search comment/documentation fields in map file and present a
+ list to chose from.
+ @key k string to search for, empty string will list all entries
+ @return true on success
+ */
+ virtual bool KeywordSearch(const wxString& k,
+ wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
+
+ /// does nothing
+ virtual bool Quit(void);
+ /// does nothing
+ virtual void OnQuit(void);
+
+ /// Call the browser using a relative URL.
+ virtual bool DisplayHelp(const wxString &) ;
+
+ /// Allows one to override the default settings for the help frame.
+ virtual void SetFrameParameters(const wxString& WXUNUSED(title),
+ const wxSize& WXUNUSED(size),
+ const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
+ bool WXUNUSED(newFrameEachTime) = false)
+ {
+ // does nothing by default
+ }
+ /// Obtains the latest settings used by the help frame and the help
+ /// frame.
+ virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL,
+ wxPoint *WXUNUSED(pos) = NULL,
+ bool *WXUNUSED(newFrameEachTime) = NULL)
+ {
+ return (wxFrame*) NULL;// does nothing by default
+ }
+
+protected:
+ /// Filename of currently active map file.
+ wxString m_helpDir;
+ /// How many entries do we have in the map file?
+ int m_NumOfEntries;
+ /// A list containing all id,url,documentation triples.
+ wxList *m_MapList;
+
+private:
+ // parse a single line of the map file (called by LoadFile())
+ //
+ // return true if the line was valid or false otherwise
+ bool ParseMapFileLine(const wxString& line);
+
+ /// Deletes the list and all objects.
+ void DeleteList(void);
+
+
+ /// How to call the html viewer.
+ wxString m_BrowserName;
+ /// Is the viewer a variant of netscape?
+ bool m_BrowserIsNetscape;
+
+ DECLARE_CLASS(wxExtHelpController)
+};
+
+#endif // wxUSE_HELP
+
+#endif // __WX_HELPEXT_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/icon.h b/3rdparty/wxWidgets/include/wx/generic/icon.h
new file mode 100644
index 0000000000..de7d23834a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/icon.h
@@ -0,0 +1,56 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/icon.h
+// Purpose: wxIcon implementation for ports where it's same as wxBitmap
+// Author: Julian Smart
+// Modified by:
+// Created: 17/09/98
+// RCS-ID: $Id: icon.h 42752 2006-10-30 19:26:48Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_ICON_H_
+#define _WX_GENERIC_ICON_H_
+
+#include "wx/bitmap.h"
+
+//-----------------------------------------------------------------------------
+// wxIcon
+//-----------------------------------------------------------------------------
+
+#ifndef wxICON_DEFAULT_BITMAP_TYPE
+#define wxICON_DEFAULT_BITMAP_TYPE wxBITMAP_TYPE_XPM
+#endif
+
+class WXDLLIMPEXP_CORE wxIcon: public wxBitmap
+{
+public:
+ wxIcon();
+
+ wxIcon( const char **bits, int width=-1, int height=-1 );
+ wxIcon( char **bits, int width=-1, int height=-1 );
+
+ // For compatibility with wxMSW where desired size is sometimes required to
+ // distinguish between multiple icons in a resource.
+ wxIcon( const wxString& filename,
+ wxBitmapType type = wxICON_DEFAULT_BITMAP_TYPE,
+ int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
+ wxBitmap(filename, type)
+ {
+ }
+
+ wxIcon(const wxIconLocation& loc)
+ : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY)
+ {
+ }
+
+ // create from bitmap (which should have a mask unless it's monochrome):
+ // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
+ // ctors, assignment operators...), but it's ok to have such function
+ void CopyFromBitmap(const wxBitmap& bmp);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxIcon)
+};
+
+#endif // _WX_GENERIC_ICON_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/imaglist.h b/3rdparty/wxWidgets/include/wx/generic/imaglist.h
new file mode 100644
index 0000000000..92db6dc872
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/imaglist.h
@@ -0,0 +1,82 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/imaglist.h
+// Purpose:
+// Author: Robert Roebling
+// Created: 01/02/97
+// Id:
+// Copyright: (c) 1998 Robert Roebling and Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __IMAGELISTH_G__
+#define __IMAGELISTH_G__
+
+#include "wx/defs.h"
+#include "wx/list.h"
+#include "wx/icon.h"
+
+class WXDLLEXPORT wxDC;
+class WXDLLEXPORT wxBitmap;
+class WXDLLEXPORT wxColour;
+
+
+class WXDLLEXPORT wxGenericImageList: public wxObject
+{
+public:
+ wxGenericImageList() { m_width = m_height = 0; }
+ wxGenericImageList( int width, int height, bool mask = true, int initialCount = 1 );
+ virtual ~wxGenericImageList();
+ bool Create( int width, int height, bool mask = true, int initialCount = 1 );
+ bool Create();
+
+ virtual int GetImageCount() const;
+ virtual bool GetSize( int index, int &width, int &height ) const;
+
+ int Add( const wxBitmap& bitmap );
+ int Add( const wxBitmap& bitmap, const wxBitmap& mask );
+ int Add( const wxBitmap& bitmap, const wxColour& maskColour );
+ wxBitmap GetBitmap(int index) const;
+ wxIcon GetIcon(int index) const;
+ bool Replace( int index, const wxBitmap &bitmap );
+ bool Replace( int index, const wxBitmap &bitmap, const wxBitmap& mask );
+ bool Remove( int index );
+ bool RemoveAll();
+
+ virtual bool Draw(int index, wxDC& dc, int x, int y,
+ int flags = wxIMAGELIST_DRAW_NORMAL,
+ bool solidBackground = false);
+
+ // Internal use only
+ const wxBitmap *GetBitmapPtr(int index) const;
+private:
+ wxList m_images;
+
+ int m_width;
+ int m_height;
+
+ DECLARE_DYNAMIC_CLASS(wxGenericImageList)
+};
+
+#ifndef wxHAS_NATIVE_IMAGELIST
+
+/*
+ * wxImageList has to be a real class or we have problems with
+ * the run-time information.
+ */
+
+class WXDLLEXPORT wxImageList: public wxGenericImageList
+{
+ DECLARE_DYNAMIC_CLASS(wxImageList)
+
+public:
+ wxImageList() {}
+
+ wxImageList( int width, int height, bool mask = true, int initialCount = 1 )
+ : wxGenericImageList(width, height, mask, initialCount)
+ {
+ }
+};
+#endif // !wxHAS_NATIVE_IMAGELIST
+
+#endif // __IMAGELISTH_G__
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/laywin.h b/3rdparty/wxWidgets/include/wx/generic/laywin.h
new file mode 100644
index 0000000000..ffb1f1a8d1
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/laywin.h
@@ -0,0 +1,222 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: laywin.h
+// Purpose: Implements a simple layout algorithm, plus
+// wxSashLayoutWindow which is an example of a window with
+// layout-awareness (via event handlers). This is suited to
+// IDE-style window layout.
+// Author: Julian Smart
+// Modified by:
+// Created: 04/01/98
+// RCS-ID: $Id: laywin.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_LAYWIN_H_G_
+#define _WX_LAYWIN_H_G_
+
+#if wxUSE_SASH
+ #include "wx/sashwin.h"
+#endif // wxUSE_SASH
+
+#include "wx/event.h"
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_QUERY_LAYOUT_INFO, 1500)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALCULATE_LAYOUT, 1501)
+END_DECLARE_EVENT_TYPES()
+
+enum wxLayoutOrientation
+{
+ wxLAYOUT_HORIZONTAL,
+ wxLAYOUT_VERTICAL
+};
+
+enum wxLayoutAlignment
+{
+ wxLAYOUT_NONE,
+ wxLAYOUT_TOP,
+ wxLAYOUT_LEFT,
+ wxLAYOUT_RIGHT,
+ wxLAYOUT_BOTTOM
+};
+
+// Not sure this is necessary
+// Tell window which dimension we're sizing on
+#define wxLAYOUT_LENGTH_Y 0x0008
+#define wxLAYOUT_LENGTH_X 0x0000
+
+// Use most recently used length
+#define wxLAYOUT_MRU_LENGTH 0x0010
+
+// Only a query, so don't actually move it.
+#define wxLAYOUT_QUERY 0x0100
+
+/*
+ * This event is used to get information about window alignment,
+ * orientation and size.
+ */
+
+class WXDLLIMPEXP_ADV wxQueryLayoutInfoEvent: public wxEvent
+{
+public:
+ wxQueryLayoutInfoEvent(wxWindowID id = 0)
+ {
+ SetEventType(wxEVT_QUERY_LAYOUT_INFO);
+ m_requestedLength = 0;
+ m_flags = 0;
+ m_id = id;
+ m_alignment = wxLAYOUT_TOP;
+ m_orientation = wxLAYOUT_HORIZONTAL;
+ }
+
+ // Read by the app
+ void SetRequestedLength(int length) { m_requestedLength = length; }
+ int GetRequestedLength() const { return m_requestedLength; }
+
+ void SetFlags(int flags) { m_flags = flags; }
+ int GetFlags() const { return m_flags; }
+
+ // Set by the app
+ void SetSize(const wxSize& size) { m_size = size; }
+ wxSize GetSize() const { return m_size; }
+
+ void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; }
+ wxLayoutOrientation GetOrientation() const { return m_orientation; }
+
+ void SetAlignment(wxLayoutAlignment align) { m_alignment = align; }
+ wxLayoutAlignment GetAlignment() const { return m_alignment; }
+
+ virtual wxEvent *Clone() const { return new wxQueryLayoutInfoEvent(*this); }
+
+protected:
+ int m_flags;
+ int m_requestedLength;
+ wxSize m_size;
+ wxLayoutOrientation m_orientation;
+ wxLayoutAlignment m_alignment;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryLayoutInfoEvent)
+};
+
+typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&);
+
+#define EVT_QUERY_LAYOUT_INFO(func) \
+ DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_LAYOUT_INFO, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxQueryLayoutInfoEventFunction, & func ), NULL ),
+
+/*
+ * This event is used to take a bite out of the available client area.
+ */
+
+class WXDLLIMPEXP_ADV wxCalculateLayoutEvent: public wxEvent
+{
+public:
+ wxCalculateLayoutEvent(wxWindowID id = 0)
+ {
+ SetEventType(wxEVT_CALCULATE_LAYOUT);
+ m_flags = 0;
+ m_id = id;
+ }
+
+ // Read by the app
+ void SetFlags(int flags) { m_flags = flags; }
+ int GetFlags() const { return m_flags; }
+
+ // Set by the app
+ void SetRect(const wxRect& rect) { m_rect = rect; }
+ wxRect GetRect() const { return m_rect; }
+
+ virtual wxEvent *Clone() const { return new wxCalculateLayoutEvent(*this); }
+
+protected:
+ int m_flags;
+ wxRect m_rect;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCalculateLayoutEvent)
+};
+
+typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&);
+
+#define EVT_CALCULATE_LAYOUT(func) \
+ DECLARE_EVENT_TABLE_ENTRY( wxEVT_CALCULATE_LAYOUT, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCalculateLayoutEventFunction, & func ), NULL ),
+
+#if wxUSE_SASH
+
+// This is window that can remember alignment/orientation, does its own layout,
+// and can provide sashes too. Useful for implementing docked windows with sashes in
+// an IDE-style interface.
+class WXDLLIMPEXP_ADV wxSashLayoutWindow: public wxSashWindow
+{
+public:
+ wxSashLayoutWindow()
+ {
+ Init();
+ }
+
+ wxSashLayoutWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow"))
+ {
+ Create(parent, id, pos, size, style, name);
+ }
+
+ bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow"));
+
+// Accessors
+ inline wxLayoutAlignment GetAlignment() const { return m_alignment; }
+ inline wxLayoutOrientation GetOrientation() const { return m_orientation; }
+
+ inline void SetAlignment(wxLayoutAlignment align) { m_alignment = align; }
+ inline void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; }
+
+ // Give the window default dimensions
+ inline void SetDefaultSize(const wxSize& size) { m_defaultSize = size; }
+
+// Event handlers
+ // Called by layout algorithm to allow window to take a bit out of the
+ // client rectangle, and size itself if not in wxLAYOUT_QUERY mode.
+ void OnCalculateLayout(wxCalculateLayoutEvent& event);
+
+ // Called by layout algorithm to retrieve information about the window.
+ void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event);
+
+private:
+ void Init();
+
+ wxLayoutAlignment m_alignment;
+ wxLayoutOrientation m_orientation;
+ wxSize m_defaultSize;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxSashLayoutWindow)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // wxUSE_SASH
+
+class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame;
+class WXDLLIMPEXP_FWD_CORE wxFrame;
+
+// This class implements the layout algorithm
+class WXDLLIMPEXP_ADV wxLayoutAlgorithm: public wxObject
+{
+public:
+ wxLayoutAlgorithm() {}
+
+#if wxUSE_MDI_ARCHITECTURE
+ // The MDI client window is sized to whatever's left over.
+ bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL);
+#endif // wxUSE_MDI_ARCHITECTURE
+
+ // mainWindow is sized to whatever's left over. This function for backward
+ // compatibility; use LayoutWindow.
+ bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = (wxWindow*) NULL);
+
+ // mainWindow is sized to whatever's left over.
+ bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL);
+};
+
+#endif
+ // _WX_LAYWIN_H_G_
diff --git a/3rdparty/wxWidgets/include/wx/generic/listctrl.h b/3rdparty/wxWidgets/include/wx/generic/listctrl.h
new file mode 100644
index 0000000000..410964925b
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/listctrl.h
@@ -0,0 +1,281 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/listctrl.h
+// Purpose: Generic list control
+// Author: Robert Roebling
+// Created: 01/02/97
+// RCS-ID: $Id: listctrl.h 46432 2007-06-13 03:46:20Z SC $
+// Copyright: (c) 1998 Robert Roebling and Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_LISTCTRL_H_
+#define _WX_GENERIC_LISTCTRL_H_
+
+#include "wx/textctrl.h"
+
+class WXDLLIMPEXP_CORE wxImageList;
+
+#if wxUSE_DRAG_AND_DROP
+class WXDLLEXPORT wxDropTarget;
+#endif
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+
+//-----------------------------------------------------------------------------
+// internal classes
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxListHeaderWindow;
+class WXDLLEXPORT wxListMainWindow;
+
+//-----------------------------------------------------------------------------
+// wxListCtrl
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericListCtrl: public wxControl
+{
+public:
+
+ wxGenericListCtrl();
+ wxGenericListCtrl( wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long style = wxLC_ICON,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString &name = wxListCtrlNameStr)
+ {
+ Create(parent, winid, pos, size, style, validator, name);
+ }
+ virtual ~wxGenericListCtrl();
+
+ bool Create( wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long style = wxLC_ICON,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString &name = wxListCtrlNameStr);
+
+ bool GetColumn( int col, wxListItem& item ) const;
+ bool SetColumn( int col, wxListItem& item );
+ int GetColumnWidth( int col ) const;
+ bool SetColumnWidth( int col, int width);
+ int GetCountPerPage() const; // not the same in wxGLC as in Windows, I think
+ wxRect GetViewRect() const;
+
+ bool GetItem( wxListItem& info ) const;
+ bool SetItem( wxListItem& info ) ;
+ long SetItem( long index, int col, const wxString& label, int imageId = -1 );
+ int GetItemState( long item, long stateMask ) const;
+ bool SetItemState( long item, long state, long stateMask);
+ bool SetItemImage( long item, int image, int selImage = -1 );
+ bool SetItemColumnImage( long item, long column, int image );
+ wxString GetItemText( long item ) const;
+ void SetItemText( long item, const wxString& str );
+ wxUIntPtr GetItemData( long item ) const;
+#if wxABI_VERSION >= 20804
+ bool SetItemPtrData(long item, wxUIntPtr data);
+#endif // wxABI 2.8.4+
+ bool SetItemData(long item, long data);
+ bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
+ bool GetItemPosition( long item, wxPoint& pos ) const;
+ bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
+ int GetItemCount() const;
+ int GetColumnCount() const;
+ void SetItemSpacing( int spacing, bool isSmall = false );
+ wxSize GetItemSpacing() const;
+ void SetItemTextColour( long item, const wxColour& col);
+ wxColour GetItemTextColour( long item ) const;
+ void SetItemBackgroundColour( long item, const wxColour &col);
+ wxColour GetItemBackgroundColour( long item ) const;
+ void SetItemFont( long item, const wxFont &f);
+ wxFont GetItemFont( long item ) const;
+ int GetSelectedItemCount() const;
+ wxColour GetTextColour() const;
+ void SetTextColour(const wxColour& col);
+ long GetTopItem() const;
+
+ void SetSingleStyle( long style, bool add = true ) ;
+ void SetWindowStyleFlag( long style );
+ void RecreateWindow() {}
+ long GetNextItem( long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE ) const;
+ wxImageList *GetImageList( int which ) const;
+ void SetImageList( wxImageList *imageList, int which );
+ void AssignImageList( wxImageList *imageList, int which );
+ bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
+
+ void ClearAll();
+ bool DeleteItem( long item );
+ bool DeleteAllItems();
+ bool DeleteAllColumns();
+ bool DeleteColumn( int col );
+
+ void SetItemCount(long count);
+
+ wxTextCtrl *EditLabel(long item,
+ wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl));
+ wxTextCtrl* GetEditControl() const;
+ void Edit( long item ) { EditLabel(item); }
+
+ bool EnsureVisible( long item );
+ long FindItem( long start, const wxString& str, bool partial = false );
+ long FindItem( long start, wxUIntPtr data );
+ long FindItem( long start, const wxPoint& pt, int direction ); // not supported in wxGLC
+ long HitTest( const wxPoint& point, int& flags, long *pSubItem = NULL ) const;
+ long InsertItem(wxListItem& info);
+ long InsertItem( long index, const wxString& label );
+ long InsertItem( long index, int imageIndex );
+ long InsertItem( long index, const wxString& label, int imageIndex );
+ long InsertColumn( long col, wxListItem& info );
+ long InsertColumn( long col, const wxString& heading,
+ int format = wxLIST_FORMAT_LEFT, int width = -1 );
+ bool ScrollList( int dx, int dy );
+ bool SortItems( wxListCtrlCompare fn, long data );
+ bool Update( long item );
+ // Must provide overload to avoid hiding it (and warnings about it)
+ virtual void Update() { wxControl::Update(); }
+
+ // are we in report mode?
+ bool InReportView() const { return HasFlag(wxLC_REPORT); }
+
+ // are we in virtual report mode?
+ bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
+
+ // do we have a header window?
+ bool HasHeader() const
+ { return InReportView() && !HasFlag(wxLC_NO_HEADER); }
+
+ // refresh items selectively (only useful for virtual list controls)
+ void RefreshItem(long item);
+ void RefreshItems(long itemFrom, long itemTo);
+
+#if WXWIN_COMPATIBILITY_2_6
+ // obsolete, don't use
+ wxDEPRECATED( int GetItemSpacing( bool isSmall ) const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+ virtual wxVisualAttributes GetDefaultAttributes() const
+ {
+ return GetClassDefaultAttributes(GetWindowVariant());
+ }
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ // implementation only from now on
+ // -------------------------------
+
+ void OnInternalIdle( );
+ void OnSize( wxSizeEvent &event );
+
+ // We have to hand down a few functions
+ virtual void Refresh(bool eraseBackground = true,
+ const wxRect *rect = NULL);
+
+ virtual void Freeze();
+ virtual void Thaw();
+
+ virtual bool SetBackgroundColour( const wxColour &colour );
+ virtual bool SetForegroundColour( const wxColour &colour );
+ virtual wxColour GetBackgroundColour() const;
+ virtual wxColour GetForegroundColour() const;
+ virtual bool SetFont( const wxFont &font );
+ virtual bool SetCursor( const wxCursor &cursor );
+
+ virtual int GetScrollPos(int orient) const;
+ virtual void SetScrollPos(int orient, int pos, bool refresh = true);
+
+#if wxUSE_DRAG_AND_DROP
+ virtual void SetDropTarget( wxDropTarget *dropTarget );
+ virtual wxDropTarget *GetDropTarget() const;
+#endif
+
+ virtual bool ShouldInheritColours() const { return false; }
+ virtual void SetFocus();
+
+ // implementation
+ // --------------
+
+ wxImageList *m_imageListNormal;
+ wxImageList *m_imageListSmall;
+ wxImageList *m_imageListState; // what's that ?
+ bool m_ownsImageListNormal,
+ m_ownsImageListSmall,
+ m_ownsImageListState;
+ wxListHeaderWindow *m_headerWin;
+ wxListMainWindow *m_mainWin;
+ wxCoord m_headerHeight;
+
+protected:
+ virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
+
+ // take into account the coordinates difference between the container
+ // window and the list control window itself here
+ virtual void DoClientToScreen( int *x, int *y ) const;
+ virtual void DoScreenToClient( int *x, int *y ) const;
+
+ virtual wxSize DoGetBestSize() const;
+
+ // return the text for the given column of the given item
+ virtual wxString OnGetItemText(long item, long column) const;
+
+ // return the icon for the given item. In report view, OnGetItemImage will
+ // only be called for the first column. See OnGetItemColumnImage for
+ // details.
+ virtual int OnGetItemImage(long item) const;
+
+ // return the icon for the given item and column.
+ virtual int OnGetItemColumnImage(long item, long column) const;
+
+ // return the attribute for the item (may return NULL if none)
+ virtual wxListItemAttr *OnGetItemAttr(long item) const;
+
+ // it calls our OnGetXXX() functions
+ friend class WXDLLEXPORT wxListMainWindow;
+
+private:
+ // create the header window
+ void CreateHeaderWindow();
+
+ // calculate and set height of the header
+ void CalculateAndSetHeaderHeight();
+
+ // reposition the header and the main window in the report view depending
+ // on whether it should be shown or not
+ void ResizeReportView(bool showHeader);
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericListCtrl)
+};
+
+#if (!defined(__WXMSW__) || defined(__WXUNIVERSAL__)) && (!defined(__WXMAC__) || defined(__WXUNIVERSAL__))
+/*
+ * wxListCtrl has to be a real class or we have problems with
+ * the run-time information.
+ */
+
+class WXDLLEXPORT wxListCtrl: public wxGenericListCtrl
+{
+ DECLARE_DYNAMIC_CLASS(wxListCtrl)
+
+public:
+ wxListCtrl() {}
+
+ wxListCtrl(wxWindow *parent, wxWindowID winid = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxLC_ICON,
+ const wxValidator &validator = wxDefaultValidator,
+ const wxString &name = wxListCtrlNameStr)
+ : wxGenericListCtrl(parent, winid, pos, size, style, validator, name)
+ {
+ }
+
+};
+#endif // !__WXMSW__ || __WXUNIVERSAL__
+
+#endif // _WX_GENERIC_LISTCTRL_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/logg.h b/3rdparty/wxWidgets/include/wx/generic/logg.h
new file mode 100644
index 0000000000..855c0c2f34
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/logg.h
@@ -0,0 +1,129 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/logg.h
+// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs)
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 29/01/98
+// RCS-ID: $Id: logg.h 41020 2006-09-05 20:47:48Z VZ $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_LOGG_H_
+#define _WX_LOGG_H_
+
+#if wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// the following log targets are only compiled in if the we're compiling the
+// GUI part (andnot just the base one) of the library, they're implemented in
+// src/generic/logg.cpp *and not src/common/log.cpp unlike all the rest)
+// ----------------------------------------------------------------------------
+
+#if wxUSE_TEXTCTRL
+
+// log everything to a text window (GUI only of course)
+class WXDLLEXPORT wxLogTextCtrl : public wxLog
+{
+public:
+ wxLogTextCtrl(wxTextCtrl *pTextCtrl);
+
+protected:
+ // implement sink function
+ virtual void DoLogString(const wxChar *szString, time_t t);
+
+private:
+ // the control we use
+ wxTextCtrl *m_pTextCtrl;
+
+ DECLARE_NO_COPY_CLASS(wxLogTextCtrl)
+};
+
+#endif // wxUSE_TEXTCTRL
+
+// ----------------------------------------------------------------------------
+// GUI log target, the default one for wxWidgets programs
+// ----------------------------------------------------------------------------
+
+#if wxUSE_LOGGUI
+
+class WXDLLEXPORT wxLogGui : public wxLog
+{
+public:
+ // ctor
+ wxLogGui();
+
+ // show all messages that were logged since the last Flush()
+ virtual void Flush();
+
+protected:
+ virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);
+
+ // empty everything
+ void Clear();
+
+ wxArrayString m_aMessages; // the log message texts
+ wxArrayInt m_aSeverity; // one of wxLOG_XXX values
+ wxArrayLong m_aTimes; // the time of each message
+ bool m_bErrors, // do we have any errors?
+ m_bWarnings, // any warnings?
+ m_bHasMessages; // any messages at all?
+
+};
+
+#endif // wxUSE_LOGGUI
+
+// ----------------------------------------------------------------------------
+// (background) log window: this class forwards all log messages to the log
+// target which was active when it was instantiated, but also collects them
+// to the log window. This window has it's own menu which allows the user to
+// close it, clear the log contents or save it to the file.
+// ----------------------------------------------------------------------------
+
+#if wxUSE_LOGWINDOW
+
+class WXDLLEXPORT wxLogWindow : public wxLogPassThrough
+{
+public:
+ wxLogWindow(wxWindow *pParent, // the parent frame (can be NULL)
+ const wxChar *szTitle, // the title of the frame
+ bool bShow = true, // show window immediately?
+ bool bPassToOld = true); // pass messages to the old target?
+
+ virtual ~wxLogWindow();
+
+ // window operations
+ // show/hide the log window
+ void Show(bool bShow = true);
+ // retrieve the pointer to the frame
+ wxFrame *GetFrame() const;
+
+ // overridables
+ // called immediately after the log frame creation allowing for
+ // any extra initializations
+ virtual void OnFrameCreate(wxFrame *frame);
+ // called if the user closes the window interactively, will not be
+ // called if it is destroyed for another reason (such as when program
+ // exits) - return true from here to allow the frame to close, false
+ // to prevent this from happening
+ virtual bool OnFrameClose(wxFrame *frame);
+ // called right before the log frame is going to be deleted: will
+ // always be called unlike OnFrameClose()
+ virtual void OnFrameDelete(wxFrame *frame);
+
+protected:
+ virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);
+ virtual void DoLogString(const wxChar *szString, time_t t);
+
+private:
+ wxLogFrame *m_pLogFrame; // the log frame
+
+ DECLARE_NO_COPY_CLASS(wxLogWindow)
+};
+
+#endif // wxUSE_LOGWINDOW
+
+#endif // wxUSE_GUI
+
+#endif // _WX_LOGG_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/mask.h b/3rdparty/wxWidgets/include/wx/generic/mask.h
new file mode 100644
index 0000000000..41c85e3c42
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/mask.h
@@ -0,0 +1,54 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/mask.h
+// Purpose: generic implementation of wxMask
+// Author: Vadim Zeitlin
+// Created: 2006-09-28
+// RCS-ID: $Id: mask.h 41495 2006-09-28 23:02:39Z VZ $
+// Copyright: (c) 2006 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_MASKG_H_
+#define _WX_GENERIC_MASKG_H_
+
+// ----------------------------------------------------------------------------
+// generic wxMask implementation
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMask : public wxMaskBase
+{
+public:
+ wxMask() { }
+ wxMask(const wxBitmap& bitmap, const wxColour& colour)
+ {
+ InitFromColour(bitmap, colour);
+ }
+
+#if wxUSE_PALETTE
+ wxMask(const wxBitmap& bitmap, int paletteIndex)
+ {
+ Create(bitmap, paletteIndex);
+ }
+#endif // wxUSE_PALETTE
+
+ wxMask(const wxBitmap& bitmap)
+ {
+ InitFromMonoBitmap(bitmap);
+ }
+
+ // implementation-only from now on
+ wxBitmap GetBitmap() const { return m_bitmap; }
+
+private:
+ // implement wxMaskBase pure virtuals
+ virtual void FreeData();
+ virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour);
+ virtual bool InitFromMonoBitmap(const wxBitmap& bitmap);
+
+ wxBitmap m_bitmap;
+
+ DECLARE_DYNAMIC_CLASS(wxMask)
+};
+
+#endif // _WX_GENERIC_MASKG_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/mdig.h b/3rdparty/wxWidgets/include/wx/generic/mdig.h
new file mode 100644
index 0000000000..99d9243995
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/mdig.h
@@ -0,0 +1,335 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/mdig.h
+// Purpose: Generic MDI (Multiple Document Interface) classes
+// Author: Hans Van Leemputten
+// Modified by:
+// Created: 29/07/2002
+// RCS-ID: $Id: mdig.h 41223 2006-09-14 17:36:18Z PC $
+// Copyright: (c) Hans Van Leemputten
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MDIG_H_
+#define _WX_MDIG_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/frame.h"
+#include "wx/panel.h"
+#include "wx/notebook.h"
+
+extern WXDLLEXPORT_DATA(const wxChar) wxStatusLineNameStr[];
+
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericMDIParentFrame;
+class WXDLLEXPORT wxGenericMDIClientWindow;
+class WXDLLEXPORT wxGenericMDIChildFrame;
+
+//-----------------------------------------------------------------------------
+// wxGenericMDIParentFrame
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericMDIParentFrame: public wxFrame
+{
+public:
+ wxGenericMDIParentFrame();
+ wxGenericMDIParentFrame(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr);
+
+ virtual ~wxGenericMDIParentFrame();
+ bool Create( wxWindow *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr );
+
+#if wxUSE_MENUS
+ wxMenu* GetWindowMenu() const { return m_pWindowMenu; };
+ void SetWindowMenu(wxMenu* pMenu);
+
+ virtual void SetMenuBar(wxMenuBar *pMenuBar);
+#endif // wxUSE_MENUS
+
+ void SetChildMenuBar(wxGenericMDIChildFrame *pChild);
+
+ virtual bool ProcessEvent(wxEvent& event);
+
+ wxGenericMDIChildFrame *GetActiveChild() const;
+ inline void SetActiveChild(wxGenericMDIChildFrame* pChildFrame);
+
+ wxGenericMDIClientWindow *GetClientWindow() const;
+ virtual wxGenericMDIClientWindow *OnCreateClient();
+
+ virtual void Cascade() { /* Has no effect */ }
+ virtual void Tile(wxOrientation WXUNUSED(orient) = wxHORIZONTAL) { }
+ virtual void ArrangeIcons() { /* Has no effect */ }
+ virtual void ActivateNext();
+ virtual void ActivatePrevious();
+
+protected:
+ wxGenericMDIClientWindow *m_pClientWindow;
+ wxGenericMDIChildFrame *m_pActiveChild;
+#if wxUSE_MENUS
+ wxMenu *m_pWindowMenu;
+ wxMenuBar *m_pMyMenuBar;
+#endif // wxUSE_MENUS
+
+protected:
+ void Init();
+
+#if wxUSE_MENUS
+ void RemoveWindowMenu(wxMenuBar *pMenuBar);
+ void AddWindowMenu(wxMenuBar *pMenuBar);
+
+ void DoHandleMenu(wxCommandEvent &event);
+#endif // wxUSE_MENUS
+
+ virtual void DoGetClientSize(int *width, int *height) const;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericMDIParentFrame)
+};
+
+//-----------------------------------------------------------------------------
+// wxGenericMDIChildFrame
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericMDIChildFrame: public wxPanel
+{
+public:
+ wxGenericMDIChildFrame();
+ wxGenericMDIChildFrame( wxGenericMDIParentFrame *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr );
+
+ virtual ~wxGenericMDIChildFrame();
+ bool Create( wxGenericMDIParentFrame *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr );
+
+#if wxUSE_MENUS
+ virtual void SetMenuBar( wxMenuBar *menu_bar );
+ virtual wxMenuBar *GetMenuBar() const;
+#endif // wxUSE_MENUS
+
+ virtual void SetTitle(const wxString& title);
+ virtual wxString GetTitle() const;
+
+ virtual void Activate();
+
+#if wxUSE_STATUSBAR
+ // no status bars
+ virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number) = 1,
+ long WXUNUSED(style) = 1,
+ wxWindowID WXUNUSED(winid) = 1,
+ const wxString& WXUNUSED(name) = wxEmptyString)
+ { return (wxStatusBar*)NULL; }
+
+ virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
+ virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
+ virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
+#endif
+
+ // no size hints
+ virtual void DoSetSizeHints( int WXUNUSED(minW),
+ int WXUNUSED(minH),
+ int WXUNUSED(maxW) = wxDefaultCoord,
+ int WXUNUSED(maxH) = wxDefaultCoord,
+ int WXUNUSED(incW) = wxDefaultCoord,
+ int WXUNUSED(incH) = wxDefaultCoord) {}
+
+#if wxUSE_TOOLBAR
+ // no toolbar bars
+ virtual wxToolBar* CreateToolBar( long WXUNUSED(style),
+ wxWindowID WXUNUSED(winid),
+ const wxString& WXUNUSED(name) )
+ { return (wxToolBar*)NULL; }
+ virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
+#endif
+
+ // no icon
+ void SetIcon( const wxIcon& WXUNUSED(icon) ) { }
+ void SetIcons( const wxIconBundle& WXUNUSED(icons) ) { }
+
+ // no maximize etc
+ virtual void Maximize( bool WXUNUSED(maximize) = true) { /* Has no effect */ }
+ virtual void Restore() { /* Has no effect */ }
+ virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ }
+ virtual bool IsMaximized() const { return true; }
+ virtual bool IsIconized() const { return false; }
+ virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; }
+ virtual bool IsFullScreen() const { return false; }
+
+ virtual bool IsTopLevel() const { return false; }
+
+ void OnMenuHighlight(wxMenuEvent& event);
+ void OnActivate(wxActivateEvent& event);
+
+ // The next 2 are copied from top level...
+ void OnCloseWindow(wxCloseEvent& event);
+ void OnSize(wxSizeEvent& event);
+
+ void SetMDIParentFrame(wxGenericMDIParentFrame* parentFrame);
+ wxGenericMDIParentFrame* GetMDIParentFrame() const;
+
+protected:
+ wxGenericMDIParentFrame *m_pMDIParentFrame;
+ wxRect m_MDIRect;
+ wxString m_Title;
+
+#if wxUSE_MENUS
+ wxMenuBar *m_pMenuBar;
+#endif // wxUSE_MENUS
+
+protected:
+ void Init();
+
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
+ // This function needs to be called when a size change is confirmed,
+ // we needed this function to prevent any body from the outside
+ // changing the panel... it messes the UI layout when we would allow it.
+ void ApplyMDIChildFrameRect();
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericMDIChildFrame)
+ DECLARE_EVENT_TABLE()
+
+ friend class wxGenericMDIClientWindow;
+};
+
+//-----------------------------------------------------------------------------
+// wxGenericMDIClientWindow
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericMDIClientWindow: public wxNotebook
+{
+public:
+ wxGenericMDIClientWindow();
+ wxGenericMDIClientWindow( wxGenericMDIParentFrame *parent, long style = 0 );
+ virtual ~wxGenericMDIClientWindow();
+ virtual bool CreateClient( wxGenericMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
+
+ virtual int SetSelection(size_t nPage);
+
+protected:
+ void PageChanged(int OldSelection, int newSelection);
+
+ void OnPageChanged(wxNotebookEvent& event);
+ void OnSize(wxSizeEvent& event);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericMDIClientWindow)
+ DECLARE_EVENT_TABLE()
+};
+
+
+/*
+ * Define normal wxMDI classes based on wxGenericMDI
+ */
+
+#ifndef wxUSE_GENERIC_MDI_AS_NATIVE
+#if defined(__WXUNIVERSAL__) || defined(__WXPM__) || defined(__WXCOCOA__)
+#define wxUSE_GENERIC_MDI_AS_NATIVE 1
+#else
+#define wxUSE_GENERIC_MDI_AS_NATIVE 0
+#endif
+#endif // wxUSE_GENERIC_MDI_AS_NATIVE
+
+#if wxUSE_GENERIC_MDI_AS_NATIVE
+
+class wxMDIChildFrame ;
+
+//-----------------------------------------------------------------------------
+// wxMDIParentFrame
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMDIParentFrame: public wxGenericMDIParentFrame
+{
+public:
+ wxMDIParentFrame() {}
+ wxMDIParentFrame(wxWindow *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr)
+ :wxGenericMDIParentFrame(parent, winid, title, pos, size, style, name)
+ {
+ }
+
+ wxMDIChildFrame * GetActiveChild() const ;
+
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
+};
+
+//-----------------------------------------------------------------------------
+// wxMDIChildFrame
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMDIChildFrame: public wxGenericMDIChildFrame
+{
+public:
+ wxMDIChildFrame() {}
+
+ wxMDIChildFrame( wxGenericMDIParentFrame *parent,
+ wxWindowID winid,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr )
+ :wxGenericMDIChildFrame(parent, winid, title, pos, size, style, name)
+ {
+ }
+private:
+ DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
+};
+
+//-----------------------------------------------------------------------------
+// wxMDIClientWindow
+//-----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxMDIClientWindow: public wxGenericMDIClientWindow
+{
+public:
+ wxMDIClientWindow() {}
+
+ wxMDIClientWindow( wxGenericMDIParentFrame *parent, long style = 0 )
+ :wxGenericMDIClientWindow(parent, style)
+ {
+ }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
+};
+
+#endif
+
+#endif
+ // _WX_MDIG_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/msgdlgg.h b/3rdparty/wxWidgets/include/wx/generic/msgdlgg.h
new file mode 100644
index 0000000000..46c5d599e7
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/msgdlgg.h
@@ -0,0 +1,44 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/msgdlgg.h
+// Purpose: Generic wxMessageDialog
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: msgdlgg.h 49765 2007-11-09 18:32:38Z DE $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __MSGDLGH_G__
+#define __MSGDLGH_G__
+
+#include "wx/defs.h"
+#include "wx/dialog.h"
+
+// type is an 'or' (|) of wxOK, wxCANCEL, wxYES_NO
+// Returns wxYES/NO/OK/CANCEL
+
+extern WXDLLEXPORT_DATA(const wxChar) wxMessageBoxCaptionStr[];
+
+class WXDLLEXPORT wxGenericMessageDialog: public wxDialog, public wxMessageDialogBase
+{
+DECLARE_DYNAMIC_CLASS(wxGenericMessageDialog)
+
+public:
+ wxGenericMessageDialog(wxWindow *parent, const wxString& message,
+ const wxString& caption = wxMessageBoxCaptionStr,
+ long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
+
+ void OnYes(wxCommandEvent& event);
+ void OnNo(wxCommandEvent& event);
+ void OnCancel(wxCommandEvent& event);
+
+private:
+ DECLARE_EVENT_TABLE()
+};
+
+#if (!defined( __WXMSW__ ) && !defined( __WXMAC__) && !defined(__WXPM__) && !defined(__WXCOCOA__)) || defined(__WXUNIVERSAL__)
+#define wxMessageDialog wxGenericMessageDialog
+#endif
+
+#endif // __MSGDLGH_G__
diff --git a/3rdparty/wxWidgets/include/wx/generic/notebook.h b/3rdparty/wxWidgets/include/wx/generic/notebook.h
new file mode 100644
index 0000000000..2b9e109e27
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/notebook.h
@@ -0,0 +1,160 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: notebook.h
+// Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog)
+// Author: Julian Smart
+// Modified by:
+// RCS-ID: $Id: notebook.h 41738 2006-10-08 17:37:23Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_NOTEBOOK_H_
+#define _WX_NOTEBOOK_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+#include "wx/event.h"
+#include "wx/control.h"
+
+// ----------------------------------------------------------------------------
+// types
+// ----------------------------------------------------------------------------
+
+// fwd declarations
+class WXDLLEXPORT wxImageList;
+class WXDLLEXPORT wxWindow;
+class WXDLLEXPORT wxTabView;
+
+// ----------------------------------------------------------------------------
+// wxNotebook
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase
+{
+public:
+ // ctors
+ // -----
+ // default for dynamic class
+ wxNotebook();
+ // the same arguments as for wxControl (@@@ any special styles?)
+ wxNotebook(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxNotebookNameStr);
+ // Create() function
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxNotebookNameStr);
+ // dtor
+ virtual ~wxNotebook();
+
+ // accessors
+ // ---------
+ // Find the position of the wxNotebookPage, -1 if not found.
+ int FindPagePosition(wxNotebookPage* page) const;
+
+ // set the currently selected page, return the index of the previously
+ // selected one (or -1 on error)
+ // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
+ int SetSelection(size_t nPage);
+ // cycle thru the tabs
+ // void AdvanceSelection(bool bForward = true);
+ // get the currently selected page
+ int GetSelection() const { return m_nSelection; }
+
+ // changes selected page without sending events
+ int ChangeSelection(size_t nPage);
+
+ // set/get the title of a page
+ bool SetPageText(size_t nPage, const wxString& strText);
+ wxString GetPageText(size_t nPage) const;
+
+ // get the number of rows for a control with wxNB_MULTILINE style (not all
+ // versions support it - they will always return 1 then)
+ virtual int GetRowCount() const ;
+
+ // sets/returns item's image index in the current image list
+ int GetPageImage(size_t nPage) const;
+ bool SetPageImage(size_t nPage, int nImage);
+
+ // control the appearance of the notebook pages
+ // set the size (the same for all pages)
+ void SetPageSize(const wxSize& size);
+ // set the padding between tabs (in pixels)
+ void SetPadding(const wxSize& padding);
+
+ // Sets the size of the tabs (assumes all tabs are the same size)
+ void SetTabSize(const wxSize& sz);
+
+ // operations
+ // ----------
+ // remove one page from the notebook, and delete the page.
+ bool DeletePage(size_t nPage);
+ bool DeletePage(wxNotebookPage* page);
+ // remove one page from the notebook, without deleting the page.
+ bool RemovePage(size_t nPage);
+ bool RemovePage(wxNotebookPage* page);
+ virtual wxWindow* DoRemovePage(size_t nPage);
+
+ // remove all pages
+ bool DeleteAllPages();
+ // the same as AddPage(), but adds it at the specified position
+ bool InsertPage(size_t nPage,
+ wxNotebookPage *pPage,
+ const wxString& strText,
+ bool bSelect = false,
+ int imageId = -1);
+
+ // callbacks
+ // ---------
+ void OnSize(wxSizeEvent& event);
+ void OnInternalIdle();
+ void OnSelChange(wxNotebookEvent& event);
+ void OnSetFocus(wxFocusEvent& event);
+ void OnNavigationKey(wxNavigationKeyEvent& event);
+
+ // base class virtuals
+ // -------------------
+ virtual void Command(wxCommandEvent& event);
+ virtual void SetConstraintSizes(bool recurse = true);
+ virtual bool DoPhase(int nPhase);
+
+ virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
+
+ // Implementation
+
+ // wxNotebook on Motif uses a generic wxTabView to implement itself.
+ wxTabView *GetTabView() const { return m_tabView; }
+ void SetTabView(wxTabView *v) { m_tabView = v; }
+
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnPaint(wxPaintEvent& event);
+
+ virtual wxRect GetAvailableClientSize();
+
+ // Implementation: calculate the layout of the view rect
+ // and resize the children if required
+ bool RefreshLayout(bool force = true);
+
+protected:
+ // common part of all ctors
+ void Init();
+
+ // helper functions
+ void ChangePage(int nOldSel, int nSel); // change pages
+
+ int m_nSelection; // the current selection (-1 if none)
+
+ wxTabView* m_tabView;
+
+ DECLARE_DYNAMIC_CLASS(wxNotebook)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // _WX_NOTEBOOK_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/numdlgg.h b/3rdparty/wxWidgets/include/wx/generic/numdlgg.h
new file mode 100644
index 0000000000..06c0d2f017
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/numdlgg.h
@@ -0,0 +1,79 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/numdlgg.h
+// Purpose: wxNumberEntryDialog class
+// Author: John Labenski
+// Modified by:
+// Created: 07.02.04 (extracted from textdlgg.cpp)
+// RCS-ID: $Id: numdlgg.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) wxWidgets team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __NUMDLGH_G__
+#define __NUMDLGH_G__
+
+#include "wx/defs.h"
+
+#if wxUSE_NUMBERDLG
+
+#include "wx/dialog.h"
+
+#if wxUSE_SPINCTRL
+ class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
+#else
+ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+#endif // wxUSE_SPINCTRL
+
+// ----------------------------------------------------------------------------
+// wxNumberEntryDialog: a dialog with spin control, [ok] and [cancel] buttons
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxNumberEntryDialog : public wxDialog
+{
+public:
+ wxNumberEntryDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& prompt,
+ const wxString& caption,
+ long value, long min, long max,
+ const wxPoint& pos = wxDefaultPosition);
+
+ long GetValue() const { return m_value; }
+
+ // implementation only
+ void OnOK(wxCommandEvent& event);
+ void OnCancel(wxCommandEvent& event);
+
+protected:
+
+#if wxUSE_SPINCTRL
+ wxSpinCtrl *m_spinctrl;
+#else
+ wxTextCtrl *m_spinctrl;
+#endif // wxUSE_SPINCTRL
+
+ long m_value, m_min, m_max;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxNumberEntryDialog)
+ DECLARE_NO_COPY_CLASS(wxNumberEntryDialog)
+};
+
+// ----------------------------------------------------------------------------
+// function to get a number from user
+// ----------------------------------------------------------------------------
+
+long WXDLLEXPORT
+wxGetNumberFromUser(const wxString& message,
+ const wxString& prompt,
+ const wxString& caption,
+ long value = 0,
+ long min = 0,
+ long max = 100,
+ wxWindow *parent = (wxWindow *)NULL,
+ const wxPoint& pos = wxDefaultPosition);
+
+#endif // wxUSE_NUMBERDLG
+
+#endif // __NUMDLGH_G__
diff --git a/3rdparty/wxWidgets/include/wx/generic/paletteg.h b/3rdparty/wxWidgets/include/wx/generic/paletteg.h
new file mode 100644
index 0000000000..52fa95bc13
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/paletteg.h
@@ -0,0 +1,49 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/paletteg.h
+// Purpose:
+// Author: Robert Roebling
+// Created: 01/02/97
+// RCS-ID: $Id: paletteg.h 42752 2006-10-30 19:26:48Z VZ $
+// Copyright: (c) 1998 Robert Roebling and Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef __WX_PALETTEG_H__
+#define __WX_PALETTEG_H__
+
+#include "wx/defs.h"
+#include "wx/object.h"
+#include "wx/gdiobj.h"
+#include "wx/gdicmn.h"
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxPalette;
+
+//-----------------------------------------------------------------------------
+// wxPalette
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
+{
+public:
+ wxPalette();
+ wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
+ virtual ~wxPalette();
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const;
+
+ bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
+ int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const;
+ bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
+
+ virtual int GetColoursCount() const;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPalette)
+};
+
+#endif // __WX_PALETTEG_H__
diff --git a/3rdparty/wxWidgets/include/wx/generic/panelg.h b/3rdparty/wxWidgets/include/wx/generic/panelg.h
new file mode 100644
index 0000000000..f211a995cc
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/panelg.h
@@ -0,0 +1,95 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/panelg.h
+// Purpose: wxPanel: a container for child controls
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: panelg.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_PANEL_H_
+#define _WX_GENERIC_PANEL_H_
+
+// ----------------------------------------------------------------------------
+// headers and forward declarations
+// ----------------------------------------------------------------------------
+
+#include "wx/window.h"
+#include "wx/containr.h"
+
+class WXDLLIMPEXP_FWD_CORE wxControlContainer;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[];
+
+// ----------------------------------------------------------------------------
+// wxPanel contains other controls and implements TAB traversal between them
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPanel : public wxWindow
+{
+public:
+ wxPanel() { Init(); }
+
+ // Old-style constructor (no default values for coordinates to avoid
+ // ambiguity with the new one)
+ wxPanel(wxWindow *parent,
+ int x, int y, int width, int height,
+ long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ const wxString& name = wxPanelNameStr)
+ {
+ Init();
+
+ Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
+ }
+
+ // Constructor
+ wxPanel(wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ const wxString& name = wxPanelNameStr)
+ {
+ Init();
+
+ Create(parent, winid, pos, size, style, name);
+ }
+
+ // Pseudo ctor
+ bool Create(wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+ const wxString& name = wxPanelNameStr);
+
+ virtual ~wxPanel();
+
+ // implementation from now on
+ // --------------------------
+
+ // calls layout for layout constraints and sizers
+ void OnSize(wxSizeEvent& event);
+
+ virtual void InitDialog();
+
+#ifdef __WXUNIVERSAL__
+ virtual bool IsCanvasWindow() const { return true; }
+#endif
+
+
+ WX_DECLARE_CONTROL_CONTAINER();
+
+protected:
+ // common part of all ctors
+ void Init();
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif
+ // _WX_GENERIC_PANEL_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/printps.h b/3rdparty/wxWidgets/include/wx/generic/printps.h
new file mode 100644
index 0000000000..107a2a29be
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/printps.h
@@ -0,0 +1,68 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: printps.h
+// Purpose: wxPostScriptPrinter, wxPostScriptPrintPreview
+// wxGenericPageSetupDialog
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: printps.h 35650 2005-09-23 12:56:45Z MR $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __PRINTPSH__
+#define __PRINTPSH__
+
+#include "wx/prntbase.h"
+
+#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT
+
+// ----------------------------------------------------------------------------
+// Represents the printer: manages printing a wxPrintout object
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPostScriptPrinter : public wxPrinterBase
+{
+public:
+ wxPostScriptPrinter(wxPrintDialogData *data = (wxPrintDialogData *) NULL);
+ virtual ~wxPostScriptPrinter();
+
+ virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
+ virtual wxDC* PrintDialog(wxWindow *parent);
+ virtual bool Setup(wxWindow *parent);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter)
+};
+
+// ----------------------------------------------------------------------------
+// wxPrintPreview: programmer creates an object of this class to preview a
+// wxPrintout.
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPostScriptPrintPreview : public wxPrintPreviewBase
+{
+public:
+ wxPostScriptPrintPreview(wxPrintout *printout,
+ wxPrintout *printoutForPrinting = (wxPrintout *) NULL,
+ wxPrintDialogData *data = (wxPrintDialogData *) NULL);
+ wxPostScriptPrintPreview(wxPrintout *printout,
+ wxPrintout *printoutForPrinting,
+ wxPrintData *data);
+
+ virtual ~wxPostScriptPrintPreview();
+
+ virtual bool Print(bool interactive);
+ virtual void DetermineScaling();
+
+private:
+ void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
+
+private:
+ DECLARE_CLASS(wxPostScriptPrintPreview)
+};
+
+#endif
+
+#endif
+// __PRINTPSH__
diff --git a/3rdparty/wxWidgets/include/wx/generic/prntdlgg.h b/3rdparty/wxWidgets/include/wx/generic/prntdlgg.h
new file mode 100644
index 0000000000..2215e1066e
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/prntdlgg.h
@@ -0,0 +1,256 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: prntdlgg.h
+// Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog,
+// wxGenericPageSetupDialog
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: prntdlgg.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __PRINTDLGH_G_
+#define __PRINTDLGH_G_
+
+#include "wx/defs.h"
+
+#if wxUSE_PRINTING_ARCHITECTURE
+
+#include "wx/dialog.h"
+#include "wx/cmndata.h"
+#include "wx/prntbase.h"
+#include "wx/printdlg.h"
+#include "wx/listctrl.h"
+
+#if wxUSE_POSTSCRIPT
+ #include "wx/dcps.h"
+#endif
+
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxCheckBox;
+class WXDLLIMPEXP_FWD_CORE wxComboBox;
+class WXDLLIMPEXP_FWD_CORE wxStaticText;
+class WXDLLIMPEXP_FWD_CORE wxRadioBox;
+class WXDLLIMPEXP_FWD_CORE wxPageSetupData;
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// This is not clear why all these enums start with 10 or 30 but do not change it
+// without good reason to avoid some subtle backwards compatibility breakage
+
+enum
+{
+ wxPRINTID_STATIC = 10,
+ wxPRINTID_RANGE,
+ wxPRINTID_FROM,
+ wxPRINTID_TO,
+ wxPRINTID_COPIES,
+ wxPRINTID_PRINTTOFILE,
+ wxPRINTID_SETUP
+};
+
+enum
+{
+ wxPRINTID_LEFTMARGIN = 30,
+ wxPRINTID_RIGHTMARGIN,
+ wxPRINTID_TOPMARGIN,
+ wxPRINTID_BOTTOMMARGIN
+};
+
+enum
+{
+ wxPRINTID_PRINTCOLOUR = 10,
+ wxPRINTID_ORIENTATION,
+ wxPRINTID_COMMAND,
+ wxPRINTID_OPTIONS,
+ wxPRINTID_PAPERSIZE,
+ wxPRINTID_PRINTER
+};
+
+#if wxUSE_POSTSCRIPT
+
+//----------------------------------------------------------------------------
+// wxPostScriptNativeData
+//----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPostScriptPrintNativeData: public wxPrintNativeDataBase
+{
+public:
+ wxPostScriptPrintNativeData();
+ virtual ~wxPostScriptPrintNativeData();
+
+ virtual bool TransferTo( wxPrintData &data );
+ virtual bool TransferFrom( const wxPrintData &data );
+
+ virtual bool Ok() const { return IsOk(); }
+ virtual bool IsOk() const { return true; }
+
+ const wxString& GetPrinterCommand() const { return m_printerCommand; }
+ const wxString& GetPrinterOptions() const { return m_printerOptions; }
+ const wxString& GetPreviewCommand() const { return m_previewCommand; }
+ const wxString& GetFontMetricPath() const { return m_afmPath; }
+ double GetPrinterScaleX() const { return m_printerScaleX; }
+ double GetPrinterScaleY() const { return m_printerScaleY; }
+ long GetPrinterTranslateX() const { return m_printerTranslateX; }
+ long GetPrinterTranslateY() const { return m_printerTranslateY; }
+
+ void SetPrinterCommand(const wxString& command) { m_printerCommand = command; }
+ void SetPrinterOptions(const wxString& options) { m_printerOptions = options; }
+ void SetPreviewCommand(const wxString& command) { m_previewCommand = command; }
+ void SetFontMetricPath(const wxString& path) { m_afmPath = path; }
+ void SetPrinterScaleX(double x) { m_printerScaleX = x; }
+ void SetPrinterScaleY(double y) { m_printerScaleY = y; }
+ void SetPrinterScaling(double x, double y) { m_printerScaleX = x; m_printerScaleY = y; }
+ void SetPrinterTranslateX(long x) { m_printerTranslateX = x; }
+ void SetPrinterTranslateY(long y) { m_printerTranslateY = y; }
+ void SetPrinterTranslation(long x, long y) { m_printerTranslateX = x; m_printerTranslateY = y; }
+
+#if wxUSE_STREAMS
+ wxOutputStream *GetOutputStream() { return m_outputStream; }
+ void SetOutputStream( wxOutputStream *output ) { m_outputStream = output; }
+#endif
+
+private:
+ wxString m_printerCommand;
+ wxString m_previewCommand;
+ wxString m_printerOptions;
+ wxString m_afmPath;
+ double m_printerScaleX;
+ double m_printerScaleY;
+ long m_printerTranslateX;
+ long m_printerTranslateY;
+#if wxUSE_STREAMS
+ wxOutputStream *m_outputStream;
+#endif
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPostScriptPrintNativeData)
+};
+
+// ----------------------------------------------------------------------------
+// Simulated Print and Print Setup dialogs for non-Windows platforms (and
+// Windows using PostScript print/preview)
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericPrintDialog : public wxPrintDialogBase
+{
+public:
+ wxGenericPrintDialog(wxWindow *parent,
+ wxPrintDialogData* data = (wxPrintDialogData*)NULL);
+ wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
+
+ virtual ~wxGenericPrintDialog();
+
+ void OnSetup(wxCommandEvent& event);
+ void OnRange(wxCommandEvent& event);
+ void OnOK(wxCommandEvent& event);
+
+ virtual bool TransferDataFromWindow();
+ virtual bool TransferDataToWindow();
+
+ virtual int ShowModal();
+
+ wxPrintData& GetPrintData()
+ { return m_printDialogData.GetPrintData(); }
+
+ wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
+ wxDC *GetPrintDC();
+
+public:
+// wxStaticText* m_printerMessage;
+ wxButton* m_setupButton;
+// wxButton* m_helpButton;
+ wxRadioBox* m_rangeRadioBox;
+ wxTextCtrl* m_fromText;
+ wxTextCtrl* m_toText;
+ wxTextCtrl* m_noCopiesText;
+ wxCheckBox* m_printToFileCheckBox;
+// wxCheckBox* m_collateCopiesCheckBox;
+
+ wxPrintDialogData m_printDialogData;
+
+protected:
+ void Init(wxWindow *parent);
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
+};
+
+class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog
+{
+public:
+ // There are no configuration options for the dialog, so we
+ // just pass the wxPrintData object (no wxPrintSetupDialogData class needed)
+ wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data);
+ virtual ~wxGenericPrintSetupDialog();
+
+ void Init(wxPrintData* data);
+
+ void OnPrinter(wxListEvent& event);
+
+ virtual bool TransferDataFromWindow();
+ virtual bool TransferDataToWindow();
+
+ virtual wxComboBox *CreatePaperTypeChoice();
+
+public:
+ wxListCtrl* m_printerListCtrl;
+ wxRadioBox* m_orientationRadioBox;
+ wxTextCtrl* m_printerCommandText;
+ wxTextCtrl* m_printerOptionsText;
+ wxCheckBox* m_colourCheckBox;
+ wxComboBox* m_paperTypeChoice;
+
+ wxPrintData m_printData;
+ wxPrintData& GetPrintData() { return m_printData; }
+
+ // After pressing OK, write data here.
+ wxPrintData* m_targetData;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_CLASS(wxGenericPrintSetupDialog)
+};
+#endif
+ // wxUSE_POSTSCRIPT
+
+class WXDLLEXPORT wxGenericPageSetupDialog : public wxPageSetupDialogBase
+{
+public:
+ wxGenericPageSetupDialog(wxWindow *parent = NULL,
+ wxPageSetupDialogData* data = NULL);
+ virtual ~wxGenericPageSetupDialog();
+
+ virtual bool TransferDataFromWindow();
+ virtual bool TransferDataToWindow();
+
+ virtual wxPageSetupDialogData& GetPageSetupDialogData();
+
+ void OnPrinter(wxCommandEvent& event);
+ wxComboBox *CreatePaperTypeChoice(int* x, int* y);
+
+public:
+ wxButton* m_printerButton;
+ wxRadioBox* m_orientationRadioBox;
+ wxTextCtrl* m_marginLeftText;
+ wxTextCtrl* m_marginTopText;
+ wxTextCtrl* m_marginRightText;
+ wxTextCtrl* m_marginBottomText;
+ wxComboBox* m_paperTypeChoice;
+
+ wxPageSetupDialogData m_pageData;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericPageSetupDialog)
+};
+
+#endif
+
+#endif
+// __PRINTDLGH_G_
diff --git a/3rdparty/wxWidgets/include/wx/generic/progdlgg.h b/3rdparty/wxWidgets/include/wx/generic/progdlgg.h
new file mode 100644
index 0000000000..02210b3cad
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/progdlgg.h
@@ -0,0 +1,172 @@
+////////////////////////////////////////////////////
+// Name: progdlgg.h
+// Purpose: wxProgressDialog class
+// Author: Karsten Ballueder
+// Modified by:
+// Created: 09.05.1999
+// RCS-ID: $Id: progdlgg.h 50711 2007-12-15 02:57:58Z VZ $
+// Copyright: (c) Karsten Ballueder
+// Licence: wxWindows licence
+////////////////////////////////////////////////////
+
+#ifndef __PROGDLGH_G__
+#define __PROGDLGH_G__
+
+#include "wx/defs.h"
+#include "wx/progdlg.h"
+
+#if wxUSE_PROGRESSDLG
+
+#include "wx/dialog.h"
+
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxGauge;
+class WXDLLIMPEXP_FWD_CORE wxStaticText;
+
+/* Progress dialog which shows a moving progress bar.
+ Taken from the Mahogany project.*/
+
+class WXDLLEXPORT wxProgressDialog : public wxDialog
+{
+DECLARE_DYNAMIC_CLASS(wxProgressDialog)
+public:
+ /* Creates and displays dialog, disables event handling for other
+ frames or parent frame to avoid recursion problems.
+ @param title title for window
+ @param message message to display in window
+ @param maximum value for status bar, if <= 0, no bar is shown
+ @param parent window or NULL
+ @param style is the bit mask of wxPD_XXX constants from wx/defs.h
+ */
+ wxProgressDialog(const wxString &title, wxString const &message,
+ int maximum = 100,
+ wxWindow *parent = NULL,
+ int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE);
+ /* Destructor.
+ Re-enables event handling for other windows.
+ */
+ virtual ~wxProgressDialog();
+
+ /* Update the status bar to the new value.
+ @param value new value
+ @param newmsg if used, new message to display
+ @returns true if ABORT button has not been pressed
+ */
+ virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL);
+
+ /* Switches the dialog to use a gauge in indeterminate mode and calls
+ wxGauge::Pulse() to show to the user a bit of progress */
+ virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool *skip = NULL);
+
+ // Must provide overload to avoid hiding it (and warnings about it)
+ virtual void Update() { wxDialog::Update(); }
+
+ /* Can be called to continue after the cancel button has been pressed, but
+ the program decided to continue the operation (e.g., user didn't
+ confirm it)
+ */
+ void Resume();
+
+ virtual bool Show( bool show = true );
+
+protected:
+ // callback for optional abort button
+ void OnCancel(wxCommandEvent& event);
+
+ // callback for optional skip button
+ void OnSkip(wxCommandEvent& event);
+
+ // callback to disable "hard" window closing
+ void OnClose(wxCloseEvent& event);
+
+ // must be called to reenable the other windows temporarily disabled while
+ // the dialog was shown
+ void ReenableOtherWindows();
+
+private:
+ // create the label with given text and another one to show the time nearby
+ // as the next windows in the sizer, returns the created control
+ wxStaticText *CreateLabel(const wxString& text, wxSizer *sizer);
+
+ // updates the label message
+ void UpdateMessage(const wxString &newmsg);
+
+ // common part of Update() and Pulse(), returns true if not cancelled
+ bool DoAfterUpdate(bool *skip);
+
+ // shortcuts for enabling buttons
+ void EnableClose();
+ void EnableSkip(bool enable=true);
+ void EnableAbort(bool enable=true);
+ inline void DisableSkip() { EnableSkip(false); }
+ inline void DisableAbort() { EnableAbort(false); }
+
+ // the status bar
+ wxGauge *m_gauge;
+ // the message displayed
+ wxStaticText *m_msg;
+ // displayed elapsed, estimated, remaining time
+ class wxStaticText *m_elapsed,
+ *m_estimated,
+ *m_remaining;
+ // time when the dialog was created
+ unsigned long m_timeStart;
+ // time when the dialog was closed or cancelled
+ unsigned long m_timeStop;
+ // time between the moment the dialog was closed/cancelled and resume
+ unsigned long m_break;
+
+ // parent top level window (may be NULL)
+ wxWindow *m_parentTop;
+
+ // continue processing or not (return value for Update())
+ enum
+ {
+ Uncancelable = -1, // dialog can't be canceled
+ Canceled, // can be cancelled and, in fact, was
+ Continue, // can be cancelled but wasn't
+ Finished // finished, waiting to be removed from screen
+ } m_state;
+
+ // skip some portion
+ bool m_skip;
+
+#if !defined(__SMARTPHONE__)
+ // the abort and skip buttons (or NULL if none)
+ wxButton *m_btnAbort;
+ wxButton *m_btnSkip;
+#endif
+
+ // the maximum value
+ int m_maximum;
+
+ // saves the time when elapsed time was updated so there is only one
+ // update per second
+ unsigned long m_last_timeupdate;
+ // tells how often a change of the estimated time has to be confirmed
+ // before it is actually displayed - this reduces the frequence of updates
+ // of estimated and remaining time
+ const int m_delay;
+ // counts the confirmations
+ int m_ctdelay;
+ unsigned long m_display_estimated;
+
+ bool m_hasAbortButton,
+ m_hasSkipButton;
+
+#if defined(__WXMSW__ ) || defined(__WXPM__)
+ // the factor we use to always keep the value in 16 bit range as the native
+ // control only supports ranges from 0 to 65,535
+ size_t m_factor;
+#endif // __WXMSW__
+
+ // for wxPD_APP_MODAL case
+ class WXDLLIMPEXP_FWD_CORE wxWindowDisabler *m_winDisabler;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxProgressDialog)
+};
+
+#endif // wxUSE_PROGRESSDLG
+
+#endif // __PROGDLGH_G__
diff --git a/3rdparty/wxWidgets/include/wx/generic/propdlg.h b/3rdparty/wxWidgets/include/wx/generic/propdlg.h
new file mode 100644
index 0000000000..8c21991164
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/propdlg.h
@@ -0,0 +1,163 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/propdlg.h
+// Purpose: wxPropertySheetDialog
+// Author: Julian Smart
+// Modified by:
+// Created: 2005-03-12
+// RCS-ID: $Id: propdlg.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_PROPDLG_H_
+#define _WX_PROPDLG_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_BOOKCTRL
+
+#include "wx/dialog.h"
+
+class WXDLLIMPEXP_FWD_CORE wxBookCtrlBase;
+
+//-----------------------------------------------------------------------------
+// wxPropertySheetDialog
+// A platform-independent properties dialog.
+//
+// * on PocketPC, a flat-look 'property sheet' notebook will be used, with
+// no OK/Cancel/Help buttons
+// * on other platforms, a normal notebook will be used, with standard buttons
+//
+// To use this class, call Create from your derived class.
+// Then create pages and add to the book control. Finally call CreateButtons and
+// LayoutDialog.
+//
+// For example:
+//
+// MyPropertySheetDialog::Create(...)
+// {
+// wxPropertySheetDialog::Create(...);
+//
+// // Add page
+// wxPanel* panel = new wxPanel(GetBookCtrl(), ...);
+// GetBookCtrl()->AddPage(panel, wxT("General"));
+//
+// CreateButtons();
+// LayoutDialog();
+// }
+//
+// Override CreateBookCtrl and AddBookCtrl to create and add a different
+// kind of book control.
+//-----------------------------------------------------------------------------
+
+// Use the platform default
+#define wxPROPSHEET_DEFAULT 0x0001
+
+// Use a notebook
+#define wxPROPSHEET_NOTEBOOK 0x0002
+
+// Use a toolbook
+#define wxPROPSHEET_TOOLBOOK 0x0004
+
+// Use a choicebook
+#define wxPROPSHEET_CHOICEBOOK 0x0008
+
+// Use a listbook
+#define wxPROPSHEET_LISTBOOK 0x0010
+
+// Use a wxButtonToolBar toolbook
+#define wxPROPSHEET_BUTTONTOOLBOOK 0x0020
+
+// Use a treebook
+#define wxPROPSHEET_TREEBOOK 0x0040
+
+// Shrink dialog to fit current page
+#define wxPROPSHEET_SHRINKTOFIT 0x0100
+
+class WXDLLIMPEXP_ADV wxPropertySheetDialog : public wxDialog
+{
+public:
+ wxPropertySheetDialog() : wxDialog() { Init(); }
+
+ wxPropertySheetDialog(wxWindow* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ long style = wxDEFAULT_DIALOG_STYLE,
+ const wxString& name = wxDialogNameStr)
+ {
+ Init();
+ Create(parent, id, title, pos, sz, style, name);
+ }
+
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ long style = wxDEFAULT_DIALOG_STYLE,
+ const wxString& name = wxDialogNameStr);
+
+//// Accessors
+
+ // Set and get the notebook
+ void SetBookCtrl(wxBookCtrlBase* book) { m_bookCtrl = book; }
+ wxBookCtrlBase* GetBookCtrl() const { return m_bookCtrl; }
+
+ // Set and get the inner sizer
+ void SetInnerSize(wxSizer* sizer) { m_innerSizer = sizer; }
+ wxSizer* GetInnerSizer() const { return m_innerSizer ; }
+
+ // Set and get the book style
+ void SetSheetStyle(long sheetStyle) { m_sheetStyle = sheetStyle; }
+ long GetSheetStyle() const { return m_sheetStyle ; }
+
+ // Set and get the border around the whole dialog
+ void SetSheetOuterBorder(int border) { m_sheetOuterBorder = border; }
+ int GetSheetOuterBorder() const { return m_sheetOuterBorder ; }
+
+ // Set and get the border around the book control only
+ void SetSheetInnerBorder(int border) { m_sheetInnerBorder = border; }
+ int GetSheetInnerBorder() const { return m_sheetInnerBorder ; }
+
+/// Operations
+
+ // Creates the buttons (none on PocketPC)
+ virtual void CreateButtons(int flags = wxOK|wxCANCEL);
+
+ // Lay out the dialog, to be called after pages have been created
+ virtual void LayoutDialog(int centreFlags = wxBOTH);
+
+/// Implementation
+
+ // Creates the book control. If you want to use a different kind of
+ // control, override.
+ virtual wxBookCtrlBase* CreateBookCtrl();
+
+ // Adds the book control to the inner sizer.
+ virtual void AddBookCtrl(wxSizer* sizer);
+
+ // Set the focus
+ void OnActivate(wxActivateEvent& event);
+
+ // Resize dialog if necessary
+ void OnIdle(wxIdleEvent& event);
+
+private:
+ void Init();
+
+protected:
+ wxBookCtrlBase* m_bookCtrl;
+ wxSizer* m_innerSizer; // sizer for extra space
+ long m_sheetStyle;
+ int m_sheetOuterBorder;
+ int m_sheetInnerBorder;
+ int m_selectedPage;
+
+ DECLARE_DYNAMIC_CLASS(wxPropertySheetDialog)
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // wxUSE_BOOKCTRL
+
+#endif // _WX_PROPDLG_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/region.h b/3rdparty/wxWidgets/include/wx/generic/region.h
new file mode 100644
index 0000000000..1a27f289f5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/region.h
@@ -0,0 +1,79 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/region.h
+// Purpose: generic wxRegion class
+// Author: David Elliott
+// Modified by:
+// Created: 2004/04/12
+// RCS-ID: $Id: region.h 41429 2006-09-25 11:47:23Z VZ $
+// Copyright: (c) 2004 David Elliott
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_REGION_H__
+#define _WX_GENERIC_REGION_H__
+
+class WXDLLEXPORT wxRegionGeneric : public wxRegionBase
+{
+public:
+ wxRegionGeneric(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
+ wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRight);
+ wxRegionGeneric(const wxRect& rect);
+ wxRegionGeneric();
+ virtual ~wxRegionGeneric();
+
+ // wxRegionBase pure virtuals
+ virtual void Clear();
+ virtual bool IsEmpty() const;
+
+protected:
+ virtual wxObjectRefData *CreateRefData() const;
+ virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
+
+ // wxRegionBase pure virtuals
+ virtual bool DoIsEqual(const wxRegion& region) const;
+ virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const;
+ virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const;
+ virtual wxRegionContain DoContainsRect(const wxRect& rect) const;
+
+ virtual bool DoOffset(wxCoord x, wxCoord y);
+ virtual bool DoUnionWithRect(const wxRect& rect);
+ virtual bool DoUnionWithRegion(const wxRegion& region);
+ virtual bool DoIntersect(const wxRegion& region);
+ virtual bool DoSubtract(const wxRegion& region);
+ virtual bool DoXor(const wxRegion& region);
+
+ friend class WXDLLEXPORT wxRegionIteratorGeneric;
+};
+
+class WXDLLEXPORT wxRegionIteratorGeneric : public wxObject
+{
+public:
+ wxRegionIteratorGeneric();
+ wxRegionIteratorGeneric(const wxRegionGeneric& region);
+ wxRegionIteratorGeneric(const wxRegionIteratorGeneric& iterator);
+ virtual ~wxRegionIteratorGeneric();
+
+ wxRegionIteratorGeneric& operator=(const wxRegionIteratorGeneric& iterator);
+
+ void Reset() { m_current = 0; }
+ void Reset(const wxRegionGeneric& region);
+
+ operator bool () const { return HaveRects(); }
+ bool HaveRects() const;
+
+ wxRegionIteratorGeneric& operator++();
+ wxRegionIteratorGeneric operator++(int);
+
+ long GetX() const;
+ long GetY() const;
+ long GetW() const;
+ long GetWidth() const { return GetW(); }
+ long GetH() const;
+ long GetHeight() const { return GetH(); }
+ wxRect GetRect() const;
+private:
+ long m_current;
+ wxRegionGeneric m_region;
+};
+
+#endif // _WX_GENERIC_REGION_H__
diff --git a/3rdparty/wxWidgets/include/wx/generic/sashwin.h b/3rdparty/wxWidgets/include/wx/generic/sashwin.h
new file mode 100644
index 0000000000..457a4a7292
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/sashwin.h
@@ -0,0 +1,261 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: sashwin.h
+// Purpose: wxSashWindow implementation. A sash window has an optional
+// sash on each edge, allowing it to be dragged. An event
+// is generated when the sash is released.
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: sashwin.h 41020 2006-09-05 20:47:48Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_SASHWIN_H_G_
+#define _WX_SASHWIN_H_G_
+
+#if wxUSE_SASH
+
+#include "wx/defs.h"
+#include "wx/window.h"
+#include "wx/string.h"
+
+#define wxSASH_DRAG_NONE 0
+#define wxSASH_DRAG_DRAGGING 1
+#define wxSASH_DRAG_LEFT_DOWN 2
+
+enum wxSashEdgePosition {
+ wxSASH_TOP = 0,
+ wxSASH_RIGHT,
+ wxSASH_BOTTOM,
+ wxSASH_LEFT,
+ wxSASH_NONE = 100
+};
+
+/*
+ * wxSashEdge represents one of the four edges of a window.
+ */
+
+class WXDLLIMPEXP_ADV wxSashEdge
+{
+public:
+ wxSashEdge()
+ { m_show = false;
+#if WXWIN_COMPATIBILITY_2_6
+ m_border = false;
+#endif
+ m_margin = 0; }
+
+ bool m_show; // Is the sash showing?
+#if WXWIN_COMPATIBILITY_2_6
+ bool m_border; // Do we draw a border?
+#endif
+ int m_margin; // The margin size
+};
+
+/*
+ * wxSashWindow flags
+ */
+
+#define wxSW_NOBORDER 0x0000
+//#define wxSW_3D 0x0010
+#define wxSW_BORDER 0x0020
+#define wxSW_3DSASH 0x0040
+#define wxSW_3DBORDER 0x0080
+#define wxSW_3D (wxSW_3DSASH | wxSW_3DBORDER)
+
+/*
+ * wxSashWindow allows any of its edges to have a sash which can be dragged
+ * to resize the window. The actual content window will be created as a child
+ * of wxSashWindow.
+ */
+
+class WXDLLIMPEXP_ADV wxSashWindow: public wxWindow
+{
+public:
+ // Default constructor
+ wxSashWindow()
+ {
+ Init();
+ }
+
+ // Normal constructor
+ wxSashWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow"))
+ {
+ Init();
+ Create(parent, id, pos, size, style, name);
+ }
+
+ virtual ~wxSashWindow();
+
+ bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow"));
+
+ // Set whether there's a sash in this position
+ void SetSashVisible(wxSashEdgePosition edge, bool sash);
+
+ // Get whether there's a sash in this position
+ bool GetSashVisible(wxSashEdgePosition edge) const { return m_sashes[edge].m_show; }
+
+#if WXWIN_COMPATIBILITY_2_6
+ // Set whether there's a border in this position
+ // This value is unused in wxSashWindow.
+ void SetSashBorder(wxSashEdgePosition edge, bool border) { m_sashes[edge].m_border = border; }
+
+ // Get whether there's a border in this position
+ // This value is unused in wxSashWindow.
+ bool HasBorder(wxSashEdgePosition edge) const { return m_sashes[edge].m_border; }
+#endif
+
+ // Get border size
+ int GetEdgeMargin(wxSashEdgePosition edge) const { return m_sashes[edge].m_margin; }
+
+ // Sets the default sash border size
+ void SetDefaultBorderSize(int width) { m_borderSize = width; }
+
+ // Gets the default sash border size
+ int GetDefaultBorderSize() const { return m_borderSize; }
+
+ // Sets the addition border size between child and sash window
+ void SetExtraBorderSize(int width) { m_extraBorderSize = width; }
+
+ // Gets the addition border size between child and sash window
+ int GetExtraBorderSize() const { return m_extraBorderSize; }
+
+ virtual void SetMinimumSizeX(int min) { m_minimumPaneSizeX = min; }
+ virtual void SetMinimumSizeY(int min) { m_minimumPaneSizeY = min; }
+ virtual int GetMinimumSizeX() const { return m_minimumPaneSizeX; }
+ virtual int GetMinimumSizeY() const { return m_minimumPaneSizeY; }
+
+ virtual void SetMaximumSizeX(int max) { m_maximumPaneSizeX = max; }
+ virtual void SetMaximumSizeY(int max) { m_maximumPaneSizeY = max; }
+ virtual int GetMaximumSizeX() const { return m_maximumPaneSizeX; }
+ virtual int GetMaximumSizeY() const { return m_maximumPaneSizeY; }
+
+////////////////////////////////////////////////////////////////////////////
+// Implementation
+
+ // Paints the border and sash
+ void OnPaint(wxPaintEvent& event);
+
+ // Handles mouse events
+ void OnMouseEvent(wxMouseEvent& ev);
+
+ // Adjusts the panes
+ void OnSize(wxSizeEvent& event);
+
+#if defined(__WXMSW__) || defined(__WXMAC__)
+ // Handle cursor correctly
+ void OnSetCursor(wxSetCursorEvent& event);
+#endif // wxMSW
+
+ // Draws borders
+ void DrawBorders(wxDC& dc);
+
+ // Draws the sashes
+ void DrawSash(wxSashEdgePosition edge, wxDC& dc);
+
+ // Draws the sashes
+ void DrawSashes(wxDC& dc);
+
+ // Draws the sash tracker (for whilst moving the sash)
+ void DrawSashTracker(wxSashEdgePosition edge, int x, int y);
+
+ // Tests for x, y over sash
+ wxSashEdgePosition SashHitTest(int x, int y, int tolerance = 2);
+
+ // Resizes subwindows
+ void SizeWindows();
+
+ // Initialize colours
+ void InitColours();
+
+private:
+ void Init();
+
+ wxSashEdge m_sashes[4];
+ int m_dragMode;
+ wxSashEdgePosition m_draggingEdge;
+ int m_oldX;
+ int m_oldY;
+ int m_borderSize;
+ int m_extraBorderSize;
+ int m_firstX;
+ int m_firstY;
+ int m_minimumPaneSizeX;
+ int m_minimumPaneSizeY;
+ int m_maximumPaneSizeX;
+ int m_maximumPaneSizeY;
+ wxCursor* m_sashCursorWE;
+ wxCursor* m_sashCursorNS;
+ wxColour m_lightShadowColour;
+ wxColour m_mediumShadowColour;
+ wxColour m_darkShadowColour;
+ wxColour m_hilightColour;
+ wxColour m_faceColour;
+ bool m_mouseCaptured;
+ wxCursor* m_currentCursor;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxSashWindow)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxSashWindow)
+};
+
+BEGIN_DECLARE_EVENT_TYPES()
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV,
+ wxEVT_SASH_DRAGGED, wxEVT_FIRST + 1200)
+END_DECLARE_EVENT_TYPES()
+
+enum wxSashDragStatus
+{
+ wxSASH_STATUS_OK,
+ wxSASH_STATUS_OUT_OF_RANGE
+};
+
+class WXDLLIMPEXP_ADV wxSashEvent: public wxCommandEvent
+{
+public:
+ wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE)
+ {
+ m_eventType = (wxEventType) wxEVT_SASH_DRAGGED;
+ m_id = id;
+ m_edge = edge;
+ }
+
+ void SetEdge(wxSashEdgePosition edge) { m_edge = edge; }
+ wxSashEdgePosition GetEdge() const { return m_edge; }
+
+ //// The rectangle formed by the drag operation
+ void SetDragRect(const wxRect& rect) { m_dragRect = rect; }
+ wxRect GetDragRect() const { return m_dragRect; }
+
+ //// Whether the drag caused the rectangle to be reversed (e.g.
+ //// dragging the top below the bottom)
+ void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
+ wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
+
+private:
+ wxSashEdgePosition m_edge;
+ wxRect m_dragRect;
+ wxSashDragStatus m_dragStatus;
+
+private:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxSashEvent)
+};
+
+typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
+
+#define wxSashEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSashEventFunction, &func)
+
+#define EVT_SASH_DRAGGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_SASH_DRAGGED, id, wxSashEventHandler(fn))
+#define EVT_SASH_DRAGGED_RANGE(id1, id2, fn) \
+ wx__DECLARE_EVT2(wxEVT_SASH_DRAGGED, id1, id2, wxSashEventHandler(fn))
+
+#endif // wxUSE_SASH
+
+#endif
+ // _WX_SASHWIN_H_G_
diff --git a/3rdparty/wxWidgets/include/wx/generic/scrolwin.h b/3rdparty/wxWidgets/include/wx/generic/scrolwin.h
new file mode 100644
index 0000000000..1677315fc8
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/scrolwin.h
@@ -0,0 +1,27 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/scrolwin.h
+// Purpose: wxGenericScrolledWindow class
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: scrolwin.h 35875 2005-10-10 18:24:27Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_SCROLLWIN_H_
+#define _WX_GENERIC_SCROLLWIN_H_
+
+// ----------------------------------------------------------------------------
+// headers and constants
+// ----------------------------------------------------------------------------
+
+#include "wx/window.h"
+#include "wx/panel.h"
+
+// ----------------------------------------------------------------------------
+// wxGenericScrolledWindow
+// ----------------------------------------------------------------------------
+
+#endif // _WX_GENERIC_SCROLLWIN_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/spinctlg.h b/3rdparty/wxWidgets/include/wx/generic/spinctlg.h
new file mode 100644
index 0000000000..7874e441fb
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/spinctlg.h
@@ -0,0 +1,183 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/spinctlg.h
+// Purpose: generic wxSpinCtrl class
+// Author: Vadim Zeitlin
+// Modified by:
+// Created: 28.10.99
+// RCS-ID: $Id: spinctlg.h 52582 2008-03-17 13:46:31Z VZ $
+// Copyright: (c) Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_SPINCTRL_H_
+#define _WX_GENERIC_SPINCTRL_H_
+
+// ----------------------------------------------------------------------------
+// wxSpinCtrl is a combination of wxSpinButton and wxTextCtrl, so if
+// wxSpinButton is available, this is what we do - but if it isn't, we still
+// define wxSpinCtrl class which then has the same appearance as wxTextCtrl but
+// the different interface. This allows to write programs using wxSpinCtrl
+// without tons of #ifdefs.
+// ----------------------------------------------------------------------------
+
+#if wxUSE_SPINBTN
+
+class WXDLLEXPORT wxSpinButton;
+class WXDLLEXPORT wxTextCtrl;
+
+// ----------------------------------------------------------------------------
+// wxSpinCtrl is a combination of wxTextCtrl and wxSpinButton
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxSpinCtrl : public wxControl
+{
+public:
+ wxSpinCtrl() { Init(); }
+
+ wxSpinCtrl(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_ARROW_KEYS,
+ int min = 0, int max = 100, int initial = 0,
+ const wxString& name = _T("wxSpinCtrl"))
+ {
+ Init();
+ Create(parent, id, value, pos, size, style, min, max, initial, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_ARROW_KEYS,
+ int min = 0, int max = 100, int initial = 0,
+ const wxString& name = _T("wxSpinCtrl"));
+
+ virtual ~wxSpinCtrl();
+
+ // operations
+ void SetValue(int val);
+ void SetValue(const wxString& text);
+ void SetRange(int min, int max);
+ void SetSelection(long from, long to);
+
+ // accessors
+ int GetValue() const;
+ int GetMin() const;
+ int GetMax() const;
+
+ // implementation from now on
+
+ // forward these functions to all subcontrols
+ virtual bool Enable(bool enable = true);
+ virtual bool Show(bool show = true);
+ virtual bool Reparent(wxWindow *newParent);
+
+ // get the subcontrols
+ wxTextCtrl *GetText() const { return m_text; }
+ wxSpinButton *GetSpinButton() const { return m_btn; }
+
+ // set the value of the text (only)
+ void SetTextValue(int val);
+
+ // put the numeric value of the string in the text ctrl into val and return
+ // true or return false if the text ctrl doesn't contain a number or if the
+ // number is out of range
+ bool GetTextValue(int *val) const;
+
+protected:
+ // override the base class virtuals involved into geometry calculations
+ virtual wxSize DoGetBestSize() const;
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
+ // common part of all ctors
+ void Init();
+
+private:
+ // the subcontrols
+ wxTextCtrl *m_text;
+ wxSpinButton *m_btn;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
+};
+
+#else // !wxUSE_SPINBTN
+
+// ----------------------------------------------------------------------------
+// wxSpinCtrl is just a text control
+// ----------------------------------------------------------------------------
+
+#include "wx/textctrl.h"
+
+class WXDLLEXPORT wxSpinCtrl : public wxTextCtrl
+{
+public:
+ wxSpinCtrl() { Init(); }
+
+ wxSpinCtrl(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_ARROW_KEYS,
+ int min = 0, int max = 100, int initial = 0,
+ const wxString& name = _T("wxSpinCtrl"))
+ {
+ Create(parent, id, value, pos, size, style, min, max, initial, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_ARROW_KEYS,
+ int min = 0, int max = 100, int initial = 0,
+ const wxString& name = _T("wxSpinCtrl"))
+ {
+ SetRange(min, max);
+
+ bool ok = wxTextCtrl::Create(parent, id, value, pos, size, style,
+ wxDefaultValidator, name);
+ SetValue(initial);
+
+ return ok;
+ }
+
+ // accessors
+ int GetValue(int WXUNUSED(dummy) = 1) const
+ {
+ int n;
+ if ( (wxSscanf(wxTextCtrl::GetValue(), wxT("%d"), &n) != 1) )
+ n = INT_MIN;
+
+ return n;
+ }
+
+ int GetMin() const { return m_min; }
+ int GetMax() const { return m_max; }
+
+ // operations
+ void SetValue(const wxString& value) { wxTextCtrl::SetValue(value); }
+ void SetValue(int val) { wxString s; s << val; wxTextCtrl::SetValue(s); }
+ void SetRange(int min, int max) { m_min = min; m_max = max; }
+
+protected:
+ // initialize m_min/max with the default values
+ void Init() { SetRange(0, 100); }
+
+ int m_min;
+ int m_max;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
+};
+
+#endif // wxUSE_SPINBTN/!wxUSE_SPINBTN
+
+#endif // _WX_GENERIC_SPINCTRL_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/splash.h b/3rdparty/wxWidgets/include/wx/generic/splash.h
new file mode 100644
index 0000000000..ff49d630d5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/splash.h
@@ -0,0 +1,92 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: splash.h
+// Purpose: Splash screen class
+// Author: Julian Smart
+// Modified by:
+// Created: 28/6/2000
+// RCS-ID: $Id: splash.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows Licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_SPLASH_H_
+#define _WX_SPLASH_H_
+
+#include "wx/bitmap.h"
+#include "wx/timer.h"
+#include "wx/frame.h"
+
+
+/*
+ * A window for displaying a splash screen
+ */
+
+#define wxSPLASH_CENTRE_ON_PARENT 0x01
+#define wxSPLASH_CENTRE_ON_SCREEN 0x02
+#define wxSPLASH_NO_CENTRE 0x00
+#define wxSPLASH_TIMEOUT 0x04
+#define wxSPLASH_NO_TIMEOUT 0x00
+
+class WXDLLIMPEXP_FWD_ADV wxSplashScreenWindow;
+
+/*
+ * wxSplashScreen
+ */
+
+class WXDLLIMPEXP_ADV wxSplashScreen: public wxFrame
+{
+public:
+ // for RTTI macros only
+ wxSplashScreen() {}
+ wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
+ wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
+ virtual ~wxSplashScreen();
+
+ void OnCloseWindow(wxCloseEvent& event);
+ void OnNotify(wxTimerEvent& event);
+
+ long GetSplashStyle() const { return m_splashStyle; }
+ wxSplashScreenWindow* GetSplashWindow() const { return m_window; }
+ int GetTimeout() const { return m_milliseconds; }
+
+protected:
+ wxSplashScreenWindow* m_window;
+ long m_splashStyle;
+ int m_milliseconds;
+ wxTimer m_timer;
+
+ DECLARE_DYNAMIC_CLASS(wxSplashScreen)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxSplashScreen)
+};
+
+/*
+ * wxSplashScreenWindow
+ */
+
+class WXDLLIMPEXP_ADV wxSplashScreenWindow: public wxWindow
+{
+public:
+ wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER);
+
+ void OnPaint(wxPaintEvent& event);
+ void OnEraseBackground(wxEraseEvent& event);
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnChar(wxKeyEvent& event);
+
+ void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
+ wxBitmap& GetBitmap() { return m_bitmap; }
+
+protected:
+ wxBitmap m_bitmap;
+
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxSplashScreenWindow)
+};
+
+
+#endif
+ // _WX_SPLASH_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/splitter.h b/3rdparty/wxWidgets/include/wx/generic/splitter.h
new file mode 100644
index 0000000000..ac651f2699
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/splitter.h
@@ -0,0 +1,406 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/splitter.h
+// Purpose: wxSplitterWindow class
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: splitter.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_SPLITTER_H_
+#define _WX_GENERIC_SPLITTER_H_
+
+#include "wx/window.h" // base class declaration
+#include "wx/containr.h" // wxControlContainer
+
+class WXDLLIMPEXP_FWD_CORE wxSplitterEvent;
+
+// ---------------------------------------------------------------------------
+// splitter constants
+// ---------------------------------------------------------------------------
+
+enum wxSplitMode
+{
+ wxSPLIT_HORIZONTAL = 1,
+ wxSPLIT_VERTICAL
+};
+
+enum
+{
+ wxSPLIT_DRAG_NONE,
+ wxSPLIT_DRAG_DRAGGING,
+ wxSPLIT_DRAG_LEFT_DOWN
+};
+
+// ---------------------------------------------------------------------------
+// wxSplitterWindow maintains one or two panes, with
+// an optional vertical or horizontal split which
+// can be used with the mouse or programmatically.
+// ---------------------------------------------------------------------------
+
+// TODO:
+// 1) Perhaps make the borders sensitive to dragging in order to create a split.
+// The MFC splitter window manages scrollbars as well so is able to
+// put sash buttons on the scrollbars, but we probably don't want to go down
+// this path.
+// 2) for wxWidgets 2.0, we must find a way to set the WS_CLIPCHILDREN style
+// to prevent flickering. (WS_CLIPCHILDREN doesn't work in all cases so can't be
+// standard).
+
+class WXDLLEXPORT wxSplitterWindow: public wxWindow
+{
+public:
+
+////////////////////////////////////////////////////////////////////////////
+// Public API
+
+ // Default constructor
+ wxSplitterWindow()
+ {
+ Init();
+ }
+
+ // Normal constructor
+ wxSplitterWindow(wxWindow *parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_3D,
+ const wxString& name = wxT("splitter"))
+ {
+ Init();
+ Create(parent, id, pos, size, style, name);
+ }
+
+ virtual ~wxSplitterWindow();
+
+ bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_3D,
+ const wxString& name = wxT("splitter"));
+
+ // Gets the only or left/top pane
+ wxWindow *GetWindow1() const { return m_windowOne; }
+
+ // Gets the right/bottom pane
+ wxWindow *GetWindow2() const { return m_windowTwo; }
+
+ // Sets the split mode
+ void SetSplitMode(int mode)
+ {
+ wxASSERT_MSG( mode == wxSPLIT_VERTICAL || mode == wxSPLIT_HORIZONTAL,
+ _T("invalid split mode") );
+
+ m_splitMode = (wxSplitMode)mode;
+ }
+
+ // Gets the split mode
+ wxSplitMode GetSplitMode() const { return m_splitMode; }
+
+ // Initialize with one window
+ void Initialize(wxWindow *window);
+
+ // Associates the given window with window 2, drawing the appropriate sash
+ // and changing the split mode.
+ // Does nothing and returns false if the window is already split.
+ // A sashPosition of 0 means choose a default sash position,
+ // negative sashPosition specifies the size of right/lower pane as it's
+ // absolute value rather than the size of left/upper pane.
+ virtual bool SplitVertically(wxWindow *window1,
+ wxWindow *window2,
+ int sashPosition = 0)
+ { return DoSplit(wxSPLIT_VERTICAL, window1, window2, sashPosition); }
+ virtual bool SplitHorizontally(wxWindow *window1,
+ wxWindow *window2,
+ int sashPosition = 0)
+ { return DoSplit(wxSPLIT_HORIZONTAL, window1, window2, sashPosition); }
+
+ // Removes the specified (or second) window from the view
+ // Doesn't actually delete the window.
+ bool Unsplit(wxWindow *toRemove = (wxWindow *) NULL);
+
+ // Replaces one of the windows with another one (neither old nor new
+ // parameter should be NULL)
+ bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew);
+
+ // Make sure the child window sizes are updated. This is useful
+ // for reducing flicker by updating the sizes before a
+ // window is shown, if you know the overall size is correct.
+ void UpdateSize();
+
+ // Is the window split?
+ bool IsSplit() const { return (m_windowTwo != NULL); }
+
+ // Sets the sash size
+ void SetSashSize(int width) { m_sashSize = width; }
+
+ // Sets the border size
+ void SetBorderSize(int WXUNUSED(width)) { }
+
+ // Gets the sash size
+ int GetSashSize() const;
+
+ // Gets the border size
+ int GetBorderSize() const;
+
+ // Set the sash position
+ void SetSashPosition(int position, bool redraw = true);
+
+ // Gets the sash position
+ int GetSashPosition() const { return m_sashPosition; }
+
+ // Set the sash gravity
+ void SetSashGravity(double gravity);
+
+ // Gets the sash gravity
+ double GetSashGravity() const { return m_sashGravity; }
+
+ // If this is zero, we can remove panes by dragging the sash.
+ void SetMinimumPaneSize(int min);
+ int GetMinimumPaneSize() const { return m_minimumPaneSize; }
+
+ // NB: the OnXXX() functions below are for backwards compatibility only,
+ // don't use them in new code but handle the events instead!
+
+ // called when the sash position is about to change, may return a new value
+ // for the sash or -1 to prevent the change from happening at all
+ virtual int OnSashPositionChanging(int newSashPosition);
+
+ // Called when the sash position is about to be changed, return
+ // false from here to prevent the change from taking place.
+ // Repositions sash to minimum position if pane would be too small.
+ // newSashPosition here is always positive or zero.
+ virtual bool OnSashPositionChange(int newSashPosition);
+
+ // If the sash is moved to an extreme position, a subwindow
+ // is removed from the splitter window, and the app is
+ // notified. The app should delete or hide the window.
+ virtual void OnUnsplit(wxWindow *removed);
+
+ // Called when the sash is double-clicked.
+ // The default behaviour is to remove the sash if the
+ // minimum pane size is zero.
+ virtual void OnDoubleClickSash(int x, int y);
+
+////////////////////////////////////////////////////////////////////////////
+// Implementation
+
+ // Paints the border and sash
+ void OnPaint(wxPaintEvent& event);
+
+ // Handles mouse events
+ void OnMouseEvent(wxMouseEvent& ev);
+
+ // Adjusts the panes
+ void OnSize(wxSizeEvent& event);
+
+ // In live mode, resize child windows in idle time
+ void OnInternalIdle();
+
+ // Draws the sash
+ virtual void DrawSash(wxDC& dc);
+
+ // Draws the sash tracker (for whilst moving the sash)
+ virtual void DrawSashTracker(int x, int y);
+
+ // Tests for x, y over sash
+ virtual bool SashHitTest(int x, int y, int tolerance = 5);
+
+ // Resizes subwindows
+ virtual void SizeWindows();
+
+ void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; }
+ bool GetNeedUpdating() const { return m_needUpdating ; }
+
+#ifdef __WXMAC__
+ virtual bool MacClipGrandChildren() const { return true ; }
+#endif
+
+protected:
+ // event handlers
+#if defined(__WXMSW__) || defined(__WXMAC__)
+ void OnSetCursor(wxSetCursorEvent& event);
+#endif // wxMSW
+
+ // send the given event, return false if the event was processed and vetoed
+ // by the user code
+ bool DoSendEvent(wxSplitterEvent& event);
+
+ // common part of all ctors
+ void Init();
+
+ // common part of SplitVertically() and SplitHorizontally()
+ bool DoSplit(wxSplitMode mode,
+ wxWindow *window1, wxWindow *window2,
+ int sashPosition);
+
+ // adjusts sash position with respect to min. pane and window sizes
+ int AdjustSashPosition(int sashPos) const;
+
+ // get either width or height depending on the split mode
+ int GetWindowSize() const;
+
+ // convert the user specified sash position which may be > 0 (as is), < 0
+ // (specifying the size of the right pane) or 0 (use default) to the real
+ // position to be passed to DoSetSashPosition()
+ int ConvertSashPosition(int sashPos) const;
+
+ // set the real sash position, sashPos here must be positive
+ //
+ // returns true if the sash position has been changed, false otherwise
+ bool DoSetSashPosition(int sashPos);
+
+ // set the sash position and send an event about it having been changed
+ void SetSashPositionAndNotify(int sashPos);
+
+ // callbacks executed when we detect that the mouse has entered or left
+ // the sash
+ virtual void OnEnterSash();
+ virtual void OnLeaveSash();
+
+ // set the cursor appropriate for the current split mode
+ void SetResizeCursor();
+
+ // redraw the splitter if its "hotness" changed if necessary
+ void RedrawIfHotSensitive(bool isHot);
+
+ // return the best size of the splitter equal to best sizes of its
+ // subwindows
+ virtual wxSize DoGetBestSize() const;
+
+
+ wxSplitMode m_splitMode;
+ wxWindow* m_windowOne;
+ wxWindow* m_windowTwo;
+ int m_dragMode;
+ int m_oldX;
+ int m_oldY;
+ int m_sashPosition; // Number of pixels from left or top
+ double m_sashGravity;
+ int m_sashSize;
+ wxSize m_lastSize;
+ int m_requestedSashPosition;
+ int m_sashPositionCurrent; // while dragging
+ int m_firstX;
+ int m_firstY;
+ int m_minimumPaneSize;
+ wxCursor m_sashCursorWE;
+ wxCursor m_sashCursorNS;
+ wxPen *m_sashTrackerPen;
+
+ // when in live mode, set this to true to resize children in idle
+ bool m_needUpdating:1;
+ bool m_permitUnsplitAlways:1;
+ bool m_isHot:1;
+ bool m_checkRequestedSashPosition:1;
+
+private:
+ WX_DECLARE_CONTROL_CONTAINER();
+
+ DECLARE_DYNAMIC_CLASS(wxSplitterWindow)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxSplitterWindow)
+};
+
+// ----------------------------------------------------------------------------
+// event class and macros
+// ----------------------------------------------------------------------------
+
+// we reuse the same class for all splitter event types because this is the
+// usual wxWin convention, but the three event types have different kind of
+// data associated with them, so the accessors can be only used if the real
+// event type matches with the one for which the accessors make sense
+class WXDLLEXPORT wxSplitterEvent : public wxNotifyEvent
+{
+public:
+ wxSplitterEvent(wxEventType type = wxEVT_NULL,
+ wxSplitterWindow *splitter = (wxSplitterWindow *)NULL)
+ : wxNotifyEvent(type)
+ {
+ SetEventObject(splitter);
+ if (splitter) m_id = splitter->GetId();
+ }
+
+ // SASH_POS_CHANGED methods
+
+ // setting the sash position to -1 prevents the change from taking place at
+ // all
+ void SetSashPosition(int pos)
+ {
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED
+ || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING);
+
+ m_data.pos = pos;
+ }
+
+ int GetSashPosition() const
+ {
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED
+ || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING);
+
+ return m_data.pos;
+ }
+
+ // UNSPLIT event methods
+ wxWindow *GetWindowBeingRemoved() const
+ {
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_UNSPLIT );
+
+ return m_data.win;
+ }
+
+ // DCLICK event methods
+ int GetX() const
+ {
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_DOUBLECLICKED );
+
+ return m_data.pt.x;
+ }
+
+ int GetY() const
+ {
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_DOUBLECLICKED );
+
+ return m_data.pt.y;
+ }
+
+private:
+ friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow;
+
+ // data for the different types of event
+ union
+ {
+ int pos; // position for SASH_POS_CHANGED event
+ wxWindow *win; // window being removed for UNSPLIT event
+ struct
+ {
+ int x, y;
+ } pt; // position of double click for DCLICK event
+ } m_data;
+
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxSplitterEvent)
+};
+
+typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
+
+#define wxSplitterEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSplitterEventFunction, &func)
+
+#define wx__DECLARE_SPLITTEREVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn))
+
+#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \
+ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGED, id, fn)
+
+#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
+ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGING, id, fn)
+
+#define EVT_SPLITTER_DCLICK(id, fn) \
+ wx__DECLARE_SPLITTEREVT(DOUBLECLICKED, id, fn)
+
+#define EVT_SPLITTER_UNSPLIT(id, fn) \
+ wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn)
+
+#endif // _WX_GENERIC_SPLITTER_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/srchctlg.h b/3rdparty/wxWidgets/include/wx/generic/srchctlg.h
new file mode 100644
index 0000000000..d28856c568
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/srchctlg.h
@@ -0,0 +1,275 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/srchctlg.h
+// Purpose: generic wxSearchCtrl class
+// Author: Vince Harron
+// Created: 2006-02-19
+// RCS-ID: $Id: srchctlg.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: Vince Harron
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_SEARCHCTRL_H_
+#define _WX_GENERIC_SEARCHCTRL_H_
+
+#if wxUSE_SEARCHCTRL
+
+#include "wx/bitmap.h"
+
+class WXDLLIMPEXP_FWD_CORE wxSearchButton;
+class WXDLLIMPEXP_FWD_CORE wxSearchTextCtrl;
+
+// ----------------------------------------------------------------------------
+// wxSearchCtrl is a combination of wxTextCtrl and wxSearchButton
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxSearchCtrl : public wxSearchCtrlBase
+{
+public:
+ // creation
+ // --------
+
+ wxSearchCtrl();
+ wxSearchCtrl(wxWindow *parent, wxWindowID id,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxSearchCtrlNameStr);
+
+ virtual ~wxSearchCtrl();
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxSearchCtrlNameStr);
+
+#if wxUSE_MENUS
+ // get/set search button menu
+ // --------------------------
+ virtual void SetMenu( wxMenu* menu );
+ virtual wxMenu* GetMenu();
+#endif // wxUSE_MENUS
+
+ // get/set search options
+ // ----------------------
+ virtual void ShowSearchButton( bool show );
+ virtual bool IsSearchButtonVisible() const;
+
+ virtual void ShowCancelButton( bool show );
+ virtual bool IsCancelButtonVisible() const;
+
+#if wxABI_VERSION >= 20802
+ // TODO: In 2.9 these should probably be virtual, and declared in the base class...
+ void SetDescriptiveText(const wxString& text);
+ wxString GetDescriptiveText() const;
+#endif
+
+ // accessors
+ // ---------
+
+ virtual wxString GetValue() const;
+ virtual void SetValue(const wxString& value);
+
+ virtual wxString GetRange(long from, long to) const;
+
+ virtual int GetLineLength(long lineNo) const;
+ virtual wxString GetLineText(long lineNo) const;
+ virtual int GetNumberOfLines() const;
+
+ virtual bool IsModified() const;
+ virtual bool IsEditable() const;
+
+ // more readable flag testing methods
+ virtual bool IsSingleLine() const;
+ virtual bool IsMultiLine() const;
+
+ // If the return values from and to are the same, there is no selection.
+ virtual void GetSelection(long* from, long* to) const;
+
+ virtual wxString GetStringSelection() const;
+
+ // operations
+ // ----------
+
+ // editing
+ virtual void Clear();
+ virtual void Replace(long from, long to, const wxString& value);
+ virtual void Remove(long from, long to);
+
+ // load/save the controls contents from/to the file
+ virtual bool LoadFile(const wxString& file);
+ virtual bool SaveFile(const wxString& file = wxEmptyString);
+
+ // sets/clears the dirty flag
+ virtual void MarkDirty();
+ virtual void DiscardEdits();
+
+ // set the max number of characters which may be entered in a single line
+ // text control
+ virtual void SetMaxLength(unsigned long WXUNUSED(len));
+
+ // writing text inserts it at the current position, appending always
+ // inserts it at the end
+ virtual void WriteText(const wxString& text);
+ virtual void AppendText(const wxString& text);
+
+ // insert the character which would have resulted from this key event,
+ // return true if anything has been inserted
+ virtual bool EmulateKeyPress(const wxKeyEvent& event);
+
+ // text control under some platforms supports the text styles: these
+ // methods allow to apply the given text style to the given selection or to
+ // set/get the style which will be used for all appended text
+ virtual bool SetStyle(long start, long end, const wxTextAttr& style);
+ virtual bool GetStyle(long position, wxTextAttr& style);
+ virtual bool SetDefaultStyle(const wxTextAttr& style);
+ virtual const wxTextAttr& GetDefaultStyle() const;
+
+ // translate between the position (which is just an index in the text ctrl
+ // considering all its contents as a single strings) and (x, y) coordinates
+ // which represent column and line.
+ virtual long XYToPosition(long x, long y) const;
+ virtual bool PositionToXY(long pos, long *x, long *y) const;
+
+ virtual void ShowPosition(long pos);
+
+ // find the character at position given in pixels
+ //
+ // NB: pt is in device coords (not adjusted for the client area origin nor
+ // scrolling)
+ virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const;
+ virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
+ wxTextCoord *col,
+ wxTextCoord *row) const;
+
+ // Clipboard operations
+ virtual void Copy();
+ virtual void Cut();
+ virtual void Paste();
+
+ virtual bool CanCopy() const;
+ virtual bool CanCut() const;
+ virtual bool CanPaste() const;
+
+ // Undo/redo
+ virtual void Undo();
+ virtual void Redo();
+
+ virtual bool CanUndo() const;
+ virtual bool CanRedo() const;
+
+ // Insertion point
+ virtual void SetInsertionPoint(long pos);
+ virtual void SetInsertionPointEnd();
+ virtual long GetInsertionPoint() const;
+ virtual wxTextPos GetLastPosition() const;
+
+ virtual void SetSelection(long from, long to);
+ virtual void SelectAll();
+ virtual void SetEditable(bool editable);
+
+#if 0
+
+ // override streambuf method
+#if wxHAS_TEXT_WINDOW_STREAM
+ int overflow(int i);
+#endif // wxHAS_TEXT_WINDOW_STREAM
+
+ // stream-like insertion operators: these are always available, whether we
+ // were, or not, compiled with streambuf support
+ wxTextCtrl& operator<<(const wxString& s);
+ wxTextCtrl& operator<<(int i);
+ wxTextCtrl& operator<<(long i);
+ wxTextCtrl& operator<<(float f);
+ wxTextCtrl& operator<<(double d);
+ wxTextCtrl& operator<<(const wxChar c);
+#endif
+
+ // do the window-specific processing after processing the update event
+ virtual void DoUpdateWindowUI(wxUpdateUIEvent& event);
+
+ virtual bool ShouldInheritColours() const;
+
+ // wxWindow overrides
+ virtual bool SetFont(const wxFont& font);
+
+ // search control generic only
+ void SetSearchBitmap( const wxBitmap& bitmap );
+ void SetCancelBitmap( const wxBitmap& bitmap );
+#if wxUSE_MENUS
+ void SetSearchMenuBitmap( const wxBitmap& bitmap );
+#endif // wxUSE_MENUS
+
+protected:
+ virtual void DoSetValue(const wxString& value, int flags = 0);
+
+ // override the base class virtuals involved into geometry calculations
+ virtual wxSize DoGetBestSize() const;
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+ virtual void LayoutControls(int x, int y, int width, int height);
+
+ virtual void RecalcBitmaps();
+
+ void Init();
+
+ virtual wxBitmap RenderSearchBitmap( int x, int y, bool renderDrop );
+ virtual wxBitmap RenderCancelBitmap( int x, int y );
+
+ virtual void OnSearchButton( wxCommandEvent& event );
+
+ void OnSetFocus( wxFocusEvent& event );
+ void OnSize( wxSizeEvent& event );
+
+ bool HasMenu() const
+ {
+#if wxUSE_MENUS
+ return m_menu != NULL;
+#else // !wxUSE_MENUS
+ return false;
+#endif // wxUSE_MENUS/!wxUSE_MENUS
+ }
+
+private:
+ friend class wxSearchButton;
+
+#if wxUSE_MENUS
+ void PopupSearchMenu();
+#endif // wxUSE_MENUS
+
+ // the subcontrols
+ wxSearchTextCtrl *m_text;
+ wxSearchButton *m_searchButton;
+ wxSearchButton *m_cancelButton;
+#if wxUSE_MENUS
+ wxMenu *m_menu;
+#endif // wxUSE_MENUS
+
+ bool m_searchButtonVisible;
+ bool m_cancelButtonVisible;
+
+ bool m_searchBitmapUser;
+ bool m_cancelBitmapUser;
+#if wxUSE_MENUS
+ bool m_searchMenuBitmapUser;
+#endif // wxUSE_MENUS
+
+ wxBitmap m_searchBitmap;
+ wxBitmap m_cancelBitmap;
+#if wxUSE_MENUS
+ wxBitmap m_searchMenuBitmap;
+#endif // wxUSE_MENUS
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxSearchCtrl)
+
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // wxUSE_SEARCHCTRL
+
+#endif // _WX_GENERIC_SEARCHCTRL_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/statline.h b/3rdparty/wxWidgets/include/wx/generic/statline.h
new file mode 100644
index 0000000000..114ec35929
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/statline.h
@@ -0,0 +1,62 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: generic/statline.h
+// Purpose: a generic wxStaticLine class
+// Author: Vadim Zeitlin
+// Created: 28.06.99
+// Version: $Id: statline.h 43874 2006-12-09 14:52:59Z VZ $
+// Copyright: (c) 1998 Vadim Zeitlin
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_STATLINE_H_
+#define _WX_GENERIC_STATLINE_H_
+
+class wxStaticBox;
+
+// ----------------------------------------------------------------------------
+// wxStaticLine
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxStaticLine : public wxStaticLineBase
+{
+ DECLARE_DYNAMIC_CLASS(wxStaticLine)
+
+public:
+ // constructors and pseudo-constructors
+ wxStaticLine() { m_statbox = NULL; }
+
+ wxStaticLine( wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long style = wxLI_HORIZONTAL,
+ const wxString &name = wxStaticLineNameStr )
+ {
+ Create(parent, id, pos, size, style, name);
+ }
+
+ virtual ~wxStaticLine();
+
+ bool Create( wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long style = wxLI_HORIZONTAL,
+ const wxString &name = wxStaticLineNameStr );
+
+ // it's necessary to override this wxWindow function because we
+ // will want to return the main widget for m_statbox
+ //
+ WXWidget GetMainWidget() const;
+
+ // override wxWindow methods to make things work
+ virtual void DoSetSize(int x, int y, int width, int height,
+ int sizeFlags = wxSIZE_AUTO);
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+protected:
+ // we implement the static line using a static box
+ wxStaticBox *m_statbox;
+};
+
+#endif // _WX_GENERIC_STATLINE_H_
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/statusbr.h b/3rdparty/wxWidgets/include/wx/generic/statusbr.h
new file mode 100644
index 0000000000..4852acde57
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/statusbr.h
@@ -0,0 +1,107 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/statusbr.h
+// Purpose: wxStatusBarGeneric class
+// Author: Julian Smart
+// Modified by: VZ at 05.02.00 to derive from wxStatusBarBase
+// Created: 01/02/97
+// RCS-ID: $Id: statusbr.h 41200 2006-09-13 19:10:31Z ABX $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_STATUSBR_H_
+#define _WX_GENERIC_STATUSBR_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_STATUSBAR
+
+#include "wx/pen.h"
+#include "wx/arrstr.h"
+
+class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
+{
+public:
+ wxStatusBarGeneric() { Init(); }
+ wxStatusBarGeneric(wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ long style = wxST_SIZEGRIP,
+ const wxString& name = wxStatusBarNameStr)
+ {
+ Init();
+
+ Create(parent, winid, style, name);
+ }
+
+ virtual ~wxStatusBarGeneric();
+
+ bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
+ long style = wxST_SIZEGRIP,
+ const wxString& name = wxStatusBarNameStr);
+
+ // Create status line
+ virtual void SetFieldsCount(int number = 1,
+ const int *widths = (const int *) NULL);
+
+ // Set status line text
+ virtual void SetStatusText(const wxString& text, int number = 0);
+ virtual wxString GetStatusText(int number = 0) const;
+
+ // Set status line widths
+ virtual void SetStatusWidths(int n, const int widths_field[]);
+
+ // Get the position and size of the field's internal bounding rectangle
+ virtual bool GetFieldRect(int i, wxRect& rect) const;
+
+ // sets the minimal vertical size of the status bar
+ virtual void SetMinHeight(int height);
+
+ virtual int GetBorderX() const { return m_borderX; }
+ virtual int GetBorderY() const { return m_borderY; }
+
+ ////////////////////////////////////////////////////////////////////////
+ // Implementation
+
+ virtual void DrawFieldText(wxDC& dc, int i);
+ virtual void DrawField(wxDC& dc, int i);
+
+ void SetBorderX(int x);
+ void SetBorderY(int y);
+
+ void OnPaint(wxPaintEvent& event);
+
+ void OnLeftDown(wxMouseEvent& event);
+ void OnRightDown(wxMouseEvent& event);
+
+ virtual void InitColours();
+
+ // Responds to colour changes
+ void OnSysColourChanged(wxSysColourChangedEvent& event);
+
+protected:
+ // common part of all ctors
+ void Init();
+
+ wxArrayString m_statusStrings;
+
+ // the last known width of the client rect (used to rebuild cache)
+ int m_lastClientWidth;
+ // the widths of the status bar panes in pixels
+ wxArrayInt m_widthsAbs;
+
+ int m_borderX;
+ int m_borderY;
+ wxPen m_mediumShadowPen;
+ wxPen m_hilightPen;
+
+ virtual wxSize DoGetBestSize() const;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric)
+};
+
+#endif // wxUSE_STATUSBAR
+
+#endif
+ // _WX_GENERIC_STATUSBR_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/tabg.h b/3rdparty/wxWidgets/include/wx/generic/tabg.h
new file mode 100644
index 0000000000..bdac54166a
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/tabg.h
@@ -0,0 +1,363 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: tabg.h
+// Purpose: Generic tabbed dialogs
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: tabg.h 41020 2006-09-05 20:47:48Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __TABGH_G__
+#define __TABGH_G__
+
+#define WXTAB_VERSION 1.1
+
+#include "wx/hashmap.h"
+#include "wx/string.h"
+#include "wx/dialog.h"
+#include "wx/panel.h"
+#include "wx/list.h"
+
+class WXDLLEXPORT wxTabView;
+
+/*
+ * A wxTabControl is the internal and visual representation
+ * of the tab.
+ */
+
+class WXDLLEXPORT wxTabControl: public wxObject
+{
+DECLARE_DYNAMIC_CLASS(wxTabControl)
+public:
+ wxTabControl(wxTabView *v = (wxTabView *) NULL);
+ virtual ~wxTabControl(void);
+
+ virtual void OnDraw(wxDC& dc, bool lastInRow);
+ void SetLabel(const wxString& str) { m_controlLabel = str; }
+ wxString GetLabel(void) const { return m_controlLabel; }
+
+ void SetFont(const wxFont& f) { m_labelFont = f; }
+ wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; }
+
+ void SetSelected(bool sel) { m_isSelected = sel; }
+ bool IsSelected(void) const { return m_isSelected; }
+
+ void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; }
+ void SetSize(int x, int y) { m_width = x; m_height = y; }
+
+ void SetRowPosition(int r) { m_rowPosition = r; }
+ int GetRowPosition() const { return m_rowPosition; }
+ void SetColPosition(int c) { m_colPosition = c; }
+ int GetColPosition() const { return m_colPosition; }
+
+ int GetX(void) const { return m_offsetX; }
+ int GetY(void) const { return m_offsetY; }
+ int GetWidth(void) const { return m_width; }
+ int GetHeight(void) const { return m_height; }
+
+ int GetId(void) const { return m_id; }
+ void SetId(int i) { m_id = i; }
+
+ virtual bool HitTest(int x, int y) const ;
+
+protected:
+ wxTabView* m_view;
+ wxString m_controlLabel;
+ bool m_isSelected;
+ wxFont m_labelFont;
+ int m_offsetX; // Offsets from top-left of tab view area (the area below the tabs)
+ int m_offsetY;
+ int m_width;
+ int m_height;
+ int m_id;
+ int m_rowPosition; // Position in row from 0
+ int m_colPosition; // Position in col from 0
+};
+
+/*
+ * Each wxTabLayer is a list of tabs. E.g. there
+ * are 3 layers in the MS Word Options dialog.
+ */
+
+class WXDLLEXPORT wxTabLayer: public wxList
+{
+};
+
+/*
+ * The wxTabView controls and draws the tabbed object
+ */
+
+WX_DECLARE_LIST(wxTabLayer, wxTabLayerList);
+
+#define wxTAB_STYLE_DRAW_BOX 1 // Draws 3D boxes round tab layers
+#define wxTAB_STYLE_COLOUR_INTERIOR 2 // Colours interior of tabs, otherwise draws outline
+
+class WXDLLEXPORT wxTabView: public wxObject
+{
+DECLARE_DYNAMIC_CLASS(wxTabView)
+public:
+ wxTabView(long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
+ virtual ~wxTabView();
+
+ inline int GetNumberOfLayers() const { return m_layers.GetCount(); }
+#if WXWIN_COMPATIBILITY_2_4
+ inline wxList& GetLayers() { return *(wxList *)&m_layers; }
+#else
+ inline wxTabLayerList& GetLayers() { return m_layers; }
+#endif
+
+ inline void SetWindow(wxWindow* wnd) { m_window = wnd; }
+ inline wxWindow* GetWindow(void) const { return m_window; }
+
+ // Automatically positions tabs
+ wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = (wxTabControl *) NULL);
+
+ // Remove the tab without deleting the window
+ bool RemoveTab(int id);
+
+ void ClearTabs(bool deleteTabs = true);
+
+ bool SetTabText(int id, const wxString& label);
+ wxString GetTabText(int id) const;
+
+ // Layout tabs (optional, e.g. if resizing window)
+ void LayoutTabs();
+
+ // Draw all tabs
+ virtual void Draw(wxDC& dc);
+
+ // Process mouse event, return false if we didn't process it
+ virtual bool OnEvent(wxMouseEvent& event);
+
+ // Called when a tab is activated
+ virtual void OnTabActivate(int activateId, int deactivateId);
+ // Allows vetoing
+ virtual bool OnTabPreActivate(int WXUNUSED(activateId), int WXUNUSED(deactivateId) ) { return true; };
+
+ // Allows use of application-supplied wxTabControl classes.
+ virtual wxTabControl *OnCreateTabControl(void) { return new wxTabControl(this); }
+
+ void SetHighlightColour(const wxColour& col);
+ void SetShadowColour(const wxColour& col);
+ void SetBackgroundColour(const wxColour& col);
+ inline void SetTextColour(const wxColour& col) { m_textColour = col; }
+
+ inline wxColour GetHighlightColour(void) const { return m_highlightColour; }
+ inline wxColour GetShadowColour(void) const { return m_shadowColour; }
+ inline wxColour GetBackgroundColour(void) const { return m_backgroundColour; }
+ inline wxColour GetTextColour(void) const { return m_textColour; }
+ inline const wxPen *GetHighlightPen(void) const { return m_highlightPen; }
+ inline const wxPen *GetShadowPen(void) const { return m_shadowPen; }
+ inline const wxPen *GetBackgroundPen(void) const { return m_backgroundPen; }
+ inline const wxBrush *GetBackgroundBrush(void) const { return m_backgroundBrush; }
+
+ inline void SetViewRect(const wxRect& rect) { m_tabViewRect = rect; }
+ inline wxRect GetViewRect(void) const { return m_tabViewRect; }
+
+ // Calculate tab width to fit to view, and optionally adjust the view
+ // to fit the tabs exactly.
+ int CalculateTabWidth(int noTabs, bool adjustView = false);
+
+ inline void SetTabStyle(long style) { m_tabStyle = style; }
+ inline long GetTabStyle(void) const { return m_tabStyle; }
+
+ inline void SetTabSize(int w, int h) { m_tabWidth = w; m_tabHeight = h; }
+ inline int GetTabWidth(void) const { return m_tabWidth; }
+ inline int GetTabHeight(void) const { return m_tabHeight; }
+ inline void SetTabSelectionHeight(int h) { m_tabSelectionHeight = h; }
+ inline int GetTabSelectionHeight(void) const { return m_tabSelectionHeight; }
+
+ // Returns the total height of the tabs component -- this may be several
+ // times the height of a tab, if there are several tab layers (rows).
+ int GetTotalTabHeight();
+
+ inline int GetTopMargin(void) const { return m_topMargin; }
+ inline void SetTopMargin(int margin) { m_topMargin = margin; }
+
+ void SetTabSelection(int sel, bool activateTool = true);
+ inline int GetTabSelection() const { return m_tabSelection; }
+
+ // Find tab control for id
+ wxTabControl *FindTabControlForId(int id) const ;
+
+ // Find tab control for layer, position (starting from zero)
+ wxTabControl *FindTabControlForPosition(int layer, int position) const ;
+
+ inline int GetHorizontalTabOffset() const { return m_tabHorizontalOffset; }
+ inline int GetHorizontalTabSpacing() const { return m_tabHorizontalSpacing; }
+ inline void SetHorizontalTabOffset(int sp) { m_tabHorizontalOffset = sp; }
+ inline void SetHorizontalTabSpacing(int sp) { m_tabHorizontalSpacing = sp; }
+
+ inline void SetVerticalTabTextSpacing(int s) { m_tabVerticalTextSpacing = s; }
+ inline int GetVerticalTabTextSpacing() const { return m_tabVerticalTextSpacing; }
+
+ inline wxFont *GetTabFont() const { return (wxFont*) & m_tabFont; }
+ inline void SetTabFont(const wxFont& f) { m_tabFont = f; }
+
+ inline wxFont *GetSelectedTabFont() const { return (wxFont*) & m_tabSelectedFont; }
+ inline void SetSelectedTabFont(const wxFont& f) { m_tabSelectedFont = f; }
+ // Find the node and the column at which this control is positioned.
+ wxList::compatibility_iterator FindTabNodeAndColumn(wxTabControl *control, int *col) const ;
+
+ // Do the necessary to change to this tab
+ virtual bool ChangeTab(wxTabControl *control);
+
+ // Move the selected tab to the bottom layer, if necessary,
+ // without calling app activation code
+ bool MoveSelectionTab(wxTabControl *control);
+
+ inline int GetNumberOfTabs() const { return m_noTabs; }
+
+protected:
+ // List of layers, from front to back.
+ wxTabLayerList m_layers;
+
+ // Selected tab
+ int m_tabSelection;
+
+ // Usual tab height
+ int m_tabHeight;
+
+ // The height of the selected tab
+ int m_tabSelectionHeight;
+
+ // Usual tab width
+ int m_tabWidth;
+
+ // Space between tabs
+ int m_tabHorizontalSpacing;
+
+ // Space between top of normal tab and text
+ int m_tabVerticalTextSpacing;
+
+ // Horizontal offset of each tab row above the first
+ int m_tabHorizontalOffset;
+
+ // The distance between the bottom of the first tab row
+ // and the top of the client area (i.e. the margin)
+ int m_topMargin;
+
+ // The position and size of the view above which the tabs are placed.
+ // I.e., the internal client area of the sheet.
+ wxRect m_tabViewRect;
+
+ // Bitlist of styles
+ long m_tabStyle;
+
+ // Colours
+ wxColour m_highlightColour;
+ wxColour m_shadowColour;
+ wxColour m_backgroundColour;
+ wxColour m_textColour;
+
+ // Pen and brush cache
+ const wxPen* m_highlightPen;
+ const wxPen* m_shadowPen;
+ const wxPen* m_backgroundPen;
+ const wxBrush* m_backgroundBrush;
+
+ wxFont m_tabFont;
+ wxFont m_tabSelectedFont;
+
+ int m_noTabs;
+
+ wxWindow* m_window;
+};
+
+/*
+ * A dialog box class that is tab-friendly
+ */
+
+class WXDLLEXPORT wxTabbedDialog : public wxDialog
+{
+ DECLARE_DYNAMIC_CLASS(wxTabbedDialog)
+
+public:
+ wxTabbedDialog(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long windowStyle = wxDEFAULT_DIALOG_STYLE,
+ const wxString& name = wxDialogNameStr);
+ virtual ~wxTabbedDialog();
+
+ wxTabView *GetTabView() const { return m_tabView; }
+ void SetTabView(wxTabView *v) { m_tabView = v; }
+
+ void OnCloseWindow(wxCloseEvent& event);
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnPaint(wxPaintEvent& event);
+
+protected:
+ wxTabView* m_tabView;
+
+private:
+ DECLARE_EVENT_TABLE()
+};
+
+/*
+ * A panel class that is tab-friendly
+ */
+
+class WXDLLEXPORT wxTabbedPanel : public wxPanel
+{
+ DECLARE_DYNAMIC_CLASS(wxTabbedPanel)
+
+public:
+ wxTabbedPanel(wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long windowStyle = 0,
+ const wxString& name = wxPanelNameStr);
+ virtual ~wxTabbedPanel();
+
+ wxTabView *GetTabView() const { return m_tabView; }
+ void SetTabView(wxTabView *v) { m_tabView = v; }
+
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnPaint(wxPaintEvent& event);
+
+protected:
+ wxTabView* m_tabView;
+
+private:
+ DECLARE_EVENT_TABLE()
+};
+
+WX_DECLARE_HASH_MAP(int, wxWindow*, wxIntegerHash, wxIntegerEqual,
+ wxIntToWindowHashMap);
+
+class WXDLLEXPORT wxPanelTabView : public wxTabView
+{
+ DECLARE_DYNAMIC_CLASS(wxPanelTabView)
+
+public:
+ wxPanelTabView(wxPanel *pan, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
+ virtual ~wxPanelTabView(void);
+
+ // Called when a tab is activated
+ virtual void OnTabActivate(int activateId, int deactivateId);
+
+ // Specific to this class
+ void AddTabWindow(int id, wxWindow *window);
+ wxWindow *GetTabWindow(int id) const ;
+ void ClearWindows(bool deleteWindows = true);
+ wxWindow *GetCurrentWindow() const { return m_currentWindow; }
+
+ void ShowWindowForTab(int id);
+ // wxList& GetWindows() const { return (wxList&) m_tabWindows; }
+
+protected:
+ // List of panels, one for each tab. Indexed
+ // by tab ID.
+ wxIntToWindowHashMap m_tabWindows;
+ wxWindow* m_currentWindow;
+ wxPanel* m_panel;
+};
+
+#endif
+
diff --git a/3rdparty/wxWidgets/include/wx/generic/textdlgg.h b/3rdparty/wxWidgets/include/wx/generic/textdlgg.h
new file mode 100644
index 0000000000..f7809e58dd
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/textdlgg.h
@@ -0,0 +1,113 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: textdlgg.h
+// Purpose: wxTextEntryDialog class
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: textdlgg.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __TEXTDLGH_G__
+#define __TEXTDLGH_G__
+
+#include "wx/defs.h"
+
+#if wxUSE_TEXTDLG
+
+#include "wx/dialog.h"
+
+#if wxUSE_VALIDATORS
+#include "wx/valtext.h"
+#endif
+
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxGetTextFromUserPromptStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxGetPasswordFromUserPromptStr[];
+
+#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY)
+
+// ----------------------------------------------------------------------------
+// wxTextEntryDialog: a dialog with text control, [ok] and [cancel] buttons
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTextEntryDialog : public wxDialog
+{
+public:
+ wxTextEntryDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption = wxGetTextFromUserPromptStr,
+ const wxString& value = wxEmptyString,
+ long style = wxTextEntryDialogStyle,
+ const wxPoint& pos = wxDefaultPosition);
+
+ void SetValue(const wxString& val);
+ wxString GetValue() const { return m_value; }
+
+#if wxUSE_VALIDATORS
+ void SetTextValidator( const wxTextValidator& validator );
+ void SetTextValidator( long style = wxFILTER_NONE );
+ wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); }
+#endif
+ // wxUSE_VALIDATORS
+
+ // implementation only
+ void OnOK(wxCommandEvent& event);
+
+protected:
+ wxTextCtrl *m_textctrl;
+ wxString m_value;
+ long m_dialogStyle;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxTextEntryDialog)
+ DECLARE_NO_COPY_CLASS(wxTextEntryDialog)
+};
+
+// ----------------------------------------------------------------------------
+// wxPasswordEntryDialog: dialog with password control, [ok] and [cancel]
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPasswordEntryDialog : public wxTextEntryDialog
+{
+public:
+ wxPasswordEntryDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption = wxGetPasswordFromUserPromptStr,
+ const wxString& value = wxEmptyString,
+ long style = wxTextEntryDialogStyle,
+ const wxPoint& pos = wxDefaultPosition);
+private:
+ DECLARE_DYNAMIC_CLASS(wxPasswordEntryDialog)
+ DECLARE_NO_COPY_CLASS(wxPasswordEntryDialog)
+};
+
+// ----------------------------------------------------------------------------
+// function to get a string from user
+// ----------------------------------------------------------------------------
+
+wxString WXDLLEXPORT
+wxGetTextFromUser(const wxString& message,
+ const wxString& caption = wxGetTextFromUserPromptStr,
+ const wxString& default_value = wxEmptyString,
+ wxWindow *parent = (wxWindow *) NULL,
+ wxCoord x = wxDefaultCoord,
+ wxCoord y = wxDefaultCoord,
+ bool centre = true);
+
+wxString WXDLLEXPORT
+wxGetPasswordFromUser(const wxString& message,
+ const wxString& caption = wxGetPasswordFromUserPromptStr,
+ const wxString& default_value = wxEmptyString,
+ wxWindow *parent = (wxWindow *) NULL,
+ wxCoord x = wxDefaultCoord,
+ wxCoord y = wxDefaultCoord,
+ bool centre = true);
+
+#endif
+ // wxUSE_TEXTDLG
+#endif
+ // __TEXTDLGH_G__
diff --git a/3rdparty/wxWidgets/include/wx/generic/timer.h b/3rdparty/wxWidgets/include/wx/generic/timer.h
new file mode 100644
index 0000000000..0f52c1b4a1
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/timer.h
@@ -0,0 +1,45 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: timer.h
+// Purpose: Generic implementation of wxTimer class
+// Author: Vaclav Slavik
+// Id: $Id: timer.h 41020 2006-09-05 20:47:48Z VZ $
+// Copyright: (c) Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef __WX_TIMER_H__
+#define __WX_TIMER_H__
+
+//-----------------------------------------------------------------------------
+// wxTimer
+//-----------------------------------------------------------------------------
+
+class wxTimerDesc;
+
+class WXDLLEXPORT wxTimer : public wxTimerBase
+{
+public:
+ wxTimer() { Init(); }
+ wxTimer(wxEvtHandler *owner, int timerid = -1) : wxTimerBase(owner, timerid)
+ { Init(); }
+ virtual ~wxTimer();
+
+ virtual bool Start(int millisecs = -1, bool oneShot = false);
+ virtual void Stop();
+
+ virtual bool IsRunning() const;
+
+ // implementation
+ static void NotifyTimers();
+
+protected:
+ void Init();
+
+private:
+ wxTimerDesc *m_desc;
+
+ DECLARE_ABSTRACT_CLASS(wxTimer)
+};
+
+#endif // __WX_TIMER_H__
diff --git a/3rdparty/wxWidgets/include/wx/generic/treectlg.h b/3rdparty/wxWidgets/include/wx/generic/treectlg.h
new file mode 100644
index 0000000000..a555716f63
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/treectlg.h
@@ -0,0 +1,383 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/treectlg.h
+// Purpose: wxTreeCtrl class
+// Author: Robert Roebling
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: treectlg.h 49804 2007-11-10 01:09:42Z VZ $
+// Copyright: (c) 1997,1998 Robert Roebling
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _GENERIC_TREECTRL_H_
+#define _GENERIC_TREECTRL_H_
+
+#if wxUSE_TREECTRL
+
+#include "wx/scrolwin.h"
+#include "wx/pen.h"
+
+// -----------------------------------------------------------------------------
+// forward declaration
+// -----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem;
+
+class WXDLLIMPEXP_FWD_CORE wxTreeItemData;
+
+class WXDLLIMPEXP_FWD_CORE wxTreeRenameTimer;
+class WXDLLIMPEXP_FWD_CORE wxTreeFindTimer;
+class WXDLLIMPEXP_FWD_CORE wxTreeTextCtrl;
+class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
+
+// -----------------------------------------------------------------------------
+// wxGenericTreeCtrl - the tree control
+// -----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericTreeCtrl : public wxTreeCtrlBase,
+ public wxScrollHelper
+{
+public:
+ // creation
+ // --------
+
+ wxGenericTreeCtrl() : wxTreeCtrlBase(), wxScrollHelper(this) { Init(); }
+
+ wxGenericTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTR_DEFAULT_STYLE,
+ const wxValidator &validator = wxDefaultValidator,
+ const wxString& name = wxTreeCtrlNameStr)
+ : wxTreeCtrlBase(),
+ wxScrollHelper(this)
+ {
+ Init();
+ Create(parent, id, pos, size, style, validator, name);
+ }
+
+ virtual ~wxGenericTreeCtrl();
+
+ bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTR_DEFAULT_STYLE,
+ const wxValidator &validator = wxDefaultValidator,
+ const wxString& name = wxTreeCtrlNameStr);
+
+
+ // implement base class pure virtuals
+ // ----------------------------------
+
+ virtual unsigned int GetCount() const;
+
+ virtual unsigned int GetIndent() const { return m_indent; }
+ virtual void SetIndent(unsigned int indent);
+
+
+ virtual void SetImageList(wxImageList *imageList);
+ virtual void SetStateImageList(wxImageList *imageList);
+
+ virtual wxString GetItemText(const wxTreeItemId& item) const;
+ virtual int GetItemImage(const wxTreeItemId& item,
+ wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
+ virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
+ virtual wxColour GetItemTextColour(const wxTreeItemId& item) const;
+ virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
+ virtual wxFont GetItemFont(const wxTreeItemId& item) const;
+
+ virtual void SetItemText(const wxTreeItemId& item, const wxString& text);
+ virtual void SetItemImage(const wxTreeItemId& item,
+ int image,
+ wxTreeItemIcon which = wxTreeItemIcon_Normal);
+ virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
+
+ virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
+ virtual void SetItemBold(const wxTreeItemId& item, bool bold = true);
+ virtual void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true);
+ virtual void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
+ virtual void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
+ virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font);
+
+ virtual bool IsVisible(const wxTreeItemId& item) const;
+ virtual bool ItemHasChildren(const wxTreeItemId& item) const;
+ virtual bool IsExpanded(const wxTreeItemId& item) const;
+ virtual bool IsSelected(const wxTreeItemId& item) const;
+ virtual bool IsBold(const wxTreeItemId& item) const;
+
+ virtual size_t GetChildrenCount(const wxTreeItemId& item,
+ bool recursively = true) const;
+
+ // navigation
+ // ----------
+
+ virtual wxTreeItemId GetRootItem() const { return m_anchor; }
+ virtual wxTreeItemId GetSelection() const { return m_current; }
+ virtual size_t GetSelections(wxArrayTreeItemIds&) const;
+
+ virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item,
+ wxTreeItemIdValue& cookie) const;
+ virtual wxTreeItemId GetNextChild(const wxTreeItemId& item,
+ wxTreeItemIdValue& cookie) const;
+ virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
+
+ virtual wxTreeItemId GetFirstVisibleItem() const;
+ virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
+ virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
+
+
+ // operations
+ // ----------
+
+ virtual wxTreeItemId AddRoot(const wxString& text,
+ int image = -1, int selectedImage = -1,
+ wxTreeItemData *data = NULL);
+
+ virtual void Delete(const wxTreeItemId& item);
+ virtual void DeleteChildren(const wxTreeItemId& item);
+ virtual void DeleteAllItems();
+
+ virtual void Expand(const wxTreeItemId& item);
+ virtual void Collapse(const wxTreeItemId& item);
+ virtual void CollapseAndReset(const wxTreeItemId& item);
+ virtual void Toggle(const wxTreeItemId& item);
+
+ virtual void Unselect();
+ virtual void UnselectAll();
+ virtual void SelectItem(const wxTreeItemId& item, bool select = true);
+
+ virtual void EnsureVisible(const wxTreeItemId& item);
+ virtual void ScrollTo(const wxTreeItemId& item);
+
+ virtual wxTextCtrl *EditLabel(const wxTreeItemId& item,
+ wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl));
+ virtual wxTextCtrl *GetEditControl() const;
+ virtual void EndEditLabel(const wxTreeItemId& item,
+ bool discardChanges = false);
+
+ virtual void SortChildren(const wxTreeItemId& item);
+
+ // items geometry
+ // --------------
+
+ virtual bool GetBoundingRect(const wxTreeItemId& item,
+ wxRect& rect,
+ bool textOnly = false) const;
+
+
+ // this version specific methods
+ // -----------------------------
+
+ wxImageList *GetButtonsImageList() const { return m_imageListButtons; }
+ void SetButtonsImageList(wxImageList *imageList);
+ void AssignButtonsImageList(wxImageList *imageList);
+
+ void SetDropEffectAboveItem( bool above = false ) { m_dropEffectAboveItem = above; }
+ bool GetDropEffectAboveItem() const { return m_dropEffectAboveItem; }
+
+ wxTreeItemId GetNext(const wxTreeItemId& item) const;
+
+#if WXWIN_COMPATIBILITY_2_6
+ // use EditLabel() instead
+ void Edit( const wxTreeItemId& item ) { EditLabel(item); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#if WXWIN_COMPATIBILITY_2_4
+ // deprecated functions: use Set/GetItemImage directly
+ wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& item) const );
+ wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& item, int image) );
+
+ // use the versions taking wxTreeItemIdValue cookies (note that
+ // GetNextChild() is not inside wxDEPRECATED on purpose, as otherwise we
+ // get twice as many warnings without any added benefit: it is always used
+ // with GetFirstChild() anyhow)
+ wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item,
+ long& cookie) const );
+ wxTreeItemId GetNextChild(const wxTreeItemId& item,
+ long& cookie) const;
+#endif // WXWIN_COMPATIBILITY_2_4
+
+ // implementation only from now on
+
+ // overridden base class virtuals
+ virtual bool SetBackgroundColour(const wxColour& colour);
+ virtual bool SetForegroundColour(const wxColour& colour);
+
+ virtual void Freeze();
+ virtual void Thaw();
+ virtual void Refresh(bool eraseBackground = true, const wxRect *rect = NULL);
+
+ virtual bool SetFont( const wxFont &font );
+ virtual void SetWindowStyle(const long styles);
+
+ // callbacks
+ void OnPaint( wxPaintEvent &event );
+ void OnSetFocus( wxFocusEvent &event );
+ void OnKillFocus( wxFocusEvent &event );
+ void OnChar( wxKeyEvent &event );
+ void OnMouse( wxMouseEvent &event );
+ void OnGetToolTip( wxTreeEvent &event );
+ void OnSize( wxSizeEvent &event );
+ void OnInternalIdle( );
+
+ virtual wxVisualAttributes GetDefaultAttributes() const
+ {
+ return GetClassDefaultAttributes(GetWindowVariant());
+ }
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ // implementation helpers
+ void AdjustMyScrollbars();
+
+ WX_FORWARD_TO_SCROLL_HELPER()
+
+protected:
+ friend class wxGenericTreeItem;
+ friend class wxTreeRenameTimer;
+ friend class wxTreeFindTimer;
+ friend class wxTreeTextCtrl;
+
+ wxFont m_normalFont;
+ wxFont m_boldFont;
+
+ wxGenericTreeItem *m_anchor;
+ wxGenericTreeItem *m_current,
+ *m_key_current,
+ // A hint to select a parent item after deleting a child
+ *m_select_me;
+ unsigned short m_indent;
+ int m_lineHeight;
+ wxPen m_dottedPen;
+ wxBrush *m_hilightBrush,
+ *m_hilightUnfocusedBrush;
+ bool m_hasFocus;
+ bool m_dirty;
+ bool m_ownsImageListButtons;
+ bool m_isDragging; // true between BEGIN/END drag events
+ bool m_lastOnSame; // last click on the same item as prev
+ wxImageList *m_imageListButtons;
+
+ int m_freezeCount;
+ int m_dragCount;
+ wxPoint m_dragStart;
+ wxGenericTreeItem *m_dropTarget;
+ wxCursor m_oldCursor; // cursor is changed while dragging
+ wxGenericTreeItem *m_oldSelection;
+ wxGenericTreeItem *m_underMouse; // for visual effects
+ wxTreeTextCtrl *m_textCtrl;
+
+ wxTimer *m_renameTimer;
+
+ // incremental search data
+ wxString m_findPrefix;
+ wxTimer *m_findTimer;
+
+ bool m_dropEffectAboveItem;
+
+ // the common part of all ctors
+ void Init();
+
+ // misc helpers
+ void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted);
+
+ void DrawBorder(const wxTreeItemId& item);
+ void DrawLine(const wxTreeItemId& item, bool below);
+ void DrawDropEffect(wxGenericTreeItem *item);
+
+ void DoSelectItem(const wxTreeItemId& id,
+ bool unselect_others = true,
+ bool extended_select = false);
+
+ virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
+ size_t previous,
+ const wxString& text,
+ int image,
+ int selectedImage,
+ wxTreeItemData *data);
+ virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent,
+ const wxTreeItemId& idPrevious,
+ const wxString& text,
+ int image = -1, int selImage = -1,
+ wxTreeItemData *data = NULL);
+ virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const;
+
+ // called by wxTextTreeCtrl when it marks itself for deletion
+ void ResetTextControl();
+
+ // find the first item starting with the given prefix after the given item
+ wxTreeItemId FindItem(const wxTreeItemId& id, const wxString& prefix) const;
+
+ bool HasButtons() const { return HasFlag(wxTR_HAS_BUTTONS); }
+
+ void CalculateLineHeight();
+ int GetLineHeight(wxGenericTreeItem *item) const;
+ void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y );
+ void PaintItem( wxGenericTreeItem *item, wxDC& dc);
+
+ void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y );
+ void CalculatePositions();
+ void CalculateSize( wxGenericTreeItem *item, wxDC &dc );
+
+ void RefreshSubtree( wxGenericTreeItem *item );
+ void RefreshLine( wxGenericTreeItem *item );
+
+ // redraw all selected items
+ void RefreshSelected();
+
+ // RefreshSelected() recursive helper
+ void RefreshSelectedUnder(wxGenericTreeItem *item);
+
+ void OnRenameTimer();
+ bool OnRenameAccept(wxGenericTreeItem *item, const wxString& value);
+ void OnRenameCancelled(wxGenericTreeItem *item);
+
+ void FillArray(wxGenericTreeItem*, wxArrayTreeItemIds&) const;
+ void SelectItemRange( wxGenericTreeItem *item1, wxGenericTreeItem *item2 );
+ bool TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select);
+ bool TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select);
+ void UnselectAllChildren( wxGenericTreeItem *item );
+ void ChildrenClosing(wxGenericTreeItem* item);
+
+ void DoDirtyProcessing();
+
+ virtual wxSize DoGetBestSize() const;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl)
+ DECLARE_NO_COPY_CLASS(wxGenericTreeCtrl)
+};
+
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
+/*
+ * wxTreeCtrl has to be a real class or we have problems with
+ * the run-time information.
+ */
+
+class WXDLLEXPORT wxTreeCtrl: public wxGenericTreeCtrl
+{
+ DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
+
+public:
+ wxTreeCtrl() {}
+
+ wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTR_DEFAULT_STYLE,
+ const wxValidator &validator = wxDefaultValidator,
+ const wxString& name = wxTreeCtrlNameStr)
+ : wxGenericTreeCtrl(parent, id, pos, size, style, validator, name)
+ {
+ }
+};
+#endif // !__WXMSW__ || __WXUNIVERSAL__
+
+#endif // wxUSE_TREECTRL
+
+#endif // _GENERIC_TREECTRL_H_
diff --git a/3rdparty/wxWidgets/include/wx/generic/wizard.h b/3rdparty/wxWidgets/include/wx/generic/wizard.h
new file mode 100644
index 0000000000..5d4d9bd60c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/generic/wizard.h
@@ -0,0 +1,142 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/wizard.h
+// Purpose: declaration of generic wxWizard class
+// Author: Vadim Zeitlin
+// Modified by: Robert Vazan (sizers)
+// Created: 28.09.99
+// RCS-ID: $Id: wizard.h 49563 2007-10-31 20:46:21Z VZ $
+// Copyright: (c) 1999 Vadim Zeitlin
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_WIZARD_H_
+#define _WX_GENERIC_WIZARD_H_
+
+// ----------------------------------------------------------------------------
+// wxWizard
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxStaticBitmap;
+class WXDLLIMPEXP_FWD_ADV wxWizardEvent;
+class WXDLLIMPEXP_FWD_CORE wxBoxSizer;
+class WXDLLIMPEXP_FWD_ADV wxWizardSizer;
+
+class WXDLLIMPEXP_ADV wxWizard : public wxWizardBase
+{
+public:
+ // ctor
+ wxWizard() { Init(); }
+ wxWizard(wxWindow *parent,
+ int id = wxID_ANY,
+ const wxString& title = wxEmptyString,
+ const wxBitmap& bitmap = wxNullBitmap,
+ const wxPoint& pos = wxDefaultPosition,
+ long style = wxDEFAULT_DIALOG_STYLE)
+ {
+ Init();
+ Create(parent, id, title, bitmap, pos, style);
+ }
+ bool Create(wxWindow *parent,
+ int id = wxID_ANY,
+ const wxString& title = wxEmptyString,
+ const wxBitmap& bitmap = wxNullBitmap,
+ const wxPoint& pos = wxDefaultPosition,
+ long style = wxDEFAULT_DIALOG_STYLE);
+ void Init();
+
+#if wxABI_VERSION >= 20804
+ virtual ~wxWizard();
+#endif
+
+ // implement base class pure virtuals
+ virtual bool RunWizard(wxWizardPage *firstPage);
+ virtual wxWizardPage *GetCurrentPage() const;
+ virtual void SetPageSize(const wxSize& size);
+ virtual wxSize GetPageSize() const;
+ virtual void FitToPage(const wxWizardPage *firstPage);
+ virtual wxSizer *GetPageAreaSizer() const;
+ virtual void SetBorder(int border);
+
+ /// set/get bitmap
+#if wxABI_VERSION >= 20805
+ const wxBitmap& GetBitmap() const { return m_bitmap; }
+ void SetBitmap(const wxBitmap& bitmap);
+#endif
+
+ // implementation only from now on
+ // -------------------------------
+
+ // is the wizard running?
+ bool IsRunning() const { return m_page != NULL; }
+
+ // show the prev/next page, but call TransferDataFromWindow on the current
+ // page first and return false without changing the page if
+ // TransferDataFromWindow() returns false - otherwise, returns true
+ bool ShowPage(wxWizardPage *page, bool goingForward = true);
+
+ // do fill the dialog with controls
+ // this is app-overridable to, for example, set help and tooltip text
+ virtual void DoCreateControls();
+
+protected:
+ // for compatibility only, doesn't do anything any more
+ void FinishLayout() { }
+
+private:
+ // was the dialog really created?
+ bool WasCreated() const { return m_btnPrev != NULL; }
+
+ // event handlers
+ void OnCancel(wxCommandEvent& event);
+ void OnBackOrNext(wxCommandEvent& event);
+ void OnHelp(wxCommandEvent& event);
+
+ void OnWizEvent(wxWizardEvent& event);
+
+ void AddBitmapRow(wxBoxSizer *mainColumn);
+ void AddStaticLine(wxBoxSizer *mainColumn);
+ void AddBackNextPair(wxBoxSizer *buttonRow);
+ void AddButtonRow(wxBoxSizer *mainColumn);
+
+ // the page size requested by user
+ wxSize m_sizePage;
+
+ // the dialog position from the ctor
+ wxPoint m_posWizard;
+
+ // wizard state
+ wxWizardPage *m_page; // the current page or NULL
+ wxBitmap m_bitmap; // the default bitmap to show
+
+ // wizard controls
+ wxButton *m_btnPrev, // the "" or "Finish" button
+ wxStaticBitmap *m_statbmp; // the control for the bitmap
+
+ // Border around page area sizer requested using SetBorder()
+ int m_border;
+
+ // Whether RunWizard() was called
+ bool m_started;
+
+ // Whether was modal (modeless has to be destroyed on finish or cancel)
+ bool m_wasModal;
+
+ // True if pages are laid out using the sizer
+ bool m_usingSizer;
+
+ // Page area sizer will be inserted here with padding
+ wxBoxSizer *m_sizerBmpAndPage;
+
+ // Actual position and size of pages
+ wxWizardSizer *m_sizerPage;
+
+ friend class wxWizardSizer;
+
+ DECLARE_DYNAMIC_CLASS(wxWizard)
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS(wxWizard)
+};
+
+#endif // _WX_GENERIC_WIZARD_H_
diff --git a/3rdparty/wxWidgets/include/wx/geometry.h b/3rdparty/wxWidgets/include/wx/geometry.h
new file mode 100644
index 0000000000..385f36e98b
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/geometry.h
@@ -0,0 +1,814 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/geometry.h
+// Purpose: Common Geometry Classes
+// Author: Stefan Csomor
+// Modified by:
+// Created: 08/05/99
+// RCS-ID: $Id: geometry.h 53135 2008-04-12 02:31:04Z VZ $
+// Copyright: (c) 1999 Stefan Csomor
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GEOMETRY_H_
+#define _WX_GEOMETRY_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_GEOMETRY
+
+#include "wx/utils.h"
+#include "wx/gdicmn.h"
+#include "wx/math.h"
+
+class WXDLLIMPEXP_FWD_BASE wxDataInputStream;
+class WXDLLIMPEXP_FWD_BASE wxDataOutputStream;
+
+// clipping from Cohen-Sutherland
+
+enum wxOutCode
+{
+ wxInside = 0x00 ,
+ wxOutLeft = 0x01 ,
+ wxOutRight = 0x02 ,
+ wxOutTop = 0x08 ,
+ wxOutBottom = 0x04
+};
+
+class WXDLLEXPORT wxPoint2DInt
+{
+public :
+ inline wxPoint2DInt();
+ inline wxPoint2DInt( wxInt32 x , wxInt32 y );
+ inline wxPoint2DInt( const wxPoint2DInt &pt );
+ inline wxPoint2DInt( const wxPoint &pt );
+
+ // noops for this class, just return the coords
+ inline void GetFloor( wxInt32 *x , wxInt32 *y ) const;
+ inline void GetRounded( wxInt32 *x , wxInt32 *y ) const;
+
+ inline wxDouble GetVectorLength() const;
+ wxDouble GetVectorAngle() const;
+ inline void SetVectorLength( wxDouble length );
+ void SetVectorAngle( wxDouble degrees );
+ void SetPolarCoordinates( wxInt32 angle , wxInt32 length );
+ // set the vector length to 1.0, preserving the angle
+ inline void Normalize();
+
+ inline wxDouble GetDistance( const wxPoint2DInt &pt ) const;
+ inline wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const;
+ inline wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const;
+ inline wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const;
+
+ // the reflection of this point
+ inline wxPoint2DInt operator-();
+
+ inline wxPoint2DInt& operator=(const wxPoint2DInt& pt);
+ inline wxPoint2DInt& operator+=(const wxPoint2DInt& pt);
+ inline wxPoint2DInt& operator-=(const wxPoint2DInt& pt);
+ inline wxPoint2DInt& operator*=(const wxPoint2DInt& pt);
+ inline wxPoint2DInt& operator*=(wxDouble n);
+ inline wxPoint2DInt& operator*=(wxInt32 n);
+ inline wxPoint2DInt& operator/=(const wxPoint2DInt& pt);
+ inline wxPoint2DInt& operator/=(wxDouble n);
+ inline wxPoint2DInt& operator/=(wxInt32 n);
+ inline operator wxPoint() const;
+ inline bool operator==(const wxPoint2DInt& pt) const;
+ inline bool operator!=(const wxPoint2DInt& pt) const;
+
+#if wxUSE_STREAMS
+ void WriteTo( wxDataOutputStream &stream ) const;
+ void ReadFrom( wxDataInputStream &stream );
+#endif // wxUSE_STREAMS
+
+ wxInt32 m_x;
+ wxInt32 m_y;
+};
+
+inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
+inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
+
+inline wxPoint2DInt::wxPoint2DInt()
+{
+ m_x = 0;
+ m_y = 0;
+}
+
+inline wxPoint2DInt::wxPoint2DInt( wxInt32 x , wxInt32 y )
+{
+ m_x = x;
+ m_y = y;
+}
+
+inline wxPoint2DInt::wxPoint2DInt( const wxPoint2DInt &pt )
+{
+ m_x = pt.m_x;
+ m_y = pt.m_y;
+}
+
+inline wxPoint2DInt::wxPoint2DInt( const wxPoint &pt )
+{
+ m_x = pt.x;
+ m_y = pt.y;
+}
+
+inline void wxPoint2DInt::GetFloor( wxInt32 *x , wxInt32 *y ) const
+{
+ if ( x )
+ *x = m_x;
+ if ( y )
+ *y = m_y;
+}
+
+inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y ) const
+{
+ GetFloor(x, y);
+}
+
+inline wxDouble wxPoint2DInt::GetVectorLength() const
+{
+ // cast needed MIPSpro compiler under SGI
+ return sqrt( (double)(m_x)*(m_x) + (m_y)*(m_y) );
+}
+
+inline void wxPoint2DInt::SetVectorLength( wxDouble length )
+{
+ wxDouble before = GetVectorLength();
+ m_x = (wxInt32)(m_x * length / before);
+ m_y = (wxInt32)(m_y * length / before);
+}
+
+inline void wxPoint2DInt::Normalize()
+{
+ SetVectorLength( 1 );
+}
+
+inline wxDouble wxPoint2DInt::GetDistance( const wxPoint2DInt &pt ) const
+{
+ return sqrt( GetDistanceSquare( pt ) );
+}
+
+inline wxDouble wxPoint2DInt::GetDistanceSquare( const wxPoint2DInt &pt ) const
+{
+ return ( (wxDouble)(pt.m_x-m_x)*(pt.m_x-m_x) + (wxDouble)(pt.m_y-m_y)*(pt.m_y-m_y) );
+}
+
+inline wxInt32 wxPoint2DInt::GetDotProduct( const wxPoint2DInt &vec ) const
+{
+ return ( m_x * vec.m_x + m_y * vec.m_y );
+}
+
+inline wxInt32 wxPoint2DInt::GetCrossProduct( const wxPoint2DInt &vec ) const
+{
+ return ( m_x * vec.m_y - vec.m_x * m_y );
+}
+
+inline wxPoint2DInt::operator wxPoint() const
+{
+ return wxPoint( m_x, m_y);
+}
+
+inline wxPoint2DInt wxPoint2DInt::operator-()
+{
+ return wxPoint2DInt( -m_x, -m_y);
+}
+
+inline wxPoint2DInt& wxPoint2DInt::operator=(const wxPoint2DInt& pt)
+{
+ m_x = pt.m_x;
+ m_y = pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DInt& wxPoint2DInt::operator+=(const wxPoint2DInt& pt)
+{
+ m_x = m_x + pt.m_x;
+ m_y = m_y + pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DInt& wxPoint2DInt::operator-=(const wxPoint2DInt& pt)
+{
+ m_x = m_x - pt.m_x;
+ m_y = m_y - pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DInt& wxPoint2DInt::operator*=(const wxPoint2DInt& pt)
+{
+ m_x = m_x + pt.m_x;
+ m_y = m_y + pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DInt& wxPoint2DInt::operator/=(const wxPoint2DInt& pt)
+{
+ m_x = m_x - pt.m_x;
+ m_y = m_y - pt.m_y;
+ return *this;
+}
+
+inline bool wxPoint2DInt::operator==(const wxPoint2DInt& pt) const
+{
+ return m_x == pt.m_x && m_y == pt.m_y;
+}
+
+inline bool wxPoint2DInt::operator!=(const wxPoint2DInt& pt) const
+{
+ return m_x != pt.m_x || m_y != pt.m_y;
+}
+
+inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
+{
+ return wxPoint2DInt( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y );
+}
+
+inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
+{
+ return wxPoint2DInt( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y );
+}
+
+
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
+{
+ return wxPoint2DInt( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y );
+}
+
+inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt)
+{
+ return wxPoint2DInt( pt.m_x * n , pt.m_y * n );
+}
+
+inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt)
+{
+ return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) );
+}
+
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n)
+{
+ return wxPoint2DInt( pt.m_x * n , pt.m_y * n );
+}
+
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n)
+{
+ return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) );
+}
+
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
+{
+ return wxPoint2DInt( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y );
+}
+
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n)
+{
+ return wxPoint2DInt( pt.m_x / n , pt.m_y / n );
+}
+
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n)
+{
+ return wxPoint2DInt( (int) (pt.m_x / n) , (int) (pt.m_y / n) );
+}
+
+// wxPoint2Ds represent a point or a vector in a 2d coordinate system
+
+class WXDLLEXPORT wxPoint2DDouble
+{
+public :
+ inline wxPoint2DDouble();
+ inline wxPoint2DDouble( wxDouble x , wxDouble y );
+ inline wxPoint2DDouble( const wxPoint2DDouble &pt );
+ wxPoint2DDouble( const wxPoint2DInt &pt )
+ { m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; }
+ wxPoint2DDouble( const wxPoint &pt )
+ { m_x = (wxDouble) pt.x ; m_y = (wxDouble) pt.y ; }
+
+ // two different conversions to integers, floor and rounding
+ inline void GetFloor( wxInt32 *x , wxInt32 *y ) const;
+ inline void GetRounded( wxInt32 *x , wxInt32 *y ) const;
+
+ inline wxDouble GetVectorLength() const;
+ wxDouble GetVectorAngle() const ;
+ void SetVectorLength( wxDouble length );
+ void SetVectorAngle( wxDouble degrees );
+ void SetPolarCoordinates( wxDouble angle , wxDouble length );
+ // set the vector length to 1.0, preserving the angle
+ void Normalize();
+
+ inline wxDouble GetDistance( const wxPoint2DDouble &pt ) const;
+ inline wxDouble GetDistanceSquare( const wxPoint2DDouble &pt ) const;
+ inline wxDouble GetDotProduct( const wxPoint2DDouble &vec ) const;
+ inline wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const;
+
+ // the reflection of this point
+ inline wxPoint2DDouble operator-();
+
+ inline wxPoint2DDouble& operator=(const wxPoint2DDouble& pt);
+ inline wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt);
+ inline wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt);
+ inline wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt);
+ inline wxPoint2DDouble& operator*=(wxDouble n);
+ inline wxPoint2DDouble& operator*=(wxInt32 n);
+ inline wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt);
+ inline wxPoint2DDouble& operator/=(wxDouble n);
+ inline wxPoint2DDouble& operator/=(wxInt32 n);
+
+ inline bool operator==(const wxPoint2DDouble& pt) const;
+ inline bool operator!=(const wxPoint2DDouble& pt) const;
+
+ wxDouble m_x;
+ wxDouble m_y;
+};
+
+inline wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
+inline wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
+inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
+inline wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt);
+inline wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt);
+inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n);
+inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n);
+inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
+inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n);
+inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n);
+
+inline wxPoint2DDouble::wxPoint2DDouble()
+{
+ m_x = 0.0;
+ m_y = 0.0;
+}
+
+inline wxPoint2DDouble::wxPoint2DDouble( wxDouble x , wxDouble y )
+{
+ m_x = x;
+ m_y = y;
+}
+
+inline wxPoint2DDouble::wxPoint2DDouble( const wxPoint2DDouble &pt )
+{
+ m_x = pt.m_x;
+ m_y = pt.m_y;
+}
+
+inline void wxPoint2DDouble::GetFloor( wxInt32 *x , wxInt32 *y ) const
+{
+ *x = (wxInt32) floor( m_x );
+ *y = (wxInt32) floor( m_y );
+}
+
+inline void wxPoint2DDouble::GetRounded( wxInt32 *x , wxInt32 *y ) const
+{
+ *x = (wxInt32) floor( m_x + 0.5 );
+ *y = (wxInt32) floor( m_y + 0.5);
+}
+
+inline wxDouble wxPoint2DDouble::GetVectorLength() const
+{
+ return sqrt( (m_x)*(m_x) + (m_y)*(m_y) ) ;
+}
+
+inline void wxPoint2DDouble::SetVectorLength( wxDouble length )
+{
+ wxDouble before = GetVectorLength() ;
+ m_x = (m_x * length / before) ;
+ m_y = (m_y * length / before) ;
+}
+
+inline void wxPoint2DDouble::Normalize()
+{
+ SetVectorLength( 1 );
+}
+
+inline wxDouble wxPoint2DDouble::GetDistance( const wxPoint2DDouble &pt ) const
+{
+ return sqrt( GetDistanceSquare( pt ) );
+}
+
+inline wxDouble wxPoint2DDouble::GetDistanceSquare( const wxPoint2DDouble &pt ) const
+{
+ return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) );
+}
+
+inline wxDouble wxPoint2DDouble::GetDotProduct( const wxPoint2DDouble &vec ) const
+{
+ return ( m_x * vec.m_x + m_y * vec.m_y );
+}
+
+inline wxDouble wxPoint2DDouble::GetCrossProduct( const wxPoint2DDouble &vec ) const
+{
+ return ( m_x * vec.m_y - vec.m_x * m_y );
+}
+
+inline wxPoint2DDouble wxPoint2DDouble::operator-()
+{
+ return wxPoint2DDouble( -m_x, -m_y);
+}
+
+inline wxPoint2DDouble& wxPoint2DDouble::operator=(const wxPoint2DDouble& pt)
+{
+ m_x = pt.m_x;
+ m_y = pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DDouble& wxPoint2DDouble::operator+=(const wxPoint2DDouble& pt)
+{
+ m_x = m_x + pt.m_x;
+ m_y = m_y + pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DDouble& wxPoint2DDouble::operator-=(const wxPoint2DDouble& pt)
+{
+ m_x = m_x - pt.m_x;
+ m_y = m_y - pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DDouble& wxPoint2DDouble::operator*=(const wxPoint2DDouble& pt)
+{
+ m_x = m_x * pt.m_x;
+ m_y = m_y * pt.m_y;
+ return *this;
+}
+
+inline wxPoint2DDouble& wxPoint2DDouble::operator/=(const wxPoint2DDouble& pt)
+{
+ m_x = m_x / pt.m_x;
+ m_y = m_y / pt.m_y;
+ return *this;
+}
+
+inline bool wxPoint2DDouble::operator==(const wxPoint2DDouble& pt) const
+{
+ return wxIsSameDouble(m_x, pt.m_x) && wxIsSameDouble(m_y, pt.m_y);
+}
+
+inline bool wxPoint2DDouble::operator!=(const wxPoint2DDouble& pt) const
+{
+ return !(*this == pt);
+}
+
+inline wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
+{
+ return wxPoint2DDouble( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y );
+}
+
+inline wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
+{
+ return wxPoint2DDouble( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y );
+}
+
+
+inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
+{
+ return wxPoint2DDouble( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y );
+}
+
+inline wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt)
+{
+ return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
+}
+
+inline wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt)
+{
+ return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
+}
+
+inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n)
+{
+ return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
+}
+
+inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n)
+{
+ return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
+}
+
+inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
+{
+ return wxPoint2DDouble( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y );
+}
+
+inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n)
+{
+ return wxPoint2DDouble( pt.m_x / n , pt.m_y / n );
+}
+
+inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n)
+{
+ return wxPoint2DDouble( pt.m_x / n , pt.m_y / n );
+}
+
+// wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the
+// top left and bottom right corner, or by the top left corner and size. A point is contained within the rectangle if
+// left <= x < right and top <= m_y < bottom , thus it is a half open interval.
+
+class WXDLLEXPORT wxRect2DDouble
+{
+public:
+ wxRect2DDouble()
+ { m_x = m_y = m_width = m_height = 0; }
+ wxRect2DDouble(wxDouble x, wxDouble y, wxDouble w, wxDouble h)
+ { m_x = x; m_y = y; m_width = w; m_height = h; }
+/*
+ wxRect2DDouble(const wxPoint2DDouble& topLeft, const wxPoint2DDouble& bottomRight);
+ wxRect2DDouble(const wxPoint2DDouble& pos, const wxSize& size);
+ wxRect2DDouble(const wxRect2DDouble& rect);
+*/
+ // single attribute accessors
+
+ inline wxPoint2DDouble GetPosition()
+ { return wxPoint2DDouble(m_x, m_y); }
+ inline wxSize GetSize()
+ { return wxSize((int) m_width, (int) m_height); }
+
+ // for the edge and corner accessors there are two setters conterparts, the Set.. functions keep the other corners at their
+ // position whenever sensible, the Move.. functions keep the size of the rect and move the other corners apropriately
+
+ inline wxDouble GetLeft() const { return m_x; }
+ inline void SetLeft( wxDouble n ) { m_width += m_x - n; m_x = n; }
+ inline void MoveLeftTo( wxDouble n ) { m_x = n; }
+ inline wxDouble GetTop() const { return m_y; }
+ inline void SetTop( wxDouble n ) { m_height += m_y - n; m_y = n; }
+ inline void MoveTopTo( wxDouble n ) { m_y = n; }
+ inline wxDouble GetBottom() const { return m_y + m_height; }
+ inline void SetBottom( wxDouble n ) { m_height += n - (m_y+m_height);}
+ inline void MoveBottomTo( wxDouble n ) { m_y = n - m_height; }
+ inline wxDouble GetRight() const { return m_x + m_width; }
+ inline void SetRight( wxDouble n ) { m_width += n - (m_x+m_width) ; }
+ inline void MoveRightTo( wxDouble n ) { m_x = n - m_width; }
+
+ inline wxPoint2DDouble GetLeftTop() const
+ { return wxPoint2DDouble( m_x , m_y ); }
+ inline void SetLeftTop( const wxPoint2DDouble &pt )
+ { m_width += m_x - pt.m_x; m_height += m_y - pt.m_y; m_x = pt.m_x; m_y = pt.m_y; }
+ inline void MoveLeftTopTo( const wxPoint2DDouble &pt )
+ { m_x = pt.m_x; m_y = pt.m_y; }
+ inline wxPoint2DDouble GetLeftBottom() const
+ { return wxPoint2DDouble( m_x , m_y + m_height ); }
+ inline void SetLeftBottom( const wxPoint2DDouble &pt )
+ { m_width += m_x - pt.m_x; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x; }
+ inline void MoveLeftBottomTo( const wxPoint2DDouble &pt )
+ { m_x = pt.m_x; m_y = pt.m_y - m_height; }
+ inline wxPoint2DDouble GetRightTop() const
+ { return wxPoint2DDouble( m_x+m_width , m_y ); }
+ inline void SetRightTop( const wxPoint2DDouble &pt )
+ { m_width += pt.m_x - ( m_x + m_width ); m_height += m_y - pt.m_y; m_y = pt.m_y; }
+ inline void MoveRightTopTo( const wxPoint2DDouble &pt )
+ { m_x = pt.m_x - m_width; m_y = pt.m_y; }
+ inline wxPoint2DDouble GetRightBottom() const
+ { return wxPoint2DDouble( m_x+m_width , m_y + m_height ); }
+ inline void SetRightBottom( const wxPoint2DDouble &pt )
+ { m_width += pt.m_x - ( m_x + m_width ); m_height += pt.m_y - (m_y+m_height);}
+ inline void MoveRightBottomTo( const wxPoint2DDouble &pt )
+ { m_x = pt.m_x - m_width; m_y = pt.m_y - m_height; }
+ inline wxPoint2DDouble GetCentre() const
+ { return wxPoint2DDouble( m_x+m_width/2 , m_y+m_height/2 ); }
+ inline void SetCentre( const wxPoint2DDouble &pt )
+ { MoveCentreTo( pt ); } // since this is impossible without moving...
+ inline void MoveCentreTo( const wxPoint2DDouble &pt )
+ { m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2); }
+ inline wxOutCode GetOutCode( const wxPoint2DDouble &pt ) const
+ { return (wxOutCode) (( ( pt.m_x < m_x ) ? wxOutLeft : 0 ) +
+ ( ( pt.m_x > m_x + m_width ) ? wxOutRight : 0 ) +
+ ( ( pt.m_y < m_y ) ? wxOutTop : 0 ) +
+ ( ( pt.m_y > m_y + m_height ) ? wxOutBottom : 0 )); }
+ inline wxOutCode GetOutcode(const wxPoint2DDouble &pt) const
+ { return GetOutCode(pt) ; }
+ inline bool Contains( const wxPoint2DDouble &pt ) const
+ { return GetOutCode( pt ) == wxInside; }
+ inline bool Contains( const wxRect2DDouble &rect ) const
+ { return ( ( ( m_x <= rect.m_x ) && ( rect.m_x + rect.m_width <= m_x + m_width ) ) &&
+ ( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ); }
+ inline bool IsEmpty() const
+ { return m_width <= 0 || m_height <= 0; }
+ inline bool HaveEqualSize( const wxRect2DDouble &rect ) const
+ { return wxIsSameDouble(rect.m_width, m_width) && wxIsSameDouble(rect.m_height, m_height); }
+
+ inline void Inset( wxDouble x , wxDouble y )
+ { m_x += x; m_y += y; m_width -= 2 * x; m_height -= 2 * y; }
+ inline void Inset( wxDouble left , wxDouble top ,wxDouble right , wxDouble bottom )
+ { m_x += left; m_y += top; m_width -= left + right; m_height -= top + bottom;}
+ inline void Offset( const wxPoint2DDouble &pt )
+ { m_x += pt.m_x; m_y += pt.m_y; }
+
+ void ConstrainTo( const wxRect2DDouble &rect );
+
+ inline wxPoint2DDouble Interpolate( wxInt32 widthfactor , wxInt32 heightfactor )
+ { return wxPoint2DDouble( m_x + m_width * widthfactor , m_y + m_height * heightfactor ); }
+
+ static void Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest );
+ inline void Intersect( const wxRect2DDouble &otherRect )
+ { Intersect( *this , otherRect , this ); }
+ inline wxRect2DDouble CreateIntersection( const wxRect2DDouble &otherRect ) const
+ { wxRect2DDouble result; Intersect( *this , otherRect , &result); return result; }
+ bool Intersects( const wxRect2DDouble &rect ) const;
+
+ static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest );
+ void Union( const wxRect2DDouble &otherRect )
+ { Union( *this , otherRect , this ); }
+ void Union( const wxPoint2DDouble &pt );
+ inline wxRect2DDouble CreateUnion( const wxRect2DDouble &otherRect ) const
+ { wxRect2DDouble result; Union( *this , otherRect , &result); return result; }
+
+ inline void Scale( wxDouble f )
+ { m_x *= f; m_y *= f; m_width *= f; m_height *= f;}
+ inline void Scale( wxInt32 num , wxInt32 denum )
+ { m_x *= ((wxDouble)num)/((wxDouble)denum); m_y *= ((wxDouble)num)/((wxDouble)denum);
+ m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);}
+
+ wxRect2DDouble& operator = (const wxRect2DDouble& rect);
+ inline bool operator == (const wxRect2DDouble& rect) const
+ { return wxIsSameDouble(m_x, rect.m_x) && wxIsSameDouble(m_y, rect.m_y) && HaveEqualSize(rect); }
+ inline bool operator != (const wxRect2DDouble& rect) const
+ { return !(*this == rect); }
+
+ wxDouble m_x;
+ wxDouble m_y;
+ wxDouble m_width;
+ wxDouble m_height;
+};
+
+
+// wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the
+// top left and bottom right corner, or by the top left corner and size. A point is contained within the rectangle if
+// left <= x < right and top <= m_y < bottom , thus it is a half open interval.
+
+class WXDLLEXPORT wxRect2DInt
+{
+public:
+ wxRect2DInt() { m_x = m_y = m_width = m_height = 0; }
+ wxRect2DInt( const wxRect& r ) { m_x = r.x ; m_y = r.y ; m_width = r.width ; m_height = r.height ; }
+ wxRect2DInt(wxInt32 x, wxInt32 y, wxInt32 w, wxInt32 h) { m_x = x; m_y = y; m_width = w; m_height = h; }
+ wxRect2DInt(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight);
+ inline wxRect2DInt(const wxPoint2DInt& pos, const wxSize& size);
+ inline wxRect2DInt(const wxRect2DInt& rect);
+
+ // single attribute accessors
+
+ inline wxPoint2DInt GetPosition() { return wxPoint2DInt(m_x, m_y); }
+ inline wxSize GetSize() { return wxSize(m_width, m_height); }
+
+ // for the edge and corner accessors there are two setters conterparts, the Set.. functions keep the other corners at their
+ // position whenever sensible, the Move.. functions keep the size of the rect and move the other corners apropriately
+
+ inline wxInt32 GetLeft() const { return m_x; }
+ inline void SetLeft( wxInt32 n ) { m_width += m_x - n; m_x = n; }
+ inline void MoveLeftTo( wxInt32 n ) { m_x = n; }
+ inline wxInt32 GetTop() const { return m_y; }
+ inline void SetTop( wxInt32 n ) { m_height += m_y - n; m_y = n; }
+ inline void MoveTopTo( wxInt32 n ) { m_y = n; }
+ inline wxInt32 GetBottom() const { return m_y + m_height; }
+ inline void SetBottom( wxInt32 n ) { m_height += n - (m_y+m_height);}
+ inline void MoveBottomTo( wxInt32 n ) { m_y = n - m_height; }
+ inline wxInt32 GetRight() const { return m_x + m_width; }
+ inline void SetRight( wxInt32 n ) { m_width += n - (m_x+m_width) ; }
+ inline void MoveRightTo( wxInt32 n ) { m_x = n - m_width; }
+
+ inline wxPoint2DInt GetLeftTop() const { return wxPoint2DInt( m_x , m_y ); }
+ inline void SetLeftTop( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x; m_height += m_y - pt.m_y; m_x = pt.m_x; m_y = pt.m_y; }
+ inline void MoveLeftTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x; m_y = pt.m_y; }
+ inline wxPoint2DInt GetLeftBottom() const { return wxPoint2DInt( m_x , m_y + m_height ); }
+ inline void SetLeftBottom( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x; }
+ inline void MoveLeftBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x; m_y = pt.m_y - m_height; }
+ inline wxPoint2DInt GetRightTop() const { return wxPoint2DInt( m_x+m_width , m_y ); }
+ inline void SetRightTop( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ); m_height += m_y - pt.m_y; m_y = pt.m_y; }
+ inline void MoveRightTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width; m_y = pt.m_y; }
+ inline wxPoint2DInt GetRightBottom() const { return wxPoint2DInt( m_x+m_width , m_y + m_height ); }
+ inline void SetRightBottom( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ); m_height += pt.m_y - (m_y+m_height);}
+ inline void MoveRightBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width; m_y = pt.m_y - m_height; }
+ inline wxPoint2DInt GetCentre() const { return wxPoint2DInt( m_x+m_width/2 , m_y+m_height/2 ); }
+ inline void SetCentre( const wxPoint2DInt &pt ) { MoveCentreTo( pt ); } // since this is impossible without moving...
+ inline void MoveCentreTo( const wxPoint2DInt &pt ) { m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2); }
+ inline wxOutCode GetOutCode( const wxPoint2DInt &pt ) const
+ { return (wxOutCode) (( ( pt.m_x < m_x ) ? wxOutLeft : 0 ) +
+ ( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) +
+ ( ( pt.m_y < m_y ) ? wxOutTop : 0 ) +
+ ( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); }
+ inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const
+ { return GetOutCode( pt ) ; }
+ inline bool Contains( const wxPoint2DInt &pt ) const
+ { return GetOutCode( pt ) == wxInside; }
+ inline bool Contains( const wxRect2DInt &rect ) const
+ { return ( ( ( m_x <= rect.m_x ) && ( rect.m_x + rect.m_width <= m_x + m_width ) ) &&
+ ( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ); }
+ inline bool IsEmpty() const
+ { return ( m_width <= 0 || m_height <= 0 ); }
+ inline bool HaveEqualSize( const wxRect2DInt &rect ) const
+ { return ( rect.m_width == m_width && rect.m_height == m_height ); }
+
+ inline void Inset( wxInt32 x , wxInt32 y ) { m_x += x; m_y += y; m_width -= 2 * x; m_height -= 2 * y; }
+ inline void Inset( wxInt32 left , wxInt32 top ,wxInt32 right , wxInt32 bottom )
+ { m_x += left; m_y += top; m_width -= left + right; m_height -= top + bottom;}
+ inline void Offset( const wxPoint2DInt &pt ) { m_x += pt.m_x; m_y += pt.m_y; }
+ void ConstrainTo( const wxRect2DInt &rect );
+ inline wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor ) { return wxPoint2DInt( m_x + m_width * widthfactor , m_y + m_height * heightfactor ); }
+
+ static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
+ inline void Intersect( const wxRect2DInt &otherRect ) { Intersect( *this , otherRect , this ); }
+ inline wxRect2DInt CreateIntersection( const wxRect2DInt &otherRect ) const { wxRect2DInt result; Intersect( *this , otherRect , &result); return result; }
+ bool Intersects( const wxRect2DInt &rect ) const;
+
+ static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
+ void Union( const wxRect2DInt &otherRect ) { Union( *this , otherRect , this ); }
+ void Union( const wxPoint2DInt &pt );
+ inline wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const { wxRect2DInt result; Union( *this , otherRect , &result); return result; }
+
+ inline void Scale( wxInt32 f ) { m_x *= f; m_y *= f; m_width *= f; m_height *= f;}
+ inline void Scale( wxInt32 num , wxInt32 denum )
+ { m_x *= ((wxInt32)num)/((wxInt32)denum); m_y *= ((wxInt32)num)/((wxInt32)denum);
+ m_width *= ((wxInt32)num)/((wxInt32)denum); m_height *= ((wxInt32)num)/((wxInt32)denum);}
+
+ wxRect2DInt& operator = (const wxRect2DInt& rect);
+ bool operator == (const wxRect2DInt& rect) const;
+ bool operator != (const wxRect2DInt& rect) const;
+
+#if wxUSE_STREAMS
+ void WriteTo( wxDataOutputStream &stream ) const;
+ void ReadFrom( wxDataInputStream &stream );
+#endif // wxUSE_STREAMS
+
+ wxInt32 m_x;
+ wxInt32 m_y;
+ wxInt32 m_width;
+ wxInt32 m_height;
+};
+
+inline wxRect2DInt::wxRect2DInt( const wxRect2DInt &r )
+{
+ m_x = r.m_x;
+ m_y = r.m_y;
+ m_width = r.m_width;
+ m_height = r.m_height;
+}
+
+inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt &a , const wxPoint2DInt &b)
+{
+ m_x = wxMin( a.m_x , b.m_x );
+ m_y = wxMin( a.m_y , b.m_y );
+ m_width = abs( a.m_x - b.m_x );
+ m_height = abs( a.m_y - b.m_y );
+}
+
+inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt& pos, const wxSize& size)
+{
+ m_x = pos.m_x;
+ m_y = pos.m_y;
+ m_width = size.x;
+ m_height = size.y;
+}
+
+inline bool wxRect2DInt::operator == (const wxRect2DInt& rect) const
+{
+ return (m_x==rect.m_x && m_y==rect.m_y &&
+ m_width==rect.m_width && m_height==rect.m_height);
+}
+
+inline bool wxRect2DInt::operator != (const wxRect2DInt& rect) const
+{
+ return !(*this == rect);
+}
+
+class wxTransform2D
+{
+public :
+ virtual ~wxTransform2D() { }
+ virtual void Transform( wxPoint2DInt* pt )const = 0;
+ virtual void Transform( wxRect2DInt* r ) const;
+ virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const;
+ virtual wxRect2DInt Transform( const wxRect2DInt &r ) const ;
+
+ virtual void InverseTransform( wxPoint2DInt* pt ) const = 0;
+ virtual void InverseTransform( wxRect2DInt* r ) const ;
+ virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const ;
+ virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ;
+};
+
+inline void wxTransform2D::Transform( wxRect2DInt* r ) const
+ { wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom(); Transform( &a ); Transform( &b ); *r = wxRect2DInt( a , b ); }
+
+inline wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const
+ { wxPoint2DInt res = pt; Transform( &res ); return res; }
+
+inline wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const
+ { wxRect2DInt res = r; Transform( &res ); return res; }
+
+inline void wxTransform2D::InverseTransform( wxRect2DInt* r ) const
+ { wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom(); InverseTransform( &a ); InverseTransform( &b ); *r = wxRect2DInt( a , b ); }
+
+inline wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const
+ { wxPoint2DInt res = pt; InverseTransform( &res ); return res; }
+
+inline wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const
+ { wxRect2DInt res = r; InverseTransform( &res ); return res; }
+
+
+#endif // wxUSE_GEOMETRY
+
+#endif // _WX_GEOMETRY_H_
diff --git a/3rdparty/wxWidgets/include/wx/gifdecod.h b/3rdparty/wxWidgets/include/wx/gifdecod.h
new file mode 100644
index 0000000000..7760d4759d
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/gifdecod.h
@@ -0,0 +1,110 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/gifdecod.h
+// Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation
+// Author: Guillermo Rodriguez Garcia
+// Version: 3.02
+// CVS-ID: $Id: gifdecod.h 45563 2007-04-21 18:17:50Z VZ $
+// Copyright: (c) 1999 Guillermo Rodriguez Garcia
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GIFDECOD_H_
+#define _WX_GIFDECOD_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_STREAMS && wxUSE_GIF
+
+#include "wx/stream.h"
+#include "wx/image.h"
+#include "wx/animdecod.h"
+#include "wx/dynarray.h"
+
+// internal utility used to store a frame in 8bit-per-pixel format
+class GIFImage;
+
+
+// --------------------------------------------------------------------------
+// Constants
+// --------------------------------------------------------------------------
+
+// Error codes:
+// Note that the error code wxGIF_TRUNCATED means that the image itself
+// is most probably OK, but the decoder didn't reach the end of the data
+// stream; this means that if it was not reading directly from file,
+// the stream will not be correctly positioned.
+//
+enum wxGIFErrorCode
+{
+ wxGIF_OK = 0, // everything was OK
+ wxGIF_INVFORMAT, // error in GIF header
+ wxGIF_MEMERR, // error allocating memory
+ wxGIF_TRUNCATED // file appears to be truncated
+};
+
+// --------------------------------------------------------------------------
+// wxGIFDecoder class
+// --------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGIFDecoder : public wxAnimationDecoder
+{
+public:
+ // constructor, destructor, etc.
+ wxGIFDecoder();
+ ~wxGIFDecoder();
+
+ // get data of current frame
+ unsigned char* GetData(unsigned int frame) const;
+ unsigned char* GetPalette(unsigned int frame) const;
+ unsigned int GetNcolours(unsigned int frame) const;
+ int GetTransparentColourIndex(unsigned int frame) const;
+ wxColour GetTransparentColour(unsigned int frame) const;
+
+ virtual wxSize GetFrameSize(unsigned int frame) const;
+ virtual wxPoint GetFramePosition(unsigned int frame) const;
+ virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
+ virtual long GetDelay(unsigned int frame) const;
+
+ // GIFs can contain both static images and animations
+ bool IsAnimation() const
+ { return m_nFrames > 1; }
+
+ // load function which returns more info than just Load():
+ wxGIFErrorCode LoadGIF( wxInputStream& stream );
+
+ // free all internal frames
+ void Destroy();
+
+ // implementation of wxAnimationDecoder's pure virtuals
+ virtual bool CanRead( wxInputStream& stream ) const;
+ virtual bool Load( wxInputStream& stream )
+ { return LoadGIF(stream) == wxGIF_OK; }
+
+ bool ConvertToImage(unsigned int frame, wxImage *image) const;
+
+ wxAnimationDecoder *Clone() const
+ { return new wxGIFDecoder; }
+ wxAnimationType GetType() const
+ { return wxANIMATION_TYPE_GIF; }
+
+private:
+ // array of all frames
+ wxArrayPtrVoid m_frames;
+
+ // decoder state vars
+ int m_restbits; // remaining valid bits
+ unsigned int m_restbyte; // remaining bytes in this block
+ unsigned int m_lastbyte; // last byte read
+ unsigned char m_buffer[256]; // buffer for reading
+ unsigned char *m_bufp; // pointer to next byte in buffer
+
+ int getcode(wxInputStream& stream, int bits, int abfin);
+ wxGIFErrorCode dgif(wxInputStream& stream,
+ GIFImage *img, int interl, int bits);
+
+ DECLARE_NO_COPY_CLASS(wxGIFDecoder)
+};
+
+#endif // wxUSE_STREAM && wxUSE_GIF
+
+#endif // _WX_GIFDECOD_H_
diff --git a/3rdparty/wxWidgets/include/wx/glcanvas.h b/3rdparty/wxWidgets/include/wx/glcanvas.h
new file mode 100644
index 0000000000..25e2eac0b5
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/glcanvas.h
@@ -0,0 +1,86 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/glcanvas.h
+// Purpose: wxGLCanvas base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: glcanvas.h 43623 2006-11-24 10:30:42Z MR $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GLCANVAS_H_BASE_
+#define _WX_GLCANVAS_H_BASE_
+
+#include "wx/defs.h"
+
+#if wxUSE_GLCANVAS
+
+//---------------------------------------------------------------------------
+// Constants for attriblist
+//---------------------------------------------------------------------------
+
+// The generic GL implementation doesn't support most of these options,
+// such as stereo, auxiliary buffers, alpha channel, and accum buffer.
+// Other implementations may actually support them.
+
+enum
+{
+ WX_GL_RGBA=1, /* use true color palette */
+ WX_GL_BUFFER_SIZE, /* bits for buffer if not WX_GL_RGBA */
+ WX_GL_LEVEL, /* 0 for main buffer, >0 for overlay, <0 for underlay */
+ WX_GL_DOUBLEBUFFER, /* use doublebuffer */
+ WX_GL_STEREO, /* use stereoscopic display */
+ WX_GL_AUX_BUFFERS, /* number of auxiliary buffers */
+ WX_GL_MIN_RED, /* use red buffer with most bits (> MIN_RED bits) */
+ WX_GL_MIN_GREEN, /* use green buffer with most bits (> MIN_GREEN bits) */
+ WX_GL_MIN_BLUE, /* use blue buffer with most bits (> MIN_BLUE bits) */
+ WX_GL_MIN_ALPHA, /* use alpha buffer with most bits (> MIN_ALPHA bits) */
+ WX_GL_DEPTH_SIZE, /* bits for Z-buffer (0,16,32) */
+ WX_GL_STENCIL_SIZE, /* bits for stencil buffer */
+ WX_GL_MIN_ACCUM_RED, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
+ WX_GL_MIN_ACCUM_GREEN, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
+ WX_GL_MIN_ACCUM_BLUE, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
+ WX_GL_MIN_ACCUM_ALPHA /* use alpha buffer with most bits (> MIN_ACCUM_ALPHA bits) */
+};
+
+#define wxGLCanvasName _T("GLCanvas")
+
+#if defined(__WXMSW__)
+#include "wx/msw/glcanvas.h"
+#elif defined(__WXMOTIF__)
+#include "wx/x11/glcanvas.h"
+#elif defined(__WXGTK20__)
+#include "wx/gtk/glcanvas.h"
+#elif defined(__WXGTK__)
+#include "wx/gtk1/glcanvas.h"
+#elif defined(__WXX11__)
+#include "wx/x11/glcanvas.h"
+#elif defined(__WXMAC__)
+#include "wx/mac/glcanvas.h"
+#elif defined(__WXCOCOA__)
+#include "wx/cocoa/glcanvas.h"
+#else
+#error "wxGLCanvas not supported in this wxWidgets port"
+#endif
+
+#include "wx/app.h"
+class WXDLLIMPEXP_GL wxGLApp : public wxApp
+{
+public:
+ wxGLApp() : wxApp() { }
+ virtual ~wxGLApp();
+
+ // use this in the constructor of the user-derived wxGLApp class to
+ // determine if an OpenGL rendering context with these attributes
+ // is available - returns true if so, false if not.
+ bool InitGLVisual(int *attribList);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGLApp)
+};
+
+#endif
+ // wxUSE_GLCANVAS
+#endif
+ // _WX_GLCANVAS_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/graphics.h b/3rdparty/wxWidgets/include/wx/graphics.h
new file mode 100644
index 0000000000..34f831e91c
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/graphics.h
@@ -0,0 +1,732 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/graphics.h
+// Purpose: graphics context header
+// Author: Stefan Csomor
+// Modified by:
+// Created:
+// Copyright: (c) Stefan Csomor
+// RCS-ID: $Id: graphics.h 57953 2009-01-09 18:46:48Z SC $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GRAPHICS_H_
+#define _WX_GRAPHICS_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_GRAPHICS_CONTEXT
+
+#include "wx/geometry.h"
+#include "wx/dynarray.h"
+
+class WXDLLIMPEXP_CORE wxWindowDC;
+class WXDLLIMPEXP_CORE wxMemoryDC;
+class WXDLLIMPEXP_CORE wxGraphicsContext;
+class WXDLLIMPEXP_CORE wxGraphicsPath;
+class WXDLLIMPEXP_CORE wxGraphicsMatrix;
+class WXDLLIMPEXP_CORE wxGraphicsFigure;
+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
+ *
+ * angles : are measured in radians, 0.0 being in direction of positiv x axis, PI/2 being
+ * in direction of positive y axis.
+ */
+
+// Base class of all objects used for drawing in the new graphics API, the always point back to their
+// originating rendering engine, there is no dynamic unloading of a renderer currently allowed,
+// these references are not counted
+
+//
+// The data used by objects like graphics pens etc is ref counted, in order to avoid unnecessary expensive
+// duplication. Any operation on a shared instance that results in a modified state, uncouples this
+// instance from the other instances that were shared - using copy on write semantics
+//
+
+class WXDLLIMPEXP_CORE wxGraphicsObjectRefData : public wxObjectRefData
+{
+public :
+ wxGraphicsObjectRefData( wxGraphicsRenderer* renderer );
+ wxGraphicsObjectRefData( const wxGraphicsObjectRefData* data );
+ wxGraphicsRenderer* GetRenderer() const ;
+ virtual wxGraphicsObjectRefData* Clone() const ;
+
+protected :
+ wxGraphicsRenderer* m_renderer;
+} ;
+
+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() ;
+
+ bool IsNull() const ;
+
+ // returns the renderer that was used to create this instance, or NULL if it has not been initialized yet
+ wxGraphicsRenderer* GetRenderer() const ;
+ wxGraphicsObjectRefData* GetGraphicsData() const ;
+protected :
+ virtual wxObjectRefData* CreateRefData() const;
+ virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
+
+ DECLARE_DYNAMIC_CLASS(wxGraphicsObject)
+} ;
+
+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)
+} ;
+
+extern WXDLLEXPORT_DATA(wxGraphicsPen) wxNullGraphicsPen;
+
+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)
+} ;
+
+extern WXDLLEXPORT_DATA(wxGraphicsBrush) wxNullGraphicsBrush;
+
+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)
+} ;
+
+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
+{
+public :
+ wxGraphicsMatrixData( wxGraphicsRenderer* renderer) :
+ wxGraphicsObjectRefData(renderer) {}
+
+ virtual ~wxGraphicsMatrixData() {}
+
+ // concatenates the matrix
+ virtual void Concat( const wxGraphicsMatrixData *t ) = 0;
+
+ // sets the matrix to the respective values
+ virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0,
+ wxDouble tx=0.0, wxDouble ty=0.0) = 0;
+
+ // gets the component valuess of the matrix
+ virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL,
+ wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const = 0;
+
+ // makes this the inverse matrix
+ virtual void Invert() = 0;
+
+ // returns true if the elements of the transformation matrix are equal ?
+ virtual bool IsEqual( const wxGraphicsMatrixData* t) const = 0;
+
+ // return true if this is the identity matrix
+ virtual bool IsIdentity() const = 0;
+
+ //
+ // transformation
+ //
+
+ // add the translation to this matrix
+ virtual void Translate( wxDouble dx , wxDouble dy ) = 0;
+
+ // add the scale to this matrix
+ virtual void Scale( wxDouble xScale , wxDouble yScale ) = 0;
+
+ // add the rotation to this matrix (radians)
+ virtual void Rotate( wxDouble angle ) = 0;
+
+ //
+ // apply the transforms
+ //
+
+ // applies that matrix to the point
+ virtual void TransformPoint( wxDouble *x, wxDouble *y ) const = 0;
+
+ // applies the matrix except for translations
+ virtual void TransformDistance( wxDouble *dx, wxDouble *dy ) const =0;
+
+ // returns the native representation
+ virtual void * GetNativeMatrix() const = 0;
+} ;
+
+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() {}
+
+ // concatenates the matrix
+ virtual void Concat( const wxGraphicsMatrix *t );
+ void Concat( const wxGraphicsMatrix &t ) { Concat( &t ); }
+
+ // sets the matrix to the respective values
+ virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0,
+ wxDouble tx=0.0, wxDouble ty=0.0);
+
+ // gets the component valuess of the matrix
+ virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL,
+ wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const;
+
+ // makes this the inverse matrix
+ virtual void Invert();
+
+ // returns true if the elements of the transformation matrix are equal ?
+ virtual bool IsEqual( const wxGraphicsMatrix* t) const;
+ bool IsEqual( const wxGraphicsMatrix& t) const { return IsEqual( &t ); }
+
+ // return true if this is the identity matrix
+ virtual bool IsIdentity() const;
+
+ //
+ // transformation
+ //
+
+ // add the translation to this matrix
+ virtual void Translate( wxDouble dx , wxDouble dy );
+
+ // add the scale to this matrix
+ virtual void Scale( wxDouble xScale , wxDouble yScale );
+
+ // add the rotation to this matrix (radians)
+ virtual void Rotate( wxDouble angle );
+
+ //
+ // apply the transforms
+ //
+
+ // applies that matrix to the point
+ virtual void TransformPoint( wxDouble *x, wxDouble *y ) const;
+
+ // applies the matrix except for translations
+ virtual void TransformDistance( wxDouble *dx, wxDouble *dy ) const;
+
+ // returns the native representation
+ virtual void * GetNativeMatrix() const;
+
+ const wxGraphicsMatrixData* GetMatrixData() const
+ { return (const wxGraphicsMatrixData*) GetRefData(); }
+ wxGraphicsMatrixData* GetMatrixData()
+ { return (wxGraphicsMatrixData*) GetRefData(); }
+
+private :
+ DECLARE_DYNAMIC_CLASS(wxGraphicsMatrix)
+} ;
+
+extern WXDLLEXPORT_DATA(wxGraphicsMatrix) wxNullGraphicsMatrix;
+
+class WXDLLIMPEXP_CORE wxGraphicsPathData : public wxGraphicsObjectRefData
+{
+public :
+ wxGraphicsPathData(wxGraphicsRenderer* renderer) : wxGraphicsObjectRefData(renderer) {}
+ virtual ~wxGraphicsPathData() {}
+
+ //
+ // These are the path primitives from which everything else can be constructed
+ //
+
+ // begins a new subpath at (x,y)
+ virtual void MoveToPoint( wxDouble x, wxDouble y ) = 0;
+
+ // adds a straight line from the current point to (x,y)
+ virtual void AddLineToPoint( wxDouble x, wxDouble y ) = 0;
+
+ // adds a cubic Bezier curve from the current point, using two control points and an end point
+ virtual void AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) = 0;
+
+ // adds another path
+ virtual void AddPath( const wxGraphicsPathData* path ) =0;
+
+ // closes the current sub-path
+ virtual void CloseSubpath() = 0;
+
+ // gets the last point of the current path, (0,0) if not yet set
+ virtual void GetCurrentPoint( wxDouble* x, wxDouble* y) const = 0;
+
+ // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle
+ virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ) = 0;
+
+ //
+ // These are convenience functions which - if not available natively will be assembled
+ // using the primitives from above
+ //
+
+ // adds a quadratic Bezier curve from the current point, using a control point and an end point
+ virtual void AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y );
+
+ // appends a rectangle as a new closed subpath
+ virtual void AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h );
+
+ // appends an ellipsis as a new closed subpath fitting the passed rectangle
+ virtual void AddCircle( wxDouble x, wxDouble y, wxDouble r );
+
+ // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)
+ virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ;
+
+ // appends an ellipse
+ virtual void AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+
+ // appends a rounded rectangle
+ virtual void AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius);
+
+ // returns the native path
+ virtual void * GetNativePath() const = 0;
+
+ // give the native path returned by GetNativePath() back (there might be some deallocations necessary)
+ virtual void UnGetNativePath(void *p) const= 0;
+
+ // transforms each point of this path by the matrix
+ virtual void Transform( const wxGraphicsMatrixData* matrix ) =0;
+
+ // gets the bounding box enclosing all points (possibly including control points)
+ virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const=0;
+
+ virtual bool Contains( wxDouble x, wxDouble y, int fillStyle = wxODDEVEN_RULE) const=0;
+};
+
+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() {}
+
+ //
+ // These are the path primitives from which everything else can be constructed
+ //
+
+ // begins a new subpath at (x,y)
+ virtual void MoveToPoint( wxDouble x, wxDouble y );
+ void MoveToPoint( const wxPoint2DDouble& p);
+
+ // adds a straight line from the current point to (x,y)
+ virtual void AddLineToPoint( wxDouble x, wxDouble y );
+ void AddLineToPoint( const wxPoint2DDouble& p);
+
+ // adds a cubic Bezier curve from the current point, using two control points and an end point
+ virtual void AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) ;
+ void AddCurveToPoint( const wxPoint2DDouble& c1, const wxPoint2DDouble& c2, const wxPoint2DDouble& e);
+
+ // adds another path
+ virtual void AddPath( const wxGraphicsPath& path );
+
+ // closes the current sub-path
+ virtual void CloseSubpath() ;
+
+ // gets the last point of the current path, (0,0) if not yet set
+ virtual void GetCurrentPoint( wxDouble* x, wxDouble* y) const;
+ wxPoint2DDouble GetCurrentPoint() const;
+
+ // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle
+ virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ) ;
+ void AddArc( const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise);
+
+ //
+ // These are convenience functions which - if not available natively will be assembled
+ // using the primitives from above
+ //
+
+ // adds a quadratic Bezier curve from the current point, using a control point and an end point
+ virtual void AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y );
+
+ // appends a rectangle as a new closed subpath
+ virtual void AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h );
+
+ // appends an ellipsis as a new closed subpath fitting the passed rectangle
+ virtual void AddCircle( wxDouble x, wxDouble y, wxDouble r );
+
+ // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)
+ virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ;
+
+ // appends an ellipse
+ virtual void AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+
+ // appends a rounded rectangle
+ virtual void AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius);
+
+ // returns the native path
+ virtual void * GetNativePath() const;
+
+ // give the native path returned by GetNativePath() back (there might be some deallocations necessary)
+ virtual void UnGetNativePath(void *p)const;
+
+ // transforms each point of this path by the matrix
+ virtual void Transform( const wxGraphicsMatrix& matrix );
+
+ // gets the bounding box enclosing all points (possibly including control points)
+ virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h)const;
+ wxRect2DDouble GetBox()const;
+
+ virtual bool Contains( wxDouble x, wxDouble y, int fillStyle = wxODDEVEN_RULE)const;
+ bool Contains( const wxPoint2DDouble& c, int fillStyle = wxODDEVEN_RULE)const;
+
+ const wxGraphicsPathData* GetPathData() const
+ { return (const wxGraphicsPathData*) GetRefData(); }
+ wxGraphicsPathData* GetPathData()
+ { return (wxGraphicsPathData*) GetRefData(); }
+
+private :
+ DECLARE_DYNAMIC_CLASS(wxGraphicsPath)
+} ;
+
+extern WXDLLEXPORT_DATA(wxGraphicsPath) wxNullGraphicsPath;
+
+
+class WXDLLIMPEXP_CORE wxGraphicsContext : public wxGraphicsObject
+{
+public:
+ wxGraphicsContext(wxGraphicsRenderer* renderer);
+
+ virtual ~wxGraphicsContext();
+
+ static wxGraphicsContext* Create( const wxWindowDC& dc) ;
+
+#ifdef __WXMSW__
+ static wxGraphicsContext * Create( const wxMemoryDC& dc) ;
+#endif
+
+ static wxGraphicsContext* CreateFromNative( void * context ) ;
+
+ static wxGraphicsContext* CreateFromNativeWindow( void * window ) ;
+
+ static wxGraphicsContext* Create( wxWindow* window ) ;
+
+ // create a context that can be used for measuring texts only, no drawing allowed
+ static wxGraphicsContext * Create();
+
+ wxGraphicsPath CreatePath() const;
+
+ virtual wxGraphicsPen CreatePen(const wxPen& pen) const;
+
+ virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) const;
+
+ // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
+ virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
+ const wxColour&c1, const wxColour&c2) const;
+
+ // sets the brush to a radial gradient originating at (xo,yc) with color oColor and ends on a circle around (xc,yc)
+ // with radius r and color cColor
+ virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius,
+ const wxColour &oColor, const wxColour &cColor) const;
+
+ // 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,
+ wxDouble tx=0.0, wxDouble ty=0.0) const;
+
+ // push the current state of the context, ie the transformation matrix on a stack
+ virtual void PushState() = 0;
+
+ // pops a stored state from the stack
+ virtual void PopState() = 0;
+
+ // clips drawings to the region intersected with the current clipping region
+ virtual void Clip( const wxRegion ®ion ) = 0;
+
+ // clips drawings to the rect intersected with the current clipping region
+ virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0;
+
+ // resets the clipping to original extent
+ virtual void ResetClip() = 0 ;
+
+ // returns the native context
+ virtual void * GetNativeContext() = 0;
+
+ // returns the current logical function
+ virtual int GetLogicalFunction() const { return m_logicalFunction; }
+
+ // sets the current logical function, returns true if it supported
+ virtual bool SetLogicalFunction(int function) ;
+
+ //
+ // transformation : changes the current transformation matrix CTM of the context
+ //
+
+ // translate
+ virtual void Translate( wxDouble dx , wxDouble dy ) = 0;
+
+ // scale
+ virtual void Scale( wxDouble xScale , wxDouble yScale ) = 0;
+
+ // rotate (radians)
+ virtual void Rotate( wxDouble angle ) = 0;
+
+ // concatenates this transform with the current transform of this context
+ virtual void ConcatTransform( const wxGraphicsMatrix& matrix ) = 0;
+
+ // sets the transform of this context
+ virtual void SetTransform( const wxGraphicsMatrix& matrix ) = 0;
+
+ // gets the matrix of this context
+ virtual wxGraphicsMatrix GetTransform() const = 0;
+ //
+ // setting the paint
+ //
+
+ // sets the pen
+ virtual void SetPen( const wxGraphicsPen& pen );
+
+ void SetPen( const wxPen& pen );
+
+ // sets the brush for filling
+ virtual void SetBrush( const wxGraphicsBrush& brush );
+
+ void SetBrush( const wxBrush& brush );
+
+ // sets the font
+ virtual void SetFont( const wxGraphicsFont& font );
+
+ void SetFont( const wxFont& font, const wxColour& colour );
+
+
+ // strokes along a path with the current pen
+ virtual void StrokePath( const wxGraphicsPath& path ) = 0;
+
+ // fills a path with the current brush
+ virtual void FillPath( const wxGraphicsPath& path, int fillStyle = wxODDEVEN_RULE ) = 0;
+
+ // draws a path by first filling and then stroking
+ virtual void DrawPath( const wxGraphicsPath& path, int fillStyle = wxODDEVEN_RULE );
+
+ //
+ // text
+ //
+
+ virtual void DrawText( const wxString &str, wxDouble x, wxDouble y ) = 0;
+
+ virtual void DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle );
+
+ virtual void DrawText( const wxString &str, wxDouble x, wxDouble y, const wxGraphicsBrush& backgroundBrush ) ;
+
+ virtual void DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle, const wxGraphicsBrush& backgroundBrush );
+
+ virtual void GetTextExtent( const wxString &text, wxDouble *width, wxDouble *height,
+ wxDouble *descent, wxDouble *externalLeading ) const = 0;
+
+ virtual void GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const = 0;
+
+ //
+ // 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;
+
+ //
+ // convenience methods
+ //
+
+ // strokes a single line
+ virtual void StrokeLine( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2);
+
+ // stroke lines connecting each of the points
+ virtual void StrokeLines( size_t n, const wxPoint2DDouble *points);
+
+ // stroke disconnected lines from begin to end points
+ virtual void StrokeLines( size_t n, const wxPoint2DDouble *beginPoints, const wxPoint2DDouble *endPoints);
+
+ // draws a polygon
+ virtual void DrawLines( size_t n, const wxPoint2DDouble *points, int fillStyle = wxODDEVEN_RULE );
+
+ // draws a polygon
+ virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+
+ // draws an ellipse
+ virtual void DrawEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+
+ // draws a rounded rectangle
+ virtual void DrawRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius);
+
+ // wrappers using wxPoint2DDouble TODO
+
+ // helper to determine if a 0.5 offset should be applied for the drawing operation
+ virtual bool ShouldOffset() const { return false; }
+
+protected :
+
+ wxGraphicsPen m_pen;
+ wxGraphicsBrush m_brush;
+ wxGraphicsFont m_font;
+ int m_logicalFunction;
+
+private :
+ DECLARE_NO_COPY_CLASS(wxGraphicsContext)
+ DECLARE_ABSTRACT_CLASS(wxGraphicsContext)
+};
+
+#if 0
+
+//
+// A graphics figure allows to cache path, pen etc creations, also will be a basis for layering/grouping elements
+//
+
+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() ;
+
+ void SetPath( wxGraphicsMatrix* matrix );
+
+ void SetMatrix( wxGraphicsPath* path);
+
+ // draws this object on the context
+ virtual void Draw( wxGraphicsContext* cg );
+
+ // returns the path of this object
+ wxGraphicsPath* GetPath() { return m_path; }
+
+ // returns the transformation matrix of this object, may be null if there is no transformation necessary
+ wxGraphicsMatrix* GetMatrix() { return m_matrix; }
+
+private :
+ wxGraphicsMatrix* m_matrix;
+ wxGraphicsPath* m_path;
+
+ DECLARE_DYNAMIC_CLASS(wxGraphicsFigure)
+} ;
+
+#endif
+
+//
+// The graphics renderer is the instance corresponding to the rendering engine used, eg there is ONE core graphics renderer
+// instance on OSX. This instance is pointed back to by all objects created by it. Therefore you can create eg additional
+// paths at any point from a given matrix etc.
+//
+
+class WXDLLIMPEXP_CORE wxGraphicsRenderer : public wxObject
+{
+public :
+ wxGraphicsRenderer() {}
+
+ virtual ~wxGraphicsRenderer() {}
+
+ static wxGraphicsRenderer* GetDefaultRenderer();
+
+ // Context
+
+ virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc) = 0 ;
+#ifdef __WXMSW__
+ virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0 ;
+#endif
+ virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;
+
+ virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ) = 0;
+
+ virtual wxGraphicsContext * CreateContext( wxWindow* window ) = 0;
+
+ // create a context that can be used for measuring texts only, no drawing allowed
+ virtual wxGraphicsContext * CreateMeasuringContext() = 0;
+
+ // Path
+
+ virtual wxGraphicsPath CreatePath() = 0;
+
+ // Matrix
+
+ virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0,
+ wxDouble tx=0.0, wxDouble ty=0.0) = 0;
+
+ // Paints
+
+ virtual wxGraphicsPen CreatePen(const wxPen& pen) = 0 ;
+
+ virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) = 0 ;
+
+ // sets the brush to a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
+ virtual wxGraphicsBrush CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2,
+ const wxColour&c1, const wxColour&c2) = 0;
+
+ // sets the brush to a radial gradient originating at (xo,yc) with color oColor and ends on a circle around (xc,yc)
+ // with radius r and color cColor
+ virtual wxGraphicsBrush CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius,
+ const wxColour &oColor, const wxColour &cColor) = 0;
+
+ // 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)
+} ;
+
+#endif
+
+#endif // _WX_GRAPHICS_H_
diff --git a/3rdparty/wxWidgets/include/wx/grid.h b/3rdparty/wxWidgets/include/wx/grid.h
new file mode 100644
index 0000000000..6c50126291
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/grid.h
@@ -0,0 +1,18 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/grid.h
+// Purpose: wxGrid base header
+// Author: Julian Smart
+// Modified by:
+// Created:
+// Copyright: (c) Julian Smart
+// RCS-ID: $Id: grid.h 33948 2005-05-04 18:57:50Z JS $
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GRID_H_BASE_
+#define _WX_GRID_H_BASE_
+
+#include "wx/generic/grid.h"
+
+#endif
+ // _WX_GRID_H_BASE_
diff --git a/3rdparty/wxWidgets/include/wx/gsocket.h b/3rdparty/wxWidgets/include/wx/gsocket.h
new file mode 100644
index 0000000000..83d8ee49b6
--- /dev/null
+++ b/3rdparty/wxWidgets/include/wx/gsocket.h
@@ -0,0 +1,184 @@
+/* -------------------------------------------------------------------------
+ * Project: GSocket (Generic Socket)
+ * Name: gsocket.h
+ * Author: Guilhem Lavaux
+ * Guillermo Rodriguez Garcia (maintainer)
+ * Copyright: (c) Guilhem Lavaux
+ * Licence: wxWindows Licence
+ * Purpose: GSocket include file (system independent)
+ * CVSID: $Id: gsocket.h 33948 2005-05-04 18:57:50Z JS $
+ * -------------------------------------------------------------------------
+ */
+
+#ifndef __GSOCKET_H
+#define __GSOCKET_H
+
+#ifndef __GSOCKET_STANDALONE__
+#include "wx/defs.h"
+
+#include "wx/dlimpexp.h" /* for WXDLLIMPEXP_NET */
+
+#endif
+
+#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
+
+#include
+
+/*
+ Including sys/types.h under cygwin results in the warnings about "fd_set
+ having been defined in sys/types.h" when winsock.h is included later and
+ doesn't seem to be necessary anyhow. It's not needed under Mac neither.
+ */
+#if !defined(__WXMAC__) && !defined(__CYGWIN__) && !defined(__WXWINCE__)
+#include