diff --git a/PropertySheets/Platform.props b/PropertySheets/Platform.props
index d7da893e1..8e043f9db 100644
--- a/PropertySheets/Platform.props
+++ b/PropertySheets/Platform.props
@@ -25,7 +25,7 @@
- WIN32;_WIN32;_WINDOWS;%(PreprocessorDefinitions)
+ WIN32;_WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)
diff --git a/Source/3rd Party/wx/art/wxwin16x16.xpm b/Source/3rd Party/wx/art/wxwin16x16.xpm
deleted file mode 100644
index ed1848ea7..000000000
--- a/Source/3rd Party/wx/art/wxwin16x16.xpm
+++ /dev/null
@@ -1,161 +0,0 @@
-/* XPM */
-static const char *const wxwin16x16_xpm[] = {
-"16 16 142 2",
-" c None",
-". c #7171C0",
-"+ c #7D7DC7",
-"@ c #8181CE",
-"# c #7979CE",
-"$ c #7171CE",
-"% c #6868CD",
-"& c #5050C0",
-"* c #7C7CCB",
-"= c #D3D3FC",
-"- c #C0C0FF",
-"; c #B1B1FF",
-"> c #A4A4FF",
-", c #9696FF",
-"' c #6B6BE3",
-") c #3E3EC0",
-"! c #7B7BD3",
-"~ c #CFCFFF",
-"{ c #A7A7FF",
-"] c #8989FF",
-"^ c #7B7BFF",
-"/ c #5E5EEB",
-"( c #3333BF",
-"_ c #6969D3",
-": c #BEBEFF",
-"< c #8E8EFF",
-"[ c #5E5EFF",
-"} c #4C4CFD",
-"| c #6464C6",
-"1 c #A4A478",
-"2 c #BFBF63",
-"3 c #BFBF5C",
-"4 c #BFBF56",
-"5 c #BFBF51",
-"6 c #C17474",
-"7 c #BF7070",
-"8 c #BF6969",
-"9 c #BF6363",
-"0 c #544AC7",
-"a c #A8A8FF",
-"b c #7070FF",
-"c c #5050FF",
-"d c #3F3FFF",
-"e c #8C8CBA",
-"f c #F6F6C8",
-"g c #FBFBBB",
-"h c #FBFBAE",
-"i c #FBFBA1",
-"j c #F9F993",
-"k c #D7D760",
-"l c #D28D8D",
-"m c #EEB8B8",
-"n c #EFAAAA",
-"o c #EF9E9E",
-"p c #7C5ABC",
-"q c #8D8DFF",
-"r c #4747FF",
-"s c #3535FF",
-"t c #2B2BFF",
-"u c #AAAAA7",
-"v c #FFFFD2",
-"w c #FFFFA9",
-"x c #FFFF9A",
-"y c #FFFF8D",
-"z c #FFFF80",
-"A c #E4E45B",
-"B c #E39F9F",
-"C c #FFCCCC",
-"D c #FFA9A9",
-"E c #FF9C9C",
-"F c #B469A0",
-"G c #3E3DE7",
-"H c #2828EF",
-"I c #1E1EEF",
-"J c #1515EF",
-"K c #A5A595",
-"L c #FFFFC2",
-"M c #FFFF8F",
-"N c #F7F765",
-"O c #F2F251",
-"P c #DBDB3A",
-"Q c #E48E8E",
-"R c #FFBABA",
-"S c #FF8E8E",
-"T c #FF8181",
-"U c #FF6868",
-"V c #E54D60",
-"W c #AC2E56",
-"X c #0B0BBF",
-"Y c #0606BF",
-"Z c #C8C85D",
-"` c #FEFEB1",
-" . c #FEFE74",
-".. c #F4F456",
-"+. c #EFEF42",
-"@. c #EFEF38",
-"#. c #D7D725",
-"$. c #E47676",
-"%. c #FFA8A8",
-"&. c #FF7373",
-"*. c #FF5555",
-"=. c #FF4343",
-"-. c #FF3939",
-";. c #DA2323",
-">. c #CFCF3C",
-",. c #F6F694",
-"'. c #F0F047",
-"). c #EFEF2E",
-"!. c #EFEF24",
-"~. c #D7D715",
-"{. c #E45757",
-"]. c #FF8888",
-"^. c #FF4646",
-"/. c #FF2F2F",
-"(. c #FF2525",
-"_. c #DA1414",
-":. c #C3C328",
-"<. c #EBEB55",
-"[. c #ECEC2F",
-"}. c #ECEC24",
-"|. c #ECEC1A",
-"1. c #EBEB10",
-"2. c #CDCD06",
-"3. c #DD3A3A",
-"4. c #FF6060",
-"5. c #FF1B1B",
-"6. c #FE1111",
-"7. c #D10707",
-"8. c #B8B819",
-"9. c #B7B715",
-"0. c #B7B710",
-"a. c #B7B70B",
-"b. c #B7B706",
-"c. c #B7B701",
-"d. c #B7B700",
-"e. c #BF1A1A",
-"f. c #CC1919",
-"g. c #CE1414",
-"h. c #CE0E0E",
-"i. c #CE0808",
-"j. c #C90202",
-"k. c #C00000",
-" ",
-" ",
-" . + @ # $ % & ",
-" * = - ; > , ' ) ",
-" ! ~ { , ] ^ / ( ",
-" _ : < ^ [ } | 1 2 3 4 5 ",
-"6 7 8 9 0 a b c d e f g h i j k ",
-"l m n o p q r s t u v w x y z A ",
-"B C D E F G H I J K L M z N O P ",
-"Q R S T U V W X Y Z ` ...+.@.#.",
-"$.%.&.*.=.-.;. >.,.'.@.).!.~.",
-"{.].^.-./.(._. :.<.[.}.|.1.2.",
-"3.4./.(.5.6.7. 8.9.0.a.b.c.d.",
-"e.f.g.h.i.j.k. ",
-" ",
-" "};
diff --git a/Source/3rd Party/wx/art/wxwin32x32.xpm b/Source/3rd Party/wx/art/wxwin32x32.xpm
deleted file mode 100644
index 25aed5e59..000000000
--- a/Source/3rd Party/wx/art/wxwin32x32.xpm
+++ /dev/null
@@ -1,442 +0,0 @@
-/* XPM */
-static const char *const wxwin32x32_xpm[] = {
-"32 32 407 2",
-" c None",
-". c #7373C1",
-"+ c #6E6EBF",
-"@ c #6B6BBF",
-"# c #6868BF",
-"$ c #6464BF",
-"% c #6161BF",
-"& c #5E5EBF",
-"* c #5A5ABF",
-"= c #5959C0",
-"- c #7171C0",
-"; c #7272C1",
-"> c #8686CE",
-", c #8686D0",
-"' c #8282D0",
-") c #7D7DD0",
-"! c #7979D0",
-"~ c #7575D0",
-"{ c #7171D0",
-"] c #6D6DD0",
-"^ c #6666CD",
-"/ c #5151C1",
-"( c #4C4CBF",
-"_ c #7171C1",
-": c #7272C2",
-"< c #C1C1F2",
-"[ c #D7D7FF",
-"} c #C9C9FF",
-"| c #C2C2FF",
-"1 c #BBBBFF",
-"2 c #B4B4FF",
-"3 c #AEAEFF",
-"4 c #A7A7FF",
-"5 c #A0A0FF",
-"6 c #9A9AFF",
-"7 c #8484F2",
-"8 c #4949C2",
-"9 c #4444C1",
-"0 c #6A6AC0",
-"a c #8989D4",
-"b c #DADAFF",
-"c c #C0C0FF",
-"d c #9393FF",
-"e c #8C8CFF",
-"f c #8686FF",
-"g c #5454D4",
-"h c #3E3EC0",
-"i c #6363BF",
-"j c #8686D8",
-"k c #D4D4FF",
-"l c #D2D2FF",
-"m c #7F7FFF",
-"n c #7878FF",
-"o c #4F4FD7",
-"p c #3737BF",
-"q c #5C5CBF",
-"r c #7D7DD8",
-"s c #CCCCFF",
-"t c #CACAFF",
-"u c #A8A8FF",
-"v c #7070FF",
-"w c #6B6BFF",
-"x c #4545D7",
-"y c #3030BF",
-"z c #5555BF",
-"A c #7373D8",
-"B c #C3C3FF",
-"C c #9C9CFF",
-"D c #8D8DFF",
-"E c #7777FF",
-"F c #6262FF",
-"G c #5252FF",
-"H c #4B4BFF",
-"I c #4848FF",
-"J c #3232D7",
-"K c #2626BF",
-"L c #4E4EBF",
-"M c #6A6AD8",
-"N c #B9B9FF",
-"O c #9090FF",
-"P c #6F6FFF",
-"Q c #5555FF",
-"R c #4646FF",
-"S c #4B4BF5",
-"T c #8282B4",
-"U c #93938E",
-"V c #B1B173",
-"W c #BFBF68",
-"X c #BFBF65",
-"Y c #BFBF62",
-"Z c #BFBF5E",
-"` c #BFBF5B",
-" . c #BFBF57",
-".. c #BFBF54",
-"+. c #BFBF51",
-"@. c #5858D8",
-"#. c #B2B2FF",
-"$. c #B1B1FF",
-"%. c #8484FF",
-"&. c #7272FF",
-"*. c #6767FF",
-"=. c #4F4FFF",
-"-. c #4747FF",
-";. c #4242FF",
-">. c #4141FA",
-",. c #ABAB8A",
-"'. c #E4E4AA",
-"). c #F5F5C3",
-"!. c #F6F6BE",
-"~. c #F6F6B7",
-"{. c #F6F6B1",
-"]. c #F6F6AB",
-"^. c #F6F6A5",
-"/. c #F6F69E",
-"(. c #F6F698",
-"_. c #F1F18C",
-":. c #D0D05F",
-"<. c #BFBF48",
-"[. c #C17474",
-"}. c #C07171",
-"|. c #BF6E6E",
-"1. c #BF6B6B",
-"2. c #BF6868",
-"3. c #BF6464",
-"4. c #BF6161",
-"5. c #7C498C",
-"6. c #4242D8",
-"7. c #A4A4FF",
-"8. c #5959FF",
-"9. c #3D3DFF",
-"0. c #3838FF",
-"a. c #6666CA",
-"b. c #DCDC98",
-"c. c #FFFFDD",
-"d. c #FFFFD7",
-"e. c #FFFFC0",
-"f. c #FFFFB8",
-"g. c #FFFFB2",
-"h. c #FFFFAB",
-"i. c #FFFFA4",
-"j. c #FFFF9D",
-"k. c #FFFF97",
-"l. c #FFFF90",
-"m. c #FBFB85",
-"n. c #C2C244",
-"o. c #C37676",
-"p. c #DA9B9B",
-"q. c #DF9F9F",
-"r. c #DF9A9A",
-"s. c #DF9494",
-"t. c #DF8F8F",
-"u. c #DF8A8A",
-"v. c #B47094",
-"w. c #3B3BD8",
-"x. c #9292FF",
-"y. c #5656FF",
-"z. c #3333FF",
-"A. c #2E2EFF",
-"B. c #7070B6",
-"C. c #E7E79F",
-"D. c #FFFFDE",
-"E. c #FFFFCF",
-"F. c #FFFFB5",
-"G. c #FFFF9E",
-"H. c #FFFF8A",
-"I. c #FFFF83",
-"J. c #FFFF7C",
-"K. c #C8C843",
-"L. c #C06D6D",
-"M. c #F1BEBE",
-"N. c #FFDBDB",
-"O. c #FFCBCB",
-"P. c #FFC0C0",
-"Q. c #FFBABA",
-"R. c #FFB3B3",
-"S. c #FFACAC",
-"T. c #CE89AC",
-"U. c #3333D7",
-"V. c #8787FF",
-"W. c #4D4DFF",
-"X. c #2929FF",
-"Y. c #2424FF",
-"Z. c #6B6BB3",
-"`. c #E7E795",
-" + c #FFFFC6",
-".+ c #FFFFA8",
-"++ c #FFFF76",
-"@+ c #FFFF6F",
-"#+ c #C8C83C",
-"$+ c #C77474",
-"%+ c #FFD3D3",
-"&+ c #FFDEDE",
-"*+ c #FFC4C4",
-"=+ c #FFA6A6",
-"-+ c #FF9F9F",
-";+ c #F3929A",
-">+ c #2F29C3",
-",+ c #4C4CFB",
-"'+ c #6868FF",
-")+ c #3939FF",
-"!+ c #1F1FFF",
-"~+ c #1A1AFF",
-"{+ c #6666B0",
-"]+ c #E7E78A",
-"^+ c #FFFFD0",
-"/+ c #FFFFBD",
-"(+ c #FFFF9B",
-"_+ c #FFFF91",
-":+ c #FAFA6E",
-"<+ c #F5F55F",
-"[+ c #F5F558",
-"}+ c #F7F756",
-"|+ c #C7C732",
-"1+ c #C86E6E",
-"2+ c #FFC9C9",
-"3+ c #FFD7D7",
-"4+ c #FFB8B8",
-"5+ c #FF9898",
-"6+ c #FF9292",
-"7+ c #FF8B8B",
-"8+ c #B16098",
-"9+ c #2420C6",
-"0+ c #2222DD",
-"a+ c #1F1FDF",
-"b+ c #1B1BDF",
-"c+ c #1818DF",
-"d+ c #1414DF",
-"e+ c #1010DF",
-"f+ c #0C0CDF",
-"g+ c #5F5F9C",
-"h+ c #E7E77F",
-"i+ c #FFFFC9",
-"j+ c #FFFFB4",
-"k+ c #FFFF8E",
-"l+ c #FFFF7D",
-"m+ c #FEFE75",
-"n+ c #F4F45D",
-"o+ c #EFEF4F",
-"p+ c #EFEF4A",
-"q+ c #EFEF44",
-"r+ c #EFEF3F",
-"s+ c #BFBF22",
-"t+ c #C86666",
-"u+ c #FFBFBF",
-"v+ c #FFD0D0",
-"w+ c #FFADAD",
-"x+ c #FF8484",
-"y+ c #FF7E7E",
-"z+ c #FF7373",
-"A+ c #E75F70",
-"B+ c #B0457F",
-"C+ c #9A3776",
-"D+ c #5F1D7C",
-"E+ c #0C0CBF",
-"F+ c #0909BF",
-"G+ c #0707BF",
-"H+ c #0404BF",
-"I+ c #878766",
-"J+ c #E6E674",
-"K+ c #FFFFC2",
-"L+ c #FFFF82",
-"M+ c #FEFE6E",
-"N+ c #F3F355",
-"O+ c #EFEF45",
-"P+ c #EFEF40",
-"Q+ c #EFEF3B",
-"R+ c #EFEF36",
-"S+ c #BFBF1C",
-"T+ c #C85F5F",
-"U+ c #FFB4B4",
-"V+ c #FFA2A2",
-"W+ c #FF7575",
-"X+ c #FF5E5E",
-"Y+ c #FF5050",
-"Z+ c #FF4A4A",
-"`+ c #FF4545",
-" @ c #E73535",
-".@ c #BF2121",
-"+@ c #B7B733",
-"@@ c #DCDC55",
-"#@ c #FDFDB7",
-"$@ c #FFFFA2",
-"%@ c #FFFF75",
-"&@ c #FCFC64",
-"*@ c #F2F24E",
-"=@ c #EFEF31",
-"-@ c #EFEF2C",
-";@ c #BFBF16",
-">@ c #C85656",
-",@ c #FFAAAA",
-"'@ c #FFC2C2",
-")@ c #FF9797",
-"!@ c #FF7777",
-"~@ c #FF6E6E",
-"{@ c #FF5454",
-"]@ c #FF4040",
-"^@ c #FF3B3B",
-"/@ c #E72C2C",
-"(@ c #BF1919",
-"_@ c #B7B72E",
-":@ c #DADA48",
-"<@ c #F7F7A6",
-"[@ c #F6F689",
-"}@ c #F2F254",
-"|@ c #EFEF27",
-"1@ c #EFEF22",
-"2@ c #BFBF10",
-"3@ c #C84040",
-"4@ c #FF9A9A",
-"5@ c #FFBBBB",
-"6@ c #FF7171",
-"7@ c #FF6666",
-"8@ c #FF4E4E",
-"9@ c #FF4646",
-"0@ c #FF4141",
-"a@ c #FF3C3C",
-"b@ c #FF3737",
-"c@ c #FF3232",
-"d@ c #E72424",
-"e@ c #BF1414",
-"f@ c #B7B729",
-"g@ c #DADA3F",
-"h@ c #F7F7A1",
-"i@ c #F4F480",
-"j@ c #F0F047",
-"k@ c #EFEF1D",
-"l@ c #EFEF18",
-"m@ c #BFBF0B",
-"n@ c #C83636",
-"o@ c #FFABAB",
-"p@ c #FF7676",
-"q@ c #FF2D2D",
-"r@ c #FF2828",
-"s@ c #E71C1C",
-"t@ c #BF0F0F",
-"u@ c #B7B724",
-"v@ c #D1D132",
-"w@ c #F4F478",
-"x@ c #EFEF13",
-"y@ c #ECEC0E",
-"z@ c #BABA05",
-"A@ c #C83030",
-"B@ c #FF6161",
-"C@ c #FF2323",
-"D@ c #FF1E1E",
-"E@ c #E71414",
-"F@ c #BF0A0A",
-"G@ c #B8B820",
-"H@ c #B9B91F",
-"I@ c #DADA2C",
-"J@ c #E9E931",
-"K@ c #EAEA2A",
-"L@ c #EAEA25",
-"M@ c #EAEA20",
-"N@ c #EAEA1C",
-"O@ c #EAEA17",
-"P@ c #EAEA12",
-"Q@ c #EAEA0D",
-"R@ c #E5E508",
-"S@ c #C7C703",
-"T@ c #B7B701",
-"U@ c #C52929",
-"V@ c #FF5858",
-"W@ c #FF1919",
-"X@ c #FF1414",
-"Y@ c #E30C0C",
-"Z@ c #BF0606",
-"`@ c #B8B819",
-" # c #B7B717",
-".# c #B7B714",
-"+# c #B7B711",
-"@# c #B7B70F",
-"## c #B7B70C",
-"$# c #B7B70A",
-"%# c #B7B707",
-" c #B7B705",
-"*# c #B7B702",
-"=# c #B7B700",
-"-# c #BF2020",
-";# c #E63131",
-"># c #FF5555",
-",# c #FF3A3A",
-"'# c #FF0F0F",
-")# c #FA0A0A",
-"!# c #C90303",
-"~# c #C00202",
-"{# c #C01C1C",
-"]# c #CB1B1B",
-"^# c #D01A1A",
-"/# c #D01616",
-"(# c #D01313",
-"_# c #D01010",
-":# c #D00D0D",
-"<# c #D00A0A",
-"[# c #D00707",
-"}# c #CF0303",
-"|# c #C30101",
-"1# c #C00000",
-"2# c #C21414",
-"3# c #BF1111",
-"4# c #BF0E0E",
-"5# c #BF0C0C",
-"6# c #BF0909",
-"7# c #BF0707",
-"8# c #BF0404",
-"9# c #BF0202",
-"0# c #C50000",
-" ",
-" ",
-" ",
-" ",
-" . + @ # $ % & * = ",
-" - ; > , ' ) ! ~ { ] ^ / ( ",
-" _ : < [ } | 1 2 3 4 5 6 7 8 9 ",
-" 0 a b b c 2 3 4 5 6 d e f g h ",
-" i j k l 2 4 5 6 d e f m n o p ",
-" q r s t u 6 d e f m n v w x y ",
-" z A B | C D f m E F G H I J K ",
-" L M 1 N O m n P Q H R S T U V W X Y Z ` ...+. ",
-" p @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.",
-" [.}.|.1.2.3.4.5.6.6 7.&.8.I ;.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.",
-"}.o.p.q.r.s.t.u.v.w.O x.y.;.9.0.z.A.B.C.D.E.F.h.i.G.k.l.H.I.J.K.",
-"L.M.N.O.P.Q.R.S.T.U.V.e W.0.z.A.X.Y.Z.`.d. +.+G.k.l.H.I.J.++@+#+",
-"$+%+&+*+R.S.=+-+;+>+,+'+)+A.X.Y.!+~+{+]+^+/+(+_+H.I.J.:+<+[+}+|+",
-"1+2+3+4+=+-+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+I.l+m+n+o+p+q+r+s+",
-"t+u+v+w+5+6+7+x+y+z+A+B+C+D+E+F+G+H+I+J+K+h.L+++M+N+p+O+P+Q+R+S+",
-"T+U+2+V+7+x+y+W+X+Y+Z+`+ @.@ +@@@#@$@%@&@*@O+P+Q+R+=@-@;@",
-">@,@'@)@y+!@~@{@Z+`+]@^@/@(@ _@:@<@[@}@O+P+Q+R+=@-@|@1@2@",
-"3@4@5@7+6@7@8@9@0@a@b@c@d@e@ f@g@h@i@j@Q+R+=@-@|@1@k@l@m@",
-"n@y+o@p@{@9@0@a@b@c@q@r@s@t@ u@v@i@w@Q+=@-@|@1@k@l@x@y@z@",
-"A@p@-+B@0@a@b@c@q@r@C@D@E@F@ G@H@I@J@K@L@M@N@O@P@Q@R@S@T@",
-"U@7@4@V@b@c@q@r@C@D@W@X@Y@Z@ `@ #.#+#@###$#%#*#=#=# ",
-"-#;#>#,#q@r@C@D@W@X@'#)#!#~# ",
-"{#(@]#^#/#(#_#:#<#[#}#|#1# ",
-" 2#3#4#5#6#7#8#9#1#0# ",
-" ",
-" ",
-" ",
-" "};
diff --git a/Source/3rd Party/wx/include/msvc/wx/setup.h b/Source/3rd Party/wx/include/msvc/wx/setup.h
index 97e3193f8..f00b8ec37 100644
--- a/Source/3rd Party/wx/include/msvc/wx/setup.h
+++ b/Source/3rd Party/wx/include/msvc/wx/setup.h
@@ -1,256 +1,241 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: msvc/wx/setup.h
+// 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
/////////////////////////////////////////////////////////////////////////////
-#ifndef _MSC_VER
- #error "This file should only be included when using Microsoft Visual C++"
-#endif
-
// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
// explicitly!
-#include "wx/version.h"
-#include "wx/cpp.h"
-
-// notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an
-// identifier as string concatenation is not done inside #include where we
-// need it
-#ifdef _DEBUG
- #define wxSUFFIX_DEBUG "d"
+#ifdef _MSC_VER
#ifdef _UNICODE
- #define wxSUFFIX ud
- #else // !_UNICODE
- #define wxSUFFIX d
- #endif // _UNICODE/!_UNICODE
-#else
- #define wxSUFFIX_DEBUG ""
- #ifdef _UNICODE
- #define wxSUFFIX u
- #else // !_UNICODE
- // don't define wxSUFFIX at all as preprocessor operations don't work
- // with empty values so we need to check for this case specially below
- #endif // _UNICODE/!_UNICODE
-#endif
-
-// compiler-specific prefix: by default it's always just "vc" for compatibility
-// reasons but if you use multiple MSVC versions you probably build them with
-// COMPILER_PREFIX=vcXX and in this case you may want to either predefine
-// wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate
-// version depending on the compiler used
-#ifdef wxMSVC_VERSION
- #define wxCOMPILER_PREFIX wxCONCAT(vc, wxMSVC_VERSION)
-#elif defined(wxMSVC_VERSION_AUTO)
- #if _MSC_VER == 1200
- #define wxCOMPILER_PREFIX vc60
- #elif _MSC_VER == 1300
- #define wxCOMPILER_PREFIX vc70
- #elif _MSC_VER == 1310
- #define wxCOMPILER_PREFIX vc71
- #elif _MSC_VER == 1400
- #define wxCOMPILER_PREFIX vc80
- #elif _MSC_VER == 1500
- #define wxCOMPILER_PREFIX vc90
- #elif _MSC_VER == 1600
- #define wxCOMPILER_PREFIX vc100
- #elif _MSC_VER == 1700
- #define wxCOMPILER_PREFIX vc110
- #elif _MSC_VER == 1800
- #define wxCOMPILER_PREFIX vc120
- #else
- #error "Unknown MSVC compiler version, please report to wx-dev."
- #endif
-#else
- #define wxCOMPILER_PREFIX vc
-#endif
-
-// architecture-specific part: not used (again, for compatibility), for x86
-#if defined(_M_X64)
- #define wxARCH_SUFFIX// _x64//Project64: Disable arch suffix.
-#elif defined(_M_IA64)
- #define wxARCH_SUFFIX// _ia64//Project64: Disable arch suffix.
-#else // assume _M_IX86
- #define wxARCH_SUFFIX
-#endif
-
-// Ensure the library configuration is defined
-#ifndef wxCFG
- #define wxCFG
-#endif
-
-// Construct the path for the subdirectory under /lib/ that the included setup.h
-// will be used from
-#ifdef WXUSINGDLL
- #define wxLIB_SUBDIR \
- wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll, wxCFG)
-#else // !DLL
- #define wxLIB_SUBDIR \
- wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib, wxCFG)
-#endif // DLL/!DLL
-
-// The user can predefine a different prefix if not using the default MSW port
-// with MSVC.
-#ifndef wxTOOLKIT_PREFIX
- #if defined(__WXGTK__)
- #define wxTOOLKIT_PREFIX gtk2
- #else
- #define wxTOOLKIT_PREFIX msw
- #endif
-#endif // wxTOOLKIT_PREFIX
-
-// the real setup.h header file we need is in the build-specific directory,
-// construct the path to it
-#ifdef wxSUFFIX
- #define wxSETUPH_PATH \
- wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
-#else // suffix is empty
- #define wxSETUPH_PATH \
- wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, /wx/setup.h)
-#endif
-
-#define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
-
-#include wxSETUPH_PATH_STR
-
-
-// the library names depend on the build, these macro builds the correct
-// library name for the given base name
-#ifdef wxSUFFIX
- #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX)
-#else // suffix is empty
- #define wxSUFFIX_STR ""
-#endif
-#define wxSHORT_VERSION_STRING \
- wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION)
-
-#define wxWX_LIB_NAME(name, subname) \
- "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname
-
-#define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name)
-#define wxTOOLKIT_LIB_NAME(name) wxWX_LIB_NAME(wxSTRINGIZE(wxTOOLKIT_PREFIX), "_" name)
-
-// This one is for 3rd party libraries: they don't have the version number
-// in their names and usually exist in ANSI version only (except for regex)
-//
-// 3rd party libraries are also are not linked in when using DLLs as they're
-// embedded inside our own DLLs and don't need to be linked with the user code.
-#define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG
-
-// special version for regex as it does have a Unicode version
-#define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR
-
-#pragma comment(lib, wxWX_LIB_NAME("base", ""))
-
-#ifndef wxNO_NET_LIB
- #ifndef WXUSINGDLL
- #pragma comment(lib, "wsock32")
- #endif
- #pragma comment(lib, wxBASE_LIB_NAME("net"))
-#endif
-#if wxUSE_XML && !defined(wxNO_XML_LIB)
- #pragma comment(lib, wxBASE_LIB_NAME("xml"))
-#endif
-#if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL)
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex"))
-#endif
-
-#if wxUSE_GUI
- #if wxUSE_XML && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL)
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat"))
- #endif
- #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB) && !defined(WXUSINGDLL)
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg"))
- #endif
- #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB) && !defined(WXUSINGDLL)
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png"))
- #endif
- #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB) && !defined(WXUSINGDLL)
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff"))
- #endif
- #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL)
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib"))
- #endif
-
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("core"))
-
- #ifndef wxNO_ADV_LIB
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("adv"))
- #endif
-
- #if wxUSE_HTML && !defined(wxNO_HTML_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("html"))
- #endif
- #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("gl"))
- #endif
- #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("qa"))
- #endif
- #if wxUSE_XRC && !defined(wxNO_XRC_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("xrc"))
- #endif
- #if wxUSE_AUI && !defined(wxNO_AUI_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("aui"))
- #endif
- #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("propgrid"))
- #endif
- #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("ribbon"))
- #endif
- #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("richtext"))
- #endif
- #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("media"))
- #endif
- #if wxUSE_STC && !defined(wxNO_STC_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
- #ifndef WXUSINGDLL
- #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla"))
+ #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
- #endif
- #if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB)
- #pragma comment(lib, wxTOOLKIT_LIB_NAME("webview"))
- #endif
-#endif // wxUSE_GUI
+ #ifdef _DEBUG
+ #pragma comment(lib,"wxbase28ud")
+ #pragma comment(lib,"wxbase28ud_net")
+ #pragma comment(lib,"wxbase28ud_xml")
+ #if wxUSE_REGEX
+ #pragma comment(lib,"wxregexud")
+ #endif
-#ifndef WXUSINGDLL
- // Make sure all required system libraries are added to the linker too when
- // using static libraries.
- #pragma comment(lib, "kernel32")
- #pragma comment(lib, "user32")
- #pragma comment(lib, "gdi32")
- #pragma comment(lib, "comdlg32")
- #pragma comment(lib, "winspool")
- #pragma comment(lib, "winmm")
- #pragma comment(lib, "shell32")
- #pragma comment(lib, "comctl32")
- #pragma comment(lib, "ole32")
- #pragma comment(lib, "oleaut32")
- #pragma comment(lib, "uuid")
- #pragma comment(lib, "rpcrt4")
- #pragma comment(lib, "advapi32")
- #if wxUSE_URL_NATIVE
- #pragma comment(lib, "wininet")
- #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")
+ #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_core")
+ #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")
+ #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_core")
+ #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
- #ifdef __WXGTK__
- #pragma comment(lib, "gtk-win32-2.0.lib")
- #pragma comment(lib, "gdk-win32-2.0.lib")
- #pragma comment(lib, "pangocairo-1.0.lib")
- #pragma comment(lib, "gdk_pixbuf-2.0.lib")
- #pragma comment(lib, "cairo.lib")
- #pragma comment(lib, "pango-1.0.lib")
- #pragma comment(lib, "gobject-2.0.lib")
- #pragma comment(lib, "gthread-2.0.lib")
- #pragma comment(lib, "glib-2.0.lib")
- #endif
-#endif // !WXUSINGDLL
diff --git a/Source/3rd Party/wx/include/wx/aboutdlg.h b/Source/3rd Party/wx/include/wx/aboutdlg.h
deleted file mode 100644
index 975b5def2..000000000
--- a/Source/3rd Party/wx/include/wx/aboutdlg.h
+++ /dev/null
@@ -1,169 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aboutdlg.h
-// Purpose: declaration of wxAboutDialog class
-// Author: Vadim Zeitlin
-// Created: 2006-10-07
-// 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 to wxApp::GetAppDisplayName()
- void SetName(const wxString& name) { m_name = name; }
- wxString GetName() const
- { return m_name.empty() ? wxTheApp->GetAppDisplayName() : m_name; }
-
- // version should contain program version without "version" word (e.g.,
- // "1.2" or "RC2") while longVersion may contain the full version including
- // "version" word (e.g., "Version 1.2" or "Release Candidate 2")
- //
- // if longVersion is empty, it is automatically constructed from version
- //
- // generic and gtk native: use short version only, as a suffix to the
- // program name msw and osx native: use long version
- void SetVersion(const wxString& version,
- const wxString& longVersion = wxString());
-
- bool HasVersion() const { return !m_version.empty(); }
- const wxString& GetVersion() const { return m_version; }
- const wxString& GetLongVersion() const { return m_longVersion; }
-
- // brief, but possibly multiline, description of the program
- void SetDescription(const wxString& desc) { m_description = desc; }
- bool HasDescription() const { return !m_description.empty(); }
- const 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(); }
- const 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(); }
- const 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.IsOk(); }
- 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(); }
-
- const wxString& GetWebSiteURL() const { return m_url; }
- const 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;
-
- // returns the copyright with the (C) string substituted by the Unicode
- // character U+00A9
- wxString GetCopyrightToDisplay() const;
-
-private:
- wxString m_name,
- m_version,
- m_longVersion,
- 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, wxWindow* parent = NULL);
-
-#endif // wxUSE_ABOUTDLG
-
-#endif // _WX_ABOUTDLG_H_
-
diff --git a/Source/3rd Party/wx/include/wx/accel.h b/Source/3rd Party/wx/include/wx/accel.h
index a162db3a5..49d14ec2a 100644
--- a/Source/3rd Party/wx/include/wx/accel.h
+++ b/Source/3rd Party/wx/include/wx/accel.h
@@ -4,6 +4,7 @@
// Author: Julian Smart, Robert Roebling, Vadim Zeitlin
// Modified by:
// Created: 31.05.01 (extracted from other files)
+// RCS-ID: $Id: accel.h 66927 2011-02-16 23:27:30Z JS $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -26,25 +27,24 @@ class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
// ----------------------------------------------------------------------------
// wxAcceleratorEntry flags
-enum wxAcceleratorEntryFlags
+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_RAW_CTRL= 0x0008, //
+ wxACCEL_CMD = 0x0008 // Command key on OS X
#else
- wxACCEL_RAW_CTRL= wxACCEL_CTRL,
+ wxACCEL_CMD = wxACCEL_CTRL
#endif
- wxACCEL_CMD = wxACCEL_CTRL
};
// ----------------------------------------------------------------------------
// an entry in wxAcceleratorTable corresponds to one accelerator
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxAcceleratorEntry
+class WXDLLEXPORT wxAcceleratorEntry
{
public:
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
@@ -68,8 +68,7 @@ public:
wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
{
- if (&entry != this)
- Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
+ Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
return *this;
}
@@ -107,7 +106,7 @@ public:
bool IsOk() const
{
- return m_keyCode != 0;
+ return m_keyCode != 0;
}
@@ -116,13 +115,8 @@ public:
// returns a wxString for the this accelerator.
// this function formats it using the - format
- // where maybe a hyphen-separated list of "shift|alt|ctrl"
- wxString ToString() const { return AsPossiblyLocalizedString(true); }
-
- // same as above but without translating, useful if the string is meant to
- // be stored in a file or otherwise stored, instead of being shown to the
- // user
- wxString ToRawString() const { return AsPossiblyLocalizedString(false); }
+ // 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)
@@ -130,8 +124,6 @@ public:
private:
- wxString AsPossiblyLocalizedString(bool localized) const;
-
// common part of Create() and FromString()
static bool ParseAccel(const wxString& str, int *flags, int *keycode);
@@ -163,14 +155,14 @@ private:
#elif defined(__WXGTK__)
#include "wx/gtk1/accel.h"
#elif defined(__WXMAC__)
- #include "wx/osx/accel.h"
+ #include "wx/mac/accel.h"
#elif defined(__WXCOCOA__)
#include "wx/generic/accel.h"
#elif defined(__WXPM__)
#include "wx/os2/accel.h"
#endif
-extern WXDLLIMPEXP_DATA_CORE(wxAcceleratorTable) wxNullAcceleratorTable;
+extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable;
#endif // wxUSE_ACCEL
diff --git a/Source/3rd Party/wx/include/wx/access.h b/Source/3rd Party/wx/include/wx/access.h
deleted file mode 100644
index 70cbaf138..000000000
--- a/Source/3rd Party/wx/include/wx/access.h
+++ /dev/null
@@ -1,376 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/access.h
-// Purpose: Accessibility classes
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-02-12
-// 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 WXDLLIMPEXP_CORE wxAccessibleBase : public wxObject
-{
- wxDECLARE_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/Source/3rd Party/wx/include/wx/affinematrix2d.h b/Source/3rd Party/wx/include/wx/affinematrix2d.h
deleted file mode 100644
index 28055f8d3..000000000
--- a/Source/3rd Party/wx/include/wx/affinematrix2d.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/affinematrix2d.h
-// Purpose: wxAffineMatrix2D class.
-// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart
-// Created: 2011-04-05
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_AFFINEMATRIX2D_H_
-#define _WX_AFFINEMATRIX2D_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_GEOMETRY
-
-#include "wx/affinematrix2dbase.h"
-
-// A simple implementation of wxAffineMatrix2DBase interface done entirely in
-// wxWidgets.
-class WXDLLIMPEXP_CORE wxAffineMatrix2D : public wxAffineMatrix2DBase
-{
-public:
- wxAffineMatrix2D() : m_11(1), m_12(0),
- m_21(0), m_22(1),
- m_tx(0), m_ty(0)
- {
- }
-
- // Implement base class pure virtual methods.
- virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr);
- virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const;
- virtual void Concat(const wxAffineMatrix2DBase& t);
- virtual bool Invert();
- virtual bool IsIdentity() const;
- virtual bool IsEqual(const wxAffineMatrix2DBase& t) const;
- virtual void Translate(wxDouble dx, wxDouble dy);
- virtual void Scale(wxDouble xScale, wxDouble yScale);
- virtual void Rotate(wxDouble cRadians);
-
-protected:
- virtual wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const;
- virtual wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const;
-
-private:
- wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty;
-};
-
-#endif // wxUSE_GEOMETRY
-
-#endif // _WX_AFFINEMATRIX2D_H_
diff --git a/Source/3rd Party/wx/include/wx/affinematrix2dbase.h b/Source/3rd Party/wx/include/wx/affinematrix2dbase.h
deleted file mode 100644
index 94b1955aa..000000000
--- a/Source/3rd Party/wx/include/wx/affinematrix2dbase.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/affinematrix2dbase.h
-// Purpose: Common interface for 2D transformation matrices.
-// Author: Catalin Raceanu
-// Created: 2011-04-06
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_AFFINEMATRIX2DBASE_H_
-#define _WX_AFFINEMATRIX2DBASE_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_GEOMETRY
-
-#include "wx/geometry.h"
-
-struct wxMatrix2D
-{
- wxMatrix2D(wxDouble v11 = 1,
- wxDouble v12 = 0,
- wxDouble v21 = 0,
- wxDouble v22 = 1)
- {
- m_11 = v11; m_12 = v12;
- m_21 = v21; m_22 = v22;
- }
-
- wxDouble m_11, m_12, m_21, m_22;
-};
-
-// A 2x3 matrix representing an affine 2D transformation.
-//
-// This is an abstract base class implemented by wxAffineMatrix2D only so far,
-// but in the future we also plan to derive wxGraphicsMatrix from it (it should
-// also be documented then as currently only wxAffineMatrix2D itself is).
-class WXDLLIMPEXP_CORE wxAffineMatrix2DBase
-{
-public:
- wxAffineMatrix2DBase() {}
- virtual ~wxAffineMatrix2DBase() {}
-
- // sets the matrix to the respective values
- virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr) = 0;
-
- // gets the component valuess of the matrix
- virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const = 0;
-
- // concatenates the matrix
- virtual void Concat(const wxAffineMatrix2DBase& t) = 0;
-
- // makes this the inverse matrix
- virtual bool Invert() = 0;
-
- // return true if this is the identity matrix
- virtual bool IsIdentity() const = 0;
-
- // returns true if the elements of the transformation matrix are equal ?
- virtual bool IsEqual(const wxAffineMatrix2DBase& t) const = 0;
- bool operator==(const wxAffineMatrix2DBase& t) const { return IsEqual(t); }
- bool operator!=(const wxAffineMatrix2DBase& t) const { return !IsEqual(t); }
-
-
- //
- // transformations
- //
-
- // 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 (counter clockwise, radians)
- virtual void Rotate(wxDouble ccRadians) = 0;
-
- // add mirroring to this matrix
- void Mirror(int direction = wxHORIZONTAL)
- {
- wxDouble x = (direction & wxHORIZONTAL) ? -1 : 1;
- wxDouble y = (direction & wxVERTICAL) ? -1 : 1;
- Scale(x, y);
- }
-
-
- // applies that matrix to the point
- wxPoint2DDouble TransformPoint(const wxPoint2DDouble& src) const
- {
- return DoTransformPoint(src);
- }
-
- void TransformPoint(wxDouble* x, wxDouble* y) const
- {
- wxCHECK_RET( x && y, "Can't be NULL" );
-
- const wxPoint2DDouble dst = DoTransformPoint(wxPoint2DDouble(*x, *y));
- *x = dst.m_x;
- *y = dst.m_y;
- }
-
- // applies the matrix except for translations
- wxPoint2DDouble TransformDistance(const wxPoint2DDouble& src) const
- {
- return DoTransformDistance(src);
- }
-
- void TransformDistance(wxDouble* dx, wxDouble* dy) const
- {
- wxCHECK_RET( dx && dy, "Can't be NULL" );
-
- const wxPoint2DDouble
- dst = DoTransformDistance(wxPoint2DDouble(*dx, *dy));
- *dx = dst.m_x;
- *dy = dst.m_y;
- }
-
-protected:
- virtual
- wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const = 0;
- virtual
- wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const = 0;
-};
-
-#endif // wxUSE_GEOMETRY
-
-#endif // _WX_AFFINEMATRIX2DBASE_H_
diff --git a/Source/3rd Party/wx/include/wx/afterstd.h b/Source/3rd Party/wx/include/wx/afterstd.h
index 48b767652..78d3a7009 100644
--- a/Source/3rd Party/wx/include/wx/afterstd.h
+++ b/Source/3rd Party/wx/include/wx/afterstd.h
@@ -1,9 +1,10 @@
///////////////////////////////////////////////////////////////////////////////
-// Name: wx/afterstd.h
+// Name: include/wx/afterstd.h
// Purpose: #include after STL headers
// Author: Vadim Zeitlin
// Modified by:
// Created: 07/07/03
+// RCS-ID: $Id: afterstd.h 61871 2009-09-09 22:29:51Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -12,7 +13,7 @@
See the comments in beforestd.h.
*/
-#if defined(__WINDOWS__)
+#if defined(__WXMSW__)
#include "wx/msw/winundef.h"
#endif
@@ -20,6 +21,13 @@
#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
@@ -38,7 +46,26 @@
#endif
#endif
-// see beforestd.h for explanation
-#if defined(HAVE_VISIBILITY) && defined(HAVE_BROKEN_LIBSTDCXX_VISIBILITY)
- #pragma GCC visibility pop
-#endif
+/*
+ Redefine _T if we undefined it in wx/beforestd.h (see comment there about
+ why do we do it) and if we need it (we always do when building wx itself
+ and might also need when compiling the user code but this must be indicated
+ by the special wxNEEDS__T macro)
+ */
+#if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
+ #if defined(WXBUILDING) || defined(wxNEEDS_T)
+ /*
+ Undefine _T in case it was defined in the standard header.
+ */
+ #undef _T
+
+ /*
+ And define it again in the same way as it's done in wx/wxchar.h.
+ */
+ #if wxUSE_UNICODE
+ #define _T(x) wxCONCAT_HELPER(L, x)
+ #else /* !Unicode */
+ #define _T(x) x
+ #endif /* Unicode/!Unicode */
+ #endif /* we need _T() to be defined */
+#endif /* defined(__SUNPRO_CC) || defined(__SUNPRO_C) */
diff --git a/Source/3rd Party/wx/include/wx/anidecod.h b/Source/3rd Party/wx/include/wx/anidecod.h
index f5eb6fbf0..6e3847614 100644
--- a/Source/3rd Party/wx/include/wx/anidecod.h
+++ b/Source/3rd Party/wx/include/wx/anidecod.h
@@ -2,6 +2,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -11,7 +12,7 @@
#include "wx/defs.h"
-#if wxUSE_STREAMS && (wxUSE_ICO_CUR || wxUSE_GIF)
+#if wxUSE_STREAMS && wxUSE_ICO_CUR
#include "wx/stream.h"
#include "wx/image.h"
@@ -19,7 +20,7 @@
#include "wx/dynarray.h"
-class /*WXDLLIMPEXP_CORE*/ wxANIFrameInfo; // private implementation detail
+class /*WXDLLEXPORT*/ wxANIFrameInfo;
WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
@@ -28,7 +29,7 @@ WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
// wxANIDecoder class
// --------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxANIDecoder : public wxAnimationDecoder
+class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
{
public:
// constructor, destructor, etc.
@@ -43,7 +44,7 @@ public:
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;
@@ -54,10 +55,6 @@ public:
{ return wxANIMATION_TYPE_ANI; }
private:
- // wxAnimationDecoder pure virtual:
- virtual bool DoCanRead( wxInputStream& stream ) const;
- // modifies current stream position (see wxAnimationDecoder::CanRead)
-
// 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.
@@ -71,10 +68,10 @@ private:
static wxCURHandler sm_handler;
- wxDECLARE_NO_COPY_CLASS(wxANIDecoder);
+ DECLARE_NO_COPY_CLASS(wxANIDecoder)
};
-#endif // wxUSE_STREAMS && (wxUSE_ICO_CUR || wxUSE_GIF)
+#endif // wxUSE_STREAM && wxUSE_ICO_CUR
#endif // _WX_ANIDECOD_H
diff --git a/Source/3rd Party/wx/include/wx/animate.h b/Source/3rd Party/wx/include/wx/animate.h
deleted file mode 100644
index 6243fb456..000000000
--- a/Source/3rd Party/wx/include/wx/animate.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/animate.h
-// Purpose: wxAnimation and wxAnimationCtrl
-// Author: Julian Smart and Guillermo Rodriguez Garcia
-// Modified by: Francesco Montorsi
-// Created: 13/8/99
-// 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 char) wxAnimationCtrlNameStr[];
-
-
-// ----------------------------------------------------------------------------
-// wxAnimationBase
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxAnimationBase : public wxObject
-{
-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 (wxBORDER_NONE)
-
-class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl
-{
-public:
- wxAnimationCtrlBase() { }
-
- // public API
- virtual bool LoadFile(const wxString& filename,
- wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
- virtual bool Load(wxInputStream& stream,
- 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/Source/3rd Party/wx/include/wx/animdecod.h b/Source/3rd Party/wx/include/wx/animdecod.h
index 39c31d323..a1cb15eaa 100644
--- a/Source/3rd Party/wx/include/wx/animdecod.h
+++ b/Source/3rd Party/wx/include/wx/animdecod.h
@@ -2,6 +2,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -15,9 +16,8 @@
#include "wx/colour.h"
#include "wx/gdicmn.h"
-#include "wx/log.h"
-#include "wx/stream.h"
+class WXDLLIMPEXP_FWD_BASE wxInputStream;
class WXDLLIMPEXP_FWD_CORE wxImage;
/*
@@ -30,15 +30,15 @@ class WXDLLIMPEXP_FWD_CORE wxImage;
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 it on the screen.
+ and time required to blit in on the screen.
- 2) wxAnimationDecoders contain the animation data in some internal variable.
+ 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 they do not support save features.
+ 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
@@ -61,11 +61,11 @@ enum wxAnimationDisposal
// 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
+ // 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
+ // 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
};
@@ -84,37 +84,19 @@ enum wxAnimationType
// wxAnimationDecoder class
// --------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxAnimationDecoder : public wxObjectRefData
+class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData
{
public:
wxAnimationDecoder()
{
+ m_background = wxNullColour;
m_nFrames = 0;
}
+ virtual ~wxAnimationDecoder() { }
+
virtual bool Load( wxInputStream& stream ) = 0;
-
- bool CanRead( wxInputStream& stream ) const
- {
- // NOTE: this code is the same of wxImageHandler::CallDoCanRead
-
- if ( !stream.IsSeekable() )
- return false; // can't test unseekable stream
-
- wxFileOffset posOld = stream.TellI();
- bool ok = DoCanRead(stream);
-
- // restore the old position to be able to test other formats and so on
- if ( stream.SeekI(posOld) == wxInvalidOffset )
- {
- wxLogDebug(wxT("Failed to rewind the stream in wxAnimationDecoder!"));
-
- // reading would fail anyhow as we're not at the right position
- return false;
- }
-
- return ok;
- }
+ virtual bool CanRead( wxInputStream& stream ) const = 0;
virtual wxAnimationDecoder *Clone() const = 0;
virtual wxAnimationType GetType() const = 0;
@@ -150,12 +132,6 @@ public:
unsigned int GetFrameCount() const { return m_nFrames; }
protected:
- // checks the signature of the data in the given stream and returns true if it
- // appears to be a valid animation format recognized by the animation decoder;
- // this function should modify the stream current position without taking care
- // of restoring it since CanRead() will do it.
- virtual bool DoCanRead(wxInputStream& stream) const = 0;
-
wxSize m_szAnimation;
unsigned int m_nFrames;
@@ -164,7 +140,7 @@ protected:
wxColour m_background;
};
-#endif // wxUSE_STREAMS
+#endif // wxUSE_STREAM
#endif // _WX_ANIMDECOD_H
diff --git a/Source/3rd Party/wx/include/wx/any.h b/Source/3rd Party/wx/include/wx/any.h
deleted file mode 100644
index c2cd7a79f..000000000
--- a/Source/3rd Party/wx/include/wx/any.h
+++ /dev/null
@@ -1,1113 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/any.h
-// Purpose: wxAny class
-// Author: Jaakko Salli
-// Modified by:
-// Created: 07/05/2009
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ANY_H_
-#define _WX_ANY_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_ANY
-
-#include // for placement new
-#include "wx/string.h"
-#include "wx/meta/if.h"
-#include "wx/typeinfo.h"
-#include "wx/list.h"
-
-// Size of the wxAny value buffer.
-enum
-{
- WX_ANY_VALUE_BUFFER_SIZE = 16
-};
-
-union wxAnyValueBuffer
-{
- union Alignment
- {
- #if wxHAS_INT64
- wxInt64 m_int64;
- #endif
- long double m_longDouble;
- void ( *m_funcPtr )(void);
- void ( wxAnyValueBuffer::*m_mFuncPtr )(void);
- } m_alignment;
-
- void* m_ptr;
- wxByte m_buffer[WX_ANY_VALUE_BUFFER_SIZE];
-};
-
-//
-// wxAnyValueType is base class for value type functionality for C++ data
-// types used with wxAny. Usually the default template (wxAnyValueTypeImpl<>)
-// will create a satisfactory wxAnyValueType implementation for a data type.
-//
-class WXDLLIMPEXP_BASE wxAnyValueType
-{
- WX_DECLARE_ABSTRACT_TYPEINFO(wxAnyValueType)
-public:
- /**
- Default constructor.
- */
- wxAnyValueType()
- {
- }
-
- /**
- Destructor.
- */
- virtual ~wxAnyValueType()
- {
- }
-
- /**
- This function is used for internal type matching.
- */
- virtual bool IsSameType(const wxAnyValueType* otherType) const = 0;
-
- /**
- This function is called every time the data in wxAny
- buffer needs to be freed.
- */
- virtual void DeleteValue(wxAnyValueBuffer& buf) const = 0;
-
- /**
- Implement this for buffer-to-buffer copy.
-
- @param src
- This is the source data buffer.
-
- @param dst
- This is the destination data buffer that is in either
- uninitialized or freed state.
- */
- virtual void CopyBuffer(const wxAnyValueBuffer& src,
- wxAnyValueBuffer& dst) const = 0;
-
- /**
- Convert value into buffer of different type. Return false if
- not possible.
- */
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const = 0;
-
- /**
- Use this template function for checking if wxAnyValueType represents
- a specific C++ data type.
-
- @remarks This template function does not work on some older compilers
- (such as Visual C++ 6.0). For full compiler compatibility
- please use wxANY_VALUE_TYPE_CHECK_TYPE(valueTypePtr, T) macro
- instead.
-
- @see wxAny::CheckType()
- */
- // FIXME-VC6: remove this hack when VC6 is no longer supported
- template
- bool CheckType(T* reserved = NULL) const;
-
-#if wxUSE_EXTENDED_RTTI
- virtual const wxTypeInfo* GetTypeInfo() const = 0;
-#endif
-private:
-};
-
-
-//
-// We need to allocate wxAnyValueType instances in heap, and need to use
-// scoped ptr to properly deallocate them in dynamic library use cases.
-// Here we have a minimal specialized scoped ptr implementation to deal
-// with various compiler-specific problems with template class' static
-// member variable of template type with explicit constructor which
-// is initialized in global scope.
-//
-class wxAnyValueTypeScopedPtr
-{
-public:
- wxAnyValueTypeScopedPtr(wxAnyValueType* ptr) : m_ptr(ptr) { }
- ~wxAnyValueTypeScopedPtr() { delete m_ptr; }
- wxAnyValueType* get() const { return m_ptr; }
-private:
- wxAnyValueType* m_ptr;
-};
-
-
-//
-// This method of checking the type is compatible with VC6
-#define wxANY_VALUE_TYPE_CHECK_TYPE(valueTypePtr, T) \
- wxAnyValueTypeImpl::IsSameClass(valueTypePtr)
-
-
-/**
- Helper macro for defining user value types.
-
- Even though C++ RTTI would be fully available to use, we'd have to to
- facilitate sub-type system which allows, for instance, wxAny with
- signed short '15' to be treated equal to wxAny with signed long long '15'.
- Having sm_instance is important here.
-
- NB: We really need to have wxAnyValueType instances allocated
- in heap. They are stored as static template member variables,
- and with them we just can't be too careful (eg. not allocating
- them in heap broke the type identification in GCC).
-*/
-#define WX_DECLARE_ANY_VALUE_TYPE(CLS) \
- friend class wxAny; \
- WX_DECLARE_TYPEINFO_INLINE(CLS) \
-public: \
- static bool IsSameClass(const wxAnyValueType* otherType) \
- { \
- return wxTypeId(*sm_instance.get()) == wxTypeId(*otherType); \
- } \
- virtual bool IsSameType(const wxAnyValueType* otherType) const \
- { \
- return IsSameClass(otherType); \
- } \
-private: \
- static wxAnyValueTypeScopedPtr sm_instance; \
-public: \
- static wxAnyValueType* GetInstance() \
- { \
- return sm_instance.get(); \
- }
-
-
-#define WX_IMPLEMENT_ANY_VALUE_TYPE(CLS) \
-wxAnyValueTypeScopedPtr CLS::sm_instance(new CLS());
-
-
-#ifdef __VISUALC6__
- // "non dll-interface class 'xxx' used as base interface
- #pragma warning (push)
- #pragma warning (disable:4275)
-#endif
-
-/**
- Following are helper classes for the wxAnyValueTypeImplBase.
-*/
-namespace wxPrivate
-{
-
-template
-class wxAnyValueTypeOpsInplace
-{
-public:
- static void DeleteValue(wxAnyValueBuffer& buf)
- {
- T* value = reinterpret_cast(&buf.m_buffer[0]);
- value->~T();
-
- // Some compiler may given 'unused variable' warnings without this
- wxUnusedVar(value);
- }
-
- static void SetValue(const T& value,
- wxAnyValueBuffer& buf)
- {
- // Use placement new
- void* const place = buf.m_buffer;
- ::new(place) T(value);
- }
-
- static const T& GetValue(const wxAnyValueBuffer& buf)
- {
- // Breaking this code into two lines should suppress
- // GCC's 'type-punned pointer will break strict-aliasing rules'
- // warning.
- const T* value = reinterpret_cast(&buf.m_buffer[0]);
- return *value;
- }
-};
-
-
-template
-class wxAnyValueTypeOpsGeneric
-{
-public:
- template
- class DataHolder
- {
- public:
- DataHolder(const T2& value)
- {
- m_value = value;
- }
- virtual ~DataHolder() { }
-
- T2 m_value;
- private:
- wxDECLARE_NO_COPY_CLASS(DataHolder);
- };
-
- static void DeleteValue(wxAnyValueBuffer& buf)
- {
- DataHolder* holder = static_cast*>(buf.m_ptr);
- delete holder;
- }
-
- static void SetValue(const T& value,
- wxAnyValueBuffer& buf)
- {
- DataHolder* holder = new DataHolder(value);
- buf.m_ptr = holder;
- }
-
- static const T& GetValue(const wxAnyValueBuffer& buf)
- {
- DataHolder* holder = static_cast*>(buf.m_ptr);
- return holder->m_value;
- }
-};
-
-} // namespace wxPrivate
-
-
-/**
- Intermediate template for the generic value type implementation.
- We can derive from this same value type for multiple actual types
- (for instance, we can have wxAnyValueTypeImplInt for all signed
- integer types), and also easily implement specialized templates
- with specific dynamic type conversion.
-*/
-template
-class wxAnyValueTypeImplBase : public wxAnyValueType
-{
- typedef typename wxIf< sizeof(T) <= WX_ANY_VALUE_BUFFER_SIZE,
- wxPrivate::wxAnyValueTypeOpsInplace,
- wxPrivate::wxAnyValueTypeOpsGeneric >::value
- Ops;
-
-public:
- wxAnyValueTypeImplBase() : wxAnyValueType() { }
- virtual ~wxAnyValueTypeImplBase() { }
-
- virtual void DeleteValue(wxAnyValueBuffer& buf) const
- {
- Ops::DeleteValue(buf);
- }
-
- virtual void CopyBuffer(const wxAnyValueBuffer& src,
- wxAnyValueBuffer& dst) const
- {
- Ops::SetValue(Ops::GetValue(src), dst);
- }
-
- /**
- It is important to reimplement this in any specialized template
- classes that inherit from wxAnyValueTypeImplBase.
- */
- static void SetValue(const T& value,
- wxAnyValueBuffer& buf)
- {
- Ops::SetValue(value, buf);
- }
-
- /**
- It is important to reimplement this in any specialized template
- classes that inherit from wxAnyValueTypeImplBase.
- */
- static const T& GetValue(const wxAnyValueBuffer& buf)
- {
- return Ops::GetValue(buf);
- }
-#if wxUSE_EXTENDED_RTTI
- virtual const wxTypeInfo* GetTypeInfo() const
- {
- return wxGetTypeInfo((T*)NULL);
- }
-#endif
-};
-
-
-/*
- Generic value type template. Note that bulk of the implementation
- resides in wxAnyValueTypeImplBase.
-*/
-template
-class wxAnyValueTypeImpl : public wxAnyValueTypeImplBase
-{
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl)
-public:
- wxAnyValueTypeImpl() : wxAnyValueTypeImplBase() { }
- virtual ~wxAnyValueTypeImpl() { }
-
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const
- {
- wxUnusedVar(src);
- wxUnusedVar(dstType);
- wxUnusedVar(dst);
- return false;
- }
-};
-
-template
-wxAnyValueTypeScopedPtr wxAnyValueTypeImpl::sm_instance = new wxAnyValueTypeImpl();
-
-
-//
-// Helper macro for using same base value type implementation for multiple
-// actual C++ data types.
-//
-#define _WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \
-template<> \
-class wxAnyValueTypeImpl : public wxAnyValueTypeImpl##CLSTYPE \
-{ \
- typedef wxAnyBase##CLSTYPE##Type UseDataType; \
-public: \
- wxAnyValueTypeImpl() : wxAnyValueTypeImpl##CLSTYPE() { } \
- virtual ~wxAnyValueTypeImpl() { } \
- static void SetValue(const T& value, wxAnyValueBuffer& buf) \
- { \
- void* voidPtr = reinterpret_cast(&buf.m_buffer[0]); \
- UseDataType* dptr = reinterpret_cast(voidPtr); \
- *dptr = static_cast(value); \
- } \
- static T GetValue(const wxAnyValueBuffer& buf) \
- { \
- const void* voidPtr = \
- reinterpret_cast(&buf.m_buffer[0]); \
- const UseDataType* sptr = \
- reinterpret_cast(voidPtr); \
- return static_cast(*sptr); \
- }
-
-#if wxUSE_EXTENDED_RTTI
-#define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \
-_WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE)\
- virtual const wxTypeInfo* GetTypeInfo() const \
- { \
- return wxGetTypeInfo((T*)NULL); \
- } \
-};
-#else
-#define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \
-_WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE)\
-};
-#endif
-
-//
-// Integer value types
-//
-
-#ifdef wxLongLong_t
- typedef wxLongLong_t wxAnyBaseIntType;
- typedef wxULongLong_t wxAnyBaseUintType;
-#else
- typedef long wxAnyBaseIntType;
- typedef unsigned long wxAnyBaseUintType;
-#endif
-
-
-class WXDLLIMPEXP_BASE wxAnyValueTypeImplInt :
- public wxAnyValueTypeImplBase
-{
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplInt)
-public:
- wxAnyValueTypeImplInt() :
- wxAnyValueTypeImplBase() { }
- virtual ~wxAnyValueTypeImplInt() { }
-
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const;
-};
-
-
-class WXDLLIMPEXP_BASE wxAnyValueTypeImplUint :
- public wxAnyValueTypeImplBase
-{
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplUint)
-public:
- wxAnyValueTypeImplUint() :
- wxAnyValueTypeImplBase() { }
- virtual ~wxAnyValueTypeImplUint() { }
-
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const;
-};
-
-
-WX_ANY_DEFINE_SUB_TYPE(signed long, Int)
-WX_ANY_DEFINE_SUB_TYPE(signed int, Int)
-WX_ANY_DEFINE_SUB_TYPE(signed short, Int)
-WX_ANY_DEFINE_SUB_TYPE(signed char, Int)
-#ifdef wxLongLong_t
-WX_ANY_DEFINE_SUB_TYPE(wxLongLong_t, Int)
-#endif
-
-WX_ANY_DEFINE_SUB_TYPE(unsigned long, Uint)
-WX_ANY_DEFINE_SUB_TYPE(unsigned int, Uint)
-WX_ANY_DEFINE_SUB_TYPE(unsigned short, Uint)
-WX_ANY_DEFINE_SUB_TYPE(unsigned char, Uint)
-#ifdef wxLongLong_t
-WX_ANY_DEFINE_SUB_TYPE(wxULongLong_t, Uint)
-#endif
-
-
-//
-// This macro is used in header, but then in source file we must have:
-// WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl##TYPENAME)
-//
-#define _WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, CONVFUNC, GV) \
-class WXDLLIMPEXP_BASE wxAnyValueTypeImpl##TYPENAME : \
- public wxAnyValueTypeImplBase \
-{ \
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl##TYPENAME) \
-public: \
- wxAnyValueTypeImpl##TYPENAME() : \
- wxAnyValueTypeImplBase() { } \
- virtual ~wxAnyValueTypeImpl##TYPENAME() { } \
- virtual bool ConvertValue(const wxAnyValueBuffer& src, \
- wxAnyValueType* dstType, \
- wxAnyValueBuffer& dst) const \
- { \
- GV value = GetValue(src); \
- return CONVFUNC(value, dstType, dst); \
- } \
-}; \
-template<> \
-class wxAnyValueTypeImpl : public wxAnyValueTypeImpl##TYPENAME \
-{ \
-public: \
- wxAnyValueTypeImpl() : wxAnyValueTypeImpl##TYPENAME() { } \
- virtual ~wxAnyValueTypeImpl() { } \
-};
-
-#define WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, CONVFUNC, BT) \
-_WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, CONVFUNC, BT) \
-
-#define WX_ANY_DEFINE_CONVERTIBLE_TYPE_BASE(T, TYPENAME, CONVFUNC) \
-_WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, \
- CONVFUNC, const T&) \
-
-//
-// String value type
-//
-
-// Convert wxString to destination wxAny value type
-extern WXDLLIMPEXP_BASE bool wxAnyConvertString(const wxString& value,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst);
-
-WX_ANY_DEFINE_CONVERTIBLE_TYPE_BASE(wxString, wxString, wxAnyConvertString)
-WX_ANY_DEFINE_CONVERTIBLE_TYPE(const char*, ConstCharPtr,
- wxAnyConvertString, wxString)
-WX_ANY_DEFINE_CONVERTIBLE_TYPE(const wchar_t*, ConstWchar_tPtr,
- wxAnyConvertString, wxString)
-
-//
-// Bool value type
-//
-template<>
-class WXDLLIMPEXP_BASE wxAnyValueTypeImpl :
- public wxAnyValueTypeImplBase
-{
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl)
-public:
- wxAnyValueTypeImpl() :
- wxAnyValueTypeImplBase() { }
- virtual ~wxAnyValueTypeImpl() { }
-
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const;
-};
-
-//
-// Floating point value type
-//
-class WXDLLIMPEXP_BASE wxAnyValueTypeImplDouble :
- public wxAnyValueTypeImplBase
-{
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplDouble)
-public:
- wxAnyValueTypeImplDouble() :
- wxAnyValueTypeImplBase() { }
- virtual ~wxAnyValueTypeImplDouble() { }
-
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const;
-};
-
-// WX_ANY_DEFINE_SUB_TYPE requires this
-typedef double wxAnyBaseDoubleType;
-
-WX_ANY_DEFINE_SUB_TYPE(float, Double)
-WX_ANY_DEFINE_SUB_TYPE(double, Double)
-
-
-//
-// Defines a dummy wxAnyValueTypeImpl<> with given export
-// declaration. This is needed if a class is used with
-// wxAny in both user shared library and application.
-//
-#define wxDECLARE_ANY_TYPE(CLS, DECL) \
-template<> \
-class DECL wxAnyValueTypeImpl : \
- public wxAnyValueTypeImplBase \
-{ \
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl) \
-public: \
- wxAnyValueTypeImpl() : \
- wxAnyValueTypeImplBase() { } \
- virtual ~wxAnyValueTypeImpl() { } \
- \
- virtual bool ConvertValue(const wxAnyValueBuffer& src, \
- wxAnyValueType* dstType, \
- wxAnyValueBuffer& dst) const \
- { \
- wxUnusedVar(src); \
- wxUnusedVar(dstType); \
- wxUnusedVar(dst); \
- return false; \
- } \
-};
-
-
-// Make sure some of wx's own types get the right wxAnyValueType export
-// (this is needed only for types that are referred to from wxBase.
-// currently we may not use any of these types from there, but let's
-// use the macro on at least one to make sure it compiles since we can't
-// really test it properly in unit tests since a separate DLL would
-// be needed).
-#if wxUSE_DATETIME
- #include "wx/datetime.h"
- wxDECLARE_ANY_TYPE(wxDateTime, WXDLLIMPEXP_BASE)
-#endif
-
-//#include "wx/object.h"
-//wxDECLARE_ANY_TYPE(wxObject*, WXDLLIMPEXP_BASE)
-
-//#include "wx/arrstr.h"
-//wxDECLARE_ANY_TYPE(wxArrayString, WXDLLIMPEXP_BASE)
-
-
-#if wxUSE_VARIANT
-
-class WXDLLIMPEXP_FWD_BASE wxAnyToVariantRegistration;
-
-// Because of header inter-dependencies, cannot include this earlier
-#include "wx/variant.h"
-
-//
-// wxVariantData* data type implementation. For cases when appropriate
-// wxAny<->wxVariant conversion code is missing.
-//
-
-class WXDLLIMPEXP_BASE wxAnyValueTypeImplVariantData :
- public wxAnyValueTypeImplBase
-{
- WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplVariantData)
-public:
- wxAnyValueTypeImplVariantData() :
- wxAnyValueTypeImplBase() { }
- virtual ~wxAnyValueTypeImplVariantData() { }
-
- virtual void DeleteValue(wxAnyValueBuffer& buf) const
- {
- wxVariantData* data = static_cast(buf.m_ptr);
- if ( data )
- data->DecRef();
- }
-
- virtual void CopyBuffer(const wxAnyValueBuffer& src,
- wxAnyValueBuffer& dst) const
- {
- wxVariantData* data = static_cast(src.m_ptr);
- if ( data )
- data->IncRef();
- dst.m_ptr = data;
- }
-
- static void SetValue(wxVariantData* value,
- wxAnyValueBuffer& buf)
- {
- value->IncRef();
- buf.m_ptr = value;
- }
-
- static wxVariantData* GetValue(const wxAnyValueBuffer& buf)
- {
- return static_cast(buf.m_ptr);
- }
-
- virtual bool ConvertValue(const wxAnyValueBuffer& src,
- wxAnyValueType* dstType,
- wxAnyValueBuffer& dst) const
- {
- wxUnusedVar(src);
- wxUnusedVar(dstType);
- wxUnusedVar(dst);
- return false;
- }
-};
-
-template<>
-class wxAnyValueTypeImpl :
- public wxAnyValueTypeImplVariantData
-{
-public:
- wxAnyValueTypeImpl() : wxAnyValueTypeImplVariantData() { }
- virtual ~wxAnyValueTypeImpl() { }
-};
-
-#endif // wxUSE_VARIANT
-
-#ifdef __VISUALC6__
- // Re-enable useless VC6 warnings
- #pragma warning (pop)
-#endif
-
-
-/*
- Let's define a discrete Null value so we don't have to really
- ever check if wxAny.m_type pointer is NULL or not. This is an
- optimization, mostly. Implementation of this value type is
- "hidden" in the source file.
-*/
-extern WXDLLIMPEXP_DATA_BASE(wxAnyValueType*) wxAnyNullValueType;
-
-
-//
-// We need to implement custom signed/unsigned int equals operators
-// for signed/unsigned (eg. wxAny(128UL) == 128L) comparisons to work.
-#define WXANY_IMPLEMENT_INT_EQ_OP(TS, TUS) \
-bool operator==(TS value) const \
-{ \
- if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \
- return (value == static_cast \
- (wxAnyValueTypeImpl::GetValue(m_buffer))); \
- if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \
- return (value == static_cast \
- (wxAnyValueTypeImpl::GetValue(m_buffer))); \
- return false; \
-} \
-bool operator==(TUS value) const \
-{ \
- if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \
- return (value == static_cast \
- (wxAnyValueTypeImpl::GetValue(m_buffer))); \
- if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \
- return (value == static_cast \
- (wxAnyValueTypeImpl::GetValue(m_buffer))); \
- return false; \
-}
-
-
-#if wxUSE_VARIANT
-
-// Note that the following functions are implemented outside wxAny class
-// so that it can reside entirely in header and lack the export declaration.
-
-// Helper function used to associate wxAnyValueType with a wxVariantData.
-extern WXDLLIMPEXP_BASE void
-wxPreRegisterAnyToVariant(wxAnyToVariantRegistration* reg);
-
-// This function performs main wxAny to wxVariant conversion duties.
-extern WXDLLIMPEXP_BASE bool
-wxConvertAnyToVariant(const wxAny& any, wxVariant* variant);
-
-#endif // wxUSE_VARIANT
-
-
-//
-// The wxAny class represents a container for any type. A variant's value
-// can be changed at run time, possibly to a different type of value.
-//
-// As standard, wxAny can store value of almost any type, in a fairly
-// optimal manner even.
-//
-class wxAny
-{
-public:
- /**
- Default constructor.
- */
- wxAny()
- {
- m_type = wxAnyNullValueType;
- }
-
- /**
- Destructor.
- */
- ~wxAny()
- {
- m_type->DeleteValue(m_buffer);
- }
-
- //@{
- /**
- Various constructors.
- */
- template
- wxAny(const T& value)
- {
- m_type = wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueTypeImpl::SetValue(value, m_buffer);
- }
-
- // These two constructors are needed to deal with string literals
- wxAny(const char* value)
- {
- m_type = wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueTypeImpl::SetValue(value, m_buffer);
- }
- wxAny(const wchar_t* value)
- {
- m_type = wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueTypeImpl::SetValue(value, m_buffer);
- }
-
- wxAny(const wxAny& any)
- {
- m_type = wxAnyNullValueType;
- AssignAny(any);
- }
-
-#if wxUSE_VARIANT
- wxAny(const wxVariant& variant)
- {
- m_type = wxAnyNullValueType;
- AssignVariant(variant);
- }
-#endif
-
- //@}
-
- /**
- Use this template function for checking if this wxAny holds
- a specific C++ data type.
-
- @remarks This template function does not work on some older compilers
- (such as Visual C++ 6.0). For full compiler ccompatibility
- please use wxANY_CHECK_TYPE(any, T) macro instead.
-
- @see wxAnyValueType::CheckType()
- */
- // FIXME-VC6: remove this hack when VC6 is no longer supported
- template
- bool CheckType(T* = NULL) const
- {
- return m_type->CheckType();
- }
-
- /**
- Returns the value type as wxAnyValueType instance.
-
- @remarks You cannot reliably test whether two wxAnys are of
- same value type by simply comparing return values
- of wxAny::GetType(). Instead, use wxAny::HasSameType().
-
- @see HasSameType()
- */
- const wxAnyValueType* GetType() const
- {
- return m_type;
- }
-
- /**
- Returns @true if this and another wxAny have the same
- value type.
- */
- bool HasSameType(const wxAny& other) const
- {
- return GetType()->IsSameType(other.GetType());
- }
-
- /**
- Tests if wxAny is null (that is, whether there is no data).
- */
- bool IsNull() const
- {
- return (m_type == wxAnyNullValueType);
- }
-
- /**
- Makes wxAny null (that is, clears it).
- */
- void MakeNull()
- {
- m_type->DeleteValue(m_buffer);
- m_type = wxAnyNullValueType;
- }
-
- //@{
- /**
- Assignment operators.
- */
- template
- wxAny& operator=(const T &value)
- {
- m_type->DeleteValue(m_buffer);
- m_type = wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueTypeImpl::SetValue(value, m_buffer);
- return *this;
- }
-
- wxAny& operator=(const wxAny &any)
- {
- if (this != &any)
- AssignAny(any);
- return *this;
- }
-
-#if wxUSE_VARIANT
- wxAny& operator=(const wxVariant &variant)
- {
- AssignVariant(variant);
- return *this;
- }
-#endif
-
- // These two operators are needed to deal with string literals
- wxAny& operator=(const char* value)
- {
- Assign(value);
- return *this;
- }
- wxAny& operator=(const wchar_t* value)
- {
- Assign(value);
- return *this;
- }
-
- //@{
- /**
- Equality operators.
- */
- bool operator==(const wxString& value) const
- {
- wxString value2;
- if ( !GetAs(&value2) )
- return false;
- return value == value2;
- }
-
- bool operator==(const char* value) const
- { return (*this) == wxString(value); }
- bool operator==(const wchar_t* value) const
- { return (*this) == wxString(value); }
-
- //
- // We need to implement custom signed/unsigned int equals operators
- // for signed/unsigned (eg. wxAny(128UL) == 128L) comparisons to work.
- WXANY_IMPLEMENT_INT_EQ_OP(signed char, unsigned char)
- WXANY_IMPLEMENT_INT_EQ_OP(signed short, unsigned short)
- WXANY_IMPLEMENT_INT_EQ_OP(signed int, unsigned int)
- WXANY_IMPLEMENT_INT_EQ_OP(signed long, unsigned long)
-#ifdef wxLongLong_t
- WXANY_IMPLEMENT_INT_EQ_OP(wxLongLong_t, wxULongLong_t)
-#endif
-
- wxGCC_WARNING_SUPPRESS(float-equal)
-
- bool operator==(float value) const
- {
- if ( !wxAnyValueTypeImpl::IsSameClass(m_type) )
- return false;
-
- return value ==
- static_cast
- (wxAnyValueTypeImpl::GetValue(m_buffer));
- }
-
- bool operator==(double value) const
- {
- if ( !wxAnyValueTypeImpl::IsSameClass(m_type) )
- return false;
-
- return value ==
- static_cast
- (wxAnyValueTypeImpl::GetValue(m_buffer));
- }
-
- wxGCC_WARNING_RESTORE(float-equal)
-
- bool operator==(bool value) const
- {
- if ( !wxAnyValueTypeImpl::IsSameClass(m_type) )
- return false;
-
- return value == (wxAnyValueTypeImpl::GetValue(m_buffer));
- }
-
- //@}
-
- //@{
- /**
- Inequality operators (implement as template).
- */
- template
- bool operator!=(const T& value) const
- { return !((*this) == value); }
- //@}
-
- /**
- This template function converts wxAny into given type. In most cases
- no type conversion is performed, so if the type is incorrect an
- assertion failure will occur.
-
- @remarks For convenience, conversion is done when T is wxString. This
- is useful when a string literal (which are treated as
- const char* and const wchar_t*) has been assigned to wxAny.
-
- This template function may not work properly with Visual C++
- 6. For full compiler compatibility, please use
- wxANY_AS(any, T) macro instead.
- */
- // FIXME-VC6: remove this hack when VC6 is no longer supported
- template
- T As(T* = NULL) const
- {
- if ( !wxAnyValueTypeImpl::IsSameClass(m_type) )
- {
- wxFAIL_MSG("Incorrect or non-convertible data type");
- }
-
- return static_cast(wxAnyValueTypeImpl::GetValue(m_buffer));
- }
-
- // Allow easy conversion from 'const char *' etc. to wxString
- // FIXME-VC6: remove this hack when VC6 is no longer supported
- //template<>
- wxString As(wxString*) const
- {
- wxString value;
- if ( !GetAs(&value) )
- {
- wxFAIL_MSG("Incorrect or non-convertible data type");
- }
- return value;
- }
-
-#if wxUSE_EXTENDED_RTTI
- const wxTypeInfo* GetTypeInfo() const
- {
- return m_type->GetTypeInfo();
- }
-#endif
- /**
- Template function that retrieves and converts the value of this
- variant to the type that T* value is.
-
- @return Returns @true if conversion was successful.
- */
- template
- bool GetAs(T* value) const
- {
- if ( !wxAnyValueTypeImpl::IsSameClass(m_type) )
- {
- wxAnyValueType* otherType =
- wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueBuffer temp_buf;
-
- if ( !m_type->ConvertValue(m_buffer, otherType, temp_buf) )
- return false;
-
- *value =
- static_cast(wxAnyValueTypeImpl::GetValue(temp_buf));
- otherType->DeleteValue(temp_buf);
-
- return true;
- }
- *value = static_cast(wxAnyValueTypeImpl::GetValue(m_buffer));
- return true;
- }
-
-#if wxUSE_VARIANT
- // GetAs() wxVariant specialization
- bool GetAs(wxVariant* value) const
- {
- return wxConvertAnyToVariant(*this, value);
- }
-#endif
-
-private:
- // Assignment functions
- void AssignAny(const wxAny& any)
- {
- // Must delete value - CopyBuffer() never does that
- m_type->DeleteValue(m_buffer);
-
- wxAnyValueType* newType = any.m_type;
-
- if ( !newType->IsSameType(m_type) )
- m_type = newType;
-
- newType->CopyBuffer(any.m_buffer, m_buffer);
- }
-
-#if wxUSE_VARIANT
- void AssignVariant(const wxVariant& variant)
- {
- wxVariantData* data = variant.GetData();
-
- if ( data && data->GetAsAny(this) )
- return;
-
- m_type->DeleteValue(m_buffer);
-
- if ( variant.IsNull() )
- {
- // Init as Null
- m_type = wxAnyNullValueType;
- }
- else
- {
- // If everything else fails, wrap the whole wxVariantData
- m_type = wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueTypeImpl::SetValue(data, m_buffer);
- }
- }
-#endif
-
- template
- void Assign(const T &value)
- {
- m_type->DeleteValue(m_buffer);
- m_type = wxAnyValueTypeImpl::sm_instance.get();
- wxAnyValueTypeImpl::SetValue(value, m_buffer);
- }
-
- // Data
- wxAnyValueBuffer m_buffer;
- wxAnyValueType* m_type;
-};
-
-
-//
-// This method of checking the type is compatible with VC6
-#define wxANY_CHECK_TYPE(any, T) \
- wxANY_VALUE_TYPE_CHECK_TYPE((any).GetType(), T)
-
-
-//
-// This method of getting the value is compatible with VC6
-#define wxANY_AS(any, T) \
- (any).As(static_cast(NULL))
-
-
-template
-inline bool wxAnyValueType::CheckType(T* reserved) const
-{
- wxUnusedVar(reserved);
- return wxAnyValueTypeImpl::IsSameClass(this);
-}
-
-WX_DECLARE_LIST_WITH_DECL(wxAny, wxAnyList, class WXDLLIMPEXP_BASE);
-
-#endif // wxUSE_ANY
-
-#endif // _WX_ANY_H_
diff --git a/Source/3rd Party/wx/include/wx/anybutton.h b/Source/3rd Party/wx/include/wx/anybutton.h
deleted file mode 100644
index ebeac3b55..000000000
--- a/Source/3rd Party/wx/include/wx/anybutton.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/anybutton.h
-// Purpose: wxAnyButtonBase class
-// Author: Vadim Zetlin
-// Created: 2000-08-15 (extracted from button.h)
-// Copyright: (c) Vadim Zetlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ANYBUTTON_H_BASE_
-#define _WX_ANYBUTTON_H_BASE_
-
-#include "wx/defs.h"
-
-#ifdef wxHAS_ANY_BUTTON
-
-// ----------------------------------------------------------------------------
-// wxAnyButton specific flags
-// ----------------------------------------------------------------------------
-
-// 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 )
-
-// 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
-
-// this flag can be used to disable using the text label in the button: it is
-// mostly useful when creating buttons showing bitmap and having stock id as
-// without it both the standard label corresponding to the stock id and the
-// bitmap would be shown
-#define wxBU_NOTEXT 0x0002
-
-
-#include "wx/bitmap.h"
-#include "wx/control.h"
-
-// ----------------------------------------------------------------------------
-// wxAnyButton: common button functionality
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxAnyButtonBase : public wxControl
-{
-public:
- wxAnyButtonBase() { }
-
- // show the image in the button in addition to the label: this method is
- // supported on all (major) platforms
- void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
- {
- SetBitmapLabel(bitmap);
- SetBitmapPosition(dir);
- }
-
- wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
-
- // Methods for setting individual images for different states: normal,
- // selected (meaning pushed or pressed), focused (meaning normal state for
- // a focused button), disabled or hover (a.k.a. hot or current).
- //
- // Remember that SetBitmap() itself must be called before any other
- // SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
- // for it anyhow) and that all bitmaps passed to these functions should be
- // of the same size.
- void SetBitmapLabel(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Normal); }
- void SetBitmapPressed(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Pressed); }
- void SetBitmapDisabled(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Disabled); }
- void SetBitmapCurrent(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Current); }
- void SetBitmapFocus(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Focused); }
-
- wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
- wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
- wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
- wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
- wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
-
-
- // set the margins around the image
- void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
- void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
- wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
-
- // set the image position relative to the text, i.e. wxLEFT means that the
- // image is to the left of the text (this is the default)
- void SetBitmapPosition(wxDirection dir);
-
-
- // 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 wxAnyButtonBase to make it consistent.
- virtual bool ShouldInheritColours() const { return false; }
-
- // wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
-#if WXWIN_COMPATIBILITY_2_8
- void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
- void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
-#endif // WXWIN_COMPATIBILITY_2_8
-
- // backwards compatible names for pressed/current bitmaps: they're not
- // deprecated as there is nothing really wrong with using them and no real
- // advantage to using the new names but the new names are still preferred
- wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
- wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
-
- void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
- void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
-
-
- // this enum is not part of wx public API, it is public because it is used
- // in non wxAnyButton-derived classes internally
- //
- // also notice that MSW code relies on the values of the enum elements, do
- // not change them without revising src/msw/button.cpp
- enum State
- {
- State_Normal,
- State_Current, // a.k.a. hot or "hovering"
- State_Pressed, // a.k.a. "selected" in public API for some reason
- State_Disabled,
- State_Focused,
- State_Max
- };
-
- // return true if this button shouldn't show the text label, either because
- // it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
- bool DontShowLabel() const
- {
- return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
- }
-
- // return true if we do show the label
- bool ShowsLabel() const
- {
- return !DontShowLabel();
- }
-
-protected:
- // choose the default border for this window
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
-
- virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
- { return wxBitmap(); }
- virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
- State WXUNUSED(which))
- { }
-
- virtual wxSize DoGetBitmapMargins() const
- { return wxSize(0, 0); }
-
- virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
- { }
-
- virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
- { }
-
- virtual bool DoGetAuthNeeded() const { return false; }
- virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
-
-
- wxDECLARE_NO_COPY_CLASS(wxAnyButtonBase);
-};
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/anybutton.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/anybutton.h"
-//#elif defined(__WXMOTIF__)
-// #include "wx/motif/anybutton.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/anybutton.h"
-//#elif defined(__WXGTK__)
-// #include "wx/gtk1/anybutton.h"
-#elif defined(__WXMAC__)
- #include "wx/osx/anybutton.h"
-//#elif defined(__WXCOCOA__)
-// #include "wx/cocoa/anybutton.h"
-//#elif defined(__WXPM__)
-// #include "wx/os2/anybutton.h"
-#else
- typedef wxAnyButtonBase wxAnyButton;
-#endif
-
-#endif // wxHAS_ANY_BUTTON
-
-#endif // _WX_ANYBUTTON_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/anystr.h b/Source/3rd Party/wx/include/wx/anystr.h
deleted file mode 100644
index 8eebaf9b0..000000000
--- a/Source/3rd Party/wx/include/wx/anystr.h
+++ /dev/null
@@ -1,139 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/anystr.h
-// Purpose: wxAnyStrPtr class declaration
-// Author: Vadim Zeitlin
-// Created: 2009-03-23
-// Copyright: (c) 2008 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ANYSTR_H_
-#define _WX_ANYSTR_H_
-
-#include "wx/string.h"
-
-// ----------------------------------------------------------------------------
-// wxAnyStrPtr
-//
-// Notice that this is an internal and intentionally not documented class. It
-// is only used by wxWidgets itself to ensure compatibility with previous
-// versions and shouldn't be used by user code. When you see a function
-// returning it you should just know that you can treat it as a string pointer.
-// ----------------------------------------------------------------------------
-
-// This is a helper class convertible to either narrow or wide string pointer.
-// It is similar to wxCStrData but, unlike it, can be NULL which is required to
-// represent the return value of wxDateTime::ParseXXX() methods for example.
-//
-// NB: this class is fully inline and so doesn't need to be DLL-exported
-class wxAnyStrPtr
-{
-public:
- // ctors: this class must be created from the associated string or using
- // its default ctor for an invalid NULL-like object; notice that it is
- // immutable after creation.
-
- // ctor for invalid pointer
- wxAnyStrPtr()
- : m_str(NULL)
- {
- }
-
- // ctor for valid pointer into the given string (whose lifetime must be
- // greater than ours and which should remain constant while we're used)
- wxAnyStrPtr(const wxString& str, const wxString::const_iterator& iter)
- : m_str(&str),
- m_iter(iter)
- {
- }
-
- // default copy ctor is ok and so is default dtor, in particular we do not
- // free the string
-
-
- // various operators meant to make this class look like a superposition of
- // char* and wchar_t*
-
- // this one is needed to allow boolean expressions involving these objects,
- // e.g. "if ( FuncReturningAnyStrPtr() && ... )" (unfortunately using
- // unspecified_bool_type here wouldn't help with ambiguity between all the
- // different conversions to pointers)
- operator bool() const { return m_str != NULL; }
-
- // at least VC6 and VC7 also need this one or they complain about ambiguity
- // for !anystr expressions
- bool operator!() const { return !((bool)*this); }
-
-
- // and these are the conversions operator which allow to assign the result
- // of FuncReturningAnyStrPtr() to either char* or wxChar* (i.e. wchar_t*)
- operator const char *() const
- {
- if ( !m_str )
- return NULL;
-
- // check if the string is convertible to char at all
- //
- // notice that this pointer points into wxString internal buffer
- // containing its char* representation and so it can be kept for as
- // long as wxString is not modified -- which is long enough for our
- // needs
- const char *p = m_str->c_str().AsChar();
- if ( *p )
- {
- // find the offset of the character corresponding to this iterator
- // position in bytes: we don't have any direct way to do it so we
- // need to redo the conversion again for the part of the string
- // before the iterator to find its length in bytes in current
- // locale
- //
- // NB: conversion won't fail as it succeeded for the entire string
- p += strlen(wxString(m_str->begin(), m_iter).mb_str());
- }
- //else: conversion failed, return "" as we can't do anything else
-
- return p;
- }
-
- operator const wchar_t *() const
- {
- if ( !m_str )
- return NULL;
-
- // no complications with wide strings (as long as we discount
- // surrogates as we do for now)
- //
- // just remember that this works as long as wxString keeps an internal
- // buffer with its wide wide char representation, just as with AsChar()
- // above
- return m_str->c_str().AsWChar() + (m_iter - m_str->begin());
- }
-
- // Because the objects of this class are only used as return type for
- // functions which can return NULL we can skip providing dereferencing
- // operators: the code using this class must test it for NULL first and if
- // it does anything else with it it has to assign it to either char* or
- // wchar_t* itself, before dereferencing.
- //
- // IOW this
- //
- // if ( *FuncReturningAnyStrPtr() )
- //
- // is invalid because it could crash. And this
- //
- // const char *p = FuncReturningAnyStrPtr();
- // if ( p && *p )
- //
- // already works fine.
-
-private:
- // the original string and the position in it we correspond to, if the
- // string is NULL this object is NULL pointer-like
- const wxString * const m_str;
- const wxString::const_iterator m_iter;
-
- wxDECLARE_NO_ASSIGN_CLASS(wxAnyStrPtr);
-};
-
-#endif // _WX_ANYSTR_H_
-
diff --git a/Source/3rd Party/wx/include/wx/app.h b/Source/3rd Party/wx/include/wx/app.h
index 55bdb4063..b7d500b12 100644
--- a/Source/3rd Party/wx/include/wx/app.h
+++ b/Source/3rd Party/wx/include/wx/app.h
@@ -5,6 +5,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -17,29 +18,21 @@
// ----------------------------------------------------------------------------
#include "wx/event.h" // for the base class
-#include "wx/eventfilter.h" // (and another one)
#include "wx/build.h"
-#include "wx/cmdargs.h" // for wxCmdLineArgsArray used by wxApp::argv
#include "wx/init.h" // we must declare wxEntry()
#include "wx/intl.h" // for wxLayoutDirection
-#include "wx/log.h" // for wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
class WXDLLIMPEXP_FWD_BASE wxAppConsole;
class WXDLLIMPEXP_FWD_BASE wxAppTraits;
class WXDLLIMPEXP_FWD_BASE wxCmdLineParser;
-class WXDLLIMPEXP_FWD_BASE wxEventLoopBase;
+class WXDLLIMPEXP_FWD_BASE wxLog;
class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
#if wxUSE_GUI
+ class WXDLLIMPEXP_FWD_BASE wxEventLoop;
struct WXDLLIMPEXP_FWD_CORE wxVideoMode;
- class WXDLLIMPEXP_FWD_CORE wxWindow;
#endif
-// this macro should be used in any main() or equivalent functions defined in wx
-#define wxDISABLE_DEBUG_SUPPORT() \
- wxDISABLE_ASSERTS_IN_RELEASE_BUILD(); \
- wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
-
// ----------------------------------------------------------------------------
// typedefs
// ----------------------------------------------------------------------------
@@ -58,25 +51,15 @@ enum
};
// ----------------------------------------------------------------------------
-// global variables
+// wxAppConsole: wxApp for non-GUI applications
// ----------------------------------------------------------------------------
-// use of this list is strongly deprecated, use wxApp ScheduleForDestruction()
-// and IsScheduledForDestruction() methods instead of this list directly, it
-// is here for compatibility purposes only
-extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete;
-
-// ----------------------------------------------------------------------------
-// wxAppConsoleBase: wxApp for non-GUI applications
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler,
- public wxEventFilter
+class WXDLLIMPEXP_BASE wxAppConsole : public wxEvtHandler
{
public:
// ctor and dtor
- wxAppConsoleBase();
- virtual ~wxAppConsoleBase();
+ wxAppConsole();
+ virtual ~wxAppConsole();
// the virtual functions which may/must be overridden in the derived class
@@ -98,28 +81,17 @@ public:
// 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();
-
- // Called before the first events are handled, called from within MainLoop()
- virtual void OnLaunched();
-
- // This is called by wxEventLoopBase::SetActive(): you should put the code
- // which needs an active event loop here.
- // Note that this function is called whenever an event loop is activated;
- // you may want to use wxEventLoopBase::IsMain() to perform initialization
- // specific for the app's main event loop.
- virtual void OnEventLoopEnter(wxEventLoopBase* WXUNUSED(loop)) {}
+ 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 called by wxEventLoopBase::OnExit() for each event loop which
- // is exited.
- virtual void OnEventLoopExit(wxEventLoopBase* WXUNUSED(loop)) {}
-
// 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!
@@ -145,20 +117,12 @@ public:
// be argv[0]
// set/get the application name
- wxString GetAppName() const;
+ wxString GetAppName() const
+ {
+ return m_appName.empty() ? m_className : m_appName;
+ }
void SetAppName(const wxString& name) { m_appName = name; }
- // set/get the application display name: the display name is the name
- // shown to the user in titles, reports, etc while the app name is
- // used for paths, config, and other places the user doesn't see
- //
- // by default the display name is the same as app name or a capitalized
- // version of the program if app name was not set neither but it's
- // usually better to set it explicitly to something nicer
- wxString GetAppDisplayName() const;
-
- void SetAppDisplayName(const wxString& name) { m_appDisplayName = name; }
-
// set/get the app class name
wxString GetClassName() const { return m_className; }
void SetClassName(const wxString& name) { m_className = name; }
@@ -167,19 +131,6 @@ public:
const wxString& GetVendorName() const { return m_vendorName; }
void SetVendorName(const wxString& name) { m_vendorName = name; }
- // set/get the vendor display name: the display name is shown
- // in titles/reports/dialogs to the user, while the vendor name
- // is used in some areas such as wxConfig, wxStandardPaths, etc
- const wxString& GetVendorDisplayName() const
- {
- return m_vendorDisplayName.empty() ? GetVendorName()
- : m_vendorDisplayName;
- }
- void SetVendorDisplayName(const wxString& name)
- {
- m_vendorDisplayName = name;
- }
-
// cmd line parsing stuff
// ----------------------
@@ -219,68 +170,40 @@ public:
// 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 facade
+ // allows us to abstract the differences behind the common façade
wxAppTraits *GetTraits();
- // this function provides safer access to traits object than
- // wxTheApp->GetTraits() during startup or termination when the global
- // application object itself may be unavailable
- //
- // of course, it still returns NULL in this case and the caller must check
- // for it
- static wxAppTraits *GetTraitsIfExists();
+ // the functions below shouldn't be used now that we have wxAppTraits
+#if WXWIN_COMPATIBILITY_2_4
- // Return some valid traits object.
- //
- // This method checks if we have wxTheApp and returns its traits if it does
- // exist and the traits are non-NULL, similarly to GetTraitsIfExists(), but
- // falls back to wxConsoleAppTraits to ensure that it always returns
- // something valid.
- static wxAppTraits& GetValidTraits();
+#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
- // returns the main event loop instance, i.e. the event loop which is started
- // by OnRun() and which dispatches all events sent from the native toolkit
- // to the application (except when new event loops are temporarily set-up).
- // The returned value maybe NULL. Put initialization code which needs a
- // non-NULL main event loop into OnEventLoopEnter().
- wxEventLoopBase* GetMainLoop() const
- { return m_mainLoop; }
+ // similar to CreateLogTarget() but for the global wxMessageOutput
+ // object
+ wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );
- // This function sets the C locale to the default locale for the current
- // environment. It is advised to call this to ensure that the underlying
- // toolkit uses the locale in which the numbers and monetary amounts are
- // shown in the format expected by user and so on.
- //
- // Notice that this does _not_ change the global C++ locale, you need to do
- // it explicitly if you want.
- //
- // Finally, notice that while this function is virtual, it is not supposed
- // to be overridden outside of the library itself.
- virtual void SetCLocale();
+#endif // WXWIN_COMPATIBILITY_2_4
// event processing functions
// --------------------------
- // Implement the inherited wxEventFilter method but just return -1 from it
- // to indicate that default processing should take place.
+ // 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);
- // return true if we're running event loop, i.e. if the events can
- // (already) be dispatched
- static bool IsMainLoopRunning();
-
#if wxUSE_EXCEPTIONS
- // execute the functor to handle the given event
- //
- // this is a generalization of HandleEvent() below and the base class
- // implementation of CallEventHandler() still calls HandleEvent() for
- // compatibility for functors which are just wxEventFunctions (i.e. methods
- // of wxEvtHandler)
- virtual void CallEventHandler(wxEvtHandler *handler,
- wxEventFunctor& functor,
- wxEvent& event) const;
-
// call the specified handler on the given object with the given event
//
// this method only exists to allow catching the exceptions thrown by any
@@ -291,112 +214,33 @@ public:
wxEvent& event) const;
// Called when an unhandled C++ exception occurs inside OnRun(): note that
- // the main event loop has already terminated by now and the program will
- // exit, if you need to really handle the exceptions you need to override
- // OnExceptionInMainLoop()
- virtual void OnUnhandledException();
-
- // 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();
-
+ // 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
-
- // pending events
- // --------------
-
- // IMPORTANT: all these methods conceptually belong to wxEventLoopBase
- // but for many reasons we need to allow queuing of events
- // even when there's no event loop (e.g. in wxApp::OnInit);
- // this feature is used e.g. to queue events on secondary threads
- // or in wxPython to use wx.CallAfter before the GUI is initialized
-
- // process all events in the m_handlersWithPendingEvents list -- it is necessary
- // to call this function to process posted events. This happens during each
+ // 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();
- // check if there are pending events on global pending event list
- bool HasPendingEvents() const;
+ // doesn't do anything in this class, just a hook for GUI wxApp
+ virtual bool Yield(bool WXUNUSED(onlyIfNeeded) = false) { return true; }
- // temporary suspends processing of the pending events
- void SuspendProcessingOfPendingEvents();
+ // make sure that idle events are sent again
+ virtual void WakeUpIdle() { }
- // resume processing of the pending events previously stopped because of a
- // call to SuspendProcessingOfPendingEvents()
- void ResumeProcessingOfPendingEvents();
-
- // called by ~wxEvtHandler to (eventually) remove the handler from the list of
- // the handlers with pending events
- void RemovePendingEventHandler(wxEvtHandler* toRemove);
-
- // adds an event handler to the list of the handlers with pending events
- void AppendPendingEventHandler(wxEvtHandler* toAppend);
-
- // moves the event handler from the list of the handlers with pending events
- //to the list of the handlers with _delayed_ pending events
- void DelayPendingEventHandler(wxEvtHandler* toDelay);
-
- // deletes the current pending events
- void DeletePendingEvents();
-
-
- // delayed destruction
- // -------------------
-
- // If an object may have pending events for it, it shouldn't be deleted
- // immediately as this would result in a crash when trying to handle these
- // events: instead, it should be scheduled for destruction and really
- // destroyed only after processing all pending events.
- //
- // Notice that this is only possible if we have a running event loop,
- // otherwise the object is just deleted directly by ScheduleForDestruction()
- // and IsScheduledForDestruction() always returns false.
-
- // schedule the object for destruction in the near future
- void ScheduleForDestruction(wxObject *object);
-
- // return true if the object is scheduled for destruction
- bool IsScheduledForDestruction(wxObject *object) const;
-
-
- // wxEventLoop-related methods
- // ---------------------------
-
- // all these functions are forwarded to the corresponding methods of the
- // currently active event loop -- and do nothing if there is none
- virtual bool Pending();
- virtual bool Dispatch();
-
- virtual int MainLoop();
- virtual void ExitMainLoop();
-
- bool Yield(bool onlyIfNeeded = false);
-
- virtual void WakeUpIdle();
-
- // this method is called by the active event loop when there are no events
- // to process
- //
- // by default it generates the idle events and if you override it in your
- // derived class you should call the base class version to ensure that idle
- // events are still sent out
- virtual bool ProcessIdle();
-
- // this virtual function is overridden in GUI wxApp to always return true
- // as GUI applications always have an event loop -- but console ones may
- // have it or not, so it simply returns true if already have an event loop
- // running but false otherwise
- virtual bool UsesEventLoop() const;
+ // 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)
@@ -416,12 +260,16 @@ public:
int line,
const wxChar *cond,
const wxChar *msg);
+#endif // __WXDEBUG__
// check that the wxBuildOptions object (constructed in the application
- // itself, usually the one from wxIMPLEMENT_APP() macro) matches the build
+ // 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
// -------------------------------
@@ -441,88 +289,37 @@ public:
// command line arguments (public for backwards compatibility)
- int argc;
-
- // this object is implicitly convertible to either "char**" (traditional
- // type of argv parameter of main()) or to "wchar_t **" (for compatibility
- // with Unicode build in previous wx versions and because the command line
- // can, in pr
-#if wxUSE_UNICODE
- wxCmdLineArgsArray argv;
-#else
- char **argv;
-#endif
+ int argc;
+ wxChar **argv;
protected:
- // delete all objects in wxPendingDelete list
- //
- // called from ProcessPendingEvents()
- void DeletePendingObjects();
-
// 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;
- // create main loop from AppTraits or return NULL if
- // there is no main loop implementation
- wxEventLoopBase *CreateMainLoop();
// application info (must be set from the user code)
- wxString m_vendorName, // vendor name ("acme")
- m_vendorDisplayName, // vendor display name (e.g. "ACME Inc")
- m_appName, // app name ("myapp")
- m_appDisplayName, // app display name ("My Application")
- m_className; // class name
+ 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 main event loop of the application (may be NULL if the loop hasn't
- // been started yet or has already terminated)
- wxEventLoopBase *m_mainLoop;
-
-
- // pending events management vars:
-
- // the array of the handlers with pending events which needs to be processed
- // inside ProcessPendingEvents()
- wxEvtHandlerArray m_handlersWithPendingEvents;
-
- // helper array used by ProcessPendingEvents() to store the event handlers
- // which have pending events but of these events none can be processed right now
- // (because of a call to wxEventLoop::YieldFor() which asked to selectively process
- // pending events)
- wxEvtHandlerArray m_handlersWithPendingDelayedEvents;
-
-#if wxUSE_THREADS
- // this critical section protects both the lists above
- wxCriticalSection m_handlersWithPendingEventsLocker;
-#endif
-
- // flag modified by Suspend/ResumeProcessingOfPendingEvents()
- bool m_bDoPendingEventProcessing;
-
- friend class WXDLLIMPEXP_FWD_BASE wxEvtHandler;
// the application object is a singleton anyhow, there is no sense in
// copying it
- wxDECLARE_NO_COPY_CLASS(wxAppConsoleBase);
+ DECLARE_NO_COPY_CLASS(wxAppConsole)
};
-#if defined(__UNIX__) && !defined(__WINDOWS__)
- #include "wx/unix/app.h"
-#else
- // this has to be a class and not a typedef as we forward declare it
- class wxAppConsole : public wxAppConsoleBase { };
-#endif
-
// ----------------------------------------------------------------------------
// wxAppBase: the common part of wxApp implementations for all platforms
// ----------------------------------------------------------------------------
@@ -570,9 +367,43 @@ public:
// the worker functions - usually not used directly by the user code
// -----------------------------------------------------------------
- // safer alternatives to Yield(), using wxWindowDisabler
- virtual bool SafeYield(wxWindow *win, bool onlyIfNeeded);
- virtual bool SafeYieldFor(wxWindow *win, long eventsToProcess);
+ // 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
@@ -581,8 +412,18 @@ public:
// it should return true if more idle events are needed, false if not
virtual bool ProcessIdle();
- // override base class version: GUI apps always use an event loop
- virtual bool UsesEventLoop() const { return true; }
+ // 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
@@ -614,15 +455,15 @@ public:
// ------------------------------------------------------------------------
// Get display mode that is used use. This is only used in framebuffer
- // wxWin ports such as wxDFB.
+ // 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 wxDFB. This method should be called from
+ // 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 )
+ void SetUseBestVisual( bool flag, bool forceTrueColour = false )
{ m_useBestVisual = flag; m_forceTrueColour = forceTrueColour; }
bool GetUseBestVisual() const { return m_useBestVisual; }
@@ -637,9 +478,6 @@ public:
// if it's unknown
virtual wxLayoutDirection GetLayoutDirection() const;
- // Change the theme used by the application, return true on success.
- virtual bool SetNativeTheme(const wxString& WXUNUSED(theme)) { return false; }
-
// command line parsing (GUI-specific)
// ------------------------------------------------------------------------
@@ -658,16 +496,28 @@ public:
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_MSG("always returns true now, don't call")
- bool 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;
@@ -691,43 +541,47 @@ protected:
// does any of our windows have focus?
bool m_isActive;
- wxDECLARE_NO_COPY_CLASS(wxAppBase);
+
+ 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 defined(__WXMSW__)
- #include "wx/msw/app.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/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/osx/app.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/app.h"
-#elif defined(__WXPM__)
- #include "wx/os2/app.h"
-#endif
-
+#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
-
-// wxApp is defined in core and we cannot define another one in wxBase,
-// so use the preprocessor to allow using wxApp in console programs too
-#define wxApp wxAppConsole
-
+ // allow using just wxApp (instead of wxAppConsole) in console programs
+ typedef wxAppConsole wxApp;
#endif // GUI/!GUI
// ----------------------------------------------------------------------------
@@ -738,12 +592,12 @@ protected:
// object of type wxApp
//
// note that instead of using of wxTheApp in application code you should
-// consider using wxDECLARE_APP() after which you may call wxGetApp() which will
+// 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 static_cast(wxApp::GetInstance())
+#define wxTheApp wx_static_cast(wxApp*, wxApp::GetInstance())
// ----------------------------------------------------------------------------
// global functions
@@ -753,20 +607,20 @@ protected:
// ------------------------------------------------------
// Force an exit from main loop
-WXDLLIMPEXP_BASE void wxExit();
+extern void WXDLLIMPEXP_BASE wxExit();
-// avoid redeclaring this function here if it had been already declared by
+// 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
-WXDLLIMPEXP_CORE bool wxYield();
+extern bool WXDLLIMPEXP_BASE wxYield();
#endif // wx_YIELD_DECLARED
// Yield to other apps/messages
-WXDLLIMPEXP_BASE void wxWakeUpIdle();
+extern void WXDLLIMPEXP_BASE wxWakeUpIdle();
// ----------------------------------------------------------------------------
// macros for dynamic creation of the application object
@@ -783,53 +637,34 @@ public:
{ wxApp::SetInitializerFunction(fn); }
};
-// the code below defines a wxIMPLEMENT_WXWIN_MAIN macro which you can use if
+// 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 wxIMPLEMENT_APP should add this code if required.
+// hello.cpp). Now IMPLEMENT_APP should add this code if required.
-// For compilers that support it, prefer to use wmain() as this ensures any
-// Unicode strings can be passed as command line parameters and not just those
-// representable in the current locale.
-#if wxUSE_UNICODE && defined(__VISUALC__)
- #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
- int wmain(int argc, wchar_t **argv) \
- { \
- wxDISABLE_DEBUG_SUPPORT(); \
- \
- return wxEntry(argc, argv); \
- }
-#else // Use standard main()
- #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
- int main(int argc, char **argv) \
- { \
- wxDISABLE_DEBUG_SUPPORT(); \
- \
- return wxEntry(argc, argv); \
- }
-#endif
+#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 wxIMPLEMENT_WXWIN_MAIN
- #define wxIMPLEMENT_WXWIN_MAIN wxIMPLEMENT_WXWIN_MAIN_CONSOLE
-#endif // defined(wxIMPLEMENT_WXWIN_MAIN)
+#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 wxIMPLEMENT_WX_THEME_SUPPORT \
+ #define IMPLEMENT_WX_THEME_SUPPORT \
WX_USE_THEME(wxUNIV_DEFAULT_THEME);
#else
- #define wxIMPLEMENT_WX_THEME_SUPPORT
+ #define IMPLEMENT_WX_THEME_SUPPORT
#endif
#else
- #define wxIMPLEMENT_WX_THEME_SUPPORT
+ #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 wxIMPLEMENT_APP_NO_MAIN(appname) \
- appname& wxGetApp() { return *static_cast(wxApp::GetInstance()); } \
+#define IMPLEMENT_APP_NO_MAIN(appname) \
wxAppConsole *wxCreateApp() \
{ \
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
@@ -837,53 +672,37 @@ public:
return new appname; \
} \
wxAppInitializer \
- wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp)
+ wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
+ DECLARE_APP(appname) \
+ appname& wxGetApp() { return *wx_static_cast(appname*, wxApp::GetInstance()); }
-// Same as wxIMPLEMENT_APP() normally but doesn't include themes support in
+// Same as IMPLEMENT_APP() normally but doesn't include themes support in
// wxUniversal builds
-#define wxIMPLEMENT_APP_NO_THEMES(appname) \
- wxIMPLEMENT_WXWIN_MAIN \
- wxIMPLEMENT_APP_NO_MAIN(appname)
+#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 wxIMPLEMENT_APP(appname) \
- wxIMPLEMENT_WX_THEME_SUPPORT \
- wxIMPLEMENT_APP_NO_THEMES(appname)
+#define IMPLEMENT_APP(appname) \
+ IMPLEMENT_APP_NO_THEMES(appname) \
+ IMPLEMENT_WX_THEME_SUPPORT
// Same as IMPLEMENT_APP(), but for console applications.
-#define wxIMPLEMENT_APP_CONSOLE(appname) \
- wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
- wxIMPLEMENT_APP_NO_MAIN(appname)
+#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 wxDECLARE_APP(appname) \
- extern appname& wxGetApp()
+#define DECLARE_APP(appname) extern appname& wxGetApp();
-// declare the stuff defined by wxIMPLEMENT_APP() macro, it's not really needed
+// 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;
-// ----------------------------------------------------------------------------
-// Compatibility macro aliases
-// ----------------------------------------------------------------------------
-
-// deprecated variants _not_ requiring a semicolon after them
-// (note that also some wx-prefixed macro do _not_ require a semicolon because
-// it's not always possible to force the compire to require it)
-
-#define IMPLEMENT_WXWIN_MAIN_CONSOLE wxIMPLEMENT_WXWIN_MAIN_CONSOLE
-#define IMPLEMENT_WXWIN_MAIN wxIMPLEMENT_WXWIN_MAIN
-#define IMPLEMENT_WX_THEME_SUPPORT wxIMPLEMENT_WX_THEME_SUPPORT
-#define IMPLEMENT_APP_NO_MAIN(app) wxIMPLEMENT_APP_NO_MAIN(app);
-#define IMPLEMENT_APP_NO_THEMES(app) wxIMPLEMENT_APP_NO_THEMES(app);
-#define IMPLEMENT_APP(app) wxIMPLEMENT_APP(app);
-#define IMPLEMENT_APP_CONSOLE(app) wxIMPLEMENT_APP_CONSOLE(app);
-#define DECLARE_APP(app) wxDECLARE_APP(app);
-
#endif // _WX_APP_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/apptrait.h b/Source/3rd Party/wx/include/wx/apptrait.h
index f488dfa7a..56f36dfea 100644
--- a/Source/3rd Party/wx/include/wx/apptrait.h
+++ b/Source/3rd Party/wx/include/wx/apptrait.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -14,44 +15,34 @@
#include "wx/string.h"
#include "wx/platinfo.h"
-class WXDLLIMPEXP_FWD_BASE wxArrayString;
-class WXDLLIMPEXP_FWD_BASE wxConfigBase;
-class WXDLLIMPEXP_FWD_BASE wxEventLoopBase;
+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_BASE wxObject;
class WXDLLIMPEXP_FWD_CORE wxRendererNative;
-class WXDLLIMPEXP_FWD_BASE wxStandardPaths;
class WXDLLIMPEXP_FWD_BASE wxString;
-class WXDLLIMPEXP_FWD_BASE wxTimer;
-class WXDLLIMPEXP_FWD_BASE wxTimerImpl;
-class wxSocketManager;
+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 working with the global objects, may be overridden by the user
+ // hooks for creating the global objects, may be overridden by the user
// ------------------------------------------------------------------------
-#if wxUSE_CONFIG
- // create the default configuration object (base class version is
- // implemented in config.cpp and creates wxRegConfig for wxMSW and
- // wxFileConfig for all the other platforms)
- virtual wxConfigBase *CreateConfig();
-#endif // wxUSE_CONFIG
-
#if wxUSE_LOG
// create the default log target
virtual wxLog *CreateLogTarget() = 0;
@@ -72,14 +63,16 @@ public:
// 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 wxStandardPaths& GetStandardPaths();
-
+ 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
//
@@ -88,79 +81,53 @@ public:
//
// 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
- // this function is used by wxNet library to set the default socket manager
- // to use: doing it like this allows us to keep all socket-related code in
- // wxNet instead of having to pull it in wxBase itself as we'd have to do
- // if we really implemented wxSocketManager here
- //
- // we don't take ownership of this pointer, it should have a lifetime
- // greater than that of any socket (e.g. be a pointer to a static object)
- static void SetDefaultSocketManager(wxSocketManager *manager)
- {
- ms_manager = manager;
- }
-
- // return socket manager: this is usually different for console and GUI
- // applications (although some ports use the same implementation for both)
- virtual wxSocketManager *GetSocketManager() { return ms_manager; }
+ // 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
- // create a new, port specific, instance of the event loop used by wxApp
- virtual wxEventLoopBase *CreateEventLoop() = 0;
-
-#if wxUSE_TIMER
- // return platform and toolkit dependent wxTimer implementation
- virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) = 0;
-#endif
-
-#if wxUSE_THREADS
- virtual void MutexGuiEnter();
- virtual void MutexGuiLeave();
-#endif
-
- // functions returning port-specific information
- // ------------------------------------------------------------------------
-
// 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 = NULL, int *minVer = NULL) const = 0;
+ 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 = 0;
-
- // returns a short string to identify the block of the standard command
- // line options parsed automatically by current port: if this string is
- // empty, there are no such options, otherwise the function also fills
- // passed arrays with the names and the descriptions of those options.
- virtual wxString GetStandardCmdLineOptions(wxArrayString& names,
- wxArrayString& desc) const
- {
- wxUnusedVar(names);
- wxUnusedVar(desc);
-
- return wxEmptyString;
- }
-
+ virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
protected:
-#if wxUSE_STACKWALKER
+#if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
// utility function: returns the stack frame as a plain wxString
virtual wxString GetAssertStackTrace();
#endif
-
-private:
- static wxSocketManager *ms_manager;
};
// ----------------------------------------------------------------------------
@@ -170,10 +137,14 @@ private:
// 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(__WIN32__)
+#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
@@ -194,10 +165,6 @@ private:
class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
{
public:
-#if !wxUSE_CONSOLE_EVENTLOOP
- virtual wxEventLoopBase *CreateEventLoop() { return NULL; }
-#endif // !wxUSE_CONSOLE_EVENTLOOP
-
#if wxUSE_LOG
virtual wxLog *CreateLogTarget();
#endif // wxUSE_LOG
@@ -206,12 +173,20 @@ public:
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 = NULL, int *verMin = NULL) const
+ 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"
@@ -222,7 +197,6 @@ public:
}
virtual bool IsUsingUniversalWidgets() const { return false; }
- virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
};
// ----------------------------------------------------------------------------
@@ -231,7 +205,7 @@ public:
#if wxUSE_GUI
-class WXDLLIMPEXP_CORE wxGUIAppTraitsBase : public wxAppTraits
+class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
{
public:
#if wxUSE_LOG
@@ -242,10 +216,18 @@ public:
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__
@@ -254,8 +236,6 @@ public:
return false;
#endif
}
-
- virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
};
#endif // wxUSE_GUI
@@ -265,12 +245,16 @@ public:
// ----------------------------------------------------------------------------
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
-#if defined(__WIN32__)
+#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
diff --git a/Source/3rd Party/wx/include/wx/archive.h b/Source/3rd Party/wx/include/wx/archive.h
index 137149deb..dbf26c25c 100644
--- a/Source/3rd Party/wx/include/wx/archive.h
+++ b/Source/3rd Party/wx/include/wx/archive.h
@@ -2,6 +2,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -224,7 +225,7 @@ public:
if (it.m_rep)
it.m_rep.AddRef();
if (m_rep)
- this->m_rep.UnRef();
+ m_rep.UnRef();
m_rep = it.m_rep;
return *this;
}
@@ -340,13 +341,11 @@ public:
const wxString& name,
wxPathFormat format = wxPATH_NATIVE) const = 0;
- // FIXME-UTF8: remove these from this file, they are used for ANSI
- // build only
void SetConv(wxMBConv& conv) { m_pConv = &conv; }
wxMBConv& GetConv() const
{ if (m_pConv) return *m_pConv; else return wxConvLocal; }
- static const wxArchiveClassFactory *Find(const wxString& protocol,
+ static const wxArchiveClassFactory *Find(const wxChar *protocol,
wxStreamProtocolType type
= wxSTREAM_PROTOCOL);
diff --git a/Source/3rd Party/wx/include/wx/arrimpl.cpp b/Source/3rd Party/wx/include/wx/arrimpl.cpp
index 5d81a0d7a..37b26314a 100644
--- a/Source/3rd Party/wx/include/wx/arrimpl.cpp
+++ b/Source/3rd Party/wx/include/wx/arrimpl.cpp
@@ -4,8 +4,9 @@
// 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 licence
+// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
@@ -90,14 +91,14 @@ void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \
base_array::operator[](uiIndex + i) = new T(item); \
} \
\
-int name::Index(const T& item, bool bFromEnd) const \
+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 static_cast(ui); \
+ if ( (T*)base_array::operator[](ui) == &Item ) \
+ return wx_static_cast(int, ui); \
ui--; \
} \
while ( ui != 0 ); \
@@ -105,8 +106,8 @@ int name::Index(const T& item, bool bFromEnd) const \
} \
else { \
for( size_t ui = 0; ui < size(); ui++ ) { \
- if( (T*)base_array::operator[](ui) == &item ) \
- return static_cast(ui); \
+ if( (T*)base_array::operator[](ui) == &Item ) \
+ return wx_static_cast(int, ui); \
} \
} \
\
diff --git a/Source/3rd Party/wx/include/wx/arrstr.h b/Source/3rd Party/wx/include/wx/arrstr.h
index 47d42fee9..299cd00f5 100644
--- a/Source/3rd Party/wx/include/wx/arrstr.h
+++ b/Source/3rd Party/wx/include/wx/arrstr.h
@@ -1,9 +1,10 @@
///////////////////////////////////////////////////////////////////////////////
-// Name: wx/arrstr.h
+// 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 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -14,20 +15,10 @@
#include "wx/defs.h"
#include "wx/string.h"
-// these functions are only used in STL build now but we define them in any
-// case for compatibility with the existing code outside of the library which
-// could be using them
-inline int wxCMPFUNC_CONV wxStringSortAscending(wxString* s1, wxString* s2)
-{
- return s1->Cmp(*s2);
-}
+WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
+WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
-inline int wxCMPFUNC_CONV wxStringSortDescending(wxString* s1, wxString* s2)
-{
- return wxStringSortAscending(s2, s1);
-}
-
-#if wxUSE_STD_CONTAINERS
+#if wxUSE_STL
#include "wx/dynarray.h"
@@ -51,11 +42,10 @@ public:
wxArrayString() { }
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
- wxArrayString(size_t sz, const char** a);
- wxArrayString(size_t sz, const wchar_t** a);
+ wxArrayString(size_t sz, const wxChar** a);
wxArrayString(size_t sz, const wxString* a);
- int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const;
+ int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
void Sort(bool reverseOrder = false);
void Sort(CompareFunction function);
@@ -85,37 +75,25 @@ public:
Add(src[n]);
}
- int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const;
-
-private:
- void Insert()
- {
- wxFAIL_MSG( "wxSortedArrayString::Insert() is not to be used" );
- }
-
- void Sort()
- {
- wxFAIL_MSG( "wxSortedArrayString::Sort() is not to be used" );
- }
+ int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
};
-#else // if !wxUSE_STD_CONTAINERS
+#else // if !wxUSE_STL
-// this shouldn't be defined for compilers not supporting template methods or
-// without std::distance()
+// ----------------------------------------------------------------------------
+// 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!
//
-// FIXME-VC6: currently it's only not defined for VC6 in DLL build as it
-// doesn't export template methods from DLL correctly so even though
-// it compiles them fine, we get link errors when using wxArrayString
-#if !defined(__VISUALC6__) || !(defined(WXMAKINGDLL) || defined(WXUSINGDLL))
- #define wxHAS_VECTOR_TEMPLATE_ASSIGN
-#endif
-
-#ifdef wxHAS_VECTOR_TEMPLATE_ASSIGN
- #include "wx/beforestd.h"
- #include
- #include "wx/afterstd.h"
-#endif // wxHAS_VECTOR_TEMPLATE_ASSIGN
+// 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
{
@@ -135,14 +113,13 @@ public:
//
// 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!). This
- // wouldn't be needed if the 'explicit' keyword was supported by all
- // compilers, or if this was protected ctor for wxSortedArrayString,
- // but we're stuck with it now.
- wxEXPLICIT wxArrayString(int autoSort) { Init(autoSort != 0); }
+ // 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 char** a);
- wxArrayString(size_t sz, const wchar_t** a);
+ wxArrayString(size_t sz, const wxChar** a);
// wxString string array ctor
wxArrayString(size_t sz, const wxString* a);
// copy ctor
@@ -172,34 +149,38 @@ public:
// items access (range checking is done in debug version)
// get item at position uiIndex
- wxString& Item(size_t nIndex)
+ wxString& Item(size_t nIndex) const
{
wxASSERT_MSG( nIndex < m_nCount,
wxT("wxArrayString: index out of bounds") );
- return m_pItems[nIndex];
+ return *(wxString *)&(m_pItems[nIndex]);
}
- const wxString& Item(size_t nIndex) const { return const_cast(this)->Item(nIndex); }
// same as Item()
- wxString& operator[](size_t nIndex) { return Item(nIndex); }
- const wxString& operator[](size_t nIndex) const { return Item(nIndex); }
+ wxString& operator[](size_t nIndex) const { return Item(nIndex); }
// get last item
- wxString& Last()
+ wxString& Last() const
{
wxASSERT_MSG( !IsEmpty(),
wxT("wxArrayString: index out of bounds") );
- return Item(GetCount() - 1);
+ return Item(Count() - 1);
}
- const wxString& Last() const { return const_cast(this)->Last(); }
+ // 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 wxString& str, bool bCase = true, bool bFromEnd = false) const;
+ 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);
@@ -208,15 +189,18 @@ public:
// expand the array to have count elements
void SetCount(size_t count);
// remove first item matching this value
- void Remove(const wxString& sz);
+ 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 comparison function
+ // sort array elements using specified comparaison function
void Sort(CompareFunction compareFunction);
void Sort(CompareFunction2 compareFunction);
@@ -251,7 +235,7 @@ public:
public:
pointer m_ptr;
reverse_iterator() : m_ptr(NULL) { }
- wxEXPLICIT reverse_iterator(pointer ptr) : m_ptr(ptr) { }
+ 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; }
@@ -277,7 +261,7 @@ public:
public:
pointer m_ptr;
const_reverse_iterator() : m_ptr(NULL) { }
- wxEXPLICIT const_reverse_iterator(pointer ptr) : m_ptr(ptr) { }
+ 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; }
@@ -294,32 +278,13 @@ public:
wxArrayString(const_iterator first, const_iterator last)
{ Init(false); assign(first, last); }
wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
-
-#ifdef wxHAS_VECTOR_TEMPLATE_ASSIGN
- template
- void assign(Iterator first, Iterator last)
- {
- clear();
- reserve(std::distance(first, last));
- for(; first != last; ++first)
- push_back(*first);
- }
-#else // !wxHAS_VECTOR_TEMPLATE_ASSIGN
- void assign(const_iterator first, const_iterator last)
- {
- clear();
- reserve(last - first);
- for(; first != last; ++first)
- push_back(*first);
- }
-#endif // wxHAS_VECTOR_TEMPLATE_ASSIGN/!wxHAS_VECTOR_TEMPLATE_ASSIGN
-
+ 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 m_pItems; }
- const_iterator begin() const { return m_pItems; }
+ 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(); }
@@ -343,36 +308,27 @@ public:
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
- { return const_reverse_iterator(end() - 1); }
+ const_reverse_iterator rbegin() const;
reverse_iterator rend() { return reverse_iterator(begin() - 1); }
- const_reverse_iterator rend() const
- { return const_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(); }
- void swap(wxArrayString& other)
- {
- wxSwap(m_nSize, other.m_nSize);
- wxSwap(m_nCount, other.m_nCount);
- wxSwap(m_pItems, other.m_pItems);
- wxSwap(m_autoSort, other.m_autoSort);
- }
protected:
void Init(bool autoSort); // common part of all ctors
void Copy(const wxArrayString& src); // copies the contents of another array
private:
- // Allocate the new buffer big enough to hold m_nCount + nIncrement items and
- // return the pointer to the old buffer, which must be deleted by the caller
- // (if the old buffer is big enough, just return NULL).
- wxString *Grow(size_t nIncrement);
+ 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
- wxString *m_pItems; // pointer to data
+ wxChar **m_pItems; // pointer to data
bool m_autoSort; // if true, keep the array always sorted
};
@@ -386,7 +342,7 @@ public:
{ Copy(array); }
};
-#endif // !wxUSE_STD_CONTAINERS
+#endif // !wxUSE_STL
// this class provides a temporary wxString* from a
// wxArrayString
@@ -409,110 +365,13 @@ public:
return m_strings;
}
- wxString* Release()
- {
- wxString *r = GetStrings();
- m_strings = NULL;
- return r;
- }
+#if wxABI_VERSION >= 20810
+ wxString* Release();
+#endif // wxABI_VERSION >= 20810
private:
const wxArrayString& m_array;
wxString* m_strings;
};
-
-// ----------------------------------------------------------------------------
-// helper functions for working with arrays
-// ----------------------------------------------------------------------------
-
-// by default, these functions use the escape character to escape the
-// separators occurring inside the string to be joined, this can be disabled by
-// passing '\0' as escape
-
-WXDLLIMPEXP_BASE wxString wxJoin(const wxArrayString& arr,
- const wxChar sep,
- const wxChar escape = wxT('\\'));
-
-WXDLLIMPEXP_BASE wxArrayString wxSplit(const wxString& str,
- const wxChar sep,
- const wxChar escape = wxT('\\'));
-
-
-// ----------------------------------------------------------------------------
-// This helper class allows to pass both C array of wxStrings or wxArrayString
-// using the same interface.
-//
-// Use it when you have two methods taking wxArrayString or (int, wxString[]),
-// that do the same thing. This class lets you iterate over input data in the
-// same way whether it is a raw array of strings or wxArrayString.
-//
-// The object does not take ownership of the data -- internally it keeps
-// pointers to the data, therefore the data must be disposed of by user
-// and only after this object is destroyed. Usually it is not a problem as
-// only temporary objects of this class are used.
-// ----------------------------------------------------------------------------
-
-class wxArrayStringsAdapter
-{
-public:
- // construct an adapter from a wxArrayString
- wxArrayStringsAdapter(const wxArrayString& strings)
- : m_type(wxSTRING_ARRAY), m_size(strings.size())
- {
- m_data.array = &strings;
- }
-
- // construct an adapter from a wxString[]
- wxArrayStringsAdapter(unsigned int n, const wxString *strings)
- : m_type(wxSTRING_POINTER), m_size(n)
- {
- m_data.ptr = strings;
- }
-
- // construct an adapter from a single wxString
- wxArrayStringsAdapter(const wxString& s)
- : m_type(wxSTRING_POINTER), m_size(1)
- {
- m_data.ptr = &s;
- }
-
- // default copy constructor is ok
-
- // iteration interface
- size_t GetCount() const { return m_size; }
- bool IsEmpty() const { return GetCount() == 0; }
- const wxString& operator[] (unsigned int i) const
- {
- wxASSERT_MSG( i < GetCount(), wxT("index out of bounds") );
- if(m_type == wxSTRING_POINTER)
- return m_data.ptr[i];
- return m_data.array->Item(i);
- }
- wxArrayString AsArrayString() const
- {
- if(m_type == wxSTRING_ARRAY)
- return *m_data.array;
- return wxArrayString(GetCount(), m_data.ptr);
- }
-
-private:
- // type of the data being held
- enum wxStringContainerType
- {
- wxSTRING_ARRAY, // wxArrayString
- wxSTRING_POINTER // wxString[]
- };
-
- wxStringContainerType m_type;
- size_t m_size;
- union
- {
- const wxString * ptr;
- const wxArrayString * array;
- } m_data;
-
- wxDECLARE_NO_ASSIGN_CLASS(wxArrayStringsAdapter);
-};
-
-#endif // _WX_ARRSTR_H
+#endif
diff --git a/Source/3rd Party/wx/include/wx/artprov.h b/Source/3rd Party/wx/include/wx/artprov.h
index 32548eb84..31f3bd44e 100644
--- a/Source/3rd Party/wx/include/wx/artprov.h
+++ b/Source/3rd Party/wx/include/wx/artprov.h
@@ -4,6 +4,7 @@
// Author: Vaclav Slavik
// Modified by:
// Created: 18/03/2002
+// RCS-ID: $Id: artprov.h 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -14,7 +15,6 @@
#include "wx/string.h"
#include "wx/bitmap.h"
#include "wx/icon.h"
-#include "wx/iconbndl.h"
class WXDLLIMPEXP_FWD_CORE wxArtProvidersList;
class WXDLLIMPEXP_FWD_CORE wxArtProviderCache;
@@ -27,10 +27,10 @@ class wxArtProviderModule;
typedef wxString wxArtClient;
typedef wxString wxArtID;
-#define wxART_MAKE_CLIENT_ID_FROM_STR(id) ((id) + "_C")
-#define wxART_MAKE_CLIENT_ID(id) (#id "_C")
+#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + wxT("_C"))
+#define wxART_MAKE_CLIENT_ID(id) wxT(#id) wxT("_C")
#define wxART_MAKE_ART_ID_FROM_STR(id) (id)
-#define wxART_MAKE_ART_ID(id) (#id)
+#define wxART_MAKE_ART_ID(id) wxT(#id)
// ----------------------------------------------------------------------------
// Art clients
@@ -44,7 +44,6 @@ typedef wxString wxArtID;
#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_LIST wxART_MAKE_CLIENT_ID(wxART_LIST)
#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER)
@@ -65,8 +64,6 @@ typedef wxString wxArtID;
#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_GOTO_FIRST wxART_MAKE_ART_ID(wxART_GOTO_FIRST)
-#define wxART_GOTO_LAST wxART_MAKE_ART_ID(wxART_GOTO_LAST)
#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)
@@ -102,10 +99,6 @@ typedef wxString wxArtID;
#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO)
#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO)
-#define wxART_PLUS wxART_MAKE_ART_ID(wxART_PLUS)
-#define wxART_MINUS wxART_MAKE_ART_ID(wxART_MINUS)
-
-#define wxART_CLOSE wxART_MAKE_ART_ID(wxART_CLOSE)
#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT)
#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND)
@@ -116,14 +109,12 @@ typedef wxString wxArtID;
// wxArtProvider class
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxArtProvider : public wxObject
+class WXDLLEXPORT wxArtProvider : public wxObject
{
public:
// Dtor removes the provider from providers stack if it's still on it
virtual ~wxArtProvider();
- // Does this platform implement native icons theme?
- static bool HasNativeProvider();
// Add new provider to the top of providers stack (i.e. the provider will
// be queried first of all).
@@ -131,12 +122,11 @@ public:
// Add new provider to the bottom of providers stack (i.e. the provider
// will be queried as the last one).
+#if wxABI_VERSION >= 20810
static void PushBack(wxArtProvider *provider);
-
-#if WXWIN_COMPATIBILITY_2_8
- // use PushBack(), it's the same thing
- static wxDEPRECATED( void Insert(wxArtProvider *provider) );
#endif
+ // same as PushBack()
+ static void Insert(wxArtProvider *provider);
// Remove latest added provider and delete it.
static bool Pop();
@@ -160,54 +150,26 @@ public:
const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize);
- // Helper used by GetMessageBoxIcon(): return the art id corresponding to
- // the standard wxICON_INFORMATION/WARNING/ERROR/QUESTION flags (only one
- // can be set)
- static wxArtID GetMessageBoxIconId(int flags);
-
- // Helper used by several generic classes: return the icon corresponding to
- // the standard wxICON_INFORMATION/WARNING/ERROR/QUESTION flags (only one
- // can be set)
- static wxIcon GetMessageBoxIcon(int flags)
- {
- return GetIcon(GetMessageBoxIconId(flags), wxART_MESSAGE_BOX);
- }
-
- // Query the providers for iconbundle with given ID and return it. Return
- // wxNullIconBundle if no provider provides it.
- static wxIconBundle GetIconBundle(const wxArtID& id,
- const wxArtClient& client = wxART_OTHER);
-
- // Gets native size for given 'client' or wxDefaultSize if it doesn't
- // have native equivalent
- static wxSize GetNativeSizeHint(const wxArtClient& client);
-
// 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
- static wxDEPRECATED( void PushProvider(wxArtProvider *provider) );
- static wxDEPRECATED( void InsertProvider(wxArtProvider *provider) );
- static wxDEPRECATED( bool PopProvider() );
+ 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
- static wxDEPRECATED( bool RemoveProvider(wxArtProvider *provider) );
+ wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) );
#endif // WXWIN_COMPATIBILITY_2_6
protected:
friend class wxArtProviderModule;
-#if wxUSE_ARTPROVIDER_STD
// Initializes default provider
static void InitStdProvider();
-#endif // wxUSE_ARTPROVIDER_STD
- // Initializes Tango-based icon provider
-#if wxUSE_ARTPROVIDER_TANGO
- static void InitTangoProvider();
-#endif // wxUSE_ARTPROVIDER_TANGO
// Initializes platform's native provider, if available (e.g. GTK2)
static void InitNativeProvider();
// Destroy caches & all providers
@@ -219,26 +181,15 @@ protected:
return GetSizeHint(client, true);
}
- // Derived classes must override CreateBitmap or CreateIconBundle
- // (or both) to create requested art resource. This method is called
- // only once per instance's lifetime for each requested wxArtID.
+ // 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))
- {
- return wxNullBitmap;
- }
-
- virtual wxIconBundle CreateIconBundle(const wxArtID& WXUNUSED(id),
- const wxArtClient& WXUNUSED(client))
- {
- return wxNullIconBundle;
- }
+ const wxSize& WXUNUSED(size)) = 0;
private:
static void CommonAddingProvider();
- static wxIconBundle DoGetIconBundle(const wxArtID& id,
- const wxArtClient& client);
private:
// list of providers:
@@ -250,12 +201,4 @@ private:
};
-#if !defined(__WXUNIVERSAL__) && \
- ((defined(__WXGTK__) && defined(__WXGTK20__)) || defined(__WXMSW__) || \
- defined(__WXMAC__))
- // *some* (partial) native implementation of wxArtProvider exists; this is
- // not the same as wxArtProvider::HasNativeProvider()!
- #define wxHAS_NATIVE_ART_PROVIDER_IMPL
-#endif
-
#endif // _WX_ARTPROV_H_
diff --git a/Source/3rd Party/wx/include/wx/atomic.h b/Source/3rd Party/wx/include/wx/atomic.h
deleted file mode 100644
index 1439d2948..000000000
--- a/Source/3rd Party/wx/include/wx/atomic.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/atomic.h
-// Purpose: functions to manipulate atomically integers and pointers
-// Author: Armel Asselin
-// Created: 12/13/2006
-// Copyright: (c) Armel Asselin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ATOMIC_H_
-#define _WX_ATOMIC_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-// get the value of wxUSE_THREADS configuration flag
-#include "wx/defs.h"
-
-// constraints on the various functions:
-// - wxAtomicDec must return a zero value if the value is zero once
-// decremented else it must return any non-zero value (the true value is OK
-// but not necessary).
-
-#if wxUSE_THREADS
-
-#if defined(HAVE_GCC_ATOMIC_BUILTINS)
-
-// NB: we intentionally don't use Linux's asm/atomic.h header, because it's
-// an internal kernel header that doesn't always work in userspace:
-// http://bugs.mysql.com/bug.php?id=28456
-// http://golubenco.org/blog/atomic-operations/
-
-inline void wxAtomicInc (wxUint32 &value)
-{
- __sync_fetch_and_add(&value, 1);
-}
-
-inline wxUint32 wxAtomicDec (wxUint32 &value)
-{
- return __sync_sub_and_fetch(&value, 1);
-}
-
-
-#elif defined(__WINDOWS__)
-
-// include standard Windows headers
-#include "wx/msw/wrapwin.h"
-
-inline void wxAtomicInc (wxUint32 &value)
-{
- InterlockedIncrement ((LONG*)&value);
-}
-
-inline wxUint32 wxAtomicDec (wxUint32 &value)
-{
- return InterlockedDecrement ((LONG*)&value);
-}
-
-#elif defined(__WXMAC__) || defined(__DARWIN__)
-
-#include "libkern/OSAtomic.h"
-inline void wxAtomicInc (wxUint32 &value)
-{
- OSAtomicIncrement32 ((int32_t*)&value);
-}
-
-inline wxUint32 wxAtomicDec (wxUint32 &value)
-{
- return OSAtomicDecrement32 ((int32_t*)&value);
-}
-
-#elif defined (__SOLARIS__)
-
-#include
-
-inline void wxAtomicInc (wxUint32 &value)
-{
- atomic_add_32 ((uint32_t*)&value, 1);
-}
-
-inline wxUint32 wxAtomicDec (wxUint32 &value)
-{
- return atomic_add_32_nv ((uint32_t*)&value, (uint32_t)-1);
-}
-
-#else // unknown platform
-
-// it will result in inclusion if the generic implementation code a bit later in this page
-#define wxNEEDS_GENERIC_ATOMIC_OPS
-
-#endif // unknown platform
-
-#else // else of wxUSE_THREADS
-// if no threads are used we can safely use simple ++/--
-
-inline void wxAtomicInc (wxUint32 &value) { ++value; }
-inline wxUint32 wxAtomicDec (wxUint32 &value) { return --value; }
-
-#endif // !wxUSE_THREADS
-
-// ----------------------------------------------------------------------------
-// proxies to actual implementations, but for various other types with same
-// behaviour
-// ----------------------------------------------------------------------------
-
-#ifdef wxNEEDS_GENERIC_ATOMIC_OPS
-
-#include "wx/thread.h" // for wxCriticalSection
-
-class wxAtomicInt32
-{
-public:
- wxAtomicInt32() { } // non initialized for consistency with basic int type
- wxAtomicInt32(wxInt32 v) : m_value(v) { }
- wxAtomicInt32(const wxAtomicInt32& a) : m_value(a.m_value) {}
-
- operator wxInt32() const { return m_value; }
- operator volatile wxInt32&() { return m_value; }
-
- wxAtomicInt32& operator=(wxInt32 v) { m_value = v; return *this; }
-
- void Inc()
- {
- wxCriticalSectionLocker lock(m_locker);
- ++m_value;
- }
-
- wxInt32 Dec()
- {
- wxCriticalSectionLocker lock(m_locker);
- return --m_value;
- }
-
-private:
- volatile wxInt32 m_value;
- wxCriticalSection m_locker;
-};
-
-inline void wxAtomicInc(wxAtomicInt32 &value) { value.Inc(); }
-inline wxInt32 wxAtomicDec(wxAtomicInt32 &value) { return value.Dec(); }
-
-#else // !wxNEEDS_GENERIC_ATOMIC_OPS
-
-#define wxHAS_ATOMIC_OPS
-
-inline void wxAtomicInc(wxInt32 &value) { wxAtomicInc((wxUint32&)value); }
-inline wxInt32 wxAtomicDec(wxInt32 &value) { return wxAtomicDec((wxUint32&)value); }
-
-typedef wxInt32 wxAtomicInt32;
-
-#endif // wxNEEDS_GENERIC_ATOMIC_OPS
-
-// all the native implementations use 32 bits currently
-// for a 64 bits implementation we could use (a future) wxAtomicInt64 as
-// default type
-typedef wxAtomicInt32 wxAtomicInt;
-
-#endif // _WX_ATOMIC_H_
diff --git a/Source/3rd Party/wx/include/wx/bannerwindow.h b/Source/3rd Party/wx/include/wx/bannerwindow.h
deleted file mode 100644
index 1f1fb2461..000000000
--- a/Source/3rd Party/wx/include/wx/bannerwindow.h
+++ /dev/null
@@ -1,144 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/bannerwindow.h
-// Purpose: wxBannerWindow class declaration
-// Author: Vadim Zeitlin
-// Created: 2011-08-16
-// Copyright: (c) 2011 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BANNERWINDOW_H_
-#define _WX_BANNERWINDOW_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_BANNERWINDOW
-
-#include "wx/bitmap.h"
-#include "wx/event.h"
-#include "wx/window.h"
-
-class WXDLLIMPEXP_FWD_CORE wxBitmap;
-class WXDLLIMPEXP_FWD_CORE wxColour;
-class WXDLLIMPEXP_FWD_CORE wxDC;
-
-extern WXDLLIMPEXP_DATA_ADV(const char) wxBannerWindowNameStr[];
-
-// ----------------------------------------------------------------------------
-// A simple banner window showing either a bitmap or text.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxBannerWindow : public wxWindow
-{
-public:
- // Default constructor, use Create() later.
- wxBannerWindow() { Init(); }
-
- // Convenient constructor that should be used in the majority of cases.
- //
- // The banner orientation changes how the text in it is displayed and also
- // defines where is the bitmap truncated if it's too big to fit but doesn't
- // do anything for the banner position, this is supposed to be taken care
- // of in the usual way, e.g. using sizers.
- wxBannerWindow(wxWindow* parent, wxDirection dir = wxLEFT)
- {
- Init();
-
- Create(parent, wxID_ANY, dir);
- }
-
- // Full constructor provided for consistency with the other classes only.
- wxBannerWindow(wxWindow* parent,
- wxWindowID winid,
- wxDirection dir = wxLEFT,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxBannerWindowNameStr)
- {
- Init();
-
- Create(parent, winid, dir, pos, size, style, name);
- }
-
- // Can be only called on objects created with the default constructor.
- bool Create(wxWindow* parent,
- wxWindowID winid,
- wxDirection dir = wxLEFT,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxBannerWindowNameStr);
-
-
- // Provide an existing bitmap to show. For wxLEFT orientation the bitmap is
- // truncated from the top, for wxTOP and wxBOTTOM -- from the right and for
- // wxRIGHT -- from the bottom, so put the most important part of the bitmap
- // information in the opposite direction.
- void SetBitmap(const wxBitmap& bmp);
-
- // Set the text to display. This is mutually exclusive with SetBitmap().
- // Title is rendered in bold and should be single line, message can have
- // multiple lines but is not wrapped automatically.
- void SetText(const wxString& title, const wxString& message);
-
- // Set the colours between which the gradient runs. This can be combined
- // with SetText() but not SetBitmap().
- void SetGradient(const wxColour& start, const wxColour& end);
-
-protected:
- virtual wxSize DoGetBestClientSize() const;
-
-private:
- // Common part of all constructors.
- void Init();
-
- // Fully invalidates the window.
- void OnSize(wxSizeEvent& event);
-
- // Redraws the window using either m_bitmap or m_title/m_message.
- void OnPaint(wxPaintEvent& event);
-
- // Helper of OnPaint(): draw the bitmap at the correct position depending
- // on our orientation.
- void DrawBitmapBackground(wxDC& dc);
-
- // Helper of OnPaint(): draw the text in the appropriate direction.
- void DrawBannerTextLine(wxDC& dc, const wxString& str, const wxPoint& pos);
-
- // Return the font to use for the title. Currently this is hardcoded as a
- // larger bold version of the standard window font but could be made
- // configurable in the future.
- wxFont GetTitleFont() const;
-
- // Return the colour to use for extending the bitmap. Non-const as it
- // updates m_colBitmapBg if needed.
- wxColour GetBitmapBg();
-
-
- // The window side along which the banner is laid out.
- wxDirection m_direction;
-
- // If valid, this bitmap is drawn as is.
- wxBitmap m_bitmap;
-
- // If bitmap is valid, this is the colour we use to extend it if the bitmap
- // is smaller than this window. It is computed on demand by GetBitmapBg().
- wxColour m_colBitmapBg;
-
- // The title and main message to draw, used if m_bitmap is invalid.
- wxString m_title,
- m_message;
-
- // Start and stop gradient colours, only used when drawing text.
- wxColour m_colStart,
- m_colEnd;
-
- wxDECLARE_EVENT_TABLE();
-
- wxDECLARE_NO_COPY_CLASS(wxBannerWindow);
-};
-
-#endif // wxUSE_BANNERWINDOW
-
-#endif // _WX_BANNERWINDOW_H_
diff --git a/Source/3rd Party/wx/include/wx/base64.h b/Source/3rd Party/wx/include/wx/base64.h
deleted file mode 100644
index 96c6dd80e..000000000
--- a/Source/3rd Party/wx/include/wx/base64.h
+++ /dev/null
@@ -1,121 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/base64.h
-// Purpose: declaration of BASE64 encoding/decoding functionality
-// Author: Charles Reimers, Vadim Zeitlin
-// Created: 2007-06-18
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BASE64_H_
-#define _WX_BASE64_H_
-
-#if wxUSE_BASE64
-
-#include "wx/string.h"
-#include "wx/buffer.h"
-
-// ----------------------------------------------------------------------------
-// encoding functions
-// ----------------------------------------------------------------------------
-
-// return the size needed for the buffer containing the encoded representation
-// of a buffer of given length
-inline size_t wxBase64EncodedSize(size_t len) { return 4*((len+2)/3); }
-
-// raw base64 encoding function which encodes the contents of a buffer of the
-// specified length into the buffer of the specified size
-//
-// returns the length of the encoded data or wxCONV_FAILED if the buffer is not
-// large enough; to determine the needed size you can either allocate a buffer
-// of wxBase64EncodedSize(srcLen) size or call the function with NULL buffer in
-// which case the required size will be returned
-WXDLLIMPEXP_BASE size_t
-wxBase64Encode(char *dst, size_t dstLen, const void *src, size_t srcLen);
-
-// encode the contents of the given buffer using base64 and return as string
-// (there is no error return)
-inline wxString wxBase64Encode(const void *src, size_t srcLen)
-{
- const size_t dstLen = wxBase64EncodedSize(srcLen);
- wxCharBuffer dst(dstLen);
- wxBase64Encode(dst.data(), dstLen, src, srcLen);
-
- return dst;
-}
-
-inline wxString wxBase64Encode(const wxMemoryBuffer& buf)
-{
- return wxBase64Encode(buf.GetData(), buf.GetDataLen());
-}
-
-// ----------------------------------------------------------------------------
-// decoding functions
-// ----------------------------------------------------------------------------
-
-// elements of this enum specify the possible behaviours of wxBase64Decode()
-// when an invalid character is encountered
-enum wxBase64DecodeMode
-{
- // normal behaviour: stop at any invalid characters
- wxBase64DecodeMode_Strict,
-
- // skip whitespace characters
- wxBase64DecodeMode_SkipWS,
-
- // the most lenient behaviour: simply ignore all invalid characters
- wxBase64DecodeMode_Relaxed
-};
-
-// return the buffer size necessary for decoding a base64 string of the given
-// length
-inline size_t wxBase64DecodedSize(size_t srcLen) { return 3*srcLen/4; }
-
-// raw decoding function which decodes the contents of the string of specified
-// length (or NUL-terminated by default) into the provided buffer of the given
-// size
-//
-// the function normally stops at any character invalid inside a base64-encoded
-// string (i.e. not alphanumeric nor '+' nor '/') but can be made to skip the
-// whitespace or all invalid characters using its mode argument
-//
-// returns the length of the decoded data or wxCONV_FAILED if an error occurs
-// such as the buffer is too small or the encoded string is invalid; in the
-// latter case the posErr is filled with the position where the decoding
-// stopped if it is not NULL
-WXDLLIMPEXP_BASE size_t
-wxBase64Decode(void *dst, size_t dstLen,
- const char *src, size_t srcLen = wxNO_LEN,
- wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
- size_t *posErr = NULL);
-
-inline size_t
-wxBase64Decode(void *dst, size_t dstLen,
- const wxString& src,
- wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
- size_t *posErr = NULL)
-{
- // don't use str.length() here as the ASCII buffer is shorter than it for
- // strings with embedded NULs
- return wxBase64Decode(dst, dstLen, src.ToAscii(), wxNO_LEN, mode, posErr);
-}
-
-// decode the contents of the given string; the returned buffer is empty if an
-// error occurs during decoding
-WXDLLIMPEXP_BASE wxMemoryBuffer
-wxBase64Decode(const char *src, size_t srcLen = wxNO_LEN,
- wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
- size_t *posErr = NULL);
-
-inline wxMemoryBuffer
-wxBase64Decode(const wxString& src,
- wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
- size_t *posErr = NULL)
-{
- // don't use str.length() here as the ASCII buffer is shorter than it for
- // strings with embedded NULs
- return wxBase64Decode(src.ToAscii(), wxNO_LEN, mode, posErr);
-}
-
-#endif // wxUSE_BASE64
-
-#endif // _WX_BASE64_H_
diff --git a/Source/3rd Party/wx/include/wx/beforestd.h b/Source/3rd Party/wx/include/wx/beforestd.h
index 62ba0ac8d..7261de803 100644
--- a/Source/3rd Party/wx/include/wx/beforestd.h
+++ b/Source/3rd Party/wx/include/wx/beforestd.h
@@ -1,9 +1,10 @@
///////////////////////////////////////////////////////////////////////////////
-// Name: wx/beforestd.h
+// Name: include/wx/beforestd.h
// Purpose: #include before STL headers
// Author: Vadim Zeitlin
// Modified by:
// Created: 07/07/03
+// RCS-ID: $Id: beforestd.h 61871 2009-09-09 22:29:51Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -22,20 +23,6 @@
// 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
- // 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 so
- // disable them before warning(push) below
-
- // '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)
-
// MSVC 5 does not have this
#if __VISUALC__ > 1100
// we have to disable (and reenable in afterstd.h) this one because,
@@ -61,15 +48,28 @@
// '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
-/**
- GCC's visibility support is broken for libstdc++ in some older versions
- (namely Debian/Ubuntu's GCC 4.1, see
- https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/109262). We fix it
- here by mimicking newer versions' behaviour of using default visibility
- for libstdc++ code.
+/*
+ Recent versions of Sun C++ compiler use _T in their standard headers and
+ our definition of it in wx/wxchar.h conflicts with them and breaks
+ compilation, so undefine _T before including them and redefine it back in
+ wx/afterstd.h if needed.
*/
-#if defined(HAVE_VISIBILITY) && defined(HAVE_BROKEN_LIBSTDCXX_VISIBILITY)
- #pragma GCC visibility push(default)
-#endif
+#if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
+ #undef _T
+#endif /* SUNCC */
+
diff --git a/Source/3rd Party/wx/include/wx/bitmap.h b/Source/3rd Party/wx/include/wx/bitmap.h
index 2ca45f673..bcee14373 100644
--- a/Source/3rd Party/wx/include/wx/bitmap.h
+++ b/Source/3rd Party/wx/include/wx/bitmap.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -18,14 +19,13 @@
#include "wx/string.h"
#include "wx/gdicmn.h" // for wxBitmapType
#include "wx/colour.h"
-#include "wx/image.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;
-class WXDLLIMPEXP_FWD_CORE wxDC;
// ----------------------------------------------------------------------------
// wxVariant support
@@ -33,16 +33,14 @@ class WXDLLIMPEXP_FWD_CORE wxDC;
#if wxUSE_VARIANT
#include "wx/variant.h"
-DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLIMPEXP_CORE)
+DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT)
#endif
// ----------------------------------------------------------------------------
// wxMask represents the transparent area of the bitmap
// ----------------------------------------------------------------------------
-// TODO: all implementation of wxMask, except the generic one,
-// do not derive from wxMaskBase,,, they should
-class WXDLLIMPEXP_CORE wxMaskBase : public wxObject
+class WXDLLEXPORT wxMaskBase : public wxObject
{
public:
// create the mask from bitmap pixels of the given colour
@@ -68,7 +66,8 @@ protected:
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
};
-#if defined(__WXDFB__) || \
+#if defined(__WXMGL__) || \
+ defined(__WXDFB__) || \
defined(__WXMAC__) || \
defined(__WXGTK__) || \
defined(__WXCOCOA__) || \
@@ -79,30 +78,8 @@ protected:
#define wxUSE_BITMAP_BASE 0
#endif
-// a more readable way to tell
-#define wxBITMAP_SCREEN_DEPTH (-1)
-
-
-// ----------------------------------------------------------------------------
-// wxBitmapHelpers: container for various bitmap methods common to all ports.
-// ----------------------------------------------------------------------------
-
-// Unfortunately, currently wxBitmap does not inherit from wxBitmapBase on all
-// platforms and this is not easy to fix. So we extract at least some common
-// methods into this class from which both wxBitmapBase (and hence wxBitmap on
-// all platforms where it does inherit from it) and wxBitmap in wxMSW and other
-// exceptional ports (only wxPM and old wxCocoa) inherit.
-class WXDLLIMPEXP_CORE wxBitmapHelpers
-{
-public:
- // Create a new wxBitmap from the PNG data in the given buffer.
- static wxBitmap NewFromPNGData(const void* data, size_t size);
-};
-
-
-// All ports except wxMSW and wxOS2 use wxBitmapHandler and wxBitmapBase as
-// base class for wxBitmapHandler; wxMSW and wxOS2 use wxGDIImageHandler as
-// base class since it allows some code reuse there.
+// Only used by some ports
+// FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes
#if wxUSE_BITMAP_BASE
// ----------------------------------------------------------------------------
@@ -110,29 +87,18 @@ public:
// different formats
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxBitmapHandler : public wxObject
+class WXDLLEXPORT wxBitmapHandlerBase : public wxObject
{
public:
- wxBitmapHandler() { m_type = wxBITMAP_TYPE_INVALID; }
- virtual ~wxBitmapHandler() { }
+ wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; }
+ virtual ~wxBitmapHandlerBase() { }
- // NOTE: the following functions should be pure virtuals, but they aren't
- // because otherwise almost all ports would have to implement
- // them as "return false"...
-
- virtual bool Create(wxBitmap *WXUNUSED(bitmap), const void* WXUNUSED(data),
- wxBitmapType WXUNUSED(type), int WXUNUSED(width), int WXUNUSED(height),
- int WXUNUSED(depth) = 1)
- { return false; }
-
- virtual bool LoadFile(wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name),
- wxBitmapType WXUNUSED(type), int WXUNUSED(desiredWidth),
- int WXUNUSED(desiredHeight))
- { return false; }
-
- virtual bool SaveFile(const wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name),
- wxBitmapType WXUNUSED(type), const wxPalette *WXUNUSED(palette) = NULL) const
- { return false; }
+ 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; }
@@ -146,65 +112,43 @@ private:
wxString m_extension;
wxBitmapType m_type;
- DECLARE_ABSTRACT_CLASS(wxBitmapHandler)
+ DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase)
};
-// ----------------------------------------------------------------------------
-// wxBitmap: class which represents platform-dependent bitmap (unlike wxImage)
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject,
- public wxBitmapHelpers
+class WXDLLEXPORT wxBitmapBase : public wxGDIObject
{
public:
/*
Derived class must implement these:
wxBitmap();
- wxBitmap(const wxBitmap& bmp);
+ wxBitmap(int width, int height, int depth = -1);
wxBitmap(const char bits[], int width, int height, int depth = 1);
- wxBitmap(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
- wxBitmap(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH);
wxBitmap(const char* const* bits);
wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
- wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH);
+ wxBitmap(const wxImage& image, int depth = -1);
+
+ bool Create(int width, int height, int depth = -1);
static void InitStandardHandlers();
*/
- virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
- virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
- virtual bool CreateScaled(int w, int h, int d, double logicalScale)
- { return Create(w*logicalScale,h*logicalScale,d); }
+ 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;
- wxSize GetSize() const
- { return wxSize(GetWidth(), GetHeight()); }
-
- // support for scaled bitmaps
- virtual double GetScaleFactor() const { return 1.0; }
- virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); }
- virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); }
- virtual wxSize GetScaledSize() const
- { return wxSize(GetScaledWidth(), GetScaledHeight()); }
-
-#if wxUSE_IMAGE
virtual wxImage ConvertToImage() const = 0;
- // Convert to disabled (dimmed) bitmap.
- wxBitmap ConvertToDisabled(unsigned char brightness = 255) const;
-#endif // wxUSE_IMAGE
-
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 = NULL) const = 0;
+ const wxPalette *palette = (wxPalette *)NULL) const = 0;
virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0;
/*
@@ -230,8 +174,8 @@ public:
// Format handling
static inline wxList& GetHandlers() { return sm_handlers; }
- static void AddHandler(wxBitmapHandler *handler);
- static void InsertHandler(wxBitmapHandler *handler);
+ 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);
@@ -259,58 +203,32 @@ protected:
#endif // wxUSE_BITMAP_BASE
-
-// the wxBITMAP_DEFAULT_TYPE constant defines the default argument value
-// for wxBitmap's ctor and wxBitmap::LoadFile() functions.
-#if defined(__WXMSW__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/bitmap.h"
+#elif defined(__WXMSW__)
#include "wx/msw/bitmap.h"
#elif defined(__WXMOTIF__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/bitmap.h"
#elif defined(__WXGTK20__)
- #ifdef __WINDOWS__
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
- #else
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
- #endif
#include "wx/gtk/bitmap.h"
#elif defined(__WXGTK__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/gtk1/bitmap.h"
#elif defined(__WXX11__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/bitmap.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/bitmap.h"
#elif defined(__WXDFB__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/dfb/bitmap.h"
#elif defined(__WXMAC__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_PICT_RESOURCE
- #include "wx/osx/bitmap.h"
+ #include "wx/mac/bitmap.h"
#elif defined(__WXCOCOA__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/cocoa/bitmap.h"
#elif defined(__WXPM__)
- #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/os2/bitmap.h"
#endif
-#if wxUSE_IMAGE
-inline
-wxBitmap
-#if wxUSE_BITMAP_BASE
-wxBitmapBase::
-#else
-wxBitmap::
-#endif
-ConvertToDisabled(unsigned char brightness) const
-{
- return ConvertToImage().ConvertToDisabled(brightness);
-}
-#endif // wxUSE_IMAGE
-
// we must include generic mask.h after wxBitmap definition
-#if defined(__WXDFB__)
+#if defined(__WXMGL__) || defined(__WXDFB__)
#define wxUSE_GENERIC_MASK 1
#else
#define wxUSE_GENERIC_MASK 0
diff --git a/Source/3rd Party/wx/include/wx/bmpbuttn.h b/Source/3rd Party/wx/include/wx/bmpbuttn.h
index 97e5f410d..f7b96b662 100644
--- a/Source/3rd Party/wx/include/wx/bmpbuttn.h
+++ b/Source/3rd Party/wx/include/wx/bmpbuttn.h
@@ -1,9 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/bmpbuttn.h
+// 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
/////////////////////////////////////////////////////////////////////////////
@@ -15,75 +16,57 @@
#if wxUSE_BMPBUTTON
+#include "wx/bitmap.h"
#include "wx/button.h"
-// FIXME: right now only wxMSW, wxGTK and wxOSX implement bitmap support in wxButton
-// itself, this shouldn't be used for the other platforms neither
-// when all of them do it
-#if (defined(__WXMSW__) || defined(__WXGTK20__) || defined(__WXOSX__)) && !defined(__WXUNIVERSAL__)
- #define wxHAS_BUTTON_BITMAP
-#endif
-
-class WXDLLIMPEXP_FWD_CORE wxBitmapButton;
+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 WXDLLIMPEXP_CORE wxBitmapButtonBase : public wxButton
+class WXDLLEXPORT wxBitmapButtonBase : public wxButton
{
public:
wxBitmapButtonBase()
{
-#ifndef wxHAS_BUTTON_BITMAP
m_marginX =
m_marginY = 0;
-#endif // wxHAS_BUTTON_BITMAP
}
- bool Create(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString& name)
- {
- // We use wxBU_NOTEXT to let the base class Create() know that we are
- // not going to show the label: this is a hack needed for wxGTK where
- // we can show both label and bitmap only with GTK 2.6+ but we always
- // can show just one of them and this style allows us to choose which
- // one we need.
- //
- // And we also use wxBU_EXACTFIT to avoid being resized up to the
- // standard button size as this doesn't make sense for bitmap buttons
- // which are not standard anyhow and should fit their bitmap size.
- return wxButton::Create(parent, winid, "",
- pos, size,
- style | wxBU_NOTEXT | wxBU_EXACTFIT,
- validator, name);
- }
-
- // Special creation function for a standard "Close" bitmap. It allows to
- // simply create a close button with the image appropriate for the common
- // platform.
- static wxBitmapButton* NewCloseButton(wxWindow* parent, wxWindowID winid);
+ // 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)
- {
- DoSetBitmapMargins(x, y);
- }
-
- int GetMarginX() const { return DoGetBitmapMargins().x; }
- int GetMarginY() const { return DoGetBitmapMargins().y; }
+ 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_INLINE( void SetLabel(const wxBitmap& bitmap),
- SetBitmapLabel(bitmap); )
+ wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) );
// prevent virtual function hiding
virtual void SetLabel(const wxString& label)
@@ -91,36 +74,31 @@ public:
#endif // WXWIN_COMPATIBILITY_2_6
protected:
-#ifndef wxHAS_BUTTON_BITMAP
// function called when any of the bitmaps changes
virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); }
- virtual wxBitmap DoGetBitmap(State which) const { return m_bitmaps[which]; }
- virtual void DoSetBitmap(const wxBitmap& bitmap, State which)
- { m_bitmaps[which] = bitmap; OnSetBitmap(); }
-
- virtual wxSize DoGetBitmapMargins() const
- {
- return wxSize(m_marginX, m_marginY);
- }
-
- virtual void DoSetBitmapMargins(int x, int y)
- {
- m_marginX = x;
- m_marginY = y;
- }
-
// the bitmaps for various states
- wxBitmap m_bitmaps[State_Max];
+ wxBitmap m_bmpNormal,
+ m_bmpSelected,
+ m_bmpFocus,
+ m_bmpDisabled,
+ m_bmpHover;
// the margins around the bitmap
int m_marginX,
m_marginY;
-#endif // !wxHAS_BUTTON_BITMAP
- wxDECLARE_NO_COPY_CLASS(wxBitmapButtonBase);
+
+ 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__)
@@ -132,7 +110,7 @@ protected:
#elif defined(__WXGTK__)
#include "wx/gtk1/bmpbuttn.h"
#elif defined(__WXMAC__)
- #include "wx/osx/bmpbuttn.h"
+ #include "wx/mac/bmpbuttn.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/bmpbuttn.h"
#elif defined(__WXPM__)
diff --git a/Source/3rd Party/wx/include/wx/bmpcbox.h b/Source/3rd Party/wx/include/wx/bmpcbox.h
deleted file mode 100644
index a5b9beeed..000000000
--- a/Source/3rd Party/wx/include/wx/bmpcbox.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/bmpcbox.h
-// Purpose: wxBitmapComboBox base header
-// Author: Jaakko Salli
-// Modified by:
-// Created: Aug-31-2006
-// Copyright: (c) Jaakko Salli
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BMPCBOX_H_BASE_
-#define _WX_BMPCBOX_H_BASE_
-
-
-#include "wx/defs.h"
-
-#if wxUSE_BITMAPCOMBOBOX
-
-#include "wx/bitmap.h"
-#include "wx/dynarray.h"
-
-class WXDLLIMPEXP_FWD_CORE wxWindow;
-class WXDLLIMPEXP_FWD_CORE wxItemContainer;
-
-// Define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED for platforms which
-// wxBitmapComboBox implementation utilizes ownerdrawn combobox
-// (either native or generic).
-#if !defined(__WXGTK20__) || defined(__WXUNIVERSAL__)
- #define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
-
-class WXDLLIMPEXP_FWD_CORE wxDC;
-#endif
-
-extern WXDLLIMPEXP_DATA_ADV(const char) wxBitmapComboBoxNameStr[];
-
-
-class WXDLLIMPEXP_ADV wxBitmapComboBoxBase
-{
-public:
- // ctors and such
- wxBitmapComboBoxBase() { Init(); }
-
- virtual ~wxBitmapComboBoxBase() { }
-
- // Sets the image for the given item.
- virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
-
-#if !defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED)
-
- // Returns the image of the item with the given index.
- virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
-
- // Returns size of the image used in list
- virtual wxSize GetBitmapSize() const = 0;
-
-private:
- void Init() {}
-
-#else // wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
-
- // Returns the image of the item with the given index.
- virtual wxBitmap GetItemBitmap(unsigned int n) const;
-
- // Returns size of the image used in list
- virtual wxSize GetBitmapSize() const
- {
- return m_usedImgSize;
- }
-
-protected:
-
- // Returns pointer to the combobox item container
- virtual wxItemContainer* GetItemContainer() = 0;
-
- // Return pointer to the owner-drawn combobox control
- virtual wxWindow* GetControl() = 0;
-
- // wxItemContainer functions
- void BCBDoClear();
- void BCBDoDeleteOneItem(unsigned int n);
-
- void DoSetItemBitmap(unsigned int n, const wxBitmap& bitmap);
-
- void DrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const;
- void DrawItem(wxDC& dc, const wxRect& rect, int item, const wxString& text,
- int flags) const;
- wxCoord MeasureItem(size_t item) const;
-
- // Returns true if image size was affected
- virtual bool OnAddBitmap(const wxBitmap& bitmap);
-
- // Recalculates amount of empty space needed in front of text
- // in control itself. Returns number that can be passed to
- // wxOwnerDrawnComboBox::SetCustomPaintWidth() and similar
- // functions.
- virtual int DetermineIndent();
-
- void UpdateInternals();
-
- wxArrayPtrVoid m_bitmaps; // Images associated with items
- wxSize m_usedImgSize; // Size of bitmaps
-
- int m_imgAreaWidth; // Width and height of area next to text field
- int m_fontHeight;
- int m_indent;
-
-private:
- void Init();
-#endif // !wxBITMAPCOMBOBOX_OWNERDRAWN_BASED/wxBITMAPCOMBOBOX_OWNERDRAWN_BASED
-};
-
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/generic/bmpcbox.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/bmpcbox.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/bmpcbox.h"
-#else
- #include "wx/generic/bmpcbox.h"
-#endif
-
-#endif // wxUSE_BITMAPCOMBOBOX
-
-#endif // _WX_BMPCBOX_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/bookctrl.h b/Source/3rd Party/wx/include/wx/bookctrl.h
index 55b7e9946..98a95dc6e 100644
--- a/Source/3rd Party/wx/include/wx/bookctrl.h
+++ b/Source/3rd Party/wx/include/wx/bookctrl.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -21,12 +22,11 @@
#include "wx/control.h"
#include "wx/dynarray.h"
-#include "wx/withimages.h"
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
class WXDLLIMPEXP_FWD_CORE wxImageList;
-class WXDLLIMPEXP_FWD_CORE wxBookCtrlEvent;
+class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent;
// ----------------------------------------------------------------------------
// constants
@@ -54,8 +54,7 @@ enum
// wxBookCtrlBase
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl,
- public wxWithImages
+class WXDLLEXPORT wxBookCtrlBase : public wxControl
{
public:
// construction
@@ -86,6 +85,9 @@ public:
long style = 0,
const wxString& name = wxEmptyString);
+ // dtor
+ virtual ~wxBookCtrlBase();
+
// accessors
// ---------
@@ -94,7 +96,8 @@ public:
virtual size_t GetPageCount() const { return m_pages.size(); }
// get the panel which represents the given page
- virtual wxWindow *GetPage(size_t n) const { return m_pages[n]; }
+ 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
@@ -104,7 +107,7 @@ public:
}
// get the currently selected page or wxNOT_FOUND if none
- virtual int GetSelection() const { return m_selection; }
+ virtual int GetSelection() const = 0;
// set/get the title of a page
virtual bool SetPageText(size_t n, const wxString& strText) = 0;
@@ -115,6 +118,15 @@ public:
// 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;
@@ -126,14 +138,8 @@ public:
// resize the notebook so that all pages will have the specified size
virtual void SetPageSize(const wxSize& size);
- // return the size of the area needed to accommodate the controller
- wxSize GetControllerSize() const;
-
// calculate the size of the control from the size of its page
- //
- // by default this simply returns size enough to fit both the page and the
- // controller
- virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
+ 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; }
@@ -153,7 +159,6 @@ public:
// returns the sizer containing the control, if any
wxSizer* GetControlSizer() const { return m_controlSizer; }
-
// operations
// ----------
@@ -170,7 +175,6 @@ public:
// remove all pages and delete them
virtual bool DeleteAllPages()
{
- m_selection = wxNOT_FOUND;
DoInvalidateBestSize();
WX_CLEAR_ARRAY(m_pages);
return true;
@@ -180,7 +184,7 @@ public:
virtual bool AddPage(wxWindow *page,
const wxString& text,
bool bSelect = false,
- int imageId = NO_IMAGE)
+ int imageId = -1)
{
DoInvalidateBestSize();
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
@@ -191,10 +195,10 @@ public:
wxWindow *page,
const wxString& text,
bool bSelect = false,
- int imageId = NO_IMAGE) = 0;
+ int imageId = -1) = 0;
// set the currently selected page, return the index of the previously
- // selected one (or wxNOT_FOUND on error)
+ // selected one (or -1 on error)
//
// NB: this function will generate PAGE_CHANGING/ED events
virtual int SetSelection(size_t n) = 0;
@@ -207,16 +211,13 @@ public:
void AdvanceSelection(bool forward = true)
{
int nPage = GetNextPage(forward);
- if ( nPage != wxNOT_FOUND )
+ if ( nPage != -1 )
{
// cast is safe because of the check above
SetSelection((size_t)nPage);
}
}
- // return the index of the given page or wxNOT_FOUND
- int FindPage(const wxWindow* page) const;
-
// hit test: returns which page is hit and, optionally, where (icon, label)
virtual int HitTest(const wxPoint& WXUNUSED(pt),
long * WXUNUSED(flags) = NULL) const
@@ -228,11 +229,6 @@ public:
// we do have multiple pages
virtual bool HasMultiplePages() const { return true; }
- // we don't want focus for ourselves
- virtual bool AcceptsFocus() const { return false; }
-
- // returns true if the platform should explicitly apply a theme border
- virtual bool CanApplyThemeBorder() const { return false; }
protected:
// flags for DoSetSelection()
@@ -241,24 +237,6 @@ protected:
SetSelection_SendEvent = 1
};
- // choose the default border for this window
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
-
- // After the insertion of the page in the method InsertPage, calling this
- // method sets the selection to the given page or the first one if there is
- // still no selection. The "selection changed" event is sent only if
- // bSelect is true, so when it is false, no event is sent even if the
- // selection changed from wxNOT_FOUND to 0 when inserting the first page.
- //
- // Returns true if the selection was set to the specified page (explicitly
- // because of bSelect == true or implicitly because it's the first page) or
- // false otherwise.
- bool DoSetSelectionAfterInsertion(size_t n, bool bSelect);
-
- // Update the selection after removing the page at the given index,
- // typically called from the derived class overridden DoRemovePage().
- void DoSetSelectionAfterRemoval(size_t n);
-
// 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
@@ -274,20 +252,15 @@ protected:
{ wxFAIL_MSG(wxT("Override this function!")); }
// create a new "page changing" event
- virtual wxBookCtrlEvent* CreatePageChangingEvent() const
+ 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(wxBookCtrlEvent& WXUNUSED(event))
+ virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event))
{ wxFAIL_MSG(wxT("Override this function!")); }
- // The derived class also may override the following method, also called
- // from DoSetSelection(), to show/hide pages differently.
- virtual void DoShowPage(wxWindow* page, bool show) { page->Show(show); }
-
-
// Should we accept NULL page pointers in Add/InsertPage()?
//
// Default is no but derived classes may override it if they can treat NULL
@@ -295,11 +268,7 @@ protected:
// having nodes without any associated page)
virtual bool AllowNullPage() const { return false; }
- // Remove the page and return a pointer to it.
- //
- // It also needs to update the current selection if necessary, i.e. if the
- // page being removed comes before the selected one and the helper method
- // DoSetSelectionAfterRemoval() can be used for this.
+ // 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
@@ -309,7 +278,7 @@ protected:
int GetNextPage(bool forward) const;
// Lay out controls
- virtual void DoSize();
+ void DoSize();
// This method also invalidates the size of the controller and should be
// called instead of just InvalidateBestSize() whenever pages are added or
@@ -325,10 +294,17 @@ protected:
// 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
- virtual wxRect GetPageRect() const;
+ 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)
@@ -343,11 +319,6 @@ protected:
// the margin around the choice control
int m_controlMargin;
- // The currently selected page (in range 0..m_pages.size()-1 inclusive) or
- // wxNOT_FOUND if none (this can normally only be the case for an empty
- // control without any pages).
- int m_selection;
-
private:
// common part of all ctors
@@ -357,81 +328,68 @@ private:
unsigned int m_internalBorder;
DECLARE_ABSTRACT_CLASS(wxBookCtrlBase)
- wxDECLARE_NO_COPY_CLASS(wxBookCtrlBase);
-
+ DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
-// wxBookCtrlEvent: page changing events generated by book classes
+// wxBookCtrlBaseEvent: page changing events generated by derived classes
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxBookCtrlEvent : public wxNotifyEvent
+class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
{
public:
- wxBookCtrlEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
- int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND)
+ wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
+ int nSel = -1, int nOldSel = -1)
: wxNotifyEvent(commandType, winid)
{
m_nSel = nSel;
m_nOldSel = nOldSel;
}
- wxBookCtrlEvent(const wxBookCtrlEvent& event)
+ wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event)
: wxNotifyEvent(event)
{
m_nSel = event.m_nSel;
m_nOldSel = event.m_nOldSel;
}
- virtual wxEvent *Clone() const { return new wxBookCtrlEvent(*this); }
-
// accessors
- // the currently selected page (wxNOT_FOUND if none)
+ // 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 (wxNOT_FOUND if none)
+ // 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
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxBookCtrlEvent)
};
-typedef void (wxEvtHandler::*wxBookCtrlEventFunction)(wxBookCtrlEvent&);
-
-#define wxBookCtrlEventHandler(func) \
- wxEVENT_HANDLER_CAST(wxBookCtrlEventFunction, func)
-
-// obsolete name, defined for compatibility only
-#define wxBookCtrlBaseEvent wxBookCtrlEvent
-
// make a default book control for given platform
#if wxUSE_NOTEBOOK
// dedicated to majority of desktops
#include "wx/notebook.h"
#define wxBookCtrl wxNotebook
- #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED
- #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING
+ #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 wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED
- #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING
+ #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
-// old wxEVT_COMMAND_* constants
-#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_BOOKCTRL_PAGE_CHANGED
-#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_BOOKCTRL_PAGE_CHANGING
-
#if WXWIN_COMPATIBILITY_2_6
#define wxBC_TOP wxBK_TOP
#define wxBC_BOTTOM wxBK_BOTTOM
diff --git a/Source/3rd Party/wx/include/wx/brush.h b/Source/3rd Party/wx/include/wx/brush.h
index d26339f77..cf963ab2d 100644
--- a/Source/3rd Party/wx/include/wx/brush.h
+++ b/Source/3rd Party/wx/include/wx/brush.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -14,62 +15,22 @@
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/gdiobj.h"
-#include "wx/gdicmn.h" // for wxGDIObjListBase
-
-// NOTE: these values cannot be combined together!
-enum wxBrushStyle
-{
- wxBRUSHSTYLE_INVALID = -1,
-
- wxBRUSHSTYLE_SOLID = wxSOLID,
- wxBRUSHSTYLE_TRANSPARENT = wxTRANSPARENT,
- wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE,
- wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK,
- wxBRUSHSTYLE_STIPPLE = wxSTIPPLE,
- wxBRUSHSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL,
- wxBRUSHSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG,
- wxBRUSHSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL,
- wxBRUSHSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS,
- wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL,
- wxBRUSHSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL,
- wxBRUSHSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST,
- wxBRUSHSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST
-};
-
// wxBrushBase
-class WXDLLIMPEXP_CORE wxBrushBase: public wxGDIObject
+class WXDLLEXPORT wxBrushBase: public wxGDIObject
{
public:
virtual ~wxBrushBase() { }
- virtual void SetColour(const wxColour& col) = 0;
- virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) = 0;
- virtual void SetStyle(wxBrushStyle style) = 0;
- virtual void SetStipple(const wxBitmap& stipple) = 0;
-
- virtual wxColour GetColour() const = 0;
- virtual wxBrushStyle GetStyle() const = 0;
- virtual wxBitmap *GetStipple() const = 0;
+ virtual int GetStyle() const = 0;
virtual bool IsHatch() const
- { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }
-
- // Convenient helpers for testing whether the brush is a transparent one:
- // unlike GetStyle() == wxBRUSHSTYLE_TRANSPARENT, they work correctly even
- // if the brush is invalid (they both return false in this case).
- bool IsTransparent() const
- {
- return IsOk() && GetStyle() == wxBRUSHSTYLE_TRANSPARENT;
- }
-
- bool IsNonTransparent() const
- {
- return IsOk() && GetStyle() != wxBRUSHSTYLE_TRANSPARENT;
- }
+ { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
};
-#if defined(__WXMSW__)
+#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"
@@ -77,60 +38,17 @@ public:
#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/osx/brush.h"
+ #include "wx/mac/brush.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/brush.h"
#elif defined(__WXPM__)
#include "wx/os2/brush.h"
#endif
-class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
-{
-public:
- wxBrush *FindOrCreateBrush(const wxColour& colour,
- wxBrushStyle style = wxBRUSHSTYLE_SOLID);
-
-#if FUTURE_WXWIN_COMPATIBILITY_3_0
- wxBrush *FindOrCreateBrush(const wxColour& colour, int style)
- { return FindOrCreateBrush(colour, (wxBrushStyle)style); }
#endif
-
-#if WXWIN_COMPATIBILITY_2_6
- wxDEPRECATED( void AddBrush(wxBrush*) );
- wxDEPRECATED( void RemoveBrush(wxBrush*) );
-#endif
-};
-
-extern WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList;
-
-// provide comparison operators to allow code such as
-//
-// if ( brush.GetStyle() == wxTRANSPARENT )
-//
-// to compile without warnings which it would otherwise provoke from some
-// compilers as it compares elements of different enums
-#if FUTURE_WXWIN_COMPATIBILITY_3_0
-
-// Unfortunately some compilers have ambiguity issues when enum comparisons are
-// overloaded so we have to disable the overloads in this case, see
-// wxCOMPILER_NO_OVERLOAD_ON_ENUM definition in wx/platform.h for more details.
-#ifndef wxCOMPILER_NO_OVERLOAD_ON_ENUM
-
-inline bool operator==(wxBrushStyle s, wxDeprecatedGUIConstants t)
-{
- return static_cast(s) == static_cast(t);
-}
-
-inline bool operator!=(wxBrushStyle s, wxDeprecatedGUIConstants t)
-{
- return !(s == t);
-}
-
-#endif // wxCOMPILER_NO_OVERLOAD_ON_ENUM
-
-#endif // FUTURE_WXWIN_COMPATIBILITY_3_0
-
-#endif // _WX_BRUSH_H_BASE_
+ // _WX_BRUSH_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/buffer.h b/Source/3rd Party/wx/include/wx/buffer.h
index 6df8030c0..f1ef1a23f 100644
--- a/Source/3rd Party/wx/include/wx/buffer.h
+++ b/Source/3rd Party/wx/include/wx/buffer.h
@@ -4,6 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 12.04.99
+// RCS-ID: $Id: buffer.h 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -11,426 +12,144 @@
#ifndef _WX_BUFFER_H
#define _WX_BUFFER_H
-#include "wx/chartype.h"
-#include "wx/wxcrtbase.h"
+#include "wx/wxchar.h"
#include // malloc() and free()
-class WXDLLIMPEXP_FWD_BASE wxCStrData;
-
// ----------------------------------------------------------------------------
// Special classes for (wide) character strings: they use malloc/free instead
// of new/delete
// ----------------------------------------------------------------------------
-// helpers used by wxCharTypeBuffer
-namespace wxPrivate
-{
-
-struct UntypedBufferData
-{
- enum Kind
- {
- Owned,
- NonOwned
- };
-
- UntypedBufferData(void *str, size_t len, Kind kind = Owned)
- : m_str(str), m_length(len), m_ref(1), m_owned(kind == Owned) {}
-
- ~UntypedBufferData()
- {
- if ( m_owned )
- free(m_str);
- }
-
- void *m_str;
- size_t m_length;
-
- // "short" to have sizeof(Data)=12 on 32bit archs
- unsigned short m_ref;
-
- bool m_owned;
-};
-
-// NB: this is defined in string.cpp and not the (non-existent) buffer.cpp
-WXDLLIMPEXP_BASE UntypedBufferData * GetUntypedNullData();
-
-} // namespace wxPrivate
-
-
-// Reference-counted character buffer for storing string data. The buffer
-// is only valid for as long as the "parent" object that provided the data
-// is valid; see wxCharTypeBuffer for persistent variant.
-template
-class wxScopedCharTypeBuffer
-{
-public:
- typedef T CharType;
-
- wxScopedCharTypeBuffer()
- {
- m_data = GetNullData();
- }
-
- // Creates "non-owned" buffer, i.e. 'str' is not owned by the buffer
- // and doesn't get freed by dtor. Used e.g. to point to wxString's internal
- // storage.
- static
- const wxScopedCharTypeBuffer CreateNonOwned(const CharType *str,
- size_t len = wxNO_LEN)
- {
- if ( len == wxNO_LEN )
- len = wxStrlen(str);
-
- wxScopedCharTypeBuffer buf;
- if ( str )
- buf.m_data = new Data(const_cast(str), len, Data::NonOwned);
- return buf;
- }
-
- // Creates "owned" buffer, i.e. takes over ownership of 'str' and frees it
- // in dtor (if ref.count reaches 0).
- static
- const wxScopedCharTypeBuffer CreateOwned(CharType *str,
- size_t len = wxNO_LEN )
- {
- if ( len == wxNO_LEN )
- len = wxStrlen(str);
-
- wxScopedCharTypeBuffer buf;
- if ( str )
- buf.m_data = new Data(str, len);
- return buf;
- }
-
- wxScopedCharTypeBuffer(const wxScopedCharTypeBuffer& src)
- {
- m_data = src.m_data;
- IncRef();
- }
-
- wxScopedCharTypeBuffer& operator=(const wxScopedCharTypeBuffer& src)
- {
- if ( &src == this )
- return *this;
-
- DecRef();
- m_data = src.m_data;
- IncRef();
-
- return *this;
- }
-
- ~wxScopedCharTypeBuffer()
- {
- DecRef();
- }
-
- // NB: this method is only const for backward compatibility. It used to
- // be needed for auto_ptr-like semantics of the copy ctor, but now
- // that ref-counting is used, it's not really needed.
- CharType *release() const
- {
- if ( m_data == GetNullData() )
- return NULL;
-
- wxASSERT_MSG( m_data->m_owned, wxT("can't release non-owned buffer") );
- wxASSERT_MSG( m_data->m_ref == 1, wxT("can't release shared buffer") );
-
- CharType * const p = m_data->Get();
-
- wxScopedCharTypeBuffer *self = const_cast(this);
- self->m_data->Set(NULL, 0);
- self->DecRef();
-
- return p;
- }
-
- void reset()
- {
- DecRef();
- }
-
- CharType *data() { return m_data->Get(); }
- const CharType *data() const { return m_data->Get(); }
- operator const CharType *() const { return data(); }
- CharType operator[](size_t n) const { return data()[n]; }
-
- size_t length() const { return m_data->m_length; }
-
-protected:
- // reference-counted data
- struct Data : public wxPrivate::UntypedBufferData
- {
- Data(CharType *str, size_t len, Kind kind = Owned)
- : wxPrivate::UntypedBufferData(str, len, kind)
- {
- }
-
- CharType *Get() const { return static_cast(m_str); }
- void Set(CharType *str, size_t len)
- {
- m_str = str;
- m_length = len;
- }
- };
-
- // placeholder for NULL string, to simplify this code
- static Data *GetNullData()
- {
- return static_cast(wxPrivate::GetUntypedNullData());
- }
-
- void IncRef()
- {
- if ( m_data == GetNullData() ) // exception, not ref-counted
- return;
- m_data->m_ref++;
- }
-
- void DecRef()
- {
- if ( m_data == GetNullData() ) // exception, not ref-counted
- return;
- if ( --m_data->m_ref == 0 )
- delete m_data;
- m_data = GetNullData();
- }
-
- // sets this object to a be copy of 'other'; if 'src' is non-owned,
- // a deep copy is made and 'this' will contain new instance of the data
- void MakeOwnedCopyOf(const wxScopedCharTypeBuffer& src)
- {
- this->DecRef();
-
- if ( src.m_data == this->GetNullData() )
- {
- this->m_data = this->GetNullData();
- }
- else if ( src.m_data->m_owned )
- {
- this->m_data = src.m_data;
- this->IncRef();
- }
- else
- {
- // if the scoped buffer had non-owned data, we have to make
- // a copy here, because src.m_data->m_str is valid only for as long
- // as 'src' exists
- this->m_data = new Data
- (
- StrCopy(src.data(), src.length()),
- src.length()
- );
- }
- }
-
- static CharType *StrCopy(const CharType *src, size_t len)
- {
- CharType *dst = (CharType*)malloc(sizeof(CharType) * (len + 1));
- if ( dst )
- memcpy(dst, src, sizeof(CharType) * (len + 1));
- return dst;
- }
-
-protected:
- Data *m_data;
-};
-
-typedef wxScopedCharTypeBuffer wxScopedCharBuffer;
-typedef wxScopedCharTypeBuffer wxScopedWCharBuffer;
-
-
-// this buffer class always stores data in "owned" (persistent) manner
-template
-class wxCharTypeBuffer : public wxScopedCharTypeBuffer
-{
-protected:
- typedef typename wxScopedCharTypeBuffer::Data Data;
-
-public:
- typedef T CharType;
-
- wxCharTypeBuffer(const CharType *str = NULL, size_t len = wxNO_LEN)
- {
- if ( str )
- {
- if ( len == wxNO_LEN )
- len = wxStrlen(str);
- this->m_data = new Data(this->StrCopy(str, len), len);
- }
- else
- {
- this->m_data = this->GetNullData();
- }
- }
-
- wxCharTypeBuffer(size_t len)
- {
- CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType));
- if ( str )
- {
- str[len] = (CharType)0;
-
- // There is a potential memory leak here if new throws because it
- // fails to allocate Data, we ought to use new(nothrow) here, but
- // this might fail to compile under some platforms so until this
- // can be fully tested, just live with this (rather unlikely, as
- // Data is a small object) potential leak.
- this->m_data = new Data(str, len);
- }
- else
- {
- this->m_data = this->GetNullData();
- }
- }
-
- wxCharTypeBuffer(const wxCharTypeBuffer& src)
- : wxScopedCharTypeBuffer(src) {}
-
- wxCharTypeBuffer& operator=(const CharType *str)
- {
- this->DecRef();
-
- if ( str )
- this->m_data = new Data(wxStrdup(str), wxStrlen(str));
- return *this;
- }
-
- wxCharTypeBuffer& operator=(const wxCharTypeBuffer& src)
- {
- wxScopedCharTypeBuffer::operator=(src);
- return *this;
- }
-
- wxCharTypeBuffer(const wxScopedCharTypeBuffer& src)
- {
- this->MakeOwnedCopyOf(src);
- }
-
- wxCharTypeBuffer& operator=(const wxScopedCharTypeBuffer& src)
- {
- MakeOwnedCopyOf(src);
- return *this;
- }
-
- bool extend(size_t len)
- {
- wxASSERT_MSG( this->m_data->m_owned, "cannot extend non-owned buffer" );
- wxASSERT_MSG( this->m_data->m_ref == 1, "can't extend shared buffer" );
-
- CharType *str =
- (CharType *)realloc(this->data(), (len + 1) * sizeof(CharType));
- if ( !str )
- return false;
-
- // For consistency with the ctor taking just the length, NUL-terminate
- // the buffer.
- str[len] = (CharType)0;
-
- if ( this->m_data == this->GetNullData() )
- {
- this->m_data = new Data(str, len);
- }
- else
- {
- this->m_data->Set(str, len);
- this->m_data->m_owned = true;
- }
-
- return true;
- }
-
- void shrink(size_t len)
- {
- wxASSERT_MSG( this->m_data->m_owned, "cannot shrink non-owned buffer" );
- wxASSERT_MSG( this->m_data->m_ref == 1, "can't shrink shared buffer" );
-
- wxASSERT( len <= this->length() );
-
- this->m_data->m_length = len;
- this->data()[len] = 0;
- }
-};
-
-WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxScopedCharTypeBuffer )
-WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxCharTypeBuffer )
-
-class wxCharBuffer : public wxCharTypeBuffer
-{
-public:
- typedef wxCharTypeBuffer wxCharTypeBufferBase;
- typedef wxScopedCharTypeBuffer wxScopedCharTypeBufferBase;
-
- wxCharBuffer(const wxCharTypeBufferBase& buf)
- : wxCharTypeBufferBase(buf) {}
- wxCharBuffer(const wxScopedCharTypeBufferBase& buf)
- : wxCharTypeBufferBase(buf) {}
-
- wxCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
- wxCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
-
- wxCharBuffer(const wxCStrData& cstr);
-};
-
-WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxScopedCharTypeBuffer )
-WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxCharTypeBuffer )
-
-class wxWCharBuffer : public wxCharTypeBuffer
-{
-public:
- typedef wxCharTypeBuffer wxCharTypeBufferBase;
- typedef wxScopedCharTypeBuffer wxScopedCharTypeBufferBase;
-
- wxWCharBuffer(const wxCharTypeBufferBase& buf)
- : wxCharTypeBufferBase(buf) {}
- wxWCharBuffer(const wxScopedCharTypeBufferBase& buf)
- : wxCharTypeBufferBase(buf) {}
-
- wxWCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
- wxWCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
-
- wxWCharBuffer(const wxCStrData& cstr);
-};
-
-// wxCharTypeBuffer implicitly convertible to T*
-template
-class wxWritableCharTypeBuffer : public wxCharTypeBuffer
-{
-public:
- typedef typename wxScopedCharTypeBuffer::CharType CharType;
-
- wxWritableCharTypeBuffer(const wxScopedCharTypeBuffer& src)
- : wxCharTypeBuffer(src) {}
- // FIXME-UTF8: this won't be needed after converting mb_str()/wc_str() to
- // always return a buffer
- // + we should derive this class from wxScopedCharTypeBuffer
- // then
- wxWritableCharTypeBuffer(const CharType *str = NULL)
- : wxCharTypeBuffer(str) {}
-
- operator CharType*() { return this->data(); }
-};
-
-typedef wxWritableCharTypeBuffer wxWritableCharBuffer;
-typedef wxWritableCharTypeBuffer wxWritableWCharBuffer;
-
+#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
- #define wxWxCharBuffer wxWCharBuffer
+ typedef wxWCharBuffer wxWxCharBuffer;
#define wxMB2WXbuf wxWCharBuffer
#define wxWX2MBbuf wxCharBuffer
- #if wxUSE_UNICODE_WCHAR
- #define wxWC2WXbuf wxChar*
- #define wxWX2WCbuf wxChar*
- #elif wxUSE_UNICODE_UTF8
- #define wxWC2WXbuf wxWCharBuffer
- #define wxWX2WCbuf wxWCharBuffer
- #endif
+ #define wxWC2WXbuf wxChar*
+ #define wxWX2WCbuf wxChar*
#else // ANSI
- #define wxWxCharBuffer wxCharBuffer
+ typedef wxCharBuffer wxWxCharBuffer;
#define wxMB2WXbuf wxChar*
#define wxWX2MBbuf wxChar*
@@ -451,7 +170,7 @@ public:
friend class wxMemoryBuffer;
- // everything is private as it can only be used by 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)
@@ -483,21 +202,6 @@ private:
delete this;
}
- void *release()
- {
- if ( m_data == NULL )
- return NULL;
-
- wxASSERT_MSG( m_ref == 1, "can't release shared buffer" );
-
- void *p = m_data;
- m_data = NULL;
- m_len =
- m_size = 0;
-
- return p;
- }
-
// the buffer containing the data
void *m_data;
@@ -511,7 +215,7 @@ private:
// the reference count
size_t m_ref;
- wxDECLARE_NO_COPY_CLASS(wxMemoryBufferData);
+ DECLARE_NO_COPY_CLASS(wxMemoryBufferData)
};
@@ -537,12 +241,9 @@ public:
wxMemoryBuffer& operator=(const wxMemoryBuffer& src)
{
- if (&src != this)
- {
- m_bufdata->DecRef();
- m_bufdata = src.m_bufdata;
- m_bufdata->IncRef();
- }
+ m_bufdata->DecRef();
+ m_bufdata = src.m_bufdata;
+ m_bufdata->IncRef();
return *this;
}
@@ -552,8 +253,6 @@ public:
size_t GetBufSize() const { return m_bufdata->m_size; }
size_t GetDataLen() const { return m_bufdata->m_len; }
- bool IsEmpty() const { return GetDataLen() == 0; }
-
void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
void SetDataLen(size_t len)
{
@@ -561,8 +260,6 @@ public:
m_bufdata->m_len = len;
}
- void Clear() { SetDataLen(0); }
-
// Ensure the buffer is big enough and return a pointer to it
void *GetWriteBuf(size_t sizeNeeded)
{
@@ -604,13 +301,6 @@ public:
operator const char *() const { return (const char*)GetData(); }
- // gives up ownership of data, returns the pointer; after this call,
- // data isn't freed by the buffer and its content is resent to empty
- void *release()
- {
- return m_bufdata->release();
- }
-
private:
wxMemoryBufferData* m_bufdata;
};
diff --git a/Source/3rd Party/wx/include/wx/build.h b/Source/3rd Party/wx/include/wx/build.h
index 79237d2b7..f6f5b0e22 100644
--- a/Source/3rd Party/wx/include/wx/build.h
+++ b/Source/3rd Party/wx/include/wx/build.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -14,7 +15,7 @@
#include "wx/version.h"
// NB: This file contains macros for checking binary compatibility of libraries
-// in multilib builds, plugins and user components.
+// 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
@@ -41,10 +42,14 @@
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
#endif
-#if wxUSE_UNICODE_UTF8
- #define __WX_BO_UNICODE "UTF-8"
-#elif wxUSE_UNICODE_WCHAR
- #define __WX_BO_UNICODE "wchar_t"
+#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
@@ -54,16 +59,13 @@
#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++ " __WX_BO_STRINGIZE(_MSC_VER)
-#elif defined(__INTEL_COMPILER)
- // Notice that this must come after MSVC check as ICC under Windows is
- // ABI-compatible with the corresponding version of the MSVC and we want to
- // allow using it compile the application code using MSVC-built DLLs.
- #define __WX_BO_COMPILER ",Intel C++"
+ #define __WX_BO_COMPILER ",Visual C++"
#elif defined(__BORLANDC__)
#define __WX_BO_COMPILER ",Borland C++"
#elif defined(__DIGITALMARS__)
@@ -75,19 +77,19 @@
#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
-#if WXWIN_COMPATIBILITY_2_8
- #define __WX_BO_WXWIN_COMPAT_2_8 ",compatible with 2.8"
-#else
- #define __WX_BO_WXWIN_COMPAT_2_8
-#endif
// deriving wxWin containers from STL ones changes them completely:
-#if wxUSE_STD_CONTAINERS
+#if wxUSE_STL
#define __WX_BO_STL ",STL containers"
#else
#define __WX_BO_STL ",wx containers"
@@ -96,10 +98,10 @@
// 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_UNICODE \
+ " (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
__WX_BO_COMPILER \
__WX_BO_STL \
- __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 \
+ __WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
")"
@@ -108,7 +110,7 @@
// ----------------------------------------------------------------------------
// 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 wxIMPLEMENT_APP() does.
+// ensure that the DLL checks build options in same way IMPLEMENT_APP() does.
#define WX_CHECK_BUILD_OPTIONS(libName) \
static struct wxBuildOptionsChecker \
{ \
@@ -120,4 +122,28 @@
} 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/Source/3rd Party/wx/include/wx/busyinfo.h b/Source/3rd Party/wx/include/wx/busyinfo.h
index 5d3b6edf9..d13d3b68c 100644
--- a/Source/3rd Party/wx/include/wx/busyinfo.h
+++ b/Source/3rd Party/wx/include/wx/busyinfo.h
@@ -3,6 +3,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
diff --git a/Source/3rd Party/wx/include/wx/button.h b/Source/3rd Party/wx/include/wx/button.h
index 87a35f9f8..4ca2305ae 100644
--- a/Source/3rd Party/wx/include/wx/button.h
+++ b/Source/3rd Party/wx/include/wx/button.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -13,37 +14,70 @@
#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
-#include "wx/anybutton.h"
+// ----------------------------------------------------------------------------
+// wxButton specific flags
+// ----------------------------------------------------------------------------
-extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
+// 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 WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton
+class WXDLLEXPORT wxButtonBase : public wxControl
{
public:
wxButtonBase() { }
- // show the authentication needed symbol on the button: this is currently
- // only implemented on Windows Vista and newer (on which it shows the UAC
- // shield symbol)
- void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); }
- bool GetAuthNeeded() const { return DoGetAuthNeeded(); }
+ // show the image in the button in addition to the label
+ virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
- // make this button the default button in its top level window
- //
- // returns the old default item (possibly NULL)
- virtual wxWindow *SetDefault();
+ // 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:
- wxDECLARE_NO_COPY_CLASS(wxButtonBase);
+ DECLARE_NO_COPY_CLASS(wxButtonBase)
};
#if defined(__WXUNIVERSAL__)
@@ -57,13 +91,16 @@ protected:
#elif defined(__WXGTK__)
#include "wx/gtk1/button.h"
#elif defined(__WXMAC__)
- #include "wx/osx/button.h"
+ #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_
+#endif
+ // _WX_BUTTON_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/calctrl.h b/Source/3rd Party/wx/include/wx/calctrl.h
deleted file mode 100644
index 16a84748d..000000000
--- a/Source/3rd Party/wx/include/wx/calctrl.h
+++ /dev/null
@@ -1,396 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/calctrl.h
-// Purpose: date-picker control
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 29.12.99
-// Copyright: (c) 1999 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#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"
-#include "wx/control.h"
-
-// ----------------------------------------------------------------------------
-// wxCalendarCtrl flags
-// ----------------------------------------------------------------------------
-
-enum
-{
- // show Sunday as the first day of the week (default)
- wxCAL_SUNDAY_FIRST = 0x0000,
-
- // show Monday 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
- // deprecated
- 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,
-
- // show week numbers on the left side of the calendar.
- wxCAL_SHOW_WEEK_NUMBERS = 0x0040
-};
-
-// ----------------------------------------------------------------------------
-// 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,
- wxCAL_HITTEST_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
-{
-public:
- // ctors
- wxCalendarDateAttr(const wxColour& colText = wxNullColour,
- 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.IsOk(); }
- bool HasBackgroundColour() const { return m_colBack.IsOk(); }
- bool HasBorderColour() const { return m_colBorder.IsOk(); }
- bool HasFont() const { return m_font.IsOk(); }
- 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; }
-
- // get or change the "mark" attribute, i.e. the one used for the items
- // marked with wxCalendarCtrl::Mark()
- static const wxCalendarDateAttr& GetMark() { return m_mark; }
- static void SetMark(wxCalendarDateAttr const& m) { m_mark = m; }
-
-protected:
- void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
- {
- m_border = border;
- m_holiday = false;
- }
-
-private:
- static wxCalendarDateAttr m_mark;
-
- 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
-{
-public:
- wxCalendarEvent() : m_wday(wxDateTime::Inv_WeekDay) { }
- wxCalendarEvent(wxWindow *win, const wxDateTime& dt, wxEventType type)
- : wxDateEvent(win, dt, type),
- m_wday(wxDateTime::Inv_WeekDay) { }
- wxCalendarEvent(const wxCalendarEvent& event)
- : wxDateEvent(event), m_wday(event.m_wday) { }
-
- void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
- wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
-
- virtual wxEvent *Clone() const { return new wxCalendarEvent(*this); }
-
-private:
- wxDateTime::WeekDay m_wday;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCalendarEvent)
-};
-
-// ----------------------------------------------------------------------------
-// wxCalendarCtrlBase
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxCalendarCtrlBase : public wxControl
-{
-public:
- // do we allow changing the month/year?
- bool AllowMonthChange() const { return !HasFlag(wxCAL_NO_MONTH_CHANGE); }
-
- // get/set the current date
- virtual wxDateTime GetDate() const = 0;
- virtual bool SetDate(const wxDateTime& date) = 0;
-
-
- // restricting the dates shown by the control to the specified range: only
- // implemented in the generic and MSW versions for now
-
- // if either date is set, the corresponding limit will be enforced and true
- // returned; if none are set, the existing restrictions are removed and
- // false is returned
- virtual bool
- SetDateRange(const wxDateTime& WXUNUSED(lowerdate) = wxDefaultDateTime,
- const wxDateTime& WXUNUSED(upperdate) = wxDefaultDateTime)
- {
- return false;
- }
-
- // retrieves the limits currently in use (wxDefaultDateTime if none) in the
- // provided pointers (which may be NULL) and returns true if there are any
- // limits or false if none
- virtual bool
- GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const
- {
- if ( lowerdate )
- *lowerdate = wxDefaultDateTime;
- if ( upperdate )
- *upperdate = wxDefaultDateTime;
- return false;
- }
-
- // 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)
- //
- // notice that this is not implemented in all versions
- virtual wxCalendarHitTestResult
- HitTest(const wxPoint& WXUNUSED(pos),
- wxDateTime* WXUNUSED(date) = NULL,
- wxDateTime::WeekDay* WXUNUSED(wd) = NULL)
- {
- return wxCAL_HITTEST_NOWHERE;
- }
-
- // allow or disable changing the current month (and year), return true if
- // the value of this option really changed or false if it was already set
- // to the required value
- //
- // NB: we provide implementation for this pure virtual function, derived
- // classes should call it
- virtual bool EnableMonthChange(bool enable = true) = 0;
-
-
- // 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
- //
- // notice that currently arbitrary attributes are supported only in the
- // generic version, the native controls only support Mark() which assigns
- // some special appearance (which can be customized using SetMark() for the
- // generic version) to the given day
-
- virtual void Mark(size_t day, bool mark) = 0;
-
- virtual wxCalendarDateAttr *GetAttr(size_t WXUNUSED(day)) const
- { return NULL; }
- virtual void SetAttr(size_t WXUNUSED(day), wxCalendarDateAttr *attr)
- { delete attr; }
- virtual void ResetAttr(size_t WXUNUSED(day)) { }
-
-
- // holidays support
- //
- // currently only the generic version implements all functions in this
- // section; wxMSW implements simple support for holidays (they can be
- // just enabled or disabled) and wxGTK doesn't support them at all
-
- // equivalent to changing wxCAL_SHOW_HOLIDAYS flag but should be called
- // instead of just changing it
- virtual void EnableHolidayDisplay(bool display = true);
-
- // set/get the colours to use for holidays (if they're enabled)
- virtual void SetHolidayColours(const wxColour& WXUNUSED(colFg),
- const wxColour& WXUNUSED(colBg)) { }
-
- virtual const wxColour& GetHolidayColourFg() const { return wxNullColour; }
- virtual const wxColour& GetHolidayColourBg() const { return wxNullColour; }
-
- // mark the given day of the current month as being a holiday
- virtual void SetHoliday(size_t WXUNUSED(day)) { }
-
-
- // customizing the colours of the controls
- //
- // most of the methods in this section are only implemented by the native
- // version of the control and do nothing in the native ones
-
- // set/get the colours to use for the display of the week day names at the
- // top of the controls
- virtual void SetHeaderColours(const wxColour& WXUNUSED(colFg),
- const wxColour& WXUNUSED(colBg)) { }
-
- virtual const wxColour& GetHeaderColourFg() const { return wxNullColour; }
- virtual const wxColour& GetHeaderColourBg() const { return wxNullColour; }
-
- // set/get the colours used for the currently selected date
- virtual void SetHighlightColours(const wxColour& WXUNUSED(colFg),
- const wxColour& WXUNUSED(colBg)) { }
-
- virtual const wxColour& GetHighlightColourFg() const { return wxNullColour; }
- virtual const wxColour& GetHighlightColourBg() const { return wxNullColour; }
-
-
- // implementation only from now on
-
- // generate the given calendar event, return true if it was processed
- //
- // NB: this is public because it's used from GTK+ callbacks
- bool GenerateEvent(wxEventType type)
- {
- wxCalendarEvent event(this, GetDate(), type);
- return HandleWindowEvent(event);
- }
-
-protected:
- // generate all the events for the selection change from dateOld to current
- // date: SEL_CHANGED, PAGE_CHANGED if necessary and also one of (deprecated)
- // YEAR/MONTH/DAY_CHANGED ones
- //
- // returns true if page changed event was generated, false if the new date
- // is still in the same month as before
- bool GenerateAllChangeEvents(const wxDateTime& dateOld);
-
- // call SetHoliday() for all holidays in the current month
- //
- // should be called on month change, does nothing if wxCAL_SHOW_HOLIDAYS is
- // not set and returns false in this case, true if we do show them
- bool SetHolidayAttrs();
-
- // called by SetHolidayAttrs() to forget the previously set holidays
- virtual void ResetHolidayAttrs() { }
-
- // called by EnableHolidayDisplay()
- virtual void RefreshHolidays() { }
-};
-
-// ----------------------------------------------------------------------------
-// wxCalendarCtrl
-// ----------------------------------------------------------------------------
-
-#define wxCalendarNameStr "CalendarCtrl"
-
-#ifndef __WXUNIVERSAL__
- #if defined(__WXGTK20__)
- #define wxHAS_NATIVE_CALENDARCTRL
- #include "wx/gtk/calctrl.h"
- #define wxCalendarCtrl wxGtkCalendarCtrl
- #elif defined(__WXMSW__)
- #define wxHAS_NATIVE_CALENDARCTRL
- #include "wx/msw/calctrl.h"
- #endif
-#endif // !__WXUNIVERSAL__
-
-#ifndef wxHAS_NATIVE_CALENDARCTRL
- #include "wx/generic/calctrlg.h"
- #define wxCalendarCtrl wxGenericCalendarCtrl
-#endif
-
-// ----------------------------------------------------------------------------
-// calendar event types and macros for handling them
-// ----------------------------------------------------------------------------
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_PAGE_CHANGED, wxCalendarEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, wxCalendarEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, wxCalendarEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEK_CLICKED, wxCalendarEvent );
-
-// deprecated events
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, wxCalendarEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, wxCalendarEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, wxCalendarEvent );
-
-typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
-
-#define wxCalendarEventHandler(func) \
- wxEVENT_HANDLER_CAST(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_PAGE_CHANGED(id, fn) wx__DECLARE_CALEVT(PAGE_CHANGED, id, fn)
-#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
-#define EVT_CALENDAR_WEEK_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEK_CLICKED, id, fn)
-
-// deprecated events
-#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)
-
-#endif // wxUSE_CALENDARCTRL
-
-#endif // _WX_CALCTRL_H_
-
diff --git a/Source/3rd Party/wx/include/wx/caret.h b/Source/3rd Party/wx/include/wx/caret.h
index 63802cf31..848fdcf73 100644
--- a/Source/3rd Party/wx/include/wx/caret.h
+++ b/Source/3rd Party/wx/include/wx/caret.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -33,7 +34,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindowBase;
// appear. It can be either a solid block or a custom bitmap (TODO)
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxCaretBase
+class WXDLLEXPORT wxCaretBase
{
public:
// ctors
@@ -146,7 +147,7 @@ public:
virtual void OnKillFocus() { }
protected:
- // these functions may be overridden in the derived classes, but they
+ // 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)
{
@@ -166,7 +167,7 @@ protected:
// the common initialization
void Init()
{
- m_window = NULL;
+ m_window = (wxWindowBase *)NULL;
m_x = m_y = 0;
m_width = m_height = 0;
m_countVisible = 0;
@@ -185,7 +186,7 @@ protected:
int m_countVisible;
private:
- wxDECLARE_NO_COPY_CLASS(wxCaretBase);
+ DECLARE_NO_COPY_CLASS(wxCaretBase)
};
// ---------------------------------------------------------------------------
@@ -207,17 +208,17 @@ private:
#ifdef wxHAS_CARET_USING_OVERLAYS
// we don't need to hide the caret if it's rendered using overlays
-class WXDLLIMPEXP_CORE wxCaretSuspend
+class WXDLLEXPORT wxCaretSuspend
{
public:
wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
- wxDECLARE_NO_COPY_CLASS(wxCaretSuspend);
+ DECLARE_NO_COPY_CLASS(wxCaretSuspend)
};
#else // !wxHAS_CARET_USING_OVERLAYS
-class WXDLLIMPEXP_CORE wxCaretSuspend
+class WXDLLEXPORT wxCaretSuspend
{
public:
wxCaretSuspend(wxWindow *win)
@@ -241,7 +242,7 @@ private:
wxCaret *m_caret;
bool m_show;
- wxDECLARE_NO_COPY_CLASS(wxCaretSuspend);
+ DECLARE_NO_COPY_CLASS(wxCaretSuspend)
};
#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
diff --git a/Source/3rd Party/wx/include/wx/chartype.h b/Source/3rd Party/wx/include/wx/chartype.h
deleted file mode 100644
index 5217258d1..000000000
--- a/Source/3rd Party/wx/include/wx/chartype.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Name: wx/chartype.h
- * Purpose: Declarations of wxChar and related types
- * Author: Joel Farley, Ove KÃ¥ven
- * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
- * Created: 1998/06/12
- * Copyright: (c) 1998-2006 wxWidgets dev team
- * Licence: wxWindows licence
- */
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-#ifndef _WX_WXCHARTYPE_H_
-#define _WX_WXCHARTYPE_H_
-
-/* defs.h indirectly includes this file, so don't include it here */
-#include "wx/platform.h"
-
-/* check whether we have wchar_t and which size it is if we do */
-#if !defined(wxUSE_WCHAR_T)
- #if defined(__UNIX__)
- #if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
- #define wxUSE_WCHAR_T 1
- #else
- #define wxUSE_WCHAR_T 0
- #endif
- #elif defined(__GNUWIN32__) && !defined(__MINGW32__)
- #define wxUSE_WCHAR_T 0
- #elif defined(__WATCOMC__)
- #define wxUSE_WCHAR_T 0
- #elif defined(__VISAGECPP__) && (__IBMCPP__ < 400)
- #define wxUSE_WCHAR_T 0
- #else
- /* add additional compiler checks if this fails */
- #define wxUSE_WCHAR_T 1
- #endif
-#endif /* !defined(wxUSE_WCHAR_T) */
-
-/* Unicode support requires wchar_t */
-#if !wxUSE_WCHAR_T
- #error "wchar_t must be available"
-#endif /* Unicode */
-
-/*
- non Unix compilers which do have wchar.h (but not tchar.h which is included
- below and which includes wchar.h anyhow).
-
- Actually MinGW has tchar.h, but it does not include wchar.h
- */
-#if defined(__VISAGECPP__) || defined(__MINGW32__) || defined(__WATCOMC__)
- #ifndef HAVE_WCHAR_H
- #define HAVE_WCHAR_H
- #endif
-#endif
-
-#ifdef HAVE_WCHAR_H
- /* the current (as of Nov 2002) version of cygwin has a bug in its */
- /* wchar.h -- there is no extern "C" around the declarations in it */
- /* and this results in linking errors later; also, at least on some */
- /* Cygwin versions, wchar.h requires sys/types.h */
- #ifdef __CYGWIN__
- #include
- #ifdef __cplusplus
- extern "C" {
- #endif
- #endif /* Cygwin */
-
- #include
-
- #if defined(__CYGWIN__) && defined(__cplusplus)
- }
- #endif /* Cygwin and C++ */
-
-#elif defined(HAVE_WCSTR_H)
- /* old compilers have relevant declarations here */
- #include
-#elif defined(__FreeBSD__) || defined(__DARWIN__) || defined(__EMX__)
- /* include stdlib.h for wchar_t */
- #include
-#endif /* HAVE_WCHAR_H */
-
-#ifdef HAVE_WIDEC_H
- #include
-#endif
-
-/* -------------------------------------------------------------------------- */
-/* define wxHAVE_TCHAR_SUPPORT for the compilers which support the TCHAR type */
-/* mapped to either char or wchar_t depending on the ASCII/Unicode mode and */
-/* have the function mapping _tfoo() -> foo() or wfoo() */
-/* -------------------------------------------------------------------------- */
-
-/* VC++ and BC++ starting with 5.2 have TCHAR support */
-#ifdef __VISUALC__
- #define wxHAVE_TCHAR_SUPPORT
-#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
- #define wxHAVE_TCHAR_SUPPORT
- #include
-#elif defined(__WATCOMC__)
- #define wxHAVE_TCHAR_SUPPORT
-#elif defined(__DMC__)
- #define wxHAVE_TCHAR_SUPPORT
-#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
- #define wxHAVE_TCHAR_SUPPORT
- #include
- #include
- #include
-#elif 0 && defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
- /* VZ: the old VisualAge definitions were completely wrong and had no */
- /* chance at all to work in Unicode build anyhow so let's pretend */
- /* that VisualAge does _not_ support TCHAR for the moment (as */
- /* indicated by "0 &&" above) until someone really has time to delve */
- /* into Unicode issues under OS/2 */
-
- /* VisualAge 4.0+ supports TCHAR */
- #define wxHAVE_TCHAR_SUPPORT
-#endif /* compilers with (good) TCHAR support */
-
-#ifdef wxHAVE_TCHAR_SUPPORT
- /* get TCHAR definition if we've got it */
- #include
-
- /* we surely do have wchar_t if we have TCHAR */
- #ifndef wxUSE_WCHAR_T
- #define wxUSE_WCHAR_T 1
- #endif /* !defined(wxUSE_WCHAR_T) */
-#endif /* wxHAVE_TCHAR_SUPPORT */
-
-/* ------------------------------------------------------------------------- */
-/* define wxChar type */
-/* ------------------------------------------------------------------------- */
-
-/* TODO: define wxCharInt to be equal to either int or wint_t? */
-
-#if !wxUSE_UNICODE
- typedef char wxChar;
- typedef signed char wxSChar;
- typedef unsigned char wxUChar;
-#else
- /* VZ: note that VC++ defines _T[SU]CHAR simply as wchar_t and not as */
- /* signed/unsigned version of it which (a) makes sense to me (unlike */
- /* char wchar_t is always unsigned) and (b) was how the previous */
- /* definitions worked so keep it like this */
-
- /* Sun's SunPro compiler supports the wchar_t type and wide character */
- /* functions, but does not define __WCHAR_TYPE__. Define it here to */
- /* allow unicode enabled builds. */
- #if (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && !defined(__WCHAR_TYPE__)
- #define __WCHAR_TYPE__ wxchar_t
- #endif
-
- /* GNU libc has __WCHAR_TYPE__ which requires special treatment, see */
- /* comment below */
- #if !defined(__WCHAR_TYPE__) || \
- (!defined(__GNUC__) || wxCHECK_GCC_VERSION(2, 96))
- /* standard case */
- typedef wchar_t wxChar;
- typedef wchar_t wxSChar;
- typedef wchar_t wxUChar;
- #else /* __WCHAR_TYPE__ and gcc < 2.96 */
- /* VS: wxWidgets used to define wxChar as __WCHAR_TYPE__ here. */
- /* However, this doesn't work with new GCC 3.x compilers because */
- /* wchar_t is C++'s builtin type in the new standard. OTOH, old */
- /* compilers (GCC 2.x) won't accept new definition of */
- /* wx{S,U}CharType, so we have to define wxChar */
- /* conditionally depending on detected compiler & compiler */
- /* version. */
-
- /* with old definition of wxChar. */
- #define wchar_t __WCHAR_TYPE__
- typedef __WCHAR_TYPE__ wxChar;
- typedef __WCHAR_TYPE__ wxSChar;
- typedef __WCHAR_TYPE__ wxUChar;
- #endif /* __WCHAR_TYPE__ */
-#endif /* ASCII/Unicode */
-
-/* ------------------------------------------------------------------------- */
-/* define wxStringCharType */
-/* ------------------------------------------------------------------------- */
-
-/* depending on the platform, Unicode build can either store wxStrings as
- wchar_t* or UTF-8 encoded char*: */
-#if wxUSE_UNICODE
- /* FIXME-UTF8: what would be better place for this? */
- #if defined(wxUSE_UTF8_LOCALE_ONLY) && !defined(wxUSE_UNICODE_UTF8)
- #error "wxUSE_UTF8_LOCALE_ONLY only makes sense with wxUSE_UNICODE_UTF8"
- #endif
- #ifndef wxUSE_UTF8_LOCALE_ONLY
- #define wxUSE_UTF8_LOCALE_ONLY 0
- #endif
-
- #ifndef wxUSE_UNICODE_UTF8
- #define wxUSE_UNICODE_UTF8 0
- #endif
-
- #if wxUSE_UNICODE_UTF8
- #define wxUSE_UNICODE_WCHAR 0
- #else
- #define wxUSE_UNICODE_WCHAR 1
- #endif
-#else
- #define wxUSE_UNICODE_WCHAR 0
- #define wxUSE_UNICODE_UTF8 0
- #define wxUSE_UTF8_LOCALE_ONLY 0
-#endif
-
-/* define char type used by wxString internal representation: */
-#if wxUSE_UNICODE_WCHAR
- typedef wchar_t wxStringCharType;
-#else /* wxUSE_UNICODE_UTF8 || ANSI */
- typedef char wxStringCharType;
-#endif
-
-
-/* ------------------------------------------------------------------------- */
-/* define wxT() and related macros */
-/* ------------------------------------------------------------------------- */
-
-/* BSD systems define _T() to be something different in ctype.h, override it */
-#if defined(__FreeBSD__) || defined(__DARWIN__)
- #include
- #undef _T
-#endif
-
-/*
- wxT ("wx text") macro turns a literal string constant into a wide char
- constant. It is mostly unnecessary with wx 2.9 but defined for
- compatibility.
- */
-#ifndef wxT
- #if !wxUSE_UNICODE
- #define wxT(x) x
- #else /* Unicode */
- /*
- Notice that we use an intermediate macro to allow x to be expanded
- if it's a macro itself.
- */
- #ifndef wxCOMPILER_BROKEN_CONCAT_OPER
- #define wxT(x) wxCONCAT_HELPER(L, x)
- #else
- #define wxT(x) wxPREPEND_L(x)
- #endif
- #endif /* ASCII/Unicode */
-#endif /* !defined(wxT) */
-
-/*
- wxT_2 exists only for compatibility with wx 2.x and is the same as wxT() in
- that version but nothing in the newer ones.
- */
-#define wxT_2(x) x
-
-/*
- wxS ("wx string") macro can be used to create literals using the same
- representation as wxString does internally, i.e. wchar_t in Unicode build
- under Windows or char in UTF-8-based Unicode builds and (deprecated) ANSI
- builds everywhere (see wxStringCharType definition above).
- */
-#if wxUSE_UNICODE_WCHAR
- /*
- As above with wxT(), wxS() argument is expanded if it's a macro.
- */
- #ifndef wxCOMPILER_BROKEN_CONCAT_OPER
- #define wxS(x) wxCONCAT_HELPER(L, x)
- #else
- #define wxS(x) wxPREPEND_L(x)
- #endif
-#else /* wxUSE_UNICODE_UTF8 || ANSI */
- #define wxS(x) x
-#endif
-
-/*
- _T() is a synonym for wxT() familiar to Windows programmers. As this macro
- has even higher risk of conflicting with system headers, its use is
- discouraged and you may predefine wxNO__T to disable it. Additionally, we
- do it ourselves for Sun CC which is known to use it in its standard headers
- (see #10660).
- */
-#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- #ifndef wxNO__T
- #define wxNO__T
- #endif
-#endif
-
-#if !defined(_T) && !defined(wxNO__T)
- #define _T(x) wxT(x)
-#endif
-
-/* a helper macro allowing to make another macro Unicode-friendly, see below */
-#define wxAPPLY_T(x) wxT(x)
-
-/* Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs */
-#ifndef __TFILE__
- #define __TFILE__ wxAPPLY_T(__FILE__)
-#endif
-
-#ifndef __TDATE__
- #define __TDATE__ wxAPPLY_T(__DATE__)
-#endif
-
-#ifndef __TTIME__
- #define __TTIME__ wxAPPLY_T(__TIME__)
-#endif
-
-#endif /* _WX_WXCHARTYPE_H_ */
-
diff --git a/Source/3rd Party/wx/include/wx/checkbox.h b/Source/3rd Party/wx/include/wx/checkbox.h
index 6bbb22a3f..4760475ab 100644
--- a/Source/3rd Party/wx/include/wx/checkbox.h
+++ b/Source/3rd Party/wx/include/wx/checkbox.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -24,12 +25,8 @@
* Determine whether to use a 3-state or 2-state
* checkbox. 3-state enables to differentiate
* between 'unchecked', 'checked' and 'undetermined'.
- *
- * In addition to the styles here it is also possible to specify just 0 which
- * is treated the same as wxCHK_2STATE for compatibility (but using explicit
- * flag is preferred).
*/
-#define wxCHK_2STATE 0x4000
+#define wxCHK_2STATE 0x0000
#define wxCHK_3STATE 0x1000
/*
@@ -40,13 +37,25 @@
*/
#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
-extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
+/*
+ * 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 WXDLLIMPEXP_CORE wxCheckBoxBase : public wxControl
+class WXDLLEXPORT wxCheckBoxBase : public wxControl
{
public:
wxCheckBoxBase() { }
@@ -109,9 +118,6 @@ public:
}
protected:
- // choose the default border for this window
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
-
virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; }
virtual wxCheckBoxState DoGet3StateValue() const
@@ -120,51 +126,10 @@ protected:
return wxCHK_UNCHECKED;
}
- // Helper function to be called from derived classes Create()
- // implementations: it checks that the style doesn't contain any
- // incompatible bits and modifies it to be sane if it does.
- static void WXValidateStyle(long *stylePtr)
- {
- long& style = *stylePtr;
-
- if ( !(style & (wxCHK_2STATE | wxCHK_3STATE)) )
- {
- // For compatibility we use absence of style flags as wxCHK_2STATE
- // because wxCHK_2STATE used to have the value of 0 and some
- // existing code uses 0 instead of it. Moreover, some code even
- // uses some non-0 style, e.g. wxBORDER_XXX, but doesn't specify
- // neither wxCHK_2STATE nor wxCHK_3STATE -- to avoid breaking it,
- // assume (much more common) 2 state checkbox by default.
- style |= wxCHK_2STATE;
- }
-
- if ( style & wxCHK_3STATE )
- {
- if ( style & wxCHK_2STATE )
- {
- wxFAIL_MSG( "wxCHK_2STATE and wxCHK_3STATE can't be used "
- "together" );
- style &= ~wxCHK_3STATE;
- }
- }
- else // No wxCHK_3STATE
- {
- if ( style & wxCHK_ALLOW_3RD_STATE_FOR_USER )
- {
- wxFAIL_MSG( "wxCHK_ALLOW_3RD_STATE_FOR_USER doesn't make sense "
- "without wxCHK_3STATE" );
- style &= ~wxCHK_ALLOW_3RD_STATE_FOR_USER;
- }
- }
- }
-
private:
- wxDECLARE_NO_COPY_CLASS(wxCheckBoxBase);
+ DECLARE_NO_COPY_CLASS(wxCheckBoxBase)
};
-// Most ports support 3 state checkboxes so define this by default.
-#define wxHAS_3STATE_CHECKBOX
-
#if defined(__WXUNIVERSAL__)
#include "wx/univ/checkbox.h"
#elif defined(__WXMSW__)
@@ -174,17 +139,18 @@ private:
#elif defined(__WXGTK20__)
#include "wx/gtk/checkbox.h"
#elif defined(__WXGTK__)
- #undef wxHAS_3STATE_CHECKBOX
#include "wx/gtk1/checkbox.h"
#elif defined(__WXMAC__)
- #include "wx/osx/checkbox.h"
+ #include "wx/mac/checkbox.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/checkbox.h"
#elif defined(__WXPM__)
- #undef wxHAS_3STATE_CHECKBOX
#include "wx/os2/checkbox.h"
+#elif defined(__WXPALMOS__)
+ #include "wx/palmos/checkbox.h"
#endif
#endif // wxUSE_CHECKBOX
-#endif // _WX_CHECKBOX_H_BASE_
+#endif
+ // _WX_CHECKBOX_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/checkeddelete.h b/Source/3rd Party/wx/include/wx/checkeddelete.h
deleted file mode 100644
index fd295faf8..000000000
--- a/Source/3rd Party/wx/include/wx/checkeddelete.h
+++ /dev/null
@@ -1,44 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/checkeddelete.h
-// Purpose: wxCHECKED_DELETE() macro
-// Author: Vadim Zeitlin
-// Created: 2009-02-03
-// Copyright: (c) 2002-2009 wxWidgets dev team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CHECKEDDELETE_H_
-#define _WX_CHECKEDDELETE_H_
-
-#include "wx/cpp.h"
-
-// TODO: provide wxCheckedDelete[Array]() template functions too
-
-// ----------------------------------------------------------------------------
-// wxCHECKED_DELETE and wxCHECKED_DELETE_ARRAY macros
-// ----------------------------------------------------------------------------
-
-/*
- checked deleters are used to make sure that the type being deleted is really
- a complete type.: otherwise sizeof() would result in a compile-time error
-
- do { ... } while ( 0 ) construct is used to have an anonymous scope
- (otherwise we could have name clashes between different "complete"s) but
- still force a semicolon after the macro
-*/
-
-#define wxCHECKED_DELETE(ptr) \
- wxSTATEMENT_MACRO_BEGIN \
- typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
- delete ptr; \
- wxSTATEMENT_MACRO_END
-
-#define wxCHECKED_DELETE_ARRAY(ptr) \
- wxSTATEMENT_MACRO_BEGIN \
- typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
- delete [] ptr; \
- wxSTATEMENT_MACRO_END
-
-
-#endif // _WX_CHECKEDDELETE_H_
-
diff --git a/Source/3rd Party/wx/include/wx/checklst.h b/Source/3rd Party/wx/include/wx/checklst.h
index 0ed9d3cb1..c8857fd08 100644
--- a/Source/3rd Party/wx/include/wx/checklst.h
+++ b/Source/3rd Party/wx/include/wx/checklst.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -11,8 +12,6 @@
#ifndef _WX_CHECKLST_H_BASE_
#define _WX_CHECKLST_H_BASE_
-#include "wx/defs.h"
-
#if wxUSE_CHECKLISTBOX
#include "wx/listbox.h"
@@ -21,7 +20,7 @@
// wxCheckListBox: a listbox whose items may be checked
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxCheckListBoxBase : public
+class WXDLLEXPORT wxCheckListBoxBase : public
#ifdef __WXWINCE__
// keep virtuals synchronised
wxListBoxBase
@@ -36,9 +35,7 @@ public:
virtual bool IsChecked(unsigned int item) const = 0;
virtual void Check(unsigned int item, bool check = true) = 0;
- virtual unsigned int GetCheckedItems(wxArrayInt& checkedItems) const;
-
- wxDECLARE_NO_COPY_CLASS(wxCheckListBoxBase);
+ DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
};
#if defined(__WXUNIVERSAL__)
@@ -54,7 +51,7 @@ public:
#elif defined(__WXGTK__)
#include "wx/gtk1/checklst.h"
#elif defined(__WXMAC__)
- #include "wx/osx/checklst.h"
+ #include "wx/mac/checklst.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/checklst.h"
#elif defined(__WXPM__)
diff --git a/Source/3rd Party/wx/include/wx/chkconf.h b/Source/3rd Party/wx/include/wx/chkconf.h
index 5b4ef5cc5..811e0c304 100644
--- a/Source/3rd Party/wx/include/wx/chkconf.h
+++ b/Source/3rd Party/wx/include/wx/chkconf.h
@@ -4,51 +4,46 @@
* 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 */
-#ifndef _WX_CHKCONF_H_
-#define _WX_CHKCONF_H_
/*
- **************************************************
- PLEASE READ THIS IF YOU GET AN ERROR IN THIS FILE!
- **************************************************
-
- If you get an error saying "wxUSE_FOO must be defined", it means that you
- are not using the correct up-to-date version of setup.h. This happens most
- often when using svn or daily snapshots and a new symbol was added to
- setup0.h and you haven't updated your local setup.h to reflect it. If
- this is the case, you need to propagate the changes from setup0.h to your
- setup.h and, if using makefiles under MSW, also remove setup.h under the
- build directory (lib/$(COMPILER)_{lib,dll}/msw[u][d][dll]/wx) so that
- the new setup.h is copied there.
-
- If you get an error of the form "wxFoo requires wxBar", then the settings
- in your setup.h are inconsistent. You have the choice between correcting
- them manually or commenting out #define wxABORT_ON_CONFIG_ERROR below to
- try to correct the problems automatically (not really recommended but
- might work).
+ Platform-specific checking.
*/
-/*
- This file has the following sections:
- 1. checks that all wxUSE_XXX symbols we use are defined
- a) first the non-GUI ones
- b) then the GUI-only ones
- 2. platform-specific checks done in the platform headers
- 3. generic consistency checks
- a) first the non-GUI ones
- b) then the GUI-only ones
- */
+#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 surprising behaviour)
+ error and abort (default as leads to least surprizing behaviour)
*/
#define wxABORT_ON_CONFIG_ERROR
@@ -56,6 +51,16 @@
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.
@@ -78,38 +83,24 @@
/*
- Section 1a: tests for non GUI features.
+ tests for non GUI features
please keep the options in alphabetical order!
*/
-#ifndef wxUSE_ANY
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ANY must be defined, please read comment near the top of this file."
+#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_ANY 0
+# define wxUSE_CRASHREPORT 0
# endif
-#endif /* wxUSE_ANY */
-
-#ifndef wxUSE_COMPILER_TLS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_COMPILER_TLS 0
-# endif
-#endif /* !defined(wxUSE_COMPILER_TLS) */
-
-#ifndef wxUSE_CONSOLE_EVENTLOOP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_CONSOLE_EVENTLOOP 0
-# endif
-#endif /* !defined(wxUSE_CONSOLE_EVENTLOOP) */
+#endif /* !defined(wxUSE_CRASHREPORT) */
#ifndef wxUSE_DYNLIB_CLASS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."
+# error "wxUSE_DYNLIB_CLASS must be defined."
# else
# define wxUSE_DYNLIB_CLASS 0
# endif
@@ -117,23 +108,15 @@
#ifndef wxUSE_EXCEPTIONS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file."
+# error "wxUSE_EXCEPTIONS must be defined."
# else
# define wxUSE_EXCEPTIONS 0
# endif
#endif /* !defined(wxUSE_EXCEPTIONS) */
-#ifndef wxUSE_FILE_HISTORY
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_FILE_HISTORY 0
-# endif
-#endif /* !defined(wxUSE_FILE_HISTORY) */
-
#ifndef wxUSE_FILESYSTEM
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file."
+# error "wxUSE_FILESYSTEM must be defined."
# else
# define wxUSE_FILESYSTEM 0
# endif
@@ -141,55 +124,28 @@
#ifndef wxUSE_FS_ARCHIVE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file."
+# 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
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_FSVOLUME 0
-# endif
+# define wxUSE_FSVOLUME 0
#endif /* !defined(wxUSE_FSVOLUME) */
-#ifndef wxUSE_FSWATCHER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_FSWATCHER 0
-# endif
-#endif /* !defined(wxUSE_FSWATCHER) */
-
#ifndef wxUSE_DYNAMIC_LOADER
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file."
+# error "wxUSE_DYNAMIC_LOADER must be defined."
# else
# define wxUSE_DYNAMIC_LOADER 0
# endif
#endif /* !defined(wxUSE_DYNAMIC_LOADER) */
-#ifndef wxUSE_INTL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_INTL must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_INTL 0
-# endif
-#endif /* !defined(wxUSE_INTL) */
-
-#ifndef wxUSE_IPV6
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_IPV6 must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_IPV6 0
-# endif
-#endif /* !defined(wxUSE_IPV6) */
-
#ifndef wxUSE_LOG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOG must be defined, please read comment near the top of this file."
+# error "wxUSE_LOG must be defined."
# else
# define wxUSE_LOG 0
# endif
@@ -197,7 +153,7 @@
#ifndef wxUSE_LONGLONG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LONGLONG must be defined, please read comment near the top of this file."
+# error "wxUSE_LONGLONG must be defined."
# else
# define wxUSE_LONGLONG 0
# endif
@@ -205,7 +161,7 @@
#ifndef wxUSE_MIMETYPE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file."
+# error "wxUSE_MIMETYPE must be defined."
# else
# define wxUSE_MIMETYPE 0
# endif
@@ -213,7 +169,7 @@
#ifndef wxUSE_ON_FATAL_EXCEPTION
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file."
+# error "wxUSE_ON_FATAL_EXCEPTION must be defined."
# else
# define wxUSE_ON_FATAL_EXCEPTION 0
# endif
@@ -221,7 +177,7 @@
#ifndef wxUSE_PRINTF_POS_PARAMS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file."
+# error "wxUSE_PRINTF_POS_PARAMS must be defined."
# else
# define wxUSE_PRINTF_POS_PARAMS 0
# endif
@@ -229,7 +185,7 @@
#ifndef wxUSE_PROTOCOL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file."
+# error "wxUSE_PROTOCOL must be defined."
# else
# define wxUSE_PROTOCOL 0
# endif
@@ -247,7 +203,7 @@
#ifndef wxUSE_PROTOCOL_HTTP
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_HTTP must be defined, please read comment near the top of this file."
+# error "wxUSE_PROTOCOL_HTTP must be defined."
# else
# define wxUSE_PROTOCOL_HTTP 0
# endif
@@ -255,7 +211,7 @@
#ifndef wxUSE_PROTOCOL_FTP
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_FTP must be defined, please read comment near the top of this file."
+# error "wxUSE_PROTOCOL_FTP must be defined."
# else
# define wxUSE_PROTOCOL_FTP 0
# endif
@@ -263,7 +219,7 @@
#ifndef wxUSE_PROTOCOL_FILE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_FILE must be defined, please read comment near the top of this file."
+# error "wxUSE_PROTOCOL_FILE must be defined."
# else
# define wxUSE_PROTOCOL_FILE 0
# endif
@@ -271,7 +227,7 @@
#ifndef wxUSE_REGEX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_REGEX must be defined, please read comment near the top of this file."
+# error "wxUSE_REGEX must be defined."
# else
# define wxUSE_REGEX 0
# endif
@@ -279,7 +235,7 @@
#ifndef wxUSE_STDPATHS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STDPATHS must be defined, please read comment near the top of this file."
+# error "wxUSE_STDPATHS must be defined."
# else
# define wxUSE_STDPATHS 1
# endif
@@ -287,7 +243,7 @@
#ifndef wxUSE_XML
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XML must be defined, please read comment near the top of this file."
+# error "wxUSE_XML must be defined."
# else
# define wxUSE_XML 0
# endif
@@ -295,31 +251,15 @@
#ifndef wxUSE_SOCKETS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SOCKETS must be defined, please read comment near the top of this file."
+# error "wxUSE_SOCKETS must be defined."
# else
# define wxUSE_SOCKETS 0
# endif
#endif /* !defined(wxUSE_SOCKETS) */
-#ifndef wxUSE_STD_CONTAINERS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_STD_CONTAINERS 0
-# endif
-#endif /* !defined(wxUSE_STD_CONTAINERS) */
-
-#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_STD_STRING_CONV_IN_WXSTRING 0
-# endif
-#endif /* !defined(wxUSE_STD_STRING_CONV_IN_WXSTRING) */
-
#ifndef wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
+# error "wxUSE_STREAMS must be defined."
# else
# define wxUSE_STREAMS 0
# endif
@@ -327,7 +267,7 @@
#ifndef wxUSE_STOPWATCH
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file."
+# error "wxUSE_STOPWATCH must be defined."
# else
# define wxUSE_STOPWATCH 0
# endif
@@ -335,7 +275,7 @@
#ifndef wxUSE_TEXTBUFFER
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file."
+# error "wxUSE_TEXTBUFFER must be defined."
# else
# define wxUSE_TEXTBUFFER 0
# endif
@@ -343,7 +283,7 @@
#ifndef wxUSE_TEXTFILE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file."
+# error "wxUSE_TEXTFILE must be defined."
# else
# define wxUSE_TEXTFILE 0
# endif
@@ -351,7 +291,7 @@
#ifndef wxUSE_UNICODE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_UNICODE must be defined, please read comment near the top of this file."
+# error "wxUSE_UNICODE must be defined."
# else
# define wxUSE_UNICODE 0
# endif
@@ -359,7 +299,7 @@
#ifndef wxUSE_URL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_URL must be defined, please read comment near the top of this file."
+# error "wxUSE_URL must be defined."
# else
# define wxUSE_URL 0
# endif
@@ -367,22 +307,14 @@
#ifndef wxUSE_VARIANT
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_VARIANT must be defined, please read comment near the top of this file."
+# error "wxUSE_VARIANT must be defined."
# else
# define wxUSE_VARIANT 0
# endif
#endif /* wxUSE_VARIANT */
-#ifndef wxUSE_XLOCALE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XLOCALE must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_XLOCALE 0
-# endif
-#endif /* !defined(wxUSE_XLOCALE) */
-
/*
- Section 1b: all these tests are for GUI only.
+ all these tests are for GUI only
please keep the options in alphabetical order!
*/
@@ -395,7 +327,7 @@
#ifndef wxUSE_ABOUTDLG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ABOUTDLG must be defined, please read comment near the top of this file."
+# error "wxUSE_ABOUTDLG must be defined."
# else
# define wxUSE_ABOUTDLG 0
# endif
@@ -403,55 +335,23 @@
#ifndef wxUSE_ACCEL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ACCEL must be defined, please read comment near the top of this file."
+# error "wxUSE_ACCEL must be defined."
# else
# define wxUSE_ACCEL 0
# endif
#endif /* !defined(wxUSE_ACCEL) */
-#ifndef wxUSE_ACCESSIBILITY
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ACCESSIBILITY must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_ACCESSIBILITY 0
-# endif
-#endif /* !defined(wxUSE_ACCESSIBILITY) */
-
#ifndef wxUSE_ANIMATIONCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ANIMATIONCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_ANIMATIONCTRL must be defined."
# else
# define wxUSE_ANIMATIONCTRL 0
# endif
#endif /* !defined(wxUSE_ANIMATIONCTRL) */
-#ifndef wxUSE_ARTPROVIDER_STD
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ARTPROVIDER_STD must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_ARTPROVIDER_STD 0
-# endif
-#endif /* !defined(wxUSE_ARTPROVIDER_STD) */
-
-#ifndef wxUSE_ARTPROVIDER_TANGO
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ARTPROVIDER_TANGO must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_ARTPROVIDER_TANGO 0
-# endif
-#endif /* !defined(wxUSE_ARTPROVIDER_TANGO) */
-
-#ifndef wxUSE_AUTOID_MANAGEMENT
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_AUTOID_MANAGEMENT must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_AUTOID_MANAGEMENT 0
-# endif
-#endif /* !defined(wxUSE_AUTOID_MANAGEMENT) */
-
#ifndef wxUSE_BITMAPCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BITMAPCOMBOBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_BITMAPCOMBOBOX must be defined."
# else
# define wxUSE_BITMAPCOMBOBOX 0
# endif
@@ -459,7 +359,7 @@
#ifndef wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BMPBUTTON must be defined, please read comment near the top of this file."
+# error "wxUSE_BMPBUTTON must be defined."
# else
# define wxUSE_BMPBUTTON 0
# endif
@@ -467,23 +367,15 @@
#ifndef wxUSE_BUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BUTTON must be defined, please read comment near the top of this file."
+# error "wxUSE_BUTTON must be defined."
# else
# define wxUSE_BUTTON 0
# endif
#endif /* !defined(wxUSE_BUTTON) */
-#ifndef wxUSE_CAIRO
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CAIRO must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_CAIRO 0
-# endif
-#endif /* !defined(wxUSE_CAIRO) */
-
#ifndef wxUSE_CALENDARCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CALENDARCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_CALENDARCTRL must be defined."
# else
# define wxUSE_CALENDARCTRL 0
# endif
@@ -491,7 +383,7 @@
#ifndef wxUSE_CARET
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CARET must be defined, please read comment near the top of this file."
+# error "wxUSE_CARET must be defined."
# else
# define wxUSE_CARET 0
# endif
@@ -499,7 +391,7 @@
#ifndef wxUSE_CHECKBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHECKBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_CHECKBOX must be defined."
# else
# define wxUSE_CHECKBOX 0
# endif
@@ -507,7 +399,7 @@
#ifndef wxUSE_CHECKLISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHECKLISTBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_CHECKLISTBOX must be defined."
# else
# define wxUSE_CHECKLISTBOX 0
# endif
@@ -515,7 +407,7 @@
#ifndef wxUSE_CHOICE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHOICE must be defined, please read comment near the top of this file."
+# error "wxUSE_CHOICE must be defined."
# else
# define wxUSE_CHOICE 0
# endif
@@ -523,7 +415,7 @@
#ifndef wxUSE_CHOICEBOOK
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHOICEBOOK must be defined, please read comment near the top of this file."
+# error "wxUSE_CHOICEBOOK must be defined."
# else
# define wxUSE_CHOICEBOOK 0
# endif
@@ -531,7 +423,7 @@
#ifndef wxUSE_CHOICEDLG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHOICEDLG must be defined, please read comment near the top of this file."
+# error "wxUSE_CHOICEDLG must be defined."
# else
# define wxUSE_CHOICEDLG 0
# endif
@@ -539,7 +431,7 @@
#ifndef wxUSE_CLIPBOARD
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CLIPBOARD must be defined, please read comment near the top of this file."
+# error "wxUSE_CLIPBOARD must be defined."
# else
# define wxUSE_CLIPBOARD 0
# endif
@@ -547,7 +439,7 @@
#ifndef wxUSE_COLLPANE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLLPANE must be defined, please read comment near the top of this file."
+# error "wxUSE_COLLPANE must be defined."
# else
# define wxUSE_COLLPANE 0
# endif
@@ -555,7 +447,7 @@
#ifndef wxUSE_COLOURDLG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLOURDLG must be defined, please read comment near the top of this file."
+# error "wxUSE_COLOURDLG must be defined."
# else
# define wxUSE_COLOURDLG 0
# endif
@@ -563,7 +455,7 @@
#ifndef wxUSE_COLOURPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLOURPICKERCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_COLOURPICKERCTRL must be defined."
# else
# define wxUSE_COLOURPICKERCTRL 0
# endif
@@ -571,23 +463,15 @@
#ifndef wxUSE_COMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMBOBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_COMBOBOX must be defined."
# else
# define wxUSE_COMBOBOX 0
# endif
#endif /* !defined(wxUSE_COMBOBOX) */
-#ifndef wxUSE_COMMANDLINKBUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMMANDLINKBUTTON must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_COMMANDLINKBUTTON 0
-# endif
-#endif /* !defined(wxUSE_COMMANDLINKBUTTON) */
-
#ifndef wxUSE_COMBOCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMBOCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_COMBOCTRL must be defined."
# else
# define wxUSE_COMBOCTRL 0
# endif
@@ -595,7 +479,7 @@
#ifndef wxUSE_DATAOBJ
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DATAOBJ must be defined, please read comment near the top of this file."
+# error "wxUSE_DATAOBJ must be defined."
# else
# define wxUSE_DATAOBJ 0
# endif
@@ -603,7 +487,7 @@
#ifndef wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DATAVIEWCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_DATAVIEWCTRL must be defined."
# else
# define wxUSE_DATAVIEWCTRL 0
# endif
@@ -611,23 +495,15 @@
#ifndef wxUSE_DATEPICKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DATEPICKCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_DATEPICKCTRL must be defined."
# else
# define wxUSE_DATEPICKCTRL 0
# endif
#endif /* !defined(wxUSE_DATEPICKCTRL) */
-#ifndef wxUSE_DC_TRANSFORM_MATRIX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DC_TRANSFORM_MATRIX must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_DC_TRANSFORM_MATRIX 1
-# endif
-#endif /* wxUSE_DC_TRANSFORM_MATRIX */
-
#ifndef wxUSE_DIRPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DIRPICKERCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_DIRPICKERCTRL must be defined."
# else
# define wxUSE_DIRPICKERCTRL 0
# endif
@@ -635,7 +511,7 @@
#ifndef wxUSE_DISPLAY
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DISPLAY must be defined, please read comment near the top of this file."
+# error "wxUSE_DISPLAY must be defined."
# else
# define wxUSE_DISPLAY 0
# endif
@@ -643,23 +519,15 @@
#ifndef wxUSE_DOC_VIEW_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined, please read comment near the top of this file."
+# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
# else
# define wxUSE_DOC_VIEW_ARCHITECTURE 0
# endif
#endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
-#ifndef wxUSE_FILECTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILECTRL must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_FILECTRL 0
-# endif
-#endif /* !defined(wxUSE_FILECTRL) */
-
#ifndef wxUSE_FILEDLG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILEDLG must be defined, please read comment near the top of this file."
+# error "wxUSE_FILEDLG must be defined."
# else
# define wxUSE_FILEDLG 0
# endif
@@ -667,7 +535,7 @@
#ifndef wxUSE_FILEPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILEPICKERCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_FILEPICKERCTRL must be defined."
# else
# define wxUSE_FILEPICKERCTRL 0
# endif
@@ -675,7 +543,7 @@
#ifndef wxUSE_FONTDLG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FONTDLG must be defined, please read comment near the top of this file."
+# error "wxUSE_FONTDLG must be defined."
# else
# define wxUSE_FONTDLG 0
# endif
@@ -683,7 +551,7 @@
#ifndef wxUSE_FONTMAP
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FONTMAP must be defined, please read comment near the top of this file."
+# error "wxUSE_FONTMAP must be defined."
# else
# define wxUSE_FONTMAP 0
# endif
@@ -691,7 +559,7 @@
#ifndef wxUSE_FONTPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FONTPICKERCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_FONTPICKERCTRL must be defined."
# else
# define wxUSE_FONTPICKERCTRL 0
# endif
@@ -699,7 +567,7 @@
#ifndef wxUSE_GAUGE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GAUGE must be defined, please read comment near the top of this file."
+# error "wxUSE_GAUGE must be defined."
# else
# define wxUSE_GAUGE 0
# endif
@@ -707,7 +575,7 @@
#ifndef wxUSE_GRAPHICS_CONTEXT
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GRAPHICS_CONTEXT must be defined, please read comment near the top of this file."
+# error "wxUSE_GRAPHICS_CONTEXT must be defined."
# else
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
@@ -716,23 +584,15 @@
#ifndef wxUSE_GRID
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GRID must be defined, please read comment near the top of this file."
+# error "wxUSE_GRID must be defined."
# else
# define wxUSE_GRID 0
# endif
#endif /* !defined(wxUSE_GRID) */
-#ifndef wxUSE_HEADERCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HEADERCTRL must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_HEADERCTRL 0
-# endif
-#endif /* !defined(wxUSE_HEADERCTRL) */
-
#ifndef wxUSE_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HELP must be defined, please read comment near the top of this file."
+# error "wxUSE_HELP must be defined."
# else
# define wxUSE_HELP 0
# endif
@@ -740,7 +600,7 @@
#ifndef wxUSE_HYPERLINKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HYPERLINKCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_HYPERLINKCTRL must be defined."
# else
# define wxUSE_HYPERLINKCTRL 0
# endif
@@ -748,19 +608,19 @@
#ifndef wxUSE_HTML
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HTML must be defined, please read comment near the top of this file."
+# error "wxUSE_HTML must be defined."
# else
# define wxUSE_HTML 0
# endif
#endif /* !defined(wxUSE_HTML) */
#ifndef wxUSE_LIBMSPACK
-# if !defined(__UNIX__)
+# 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, please read comment near the top of this file."
+# error "wxUSE_LIBMSPACK must be defined."
# else
# define wxUSE_LIBMSPACK 0
# endif
@@ -769,7 +629,7 @@
#ifndef wxUSE_ICO_CUR
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ICO_CUR must be defined, please read comment near the top of this file."
+# error "wxUSE_ICO_CUR must be defined."
# else
# define wxUSE_ICO_CUR 0
# endif
@@ -777,7 +637,7 @@
#ifndef wxUSE_IFF
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_IFF must be defined, please read comment near the top of this file."
+# error "wxUSE_IFF must be defined."
# else
# define wxUSE_IFF 0
# endif
@@ -785,23 +645,15 @@
#ifndef wxUSE_IMAGLIST
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_IMAGLIST must be defined, please read comment near the top of this file."
+# error "wxUSE_IMAGLIST must be defined."
# else
# define wxUSE_IMAGLIST 0
# endif
#endif /* !defined(wxUSE_IMAGLIST) */
-#ifndef wxUSE_INFOBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_INFOBAR must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_INFOBAR 0
-# endif
-#endif /* !defined(wxUSE_INFOBAR) */
-
#ifndef wxUSE_JOYSTICK
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_JOYSTICK must be defined, please read comment near the top of this file."
+# error "wxUSE_JOYSTICK must be defined."
# else
# define wxUSE_JOYSTICK 0
# endif
@@ -809,7 +661,7 @@
#ifndef wxUSE_LISTBOOK
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LISTBOOK must be defined, please read comment near the top of this file."
+# error "wxUSE_LISTBOOK must be defined."
# else
# define wxUSE_LISTBOOK 0
# endif
@@ -817,7 +669,7 @@
#ifndef wxUSE_LISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LISTBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_LISTBOX must be defined."
# else
# define wxUSE_LISTBOX 0
# endif
@@ -825,7 +677,7 @@
#ifndef wxUSE_LISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LISTCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_LISTCTRL must be defined."
# else
# define wxUSE_LISTCTRL 0
# endif
@@ -833,7 +685,7 @@
#ifndef wxUSE_LOGGUI
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOGGUI must be defined, please read comment near the top of this file."
+# error "wxUSE_LOGGUI must be defined."
# else
# define wxUSE_LOGGUI 0
# endif
@@ -841,7 +693,7 @@
#ifndef wxUSE_LOGWINDOW
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOGWINDOW must be defined, please read comment near the top of this file."
+# error "wxUSE_LOGWINDOW must be defined."
# else
# define wxUSE_LOGWINDOW 0
# endif
@@ -849,23 +701,15 @@
#ifndef wxUSE_LOG_DIALOG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOG_DIALOG must be defined, please read comment near the top of this file."
+# error "wxUSE_LOG_DIALOG must be defined."
# else
# define wxUSE_LOG_DIALOG 0
# endif
#endif /* !defined(wxUSE_LOG_DIALOG) */
-#ifndef wxUSE_MARKUP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MARKUP must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_MARKUP 0
-# endif
-#endif /* !defined(wxUSE_MARKUP) */
-
#ifndef wxUSE_MDI
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MDI must be defined, please read comment near the top of this file."
+# error "wxUSE_MDI must be defined."
# else
# define wxUSE_MDI 0
# endif
@@ -873,7 +717,7 @@
#ifndef wxUSE_MDI_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MDI_ARCHITECTURE must be defined, please read comment near the top of this file."
+# error "wxUSE_MDI_ARCHITECTURE must be defined."
# else
# define wxUSE_MDI_ARCHITECTURE 0
# endif
@@ -881,7 +725,7 @@
#ifndef wxUSE_MENUS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MENUS must be defined, please read comment near the top of this file."
+# error "wxUSE_MENUS must be defined."
# else
# define wxUSE_MENUS 0
# endif
@@ -889,7 +733,7 @@
#ifndef wxUSE_MSGDLG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MSGDLG must be defined, please read comment near the top of this file."
+# error "wxUSE_MSGDLG must be defined."
# else
# define wxUSE_MSGDLG 0
# endif
@@ -897,23 +741,15 @@
#ifndef wxUSE_NOTEBOOK
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_NOTEBOOK must be defined, please read comment near the top of this file."
+# error "wxUSE_NOTEBOOK must be defined."
# else
# define wxUSE_NOTEBOOK 0
# endif
#endif /* !defined(wxUSE_NOTEBOOK) */
-#ifndef wxUSE_NOTIFICATION_MESSAGE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_NOTIFICATION_MESSAGE must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_NOTIFICATION_MESSAGE 0
-# endif
-#endif /* !defined(wxUSE_NOTIFICATION_MESSAGE) */
-
#ifndef wxUSE_ODCOMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ODCOMBOBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_ODCOMBOBOX must be defined."
# else
# define wxUSE_ODCOMBOBOX 0
# endif
@@ -921,7 +757,7 @@
#ifndef wxUSE_PALETTE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PALETTE must be defined, please read comment near the top of this file."
+# error "wxUSE_PALETTE must be defined."
# else
# define wxUSE_PALETTE 0
# endif
@@ -929,23 +765,15 @@
#ifndef wxUSE_POPUPWIN
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_POPUPWIN must be defined, please read comment near the top of this file."
+# error "wxUSE_POPUPWIN must be defined."
# else
# define wxUSE_POPUPWIN 0
# endif
#endif /* !defined(wxUSE_POPUPWIN) */
-#ifndef wxUSE_PREFERENCES_EDITOR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PREFERENCES_EDITOR must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_PREFERENCES_EDITOR 0
-# endif
-#endif /* !defined(wxUSE_PREFERENCES_EDITOR) */
-
#ifndef wxUSE_PRINTING_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PRINTING_ARCHITECTURE must be defined, please read comment near the top of this file."
+# error "wxUSE_PRINTING_ARCHITECTURE must be defined."
# else
# define wxUSE_PRINTING_ARCHITECTURE 0
# endif
@@ -953,7 +781,7 @@
#ifndef wxUSE_RADIOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RADIOBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_RADIOBOX must be defined."
# else
# define wxUSE_RADIOBOX 0
# endif
@@ -961,47 +789,15 @@
#ifndef wxUSE_RADIOBTN
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RADIOBTN must be defined, please read comment near the top of this file."
+# error "wxUSE_RADIOBTN must be defined."
# else
# define wxUSE_RADIOBTN 0
# endif
#endif /* !defined(wxUSE_RADIOBTN) */
-#ifndef wxUSE_REARRANGECTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_REARRANGECTRL must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_REARRANGECTRL 0
-# endif
-#endif /* !defined(wxUSE_REARRANGECTRL) */
-
-#ifndef wxUSE_RIBBON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RIBBON must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_RIBBON 0
-# endif
-#endif /* !defined(wxUSE_RIBBON) */
-
-#ifndef wxUSE_RICHMSGDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RICHMSGDLG must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_RICHMSGDLG 0
-# endif
-#endif /* !defined(wxUSE_RICHMSGDLG) */
-
-#ifndef wxUSE_RICHTOOLTIP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RICHTOOLTIP must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_RICHTOOLTIP 0
-# endif
-#endif /* !defined(wxUSE_RICHTOOLTIP) */
-
#ifndef wxUSE_SASH
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SASH must be defined, please read comment near the top of this file."
+# error "wxUSE_SASH must be defined."
# else
# define wxUSE_SASH 0
# endif
@@ -1009,7 +805,7 @@
#ifndef wxUSE_SCROLLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SCROLLBAR must be defined, please read comment near the top of this file."
+# error "wxUSE_SCROLLBAR must be defined."
# else
# define wxUSE_SCROLLBAR 0
# endif
@@ -1017,7 +813,7 @@
#ifndef wxUSE_SLIDER
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SLIDER must be defined, please read comment near the top of this file."
+# error "wxUSE_SLIDER must be defined."
# else
# define wxUSE_SLIDER 0
# endif
@@ -1025,7 +821,7 @@
#ifndef wxUSE_SOUND
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SOUND must be defined, please read comment near the top of this file."
+# error "wxUSE_SOUND must be defined."
# else
# define wxUSE_SOUND 0
# endif
@@ -1033,7 +829,7 @@
#ifndef wxUSE_SPINBTN
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPINBTN must be defined, please read comment near the top of this file."
+# error "wxUSE_SPINBTN must be defined."
# else
# define wxUSE_SPINBTN 0
# endif
@@ -1041,7 +837,7 @@
#ifndef wxUSE_SPINCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPINCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_SPINCTRL must be defined."
# else
# define wxUSE_SPINCTRL 0
# endif
@@ -1049,7 +845,7 @@
#ifndef wxUSE_SPLASH
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPLASH must be defined, please read comment near the top of this file."
+# error "wxUSE_SPLASH must be defined."
# else
# define wxUSE_SPLASH 0
# endif
@@ -1057,7 +853,7 @@
#ifndef wxUSE_SPLITTER
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPLITTER must be defined, please read comment near the top of this file."
+# error "wxUSE_SPLITTER must be defined."
# else
# define wxUSE_SPLITTER 0
# endif
@@ -1065,7 +861,7 @@
#ifndef wxUSE_STATBMP
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATBMP must be defined, please read comment near the top of this file."
+# error "wxUSE_STATBMP must be defined."
# else
# define wxUSE_STATBMP 0
# endif
@@ -1073,7 +869,7 @@
#ifndef wxUSE_STATBOX
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATBOX must be defined, please read comment near the top of this file."
+# error "wxUSE_STATBOX must be defined."
# else
# define wxUSE_STATBOX 0
# endif
@@ -1081,7 +877,7 @@
#ifndef wxUSE_STATLINE
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATLINE must be defined, please read comment near the top of this file."
+# error "wxUSE_STATLINE must be defined."
# else
# define wxUSE_STATLINE 0
# endif
@@ -1089,7 +885,7 @@
#ifndef wxUSE_STATTEXT
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATTEXT must be defined, please read comment near the top of this file."
+# error "wxUSE_STATTEXT must be defined."
# else
# define wxUSE_STATTEXT 0
# endif
@@ -1097,39 +893,31 @@
#ifndef wxUSE_STATUSBAR
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATUSBAR must be defined, please read comment near the top of this file."
+# error "wxUSE_STATUSBAR must be defined."
# else
# define wxUSE_STATUSBAR 0
# endif
#endif /* !defined(wxUSE_STATUSBAR) */
-#ifndef wxUSE_TASKBARICON
+#ifndef wxUSE_TAB_DIALOG
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TASKBARICON must be defined, please read comment near the top of this file."
+# error "wxUSE_TAB_DIALOG must be defined."
# else
-# define wxUSE_TASKBARICON 0
+# define wxUSE_TAB_DIALOG 0
# endif
-#endif /* !defined(wxUSE_TASKBARICON) */
+#endif /* !defined(wxUSE_TAB_DIALOG) */
#ifndef wxUSE_TEXTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTCTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_TEXTCTRL must be defined."
# else
# define wxUSE_TEXTCTRL 0
# endif
#endif /* !defined(wxUSE_TEXTCTRL) */
-#ifndef wxUSE_TIMEPICKCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TIMEPICKCTRL must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_TIMEPICKCTRL 0
-# endif
-#endif /* !defined(wxUSE_TIMEPICKCTRL) */
-
#ifndef wxUSE_TIPWINDOW
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file."
+# error "wxUSE_TIPWINDOW must be defined."
# else
# define wxUSE_TIPWINDOW 0
# endif
@@ -1137,7 +925,7 @@
#ifndef wxUSE_TOOLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TOOLBAR must be defined, please read comment near the top of this file."
+# error "wxUSE_TOOLBAR must be defined."
# else
# define wxUSE_TOOLBAR 0
# endif
@@ -1145,7 +933,7 @@
#ifndef wxUSE_TOOLTIPS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TOOLTIPS must be defined, please read comment near the top of this file."
+# error "wxUSE_TOOLTIPS must be defined."
# else
# define wxUSE_TOOLTIPS 0
# endif
@@ -1153,47 +941,23 @@
#ifndef wxUSE_TREECTRL
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TREECTRL must be defined, please read comment near the top of this file."
+# error "wxUSE_TREECTRL must be defined."
# else
# define wxUSE_TREECTRL 0
# endif
#endif /* !defined(wxUSE_TREECTRL) */
-#ifndef wxUSE_TREELISTCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TREELISTCTRL must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_TREELISTCTRL 0
-# endif
-#endif /* !defined(wxUSE_TREELISTCTRL) */
-
-#ifndef wxUSE_UIACTIONSIMULATOR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_UIACTIONSIMULATOR 0
-# endif
-#endif /* !defined(wxUSE_UIACTIONSIMULATOR) */
-
#ifndef wxUSE_VALIDATORS
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_VALIDATORS must be defined, please read comment near the top of this file."
+# error "wxUSE_VALIDATORS must be defined."
# else
# define wxUSE_VALIDATORS 0
# endif
#endif /* !defined(wxUSE_VALIDATORS) */
-#ifndef wxUSE_WEBVIEW
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_WEBVIEW must be defined, please read comment near the top of this file."
-# else
-# define wxUSE_WEBVIEW 0
-# endif
-#endif /* !defined(wxUSE_WEBVIEW) */
-
#ifndef wxUSE_WXHTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_WXHTML_HELP must be defined, please read comment near the top of this file."
+# error "wxUSE_WXHTML_HELP must be defined."
# else
# define wxUSE_WXHTML_HELP 0
# endif
@@ -1201,7 +965,7 @@
#ifndef wxUSE_XRC
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XRC must be defined, please read comment near the top of this file."
+# error "wxUSE_XRC must be defined."
# else
# define wxUSE_XRC 0
# endif
@@ -1210,63 +974,19 @@
#endif /* wxUSE_GUI */
/*
- Section 2: platform-specific checks.
-
- This must be done after checking that everything is defined as the platform
- checks use wxUSE_XXX symbols in #if tests.
+ check consistency of the settings
*/
-#if defined(__WXWINCE__)
-# include "wx/msw/wince/chkconf.h"
-#elif defined(__WINDOWS__)
-# include "wx/msw/chkconf.h"
-# if defined(__WXGTK__)
-# include "wx/gtk/chkconf.h"
-# endif
-#elif defined(__WXGTK__)
-# include "wx/gtk/chkconf.h"
-#elif defined(__WXCOCOA__)
-# include "wx/cocoa/chkconf.h"
-#elif defined(__WXMAC__)
-# include "wx/osx/chkconf.h"
-#elif defined(__OS2__)
-# include "wx/os2/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"
-#elif defined(__WXANDROID__)
-# include "wx/android/chkconf.h"
-#endif
-
-/*
- __UNIX__ is also defined under Cygwin but we shouldn't perform these checks
- there if we're building Windows ports.
- */
-#if defined(__UNIX__) && !defined(__WINDOWS__)
-# include "wx/unix/chkconf.h"
-#endif
-
-#ifdef __WXUNIVERSAL__
-# include "wx/univ/chkconf.h"
-#endif
-
-/*
- Section 3a: check consistency of the non-GUI settings.
- */
-
-#if WXWIN_COMPATIBILITY_2_6
-# if !WXWIN_COMPATIBILITY_2_8
+#if WXWIN_COMPATIBILITY_2_4
+# if !WXWIN_COMPATIBILITY_2_6
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "2.6.X compatibility requires 2.8.X compatibility"
+# error "2.4.X compatibility requires 2.6.X compatibility"
# else
-# undef WXWIN_COMPATIBILITY_2_8
-# define WXWIN_COMPATIBILITY_2_8 1
+# undef WXWIN_COMPATIBILITY_2_6
+# define WXWIN_COMPATIBILITY_2_6 1
# endif
# endif
-#endif /* WXWIN_COMPATIBILITY_2_6 */
+#endif /* WXWIN_COMPATIBILITY_2_4 */
#if wxUSE_ARCHIVE_STREAMS
# if !wxUSE_DATETIME
@@ -1279,6 +999,15 @@
# 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
@@ -1406,6 +1135,17 @@
# 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"
@@ -1424,6 +1164,15 @@
# 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
@@ -1453,6 +1202,18 @@
# 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
@@ -1464,20 +1225,9 @@
# endif
#endif /* wxUSE_TARSTREAM */
-/*
- Section 3b: the tests for the GUI settings only.
- */
+/* the rest of the tests is for the GUI settings only */
#if wxUSE_GUI
-#if wxUSE_ACCESSIBILITY && !defined(__WXMSW__)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ACCESSIBILITY is currently only supported under wxMSW"
-# else
-# undef wxUSE_ACCESSIBILITY
-# define wxUSE_ACCESSIBILITY 0
-# endif
-#endif /* wxUSE_ACCESSIBILITY */
-
#if wxUSE_BUTTON || \
wxUSE_CALENDARCTRL || \
wxUSE_CARET || \
@@ -1488,13 +1238,11 @@
wxUSE_CHOICE || \
wxUSE_GAUGE || \
wxUSE_GRID || \
- wxUSE_HEADERCTRL || \
wxUSE_LISTBOX || \
wxUSE_LISTCTRL || \
wxUSE_NOTEBOOK || \
wxUSE_RADIOBOX || \
wxUSE_RADIOBTN || \
- wxUSE_REARRANGECTRL || \
wxUSE_SCROLLBAR || \
wxUSE_SLIDER || \
wxUSE_SPINBTN || \
@@ -1506,8 +1254,7 @@
wxUSE_STATUSBAR || \
wxUSE_TEXTCTRL || \
wxUSE_TOOLBAR || \
- wxUSE_TREECTRL || \
- wxUSE_TREELISTCTRL
+ wxUSE_TREECTRL
# if !wxUSE_CONTROLS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CONTROLS unset but some controls used"
@@ -1529,17 +1276,6 @@
# endif
#endif /* wxUSE_BMPBUTTON */
-#if wxUSE_COMMANDLINKBUTTON
-# if !wxUSE_BUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMMANDLINKBUTTON requires wxUSE_BUTTON"
-# else
-# undef wxUSE_BUTTON
-# define wxUSE_BUTTON 1
-# endif
-# endif
-#endif /* wxUSE_COMMANDLINKBUTTON */
-
/*
wxUSE_BOOKCTRL should be only used if any of the controls deriving from it
are used
@@ -1604,53 +1340,20 @@
#if !wxUSE_ODCOMBOBOX
# if wxUSE_BITMAPCOMBOBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxBitmapComboBox requires wxOwnerDrawnComboBox"
-# else
-# undef wxUSE_BITMAPCOMBOBOX
-# define wxUSE_BITMAPCOMBOBOX 0
-# endif
+# error "wxBitmapComboBox requires wxOwnerDrawnComboBox"
+# else
+# undef wxUSE_BITMAPCOMBOBOX
+# define wxUSE_BITMAPCOMBOBOX 0
# endif
#endif /* !wxUSE_ODCOMBOBOX */
-#if !wxUSE_HEADERCTRL
-# if wxUSE_DATAVIEWCTRL || wxUSE_GRID
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxDataViewCtrl and wxGrid require wxHeaderCtrl"
-# else
-# undef wxUSE_HEADERCTRL
-# define wxUSE_HEADERCTRL 1
-# endif
-# endif
-#endif /* !wxUSE_HEADERCTRL */
-
-#if wxUSE_REARRANGECTRL
-# if !wxUSE_CHECKLISTBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxRearrangeCtrl requires wxCheckListBox"
-# else
-# undef wxUSE_REARRANGECTRL
-# define wxUSE_REARRANGECTRL 0
-# endif
-# endif
-#endif /* wxUSE_REARRANGECTRL */
-
-#if wxUSE_RICHMSGDLG
-# if !wxUSE_MSGDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RICHMSGDLG requires wxUSE_MSGDLG"
-# else
-# undef wxUSE_MSGDLG
-# define wxUSE_MSGDLG 1
-# endif
-# endif
-#endif /* wxUSE_RICHMSGDLG */
-
/* 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__))
+# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
+ defined(__WXMAC__) || \
+ defined(__WXPALMOS__) )
# undef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0
# endif
@@ -1666,6 +1369,40 @@
#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
@@ -1693,29 +1430,7 @@
# endif
#endif /* !wxMSW || wxUniv */
-/* generic file dialog depends on (generic) file control */
-#if wxUSE_FILEDLG && !wxUSE_FILECTRL && \
- (defined(__WXUNIVERSAL__) || defined(__WXGTK__))
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Generic wxFileDialog requires wxFileCtrl"
-# else
-# undef wxUSE_FILECTRL
-# define wxUSE_FILECTRL 1
-# endif
-#endif /* wxUSE_FILEDLG */
-
/* common dependencies */
-#if wxUSE_ARTPROVIDER_TANGO
-# if !(wxUSE_STREAMS && wxUSE_IMAGE && wxUSE_LIBPNG)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Tango art provider requires wxImage with streams and PNG support"
-# else
-# undef wxUSE_ARTPROVIDER_TANGO
-# define wxUSE_ARTPROVIDER_TANGO 0
-# endif
-# endif
-#endif /* wxUSE_ARTPROVIDER_TANGO */
-
#if wxUSE_CALENDARCTRL
# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
# ifdef wxABORT_ON_CONFIG_ERROR
@@ -1738,16 +1453,16 @@
# endif
#endif /* wxUSE_CALENDARCTRL */
-#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
+#if wxUSE_DATEPICKCTRL
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxDatePickerCtrl and wxTimePickerCtrl requires wxUSE_DATETIME"
+# error "wxDatePickerCtrl requires wxUSE_DATETIME"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
-#endif /* wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL */
+#endif /* wxUSE_DATEPICKCTRL */
#if wxUSE_CHECKLISTBOX
# if !wxUSE_LISTBOX
@@ -1771,17 +1486,6 @@
# endif
#endif /* wxUSE_CHOICEDLG */
-#if wxUSE_FILECTRL
-# if !wxUSE_DATETIME
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxFileCtrl requires wxDateTime"
-# else
-# undef wxUSE_DATETIME
-# define wxUSE_DATETIME 1
-# endif
-# endif
-#endif /* wxUSE_FILECTRL */
-
#if wxUSE_HELP
# if !wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR
@@ -1958,15 +1662,6 @@
# define wxUSE_STREAMS 1
# endif
# endif
-
-# if !wxUSE_FILE_HISTORY
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "DocView requires wxUSE_FILE_HISTORY"
-# else
-# undef wxUSE_FILE_HISTORY
-# define wxUSE_FILE_HISTORY 1
-# endif
-# endif
#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
#if wxUSE_PRINTING_ARCHITECTURE
@@ -2012,7 +1707,7 @@
#endif /* wxUSE_FILEDLG */
#if !wxUSE_GAUGE || !wxUSE_BUTTON
-# if wxUSE_PROGRESSDLG
+# if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
# else
@@ -2054,7 +1749,7 @@
#endif
#if !wxUSE_IMAGLIST
-# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL || wxUSE_TREELISTCTRL
+# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxImageList must be compiled as well"
# else
@@ -2064,6 +1759,16 @@
# 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
@@ -2073,7 +1778,7 @@
# define wxUSE_RADIOBTN 1
# endif
# endif
-# if !wxUSE_STATBOX
+# if !wxUSE_STATBOX && !defined(__WXPALMOS__)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
# else
@@ -2116,6 +1821,15 @@
# 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"
@@ -2134,42 +1848,6 @@
# endif
#endif /* wxUSE_SOCKETS */
-#if wxUSE_SVG && !wxUSE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SVG requires wxUSE_STREAMS"
-# else
-# undef wxUSE_SVG
-# define wxUSE_SVG 0
-# endif
-#endif /* wxUSE_SVG */
-
-#if wxUSE_SVG && !wxUSE_IMAGE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SVG requires wxUSE_IMAGE"
-# else
-# undef wxUSE_SVG
-# define wxUSE_SVG 0
-# endif
-#endif /* wxUSE_SVG */
-
-#if wxUSE_SVG && !wxUSE_LIBPNG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SVG requires wxUSE_LIBPNG"
-# else
-# undef wxUSE_SVG
-# define wxUSE_SVG 0
-# endif
-#endif /* wxUSE_SVG */
-
-#if wxUSE_TASKBARICON && !wxUSE_MENUS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TASKBARICON requires wxUSE_MENUS"
-# else
-# undef wxUSE_TASKBARICON
-# define wxUSE_TASKBARICON 0
-# endif
-#endif /* wxUSE_TASKBARICON */
-
#if !wxUSE_VARIANT
# if wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
@@ -2179,53 +1857,15 @@
# define wxUSE_DATAVIEWCTRL 0
# endif
# endif
-#endif /* wxUSE_VARIANT */
-#if wxUSE_TREELISTCTRL && !wxUSE_DATAVIEWCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TREELISTCTRL requires wxDataViewCtrl"
-# else
-# undef wxUSE_TREELISTCTRL
-# define wxUSE_TREELISTCTRL 0
-# endif
-#endif /* wxUSE_TREELISTCTRL */
-
-#if wxUSE_WEBVIEW && !(wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_WEBVIEW requires at least one backend"
-# else
-# undef wxUSE_WEBVIEW
-# define wxUSE_WEBVIEW 0
-# endif
-#endif /* wxUSE_WEBVIEW && !any web view backend */
-
-#if wxUSE_PREFERENCES_EDITOR
- /*
- We can use either a generic implementation, using wxNotebook, or a
- native one under wxOSX/Cocoa but then we must be using the native
- toolbar.
- */
-# if !wxUSE_NOTEBOOK
-# ifdef __WXOSX_COCOA__
-# if !wxUSE_TOOLBAR || !wxOSX_USE_NATIVE_TOOLBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PREFERENCES_EDITOR requires native toolbar in wxOSX"
-# else
-# undef wxUSE_PREFERENCES_EDITOR
-# define wxUSE_PREFERENCES_EDITOR 0
-# endif
-# endif
+# if wxUSE_ODBC
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_ODBC requires wxVariant"
# else
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PREFERENCES_EDITOR requires wxNotebook"
-# else
-# undef wxUSE_PREFERENCES_EDITOR
-# define wxUSE_PREFERENCES_EDITOR 0
-# endif
+# undef wxUSE_ODBC
+# define wxUSE_ODBC 0
# endif
# endif
-#endif /* wxUSE_PREFERENCES_EDITOR */
+#endif /* wxUSE_VARIANT */
#endif /* wxUSE_GUI */
-
-#endif /* _WX_CHKCONF_H_ */
diff --git a/Source/3rd Party/wx/include/wx/choicdlg.h b/Source/3rd Party/wx/include/wx/choicdlg.h
index e2a15a0b8..76867ec67 100644
--- a/Source/3rd Party/wx/include/wx/choicdlg.h
+++ b/Source/3rd Party/wx/include/wx/choicdlg.h
@@ -1,9 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/choicdlg.h
+// 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
/////////////////////////////////////////////////////////////////////////////
@@ -11,12 +12,11 @@
#ifndef _WX_CHOICDLG_H_BASE_
#define _WX_CHOICDLG_H_BASE_
-#include "wx/defs.h"
-
#if wxUSE_CHOICEDLG
#include "wx/generic/choicdgg.h"
#endif
-#endif // _WX_CHOICDLG_H_BASE_
+#endif
+ // _WX_CHOICDLG_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/choice.h b/Source/3rd Party/wx/include/wx/choice.h
index f1b9ee886..fe2a9fa76 100644
--- a/Source/3rd Party/wx/include/wx/choice.h
+++ b/Source/3rd Party/wx/include/wx/choice.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -25,13 +26,13 @@
// global data
// ----------------------------------------------------------------------------
-extern WXDLLIMPEXP_DATA_CORE(const char) wxChoiceNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
// ----------------------------------------------------------------------------
// wxChoice allows to select one of a non-modifiable list of strings
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxChoiceBase : public wxControlWithItems
+class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
{
public:
wxChoiceBase() { }
@@ -54,18 +55,8 @@ public:
// emulate selecting the item event.GetInt()
void Command(wxCommandEvent& event);
- // override wxItemContainer::IsSorted
- virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
-
-protected:
- // The generic implementation doesn't determine the height correctly and
- // doesn't account for the width of the arrow but does take into account
- // the string widths, so the derived classes should override it and set the
- // height and add the arrow width to the size returned by this version.
- virtual wxSize DoGetBestSize() const;
-
private:
- wxDECLARE_NO_COPY_CLASS(wxChoiceBase);
+ DECLARE_NO_COPY_CLASS(wxChoiceBase)
};
// ----------------------------------------------------------------------------
@@ -85,7 +76,7 @@ private:
#elif defined(__WXGTK__)
#include "wx/gtk1/choice.h"
#elif defined(__WXMAC__)
- #include "wx/osx/choice.h"
+ #include "wx/mac/choice.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/choice.h"
#elif defined(__WXPM__)
diff --git a/Source/3rd Party/wx/include/wx/choicebk.h b/Source/3rd Party/wx/include/wx/choicebk.h
index 60ff2a1e6..2f35c0a01 100644
--- a/Source/3rd Party/wx/include/wx/choicebk.h
+++ b/Source/3rd Party/wx/include/wx/choicebk.h
@@ -4,6 +4,7 @@
// Author: Vadim Zeitlin
// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
// Created: 15.09.04
+// RCS-ID: $Id: choicebk.h 59616 2009-03-18 21:58:15Z VZ $
// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -17,12 +18,11 @@
#include "wx/bookctrl.h"
#include "wx/choice.h"
-#include "wx/containr.h"
class WXDLLIMPEXP_FWD_CORE wxChoice;
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent );
+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
@@ -36,10 +36,13 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBo
// wxChoicebook
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxChoicebook : public wxNavigationEnabled
+class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
{
public:
- wxChoicebook() { }
+ wxChoicebook()
+ {
+ Init();
+ }
wxChoicebook(wxWindow *parent,
wxWindowID id,
@@ -48,6 +51,8 @@ public:
long style = 0,
const wxString& name = wxEmptyString)
{
+ Init();
+
(void)Create(parent, id, pos, size, style, name);
}
@@ -60,17 +65,18 @@ public:
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 = NO_IMAGE);
- virtual int SetSelection(size_t n)
- { return DoSetSelection(n, SetSelection_SendEvent); }
+ 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);
@@ -79,29 +85,31 @@ public:
// returns the choice control
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
- // Override this to return true because the part of parent window
- // background between our controlling wxChoice and the page area should
- // show through.
- virtual bool HasTransparentBackground() { return true; }
-
protected:
- virtual void DoSetWindowVariant(wxWindowVariant variant);
-
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 = static_cast(newsel);
+ m_selection = wx_static_cast(int, newsel);
GetChoiceCtrl()->Select(m_selection);
}
- wxBookCtrlEvent* CreatePageChangingEvent() const;
- void MakeChangedEvent(wxBookCtrlEvent &event);
+ 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)
};
@@ -110,20 +118,36 @@ private:
// choicebook event class and related stuff
// ----------------------------------------------------------------------------
-// wxChoicebookEvent is obsolete and defined for compatibility only
-#define wxChoicebookEvent wxBookCtrlEvent
-typedef wxBookCtrlEventFunction wxChoicebookEventFunction;
-#define wxChoicebookEventHandler(func) wxBookCtrlEventHandler(func)
+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_CHOICEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn))
+ wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn))
#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn))
-
-// old wxEVT_COMMAND_* constants
-#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED
-#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING
+ wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn))
#endif // wxUSE_CHOICEBOOK
diff --git a/Source/3rd Party/wx/include/wx/clipbrd.h b/Source/3rd Party/wx/include/wx/clipbrd.h
index 2ae8eef8c..11976bec9 100644
--- a/Source/3rd Party/wx/include/wx/clipbrd.h
+++ b/Source/3rd Party/wx/include/wx/clipbrd.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -16,11 +17,11 @@
#if wxUSE_CLIPBOARD
-#include "wx/event.h"
-#include "wx/chartype.h"
-#include "wx/dataobj.h" // for wxDataFormat
-#include "wx/vector.h"
+#include "wx/object.h"
+#include "wx/wxchar.h"
+class WXDLLIMPEXP_FWD_CORE wxDataFormat;
+class WXDLLIMPEXP_FWD_CORE wxDataObject;
class WXDLLIMPEXP_FWD_CORE wxClipboard;
// ----------------------------------------------------------------------------
@@ -31,10 +32,10 @@ class WXDLLIMPEXP_FWD_CORE wxClipboard;
// with wxDataObject.
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxClipboardBase : public wxObject
+class WXDLLEXPORT wxClipboardBase : public wxObject
{
public:
- wxClipboardBase() { m_usePrimary = false; }
+ wxClipboardBase() {}
// open the clipboard before Add/SetData() and GetData()
virtual bool Open() = 0;
@@ -58,9 +59,6 @@ public:
// ask if data in correct format is available
virtual bool IsSupported( const wxDataFormat& format ) = 0;
- // ask if data in correct format is available
- virtual bool IsSupportedAsync( wxEvtHandler *sink );
-
// fill data with data on the clipboard (if available)
virtual bool GetData( wxDataObject& data ) = 0;
@@ -72,72 +70,13 @@ public:
// eating memory), otherwise the clipboard will be emptied on exit
virtual bool Flush() { return false; }
- // this allows to choose whether we work with CLIPBOARD (default) or
- // PRIMARY selection on X11-based systems
- //
- // on the other ones, working with primary selection does nothing: this
- // allows to write code which sets the primary selection when something is
- // selected without any ill effects (i.e. without overwriting the
- // clipboard which would be wrong on the platforms without X11 PRIMARY)
- virtual void UsePrimarySelection(bool usePrimary = false)
- {
- m_usePrimary = usePrimary;
- }
-
- // return true if we're using primary selection
- bool IsUsingPrimarySelection() const { return m_usePrimary; }
+ // 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();
-
-
- // don't use this directly, it is public for compatibility with some ports
- // (wxX11, wxMotif, ...) only
- bool m_usePrimary;
};
-// ----------------------------------------------------------------------------
-// asynchronous clipboard event
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxClipboardEvent : public wxEvent
-{
-public:
- wxClipboardEvent(wxEventType evtType = wxEVT_NULL)
- : wxEvent(0, evtType)
- {
- }
-
- wxClipboardEvent(const wxClipboardEvent& event)
- : wxEvent(event),
- m_formats(event.m_formats)
- {
- }
-
- bool SupportsFormat(const wxDataFormat& format) const;
- void AddFormat(const wxDataFormat& format);
-
- virtual wxEvent *Clone() const
- {
- return new wxClipboardEvent(*this);
- }
-
-
-protected:
- wxVector m_formats;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardEvent)
-};
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CLIPBOARD_CHANGED, wxClipboardEvent );
-
-typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&);
-
-#define wxClipboardEventHandler(func) \
- wxEVENT_HANDLER_CAST(wxClipboardEventFunction, func)
-
-#define EVT_CLIPBOARD_CHANGED(func) wx__DECLARE_EVT0(wxEVT_CLIPBOARD_CHANGED, wxClipboardEventHandler(func))
-
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
@@ -159,8 +98,10 @@ typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&);
#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/osx/clipbrd.h"
+ #include "wx/mac/clipbrd.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/clipbrd.h"
#elif defined(__WXPM__)
@@ -171,10 +112,10 @@ typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&);
// helpful class for opening the clipboard and automatically closing it
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxClipboardLocker
+class WXDLLEXPORT wxClipboardLocker
{
public:
- wxClipboardLocker(wxClipboard *clipboard = NULL)
+ wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL)
{
m_clipboard = clipboard ? clipboard : wxTheClipboard;
if ( m_clipboard )
@@ -196,7 +137,7 @@ public:
private:
wxClipboard *m_clipboard;
- wxDECLARE_NO_COPY_CLASS(wxClipboardLocker);
+ DECLARE_NO_COPY_CLASS(wxClipboardLocker)
};
#endif // wxUSE_CLIPBOARD
diff --git a/Source/3rd Party/wx/include/wx/clntdata.h b/Source/3rd Party/wx/include/wx/clntdata.h
index 09148f719..f9704a7d0 100644
--- a/Source/3rd Party/wx/include/wx/clntdata.h
+++ b/Source/3rd Party/wx/include/wx/clntdata.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -158,5 +159,115 @@ protected:
};
+#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/Source/3rd Party/wx/include/wx/clrpicker.h b/Source/3rd Party/wx/include/wx/clrpicker.h
index 0d83898ed..f6a436fc3 100644
--- a/Source/3rd Party/wx/include/wx/clrpicker.h
+++ b/Source/3rd Party/wx/include/wx/clrpicker.h
@@ -5,6 +5,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -21,15 +22,8 @@
class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
-extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerWidgetNameStr[];
-extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerCtrlNameStr[];
-
-// 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)
-
+extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
// ----------------------------------------------------------------------------
@@ -76,7 +70,7 @@ protected:
// 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(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/clrpicker.h"
#define wxColourPickerWidget wxColourButton
#else
@@ -97,7 +91,7 @@ protected:
class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase
{
public:
- wxColourPickerCtrl() {}
+ wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {}
virtual ~wxColourPickerCtrl() {}
@@ -106,6 +100,7 @@ public:
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,
@@ -146,6 +141,9 @@ 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)
};
@@ -155,14 +153,16 @@ private:
// wxColourPickerEvent: used by wxColourPickerCtrl only
// ----------------------------------------------------------------------------
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent );
+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_COLOURPICKER_CHANGED, id),
+ : wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id),
m_colour(col)
{
SetEventObject(generator);
@@ -188,15 +188,12 @@ private:
typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&);
#define wxColourPickerEventHandler(func) \
- wxEVENT_HANDLER_CAST(wxColourPickerEventFunction, func)
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func)
#define EVT_COLOURPICKER_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
+ wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
-// old wxEVT_COMMAND_* constant
-#define wxEVT_COMMAND_COLOURPICKER_CHANGED wxEVT_COLOURPICKER_CHANGED
-
#endif // wxUSE_COLOURPICKERCTRL
#endif // _WX_CLRPICKER_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/cmdargs.h b/Source/3rd Party/wx/include/wx/cmdargs.h
deleted file mode 100644
index e4167f0fd..000000000
--- a/Source/3rd Party/wx/include/wx/cmdargs.h
+++ /dev/null
@@ -1,151 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/cmdargs.h
-// Purpose: declaration of wxCmdLineArgsArray helper class
-// Author: Vadim Zeitlin
-// Created: 2007-11-12
-// Copyright: (c) 2007 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CMDARGS_H_
-#define _WX_CMDARGS_H_
-
-#include "wx/arrstr.h"
-
-// ----------------------------------------------------------------------------
-// wxCmdLineArgsArray: helper class used by wxApp::argv
-// ----------------------------------------------------------------------------
-
-#if wxUSE_UNICODE
-
-// this class is used instead of either "char **" or "wchar_t **" (neither of
-// which would be backwards compatible with all the existing code) for argv
-// field of wxApp
-//
-// as it's used for compatibility, it tries to look as much as traditional
-// (char **) argv as possible, in particular it provides implicit conversions
-// to "char **" and also array-like operator[]
-class WXDLLIMPEXP_BASE wxCmdLineArgsArray
-{
-public:
- wxCmdLineArgsArray() { m_argsA = NULL; m_argsW = NULL; }
-
- template
- wxCmdLineArgsArray& operator=(T **argv)
- {
- FreeArgs();
-
- m_args.clear();
-
- if ( argv )
- {
- while ( *argv )
- m_args.push_back(*argv++);
- }
-
- return *this;
- }
-
- operator char**() const
- {
- if ( !m_argsA )
- {
- const size_t count = m_args.size();
- m_argsA = new char *[count];
- for ( size_t n = 0; n < count; n++ )
- m_argsA[n] = wxStrdup(m_args[n].ToAscii());
- }
-
- return m_argsA;
- }
-
- operator wchar_t**() const
- {
- if ( !m_argsW )
- {
- const size_t count = m_args.size();
- m_argsW = new wchar_t *[count];
- for ( size_t n = 0; n < count; n++ )
- m_argsW[n] = wxStrdup(m_args[n].wc_str());
- }
-
- return m_argsW;
- }
-
- // existing code does checks like "if ( argv )" and we want it to continue
- // to compile, so provide this conversion even if it is pretty dangerous
- operator bool() const
- {
- return !m_args.empty();
- }
-
- // and the same for "if ( !argv )" checks
- bool operator!() const
- {
- return m_args.empty();
- }
-
- wxString operator[](size_t n) const
- {
- return m_args[n];
- }
-
- // we must provide this overload for g++ 3.4 which can't choose between
- // our operator[](size_t) and ::operator[](char**, int) otherwise
- wxString operator[](int n) const
- {
- return m_args[n];
- }
-
-
- // convenience methods, i.e. not existing only for backwards compatibility
-
- // do we have any arguments at all?
- bool IsEmpty() const { return m_args.empty(); }
-
- // access the arguments as a convenient array of wxStrings
- const wxArrayString& GetArguments() const { return m_args; }
-
- ~wxCmdLineArgsArray()
- {
- FreeArgs();
- }
-
-private:
- template
- void Free(T **args)
- {
- if ( !args )
- return;
-
- const size_t count = m_args.size();
- for ( size_t n = 0; n < count; n++ )
- free(args[n]);
-
- delete [] args;
- }
-
- void FreeArgs()
- {
- Free(m_argsA);
- Free(m_argsW);
- }
-
- wxArrayString m_args;
- mutable char **m_argsA;
- mutable wchar_t **m_argsW;
-
- wxDECLARE_NO_COPY_CLASS(wxCmdLineArgsArray);
-};
-
-// provide global operator overload for compatibility with the existing code
-// doing things like "if ( condition && argv )"
-inline bool operator&&(bool cond, const wxCmdLineArgsArray& array)
-{
- return cond && !array.IsEmpty();
-}
-
-#endif // wxUSE_UNICODE
-
-#endif // _WX_CMDARGS_H_
-
diff --git a/Source/3rd Party/wx/include/wx/cmdline.h b/Source/3rd Party/wx/include/wx/cmdline.h
index 5f12bfe47..9f6e6080b 100644
--- a/Source/3rd Party/wx/include/wx/cmdline.h
+++ b/Source/3rd Party/wx/include/wx/cmdline.h
@@ -5,6 +5,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -16,14 +17,6 @@
#include "wx/string.h"
#include "wx/arrstr.h"
-#include "wx/cmdargs.h"
-
-// determines ConvertStringToArgs() behaviour
-enum wxCmdLineSplitType
-{
- wxCMD_LINE_SPLIT_DOS,
- wxCMD_LINE_SPLIT_UNIX
-};
#if wxUSE_CMDLINE_PARSER
@@ -35,14 +28,13 @@ class WXDLLIMPEXP_FWD_BASE wxDateTime;
// 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 wxCmdLineEntryFlags
+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
- wxCMD_LINE_SWITCH_NEGATABLE = 0x20 // this switch can be negated (e.g. /S-)
+ 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
@@ -52,7 +44,6 @@ enum wxCmdLineParamType
wxCMD_LINE_VAL_STRING, // should be 0 (default)
wxCMD_LINE_VAL_NUMBER,
wxCMD_LINE_VAL_DATE,
- wxCMD_LINE_VAL_DOUBLE,
wxCMD_LINE_VAL_NONE
};
@@ -62,18 +53,9 @@ enum wxCmdLineEntryType
wxCMD_LINE_SWITCH,
wxCMD_LINE_OPTION,
wxCMD_LINE_PARAM,
- wxCMD_LINE_USAGE_TEXT,
wxCMD_LINE_NONE // to terminate the list
};
-// Possible return values of wxCmdLineParser::FoundSwitch()
-enum wxCmdLineSwitchState
-{
- wxCMD_SWITCH_OFF = -1, // Found but turned off/negated.
- wxCMD_SWITCH_NOT_FOUND, // Not found at all.
- wxCMD_SWITCH_ON // Found in normal state.
-};
-
// ----------------------------------------------------------------------------
// wxCmdLineEntryDesc is a description of one command line
// switch/option/parameter
@@ -82,17 +64,13 @@ enum wxCmdLineSwitchState
struct wxCmdLineEntryDesc
{
wxCmdLineEntryType kind;
- const char *shortName;
- const char *longName;
- const char *description;
+ const wxChar *shortName;
+ const wxChar *longName;
+ const wxChar *description;
wxCmdLineParamType type;
int flags;
};
-// the list of wxCmdLineEntryDesc objects should be terminated with this one
-#define wxCMD_LINE_DESC_END \
- { wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0x0 }
-
// ----------------------------------------------------------------------------
// wxCmdLineParser is a class for parsing command line.
//
@@ -122,8 +100,6 @@ public:
wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); }
#if wxUSE_UNICODE
wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); }
- wxCmdLineParser(int argc, const wxCmdLineArgsArray& argv)
- { Init(); SetCmdLine(argc, argv); }
#endif // wxUSE_UNICODE
wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); }
@@ -136,10 +112,6 @@ public:
#if wxUSE_UNICODE
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv)
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); }
- wxCmdLineParser(const wxCmdLineEntryDesc *desc,
- int argc,
- const wxCmdLineArgsArray& argv)
- { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
#endif // wxUSE_UNICODE
wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline)
{ Init(); SetCmdLine(cmdline); SetDesc(desc); }
@@ -148,7 +120,6 @@ public:
void SetCmdLine(int argc, char **argv);
#if wxUSE_UNICODE
void SetCmdLine(int argc, wxChar **argv);
- void SetCmdLine(int argc, const wxCmdLineArgsArray& argv);
#endif // wxUSE_UNICODE
void SetCmdLine(const wxString& cmdline);
@@ -167,7 +138,7 @@ public:
void EnableLongOptions(bool enable = true);
void DisableLongOptions() { EnableLongOptions(false); }
- bool AreLongOptionsEnabled() const;
+ bool AreLongOptionsEnabled();
// extra text may be shown by Usage() method if set by this function
void SetLogo(const wxString& logo);
@@ -182,34 +153,18 @@ public:
void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString,
int flags = 0);
- void AddLongSwitch(const wxString& lng,
- const wxString& desc = wxEmptyString,
- int flags = 0)
- {
- AddSwitch(wxString(), lng, desc, flags);
- }
// 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);
- void AddLongOption(const wxString& lng,
- const wxString& desc = wxEmptyString,
- wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
- int flags = 0)
- {
- AddOption(wxString(), lng, desc, type, flags);
- }
// a parameter
void AddParam(const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0);
- // add an explanatory text to be shown to the user in help
- void AddUsageText(const wxString& text);
-
// actions
// -------
@@ -222,10 +177,7 @@ public:
int Parse(bool showUsage = true);
// give the usage message describing all program options
- void Usage() const;
-
- // return the usage string, call Usage() to directly show it to the user
- wxString GetUsageString() const;
+ void Usage();
// get the command line arguments
// ------------------------------
@@ -233,12 +185,6 @@ public:
// returns true if the given switch was found
bool Found(const wxString& name) const;
- // Returns wxCMD_SWITCH_NOT_FOUND if the switch was not found at all,
- // wxCMD_SWITCH_ON if it was found in normal state and wxCMD_SWITCH_OFF if
- // it was found but negated (i.e. followed by "-", this can only happen for
- // the switches with wxCMD_LINE_SWITCH_NEGATABLE flag).
- wxCmdLineSwitchState FoundSwitch(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;
@@ -247,10 +193,6 @@ public:
// the value in the provided pointer
bool Found(const wxString& name, long *value) const;
- // returns true if an option taking a double value was found and stores
- // the value in the provided pointer
- bool Found(const wxString& name, double *value) const;
-
#if wxUSE_DATETIME
// returns true if an option taking a date value was found and stores the
// value in the provided pointer
@@ -267,17 +209,18 @@ public:
void Reset();
// break down the command line in arguments
- static wxArrayString
- ConvertStringToArgs(const wxString& cmdline,
- wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS);
+ static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
private:
+ // get usage string
+ wxString GetUsageString();
+
// common part of all ctors
void Init();
struct wxCmdLineParserData *m_data;
- wxDECLARE_NO_COPY_CLASS(wxCmdLineParser);
+ DECLARE_NO_COPY_CLASS(wxCmdLineParser)
};
#else // !wxUSE_CMDLINE_PARSER
@@ -287,11 +230,10 @@ private:
class WXDLLIMPEXP_BASE wxCmdLineParser
{
public:
- static wxArrayString
- ConvertStringToArgs(const wxString& cmdline,
- wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS);
+ static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
};
#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
#endif // _WX_CMDLINE_H_
+
diff --git a/Source/3rd Party/wx/include/wx/cmdproc.h b/Source/3rd Party/wx/include/wx/cmdproc.h
index 24b0b597f..930cad753 100644
--- a/Source/3rd Party/wx/include/wx/cmdproc.h
+++ b/Source/3rd Party/wx/include/wx/cmdproc.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -21,7 +22,7 @@ class WXDLLIMPEXP_FWD_CORE wxMenu;
// wxCommand: a single command capable of performing itself
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxCommand : public wxObject
+class WXDLLEXPORT wxCommand : public wxObject
{
public:
wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
@@ -48,7 +49,7 @@ private:
// wxCommandProcessor: wxCommand manager
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxCommandProcessor : public wxObject
+class WXDLLEXPORT wxCommandProcessor : public wxObject
{
public:
// if max number of commands is -1, it is unlimited
@@ -96,7 +97,10 @@ public:
virtual void ClearCommands();
// Has the current project been changed?
- virtual bool IsDirty() const;
+ 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()
@@ -133,7 +137,7 @@ protected:
private:
DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
- wxDECLARE_NO_COPY_CLASS(wxCommandProcessor);
+ DECLARE_NO_COPY_CLASS(wxCommandProcessor)
};
#endif // _WX_CMDPROC_H_
diff --git a/Source/3rd Party/wx/include/wx/cmndata.h b/Source/3rd Party/wx/include/wx/cmndata.h
index 1b9204a51..a96c4ff72 100644
--- a/Source/3rd Party/wx/include/wx/cmndata.h
+++ b/Source/3rd Party/wx/include/wx/cmndata.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -11,18 +12,134 @@
#ifndef _WX_CMNDATA_H_BASE_
#define _WX_CMNDATA_H_BASE_
-#include "wx/defs.h"
-
-#if wxUSE_PRINTING_ARCHITECTURE
-
+#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)
@@ -51,7 +168,7 @@ enum wxPrintBin
const int wxPRINTMEDIA_DEFAULT = 0;
-class WXDLLIMPEXP_CORE wxPrintData: public wxObject
+class WXDLLEXPORT wxPrintData: public wxObject
{
public:
wxPrintData();
@@ -60,7 +177,7 @@ public:
int GetNoCopies() const { return m_printNoCopies; }
bool GetCollate() const { return m_printCollate; }
- wxPrintOrientation GetOrientation() const { return m_printOrientation; }
+ int GetOrientation() const { return m_printOrientation; }
bool IsOrientationReversed() const { return m_printOrientationReversed; }
// Is this data OK for showing the print dialog?
@@ -80,11 +197,7 @@ public:
void SetNoCopies(int v) { m_printNoCopies = v; }
void SetCollate(bool flag) { m_printCollate = flag; }
-
- // Please use the overloaded method below
- wxDEPRECATED_INLINE(void SetOrientation(int orient),
- m_printOrientation = (wxPrintOrientation)orient; )
- void SetOrientation(wxPrintOrientation orient) { m_printOrientation = orient; }
+ void SetOrientation(int orient) { m_printOrientation = orient; }
void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
void SetPrinterName(const wxString& name) { m_printerName = name; }
@@ -100,13 +213,36 @@ public:
wxString GetFilename() const { return m_filename; }
void SetFilename( const wxString &filename ) { m_filename = filename; }
- wxPrintData& operator=(const wxPrintData& data);
+ 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();
@@ -119,7 +255,7 @@ private:
wxPrintMode m_printMode;
int m_printNoCopies;
- wxPrintOrientation m_printOrientation;
+ int m_printOrientation;
bool m_printOrientationReversed;
bool m_printCollate;
@@ -148,7 +284,7 @@ private:
* from the dialog.
*/
-class WXDLLIMPEXP_CORE wxPrintDialogData: public wxObject
+class WXDLLEXPORT wxPrintDialogData: public wxObject
{
public:
wxPrintDialogData();
@@ -165,7 +301,9 @@ public:
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; }
@@ -175,7 +313,9 @@ public:
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; }
@@ -188,7 +328,7 @@ public:
// Is this data OK for showing the print dialog?
bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_printData.IsOk() ; }
+ bool IsOk() const { return m_printData.Ok() ; }
wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
@@ -210,6 +350,9 @@ private:
bool m_printEnablePageNumbers;
bool m_printEnableHelp;
bool m_printEnablePrintToFile;
+#if WXWIN_COMPATIBILITY_2_4
+ bool m_printSetupDialog;
+#endif
wxPrintData m_printData;
private:
@@ -223,7 +366,7 @@ private:
// Compatibility with old name
#define wxPageSetupData wxPageSetupDialogData
-class WXDLLIMPEXP_CORE wxPageSetupDialogData: public wxObject
+class WXDLLEXPORT wxPageSetupDialogData: public wxObject
{
public:
wxPageSetupDialogData();
@@ -248,7 +391,7 @@ public:
// Is this data OK for showing the page setup dialog?
bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_printData.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.
@@ -279,7 +422,7 @@ public:
// Use paper id in wxPrintData to set this object's paper size
void CalculatePaperSizeFromId();
- wxPageSetupDialogData& operator=(const wxPageSetupDialogData& data);
+ wxPageSetupDialogData& operator=(const wxPageSetupData& data);
wxPageSetupDialogData& operator=(const wxPrintData& data);
wxPrintData& GetPrintData() { return m_printData; }
diff --git a/Source/3rd Party/wx/include/wx/collpane.h b/Source/3rd Party/wx/include/wx/collpane.h
index b83ff2974..483d33b26 100644
--- a/Source/3rd Party/wx/include/wx/collpane.h
+++ b/Source/3rd Party/wx/include/wx/collpane.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -18,8 +19,6 @@
#include "wx/control.h"
-// class name
-extern WXDLLIMPEXP_DATA_CORE(const char) wxCollapsiblePaneNameStr[];
// ----------------------------------------------------------------------------
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
@@ -50,16 +49,16 @@ public:
// event types and macros
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_FWD_CORE wxCollapsiblePaneEvent;
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent );
+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_COLLAPSIBLEPANE_CHANGED, id),
+ : wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id),
m_bCollapsed(collapsed)
{
SetEventObject(generator);
@@ -85,13 +84,13 @@ private:
typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&);
#define wxCollapsiblePaneEventHandler(func) \
- wxEVENT_HANDLER_CAST(wxCollapsiblePaneEventFunction, func)
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COLLAPSIBLEPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
+ wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
-#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/collpane.h"
#else
#include "wx/generic/collpaneg.h"
@@ -100,9 +99,6 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv
#define wxCollapsiblePane wxGenericCollapsiblePane
#endif
-// old wxEVT_COMMAND_* constant
-#define wxEVT_COMMAND_COLLPANE_CHANGED wxEVT_COLLAPSIBLEPANE_CHANGED
-
#endif // wxUSE_COLLPANE
#endif // _WX_COLLAPSABLE_PANE_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/colordlg.h b/Source/3rd Party/wx/include/wx/colordlg.h
index ab5b645b4..f17192078 100644
--- a/Source/3rd Party/wx/include/wx/colordlg.h
+++ b/Source/3rd Party/wx/include/wx/colordlg.h
@@ -1,9 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/colordlg.h
+// 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
/////////////////////////////////////////////////////////////////////////////
@@ -15,14 +16,14 @@
#if wxUSE_COLOURDLG
-#include "wx/colourdata.h"
-
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/colordlg.h"
#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
- #include "wx/osx/colordlg.h"
+ #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"
@@ -30,10 +31,9 @@
#endif
// get the colour from user and return it
-WXDLLIMPEXP_CORE wxColour wxGetColourFromUser(wxWindow *parent = NULL,
- const wxColour& colInit = wxNullColour,
- const wxString& caption = wxEmptyString,
- wxColourData *data = NULL);
+wxColour WXDLLEXPORT
+wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
+ const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
#endif // wxUSE_COLOURDLG
diff --git a/Source/3rd Party/wx/include/wx/colour.h b/Source/3rd Party/wx/include/wx/colour.h
index 13878927a..66c45e772 100644
--- a/Source/3rd Party/wx/include/wx/colour.h
+++ b/Source/3rd Party/wx/include/wx/colour.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -14,46 +15,38 @@
#include "wx/defs.h"
#include "wx/gdiobj.h"
+
class WXDLLIMPEXP_FWD_CORE wxColour;
-// A macro to define the standard wxColour constructors:
-//
-// It avoids the need to repeat these lines across all colour.h files, since
-// Set() is a virtual function and thus cannot be called by wxColourBase ctors
+// 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() { Init(); } \
- wxColour(ChannelType red, \
- ChannelType green, \
- ChannelType blue, \
- ChannelType alpha = wxALPHA_OPAQUE) \
- { Init(); Set(red, green, blue, alpha); } \
- wxColour(unsigned long colRGB) { Init(); Set(colRGB ); } \
- wxColour(const wxString& colourName) { Init(); Set(colourName); } \
- wxColour(const char *colourName) { Init(); Set(colourName); } \
- wxColour(const wchar_t *colourName) { Init(); Set(colourName); }
+ 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)
-enum {
- wxC2S_NAME = 1, // return colour name, when possible
- wxC2S_CSS_SYNTAX = 2, // return colour in rgb(r,g,b) syntax
- wxC2S_HTML_SYNTAX = 4 // return colour in #rrggbb syntax
-};
+#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;
-// a valid but fully transparent colour
-#define wxTransparentColour wxColour(0, 0, 0, wxALPHA_TRANSPARENT)
-#define wxTransparentColor wxTransparentColour
-
// ----------------------------------------------------------------------------
// wxVariant support
// ----------------------------------------------------------------------------
#if wxUSE_VARIANT
#include "wx/variant.h"
-DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLIMPEXP_CORE)
+DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
#endif
//-----------------------------------------------------------------------------
@@ -61,22 +54,7 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLIMPEXP_CORE)
// code redundancy in all native wxColour implementations
//-----------------------------------------------------------------------------
-/* Transition from wxGDIObject to wxObject is incomplete. If your port does
- not need the wxGDIObject machinery to handle colors, please add it to the
- list of ports which do not need it.
- */
-#if defined( __WXMAC__ ) || defined( __WXMSW__ ) || defined( __WXPM__ ) || defined( __WXCOCOA__ )
-#define wxCOLOUR_IS_GDIOBJECT 0
-#else
-#define wxCOLOUR_IS_GDIOBJECT 1
-#endif
-
-class WXDLLIMPEXP_CORE wxColourBase : public
-#if wxCOLOUR_IS_GDIOBJECT
- wxGDIObject
-#else
- wxObject
-#endif
+class WXDLLEXPORT wxColourBase : public wxGDIObject
{
public:
// type of a single colour component
@@ -93,9 +71,12 @@ public:
ChannelType green,
ChannelType blue,
ChannelType alpha = wxALPHA_OPAQUE)
- { InitRGBA(red, green, blue, alpha); }
+ { 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); }
@@ -113,6 +94,9 @@ public:
// 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;
@@ -122,98 +106,28 @@ public:
// implemented in colourcmn.cpp
virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
- void SetRGB(wxUint32 colRGB)
- {
- Set((ChannelType)(0xFF & colRGB),
- (ChannelType)(0xFF & (colRGB >> 8)),
- (ChannelType)(0xFF & (colRGB >> 16)));
- }
- void SetRGBA(wxUint32 colRGBA)
- {
- Set((ChannelType)(0xFF & colRGBA),
- (ChannelType)(0xFF & (colRGBA >> 8)),
- (ChannelType)(0xFF & (colRGBA >> 16)),
- (ChannelType)(0xFF & (colRGBA >> 24)));
- }
-
- wxUint32 GetRGB() const
- { return Red() | (Green() << 8) | (Blue() << 16); }
-
- wxUint32 GetRGBA() const
- { return Red() | (Green() << 8) | (Blue() << 16) | (Alpha() << 24); }
-
-#if !wxCOLOUR_IS_GDIOBJECT
- virtual bool IsOk() const= 0;
-
- // older version, for backwards compatibility only (but not deprecated
- // because it's still widely used)
- bool Ok() const { return IsOk(); }
-#endif
-
- // manipulation
- // ------------
-
- // These methods are static because they are mostly used
- // within tight loops (where we don't want to instantiate wxColour's)
-
- static void MakeMono (unsigned char* r, unsigned char* g, unsigned char* b, bool on);
- static void MakeDisabled(unsigned char* r, unsigned char* g, unsigned char* b, unsigned char brightness = 255);
- static void MakeGrey (unsigned char* r, unsigned char* g, unsigned char* b); // integer version
- static void MakeGrey (unsigned char* r, unsigned char* g, unsigned char* b,
- double weight_r, double weight_g, double weight_b); // floating point version
- static unsigned char AlphaBlend (unsigned char fg, unsigned char bg, double alpha);
- static void ChangeLightness(unsigned char* r, unsigned char* g, unsigned char* b, int ialpha);
-
- wxColour ChangeLightness(int ialpha) const;
- wxColour& MakeDisabled(unsigned char brightness = 255);
// old, deprecated
// ---------------
#if WXWIN_COMPATIBILITY_2_6
- static wxDEPRECATED( wxColour CreateByName(const wxString& name) );
+ wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
wxDEPRECATED( void InitFromName(const wxString& col) );
#endif
protected:
- // Some ports need Init() and while we don't, provide a stub so that the
- // ports which don't need it are not forced to define it
- void Init() { }
-
virtual void
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
- virtual bool FromString(const wxString& s);
-
-#if wxCOLOUR_IS_GDIOBJECT
- // wxColour doesn't use reference counted data (at least not in all ports)
- // so provide stubs for the functions which need to be defined if we do use
- // them
- virtual wxGDIRefData *CreateGDIRefData() const
- {
- wxFAIL_MSG( "must be overridden if used" );
-
- return NULL;
- }
-
- virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const
- {
- wxFAIL_MSG( "must be overridden if used" );
-
- return NULL;
- }
-#endif
+ virtual bool FromString(const wxChar *s);
};
-// wxColour <-> wxString utilities, used by wxConfig, defined in colourcmn.cpp
-WXDLLIMPEXP_CORE wxString wxToString(const wxColourBase& col);
-WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
-
-
-#if defined(__WXMSW__)
+#if defined(__WXPALMOS__)
+ #include "wx/generic/colour.h"
+#elif defined(__WXMSW__)
#include "wx/msw/colour.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/colour.h"
@@ -221,12 +135,14 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
#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/osx/colour.h"
+ #include "wx/mac/colour.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/colour.h"
#elif defined(__WXPM__)
diff --git a/Source/3rd Party/wx/include/wx/colourdata.h b/Source/3rd Party/wx/include/wx/colourdata.h
deleted file mode 100644
index 5a755ae07..000000000
--- a/Source/3rd Party/wx/include/wx/colourdata.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/colourdata.h
-// Author: Julian Smart
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COLOURDATA_H_
-#define _WX_COLOURDATA_H_
-
-#include "wx/colour.h"
-
-class WXDLLIMPEXP_CORE wxColourData : public wxObject
-{
-public:
- // number of custom colours we store
- enum
- {
- NUM_CUSTOM = 16
- };
-
- wxColourData();
- wxColourData(const wxColourData& data);
- wxColourData& operator=(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; }
-
- // SetCustomColour() modifies colours in an internal array of NUM_CUSTOM
- // custom colours;
- void SetCustomColour(int i, const wxColour& colour);
- wxColour GetCustomColour(int i) const;
-
- // Serialize the object to a string and restore it from it
- wxString ToString() const;
- bool FromString(const wxString& str);
-
-
- // public for backwards compatibility only: don't use directly
- wxColour m_dataColour;
- wxColour m_custColours[NUM_CUSTOM];
- bool m_chooseFull;
-
- DECLARE_DYNAMIC_CLASS(wxColourData)
-};
-
-#endif // _WX_COLOURDATA_H_
diff --git a/Source/3rd Party/wx/include/wx/combo.h b/Source/3rd Party/wx/include/wx/combo.h
index 5b3d5868b..2e5593d72 100644
--- a/Source/3rd Party/wx/include/wx/combo.h
+++ b/Source/3rd Party/wx/include/wx/combo.h
@@ -4,6 +4,7 @@
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
+// RCS-ID: $Id: combo.h 64412 2010-05-27 15:11:58Z JMS $
// Copyright: (c) Jaakko Salli
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -44,7 +45,6 @@
#include "wx/control.h"
#include "wx/renderer.h" // this is needed for wxCONTROL_XXX flags
#include "wx/bitmap.h" // wxBitmap used by-value
-#include "wx/textentry.h"
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
class WXDLLIMPEXP_FWD_CORE wxComboPopup;
@@ -86,8 +86,8 @@ enum
wxCC_IFLAG_CREATED = 0x0100,
// Internal use: really put button outside
wxCC_IFLAG_BUTTON_OUTSIDE = 0x0200,
- // Internal use: SetMargins has been successfully called
- wxCC_IFLAG_LEFT_MARGIN_SET = 0x0400,
+ // 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).
@@ -119,8 +119,7 @@ struct wxComboCtrlFeatures
BitmapButton = 0x0002, // Button may be replaced with bitmap
ButtonSpacing = 0x0004, // Button can have spacing from the edge
// of the control
- TextIndent = 0x0008, // SetMargins can be used to control
- // left margin.
+ 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
@@ -139,14 +138,12 @@ struct wxComboCtrlFeatures
};
-class WXDLLIMPEXP_CORE wxComboCtrlBase : public wxControl,
- public wxTextEntry
+class WXDLLEXPORT wxComboCtrlBase : public wxControl
{
friend class wxComboPopup;
- friend class wxComboPopupEvtHandler;
public:
// ctors and such
- wxComboCtrlBase() : wxControl(), wxTextEntry() { Init(); }
+ wxComboCtrlBase() : wxControl() { Init(); }
bool Create(wxWindow *parent,
wxWindowID id,
@@ -159,19 +156,9 @@ public:
virtual ~wxComboCtrlBase();
- // Show/hide popup window (wxComboBox-compatible methods)
- virtual void Popup();
- virtual void Dismiss()
- {
- HidePopup(true);
- }
-
- // Show/hide popup window.
- // TODO: Maybe deprecate in favor of Popup()/Dismiss().
- // However, these functions are still called internally
- // so it is not straightforward.
+ // show/hide popup window
virtual void ShowPopup();
- virtual void HidePopup(bool generateEvent=false);
+ virtual void HidePopup();
// Override for totally custom combo action
virtual void OnButtonClick();
@@ -207,56 +194,26 @@ public:
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
- //
- // wxTextEntry methods
- //
- // NB: We basically need to override all of them because there is
- // no guarantee how platform-specific wxTextEntry is implemented.
- //
- virtual void SetValue(const wxString& value)
- { wxTextEntryBase::SetValue(value); }
- virtual void ChangeValue(const wxString& value)
- { wxTextEntryBase::ChangeValue(value); }
-
- virtual void WriteText(const wxString& text);
- virtual void AppendText(const wxString& text)
- { wxTextEntryBase::AppendText(text); }
-
- virtual wxString GetValue() const
- { return wxTextEntryBase::GetValue(); }
-
- virtual wxString GetRange(long from, long to) const
- { return wxTextEntryBase::GetRange(from, to); }
-
- // Replace() and DoSetValue() need to be fully re-implemented since
- // EventSuppressor utility class does not work with the way
- // wxComboCtrl is implemented.
- virtual void Replace(long from, long to, const wxString& value);
-
- virtual void Remove(long from, long to);
-
+ // 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 Undo();
- virtual void Redo();
- virtual bool CanUndo() const;
- virtual bool CanRedo() const;
-
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 GetSelection(long *from, long *to) const;
-
- virtual bool IsEditable() const;
- virtual void SetEditable(bool editable);
-
- virtual bool SetHint(const wxString& hint);
- virtual wxString GetHint() const;
+ virtual void Undo();
// This method sets the text without affecting list selection
// (ie. wxComboPopup::SetStringValue doesn't get called).
@@ -264,13 +221,7 @@ public:
// This method sets value and also optionally sends EVT_TEXT
// (needed by combo popups)
- wxDEPRECATED( void SetValueWithEvent(const wxString& value,
- bool withEvent = true) );
-
- // Changes value of the control as if user had done it by selecting an
- // item from a combo box drop-down list. Needs to be public so that
- // derived popup classes can call it.
- void SetValueByUser(const wxString& value);
+ void SetValueWithEvent(const wxString& value, bool withEvent = true);
//
// Popup customization methods
@@ -352,18 +303,19 @@ public:
const wxBitmap& bmpHover = wxNullBitmap,
const wxBitmap& bmpDisabled = wxNullBitmap );
-#if WXWIN_COMPATIBILITY_2_8
//
// 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.
- wxDEPRECATED( void SetTextIndent( int indent ) );
+ void SetTextIndent( int indent );
// Returns actual indentation in pixels.
- wxDEPRECATED( wxCoord GetTextIndent() const );
-#endif
+ wxCoord GetTextIndent() const
+ {
+ return m_absIndent;
+ }
// Returns area covered by the text field.
const wxRect& GetTextRect() const
@@ -434,21 +386,14 @@ public:
const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
- // Set custom style flags for embedded wxTextCtrl. Usually must be used
- // with two-step creation, before Create() call.
- void SetTextCtrlStyle( int style );
-
// 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; }
- // Need to override to return text area background colour
- wxColour GetBackgroundColour() const;
-
// common code to be called on popup hide/dismiss
- void OnPopupDismiss(bool generateEvent);
+ void OnPopupDismiss();
// PopupShown states
enum
@@ -466,26 +411,8 @@ public:
// Set value returned by GetMainWindowOfCompositeControl
void SetCtrlMainWnd( wxWindow* wnd ) { m_mainCtrlWnd = wnd; }
- // This is public so we can access it from wxComboCtrlTextCtrl
- virtual wxWindow *GetMainWindowOfCompositeControl()
- { return m_mainCtrlWnd; }
-
- // also set the embedded wxTextCtrl colours
- virtual bool SetForegroundColour(const wxColour& colour);
- virtual bool SetBackgroundColour(const wxColour& colour);
-
protected:
- // Returns true if hint text should be drawn in the control
- bool ShouldUseHintText(int flags = 0) const
- {
- return ( !m_text &&
- !(flags & wxCONTROL_ISSUBMENU) &&
- !m_valueString.length() &&
- m_hintText.length() &&
- !ShouldDrawFocus() );
- }
-
//
// Override these for customization purposes
//
@@ -493,8 +420,7 @@ protected:
// called from wxSizeEvent handler
virtual void OnResize() = 0;
- // Return native text identation
- // (i.e. text margin, for pure text, not textctrl)
+ // Return native text identation (for pure text, not textctrl)
virtual wxCoord GetNativeTextIndent() const;
// Called in syscolourchanged handler and base create
@@ -502,25 +428,20 @@ protected:
// Creates wxTextCtrl.
// extraStyle: Extra style parameters
- void CreateTextCtrl( int extraStyle );
-
- // Called when text was changed programmatically
- // (e.g. from WriteText())
- void OnSetValue(const wxString& value);
+ void CreateTextCtrl( int extraStyle, const wxValidator& validator );
// Installs standard input handler to combo (and optionally to the textctrl)
void InstallInputHandlers();
- // Flags for DrawButton
+ // flags for DrawButton()
enum
{
- Button_PaintBackground = 0x0001, // Paints control background below the button
- Button_BitmapOnly = 0x0002 // Only paints the bitmap
+ Draw_PaintBg = 1,
+ Draw_BitmapOnly = 2
};
// Draws dropbutton. Using wxRenderer or bitmaps, as appropriate.
- // Flags are defined above.
- virtual void DrawButton( wxDC& dc, const wxRect& rect, int flags = Button_PaintBackground );
+ 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 );
@@ -544,10 +465,7 @@ protected:
void DestroyPopup();
// override the base class virtuals involved in geometry calculations
- // The common version only sets a default width, so the derived classes
- // should override it and set the height and change the width as needed.
virtual wxSize DoGetBestSize() const;
- virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
// NULL popup can be used to indicate default in a derived class
virtual void DoSetPopupControl(wxComboPopup* popup);
@@ -560,10 +478,9 @@ protected:
// just recalculate.
void CalculateAreas( int btnWidth = 0 );
- // Standard textctrl positioning routine. Just give it platform-dependent
+ // Standard textctrl positioning routine. Just give it platform-dependant
// textctrl coordinate adjustment.
- virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
- int textCtrlYAdjust = 0);
+ void PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust );
// event handlers
void OnSizeEvent( wxSizeEvent& event );
@@ -572,7 +489,6 @@ protected:
void OnTextCtrlEvent(wxCommandEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void OnKeyEvent(wxKeyEvent& event);
- void OnCharEvent(wxKeyEvent& event);
// Set customization flags (directs how wxComboCtrlBase helpers behave)
void Customize( wxUint32 flags ) { m_iFlags |= flags; }
@@ -601,21 +517,12 @@ protected:
virtual void DoSetToolTip( wxToolTip *tip );
#endif
- // protected wxTextEntry methods
- virtual void DoSetValue(const wxString& value, int flags);
- virtual wxString DoGetValue() const;
- virtual wxWindow *GetEditableWindow() { return this; }
-
- // margins functions
- virtual bool DoSetMargins(const wxPoint& pt);
- virtual wxPoint DoGetMargins() const;
+ virtual wxWindow *GetMainWindowOfCompositeControl()
+ { return m_mainCtrlWnd; }
// This is used when m_text is hidden (readonly).
wxString m_valueString;
- // This is used when control is unfocused and m_valueString is empty
- wxString m_hintText;
-
// the text control and button we show all the time
wxTextCtrl* m_text;
wxWindow* m_btn;
@@ -636,7 +543,7 @@ protected:
wxEvtHandler* m_toplevEvtHandler;
// this is for the control in popup
- wxEvtHandler* m_popupEvtHandler;
+ wxEvtHandler* m_popupExtraHandler;
// this is for the popup window
wxEvtHandler* m_popupWinEvtHandler;
@@ -644,7 +551,7 @@ protected:
// main (ie. topmost) window of a composite control (default = this)
wxWindow* m_mainCtrlWnd;
- // used to prevent immediate re-popupping in case closed popup
+ // 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;
@@ -664,8 +571,8 @@ protected:
// selection indicator.
wxCoord m_widthCustomPaint;
- // left margin, in pixels
- wxCoord m_marginLeft;
+ // absolute text indentation, in pixels
+ wxCoord m_absIndent;
// side on which the popup is aligned
int m_anchorSide;
@@ -677,9 +584,6 @@ protected:
wxRect m_tcArea;
wxRect m_btnArea;
- // Colour of the text area, in case m_text is NULL
- wxColour m_tcBgCol;
-
// current button state (uses renderer flags)
int m_btnState;
@@ -701,12 +605,9 @@ protected:
// area used by the button
wxSize m_btnSize;
- // platform-dependent customization and other flags
+ // platform-dependant customization and other flags
wxUint32 m_iFlags;
- // custom style for m_text
- int m_textCtrlStyle;
-
// draw blank button background under bitmap?
bool m_blankButtonBg;
@@ -715,10 +616,7 @@ protected:
// should the focus be reset to the textctrl in idle time?
bool m_resetFocus;
-
- // is the text-area background colour overridden?
- bool m_hasTcBgCol;
-
+
private:
void Init();
@@ -745,16 +643,14 @@ enum
wxCP_IFLAG_CREATED = 0x0001 // Set by wxComboCtrlBase after Create is called
};
-class WXDLLIMPEXP_FWD_CORE wxComboCtrl;
-
-class WXDLLIMPEXP_CORE wxComboPopup
+class WXDLLEXPORT wxComboPopup
{
friend class wxComboCtrlBase;
public:
wxComboPopup()
{
- m_combo = NULL;
+ m_combo = (wxComboCtrlBase*) NULL;
m_iFlags = 0;
}
@@ -770,13 +666,6 @@ public:
// Return true for success.
virtual bool Create(wxWindow* parent) = 0;
- // Calls Destroy() for the popup control (i.e. one returned by
- // GetControl()) and makes sure that 'this' is deleted at the end.
- // Default implementation works for both cases where popup control
- // class is multiple inherited or created on heap as a separate
- // object.
- virtual void DestroyPopup();
-
// We must have an associated control which is subclassed by the combobox.
virtual wxWindow *GetControl() = 0;
@@ -793,25 +682,14 @@ public:
// Gets displayed string representation of the value.
virtual wxString GetStringValue() const = 0;
- // Called to check if the popup - when an item container - actually
- // has matching item. Case-sensitivity checking etc. is up to the
- // implementation. If the found item matched the string, but is
- // different, it should be written back to pItem. Default implementation
- // always return true and does not alter trueItem.
- virtual bool FindItem(const wxString& item, wxString* trueItem=NULL);
-
// 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 wxEVT_KEY_DOWN key events from the parent wxComboCtrl.
+ // Receives key events from the parent wxComboCtrl.
// Events not handled should be skipped, as usual.
virtual void OnComboKeyEvent( wxKeyEvent& event );
- // Receives wxEVT_CHAR key events from the parent wxComboCtrl.
- // Events not handled should be skipped, as usual.
- virtual void OnComboCharEvent( wxKeyEvent& event );
-
// Implement if you need to support special action when user
// double-clicks on the parent wxComboCtrl.
virtual void OnComboDoubleClick();
@@ -842,9 +720,6 @@ public:
return (m_iFlags & wxCP_IFLAG_CREATED) ? true : false;
}
- // Returns pointer to the associated parent wxComboCtrl.
- wxComboCtrl* GetComboCtrl() const;
-
// Default PaintComboControl behaviour
static void DefaultPaintComboControl( wxComboCtrlBase* combo,
wxDC& dc,
diff --git a/Source/3rd Party/wx/include/wx/combobox.h b/Source/3rd Party/wx/include/wx/combobox.h
index fe51743fd..af84fb668 100644
--- a/Source/3rd Party/wx/include/wx/combobox.h
+++ b/Source/3rd Party/wx/include/wx/combobox.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -15,54 +16,57 @@
#if wxUSE_COMBOBOX
-// For compatibility with 2.8 include this header to allow using wxTE_XXX
-// styles with wxComboBox without explicitly including it in the user code.
-#include "wx/textctrl.h"
-
-extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[];
+extern WXDLLEXPORT_DATA(const wxChar) wxComboBoxNameStr[];
// ----------------------------------------------------------------------------
// wxComboBoxBase: this interface defines the methods wxComboBox must implement
// ----------------------------------------------------------------------------
+#include "wx/textctrl.h"
#include "wx/ctrlsub.h"
-#include "wx/textentry.h"
-class WXDLLIMPEXP_CORE wxComboBoxBase : public wxItemContainer,
- public wxTextEntry
+class WXDLLEXPORT wxComboBoxBase : public wxItemContainer
{
public:
- // override these methods to disambiguate between two base classes versions
- virtual void Clear()
- {
- wxTextEntry::Clear();
- wxItemContainer::Clear();
- }
+ // wxTextCtrl-like methods wxComboBox must implement
+ virtual wxString GetValue() const = 0;
+ virtual void SetValue(const wxString& value) = 0;
- // IsEmpty() is ambiguous because we inherit it from both wxItemContainer
- // and wxTextEntry, and even if defined it here to help the compiler with
- // choosing one of them, it would still be confusing for the human users of
- // this class. So instead define the clearly named methods below and leave
- // IsEmpty() ambiguous to trigger a compilation error if it's used.
- bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
- bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
+ 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;
- // also bring in GetSelection() versions of both base classes in scope
- //
- // NB: GetSelection(from, to) could be already implemented in wxTextEntry
- // but still make it pure virtual because for some platforms it's not
- // implemented there and also because the derived class has to override
- // it anyhow to avoid ambiguity with the other GetSelection()
- virtual int GetSelection() const = 0;
- virtual void GetSelection(long *from, long *to) const = 0;
+ virtual void SetInsertionPointEnd()
+ { SetInsertionPoint(GetLastPosition()); }
+ virtual void Remove(long from, long to)
+ { Replace(from, to, wxEmptyString); }
- virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); }
- virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); }
+ 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;
};
// ----------------------------------------------------------------------------
@@ -80,7 +84,7 @@ public:
#elif defined(__WXGTK__)
#include "wx/gtk1/combobox.h"
#elif defined(__WXMAC__)
- #include "wx/osx/combobox.h"
+ #include "wx/mac/combobox.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/combobox.h"
#elif defined(__WXPM__)
@@ -89,4 +93,5 @@ public:
#endif // wxUSE_COMBOBOX
-#endif // _WX_COMBOBOX_H_BASE_
+#endif
+ // _WX_COMBOBOX_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/commandlinkbutton.h b/Source/3rd Party/wx/include/wx/commandlinkbutton.h
deleted file mode 100644
index 0aaa0ec65..000000000
--- a/Source/3rd Party/wx/include/wx/commandlinkbutton.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/commandlinkbutton.h
-// Purpose: wxCommandLinkButtonBase and wxGenericCommandLinkButton classes
-// Author: Rickard Westerlund
-// Created: 2010-06-11
-// Copyright: (c) 2010 wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COMMANDLINKBUTTON_H_
-#define _WX_COMMANDLINKBUTTON_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_COMMANDLINKBUTTON
-
-#include "wx/button.h"
-
-// ----------------------------------------------------------------------------
-// Command link button common base class
-// ----------------------------------------------------------------------------
-
-// This class has separate "main label" (title-like string) and (possibly
-// multiline) "note" which can be set and queried separately but can also be
-// set both at once by joining them with a new line and setting them as a
-// label and queried by breaking the label into the parts before the first new
-// line and after it.
-
-class WXDLLIMPEXP_ADV wxCommandLinkButtonBase : public wxButton
-{
-public:
- wxCommandLinkButtonBase() : wxButton() { }
-
- wxCommandLinkButtonBase(wxWindow *parent,
- wxWindowID id,
- const wxString& mainLabel = wxEmptyString,
- const wxString& note = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator =
- wxDefaultValidator,
- const wxString& name = wxButtonNameStr)
- : wxButton(parent,
- id,
- mainLabel + '\n' + note,
- pos,
- size,
- style,
- validator,
- name)
- { }
-
- virtual void SetMainLabelAndNote(const wxString& mainLabel,
- const wxString& note) = 0;
-
- virtual void SetMainLabel(const wxString& mainLabel)
- {
- SetMainLabelAndNote(mainLabel, GetNote());
- }
-
- virtual void SetNote(const wxString& note)
- {
- SetMainLabelAndNote(GetMainLabel(), note);
- }
-
- virtual wxString GetMainLabel() const
- {
- return GetLabel().BeforeFirst('\n');
- }
-
- virtual wxString GetNote() const
- {
- return GetLabel().AfterFirst('\n');
- }
-
-protected:
- virtual bool HasNativeBitmap() const { return false; }
-
-private:
- wxDECLARE_NO_COPY_CLASS(wxCommandLinkButtonBase);
-};
-
-// ----------------------------------------------------------------------------
-// Generic command link button
-// ----------------------------------------------------------------------------
-
-// Trivial generic implementation simply using a multiline label to show both
-// the main label and the note.
-
-class WXDLLIMPEXP_ADV wxGenericCommandLinkButton
- : public wxCommandLinkButtonBase
-{
-public:
- wxGenericCommandLinkButton() : wxCommandLinkButtonBase() { }
-
-
- wxGenericCommandLinkButton(wxWindow *parent,
- wxWindowID id,
- const wxString& mainLabel = wxEmptyString,
- const wxString& note = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxButtonNameStr)
- : wxCommandLinkButtonBase()
- {
- Create(parent, id, mainLabel, note, pos, size, style, validator, name);
- }
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxString& mainLabel = wxEmptyString,
- const wxString& note = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxButtonNameStr);
-
- virtual void SetMainLabelAndNote(const wxString& mainLabel,
- const wxString& note)
- {
- wxButton::SetLabel(mainLabel + '\n' + note);
- }
-
-private:
- void SetDefaultBitmap();
-
- wxDECLARE_NO_COPY_CLASS(wxGenericCommandLinkButton);
-};
-
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/commandlinkbutton.h"
-#else
- class WXDLLIMPEXP_ADV wxCommandLinkButton : public wxGenericCommandLinkButton
- {
- public:
- wxCommandLinkButton() : wxGenericCommandLinkButton() { }
-
- wxCommandLinkButton(wxWindow *parent,
- wxWindowID id,
- const wxString& mainLabel = wxEmptyString,
- const wxString& note = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxButtonNameStr)
- : wxGenericCommandLinkButton(parent,
- id,
- mainLabel,
- note,
- pos,
- size,
- style,
- validator,
- name)
- { }
-
- private:
- wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton);
- };
-#endif // __WXMSW__/!__WXMSW__
-
-#endif // wxUSE_COMMANDLINKBUTTON
-
-#endif // _WX_COMMANDLINKBUTTON_H_
diff --git a/Source/3rd Party/wx/include/wx/compiler.h b/Source/3rd Party/wx/include/wx/compiler.h
deleted file mode 100644
index c6723a33b..000000000
--- a/Source/3rd Party/wx/include/wx/compiler.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Name: wx/compiler.h
- * Purpose: Compiler-specific macro definitions.
- * Author: Vadim Zeitlin
- * Created: 2013-07-13 (extracted from wx/platform.h)
- * Copyright: (c) 1997-2013 Vadim Zeitlin
- * Licence: wxWindows licence
- */
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-#ifndef _WX_COMPILER_H_
-#define _WX_COMPILER_H_
-
-/*
- Compiler detection and related helpers.
- */
-
-/*
- Notice that Intel compiler can be used as Microsoft Visual C++ add-on and
- so we should define both __INTELC__ and __VISUALC__ for it.
-*/
-#ifdef __INTEL_COMPILER
-# define __INTELC__
-#endif
-
-#if defined(_MSC_VER)
- /*
- define another standard symbol for Microsoft Visual C++: the standard
- one (_MSC_VER) is also defined by some other compilers.
- */
-# define __VISUALC__ _MSC_VER
-
- /*
- define special symbols for different VC version instead of writing tests
- for magic numbers such as 1200, 1300 &c repeatedly
- */
-#if __VISUALC__ < 1100
-# error "This Visual C++ version is too old and not supported any longer."
-#elif __VISUALC__ < 1200
-# define __VISUALC5__
-#elif __VISUALC__ < 1300
-# define __VISUALC6__
-#elif __VISUALC__ < 1400
-# define __VISUALC7__
-#elif __VISUALC__ < 1500
-# define __VISUALC8__
-#elif __VISUALC__ < 1600
-# define __VISUALC9__
-#elif __VISUALC__ < 1700
-# define __VISUALC10__
-#elif __VISUALC__ < 1800
-# define __VISUALC11__
-#elif __VISUALC__ < 1900
-# define __VISUALC12__
-#elif __VISUAL__C < 2000
-# define __VISUALC14__
-#else
-# pragma message("Please update wx/compiler.h to recognize this VC++ version")
-#endif
-
-#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
-# define __BORLANDC__
-#elif defined(__WATCOMC__)
-#elif defined(__SC__)
-# define __SYMANTECC__
-#elif defined(__SUNPRO_CC)
-# ifndef __SUNCC__
-# define __SUNCC__ __SUNPRO_CC
-# endif /* Sun CC */
-#elif defined(__SC__)
-# ifdef __DMC__
-# define __DIGITALMARS__
-# else
-# define __SYMANTEC__
-# endif
-#endif /* compiler */
-
-/*
- Macros for checking compiler version.
-*/
-
-/*
- This macro can be used to test the gcc version and can be used like this:
-
-# if wxCHECK_GCC_VERSION(3, 1)
- ... we have gcc 3.1 or later ...
-# else
- ... no gcc at all or gcc < 3.1 ...
-# endif
-*/
-#if defined(__GNUC__) && defined(__GNUC_MINOR__)
- #define wxCHECK_GCC_VERSION( major, minor ) \
- ( ( __GNUC__ > (major) ) \
- || ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) )
-#else
- #define wxCHECK_GCC_VERSION( major, minor ) 0
-#endif
-
-/*
- This macro can be used to test the Visual C++ version.
-*/
-#ifndef __VISUALC__
-# define wxVISUALC_VERSION(major) 0
-# define wxCHECK_VISUALC_VERSION(major) 0
-#else
-# define wxVISUALC_VERSION(major) ( (6 + major) * 100 )
-# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) )
-#endif
-
-/**
- This is similar to wxCHECK_GCC_VERSION but for Sun CC compiler.
- */
-#ifdef __SUNCC__
- /*
- __SUNCC__ is 0xVRP where V is major version, R release and P patch level
- */
- #define wxCHECK_SUNCC_VERSION(maj, min) (__SUNCC__ >= (((maj)<<8) | ((min)<<4)))
-#else
- #define wxCHECK_SUNCC_VERSION(maj, min) (0)
-#endif
-
-#ifndef __WATCOMC__
-# define wxWATCOM_VERSION(major,minor) 0
-# define wxCHECK_WATCOM_VERSION(major,minor) 0
-# define wxONLY_WATCOM_EARLIER_THAN(major,minor) 0
-# define WX_WATCOM_ONLY_CODE( x )
-#else
-# if __WATCOMC__ < 1200
-# error "Only Open Watcom is supported in this release"
-# endif
-
-# define wxWATCOM_VERSION(major,minor) ( major * 100 + minor * 10 + 1100 )
-# define wxCHECK_WATCOM_VERSION(major,minor) ( __WATCOMC__ >= wxWATCOM_VERSION(major,minor) )
-# define wxONLY_WATCOM_EARLIER_THAN(major,minor) ( __WATCOMC__ < wxWATCOM_VERSION(major,minor) )
-# define WX_WATCOM_ONLY_CODE( x ) x
-#endif
-
-/*
- wxCHECK_MINGW32_VERSION() is defined in wx/msw/gccpriv.h which is included
- later, see comments there.
- */
-
-#endif // _WX_COMPILER_H_
diff --git a/Source/3rd Party/wx/include/wx/compositewin.h b/Source/3rd Party/wx/include/wx/compositewin.h
deleted file mode 100644
index a46c25770..000000000
--- a/Source/3rd Party/wx/include/wx/compositewin.h
+++ /dev/null
@@ -1,229 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/compositewin.h
-// Purpose: wxCompositeWindow<> declaration
-// Author: Vadim Zeitlin
-// Created: 2011-01-02
-// Copyright: (c) 2011 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COMPOSITEWIN_H_
-#define _WX_COMPOSITEWIN_H_
-
-#include "wx/window.h"
-#include "wx/containr.h"
-
-class WXDLLIMPEXP_FWD_CORE wxToolTip;
-
-// NB: This is an experimental and, as for now, undocumented class used only by
-// wxWidgets itself internally. Don't use it in your code until its API is
-// officially stabilized unless you are ready to change it with the next
-// wxWidgets release.
-
-// ----------------------------------------------------------------------------
-// wxCompositeWindow is a helper for implementing composite windows: to define
-// a class using subwindows, simply inherit from it specialized with the real
-// base class name and implement GetCompositeWindowParts() pure virtual method.
-// ----------------------------------------------------------------------------
-
-// The template parameter W must be a wxWindow-derived class.
-template
-class wxCompositeWindow : public W
-{
-public:
- typedef W BaseWindowClass;
-
- // Default ctor doesn't do anything.
- wxCompositeWindow()
- {
- this->Connect
- (
- wxEVT_CREATE,
- wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate)
- );
-
- }
-
-#ifndef __VISUALC6__
- // FIXME-VC6: This compiler can't compile DoSetForAllParts() template function,
- // it can't determine whether the deduced type should be "T" or "const T&". And
- // without this function wxCompositeWindow is pretty useless so simply disable
- // this code for it, this does mean that setting colours/fonts/... for
- // composite controls won't work in the library compiled with it but so far
- // this only affects the generic wxDatePickerCtrl which is not used by default
- // under MSW anyhow so it doesn't seem to be worth it to spend time and uglify
- // the code to fix it.
-
- // Override all wxWindow methods which must be forwarded to the composite
- // window parts.
-
- // Attribute setters group.
- //
- // NB: Unfortunately we can't factor out the call for the setter itself
- // into DoSetForAllParts() because we can't call the function passed to
- // it non-virtually and we need to do this to avoid infinite recursion,
- // so we work around this by calling the method of this object itself
- // manually in each function.
- virtual bool SetForegroundColour(const wxColour& colour)
- {
- if ( !BaseWindowClass::SetForegroundColour(colour) )
- return false;
-
- SetForAllParts(&wxWindowBase::SetForegroundColour, colour);
-
- return true;
- }
-
- virtual bool SetBackgroundColour(const wxColour& colour)
- {
- if ( !BaseWindowClass::SetBackgroundColour(colour) )
- return false;
-
- SetForAllParts(&wxWindowBase::SetBackgroundColour, colour);
-
- return true;
- }
-
- virtual bool SetFont(const wxFont& font)
- {
- if ( !BaseWindowClass::SetFont(font) )
- return false;
-
- SetForAllParts(&wxWindowBase::SetFont, font);
-
- return true;
- }
-
- virtual bool SetCursor(const wxCursor& cursor)
- {
- if ( !BaseWindowClass::SetCursor(cursor) )
- return false;
-
- SetForAllParts(&wxWindowBase::SetCursor, cursor);
-
- return true;
- }
-
-#if wxUSE_TOOLTIPS
- virtual void DoSetToolTip(wxToolTip *tip)
- {
- BaseWindowClass::DoSetToolTip(tip);
-
- SetForAllParts(&wxWindowBase::CopyToolTip, tip);
- }
-#endif // wxUSE_TOOLTIPS
-
-#endif // !__VISUALC6__
-
- virtual void SetFocus()
- {
- wxSetFocusToChild(this, NULL);
- }
-
-private:
- // Must be implemented by the derived class to return all children to which
- // the public methods we override should forward to.
- virtual wxWindowList GetCompositeWindowParts() const = 0;
-
- void OnWindowCreate(wxWindowCreateEvent& event)
- {
- event.Skip();
-
- // Attach a few event handlers to all parts of the composite window.
- // This makes the composite window behave more like a simple control
- // and allows other code (such as wxDataViewCtrl's inline editing
- // support) to hook into its event processing.
-
- wxWindow *child = event.GetWindow();
- if ( child == this )
- return; // not a child, we don't want to Connect() to ourselves
-
- // Always capture wxEVT_KILL_FOCUS:
- child->Connect(wxEVT_KILL_FOCUS,
- wxFocusEventHandler(wxCompositeWindow::OnKillFocus),
- NULL, this);
-
- // Some events should be only handled for non-toplevel children. For
- // example, we want to close the control in wxDataViewCtrl when Enter
- // is pressed in the inline editor, but not when it's pressed in a
- // popup dialog it opens.
- wxWindow *win = child;
- while ( win && win != this )
- {
- if ( win->IsTopLevel() )
- return;
- win = win->GetParent();
- }
-
- child->Connect(wxEVT_CHAR,
- wxKeyEventHandler(wxCompositeWindow::OnChar),
- NULL, this);
- }
-
- void OnChar(wxKeyEvent& event)
- {
- if ( !this->ProcessWindowEvent(event) )
- event.Skip();
- }
-
- void OnKillFocus(wxFocusEvent& event)
- {
- // Ignore focus changes within the composite control:
- wxWindow *win = event.GetWindow();
- while ( win )
- {
- if ( win == this )
- {
- event.Skip();
- return;
- }
-
- // Note that we don't use IsTopLevel() check here, because we do
- // want to ignore focus changes going to toplevel window that have
- // the composite control as its parent; these would typically be
- // some kind of control's popup window.
- win = win->GetParent();
- }
-
- // The event shouldn't be ignored, forward it to the main control:
- if ( !this->ProcessWindowEvent(event) )
- event.Skip();
- }
-
-#ifndef __VISUALC6__
- template
- void SetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg)
- {
- DoSetForAllParts(func, arg);
- }
-
- template
- void SetForAllParts(bool (wxWindowBase::*func)(T*), T* arg)
- {
- DoSetForAllParts(func, arg);
- }
-
- template
- void DoSetForAllParts(bool (wxWindowBase::*func)(T), T arg)
- {
- // Simply call the setters for all parts of this composite window.
- const wxWindowList parts = GetCompositeWindowParts();
- for ( wxWindowList::const_iterator i = parts.begin();
- i != parts.end();
- ++i )
- {
- wxWindow * const child = *i;
-
- // Allow NULL elements in the list, this makes the code of derived
- // composite controls which may have optionally shown children
- // simpler and it doesn't cost us much here.
- if ( child )
- (child->*func)(arg);
- }
- }
-#endif // !__VISUALC6__
-
- wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W);
-};
-
-#endif // _WX_COMPOSITEWIN_H_
diff --git a/Source/3rd Party/wx/include/wx/confbase.h b/Source/3rd Party/wx/include/wx/confbase.h
index c7153b1c8..2e0197dce 100644
--- a/Source/3rd Party/wx/include/wx/confbase.h
+++ b/Source/3rd Party/wx/include/wx/confbase.h
@@ -1,22 +1,21 @@
///////////////////////////////////////////////////////////////////////////////
-// Name: wx/confbase.h
+// 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 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net
// Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifndef _WX_CONFBASE_H_
-#define _WX_CONFBASE_H_
+#ifndef _WX_CONFBASE_H_
+#define _WX_CONFBASE_H_
#include "wx/defs.h"
#include "wx/string.h"
-#include "wx/object.h"
-#include "wx/base64.h"
class WXDLLIMPEXP_FWD_BASE wxArrayString;
@@ -42,6 +41,8 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString;
#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))
@@ -49,15 +50,6 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString;
#define wxUSE_CONFIG_NATIVE 1
#endif
-// not all compilers can deal with template Read/Write() methods, define this
-// symbol if the template functions are available
-#if (!defined(__VISUALC__) || __VISUALC__ > 1200) && \
- !defined( __VMS ) && \
- !(defined(__HP_aCC) && defined(__hppa)) && \
- !defined (__DMC__)
- #define wxHAS_CONFIG_TEMPLATE_RW
-#endif
-
// Style flags for constructor style parameter
enum
{
@@ -72,7 +64,7 @@ enum
// abstract base class wxConfigBase which defines the interface for derived
// classes
//
-// wxConfig organizes the items in a tree-like structure (modelled after the
+// 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.
//
@@ -80,7 +72,7 @@ enum
// (long) type (TODO doubles and other types such as wxDate coming soon).
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_BASE wxConfigBase : public wxObject
+class WXDLLIMPEXP_BASE wxConfigBase
{
public:
// constants
@@ -172,7 +164,7 @@ public:
bool Read(const wxString& key, long *pl) const;
bool Read(const wxString& key, long *pl, long defVal) const;
- // read an int (wrapper around `long' version)
+ // read an int
bool Read(const wxString& key, int *pi) const;
bool Read(const wxString& key, int *pi, int defVal) const;
@@ -180,138 +172,39 @@ public:
bool Read(const wxString& key, double* val) const;
bool Read(const wxString& key, double* val, double defVal) const;
- // read a float
- bool Read(const wxString& key, float* val) const;
- bool Read(const wxString& key, float* val, float defVal) const;
-
// read a bool
bool Read(const wxString& key, bool* val) const;
bool Read(const wxString& key, bool* val, bool defVal) const;
-#if wxUSE_BASE64
- // read a binary data block
- bool Read(const wxString& key, wxMemoryBuffer* data) const
- { return DoReadBinary(key, data); }
- // no default version since it does not make sense for binary data
-#endif // wxUSE_BASE64
-
-#ifdef wxHAS_CONFIG_TEMPLATE_RW
- // read other types, for which wxFromString is defined
- template
- bool Read(const wxString& key, T* value) const
- {
- wxString s;
- if ( !Read(key, &s) )
- return false;
- return wxFromString(s, value);
- }
-
- template
- bool Read(const wxString& key, T* value, const T& defVal) const
- {
- const bool found = Read(key, value);
- if ( !found )
- {
- if (IsRecordingDefaults())
- ((wxConfigBase *)this)->Write(key, defVal);
- *value = defVal;
- }
- return found;
- }
-#endif // wxHAS_CONFIG_TEMPLATE_RW
-
- // convenience functions returning directly the value
+ // 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; }
- // we have to provide a separate version for C strings as otherwise the
- // template Read() would be used
- wxString Read(const wxString& key, const char* defVal) const
- { return Read(key, wxString(defVal)); }
- wxString Read(const wxString& key, const wchar_t* defVal) const
- { return Read(key, wxString(defVal)); }
-
- long ReadLong(const wxString& key, long defVal) const
+ long Read(const wxString& key, long defVal) const
{ long l; (void)Read(key, &l, defVal); return l; }
- double ReadDouble(const wxString& key, double defVal) const
- { double d; (void)Read(key, &d, defVal); return d; }
-
- bool ReadBool(const wxString& key, bool defVal) const
- { bool b; (void)Read(key, &b, defVal); return b; }
-
- template
- T ReadObject(const wxString& key, T const& defVal) const
- { T t; (void)Read(key, &t, defVal); return t; }
-
- // for compatibility with wx 2.8
- long Read(const wxString& key, long defVal) const
- { return ReadLong(key, defVal); }
-
-
- // write the value (return true on success)
+ // 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); }
-#if wxUSE_BASE64
- bool Write(const wxString& key, const wxMemoryBuffer& buf)
- { return DoWriteBinary(key, buf); }
-#endif // wxUSE_BASE64
-
// 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 char *value)
+ bool Write(const wxString& key, const wxChar *value)
{ return Write(key, wxString(value)); }
- bool Write(const wxString& key, const unsigned char *value)
- { return Write(key, wxString(value)); }
- bool Write(const wxString& key, const wchar_t *value)
- { return Write(key, wxString(value)); }
-
-
- // we also have to provide specializations for other types which we want to
- // handle using the specialized DoWriteXXX() instead of the generic template
- // version below
- bool Write(const wxString& key, char value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, unsigned char value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, short value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, unsigned short value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, unsigned int value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, int value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, unsigned long value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, float value)
- { return DoWriteDouble(key, value); }
-
- // Causes ambiguities in VC++ 6 and OpenVMS (at least)
-#if ( (!defined(__VISUALC__) || __VISUALC__ > 1200) && !defined( __VMS ) && !defined (__DMC__))
- // for other types, use wxToString()
- template
- bool Write(const wxString& key, T const& value)
- { return Write(key, wxToString(value)); }
-#endif
// permanently writes all changes
virtual bool Flush(bool bCurrentOnly = false) = 0;
@@ -372,19 +265,15 @@ protected:
// 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;
-#if wxUSE_BASE64
- virtual bool DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const = 0;
-#endif // wxUSE_BASE64
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);
-#if wxUSE_BASE64
- virtual bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) = 0;
-#endif // wxUSE_BASE64
private:
// are we doing automatic environment variable expansion?
@@ -402,8 +291,6 @@ private:
// Style flag
long m_style;
-
- DECLARE_ABSTRACT_CLASS(wxConfigBase)
};
// a handy little class which changes current path to the path of given entry
@@ -435,10 +322,22 @@ private:
m_strOldPath; // saved path
bool m_bChanged; // was the path changed?
- wxDECLARE_NO_COPY_CLASS(wxConfigPathChanger);
+ 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
/*
@@ -452,7 +351,9 @@ WXDLLIMPEXP_BASE wxString wxExpandEnvVars(const wxString &sz);
/*
Split path into parts removing '..' in progress
*/
-WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxString& path);
+WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
-#endif // _WX_CONFBASE_H_
+
+#endif
+ // _WX_CONFIG_H_
diff --git a/Source/3rd Party/wx/include/wx/config.h b/Source/3rd Party/wx/include/wx/config.h
index 59d6f5ba6..92d036f93 100644
--- a/Source/3rd Party/wx/include/wx/config.h
+++ b/Source/3rd Party/wx/include/wx/config.h
@@ -1,10 +1,11 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/config.h
+// Name: config.h
// Purpose: wxConfig base header
// Author: Julian Smart
// Modified by:
// Created:
// Copyright: (c) Julian Smart
+// RCS-ID: $Id: config.h 60524 2009-05-05 22:51:44Z PC $
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -15,21 +16,16 @@
#if wxUSE_CONFIG
-// ----------------------------------------------------------------------------
-// define the native wxConfigBase implementation
-// ----------------------------------------------------------------------------
-
-// under Windows we prefer to use the native implementation but can be forced
-// to use the file-based one
-#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
- #include "wx/msw/regconf.h"
- #define wxConfig wxRegConfig
-#elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE
- #include "wx/os2/iniconf.h"
- #define wxConfig wxIniConfig
-#else // either we're under Unix or wish to always use config files
- #include "wx/fileconf.h"
- #define wxConfig wxFileConfig
+#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 // wxUSE_CONFIG
diff --git a/Source/3rd Party/wx/include/wx/containr.h b/Source/3rd Party/wx/include/wx/containr.h
index a1f53ed5d..0cf322c2e 100644
--- a/Source/3rd Party/wx/include/wx/containr.h
+++ b/Source/3rd Party/wx/include/wx/containr.h
@@ -1,105 +1,62 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/containr.h
-// Purpose: wxControlContainer and wxNavigationEnabled declarations
+// 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
-// Copyright: (c) 2001, 2011 Vadim Zeitlin
+// 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_
-#include "wx/defs.h"
-
-#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
- // We need wxEVT_XXX declarations in this case.
- #include "wx/event.h"
-#endif
-
+class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
+class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
/*
- This header declares wxControlContainer class however it's not a real
- container of controls but rather just a helper used to implement TAB
- navigation among the window children. You should rarely need to use it
- directly, derive from the documented public wxNavigationEnabled<> class to
- implement TAB navigation in a custom composite window.
+ 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.
*/
// ----------------------------------------------------------------------------
-// wxControlContainerBase: common part used in both native and generic cases
+// wxControlContainer
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxControlContainerBase
+class WXDLLEXPORT wxControlContainer
{
public:
- // default ctor, SetContainerWindow() must be called later
- wxControlContainerBase()
- {
- m_winParent = NULL;
+ // ctors and such
+ wxControlContainer(wxWindow *winParent = NULL);
+ void SetContainerWindow(wxWindow *winParent) { m_winParent = winParent; }
- // By default, we accept focus ourselves.
- m_acceptsFocusSelf = true;
-
- // But we don't have any children accepting it yet.
- m_acceptsFocusChildren = false;
-
- m_inSetFocus = false;
- m_winLastFocused = NULL;
- }
- virtual ~wxControlContainerBase() {}
-
- void SetContainerWindow(wxWindow *winParent)
- {
- wxASSERT_MSG( !m_winParent, wxT("shouldn't be called twice") );
-
- m_winParent = winParent;
- }
-
- // This can be called by the window to indicate that it never wants to have
- // the focus for itself.
- void DisableSelfFocus()
- { m_acceptsFocusSelf = false; UpdateParentCanFocus(); }
-
- // This can be called to undo the effect of a previous DisableSelfFocus()
- // (otherwise calling it is not necessary as the window does accept focus
- // by default).
- void EnableSelfFocus()
- { m_acceptsFocusSelf = true; UpdateParentCanFocus(); }
+ // 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();
- // returns whether we should accept focus ourselves or not
+ // can our child get the focus?
bool AcceptsFocus() const;
- // Returns whether we or one of our children accepts focus.
- bool AcceptsFocusRecursively() const
- { return AcceptsFocus() ||
- (m_acceptsFocusChildren && HasAnyChildrenAcceptingFocus()); }
-
- // We accept focus from keyboard if we accept it at all.
- bool AcceptsFocusFromKeyboard() const { return AcceptsFocusRecursively(); }
-
- // Call this when the number of children of the window changes.
- //
- // Returns true if we have any focusable children, false otherwise.
- bool UpdateCanFocusChildren();
+ // 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
- virtual bool SetFocusToChild();
-
- // return true if we have any children accepting focus
- bool HasAnyFocusableChildren() const;
-
- // return true if we have any children that do accept focus right now
- bool HasAnyChildrenAcceptingFocus() const;
-
+ bool SetFocusToChild();
// the parent window we manage the children for
wxWindow *m_winParent;
@@ -107,265 +64,33 @@ protected:
// the child which had the focus last time this panel was activated
wxWindow *m_winLastFocused;
-private:
- // Update the window status to reflect whether it is getting focus or not.
- void UpdateParentCanFocus();
-
- // Indicates whether the associated window can ever have focus itself.
- //
- // Usually this is the case, e.g. a wxPanel can be used either as a
- // container for its children or just as a normal window which can be
- // focused. But sometimes, e.g. for wxStaticBox, we can never have focus
- // ourselves and can only get it if we have any focusable children.
- bool m_acceptsFocusSelf;
-
- // Cached value remembering whether we have any children accepting focus.
- bool m_acceptsFocusChildren;
-
// a guard against infinite recursion
bool m_inSetFocus;
+
+ DECLARE_NO_COPY_CLASS(wxControlContainer)
};
-#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
-
-// ----------------------------------------------------------------------------
-// wxControlContainer for native TAB navigation
-// ----------------------------------------------------------------------------
-
-// this must be a real class as we forward-declare it elsewhere
-class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
-{
-protected:
- // set the focus to the child which had it the last time
- virtual bool SetFocusToChild();
-};
-
-#else // !wxHAS_NATIVE_TAB_TRAVERSAL
-
-// ----------------------------------------------------------------------------
-// wxControlContainer for TAB navigation implemented in wx itself
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
-{
-public:
- // default ctor, SetContainerWindow() must be called later
- wxControlContainer();
-
- // the methods to be called from the window event handlers
- void HandleOnNavigationKey(wxNavigationKeyEvent& event);
- void HandleOnFocus(wxFocusEvent& event);
- void HandleOnWindowDestroy(wxWindowBase *child);
-
- // called from OnChildFocus() handler, i.e. when one of our (grand)
- // children gets the focus
- void SetLastFocus(wxWindow *win);
-
-protected:
-
- wxDECLARE_NO_COPY_CLASS(wxControlContainer);
-};
-
-#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
-
// this function is for wxWidgets internal use only
-extern WXDLLIMPEXP_CORE bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
+extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
// ----------------------------------------------------------------------------
-// wxNavigationEnabled: Derive from this class to support keyboard navigation
-// among window children in a wxWindow-derived class. The details of this class
-// don't matter, you just need to derive from it to make navigation work.
+// macros which may be used by the classes wishing to implement TAB navigation
+// among their children
// ----------------------------------------------------------------------------
-// The template parameter W must be a wxWindow-derived class.
-template
-class wxNavigationEnabled : public W
-{
-public:
- typedef W BaseWindowClass;
-
- wxNavigationEnabled()
- {
- m_container.SetContainerWindow(this);
-
-#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
- BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY,
- wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey));
-
- BaseWindowClass::Connect(wxEVT_SET_FOCUS,
- wxFocusEventHandler(wxNavigationEnabled::OnFocus));
-
- BaseWindowClass::Connect(wxEVT_CHILD_FOCUS,
- wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus));
-#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
- }
-
- WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocus() const
- {
- return m_container.AcceptsFocus();
- }
-
- WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusRecursively() const
- {
- return m_container.AcceptsFocusRecursively();
- }
-
- WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusFromKeyboard() const
- {
- return m_container.AcceptsFocusFromKeyboard();
- }
-
- WXDLLIMPEXP_INLINE_CORE virtual void AddChild(wxWindowBase *child)
- {
- BaseWindowClass::AddChild(child);
-
- if ( m_container.UpdateCanFocusChildren() )
- {
- // Under MSW we must have wxTAB_TRAVERSAL style for TAB navigation
- // to work.
- if ( !BaseWindowClass::HasFlag(wxTAB_TRAVERSAL) )
- BaseWindowClass::ToggleWindowStyle(wxTAB_TRAVERSAL);
- }
- }
-
- WXDLLIMPEXP_INLINE_CORE virtual void RemoveChild(wxWindowBase *child)
- {
-#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
- m_container.HandleOnWindowDestroy(child);
-#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
-
- BaseWindowClass::RemoveChild(child);
-
- // We could reset wxTAB_TRAVERSAL here but it doesn't seem to do any
- // harm to keep it.
- m_container.UpdateCanFocusChildren();
- }
-
- WXDLLIMPEXP_INLINE_CORE virtual void SetFocus()
- {
- if ( !m_container.DoSetFocus() )
- BaseWindowClass::SetFocus();
- }
-
- void SetFocusIgnoringChildren()
- {
- BaseWindowClass::SetFocus();
- }
-
-protected:
-#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
- void OnNavigationKey(wxNavigationKeyEvent& event)
- {
- m_container.HandleOnNavigationKey(event);
- }
-
- void OnFocus(wxFocusEvent& event)
- {
- m_container.HandleOnFocus(event);
- }
-
- void OnChildFocus(wxChildFocusEvent& event)
- {
- m_container.SetLastFocus(event.GetWindow());
- event.Skip();
- }
-#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
-
- wxControlContainer m_container;
-
-
- wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxNavigationEnabled, W);
-};
-
-// ----------------------------------------------------------------------------
-// Compatibility macros from now on, do NOT use them and preferably do not even
-// look at them.
-// ----------------------------------------------------------------------------
-
-#if WXWIN_COMPATIBILITY_2_8
-
-// common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases,
-// it should be used in the wxWindow-derived class declaration
-#define WX_DECLARE_CONTROL_CONTAINER_BASE() \
-public: \
- virtual bool AcceptsFocus() const; \
- virtual bool AcceptsFocusRecursively() const; \
- virtual bool AcceptsFocusFromKeyboard() const; \
- virtual void AddChild(wxWindowBase *child); \
- virtual void RemoveChild(wxWindowBase *child); \
- virtual void SetFocus(); \
- void SetFocusIgnoringChildren(); \
- \
-protected: \
- wxControlContainer m_container
-
-// this macro must be used in the derived class ctor
-#define WX_INIT_CONTROL_CONTAINER() \
- m_container.SetContainerWindow(this)
-
-// common part of WX_DELEGATE_TO_CONTROL_CONTAINER in the native and generic
-// cases, must be used in the wxWindow-derived class implementation
-#define WX_DELEGATE_TO_CONTROL_CONTAINER_BASE(classname, basename) \
- void classname::AddChild(wxWindowBase *child) \
- { \
- basename::AddChild(child); \
- \
- m_container.UpdateCanFocusChildren(); \
- } \
- \
- bool classname::AcceptsFocusRecursively() const \
- { \
- return m_container.AcceptsFocusRecursively(); \
- } \
- \
- void classname::SetFocus() \
- { \
- if ( !m_container.DoSetFocus() ) \
- basename::SetFocus(); \
- } \
- \
- bool classname::AcceptsFocus() const \
- { \
- return m_container.AcceptsFocus(); \
- } \
- \
- bool classname::AcceptsFocusFromKeyboard() const \
- { \
- return m_container.AcceptsFocusFromKeyboard(); \
- }
-
-
-#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
-
-#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname)
-
-#define WX_DECLARE_CONTROL_CONTAINER WX_DECLARE_CONTROL_CONTAINER_BASE
-
-#define WX_DELEGATE_TO_CONTROL_CONTAINER(classname, basename) \
- WX_DELEGATE_TO_CONTROL_CONTAINER_BASE(classname, basename) \
- \
- void classname::RemoveChild(wxWindowBase *child) \
- { \
- basename::RemoveChild(child); \
- \
- m_container.UpdateCanFocusChildren(); \
- } \
- \
- void classname::SetFocusIgnoringChildren() \
- { \
- basename::SetFocus(); \
- }
-
-#else // !wxHAS_NATIVE_TAB_TRAVERSAL
-
// declare the methods to be forwarded
-#define WX_DECLARE_CONTROL_CONTAINER() \
- WX_DECLARE_CONTROL_CONTAINER_BASE(); \
- \
-public: \
- void OnNavigationKey(wxNavigationKeyEvent& event); \
- void OnFocus(wxFocusEvent& event); \
- virtual void OnChildFocus(wxChildFocusEvent& event)
+#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) \
@@ -374,41 +99,44 @@ public: \
EVT_NAVIGATION_KEY(classname::OnNavigationKey)
// implement the methods forwarding to the wxControlContainer
-#define WX_DELEGATE_TO_CONTROL_CONTAINER(classname, basename) \
- WX_DELEGATE_TO_CONTROL_CONTAINER_BASE(classname, basename) \
- \
- void classname::RemoveChild(wxWindowBase *child) \
- { \
- m_container.HandleOnWindowDestroy(child); \
- \
- basename::RemoveChild(child); \
- \
- m_container.UpdateCanFocusChildren(); \
- } \
- \
- void classname::OnNavigationKey( wxNavigationKeyEvent& event ) \
- { \
- m_container.HandleOnNavigationKey(event); \
- } \
- \
- 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); \
- }
+#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 // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
-
-#endif // WXWIN_COMPATIBILITY_2_8
#endif // _WX_CONTAINR_H_
diff --git a/Source/3rd Party/wx/include/wx/control.h b/Source/3rd Party/wx/include/wx/control.h
index 6fdc05c84..ff11a93cf 100644
--- a/Source/3rd Party/wx/include/wx/control.h
+++ b/Source/3rd Party/wx/include/wx/control.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -21,38 +22,13 @@
#include "wx/window.h" // base class
-extern WXDLLIMPEXP_DATA_CORE(const char) wxControlNameStr[];
-
-
-// ----------------------------------------------------------------------------
-// Ellipsize() constants
-// ----------------------------------------------------------------------------
-
-enum wxEllipsizeFlags
-{
- wxELLIPSIZE_FLAGS_NONE = 0,
- wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS = 1,
- wxELLIPSIZE_FLAGS_EXPAND_TABS = 2,
-
- wxELLIPSIZE_FLAGS_DEFAULT = wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS |
- wxELLIPSIZE_FLAGS_EXPAND_TABS
-};
-
-// NB: Don't change the order of these values, they're the same as in
-// PangoEllipsizeMode enum.
-enum wxEllipsizeMode
-{
- wxELLIPSIZE_NONE,
- wxELLIPSIZE_START,
- wxELLIPSIZE_MIDDLE,
- wxELLIPSIZE_END
-};
+extern WXDLLEXPORT_DATA(const wxChar) wxControlNameStr[];
// ----------------------------------------------------------------------------
// wxControl is the base class for all controls
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxControlBase : public wxWindow
+class WXDLLEXPORT wxControlBase : public wxWindow
{
public:
wxControlBase() { }
@@ -70,51 +46,11 @@ public:
// get the control alignment (left/right/centre, top/bottom/centre)
int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
- // set label with mnemonics
- virtual void SetLabel(const wxString& label)
- {
- m_labelOrig = label;
-
- InvalidateBestSize();
-
- wxWindow::SetLabel(label);
- }
-
- // return the original string, as it was passed to SetLabel()
- // (i.e. with wx-style mnemonics)
- virtual wxString GetLabel() const { return m_labelOrig; }
-
- // set label text (mnemonics will be escaped)
- virtual void SetLabelText(const wxString& text)
- {
- SetLabel(EscapeMnemonics(text));
- }
+ // get the string without mnemonic characters ('&')
+ static wxString GetLabelText(const wxString& label);
// get just the text of the label, without mnemonic characters ('&')
- virtual wxString GetLabelText() const { return GetLabelText(GetLabel()); }
-
-
-#if wxUSE_MARKUP
- // Set the label with markup (and mnemonics). Markup is a simple subset of
- // HTML with tags such as , and . By default it is not
- // supported i.e. all the markup is simply stripped and SetLabel() is
- // called but some controls in some ports do support this already and in
- // the future most of them should.
- //
- // Notice that, being HTML-like, markup also supports XML entities so '<'
- // should be encoded as "<" and so on, a bare '<' in the input will
- // likely result in an error. As an exception, a bare '&' is allowed and
- // indicates that the next character is a mnemonic. To insert a literal '&'
- // in the control you need to use "&" in the input string.
- //
- // Returns true if the label was set, even if the markup in it was ignored.
- // False is only returned if we failed to parse the label.
- bool SetLabelMarkup(const wxString& markup)
- {
- return DoSetLabelMarkup(markup);
- }
-#endif // wxUSE_MARKUP
-
+ 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
@@ -128,56 +64,13 @@ public:
// 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);
- wxSize GetSizeFromTextSize(int xlen, int ylen = -1) const
- { return DoGetSizeFromTextSize(xlen, ylen); }
- wxSize GetSizeFromTextSize(const wxSize& tsize) const
- { return DoGetSizeFromTextSize(tsize.x, tsize.y); }
-
-
- // static utilities for mnemonics char (&) handling
- // ------------------------------------------------
-
- // returns the given string without mnemonic characters ('&')
- static wxString GetLabelText(const wxString& label);
-
- // returns the given string without mnemonic characters ('&')
- // this function is identic to GetLabelText() and is provided for clarity
- // and for symmetry with the wxStaticText::RemoveMarkup() function.
- static wxString RemoveMnemonics(const wxString& str);
-
- // escapes (by doubling them) the mnemonics
- static wxString EscapeMnemonics(const wxString& str);
-
-
- // miscellaneous static utilities
- // ------------------------------
-
- // replaces parts of the given (multiline) string with an ellipsis if needed
- static wxString Ellipsize(const wxString& label, const wxDC& dc,
- wxEllipsizeMode mode, int maxWidth,
- int flags = wxELLIPSIZE_FLAGS_DEFAULT);
-
- // return the accel index in the string or -1 if none and puts the modified
- // string into second parameter if non NULL
- static int FindAccelIndex(const wxString& label,
- wxString *labelOnly = NULL);
-
- // this is a helper for the derived class GetClassDefaultAttributes()
- // implementation: it returns the right colours for the classes which
- // contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of
- // being simple controls (such as wxButton, wxCheckBox, ...)
- static wxVisualAttributes
- GetCompositeControlsDefaultAttributes(wxWindowVariant variant);
-
protected:
- // choose the default border for this window
- virtual wxBorder GetDefaultBorder() const;
-
// creates the control (calls wxWindowBase::CreateBase inside) and adds it
// to the list of parents children
bool CreateControl(wxWindowBase *parent,
@@ -188,36 +81,10 @@ protected:
const wxValidator& validator,
const wxString& name);
-#if wxUSE_MARKUP
- // This function may be overridden in the derived classes to implement
- // support for labels with markup. The base class version simply strips the
- // markup and calls SetLabel() with the remaining text.
- virtual bool DoSetLabelMarkup(const wxString& markup);
-#endif // wxUSE_MARKUP
-
- // override this to return the total control's size from a string size
- virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
-
// initialize the common fields of wxCommandEvent
void InitCommandEvent(wxCommandEvent& event) const;
- // Ellipsize() helper:
- static wxString DoEllipsizeSingleLine(const wxString& label, const wxDC& dc,
- wxEllipsizeMode mode, int maxWidth,
- int replacementWidth);
-
-#if wxUSE_MARKUP
- // Remove markup from the given string, returns empty string on error i.e.
- // if markup was syntactically invalid.
- static wxString RemoveMarkup(const wxString& markup);
-#endif // wxUSE_MARKUP
-
-
- // this field contains the label in wx format, i.e. with '&' mnemonics,
- // as it was passed to the last SetLabel() call
- wxString m_labelOrig;
-
- wxDECLARE_NO_COPY_CLASS(wxControlBase);
+ DECLARE_NO_COPY_CLASS(wxControlBase)
};
// ----------------------------------------------------------------------------
@@ -226,6 +93,8 @@ protected:
#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__)
@@ -235,7 +104,7 @@ protected:
#elif defined(__WXGTK__)
#include "wx/gtk1/control.h"
#elif defined(__WXMAC__)
- #include "wx/osx/control.h"
+ #include "wx/mac/control.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/control.h"
#elif defined(__WXPM__)
diff --git a/Source/3rd Party/wx/include/wx/convauto.h b/Source/3rd Party/wx/include/wx/convauto.h
index 46db14342..ced911950 100644
--- a/Source/3rd Party/wx/include/wx/convauto.h
+++ b/Source/3rd Party/wx/include/wx/convauto.h
@@ -3,6 +3,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -11,63 +12,24 @@
#define _WX_CONVAUTO_H_
#include "wx/strconv.h"
-#include "wx/fontenc.h"
+
+#if wxUSE_WCHAR_T
// ----------------------------------------------------------------------------
// wxConvAuto: uses BOM to automatically detect input encoding
// ----------------------------------------------------------------------------
-// All currently recognized BOM values.
-enum wxBOM
-{
- wxBOM_Unknown = -1,
- wxBOM_None,
- wxBOM_UTF32BE,
- wxBOM_UTF32LE,
- wxBOM_UTF16BE,
- wxBOM_UTF16LE,
- wxBOM_UTF8
-};
-
class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv
{
public:
// default ctor, the real conversion will be created on demand
- wxConvAuto(wxFontEncoding enc = wxFONTENCODING_DEFAULT)
- {
- Init();
-
- m_encDefault = enc;
- }
+ 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& other) : wxMBConv()
- {
- Init();
-
- m_encDefault = other.m_encDefault;
- }
-
- virtual ~wxConvAuto()
- {
- if ( m_ownsConv )
- delete m_conv;
- }
-
- // get/set the fall-back encoding used when the input text doesn't have BOM
- // and isn't UTF-8
- //
- // special values are wxFONTENCODING_MAX meaning not to use any fall back
- // at all (but just fail to convert in this case) and wxFONTENCODING_SYSTEM
- // meaning to use the encoding of the system locale
- static wxFontEncoding GetFallbackEncoding() { return ms_defaultMBEncoding; }
- static void SetFallbackEncoding(wxFontEncoding enc);
- static void DisableFallbackEncoding()
- {
- SetFallbackEncoding(wxFONTENCODING_MAX);
- }
+ 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,
@@ -80,64 +42,46 @@ public:
virtual wxMBConv *Clone() const { return new wxConvAuto(*this); }
- // return the BOM type of this buffer
- static wxBOM DetectBOM(const char *src, size_t srcLen);
-
- // return the characters composing the given BOM.
- static const char* GetBOMChars(wxBOM bomType, size_t* count);
-
- wxBOM GetBOM() const
- {
- return m_bomType;
- }
-
private:
- // common part of all ctors
- void Init()
+ // all currently recognized BOM values
+ enum BOMType
{
- // We don't initialize m_encDefault here as different ctors do it
- // differently.
- m_conv = NULL;
- m_bomType = wxBOM_Unknown;
- m_ownsConv = false;
- m_consumedBOM = false;
- }
+ BOM_None,
+ BOM_UTF32BE,
+ BOM_UTF32LE,
+ BOM_UTF16BE,
+ BOM_UTF16LE,
+ BOM_UTF8
+ };
- // initialize m_conv with the UTF-8 conversion
- void InitWithUTF8()
+ // 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(wxBOM bomType);
+ void InitFromBOM(BOMType bomType);
// create the correct conversion object for the BOM present in the
- // beginning of the buffer
- //
- // return false if the buffer is too short to allow us to determine if we
- // have BOM or not
- bool InitFromInput(const char *src, size_t len);
+ // 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;
- // fall-back multibyte encoding to use, may be wxFONTENCODING_SYSTEM or
- // wxFONTENCODING_MAX but not wxFONTENCODING_DEFAULT
- static wxFontEncoding ms_defaultMBEncoding;
-
// conversion object which we really use, NULL until the first call to
// either ToWChar() or FromWChar()
wxMBConv *m_conv;
- // the multibyte encoding to use by default if input isn't Unicode
- wxFontEncoding m_encDefault;
-
// our BOM type
- wxBOM m_bomType;
+ BOMType m_bomType;
// true if we allocated m_conv ourselves, false if we just use an existing
// global conversion
@@ -148,8 +92,17 @@ private:
bool m_consumedBOM;
- wxDECLARE_NO_ASSIGN_CLASS(wxConvAuto);
+ 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/Source/3rd Party/wx/include/wx/cpp.h b/Source/3rd Party/wx/include/wx/cpp.h
index e4b09b61f..8d7a646d7 100644
--- a/Source/3rd Party/wx/include/wx/cpp.h
+++ b/Source/3rd Party/wx/include/wx/cpp.h
@@ -3,6 +3,7 @@
* 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
*/
@@ -12,27 +13,9 @@
#ifndef _WX_CPP_H_
#define _WX_CPP_H_
-#include "wx/compiler.h" /* wxCHECK_XXX_VERSION() macros */
-
/* wxCONCAT works like preprocessor ## operator but also works with macros */
#define wxCONCAT_HELPER(text, line) text ## line
-
-#define wxCONCAT(x1, x2) \
- wxCONCAT_HELPER(x1, x2)
-#define wxCONCAT3(x1, x2, x3) \
- wxCONCAT(wxCONCAT(x1, x2), x3)
-#define wxCONCAT4(x1, x2, x3, x4) \
- wxCONCAT(wxCONCAT3(x1, x2, x3), x4)
-#define wxCONCAT5(x1, x2, x3, x4, x5) \
- wxCONCAT(wxCONCAT4(x1, x2, x3, x4), x5)
-#define wxCONCAT6(x1, x2, x3, x4, x5, x6) \
- wxCONCAT(wxCONCAT5(x1, x2, x3, x4, x5), x6)
-#define wxCONCAT7(x1, x2, x3, x4, x5, x6, x7) \
- wxCONCAT(wxCONCAT6(x1, x2, x3, x4, x5, x6), x7)
-#define wxCONCAT8(x1, x2, x3, x4, x5, x6, x7, x8) \
- wxCONCAT(wxCONCAT7(x1, x2, x3, x4, x5, x6, x7), x8)
-#define wxCONCAT9(x1, x2, x3, x4, x5, x6, x7, x8, x9) \
- wxCONCAT(wxCONCAT8(x1, x2, x3, x4, x5, x6, x7, x8), x9)
+#define wxCONCAT(text, line) wxCONCAT_HELPER(text, line)
/* wxSTRINGIZE works as the preprocessor # operator but also works with macros */
#define wxSTRINGIZE_HELPER(x) #x
@@ -41,16 +24,6 @@
/* a Unicode-friendly version of wxSTRINGIZE_T */
#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x))
-/*
- Special workarounds for compilers with broken "##" operator. For all the
- other ones we can just use it directly.
- */
-#ifdef wxCOMPILER_BROKEN_CONCAT_OPER
- #define wxPREPEND_L(x) L ## x
- #define wxAPPEND_i64(x) x ## i64
- #define wxAPPEND_ui64(x) x ## ui64
-#endif /* wxCOMPILER_BROKEN_CONCAT_OPER */
-
/*
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
@@ -80,108 +53,5 @@
*/
#define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */
-/*
- Helpers for defining macros that expand into a single statement.
-
- The standatd solution is to use "do { ... } while (0)" statement but MSVC
- generates a C4127 "condition expression is constant" warning for it so we
- use something which is just complicated enough to not be recognized as a
- constant but still simple enough to be optimized away.
-
- Another solution would be to use __pragma() to temporarily disable C4127.
-
- Notice that wxASSERT_ARG_TYPE in wx/strvargarg.h relies on these macros
- creating some kind of a loop because it uses "break".
- */
-#ifdef __WATCOMC__
- #define wxFOR_ONCE(name) for(int name=0; name<1; name++)
- #define wxSTATEMENT_MACRO_BEGIN wxFOR_ONCE(wxMAKE_UNIQUE_NAME(wxmacro)) {
- #define wxSTATEMENT_MACRO_END }
-#else
- #define wxSTATEMENT_MACRO_BEGIN do {
- #define wxSTATEMENT_MACRO_END } while ( (void)0, 0 )
-#endif
-
-/*
- Define __WXFUNCTION__ which is like standard __FUNCTION__ but defined as
- NULL for the compilers which don't support the latter.
- */
-#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 */
-
-
-/* Auto-detect variadic macros support unless explicitly disabled. */
-#if !defined(HAVE_VARIADIC_MACROS) && !defined(wxNO_VARIADIC_MACROS)
- /* Any C99 or C++11 compiler should have them. */
- #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
- (defined(__cplusplus) && __cplusplus >= 201103L)
- #define HAVE_VARIADIC_MACROS
- #elif wxCHECK_GCC_VERSION(3,0)
- #define HAVE_VARIADIC_MACROS
- #elif wxCHECK_VISUALC_VERSION(8)
- #define HAVE_VARIADIC_MACROS
- #elif wxCHECK_WATCOM_VERSION(1,2)
- #define HAVE_VARIADIC_MACROS
- #endif
-#endif /* !HAVE_VARIADIC_MACROS */
-
-
-
-#ifdef HAVE_VARIADIC_MACROS
-/*
- wxCALL_FOR_EACH(what, ...) calls the macro from its first argument, what(pos, x),
- for every remaining argument 'x', with 'pos' being its 1-based index in
- *reverse* order (with the last argument being numbered 1).
-
- For example, wxCALL_FOR_EACH(test, a, b, c) expands into this:
-
- test(3, a) \
- test(2, b) \
- test(1, c)
-
- Up to eight arguments are supported.
-
- (With thanks to https://groups.google.com/d/topic/comp.std.c/d-6Mj5Lko_s/discussion
- and http://stackoverflow.com/questions/1872220/is-it-possible-to-iterate-over-arguments-in-variadic-macros)
-*/
-#define wxCALL_FOR_EACH_NARG(...) wxCALL_FOR_EACH_NARG_((__VA_ARGS__, wxCALL_FOR_EACH_RSEQ_N()))
-#define wxCALL_FOR_EACH_NARG_(args) wxCALL_FOR_EACH_ARG_N args
-#define wxCALL_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N
-#define wxCALL_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0
-
-#define wxCALL_FOR_EACH_1(what, x) what(1, x)
-#define wxCALL_FOR_EACH_2(what, x, ...) what(2, x) wxCALL_FOR_EACH_1(what, __VA_ARGS__)
-#define wxCALL_FOR_EACH_3(what, x, ...) what(3, x) wxCALL_FOR_EACH_2(what, __VA_ARGS__)
-#define wxCALL_FOR_EACH_4(what, x, ...) what(4, x) wxCALL_FOR_EACH_3(what, __VA_ARGS__)
-#define wxCALL_FOR_EACH_5(what, x, ...) what(5, x) wxCALL_FOR_EACH_4(what, __VA_ARGS__)
-#define wxCALL_FOR_EACH_6(what, x, ...) what(6, x) wxCALL_FOR_EACH_5(what, __VA_ARGS__)
-#define wxCALL_FOR_EACH_7(what, x, ...) what(7, x) wxCALL_FOR_EACH_6(what, __VA_ARGS__)
-#define wxCALL_FOR_EACH_8(what, x, ...) what(8, x) wxCALL_FOR_EACH_7(what, __VA_ARGS__)
-
-#define wxCALL_FOR_EACH_(N, args) \
- wxCONCAT(wxCALL_FOR_EACH_, N) args
-
-#define wxCALL_FOR_EACH(what, ...) \
- wxCALL_FOR_EACH_(wxCALL_FOR_EACH_NARG(__VA_ARGS__), (what, __VA_ARGS__))
-
-#else
- #define wxCALL_FOR_EACH Error_wx_CALL_FOR_EACH_requires_variadic_macros_support
-#endif /* HAVE_VARIADIC_MACROS */
-
-#endif /* _WX_CPP_H_ */
+#endif // _WX_CPP_H_
diff --git a/Source/3rd Party/wx/include/wx/cppunit.h b/Source/3rd Party/wx/include/wx/cppunit.h
deleted file mode 100644
index 89edd9165..000000000
--- a/Source/3rd Party/wx/include/wx/cppunit.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/cppunit.h
-// Purpose: wrapper header for CppUnit headers
-// Author: Vadim Zeitlin
-// Created: 15.02.04
-// 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"
-#ifdef __VISUALC__
- #pragma warning(push)
-
- // with cppunit 1.12 we get many bogus warnings 4701 (local variable may be
- // used without having been initialized) in TestAssert.h
- #pragma warning(disable:4701)
-
- // and also 4100 (unreferenced formal parameter) in extensions/
- // ExceptionTestCaseDecorator.h
- #pragma warning(disable:4100)
-#endif
-
-#include
-#include
-#include
-#include
-#include
-
-#ifdef __VISUALC__
- #pragma warning(pop)
-#endif
-#include "wx/afterstd.h"
-
-#include "wx/string.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(wxT("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))
-
-CPPUNIT_NS_BEGIN
-
-// provide an overload of cppunit assertEquals(T, T) which can be used to
-// compare wxStrings directly with C strings
-inline void
-assertEquals(const char *expected,
- const char *actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(wxString(expected), wxString(actual), sourceLine, message);
-}
-
-inline void
-assertEquals(const char *expected,
- const wxString& actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(wxString(expected), actual, sourceLine, message);
-}
-
-inline void
-assertEquals(const wxString& expected,
- const char *actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(expected, wxString(actual), sourceLine, message);
-}
-
-inline void
-assertEquals(const wchar_t *expected,
- const wxString& actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(wxString(expected), actual, sourceLine, message);
-}
-
-inline void
-assertEquals(const wxString& expected,
- const wchar_t *actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(expected, wxString(actual), sourceLine, message);
-}
-
-CPPUNIT_NS_END
-
-// define an assertEquals() overload for the given types, this is a helper and
-// shouldn't be used directly because of VC6 complications, see below
-#define WX_CPPUNIT_ASSERT_EQUALS(T1, T2) \
- inline void \
- assertEquals(T1 expected, \
- T2 actual, \
- CppUnit::SourceLine sourceLine, \
- const std::string& message) \
- { \
- if ( !assertion_traits::equal(expected,actual) ) \
- { \
- Asserter::failNotEqual( assertion_traits::toString(expected), \
- assertion_traits::toString(actual), \
- sourceLine, \
- message ); \
- } \
- }
-
-// this macro allows us to specify (usually literal) ints as expected values
-// for functions returning integral types different from "int"
-//
-// FIXME-VC6: due to incorrect resolution of overloaded/template functions in
-// this compiler (it basically doesn't use the template version at
-// all if any overloaded function matches partially even if none of
-// them matches fully) we also need to provide extra overloads
-
-#ifdef __VISUALC6__
- #define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \
- CPPUNIT_NS_BEGIN \
- WX_CPPUNIT_ASSERT_EQUALS(int, T) \
- WX_CPPUNIT_ASSERT_EQUALS(T, int) \
- WX_CPPUNIT_ASSERT_EQUALS(T, T) \
- CPPUNIT_NS_END
-
- CPPUNIT_NS_BEGIN
- WX_CPPUNIT_ASSERT_EQUALS(int, int)
- CPPUNIT_NS_END
-#else // !VC6
- #define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \
- CPPUNIT_NS_BEGIN \
- WX_CPPUNIT_ASSERT_EQUALS(int, T) \
- WX_CPPUNIT_ASSERT_EQUALS(T, int) \
- CPPUNIT_NS_END
-#endif // VC6/!VC6
-
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(long)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(short)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned long)
-
-#if defined( __VMS ) && defined( __ia64 )
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(std::basic_streambuf::pos_type);
-#endif
-
-#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxLongLong_t)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned wxLongLong_t)
-#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
-
-// Use this macro to compare a wxArrayString with the pipe-separated elements
-// of the given string
-//
-// NB: it's a macro and not a function to have the correct line numbers in the
-// test failure messages
-#define WX_ASSERT_STRARRAY_EQUAL(s, a) \
- { \
- wxArrayString expected(wxSplit(s, '|', '\0')); \
- \
- CPPUNIT_ASSERT_EQUAL( expected.size(), a.size() ); \
- \
- for ( size_t n = 0; n < a.size(); n++ ) \
- { \
- CPPUNIT_ASSERT_EQUAL( expected[n], a[n] ); \
- } \
- }
-
-// Use this macro to assert with the given formatted message (it should contain
-// the format string and arguments in a separate pair of parentheses)
-#define WX_ASSERT_MESSAGE(msg, cond) \
- CPPUNIT_ASSERT_MESSAGE(std::string(wxString::Format msg .mb_str()), (cond))
-
-#define WX_ASSERT_EQUAL_MESSAGE(msg, expected, actual) \
- CPPUNIT_ASSERT_EQUAL_MESSAGE(std::string(wxString::Format msg .mb_str()), \
- (expected), (actual))
-
-///////////////////////////////////////////////////////////////////////////////
-// define stream inserter for wxString if it's not defined in the main library,
-// we need it to output the test failures involving wxString
-#if !wxUSE_STD_IOSTREAM
-
-#include "wx/string.h"
-
-#include
-
-inline std::ostream& operator<<(std::ostream& o, const wxString& s)
-{
-#if wxUSE_UNICODE
- return o << (const char *)wxSafeConvertWX2MB(s.wc_str());
-#else
- return o << s.c_str();
-#endif
-}
-
-#endif // !wxUSE_STD_IOSTREAM
-
-// VC6 doesn't provide overloads for operator<<(__int64) in its stream classes
-// so do it ourselves
-#if defined(__VISUALC6__) && defined(wxLongLong_t)
-
-#include "wx/longlong.h"
-
-inline std::ostream& operator<<(std::ostream& ostr, wxLongLong_t ll)
-{
- ostr << wxLongLong(ll).ToString();
-
- return ostr;
-}
-
-inline std::ostream& operator<<(std::ostream& ostr, unsigned wxLongLong_t llu)
-{
- ostr << wxULongLong(llu).ToString();
-
- return ostr;
-}
-
-#endif // VC6 && wxLongLong_t
-
-///////////////////////////////////////////////////////////////////////////////
-// 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/Source/3rd Party/wx/include/wx/crt.h b/Source/3rd Party/wx/include/wx/crt.h
deleted file mode 100644
index 9b939fd0f..000000000
--- a/Source/3rd Party/wx/include/wx/crt.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Name: wx/crt.h
-// Purpose: Header to include all headers with wrappers for CRT functions
-// Author: Robert Roebling
-// Created: 2007-05-30
-// Copyright: (c) 2007 wxWidgets dev team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CRT_H_
-#define _WX_CRT_H_
-
-#include "wx/defs.h"
-
-// include wxChar type definition:
-#include "wx/chartype.h"
-
-// and wrappers for CRT functions:
-#include "wx/wxcrt.h"
-#include "wx/wxcrtvararg.h"
-
-#endif // _WX_CRT_H_
diff --git a/Source/3rd Party/wx/include/wx/cshelp.h b/Source/3rd Party/wx/include/wx/cshelp.h
index 50258f758..53e13c389 100644
--- a/Source/3rd Party/wx/include/wx/cshelp.h
+++ b/Source/3rd Party/wx/include/wx/cshelp.h
@@ -4,6 +4,7 @@
// Author: Julian Smart, Vadim Zeitlin
// Modified by:
// Created: 08/09/2000
+// RCS-ID: $Id: cshelp.h 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -35,7 +36,7 @@
* window for the application to display help for.
*/
-class WXDLLIMPEXP_CORE wxContextHelp : public wxObject
+class WXDLLEXPORT wxContextHelp : public wxObject
{
public:
wxContextHelp(wxWindow* win = NULL, bool beginHelp = true);
@@ -64,7 +65,7 @@ private:
* to put the application into context help mode.
*/
-class WXDLLIMPEXP_CORE wxContextHelpButton : public wxBitmapButton
+class WXDLLEXPORT wxContextHelpButton : public wxBitmapButton
{
public:
wxContextHelpButton(wxWindow* parent,
@@ -105,7 +106,7 @@ private:
// 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 WXDLLIMPEXP_CORE wxHelpProvider
+class WXDLLEXPORT wxHelpProvider
{
public:
// get/set the current (application-global) help provider (Set() returns
@@ -187,7 +188,7 @@ WX_DECLARE_EXPORTED_HASH_MAP( wxUIntPtr, wxString, wxIntegerHash,
// 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 WXDLLIMPEXP_CORE wxSimpleHelpProvider : public wxHelpProvider
+class WXDLLEXPORT wxSimpleHelpProvider : public wxHelpProvider
{
public:
// implement wxHelpProvider methods
@@ -211,12 +212,12 @@ protected:
// 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 WXDLLIMPEXP_CORE wxHelpControllerHelpProvider : public 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 = NULL);
+ wxHelpControllerHelpProvider(wxHelpControllerBase* hc = (wxHelpControllerBase*) NULL);
// implement wxHelpProvider methods
@@ -231,11 +232,11 @@ public:
protected:
wxHelpControllerBase* m_helpController;
- wxDECLARE_NO_COPY_CLASS(wxHelpControllerHelpProvider);
+ DECLARE_NO_COPY_CLASS(wxHelpControllerHelpProvider)
};
// Convenience function for turning context id into wxString
-WXDLLIMPEXP_CORE wxString wxContextId(int id);
+WXDLLEXPORT wxString wxContextId(int id);
#endif // wxUSE_HELP
diff --git a/Source/3rd Party/wx/include/wx/ctrlsub.h b/Source/3rd Party/wx/include/wx/ctrlsub.h
index d757e80f1..dc29fe63f 100644
--- a/Source/3rd Party/wx/include/wx/ctrlsub.h
+++ b/Source/3rd Party/wx/include/wx/ctrlsub.h
@@ -4,6 +4,7 @@
// 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
/////////////////////////////////////////////////////////////////////////////
@@ -15,7 +16,6 @@
#if wxUSE_CONTROLS
-#include "wx/arrstr.h"
#include "wx/control.h" // base class
// ----------------------------------------------------------------------------
@@ -29,7 +29,7 @@
// implements an extended interface deriving from this one)
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxItemContainerImmutable
+class WXDLLEXPORT wxItemContainerImmutable
{
public:
wxItemContainerImmutable() { }
@@ -72,7 +72,7 @@ public:
bool SetStringSelection(const wxString& s);
// return the selected string or empty string if none
- virtual wxString GetStringSelection() const;
+ wxString GetStringSelection() const;
// this is the same as SetSelection( for single-selection controls but
// reads better for multi-selection ones
@@ -80,109 +80,14 @@ public:
protected:
+
// check that the index is valid
- bool IsValid(unsigned int n) const { return n < GetCount(); }
- bool IsValidInsert(unsigned int n) const { return n <= GetCount(); }
+ inline bool IsValid(unsigned int n) const { return n < GetCount(); }
+ inline bool IsValidInsert(unsigned int n) const { return n <= GetCount(); }
};
-// ----------------------------------------------------------------------------
-// wxItemContainer extends wxItemContainerImmutable interface with methods
-// for adding/removing items.
-//
-// Classes deriving from this one must override DoInsertItems() to implement
-// adding items to the control. This can often be implemented more efficiently
-// than simply looping over the elements and inserting them but if this is not
-// the case, the generic DoInsertItemsInLoop can be used in implementation, but
-// in this case DoInsertItem() needs to be overridden.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxItemContainer : public wxItemContainerImmutable
+class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable
{
-private:
- // AppendItems() and InsertItems() helpers just call DoAppend/InsertItems()
- // after doing some checks
- //
- // NB: they're defined here so that they're inlined when used in public part
- int AppendItems(const wxArrayStringsAdapter& items,
- void **clientData,
- wxClientDataType type)
- {
- if ( items.IsEmpty() )
- return wxNOT_FOUND;
-
- return DoAppendItems(items, clientData, type);
- }
-
- int AppendItems(const wxArrayStringsAdapter& items)
- {
- return AppendItems(items, NULL, wxClientData_None);
- }
-
- int AppendItems(const wxArrayStringsAdapter& items, void **clientData)
- {
- wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
- wxT("can't mix different types of client data") );
-
- return AppendItems(items, clientData, wxClientData_Void);
- }
-
- int AppendItems(const wxArrayStringsAdapter& items,
- wxClientData **clientData)
- {
- wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
- wxT("can't mix different types of client data") );
-
- return AppendItems(items, reinterpret_cast(clientData),
- wxClientData_Object);
- }
-
- int InsertItems(const wxArrayStringsAdapter& items,
- unsigned int pos,
- void **clientData,
- wxClientDataType type)
- {
- wxASSERT_MSG( !IsSorted(), wxT("can't insert items in sorted control") );
-
- wxCHECK_MSG( pos <= GetCount(), wxNOT_FOUND,
- wxT("position out of range") );
-
- // not all derived classes handle empty arrays correctly in
- // DoInsertItems() and besides it really doesn't make much sense to do
- // this (for append it could correspond to creating an initially empty
- // control but why would anybody need to insert 0 items?)
- wxCHECK_MSG( !items.IsEmpty(), wxNOT_FOUND,
- wxT("need something to insert") );
-
- return DoInsertItems(items, pos, clientData, type);
- }
-
- int InsertItems(const wxArrayStringsAdapter& items, unsigned int pos)
- {
- return InsertItems(items, pos, NULL, wxClientData_None);
- }
-
- int InsertItems(const wxArrayStringsAdapter& items,
- unsigned int pos,
- void **clientData)
- {
- wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
- wxT("can't mix different types of client data") );
-
- return InsertItems(items, pos, clientData, wxClientData_Void);
- }
-
- int InsertItems(const wxArrayStringsAdapter& items,
- unsigned int pos,
- wxClientData **clientData)
- {
- wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
- wxT("can't mix different types of client data") );
-
- return InsertItems(items, pos,
- reinterpret_cast(clientData),
- wxClientData_Object);
- }
-
public:
wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
virtual ~wxItemContainer();
@@ -190,262 +95,99 @@ public:
// adding items
// ------------
- // append single item, return its position in the control (which can be
- // different from the last one if the control is sorted)
int Append(const wxString& item)
- { return AppendItems(item); }
+ { return DoAppend(item); }
int Append(const wxString& item, void *clientData)
- { return AppendItems(item, &clientData); }
+ { int n = DoAppend(item); SetClientData(n, clientData); return n; }
int Append(const wxString& item, wxClientData *clientData)
- { return AppendItems(item, &clientData); }
+ { int n = DoAppend(item); SetClientObject(n, clientData); return n; }
- // append several items at once to the control, return the position of the
- // last item appended
- int Append(const wxArrayString& items)
- { return AppendItems(items); }
- int Append(const wxArrayString& items, void **clientData)
- { return AppendItems(items, clientData); }
- int Append(const wxArrayString& items, wxClientData **clientData)
- { return AppendItems(items, clientData); }
- int Append(unsigned int n, const wxString *items)
- { return AppendItems(wxArrayStringsAdapter(n, items)); }
- int Append(unsigned int n, const wxString *items, void **clientData)
- { return AppendItems(wxArrayStringsAdapter(n, items), clientData); }
- int Append(unsigned int n,
- const wxString *items,
- wxClientData **clientData)
- { return AppendItems(wxArrayStringsAdapter(n, items), clientData); }
+ // only for rtti needs (separate name)
+ void AppendString( const wxString& item)
+ { Append( item ); }
- // 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);
-
- // inserting items: not for sorted controls!
- // -----------------------------------------
-
- // insert single item at the given position, return its effective position
int Insert(const wxString& item, unsigned int pos)
- { return InsertItems(item, pos); }
- int Insert(const wxString& item, unsigned int pos, void *clientData)
- { return InsertItems(item, pos, &clientData); }
- int Insert(const wxString& item, unsigned int pos, wxClientData *clientData)
- { return InsertItems(item, pos, &clientData); }
-
- // insert several items at once into the control, return the index of the
- // last item inserted
- int Insert(const wxArrayString& items, unsigned int pos)
- { return InsertItems(items, pos); }
- int Insert(const wxArrayString& items, unsigned int pos, void **clientData)
- { return InsertItems(items, pos, clientData); }
- int Insert(const wxArrayString& items,
- unsigned int pos,
- wxClientData **clientData)
- { return InsertItems(items, pos, clientData); }
- int Insert(unsigned int n, const wxString *items, unsigned int pos)
- { return InsertItems(wxArrayStringsAdapter(n, items), pos); }
- int Insert(unsigned int n,
- const wxString *items,
- unsigned int pos,
- void **clientData)
- { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); }
- int Insert(unsigned int n,
- const wxString *items,
- unsigned int pos,
- wxClientData **clientData)
- { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); }
-
-
- // replacing items
- // ---------------
-
- void Set(const wxArrayString& items)
- { Clear(); Append(items); }
- void Set(const wxArrayString& items, void **clientData)
- { Clear(); Append(items, clientData); }
- void Set(const wxArrayString& items, wxClientData **clientData)
- { Clear(); Append(items, clientData); }
- void Set(unsigned int n, const wxString *items)
- { Clear(); Append(n, items); }
- void Set(unsigned int n, const wxString *items, void **clientData)
- { Clear(); Append(n, items, clientData); }
- void Set(unsigned int n, const wxString *items, wxClientData **clientData)
- { Clear(); Append(n, items, clientData); }
+ { 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
// --------------
- void Clear();
- void Delete(unsigned int pos);
-
-
- // various accessors
- // -----------------
-
- // The control may maintain its items in a sorted order in which case
- // items are automatically inserted at the right position when they are
- // inserted or appended. Derived classes have to override this method if
- // they implement sorting, typically by returning HasFlag(wxXX_SORT)
- virtual bool IsSorted() const { return false; }
+ 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;
- // SetClientObject() takes ownership of the pointer, GetClientObject()
- // returns it but keeps the ownership while DetachClientObject() expects
- // the caller to delete the pointer and also resets the internally stored
- // one to NULL for this item
void SetClientObject(unsigned int n, wxClientData* clientData);
wxClientData* GetClientObject(unsigned int n) const;
- wxClientData* DetachClientObject(unsigned int n);
- // return the type of client data stored in this control: usually it just
- // returns m_clientDataItemsType but must be overridden in the controls
- // which delegate their client data storage to another one (e.g. wxChoice
- // in wxUniv which stores data in wxListBox which it uses anyhow); don't
- // forget to override SetClientDataType() if you override this one
- //
- // NB: for this to work no code should ever access m_clientDataItemsType
- // directly but only via this function!
- virtual wxClientDataType GetClientDataType() const
- { return m_clientDataItemsType; }
-
- bool HasClientData() const
- { return GetClientDataType() != wxClientData_None; }
bool HasClientObjectData() const
- { return GetClientDataType() == wxClientData_Object; }
+ { return m_clientDataItemsType == wxClientData_Object; }
bool HasClientUntypedData() const
- { return GetClientDataType() == wxClientData_Void; }
+ { return m_clientDataItemsType == wxClientData_Void; }
protected:
- // there is usually no need to override this method but you can do it if it
- // is more convenient to only do "real" insertions in DoInsertItems() and
- // to implement items appending here (in which case DoInsertItems() should
- // call this method if pos == GetCount() as it can still be called in this
- // case if public Insert() is called with such position)
- virtual int DoAppendItems(const wxArrayStringsAdapter& items,
- void **clientData,
- wxClientDataType type)
- {
- return DoInsertItems(items, GetCount(), clientData, type);
- }
+ virtual int DoAppend(const wxString& item) = 0;
+ virtual int DoInsert(const wxString& item, unsigned int pos) = 0;
- // this method must be implemented to insert the items into the control at
- // position pos which can be GetCount() meaning that the items should be
- // appended; for the sorted controls the position can be ignored
- //
- // the derived classes typically use AssignNewItemClientData() to
- // associate the data with the items as they're being inserted
- //
- // the method should return the index of the position the last item was
- // inserted into or wxNOT_FOUND if an error occurred
- virtual int DoInsertItems(const wxArrayStringsAdapter & items,
- unsigned int pos,
- void **clientData,
- wxClientDataType type) = 0;
-
- // before the client data is set for the first time for the control which
- // hadn't had it before, DoInitItemClientData() is called which gives the
- // derived class the possibility to initialize its client data storage only
- // when client data is really used
- virtual void DoInitItemClientData() { }
- virtual void DoSetItemClientData(unsigned int n, void *clientData) = 0;
- virtual void *DoGetItemClientData(unsigned int n) const = 0;
-
- virtual void DoClear() = 0;
- virtual void DoDeleteOneItem(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;
- // methods useful for the derived classes which don't have any better way
- // of adding multiple items to the control than doing it one by one: such
- // classes should call DoInsertItemsInLoop() from their DoInsert() and
- // override DoInsertOneItem() to perform the real insertion
- virtual int DoInsertOneItem(const wxString& item, unsigned int pos);
- int DoInsertItemsInLoop(const wxArrayStringsAdapter& items,
- unsigned int pos,
- void **clientData,
- wxClientDataType type);
-
-
- // helper for DoInsertItems(): n is the index into clientData, pos is the
- // position of the item in the control
- void AssignNewItemClientData(unsigned int pos,
- void **clientData,
- unsigned int n,
- wxClientDataType type);
-
- // free the client object associated with the item at given position and
- // set it to NULL (must only be called if HasClientObjectData())
- void ResetItemClientObject(unsigned int n);
-
- // set the type of the client data stored in this control: override this if
- // you override GetClientDataType()
- virtual void SetClientDataType(wxClientDataType clientDataItemsType)
- {
- m_clientDataItemsType = clientDataItemsType;
- }
-
-private:
// the type of the client data for the items
wxClientDataType m_clientDataItemsType;
};
-// Inheriting directly from a wxWindow-derived class and wxItemContainer
-// unfortunately introduces an ambiguity for all GetClientXXX() methods as they
-// are inherited twice: the "global" versions from wxWindow and the per-item
-// versions taking the index from wxItemContainer.
-//
-// So we need to explicitly resolve them and this helper template class is
-// provided to do it. To use it, simply inherit from wxWindowWithItems instead of Window and Container interface directly.
-template
-class wxWindowWithItems : public W, public C
-{
-public:
- typedef W BaseWindowClass;
- typedef C BaseContainerInterface;
-
- wxWindowWithItems() { }
-
- void SetClientData(void *data)
- { BaseWindowClass::SetClientData(data); }
- void *GetClientData() const
- { return BaseWindowClass::GetClientData(); }
- void SetClientObject(wxClientData *data)
- { BaseWindowClass::SetClientObject(data); }
- wxClientData *GetClientObject() const
- { return BaseWindowClass::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
+// 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 WXDLLIMPEXP_CORE wxControlWithItemsBase :
- public wxWindowWithItems
+class WXDLLEXPORT wxControlWithItems : public wxControl, public wxItemContainer
{
public:
- wxControlWithItemsBase() { }
+ 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; }
-
- // Implementation only from now on.
-
- // Generate an event of the given type for the selection change.
- void SendSelectionChangedEvent(wxEventType eventType);
-
protected:
// fill in the client object or data field of the event as appropriate
//
@@ -454,25 +196,14 @@ protected:
void InitCommandEventWithItems(wxCommandEvent& event, int n);
private:
- wxDECLARE_NO_COPY_CLASS(wxControlWithItemsBase);
+ DECLARE_ABSTRACT_CLASS(wxControlWithItems)
+ DECLARE_NO_COPY_CLASS(wxControlWithItems)
};
-// define the platform-specific wxControlWithItems class
-#if defined(__WXMSW__)
- #include "wx/msw/ctrlsub.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/ctrlsub.h"
-#else
- class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsBase
- {
- public:
- wxControlWithItems() { }
- private:
- DECLARE_ABSTRACT_CLASS(wxControlWithItems)
- wxDECLARE_NO_COPY_CLASS(wxControlWithItems);
- };
-#endif
+// ----------------------------------------------------------------------------
+// inline functions
+// ----------------------------------------------------------------------------
#endif // wxUSE_CONTROLS
diff --git a/Source/3rd Party/wx/include/wx/cursor.h b/Source/3rd Party/wx/include/wx/cursor.h
index ef1413294..d072ff56a 100644
--- a/Source/3rd Party/wx/include/wx/cursor.h
+++ b/Source/3rd Party/wx/include/wx/cursor.h
@@ -5,6 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
+// RCS-ID: $Id: cursor.h 40865 2006-08-27 09:42:42Z VS $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@@ -13,56 +14,27 @@
#include "wx/defs.h"
-/*
- wxCursor classes should have the following public API:
-
-class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
-{
-public:
- wxCursor();
- wxCursor(const wxImage& image);
- wxCursor(const wxString& name,
- wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
- int hotSpotX = 0, int hotSpotY = 0);
- wxCursor(wxStockCursor id) { InitFromStock(id); }
-#if WXWIN_COMPATIBILITY_2_8
- wxCursor(int id) { InitFromStock((wxStockCursor)id); }
-#endif
- virtual ~wxCursor();
-};
-
-*/
-
-#if defined(__WXMSW__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
+#if defined(__WXPALMOS__)
+ #include "wx/palmos/cursor.h"
+#elif defined(__WXMSW__)
#include "wx/msw/cursor.h"
#elif defined(__WXMOTIF__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XBM
#include "wx/motif/cursor.h"
#elif defined(__WXGTK20__)
- #ifdef __WINDOWS__
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
- #else
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
- #endif
#include "wx/gtk/cursor.h"
#elif defined(__WXGTK__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/gtk1/cursor.h"
#elif defined(__WXX11__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/cursor.h"
+#elif defined(__WXMGL__)
+ #include "wx/mgl/cursor.h"
#elif defined(__WXDFB__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/dfb/cursor.h"
#elif defined(__WXMAC__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
- #include "wx/osx/cursor.h"
+ #include "wx/mac/cursor.h"
#elif defined(__WXCOCOA__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
#include "wx/cocoa/cursor.h"
#elif defined(__WXPM__)
- #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/os2/cursor.h"
#endif
diff --git a/Source/3rd Party/wx/include/wx/custombgwin.h b/Source/3rd Party/wx/include/wx/custombgwin.h
deleted file mode 100644
index 73890a465..000000000
--- a/Source/3rd Party/wx/include/wx/custombgwin.h
+++ /dev/null
@@ -1,52 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/custombgwin.h
-// Purpose: Class adding support for custom window backgrounds.
-// Author: Vadim Zeitlin
-// Created: 2011-10-10
-// Copyright: (c) 2011 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CUSTOMBGWIN_H_
-#define _WX_CUSTOMBGWIN_H_
-
-// ----------------------------------------------------------------------------
-// wxCustomBackgroundWindow: Adds support for custom backgrounds to any
-// wxWindow-derived class.
-// ----------------------------------------------------------------------------
-
-class wxCustomBackgroundWindowBase
-{
-public:
- // Trivial default ctor.
- wxCustomBackgroundWindowBase() { }
-
- // Also a trivial but virtual -- to suppress g++ warnings -- dtor.
- virtual ~wxCustomBackgroundWindowBase() { }
-
- // Use the given bitmap to tile the background of this window. This bitmap
- // will show through any transparent children.
- //
- // Notice that you must not prevent the base class EVT_ERASE_BACKGROUND
- // handler from running (i.e. not to handle this event yourself) for this
- // to work.
- void SetBackgroundBitmap(const wxBitmap& bmp)
- {
- DoSetBackgroundBitmap(bmp);
- }
-
-protected:
- virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0;
-
- wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowBase);
-};
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/custombgwin.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/custombgwin.h"
-#else
- #include "wx/generic/custombgwin.h"
-#endif
-
-#endif // _WX_CUSTOMBGWIN_H_
diff --git a/Source/3rd Party/wx/include/wx/dataobj.h b/Source/3rd Party/wx/include/wx/dataobj.h
index d93e01e9f..31a756e23 100644
--- a/Source/3rd Party/wx/include/wx/dataobj.h
+++ b/Source/3rd Party/wx/include/wx/dataobj.h
@@ -4,6 +4,7 @@
// 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
///////////////////////////////////////////////////////////////////////////////
@@ -54,7 +55,7 @@ public:
typedef NativeFormat;
wxDataFormat(NativeFormat format = wxDF_INVALID);
- wxDataFormat(const wxString& format);
+ wxDataFormat(const wxChar *format);
wxDataFormat& operator=(NativeFormat format);
wxDataFormat& operator=(const wxDataFormat& format);
@@ -66,7 +67,7 @@ public:
NativeFormat GetType() const;
wxString GetId() const;
- void SetId(const wxString& format);
+ void SetId(const wxChar *format);
};
*/
@@ -82,7 +83,7 @@ public:
#elif defined(__WXX11__)
#include "wx/x11/dataform.h"
#elif defined(__WXMAC__)
- #include "wx/osx/dataform.h"
+ #include "wx/mac/dataform.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/dataform.h"
#elif defined(__WXPM__)
@@ -91,7 +92,7 @@ public:
// the value for default argument to some functions (corresponds to
// wxDF_INVALID)
-extern WXDLLIMPEXP_CORE const wxDataFormat& wxFormatInvalid;
+extern WXDLLEXPORT const wxDataFormat& wxFormatInvalid;
// ----------------------------------------------------------------------------
// wxDataObject represents a piece of data which knows which formats it
@@ -113,7 +114,7 @@ extern WXDLLIMPEXP_CORE const wxDataFormat& wxFormatInvalid;
// to be supported by SetData() or GetDataHere().
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxDataObjectBase
+class WXDLLEXPORT wxDataObjectBase
{
public:
enum Direction
@@ -170,7 +171,7 @@ public:
#elif defined(__WXGTK__)
#include "wx/gtk1/dataobj.h"
#elif defined(__WXMAC__)
- #include "wx/osx/dataobj.h"
+ #include "wx/mac/dataobj.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/dataobj.h"
#elif defined(__WXPM__)
@@ -193,7 +194,7 @@ public:
// Otherwise, you should use wxDataObjectComposite or wxDataObject directly.
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxDataObjectSimple : public wxDataObject
+class WXDLLEXPORT wxDataObjectSimple : public wxDataObject
{
public:
// ctor takes the format we support, but it can also be set later with
@@ -245,7 +246,7 @@ private:
// the one and only format we support
wxDataFormat m_format;
- wxDECLARE_NO_COPY_CLASS(wxDataObjectSimple);
+ DECLARE_NO_COPY_CLASS(wxDataObjectSimple)
};
// ----------------------------------------------------------------------------
@@ -260,7 +261,7 @@ private:
WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList);
-class WXDLLIMPEXP_CORE wxDataObjectComposite : public wxDataObject
+class WXDLLEXPORT wxDataObjectComposite : public wxDataObject
{
public:
// ctor
@@ -273,17 +274,11 @@ public:
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 received data from
+ // 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 received.
+ // out what kind of data object was recieved.
wxDataFormat GetReceivedFormat() const;
- // Returns the pointer to the object which supports this format or NULL.
- // The returned pointer is owned by wxDataObjectComposite and must
- // therefore not be destroyed by the caller.
- wxDataObjectSimple *GetObject(const wxDataFormat& format,
- wxDataObjectBase::Direction dir = Get) const;
-
// implement base class pure virtuals
// ----------------------------------
virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction dir = Get) const;
@@ -300,6 +295,10 @@ public:
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;
@@ -310,7 +309,7 @@ private:
wxDataFormat m_receivedFormat;
- wxDECLARE_NO_COPY_CLASS(wxDataObjectComposite);
+ DECLARE_NO_COPY_CLASS(wxDataObjectComposite)
};
// ============================================================================
@@ -325,54 +324,7 @@ private:
// wxTextDataObject contains text data
// ----------------------------------------------------------------------------
-#if wxUSE_UNICODE
- #if defined(__WXGTK20__)
- #define wxNEEDS_UTF8_FOR_TEXT_DATAOBJ
- #elif defined(__WXMAC__)
- #define wxNEEDS_UTF16_FOR_TEXT_DATAOBJ
- #endif
-#endif // wxUSE_UNICODE
-
-class WXDLLIMPEXP_CORE wxHTMLDataObject : public wxDataObjectSimple
-{
-public:
- // ctor: you can specify the text here or in SetText(), or override
- // GetText()
- wxHTMLDataObject(const wxString& html = wxEmptyString)
- : wxDataObjectSimple(wxDF_HTML),
- m_html(html)
- {
- }
-
- // 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 GetLength() const { return m_html.Len() + 1; }
- virtual wxString GetHTML() const { return m_html; }
- virtual void SetHTML(const wxString& html) { m_html = html; }
-
- 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);
- }
-
-private:
- wxString m_html;
-};
-
-class WXDLLIMPEXP_CORE wxTextDataObject : public wxDataObjectSimple
+class WXDLLEXPORT wxTextDataObject : public wxDataObjectSimple
{
public:
// ctor: you can specify the text here or in SetText(), or override
@@ -399,7 +351,7 @@ public:
// ----------------------------------
// some platforms have 2 and not 1 format for text data
-#if defined(wxNEEDS_UTF8_FOR_TEXT_DATAOBJ) || defined(wxNEEDS_UTF16_FOR_TEXT_DATAOBJ)
+#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;
@@ -411,7 +363,7 @@ public:
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 // !wxNEEDS_UTF{8,16}_FOR_TEXT_DATAOBJ
+#else
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
@@ -428,19 +380,19 @@ public:
{
return SetData(len, buf);
}
-#endif // different wxTextDataObject implementations
+#endif
private:
wxString m_text;
- wxDECLARE_NO_COPY_CLASS(wxTextDataObject);
+ DECLARE_NO_COPY_CLASS(wxTextDataObject)
};
// ----------------------------------------------------------------------------
// wxBitmapDataObject contains a bitmap
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxBitmapDataObjectBase : public wxDataObjectSimple
+class WXDLLEXPORT wxBitmapDataObjectBase : public wxDataObjectSimple
{
public:
// ctor: you can specify the bitmap here or in SetBitmap(), or override
@@ -458,7 +410,7 @@ public:
protected:
wxBitmap m_bitmap;
- wxDECLARE_NO_COPY_CLASS(wxBitmapDataObjectBase);
+ DECLARE_NO_COPY_CLASS(wxBitmapDataObjectBase)
};
// ----------------------------------------------------------------------------
@@ -468,7 +420,7 @@ protected:
// data from drag and drop operation.
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxFileDataObjectBase : public wxDataObjectSimple
+class WXDLLEXPORT wxFileDataObjectBase : public wxDataObjectSimple
{
public:
// ctor: use AddFile() later to fill the array
@@ -480,7 +432,7 @@ public:
protected:
wxArrayString m_filenames;
- wxDECLARE_NO_COPY_CLASS(wxFileDataObjectBase);
+ DECLARE_NO_COPY_CLASS(wxFileDataObjectBase)
};
// ----------------------------------------------------------------------------
@@ -489,7 +441,7 @@ protected:
// It is understood that this data can be copied bitwise.
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxCustomDataObject : public wxDataObjectSimple
+class WXDLLEXPORT wxCustomDataObject : public wxDataObjectSimple
{
public:
// if you don't specify the format in the ctor, you can still use
@@ -541,7 +493,7 @@ private:
size_t m_size;
void *m_data;
- wxDECLARE_NO_COPY_CLASS(wxCustomDataObject);
+ DECLARE_NO_COPY_CLASS(wxCustomDataObject)
};
// ----------------------------------------------------------------------------
@@ -550,20 +502,19 @@ private:
#if defined(__WXMSW__)
#include "wx/msw/ole/dataobj2.h"
- // wxURLDataObject defined in msw/ole/dataobj2.h
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dataobj2.h"
- // wxURLDataObject defined in msw/ole/dataobj2.h
-#else
- #if defined(__WXGTK__)
+ // 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/osx/dataobj2.h"
+ #include "wx/mac/dataobj2.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/dataobj2.h"
#elif defined(__WXPM__)
@@ -571,7 +522,7 @@ private:
#endif
// wxURLDataObject is simply wxTextDataObject with a different name
- class WXDLLIMPEXP_CORE wxURLDataObject : public wxTextDataObject
+ class WXDLLEXPORT wxURLDataObject : public wxTextDataObject
{
public:
wxURLDataObject(const wxString& url = wxEmptyString)
@@ -582,7 +533,7 @@ private:
wxString GetURL() const { return GetText(); }
void SetURL(const wxString& url) { SetText(url); }
};
-#endif
+#endif // __WXMSW__/!__WXMSW__
#endif // wxUSE_DATAOBJ
diff --git a/Source/3rd Party/wx/include/wx/dataview.h b/Source/3rd Party/wx/include/wx/dataview.h
deleted file mode 100644
index ba0cafa3b..000000000
--- a/Source/3rd Party/wx/include/wx/dataview.h
+++ /dev/null
@@ -1,1356 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dataview.h
-// Purpose: wxDataViewCtrl base classes
-// Author: Robert Roebling
-// Modified by: Bo Yang
-// Created: 08.01.06
-// 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/textctrl.h"
-#include "wx/headercol.h"
-#include "wx/variant.h"
-#include "wx/dnd.h" // For wxDragResult declaration only.
-#include "wx/dynarray.h"
-#include "wx/icon.h"
-#include "wx/itemid.h"
-#include "wx/weakref.h"
-#include "wx/vector.h"
-#include "wx/dataobj.h"
-#include "wx/withimages.h"
-
-class WXDLLIMPEXP_FWD_CORE wxImageList;
-
-#if !(defined(__WXGTK20__) || defined(__WXOSX__)) || defined(__WXUNIVERSAL__)
-// #if !(defined(__WXOSX__)) || defined(__WXUNIVERSAL__)
- #define wxHAS_GENERIC_DATAVIEWCTRL
-#endif
-
-#ifdef wxHAS_GENERIC_DATAVIEWCTRL
- // this symbol doesn't follow the convention for wxUSE_XXX symbols which
- // are normally always defined as either 0 or 1, so its use is deprecated
- // and it only exists for backwards compatibility, don't use it any more
- // and use wxHAS_GENERIC_DATAVIEWCTRL instead
- #define wxUSE_GENERICDATAVIEWCTRL
-#endif
-
-// ----------------------------------------------------------------------------
-// wxDataViewCtrl globals
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
-class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
-class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
-class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer;
-class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier;
-
-extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxDataViewCtrl flags
-// ----------------------------------------------------------------------------
-
-// size of a wxDataViewRenderer without contents:
-#define wxDVC_DEFAULT_RENDERER_SIZE 20
-
-// the default width of new (text) columns:
-#define wxDVC_DEFAULT_WIDTH 80
-
-// the default width of new toggle columns:
-#define wxDVC_TOGGLE_DEFAULT_WIDTH 30
-
-// the default minimal width of the columns:
-#define wxDVC_DEFAULT_MINWIDTH 30
-
-// The default alignment of wxDataViewRenderers is to take
-// the alignment from the column it owns.
-#define wxDVR_DEFAULT_ALIGNMENT -1
-
-
-// ---------------------------------------------------------
-// wxDataViewItem
-// ---------------------------------------------------------
-
-// Make it a class and not a typedef to allow forward declaring it.
-class wxDataViewItem : public wxItemId
-{
-public:
- wxDataViewItem() : wxItemId() { }
- wxEXPLICIT wxDataViewItem(void* pItem) : wxItemId(pItem) { }
-};
-
-WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray);
-
-// ---------------------------------------------------------
-// wxDataViewModelNotifier
-// ---------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewModelNotifier
-{
-public:
- wxDataViewModelNotifier() { m_owner = NULL; }
- virtual ~wxDataViewModelNotifier() { m_owner = NULL; }
-
- virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
- virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
- virtual bool ItemChanged( const wxDataViewItem &item ) = 0;
- virtual bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items );
- virtual bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items );
- virtual bool ItemsChanged( const wxDataViewItemArray &items );
- virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0;
- virtual bool Cleared() = 0;
-
- // some platforms, such as GTK+, may need a two step procedure for ::Reset()
- virtual bool BeforeReset() { return true; }
- virtual bool AfterReset() { return Cleared(); }
-
- virtual void Resort() = 0;
-
- void SetOwner( wxDataViewModel *owner ) { m_owner = owner; }
- wxDataViewModel *GetOwner() const { return m_owner; }
-
-private:
- wxDataViewModel *m_owner;
-};
-
-
-
-// ----------------------------------------------------------------------------
-// wxDataViewItemAttr: a structure containing the visual attributes of an item
-// ----------------------------------------------------------------------------
-
-// TODO: this should be renamed to wxItemAttr or something general like this
-
-class WXDLLIMPEXP_ADV wxDataViewItemAttr
-{
-public:
- // ctors
- wxDataViewItemAttr()
- {
- m_bold = false;
- m_italic = false;
- }
-
- // setters
- void SetColour(const wxColour& colour) { m_colour = colour; }
- void SetBold( bool set ) { m_bold = set; }
- void SetItalic( bool set ) { m_italic = set; }
- void SetBackgroundColour(const wxColour& colour) { m_bgColour = colour; }
-
- // accessors
- bool HasColour() const { return m_colour.IsOk(); }
- const wxColour& GetColour() const { return m_colour; }
-
- bool HasFont() const { return m_bold || m_italic; }
- bool GetBold() const { return m_bold; }
- bool GetItalic() const { return m_italic; }
-
- bool HasBackgroundColour() const { return m_bgColour.IsOk(); }
- const wxColour& GetBackgroundColour() const { return m_bgColour; }
-
- bool IsDefault() const { return !(HasColour() || HasFont() || HasBackgroundColour()); }
-
- // Return the font based on the given one with this attribute applied to it.
- wxFont GetEffectiveFont(const wxFont& font) const;
-
-private:
- wxColour m_colour;
- bool m_bold;
- bool m_italic;
- wxColour m_bgColour;
-};
-
-
-// ---------------------------------------------------------
-// wxDataViewModel
-// ---------------------------------------------------------
-
-WX_DECLARE_LIST_WITH_DECL(wxDataViewModelNotifier, wxDataViewModelNotifiers,
- class WXDLLIMPEXP_ADV);
-
-class WXDLLIMPEXP_ADV wxDataViewModel: public wxRefCounter
-{
-public:
- wxDataViewModel();
-
- virtual unsigned int GetColumnCount() const = 0;
-
- // return type as reported by wxVariant
- virtual wxString GetColumnType( unsigned int col ) const = 0;
-
- // get value into a wxVariant
- virtual void GetValue( wxVariant &variant,
- const wxDataViewItem &item, unsigned int col ) const = 0;
-
- // return true if the given item has a value to display in the given
- // column: this is always true except for container items which by default
- // only show their label in the first column (but see HasContainerColumns())
- bool HasValue(const wxDataViewItem& item, unsigned col) const
- {
- return col == 0 || !IsContainer(item) || HasContainerColumns(item);
- }
-
- // usually ValueChanged() should be called after changing the value in the
- // model to update the control, ChangeValue() does it on its own while
- // SetValue() does not -- so while you will override SetValue(), you should
- // be usually calling ChangeValue()
- virtual bool SetValue(const wxVariant &variant,
- const wxDataViewItem &item,
- unsigned int col) = 0;
-
- bool ChangeValue(const wxVariant& variant,
- const wxDataViewItem& item,
- unsigned int col)
- {
- return SetValue(variant, item, col) && ValueChanged(item, col);
- }
-
- // Get text attribute, return false of default attributes should be used
- virtual bool GetAttr(const wxDataViewItem &WXUNUSED(item),
- unsigned int WXUNUSED(col),
- wxDataViewItemAttr &WXUNUSED(attr)) const
- {
- return false;
- }
-
- // Override this if you want to disable specific items
- virtual bool IsEnabled(const wxDataViewItem &WXUNUSED(item),
- unsigned int WXUNUSED(col)) const
- {
- return true;
- }
-
- // define hierarchy
- virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0;
- virtual bool IsContainer( const wxDataViewItem &item ) const = 0;
- // Is the container just a header or an item with all columns
- virtual bool HasContainerColumns(const wxDataViewItem& WXUNUSED(item)) const
- { return false; }
- virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const = 0;
-
- // delegated notifiers
- bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item );
- bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items );
- bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item );
- bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items );
- bool ItemChanged( const wxDataViewItem &item );
- bool ItemsChanged( const wxDataViewItemArray &items );
- bool ValueChanged( const wxDataViewItem &item, unsigned int col );
- bool Cleared();
-
- // some platforms, such as GTK+, may need a two step procedure for ::Reset()
- bool BeforeReset();
- bool AfterReset();
-
-
- // delegated action
- virtual void Resort();
-
- void AddNotifier( wxDataViewModelNotifier *notifier );
- void RemoveNotifier( wxDataViewModelNotifier *notifier );
-
- // default compare function
- virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
- unsigned int column, bool ascending ) const;
- virtual bool HasDefaultCompare() const { return false; }
-
- // internal
- virtual bool IsListModel() const { return false; }
- virtual bool IsVirtualListModel() const { return false; }
-
-protected:
- // the user should not delete this class directly: he should use DecRef() instead!
- virtual ~wxDataViewModel() { }
-
- wxDataViewModelNotifiers m_notifiers;
-};
-
-// ----------------------------------------------------------------------------
-// wxDataViewListModel: a model of a list, i.e. flat data structure without any
-// branches/containers, used as base class by wxDataViewIndexListModel and
-// wxDataViewVirtualListModel
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewListModel : public wxDataViewModel
-{
-public:
- // derived classes should override these methods instead of
- // {Get,Set}Value() and GetAttr() inherited from the base class
-
- virtual void GetValueByRow(wxVariant &variant,
- unsigned row, unsigned col) const = 0;
-
- virtual bool SetValueByRow(const wxVariant &variant,
- unsigned row, unsigned col) = 0;
-
- virtual bool
- GetAttrByRow(unsigned WXUNUSED(row), unsigned WXUNUSED(col),
- wxDataViewItemAttr &WXUNUSED(attr)) const
- {
- return false;
- }
-
- virtual bool IsEnabledByRow(unsigned int WXUNUSED(row),
- unsigned int WXUNUSED(col)) const
- {
- return true;
- }
-
-
- // helper methods provided by list models only
- virtual unsigned GetRow( const wxDataViewItem &item ) const = 0;
-
- // returns the number of rows
- virtual unsigned int GetCount() const = 0;
-
- // implement some base class pure virtual directly
- virtual wxDataViewItem
- GetParent( const wxDataViewItem & WXUNUSED(item) ) const
- {
- // items never have valid parent in this model
- return wxDataViewItem();
- }
-
- virtual bool IsContainer( const wxDataViewItem &item ) const
- {
- // only the invisible (and invalid) root item has children
- return !item.IsOk();
- }
-
- // and implement some others by forwarding them to our own ones
- virtual void GetValue( wxVariant &variant,
- const wxDataViewItem &item, unsigned int col ) const
- {
- GetValueByRow(variant, GetRow(item), col);
- }
-
- virtual bool SetValue( const wxVariant &variant,
- const wxDataViewItem &item, unsigned int col )
- {
- return SetValueByRow( variant, GetRow(item), col );
- }
-
- virtual bool GetAttr(const wxDataViewItem &item, unsigned int col,
- wxDataViewItemAttr &attr) const
- {
- return GetAttrByRow( GetRow(item), col, attr );
- }
-
- virtual bool IsEnabled(const wxDataViewItem &item, unsigned int col) const
- {
- return IsEnabledByRow( GetRow(item), col );
- }
-
-
- virtual bool IsListModel() const { return true; }
-};
-
-// ---------------------------------------------------------
-// wxDataViewIndexListModel
-// ---------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewIndexListModel: public wxDataViewListModel
-{
-public:
- wxDataViewIndexListModel( unsigned int initial_size = 0 );
-
- void RowPrepended();
- void RowInserted( unsigned int before );
- void RowAppended();
- void RowDeleted( unsigned int row );
- void RowsDeleted( const wxArrayInt &rows );
- void RowChanged( unsigned int row );
- void RowValueChanged( unsigned int row, unsigned int col );
- void Reset( unsigned int new_size );
-
- // convert to/from row/wxDataViewItem
-
- virtual unsigned GetRow( const wxDataViewItem &item ) const;
- wxDataViewItem GetItem( unsigned int row ) const;
-
- // implement base methods
- virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
-
- unsigned int GetCount() const { return m_hash.GetCount(); }
-
-private:
- wxDataViewItemArray m_hash;
- unsigned int m_nextFreeID;
- bool m_ordered;
-};
-
-// ---------------------------------------------------------
-// wxDataViewVirtualListModel
-// ---------------------------------------------------------
-
-#ifdef __WXMAC__
-// better than nothing
-typedef wxDataViewIndexListModel wxDataViewVirtualListModel;
-#else
-
-class WXDLLIMPEXP_ADV wxDataViewVirtualListModel: public wxDataViewListModel
-{
-public:
- wxDataViewVirtualListModel( unsigned int initial_size = 0 );
-
- void RowPrepended();
- void RowInserted( unsigned int before );
- void RowAppended();
- void RowDeleted( unsigned int row );
- void RowsDeleted( const wxArrayInt &rows );
- void RowChanged( unsigned int row );
- void RowValueChanged( unsigned int row, unsigned int col );
- void Reset( unsigned int new_size );
-
- // convert to/from row/wxDataViewItem
-
- virtual unsigned GetRow( const wxDataViewItem &item ) const;
- wxDataViewItem GetItem( unsigned int row ) const;
-
- // compare based on index
-
- virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
- unsigned int column, bool ascending ) const;
- virtual bool HasDefaultCompare() const;
-
- // implement base methods
- virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
-
- unsigned int GetCount() const { return m_size; }
-
- // internal
- virtual bool IsVirtualListModel() const { return true; }
-
-private:
- unsigned int m_size;
-};
-#endif
-
-// ----------------------------------------------------------------------------
-// wxDataViewRenderer and related classes
-// ----------------------------------------------------------------------------
-
-#include "wx/dvrenderers.h"
-
-// ---------------------------------------------------------
-// wxDataViewColumnBase
-// ---------------------------------------------------------
-
-// for compatibility only, do not use
-enum wxDataViewColumnFlags
-{
- wxDATAVIEW_COL_RESIZABLE = wxCOL_RESIZABLE,
- wxDATAVIEW_COL_SORTABLE = wxCOL_SORTABLE,
- wxDATAVIEW_COL_REORDERABLE = wxCOL_REORDERABLE,
- wxDATAVIEW_COL_HIDDEN = wxCOL_HIDDEN
-};
-
-class WXDLLIMPEXP_ADV wxDataViewColumnBase : public wxSettableHeaderColumn
-{
-public:
- // ctor for the text columns: takes ownership of renderer
- wxDataViewColumnBase(wxDataViewRenderer *renderer,
- unsigned int model_column)
- {
- Init(renderer, model_column);
- }
-
- // ctor for the bitmap columns
- wxDataViewColumnBase(const wxBitmap& bitmap,
- wxDataViewRenderer *renderer,
- unsigned int model_column)
- : m_bitmap(bitmap)
- {
- Init(renderer, model_column);
- }
-
- virtual ~wxDataViewColumnBase();
-
- // setters:
- virtual void SetOwner( wxDataViewCtrl *owner )
- { m_owner = owner; }
-
- // getters:
- unsigned int GetModelColumn() const { return static_cast(m_model_column); }
- wxDataViewCtrl *GetOwner() const { return m_owner; }
- wxDataViewRenderer* GetRenderer() const { return m_renderer; }
-
- // implement some of base class pure virtuals (the rest is port-dependent
- // and done differently in generic and native versions)
- virtual void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; }
- virtual wxBitmap GetBitmap() const { return m_bitmap; }
-
-protected:
- wxDataViewRenderer *m_renderer;
- int m_model_column;
- wxBitmap m_bitmap;
- wxDataViewCtrl *m_owner;
-
-private:
- // common part of all ctors
- void Init(wxDataViewRenderer *renderer, unsigned int model_column);
-};
-
-// ---------------------------------------------------------
-// wxDataViewCtrlBase
-// ---------------------------------------------------------
-
-#define wxDV_SINGLE 0x0000 // for convenience
-#define wxDV_MULTIPLE 0x0001 // can select multiple items
-
-#define wxDV_NO_HEADER 0x0002 // column titles not visible
-#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
-#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
-
-#define wxDV_ROW_LINES 0x0010 // alternating colour in rows
-#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height
-
-class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
-{
-public:
- wxDataViewCtrlBase();
- virtual ~wxDataViewCtrlBase();
-
- // model
- // -----
-
- virtual bool AssociateModel( wxDataViewModel *model );
- wxDataViewModel* GetModel();
- const wxDataViewModel* GetModel() const;
-
-
- // column management
- // -----------------
-
- wxDataViewColumn *PrependTextColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependIconTextColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependToggleColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependProgressColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependDateColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependBitmapColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependTextColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependIconTextColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependToggleColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependProgressColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependDateColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *PrependBitmapColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
-
- wxDataViewColumn *AppendTextColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendIconTextColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendToggleColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendProgressColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendDateColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendBitmapColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendTextColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendIconTextColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendDateColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
-
- virtual bool PrependColumn( wxDataViewColumn *col );
- virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
- virtual bool AppendColumn( wxDataViewColumn *col );
-
- virtual unsigned int GetColumnCount() const = 0;
- virtual wxDataViewColumn* GetColumn( unsigned int pos ) const = 0;
- virtual int GetColumnPosition( const wxDataViewColumn *column ) const = 0;
-
- virtual bool DeleteColumn( wxDataViewColumn *column ) = 0;
- virtual bool ClearColumns() = 0;
-
- void SetExpanderColumn( wxDataViewColumn *col )
- { m_expander_column = col ; DoSetExpanderColumn(); }
- wxDataViewColumn *GetExpanderColumn() const
- { return m_expander_column; }
-
- virtual wxDataViewColumn *GetSortingColumn() const = 0;
-
-
- // items management
- // ----------------
-
- void SetIndent( int indent )
- { m_indent = indent ; DoSetIndent(); }
- int GetIndent() const
- { return m_indent; }
-
- // Current item is the one used by the keyboard navigation, it is the same
- // as the (unique) selected item in single selection mode so these
- // functions are mostly useful for controls with wxDV_MULTIPLE style.
- wxDataViewItem GetCurrentItem() const;
- void SetCurrentItem(const wxDataViewItem& item);
-
- // Currently focused column of the current item or NULL if no column has focus
- virtual wxDataViewColumn *GetCurrentColumn() const = 0;
-
- // Selection: both GetSelection() and GetSelections() can be used for the
- // controls both with and without wxDV_MULTIPLE style. For single selection
- // controls GetSelections() is not very useful however. And for multi
- // selection controls GetSelection() returns an invalid item if more than
- // one item is selected. Use GetSelectedItemsCount() or HasSelection() to
- // check if any items are selected at all.
- virtual int GetSelectedItemsCount() const = 0;
- bool HasSelection() const { return GetSelectedItemsCount() != 0; }
- wxDataViewItem GetSelection() const;
- virtual int GetSelections( wxDataViewItemArray & sel ) const = 0;
- virtual void SetSelections( const wxDataViewItemArray & sel ) = 0;
- virtual void Select( const wxDataViewItem & item ) = 0;
- virtual void Unselect( const wxDataViewItem & item ) = 0;
- virtual bool IsSelected( const wxDataViewItem & item ) const = 0;
-
- virtual void SelectAll() = 0;
- virtual void UnselectAll() = 0;
-
- virtual void Expand( const wxDataViewItem & item ) = 0;
- virtual void ExpandAncestors( const wxDataViewItem & item );
- virtual void Collapse( const wxDataViewItem & item ) = 0;
- virtual bool IsExpanded( const wxDataViewItem & item ) const = 0;
-
- virtual void EnsureVisible( const wxDataViewItem & item,
- const wxDataViewColumn *column = NULL ) = 0;
- virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0;
- virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0;
-
- virtual bool SetRowHeight( int WXUNUSED(rowHeight) ) { return false; }
-
- virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) = 0;
-
- // Use EditItem() instead
- wxDEPRECATED( void StartEditor(const wxDataViewItem& item, unsigned int column) );
-
-#if wxUSE_DRAG_AND_DROP
- virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format))
- { return false; }
- virtual bool EnableDropTarget(const wxDataFormat& WXUNUSED(format))
- { return false; }
-#endif // wxUSE_DRAG_AND_DROP
-
- // define control visual attributes
- // --------------------------------
-
- virtual wxVisualAttributes GetDefaultAttributes() const
- {
- return GetClassDefaultAttributes(GetWindowVariant());
- }
-
- static wxVisualAttributes
- GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
- {
- return wxControl::GetCompositeControlsDefaultAttributes(variant);
- }
-
-protected:
- virtual void DoSetExpanderColumn() = 0 ;
- virtual void DoSetIndent() = 0;
-
-private:
- // Implementation of the public Set/GetCurrentItem() methods which are only
- // called in multi selection case (for single selection controls their
- // implementation is trivial and is done in the base class itself).
- virtual wxDataViewItem DoGetCurrentItem() const = 0;
- virtual void DoSetCurrentItem(const wxDataViewItem& item) = 0;
-
- wxDataViewModel *m_model;
- wxDataViewColumn *m_expander_column;
- int m_indent ;
-
-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_item(0),
- m_col(-1),
- m_model(NULL),
- m_value(wxNullVariant),
- m_column(NULL),
- m_pos(-1,-1),
- m_cacheFrom(0),
- m_cacheTo(0),
- m_editCancelled(false)
-#if wxUSE_DRAG_AND_DROP
- , m_dataObject(NULL),
- m_dataBuffer(NULL),
- m_dataSize(0),
- m_dragFlags(0),
- m_dropEffect(wxDragNone)
-#endif
- { }
-
- wxDataViewEvent(const wxDataViewEvent& event)
- : wxNotifyEvent(event),
- m_item(event.m_item),
- m_col(event.m_col),
- m_model(event.m_model),
- m_value(event.m_value),
- m_column(event.m_column),
- m_pos(event.m_pos),
- m_cacheFrom(event.m_cacheFrom),
- m_cacheTo(event.m_cacheTo),
- m_editCancelled(event.m_editCancelled)
-#if wxUSE_DRAG_AND_DROP
- , m_dataObject(event.m_dataObject),
- m_dataFormat(event.m_dataFormat),
- m_dataBuffer(event.m_dataBuffer),
- m_dataSize(event.m_dataSize),
- m_dragFlags(event.m_dragFlags),
- m_dropEffect(event.m_dropEffect)
-#endif
- { }
-
- wxDataViewItem GetItem() const { return m_item; }
- void SetItem( const wxDataViewItem &item ) { m_item = item; }
-
- int GetColumn() const { return m_col; }
- void SetColumn( int col ) { m_col = col; }
-
- 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_ITEM_EDITING_DONE only
- bool IsEditCancelled() const { return m_editCancelled; }
- void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
-
- // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
- void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
- wxDataViewColumn *GetDataViewColumn() const { return m_column; }
-
- // for wxEVT_DATAVIEW_CONTEXT_MENU only
- wxPoint GetPosition() const { return m_pos; }
- void SetPosition( int x, int y ) { m_pos.x = x; m_pos.y = y; }
-
- // For wxEVT_DATAVIEW_CACHE_HINT
- int GetCacheFrom() const { return m_cacheFrom; }
- int GetCacheTo() const { return m_cacheTo; }
- void SetCache(int from, int to) { m_cacheFrom = from; m_cacheTo = to; }
-
-
-#if wxUSE_DRAG_AND_DROP
- // For drag operations
- void SetDataObject( wxDataObject *obj ) { m_dataObject = obj; }
- wxDataObject *GetDataObject() const { return m_dataObject; }
-
- // For drop operations
- void SetDataFormat( const wxDataFormat &format ) { m_dataFormat = format; }
- wxDataFormat GetDataFormat() const { return m_dataFormat; }
- void SetDataSize( size_t size ) { m_dataSize = size; }
- size_t GetDataSize() const { return m_dataSize; }
- void SetDataBuffer( void* buf ) { m_dataBuffer = buf;}
- void *GetDataBuffer() const { return m_dataBuffer; }
- void SetDragFlags( int flags ) { m_dragFlags = flags; }
- int GetDragFlags() const { return m_dragFlags; }
- void SetDropEffect( wxDragResult effect ) { m_dropEffect = effect; }
- wxDragResult GetDropEffect() const { return m_dropEffect; }
-#endif // wxUSE_DRAG_AND_DROP
-
- virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); }
-
-protected:
- wxDataViewItem m_item;
- int m_col;
- wxDataViewModel *m_model;
- wxVariant m_value;
- wxDataViewColumn *m_column;
- wxPoint m_pos;
- int m_cacheFrom;
- int m_cacheTo;
- bool m_editCancelled;
-
-#if wxUSE_DRAG_AND_DROP
- wxDataObject *m_dataObject;
-
- wxDataFormat m_dataFormat;
- void* m_dataBuffer;
- size_t m_dataSize;
-
- int m_dragFlags;
- wxDragResult m_dropEffect;
-#endif // wxUSE_DRAG_AND_DROP
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent)
-};
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent );
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent );
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent );
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent );
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent );
-
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent );
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent );
-
-typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
-
-#define wxDataViewEventHandler(func) \
- wxEVENT_HANDLER_CAST(wxDataViewEventFunction, func)
-
-#define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
- wx__DECLARE_EVT1(wxEVT_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
-
-#define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn)
-
-#define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
-#define EVT_DATAVIEW_ITEM_COLLAPSING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSING, id, fn)
-#define EVT_DATAVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSED, id, fn)
-#define EVT_DATAVIEW_ITEM_EXPANDING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDING, id, fn)
-#define EVT_DATAVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDED, id, fn)
-#define EVT_DATAVIEW_ITEM_START_EDITING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_START_EDITING, id, fn)
-#define EVT_DATAVIEW_ITEM_EDITING_STARTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_STARTED, id, fn)
-#define EVT_DATAVIEW_ITEM_EDITING_DONE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_DONE, id, fn)
-#define EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_VALUE_CHANGED, id, fn)
-
-#define EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_CONTEXT_MENU, id, fn)
-
-#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
-#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
-#define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
-#define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn)
-#define EVT_DATAVIEW_CACHE_HINT(id, fn) wx__DECLARE_DATAVIEWEVT(CACHE_HINT, id, fn)
-
-#define EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_BEGIN_DRAG, id, fn)
-#define EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP_POSSIBLE, id, fn)
-#define EVT_DATAVIEW_ITEM_DROP(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP, id, fn)
-
-// Old and not documented synonym, don't use.
-#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn)
-
-#ifdef wxHAS_GENERIC_DATAVIEWCTRL
- #include "wx/generic/dataview.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dataview.h"
-#elif defined(__WXMAC__)
- #include "wx/osx/dataview.h"
-#else
- #error "unknown native wxDataViewCtrl implementation"
-#endif
-
-//-----------------------------------------------------------------------------
-// wxDataViewListStore
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewListStoreLine
-{
-public:
- wxDataViewListStoreLine( wxUIntPtr data = 0 )
- {
- m_data = data;
- }
-
- void SetData( wxUIntPtr data )
- { m_data = data; }
- wxUIntPtr GetData() const
- { return m_data; }
-
- wxVector m_values;
-
-private:
- wxUIntPtr m_data;
-};
-
-
-class WXDLLIMPEXP_ADV wxDataViewListStore: public wxDataViewIndexListModel
-{
-public:
- wxDataViewListStore();
- ~wxDataViewListStore();
-
- void PrependColumn( const wxString &varianttype );
- void InsertColumn( unsigned int pos, const wxString &varianttype );
- void AppendColumn( const wxString &varianttype );
-
- void AppendItem( const wxVector &values, wxUIntPtr data = 0 );
- void PrependItem( const wxVector &values, wxUIntPtr data = 0 );
- void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 );
- void DeleteItem( unsigned int pos );
- void DeleteAllItems();
-#if wxABI_VERSION >= 30001
- void ClearColumns();
-#endif
-
- unsigned int GetItemCount() const;
-
- void SetItemData( const wxDataViewItem& item, wxUIntPtr data );
- wxUIntPtr GetItemData( const wxDataViewItem& item ) const;
-
- // override base virtuals
-
- virtual unsigned int GetColumnCount() const;
-
- virtual wxString GetColumnType( unsigned int col ) const;
-
- virtual void GetValueByRow( wxVariant &value,
- unsigned int row, unsigned int col ) const;
-
- virtual bool SetValueByRow( const wxVariant &value,
- unsigned int row, unsigned int col );
-
-
-public:
- wxVector m_data;
- wxArrayString m_cols;
-};
-
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewListCtrl: public wxDataViewCtrl
-{
-public:
- wxDataViewListCtrl();
- wxDataViewListCtrl( wxWindow *parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
- const wxValidator& validator = wxDefaultValidator );
- ~wxDataViewListCtrl();
-
- bool Create( wxWindow *parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
- const wxValidator& validator = wxDefaultValidator );
-
- wxDataViewListStore *GetStore()
- { return (wxDataViewListStore*) GetModel(); }
- const wxDataViewListStore *GetStore() const
- { return (const wxDataViewListStore*) GetModel(); }
-
- int ItemToRow(const wxDataViewItem &item) const
- { return item.IsOk() ? (int)GetStore()->GetRow(item) : wxNOT_FOUND; }
- wxDataViewItem RowToItem(int row) const
- { return row == wxNOT_FOUND ? wxDataViewItem() : GetStore()->GetItem(row); }
-
- int GetSelectedRow() const
- { return ItemToRow(GetSelection()); }
- void SelectRow(unsigned row)
- { Select(RowToItem(row)); }
- void UnselectRow(unsigned row)
- { Unselect(RowToItem(row)); }
- bool IsRowSelected(unsigned row) const
- { return IsSelected(RowToItem(row)); }
-
- bool AppendColumn( wxDataViewColumn *column, const wxString &varianttype );
- bool PrependColumn( wxDataViewColumn *column, const wxString &varianttype );
- bool InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype );
-
- // overridden from base class
- virtual bool PrependColumn( wxDataViewColumn *col );
- virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
- virtual bool AppendColumn( wxDataViewColumn *col );
-#if wxABI_VERSION >= 30001
- virtual bool ClearColumns();
-#endif
-
- wxDataViewColumn *AppendTextColumn( const wxString &label,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendToggleColumn( const wxString &label,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
- int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendProgressColumn( const wxString &label,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn *AppendIconTextColumn( const wxString &label,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
-
- void AppendItem( const wxVector &values, wxUIntPtr data = 0 )
- { GetStore()->AppendItem( values, data ); }
- void PrependItem( const wxVector &values, wxUIntPtr data = 0 )
- { GetStore()->PrependItem( values, data ); }
- void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 )
- { GetStore()->InsertItem( row, values, data ); }
- void DeleteItem( unsigned row )
- { GetStore()->DeleteItem( row ); }
- void DeleteAllItems()
- { GetStore()->DeleteAllItems(); }
-
- void SetValue( const wxVariant &value, unsigned int row, unsigned int col )
- { GetStore()->SetValueByRow( value, row, col );
- GetStore()->RowValueChanged( row, col); }
- void GetValue( wxVariant &value, unsigned int row, unsigned int col )
- { GetStore()->GetValueByRow( value, row, col ); }
-
- void SetTextValue( const wxString &value, unsigned int row, unsigned int col )
- { GetStore()->SetValueByRow( value, row, col );
- GetStore()->RowValueChanged( row, col); }
- wxString GetTextValue( unsigned int row, unsigned int col ) const
- { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetString(); }
-
- void SetToggleValue( bool value, unsigned int row, unsigned int col )
- { GetStore()->SetValueByRow( value, row, col );
- GetStore()->RowValueChanged( row, col); }
- bool GetToggleValue( unsigned int row, unsigned int col ) const
- { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); }
-
- void SetItemData( const wxDataViewItem& item, wxUIntPtr data )
- { GetStore()->SetItemData( item, data ); }
- wxUIntPtr GetItemData( const wxDataViewItem& item ) const
- { return GetStore()->GetItemData( item ); }
-
- int GetItemCount() const
- { return GetStore()->GetItemCount(); }
-
- void OnSize( wxSizeEvent &event );
-
-private:
- DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewListCtrl)
-};
-
-//-----------------------------------------------------------------------------
-// wxDataViewTreeStore
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewTreeStoreNode
-{
-public:
- wxDataViewTreeStoreNode( wxDataViewTreeStoreNode *parent,
- const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
- virtual ~wxDataViewTreeStoreNode();
-
- void SetText( const wxString &text )
- { m_text = text; }
- wxString GetText() const
- { return m_text; }
- void SetIcon( const wxIcon &icon )
- { m_icon = icon; }
- const wxIcon &GetIcon() const
- { return m_icon; }
- void SetData( wxClientData *data )
- { if (m_data) delete m_data; m_data = data; }
- wxClientData *GetData() const
- { return m_data; }
-
- wxDataViewItem GetItem() const
- { return wxDataViewItem( (void*) this ); }
-
- virtual bool IsContainer()
- { return false; }
-
- wxDataViewTreeStoreNode *GetParent()
- { return m_parent; }
-
-private:
- wxDataViewTreeStoreNode *m_parent;
- wxString m_text;
- wxIcon m_icon;
- wxClientData *m_data;
-};
-
-WX_DECLARE_LIST_WITH_DECL(wxDataViewTreeStoreNode, wxDataViewTreeStoreNodeList,
- class WXDLLIMPEXP_ADV);
-
-class WXDLLIMPEXP_ADV wxDataViewTreeStoreContainerNode: public wxDataViewTreeStoreNode
-{
-public:
- wxDataViewTreeStoreContainerNode( wxDataViewTreeStoreNode *parent,
- const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
- wxClientData *data = NULL );
- virtual ~wxDataViewTreeStoreContainerNode();
-
- const wxDataViewTreeStoreNodeList &GetChildren() const
- { return m_children; }
- wxDataViewTreeStoreNodeList &GetChildren()
- { return m_children; }
-
- void SetExpandedIcon( const wxIcon &icon )
- { m_iconExpanded = icon; }
- const wxIcon &GetExpandedIcon() const
- { return m_iconExpanded; }
-
- void SetExpanded( bool expanded = true )
- { m_isExpanded = expanded; }
- bool IsExpanded() const
- { return m_isExpanded; }
-
- virtual bool IsContainer()
- { return true; }
-
-private:
- wxDataViewTreeStoreNodeList m_children;
- wxIcon m_iconExpanded;
- bool m_isExpanded;
-};
-
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewTreeStore: public wxDataViewModel
-{
-public:
- wxDataViewTreeStore();
- ~wxDataViewTreeStore();
-
- wxDataViewItem AppendItem( const wxDataViewItem& parent,
- const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
- wxDataViewItem PrependItem( const wxDataViewItem& parent,
- const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
- wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
- const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
-
- wxDataViewItem PrependContainer( const wxDataViewItem& parent,
- const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
- wxClientData *data = NULL );
- wxDataViewItem AppendContainer( const wxDataViewItem& parent,
- const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
- wxClientData *data = NULL );
- wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
- const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
- wxClientData *data = NULL );
-
- wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const;
- int GetChildCount( const wxDataViewItem& parent ) const;
-
- void SetItemText( const wxDataViewItem& item, const wxString &text );
- wxString GetItemText( const wxDataViewItem& item ) const;
- void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon );
- const wxIcon &GetItemIcon( const wxDataViewItem& item ) const;
- void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon );
- const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const;
- void SetItemData( const wxDataViewItem& item, wxClientData *data );
- wxClientData *GetItemData( const wxDataViewItem& item ) const;
-
- void DeleteItem( const wxDataViewItem& item );
- void DeleteChildren( const wxDataViewItem& item );
- void DeleteAllItems();
-
- // implement base methods
-
- virtual void GetValue( wxVariant &variant,
- const wxDataViewItem &item, unsigned int col ) const;
- virtual bool SetValue( const wxVariant &variant,
- const wxDataViewItem &item, unsigned int col );
- virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
- virtual bool IsContainer( const wxDataViewItem &item ) const;
- virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
-
- virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
- unsigned int column, bool ascending ) const;
-
- virtual bool HasDefaultCompare() const
- { return true; }
- virtual unsigned int GetColumnCount() const
- { return 1; }
- virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const
- { return wxT("wxDataViewIconText"); }
-
- wxDataViewTreeStoreNode *FindNode( const wxDataViewItem &item ) const;
- wxDataViewTreeStoreContainerNode *FindContainerNode( const wxDataViewItem &item ) const;
- wxDataViewTreeStoreNode *GetRoot() const { return m_root; }
-
-public:
- wxDataViewTreeStoreNode *m_root;
-};
-
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl,
- public wxWithImages
-{
-public:
- wxDataViewTreeCtrl() { }
- wxDataViewTreeCtrl(wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
- const wxValidator& validator = wxDefaultValidator)
- {
- Create(parent, id, pos, size, style, validator);
- }
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
- const wxValidator& validator = wxDefaultValidator);
-
- wxDataViewTreeStore *GetStore()
- { return (wxDataViewTreeStore*) GetModel(); }
- const wxDataViewTreeStore *GetStore() const
- { return (const wxDataViewTreeStore*) GetModel(); }
-
- bool IsContainer( const wxDataViewItem& item ) const
- { return GetStore()->IsContainer(item); }
-
- wxDataViewItem AppendItem( const wxDataViewItem& parent,
- const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
- wxDataViewItem PrependItem( const wxDataViewItem& parent,
- const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
- wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
- const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
-
- wxDataViewItem PrependContainer( const wxDataViewItem& parent,
- const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
- wxClientData *data = NULL );
- wxDataViewItem AppendContainer( const wxDataViewItem& parent,
- const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
- wxClientData *data = NULL );
- wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
- const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
- wxClientData *data = NULL );
-
- wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const
- { return GetStore()->GetNthChild(parent, pos); }
- int GetChildCount( const wxDataViewItem& parent ) const
- { return GetStore()->GetChildCount(parent); }
-
- void SetItemText( const wxDataViewItem& item, const wxString &text );
- wxString GetItemText( const wxDataViewItem& item ) const
- { return GetStore()->GetItemText(item); }
- void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon );
- const wxIcon &GetItemIcon( const wxDataViewItem& item ) const
- { return GetStore()->GetItemIcon(item); }
- void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon );
- const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const
- { return GetStore()->GetItemExpandedIcon(item); }
- void SetItemData( const wxDataViewItem& item, wxClientData *data )
- { GetStore()->SetItemData(item,data); }
- wxClientData *GetItemData( const wxDataViewItem& item ) const
- { return GetStore()->GetItemData(item); }
-
- void DeleteItem( const wxDataViewItem& item );
- void DeleteChildren( const wxDataViewItem& item );
- void DeleteAllItems();
-
- void OnExpanded( wxDataViewEvent &event );
- void OnCollapsed( wxDataViewEvent &event );
- void OnSize( wxSizeEvent &event );
-
-private:
- DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl)
-};
-
-// old wxEVT_COMMAND_* constants
-#define wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED wxEVT_DATAVIEW_SELECTION_CHANGED
-#define wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED wxEVT_DATAVIEW_ITEM_ACTIVATED
-#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED wxEVT_DATAVIEW_ITEM_COLLAPSED
-#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED wxEVT_DATAVIEW_ITEM_EXPANDED
-#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING wxEVT_DATAVIEW_ITEM_COLLAPSING
-#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING wxEVT_DATAVIEW_ITEM_EXPANDING
-#define wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING wxEVT_DATAVIEW_ITEM_START_EDITING
-#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED wxEVT_DATAVIEW_ITEM_EDITING_STARTED
-#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE wxEVT_DATAVIEW_ITEM_EDITING_DONE
-#define wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
-#define wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU wxEVT_DATAVIEW_ITEM_CONTEXT_MENU
-#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_CLICK
-#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
-#define wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED wxEVT_DATAVIEW_COLUMN_SORTED
-#define wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED wxEVT_DATAVIEW_COLUMN_REORDERED
-#define wxEVT_COMMAND_DATAVIEW_CACHE_HINT wxEVT_DATAVIEW_CACHE_HINT
-#define wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG wxEVT_DATAVIEW_ITEM_BEGIN_DRAG
-#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE
-#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP wxEVT_DATAVIEW_ITEM_DROP
-
-#endif // wxUSE_DATAVIEWCTRL
-
-#endif
- // _WX_DATAVIEW_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/datectrl.h b/Source/3rd Party/wx/include/wx/datectrl.h
deleted file mode 100644
index 6fa4367c0..000000000
--- a/Source/3rd Party/wx/include/wx/datectrl.h
+++ /dev/null
@@ -1,113 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/datectrl.h
-// Purpose: implements wxDatePickerCtrl
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 2005-01-09
-// 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/datetimectrl.h" // the base class
-
-#define wxDatePickerCtrlNameStr wxT("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 wxDateTimePickerCtrl
-{
-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);
- */
-
- /*
- We inherit the methods to set/get the date from the base class.
-
- virtual void SetValue(const wxDateTime& dt) = 0;
- virtual wxDateTime GetValue() const = 0;
- */
-
- // And add methods to 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(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/datectrl.h"
-
- #define wxHAS_NATIVE_DATEPICKCTRL
-#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
- #include "wx/osx/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/Source/3rd Party/wx/include/wx/dateevt.h b/Source/3rd Party/wx/include/wx/dateevt.h
deleted file mode 100644
index 4131ab383..000000000
--- a/Source/3rd Party/wx/include/wx/dateevt.h
+++ /dev/null
@@ -1,64 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/dateevt.h
-// Purpose: declares wxDateEvent class
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 2005-01-10
-// 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, wxDatePickerCtrl and wxTimePickerCtrl.
-// ----------------------------------------------------------------------------
-
-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
-// ----------------------------------------------------------------------------
-
-wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent);
-wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_TIME_CHANGED, wxDateEvent);
-
-typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
-
-#define wxDateEventHandler(func) \
- wxEVENT_HANDLER_CAST(wxDateEventFunction, func)
-
-#define EVT_DATE_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
-
-#define EVT_TIME_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_TIME_CHANGED, id, wxDateEventHandler(fn))
-
-#endif // _WX_DATEEVT_H_
-
diff --git a/Source/3rd Party/wx/include/wx/datetime.h b/Source/3rd Party/wx/include/wx/datetime.h
index 12a41e632..f527b9d42 100644
--- a/Source/3rd Party/wx/include/wx/datetime.h
+++ b/Source/3rd Party/wx/include/wx/datetime.h
@@ -5,6 +5,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 10.02.99
+// RCS-ID: $Id: datetime.h 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -16,23 +17,19 @@
#if wxUSE_DATETIME
-#ifdef __WXWINCE__
- #include "wx/msw/wince/time.h"
+#ifndef __WXWINCE__
+#include
#else
- #include
-#endif // OS
+#include "wx/msw/wince/time.h"
+#endif
#include // for INT_MIN
#include "wx/longlong.h"
-#include "wx/anystr.h"
class WXDLLIMPEXP_FWD_BASE wxDateTime;
class WXDLLIMPEXP_FWD_BASE wxTimeSpan;
class WXDLLIMPEXP_FWD_BASE wxDateSpan;
-#ifdef __WINDOWS__
-struct _SYSTEMTIME;
-#endif
#include "wx/dynarray.h"
@@ -40,8 +37,11 @@ struct _SYSTEMTIME;
// set this to the corresponding value in seconds 1/1/1970 has on your
// systems c-runtime
-#define WX_TIME_BASE_OFFSET 0
-
+#if defined(__WXMAC__) && !defined(__DARWIN__) && __MSL__ < 0x6000
+ #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L )
+#else
+ #define WX_TIME_BASE_OFFSET 0
+#endif
/*
* TODO
*
@@ -52,6 +52,27 @@ struct _SYSTEMTIME;
* 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:
@@ -106,25 +127,12 @@ struct _SYSTEMTIME;
// wxInvalidDateTime)
class WXDLLIMPEXP_FWD_BASE wxDateTime;
-extern WXDLLIMPEXP_DATA_BASE(const char) wxDefaultDateTimeFormat[];
-extern WXDLLIMPEXP_DATA_BASE(const char) wxDefaultTimeSpanFormat[];
+extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultDateTimeFormat;
+extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultTimeSpanFormat;
extern WXDLLIMPEXP_DATA_BASE(const wxDateTime) wxDefaultDateTime;
#define wxInvalidDateTime wxDefaultDateTime
-
-// ----------------------------------------------------------------------------
-// conditional compilation
-// ----------------------------------------------------------------------------
-
-// if configure detected strftime(), we have it too
-#ifdef HAVE_STRFTIME
- #define wxHAS_STRFTIME
-// suppose everyone else has strftime except Win CE unless VC8 is used
-#elif !defined(__WXWINCE__) || defined(__VISUALC8__)
- #define wxHAS_STRFTIME
-#endif
-
// ----------------------------------------------------------------------------
// wxDateTime represents an absolute moment in the time
// ----------------------------------------------------------------------------
@@ -151,7 +159,7 @@ public:
// the time in the current time zone
Local,
- // zones from GMT (= Greenwich Mean Time): they're guaranteed to be
+ // 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
@@ -221,6 +229,124 @@ public:
// 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
@@ -289,22 +415,26 @@ public:
// helper classes
// ------------------------------------------------------------------------
- // a class representing a time zone: basically, this is just an offset
+ // a class representing a time zone: basicly, this is just an offset
// (in seconds) from GMT
class WXDLLIMPEXP_BASE TimeZone
{
public:
TimeZone(TZ tz);
- // create time zone object with the given offset
- TimeZone(long offset = 0) { m_offset = offset; }
+ // 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; }
@@ -322,9 +452,7 @@ public:
// instead of modifying the member fields directly!
struct WXDLLIMPEXP_BASE Tm
{
- wxDateTime_t msec, sec, min, hour,
- mday, // Day of the month in 1..31 range.
- yday; // Day of the year in 0..365 range.
+ wxDateTime_t msec, sec, min, hour, mday;
Month mon;
int year;
@@ -359,10 +487,9 @@ public:
// the timezone we correspond to
TimeZone m_tz;
- // This value can only be accessed via GetWeekDay() and not directly
- // because it's not always computed when creating this object and may
- // need to be calculated on demand.
- wxDateTime_t wday;
+ // 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
@@ -405,25 +532,16 @@ public:
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 standard English full (default) or abbreviated month name
- static wxString GetEnglishMonthName(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 standard English full (default) or abbreviated weekday name
- static wxString GetEnglishWeekDayName(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);
@@ -459,7 +577,7 @@ public:
// ------------------------------------------------------------------------
// default ctor does not initialize the object, use Set()!
- wxDateTime() { m_time = wxLongLong(wxINT32_MIN, 0); }
+ 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))
@@ -487,12 +605,6 @@ public:
wxDateTime_t minute = 0,
wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
-#ifdef __WINDOWS__
- wxDateTime(const struct _SYSTEMTIME& st)
- {
- SetFromMSWSysTime(st);
- }
-#endif
// default copy ctor ok
@@ -540,9 +652,11 @@ public:
// 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
@@ -574,7 +688,7 @@ public:
// default assignment operator is ok
// calendar calculations (functions which set the date only leave the time
- // unchanged, e.g. don't explicitly zero it): SetXXX() functions modify the
+ // unchanged, e.g. don't explictly zero it): SetXXX() functions modify the
// object itself, GetXXX() ones return a new object.
// ------------------------------------------------------------------------
@@ -592,7 +706,7 @@ public:
wxDateTime& SetToPrevWeekDay(WeekDay weekday);
inline wxDateTime GetPrevWeekDay(WeekDay weekday) const;
- // set to Nth occurrence of given weekday in the given month of the
+ // 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())
@@ -790,6 +904,14 @@ public:
// 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
// ------------------------------------------------------------------------
@@ -799,20 +921,6 @@ public:
// pack the date in DOS format
unsigned long GetAsDOS() const;
- // SYSTEMTIME format
- // ------------------------------------------------------------------------
-#ifdef __WINDOWS__
- // convert SYSTEMTIME to wxDateTime
- wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st);
-
- // convert wxDateTime to SYSTEMTIME
- void GetAsMSWSysTime(struct _SYSTEMTIME* st) const;
-
- // same as above but only take date part into account, time is always zero
- wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st);
- void GetAsMSWSysDate(struct _SYSTEMTIME* st) const;
-#endif // __WINDOWS__
-
// comparison (see also functions below for operator versions)
// ------------------------------------------------------------------------
@@ -936,195 +1044,46 @@ public:
inline wxTimeSpan Subtract(const wxDateTime& dt) const;
inline wxTimeSpan operator-(const wxDateTime& dt2) const;
- wxDateSpan DiffAsDateSpan(const wxDateTime& dt) const;
-
- // conversion to/from text
+ // 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.
// ------------------------------------------------------------------------
- // all conversions functions return true to indicate whether parsing
- // succeeded or failed and fill in the provided end iterator, which must
- // not be NULL, with the location of the character where the parsing
- // stopped (this will be end() of the passed string if everything was
- // parsed)
-
// 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")
- bool ParseRfc822Date(const wxString& date,
- wxString::const_iterator *end);
-
+ 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)
- bool ParseFormat(const wxString& date,
- const wxString& format,
- const wxDateTime& dateDef,
- wxString::const_iterator *end);
-
- bool ParseFormat(const wxString& date,
- const wxString& format,
- wxString::const_iterator *end)
- {
- return ParseFormat(date, format, wxDefaultDateTime, end);
- }
-
- bool ParseFormat(const wxString& date,
- wxString::const_iterator *end)
- {
- return ParseFormat(date, wxDefaultDateTimeFormat, wxDefaultDateTime, end);
- }
-
- // parse a string containing date, time or both in ISO 8601 format
- //
- // notice that these functions are new in wx 3.0 and so we don't
- // provide compatibility overloads for them
- bool ParseISODate(const wxString& date)
- {
- wxString::const_iterator end;
- return ParseFormat(date, wxS("%Y-%m-%d"), &end) && end == date.end();
- }
-
- bool ParseISOTime(const wxString& time)
- {
- wxString::const_iterator end;
- return ParseFormat(time, wxS("%H:%M:%S"), &end) && end == time.end();
- }
-
- bool ParseISOCombined(const wxString& datetime, char sep = 'T')
- {
- wxString::const_iterator end;
- const wxString fmt = wxS("%Y-%m-%d") + wxString(sep) + wxS("%H:%M:%S");
- return ParseFormat(datetime, fmt, &end) && end == datetime.end();
- }
-
+ 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
- bool ParseDateTime(const wxString& datetime,
- wxString::const_iterator *end);
-
+ const wxChar *ParseDateTime(const wxChar *datetime);
// parse a string containing the date only in "free" format (less
// flexible than ParseDateTime)
- bool ParseDate(const wxString& date,
- wxString::const_iterator *end);
-
+ const wxChar *ParseDate(const wxChar *date);
// parse a string containing the time only in "free" format
- bool ParseTime(const wxString& time,
- wxString::const_iterator *end);
-
+ 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 wxString& format = wxDefaultDateTimeFormat,
+ wxString Format(const wxChar *format = wxDefaultDateTimeFormat,
const TimeZone& tz = Local) const;
// preferred date representation for the current locale
- wxString FormatDate() const { return Format(wxS("%x")); }
+ wxString FormatDate() const { return Format(wxT("%x")); }
// preferred time representation for the current locale
- wxString FormatTime() const { return Format(wxS("%X")); }
+ wxString FormatTime() const { return Format(wxT("%X")); }
// returns the string representing the date in ISO 8601 format
// (YYYY-MM-DD)
- wxString FormatISODate() const { return Format(wxS("%Y-%m-%d")); }
+ wxString FormatISODate() const { return Format(wxT("%Y-%m-%d")); }
// returns the string representing the time in ISO 8601 format
// (HH:MM:SS)
- wxString FormatISOTime() const { return Format(wxS("%H:%M:%S")); }
- // return the combined date time representation in ISO 8601 format; the
- // separator character should be 'T' according to the standard but it
- // can also be useful to set it to ' '
- wxString FormatISOCombined(char sep = 'T') const
- { return FormatISODate() + sep + FormatISOTime(); }
-
-
- // backwards compatible versions of the parsing functions: they return an
- // object representing the next character following the date specification
- // (i.e. the one where the scan had to stop) or a special NULL-like object
- // on failure
- //
- // they're not deprecated because a lot of existing code uses them and
- // there is no particular harm in keeping them but you should still prefer
- // the versions above in the new code
- wxAnyStrPtr ParseRfc822Date(const wxString& date)
- {
- wxString::const_iterator end;
- return ParseRfc822Date(date, &end) ? wxAnyStrPtr(date, end)
- : wxAnyStrPtr();
- }
-
- wxAnyStrPtr ParseFormat(const wxString& date,
- const wxString& format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime)
- {
- wxString::const_iterator end;
- return ParseFormat(date, format, dateDef, &end) ? wxAnyStrPtr(date, end)
- : wxAnyStrPtr();
- }
-
- wxAnyStrPtr ParseDateTime(const wxString& datetime)
- {
- wxString::const_iterator end;
- return ParseDateTime(datetime, &end) ? wxAnyStrPtr(datetime, end)
- : wxAnyStrPtr();
- }
-
- wxAnyStrPtr ParseDate(const wxString& date)
- {
- wxString::const_iterator end;
- return ParseDate(date, &end) ? wxAnyStrPtr(date, end)
- : wxAnyStrPtr();
- }
-
- wxAnyStrPtr ParseTime(const wxString& time)
- {
- wxString::const_iterator end;
- return ParseTime(time, &end) ? wxAnyStrPtr(time, end)
- : wxAnyStrPtr();
- }
-
- // In addition to wxAnyStrPtr versions above we also must provide the
- // overloads for C strings as we must return a pointer into the original
- // string and not inside a temporary wxString which would have been created
- // if the overloads above were used.
- //
- // And then we also have to provide the overloads for wxCStrData, as usual.
- // Unfortunately those ones can't return anything as we don't have any
- // sufficiently long-lived wxAnyStrPtr to return from them: any temporary
- // strings it would point to would be destroyed when this function returns
- // making it impossible to dereference the return value. So we just don't
- // return anything from here which at least allows to keep compatibility
- // with the code not testing the return value. Other uses of this method
- // need to be converted to use one of the new bool-returning overloads
- // above.
- void ParseRfc822Date(const wxCStrData& date)
- { ParseRfc822Date(wxString(date)); }
- const char* ParseRfc822Date(const char* date);
- const wchar_t* ParseRfc822Date(const wchar_t* date);
-
- void ParseFormat(const wxCStrData& date,
- const wxString& format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime)
- { ParseFormat(wxString(date), format, dateDef); }
- const char* ParseFormat(const char* date,
- const wxString& format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime);
- const wchar_t* ParseFormat(const wchar_t* date,
- const wxString& format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime);
-
- void ParseDateTime(const wxCStrData& datetime)
- { ParseDateTime(wxString(datetime)); }
- const char* ParseDateTime(const char* datetime);
- const wchar_t* ParseDateTime(const wchar_t* datetime);
-
- void ParseDate(const wxCStrData& date)
- { ParseDate(wxString(date)); }
- const char* ParseDate(const char* date);
- const wchar_t* ParseDate(const wchar_t* date);
-
- void ParseTime(const wxCStrData& time)
- { ParseTime(wxString(time)); }
- const char* ParseTime(const char* time);
- const wchar_t* ParseTime(const wchar_t* time);
-
+ wxString FormatISOTime() const { return Format(wxT("%H:%M:%S")); }
// implementation
// ------------------------------------------------------------------------
@@ -1136,7 +1095,7 @@ public:
inline wxLongLong GetValue() const;
// a helper function to get the current time_t
- static time_t GetTimeNow() { return time(NULL); }
+ static time_t GetTimeNow() { return time((time_t *)NULL); }
// another one to get the current time broken down
static struct tm *GetTmNow()
@@ -1293,7 +1252,7 @@ public:
// 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;
+ bool IsShorterThan(const wxTimeSpan& t) const { return !IsLongerThan(t); }
inline bool operator<(const wxTimeSpan &ts) const
{
@@ -1350,7 +1309,7 @@ public:
// 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 wxString& format = wxDefaultTimeSpanFormat) const;
+ wxString Format(const wxChar *format = wxDefaultTimeSpanFormat) const;
// implementation
// ------------------------------------------------------------------------
@@ -1452,8 +1411,6 @@ public:
int GetYears() const { return m_years; }
// get number of months
int GetMonths() const { return m_months; }
- // returns 12*GetYears() + GetMonths()
- int GetTotalMonths() const { return 12*m_years + m_months; }
// get number of weeks
int GetWeeks() const { return m_weeks; }
// get number of days
@@ -1630,9 +1587,7 @@ protected:
inline bool wxDateTime::IsInStdRange() const
{
- // currently we don't know what is the real type of time_t so prefer to err
- // on the safe side and limit it to 32 bit values which is safe everywhere
- return m_time >= 0l && (m_time / TIME_T_FACTOR) < wxINT32_MAX;
+ return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX;
}
/* static */
@@ -1654,16 +1609,9 @@ inline wxDateTime wxDateTime::Today()
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
inline wxDateTime& wxDateTime::Set(time_t timet)
{
- if ( timet == (time_t)-1 )
- {
- m_time = wxInvalidDateTime.m_time;
- }
- else
- {
- // assign first to avoid long multiplication overflow!
- m_time = timet - WX_TIME_BASE_OFFSET;
- m_time *= TIME_T_FACTOR;
- }
+ // assign first to avoid long multiplication overflow!
+ m_time = timet - WX_TIME_BASE_OFFSET ;
+ m_time *= TIME_T_FACTOR;
return *this;
}
@@ -1999,9 +1947,9 @@ inline wxLongLong wxTimeSpan::GetSeconds() const
inline int wxTimeSpan::GetMinutes() const
{
- // For compatibility, this method (and the other accessors) return int,
- // even though GetLo() actually returns unsigned long with greater range.
- return static_cast((GetSeconds() / 60l).GetLo());
+ // 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
@@ -2074,11 +2022,6 @@ inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
return GetValue().Abs() > ts.GetValue().Abs();
}
-inline bool wxTimeSpan::IsShorterThan(const wxTimeSpan& ts) const
-{
- return GetValue().Abs() < ts.GetValue().Abs();
-}
-
// ----------------------------------------------------------------------------
// wxDateSpan
// ----------------------------------------------------------------------------
diff --git a/Source/3rd Party/wx/include/wx/datetimectrl.h b/Source/3rd Party/wx/include/wx/datetimectrl.h
deleted file mode 100644
index 30f23dfff..000000000
--- a/Source/3rd Party/wx/include/wx/datetimectrl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/timectrl.h
-// Purpose: Declaration of wxDateTimePickerCtrl class.
-// Author: Vadim Zeitlin
-// Created: 2011-09-22
-// Copyright: (c) 2011 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATETIME_CTRL_H_
-#define _WX_DATETIME_CTRL_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
-
-#define wxNEEDS_DATETIMEPICKCTRL
-
-#include "wx/control.h" // the base class
-
-#include "wx/datetime.h"
-
-// ----------------------------------------------------------------------------
-// wxDateTimePickerCtrl: Private common base class of wx{Date,Time}PickerCtrl.
-// ----------------------------------------------------------------------------
-
-// This class is an implementation detail and should not be used directly, only
-// use the documented API of wxDateTimePickerCtrl and wxTimePickerCtrl.
-class WXDLLIMPEXP_ADV wxDateTimePickerCtrlBase : public wxControl
-{
-public:
- // Set/get the date or time (in the latter case, time part is ignored).
- virtual void SetValue(const wxDateTime& dt) = 0;
- virtual wxDateTime GetValue() const = 0;
-};
-
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/datetimectrl.h"
-#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
- #include "wx/osx/datetimectrl.h"
-#else
- typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl;
-#endif
-
-#endif // wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
-
-#endif // _WX_DATETIME_CTRL_H_
diff --git a/Source/3rd Party/wx/include/wx/datstrm.h b/Source/3rd Party/wx/include/wx/datstrm.h
index e96134deb..b6d00e43e 100644
--- a/Source/3rd Party/wx/include/wx/datstrm.h
+++ b/Source/3rd Party/wx/include/wx/datstrm.h
@@ -1,9 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/datstrm.h
+// 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
/////////////////////////////////////////////////////////////////////////////
@@ -17,64 +18,15 @@
#if wxUSE_STREAMS
-// Common wxDataInputStream and wxDataOutputStream parameters.
-class WXDLLIMPEXP_BASE wxDataStreamBase
+class WXDLLIMPEXP_BASE wxDataInputStream
{
public:
- void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
-
- // By default we use extended precision (80 bit) format for both float and
- // doubles. Call this function to switch to alternative representation in
- // which IEEE 754 single precision (32 bits) is used for floats and double
- // precision (64 bits) is used for doubles.
- void UseBasicPrecisions()
- {
-#if wxUSE_APPLE_IEEE
- m_useExtendedPrecision = false;
-#endif // wxUSE_APPLE_IEEE
- }
-
- // UseExtendedPrecision() is not very useful as it corresponds to the
- // default value, only call it in your code if you want the compilation
- // fail with the error when using wxWidgets library compiled without
- // extended precision support.
-#if wxUSE_APPLE_IEEE
- void UseExtendedPrecision()
- {
- m_useExtendedPrecision = true;
- }
-#endif // wxUSE_APPLE_IEEE
-
#if wxUSE_UNICODE
- void SetConv( const wxMBConv &conv );
- wxMBConv *GetConv() const { return m_conv; }
+ wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto());
+#else
+ wxDataInputStream(wxInputStream& s);
#endif
-
-protected:
- // Ctor and dtor are both protected, this class is never used directly but
- // only by its derived classes.
- wxDataStreamBase(const wxMBConv& conv);
- ~wxDataStreamBase();
-
-
- bool m_be_order;
-
-#if wxUSE_APPLE_IEEE
- bool m_useExtendedPrecision;
-#endif // wxUSE_APPLE_IEEE
-
-#if wxUSE_UNICODE
- wxMBConv *m_conv;
-#endif
-
- wxDECLARE_NO_COPY_CLASS(wxDataStreamBase);
-};
-
-
-class WXDLLIMPEXP_BASE wxDataInputStream : public wxDataStreamBase
-{
-public:
- wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvUTF8);
+ ~wxDataInputStream();
bool IsOk() { return m_input->IsOk(); }
@@ -88,7 +40,6 @@ public:
wxUint16 Read16();
wxUint8 Read8();
double ReadDouble();
- float ReadFloat();
wxString ReadString();
#if wxHAS_INT64
@@ -107,7 +58,6 @@ public:
void Read16(wxUint16 *buffer, size_t size);
void Read8(wxUint8 *buffer, size_t size);
void ReadDouble(double *buffer, size_t size);
- void ReadFloat(float *buffer, size_t size);
wxDataInputStream& operator>>(wxString& s);
wxDataInputStream& operator>>(wxInt8& c);
@@ -124,19 +74,30 @@ public:
wxDataInputStream& operator>>(wxULongLong& i);
wxDataInputStream& operator>>(wxLongLong& i);
#endif
- wxDataInputStream& operator>>(double& d);
+ 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
- wxDECLARE_NO_COPY_CLASS(wxDataInputStream);
+ DECLARE_NO_COPY_CLASS(wxDataInputStream)
};
-class WXDLLIMPEXP_BASE wxDataOutputStream : public wxDataStreamBase
+class WXDLLIMPEXP_BASE wxDataOutputStream
{
public:
- wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvUTF8);
+#if wxUSE_UNICODE
+ wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto());
+#else
+ wxDataOutputStream(wxOutputStream& s);
+#endif
+ ~wxDataOutputStream();
bool IsOk() { return m_output->IsOk(); }
@@ -152,7 +113,6 @@ public:
void Write16(wxUint16 i);
void Write8(wxUint8 i);
void WriteDouble(double d);
- void WriteFloat(float f);
void WriteString(const wxString& string);
#if wxHAS_INT64
@@ -171,8 +131,8 @@ public:
void Write16(const wxUint16 *buffer, size_t size);
void Write8(const wxUint8 *buffer, size_t size);
void WriteDouble(const double *buffer, size_t size);
- void WriteFloat(const float *buffer, size_t size);
+ wxDataOutputStream& operator<<(const wxChar *string);
wxDataOutputStream& operator<<(const wxString& string);
wxDataOutputStream& operator<<(wxInt8 c);
wxDataOutputStream& operator<<(wxInt16 i);
@@ -188,13 +148,19 @@ public:
wxDataOutputStream& operator<<(const wxULongLong &i);
wxDataOutputStream& operator<<(const wxLongLong &i);
#endif
- wxDataOutputStream& operator<<(double d);
+ 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
- wxDECLARE_NO_COPY_CLASS(wxDataOutputStream);
+ DECLARE_NO_COPY_CLASS(wxDataOutputStream)
};
#endif
diff --git a/Source/3rd Party/wx/include/wx/dc.h b/Source/3rd Party/wx/include/wx/dc.h
index 5806f0dfc..8448d8005 100644
--- a/Source/3rd Party/wx/include/wx/dc.h
+++ b/Source/3rd Party/wx/include/wx/dc.h
@@ -4,6 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 05/25/99
+// RCS-ID: $Id: dc.h 59768 2009-03-23 12:35:12Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -25,137 +26,25 @@
#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"
-#include "wx/image.h"
-#include "wx/region.h"
-#include "wx/affinematrix2d.h"
-
-#define wxUSE_NEW_DC 1
class WXDLLIMPEXP_FWD_CORE wxDC;
-class WXDLLIMPEXP_FWD_CORE wxClientDC;
-class WXDLLIMPEXP_FWD_CORE wxPaintDC;
-class WXDLLIMPEXP_FWD_CORE wxWindowDC;
-class WXDLLIMPEXP_FWD_CORE wxScreenDC;
-class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
-class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
-class WXDLLIMPEXP_FWD_CORE wxPrintData;
+class WXDLLIMPEXP_FWD_CORE wxDCBase;
-#if wxUSE_GRAPHICS_CONTEXT
-class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
-#endif
-
-// Logical ops
-enum wxRasterOperationMode
-{
- wxCLEAR, // 0
- wxXOR, // src XOR dst
- wxINVERT, // NOT dst
- wxOR_REVERSE, // src OR (NOT dst)
- wxAND_REVERSE, // src AND (NOT dst)
- wxCOPY, // src
- wxAND, // src AND dst
- wxAND_INVERT, // (NOT src) AND dst
- wxNO_OP, // dst
- wxNOR, // (NOT src) AND (NOT dst)
- wxEQUIV, // (NOT src) XOR dst
- wxSRC_INVERT, // (NOT src)
- wxOR_INVERT, // (NOT src) OR dst
- wxNAND, // (NOT src) OR (NOT dst)
- wxOR, // src OR dst
- wxSET // 1
-#if WXWIN_COMPATIBILITY_2_8
- ,wxROP_BLACK = wxCLEAR,
- wxBLIT_BLACKNESS = wxCLEAR,
- wxROP_XORPEN = wxXOR,
- wxBLIT_SRCINVERT = wxXOR,
- wxROP_NOT = wxINVERT,
- wxBLIT_DSTINVERT = wxINVERT,
- wxROP_MERGEPENNOT = wxOR_REVERSE,
- wxBLIT_00DD0228 = wxOR_REVERSE,
- wxROP_MASKPENNOT = wxAND_REVERSE,
- wxBLIT_SRCERASE = wxAND_REVERSE,
- wxROP_COPYPEN = wxCOPY,
- wxBLIT_SRCCOPY = wxCOPY,
- wxROP_MASKPEN = wxAND,
- wxBLIT_SRCAND = wxAND,
- wxROP_MASKNOTPEN = wxAND_INVERT,
- wxBLIT_00220326 = wxAND_INVERT,
- wxROP_NOP = wxNO_OP,
- wxBLIT_00AA0029 = wxNO_OP,
- wxROP_NOTMERGEPEN = wxNOR,
- wxBLIT_NOTSRCERASE = wxNOR,
- wxROP_NOTXORPEN = wxEQUIV,
- wxBLIT_00990066 = wxEQUIV,
- wxROP_NOTCOPYPEN = wxSRC_INVERT,
- wxBLIT_NOTSCRCOPY = wxSRC_INVERT,
- wxROP_MERGENOTPEN = wxOR_INVERT,
- wxBLIT_MERGEPAINT = wxOR_INVERT,
- wxROP_NOTMASKPEN = wxNAND,
- wxBLIT_007700E6 = wxNAND,
- wxROP_MERGEPEN = wxOR,
- wxBLIT_SRCPAINT = wxOR,
- wxROP_WHITE = wxSET,
- wxBLIT_WHITENESS = wxSET
-#endif //WXWIN_COMPATIBILITY_2_8
-};
-
-// Flood styles
-enum wxFloodFillStyle
-{
- wxFLOOD_SURFACE = 1,
- wxFLOOD_BORDER
-};
-
-// Mapping modes
-enum wxMappingMode
-{
- wxMM_TEXT = 1,
- wxMM_METRIC,
- wxMM_LOMETRIC,
- wxMM_TWIPS,
- wxMM_POINTS
-};
-
-// Description of text characteristics.
-struct wxFontMetrics
-{
- wxFontMetrics()
- {
- height =
- ascent =
- descent =
- internalLeading =
- externalLeading =
- averageWidth = 0;
- }
-
- int height, // Total character height.
- ascent, // Part of the height above the baseline.
- descent, // Part of the height below the baseline.
- internalLeading, // Intra-line spacing.
- externalLeading, // Inter-line spacing.
- averageWidth; // Average font width, a.k.a. "x-width".
-};
-
-#if WXWIN_COMPATIBILITY_2_8
-
-//-----------------------------------------------------------------------------
-// wxDrawObject helper class
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxDrawObject
+class WXDLLEXPORT wxDrawObject
{
public:
- wxDEPRECATED_CONSTRUCTOR(wxDrawObject)()
+
+ wxDrawObject()
: m_isBBoxValid(false)
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
{ }
virtual ~wxDrawObject() { }
- virtual void Draw(wxDC&) const { }
+ virtual void Draw(wxDCBase&) const { }
virtual void CalcBoundingBox(wxCoord x, wxCoord y)
{
@@ -201,116 +90,297 @@ protected:
wxCoord m_minX, m_minY, m_maxX, m_maxY;
};
-#endif // WXWIN_COMPATIBILITY_2_8
+// ---------------------------------------------------------------------------
+// global variables
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+// wxDC is the device context - object on which any drawing is done
+// ---------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// wxDCFactory
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_CORE wxDCImpl;
-
-class WXDLLIMPEXP_CORE wxDCFactory
+class WXDLLEXPORT wxDCBase : public wxObject
{
public:
- wxDCFactory() {}
- virtual ~wxDCFactory() {}
-
- virtual wxDCImpl* CreateWindowDC( wxWindowDC *owner, wxWindow *window ) = 0;
- virtual wxDCImpl* CreateClientDC( wxClientDC *owner, wxWindow *window ) = 0;
- virtual wxDCImpl* CreatePaintDC( wxPaintDC *owner, wxWindow *window ) = 0;
- virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner ) = 0;
- virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxBitmap &bitmap ) = 0;
- virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxDC *dc ) = 0;
- virtual wxDCImpl* CreateScreenDC( wxScreenDC *owner ) = 0;
-#if wxUSE_PRINTING_ARCHITECTURE
- virtual wxDCImpl* CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data ) = 0;
-#endif
-
- static void Set(wxDCFactory *factory);
- static wxDCFactory *Get();
-
-private:
- static wxDCFactory *m_factory;
-};
-
-//-----------------------------------------------------------------------------
-// wxNativeDCFactory
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxNativeDCFactory: public wxDCFactory
-{
-public:
- wxNativeDCFactory() {}
-
- virtual wxDCImpl* CreateWindowDC( wxWindowDC *owner, wxWindow *window );
- virtual wxDCImpl* CreateClientDC( wxClientDC *owner, wxWindow *window );
- virtual wxDCImpl* CreatePaintDC( wxPaintDC *owner, wxWindow *window );
- virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner );
- virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxBitmap &bitmap );
- virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxDC *dc );
- virtual wxDCImpl* CreateScreenDC( wxScreenDC *owner );
-#if wxUSE_PRINTING_ARCHITECTURE
- virtual wxDCImpl* CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data );
-#endif
-};
-
-//-----------------------------------------------------------------------------
-// wxDCImpl
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxDCImpl: public wxObject
-{
-public:
- wxDCImpl( wxDC *owner );
- virtual ~wxDCImpl();
-
- wxDC *GetOwner() const { return m_owner; }
-
- wxWindow* GetWindow() const { return m_window; }
-
- virtual bool IsOk() const { return m_ok; }
-
- // query capabilities
-
- virtual bool CanDrawBitmap() const = 0;
- virtual bool CanGetTextExtent() const = 0;
-
- // get Cairo context
- virtual void* GetCairoContext() const
+ 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
{
- return NULL;
+ ResetBoundingBox();
+ ResetClipping();
}
- virtual void* GetHandle() const { return NULL; }
+ 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);
+ }
- // query dimension, colour deps, resolution
-
- virtual void DoGetSize(int *width, int *height) const = 0;
- void GetSize(int *width, int *height) const
+ wxBitmap GetAsBitmap(const wxRect *subrect = (const wxRect *) NULL) const
{
- DoGetSize(width, height);
- return ;
+ return DoGetAsBitmap(subrect);
}
- wxSize GetSize() const
- {
- int w, h;
- DoGetSize(&w, &h);
- return wxSize(w, h);
- }
+#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[]);
- virtual void DoGetSizeMM(int* width, int* height) const = 0;
+ void DrawSpline(wxList *points) { DoDrawSpline(points); }
+#endif // wxUSE_SPLINES
- virtual int GetDepth() const = 0;
- virtual wxSize GetPPI() const = 0;
+ // 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 ); }
- // Right-To-Left (RTL) modes
+ 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 ); }
- virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir)) { }
- virtual wxLayoutDirection GetLayoutDirection() const { return wxLayout_Default; }
+ 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 ); }
- // page and document
+ 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() { }
@@ -318,10 +388,206 @@ public:
virtual void StartPage() { }
virtual void EndPage() { }
- // flushing the content of this dc immediately eg onto screen
- virtual void Flush() { }
+#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); }
+
+#if wxABI_VERSION >= 20811
+ void SetDeviceClippingRegion(const wxRegion& region)
+ { DoSetClippingRegionAsRegion(region); }
+#endif
+
+ 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)
{
@@ -342,6 +608,7 @@ public:
m_maxY = y;
}
}
+
void ResetBoundingBox()
{
m_isBBoxValid = false;
@@ -349,198 +616,79 @@ public:
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; }
- // setters and getters
+ // misc old functions
+ // ------------------
- virtual void SetFont(const wxFont& font) = 0;
- virtual const wxFont& GetFont() const { return m_font; }
-
- virtual void SetPen(const wxPen& pen) = 0;
- virtual const wxPen& GetPen() const { return m_pen; }
-
- virtual void SetBrush(const wxBrush& brush) = 0;
- virtual const wxBrush& GetBrush() const { return m_brush; }
-
- virtual void SetBackground(const wxBrush& brush) = 0;
- virtual const wxBrush& GetBackground() const { return m_backgroundBrush; }
-
- virtual void SetBackgroundMode(int mode) = 0;
- virtual int GetBackgroundMode() const { return m_backgroundMode; }
-
- virtual void SetTextForeground(const wxColour& colour)
- { m_textForegroundColour = colour; }
- virtual const wxColour& GetTextForeground() const
- { return m_textForegroundColour; }
-
- virtual void SetTextBackground(const wxColour& colour)
- { m_textBackgroundColour = colour; }
- virtual const wxColour& GetTextBackground() const
- { return m_textBackgroundColour; }
-
-#if wxUSE_PALETTE
- virtual void SetPalette(const wxPalette& palette) = 0;
-#endif // wxUSE_PALETTE
-
- // inherit the DC attributes (font and colours) from the given window
- //
- // this is called automatically when a window, client or paint DC is
- // created
- virtual void InheritAttributes(wxWindow *win);
-
-
- // logical functions
-
- virtual void SetLogicalFunction(wxRasterOperationMode function) = 0;
- virtual wxRasterOperationMode GetLogicalFunction() const
- { return m_logicalFunction; }
-
- // text measurement
-
- virtual wxCoord GetCharHeight() const = 0;
- virtual wxCoord GetCharWidth() const = 0;
-
- // The derived classes should really override DoGetFontMetrics() to return
- // the correct values in the future but for now provide a default
- // implementation in terms of DoGetTextExtent() to avoid breaking the
- // compilation of all other ports as wxMSW is the only one to implement it.
- virtual void DoGetFontMetrics(int *height,
- int *ascent,
- int *descent,
- int *internalLeading,
- int *externalLeading,
- int *averageWidth) const;
-
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- const wxFont *theFont = NULL) const = 0;
- virtual void GetMultiLineTextExtent(const wxString& string,
- wxCoord *width,
- wxCoord *height,
- wxCoord *heightLine = NULL,
- const wxFont *font = NULL) const;
- virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
-
- // clearing
-
- virtual void Clear() = 0;
-
- // clipping
-
- // Note that this pure virtual method has an implementation that updates
- // the values returned by DoGetClippingBox() and so can be called from the
- // derived class overridden version if it makes sense (i.e. if the clipping
- // box coordinates are not already updated in some other way).
- virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
- wxCoord w, wxCoord h) = 0;
-
- // NB: this function works with device coordinates, not the logical ones!
- virtual void DoSetDeviceClippingRegion(const wxRegion& region) = 0;
-
- virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
- wxCoord *w, wxCoord *h) const
+ // 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 = m_clipX1;
+ *x = x2;
if ( y )
- *y = m_clipY1;
- if ( w )
- *w = m_clipX2 - m_clipX1;
- if ( h )
- *h = m_clipY2 - m_clipY1;
+ *y = y2;
+ if ( descent )
+ *descent = descent2;
+ if ( externalLeading )
+ *externalLeading = externalLeading2;
}
- virtual void DestroyClippingRegion() { ResetClipping(); }
-
-
- // coordinates conversions and transforms
-
- virtual wxCoord DeviceToLogicalX(wxCoord x) const;
- virtual wxCoord DeviceToLogicalY(wxCoord y) const;
- virtual wxCoord DeviceToLogicalXRel(wxCoord x) const;
- virtual wxCoord DeviceToLogicalYRel(wxCoord y) const;
- virtual wxCoord LogicalToDeviceX(wxCoord x) const;
- virtual wxCoord LogicalToDeviceY(wxCoord y) const;
- virtual wxCoord LogicalToDeviceXRel(wxCoord x) const;
- virtual wxCoord LogicalToDeviceYRel(wxCoord y) const;
-
- virtual void SetMapMode(wxMappingMode mode);
- virtual wxMappingMode GetMapMode() const { return m_mappingMode; }
-
- virtual void SetUserScale(double x, double y);
- virtual void GetUserScale(double *x, double *y) const
+ void GetLogicalOrigin(long *x, long *y) const
{
- if ( x ) *x = m_userScaleX;
- if ( y ) *y = m_userScaleY;
+ wxCoord x2, y2;
+ DoGetLogicalOrigin(&x2, &y2);
+ if ( x )
+ *x = x2;
+ if ( y )
+ *y = y2;
}
- virtual void SetLogicalScale(double x, double y);
- virtual void GetLogicalScale(double *x, double *y) const
+ void GetDeviceOrigin(long *x, long *y) const
{
- if ( x ) *x = m_logicalScaleX;
- if ( y ) *y = m_logicalScaleY;
+ wxCoord x2, y2;
+ DoGetDeviceOrigin(&x2, &y2);
+ if ( x )
+ *x = x2;
+ if ( y )
+ *y = y2;
}
-
- virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
- virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const
+ void GetClippingBox(long *x, long *y, long *w, long *h) const
{
- if ( x ) *x = m_logicalOriginX;
- if ( y ) *y = m_logicalOriginY;
+ 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;
}
- virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
- virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const
- {
- if ( x ) *x = m_deviceOriginX;
- if ( y ) *y = m_deviceOriginY;
- }
+ // RTL related functions
+ // ---------------------
-#if wxUSE_DC_TRANSFORM_MATRIX
- // Transform matrix support is not available in most ports right now
- // (currently only wxMSW provides it) so do nothing in these methods by
- // default.
- virtual bool CanUseTransformMatrix() const
- { return false; }
- virtual bool SetTransformMatrix(const wxAffineMatrix2D& WXUNUSED(matrix))
- { return false; }
- virtual wxAffineMatrix2D GetTransformMatrix() const
- { return wxAffineMatrix2D(); }
- virtual void ResetTransformMatrix()
+ // 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))
{ }
-#endif // wxUSE_DC_TRANSFORM_MATRIX
-
- virtual void SetDeviceLocalOrigin( wxCoord x, wxCoord y );
-
- virtual void ComputeScaleAndOrigin();
-
- // this needs to overidden if the axis is inverted
- virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
-
- virtual double GetContentScaleFactor() const { return m_contentScaleFactor; }
-
-#ifdef __WXMSW__
- // Native Windows functions using the underlying HDC don't honour GDI+
- // transformations which may be applied to it. Using this function we can
- // transform the coordinates manually before passing them to such functions
- // (as in e.g. wxRendererMSW code). It doesn't do anything if this is not a
- // wxGCDC.
- virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const
- {
- return r;
- }
-#endif // __WXMSW__
-
-
- // ---------------------------------------------------------
- // the actual drawing API
+protected:
+ // the pure virtual functions which should be implemented by wxDC
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
- wxFloodFillStyle style = wxFLOOD_SURFACE) = 0;
+ int style = wxFLOOD_SURFACE) = 0;
virtual void DoGradientFillLinear(const wxRect& rect,
const wxColour& initialColour,
@@ -584,83 +732,78 @@ public:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height,
- wxDC *source,
- wxCoord xsrc, wxCoord ysrc,
- wxRasterOperationMode rop = wxCOPY,
- bool useMask = false,
- wxCoord xsrcMask = wxDefaultCoord,
- wxCoord ysrcMask = wxDefaultCoord) = 0;
+ wxDC *source, wxCoord xsrc, wxCoord ysrc,
+ int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) = 0;
- virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest,
- wxCoord dstWidth, wxCoord dstHeight,
- wxDC *source,
- wxCoord xsrc, wxCoord ysrc,
- wxCoord srcWidth, wxCoord srcHeight,
- wxRasterOperationMode rop = wxCOPY,
- bool useMask = false,
- wxCoord xsrcMask = wxDefaultCoord,
- wxCoord ysrcMask = wxDefaultCoord);
+ virtual wxBitmap DoGetAsBitmap(const wxRect *WXUNUSED(subrect)) const { return wxNullBitmap; }
- 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, const wxPoint points[],
- wxCoord xoffset, wxCoord yoffset ) = 0;
- virtual void DrawLines(const wxPointList *list,
- wxCoord xoffset, wxCoord yoffset );
-
- virtual void DoDrawPolygon(int n, const wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE) = 0;
- virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[],
+ virtual void DoDrawLines(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset) = 0;
+ virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle);
- void DrawPolygon(const wxPointList *list,
- wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle );
+ 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
- void DrawSpline(wxCoord x1, wxCoord y1,
- wxCoord x2, wxCoord y2,
- wxCoord x3, wxCoord y3);
- void DrawSpline(int n, const wxPoint points[]);
- void DrawSpline(const wxPointList *points) { DoDrawSpline(points); }
-
- virtual void DoDrawSpline(const wxPointList *points);
+ virtual void DoDrawSpline(wxList *points);
#endif
- // ---------------------------------------------------------
- // wxMemoryDC Impl API
-
- virtual void DoSelect(const wxBitmap& WXUNUSED(bmp))
- { }
-
- virtual const wxBitmap& GetSelectedBitmap() const
- { return wxNullBitmap; }
- virtual wxBitmap& GetSelectedBitmap()
- { return wxNullBitmap; }
-
- // ---------------------------------------------------------
- // wxPrinterDC Impl API
-
- virtual wxRect GetPaperRect() const
- { int w = 0; int h = 0; DoGetSize( &w, &h ); return wxRect(0,0,w,h); }
-
- virtual int GetResolution() const
- { return -1; }
-
-#if wxUSE_GRAPHICS_CONTEXT
- virtual wxGraphicsContext* GetGraphicsContext() const
- { return NULL; }
- virtual void SetGraphicsContext( wxGraphicsContext* WXUNUSED(ctx) )
- {}
+#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
-private:
- wxDC *m_owner;
-
protected:
// unset clipping variables (after clipping region was destroyed)
void ResetClipping()
@@ -670,61 +813,6 @@ protected:
m_clipX1 = m_clipX2 = m_clipY1 = m_clipY2 = 0;
}
-#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( wxPointList* points, double angle, wxPoint center = wxPoint(0,0) );
-
- // used by DrawEllipticArcRot
- // Careful: wxList gets filled with points you have to delete later.
- void CalculateEllipticPoints( wxPointList* points,
- wxCoord xStart, wxCoord yStart,
- wxCoord w, wxCoord h,
- double sa, double ea );
-#endif // __WXWINCE__
-
- // 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);
-
- // window on which the DC draws or NULL
- wxWindow *m_window;
-
// flags
bool m_colour:1;
bool m_ok:1;
@@ -734,35 +822,27 @@ protected:
// coordinate system variables
- wxCoord m_logicalOriginX, m_logicalOriginY;
- wxCoord m_deviceOriginX, m_deviceOriginY; // Usually 0,0, can be change by user
+ // TODO short descriptions of what exactly they are would be nice...
+
+ wxCoord m_logicalOriginX, m_logicalOriginY;
+ wxCoord m_deviceOriginX, m_deviceOriginY;
- wxCoord m_deviceLocalOriginX, m_deviceLocalOriginY; // non-zero if native top-left corner
- // is not at 0,0. This was the case under
- // Mac's GrafPorts (coordinate system
- // used toplevel window's origin) and
- // e.g. for Postscript, where the native
- // origin in the bottom left corner.
double m_logicalScaleX, m_logicalScaleY;
double m_userScaleX, m_userScaleY;
- double m_scaleX, m_scaleY; // calculated from logical scale and user scale
+ double m_scaleX, m_scaleY;
- int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes
-
- double m_contentScaleFactor; // used by high resolution displays (retina)
-
- // what is a mm on a screen you don't know the size of?
- double m_mm_to_pix_x,
- m_mm_to_pix_y;
+ // 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;
- wxRasterOperationMode m_logicalFunction;
+ int m_logicalFunction;
int m_backgroundMode;
- wxMappingMode m_mappingMode;
+ int m_mappingMode;
+ // GDI objects
wxPen m_pen;
wxBrush m_brush;
wxBrush m_backgroundBrush;
@@ -776,613 +856,48 @@ protected:
#endif // wxUSE_PALETTE
private:
- DECLARE_ABSTRACT_CLASS(wxDCImpl)
+ DECLARE_NO_COPY_CLASS(wxDCBase)
+ DECLARE_ABSTRACT_CLASS(wxDCBase)
};
-
-class WXDLLIMPEXP_CORE wxDC : public wxObject
-{
-public:
- // copy attributes (font, colours and writing direction) from another DC
- void CopyAttributes(const wxDC& dc);
-
- virtual ~wxDC() { delete m_pimpl; }
-
- wxDCImpl *GetImpl()
- { return m_pimpl; }
- const wxDCImpl *GetImpl() const
- { return m_pimpl; }
-
- wxWindow *GetWindow() const
- { return m_pimpl->GetWindow(); }
-
- void *GetHandle() const
- { return m_pimpl->GetHandle(); }
-
- bool IsOk() const
- { return m_pimpl && m_pimpl->IsOk(); }
-
- // query capabilities
-
- bool CanDrawBitmap() const
- { return m_pimpl->CanDrawBitmap(); }
- bool CanGetTextExtent() const
- { return m_pimpl->CanGetTextExtent(); }
-
- // query dimension, colour deps, resolution
-
- void GetSize(int *width, int *height) const
- { m_pimpl->DoGetSize(width, height); }
- wxSize GetSize() const
- { return m_pimpl->GetSize(); }
-
- void GetSizeMM(int* width, int* height) const
- { m_pimpl->DoGetSizeMM(width, height); }
- wxSize GetSizeMM() const
- {
- int w, h;
- m_pimpl->DoGetSizeMM(&w, &h);
- return wxSize(w, h);
- }
-
- int GetDepth() const
- { return m_pimpl->GetDepth(); }
- wxSize GetPPI() const
- { return m_pimpl->GetPPI(); }
-
- virtual int GetResolution() const
- { return m_pimpl->GetResolution(); }
-
- double GetContentScaleFactor() const
- { return m_pimpl->GetContentScaleFactor(); }
-
- // Right-To-Left (RTL) modes
-
- void SetLayoutDirection(wxLayoutDirection dir)
- { m_pimpl->SetLayoutDirection( dir ); }
- wxLayoutDirection GetLayoutDirection() const
- { return m_pimpl->GetLayoutDirection(); }
-
- // page and document
-
- bool StartDoc(const wxString& message)
- { return m_pimpl->StartDoc(message); }
- void EndDoc()
- { m_pimpl->EndDoc(); }
-
- void StartPage()
- { m_pimpl->StartPage(); }
- void EndPage()
- { m_pimpl->EndPage(); }
-
- // bounding box
-
- void CalcBoundingBox(wxCoord x, wxCoord y)
- { m_pimpl->CalcBoundingBox(x,y); }
- void ResetBoundingBox()
- { m_pimpl->ResetBoundingBox(); }
-
- wxCoord MinX() const
- { return m_pimpl->MinX(); }
- wxCoord MaxX() const
- { return m_pimpl->MaxX(); }
- wxCoord MinY() const
- { return m_pimpl->MinY(); }
- wxCoord MaxY() const
- { return m_pimpl->MaxY(); }
-
- // setters and getters
-
- void SetFont(const wxFont& font)
- { m_pimpl->SetFont( font ); }
- const wxFont& GetFont() const
- { return m_pimpl->GetFont(); }
-
- void SetPen(const wxPen& pen)
- { m_pimpl->SetPen( pen ); }
- const wxPen& GetPen() const
- { return m_pimpl->GetPen(); }
-
- void SetBrush(const wxBrush& brush)
- { m_pimpl->SetBrush( brush ); }
- const wxBrush& GetBrush() const
- { return m_pimpl->GetBrush(); }
-
- void SetBackground(const wxBrush& brush)
- { m_pimpl->SetBackground( brush ); }
- const wxBrush& GetBackground() const
- { return m_pimpl->GetBackground(); }
-
- void SetBackgroundMode(int mode)
- { m_pimpl->SetBackgroundMode( mode ); }
- int GetBackgroundMode() const
- { return m_pimpl->GetBackgroundMode(); }
-
- void SetTextForeground(const wxColour& colour)
- { m_pimpl->SetTextForeground(colour); }
- const wxColour& GetTextForeground() const
- { return m_pimpl->GetTextForeground(); }
-
- void SetTextBackground(const wxColour& colour)
- { m_pimpl->SetTextBackground(colour); }
- const wxColour& GetTextBackground() const
- { return m_pimpl->GetTextBackground(); }
-
-#if wxUSE_PALETTE
- void SetPalette(const wxPalette& palette)
- { m_pimpl->SetPalette(palette); }
-#endif // wxUSE_PALETTE
-
- // logical functions
-
- void SetLogicalFunction(wxRasterOperationMode function)
- { m_pimpl->SetLogicalFunction(function); }
- wxRasterOperationMode GetLogicalFunction() const
- { return m_pimpl->GetLogicalFunction(); }
-
- // text measurement
-
- wxCoord GetCharHeight() const
- { return m_pimpl->GetCharHeight(); }
- wxCoord GetCharWidth() const
- { return m_pimpl->GetCharWidth(); }
-
- wxFontMetrics GetFontMetrics() const
- {
- wxFontMetrics fm;
- m_pimpl->DoGetFontMetrics(&fm.height, &fm.ascent, &fm.descent,
- &fm.internalLeading, &fm.externalLeading,
- &fm.averageWidth);
- return fm;
- }
-
- void GetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- const wxFont *theFont = NULL) const
- { m_pimpl->DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
-
- wxSize GetTextExtent(const wxString& string) const
- {
- wxCoord w, h;
- m_pimpl->DoGetTextExtent(string, &w, &h);
- return wxSize(w, h);
- }
-
- void GetMultiLineTextExtent(const wxString& string,
- wxCoord *width,
- wxCoord *height,
- wxCoord *heightLine = NULL,
- const wxFont *font = NULL) const
- { m_pimpl->GetMultiLineTextExtent( string, width, height, heightLine, font ); }
-
- wxSize GetMultiLineTextExtent(const wxString& string) const
- {
- wxCoord w, h;
- m_pimpl->GetMultiLineTextExtent(string, &w, &h);
- return wxSize(w, h);
- }
-
- bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
- { return m_pimpl->DoGetPartialTextExtents(text, widths); }
-
- // clearing
-
- void Clear()
- { m_pimpl->Clear(); }
-
- // clipping
-
- void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- { m_pimpl->DoSetClippingRegion(x, y, width, height); }
- void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
- { m_pimpl->DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); }
- void SetClippingRegion(const wxRect& rect)
- { m_pimpl->DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); }
-
- // unlike the functions above, the coordinates of the region used in this
- // one are in device coordinates, not the logical ones
- void SetDeviceClippingRegion(const wxRegion& region)
- { m_pimpl->DoSetDeviceClippingRegion(region); }
-
- // this function is deprecated because its name is confusing: you may
- // expect it to work with logical coordinates but, in fact, it does exactly
- // the same thing as SetDeviceClippingRegion()
- //
- // please review the code using it and either replace it with calls to
- // SetDeviceClippingRegion() or correct it if it was [wrongly] passing
- // logical coordinates to this function
- wxDEPRECATED_INLINE(void SetClippingRegion(const wxRegion& region),
- SetDeviceClippingRegion(region); )
-
- void DestroyClippingRegion()
- { m_pimpl->DestroyClippingRegion(); }
-
- void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const
- { m_pimpl->DoGetClippingBox(x, y, w, h); }
- void GetClippingBox(wxRect& rect) const
- { m_pimpl->DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height); }
-
- // coordinates conversions and transforms
-
- wxCoord DeviceToLogicalX(wxCoord x) const
- { return m_pimpl->DeviceToLogicalX(x); }
- wxCoord DeviceToLogicalY(wxCoord y) const
- { return m_pimpl->DeviceToLogicalY(y); }
- wxCoord DeviceToLogicalXRel(wxCoord x) const
- { return m_pimpl->DeviceToLogicalXRel(x); }
- wxCoord DeviceToLogicalYRel(wxCoord y) const
- { return m_pimpl->DeviceToLogicalYRel(y); }
- wxCoord LogicalToDeviceX(wxCoord x) const
- { return m_pimpl->LogicalToDeviceX(x); }
- wxCoord LogicalToDeviceY(wxCoord y) const
- { return m_pimpl->LogicalToDeviceY(y); }
- wxCoord LogicalToDeviceXRel(wxCoord x) const
- { return m_pimpl->LogicalToDeviceXRel(x); }
- wxCoord LogicalToDeviceYRel(wxCoord y) const
- { return m_pimpl->LogicalToDeviceYRel(y); }
-
- void SetMapMode(wxMappingMode mode)
- { m_pimpl->SetMapMode(mode); }
- wxMappingMode GetMapMode() const
- { return m_pimpl->GetMapMode(); }
-
- void SetUserScale(double x, double y)
- { m_pimpl->SetUserScale(x,y); }
- void GetUserScale(double *x, double *y) const
- { m_pimpl->GetUserScale( x, y ); }
-
- void SetLogicalScale(double x, double y)
- { m_pimpl->SetLogicalScale( x, y ); }
- void GetLogicalScale(double *x, double *y) const
- { m_pimpl->GetLogicalScale( x, y ); }
-
- void SetLogicalOrigin(wxCoord x, wxCoord y)
- { m_pimpl->SetLogicalOrigin(x,y); }
- void GetLogicalOrigin(wxCoord *x, wxCoord *y) const
- { m_pimpl->DoGetLogicalOrigin(x, y); }
- wxPoint GetLogicalOrigin() const
- { wxCoord x, y; m_pimpl->DoGetLogicalOrigin(&x, &y); return wxPoint(x, y); }
-
- void SetDeviceOrigin(wxCoord x, wxCoord y)
- { m_pimpl->SetDeviceOrigin( x, y); }
- void GetDeviceOrigin(wxCoord *x, wxCoord *y) const
- { m_pimpl->DoGetDeviceOrigin(x, y); }
- wxPoint GetDeviceOrigin() const
- { wxCoord x, y; m_pimpl->DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); }
-
- void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
- { m_pimpl->SetAxisOrientation(xLeftRight, yBottomUp); }
-
-#if wxUSE_DC_TRANSFORM_MATRIX
- bool CanUseTransformMatrix() const
- { return m_pimpl->CanUseTransformMatrix(); }
-
- bool SetTransformMatrix(const wxAffineMatrix2D &matrix)
- { return m_pimpl->SetTransformMatrix(matrix); }
-
- wxAffineMatrix2D GetTransformMatrix() const
- { return m_pimpl->GetTransformMatrix(); }
-
- void ResetTransformMatrix()
- { m_pimpl->ResetTransformMatrix(); }
-#endif // wxUSE_DC_TRANSFORM_MATRIX
-
- // mostly internal
- void SetDeviceLocalOrigin( wxCoord x, wxCoord y )
- { m_pimpl->SetDeviceLocalOrigin( x, y ); }
-
-
- // -----------------------------------------------
- // the actual drawing API
-
- bool FloodFill(wxCoord x, wxCoord y, const wxColour& col,
- wxFloodFillStyle style = wxFLOOD_SURFACE)
- { return m_pimpl->DoFloodFill(x, y, col, style); }
- bool FloodFill(const wxPoint& pt, const wxColour& col,
- wxFloodFillStyle style = wxFLOOD_SURFACE)
- { return m_pimpl->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)
- { m_pimpl->DoGradientFillConcentric( rect, initialColour, destColour,
- wxPoint(rect.GetWidth() / 2,
- rect.GetHeight() / 2)); }
-
- void GradientFillConcentric(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- const wxPoint& circleCenter)
- { m_pimpl->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)
- { m_pimpl->DoGradientFillLinear(rect, initialColour, destColour, nDirection); }
-
- bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const
- { return m_pimpl->DoGetPixel(x, y, col); }
- bool GetPixel(const wxPoint& pt, wxColour *col) const
- { return m_pimpl->DoGetPixel(pt.x, pt.y, col); }
-
- void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
- { m_pimpl->DoDrawLine(x1, y1, x2, y2); }
- void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
- { m_pimpl->DoDrawLine(pt1.x, pt1.y, pt2.x, pt2.y); }
-
- void CrossHair(wxCoord x, wxCoord y)
- { m_pimpl->DoCrossHair(x, y); }
- void CrossHair(const wxPoint& pt)
- { m_pimpl->DoCrossHair(pt.x, pt.y); }
-
- void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
- wxCoord xc, wxCoord yc)
- { m_pimpl->DoDrawArc(x1, y1, x2, y2, xc, yc); }
- void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
- { m_pimpl->DoDrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); }
-
- void DrawCheckMark(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height)
- { m_pimpl->DoDrawCheckMark(x, y, width, height); }
- void DrawCheckMark(const wxRect& rect)
- { m_pimpl->DoDrawCheckMark(rect.x, rect.y, rect.width, rect.height); }
-
- void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
- double sa, double ea)
- { m_pimpl->DoDrawEllipticArc(x, y, w, h, sa, ea); }
- void DrawEllipticArc(const wxPoint& pt, const wxSize& sz,
- double sa, double ea)
- { m_pimpl->DoDrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); }
-
- void DrawPoint(wxCoord x, wxCoord y)
- { m_pimpl->DoDrawPoint(x, y); }
- void DrawPoint(const wxPoint& pt)
- { m_pimpl->DoDrawPoint(pt.x, pt.y); }
-
- void DrawLines(int n, const wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0)
- { m_pimpl->DoDrawLines(n, points, xoffset, yoffset); }
- void DrawLines(const wxPointList *list,
- wxCoord xoffset = 0, wxCoord yoffset = 0)
- { m_pimpl->DrawLines( list, xoffset, yoffset ); }
-#if WXWIN_COMPATIBILITY_2_8
- wxDEPRECATED( void DrawLines(const wxList *list,
- wxCoord xoffset = 0, wxCoord yoffset = 0) );
-#endif // WXWIN_COMPATIBILITY_2_8
-
- void DrawPolygon(int n, const wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
- { m_pimpl->DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); }
- void DrawPolygon(const wxPointList *list,
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
- { m_pimpl->DrawPolygon( list, xoffset, yoffset, fillStyle ); }
- void DrawPolyPolygon(int n, const int count[], const wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
- { m_pimpl->DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); }
-#if WXWIN_COMPATIBILITY_2_8
- wxDEPRECATED( void DrawPolygon(const wxList *list,
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE) );
-#endif // WXWIN_COMPATIBILITY_2_8
-
- void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- { m_pimpl->DoDrawRectangle(x, y, width, height); }
- void DrawRectangle(const wxPoint& pt, const wxSize& sz)
- { m_pimpl->DoDrawRectangle(pt.x, pt.y, sz.x, sz.y); }
- void DrawRectangle(const wxRect& rect)
- { m_pimpl->DoDrawRectangle(rect.x, rect.y, rect.width, rect.height); }
-
- void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height,
- double radius)
- { m_pimpl->DoDrawRoundedRectangle(x, y, width, height, radius); }
- void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz,
- double radius)
- { m_pimpl->DoDrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); }
- void DrawRoundedRectangle(const wxRect& r, double radius)
- { m_pimpl->DoDrawRoundedRectangle(r.x, r.y, r.width, r.height, radius); }
-
- void DrawCircle(wxCoord x, wxCoord y, wxCoord radius)
- { m_pimpl->DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); }
- void DrawCircle(const wxPoint& pt, wxCoord radius)
- { m_pimpl->DoDrawEllipse(pt.x - radius, pt.y - radius, 2*radius, 2*radius); }
-
- void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- { m_pimpl->DoDrawEllipse(x, y, width, height); }
- void DrawEllipse(const wxPoint& pt, const wxSize& sz)
- { m_pimpl->DoDrawEllipse(pt.x, pt.y, sz.x, sz.y); }
- void DrawEllipse(const wxRect& rect)
- { m_pimpl->DoDrawEllipse(rect.x, rect.y, rect.width, rect.height); }
-
- void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
- { m_pimpl->DoDrawIcon(icon, x, y); }
- void DrawIcon(const wxIcon& icon, const wxPoint& pt)
- { m_pimpl->DoDrawIcon(icon, pt.x, pt.y); }
-
- void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
- bool useMask = false)
- { m_pimpl->DoDrawBitmap(bmp, x, y, useMask); }
- void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt,
- bool useMask = false)
- { m_pimpl->DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
-
- void DrawText(const wxString& text, wxCoord x, wxCoord y)
- { m_pimpl->DoDrawText(text, x, y); }
- void DrawText(const wxString& text, const wxPoint& pt)
- { m_pimpl->DoDrawText(text, pt.x, pt.y); }
-
- void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
- { m_pimpl->DoDrawRotatedText(text, x, y, angle); }
- void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle)
- { m_pimpl->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
- 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,
- wxRasterOperationMode rop = wxCOPY, bool useMask = false,
- wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
- {
- return m_pimpl->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,
- wxRasterOperationMode rop = wxCOPY, bool useMask = false,
- const wxPoint& srcPtMask = wxDefaultPosition)
- {
- return m_pimpl->DoBlit(destPt.x, destPt.y, sz.x, sz.y,
- source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y);
- }
-
- bool StretchBlit(wxCoord dstX, wxCoord dstY,
- wxCoord dstWidth, wxCoord dstHeight,
- wxDC *source,
- wxCoord srcX, wxCoord srcY,
- wxCoord srcWidth, wxCoord srcHeight,
- wxRasterOperationMode rop = wxCOPY, bool useMask = false,
- wxCoord srcMaskX = wxDefaultCoord, wxCoord srcMaskY = wxDefaultCoord)
- {
- return m_pimpl->DoStretchBlit(dstX, dstY, dstWidth, dstHeight,
- source, srcX, srcY, srcWidth, srcHeight, rop, useMask, srcMaskX, srcMaskY);
- }
- bool StretchBlit(const wxPoint& dstPt, const wxSize& dstSize,
- wxDC *source, const wxPoint& srcPt, const wxSize& srcSize,
- wxRasterOperationMode rop = wxCOPY, bool useMask = false,
- const wxPoint& srcMaskPt = wxDefaultPosition)
- {
- return m_pimpl->DoStretchBlit(dstPt.x, dstPt.y, dstSize.x, dstSize.y,
- source, srcPt.x, srcPt.y, srcSize.x, srcSize.y, rop, useMask, srcMaskPt.x, srcMaskPt.y);
- }
-
- wxBitmap GetAsBitmap(const wxRect *subrect = (const wxRect *) NULL) const
- {
- return m_pimpl->DoGetAsBitmap(subrect);
- }
-
-#if wxUSE_SPLINES
- void DrawSpline(wxCoord x1, wxCoord y1,
- wxCoord x2, wxCoord y2,
- wxCoord x3, wxCoord y3)
- { m_pimpl->DrawSpline(x1,y1,x2,y2,x3,y3); }
- void DrawSpline(int n, const wxPoint points[])
- { m_pimpl->DrawSpline(n,points); }
- void DrawSpline(const wxPointList *points)
- { m_pimpl->DrawSpline(points); }
-#endif // wxUSE_SPLINES
-
-
-#if WXWIN_COMPATIBILITY_2_8
- // for compatibility with the old code when wxCoord was long everywhere
- wxDEPRECATED( void GetTextExtent(const wxString& string,
- long *x, long *y,
- long *descent = NULL,
- long *externalLeading = NULL,
- const wxFont *theFont = NULL) const );
- wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const );
- wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const );
- wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const );
-
- wxDEPRECATED( void DrawObject(wxDrawObject* drawobject) );
-#endif // WXWIN_COMPATIBILITY_2_8
-
-#ifdef __WXMSW__
- // GetHDC() is the simplest way to retrieve an HDC From a wxDC but only
- // works if this wxDC is GDI-based and fails for GDI+ contexts (and
- // anything else without HDC, e.g. wxPostScriptDC)
- WXHDC GetHDC() const;
-
- // don't use these methods manually, use GetTempHDC() instead
- virtual WXHDC AcquireHDC() { return GetHDC(); }
- virtual void ReleaseHDC(WXHDC WXUNUSED(hdc)) { }
-
- // helper class holding the result of GetTempHDC() with std::auto_ptr<>-like
- // semantics, i.e. it is moved when copied
- class TempHDC
- {
- public:
- TempHDC(wxDC& dc)
- : m_dc(dc),
- m_hdc(dc.AcquireHDC())
- {
- }
-
- TempHDC(const TempHDC& thdc)
- : m_dc(thdc.m_dc),
- m_hdc(thdc.m_hdc)
- {
- const_cast(thdc).m_hdc = 0;
- }
-
- ~TempHDC()
- {
- if ( m_hdc )
- m_dc.ReleaseHDC(m_hdc);
- }
-
- WXHDC GetHDC() const { return m_hdc; }
-
- private:
- wxDC& m_dc;
- WXHDC m_hdc;
-
- wxDECLARE_NO_ASSIGN_CLASS(TempHDC);
- };
-
- // GetTempHDC() also works for wxGCDC (but still not for wxPostScriptDC &c)
- TempHDC GetTempHDC() { return TempHDC(*this); }
-#endif // __WXMSW__
-
-#if wxUSE_GRAPHICS_CONTEXT
- virtual wxGraphicsContext* GetGraphicsContext() const
- {
- return m_pimpl->GetGraphicsContext();
- }
- virtual void SetGraphicsContext( wxGraphicsContext* ctx )
- {
- m_pimpl->SetGraphicsContext(ctx);
- }
+// ----------------------------------------------------------------------------
+// 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
-protected:
- // ctor takes ownership of the pointer
- wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { }
-
- wxDCImpl * const m_pimpl;
-
-private:
- DECLARE_ABSTRACT_CLASS(wxDC)
- wxDECLARE_NO_COPY_CLASS(wxDC);
-};
+#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 WXDLLIMPEXP_CORE wxDCTextColourChanger
+class WXDLLEXPORT wxDCTextColourChanger
{
public:
wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { }
@@ -1394,13 +909,13 @@ public:
~wxDCTextColourChanger()
{
- if ( m_colFgOld.IsOk() )
+ if ( m_colFgOld.Ok() )
m_dc.SetTextForeground(m_colFgOld);
}
void Set(const wxColour& col)
{
- if ( !m_colFgOld.IsOk() )
+ if ( !m_colFgOld.Ok() )
m_colFgOld = m_dc.GetTextForeground();
m_dc.SetTextForeground(col);
}
@@ -1410,7 +925,7 @@ private:
wxColour m_colFgOld;
- wxDECLARE_NO_COPY_CLASS(wxDCTextColourChanger);
+ DECLARE_NO_COPY_CLASS(wxDCTextColourChanger)
};
// ----------------------------------------------------------------------------
@@ -1418,7 +933,7 @@ private:
// restore it automatically when the object goes out of scope
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxDCPenChanger
+class WXDLLEXPORT wxDCPenChanger
{
public:
wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen())
@@ -1428,7 +943,7 @@ public:
~wxDCPenChanger()
{
- if ( m_penOld.IsOk() )
+ if ( m_penOld.Ok() )
m_dc.SetPen(m_penOld);
}
@@ -1437,7 +952,7 @@ private:
wxPen m_penOld;
- wxDECLARE_NO_COPY_CLASS(wxDCPenChanger);
+ DECLARE_NO_COPY_CLASS(wxDCPenChanger)
};
// ----------------------------------------------------------------------------
@@ -1445,7 +960,7 @@ private:
// restore it automatically when the object goes out of scope
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxDCBrushChanger
+class WXDLLEXPORT wxDCBrushChanger
{
public:
wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush())
@@ -1455,7 +970,7 @@ public:
~wxDCBrushChanger()
{
- if ( m_brushOld.IsOk() )
+ if ( m_brushOld.Ok() )
m_dc.SetBrush(m_brushOld);
}
@@ -1464,7 +979,7 @@ private:
wxBrush m_brushOld;
- wxDECLARE_NO_COPY_CLASS(wxDCBrushChanger);
+ DECLARE_NO_COPY_CLASS(wxDCBrushChanger)
};
// ----------------------------------------------------------------------------
@@ -1472,11 +987,11 @@ private:
// destroys it in the dtor
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxDCClipper
+class WXDLLEXPORT wxDCClipper
{
public:
wxDCClipper(wxDC& dc, const wxRegion& r) : m_dc(dc)
- { dc.SetClippingRegion(r.GetBox()); }
+ { 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)
@@ -1487,48 +1002,7 @@ public:
private:
wxDC& m_dc;
- wxDECLARE_NO_COPY_CLASS(wxDCClipper);
+ DECLARE_NO_COPY_CLASS(wxDCClipper)
};
-// ----------------------------------------------------------------------------
-// helper class: you can use it to temporarily change the DC font and
-// restore it automatically when the object goes out of scope
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxDCFontChanger
-{
-public:
- wxDCFontChanger(wxDC& dc)
- : m_dc(dc), m_fontOld()
- {
- }
-
- wxDCFontChanger(wxDC& dc, const wxFont& font)
- : m_dc(dc), m_fontOld(dc.GetFont())
- {
- m_dc.SetFont(font);
- }
-
- void Set(const wxFont& font)
- {
- if ( !m_fontOld.IsOk() )
- m_fontOld = m_dc.GetFont();
- m_dc.SetFont(font);
- }
-
- ~wxDCFontChanger()
- {
- if ( m_fontOld.IsOk() )
- m_dc.SetFont(m_fontOld);
- }
-
-private:
- wxDC& m_dc;
-
- wxFont m_fontOld;
-
- wxDECLARE_NO_COPY_CLASS(wxDCFontChanger);
-};
-
-
#endif // _WX_DC_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/dcbuffer.h b/Source/3rd Party/wx/include/wx/dcbuffer.h
index c869f72a7..6769dbc85 100644
--- a/Source/3rd Party/wx/include/wx/dcbuffer.h
+++ b/Source/3rd Party/wx/include/wx/dcbuffer.h
@@ -4,6 +4,7 @@
// Author: Ron Lee
// Modified by: Vadim Zeitlin (refactored, added bg preservation)
// Created: 16/03/02
+// RCS-ID: $Id: dcbuffer.h 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) Ron Lee
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -36,11 +37,7 @@
// does not prepare the window DC
#define wxBUFFER_CLIENT_AREA 0x02
-// Set when not using specific buffer bitmap. Note that this
-// is private style and not returned by GetStyle.
-#define wxBUFFER_USES_SHARED_BUFFER 0x04
-
-class WXDLLIMPEXP_CORE wxBufferedDC : public wxMemoryDC
+class WXDLLEXPORT wxBufferedDC : public wxMemoryDC
{
public:
// Default ctor, must subsequently call Init for two stage construction.
@@ -101,11 +98,25 @@ public:
// 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();
+ void UnMask()
+ {
+ wxCHECK_RET( m_dc, wxT("no underlying wxDC?") );
+ wxASSERT_MSG( m_buffer && m_buffer->IsOk(), wxT("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 & ~wxBUFFER_USES_SHARED_BUFFER; }
+ int GetStyle() const { return m_style; }
private:
// common part of Init()s
@@ -115,6 +126,10 @@ private:
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
@@ -133,10 +148,8 @@ private:
// the buffering style
int m_style;
- wxSize m_area;
-
DECLARE_DYNAMIC_CLASS(wxBufferedDC)
- wxDECLARE_NO_COPY_CLASS(wxBufferedDC);
+ DECLARE_NO_COPY_CLASS(wxBufferedDC)
};
@@ -146,7 +159,7 @@ private:
// Creates a double buffered wxPaintDC, optionally allowing the
// user to specify their own buffer to use.
-class WXDLLIMPEXP_CORE wxBufferedPaintDC : public wxBufferedDC
+class WXDLLEXPORT wxBufferedPaintDC : public wxBufferedDC
{
public:
// If no bitmap is supplied by the user, a temporary one will be created.
@@ -196,7 +209,7 @@ private:
wxPaintDC m_paintdc;
DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC)
- wxDECLARE_NO_COPY_CLASS(wxBufferedPaintDC);
+ DECLARE_NO_COPY_CLASS(wxBufferedPaintDC)
};
@@ -213,25 +226,40 @@ private:
#define wxAutoBufferedPaintDCBase wxBufferedPaintDC
#endif
-class WXDLLIMPEXP_CORE wxAutoBufferedPaintDC : public wxAutoBufferedPaintDCBase
+
+#ifdef __WXDEBUG__
+
+class wxAutoBufferedPaintDC : public wxAutoBufferedPaintDCBase
{
public:
wxAutoBufferedPaintDC(wxWindow* win)
: wxAutoBufferedPaintDCBase(win)
{
- wxASSERT_MSG( win->GetBackgroundStyle() == wxBG_STYLE_PAINT,
- "You need to call SetBackgroundStyle(wxBG_STYLE_PAINT) in ctor, "
- "and also, if needed, paint the background in wxEVT_PAINT handler."
- );
+ TestWinStyle(win);
}
virtual ~wxAutoBufferedPaintDC() { }
private:
- wxDECLARE_NO_COPY_CLASS(wxAutoBufferedPaintDC);
+
+ 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
diff --git a/Source/3rd Party/wx/include/wx/dcclient.h b/Source/3rd Party/wx/include/wx/dcclient.h
index f6c9c3f7b..c770f6a2f 100644
--- a/Source/3rd Party/wx/include/wx/dcclient.h
+++ b/Source/3rd Party/wx/include/wx/dcclient.h
@@ -2,61 +2,41 @@
// 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/dc.h"
+#include "wx/defs.h"
-//-----------------------------------------------------------------------------
-// wxWindowDC
-//-----------------------------------------------------------------------------
+#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
-class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
-{
-public:
- wxWindowDC(wxWindow *win);
-
-protected:
- wxWindowDC(wxDCImpl *impl) : wxDC(impl) { }
-
-private:
- DECLARE_ABSTRACT_CLASS(wxWindowDC)
-};
-
-//-----------------------------------------------------------------------------
-// wxClientDC
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC
-{
-public:
- wxClientDC(wxWindow *win);
-
-protected:
- wxClientDC(wxDCImpl *impl) : wxWindowDC(impl) { }
-
-private:
- DECLARE_ABSTRACT_CLASS(wxClientDC)
-};
-
-//-----------------------------------------------------------------------------
-// wxPaintDC
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC
-{
-public:
- wxPaintDC(wxWindow *win);
-
-protected:
- wxPaintDC(wxDCImpl *impl) : wxClientDC(impl) { }
-
-private:
- DECLARE_ABSTRACT_CLASS(wxPaintDC)
-};
-
-#endif // _WX_DCCLIENT_H_BASE_
+#endif
+ // _WX_DCCLIENT_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/dcgraph.h b/Source/3rd Party/wx/include/wx/dcgraph.h
index 0181f552a..8245f8145 100644
--- a/Source/3rd Party/wx/include/wx/dcgraph.h
+++ b/Source/3rd Party/wx/include/wx/dcgraph.h
@@ -1,10 +1,11 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcgraph.h
+// 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
/////////////////////////////////////////////////////////////////////////////
@@ -13,59 +14,36 @@
#if wxUSE_GRAPHICS_CONTEXT
-#include "wx/dc.h"
#include "wx/geometry.h"
+#include "wx/dynarray.h"
#include "wx/graphics.h"
-class WXDLLIMPEXP_FWD_CORE wxWindowDC;
+class WXDLLEXPORT wxWindowDC;
+#ifdef __WXMAC__
+#define wxGCDC wxDC
+#endif
-class WXDLLIMPEXP_CORE wxGCDC: public wxDC
+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 );
- wxGCDC( const wxMemoryDC& dc );
-#if wxUSE_PRINTING_ARCHITECTURE
- wxGCDC( const wxPrinterDC& dc );
-#endif
-#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
- wxGCDC( const wxEnhMetaFileDC& dc );
-#endif
- wxGCDC(wxGraphicsContext* context);
-
+ wxGCDC(const wxWindowDC& dc);
+#ifdef __WXMSW__
+ wxGCDC( const wxMemoryDC& dc);
+#endif
wxGCDC();
virtual ~wxGCDC();
- wxGraphicsContext* GetGraphicsContext() const;
- void SetGraphicsContext( wxGraphicsContext* ctx );
+ void Init();
-#ifdef __WXMSW__
- // override wxDC virtual functions to provide access to HDC associated with
- // this Graphics object (implemented in src/msw/graphics.cpp)
- virtual WXHDC AcquireHDC();
- virtual void ReleaseHDC(WXHDC hdc);
-#endif // __WXMSW__
-
-private:
- DECLARE_DYNAMIC_CLASS(wxGCDC)
- wxDECLARE_NO_COPY_CLASS(wxGCDC);
-};
-
-
-class WXDLLIMPEXP_CORE wxGCDCImpl: public wxDCImpl
-{
-public:
- wxGCDCImpl( wxDC *owner, const wxWindowDC& dc );
- wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc );
-#if wxUSE_PRINTING_ARCHITECTURE
- wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc );
-#endif
-#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
- wxGCDCImpl( wxDC *owner, const wxEnhMetaFileDC& dc );
-#endif
- wxGCDCImpl( wxDC *owner );
-
- virtual ~wxGCDCImpl();
// implement base class pure virtuals
// ----------------------------------
@@ -77,9 +55,10 @@ public:
virtual void StartPage();
virtual void EndPage();
-
+
+ // to be virtualized on next major
// flushing the content of this dc immediately onto screen
- virtual void Flush();
+ void Flush();
virtual void SetFont(const wxFont& font);
virtual void SetPen(const wxPen& pen);
@@ -98,21 +77,27 @@ public:
virtual int GetDepth() const;
virtual wxSize GetPPI() const;
- virtual void SetLogicalFunction(wxRasterOperationMode function);
+ 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() const { return m_graphicContext; }
+ wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
-
- virtual void* GetHandle() const;
-
+
+protected:
// the true implementations
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
- wxFloodFillStyle style = wxFLOOD_SURFACE);
+ int style = wxFLOOD_SURFACE);
virtual void DoGradientFillLinear(const wxRect& rect,
const wxColour& initialColour,
@@ -129,7 +114,7 @@ public:
virtual void DoDrawPoint(wxCoord x, wxCoord y);
#if wxUSE_SPLINES
- virtual void DoDrawSpline(const wxPointList *points);
+ virtual void DoDrawSpline(wxList *points);
#endif
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
@@ -161,31 +146,22 @@ public:
double angle);
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
- wxDC *source, wxCoord xsrc, wxCoord ysrc,
- wxRasterOperationMode rop = wxCOPY, bool useMask = false,
- wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
-
- virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest,
- wxCoord dstWidth, wxCoord dstHeight,
- wxDC *source,
- wxCoord xsrc, wxCoord ysrc,
- wxCoord srcWidth, wxCoord srcHeight,
- wxRasterOperationMode = wxCOPY, bool useMask = false,
- wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
+ 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, const wxPoint points[],
+ virtual void DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset);
- virtual void DoDrawPolygon(int n, const wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
- virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle);
+ 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 DoSetDeviceClippingRegion(const wxRegion& region);
+ virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
@@ -193,34 +169,22 @@ public:
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- const wxFont *theFont = NULL) const;
+ wxFont *theFont = NULL) const;
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
-#ifdef __WXMSW__
- virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const;
-#endif // __WXMSW__
-
protected:
- // unused int parameter distinguishes this version, which does not create a
- // wxGraphicsContext, in the expectation that the derived class will do it
- wxGCDCImpl(wxDC* owner, int);
-
// 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;
-
-private:
- void Init(wxGraphicsContext*);
-
- DECLARE_CLASS(wxGCDCImpl)
- wxDECLARE_NO_COPY_CLASS(wxGCDCImpl);
};
-#endif // wxUSE_GRAPHICS_CONTEXT
+#endif
+
#endif // _WX_GRAPHICS_DC_H_
diff --git a/Source/3rd Party/wx/include/wx/dcmemory.h b/Source/3rd Party/wx/include/wx/dcmemory.h
index 84ae9adef..cd7bb0c9d 100644
--- a/Source/3rd Party/wx/include/wx/dcmemory.h
+++ b/Source/3rd Party/wx/include/wx/dcmemory.h
@@ -5,40 +5,72 @@
// 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/dc.h"
#include "wx/bitmap.h"
-//-----------------------------------------------------------------------------
-// wxMemoryDC
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxMemoryDC: public wxDC
+// 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:
- wxMemoryDC();
- wxMemoryDC( wxBitmap& bitmap );
- wxMemoryDC( wxDC *dc );
+ 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);
+ 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
- void SelectObjectAsSource(const wxBitmap& bmp);
+ virtual void SelectObjectAsSource(const wxBitmap& bmp)
+ {
+ DoSelect(bmp);
+ }
- // get selected bitmap
- const wxBitmap& GetSelectedBitmap() const;
- wxBitmap& GetSelectedBitmap();
-
-private:
- DECLARE_DYNAMIC_CLASS(wxMemoryDC)
+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/Source/3rd Party/wx/include/wx/dcmirror.h b/Source/3rd Party/wx/include/wx/dcmirror.h
index 2978ac43d..89bf12575 100644
--- a/Source/3rd Party/wx/include/wx/dcmirror.h
+++ b/Source/3rd Party/wx/include/wx/dcmirror.h
@@ -4,6 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 21.07.2003
+// RCS-ID: $Id: dcmirror.h 61872 2009-09-09 22:37:05Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@@ -17,7 +18,7 @@
// wxMirrorDC allows to write the same code for horz/vertical layout
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxMirrorDCImpl : public wxDCImpl
+class WXDLLEXPORT wxMirrorDC : public wxDC
{
public:
// constructs a mirror DC associated with the given real DC
@@ -25,12 +26,13 @@ public:
// 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
- wxMirrorDCImpl(wxDC *owner, wxDCImpl& dc, bool mirror)
- : wxDCImpl(owner),
- m_dc(dc)
- {
- m_mirror = mirror;
- }
+ //
+ // 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(); }
@@ -51,8 +53,9 @@ public:
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 IsOk() const { return m_dc.IsOk(); }
- virtual void SetMapMode(wxMappingMode mode) { m_dc.SetMapMode(mode); }
+ 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)
@@ -62,11 +65,14 @@ public:
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
{ m_dc.SetAxisOrientation(GetX(xLeftRight, yBottomUp),
GetY(xLeftRight, yBottomUp)); }
- virtual void SetLogicalFunction(wxRasterOperationMode function)
+ virtual void SetLogicalFunction(int function)
{ m_dc.SetLogicalFunction(function); }
- virtual void* GetHandle() const
- { return m_dc.GetHandle(); }
+ // 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
@@ -81,26 +87,30 @@ protected:
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 components of all points in the array if necessary
- wxPoint* Mirror(int n, const wxPoint*& points) const
+ // 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
{
- wxPoint* points_alloc = NULL;
if ( m_mirror )
{
- points_alloc = new wxPoint[n];
for ( int i = 0; i < n; i++ )
{
- points_alloc[i].x = points[i].y;
- points_alloc[i].y = points[i].x;
+ Swap(points[i].x, points[i].y);
}
- points = points_alloc;
}
- return points_alloc;
}
+
// wxDCBase functions
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
- wxFloodFillStyle style = wxFLOOD_SURFACE)
+ int style = wxFLOOD_SURFACE)
{
return m_dc.DoFloodFill(GetX(x, y), GetY(x, y), col, style);
}
@@ -200,8 +210,7 @@ protected:
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
wxCoord w, wxCoord h,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
- wxRasterOperationMode rop = wxCOPY,
- bool useMask = false,
+ int rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
{
return m_dc.DoBlit(GetX(xdest, ydest), GetY(xdest, ydest),
@@ -221,31 +230,31 @@ protected:
m_dc.DoGetSizeMM(GetX(w, h), GetY(w, h));
}
- virtual void DoDrawLines(int n, const wxPoint points[],
+ virtual void DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset)
{
- wxPoint* points_alloc = Mirror(n, points);
+ Mirror(n, points);
m_dc.DoDrawLines(n, points,
GetX(xoffset, yoffset), GetY(xoffset, yoffset));
- delete[] points_alloc;
+ Mirror(n, points);
}
- virtual void DoDrawPolygon(int n, const wxPoint points[],
+ virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
+ int fillStyle = wxODDEVEN_RULE)
{
- wxPoint* points_alloc = Mirror(n, points);
+ Mirror(n, points);
m_dc.DoDrawPolygon(n, points,
GetX(xoffset, yoffset), GetY(xoffset, yoffset),
fillStyle);
- delete[] points_alloc;
+ Mirror(n, points);
}
- virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region))
+ virtual void DoSetClippingRegionAsRegion(const wxRegion& WXUNUSED(region))
{
wxFAIL_MSG( wxT("not implemented") );
}
@@ -260,39 +269,18 @@ protected:
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
- const wxFont *theFont = NULL) const
+ wxFont *theFont = NULL) const
{
// never mirrored
m_dc.DoGetTextExtent(string, x, y, descent, externalLeading, theFont);
}
private:
- wxDCImpl& m_dc;
+ wxMirrorDC& m_dc;
bool m_mirror;
- wxDECLARE_NO_COPY_CLASS(wxMirrorDCImpl);
-};
-
-class WXDLLIMPEXP_CORE wxMirrorDC : public wxDC
-{
-public:
- wxMirrorDC(wxDC& dc, bool mirror)
- : wxDC(new wxMirrorDCImpl(this, *dc.GetImpl(), mirror))
- {
- m_mirror = mirror;
- }
-
- // 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;
- }
-
-private:
- bool m_mirror;
-
- wxDECLARE_NO_COPY_CLASS(wxMirrorDC);
+ DECLARE_NO_COPY_CLASS(wxMirrorDC)
};
#endif // _WX_DCMIRROR_H_
diff --git a/Source/3rd Party/wx/include/wx/dcprint.h b/Source/3rd Party/wx/include/wx/dcprint.h
index 87f33eb6d..b22394b08 100644
--- a/Source/3rd Party/wx/include/wx/dcprint.h
+++ b/Source/3rd Party/wx/include/wx/dcprint.h
@@ -5,6 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcprint.h 41240 2006-09-15 16:45:48Z PC $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@@ -15,28 +16,18 @@
#if wxUSE_PRINTING_ARCHITECTURE
-#include "wx/dc.h"
-
-//-----------------------------------------------------------------------------
-// wxPrinterDC
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxPrinterDC : public wxDC
-{
-public:
- wxPrinterDC();
- wxPrinterDC(const wxPrintData& data);
-
- wxRect GetPaperRect() const;
- int GetResolution() const;
-
-protected:
- wxPrinterDC(wxDCImpl *impl) : wxDC(impl) { }
-
-private:
- DECLARE_DYNAMIC_CLASS(wxPrinterDC)
-};
+#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_
+#endif
+ // _WX_DCPRINT_H_BASE_
diff --git a/Source/3rd Party/wx/include/wx/dcps.h b/Source/3rd Party/wx/include/wx/dcps.h
deleted file mode 100644
index 659eb595f..000000000
--- a/Source/3rd Party/wx/include/wx/dcps.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcps.h
-// Purpose: wxPostScriptDC base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCPS_H_BASE_
-#define _WX_DCPS_H_BASE_
-
-#include "wx/generic/dcpsg.h"
-
-#endif
-
diff --git a/Source/3rd Party/wx/include/wx/dcscreen.h b/Source/3rd Party/wx/include/wx/dcscreen.h
index fc5c49f71..8b52dd959 100644
--- a/Source/3rd Party/wx/include/wx/dcscreen.h
+++ b/Source/3rd Party/wx/include/wx/dcscreen.h
@@ -5,6 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dcscreen.h 40865 2006-08-27 09:42:42Z VS $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@@ -12,24 +13,30 @@
#define _WX_DCSCREEN_H_BASE_
#include "wx/defs.h"
-#include "wx/dc.h"
-
-class WXDLLIMPEXP_CORE wxScreenDC : public wxDC
-{
-public:
- wxScreenDC();
-
- static bool StartDrawingOnTop(wxWindow * WXUNUSED(window))
- { return true; }
- static bool StartDrawingOnTop(wxRect * WXUNUSED(rect) = NULL)
- { return true; }
- static bool EndDrawingOnTop()
- { return true; }
-
-private:
- DECLARE_DYNAMIC_CLASS(wxScreenDC)
-};
+#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/Source/3rd Party/wx/include/wx/dcsvg.h b/Source/3rd Party/wx/include/wx/dcsvg.h
deleted file mode 100644
index c6485ff13..000000000
--- a/Source/3rd Party/wx/include/wx/dcsvg.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcsvg.h
-// Purpose: wxSVGFileDC
-// Author: Chris Elliott
-// Modified by:
-// Created:
-// Copyright: (c) Chris Elliott
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCSVG_H_
-#define _WX_DCSVG_H_
-
-#include "wx/string.h"
-#include "wx/dc.h"
-
-#if wxUSE_SVG
-
-#define wxSVGVersion wxT("v0100")
-
-#ifdef __BORLANDC__
-#pragma warn -8008
-#pragma warn -8066
-#endif
-
-class WXDLLIMPEXP_FWD_BASE wxFileOutputStream;
-
-
-
-class WXDLLIMPEXP_FWD_CORE wxSVGFileDC;
-
-class WXDLLIMPEXP_CORE wxSVGFileDCImpl : public wxDCImpl
-{
-public:
- wxSVGFileDCImpl( wxSVGFileDC *owner, const wxString &filename,
- int width=320, int height=240, double dpi=72.0 );
-
- virtual ~wxSVGFileDCImpl();
-
- bool IsOk() const { return m_OK; }
-
- virtual bool CanDrawBitmap() const { return true; }
- virtual bool CanGetTextExtent() const { return true; }
-
- virtual int GetDepth() const
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::GetDepth Call not implemented"));
- return -1;
- }
-
- virtual void Clear()
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?"));
- }
-
- virtual void DestroyClippingRegion();
-
- virtual wxCoord GetCharHeight() const;
- virtual wxCoord GetCharWidth() const;
-
- virtual void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
- wxCoord WXUNUSED(w), wxCoord WXUNUSED(h))
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::SetClippingRegion not implemented"));
- }
-
- virtual void SetPalette(const wxPalette& WXUNUSED(palette))
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::SetPalette not implemented"));
- }
-
- virtual void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y),
- wxCoord *WXUNUSED(w), wxCoord *WXUNUSED(h))
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::GetClippingBox not implemented"));
- }
-
- virtual void SetLogicalFunction(wxRasterOperationMode WXUNUSED(function))
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::SetLogicalFunction Call not implemented"));
- }
-
- virtual wxRasterOperationMode GetLogicalFunction() const
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::GetLogicalFunction() not implemented"));
- return wxCOPY;
- }
-
- virtual void SetBackground( const wxBrush &brush );
- virtual void SetBackgroundMode( int mode );
- virtual void SetBrush(const wxBrush& brush);
- virtual void SetFont(const wxFont& font);
- virtual void SetPen(const wxPen& pen);
-
- virtual void* GetHandle() const { return NULL; }
-
-private:
- virtual bool DoGetPixel(wxCoord, wxCoord, wxColour *) const
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::DoGetPixel Call not implemented"));
- return true;
- }
-
- virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, wxDC *,
- wxCoord, wxCoord, wxRasterOperationMode = wxCOPY,
- bool = 0, int = -1, int = -1);
-
- virtual void DoCrossHair(wxCoord, wxCoord)
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::CrossHair Call not implemented"));
- }
-
- virtual void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord);
-
- virtual void DoDrawBitmap(const wxBitmap &, wxCoord, wxCoord, bool = false);
-
- virtual void DoDrawCheckMark(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
-
- virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
-
- virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
- double sa, double ea);
-
- virtual void DoDrawIcon(const wxIcon &, wxCoord, wxCoord);
-
- virtual void DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
-
- virtual void DoDrawLines(int n, const wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0);
-
- virtual void DoDrawPoint(wxCoord, wxCoord);
-
- virtual void DoDrawPolygon(int n, const wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- wxPolygonFillMode fillStyle);
-
- virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
-
- virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
- double angle);
-
- virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
- wxCoord w, wxCoord h,
- double radius = 20) ;
-
- virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
-
- virtual bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
- const wxColour& WXUNUSED(col),
- wxFloodFillStyle WXUNUSED(style) = wxFLOOD_SURFACE)
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::DoFloodFill Call not implemented"));
- return false;
- }
-
- virtual void DoGetSize(int * x, int *y) const
- {
- if ( x )
- *x = m_width;
- if ( y )
- *y = m_height;
- }
-
- virtual void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- const wxFont *font = NULL) const;
-
- virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region))
- {
- wxFAIL_MSG(wxT("wxSVGFILEDC::DoSetDeviceClippingRegion not yet implemented"));
- }
-
- virtual void DoSetClippingRegion(int x, int y, int width, int height);
-
- virtual void DoGetSizeMM( int *width, int *height ) const;
-
- virtual wxSize GetPPI() const;
-
- void Init (const wxString &filename, int width, int height, double dpi);
-
- void write( const wxString &s );
-
-private:
- // If m_graphics_changed is true, close the current element and start a
- // new one for the last pen/brush change.
- void NewGraphicsIfNeeded();
-
- // Open a new graphics group setting up all the attributes according to
- // their current values in wxDC.
- void DoStartNewGraphics();
-
- wxFileOutputStream *m_outfile;
- wxString m_filename;
- int m_sub_images; // number of png format images we have
- bool m_OK;
- bool m_graphics_changed; // set by Set{Brush,Pen}()
- int m_width, m_height;
- double m_dpi;
-
- // The clipping nesting level is incremented by every call to
- // SetClippingRegion() and reset when DestroyClippingRegion() is called.
- size_t m_clipNestingLevel;
-
- // Unique ID for every clipping graphics group: this is simply always
- // incremented in each SetClippingRegion() call.
- size_t m_clipUniqueId;
-
- DECLARE_ABSTRACT_CLASS(wxSVGFileDCImpl)
-};
-
-
-class WXDLLIMPEXP_CORE wxSVGFileDC : public wxDC
-{
-public:
- wxSVGFileDC(const wxString& filename,
- int width = 320,
- int height = 240,
- double dpi = 72.0)
- : wxDC(new wxSVGFileDCImpl(this, filename, width, height, dpi))
- {
- }
-};
-
-#endif // wxUSE_SVG
-
-#endif // _WX_DCSVG_H_
diff --git a/Source/3rd Party/wx/include/wx/dde.h b/Source/3rd Party/wx/include/wx/dde.h
index d7cf290cd..495e9e27a 100644
--- a/Source/3rd Party/wx/include/wx/dde.h
+++ b/Source/3rd Party/wx/include/wx/dde.h
@@ -5,6 +5,7 @@
// Modified by:
// Created:
// Copyright: (c) Julian Smart
+// RCS-ID: $Id: dde.h 53135 2008-04-12 02:31:04Z VZ $
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
@@ -21,10 +22,10 @@ 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(__WINDOWS__)
+#if defined(__WXMSW__)
#include "wx/msw/dde.h"
#else
- #error DDE is only supported under Windows
+ #error DDE is only supported on MSW
#endif
#endif
diff --git a/Source/3rd Party/wx/include/wx/debug.h b/Source/3rd Party/wx/include/wx/debug.h
index 143f23956..fd42bdbfd 100644
--- a/Source/3rd Party/wx/include/wx/debug.h
+++ b/Source/3rd Party/wx/include/wx/debug.h
@@ -1,388 +1,247 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/debug.h
-// Purpose: Misc debug functions and macros
-// Author: Vadim Zeitlin
-// Created: 29/01/98
-// Copyright: (c) 1998-2009 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+/**
+* 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 61872 2009-09-09 22:37:05Z VZ $
+* Copyright: (c) 1998 Vadim Zeitlin
+* Licence: wxWindows licence
+*/
-#ifndef _WX_DEBUG_H_
-#define _WX_DEBUG_H_
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-#if !defined(__WXWINCE__)
- #include
-#endif // systems without assert.h
+#ifndef _WX_DEBUG_H_
+#define _WX_DEBUG_H_
-#include // for CHAR_BIT used below
+#ifndef __WXWINCE__
+#include
+#endif
+#include