c #FEE3D7",
-"O c #FFFFFF",
-"o c #7B767D",
-"% c #F79586",
-"& c #CAE1F3",
-"@ c #F08B62",
-"# c #FCCBB8",
-"- c #FDD8C9",
-"4 c #FFF8F4",
-"5 c #FFF5F0",
-" c None",
-"$ c #F8AA8F",
-", c #EFF6FC",
-"1 c #F7FBFD",
-"2 c #FAFCFE",
-"; c #DAEAF7",
-": c #E9F3FA",
-"6 c #FFFAF8",
-". c #3C78A6",
-"3 c #FFF1ED",
-"X c #9B8687",
-"+ c #FBBCA4",
-"* c #B6D5EE",
-"= c #F4F9FD",
-/* pixels */
-" ...... ",
-" .XoOOOOoo. ",
-".+XOOOOOOX@. ",
-".+XXXXXXXX@. ",
-".#++$$%@..... ",
-".##++$$%.&*.=. ",
-".-##++$$.;&.==. ",
-".--##++$.:;.... ",
-".>--##++.,:;&*. ",
-".<>--##+.1,:;&. ",
-".<<>--##.21,:;. ",
-".3<<>--#.O21=:. ",
-".45<<>--....... ",
-".6453<>----. ",
-"............ "
-};
diff --git a/utils/configtool/src/bitmaps/radiofolderoff.png b/utils/configtool/src/bitmaps/radiofolderoff.png
deleted file mode 100644
index cae5fb81ee..0000000000
Binary files a/utils/configtool/src/bitmaps/radiofolderoff.png and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/radiofolderoff.xpm b/utils/configtool/src/bitmaps/radiofolderoff.xpm
deleted file mode 100644
index 4e62544aaf..0000000000
--- a/utils/configtool/src/bitmaps/radiofolderoff.xpm
+++ /dev/null
@@ -1,47 +0,0 @@
-/* XPM */
-static char *radiofolderoff_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 25 1",
-"+ c #B9CDED",
-"4 c #608CD4",
-", c #FFFFFF",
-"X c #C6D6F0",
-": c #808080",
-"6 c #4A7CCE",
-"2 c #6E96D8",
-"@ c #C3D4EF",
-"* c #F0F5FC",
-"; c #FFFF00",
-"$ c #DAE5F6",
-" c None",
-"1 c #81A4DD",
-"o c #9FB9E5",
-"O c #AEC5EA",
-"# c #CCDAF2",
-"< c #89A9DF",
-"> c #98B5E4",
-"5 c #5584D1",
-"& c #E8EFFA",
-". c #3366B9",
-"- c #FAFCFE",
-"= c #F5F8FD",
-"% c #DFE8F7",
-"3 c #E5EDF9",
-/* pixels */
-" ",
-" ..... ",
-" .XXXX. ",
-" ............. ",
-" .oO+@#$%&*=-. ",
-" .oO+;:::;*=-. ",
-" .>o;:,,,:;*=. ",
-" .<>:,,,,,:&*. ",
-" .1<:,,,,,:%&. ",
-" .21:,,,,,:$3. ",
-" .42;:,,,:;#$. ",
-" .542;:::;+X#. ",
-" .65421<>oO+X. ",
-" ............. ",
-" ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/radiofolderoff_dis.png b/utils/configtool/src/bitmaps/radiofolderoff_dis.png
deleted file mode 100644
index 687bf84f2e..0000000000
Binary files a/utils/configtool/src/bitmaps/radiofolderoff_dis.png and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/radiofolderoff_dis.xpm b/utils/configtool/src/bitmaps/radiofolderoff_dis.xpm
deleted file mode 100644
index 56846d3b2e..0000000000
--- a/utils/configtool/src/bitmaps/radiofolderoff_dis.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char *radiofolderoff_dis_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 4 1",
-". c #547897",
-"o c #808080",
-" c None",
-"X c #C0C0C0",
-/* pixels */
-" ",
-" ..... ",
-" .XXXX. ",
-" ............. ",
-" .XXXXXXXXXXX. ",
-" .XXXoooooXXX. ",
-" .XXooXXXooXX. ",
-" .XXoXXXXXoXX. ",
-" .XXoXXXXXoXX. ",
-" .XXoXXXXXoXX. ",
-" .XXooXXXooXX. ",
-" .XXXoooooXXX. ",
-" .XXXXXXXXXXX. ",
-" ............. ",
-" ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/radiofolderon.png b/utils/configtool/src/bitmaps/radiofolderon.png
deleted file mode 100644
index b1791b8f6f..0000000000
Binary files a/utils/configtool/src/bitmaps/radiofolderon.png and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/radiofolderon.xpm b/utils/configtool/src/bitmaps/radiofolderon.xpm
deleted file mode 100644
index 789d199c6b..0000000000
--- a/utils/configtool/src/bitmaps/radiofolderon.xpm
+++ /dev/null
@@ -1,48 +0,0 @@
-/* XPM */
-static char *radiofolderon_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 26 1",
-"1 c Black",
-"+ c #B9CDED",
-"5 c #608CD4",
-", c #FFFFFF",
-"X c #C6D6F0",
-": c #808080",
-"7 c #4A7CCE",
-"3 c #6E96D8",
-"@ c #C3D4EF",
-"* c #F0F5FC",
-"; c #FFFF00",
-"$ c #DAE5F6",
-" c None",
-"2 c #81A4DD",
-"o c #9FB9E5",
-"O c #AEC5EA",
-"# c #CCDAF2",
-"< c #89A9DF",
-"> c #98B5E4",
-"6 c #5584D1",
-"& c #E8EFFA",
-". c #3366B9",
-"- c #FAFCFE",
-"= c #F5F8FD",
-"% c #DFE8F7",
-"4 c #E5EDF9",
-/* pixels */
-" ",
-" ..... ",
-" .XXXX. ",
-" ............. ",
-" .oO+@#$%&*=-. ",
-" .oO+;:::;*=-. ",
-" .>o;:,,,:;*=. ",
-" .<>:,111,:&*. ",
-" .2<:,111,:%&. ",
-" .32:,111,:$4. ",
-" .53;:,,,:;#$. ",
-" .653;:::;+X#. ",
-" .76532<>oO+X. ",
-" ............. ",
-" ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/radiofolderon_dis.png b/utils/configtool/src/bitmaps/radiofolderon_dis.png
deleted file mode 100644
index c4cbc99091..0000000000
Binary files a/utils/configtool/src/bitmaps/radiofolderon_dis.png and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/radiofolderon_dis.xpm b/utils/configtool/src/bitmaps/radiofolderon_dis.xpm
deleted file mode 100644
index dccc212422..0000000000
--- a/utils/configtool/src/bitmaps/radiofolderon_dis.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char *radiofolderon_dis_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 4 1",
-". c #547897",
-"o c #808080",
-" c None",
-"X c #C0C0C0",
-/* pixels */
-" ",
-" ..... ",
-" .XXXX. ",
-" ............. ",
-" .XXXXXXXXXXX. ",
-" .XXXoooooXXX. ",
-" .XXooXXXooXX. ",
-" .XXoXoooXoXX. ",
-" .XXoXoooXoXX. ",
-" .XXoXoooXoXX. ",
-" .XXooXXXooXX. ",
-" .XXXoooooXXX. ",
-" .XXXXXXXXXXX. ",
-" ............. ",
-" ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/radiooff.xpm b/utils/configtool/src/bitmaps/radiooff.xpm
deleted file mode 100644
index a9d2a0b759..0000000000
--- a/utils/configtool/src/bitmaps/radiooff.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * radiooff_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #808080",
-"X c Black",
-"o c #c0c0c0",
-" ",
-" ",
-" .... ",
-" ..XXXX.. ",
-" .XX XXo ",
-" .X oo ",
-" .X oo ",
-" .X oo ",
-" .X oo ",
-" .X oo ",
-" .X oo ",
-" .oo ooo ",
-" oooooooo ",
-" oooo ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/radiooff_dis.xpm b/utils/configtool/src/bitmaps/radiooff_dis.xpm
deleted file mode 100644
index 5643d3f7dd..0000000000
--- a/utils/configtool/src/bitmaps/radiooff_dis.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * radiooff_dis_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #808080",
-"X c Black",
-"o c #c0c0c0",
-" ",
-" ",
-" .... ",
-" ..XXXX.. ",
-" .XXooooXXo ",
-" .Xoooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooo ",
-" .ooooooooo ",
-" oooooooo ",
-" oooo ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/radioon.xpm b/utils/configtool/src/bitmaps/radioon.xpm
deleted file mode 100644
index 6a4409f1b6..0000000000
--- a/utils/configtool/src/bitmaps/radioon.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * radioon_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #808080",
-"X c Black",
-"o c #c0c0c0",
-" ",
-" ",
-" .... ",
-" ..XXXX.. ",
-" .XX XXo ",
-" .X oo ",
-" .X XX oo ",
-" .X XXXX oo ",
-" .X XXXX oo ",
-" .X XX oo ",
-" .X oo ",
-" .oo ooo ",
-" oooooooo ",
-" oooo ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/radioon_dis.xpm b/utils/configtool/src/bitmaps/radioon_dis.xpm
deleted file mode 100644
index cf959badb1..0000000000
--- a/utils/configtool/src/bitmaps/radioon_dis.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * radioon_dis_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #808080",
-"X c Black",
-"o c #c0c0c0",
-" ",
-" ",
-" .... ",
-" ..XXXX.. ",
-" .XXooooXXo ",
-" .Xoooooooo ",
-" .Xooo..ooooo ",
-" .Xoo....oooo ",
-" .Xoo....oooo ",
-" .Xooo..ooooo ",
-" .Xoooooooo ",
-" .ooooooooo ",
-" oooooooo ",
-" oooo ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/redo.xpm b/utils/configtool/src/bitmaps/redo.xpm
deleted file mode 100644
index 870449c4f1..0000000000
--- a/utils/configtool/src/bitmaps/redo.xpm
+++ /dev/null
@@ -1,58 +0,0 @@
-/* XPM */
-static char *redo_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 37 1",
-"2 c #4E7FD0",
-"i c #3365B7",
-"e c #8DADE1",
-": c #3162B3",
-", c #4A7CCE",
-"% c #779DDB",
-"6 c #7FA2DD",
-"0 c #6992D7",
-"3 c #6E96D8",
-"7 c #356AC1",
-". c #9BB7E5",
-"@ c #5886D2",
-"u c #BED0EE",
-"r c #C3D4EF",
-"5 c #85A7DF",
-"+ c #ADC4E9",
-"y c #DAE5F6",
-" c None",
-"O c #487BCE",
-"t c #9FB9E5",
-"o c #254A87",
-"w c #AEC5EA",
-"q c #89A9DF",
-"8 c #98B5E4",
-"> c #3A70CA",
-"- c #3569BF",
-"& c #305FAC",
-"1 c #5D89D3",
-"= c #3366B9",
-"9 c #2E5CA8",
-"< c #638ED5",
-"4 c #3467BC",
-"X c #2F5DA9",
-"# c #2A5398",
-"$ c #376EC9",
-"* c #2D5AA5",
-"; c #8CACE0",
-/* pixels */
-" .XoooO+ ",
-" @o#####o$ @ ",
-"%#&&*#*&&*# @o ",
-"X=-#@;@#=-:#$*# ",
-"#>-@ #->-=># ",
-"*,>% #>,,,# ",
-"*<1X X,<<<* ",
-"@234; #13333* ",
-" X56X $#7O155X ",
-" O2869 .0$*o ",
-" :qwe9 ",
-" 9.rt9 ",
-" 9+y@u ",
-" i$$ ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/save.xpm b/utils/configtool/src/bitmaps/save.xpm
deleted file mode 100644
index accf1f9eb2..0000000000
--- a/utils/configtool/src/bitmaps/save.xpm
+++ /dev/null
@@ -1,42 +0,0 @@
-/* XPM */
-static char *save_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 21 1",
-": c #AAC1E8",
-"1 c #B9CDED",
-"O c #FFFFFF",
-" c #2C58A0",
-"* c #B0C6EA",
-"; c #2D59A3",
-"X c #1C3866",
-"= c #C3D4EF",
-"2 c #CBD9F1",
-"- c #DAE5F6",
-"# c #97B4E3",
-". c None",
-"$ c #274D8B",
-"& c #9FB9E5",
-"@ c #5584D1",
-"% c #82A5DE",
-"o c #3A70CA",
-"< c #A5BEE7",
-", c #D2DFF4",
-"+ c #3467BC",
-"> c #C0D1EE",
-/* pixels */
-" .",
-" XoOOOOOOOOO+X .",
-" @oO#######O+@ .",
-" @oOOOOOOOOO+@ .",
-" @oO#######O+@ .",
-" @oOOOOOOOOO+@ .",
-" @@+++++++++@@ .",
-" @@@@@@@@@@@@@ .",
-" @@@$$$$$$$$@@ .",
-" @@$%%%&*=-O$@ .",
-" @@$%X;;*=-O$@ .",
-" @@$%X;;:>,O$@ .",
-" @@$%X;;<12O$@ .",
-" @@$<<2OOOOO$@ .",
-". .."
-};
diff --git a/utils/configtool/src/bitmaps/unchecked.xpm b/utils/configtool/src/bitmaps/unchecked.xpm
deleted file mode 100644
index b0a39b9506..0000000000
--- a/utils/configtool/src/bitmaps/unchecked.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * unchecked_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #808080",
-"X c Black",
-"o c #c0c0c0",
-" ",
-" ",
-" ............ ",
-" .XXXXXXXXXXo ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .X o ",
-" .ooooooooooo ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/unchecked_dis.xpm b/utils/configtool/src/bitmaps/unchecked_dis.xpm
deleted file mode 100644
index 4595b742d5..0000000000
--- a/utils/configtool/src/bitmaps/unchecked_dis.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * unchecked_dis_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #808080",
-"X c Black",
-"o c #c0c0c0",
-" ",
-" ",
-" ............ ",
-" .XXXXXXXXXXo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .Xoooooooooo ",
-" .ooooooooooo ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/uncheckedfolder.png b/utils/configtool/src/bitmaps/uncheckedfolder.png
deleted file mode 100644
index cdd924afb7..0000000000
Binary files a/utils/configtool/src/bitmaps/uncheckedfolder.png and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/uncheckedfolder.xpm b/utils/configtool/src/bitmaps/uncheckedfolder.xpm
deleted file mode 100644
index 02750c1024..0000000000
--- a/utils/configtool/src/bitmaps/uncheckedfolder.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char *uncheckedfolder_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 23 1",
-": c Black",
-"+ c #B9CDED",
-"2 c #608CD4",
-"X c #C6D6F0",
-"4 c #4A7CCE",
-"< c #6E96D8",
-"@ c #C3D4EF",
-"* c #F0F5FC",
-"$ c #DAE5F6",
-" c None",
-", c #81A4DD",
-"o c #9FB9E5",
-"O c #AEC5EA",
-"# c #CCDAF2",
-"> c #89A9DF",
-"; c #98B5E4",
-"3 c #5584D1",
-"& c #E8EFFA",
-". c #3366B9",
-"- c #FAFCFE",
-"= c #F5F8FD",
-"% c #DFE8F7",
-"1 c #E5EDF9",
-/* pixels */
-" ",
-" ..... ",
-" .XXXX. ",
-" ............. ",
-" .oO+@#$%&*=-. ",
-" .oO+@#$%&*=-. ",
-" .;o::X#::&*=. ",
-" .>;o::::$%&*. ",
-" .,>;o::X#$%&. ",
-" .<,>::::X#$1. ",
-" .2<::;o::X#$. ",
-" .32<,>;oO+X#. ",
-" .432<,>;oO+X. ",
-" ............. ",
-" ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/uncheckedfolder_dis.png b/utils/configtool/src/bitmaps/uncheckedfolder_dis.png
deleted file mode 100644
index 72effc7327..0000000000
Binary files a/utils/configtool/src/bitmaps/uncheckedfolder_dis.png and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/uncheckedfolder_dis.xpm b/utils/configtool/src/bitmaps/uncheckedfolder_dis.xpm
deleted file mode 100644
index f451034cc8..0000000000
--- a/utils/configtool/src/bitmaps/uncheckedfolder_dis.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char *uncheckedfolder_dis_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 4 1",
-". c #547897",
-"o c #808080",
-" c None",
-"X c #C0C0C0",
-/* pixels */
-" ",
-" ..... ",
-" .XXXX. ",
-" ............. ",
-" .XXXXXXXXXXX. ",
-" .XXXXXXXXXXX. ",
-" .XXooXXooXXX. ",
-" .XXXooooXXXX. ",
-" .XXXXooXXXXX. ",
-" .XXXooooXXXX. ",
-" .XXooXXooXXX. ",
-" .XXXXXXXXXXX. ",
-" .XXXXXXXXXXX. ",
-" ............. ",
-" ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/undo.xpm b/utils/configtool/src/bitmaps/undo.xpm
deleted file mode 100644
index 9266cb0e12..0000000000
--- a/utils/configtool/src/bitmaps/undo.xpm
+++ /dev/null
@@ -1,58 +0,0 @@
-/* XPM */
-static char *undo_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 37 1",
-"4 c #4E7FD0",
-"i c #3365B7",
-"q c #8DADE1",
-"= c #3162B3",
-", c #4A7CCE",
-"* c #779DDB",
-"7 c #7FA2DD",
-"8 c #6992D7",
-"2 c #6E96D8",
-"6 c #356AC1",
-"+ c #9BB7E5",
-"@ c #5886D2",
-"y c #BED0EE",
-"t c #C3D4EF",
-"5 c #85A7DF",
-". c #ADC4E9",
-"u c #DAE5F6",
-" c None",
-"X c #487BCE",
-"r c #9FB9E5",
-"o c #254A87",
-"w c #AEC5EA",
-"e c #89A9DF",
-"0 c #98B5E4",
-"> c #3A70CA",
-"- c #3569BF",
-"& c #305FAC",
-"1 c #5D89D3",
-"; c #3366B9",
-"9 c #2E5CA8",
-"< c #638ED5",
-"3 c #3467BC",
-"O c #2F5DA9",
-"$ c #2A5398",
-"# c #376EC9",
-"% c #2D5AA5",
-": c #8CACE0",
-/* pixels */
-" .XoooO+ ",
-"@ #o$$$$$o@ ",
-"o@ $%&&%$%&&$* ",
-"$%#$=-;$@:@$-;O ",
-"$>;->-$ @->$ ",
-"$,,,>$ *>,% ",
-"%<<<,O O1<% ",
-"%22221$ :324@ ",
-"O551X6$# O75O ",
-"o%#8+ 9704X ",
-" 9qwe= ",
-" 9rt+9 ",
-" y@u.9 ",
-" ##i ",
-" "
-};
diff --git a/utils/configtool/src/bitmaps/wxconfigtool.ico b/utils/configtool/src/bitmaps/wxconfigtool.ico
deleted file mode 100644
index 8d2dc18c6b..0000000000
Binary files a/utils/configtool/src/bitmaps/wxconfigtool.ico and /dev/null differ
diff --git a/utils/configtool/src/bitmaps/wxconfigtool.xpm b/utils/configtool/src/bitmaps/wxconfigtool.xpm
deleted file mode 100644
index 7825bfffe5..0000000000
--- a/utils/configtool/src/bitmaps/wxconfigtool.xpm
+++ /dev/null
@@ -1,41 +0,0 @@
-/* XPM */
-static char *wxconfigtool_xpm[] = {
-"32 32 6 1",
-" c None",
-". c #000000",
-"X c #000084",
-"o c #FFFFFF",
-"O c #FFFF00",
-"+ c #FF0000",
-" ",
-" ",
-" ",
-" ",
-" ",
-" .............. ",
-" .XXXXXXXXXXXX. ",
-" .XXXXXXXXXXXX. ",
-" .XooXXXXXXXXX. ",
-" .XooXXXXXXXXX. ",
-" .XooXXXXXXXXX. ",
-" .XooXXXXXX..............",
-" .XooXXXXXX.OOOOOOOOOOOO.",
-".........XooXXXXXX.OOOOOOOOOOOO.",
-".+++++++.XooXXXXXX.OooOOOOOOOOO.",
-".+++++++.XooXXXXXX.OooOOOOOOOOO.",
-".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
-".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
-".+oo++++...........OooOOOOOOOOO.",
-".+oo+++++++++. .OooOOOOOOOOO.",
-".+oo+++++++++. .OooOOOOOOOOO.",
-".+oo+++++++++. .OooOOOOOOOOO.",
-".+oo+++++++++. .OOOOOOOOOOOO.",
-".+oo+++++++++. .OOOOOOOOOOOO.",
-".++++++++++++. ..............",
-".++++++++++++. ",
-".............. ",
-" ",
-" ",
-" ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/wxconfigtool16x16.xpm b/utils/configtool/src/bitmaps/wxconfigtool16x16.xpm
deleted file mode 100644
index 7c347167d0..0000000000
--- a/utils/configtool/src/bitmaps/wxconfigtool16x16.xpm
+++ /dev/null
@@ -1,25 +0,0 @@
-/* XPM */
-static char *wxconfigtool16x16_xpm[] = {
-"16 16 6 1",
-" c None",
-". c #000000",
-"X c #000084",
-"o c #FFFFFF",
-"O c #FFFF00",
-"+ c #FF0000",
-" ",
-" ",
-" ",
-" ....... ",
-" .XXXXX. ",
-" .oXXXX. ",
-" .oXXX.......",
-".....oXXX.OOOOO.",
-".+++.XXXX.oOOOO.",
-".o++......oOOOO.",
-".o++++. .oOOOO.",
-".o++++. .OOOOO.",
-".+++++. .......",
-"....... ",
-" ",
-" "};
diff --git a/utils/configtool/src/bitmaps/wxconfigtool32x32.xpm b/utils/configtool/src/bitmaps/wxconfigtool32x32.xpm
deleted file mode 100644
index 2940865d37..0000000000
--- a/utils/configtool/src/bitmaps/wxconfigtool32x32.xpm
+++ /dev/null
@@ -1,41 +0,0 @@
-/* XPM */
-static char *wxconfigtool32x32_xpm[] = {
-"32 32 6 1",
-" c None",
-". c #000000",
-"X c #000084",
-"o c #FFFFFF",
-"O c #FFFF00",
-"+ c #FF0000",
-" ",
-" ",
-" ",
-" ",
-" ",
-" .............. ",
-" .XXXXXXXXXXXX. ",
-" .XXXXXXXXXXXX. ",
-" .XooXXXXXXXXX. ",
-" .XooXXXXXXXXX. ",
-" .XooXXXXXXXXX. ",
-" .XooXXXXXX..............",
-" .XooXXXXXX.OOOOOOOOOOOO.",
-".........XooXXXXXX.OOOOOOOOOOOO.",
-".+++++++.XooXXXXXX.OooOOOOOOOOO.",
-".+++++++.XooXXXXXX.OooOOOOOOOOO.",
-".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
-".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
-".+oo++++...........OooOOOOOOOOO.",
-".+oo+++++++++. .OooOOOOOOOOO.",
-".+oo+++++++++. .OooOOOOOOOOO.",
-".+oo+++++++++. .OooOOOOOOOOO.",
-".+oo+++++++++. .OOOOOOOOOOOO.",
-".+oo+++++++++. .OOOOOOOOOOOO.",
-".++++++++++++. ..............",
-".++++++++++++. ",
-".............. ",
-" ",
-" ",
-" ",
-" ",
-" "};
diff --git a/utils/configtool/src/configbrowser.cpp b/utils/configtool/src/configbrowser.cpp
deleted file mode 100644
index 387607a230..0000000000
--- a/utils/configtool/src/configbrowser.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configbrowser.cpp
-// Purpose: Configuration browser
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-08-14
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-
-#include "wx/wx.h"
-#include "wx/splitter.h"
-#include "wx/treectrl.h"
-
-#endif
-
-#include "configbrowser.h"
-
-////@begin XPM images
-////@end XPM images
-
-/*!
- * ctConfigurationBrowserWindow type definition
- */
-
-IMPLEMENT_CLASS( ctConfigurationBrowserWindow, wxPanel )
-
-/*!
- * ctConfigurationBrowserWindow event table definition
- */
-
-BEGIN_EVENT_TABLE( ctConfigurationBrowserWindow, wxPanel )
-
-////@begin ctConfigurationBrowserWindow event table entries
- EVT_TREE_SEL_CHANGED( ID_CONFIGURATION_BROWSER_TREECTRL, ctConfigurationBrowserWindow::OnConfigurationBrowserTreectrl )
-
-////@end ctConfigurationBrowserWindow event table entries
-
-END_EVENT_TABLE()
-
-/*!
- * ctConfigurationBrowserWindow constructor
- */
-
-ctConfigurationBrowserWindow::ctConfigurationBrowserWindow( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
-{
-////@begin ctConfigurationBrowserWindow member initialisation
-////@end ctConfigurationBrowserWindow member initialisation
-
- wxPanel::Create( parent, id, pos, size, style );
-
- CreateControls();
-}
-
-/*!
- * Control creation for ctConfigurationBrowserWindow
- */
-
-void ctConfigurationBrowserWindow::CreateControls()
-{
-////@begin ctConfigurationBrowserWindow content construction
-
- ctConfigurationBrowserWindow* item1 = this;
-
- wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
- item1->SetSizer(item2);
-
- wxSplitterWindow* item3 = new wxSplitterWindow(item1, ID_CONFIGBROWSER_SPLITTERWINDOW, wxDefaultPosition, wxSize(400, 400), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxSP_NO_XP_THEME);
- wxTreeCtrl* item4 = new wxTreeCtrl(item3, ID_CONFIGURATION_BROWSER_TREECTRL, wxDefaultPosition, wxSize(100, 100), wxTR_SINGLE|wxNO_BORDER);
- ctConfigurationBrowserControlPanel* item5 = new ctConfigurationBrowserControlPanel(item3, ID_PANEL, wxDefaultPosition, wxSize(100, 80), wxNO_BORDER|wxTAB_TRAVERSAL);
- item3->SplitVertically(item4, item5, 200);
- item2->Add(item3, 1, wxGROW, 5);
-
-////@end ctConfigurationBrowserWindow content construction
-}
-
-/*!
- * Event handler for ID_CONFIGURATION_BROWSER_TREECTRL
- */
-
-void ctConfigurationBrowserWindow::OnConfigurationBrowserTreectrl( wxTreeEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Should we show tooltips?
- */
-
-bool ctConfigurationBrowserWindow::ShowToolTips()
-{
- return true;
-}
-
-/*!
- * ctConfigurationBrowserControlPanel type definition
- */
-
-IMPLEMENT_CLASS( ctConfigurationBrowserControlPanel, wxPanel )
-
-/*!
- * ctConfigurationBrowserControlPanel event table definition
- */
-
-BEGIN_EVENT_TABLE( ctConfigurationBrowserControlPanel, wxPanel )
-
-////@begin ctConfigurationBrowserControlPanel event table entries
- EVT_BUTTON( ID_ADD_CONFIGURATION, ctConfigurationBrowserControlPanel::OnAddConfiguration )
- EVT_UPDATE_UI( ID_ADD_CONFIGURATION, ctConfigurationBrowserControlPanel::OnUpdateAddConfiguration )
-
- EVT_BUTTON( ID_REMOVE_CONFIGURATION, ctConfigurationBrowserControlPanel::OnRemoveConfiguration )
- EVT_UPDATE_UI( ID_REMOVE_CONFIGURATION, ctConfigurationBrowserControlPanel::OnUpdateRemoveConfiguration )
-
- EVT_BUTTON( ID_RENAME_CONFIGURATION, ctConfigurationBrowserControlPanel::OnRenameConfiguration )
- EVT_UPDATE_UI( ID_RENAME_CONFIGURATION, ctConfigurationBrowserControlPanel::OnUpdateRenameConfiguration )
-
-////@end ctConfigurationBrowserControlPanel event table entries
-
-END_EVENT_TABLE()
-
-/*!
- * ctConfigurationBrowserControlPanel constructor
- */
-
-ctConfigurationBrowserControlPanel::ctConfigurationBrowserControlPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
-{
-////@begin ctConfigurationBrowserControlPanel member initialisation
-////@end ctConfigurationBrowserControlPanel member initialisation
-
-////@begin ctConfigurationBrowserControlPanel creation
- wxPanel::Create( parent, id, pos, size, style );
-
- CreateControls();
-////@end ctConfigurationBrowserControlPanel creation
-}
-
-/*!
- * Control creation for ctConfigurationBrowserControlPanel
- */
-
-void ctConfigurationBrowserControlPanel::CreateControls()
-{
-////@begin ctConfigurationBrowserControlPanel content construction
-
- ctConfigurationBrowserControlPanel* item5 = this;
-
- wxBoxSizer* item6 = new wxBoxSizer(wxVERTICAL);
- item5->SetSizer(item6);
-
- wxStaticText* item7 = new wxStaticText(item5, wxID_STATIC, _("Browse, add and remove configurations"), wxDefaultPosition, wxDefaultSize, 0);
- item6->Add(item7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
-
- item6->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxButton* item9 = new wxButton(item5, ID_ADD_CONFIGURATION, _("&Add..."), wxDefaultPosition, wxDefaultSize, 0);
- item6->Add(item9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxButton* item10 = new wxButton(item5, ID_REMOVE_CONFIGURATION, _("&Remove..."), wxDefaultPosition, wxDefaultSize, 0);
- item6->Add(item10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxButton* item11 = new wxButton(item5, ID_RENAME_CONFIGURATION, _("&Rename..."), wxDefaultPosition, wxDefaultSize, 0);
- item6->Add(item11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- item6->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxStaticText* item13 = new wxStaticText(item5, ID_CONFIGURATION_NAME, _("Configuration:"), wxDefaultPosition, wxDefaultSize, 0);
- item6->Add(item13, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
-
- wxTextCtrl* item14 = new wxTextCtrl(item5, ID_CONFIGURATION_DESCRIPTION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
- item6->Add(item14, 1, wxGROW|wxALL, 5);
-
-////@end ctConfigurationBrowserControlPanel content construction
-}
-
-/*!
- * Event handler for ID_ADD_CONFIGURATION
- */
-
-void ctConfigurationBrowserControlPanel::OnAddConfiguration( wxCommandEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Update event handler for ID_ADD_CONFIGURATION
- */
-
-void ctConfigurationBrowserControlPanel::OnUpdateAddConfiguration( wxUpdateUIEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Event handler for ID_REMOVE_CONFIGURATION
- */
-
-void ctConfigurationBrowserControlPanel::OnRemoveConfiguration( wxCommandEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Update event handler for ID_REMOVE_CONFIGURATION
- */
-
-void ctConfigurationBrowserControlPanel::OnUpdateRemoveConfiguration( wxUpdateUIEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Event handler for ID_RENAME_CONFIGURATION
- */
-
-void ctConfigurationBrowserControlPanel::OnRenameConfiguration( wxCommandEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Update event handler for ID_RENAME_CONFIGURATION
- */
-
-void ctConfigurationBrowserControlPanel::OnUpdateRenameConfiguration( wxUpdateUIEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Should we show tooltips?
- */
-
-bool ctConfigurationBrowserControlPanel::ShowToolTips()
-{
- return true;
-}
diff --git a/utils/configtool/src/configbrowser.h b/utils/configtool/src/configbrowser.h
deleted file mode 100644
index f7e0e9a40c..0000000000
--- a/utils/configtool/src/configbrowser.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configbrowser.h
-// Purpose: Configuration browser
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-08-14
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CONFIGBROWSER_H_
-#define _CONFIGBROWSER_H_
-
-/*!
- * Includes
- */
-
-////@begin includes
-////@end includes
-
-/*!
- * Forward declarations
- */
-
-////@begin forward declarations
-class ctConfigurationBrowserControlPanel;
-////@end forward declarations
-
-/*!
- * Control identifiers
- */
-
-////@begin control identifiers
-#define ID_DIALOG 2000
-#define ID_CONFIGBROWSER_SPLITTERWINDOW 2001
-#define ID_CONFIGURATION_BROWSER_TREECTRL 2002
-#define ID_PANEL 2003
-#define ID_ADD_CONFIGURATION 2004
-#define ID_REMOVE_CONFIGURATION 2005
-#define ID_RENAME_CONFIGURATION 2006
-#define ID_CONFIGURATION_NAME 2007
-#define ID_CONFIGURATION_DESCRIPTION 2008
-////@end control identifiers
-
-/*!
- * ctConfigurationBrowserWindow class declaration
- */
-
-class ctConfigurationBrowserWindow: public wxPanel
-{
- DECLARE_CLASS( ctConfigurationBrowserWindow )
- DECLARE_EVENT_TABLE()
-
-public:
- /// Constructor
- ctConfigurationBrowserWindow( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN );
-
- /// Creates the controls and sizers
- void CreateControls();
-
-////@begin ctConfigurationBrowserWindow event handler declarations
-
- /// Event handler for ID_CONFIGURATION_BROWSER_TREECTRL
- void OnConfigurationBrowserTreectrl( wxTreeEvent& event );
-
-////@end ctConfigurationBrowserWindow event handler declarations
-
-////@begin ctConfigurationBrowserWindow member function declarations
-
-////@end ctConfigurationBrowserWindow member function declarations
-
- /// Should we show tooltips?
- static bool ShowToolTips();
-
-////@begin ctConfigurationBrowserWindow member variables
-////@end ctConfigurationBrowserWindow member variables
-};
-
-/*!
- * ctConfigurationBrowserControlPanel class declaration
- */
-
-class ctConfigurationBrowserControlPanel: public wxPanel
-{
- DECLARE_CLASS( ctConfigurationBrowserControlPanel )
- DECLARE_EVENT_TABLE()
-
-public:
- /// Constructor
- ctConfigurationBrowserControlPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER|wxTAB_TRAVERSAL );
-
- /// Creates the controls and sizers
- void CreateControls();
-
-////@begin ctConfigurationBrowserControlPanel event handler declarations
-
- /// Event handler for ID_ADD_CONFIGURATION
- void OnAddConfiguration( wxCommandEvent& event );
-
- /// Update event handler for ID_ADD_CONFIGURATION
- void OnUpdateAddConfiguration( wxUpdateUIEvent& event );
-
- /// Event handler for ID_REMOVE_CONFIGURATION
- void OnRemoveConfiguration( wxCommandEvent& event );
-
- /// Update event handler for ID_REMOVE_CONFIGURATION
- void OnUpdateRemoveConfiguration( wxUpdateUIEvent& event );
-
- /// Event handler for ID_RENAME_CONFIGURATION
- void OnRenameConfiguration( wxCommandEvent& event );
-
- /// Update event handler for ID_RENAME_CONFIGURATION
- void OnUpdateRenameConfiguration( wxUpdateUIEvent& event );
-
-////@end ctConfigurationBrowserControlPanel event handler declarations
-
-////@begin ctConfigurationBrowserControlPanel member function declarations
-
-////@end ctConfigurationBrowserControlPanel member function declarations
-
- /// Should we show tooltips?
- static bool ShowToolTips();
-
-////@begin ctConfigurationBrowserControlPanel member variables
-////@end ctConfigurationBrowserControlPanel member variables
-};
-
-#endif
- // _CONFIGBROWSER_H_
diff --git a/utils/configtool/src/configitem.cpp b/utils/configtool/src/configitem.cpp
deleted file mode 100644
index a0734645d7..0000000000
--- a/utils/configtool/src/configitem.cpp
+++ /dev/null
@@ -1,806 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configitem.cpp
-// Purpose: wxWidgets Configuration Tool config item class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-03
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#include "wx/tokenzr.h"
-#include "configitem.h"
-#include "configtree.h"
-#include "configtooldoc.h"
-#include "configtoolview.h"
-#include "wxconfigtool.h"
-#include "mainframe.h"
-
-IMPLEMENT_CLASS(ctConfigItem, wxObject)
-
-ctConfigItem::ctConfigItem()
-{
- m_modified = false;
- m_type = ctTypeBoolCheck;
- m_treeItemId = wxTreeItemId();
- m_enabled = true;
- m_parent = NULL;
- m_active = true;
-}
-
-ctConfigItem::ctConfigItem(ctConfigItem* parent, ctConfigType type, const wxString& name)
-{
- m_modified = false;
- m_type = type;
- m_treeItemId = wxTreeItemId();
- m_enabled = false;
- m_active = true;
- SetName(name);
- m_parent = parent;
- if (parent)
- parent->AddChild(this);
-}
-
-ctConfigItem::~ctConfigItem()
-{
- ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
- if (m_treeItemId.IsOk() && treeCtrl)
- {
- ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(m_treeItemId);
- if (data)
- data->SetConfigItem(NULL);
- }
- if (GetParent())
- GetParent()->RemoveChild(this);
- else
- {
- if (wxGetApp().GetMainFrame()->GetDocument() &&
- wxGetApp().GetMainFrame()->GetDocument()->GetTopItem() == this)
- wxGetApp().GetMainFrame()->GetDocument()->SetTopItem(NULL);
- }
-
- Clear();
-}
-
-/// Can we edit this property?
-bool ctConfigItem::CanEditProperty(const wxString& propName) const
-{
- ctProperty* prop = m_properties.FindProperty(propName);
- if (prop)
- return !prop->GetReadOnly();
- else
- return false;
-}
-
-/// Assignment operator.
-void ctConfigItem::operator= (const ctConfigItem& item)
-{
- m_properties = item.m_properties;
- m_modified = item.m_modified;
- m_defaultProperty = item.m_defaultProperty;
- m_type = item.m_type;
- m_enabled = item.m_enabled;
- m_active = item.m_active;
-}
-
-/// Sets the name property.
-void ctConfigItem::SetName(const wxString& name )
-{
- m_properties.SetProperty(wxT("name"), name);
-}
-
-/// Clear children
-void ctConfigItem::Clear()
-{
- wxObjectList::compatibility_iterator node = m_children.GetFirst();
- while (node)
- {
- wxObjectList::compatibility_iterator next = node->GetNext();
- ctConfigItem* child = (ctConfigItem*) node->GetData();
-
- // This should delete 'node' too, assuming
- // child's m_parent points to 'this'. If not,
- // it'll be cleaned up by m_children.Clear().
- delete child;
-
- node = next;
- }
- m_children.Clear();
-}
-
-// Get the nth child
-ctConfigItem* ctConfigItem::GetChild(int n) const
-{
- wxASSERT ( n < GetChildCount() && n > -1 );
-
- if ( n < GetChildCount() && n > -1 )
- {
- ctConfigItem* child = wxDynamicCast(m_children.Item(n)->GetData(), ctConfigItem);
- return child;
- }
- else
- return NULL;
-}
-
-// Get the child count
-int ctConfigItem::GetChildCount() const
-{
- return m_children.GetCount();
-}
-
-/// Add a child
-void ctConfigItem::AddChild(ctConfigItem* item)
-{
- m_children.Append(item);
- item->SetParent(this);
-}
-
-/// Remove (but don't delete) a child
-void ctConfigItem::RemoveChild(ctConfigItem* item)
-{
- m_children.DeleteObject(item);
- item->SetParent(NULL);
-}
-
-/// Initialise standard properties
-void ctConfigItem::InitProperties()
-{
- ctProperty* prop = m_properties.FindProperty(wxT("name"));
- if (!prop)
- {
- prop = new ctProperty;
- m_properties.AddProperty(prop);
- }
- prop->SetDescription(_("Name The name of the configuration setting."));
- prop->SetReadOnly(true);
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Description
The setting description."),
- wxVariant(wxT(""), wxT("description")),
- wxT("multiline")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Default-state
The default state."),
- wxVariant(true, wxT("default-state")),
- wxT("bool")));
-
- if (GetType() == ctTypeString)
- {
- m_properties.AddProperty(
- new ctProperty(
- wxT("Default-value
The default value."),
- wxVariant(true, wxT("default-value")),
- wxT("")));
- }
- else if (GetType() == ctTypeInteger)
- {
- m_properties.AddProperty(
- new ctProperty(
- wxT("Default-value
The default value."),
- wxVariant((long) 0, wxT("default-value")),
- wxT("")));
- }
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Requires
When any of the given settings are 0, this setting must be 0. Taking wxUSE_ZIPSTREAM as an example:
If wxUSE_STREAMS is 0, then wxUSE_ZIPSTREAM must be 0.
If wxUSE_STREAMS is 1, then wxUSE_ZIPSTREAM may be 0 or 1."),
- wxVariant(wxT(""), wxT("requires")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Precludes
When any of these settings are 1, this setting must be 0. Taking wxUSE_ODBC as an example:
If wxUSE_UNICODE is 1, then wxUSE_ODBC must be 0.
If wxUSE_UNICODE is 0, then wxUSE_ODBC may be 0 or 1."),
- wxVariant(wxT(""), wxT("precludes")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Enabled-if
When any of these settings are 1, this setting must be 1."),
- wxVariant(wxT(""), wxT("enabled-if")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Enabled-if-not
When any of these settings are 0, this setting must be 1. Taking wxUSE_TOOLBAR_SIMPLE as an example:
If wxUSE_TOOLBAR_NATIVE is 0, wxUSE_TOOLBAR_SIMPLE must be 1.
If wxUSE_TOOLBAR_NATIVE is 1, wxUSE_TOOLBAR_SIMPLE may be 0 or 1."),
- wxVariant(wxT(""), wxT("enabled-if-not")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Indeterminate-if
When any of these settings are 1, this setting becomes active and indeterminate. Taking wxUSE_UNICODE as an example:
If Custom is 1, wxUSE_UNICODE is indeterminate."),
- wxVariant(wxT(""), wxT("indeterminate-if")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Exclusivity
The settings that are mutually exclusive with this one."),
- wxVariant(wxT(""), wxT("exclusivity")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Context
A list of symbols (config settings), at least one of which must be enabled for this item to participate in dependency rules.
\nIf empty, this item will always be used in dependency rules.
\nMostly this will be used to specify the applicable platforms, but it can contain other symbols, for example compilers."),
- wxVariant(wxT(""), wxT("context")),
- wxT("configitems")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Configure-command
Configure command to generate if this is on."),
- wxVariant(wxT(""), wxT("configure-command")),
- wxT("multiline")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Help-topic
The help topic in the wxWidgets manual for this component or setting."),
- wxVariant(wxT(""), wxT("help-topic")),
- wxT("multiline")));
-
- m_properties.AddProperty(
- new ctProperty(
- wxT("Notes
User notes."),
- wxVariant(wxT(""), wxT("notes")),
- wxT("multiline")));
-
- m_defaultProperty = wxT("description");
-}
-
-/// Do additional actions to apply the property to the internal
-/// representation.
-void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& WXUNUSED(oldValue))
-{
- ctConfigToolDoc* doc = GetDocument();
- bool oldModified = doc->IsModified();
- doc->Modify(true);
-
- wxString name = prop->GetName();
- if (name == wxT("requires") ||
- name == wxT("precludes") ||
- name == wxT("enabled-if") ||
- name == wxT("enabled-if-not") ||
- name == wxT("indeterminate-if") ||
- name == wxT("context"))
- {
- doc->RefreshDependencies();
- }
- if (doc && doc->GetFirstView() && oldModified != doc->IsModified())
- ((ctConfigToolView*)doc->GetFirstView())->OnChangeFilename();
-}
-
-/// Get the associated document (currently, assumes
-/// there's only ever one document active)
-ctConfigToolDoc* ctConfigItem::GetDocument()
-{
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- return doc;
-}
-
-/// Convert string containing config item names to
-/// an array of config item names
-void ctConfigItem::StringToArray(const wxString& items, wxArrayString& itemsArray)
-{
- wxStringTokenizer tokenizer(items, wxT(","));
- while (tokenizer.HasMoreTokens())
- {
- wxString token = tokenizer.GetNextToken();
- itemsArray.Add(token);
- }
-}
-
-/// Convert array containing config item names to
-/// a string
-void ctConfigItem::ArrayToString(const wxArrayString& itemsArray, wxString& items)
-{
- items = wxEmptyString;
- size_t i;
- for (i = 0; i < itemsArray.GetCount(); i++)
- {
- items += itemsArray[i];
- if (i < (itemsArray.GetCount() - 1))
- items += wxT(",");
- }
-}
-
-/// Populate a list of items found in the string.
-void ctConfigItem::StringToItems(ctConfigItem* topItem, const wxString& items, wxList& list)
-{
- wxArrayString strArray;
- StringToArray(items, strArray);
- size_t i;
- for (i = 0; i < strArray.GetCount(); i++)
- {
- wxString str(strArray[i]);
- ctConfigItem* item = topItem->FindItem(str);
- if (item)
- list.Append(item);
- }
-}
-
-/// Find an item in this hierarchy
-ctConfigItem* ctConfigItem::FindItem(const wxString& name)
-{
- if (GetName() == name)
- return this;
-
- for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- ctConfigItem* found = child->FindItem(name);
- if (found)
- return found;
- }
- return NULL;
-}
-
-/// Find the next sibling
-ctConfigItem* ctConfigItem::FindNextSibling()
-{
- if (!GetParent())
- return NULL;
- wxObjectList::compatibility_iterator node = GetParent()->GetChildren().Member(this);
- if (node && node->GetNext())
- {
- return (ctConfigItem*) node->GetNext()->GetData();
- }
- return NULL;
-}
-
-/// Find the previous sibling
-ctConfigItem* ctConfigItem::FindPreviousSibling()
-{
- if (!GetParent())
- return NULL;
- wxObjectList::compatibility_iterator node = GetParent()->GetChildren().Member(this);
- if (node && node->GetPrevious())
- {
- return (ctConfigItem*) node->GetPrevious()->GetData();
- }
- return NULL;
-}
-
-/// Sync appearance
-void ctConfigItem::Sync()
-{
- if (GetDocument())
- {
- ctConfigToolView* view = (ctConfigToolView*) GetDocument()->GetFirstView();
- if (view)
- {
- view->SyncItem(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), this);
- }
- }
-}
-
-/// Create a clone of this and children
-ctConfigItem* ctConfigItem::DeepClone()
-{
- ctConfigItem* newItem = Clone();
-
- for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- ctConfigItem* newChild = child->DeepClone();
- newItem->AddChild(newChild);
- }
- return newItem;
-}
-
-/// Detach: remove from parent, and remove tree items
-void ctConfigItem::Detach()
-{
- if (GetParent())
- GetParent()->RemoveChild(this);
- else
- GetDocument()->SetTopItem(NULL);
- SetParent(NULL);
-
- wxTreeItemId treeItem = GetTreeItemId();
-
- DetachFromTree();
-
- // Will delete the branch, but not the config items.
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(treeItem);
-}
-
-/// Hide from tree: make sure tree deletions won't delete
-/// the config items
-void ctConfigItem::DetachFromTree()
-{
- wxTreeItemId item = GetTreeItemId();
-
- ctTreeItemData* data = (ctTreeItemData*) wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetItemData(item);
- data->SetConfigItem(NULL);
- m_treeItemId = wxTreeItemId();
-
- for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- child->DetachFromTree();
- }
-}
-
-/// Attach: insert after the given position
-void ctConfigItem::Attach(ctConfigItem* parent, ctConfigItem* insertBefore)
-{
- if (parent)
- {
- SetParent(parent);
- if (insertBefore)
- {
- wxObjectList::compatibility_iterator node = parent->GetChildren().Member(insertBefore);
- if (node)
- parent->GetChildren().Insert(node, this);
- else
- parent->GetChildren().Append(this);
- }
- else
- parent->GetChildren().Append(this);
- }
- else
- {
- GetDocument()->SetTopItem(this);
- }
-}
-
-/// Can have children?
-bool ctConfigItem::CanHaveChildren() const
-{
- return (GetType() == ctTypeGroup ||
- GetType() == ctTypeCheckGroup ||
- GetType() == ctTypeRadioGroup);
-}
-
-// An item is in the active context if:
-// The context field is empty; or
-// The context field contains a symbol that is currently enabled.
-bool ctConfigItem::IsInActiveContext()
-{
- wxString context = GetPropertyString(wxT("context"));
- if (context.IsEmpty())
- return true;
-
- wxList contextItems;
- StringToItems(GetDocument()->GetTopItem(), context, contextItems);
-
- for ( wxObjectList::compatibility_iterator node = contextItems.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
- if (otherItem->IsEnabled())
- return true;
- }
- return false;
-}
-
-/// Evaluate the requires properties:
-/// if any of the 'requires' items are disabled,
-/// then this one is disabled (and inactive).
-void ctConfigItem::EvaluateDependencies()
-{
- // For debugging purposes
- wxString name = GetName();
- wxList items;
- wxString requires = GetPropertyString(wxT("requires"));
- wxString precludes = GetPropertyString(wxT("precludes"));
- wxString enabledIf = GetPropertyString(wxT("enabled-if"));
- wxString enabledIfNot = GetPropertyString(wxT("enabled-if-not"));
- wxString indeterminateIf = GetPropertyString(wxT("indeterminate-if"));
-
- bool active = true;
- bool enabled = IsEnabled();
- bool oldEnabled = enabled;
- bool oldActive = IsActive();
- bool explicitlyEnabled = false;
- bool explicitlyDisabled = false;
- bool inActiveContext = IsInActiveContext();
-
- // Add the parent to the list of dependencies, if the
- // parent is a check or radio group.
- ctConfigItem* parent = GetParent();
- if (parent &&
- (parent->GetType() == ctTypeCheckGroup ||
- parent->GetType() == ctTypeRadioGroup))
- items.Append(parent);
-
- wxList tempItems;
- StringToItems(GetDocument()->GetTopItem(), requires, tempItems);
-
- wxObjectList::compatibility_iterator node;
- for ( node = tempItems.GetFirst(); node; node = node->GetNext() )
- {
- // Only consider the dependency if both items are in
- // an active context.
- // Each is in the active context if:
- // The context field is empty; or
- // The context field contains a symbol that is currently enabled.
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
- if (inActiveContext && otherItem->IsInActiveContext())
- items.Append(otherItem);
- }
-
- {
- int enabledCount = 0;
- for ( node = items.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
-
- if (otherItem->IsEnabled())
- {
- enabledCount ++;
- }
- }
- if (items.GetCount() > 0 && enabledCount == 0)
- {
- // None of the items were enabled
- enabled = false;
- active = false;
- explicitlyDisabled = true;
- }
- }
-
- items.Clear();
- if (!enabledIfNot.IsEmpty())
- {
- StringToItems(GetDocument()->GetTopItem(), enabledIfNot, items);
- int disabledCount = 0;
- int inContextCount = 0;
-
- for ( wxObjectList::compatibility_iterator node = items.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
-
- if (inActiveContext && otherItem->IsInActiveContext())
- {
- // Make this enabled and inactive, _unless_ it's
- // already been explicitly disabled in the previous
- // requires evaluation (it really _has_ to be off)
- if (!otherItem->IsEnabled())
- {
- disabledCount ++;
- }
- inContextCount ++;
- }
- }
- // Enable if there were no related items that were enabled
- if (inContextCount > 0 && (disabledCount == inContextCount) && !explicitlyDisabled)
- {
- explicitlyEnabled = true;
- enabled = true;
- active = false;
- }
- }
-
- items.Clear();
- if (!enabledIf.IsEmpty())
- {
- StringToItems(GetDocument()->GetTopItem(), enabledIf, items);
- int enabledCount = 0;
- int inContextCount = 0;
-
- for ( wxObjectList::compatibility_iterator node = items.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
- wxString otherName = otherItem->GetName();
-
- if (inActiveContext && otherItem->IsInActiveContext())
- {
- // Make this enabled and inactive, _unless_ it's
- // already been explicitly disabled in the previous
- // requires evaluation (it really _has_ to be off)
- if (otherItem->IsEnabled())
- {
- enabledCount ++;
- }
- inContextCount ++;
- }
- }
- // Enable if there were no related items that were disabled
- if (inContextCount > 0 && (enabledCount > 0) && !explicitlyDisabled)
- {
- explicitlyEnabled = true;
- enabled = true;
- active = false;
- }
- }
-
- items.Clear();
- if (!precludes.IsEmpty())
- {
- StringToItems(GetDocument()->GetTopItem(), precludes, items);
- int enabledCount = 0;
- // int disabledCount = 0;
- int inContextCount = 0;
-
- for ( wxObjectList::compatibility_iterator node = items.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
-
- if (inActiveContext && otherItem->IsInActiveContext())
- {
- // Make this disabled and inactive, _unless_ it's
- // already been explicitly enabled in the previous
- // requires evaluation (it really _has_ to be on)
-// if (!otherItem->IsEnabled())
- if (otherItem->IsEnabled())
- {
- enabledCount ++;
- // disabledCount ++;
- }
- inContextCount ++;
- }
- }
- // Disable if there were no related items that were disabled
- if (inContextCount > 0 && (enabledCount > 0) && !explicitlyEnabled)
-// if (inContextCount > 0 && (disabledCount > 0) && !explicitlyEnabled)
- {
- enabled = false;
- active = false;
- explicitlyDisabled = true;
- }
- }
-
- // Indeterminate overrides the others, and
- // makes the item active.
- items.Clear();
- if (!indeterminateIf.IsEmpty())
- {
- StringToItems(GetDocument()->GetTopItem(), indeterminateIf, items);
- int enabledCount = 0;
- int inContextCount = 0;
-
- for ( wxObjectList::compatibility_iterator node = items.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
-
- if (inActiveContext && otherItem->IsInActiveContext())
- {
- if (otherItem->IsEnabled())
- {
- enabledCount ++;
- }
- inContextCount ++;
- }
- }
- if (inContextCount > 0 && enabledCount > 0)
- {
- active = true;
- explicitlyEnabled = false;
- explicitlyDisabled = false;
- }
- }
-
- // Finally check a sort of dependency: whether our
- // context is active. If not, make this inactive.
- if (!IsInActiveContext())
- active = false;
- else
- {
- // If we didn't explicitly enable or disable it,
- // then we should make it active.
- if (!explicitlyEnabled && !explicitlyDisabled)
- active = true;
- }
-
- SetActive(active);
-
- // If going active, set enabled state to the default state
- if (active &&
- oldActive != active &&
- (GetType() == ctTypeBoolCheck || GetType() == ctTypeCheckGroup) &&
- m_properties.FindProperty(wxT("default-state")))
- {
- bool defaultState = m_properties.FindProperty(wxT("default-state"))->GetVariant().GetBool();
- enabled = defaultState;
- }
- Enable(enabled);
-
- // Deal with setting a radio button
- if (enabled && enabled != oldEnabled &&
- (GetType() == ctTypeBoolRadio || GetType() == ctTypeRadioGroup))
- {
- wxList considered;
- PropagateRadioButton(considered);
- }
-}
-
-/// Get description, which may be dynamically
-/// generated depending on the property.
-wxString ctConfigItem::GetDescription(ctProperty* property)
-{
- if (property->GetName() == wxT("description"))
- {
- wxString value(property->GetValue());
- if (value.IsEmpty())
- return wxT("Double-click on description to write a brief explanation of the setting.
");
- else
- return value;
- }
- else if (property->GetName() == wxT("notes"))
- {
- wxString value(property->GetValue());
- if (value.IsEmpty())
- return wxT("Double-click on notes to write notes about this setting.
");
- else
- return value;
- }
- return property->GetDescription();
-}
-
-/// Get the title for the property editor
-wxString ctConfigItem::GetTitle()
-{
- wxString title(GetName());
- if (GetType() == ctTypeCheckGroup ||
- GetType() == ctTypeRadioGroup ||
- GetType() == ctTypeBoolCheck ||
- GetType() == ctTypeBoolRadio)
- {
- if (IsEnabled())
- title = title + _T(" - enabled");
- else
- title = title + _T(" - disabled");
- }
- return title;
-}
-
-/// Propagate a change in enabled/disabled status
-void ctConfigItem::PropagateChange(wxList& considered)
-{
- if (GetType() == ctTypeCheckGroup ||
- GetType() == ctTypeRadioGroup ||
- GetType() == ctTypeBoolCheck ||
- GetType() == ctTypeBoolRadio)
- {
- // TODO: what about string, integer? Can they have
- // dependencies?
-
- for ( wxObjectList::compatibility_iterator node = GetDependents().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
-
- // Avoid loops
- if (!considered.Member(child))
- {
- considered.Append(child);
-
- child->EvaluateDependencies();
- child->Sync();
-
- child->PropagateChange(considered);
- }
- }
- }
-}
-
-/// Process radio button selection
-void ctConfigItem::PropagateRadioButton(wxList& considered)
-{
- if ((GetType() == ctTypeBoolRadio || GetType() == ctTypeRadioGroup) && IsEnabled())
- {
- wxString mutuallyExclusive(GetPropertyString(wxT("exclusivity")));
-
- wxList list;
- StringToItems(GetDocument()->GetTopItem(), mutuallyExclusive, list);
-
- for ( wxObjectList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- if (child->IsEnabled() && child != this)
- {
- child->Enable(false);
- child->Sync();
-
- if (!considered.Member(child))
- child->PropagateChange(considered);
- }
- }
- }
-}
diff --git a/utils/configtool/src/configitem.h b/utils/configtool/src/configitem.h
deleted file mode 100644
index 94430793d6..0000000000
--- a/utils/configtool/src/configitem.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configitem.h
-// Purpose: wxWidgets Configuration Tool config item class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-03
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CT_CONFIGITEM_H_
-#define _CT_CONFIGITEM_H_
-
-#include "wx/wx.h"
-#include "wx/treectrl.h"
-
-#include "property.h"
-
-class ctConfigToolDoc;
-
-/*!
- * The type of config item
- */
-
-enum ctConfigType
-{
- ctTypeUnknown,
- ctTypeGroup, // A group with no checkbox
- ctTypeCheckGroup, // A group that can be switched on/off (check)
- ctTypeRadioGroup, // A group that can be switched on/off (radio)
- ctTypeString, // An option with a string value
- ctTypeInteger, // An option with an integer value
- ctTypeBoolCheck, // An on/off option
- ctTypeBoolRadio // An on/off mutually exclusive option
-};
-
-/*!
- * ctConfigItem represents a configuration setting.
- * Each setting has a number of properties, some of
- * which may be specific to a particular kind of
- * setting, so we make it quite generic and extensible
- * by using a property list.
- */
-
-class ctConfigItem: public wxObject
-{
-public:
- /// Ctor and dtor
- ctConfigItem(ctConfigItem* parent, ctConfigType type, const wxString& name);
- ctConfigItem();
- virtual ~ctConfigItem();
-
- /// Copy constructor.
- ctConfigItem(const ctConfigItem& item) : wxObject()
- {
- (*this) = item;
- }
-
-/// Operations
-
- /// Assignment operator.
- void operator= (const ctConfigItem& item);
-
- /// Create a clone
- ctConfigItem* Clone()
- {
- ctConfigItem* item = new ctConfigItem;
- *item = *this;
- return item;
- }
-
- /// Create a clone of this and children
- ctConfigItem* DeepClone();
-
- /// Do additional actions to apply the property to the internal
- /// representation.
- void ApplyProperty(ctProperty* prop, const wxVariant& oldValue);
-
- /// Clear children
- void Clear();
-
- /// Add a child
- void AddChild(ctConfigItem* item);
-
- /// Remove (but don't delete) a child
- void RemoveChild(ctConfigItem* item);
-
- /// Initialise standard properties
- void InitProperties();
-
- /// Convert string containing config item names to
- /// an array of config item names
- static void StringToArray(const wxString& items, wxArrayString& itemsArray);
-
- /// Convert array containing config item names to
- /// a string
- static void ArrayToString(const wxArrayString& itemsArray, wxString& items);
-
- /// Populate a list of items found in the string.
- static void StringToItems(ctConfigItem* topItem, const wxString& items, wxList& list);
-
- /// Find an item in this hierarchy
- ctConfigItem* FindItem(const wxString& name);
-
- /// Find the next sibling
- ctConfigItem* FindNextSibling();
-
- /// Find the previous sibling
- ctConfigItem* FindPreviousSibling();
-
- /// Sync appearance
- void Sync();
-
- /// Detach: remove from parent, and remove tree items
- void Detach();
-
- /// Attach: insert before the given position
- void Attach(ctConfigItem* parent, ctConfigItem* insertbefore);
-
- /// Hide from tree: make sure tree deletions won't delete
- /// the config items
- void DetachFromTree();
-
- /// Evaluate the depends-on properties:
- /// if any of the depends-on items are disabled,
- /// then this one is disabled (and inactive).
- void EvaluateDependencies();
-
- /// Propagate a change in enabled/disabled status
- void PropagateChange(wxList& considered);
-
- /// Process radio button selection
- void PropagateRadioButton(wxList& considered);
-
- // An item is in the active context if:
- // The context field is empty; or
- // The context field contains a symbol that is currently enabled.
- bool IsInActiveContext();
-
-/// Accessors
-
- /// Returns the name property.
- wxString GetName() const { return GetPropertyString(wxT("name")); }
-
- /// Sets the name property.
- void SetName(const wxString& name ) ;
-
- /// Returns the value property.
- wxVariant GetValue() const { return m_properties.FindPropertyValue(wxT("value")); }
-
- /// Sets the value property.
- void SetValue(const wxVariant& value ) ;
-
- /// Returns the string for the given property.
- wxString GetPropertyString(const wxString& propName) const { return m_properties.FindPropertyValueString(propName); }
-
- /// Sets the string for the given property.
- void SetPropertyString(const wxString& propName, const wxString& value) { m_properties.SetProperty(propName, value); }
-
- /// Can we edit this property?
- bool CanEditProperty(const wxString& propName) const ;
-
- /// Returns the list of properties for
- /// this item.
- ctProperties& GetProperties() { return m_properties; }
-
- /// Set the default property.
- void SetDefaultProperty(const wxString& defaultProp) { m_defaultProperty = defaultProp; }
-
- /// Get the default property.
- wxString GetDefaultProperty() const { return m_defaultProperty; }
-
- /// Is this item modified?
- bool IsModified() const { return m_modified; }
-
- /// Mark this as modified.
- void Modify(bool modified = true) { m_modified = modified; }
-
- /// Is this item enabled? (checked/unchecked)
- bool IsEnabled() const { return m_enabled; }
-
- /// Enable or disable (check/uncheck)
- void Enable(bool enable = true) { m_enabled = enable; }
-
- /// Is this item active? (sensitive to user input)
- bool IsActive() const { return m_active; }
-
- /// Make this (in)active
- void SetActive(bool active = true) { m_active = active; }
-
- /// Set the type
- void SetType(ctConfigType type) { m_type = type; }
-
- // Get the type
- ctConfigType GetType() const { return m_type; }
-
- /// Set the tree item id
- void SetTreeItem(wxTreeItemId id) { m_treeItemId = id; }
-
- // Get the type
- wxTreeItemId GetTreeItemId() const { return m_treeItemId ; }
-
- /// Get the list of children
- wxList& GetChildren() { return m_children; }
-
- /// Get the nth child
- ctConfigItem* GetChild(int n) const;
-
- /// Get the child count
- int GetChildCount() const;
-
- /// Get the list of dependents
- wxList& GetDependents() { return m_dependents; }
-
- /// Get the parent
- ctConfigItem* GetParent() const { return m_parent; }
-
- /// Set the parent
- void SetParent(ctConfigItem* parent) { m_parent = parent; }
-
- /// Get the associated document (currently, assumes
- /// there's only ever one document active)
- ctConfigToolDoc* GetDocument() ;
-
- /// Can have children?
- bool CanHaveChildren() const;
-
- /// Get description, which may be dynamically
- /// generated depending on the property.
- wxString GetDescription(ctProperty* property);
-
- /// Get the title for the property editor
- wxString GetTitle();
-
-protected:
-
- /// The properties for this item.
- ctProperties m_properties;
-
- /// The default property, from the point of
- /// of double-clicking the config item.
- wxString m_defaultProperty;
-
- /// Whether modified
- bool m_modified;
-
- /// The type of the config item
- ctConfigType m_type;
-
- /// The corresponding tree item
- wxTreeItemId m_treeItemId;
-
- /// Is this option enabled? (checked/unchecked)
- bool m_enabled;
-
- /// Is this option active? (i.e. sensitive to user input)
- bool m_active;
-
- /// The list of children.
- wxList m_children;
-
- /// The list of items that are dependent upon
- // this one. This is refreshed when the configuration
- // structurally changes, and is not saved to file.
- wxList m_dependents;
-
- /// The parent config item
- ctConfigItem* m_parent;
-
-DECLARE_CLASS(ctConfigItem)
-};
-
-#endif
-// _CT_CONFIGITEM_H_
diff --git a/utils/configtool/src/configitemselector.cpp b/utils/configtool/src/configitemselector.cpp
deleted file mode 100644
index 04e86c7ed0..0000000000
--- a/utils/configtool/src/configitemselector.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configitemselector.cpp
-// Purpose: Selector for one or more config items
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-
-#include "wx/statline.h"
-#include "wx/splitter.h"
-#include "wx/scrolwin.h"
-#include "wx/spinctrl.h"
-#include "wx/spinbutt.h"
-
-#endif
-
-#include "wx/cshelp.h"
-#include "wx/notebook.h"
-#include "wx/valgen.h"
-#include "configitemselector.h"
-#include "configtooldoc.h"
-#include "configtoolview.h"
-#include "configitem.h"
-#include "mainframe.h"
-#include "wxconfigtool.h"
-
-////@begin XPM images
-////@end XPM images
-
-/*!
- * ctConfigItemsSelector type definition
- */
-
-IMPLEMENT_CLASS( ctConfigItemsSelector, wxDialog )
-
-/*!
- * ctConfigItemsSelector event table definition
- */
-
-BEGIN_EVENT_TABLE( ctConfigItemsSelector, wxDialog )
-
-////@begin ctConfigItemsSelector event table entries
- EVT_BUTTON( ID_CONFIG_ADD, ctConfigItemsSelector::OnConfigAdd )
- EVT_UPDATE_UI( ID_CONFIG_ADD, ctConfigItemsSelector::OnUpdateConfigAdd )
-
- EVT_BUTTON( ID_CONFIG_REMOVE, ctConfigItemsSelector::OnConfigRemove )
- EVT_UPDATE_UI( ID_CONFIG_REMOVE, ctConfigItemsSelector::OnUpdateConfigRemove )
-
- EVT_BUTTON( wxID_OK, ctConfigItemsSelector::OnOk )
-
-////@end ctConfigItemsSelector event table entries
-
-END_EVENT_TABLE()
-
-/*!
- * ctConfigItemsSelector constructor
- */
-
-ctConfigItemsSelector::ctConfigItemsSelector( wxWindow* parent, wxWindowID id, const wxString& caption)
-{
- wxDialog::Create( parent, id, caption);
-
- CreateControls();
- InitSourceConfigList();
-}
-
-/*!
- * Control creation for ctConfigItemsSelector
- */
-
-void ctConfigItemsSelector::CreateControls()
-{
-////@begin ctConfigItemsSelector content construction
-
- ctConfigItemsSelector* item1 = this;
-
- wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
- item1->SetSizer(item2);
-
- wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
- item2->Add(item3, 1, wxGROW|wxALL, 5);
-
- wxStaticText* item4 = new wxStaticText(item1, wxID_STATIC, _("Please edit the list of configuration items by selecting from the\nlist below."), wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item4, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- wxStaticText* item5 = new wxStaticText(item1, wxID_STATIC, _("&Available items:"), wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- wxString* item6Strings = NULL;
- wxListBox* item6 = new wxListBox(item1, ID_AVAILABLE_CONFIG_ITEMS, wxDefaultPosition, wxSize(wxDefaultCoord, 150), 0, item6Strings, wxLB_SINGLE|wxLB_SORT);
- item3->Add(item6, 1, wxGROW|wxALL, 5);
-
- wxStaticText* item7 = new wxStaticText(item1, wxID_STATIC, _("&List of configuration items:"), wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item7, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- wxBoxSizer* item8 = new wxBoxSizer(wxHORIZONTAL);
- item3->Add(item8, 0, wxGROW, 5);
-
- wxString* item9Strings = NULL;
- wxListBox* item9 = new wxListBox(item1, ID_CONFIG_ITEMS, wxDefaultPosition, wxSize(wxDefaultCoord, 100), 0, item9Strings, wxLB_SINGLE);
- item8->Add(item9, 1, wxGROW|wxALL, 5);
-
- wxBoxSizer* item10 = new wxBoxSizer(wxVERTICAL);
- item8->Add(item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxButton* item11 = new wxButton(item1, ID_CONFIG_ADD, _("A&dd"), wxDefaultPosition, wxDefaultSize, 0);
- item10->Add(item11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxButton* item12 = new wxButton(item1, ID_CONFIG_REMOVE, _("&Remove"), wxDefaultPosition, wxDefaultSize, 0);
- item10->Add(item12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxBoxSizer* item13 = new wxBoxSizer(wxHORIZONTAL);
- item3->Add(item13, 0, wxGROW, 5);
-
- item13->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxButton* item15 = new wxButton(item1, wxID_OK);
- item15->SetDefault();
- item13->Add(item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxButton* item16 = new wxButton(item1, wxID_CANCEL);
- item13->Add(item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- GetSizer()->Fit(this);
- GetSizer()->SetSizeHints(this);
- Centre();
-////@end ctConfigItemsSelector content construction
-}
-
-/*!
- * Event handler for ID_CONFIG_ADD
- */
-
-void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& WXUNUSED(event) )
-{
- wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
- wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
- if (masterList)
- {
- if (masterList->GetSelection() > -1)
- {
- wxString str = masterList->GetStringSelection();
- if (m_configItems.Index(str) == wxNOT_FOUND)
- {
- listBox->Append(str);
- m_configItems.Add(str);
- }
- }
- }
-}
-
-/*!
- * Event handler for ID_CONFIG_REMOVE
- */
-
-void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& WXUNUSED(event) )
-{
- wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
- if (listBox)
- {
- if (listBox->GetSelection() > -1)
- {
- wxString str = listBox->GetStringSelection();
- listBox->Delete(listBox->GetSelection());
- m_configItems.Remove(str);
- }
- }
-}
-
-/*!
- * Event handler for wxID_OK
- */
-
-void ctConfigItemsSelector::OnOk( wxCommandEvent& event )
-{
- // Replace with custom code
- event.Skip();
-}
-
-/*!
- * Should we show tooltips?
- */
-
-bool ctConfigItemsSelector::ShowToolTips()
-{
- return true;
-}
-/*!
- * Update event handler for ID_CONFIG_ADD
- */
-
-void ctConfigItemsSelector::OnUpdateConfigAdd( wxUpdateUIEvent& event )
-{
- wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
- event.Enable(masterList && masterList->GetSelection() != -1);
-}
-
-/*!
- * Update event handler for ID_CONFIG_REMOVE
- */
-
-void ctConfigItemsSelector::OnUpdateConfigRemove( wxUpdateUIEvent& event )
-{
- wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
- event.Enable(listBox && listBox->GetSelection() != -1);
-}
-
-/// Initialise the master list
-void ctConfigItemsSelector::InitSourceConfigList(ctConfigItem* item)
-{
- wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
- if (!item)
- item = wxGetApp().GetMainFrame()->GetDocument()->GetTopItem();
-
- if (!item)
- return;
-
- bool addIt = false;
-
- if (item->GetType() == ctTypeGroup)
- addIt = false;
- else if (item->GetType() == ctTypeCheckGroup)
- addIt = true;
- else if (item->GetType() == ctTypeRadioGroup)
- addIt = true;
- else if (item->GetType() == ctTypeString)
- addIt = true;
- else if (item->GetType() == ctTypeBoolCheck)
- addIt = true;
- else if (item->GetType() == ctTypeBoolRadio)
- addIt = true;
- else if (item->GetType() == ctTypeInteger)
- addIt = true;
- if (addIt)
- {
- masterList->Append(item->GetName());
- }
-
- wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst();
- while (node)
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- InitSourceConfigList(child);
-
- node = node->GetNext();
- }
-}
-
-/// Set the initial list
-void ctConfigItemsSelector::SetConfigList(const wxArrayString& items)
-{
- m_configItems = items;
- wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
- listBox->Clear();
-
- size_t i;
- for (i = 0; i < items.GetCount(); i++)
- listBox->Append(items[i]);
-}
-
diff --git a/utils/configtool/src/configitemselector.h b/utils/configtool/src/configitemselector.h
deleted file mode 100644
index 6f1f9583f7..0000000000
--- a/utils/configtool/src/configitemselector.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configitemselector.h
-// Purpose: Selector for one or more config items
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CONFIGITEMSELECTOR_H_
-#define _CONFIGITEMSELECTOR_H_
-
-/*!
- * Includes
- */
-
-////@begin includes
-
-#include "wx/intl.h"
-#include "wx/dialog.h"
-
-////@end includes
-
-/*!
- * Forward declarations
- */
-
-////@begin forward declarations
-////@end forward declarations
-
-/*!
- * Control identifiers
- */
-
-////@begin control identifiers
-#define ID_DIALOG 10000
-#define ID_AVAILABLE_CONFIG_ITEMS 10002
-#define ID_CONFIG_ITEMS 10005
-#define ID_CONFIG_ADD 10006
-#define ID_CONFIG_REMOVE 10007
-////@end control identifiers
-
-class ctConfigItem;
-
-/*!
- * ctConfigItemsSelector class declaration
- */
-
-class ctConfigItemsSelector: public wxDialog
-{
-public:
- /// Constructor
- ctConfigItemsSelector( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Configuration Items Selector"));
-
- /// Creates the controls and sizers
- void CreateControls();
-
-////@begin ctConfigItemsSelector event handler declarations
-
- /// Event handler for ID_CONFIG_ADD
- void OnConfigAdd( wxCommandEvent& event );
-
- /// Update event handler for ID_CONFIG_ADD
- void OnUpdateConfigAdd( wxUpdateUIEvent& event );
-
- /// Event handler for ID_CONFIG_REMOVE
- void OnConfigRemove( wxCommandEvent& event );
-
- /// Update event handler for ID_CONFIG_REMOVE
- void OnUpdateConfigRemove( wxUpdateUIEvent& event );
-
- /// Event handler for wxID_OK
- void OnOk( wxCommandEvent& event );
-
-////@end ctConfigItemsSelector event handler declarations
-
-////@begin ctConfigItemsSelector member function declarations
-
-////@end ctConfigItemsSelector member function declarations
-
- /// Initialise the master list
- void InitSourceConfigList(ctConfigItem* item = NULL);
-
- /// Set the initial list
- void SetConfigList(const wxArrayString& items);
-
- /// Get the list
- const wxArrayString& GetConfigList() const { return m_configItems; }
-
- /// Should we show tooltips?
- static bool ShowToolTips();
-
- DECLARE_CLASS( ctConfigItemsSelector )
- DECLARE_EVENT_TABLE()
-
-protected:
- wxArrayString m_configItems;
-
-};
-
-#endif
- // _CONFIGITEMSELECTOR_H_
diff --git a/utils/configtool/src/configtool.bkl b/utils/configtool/src/configtool.bkl
deleted file mode 100644
index 75ef873e9f..0000000000
--- a/utils/configtool/src/configtool.bkl
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
- wxconfigtool.cpp
- appsettings.cpp
- configitem.cpp
- configitemselector.cpp
- configtooldoc.cpp
- configtoolview.cpp
- configtree.cpp
- custompropertydialog.cpp
- htmlparser.cpp
- mainframe.cpp
- propeditor.cpp
- property.cpp
- settingsdialog.cpp
- utils.cpp
-
-
- adv
- html
- core
- xml
- base
-
-
-
- $(BUILDDIR)
- $(SRCDIR)/../configs
- wxwin250.wxs
-
-
-
diff --git a/utils/configtool/src/configtool.dsp b/utils/configtool/src/configtool.dsp
deleted file mode 100644
index bf91a59acc..0000000000
--- a/utils/configtool/src/configtool.dsp
+++ /dev/null
@@ -1,532 +0,0 @@
-# Microsoft Developer Studio Project File - Name="configtool" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=wxconfigtool - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "configtool.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "configtool.mak" CFG="wxconfigtool - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "wxconfigtool - Win32 DLL Universal Unicode Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Universal Unicode Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Universal Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Universal Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Unicode Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Unicode Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 DLL Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Universal Unicode Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Universal Unicode Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Universal Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Universal Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Unicode Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Unicode Debug" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "wxconfigtool - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "wxconfigtool - Win32 DLL Universal Unicode Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswunivudll"
-# PROP BASE Intermediate_Dir "vc_mswunivudll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswunivudll"
-# PROP Intermediate_Dir "vc_mswunivudll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivudll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswunivudll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswunivu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswunivu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivudll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivudll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Universal Unicode Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswunivuddll"
-# PROP BASE Intermediate_Dir "vc_mswunivuddll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswunivuddll"
-# PROP Intermediate_Dir "vc_mswunivuddll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswunivud" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswunivud" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Universal Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswunivdll"
-# PROP BASE Intermediate_Dir "vc_mswunivdll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswunivdll"
-# PROP Intermediate_Dir "vc_mswunivdll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivdll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswuniv" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswunivdll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswuniv" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\..\lib\vc_dll\mswuniv" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\..\lib\vc_dll\mswuniv" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivdll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivdll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Universal Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswunivddll"
-# PROP BASE Intermediate_Dir "vc_mswunivddll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswunivddll"
-# PROP Intermediate_Dir "vc_mswunivddll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_dll\mswunivd" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_dll\mswunivd" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Unicode Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswudll"
-# PROP BASE Intermediate_Dir "vc_mswudll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswudll"
-# PROP Intermediate_Dir "vc_mswudll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswudll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswudll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswudll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswudll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Unicode Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswuddll"
-# PROP BASE Intermediate_Dir "vc_mswuddll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswuddll"
-# PROP Intermediate_Dir "vc_mswuddll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswuddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswuddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswud" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswud" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswdll"
-# PROP BASE Intermediate_Dir "vc_mswdll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswdll"
-# PROP Intermediate_Dir "vc_mswdll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswdll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\msw" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswdll\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\msw" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /i ".\..\..\..\lib\vc_dll\msw" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /i ".\..\..\..\lib\vc_dll\msw" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswdll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswdll\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswddll"
-# PROP BASE Intermediate_Dir "vc_mswddll\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswddll"
-# PROP Intermediate_Dir "vc_mswddll\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswddll\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_dll\mswd" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_dll\mswd" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswddll\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Universal Unicode Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswunivu"
-# PROP BASE Intermediate_Dir "vc_mswunivu\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswunivu"
-# PROP Intermediate_Dir "vc_mswunivu\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivu\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswunivu\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivu\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivu\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Universal Unicode Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswunivud"
-# PROP BASE Intermediate_Dir "vc_mswunivud\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswunivud"
-# PROP Intermediate_Dir "vc_mswunivud\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivud\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivud\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivud\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivud\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Universal Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswuniv"
-# PROP BASE Intermediate_Dir "vc_mswuniv\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswuniv"
-# PROP Intermediate_Dir "vc_mswuniv\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswuniv\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswuniv" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswuniv\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswuniv" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\..\lib\vc_lib\mswuniv" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\..\lib\vc_lib\mswuniv" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuniv\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuniv\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Universal Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswunivd"
-# PROP BASE Intermediate_Dir "vc_mswunivd\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswunivd"
-# PROP Intermediate_Dir "vc_mswunivd\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivd\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivd\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_lib\mswunivd" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_lib\mswunivd" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivd\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivd\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Unicode Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_mswu"
-# PROP BASE Intermediate_Dir "vc_mswu\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_mswu"
-# PROP Intermediate_Dir "vc_mswu\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_mswu\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_mswu\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswu\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u_xml.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswu\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Unicode Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswud"
-# PROP BASE Intermediate_Dir "vc_mswud\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswud"
-# PROP Intermediate_Dir "vc_mswud\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswud\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswud\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswud\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud_xml.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswud\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "vc_msw"
-# PROP BASE Intermediate_Dir "vc_msw\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "vc_msw"
-# PROP Intermediate_Dir "vc_msw\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /Fdvc_msw\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\msw" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MD /Fdvc_msw\wxconfigtool.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\msw" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /i ".\..\..\..\lib\vc_lib\msw" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "__WXMSW__" /i ".\..\..\..\lib\vc_lib\msw" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_msw\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27_xml.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_msw\wxconfigtool.exe" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ELSEIF "$(CFG)" == "wxconfigtool - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "vc_mswd"
-# PROP BASE Intermediate_Dir "vc_mswd\wxconfigtool"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "vc_mswd"
-# PROP Intermediate_Dir "vc_mswd\wxconfigtool"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswd\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswd\wxconfigtool.pdb /Od /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswd" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /c
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_lib\mswd" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\..\lib\vc_lib\mswd" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswd\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d_xml.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswd\wxconfigtool.exe" /debug /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows
-
-!ENDIF
-
-# Begin Target
-
-# Name "wxconfigtool - Win32 DLL Universal Unicode Release"
-# Name "wxconfigtool - Win32 DLL Universal Unicode Debug"
-# Name "wxconfigtool - Win32 DLL Universal Release"
-# Name "wxconfigtool - Win32 DLL Universal Debug"
-# Name "wxconfigtool - Win32 DLL Unicode Release"
-# Name "wxconfigtool - Win32 DLL Unicode Debug"
-# Name "wxconfigtool - Win32 DLL Release"
-# Name "wxconfigtool - Win32 DLL Debug"
-# Name "wxconfigtool - Win32 Universal Unicode Release"
-# Name "wxconfigtool - Win32 Universal Unicode Debug"
-# Name "wxconfigtool - Win32 Universal Release"
-# Name "wxconfigtool - Win32 Universal Debug"
-# Name "wxconfigtool - Win32 Unicode Release"
-# Name "wxconfigtool - Win32 Unicode Debug"
-# Name "wxconfigtool - Win32 Release"
-# Name "wxconfigtool - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\appsettings.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\configitem.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\configitemselector.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\configtooldoc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\configtoolview.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\configtree.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\custompropertydialog.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\htmlparser.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\mainframe.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\propeditor.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\property.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\..\..\..\samples\sample.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\settingsdialog.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\utils.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\wxconfigtool.cpp
-# End Source File
-# End Group
-# End Target
-# End Project
-
diff --git a/utils/configtool/src/configtooldoc.cpp b/utils/configtool/src/configtooldoc.cpp
deleted file mode 100644
index ff3308f98c..0000000000
--- a/utils/configtool/src/configtooldoc.cpp
+++ /dev/null
@@ -1,1255 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configtooldoc.h
-// Purpose: Document class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-
-#include "wx/process.h"
-#include "wx/mimetype.h"
-#include "wx/process.h"
-
-#endif
-
-#include "wx/textfile.h"
-#include "wx/txtstrm.h"
-#include "wx/wfstream.h"
-#include "wx/config.h"
-#include "configtooldoc.h"
-#include "configtoolview.h"
-#include "configtree.h"
-#include "mainframe.h"
-#include "utils.h"
-#include "wxconfigtool.h"
-#include "htmlparser.h"
-
-IMPLEMENT_DYNAMIC_CLASS(ctConfigToolDoc, wxDocument)
-
-// Ctor
-ctConfigToolDoc::ctConfigToolDoc()
-{
- m_topItem = NULL;
- m_clipboardItem = NULL;
-}
-
-// Dtor
-ctConfigToolDoc::~ctConfigToolDoc()
-{
- DeleteItems();
- ClearClipboard();
- if (GetCommandProcessor())
- GetCommandProcessor()->SetEditMenu(NULL);
-}
-
-// Delete all the items not already deleted
-void ctConfigToolDoc::DeleteItems()
-{
- if (m_topItem)
- delete m_topItem;
- m_topItem = NULL;
-}
-
-/// Clears the clipboard item.
-void ctConfigToolDoc::ClearClipboard()
-{
- if (m_clipboardItem)
- delete m_clipboardItem;
- m_clipboardItem = NULL;
-}
-
-/// Sets the clipboard item.
-void ctConfigToolDoc::SetClipboardItem(ctConfigItem* item)
-{
- if (m_clipboardItem)
- delete m_clipboardItem;
- m_clipboardItem = item;
-}
-
-
-// Closes and clears the document
-bool ctConfigToolDoc::OnCloseDocument()
-{
- if (wxDocument::OnCloseDocument())
- {
- ctConfigToolHint hint(NULL, ctClear);
- UpdateAllViews (NULL, & hint);
-
- DeleteItems();
- return true;
- }
- else
- {
- return false;
- }
-}
-
-// Saves the doc
-bool ctConfigToolDoc::Save()
-{
- if (!IsModified() && m_savedYet) return true;
-
- bool ret = (m_documentFile.empty() || !m_savedYet) ?
- SaveAs() :
- OnSaveDocument(m_documentFile);
- if ( ret )
- SetDocumentSaved(true);
- return ret;
-}
-
-// Create the document
-bool ctConfigToolDoc::OnCreate(const wxString& path, long flags)
-{
- GetCommandProcessor()->SetEditMenu(wxGetApp().GetMainFrame()->GetEditMenu());
- GetCommandProcessor()->Initialize();
- GetCommandProcessor()->ClearCommands();
-
- // wxGetApp().m_currentDoc = this;
-
- if (flags & wxDOC_NEW)
- {
- ctConfigItem* rootItem = new ctConfigItem(NULL, ctTypeGroup, _T("Configuration"));
- //rootItem->InitProperties();
- rootItem->GetProperties().AddProperty(
- new ctProperty(
- wxT("The item description."),
- wxVariant(wxEmptyString, wxT("description")),
- wxT("multiline")));
-
- rootItem->SetPropertyString(_T("description"),
- _T("This is the top-level configuration item."));
-
-
- SetTopItem(rootItem);
-
- Modify(false);
- SetDocumentSaved(false);
-
- wxString rootName(wxT("untitled"));
- wxStripExtension(rootName);
- SetFilename(wxGetApp().GetSettings().GenerateFilename(rootName));
- }
-
- // Creates the view, so do any view updating after this
- bool success = wxDocument::OnCreate(path, flags);
-
- if (success)
- {
- if (flags & wxDOC_NEW)
- {
- wxBusyCursor wait;
-
- ctConfigToolHint hint(NULL, ctInitialUpdate);
- UpdateAllViews (NULL, & hint);
-
- SetFilename(GetFilename(), true);
- }
- }
- return success;
-}
-
-// Save the document
-bool ctConfigToolDoc::OnSaveDocument(const wxString& filename)
-{
- wxBusyCursor cursor;
-
- const wxString strOldPath(GetFilename());
-
- // Do some backing up first
-
- // This is the backup filename
- wxString backupFilename(filename);
- backupFilename += wxT(".bak");
-
- // This is the temporary copy of the backup
- wxString tempFilename(filename);
- tempFilename += wxT(".tmp");
- if (wxFileExists(tempFilename))
- wxRemoveFile(tempFilename);
-
- bool leaveBackup = true;
-
- bool saved = DoSave(tempFilename);
-
- if (saved)
- {
- // Remove the old .bak file
- if (wxFileExists(backupFilename))
- {
- wxRemoveFile(backupFilename);
- }
-
- // Copy the old file to the .bak
-
- if (leaveBackup)
- {
- if (wxFileExists(filename))
- {
- if (!wxRenameFile(filename, backupFilename))
- {
- wxCopyFile(filename, backupFilename);
- wxRemoveFile(filename);
- }
- }
- }
- else
- {
- if (wxFileExists(filename))
- wxRemoveFile(filename);
- }
-
- // Finally, copy the temporary file to the proper filename
- if (!wxRenameFile(tempFilename, filename))
- {
- wxCopyFile(tempFilename, filename);
- wxRemoveFile(tempFilename);
- }
-
- Modify(false);
- ((ctConfigToolView*)GetFirstView())->OnChangeFilename();
- SetDocumentSaved(true);
- SetFilename(filename);
- wxGetApp().GetSettings().m_lastFilename = filename;
- } else
- {
- SetFilename(strOldPath);
- }
- wxGetApp().GetMainFrame()->UpdateFrameTitle();
- return saved;
-}
-
-// Open the document
-bool ctConfigToolDoc::OnOpenDocument(const wxString& filename)
-{
- wxBusyCursor cursor;
-
- bool opened = DoOpen(filename);
-
- if (opened)
- {
- SetFilename(filename);
- wxGetApp().GetSettings().m_lastFilename = filename;
-
- ((ctConfigToolView*)GetFirstView())->OnChangeFilename();
-
- RefreshDependencies();
-
- // ctConfigToolHint hint(NULL, ctFilenameChanged);
- ctConfigToolHint hint(NULL, ctInitialUpdate);
- UpdateAllViews (NULL, & hint);
- }
-
- SetDocumentSaved(true); // Necessary or it will pop up the Save As dialog
-
- return opened;
-}
-
-/// Save the settings file
-bool ctConfigToolDoc::DoSave(const wxString& filename)
-{
- wxFileOutputStream osFile(filename);
- if (!osFile.Ok())
- return false;
-
- wxTextOutputStream stream(osFile);
-
- stream << wxT("\n");
- stream << wxT("");
-
- DoSave(m_topItem, osFile, 1);
-
- stream << wxT("\n\n");
-
- return true;
-}
-
-inline static void OutputIndentation(wxOutputStream& osFile, int indent)
-{
- wxTextOutputStream stream(osFile);
- wxString str = wxT("\n");
- for (int i = 0; i < indent; i++)
- str << wxT(" ");
- stream << str ;
-}
-
-/// Recursive helper function for file saving
-bool ctConfigToolDoc::DoSave(ctConfigItem* item, wxOutputStream& osFile, int indent)
-{
- OutputIndentation(osFile, indent*2);
- wxTextOutputStream stream(osFile);
-
- wxString name(item->GetName());
- wxString s;
- wxString typeStr;
- if (item->GetType() == ctTypeGroup)
- typeStr = wxT("group");
- else if (item->GetType() == ctTypeCheckGroup)
- typeStr = wxT("check-group");
- else if (item->GetType() == ctTypeRadioGroup)
- typeStr = wxT("radio-group");
- else if (item->GetType() == ctTypeString)
- typeStr = wxT("string");
- else if (item->GetType() == ctTypeBoolCheck)
- typeStr = wxT("bool-check");
- else if (item->GetType() == ctTypeBoolRadio)
- typeStr = wxT("bool-radio");
- else if (item->GetType() == ctTypeInteger)
- typeStr = wxT("integer");
- else
- typeStr = wxT("unknown");
-
- stream << wxT("");
-
- indent ++;
-
- OutputIndentation(osFile, indent*2);
- if (item->IsActive())
- stream << wxT("1");
- else
- stream << wxT("0");
- OutputIndentation(osFile, indent*2);
- if (item->IsEnabled())
- stream << wxT("1");
- else
- stream << wxT("0");
-
- // Output properties
- wxObjectList::compatibility_iterator node = item->GetProperties().GetList().GetFirst();
- while (node)
- {
- ctProperty* prop = (ctProperty*) node->GetData();
- OutputIndentation(osFile, indent*2);
- stream << wxT("<") << prop->GetName() ;
-
- if (prop->IsCustom())
- {
- stream << wxT(" custom=\"true\"");
- stream << wxT(" type=\"") << prop->GetVariant().GetType() << wxT("\"");
- stream << wxT(" editor-type=\"") << prop->GetEditorType() << wxT("\"");
- stream << wxT(" description=\"") << prop->GetDescription() << wxT("\"");
- if (prop->GetChoices().GetCount() > 0)
- {
- wxString choices;
- ctConfigItem::ArrayToString(prop->GetChoices(), choices);
- stream << wxT(" choices=\"") << choices << wxT("\"");
- }
- }
-
- stream << wxT(">");
-
- stream << ctEscapeHTMLCharacters(prop->GetVariant().GetString()) ;
- stream << wxT("") << prop->GetName() << wxT(">");
-
- node = node->GetNext();
- }
-
- // Output children
- node = item->GetChildren().GetFirst();
- while (node)
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- DoSave(child, osFile, indent);
-
- node = node->GetNext();
- }
-
- indent --;
-
- OutputIndentation(osFile, indent*2);
- stream << wxT("");
-
- return true;
-}
-
-/// Open the settings file
-bool ctConfigToolDoc::DoOpen(const wxString& filename)
-{
- wxSimpleHtmlParser parser;
- if (parser.ParseFile(filename))
- {
- ctConfigToolHint hint(NULL, ctClear);
- UpdateAllViews (NULL, & hint);
- m_topItem = NULL;
-
- if (parser.GetTopLevelTag()->GetChildren())
- {
- wxSimpleHtmlTag* settingsTag = parser.GetTopLevelTag()->GetChildren()->FindTag(wxT("settings"));
- if (settingsTag && settingsTag->GetChildren())
- {
- wxSimpleHtmlTag* firstSettingTag = settingsTag->GetChildren();
- if (firstSettingTag)
- DoOpen(firstSettingTag, NULL);
- return true;
- }
- return true;
- }
- }
- return false;
-}
-
-static bool GetHtmlBoolValue(const wxString& value)
-{
- if (value.IsSameAs(wxT("true"),false) || value == wxT("1"))
- return true;
- else
- return false;
-}
-
-static int GetHtmlIntegerValue(const wxString& value)
-{
- return wxAtoi(value);
-}
-
-static double GetHtmlDoubleValue(const wxString& value)
-{
- return wxAtof(value);
-}
-
-bool ctConfigToolDoc::DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent)
-{
- ctConfigItem* newItem = NULL;
- if (tag->NameIs(wxT("setting")))
- {
- wxSimpleHtmlAttribute* attr = tag->FindAttribute(wxT("type"));
- if (attr)
- {
- ctConfigType type = ctTypeUnknown;
- wxString typeStr(attr->GetValue());
- if (typeStr == wxT("group"))
- type = ctTypeGroup;
- else if (typeStr == wxT("option-group") || typeStr == wxT("check-group"))
- type = ctTypeCheckGroup;
- else if (typeStr == wxT("radio-group"))
- type = ctTypeRadioGroup;
- else if (typeStr == wxT("bool-check"))
- type = ctTypeBoolCheck;
- else if (typeStr == wxT("bool-radio"))
- type = ctTypeBoolRadio;
- else if (typeStr == wxT("string"))
- type = ctTypeString;
- else if (typeStr == wxT("integer"))
- type = ctTypeInteger;
- else
- {
- wxLogError(wxT("Unknown type %s"), (const wxChar*) typeStr);
- }
- if (type != ctTypeUnknown)
- {
- newItem = new ctConfigItem(parent, type, wxT(""));
- newItem->InitProperties();
- if (!parent)
- SetTopItem(newItem);
- }
- }
- }
- wxSimpleHtmlTag* childTag = tag->GetChildren();
-
- while (childTag)
- {
- if (childTag->GetType() == wxSimpleHtmlTag_Open)
- {
- if (childTag->GetName() == wxT("setting"))
- {
- DoOpen(childTag, newItem);
- }
- else if (childTag->GetName() == wxT("name"))
- {
- if (newItem)
- {
- wxString name(childTag->GetNext()->GetTagText());
- newItem->SetName(name);
- }
- }
- else if (childTag->GetName() == wxT("active"))
- {
- if (newItem)
- newItem->SetActive(GetHtmlBoolValue(childTag->GetNext()->GetTagText()));
- }
- else if (childTag->GetName() == wxT("enabled"))
- {
- if (newItem)
- newItem->Enable(GetHtmlBoolValue(childTag->GetNext()->GetTagText()));
- }
- else
- {
- if (newItem)
- {
- ctProperty* prop = newItem->GetProperties().FindProperty(childTag->GetName());
- if (!prop)
- {
- // A custom property, else an obsolete
- // property that we should ignore.
- wxString isCustom;
- if (childTag->GetAttributeValue(isCustom, wxT("custom")) &&
- isCustom == wxT("true"))
- {
- prop = new ctProperty;
-
- wxString name(childTag->GetName());
- wxString type(wxT("string"));
- wxString choices;
- wxString editorType(wxT("string"));
- wxString description;
- childTag->GetAttributeValue(type, wxT("type"));
- childTag->GetAttributeValue(type, wxT("editor-type"));
- childTag->GetAttributeValue(type, wxT("choices"));
- childTag->GetAttributeValue(description, wxT("description"));
-
- if (type == wxT("bool"))
- prop->GetVariant() = wxVariant(false, name);
- else if (type == wxT("double"))
- prop->GetVariant() = wxVariant((double) 0.0, name);
- else if (type == wxT("long"))
- prop->GetVariant() = wxVariant((long) 0, name);
- else
- prop->GetVariant() = wxVariant(wxEmptyString, name);
- prop->SetDescription(description);
- prop->SetCustom(true);
- prop->SetEditorType(editorType);
- if (!choices.IsEmpty())
- {
- wxArrayString arr;
- ctConfigItem::StringToArray(choices, arr);
- prop->SetChoices(arr);
- }
- newItem->GetProperties().AddProperty(prop);
- }
- }
- if (prop)
- {
- if (prop->GetVariant().GetType() == wxT("string"))
- prop->GetVariant() = childTag->GetNext()->GetTagText();
- else if (prop->GetVariant().GetType() == wxT("long"))
- prop->GetVariant() = (long) GetHtmlIntegerValue(childTag->GetNext()->GetTagText());
- else if (prop->GetVariant().GetType() == wxT("bool"))
- prop->GetVariant() = GetHtmlBoolValue(childTag->GetNext()->GetTagText());
- else if (prop->GetVariant().GetType() == wxT("double"))
- prop->GetVariant() = (double) GetHtmlDoubleValue(childTag->GetNext()->GetTagText());
- }
- }
- }
- }
- childTag = childTag->GetNext();
- }
- return true;
-}
-
-/// Clear dependencies
-void ctConfigToolDoc::ClearDependencies(ctConfigItem* item)
-{
- if (!item) {
- item = GetTopItem();
- if (!item)
- return;
- }
-
- item->GetDependents().Clear();
- for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- ClearDependencies(child);
- }
-}
-
-/// Refresh dependencies
-void ctConfigToolDoc::RefreshDependencies()
-{
- ClearDependencies(GetTopItem());
- RefreshDependencies(GetTopItem());
-}
-
-/// Refresh dependencies
-void ctConfigToolDoc::RefreshDependencies(ctConfigItem* item)
-{
- if (item==NULL)
- return;
-
- wxArrayString requiresArr;
- wxString requires = item->GetPropertyString(wxT("requires"));
- wxString precludes = item->GetPropertyString(wxT("precludes"));
- wxString enabledIf = item->GetPropertyString(wxT("enabled-if"));
- wxString enabledIfNot = item->GetPropertyString(wxT("enabled-if-not"));
- wxString indeterminateIf = item->GetPropertyString(wxT("indeterminate-if"));
- wxString context = item->GetPropertyString(wxT("context"));
-
- if (!requires.IsEmpty())
- item->StringToArray(requires, requiresArr);
-
- if (!precludes.IsEmpty())
- item->StringToArray(precludes, requiresArr);
-
- if (!enabledIfNot.IsEmpty())
- item->StringToArray(enabledIfNot, requiresArr);
-
- if (!enabledIf.IsEmpty())
- item->StringToArray(enabledIf, requiresArr);
-
- if (!indeterminateIf.IsEmpty())
- item->StringToArray(indeterminateIf, requiresArr);
-
- // Add the parent to the list of dependencies, if the
- // parent is a check or radio group.
- ctConfigItem* parent = item->GetParent();
- if (parent &&
- (parent->GetType() == ctTypeCheckGroup ||
- parent->GetType() == ctTypeRadioGroup))
- requiresArr.Add(parent->GetName());
-
- // Also look in 'context' since these items
- // are another kind of dependency (switching to
- // a different platform may cause the dependencies
- // to be evaluated differently).
- if (!context.IsEmpty())
- item->StringToArray(context, requiresArr);
-
- size_t i;
- for (i = 0; i < requiresArr.GetCount(); i++)
- {
- wxString itemName(requiresArr[i]);
- ctConfigItem* otherItem = GetTopItem()->FindItem(itemName);
- if (otherItem && !otherItem->GetDependents().Member(item))
- {
- otherItem->GetDependents().Append(item);
- }
- }
- for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- RefreshDependencies(child);
- }
-}
-
-/// Generate the text of a setup.h
-wxString ctConfigToolDoc::GenerateSetup()
-{
- wxString str;
- str << wxT("/*\n * setup.h\n * Generated by wxConfigTool\n *\n */\n\n");
-
- GenerateSetup(GetTopItem(), str);
-
- return str;
-}
-
-/// Helper function
-void ctConfigToolDoc::GenerateSetup(ctConfigItem* item, wxString& str)
-{
- // Generate the setup.h entries for this item
- wxString name = item->GetName();
-
- // We don't process the platform choice
- if (item->GetName() == wxT("Target"))
- return;
-
- if (item->IsInActiveContext() &&
- (item->GetType() == ctTypeCheckGroup ||
- item->GetType() == ctTypeRadioGroup ||
- item->GetType() == ctTypeBoolCheck ||
- item->GetType() == ctTypeBoolRadio))
- {
- // TODO: write description
- wxString name = item->GetName();
- if (name.Left(6) == wxT("wxUSE_") ||
- name == wxT("REMOVE_UNUSED_ARG") || // Hack alert: change to wxUSE_UNUSED_ARG_REMOVAL
- name.Find(wxT("COMPATIBILITY")) != wxNOT_FOUND)
- {
- str << wxT("#define ") << name ;
- if (item->IsEnabled())
- str << wxT(" 1");
- else
- str << wxT(" 0");
- str << wxT("\n\n");
- }
- }
-
- for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- GenerateSetup(child, str);
- }
-}
-
-
-/// Generate a configure command
-wxString ctConfigToolDoc::GenerateConfigureCommand()
-{
- wxString str;
- str << wxT("# configurewx\n# Generated by wxConfigTool\n\n");
-
- wxString path = GetFrameworkDir(true);
- bool makeUnix = true;
- if (!path.IsEmpty())
- {
- if (makeUnix)
- path += wxT("/");
- else
- path += wxFILE_SEP_PATH ;
- }
-
- str << path << wxT("configure");
-
- // Find the target to use
- ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Target"));
- if (platformsFolder)
- {
- for ( wxObjectList::compatibility_iterator node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- if (child->GetType() == ctTypeBoolRadio && child->IsEnabled())
- {
- wxString configureCommand = child->GetPropertyString(wxT("configure-command"));
- if (!configureCommand.IsEmpty())
- str << wxT(" ") << configureCommand;
- }
- }
- }
-
- GenerateConfigureCommand(GetTopItem(), str);
- return str;
-}
-
-/// Helper function
-void ctConfigToolDoc::GenerateConfigureCommand(ctConfigItem* item, wxString& str)
-{
- // We don't process the platform group, since we've
- // already done so.
- if (item->GetName() == wxT("Target"))
- return;
-
- if (item->IsInActiveContext() &&
- (item->GetType() == ctTypeCheckGroup ||
- item->GetType() == ctTypeRadioGroup ||
- item->GetType() == ctTypeBoolCheck ||
- item->GetType() == ctTypeBoolRadio))
- {
- wxString name = item->GetName();
- wxString configureCommand = item->GetPropertyString(wxT("configure-command"));
- if (!configureCommand.IsEmpty())
- {
- if (!item->IsEnabled())
- {
- // Replace 'enable' with 'disable' if this
- // option is off.
- configureCommand.Replace(wxT("--enable-"), wxT("--disable-"));
- configureCommand.Replace(wxT("--with-"), wxT("--without-"));
- }
- ctProperty* prop = item->GetProperties().FindProperty(wxT("builtin"));
- if (prop && prop->GetVariant().GetType() == wxT("bool"))
- {
- bool builtin = prop->GetVariant().GetBool();
- str << wxT(" ") << configureCommand;
- if (builtin)
- str << wxT("=builtin");
- else
- str << wxT("=sys");
- }
- else
- {
- ctProperty* prop = item->GetProperties().FindProperty(wxT("value"));
- if (prop && prop->GetVariant().GetType() == wxT("string"))
- {
- wxString val = prop->GetVariant().GetString();
- if (item->IsEnabled() && !val.IsEmpty())
- {
- str << wxT(" ") << configureCommand;
- str << wxT("=\"") << val << wxT("\"");
- }
- // If the string is empty, ignore this parameter,
- // since it's obviously intended to be supplied
- // only if there's a string to use and it's enabled.
- }
- else
- {
- str << wxT(" ") << configureCommand;
- }
- }
- }
- }
-
- for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfigItem* child = (ctConfigItem*) node->GetData();
- GenerateConfigureCommand(child, str);
- }
-}
-
-/// Gets the current framework directory
-wxString ctConfigToolDoc::GetFrameworkDir(bool makeUnix)
-{
- wxString path = wxGetApp().GetSettings().m_frameworkDir;
- if (wxGetApp().GetSettings().m_useEnvironmentVariable)
- {
- // Should probably allow other variables
- // to be used, and maybe expand variables within m_frameworkDir
- wxString pathEnv(wxGetenv(wxT("WXWIN")));
- path = pathEnv;
-#ifdef __WXMSW__
- if (makeUnix)
- path.Replace(wxT("\\"), wxT("/"));
-#else
- wxUnusedVar(makeUnix);
-#endif
- }
- return path;
-}
-
-/// Finds the next item in the tree
-ctConfigItem* ctConfigToolDoc::FindNextItem(ctConfigItem* item, bool wrap)
-{
- if (!item)
- return GetTopItem();
-
- // First, try to find the first child
- if (item->GetChildCount() > 0)
- {
- return item->GetChild(0);
- }
- else
- {
- ctConfigItem* p = item;
- while (p)
- {
- ctConfigItem* toFind = FindNextSibling(p);
- if (toFind)
- return toFind;
- p = p->GetParent();
- }
- }
-
- // Finally, wrap around to the root.
- if (wrap)
- return GetTopItem();
- else
- return NULL;
-}
-
-/// Finds the next sibling in the tree
-ctConfigItem* ctConfigToolDoc::FindNextSibling(ctConfigItem* item)
-{
- if (item->GetParent())
- {
- wxObjectList::compatibility_iterator node = item->GetParent()->GetChildren().Member(item);
- if (node && node->GetNext())
- {
- ctConfigItem* nextItem = (ctConfigItem*) node->GetNext()->GetData();
- return nextItem;
- }
- }
- return NULL;
-}
-
-
-/*
- * Implements a document editing command.
- */
-
-ctConfigCommand::ctConfigCommand(const wxString& name, int cmdId,
- ctConfigItem* activeState, ctConfigItem* savedState,
- ctConfigItem* parent, ctConfigItem* insertBefore,
- bool ignoreFirstTime): wxCommand(true, name)
-{
- m_activeState = activeState;
- m_savedState = savedState;
- m_ignoreThis = ignoreFirstTime;
- m_cmdId = cmdId;
- m_properties = NULL;
- m_parent = parent;
- m_insertBefore = insertBefore;
-}
-
-ctConfigCommand::ctConfigCommand(const wxString& name, int cmdId,
- ctConfigItem* activeState, ctProperties* properties,
- bool ignoreFirstTime): wxCommand(true, name)
-{
- m_activeState = activeState;
- m_savedState = NULL;
- m_properties = properties;
- m_ignoreThis = ignoreFirstTime;
- m_cmdId = cmdId;
- m_properties = properties;
- m_parent = NULL;
- m_insertBefore = NULL;
-}
-
-ctConfigCommand::~ctConfigCommand()
-{
- if (m_savedState)
- delete m_savedState;
- if (m_properties)
- delete m_properties;
-}
-
-bool ctConfigCommand::Do()
-{
- return DoAndUndo(true);
-}
-
-bool ctConfigCommand::Undo()
-{
- return DoAndUndo(false);
-}
-
-// Combine Do and Undo into one
-bool ctConfigCommand::DoAndUndo(bool doCmd)
-{
- switch (m_cmdId)
- {
- case ctCMD_CUT:
- {
- if (doCmd)
- {
- wxASSERT(m_savedState == NULL);
- wxASSERT(m_activeState != NULL);
-
- ctConfigItem* newItem = m_activeState->DeepClone();
- ctConfigToolDoc* doc = m_activeState->GetDocument();
-
- // This will delete the old clipboard contents, if any.
- doc->SetClipboardItem(newItem);
-
- m_parent = m_activeState->GetParent();
- m_insertBefore = m_activeState->FindNextSibling();
-
- m_activeState->Detach();
- m_savedState = m_activeState;
- m_activeState = NULL;
-
- m_savedState->GetDocument()->Modify(true);
- ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
- view->OnChangeFilename();
- }
- else
- {
- wxASSERT(m_savedState != NULL);
- wxASSERT(m_activeState == NULL);
-
- m_savedState->GetDocument()->Modify(true);
- m_savedState->Attach(m_parent, m_insertBefore);
- ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
- view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
- m_activeState = m_savedState;
- m_savedState = NULL;
- m_parent = NULL;
- m_insertBefore = NULL;
- view->OnChangeFilename();
- }
- break;
- }
- case ctCMD_PASTE:
- {
- if (doCmd)
- {
- wxASSERT(m_savedState != NULL);
- wxASSERT(m_activeState == NULL);
-
- m_savedState->GetDocument()->Modify(true);
- m_savedState->Attach(m_parent, m_insertBefore);
- ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
- view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(m_savedState->GetTreeItemId());
- m_activeState = m_savedState;
- m_savedState = NULL;
- view->OnChangeFilename();
- }
- else
- {
- wxASSERT(m_savedState == NULL);
- wxASSERT(m_activeState != NULL);
-
- m_activeState->GetDocument()->Modify(true);
- ctConfigToolView* view = (ctConfigToolView*) m_activeState->GetDocument()->GetFirstView();
- m_activeState->Detach();
- m_savedState = m_activeState;
- m_activeState = NULL;
- view->OnChangeFilename();
- }
- break;
- }
- case ctCMD_NEW_ELEMENT:
- {
- if (doCmd)
- {
- wxASSERT(m_savedState != NULL);
- wxASSERT(m_activeState == NULL);
-
- m_savedState->GetDocument()->Modify(true);
- m_savedState->Attach(m_parent, m_insertBefore);
- ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
- view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(m_savedState->GetTreeItemId());
-
- m_activeState = m_savedState;
- m_savedState = NULL;
- }
- else
- {
- wxASSERT(m_savedState == NULL);
- wxASSERT(m_activeState != NULL);
-
- m_activeState->GetDocument()->Modify(true);
- m_activeState->Detach();
- m_savedState = m_activeState;
- m_activeState = NULL;
- }
- break;
- }
- case ctCMD_APPLY_PROPERTY:
- {
- wxASSERT(m_properties != NULL);
- wxASSERT(m_activeState != NULL);
-
- // Don't update the properties editor first time
- // around since it will be done one property at a time
- // initially (and no property editor update required)
- if (!m_ignoreThis)
- {
- // Just swap the saved and current properties.
- ctProperties propsTemp = m_activeState->GetProperties() ;
- m_activeState->GetProperties() = (* m_properties);
- (* m_properties) = propsTemp;
-
- // Apply only those that need applying
- // (those properties in activeState that are not in propsTemp)
- wxObjectList::compatibility_iterator node = m_activeState->GetProperties().GetList().GetFirst();
- while (node)
- {
- ctProperty* prop = (ctProperty*) node->GetData();
- ctProperty* otherProp = propsTemp.FindProperty(prop->GetName());
- if (otherProp && ((*prop) != (*otherProp)))
- {
- m_activeState->ApplyProperty(prop, otherProp->GetVariant());
- }
- node = node->GetNext();
- }
- m_activeState->GetDocument()->Modify(true);
- ctConfigToolView* view = (ctConfigToolView*) m_activeState->GetDocument()->GetFirstView();
- if (view)
- {
- ctConfigToolHint hint(NULL, ctValueChanged);
- m_activeState->GetDocument()->UpdateAllViews (NULL, & hint);
- }
- }
- m_ignoreThis = false;
-
- break;
- }
- }
- return true;
-}
-
-IMPLEMENT_CLASS(ctConfiguration, wxObject)
-
-ctConfiguration::ctConfiguration()
-{
- m_treeItemId = wxTreeItemId();
- m_parent = NULL;
- m_topItem = NULL;
-}
-
-ctConfiguration::ctConfiguration(ctConfiguration* parent, const wxString& name)
-{
- m_treeItemId = wxTreeItemId();
- SetName(name);
- m_parent = parent;
- if (parent)
- parent->AddChild(this);
-}
-
-ctConfiguration::~ctConfiguration()
-{
-/*
- ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
- if (m_treeItemId.IsOk() && treeCtrl)
- {
- ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(m_treeItemId);
- if (data)
- data->SetConfigItem(NULL);
- }
- if (GetParent())
- GetParent()->RemoveChild(this);
- else
- {
- if (wxGetApp().GetMainFrame()->GetDocument() &&
- wxGetApp().GetMainFrame()->GetDocument()->GetTopItem() == this)
- wxGetApp().GetMainFrame()->GetDocument()->SetTopItem(NULL);
- }
-*/
-
- Clear();
-}
-
-/// Assignment operator.
-void ctConfiguration::operator= (const ctConfiguration& configuration)
-{
- m_name = configuration.m_name;
- m_description = configuration.m_description;
-}
-
-/// Clear children
-void ctConfiguration::Clear()
-{
- wxObjectList::compatibility_iterator node = m_children.GetFirst();
- while (node)
- {
- wxObjectList::compatibility_iterator next = node->GetNext();
- ctConfiguration* child = (ctConfiguration*) node->GetData();
-
- // This should delete 'node' too, assuming
- // child's m_parent points to 'this'. If not,
- // it'll be cleaned up by m_children.Clear().
- delete child;
-
- node = next;
- }
- m_children.Clear();
-}
-
-// Get the nth child
-ctConfiguration* ctConfiguration::GetChild(int n) const
-{
- wxASSERT ( n < GetChildCount() && n > -1 );
-
- if ( n < GetChildCount() && n > -1 )
- {
- ctConfiguration* child = wxDynamicCast(m_children.Item(n)->GetData(), ctConfiguration);
- return child;
- }
- else
- return NULL;
-}
-
-// Get the child count
-int ctConfiguration::GetChildCount() const
-{
- return m_children.GetCount();
-}
-
-/// Add a child
-void ctConfiguration::AddChild(ctConfiguration* configuration)
-{
- m_children.Append(configuration);
- configuration->SetParent(this);
-}
-
-/// Remove (but don't delete) a child
-void ctConfiguration::RemoveChild(ctConfiguration* configuration)
-{
- m_children.DeleteObject(configuration);
- configuration->SetParent(NULL);
-}
-
-/// Get the associated document (currently, assumes
-/// there's only ever one document active)
-ctConfigToolDoc* ctConfiguration::GetDocument()
-{
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- return doc;
-}
-
-/// Find an item in this hierarchy
-// TODO: ensure that names are unique, somehow.
-ctConfiguration* ctConfiguration::FindConfiguration(const wxString& name)
-{
- if (GetName() == name)
- return this;
-
- for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfiguration* child = (ctConfiguration*) node->GetData();
- ctConfiguration* found = child->FindConfiguration(name);
- if (found)
- return found;
- }
- return NULL;
-}
-
-/// Find the next sibling
-ctConfiguration* ctConfiguration::FindNextSibling()
-{
- if (!GetParent())
- return NULL;
- wxObjectList::compatibility_iterator node = GetParent()->GetChildren().Member(this);
- if (node && node->GetNext())
- {
- return (ctConfiguration*) node->GetNext()->GetData();
- }
- return NULL;
-}
-
-/// Find the previous sibling
-ctConfiguration* ctConfiguration::FindPreviousSibling()
-{
- if (!GetParent())
- return NULL;
- wxObjectList::compatibility_iterator node = GetParent()->GetChildren().Member(this);
- if (node && node->GetPrevious())
- {
- return (ctConfiguration*) node->GetPrevious()->GetData();
- }
- return NULL;
-}
-
-/// Create a clone of this and children
-ctConfiguration* ctConfiguration::DeepClone()
-{
- ctConfiguration* newItem = Clone();
-
- for ( wxObjectList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfiguration* child = (ctConfiguration*) node->GetData();
- ctConfiguration* newChild = child->DeepClone();
- newItem->AddChild(newChild);
- }
- return newItem;
-}
-
-/// Detach: remove from parent, and remove tree items
-void ctConfiguration::Detach()
-{
- // TODO
- if (GetParent())
- GetParent()->RemoveChild(this);
- else
- GetDocument()->SetTopItem(NULL);
- SetParent(NULL);
-
-/*
- wxTreeItemId treeItem = GetTreeItemId();
-
- DetachFromTree();
-
- // Will delete the branch, but not the config items.
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(treeItem);
-*/
-}
-
-/// Hide from tree: make sure tree deletions won't delete
-/// the config items
-void ctConfiguration::DetachFromTree()
-{
-/*
- wxTreeItemId item = GetTreeItemId();
-
- // TODO
- ctTreeItemData* data = (ctTreeItemData*) wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetItemData(item);
- data->SetConfigItem(NULL);
- m_treeItemId = wxTreeItemId();
-
- for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
- {
- ctConfiguration* child = (ctConfiguration*) node->GetData();
- child->DetachFromTree();
- }
-*/
-}
diff --git a/utils/configtool/src/configtooldoc.h b/utils/configtool/src/configtooldoc.h
deleted file mode 100644
index b62fb1793d..0000000000
--- a/utils/configtool/src/configtooldoc.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configtooldoc.h
-// Purpose: Document class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CT_CONFIGTOOLDOC_H_
-#define _CT_CONFIGTOOLDOC_H_
-
-#include "wx/docview.h"
-#include "wx/cmdproc.h"
-
-#include "configitem.h"
-
-class wxSimpleHtmlTag;
-class ctConfiguration;
-
-/*!
- * ctConfigToolDoc
- */
-
-class ctConfigToolDoc: public wxDocument
-{
- DECLARE_DYNAMIC_CLASS(ctConfigToolDoc)
-public:
- ctConfigToolDoc();
- virtual ~ctConfigToolDoc();
-
-//// Overrides
- virtual bool OnCreate(const wxString& path, long flags);
- virtual bool OnOpenDocument(const wxString& filename);
- virtual bool OnSaveDocument(const wxString& filename);
- virtual bool OnNewDocument() { return true; }
- virtual bool OnCloseDocument() ;
- virtual bool Save(); // Overridden only to correct bug in wxWidgets, docview.cpp
-
-//// Accessors
-
- /// Returns the top item.
- ctConfigItem* GetTopItem() const { return m_topItem; }
-
- /// Sets the top item.
- void SetTopItem(ctConfigItem* item) { m_topItem = item; }
-
- /// Returns the clipboard item.
- ctConfigItem* GetClipboardItem() const { return m_clipboardItem; }
-
- /// Sets the clipboard item.
- void SetClipboardItem(ctConfigItem* item) ;
-
- /// Clears the clipboard item.
- void ClearClipboard() ;
-
- /// Gets the current framework directory
- wxString GetFrameworkDir(bool makeUnix);
-
-//// Operations
-
- /// Add items
- void AddItems();
-
- /// Delete items
- void DeleteItems();
-
- /// Save the settings file
- bool DoSave(const wxString& filename);
-
- /// Recursive helper function for file saving
- bool DoSave(ctConfigItem* item, wxOutputStream& stream, int indent);
-
- /// Open the settings file
- bool DoOpen(const wxString& filename);
-
- /// Helper for file opening.
- bool DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent);
-
- /// Refresh dependencies
- void RefreshDependencies();
- void RefreshDependencies(ctConfigItem* item);
-
- /// Clear dependencies
- void ClearDependencies(ctConfigItem* item);
-
- /// Generate the text of a setup.h
- wxString GenerateSetup();
-
- /// Helper function
- void GenerateSetup(ctConfigItem* item, wxString& str);
-
- /// Generate a configure command
- wxString GenerateConfigureCommand();
-
- /// Helper function
- void GenerateConfigureCommand(ctConfigItem* item, wxString& str);
-
- /// Finds the next item in the tree
- ctConfigItem* FindNextItem(ctConfigItem* item, bool wrap);
-
- /// Finds the next sibling in the tree
- ctConfigItem* FindNextSibling(ctConfigItem* item);
-
-protected:
- ctConfigItem* m_topItem;
- ctConfigItem* m_clipboardItem;
-};
-
-/*!
- * ctConfiguration is a configuration or a place-holder node within the
- * hierarchy of configurations.
- */
-
-class ctConfiguration: public wxObject
-{
-public:
- /// Ctor and dtor
- ctConfiguration(ctConfiguration* parent, const wxString& name);
- ctConfiguration();
- virtual ~ctConfiguration();
-
- /// Copy constructor.
- ctConfiguration(const ctConfiguration& configuration) : wxObject()
- {
- (*this) = configuration;
- }
-
-/// Operations
-
- /// Assignment operator.
- void operator= (const ctConfiguration& configuration);
-
- /// Create a clone
- ctConfiguration* Clone()
- {
- ctConfiguration* configuration = new ctConfiguration;
- *configuration = *this;
- return configuration;
- }
-
- /// Create a clone of this and children
- ctConfiguration* DeepClone();
-
- /// Clear children
- void Clear();
-
- /// Add a child
- void AddChild(ctConfiguration* config);
-
- /// Remove (but don't delete) a child
- void RemoveChild(ctConfiguration* config);
-
- /// Find an item in this hierarchy
- ctConfiguration* FindConfiguration(const wxString& name);
-
- /// Find the next sibling
- ctConfiguration* FindNextSibling();
-
- /// Find the previous sibling
- ctConfiguration* FindPreviousSibling();
-
- /// Detach: remove from parent, and remove tree items
- void Detach();
-
- /// Attach: insert before the given position
- void Attach(ctConfiguration* parent, ctConfiguration* insertbefore);
-
- void DetachFromTree();
-
-/// Accessors
-
- /// Returns the top-level item.
- ctConfigItem* GetTopItem() const { return m_topItem; }
-
- /// Sets the top-level item.
- void SetTopItem(ctConfigItem* item) { m_topItem = item; }
-
- /// Returns the name.
- wxString GetName() const { return m_name; }
-
- /// Sets the name.
- void SetName(const wxString& name ) { m_name = name; }
-
- /// Get description.
- wxString GetDescription() const { return m_description; }
-
- /// Set description.
- void SetDescription(const wxString& descr) { m_description = descr; }
-
- /// Set the tree item id
- void SetTreeItem(wxTreeItemId id) { m_treeItemId = id; }
-
- // Get the type
- wxTreeItemId GetTreeItemId() const { return m_treeItemId ; }
-
- /// Get the list of children
- wxList& GetChildren() { return m_children; }
-
- /// Get the nth child
- ctConfiguration* GetChild(int n) const;
-
- /// Get the child count
- int GetChildCount() const;
-
- /// Get the parent
- ctConfiguration* GetParent() const { return m_parent; }
-
- /// Set the parent
- void SetParent(ctConfiguration* parent) { m_parent = parent; }
-
- /// Get the associated document (currently, assumes
- /// there's only ever one document active)
- ctConfigToolDoc* GetDocument() ;
-
-protected:
-
- /// The corresponding tree item
- wxTreeItemId m_treeItemId;
-
- /// The list of children.
- wxList m_children;
-
- /// The parent config item
- ctConfiguration* m_parent;
-
- /// The name
- wxString m_name;
-
- /// The description
- wxString m_description;
-
- /// The top-level item of this description, if any
- ctConfigItem* m_topItem;
-
-DECLARE_CLASS(ctConfiguration)
-};
-
-
-/*!
- * Implements a document editing command.
- * We only need to store one state at a time,
- * since we don't have (or need) multiple selection.
- */
-
-#define ctCMD_NEW_ELEMENT 1
-#define ctCMD_PASTE 2
-#define ctCMD_CUT 3
-#define ctCMD_APPLY_PROPERTY 4
-
-class ctConfigCommand: public wxCommand
-{
-public:
- ctConfigCommand(const wxString& name, int cmdId,
- ctConfigItem* activeState, ctConfigItem* savedState,
- ctConfigItem* parent = NULL, ctConfigItem* insertBefore = NULL,
- bool ignoreFirstTime = false);
- ctConfigCommand(const wxString& name, int cmdId,
- ctConfigItem* activeState, ctProperties* properties,
- bool ignoreFirstTime = false);
- virtual ~ctConfigCommand();
-
- bool Do();
- bool Undo();
- bool DoAndUndo(bool doCmd); // Combine Do and Undo into one
-
-protected:
- ctConfigItem* m_activeState;
- ctConfigItem* m_savedState;
- ctProperties* m_properties;
- bool m_ignoreThis; // Ignore 1st Do because we already did it
- int m_cmdId;
- ctConfigItem* m_parent;
- ctConfigItem* m_insertBefore;
-};
-
-
-#endif
- // _CT_CONFIGTOOLDOC_H_
diff --git a/utils/configtool/src/configtoolview.cpp b/utils/configtool/src/configtoolview.cpp
deleted file mode 100644
index 0005f52690..0000000000
--- a/utils/configtool/src/configtoolview.cpp
+++ /dev/null
@@ -1,1234 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configtoolview.cpp
-// Purpose: View class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#include "wx/wfstream.h"
-#include "wx/txtstrm.h"
-#include "configtoolview.h"
-#include "configtooldoc.h"
-#include "configtree.h"
-#include "wxconfigtool.h"
-#include "mainframe.h"
-#include "propeditor.h"
-#include "utils.h"
-#include "custompropertydialog.h"
-
-IMPLEMENT_DYNAMIC_CLASS(ctConfigToolView, wxView)
-
-BEGIN_EVENT_TABLE(ctConfigToolView, wxView)
- EVT_MENU(ctID_ADD_ITEM_CHECKBOX, ctConfigToolView::OnAddCheckBoxItem)
- EVT_MENU(ctID_ADD_ITEM_RADIOBUTTON, ctConfigToolView::OnAddRadioButtonItem)
- EVT_MENU(ctID_ADD_ITEM_GROUP, ctConfigToolView::OnAddGroupItem)
- EVT_MENU(ctID_ADD_ITEM_CHECK_GROUP, ctConfigToolView::OnAddCheckGroupItem)
- EVT_MENU(ctID_ADD_ITEM_RADIO_GROUP, ctConfigToolView::OnAddRadioGroupItem)
- EVT_MENU(ctID_ADD_ITEM_STRING, ctConfigToolView::OnAddStringItem)
- EVT_MENU(ctID_RENAME_ITEM, ctConfigToolView::OnRenameItem)
- EVT_MENU(ctID_DELETE_ITEM, ctConfigToolView::OnDeleteItem)
-
- EVT_MENU(wxID_COPY, ctConfigToolView::OnCopy)
- EVT_MENU(wxID_CUT, ctConfigToolView::OnCut)
- EVT_MENU(wxID_PASTE, ctConfigToolView::OnPaste)
-
- EVT_UPDATE_UI(wxID_COPY, ctConfigToolView::OnUpdateCopy)
- EVT_UPDATE_UI(wxID_CUT, ctConfigToolView::OnUpdateCut)
- EVT_UPDATE_UI(wxID_PASTE, ctConfigToolView::OnUpdatePaste)
-
- EVT_MENU(ctID_ITEM_HELP, ctConfigToolView::OnItemHelp)
-
- EVT_UPDATE_UI(ctID_ADD_ITEM_CHECKBOX, ctConfigToolView::OnUpdateAddItem)
- EVT_UPDATE_UI(ctID_ADD_ITEM_RADIOBUTTON, ctConfigToolView::OnUpdateAddItem)
- EVT_UPDATE_UI(ctID_ADD_ITEM_GROUP, ctConfigToolView::OnUpdateAddItem)
- EVT_UPDATE_UI(ctID_ADD_ITEM_CHECK_GROUP, ctConfigToolView::OnUpdateAddItem)
- EVT_UPDATE_UI(ctID_ADD_ITEM_RADIO_GROUP, ctConfigToolView::OnUpdateAddItem)
- EVT_UPDATE_UI(ctID_ADD_ITEM_STRING, ctConfigToolView::OnUpdateAddItem)
- EVT_UPDATE_UI(ctID_RENAME_ITEM, ctConfigToolView::OnUpdateCut)
- EVT_UPDATE_UI(ctID_DELETE_ITEM, ctConfigToolView::OnUpdateCut)
- EVT_UPDATE_UI(ctID_ITEM_HELP, ctConfigToolView::OnUpdateItemHelp)
-
- EVT_MENU(ctID_TREE_COPY, ctConfigToolView::OnContextCopy)
- EVT_MENU(ctID_TREE_CUT, ctConfigToolView::OnContextCut)
- EVT_MENU(ctID_TREE_PASTE_BEFORE, ctConfigToolView::OnContextPasteBefore)
- EVT_MENU(ctID_TREE_PASTE_AFTER, ctConfigToolView::OnContextPasteAfter)
- EVT_MENU(ctID_TREE_PASTE_AS_CHILD, ctConfigToolView::OnContextPasteAsChild)
- EVT_UPDATE_UI(ctID_TREE_COPY, ctConfigToolView::OnUpdateContextCopy)
- EVT_UPDATE_UI(ctID_TREE_CUT, ctConfigToolView::OnUpdateContextCut)
- EVT_UPDATE_UI(ctID_TREE_PASTE_BEFORE, ctConfigToolView::OnUpdateContextPasteBefore)
- EVT_UPDATE_UI(ctID_TREE_PASTE_AFTER, ctConfigToolView::OnUpdateContextPasteAfter)
- EVT_UPDATE_UI(ctID_TREE_PASTE_AS_CHILD, ctConfigToolView::OnUpdateContextPasteAsChild)
-
- EVT_MENU(ctID_ADD_CUSTOM_PROPERTY, ctConfigToolView::OnAddCustomProperty)
- EVT_MENU(ctID_EDIT_CUSTOM_PROPERTY, ctConfigToolView::OnEditCustomProperty)
- EVT_MENU(ctID_DELETE_CUSTOM_PROPERTY, ctConfigToolView::OnDeleteCustomProperty)
- EVT_UPDATE_UI(ctID_ADD_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateAddCustomProperty)
- EVT_UPDATE_UI(ctID_EDIT_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateEditCustomProperty)
- EVT_UPDATE_UI(ctID_DELETE_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateDeleteCustomProperty)
-
- EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, ctConfigToolView::OnTabSelect)
-
- EVT_MENU(ctID_SAVE_SETUP_FILE, ctConfigToolView::OnSaveSetupFile)
- EVT_MENU(ctID_SAVE_CONFIGURE_COMMAND, ctConfigToolView::OnSaveConfigureCommand)
- EVT_UPDATE_UI(ctID_SAVE_SETUP_FILE, ctConfigToolView::OnUpdateSaveSetupFile)
- EVT_UPDATE_UI(ctID_SAVE_CONFIGURE_COMMAND, ctConfigToolView::OnUpdateSaveConfigureCommand)
-
- EVT_MENU(wxID_FIND, ctConfigToolView::OnFind)
- EVT_UPDATE_UI(wxID_FIND, ctConfigToolView::OnUpdateFind)
-
- EVT_MENU(ctID_GO, ctConfigToolView::OnGo)
- EVT_UPDATE_UI(ctID_GO, ctConfigToolView::OnUpdateGo)
-
-END_EVENT_TABLE()
-
-// What to do when a view is created. Creates actual
-// windows for displaying the view.
-bool ctConfigToolView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
-{
- wxGetApp().GetDocManager()->ActivateView(this, true);
- wxGetApp().GetMainFrame()->SetDocument((ctConfigToolDoc*) doc);
- wxGetApp().GetMainFrame()->GetSetupPage()->SetDocument((ctConfigToolDoc*) doc) ;
- wxGetApp().GetMainFrame()->GetConfigurePage()->SetDocument((ctConfigToolDoc*) doc) ;
-
- return true;
-}
-
-void ctConfigToolView::OnDraw(wxDC *WXUNUSED(dc))
-{
-}
-
-void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
-{
- ctConfigToolDoc* doc = wxDynamicCast(GetDocument(), ctConfigToolDoc);
- ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
- if (!treeCtrl)
- return;
-
- wxASSERT (doc != NULL);
-
- ctConfigItem* selItem = NULL;
-
- wxTreeItemId sel = treeCtrl->GetSelection();
- if (sel.IsOk())
- {
- ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(sel);
- if (data)
- selItem = data->GetConfigItem() ;
- }
-
- ctConfigToolHint* hint = (ctConfigToolHint*) hintObj;
- int hintOp = ctNoHint;
- if (hint)
- hintOp = hint->m_op;
-
- switch (hintOp)
- {
- case ctInitialUpdate:
- {
- if (doc && doc->GetTopItem())
- {
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->DeleteAllItems();
- AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), doc->GetTopItem());
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Expand(doc->GetTopItem()->GetTreeItemId());
- }
- }
- break;
- case ctSelChanged:
- {
- if (selItem)
- {
- wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(selItem);
- }
- }
- break;
- case ctAllSaved:
- {
- // TODO: update windows and frame title
- }
- break;
- case ctFilenameChanged:
- {
- wxGetApp().GetMainFrame()->UpdateFrameTitle();
- }
- break;
- case ctClear:
- {
- // TODO: update windows
- treeCtrl->DeleteAllItems();
- wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(NULL);
- break;
- }
- case ctValueChanged:
- {
- // ctConfigItem& ti = *(ctConfigItem *)hint->m_item;
- wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(selItem);
- }
- break;
-
- default:
- break;
- }
-}
-
-// Clean up windows used for displaying the view.
-bool ctConfigToolView::OnClose(bool WXUNUSED(deleteWindow))
-{
- if (!GetDocument()->Close())
- return false;
-
- ctConfigToolHint hint(NULL, ctClear);
- GetDocument()->UpdateAllViews (NULL, & hint);
-
- wxGetApp().GetDocManager()->ActivateView(this, false);
-
- Activate(false);
-
- wxGetApp().GetMainFrame()->SetDocument(NULL);
- wxGetApp().GetMainFrame()->GetSetupPage()->SetDocument(NULL) ;
- wxGetApp().GetMainFrame()->GetConfigurePage()->SetDocument(NULL) ;
-
- return true;
-}
-
-void ctConfigToolView::OnChangeFilename()
-{
- if (wxGetApp().GetTopWindow() && GetDocument())
- {
- wxString docTitle(wxFileNameFromPath(GetDocument()->GetFilename()));
- wxStripExtension(docTitle);
- GetDocument()->SetTitle(docTitle);
-
- wxString name(GetDocument()->GetFilename());
- wxStripExtension(name);
-
- wxString title;
-
- wxString modifiedMarker;
- if (GetDocument()->IsModified())
- modifiedMarker = wxT("*");
-
- title = docTitle + modifiedMarker + wxString(wxT(" - ")) + wxGetApp().GetSettings().GetAppName() ;
-
- ((wxFrame*) wxGetApp().GetTopWindow())->SetTitle(title);
- }
-}
-
-// General disabler
-void ctConfigToolView::OnUpdateDisable(wxUpdateUIEvent& event)
-{
- event.Enable( false );
-}
-
-void ctConfigToolView::OnUpdateAddItem(wxUpdateUIEvent& event)
-{
- event.Enable( true );
-}
-
-/// Add item and its children to the tree
-void ctConfigToolView::AddItems(ctConfigTreeCtrl* treeControl, ctConfigItem* item)
-{
- SyncItem(treeControl, item);
-
- int count = item->GetChildCount();
- int i;
- for (i = 0; i < count; i++)
- {
- ctConfigItem* child = item->GetChild(i);
- AddItems(treeControl, child);
- }
-}
-
-/// Gets the tree item in sync with the item
-void ctConfigToolView::SyncItem(ctConfigTreeCtrl* treeControl, ctConfigItem* item)
-{
- if (!item->GetTreeItemId().IsOk())
- {
- if (!item->GetParent())
- {
- item->SetTreeItem(treeControl->AddRoot(wxEmptyString, -1, -1, new ctTreeItemData(item)));
- }
- else
- {
- // Find the item to insert the new item after.
- ctConfigItem* previousItem = item->FindPreviousSibling();
- if (previousItem && previousItem->GetTreeItemId().IsOk())
- {
- item->SetTreeItem(treeControl->InsertItem(item->GetParent()->GetTreeItemId(),
- previousItem->GetTreeItemId(),
- item->GetName(), -1, -1, new ctTreeItemData(item)));
- }
- else if (!previousItem && item->GetParent()->GetChildCount() > 1
- )
- {
- // Insert at the beginning
- item->SetTreeItem(treeControl->InsertItem(item->GetParent()->GetTreeItemId(),
- (size_t) 0, // Insert at first position
- item->GetName(), -1, -1, new ctTreeItemData(item)));
- }
- else
- {
- item->SetTreeItem(treeControl->AppendItem(item->GetParent()->GetTreeItemId(),
- item->GetName(), -1, -1, new ctTreeItemData(item)));
- }
- }
- }
-
- if (item->GetTreeItemId().IsOk())
- {
- treeControl->SetItemText(item->GetTreeItemId(), item->GetName());
-
- int iconId = 0;
-
- if (item->GetType() == ctTypeGroup)
- {
- iconId = treeControl->GetIconTable().GetIconId(wxT("Group"), 0, item->IsActive());
- }
- else if (item->GetType() == ctTypeCheckGroup)
- {
- iconId = treeControl->GetIconTable().GetIconId(wxT("CheckGroup"), item->IsEnabled() ? 0 : 1, item->IsActive());
- }
- else if (item->GetType() == ctTypeRadioGroup)
- {
- iconId = treeControl->GetIconTable().GetIconId(wxT("RadioGroup"), item->IsEnabled() ? 0 : 1, item->IsActive());
- }
- else if (item->GetType() == ctTypeBoolCheck)
- {
- iconId = treeControl->GetIconTable().GetIconId(wxT("Checkbox"), item->IsEnabled() ? 0 : 1, item->IsActive());
- }
- else if (item->GetType() == ctTypeBoolRadio)
- {
- iconId = treeControl->GetIconTable().GetIconId(wxT("Radiobutton"), item->IsEnabled() ? 0 : 1, item->IsActive());
- }
- treeControl->SetItemImage(item->GetTreeItemId(), iconId, wxTreeItemIcon_Normal);
- treeControl->SetItemImage(item->GetTreeItemId(), iconId, wxTreeItemIcon_Selected);
-
- if (treeControl->GetSelection() == item->GetTreeItemId())
- {
- if (wxGetApp().GetMainFrame()->GetPropertyEditor()->GetItem())
- wxGetApp().GetMainFrame()->GetPropertyEditor()->UpdateTitle();
- }
- }
-}
-
-/// Clicked an icon
-void ctConfigToolView::OnIconLeftDown(ctConfigTreeCtrl* treeControl, ctConfigItem* item)
-{
- if (!item->IsActive())
- return;
-
- if (item->GetType() == ctTypeCheckGroup ||
- item->GetType() == ctTypeBoolCheck ||
- item->GetType() == ctTypeBoolRadio ||
- item->GetType() == ctTypeRadioGroup
- )
- {
- // Don't toggle a radio button that's already
- // enabled.
- if ((item->GetType() == ctTypeBoolRadio || item->GetType() == ctTypeRadioGroup)
- && item->IsEnabled())
- return;
-
- item->Enable(!item->IsEnabled());
-
- GetDocument()->Modify(true);
- OnChangeFilename();
-
- SyncItem(treeControl, item);
-
- wxList considered;
- if ((item->GetType() == ctTypeBoolRadio || item->GetType() == ctTypeRadioGroup) && item->IsEnabled())
- {
- item->PropagateRadioButton(considered);
- }
- item->PropagateChange(considered);
-
- // Update the setup.h and configure text
- if (wxGetApp().GetMainFrame()->GetMainNotebook()->GetSelection() > 0)
- {
- RegenerateSetup();
- }
- }
-}
-
-/// Returns the selected config item, if any.
-ctConfigItem* ctConfigToolView::GetSelection()
-{
- wxTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
- if (!treeCtrl)
- return NULL;
-
- wxTreeItemId sel = treeCtrl->GetSelection();
- if (sel.IsOk())
- {
- ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(sel);
- if (data)
- return data->GetConfigItem() ;
- }
- return NULL;
-}
-
-/// Add a checkbox item
-void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& WXUNUSED(event))
-{
- AddItem(ctTypeBoolCheck, _("New checkbox item"));
-}
-
-/// Add a radiobutton item
-void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& WXUNUSED(event))
-{
- AddItem(ctTypeBoolRadio, _("New radio button item"));
-}
-
-/// Add a group item
-void ctConfigToolView::OnAddGroupItem(wxCommandEvent& WXUNUSED(event))
-{
- AddItem(ctTypeGroup, _("New group item"));
-}
-
-/// Add a group option item
-void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& WXUNUSED(event))
-{
- AddItem(ctTypeCheckGroup, _("New check group item"));
-}
-
-/// Add a group option item
-void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& WXUNUSED(event))
-{
- AddItem(ctTypeRadioGroup, _("New radio group item"));
-}
-
-/// Add a string item
-void ctConfigToolView::OnAddStringItem(wxCommandEvent& WXUNUSED(event))
-{
- AddItem(ctTypeString, _("New string item"));
-}
-
-/// Add an item
-void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg)
-{
- ctConfigItem* sel = GetSelection();
- if (sel)
- {
- wxString name = wxGetTextFromUser(_("Please enter a name for the new item."), msg);
- if (!name.empty())
- {
- ctConfigItem* parent ;
- ctConfigItem* insertBefore ;
- if (sel->CanHaveChildren())
- {
- parent = sel;
- insertBefore = NULL;
- }
- else
- {
- parent = sel->GetParent();
- insertBefore = sel->FindNextSibling();
- }
-
- ctConfigItem* newItem = new ctConfigItem(NULL, type, name);
- newItem->InitProperties();
-
- newItem->GetDocument()->GetCommandProcessor()->Submit(
- new ctConfigCommand(msg, ctCMD_NEW_ELEMENT, NULL, newItem,
- parent, insertBefore));
- }
- }
-}
-
-/// Delete an item
-void ctConfigToolView::OnDeleteItem(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigItem* sel = GetSelection();
- if (sel)
- {
- wxString name(sel->GetName());
- wxString msg;
- msg.Printf(_("Delete %s?"), (const wxChar*) name);
- if (wxYES == wxMessageBox(msg, _("Delete item"), wxICON_QUESTION|wxYES_NO))
- {
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(sel->GetTreeItemId());
- }
- }
-}
-
-/// Rename an item
-void ctConfigToolView::OnRenameItem(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigItem* sel = GetSelection();
- if (sel)
- {
- wxString name = wxGetTextFromUser(_("Please enter a new name for the item."),
- _("Rename item"), sel->GetName());
- if (!name.empty())
- {
- sel->SetName(name);
- SyncItem(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), sel);
-
- ctConfigToolHint hint(NULL, ctSelChanged);
- GetDocument()->UpdateAllViews (NULL, & hint);
- }
- }
-}
-
-/// Copy an item to the clipboard
-void ctConfigToolView::OnCopy(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- if (sel)
- {
- doc->SetClipboardItem(sel->DeepClone());
- }
-}
-
-/// Copy an item to the clipboard and cut the item
-void ctConfigToolView::OnCut(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- if (sel)
- {
- {
- ctConfigCommand* cmd = new ctConfigCommand(wxT("Cut Config Item"), ctCMD_CUT,
- sel, (ctConfigItem*) NULL);
- doc->GetCommandProcessor()->Submit(cmd);
- }
- }
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnPaste(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- if (sel && doc->GetClipboardItem())
- {
- ctConfigItem* parent ;
- ctConfigItem* insertBefore ;
- if (sel->CanHaveChildren())
- {
- parent = sel;
- insertBefore = NULL;
- }
- else
- {
- parent = sel->GetParent();
- insertBefore = sel->FindNextSibling();
- }
-
- ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
- ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
- NULL, newItem, parent, insertBefore);
- doc->GetCommandProcessor()->Submit(cmd);
- }
-}
-
-/// Update for copy command
-void ctConfigToolView::OnUpdateCopy(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- event.Enable( doc && GetSelection() && GetSelection()->GetParent() );
-}
-
-/// Update for cut
-void ctConfigToolView::OnUpdateCut(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- event.Enable( doc && GetSelection() && GetSelection()->GetParent() );
-}
-
-/// Update for paste
-void ctConfigToolView::OnUpdatePaste(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- event.Enable( doc && doc->GetClipboardItem() && GetSelection() );
-}
-
-/// Copy an item to the clipboard
-void ctConfigToolView::OnContextCopy(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- if (doc && sel)
- {
- doc->SetClipboardItem(sel->DeepClone());
- }
-}
-
-/// Copy an item to the clipboard and cut the item
-void ctConfigToolView::OnContextCut(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- if (sel)
- {
- {
- ctConfigCommand* cmd = new ctConfigCommand(wxT("Cut Config Item"), ctCMD_CUT,
- sel, (ctConfigItem*) NULL);
- doc->GetCommandProcessor()->Submit(cmd);
- }
- }
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- if (sel && doc->GetClipboardItem())
- {
- ctConfigItem* parent = sel->GetParent();
- ctConfigItem* insertBefore = sel;
-
- ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
- ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
- NULL, newItem, parent, insertBefore);
- doc->GetCommandProcessor()->Submit(cmd);
- }
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- if (sel && doc->GetClipboardItem())
- {
- ctConfigItem* parent = sel->GetParent();
- ctConfigItem* insertBefore = sel->FindNextSibling();
-
- ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
- ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
- NULL, newItem, parent, insertBefore);
- doc->GetCommandProcessor()->Submit(cmd);
- }
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- if (sel && doc->GetClipboardItem())
- {
- if (sel->CanHaveChildren())
- {
- ctConfigItem* parent = sel;
- ctConfigItem* insertBefore = NULL;
-
- ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
- ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
- NULL, newItem, parent, insertBefore);
- doc->GetCommandProcessor()->Submit(cmd);
- }
- }
-}
-
-/// Copy an item to the clipboard
-void ctConfigToolView::OnUpdateContextCopy(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- event.Enable( doc && sel && sel->GetParent() );
-}
-
-/// Copy an item to the clipboard and cut the item
-void ctConfigToolView::OnUpdateContextCut(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- event.Enable( doc && sel && sel->GetParent() );
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnUpdateContextPasteBefore(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- event.Enable( doc && sel && sel->GetParent() && doc->GetClipboardItem() );
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnUpdateContextPasteAfter(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- event.Enable( doc && sel && sel->GetParent() && doc->GetClipboardItem() );
-}
-
-/// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnUpdateContextPasteAsChild(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
- event.Enable( doc && sel && sel->CanHaveChildren() && doc->GetClipboardItem() );
-}
-
-/// Item help
-void ctConfigToolView::OnItemHelp(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- if ( doc && GetSelection() )
- {
- wxString helpTopic = GetSelection()->GetPropertyString(wxT("help-topic"));
- if (!helpTopic.empty())
- {
- wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic);
- }
- }
-}
-
-/// Item help update
-void ctConfigToolView::OnUpdateItemHelp(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- event.Enable( doc && GetSelection() );
-}
-
-/// Add a custom property
-void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
- if (doc && sel && editor)
- {
- ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),
- wxID_ANY, _("Add a custom property"));
- if (dialog.ShowModal() == wxID_OK)
- {
- wxString name = dialog.GetPropertyName();
- wxString type = dialog.GetPropertyType();
- wxString descr = dialog.GetPropertyDescription();
- wxString editorType = dialog.GetEditorType();
- wxArrayString choices = dialog.GetChoices();
-
- if (sel->GetProperties().FindProperty(name))
- {
- wxMessageBox(_("Sorry, this name already exists."), _T("Add custom property"),
- wxOK|wxICON_INFORMATION);
- return;
- }
- ctProperty* property = new ctProperty;
- if (type == wxT("bool"))
- property->GetVariant() = wxVariant(false, name);
- else if (type == wxT("double"))
- property->GetVariant() = wxVariant((double) 0.0, name);
- else if (type == wxT("long"))
- property->GetVariant() = wxVariant((long) 0, name);
- else
- property->GetVariant() = wxVariant(wxEmptyString, name);
- property->SetCustom(true);
- property->SetDescription(descr);
- property->SetChoices(choices);
- property->SetEditorType(editorType);
-
- sel->GetProperties().AddProperty(property);
- editor->ShowItem(sel);
- OnChangeFilename();
- }
- }
-}
-
-/// Edit a custom property
-void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
- if (doc && sel && editor)
- {
- int row;
- ctProperty* property = editor->FindSelectedProperty(row) ;
- if (property && property->IsCustom())
- {
- wxString oldName = property->GetName();
- wxString oldDescription = property->GetDescription();
- wxString oldType = property->GetVariant().GetType();
- wxString oldEditorType = property->GetEditorType();
- wxArrayString oldChoices = property->GetChoices();
-
- ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),
- wxID_ANY, _("Edit custom property"));
- dialog.SetPropertyName(oldName);
- dialog.SetPropertyType(oldType);
- dialog.SetPropertyDescription(oldDescription);
- if (dialog.ShowModal() == wxID_OK)
- {
- wxString name = dialog.GetPropertyName();
- wxString type = dialog.GetPropertyType();
- wxString editorType = dialog.GetEditorType();
- wxArrayString choices = dialog.GetChoices();
- wxString descr = dialog.GetPropertyDescription();
-
- if (name != oldName && sel->GetProperties().FindProperty(name))
- {
- wxMessageBox(_("Sorry, this name already exists."), _T("Add custom property"),
- wxOK|wxICON_INFORMATION);
- return;
- }
- if (type != oldType)
- {
- if (type == wxT("bool"))
- property->GetVariant() = wxVariant(false, name);
- else if (type == wxT("double"))
- property->GetVariant() = wxVariant((double) 0.0, name);
- else if (type == wxT("long"))
- property->GetVariant() = wxVariant((long) 0, name);
- else
- property->GetVariant() = wxVariant(wxEmptyString, name);
- }
- if (name != oldName)
- property->GetVariant().SetName(name);
-
- if (choices != oldChoices)
- property->SetChoices(choices);
-
- if (editorType != oldEditorType)
- property->SetEditorType(editorType);
-
- if (name != oldName)
- property->GetVariant().SetName(name);
-
- property->SetCustom(true);
-
- if (descr != oldDescription)
- property->SetDescription(descr);
-
- editor->ShowItem(sel);
- OnChangeFilename();
- }
- }
- }
-}
-
-/// Delete a custom property
-void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
- if (doc && sel && editor)
- {
- int row;
- ctProperty* property = editor->FindSelectedProperty(row) ;
- if (property && property->IsCustom())
- {
- wxString name(property->GetName());
- wxString msg;
- msg.Printf(_("Delete custom property '%s'?"), (const wxChar*) name);
- if (wxYES == wxMessageBox(msg, _("Delete property"), wxICON_EXCLAMATION|wxYES_NO))
- {
- sel->GetProperties().RemoveProperty(property);
- editor->ShowItem(sel);
- delete property;
- OnChangeFilename();
- }
- }
- }
-}
-
-/// Add a custom property: update event
-void ctConfigToolView::OnUpdateAddCustomProperty(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- event.Enable( doc && GetSelection() && GetSelection()->GetParent() );
-}
-
-/// Edit a custom property: update event
-void ctConfigToolView::OnUpdateEditCustomProperty(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
- int row;
- event.Enable( doc && sel && sel->GetParent() && editor &&
- editor->FindSelectedProperty(row) &&
- editor->FindSelectedProperty(row)->IsCustom() );
-}
-
-/// Delete a custom property: update event
-void ctConfigToolView::OnUpdateDeleteCustomProperty(wxUpdateUIEvent& event)
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctConfigItem* sel = GetSelection();
- ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();
- int row;
- event.Enable( doc && sel && sel->GetParent() && editor &&
- editor->FindSelectedProperty(row) &&
- editor->FindSelectedProperty(row)->IsCustom() );
-}
-
-/// Regenerate setup.h and configure command
-void ctConfigToolView::RegenerateSetup()
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- ctOutputWindow* setupPage = wxGetApp().GetMainFrame()->GetSetupPage() ;
- ctOutputWindow* configurePage = wxGetApp().GetMainFrame()->GetConfigurePage() ;
-
- wxString setupStr = doc->GenerateSetup();
- wxString configureStr = doc->GenerateConfigureCommand();
-
- setupPage->SetText(setupStr);
- configurePage->SetText(configureStr);
-}
-
-/// Regenerate if selected a tab
-void ctConfigToolView::OnTabSelect(wxNotebookEvent& event)
-{
- if (wxGetApp().GetMainFrame()->GetMainNotebook() != event.GetEventObject())
- {
- event.Skip();
- return;
- }
-
- if (event.GetSelection() > 0)
- {
- RegenerateSetup();
- }
-}
-
-void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- wxString setupStr = doc->GenerateSetup();
-
- wxString filename = _T("setup.h");
- wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
- if (path.empty())
- path = doc->GetFrameworkDir(false);
- wxString wildcard = _T("Header files (*.h)|*.h|All files (*.*)|*.*");
-
- wxFileDialog dialog(wxTheApp->GetTopWindow(),
- _("Save Setup File As"),
- path, filename ,
- wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
-
- if (dialog.ShowModal() == wxID_OK)
- {
- wxString fullPath = dialog.GetPath();
- wxGetApp().GetSettings().m_lastSetupSaveDir = wxPathOnly(fullPath);
-
- wxFileOutputStream osFile(fullPath);
- if (!osFile.Ok())
- {
- wxMessageBox(_("Sorry, could not save this file."), _("Save Setup File"), wxICON_EXCLAMATION|wxOK);
- return;
- }
-
- wxTextOutputStream stream(osFile);
- stream << setupStr;
- }
-}
-
-void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- wxString configureStr = doc->GenerateConfigureCommand();
-
- wxString filename = _T("configurewx.sh");
- wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
- if (path.empty())
- path = doc->GetFrameworkDir(false);
- wxString wildcard = _T("Shell script files (*.sh)|*.sh|All files (*.*)|*.*");
-
- wxFileDialog dialog(wxTheApp->GetTopWindow(),
- _("Save Configure Command File As"),
- path, filename ,
- wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
-
- if (dialog.ShowModal() == wxID_OK)
- {
- wxString fullPath = dialog.GetPath();
- wxGetApp().GetSettings().m_lastSetupSaveDir = wxPathOnly(fullPath);
-
- wxFileOutputStream osFile(fullPath);
- if (!osFile.Ok())
- {
- wxMessageBox(_("Sorry, could not save this file."), _("Save Configure Command File"), wxICON_EXCLAMATION|wxOK);
- return;
- }
-
- wxTextOutputStream stream(osFile);
- stream << configureStr;
- }
-}
-
-void ctConfigToolView::OnUpdateSaveSetupFile(wxUpdateUIEvent& event)
-{
- event.Enable(true);
-}
-
-void ctConfigToolView::OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event)
-{
- event.Enable(true);
-}
-
-/// Find text
-void ctConfigToolView::OnFind(wxCommandEvent& WXUNUSED(event))
-{
- ctFindReplaceDialog* dialog = wxGetApp().GetMainFrame()->GetFindDialog();
- if (dialog)
- {
- dialog->Raise();
- }
-
- if (!dialog)
- {
- int style = wxFR_NOUPDOWN;
- wxString caption(wxT("Find text in settings"));
- int flags = wxFR_DOWN;
- if (wxGetApp().GetSettings().m_matchCase)
- flags|=wxFR_MATCHCASE;
- if (wxGetApp().GetSettings().m_matchWholeWord)
- flags|=wxFR_WHOLEWORD;
-
- ctFindReplaceDialog::sm_findData.SetFlags(flags);
-
- dialog = new ctFindReplaceDialog(wxGetApp().GetMainFrame(), caption, style);
- dialog->Show(true);
- }
-}
-
-/// Update find text
-void ctConfigToolView::OnUpdateFind(wxUpdateUIEvent& event)
-{
- event.Enable(true);
-}
-
-/// Save default file type
-void ctConfigToolView::OnGo(wxCommandEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
- wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
- if (!path.empty())
- {
- if (wxGetApp().GetSettings().m_defaultFileKind == wxT("Setup file"))
- {
- // setup.h
- wxString setupStr = doc->GenerateSetup();
-
- wxString fullPath = path + wxFILE_SEP_PATH + wxT("setup.h");
- if (wxFileExists(fullPath))
- {
- wxString msg;
- msg.Printf(wxT("Overwrite existing file %s?"), (const wxChar*) fullPath);
- int ans = wxMessageBox(msg, _("Save Setup File"), wxICON_QUESTION|wxYES_NO|wxCANCEL);
- if (ans == wxCANCEL)
- return;
- if (ans == wxNO)
- return;
- }
- wxFileOutputStream stream(fullPath);
- if (!stream.Ok())
- {
- wxMessageBox(_("Sorry, could not save this file."), _("Save Setup File"), wxICON_EXCLAMATION|wxOK);
- return;
- }
- stream << setupStr;
- }
- else if (wxGetApp().GetSettings().m_defaultFileKind == wxT("Configure script"))
- {
- // configurewx.sh
- wxString configureStr = doc->GenerateConfigureCommand();
-
- wxString fullPath = path + wxFILE_SEP_PATH + wxT("configurewx.sh");
- if (wxFileExists(fullPath))
- {
- wxString msg;
- msg.Printf(wxT("Overwrite existing file %s?"), (const wxChar*) fullPath);
- int ans = wxMessageBox(msg, _("Save Configure Script"), wxICON_QUESTION|wxYES_NO|wxCANCEL);
- if (ans == wxCANCEL)
- return;
- if (ans == wxNO)
- return;
- }
- wxFileOutputStream stream(fullPath);
- if (!stream.Ok())
- {
- wxMessageBox(_("Sorry, could not save this file."), _("Save Configure Script"), wxICON_EXCLAMATION|wxOK);
- return;
- }
- stream << configureStr;
- }
- else
- {
- wxMessageBox(wxT("Unrecognised default file type."));
- }
- }
-}
-
-/// Update
-void ctConfigToolView::OnUpdateGo(wxUpdateUIEvent& event)
-{
- wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
- event.Enable(!path.empty());
-}
-
-//----------------------------------------------------------------------------
-// ctFindReplaceDialog
-//----------------------------------------------------------------------------
-
-BEGIN_EVENT_TABLE(ctFindReplaceDialog, wxFindReplaceDialog)
- EVT_FIND(wxID_ANY, ctFindReplaceDialog::OnFind)
- EVT_FIND_NEXT(wxID_ANY, ctFindReplaceDialog::OnFind)
- EVT_FIND_CLOSE(wxID_ANY, ctFindReplaceDialog::OnClose)
-END_EVENT_TABLE()
-
-wxFindReplaceData ctFindReplaceDialog::sm_findData;
-wxString ctFindReplaceDialog::sm_currentItem = wxEmptyString;
-
-ctFindReplaceDialog::ctFindReplaceDialog( wxWindow *parent, const wxString& title,
- long style):
- wxFindReplaceDialog( parent, & sm_findData, title, style )
-{
- sm_currentItem = wxEmptyString;
-
- if (parent)
- ((ctMainFrame*) parent)->SetFindDialog(this);
-}
-
-void ctFindReplaceDialog::OnFind(wxFindDialogEvent& event)
-{
- wxString textToFind = event.GetFindString();
- bool matchCase = ((event.GetFlags() & wxFR_MATCHCASE) != 0);
- bool wholeWord = ((event.GetFlags() & wxFR_WHOLEWORD) != 0);
-
- wxGetApp().GetSettings().m_matchCase = matchCase;
- wxGetApp().GetSettings().m_matchWholeWord = wholeWord;
-
- if (!DoFind(textToFind, matchCase, wholeWord))
- {
- wxMessageBox(wxT("No more matches."), wxT("Search"), wxOK|wxICON_INFORMATION, this);
- }
-}
-
-bool ctFindReplaceDialog::DoFind(const wxString& textToFind, bool matchCase, bool wholeWord, bool wrap)
-{
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- if (!doc)
- return false;
- ctConfigToolView* view = (ctConfigToolView*) doc->GetFirstView();
-
- ctConfigItem* currentItem = NULL;
- ctConfigItem* focusItem = view->GetSelection();
- if (!focusItem)
- {
- focusItem = doc->GetTopItem();
- if (!focusItem)
- return false;
- }
-
- if (!sm_currentItem.empty())
- {
- currentItem = doc->GetTopItem()->FindItem(sm_currentItem);
- }
-
- // If we were at this item last time, skip the first one.
- bool skipFirstItem = (currentItem == focusItem);
- currentItem = FindNextItem(doc, currentItem, textToFind, matchCase, wholeWord, wrap,
- skipFirstItem);
-
- if (currentItem)
- {
- sm_currentItem = currentItem->GetName();
- wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(currentItem->GetTreeItemId());
- return true;
- }
- else
- {
- sm_currentItem = wxEmptyString;
- }
-
- return false;
-}
-
-ctConfigItem* ctFindReplaceDialog::FindNextItem(ctConfigToolDoc* doc,
- ctConfigItem* item,
- const wxString& text,
- bool matchCase,
- bool matchWordOnly,
- bool wrap,
- bool skipFirst)
-{
- ctConfigItem* firstInDoc = NULL;
-
- wxString text2(text);
- if (!matchCase)
- text2.MakeLower();
-
- ctConfigItem* found = NULL;
- ctConfigItem* next = item;
-
- int i = 0;
- do
- {
- // If starting the search from beginning, we can now
- // set the value of 'item' in the 2nd iteration without immediately
- // dropping out of the while loop because card == next
- if (!item && (i > 0))
- item = firstInDoc;
-
- // We might want to start from this item if skipFirst is false.
- if ((i == 0) && !skipFirst && next)
- {
- }
- else
- next = doc->FindNextItem(next, wrap);
-
- // Save to be used in iteration 2
- if ((i == 0) && !item)
- firstInDoc = next;
-
- if (next)
- {
- wxString str(next->GetName());
- wxString description(next->GetPropertyString(wxT("description")));
- wxString notes(next->GetPropertyString(wxT("notes")));
- if (!matchCase)
- {
- str.MakeLower();
- description.MakeLower();
- notes.MakeLower();
- }
- if (ctMatchString(str, text2, matchWordOnly) ||
- ctMatchString(description, text2, matchWordOnly) ||
- ctMatchString(notes, text2, matchWordOnly))
- {
- found = next;
- }
- }
- else
- break; // Didn't find an item at all
-
- i ++;
- }
- while (!found && item != next);
-
- if (item == found && !firstInDoc)
- return NULL;
- else
- return found;
-}
-
-void ctFindReplaceDialog::OnClose(wxFindDialogEvent& event)
-{
- bool matchCase = ((event.GetFlags() & wxFR_MATCHCASE) != 0);
- bool wholeWord = ((event.GetFlags() & wxFR_WHOLEWORD) != 0);
- wxGetApp().GetSettings().m_matchCase = matchCase;
- wxGetApp().GetSettings().m_matchWholeWord = wholeWord;
-
- this->Destroy();
- ((ctMainFrame*) GetParent())->SetFindDialog(NULL);
-}
diff --git a/utils/configtool/src/configtoolview.h b/utils/configtool/src/configtoolview.h
deleted file mode 100644
index dde015e2ac..0000000000
--- a/utils/configtool/src/configtoolview.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configtoolview.h
-// Purpose: View class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CT_CONFIGTOOLVIEW_H_
-#define _CT_CONFIGTOOLVIEW_H_
-
-#include "wx/docview.h"
-#include "wx/treectrl.h"
-#include "wx/fdrepdlg.h"
-#include "configitem.h"
-
-class ctConfigTreeCtrl;
-class WXDLLEXPORT wxNotebookEvent;
-
-/*
- * ctConfigToolView
- */
-
-class ctConfigItem;
-class ctConfigToolView: public wxView
-{
- DECLARE_DYNAMIC_CLASS(ctConfigToolView)
-public:
- ctConfigToolView(){};
- ~ctConfigToolView(){};
-
-//// Overrides
-
- bool OnCreate(wxDocument *doc, long flags);
- void OnDraw(wxDC *dc);
- void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
- bool OnClose(bool deleteWindow = true);
- void OnChangeFilename();
-
-//// Operations
-
- /// Gets the tree item in sync with the item.
- void SyncItem(ctConfigTreeCtrl* treeControl, ctConfigItem* item);
-
- /// Add item and its children to the tree
- void AddItems(ctConfigTreeCtrl* treeControl, ctConfigItem* item);
-
- /// Clicked an icon
- void OnIconLeftDown(ctConfigTreeCtrl* treeControl, ctConfigItem* item);
-
- /// Add an item
- void AddItem(ctConfigType type, const wxString& msg);
-
- /// Regenerate setup.h and configure command
- void RegenerateSetup();
-
-//// Accessors
-
- /// Returns the selected config item, if any.
- ctConfigItem* GetSelection();
-
-//// Event handlers
-
- /// General disabler
- void OnUpdateDisable(wxUpdateUIEvent& event);
-
- /// Enable add item menu items
- void OnUpdateAddItem(wxUpdateUIEvent& event);
-
- /// Add a checkbox item
- void OnAddCheckBoxItem(wxCommandEvent& event);
-
- /// Add a radiobutton item
- void OnAddRadioButtonItem(wxCommandEvent& event);
-
- /// Add a group item
- void OnAddGroupItem(wxCommandEvent& event);
-
- /// Add a check group item
- void OnAddCheckGroupItem(wxCommandEvent& event);
-
- /// Add a radio group item
- void OnAddRadioGroupItem(wxCommandEvent& event);
-
- /// Add a string item
- void OnAddStringItem(wxCommandEvent& event);
-
- /// Delete an item
- void OnDeleteItem(wxCommandEvent& event);
-
- /// Rename an item
- void OnRenameItem(wxCommandEvent& event);
-
- /// Copy an item to the clipboard
- void OnCopy(wxCommandEvent& event);
-
- /// Copy an item to the clipboard and cut the item
- void OnCut(wxCommandEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnPaste(wxCommandEvent& event);
-
- /// Item help
- void OnItemHelp(wxCommandEvent& event);
-
- /// Update for copy command
- void OnUpdateCopy(wxUpdateUIEvent& event);
-
- /// Update for cut
- void OnUpdateCut(wxUpdateUIEvent& event);
-
- /// Update for paste
- void OnUpdatePaste(wxUpdateUIEvent& event);
-
- /// Update for item help
- void OnUpdateItemHelp(wxUpdateUIEvent& event);
-
- // Context menu events
-
- /// Copy an item to the clipboard
- void OnContextCopy(wxCommandEvent& event);
-
- /// Copy an item to the clipboard and cut the item
- void OnContextCut(wxCommandEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnContextPasteBefore(wxCommandEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnContextPasteAfter(wxCommandEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnContextPasteAsChild(wxCommandEvent& event);
-
- /// Copy an item to the clipboard
- void OnUpdateContextCopy(wxUpdateUIEvent& event);
-
- /// Copy an item to the clipboard and cut the item
- void OnUpdateContextCut(wxUpdateUIEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnUpdateContextPasteBefore(wxUpdateUIEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnUpdateContextPasteAfter(wxUpdateUIEvent& event);
-
- /// Paste an item from the clipboard to the tree
- void OnUpdateContextPasteAsChild(wxUpdateUIEvent& event);
-
- // Custom property events
-
- /// Add a custom property
- void OnAddCustomProperty(wxCommandEvent& event);
-
- /// Edit a custom property
- void OnEditCustomProperty(wxCommandEvent& event);
-
- /// Delete a custom property
- void OnDeleteCustomProperty(wxCommandEvent& event);
-
- /// Add a custom property: update event
- void OnUpdateAddCustomProperty(wxUpdateUIEvent& event);
-
- /// Edit a custom property: update event
- void OnUpdateEditCustomProperty(wxUpdateUIEvent& event);
-
- /// Delete a custom property: update event
- void OnUpdateDeleteCustomProperty(wxUpdateUIEvent& event);
-
- // Notebook events
-
- /// Regenerate if selected a tab
- void OnTabSelect(wxNotebookEvent& event);
-
- /// Saving setup file
- void OnSaveSetupFile(wxCommandEvent& event);
-
- /// Save configure command file
- void OnSaveConfigureCommand(wxCommandEvent& event);
-
- /// Saving setup file update handler
- void OnUpdateSaveSetupFile(wxUpdateUIEvent& event);
-
- /// Save configure command file update handler
- void OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event);
-
- // Find
-
- /// Find text
- void OnFind(wxCommandEvent& event);
-
- /// Update find text
- void OnUpdateFind(wxUpdateUIEvent& event);
-
- // Go (now: save setup.h or configurewx.sh. later: invoke configure/make)
-
- /// Save default file type
- void OnGo(wxCommandEvent& event);
-
- /// Update
- void OnUpdateGo(wxUpdateUIEvent& event);
-
-DECLARE_EVENT_TABLE()
-
-protected:
-};
-
-/*
- * ctConfigToolHint
- *
- * Hint to pass to UpdateAllViews
- *
- */
-
-// Update hint symbols
-#define ctNoHint 0
-#define ctAllSaved 1
-#define ctClear 2
-#define ctValueChanged 3
-#define ctSelChanged 4
-#define ctFilenameChanged 5
-#define ctInitialUpdate 6
-
-class ctConfigItem;
-class ctConfigToolHint: public wxObject
-{
-public:
- ctConfigToolHint(ctConfigItem* item, int op) { m_item = item; m_op = op; }
-
- ctConfigItem* m_item;
- int m_op;
-};
-
-/*
- * ctFindReplaceDialog
- */
-
-class ctFindReplaceDialog: public wxFindReplaceDialog
-{
-public:
- // constructors and destructors
- ctFindReplaceDialog( wxWindow* parent, const wxString& title,
- long style = 0 );
-
- void OnFind(wxFindDialogEvent& event);
- void OnClose(wxFindDialogEvent& event);
-
- // If wrap is true, go back to the beginning if at the end of the
- // document.
- bool DoFind(const wxString& textToFind, bool matchCase, bool wholeWord, bool wrap = true);
-
- ctConfigItem* FindNextItem(ctConfigToolDoc* doc,
- ctConfigItem* item,
- const wxString& text,
- bool matchCase,
- bool matchWordOnly,
- bool wrap,
- bool skipFirst);
- static wxFindReplaceData sm_findData;
- static wxString sm_currentItem; // card name
-
-private:
- DECLARE_EVENT_TABLE()
-};
-
-#endif
- // _CT_CONFIGTOOLVIEW_H_
diff --git a/utils/configtool/src/configtree.cpp b/utils/configtool/src/configtree.cpp
deleted file mode 100644
index 10769df40e..0000000000
--- a/utils/configtool/src/configtree.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configtree.h
-// Purpose: wxWidgets Configuration Tool tree class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-03
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#include "wx/cshelp.h"
-#include "wx/imaglist.h"
-
-// Include XPM icons
-#include "bitmaps/closedfolder.xpm"
-#include "bitmaps/closedfolder_dis.xpm"
-
-#include "bitmaps/checked.xpm"
-#include "bitmaps/checked_dis.xpm"
-#include "bitmaps/unchecked.xpm"
-#include "bitmaps/unchecked_dis.xpm"
-
-#include "bitmaps/radioon.xpm"
-#include "bitmaps/radioon_dis.xpm"
-#include "bitmaps/radiooff.xpm"
-#include "bitmaps/radiooff_dis.xpm"
-
-#include "bitmaps/checkedfolder.xpm"
-#include "bitmaps/checkedfolder_dis.xpm"
-#include "bitmaps/uncheckedfolder.xpm"
-#include "bitmaps/uncheckedfolder_dis.xpm"
-
-#include "bitmaps/radiofolderon.xpm"
-#include "bitmaps/radiofolderon_dis.xpm"
-#include "bitmaps/radiofolderoff.xpm"
-#include "bitmaps/radiofolderoff_dis.xpm"
-
-#include "configtree.h"
-#include "configtooldoc.h"
-#include "configtoolview.h"
-#include "wxconfigtool.h"
-#include "mainframe.h"
-
-/*
- * ctConfigTreeCtrl
- */
-
-IMPLEMENT_CLASS(ctConfigTreeCtrl, wxTreeCtrl)
-
-BEGIN_EVENT_TABLE(ctConfigTreeCtrl, wxTreeCtrl)
- EVT_MOUSE_EVENTS(ctConfigTreeCtrl::OnMouseEvent)
- EVT_CHAR(ctConfigTreeCtrl::OnKeyDown)
- EVT_TREE_SEL_CHANGED(wxID_ANY, ctConfigTreeCtrl::OnSelChanged)
- EVT_HELP(wxID_ANY, ctConfigTreeCtrl::OnHelp)
-END_EVENT_TABLE()
-
-ctConfigTreeCtrl::ctConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
- const wxSize& sz, long style):
-wxTreeCtrl(parent, id, pt, sz, style)
-{
- LoadIcons();
-
- m_contextMenu = NULL;
- m_contextMenu = new wxMenu;
-
- m_contextMenu->Append(ctID_TREE_PASTE_BEFORE, _("Paste &before this option"));
- m_contextMenu->Append(ctID_TREE_PASTE_AFTER, _("Paste &after this option"));
- m_contextMenu->Append(ctID_TREE_PASTE_AS_CHILD, _("Paste as &child of this option"));
- m_contextMenu->AppendSeparator();
- m_contextMenu->Append(ctID_TREE_COPY, _("C&opy"));
- m_contextMenu->Append(ctID_TREE_CUT, _("Cu&t"));
-
- SetHelpText(_("This shows configuration settings that you can enable and disable."));
-}
-
-// Load the icons and initialize the tree
-void ctConfigTreeCtrl::LoadIcons()
-{
- m_imageList = new wxImageList(16, 16, true);
- m_iconTable.SetImageList(m_imageList);
- SetImageList(m_imageList);
-
- m_iconTable.AddInfo(_T("Group"), wxIcon(closedfolder_xpm), 0, true);
- m_iconTable.AddInfo(_T("Group"), wxIcon(closedfolder_dis_xpm), 0, false);
-
- m_iconTable.AddInfo(_T("Checkbox"), wxIcon(checked_xpm), 0, true);
- m_iconTable.AddInfo(_T("Checkbox"), wxIcon(checked_dis_xpm), 0, false);
- m_iconTable.AddInfo(_T("Checkbox"), wxIcon(unchecked_xpm), 1, true);
- m_iconTable.AddInfo(_T("Checkbox"), wxIcon(unchecked_dis_xpm), 1, false);
-
- m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(checkedfolder_xpm), 0, true);
- m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(checkedfolder_dis_xpm), 0, false);
- m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(uncheckedfolder_xpm), 1, true);
- m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(uncheckedfolder_dis_xpm), 1, false);
-
- m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderon_xpm), 0, true);
- m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderon_dis_xpm), 0, false);
- m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderoff_xpm), 1, true);
- m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderoff_dis_xpm), 1, false);
-
- m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radioon_xpm), 0, true);
- m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radioon_dis_xpm), 0, false);
- m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radiooff_xpm), 1, true);
- m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radiooff_dis_xpm), 1, false);
-}
-
-ctConfigTreeCtrl::~ctConfigTreeCtrl()
-{
- SetImageList(NULL);
- delete m_imageList;
-
- delete m_contextMenu;
-}
-
-void ctConfigTreeCtrl::OnSelChanged(wxTreeEvent& WXUNUSED(event))
-{
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- if (doc)
- {
- ctConfigToolHint hint(NULL, ctSelChanged);
- doc->UpdateAllViews(NULL, & hint);
- }
-}
-
-void ctConfigTreeCtrl::OnMouseEvent(wxMouseEvent& event)
-{
- int flags = 0;
- wxTreeItemId item = HitTest(wxPoint(event.GetX(), event.GetY()), flags);
-
- if (event.LeftDown())
- {
- if (flags & wxTREE_HITTEST_ONITEMICON)
- {
- ctTreeItemData* data = (ctTreeItemData*) GetItemData(item);
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- if (doc)
- {
- ctConfigToolView* view = wxDynamicCast(doc->GetFirstView(), ctConfigToolView);
- if (view)
- view->OnIconLeftDown(this, data->GetConfigItem());
- }
- }
- }
- else if (event.RightDown())
- {
- if ((flags & wxTREE_HITTEST_ONITEMBUTTON) ||
- (flags & wxTREE_HITTEST_ONITEMICON) ||
- (flags & wxTREE_HITTEST_ONITEMINDENT) ||
- (flags & wxTREE_HITTEST_ONITEMLABEL))
- {
- ctTreeItemData* data = (ctTreeItemData*) GetItemData(item);
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- if (doc && data)
- {
- m_contextItem = data->GetConfigItem();
- PopupMenu(m_contextMenu, event.GetX(), event.GetY());
- }
- }
- }
-
- event.Skip();
-}
-
-void ctConfigTreeCtrl::OnKeyDown(wxKeyEvent& event)
-{
- wxTreeItemId id = GetSelection();
- if (event.GetKeyCode() == WXK_SPACE)
- {
- if (id.IsOk())
- {
- ctConfigItem* item = ((ctTreeItemData*) GetItemData(id))->GetConfigItem();
- ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
- if (doc)
- {
- ctConfigToolView* view = wxDynamicCast(doc->GetFirstView(), ctConfigToolView);
- if (view)
- view->OnIconLeftDown(this, item);
- }
- }
- }
- else
- {
- event.Skip();
- }
-}
-
-// Show help for this window
-void ctConfigTreeCtrl::OnHelp(wxHelpEvent& event)
-{
- wxPoint pt = ScreenToClient(event.GetPosition());
- int flags = 0;
- wxTreeItemId id = HitTest(pt, flags);
- ctTreeItemData *itemData = (ctTreeItemData*) GetItemData(id);
- wxHelpProvider *helpProvider = wxHelpProvider::Get();
- if ( helpProvider && itemData)
- {
- ctConfigItem* item = itemData->GetConfigItem();
- if (item)
- {
- wxString helpTopic = item->GetPropertyString(wxT("help-topic"));
- if (!helpTopic.IsEmpty())
- {
- wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic);
- return;
- }
- }
- }
-
- event.Skip();
-}
-
-ctTreeItemData::~ctTreeItemData()
-{
- if (m_configItem) delete m_configItem;
-}
-
diff --git a/utils/configtool/src/configtree.h b/utils/configtool/src/configtree.h
deleted file mode 100644
index 19c107a5c0..0000000000
--- a/utils/configtool/src/configtree.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: configtree.h
-// Purpose: wxWidgets Configuration Tool tree class
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-03
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef _CT_CONFIGTREE_H_
-#define _CT_CONFIGTREE_H_
-
-#include "wx/wx.h"
-#include "wx/treectrl.h"
-
-#include "configitem.h"
-#include "utils.h"
-
-/*!
- * ctTreeItemData
- * Holds the ctConfigItem for each tree item.
- */
-
-class ctTreeItemData : public wxTreeItemData
-{
-public:
- ctTreeItemData(ctConfigItem* item) : m_configItem(item) { }
- virtual ~ctTreeItemData() ;
-
- ctConfigItem *GetConfigItem() const { return m_configItem; }
- void SetConfigItem(ctConfigItem *item) { m_configItem = item; }
-
-private:
- ctConfigItem* m_configItem;
-};
-
-
-/*!
- * ctConfigTreeCtrl
- * The options hierarchy viewer.
- */
-
-class ctConfigTreeCtrl: public wxTreeCtrl
-{
- DECLARE_CLASS(ctConfigTreeCtrl)
-public:
- ctConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
- virtual ~ctConfigTreeCtrl();
-
-//// Event handlers
- void OnMouseEvent(wxMouseEvent& event);
- void OnSelChanged(wxTreeEvent& event);
- void OnHelp(wxHelpEvent& event);
- void OnKeyDown(wxKeyEvent& event);
-
-//// Accessors
-
- /// Get the table of icons
- wxIconTable& GetIconTable() { return m_iconTable; }
-
- /// Get the context menu
- wxMenu* GetMenu() { return m_contextMenu; }
-
- /// Get the item associated with the context menu events
- ctConfigItem* GetContextItem() { return m_contextItem; }
-
-//// Operations
-
- /// Loads the icons.
- void LoadIcons();
-
-protected:
- wxImageList* m_imageList;
- wxIconTable m_iconTable;
- wxMenu* m_contextMenu;
- // The item associated with the context menu events
- ctConfigItem* m_contextItem;
-
- DECLARE_EVENT_TABLE()
-};
-
-#endif
-// _CT_CONFIGTREE_H_
diff --git a/utils/configtool/src/custompropertydialog.cpp b/utils/configtool/src/custompropertydialog.cpp
deleted file mode 100644
index b2e227f7ab..0000000000
--- a/utils/configtool/src/custompropertydialog.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: custompropertydialog.cpp
-// Purpose: Custom property dialog
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-
-#include "wx/wx.h"
-#include "wx/statline.h"
-#include "wx/splitter.h"
-#include "wx/scrolwin.h"
-#include "wx/spinctrl.h"
-#include "wx/spinbutt.h"
-
-#endif
-
-#include "wx/cshelp.h"
-#include "wx/valgen.h"
-#include "custompropertydialog.h"
-
-////@begin XPM images
-////@end XPM images
-
-/*!
- * ctCustomPropertyDialog type definition
- */
-
-IMPLEMENT_CLASS( ctCustomPropertyDialog, wxDialog )
-
-/*!
- * ctCustomPropertyDialog event table definition
- */
-
-BEGIN_EVENT_TABLE( ctCustomPropertyDialog, wxDialog )
-
-////@begin ctCustomPropertyDialog event table entries
- EVT_UPDATE_UI( ID_PROPERTY_CHOICES, ctCustomPropertyDialog::OnUpdatePropertyChoices )
-
- EVT_BUTTON( ID_PROPERTY_CHOICE_ADD, ctCustomPropertyDialog::OnPropertyChoiceAdd )
- EVT_UPDATE_UI( ID_PROPERTY_CHOICE_ADD, ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd )
-
- EVT_BUTTON( ID_PROPERTY_CHOICE_REMOVE, ctCustomPropertyDialog::OnPropertyChoiceRemove )
- EVT_UPDATE_UI( ID_PROPERTY_CHOICE_REMOVE, ctCustomPropertyDialog::OnUpdatePropertyChoiceRemove )
-
-////@end ctCustomPropertyDialog event table entries
-
-END_EVENT_TABLE()
-
-/*!
- * ctCustomPropertyDialog constructor
- */
-
-ctCustomPropertyDialog::ctCustomPropertyDialog( wxWindow* parent, wxWindowID id, const wxString& caption)
-{
- m_type = wxT("string");
-
- wxDialog::Create( parent, id, caption);
-
- CreateControls();
-}
-
-/*!
- * Control creation for ctCustomPropertyDialog
- */
-
-void ctCustomPropertyDialog::CreateControls()
-{
-////@begin ctCustomPropertyDialog content construction
-
- wxArrayString items;
-
- ctCustomPropertyDialog* item1 = this;
-
- wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
- item1->SetSizer(item2);
-
- wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
- item2->Add(item3, 1, wxGROW|wxALL, 5);
-
- wxStaticText* item4 = new wxStaticText(item1, wxID_STATIC, _("&Enter name, type and description for your custom property."), wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item4, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- wxStaticText* item5 = new wxStaticText(item1, wxID_STATIC, _("&Name:"), wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- m_customPropertyName = new wxTextCtrl(item1, wxID_ANY);
- item3->Add(m_customPropertyName, 0, wxGROW|wxALL, 5);
-
- wxBoxSizer* item7 = new wxBoxSizer(wxHORIZONTAL);
- item3->Add(item7, 0, wxGROW, 5);
-
- wxBoxSizer* item8 = new wxBoxSizer(wxVERTICAL);
- item7->Add(item8, 1, wxGROW, 5);
-
- wxStaticText* item9 = new wxStaticText(item1, wxID_STATIC, _("&Data type:"), wxDefaultPosition, wxDefaultSize, 0);
- item8->Add(item9, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- items.Empty();
- items.Add(_("string"));
- items.Add(_("bool"));
- items.Add(_("double"));
- items.Add(_("long"));
- m_customPrototype = new wxChoice(item1, wxID_ANY, wxDefaultPosition, wxDefaultSize, items);
- m_customPrototype->SetStringSelection(_("string"));
- item8->Add(m_customPrototype, 1, wxGROW|wxALL, 5);
-
- wxBoxSizer* item11 = new wxBoxSizer(wxVERTICAL);
- item7->Add(item11, 0, wxALIGN_CENTER_VERTICAL, 5);
-
- wxStaticText* item12 = new wxStaticText(item1, wxID_STATIC, _("&Editor type:"), wxDefaultPosition, wxDefaultSize, 0);
- item11->Add(item12, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- items.Empty();
- items.Add(_("string"));
- items.Add(_("choice"));
- items.Add(_("bool"));
- items.Add(_("float"));
- items.Add(_("integer"));
- items.Add(_("configitems"));
- m_customPropertyEditorType = new wxChoice(item1, wxID_ANY, wxDefaultPosition, wxDefaultSize, items);
- m_customPropertyEditorType->SetStringSelection(_("string"));
- item11->Add(m_customPropertyEditorType, 1, wxGROW|wxALL, 5);
-
- wxStaticBox* item14Static = new wxStaticBox(item1, wxID_ANY, _("Choices"));
- wxStaticBoxSizer* item14 = new wxStaticBoxSizer(item14Static, wxHORIZONTAL);
- item3->Add(item14, 0, wxGROW|wxALL, 5);
-
- wxString* item15Strings = NULL;
- m_propertyChoices = new wxListBox(item1, ID_PROPERTY_CHOICES, wxDefaultPosition, wxDefaultSize, 0, item15Strings, wxLB_SINGLE);
- item14->Add(m_propertyChoices, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxBoxSizer* item16 = new wxBoxSizer(wxVERTICAL);
- item14->Add(item16, 0, wxALIGN_CENTER_VERTICAL, 5);
-
- wxButton* item17 = new wxButton(item1, ID_PROPERTY_CHOICE_ADD, _("&Add..."), wxDefaultPosition, wxDefaultSize, 0);
- item16->Add(item17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxButton* item18 = new wxButton(item1, ID_PROPERTY_CHOICE_REMOVE, _("&Remove"), wxDefaultPosition, wxDefaultSize, 0);
- item16->Add(item18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
-
- wxStaticText* item19 = new wxStaticText(item1, wxID_STATIC, _("&Description:"), wxDefaultPosition, wxDefaultSize, 0);
- item3->Add(item19, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
-
- m_customPropertyDescription = new wxTextCtrl(item1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
- item3->Add(m_customPropertyDescription, 1, wxGROW|wxALL, 5);
-
- wxBoxSizer* item21 = new wxBoxSizer(wxHORIZONTAL);
- item3->Add(item21, 0, wxGROW|wxALL, 5);
-
- item21->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxButton* item23 = new wxButton(item1, wxID_OK);
- item21->Add(item23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxButton* item24 = new wxButton(item1, wxID_CANCEL);
- item21->Add(item24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxButton* item25 = new wxButton(item1, wxID_HELP);
- item21->Add(item25, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- GetSizer()->Fit(this);
- GetSizer()->SetSizeHints(this);
- Centre();
-////@end ctCustomPropertyDialog content construction
-
- // Add validators
- m_customPropertyName->SetValidator(wxGenericValidator(& m_name));
- m_customPrototype->SetValidator(wxGenericValidator(& m_type));
- m_customPropertyEditorType->SetValidator(wxGenericValidator(& m_editorType));
- m_customPropertyDescription->SetValidator(wxGenericValidator(& m_description));
-}
-
-/*!
- * Should we show tooltips?
- */
-
-bool ctCustomPropertyDialog::ShowToolTips()
-{
- return true;
-}
-
-/*!
- * Update event handler for ID_PROPERTY_CHOICES
- */
-
-void ctCustomPropertyDialog::OnUpdatePropertyChoices( wxUpdateUIEvent& event )
-{
- if(m_customPrototype)
- event.Enable( m_customPrototype->GetSelection() > -1 && m_customPrototype->GetStringSelection() == wxT("choice") );
-}
-
-/*!
- * Event handler for ID_PROPERTY_CHOICE_ADD
- */
-
-void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event) )
-{
- if(m_customPrototype)
- {
- if ( m_customPropertyEditorType->GetSelection() > -1 && m_customPropertyEditorType->GetStringSelection() == wxT("choice") )
- {
- wxString str = wxGetTextFromUser(_T("New choice"), _("Add choice"));
- if (!str.empty() && m_propertyChoices)
- {
- m_propertyChoices->Append(str);
- m_choices.Add(str);
- }
- }
- }
-}
-
-/*!
- * Update event handler for ID_PROPERTY_CHOICE_ADD
- */
-
-void ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event )
-{
- if(m_customPropertyEditorType)
- event.Enable( m_customPropertyEditorType->GetSelection() > -1 &&
- m_customPropertyEditorType->GetStringSelection() == wxT("choice") );
-}
-
-/*!
- * Event handler for ID_PROPERTY_CHOICE_REMOVE
- */
-
-void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& WXUNUSED(event) )
-{
- if (m_propertyChoices && m_propertyChoices->GetSelection() > -1)
- {
- m_propertyChoices->Delete(m_propertyChoices->GetSelection());
- m_choices.RemoveAt(m_propertyChoices->GetSelection());
- }
-}
-
-/*!
- * Update event handler for ID_PROPERTY_CHOICE_REMOVE
- */
-
-void ctCustomPropertyDialog::OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event )
-{
- if (m_customPropertyEditorType && m_propertyChoices)
- event.Enable( m_customPropertyEditorType->GetSelection() > -1 &&
- m_customPropertyEditorType->GetStringSelection() == wxT("choice") &&
- m_propertyChoices->GetSelection() > -1 );
-}
-
-void ctCustomPropertyDialog::SetChoices(const wxArrayString& choices)
-{
- size_t i, len = choices.GetCount();
- if (m_propertyChoices)
- for (i = 0; i < len; i++)
- m_propertyChoices->Append(m_choices[i]);
-}
diff --git a/utils/configtool/src/custompropertydialog.h b/utils/configtool/src/custompropertydialog.h
deleted file mode 100644
index bedbf3ec7c..0000000000
--- a/utils/configtool/src/custompropertydialog.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: custompropertydialog.h
-// Purpose: Custom property dialog
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-06-04
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _CUSTOMPROPERTYDIALOG_H_
-#define _CUSTOMPROPERTYDIALOG_H_
-
-/*!
- * Includes
- */
-
-////@begin includes
-////@end includes
-
-/*!
- * Forward declarations
- */
-
-////@begin forward declarations
-////@end forward declarations
-
-/*!
- * Control identifiers
- */
-
-////@begin control identifiers
-#define ID_CUSTOMPROPERTYDIALOG 10000
-#define ID_PROPERTY_CHOICES 10001
-#define ID_PROPERTY_CHOICE_ADD 10005
-#define ID_PROPERTY_CHOICE_REMOVE 10006
-////@end control identifiers
-
-/*!
- * ctCustomPropertyDialog class declaration
- */
-
-class ctCustomPropertyDialog: public wxDialog
-{
-public:
- /// Constructor
- ctCustomPropertyDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Edit Custom Property"));
-
- /// Creates the controls and sizers
- void CreateControls();
-
-////@begin ctCustomPropertyDialog event handler declarations
-
- /// Update event handler for ID_PROPERTY_CHOICES
- void OnUpdatePropertyChoices( wxUpdateUIEvent& event );
-
- /// Event handler for ID_PROPERTY_CHOICE_ADD
- void OnPropertyChoiceAdd( wxCommandEvent& event );
-
- /// Update event handler for ID_PROPERTY_CHOICE_ADD
- void OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event );
-
- /// Event handler for ID_PROPERTY_CHOICE_REMOVE
- void OnPropertyChoiceRemove( wxCommandEvent& event );
-
- /// Update event handler for ID_PROPERTY_CHOICE_REMOVE
- void OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event );
-
-////@end ctCustomPropertyDialog event handler declarations
-
-////@begin ctCustomPropertyDialog member function declarations
-
-////@end ctCustomPropertyDialog member function declarations
-
- /// Should we show tooltips?
- static bool ShowToolTips();
-
- void SetPropertyName(const wxString& name) { m_name = name; }
- wxString GetPropertyName() { return m_name; }
-
- void SetPropertyType(const wxString& type) { m_type = type; }
- wxString GetPropertyType() { return m_type; }
-
- void SetEditorType(const wxString& type) { m_editorType = type; }
- wxString GetEditorType() { return m_editorType; }
-
- void SetPropertyDescription(const wxString& descr) { m_description = descr; }
- wxString GetPropertyDescription() { return m_description; }
-
- void SetChoices(const wxArrayString& choices) ;
- wxArrayString GetChoices() { return m_choices; }
-
- DECLARE_CLASS( ctCustomPropertyDialog )
- DECLARE_EVENT_TABLE()
-
-protected:
- wxString m_name;
- wxString m_type;
- wxString m_description;
- wxString m_editorType;
- wxArrayString m_choices;
-
- // Dialog controls
- wxTextCtrl* m_customPropertyName;
- wxTextCtrl* m_customPropertyDescription;
- wxChoice* m_customPrototype;
- wxChoice* m_customPropertyEditorType;
- wxListBox* m_propertyChoices;
-};
-
-#endif
- // _CUSTOMPROPERTYDIALOG_H_
diff --git a/utils/configtool/src/htmlparser.cpp b/utils/configtool/src/htmlparser.cpp
deleted file mode 100644
index 1552216137..0000000000
--- a/utils/configtool/src/htmlparser.cpp
+++ /dev/null
@@ -1,984 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: htmlparser.cpp
-// Purpose: Simple HTML parser
-// Author: Julian Smart
-// Modified by:
-// Created: 2002-09-25
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#include "wx/wfstream.h"
-#include "wx/textfile.h"
-#include "wx/txtstrm.h"
-#include "htmlparser.h"
-
-/// Useful insertion operators for wxOutputStream.
-static wxOutputStream& operator <<(wxOutputStream& stream, const wxString& s)
-{
- wxTextOutputStream txt(stream); // This is to make sure the line-ending is native!
-
- txt.WriteString(s);
- return stream;
-}
-
-#if 0 // Gives warning because not used...
-static wxOutputStream& operator <<(wxOutputStream& stream, long l)
-{
- wxString str;
- str.Printf("%ld", l);
- return stream << str;
-}
-
-static wxOutputStream& operator <<(wxOutputStream& stream, const char c)
-{
- wxString str;
- str.Printf("%c", c);
- return stream << str;
-}
-#endif // 0
-
-/*
- * wxSimpleHtmlAttribute
- * Representation of an attribute
- */
-
-wxSimpleHtmlParser::wxSimpleHtmlParser()
-{
- m_topLevel = NULL;
- m_pos = 0;
-}
-
-
-wxSimpleHtmlParser::~wxSimpleHtmlParser()
-{
- Clear();
-}
-
-bool wxSimpleHtmlParser::ParseFile(const wxString& filename)
-{
- wxTextFile textFile;
-
- if (textFile.Open(filename))
- {
- wxString text;
- wxString line;
- int i;
- int count = textFile.GetLineCount();
- for (i = 0; i < count; i++)
- {
- if (i == 0)
- line = textFile.GetFirstLine();
- else
- line = textFile.GetNextLine();
-
- text += line;
- if (i != (count - 1))
- text += wxT("\n");
- }
-
-#if 0
- for ( line = textFile.GetFirstLine(); !textFile.Eof(); line = textFile.GetNextLine() )
- {
- text += line;
- if (!textFile.Eof())
- text += wxT("\n");
- }
-#endif
-
- return ParseString(text);
- }
- else
- return false;
-}
-
-bool wxSimpleHtmlParser::ParseString(const wxString& str)
-{
- Clear();
-
- m_pos = 0;
- m_text = str;
- m_length = str.Length();
-
- m_topLevel = new wxSimpleHtmlTag(wxT("TOPLEVEL"), wxSimpleHtmlTag_TopLevel);
-
- bool bResult = ParseHtml(m_topLevel);
-
- wxASSERT(bResult); // Failed to parse the TAGs.
- // Hint: Check if every open tag has a close tag!
-
- return bResult;
-}
-
-// Main recursive parsing function
-bool wxSimpleHtmlParser::ParseHtml(wxSimpleHtmlTag* parent)
-{
- if (!parent)
- return false;
-
- while (!Eof())
- {
- EatWhitespace();
- if (IsComment())
- {
- ParseComment();
- }
- else if (IsDirective())
- {
- wxSimpleHtmlTag* tag = ParseDirective();
- if (tag)
- parent->AppendTag(tag);
- }
- else if (IsXMLDeclaration())
- {
- wxSimpleHtmlTag* tag = ParseXMLDeclaration();
- if (tag)
- parent->AppendTag(tag);
- }
- else if (IsTagClose())
- {
- wxSimpleHtmlTag* tag = ParseTagClose();
- if (tag)
- {
- if (IsCloseTagNeeded(tag->GetName()))
- {
- if (!parent->GetParent())
- return false;
- parent->GetParent()->AppendTag(tag);
- return true;
- }
- else
- parent->AppendTag(tag);
- }
- }
- else if (IsTagStartBracket(GetChar(m_pos)))
- {
- wxSimpleHtmlTag* tag = ParseTagHeader();
- if (tag)
- parent->AppendTag(tag);
-
- if (IsCloseTagNeeded(tag->GetName()))
- {
- if (!ParseHtml(tag))
- return false; // Something didn't go ok, so don't continue.
- }
- }
- else
- {
- // Just a text string
- wxString text;
- ParseText(text);
-
- wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(wxT("TEXT"), wxSimpleHtmlTag_Text);
- tag->SetText(text);
- if(parent->GetParent())
- parent->GetParent()->AppendTag(tag);
- else
- parent->AppendTag(tag); // When this occurs it is probably the
- // empty lines at the end of the file...
- }
- }
- return true;
-}
-
-// Plain text, up until an angled bracket
-bool wxSimpleHtmlParser::ParseText(wxString& text)
-{
- while (!Eof() && GetChar(m_pos) != wxT('<'))
- {
- text += (wxChar)GetChar(m_pos);
- m_pos ++;
- }
- DecodeSpecialChars(text);
- return true;
-}
-
-wxSimpleHtmlTag* wxSimpleHtmlParser::ParseTagHeader()
-{
- if (IsTagStartBracket(GetChar(m_pos)))
- {
- m_pos ++;
- EatWhitespace();
-
- wxString word;
- ReadWord(word, true);
-
- EatWhitespace();
-
- wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_Open);
-
- ParseAttributes(tag);
-
- EatWhitespace();
-
- if (IsTagEndBracket(GetChar(m_pos)))
- m_pos ++;
-
- return tag;
- }
- else
- return NULL;
-}
-
-wxSimpleHtmlTag* wxSimpleHtmlParser::ParseTagClose()
-{
- Matches(wxT(""), true);
-
- EatWhitespace();
-
- wxString word;
- ReadWord(word, true);
-
- EatWhitespace();
- m_pos ++;
-
- wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_Close);
- return tag;
-}
-
-bool wxSimpleHtmlParser::ParseAttributes(wxSimpleHtmlTag* tag)
-{
- // Parse attributes of a tag header until we reach >
- while (!IsTagEndBracket(GetChar(m_pos)) && !Eof())
- {
- EatWhitespace();
-
- wxString attrName, attrValue;
-
- if (IsString())
- {
- ReadString(attrName, true);
- tag->AppendAttribute(attrName, wxEmptyString);
- }
- else if (IsNumeric(GetChar(m_pos)))
- {
- ReadNumber(attrName, true);
- tag->AppendAttribute(attrName, wxEmptyString);
- }
- else
- {
- // Try to read an attribute name/value pair, or at least a name
- // without the value
- ReadLiteral(attrName, true);
- EatWhitespace();
-
- if (GetChar(m_pos) == wxT('='))
- {
- m_pos ++;
- EatWhitespace();
-
- if (IsString())
- ReadString(attrValue, true);
- else if (!Eof() && !IsTagEndBracket(GetChar(m_pos)))
- ReadLiteral(attrValue, true);
- }
- if (!attrName.IsEmpty())
- tag->AppendAttribute(attrName, attrValue);
- }
- }
- return true;
-}
-
-// e.g.
-wxSimpleHtmlTag* wxSimpleHtmlParser::ParseDirective()
-{
- Matches(wxT("
-wxSimpleHtmlTag* wxSimpleHtmlParser::ParseXMLDeclaration()
-{
- Matches(wxT(""), true);
-
- EatWhitespace();
-
- wxString word;
- ReadWord(word, true);
-
- EatWhitespace();
-
- wxSimpleHtmlTag* tag = new wxSimpleHtmlTag(word, wxSimpleHtmlTag_XMLDeclaration);
-
- ParseAttributes(tag);
-
- EatWhitespace();
-
- if (IsTagEndBracket(GetChar(m_pos)))
- m_pos ++;
-
- return tag;
-}
-
-bool wxSimpleHtmlParser::ParseComment()
-{
- // Eat the comment tag start
- Matches(wxT(""), true))
- {
- m_pos ++;
- }
-
- return true;
-}
-
-bool wxSimpleHtmlParser::EatWhitespace()
-{
- while (!Eof() && IsWhitespace(GetChar(m_pos)))
- m_pos ++;
- return true;
-}
-
-bool wxSimpleHtmlParser::EatWhitespace(int& pos)
-{
- while (!Eof(pos) && IsWhitespace(GetChar(pos)))
- pos ++;
- return true;
-}
-
-bool wxSimpleHtmlParser::ReadString(wxString& str, bool eatIt)
-{
- int pos = m_pos;
- if (GetChar(pos) == (int) '"')
- {
- pos ++;
- while (!Eof(pos) && GetChar(pos) != (int) '"')
- {
- // TODO: how are quotes escaped in HTML?
- str += (wxChar) GetChar(pos);
- pos ++;
- }
- if (GetChar(pos) == (int) '"')
- pos ++;
- if (eatIt)
- m_pos = pos;
- DecodeSpecialChars(str);
- return true;
- }
- else
- return false;
-}
-
-bool wxSimpleHtmlParser::ReadWord(wxString& str, bool eatIt)
-{
- int pos = m_pos;
-
- if (!IsAlpha(GetChar(pos)))
- return false;
-
- str += (wxChar) GetChar(pos) ;
- pos ++;
-
- while (!Eof(pos) && IsWordChar(GetChar(pos)))
- {
- str += (wxChar) GetChar(pos);
- pos ++;
- }
- if (eatIt)
- m_pos = pos;
- DecodeSpecialChars(str);
- return true;
-}
-
-bool wxSimpleHtmlParser::ReadNumber(wxString& str, bool eatIt)
-{
- int pos = m_pos;
-
- if (!IsNumeric(GetChar(pos)))
- return false;
-
- str += (wxChar) GetChar(pos) ;
- pos ++;
-
- while (!Eof(pos) && IsNumeric(GetChar(pos)))
- {
- str += (wxChar) GetChar(pos);
- pos ++;
- }
- if (eatIt)
- m_pos = pos;
- DecodeSpecialChars(str);
- return true;
-}
-
-// Could be number, string, whatever, but read up until whitespace or end of tag (but not a quoted string)
-bool wxSimpleHtmlParser::ReadLiteral(wxString& str, bool eatIt)
-{
- int pos = m_pos;
-
- while (!Eof(pos) && !IsWhitespace(GetChar(pos)) && !IsTagEndBracket(GetChar(pos)) && GetChar(pos) != wxT('='))
- {
- str += (wxChar)GetChar(pos);
- pos ++;
- }
- if (eatIt)
- m_pos = pos;
- DecodeSpecialChars(str);
- return true;
-}
-
-bool wxSimpleHtmlParser::IsComment()
-{
- return Matches(wxT("