mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 11:21:08 -10:00
Compare commits
372
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e117097e1f | ||
|
|
95d855ebdd | ||
|
|
362fb88f27 | ||
|
|
9c53f50c43 | ||
|
|
075d5711fa | ||
|
|
c5d359670a | ||
|
|
ee457822fa | ||
|
|
0589d7ddf5 | ||
|
|
2d8310224e | ||
|
|
6bf7d13701 | ||
|
|
f2eca844d4 | ||
|
|
42b162613a | ||
|
|
c02fd518fa | ||
|
|
46ba96ab4c | ||
|
|
245f79b651 | ||
|
|
325b17c5e6 | ||
|
|
b77b0e57c7 | ||
|
|
5817f62c06 | ||
|
|
4d846f3217 | ||
|
|
53ae02f613 | ||
|
|
18b14d2b33 | ||
|
|
f56c7b32e9 | ||
|
|
65a6ec3240 | ||
|
|
373c459bb6 | ||
|
|
384f8eb073 | ||
|
|
ecb560796d | ||
|
|
b94fed666b | ||
|
|
b54f5a8c31 | ||
|
|
cde9923d53 | ||
|
|
a4dd2eb9ab | ||
|
|
de053ca593 | ||
|
|
56afb5aa4f | ||
|
|
448d7c2cd7 | ||
|
|
96c4a7d4b9 | ||
|
|
e83ed4dbed | ||
|
|
e4a117cd9a | ||
|
|
c791106c25 | ||
|
|
2a97314f8d | ||
|
|
ed54a1b761 | ||
|
|
7e1ac93383 | ||
|
|
2fb9b64e73 | ||
|
|
1a28da3faf | ||
|
|
167914a79b | ||
|
|
d33e20924b | ||
|
|
beb890595c | ||
|
|
13f9cb3434 | ||
|
|
85432ce24a | ||
|
|
b9a946161c | ||
|
|
3674150432 | ||
|
|
b7db72d0e5 | ||
|
|
7cd4a28f4a | ||
|
|
5e858b9c01 | ||
|
|
653096d4d3 | ||
|
|
596a9f9abf | ||
|
|
86b66e974e | ||
|
|
a30e7b6859 | ||
|
|
b9dd5065b4 | ||
|
|
53ea73491e | ||
|
|
676e17ac4b | ||
|
|
742bd55cc3 | ||
|
|
8125642105 | ||
|
|
cac4a6fa87 | ||
|
|
808a676350 | ||
|
|
73e67e1db3 | ||
|
|
0bef4ef894 | ||
|
|
493446ce04 | ||
|
|
9efbf70813 | ||
|
|
4994a0b289 | ||
|
|
cb9600b9b9 | ||
|
|
34c7e44150 | ||
|
|
4cd4569ec6 | ||
|
|
93b9e20e3c | ||
|
|
28021d9e5c | ||
|
|
d04c85fc8e | ||
|
|
beebac4e2e | ||
|
|
018c430733 | ||
|
|
723a933e9c | ||
|
|
8cec72a31f | ||
|
|
ed3a8e8e12 | ||
|
|
0eee593d3a | ||
|
|
a0b8967951 | ||
|
|
4b5cb5b7ec | ||
|
|
7c9abd6ea4 | ||
|
|
4b791f4ebf | ||
|
|
e61f5a6c0b | ||
|
|
4576f262ca | ||
|
|
44f49f7e6d | ||
|
|
06de999787 | ||
|
|
e95d116ee3 | ||
|
|
24ff4f1c36 | ||
|
|
8ecd99c009 | ||
|
|
667266be44 | ||
|
|
71b2fac370 | ||
|
|
94782a9675 | ||
|
|
58f0695e8b | ||
|
|
a0cd75d310 | ||
|
|
5a6bb10f5c | ||
|
|
cc104efec3 | ||
|
|
f40f665d9b | ||
|
|
8e2e6c1909 | ||
|
|
8980b35c17 | ||
|
|
8325c4c78e | ||
|
|
e186bdfb4b | ||
|
|
208de0f8ac | ||
|
|
1eaf76f83a | ||
|
|
84ad52dda7 | ||
|
|
3afcd622ea | ||
|
|
ecf4d5fec4 | ||
|
|
191a0b7c13 | ||
|
|
b428cee93f | ||
|
|
75d83b4784 | ||
|
|
33a4ce27ab | ||
|
|
b7fbf894c5 | ||
|
|
733791ff24 | ||
|
|
462f7da2b9 | ||
|
|
9b58fb9ab7 | ||
|
|
1c8879f557 | ||
|
|
17da99ccab | ||
|
|
c64179faa5 | ||
|
|
6d32218cb8 | ||
|
|
6262c11cfc | ||
|
|
412d92d596 | ||
|
|
bfcdea1305 | ||
|
|
ab453faffe | ||
|
|
62bf373fea | ||
|
|
4136d5da76 | ||
|
|
9c81677a33 | ||
|
|
fc363fc7a6 | ||
|
|
c221d6c0e8 | ||
|
|
47932d265a | ||
|
|
e2c37e98bf | ||
|
|
6eedd08ed8 | ||
|
|
060406f25e | ||
|
|
dc60cf7ea6 | ||
|
|
24575d5e57 | ||
|
|
6f6a2135b5 | ||
|
|
06c53dfc80 | ||
|
|
fdcba04ccc | ||
|
|
2ce934fbac | ||
|
|
4b6092b945 | ||
|
|
c35c98a888 | ||
|
|
1d05f4019d | ||
|
|
2c90f8215b | ||
|
|
741b3708a6 | ||
|
|
88d78a139c | ||
|
|
9ecf430d4a | ||
|
|
66fa2508f9 | ||
|
|
a7d6f5e17f | ||
|
|
6b8412c1d3 | ||
|
|
2641cfa52a | ||
|
|
4a05d3d046 | ||
|
|
dda14a7141 | ||
|
|
9dbe7163c6 | ||
|
|
4da72ac87d | ||
|
|
965210d362 | ||
|
|
a2831a6759 | ||
|
|
ce7703f9ef | ||
|
|
e611b35bc9 | ||
|
|
6ae3bec0b6 | ||
|
|
e7a8f19764 | ||
|
|
e7c42af958 | ||
|
|
a0d26a1ecc | ||
|
|
23848fcfc6 | ||
|
|
8744beb65c | ||
|
|
9b07470957 | ||
|
|
7ee3c559e3 | ||
|
|
dc5b0de65a | ||
|
|
d5a9aafee6 | ||
|
|
e4ab1fe02c | ||
|
|
ad05561854 | ||
|
|
be268ce1fa | ||
|
|
3c4a0853ca | ||
|
|
0c1e02a5fd | ||
|
|
0436f3c228 | ||
|
|
8eecfbc54b | ||
|
|
a2470d9b12 | ||
|
|
9abbb9bfa3 | ||
|
|
50c4040639 | ||
|
|
438bc0e3aa | ||
|
|
ed6dfed6f5 | ||
|
|
9ddad195c6 | ||
|
|
29444d0002 | ||
|
|
079933816f | ||
|
|
950d95d519 | ||
|
|
2e21360c50 | ||
|
|
8943e7e0d6 | ||
|
|
cc3db58df7 | ||
|
|
7e1e70827a | ||
|
|
466e31790f | ||
|
|
5405ae9046 | ||
|
|
d7b1a66b94 | ||
|
|
7b06e01c8f | ||
|
|
efb68a566b | ||
|
|
1ea3cc4cf0 | ||
|
|
2387e7270d | ||
|
|
dd49afdaf1 | ||
|
|
59b3a649d5 | ||
|
|
c5fd486b84 | ||
|
|
637aa4c949 | ||
|
|
5db35126ad | ||
|
|
7b270fecd9 | ||
|
|
4e6fe443a2 | ||
|
|
b2882b35e8 | ||
|
|
1c482a505c | ||
|
|
d14e5c26e2 | ||
|
|
de071f89a0 | ||
|
|
2ddeac257f | ||
|
|
00c96e5ee1 | ||
|
|
939f5b706d | ||
|
|
a549de0c98 | ||
|
|
e4767b2ed7 | ||
|
|
e336bccc7a | ||
|
|
5b5f567690 | ||
|
|
46184895e1 | ||
|
|
8b4bde4713 | ||
|
|
8e21b187db | ||
|
|
2557c91607 | ||
|
|
480b7f5d7b | ||
|
|
6629632a6a | ||
|
|
9f99215160 | ||
|
|
278f836939 | ||
|
|
e2bac9878f | ||
|
|
f275b6e485 | ||
|
|
bf926e9d96 | ||
|
|
6371e5446d | ||
|
|
e6553234a6 | ||
|
|
f85a872195 | ||
|
|
bcd23c2ce3 | ||
|
|
f243f57580 | ||
|
|
2eab3e93ec | ||
|
|
2f5dd747db | ||
|
|
9b21552888 | ||
|
|
130cc0265e | ||
|
|
1aa65b49b5 | ||
|
|
3d4af0a3ca | ||
|
|
34a36c6021 | ||
|
|
f544ec6a5a | ||
|
|
dadc02c527 | ||
|
|
b1d2757f8e | ||
|
|
87f3f3d032 | ||
|
|
a93743339f | ||
|
|
7faba06720 | ||
|
|
652318a44d | ||
|
|
724f0a6d4e | ||
|
|
5ebc3a5956 | ||
|
|
76cb00959c | ||
|
|
3397f96efb | ||
|
|
8c24850ae5 | ||
|
|
95974cdb7a | ||
|
|
8722a70b7a | ||
|
|
e6e4288c5b | ||
|
|
5bbfe2090e | ||
|
|
f9427d49b1 | ||
|
|
8561c8042c | ||
|
|
d9334ab132 | ||
|
|
27810cca75 | ||
|
|
38342a2028 | ||
|
|
ab969071df | ||
|
|
121aafc036 | ||
|
|
01443d56f9 | ||
|
|
d349d3cf66 | ||
|
|
508eeb5266 | ||
|
|
9698eebc3a | ||
|
|
bf0c63bdaf | ||
|
|
1f4d704c06 | ||
|
|
0c2a768d04 | ||
|
|
d4b59a0987 | ||
|
|
d66bd40a5e | ||
|
|
8ecd5784fc | ||
|
|
864017ae96 | ||
|
|
9fa61327c6 | ||
|
|
ac33be5c4f | ||
|
|
022cc2489d | ||
|
|
c9cd06e98c | ||
|
|
d3c3b9817a | ||
|
|
6574c4842c | ||
|
|
35af91a654 | ||
|
|
924eaae1b1 | ||
|
|
5c0653cc3b | ||
|
|
9b10d5247d | ||
|
|
eed9f45d27 | ||
|
|
e938f4fad3 | ||
|
|
47eb68cddb | ||
|
|
db68333eb7 | ||
|
|
3fd99b981e | ||
|
|
d59ab90071 | ||
|
|
8a7077c3fd | ||
|
|
fdb3f32aff | ||
|
|
bf91fdc886 | ||
|
|
afabc945e6 | ||
|
|
2d6f641629 | ||
|
|
cbbb130a5f | ||
|
|
47b637d576 | ||
|
|
82d4d8a64c | ||
|
|
e29ff8407d | ||
|
|
b2225d42ea | ||
|
|
5e95510e6e | ||
|
|
a583e2b947 | ||
|
|
a84f9e8fa3 | ||
|
|
c10bca60c9 | ||
|
|
6ddc460530 | ||
|
|
00f6a73eb1 | ||
|
|
37b08459d4 | ||
|
|
83ceed4489 | ||
|
|
bcd3aec7e5 | ||
|
|
e4ce9895a7 | ||
|
|
542d8e5b0e | ||
|
|
8a6f210585 | ||
|
|
989abab5fb | ||
|
|
e01b93cd98 | ||
|
|
1b19fbcc37 | ||
|
|
e46bc42fa8 | ||
|
|
eb6253ba03 | ||
|
|
3ed4f50114 | ||
|
|
427d699aa3 | ||
|
|
4e0d8f27ba | ||
|
|
1ee3e71937 | ||
|
|
988168e2c3 | ||
|
|
dbacc958c8 | ||
|
|
cc46bbf965 | ||
|
|
089e8de54b | ||
|
|
57a84b0eeb | ||
|
|
78a2769fe2 | ||
|
|
986ce54e81 | ||
|
|
4a7de092d4 | ||
|
|
bf76a83964 | ||
|
|
510576a508 | ||
|
|
75639f296f | ||
|
|
e7d5ef2c30 | ||
|
|
4d30c11e0c | ||
|
|
d3a81ce711 | ||
|
|
4170fd8523 | ||
|
|
73545d7a30 | ||
|
|
47ecadbebb | ||
|
|
b0b8b6fbd8 | ||
|
|
a5c3f5c622 | ||
|
|
b7f7a9261e | ||
|
|
ebe3ff9854 | ||
|
|
b4b1af268b | ||
|
|
37b6e49f7f | ||
|
|
766c997480 | ||
|
|
b79c922ef9 | ||
|
|
524ecb2f30 | ||
|
|
70ff2308c0 | ||
|
|
e19a0cdd3f | ||
|
|
ae1b7774cd | ||
|
|
579a15b47a | ||
|
|
d25226e6f7 | ||
|
|
9fb03707ab | ||
|
|
f82536d160 | ||
|
|
908a4b9c8d | ||
|
|
e2bf3c46d7 | ||
|
|
eb6fd2eb23 | ||
|
|
464026f902 | ||
|
|
3e9be851d4 | ||
|
|
35439fa111 | ||
|
|
822dba4a3e | ||
|
|
8d9bebe7fd | ||
|
|
452b871488 | ||
|
|
c3b5d44422 | ||
|
|
fcb0a02c88 | ||
|
|
b43ae3c971 | ||
|
|
f708641b8d | ||
|
|
4e10c1ab81 | ||
|
|
da3f57c214 | ||
|
|
48dccee80f | ||
|
|
1faa706804 | ||
|
|
38e2ec8469 | ||
|
|
57dbdb3e42 | ||
|
|
e83157f0bf | ||
|
|
6bc712404f | ||
|
|
31349722b8 |
No files matched your search
@@ -1,95 +1,39 @@
|
||||
2008-08-28 Zoltan Varga <vargaz@gmail.com>
|
||||
2008-08-28 Geoff Norton <gnorton@novell.com>
|
||||
|
||||
* scripts/Makefile.am (scripts_2_0): Add gacutil2.
|
||||
* build-iphone.sh: iPhone lies about HAVE_MMAP as well.
|
||||
|
||||
* scripts/gacutil2: New file.
|
||||
2008-08-26 Geoff Norton <[email protected]>
|
||||
|
||||
2008-08-22 Jb Evain <[email protected]>
|
||||
* build-iphone.sh: Update build-iphone to not wget old inssel's, and build
|
||||
out of the box with teh current SDK.
|
||||
|
||||
* data/wcf.pc.in
|
||||
* data/Makefile.am
|
||||
* configure.in: add a new wcf.pc for assemblies recently moved
|
||||
from olive to mcs.
|
||||
|
||||
2008-08-12 Bill Holmes <[email protected]>
|
||||
2008-08-13 Bill Holmes <[email protected]>
|
||||
|
||||
* winconfig.h: Updating the config file for MSVC builds to match
|
||||
the config file used when compiling with gcc in Cygwin.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-08-09 Rodrigo Kumpera <[email protected]>
|
||||
|
||||
* docs/generic-sharing: Some updates from an irc talk with Mark.
|
||||
|
||||
2008-08-06 Zoltan Varga <[email protected]>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add dtrace-prelink.sh and build-mingw32.sh.
|
||||
|
||||
* scripts/Makefile.am (EXTRA_DIST): Add patch-quiet.sh.
|
||||
|
||||
2008-08-05 Marek Habersack <[email protected]>
|
||||
|
||||
* configure.in: use the PKG_CONFIG_PATH only when cross-compiling.
|
||||
|
||||
2008-08-05 Marek Habersack <[email protected]>
|
||||
|
||||
* configure.in: added support for cross-compilation
|
||||
|
||||
2008-08-05 Marek Habersack <[email protected]>
|
||||
|
||||
* build-mingw32.sh: added a script to build Mono for Windows on a
|
||||
Linux host using mingw.
|
||||
|
||||
2008-08-05 Marek Habersack <[email protected]>
|
||||
|
||||
* scripts/Makefile.am: added support for cross-compilation,
|
||||
including .bat generation for windows targets.
|
||||
|
||||
2008-08-05 Marek Habersack <[email protected]>
|
||||
|
||||
* scripts/smcs.bat.in, scripts/script.bat.in,
|
||||
scripts/script_umask.bat.in: added .bat templates.
|
||||
|
||||
2008-08-05 Marek Habersack <[email protected]>
|
||||
|
||||
* runtime/Makefile.am: mingw cross-compilation support.
|
||||
|
||||
2008-08-05 Andreas Färber <[email protected]>
|
||||
|
||||
* autogen.sh: Suppress arguments warning for NOCONFIGURE.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-08-02 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Enable dtrace by default on platforms which support it.
|
||||
|
||||
2008-07-27 Zoltan Varga <[email protected]>
|
||||
|
||||
* scripts/patch-quiet.sh: Make the libtool --quiet flag configurable by
|
||||
V=1 as well.
|
||||
|
||||
2008-07-24 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Patch libtool to avoid the
|
||||
'copying selected object files ...' messages.
|
||||
|
||||
* configure.in: Invoke patch-quiet.sh using AC_CONFIG_COMMANDS so it
|
||||
runs during a reconfigure too.
|
||||
|
||||
Backported from trunk.
|
||||
|
||||
2008-07-24 Rodrigo Kumpera <[email protected]>
|
||||
|
||||
* configure.in: Change USED_GC_NAME to show if parallel mark is used.
|
||||
This is shown in mono --version.
|
||||
|
||||
2008-07-22 Mark Probst <[email protected]>
|
||||
|
||||
* configure.in: New configure option (--with-malloc-mempools) to
|
||||
make mempools use malloc for every single allocation, which makes
|
||||
it easier to use debugging/profiling tools like Valgrind.
|
||||
|
||||
2008-07-21 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Invoke patch-quiet.sh using AC_CONFIG_COMMANDS so it
|
||||
runs during a reconfigure too.
|
||||
Backported from trunk.
|
||||
|
||||
2008-07-13 Zoltan Varga <[email protected]>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ For comments, corrections and updates, please contact [email protected]
|
||||
Contributions for other modules should be under the same license
|
||||
terms as the rest of the module, or under MIT X11 terms.
|
||||
|
||||
If you need further information, please contact [email protected]
|
||||
If you ned further information, please contact [email protected]
|
||||
|
||||
* The Modules
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ SUBDIRS = $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support docs data ru
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = libgc $(eglib_dir) mono ikvm-native support docs data runtime scripts man samples web tools msvc
|
||||
|
||||
EXTRA_DIST= mono-uninstalled.pc.in dtrace-prelink.sh build-mingw32.sh LICENSE
|
||||
EXTRA_DIST= mono-uninstalled.pc.in LICENSE
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test x$NOCONFIGURE = x && test -z "$*"; then
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
|
||||
+47
-10
@@ -2,26 +2,63 @@
|
||||
ASPEN_ROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||
ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS2.0.sdk/
|
||||
|
||||
export PATH=$ASPEN_ROOT/usr/bin:$PATH
|
||||
ORIG_PATH=$PATH
|
||||
GLIB_FLAGS=`pkg-config --cflags --libs glib-2.0`
|
||||
|
||||
export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
|
||||
export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
|
||||
export CC=arm-apple-darwin9-gcc-4.0.1
|
||||
export CXX=arm-apple-darwin9-g++-4.0.1
|
||||
export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
|
||||
export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
|
||||
export LD=$CC
|
||||
export LDFLAGS=-Wl,-syslibroot,$ASPEN_SDK
|
||||
if [ -z "$GLIB_FLAGS" ]; then
|
||||
echo "pkg-config could not locate glib-2.0 needed for the monoburg step"
|
||||
exit;
|
||||
fi
|
||||
|
||||
setenv () {
|
||||
export PATH=$ASPEN_ROOT/usr/bin:$PATH
|
||||
|
||||
export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
|
||||
export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
|
||||
export CC=arm-apple-darwin9-gcc-4.0.1
|
||||
export CXX=arm-apple-darwin9-g++-4.0.1
|
||||
export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
|
||||
export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
|
||||
export LD=$CC
|
||||
export LDFLAGS="-liconv -Wl,-syslibroot,$ASPEN_SDK"
|
||||
}
|
||||
|
||||
unsetenv () {
|
||||
export PATH=$ORIG_PATH
|
||||
|
||||
unset C_INCLUDE_PATH
|
||||
unset CPLUS_INCLUDE_PATH
|
||||
unset CC
|
||||
unset CXX
|
||||
unset CPP
|
||||
unset CXXPP
|
||||
unset LD
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
export mono_cv_uscore=yes
|
||||
export cv_mono_sizeof_sunpath=104
|
||||
export ac_cv_func_posix_getpwuid_r=yes
|
||||
export ac_cv_func_backtrace_symbols=no
|
||||
|
||||
|
||||
setenv
|
||||
|
||||
pushd eglib
|
||||
./autogen.sh --host=arm-apple-darwin9
|
||||
popd
|
||||
|
||||
./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded --with-gc=none $@
|
||||
./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded $@
|
||||
perl -pi -e 's/MONO_SIZEOF_SUNPATH 0/MONO_SIZEOF_SUNPATH 104/' config.h
|
||||
perl -pi -e 's/#define HAVE_FINITE 1//' config.h
|
||||
perl -pi -e 's/#define HAVE_MMAP 1//' config.h
|
||||
make
|
||||
|
||||
unsetenv
|
||||
pushd mono/monoburg
|
||||
/usr/bin/gcc -o monoburg ./monoburg.c parser.c -I../.. -pthread -lm $GLIB_FLAGS
|
||||
make
|
||||
popd
|
||||
|
||||
setenv
|
||||
make
|
||||
@@ -1,110 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
CURDIR="`pwd`"
|
||||
CROSS_DIR=${1:-/opt/cross/}
|
||||
MINGW=${1:-i386-mingw32msvc}
|
||||
CROSS_BIN_DIR="$CROSS_DIR/bin"
|
||||
CROSS_DLL_DIR="$CROSS_DIR/$MINGW/bin"
|
||||
CROSS_PKG_CONFIG_DIR=$CROSS_DIR/$MINGW/lib/pkgconfig
|
||||
COPY_DLLS="libgio*.dll libglib*.dll libgmodule*.dll libgthread*.dll libgobject*.dll"
|
||||
PATH=$CROSS_BIN_DIR:$PATH
|
||||
INSTALL_DESTDIR="$CURDIR/mono-win32"
|
||||
PROFILES="default net_2_0 net_2_1 net_3_5"
|
||||
|
||||
export PATH
|
||||
|
||||
function setup ()
|
||||
{
|
||||
if [ -d ./.git/svn ]; then
|
||||
SVN_INFO='git svn info'
|
||||
elif [ -d ./.svn ]; then
|
||||
SVN_INFO='svn info'
|
||||
else
|
||||
SVN_INFO=""
|
||||
fi
|
||||
|
||||
if [ -n "$SVN_INFO" ]; then
|
||||
MONO_SVN_REVISION=`$SVN_INFO | grep Revision | sed 's/.*: //'`
|
||||
MONO_BRANCH=`$SVN_INFO | grep URL | sed -e 's;.*source/;;g' -e 's;/mono;;g'`
|
||||
else
|
||||
MONO_SVN_REVISION="rUNKNOWN"
|
||||
MONO_BRANCH="tarball"
|
||||
fi
|
||||
|
||||
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
|
||||
MONO_RELEASE="$MONO_VERSION-$MONO_BRANCH-r$MONO_SVN_REVISION"
|
||||
MONO_PREFIX="/mono-$MONO_RELEASE"
|
||||
|
||||
NOCONFIGURE=yes
|
||||
export NOCONFIGURE
|
||||
|
||||
echo Mono Win32 installation prefix: $MONO_PREFIX
|
||||
}
|
||||
|
||||
function build ()
|
||||
{
|
||||
./autogen.sh
|
||||
|
||||
if [ -f ./Makefile ]; then
|
||||
make distclean
|
||||
fi
|
||||
|
||||
if [ ! -d "$CURDIR/build-cross-windows" ]; then
|
||||
mkdir "$CURDIR/build-cross-windows"
|
||||
fi
|
||||
|
||||
cd "$CURDIR/build-cross-windows"
|
||||
rm -rf *
|
||||
../configure --prefix=$MONO_PREFIX --with-crosspkgdir=$CROSS_PKG_CONFIG_DIR --target=$MINGW --host=$MINGW --enable-parallel-mark --program-transform-name=""
|
||||
make
|
||||
cd "$CURDIR"
|
||||
|
||||
if [ ! -d "$CURDIR/build-cross-windows-mcs" ]; then
|
||||
mkdir "$CURDIR/build-cross-windows-mcs"
|
||||
fi
|
||||
cd "$CURDIR/build-cross-windows-mcs"
|
||||
rm -rf *
|
||||
../configure --prefix=$MONO_PREFIX --enable-parallel-mark
|
||||
make
|
||||
}
|
||||
|
||||
function doinstall ()
|
||||
{
|
||||
if [ -d "$INSTALL_DIR" ]; then
|
||||
rm -rf "$INSTALL_DIR"
|
||||
fi
|
||||
cd "$CURDIR/build-cross-windows"
|
||||
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
|
||||
|
||||
cd "$CURDIR/../mcs/mcs"
|
||||
|
||||
for p in $PROFILES; do
|
||||
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
|
||||
done
|
||||
|
||||
cd "$CURDIR/../mcs/class"
|
||||
for p in $PROFILES; do
|
||||
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
|
||||
done
|
||||
|
||||
cd "$CURDIR/../mcs/tools"
|
||||
for p in $PROFILES; do
|
||||
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
|
||||
done
|
||||
|
||||
cd "$CURDIR/mono-win32"
|
||||
for dll in $COPY_DLLS; do
|
||||
cp -ap "$CROSS_DLL_DIR"/$dll "$INSTALL_DESTDIR/$MONO_PREFIX/bin"
|
||||
done
|
||||
|
||||
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
|
||||
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
|
||||
|
||||
}
|
||||
|
||||
pushd . > /dev/null
|
||||
|
||||
setup
|
||||
build
|
||||
doinstall
|
||||
|
||||
popd > /dev/null
|
||||
+12
-48
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
|
||||
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,2.1)
|
||||
AM_INIT_AUTOMAKE(mono,2.0)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
API_VER=1.0
|
||||
@@ -65,7 +65,6 @@ need_link_unlink=no
|
||||
# Thread configuration inspired by sleepycat's db
|
||||
AC_MSG_CHECKING([host platform characteristics])
|
||||
libgc_threads=no
|
||||
has_dtrace=no
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
platform_win32=yes
|
||||
@@ -78,8 +77,8 @@ case "$host" in
|
||||
HOST_CC="gcc"
|
||||
# Windows 2000 is required that includes Internet Explorer 5.01
|
||||
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
|
||||
libmono_cflags="-mno-cygwin -mms-bitfields -mwindows"
|
||||
libmono_ldflags="-mno-cygwin -mms-bitfields -mwindows"
|
||||
libmono_cflags="-mno-cygwin"
|
||||
libmono_ldflags="-mno-cygwin"
|
||||
libdl=
|
||||
libgc_threads=win32
|
||||
gc_default=included
|
||||
@@ -225,7 +224,6 @@ case "$host" in
|
||||
libgc_threads=pthreads
|
||||
# This doesn't seem to work on solaris/x86, but the configure test runs
|
||||
with_tls=pthread
|
||||
has_dtrace=yes
|
||||
;;
|
||||
*-*-darwin*)
|
||||
platform_win32=no
|
||||
@@ -240,7 +238,6 @@ case "$host" in
|
||||
no_version_script=yes
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
has_dtrace=yes
|
||||
if test "x$cross_compiling" = "xyes"; then
|
||||
has_broken_apple_cpp=yes
|
||||
fi
|
||||
@@ -296,7 +293,6 @@ AC_SUBST(HOST_CC)
|
||||
AC_SUBST(BUILD_EXEEXT)
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
|
||||
AM_CONDITIONAL(USE_BATCH_FILES, [test x$platform_win32 = xyes -a x$cross_compiling = xyes])
|
||||
|
||||
# Set STDC_HEADERS
|
||||
AC_HEADER_STDC
|
||||
@@ -495,17 +491,9 @@ embedded)
|
||||
AC_CONFIG_SUBDIRS(eglib)
|
||||
;;
|
||||
system)
|
||||
if test "x$cross_compiling" = "xyes"; then
|
||||
pkg_config_path="$PKG_CONFIG_PATH"
|
||||
unset PKG_CONFIG_PATH
|
||||
fi
|
||||
BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
|
||||
BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
|
||||
if test "x$cross_compiling" = "xyes"; then
|
||||
PKG_CONFIG_PATH=$pkg_config_path
|
||||
export PKG_CONFIG_PATH
|
||||
fi
|
||||
|
||||
|
||||
## Versions of dependencies
|
||||
GLIB_REQUIRED_VERSION=1.3.11
|
||||
|
||||
@@ -1698,26 +1686,16 @@ if test "x$enable_big_arrays" = "xyes" ; then
|
||||
AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
|
||||
fi
|
||||
|
||||
dnl **************
|
||||
dnl *** DTRACE ***
|
||||
dnl **************
|
||||
|
||||
AC_ARG_ENABLE(dtrace,[ --enable-dtrace Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=$has_dtrace)
|
||||
|
||||
if test "x$enable_dtrace" = "xyes"; then
|
||||
if test "x$has_dtrace" = "xno"; then
|
||||
AC_MSG_ERROR([DTrace probes are not supported on this platform.])
|
||||
fi
|
||||
AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
|
||||
if test "x$DTRACE" = "xno"; then
|
||||
AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.])
|
||||
enable_dtrace=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if DTrace support is requested])
|
||||
AC_ARG_ENABLE(dtrace,[ --enable-dtrace Enable DTrace probes], enable_dtrace=$enableval, enable_dtrace=no)
|
||||
AC_MSG_RESULT($enable_dtrace)
|
||||
dtrace_g=no
|
||||
if test "x$enable_dtrace" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_DTRACE, 1, [Enable DTrace probes])
|
||||
AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
|
||||
if test "x$DTRACE" = "xno"; then
|
||||
AC_MSG_FAILURE([DTrace requested but not found])
|
||||
fi
|
||||
DTRACEFLAGS=
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
case "$host" in
|
||||
@@ -2136,14 +2114,6 @@ AC_ARG_WITH(oprofile,[ --with-oprofile=no,<path> Enable oprofile support (defa
|
||||
fi
|
||||
])
|
||||
|
||||
MALLOC_MEMPOOLS=no
|
||||
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to NO)],[
|
||||
if test x$with_malloc_mempools = xyes; then
|
||||
MALLOC_MEMPOOLS=yes
|
||||
AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
|
||||
fi
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
|
||||
AC_SUBST(OPROFILE_CFLAGS)
|
||||
AC_SUBST(OPROFILE_LIBS)
|
||||
@@ -2197,11 +2167,7 @@ AC_SUBST(mono_runtime)
|
||||
|
||||
mono_cfg_root=$mono_build_root/runtime
|
||||
if test x$platform_win32 = xyes; then
|
||||
if test "x$cross_compiling" = "xno"; then
|
||||
mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
|
||||
else
|
||||
mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\\'`\\etc
|
||||
fi
|
||||
mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
|
||||
else
|
||||
mono_cfg_dir=$mono_cfg_root/etc
|
||||
fi
|
||||
@@ -2339,7 +2305,6 @@ data/mono.pc
|
||||
data/mono-cairo.pc
|
||||
data/dotnet.pc
|
||||
data/dotnet35.pc
|
||||
data/wcf.pc
|
||||
data/cecil.pc
|
||||
data/smcs.pc
|
||||
samples/Makefile
|
||||
@@ -2439,7 +2404,6 @@ echo "
|
||||
zlib: $zlib_msg
|
||||
oprofile: $OPROFILE
|
||||
BigArrays: $enable_big_arrays
|
||||
DTrace: $enable_dtrace
|
||||
$disabled
|
||||
|
||||
"
|
||||
|
||||
+4
-4
@@ -5,22 +5,22 @@ monodir = $(sysconfdir)/mono
|
||||
EXTRA_DIST = \
|
||||
config.in \
|
||||
browscap.ini mono.supp mono.d README \
|
||||
mono.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in \
|
||||
mono.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in \
|
||||
mono-cairo.pc.in cecil.pc.in smcs.pc.in
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
else
|
||||
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc mono-cairo.pc cecil.pc smcs.pc
|
||||
|
||||
mono_DATA = config \
|
||||
browscap.ini
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2008-08-28 Zoltan Varga <[email protected]>
|
||||
|
||||
* machine.config: Fix syntax error.
|
||||
|
||||
2008-03-23 Dean Brettle <[email protected]>
|
||||
|
||||
* Makefile.am: added Browsers/Compat.browser
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
|
||||
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />/>
|
||||
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
Name: WCF
|
||||
Description: References WCF for compilation
|
||||
Version: @VERSION@
|
||||
Libs: -r:System.Runtime.Serialization.dll -r:System.IdentityModel.dll -r:System.IdentityModel.Selectors.dll -r:System.ServiceModel.dll -r:System.ServiceModel.Web.dll
|
||||
@@ -42,19 +42,6 @@ MONO_ARCH_RGCTX_REG can be the same as the IMT register for now, but
|
||||
this might change in the future when we implement virtual generic
|
||||
method calls (more) efficiently.
|
||||
|
||||
This register lifetime starts at the call site that loads it and
|
||||
ends in the callee prologue when it is either discarded or stored
|
||||
into a local variable.
|
||||
|
||||
It's better to avoid registers used for argument passing for the RGCTX
|
||||
as it would make the code dealing with calling conventions code a lot harder.
|
||||
|
||||
** Method prologue
|
||||
|
||||
Generic shared code that have a RGCTX receive it in RGCTX_REG. There must be
|
||||
a check in mono_arch_emit_prolog for MonoCompile::rgctx_var and if set
|
||||
store it. See mini-x86.c for reference.
|
||||
|
||||
** Dealing with types
|
||||
|
||||
Types passed to arch functions might be type parameters
|
||||
|
||||
@@ -103,30 +103,6 @@ In the cases above, the number of generated trampolines goes from
|
||||
5400 for the IronPython case and from 800 to 150 for the hello world
|
||||
case.
|
||||
|
||||
Kinds of Trampolines and Thunks
|
||||
===============================
|
||||
|
||||
This is a list of the trampolines and thunks used in Mono:
|
||||
|
||||
- create_fnptr
|
||||
- load_aot_method
|
||||
- imt thunk
|
||||
|
||||
Interface Method Table, this is used to dispatch calls to
|
||||
interface methods.
|
||||
|
||||
- jump table
|
||||
- debugger code
|
||||
- exception call filter
|
||||
- trampoline (various types)
|
||||
- throw corlib exception
|
||||
- restore context
|
||||
- throw exception by name
|
||||
- handle stack overflow
|
||||
- throw exception
|
||||
- delegate invoke implementation
|
||||
- cpuid code
|
||||
|
||||
|
||||
Implementation for x86/x86-64
|
||||
=============================
|
||||
|
||||
+3
-40
@@ -1,44 +1,8 @@
|
||||
2008-08-27 Bill Holmes <[email protected]>
|
||||
2008-08-28 Bill Holmes <[email protected]>
|
||||
|
||||
* glib.h, gunicode.c : Fixing some compiler errors.
|
||||
Backport of r111875
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-08-20 Mike Voorhees <[email protected]>
|
||||
|
||||
* Patch from Mike Voorhees to fix various problems with
|
||||
g_utf8_validate compared to the glib implementation and unit tests
|
||||
to ensure that there are no regressions.
|
||||
|
||||
From a mailing list post to mono-devel-list on August 19th, 2008
|
||||
|
||||
[Mono-dev] utf8 related patches. Please review.
|
||||
|
||||
2008-08-20 Mike Voorhees <[email protected]>
|
||||
|
||||
* src/glib.h : Adding declarations for g_utf8_strlen, g_utf8_get_char,
|
||||
and g_utf8_next_char.
|
||||
|
||||
* src/gunicode.c : Adding implementation for g_utf8_strlen, g_utf8_get_char,
|
||||
and g_utf8_next_char.
|
||||
|
||||
* src/gunicode.c : Rewrote g_utf8_validate.
|
||||
|
||||
* test/utf8.c Adding tests for g_utf8_strlen, g_utf8_get_char,
|
||||
g_utf8_next_char, and g_utf8_validate.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-08-05 Andreas Faerber <[email protected]>
|
||||
|
||||
* autogen.sh: Suppress arguments warning for NOCONFIGURE.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-08-04 Bill Holmes <[email protected]>
|
||||
|
||||
* test/tests.h, test/Makefile.am, test/memory.c : Adding memory tests to test
|
||||
allocation routines return NULL when 0 size is passed in.
|
||||
* src/glib.h : Adding a c++ definition for G_BEGIN_DECLS.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
@@ -1184,4 +1148,3 @@ Mon Oct 9 12:59:16 CEST 2006 Paolo Molaro <[email protected]>
|
||||
untested at this point.
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test x$NOCONFIGURE = x && test -z "$*"; then
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
|
||||
+5
-13
@@ -93,8 +93,13 @@ typedef uint16_t gunichar2;
|
||||
#define EGLIB_TOSTRING(x) EGLIB_STRINGIFY(x)
|
||||
#define G_STRLOC __FILE__ ":" EGLIB_TOSTRING(__LINE__) ":"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define G_BEGIN_DECLS extern "C" {
|
||||
#define G_END_DECLS }
|
||||
#else
|
||||
#define G_BEGIN_DECLS
|
||||
#define G_END_DECLS
|
||||
#endif
|
||||
|
||||
#define G_CONST_RETURN const
|
||||
|
||||
@@ -760,15 +765,6 @@ gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context,
|
||||
/*
|
||||
* Character set conversion
|
||||
*/
|
||||
/*
|
||||
* Index into the table below with the first byte of a UTF-8 sequence to
|
||||
* get the number of trailing bytes that are supposed to follow it.
|
||||
* Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
|
||||
* left as-is for anyone who may want to do such conversion, which was
|
||||
* allowed in earlier algorithms.
|
||||
*/
|
||||
extern const gchar g_trailingBytesForUTF8[256];
|
||||
|
||||
gboolean g_get_charset (G_CONST_RETURN char **charset);
|
||||
gchar *g_locale_to_utf8 (const gchar *opsysstring, gssize len,
|
||||
gsize *bytes_read, gsize *bytes_written,
|
||||
@@ -781,9 +777,6 @@ gchar *g_convert (const gchar *str, gssize len,
|
||||
const gchar *to_codeset, const gchar *from_codeset,
|
||||
gsize *bytes_read, gsize *bytes_written, GError **error);
|
||||
gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **end);
|
||||
gunichar g_utf8_get_char (const gchar *src);
|
||||
glong g_utf8_strlen (const gchar *str, gssize max);
|
||||
#define g_utf8_next_char(p) p + (g_trailingBytesForUTF8[(guchar)(*p)] + 1)
|
||||
|
||||
/*
|
||||
* Empty thread functions, not used by eglib
|
||||
@@ -836,4 +829,3 @@ glong g_utf8_strlen (const gchar *str, gssize max);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+52
-125
@@ -50,35 +50,6 @@ typedef int iconv_t;
|
||||
static char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
/*
|
||||
* Character set conversion
|
||||
*/
|
||||
/*
|
||||
* Index into the table below with the first byte of a UTF-8 sequence to
|
||||
* get the number of trailing bytes that are supposed to follow it.
|
||||
* Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
|
||||
* left as-is for anyone who may want to do such conversion, which was
|
||||
* allowed in earlier algorithms.
|
||||
*/
|
||||
const gchar g_trailingBytesForUTF8 [256] = {
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,0,0
|
||||
};
|
||||
|
||||
/*
|
||||
* Magic values subtracted from a buffer value during UTF8 conversion.
|
||||
* This table contains as many values as there might be trailing bytes
|
||||
* in a UTF-8 sequence.
|
||||
*/
|
||||
static const gulong offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
|
||||
0x03C82080UL, 0xFA082080UL, 0x82082080UL };
|
||||
|
||||
GUnicodeType
|
||||
g_unichar_type (gunichar c)
|
||||
{
|
||||
@@ -254,105 +225,61 @@ g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsiz
|
||||
* Return value: true if @utf is valid.
|
||||
**/
|
||||
gboolean
|
||||
g_utf8_validate (const gchar *str, gssize max_len, const gchar **end)
|
||||
g_utf8_validate (const gchar *utf, gssize max_len, const gchar **end)
|
||||
{
|
||||
gssize byteCount = 0;
|
||||
gboolean retVal = TRUE;
|
||||
gboolean lastRet = TRUE;
|
||||
guchar* ptr = (guchar*) str;
|
||||
guint length;
|
||||
guchar a;
|
||||
guchar* srcPtr;
|
||||
if (max_len == 0)
|
||||
return 0;
|
||||
else if (max_len < 0)
|
||||
byteCount = max_len;
|
||||
while (*ptr != 0 && byteCount <= max_len) {
|
||||
length = g_trailingBytesForUTF8 [*ptr] + 1;
|
||||
srcPtr = (guchar*) ptr + length;
|
||||
switch (length) {
|
||||
default: retVal = FALSE;
|
||||
/* Everything else falls through when "TRUE"... */
|
||||
case 4: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE;
|
||||
if ((a == (guchar) 0xBF || a == (guchar) 0xBE) && *(srcPtr-1) == (guchar) 0xBF) {
|
||||
if (*(srcPtr-2) == (guchar) 0x8F || *(srcPtr-2) == (guchar) 0x9F ||
|
||||
*(srcPtr-2) == (guchar) 0xAF || *(srcPtr-2) == (guchar) 0xBF)
|
||||
retVal = FALSE;
|
||||
}
|
||||
case 3: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE;
|
||||
case 2: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE;
|
||||
int ix;
|
||||
|
||||
g_return_val_if_fail (utf != NULL, FALSE);
|
||||
|
||||
switch (*ptr) {
|
||||
/* no fall-through in this inner switch */
|
||||
case 0xE0: if (a < (guchar) 0xA0) retVal = FALSE; break;
|
||||
case 0xED: if (a > (guchar) 0x9F) retVal = FALSE; break;
|
||||
case 0xEF: if (a == (guchar)0xB7 && (*(srcPtr+1) > (guchar) 0x8F && *(srcPtr+1) < 0xB0)) retVal = FALSE;
|
||||
if (a == (guchar)0xBF && (*(srcPtr+1) == (guchar) 0xBE || *(srcPtr+1) == 0xBF)) retVal = FALSE; break;
|
||||
case 0xF0: if (a < (guchar) 0x90) retVal = FALSE; break;
|
||||
case 0xF4: if (a > (guchar) 0x8F) retVal = FALSE; break;
|
||||
default: if (a < (guchar) 0x80) retVal = FALSE;
|
||||
}
|
||||
|
||||
case 1: if (*ptr >= (guchar ) 0x80 && *ptr < (guchar) 0xC2) retVal = FALSE;
|
||||
}
|
||||
if (*ptr > (guchar) 0xF4)
|
||||
retVal = FALSE;
|
||||
//If the string is invalid, set the end to the invalid byte.
|
||||
if (!retVal && lastRet) {
|
||||
if (max_len == -1)
|
||||
max_len = strlen (utf);
|
||||
|
||||
/*
|
||||
* utf is a string of 1, 2, 3 or 4 bytes. The valid strings
|
||||
* are as follows (in "bit format"):
|
||||
* 0xxxxxxx valid 1-byte
|
||||
* 110xxxxx 10xxxxxx valid 2-byte
|
||||
* 1110xxxx 10xxxxxx 10xxxxxx valid 3-byte
|
||||
* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx valid 4-byte
|
||||
*/
|
||||
for (ix = 0; ix < max_len;) { /* string is 0-terminated */
|
||||
unsigned char c;
|
||||
|
||||
c = utf[ix];
|
||||
if ((c & 0x80) == 0x00) { /* 1-byte code, starts with 10 */
|
||||
ix++;
|
||||
} else if ((c & 0xe0) == 0xc0) {/* 2-byte code, starts with 110 */
|
||||
if (((ix+1) >= max_len) || (utf[ix+1] & 0xc0 ) != 0x80){
|
||||
if (end != NULL)
|
||||
*end = &utf [ix];
|
||||
return FALSE;
|
||||
}
|
||||
ix += 2;
|
||||
} else if ((c & 0xf0) == 0xe0) {/* 3-byte code, starts with 1110 */
|
||||
if (((ix + 2) >= max_len) ||
|
||||
((utf[ix+1] & 0xc0) != 0x80) ||
|
||||
((utf[ix+2] & 0xc0) != 0x80)){
|
||||
if (end != NULL)
|
||||
*end = &utf [ix];
|
||||
return FALSE;
|
||||
}
|
||||
ix += 3;
|
||||
} else if ((c & 0xf8) == 0xf0) {/* 4-byte code, starts with 11110 */
|
||||
if (((ix + 3) >= max_len) ||
|
||||
((utf[ix+1] & 0xc0) != 0x80) ||
|
||||
((utf[ix+2] & 0xc0) != 0x80) ||
|
||||
((utf[ix+3] & 0xc0) != 0x80)){
|
||||
if (end != NULL)
|
||||
*end = &utf [ix];
|
||||
return FALSE;
|
||||
}
|
||||
ix += 4;
|
||||
} else {/* unknown encoding */
|
||||
if (end != NULL)
|
||||
*end = (gchar*) ptr;
|
||||
lastRet = FALSE;
|
||||
*end = &utf [ix];
|
||||
return FALSE;
|
||||
}
|
||||
ptr += length;
|
||||
if(max_len > 0)
|
||||
byteCount += length;
|
||||
}
|
||||
if (retVal && end != NULL)
|
||||
*end = (gchar*) ptr;
|
||||
return retVal;
|
||||
}
|
||||
/**
|
||||
* g_utf8_get_char
|
||||
* @src: Pointer to UTF-8 encoded character.
|
||||
*
|
||||
* Return value: UTF-16 value of @src
|
||||
**/
|
||||
gunichar
|
||||
g_utf8_get_char (const gchar *src)
|
||||
{
|
||||
gunichar ch = 0;
|
||||
guchar* ptr = (guchar*) src;
|
||||
gushort extraBytesToRead = g_trailingBytesForUTF8 [*ptr];
|
||||
|
||||
switch (extraBytesToRead) {
|
||||
case 5: ch += *ptr++; ch <<= 6; // remember, illegal UTF-8
|
||||
case 4: ch += *ptr++; ch <<= 6; // remember, illegal UTF-8
|
||||
case 3: ch += *ptr++; ch <<= 6;
|
||||
case 2: ch += *ptr++; ch <<= 6;
|
||||
case 1: ch += *ptr++; ch <<= 6;
|
||||
case 0: ch += *ptr;
|
||||
}
|
||||
ch -= offsetsFromUTF8 [extraBytesToRead];
|
||||
return ch;
|
||||
}
|
||||
glong
|
||||
g_utf8_strlen (const gchar *str, gssize max)
|
||||
{
|
||||
gssize byteCount = 0;
|
||||
guchar* ptr = (guchar*) str;
|
||||
glong length = 0;
|
||||
if (max == 0)
|
||||
return 0;
|
||||
else if (max < 0)
|
||||
byteCount = max;
|
||||
while (*ptr != 0 && byteCount <= max) {
|
||||
guint cLen = g_trailingBytesForUTF8 [*ptr] + 1;
|
||||
if (max > 0 && (byteCount + cLen) > max)
|
||||
return length;
|
||||
ptr += cLen;
|
||||
length++;
|
||||
if (max > 0)
|
||||
byteCount += cLen;
|
||||
}
|
||||
return length;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -23,8 +23,7 @@ SOURCES = \
|
||||
markup.c \
|
||||
utf8.c \
|
||||
endian.c \
|
||||
module.c \
|
||||
memory.c
|
||||
module.c
|
||||
|
||||
test_eglib_SOURCES = $(SOURCES)
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include "test.h"
|
||||
|
||||
RESULT
|
||||
test_memory_zero_size_allocations ()
|
||||
{
|
||||
gpointer p;
|
||||
|
||||
p = g_malloc (0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_malloc with size zero should return NULL.");
|
||||
|
||||
p = g_malloc0 (0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_malloc0 with size zero should return NULL.");
|
||||
|
||||
p = g_realloc (NULL, 0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_realloc with size zero should return NULL.");
|
||||
|
||||
p = g_new (int, 0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_new with size zero should return NULL.");
|
||||
|
||||
p = g_new0 (int, 0);
|
||||
if (p)
|
||||
return FAILED ("Calling g_new0 with size zero should return NULL.");
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
static Test memory_tests [] = {
|
||||
{ "zero_size_allocations", test_memory_zero_size_allocations},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
DEFINE_TEST_GROUP_INIT(memory_tests_init, memory_tests)
|
||||
|
||||
@@ -21,7 +21,6 @@ DEFINE_TEST_GROUP_INIT_H(markup_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(utf8_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(endian_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(module_tests_init);
|
||||
DEFINE_TEST_GROUP_INIT_H(memory_tests_init);
|
||||
|
||||
static Group test_groups [] = {
|
||||
{"string", string_tests_init},
|
||||
@@ -45,7 +44,6 @@ static Group test_groups [] = {
|
||||
{"utf8", utf8_tests_init},
|
||||
{"endian", endian_tests_init},
|
||||
{"module", module_tests_init},
|
||||
{"memory", memory_tests_init},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -483,158 +483,6 @@ test_utf16_to_ucs4 ()
|
||||
|
||||
return OK;
|
||||
}
|
||||
RESULT
|
||||
test_utf8_strlen ()
|
||||
{
|
||||
gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'};//Valid, len = 5
|
||||
gchar word2 [] = {0xF1, 0x82, 0x82, 0x82,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'};//Valid, len = 5
|
||||
gchar word3 [] = {'h','e',0xC2, 0x82,0x45,'\0'}; //Valid, len = 4
|
||||
gchar word4 [] = {0x62,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Valid, len = 5
|
||||
|
||||
glong len = 0;
|
||||
|
||||
//Test word1
|
||||
len = g_utf8_strlen (word1,-1);
|
||||
if (len != 5)
|
||||
return FAILED ("Word1 expected length of 5, but was %i", len);
|
||||
//Do tests with different values for max parameter.
|
||||
len = g_utf8_strlen (word1,1);
|
||||
if (len != 0)
|
||||
return FAILED ("Word1, max = 1, expected length of 0, but was %i", len);
|
||||
len = g_utf8_strlen (word1,2);
|
||||
if (len != 1)
|
||||
return FAILED ("Word1, max = 1, expected length of 1, but was %i", len);
|
||||
len = g_utf8_strlen (word1,3);
|
||||
if (len != 2)
|
||||
return FAILED ("Word1, max = 2, expected length of 2, but was %i", len);
|
||||
|
||||
//Test word2
|
||||
len = g_utf8_strlen (word2,-1);
|
||||
if (len != 5)
|
||||
return FAILED ("Word2 expected length of 5, but was %i", len);
|
||||
|
||||
//Test word3
|
||||
len = g_utf8_strlen (word3,-1);
|
||||
if (len != 4)
|
||||
return FAILED ("Word3 expected length of 4, but was %i", len);
|
||||
|
||||
//Test word4
|
||||
len = g_utf8_strlen (word4,-1);
|
||||
if (len != 5)
|
||||
return FAILED ("Word4 expected length of 5, but was %i", len);
|
||||
|
||||
//Test null case
|
||||
len = g_utf8_strlen(NULL,0);
|
||||
if (len != 0)
|
||||
return FAILED ("Expected passing null to result in a length of 0");
|
||||
return OK;
|
||||
}
|
||||
|
||||
RESULT
|
||||
test_utf8_get_char()
|
||||
{
|
||||
gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid, len = 5
|
||||
|
||||
gunichar value = g_utf8_get_char (&word1 [0]);
|
||||
if (value != 0x82UL)
|
||||
return FAILED ("Expected value of 0x82, but was %x", value);
|
||||
value = g_utf8_get_char (&word1 [2]);
|
||||
if (value != 0x45UL)
|
||||
return FAILED ("Expected value of 0x45, but was %x", value);
|
||||
value = g_utf8_get_char (&word1 [3]);
|
||||
if (value != 0x1043UL)
|
||||
return FAILED ("Expected value of 0x1043, but was %x", value);
|
||||
value = g_utf8_get_char (&word1 [6]);
|
||||
if (value != 0x58UL)
|
||||
return FAILED ("Expected value of 0x58, but was %x", value);
|
||||
value = g_utf8_get_char (&word1 [7]);
|
||||
if (value != 0x42082UL)
|
||||
return FAILED ("Expected value of 0x42082, but was %x", value);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
RESULT
|
||||
test_utf8_next_char()
|
||||
{
|
||||
gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid, len = 5
|
||||
gchar word2 [] = {0xF1, 0x82, 0x82, 0x82,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Valid, len = 5
|
||||
gchar word1ExpectedValues [] = {0xC2, 0x45,0xE1, 0x58, 0xF1};
|
||||
gchar word2ExpectedValues [] = {0xF1, 0xC2, 0x45, 0xE1, 0x58};
|
||||
|
||||
gchar* ptr = word1;
|
||||
gint count = 0;
|
||||
//Test word1
|
||||
while (*ptr != 0) {
|
||||
if (count > 4)
|
||||
return FAILED ("Word1 has gone past its expected length");
|
||||
if (*ptr != word1ExpectedValues[count])
|
||||
return FAILED ("Word1 has an incorrect next_char at index %i", count);
|
||||
ptr = g_utf8_next_char (ptr);
|
||||
count++;
|
||||
}
|
||||
|
||||
//Test word2
|
||||
count = 0;
|
||||
ptr = word2;
|
||||
while (*ptr != 0) {
|
||||
if (count > 4)
|
||||
return FAILED ("Word2 has gone past its expected length");
|
||||
if (*ptr != word2ExpectedValues[count])
|
||||
return FAILED ("Word2 has an incorrect next_char at index %i", count);
|
||||
ptr = g_utf8_next_char (ptr);
|
||||
count++;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
RESULT
|
||||
test_utf8_validate()
|
||||
{
|
||||
gchar invalidWord1 [] = {0xC3, 0x82, 0xC1,0x90,'\0'}; //Invalid, 1nd oct Can't be 0xC0 or 0xC1
|
||||
gchar invalidWord2 [] = {0xC1, 0x89, 0x60, '\0'}; //Invalid, 1st oct can not be 0xC1
|
||||
gchar invalidWord3 [] = {0xC2, 0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Invalid, oct after 0xC2 must be > 0x80
|
||||
|
||||
gchar validWord1 [] = {0xC2, 0x82, 0xC3,0xA0,'\0'}; //Valid
|
||||
gchar validWord2 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid
|
||||
|
||||
const gchar* end;
|
||||
gboolean retVal = g_utf8_validate (invalidWord1, -1, &end);
|
||||
if (retVal != FALSE)
|
||||
return FAILED ("Expected invalidWord1 to be invalid");
|
||||
if (end != &invalidWord1 [2])
|
||||
return FAILED ("Expected end parameter to be pointing to invalidWord1[2]");
|
||||
|
||||
end = NULL;
|
||||
retVal = g_utf8_validate (invalidWord2, -1, &end);
|
||||
if (retVal != FALSE)
|
||||
return FAILED ("Expected invalidWord2 to be invalid");
|
||||
if (end != &invalidWord2 [0])
|
||||
return FAILED ("Expected end parameter to be pointing to invalidWord2[0]");
|
||||
|
||||
end = NULL;
|
||||
retVal = g_utf8_validate (invalidWord3, -1, &end);
|
||||
if (retVal != FALSE)
|
||||
return FAILED ("Expected invalidWord3 to be invalid");
|
||||
if (end != &invalidWord3 [0])
|
||||
return FAILED ("Expected end parameter to be pointing to invalidWord3[1]");
|
||||
|
||||
end = NULL;
|
||||
retVal = g_utf8_validate (validWord1, -1, &end);
|
||||
if (retVal != TRUE)
|
||||
return FAILED ("Expected validWord1 to be valid");
|
||||
if (end != &validWord1 [4])
|
||||
return FAILED ("Expected end parameter to be pointing to validWord1[4]");
|
||||
|
||||
end = NULL;
|
||||
retVal = g_utf8_validate (validWord2, -1, &end);
|
||||
if (retVal != TRUE)
|
||||
return FAILED ("Expected validWord2 to be valid");
|
||||
if (end != &validWord2 [11])
|
||||
return FAILED ("Expected end parameter to be pointing to validWord2[11]");
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* test initialization
|
||||
@@ -648,10 +496,6 @@ static Test utf8_tests [] = {
|
||||
{"g_unichar_xdigit_value", test_xdigit },
|
||||
{"g_ucs4_to_utf16", test_ucs4_to_utf16 },
|
||||
{"g_utf16_to_ucs4", test_utf16_to_ucs4 },
|
||||
{"g_utf8_strlen", test_utf8_strlen },
|
||||
{"g_utf8_get_char", test_utf8_get_char },
|
||||
{"g_utf8_next_char", test_utf8_next_char },
|
||||
{"g_utf8_validate", test_utf8_validate },
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
+12
-13
@@ -1,20 +1,19 @@
|
||||
2008-09-29 Geoff Norton <[email protected]>
|
||||
|
||||
* include/private/gcconfig.h: Make Darwin/ARM use mmap() instead of
|
||||
sbrk() for its allocator implementation.
|
||||
|
||||
2008-08-28 Geoff Norton <[email protected]>
|
||||
|
||||
* darwin_stop_world.c:
|
||||
* include/private/gcconfig.h: Add support for Darwin/ARM
|
||||
|
||||
2008-08-12 Geoff Norton <[email protected]>
|
||||
|
||||
* pthread_support.c: GCC shipped with SLES9 ppc gets confused with our current
|
||||
GC_setspecific define. Unfold the define into a static inline on all platforms
|
||||
except ppc where it is a static leaf function.
|
||||
|
||||
2008-08-10 Zoltan Varga <[email protected]>
|
||||
|
||||
* include/private/gc_locks.h: Add amd64 support so parallel mark works on
|
||||
amd64 too.
|
||||
|
||||
2008-08-05 Andreas Färber <[email protected]>
|
||||
|
||||
* autogen.sh: Suppress arguments warning for NOCONFIGURE.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-08-03 Zoltan Varga <[email protected]>
|
||||
|
||||
* pthread_support.c (GC_thread_exit_proc): Null out the tls key to prevent the
|
||||
@@ -33,8 +32,8 @@
|
||||
|
||||
* include/gc.h: Add GC_DllMain.
|
||||
* win32_threads.c: Rename DllMain to GC_DllMain.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
Contributed under MIT/X11 license.
|
||||
|
||||
2008-04-15 Jonathan Chambers <[email protected]>
|
||||
* include/private/gcconfig.h: Backport GC7 code to support Win64.
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test x$NOCONFIGURE = x && test -z "$*"; then
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
|
||||
@@ -79,6 +79,9 @@ void GC_push_all_stacks() {
|
||||
#elif defined(I386)
|
||||
i386_thread_state_t state;
|
||||
mach_msg_type_number_t thread_state_count = i386_THREAD_STATE_COUNT;
|
||||
#elif defined(ARM)
|
||||
arm_thread_state_t state;
|
||||
mach_msg_type_number_t thread_state_count = ARM_THREAD_STATE_COUNT;
|
||||
#else
|
||||
# error FIXME for non-x86 || ppc architectures
|
||||
mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
|
||||
@@ -193,6 +196,26 @@ void GC_push_all_stacks() {
|
||||
GC_push_one(state.r30);
|
||||
GC_push_one(state.r31);
|
||||
#endif
|
||||
#elif defined(ARM)
|
||||
lo = (void*)state.__sp;
|
||||
|
||||
GC_push_one(state.__r[0]);
|
||||
GC_push_one(state.__r[1]);
|
||||
GC_push_one(state.__r[2]);
|
||||
GC_push_one(state.__r[3]);
|
||||
GC_push_one(state.__r[4]);
|
||||
GC_push_one(state.__r[5]);
|
||||
GC_push_one(state.__r[6]);
|
||||
GC_push_one(state.__r[7]);
|
||||
GC_push_one(state.__r[8]);
|
||||
GC_push_one(state.__r[9]);
|
||||
GC_push_one(state.__r[10]);
|
||||
GC_push_one(state.__r[11]);
|
||||
GC_push_one(state.__r[12]);
|
||||
/* GC_push_one(state.__sp); */
|
||||
GC_push_one(state.__lr);
|
||||
GC_push_one(state.__pc);
|
||||
GC_push_one(state.__cpsr);
|
||||
#else
|
||||
# error FIXME for non-x86 || ppc architectures
|
||||
#endif
|
||||
@@ -318,7 +341,7 @@ void GC_push_all_stacks() {
|
||||
GC_push_one(info.r30);
|
||||
GC_push_one(info.r31);
|
||||
#endif
|
||||
# else
|
||||
# elif defined(I386) /* !POWERPC */
|
||||
/* FIXME: Remove after testing: */
|
||||
WARN("This is completely untested and likely will not work\n", 0);
|
||||
i386_thread_state_t info;
|
||||
@@ -366,7 +389,34 @@ void GC_push_all_stacks() {
|
||||
GC_push_one(info.fs);
|
||||
GC_push_one(info.gs);
|
||||
#endif
|
||||
# endif /* !POWERPC */
|
||||
# elif defined(ARM) /* !I386 */
|
||||
arm_thread_state_t info;
|
||||
mach_msg_type_number_t outCount = THREAD_STATE_MAX;
|
||||
r = thread_get_state(thread, GC_MACH_THREAD_STATE_FLAVOR,
|
||||
(natural_t *)&info, &outCount);
|
||||
if(r != KERN_SUCCESS) continue;
|
||||
|
||||
lo = (void*)info.__sp;
|
||||
hi = (ptr_t)FindTopOfStack(info.__sp);
|
||||
|
||||
GC_push_one(info.__r[0]);
|
||||
GC_push_one(info.__r[1]);
|
||||
GC_push_one(info.__r[2]);
|
||||
GC_push_one(info.__r[3]);
|
||||
GC_push_one(info.__r[4]);
|
||||
GC_push_one(info.__r[5]);
|
||||
GC_push_one(info.__r[6]);
|
||||
GC_push_one(info.__r[7]);
|
||||
GC_push_one(info.__r[8]);
|
||||
GC_push_one(info.__r[9]);
|
||||
GC_push_one(info.__r[10]);
|
||||
GC_push_one(info.__r[11]);
|
||||
GC_push_one(info.__r[12]);
|
||||
/* GC_push_one(info.__sp); */
|
||||
GC_push_one(info.__lr);
|
||||
GC_push_one(info.__pc);
|
||||
GC_push_one(info.__cpsr);
|
||||
# endif /* !ARM */
|
||||
}
|
||||
# if DEBUG_THREADS
|
||||
GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n",
|
||||
|
||||
@@ -437,29 +437,6 @@
|
||||
}
|
||||
# endif /* I386 */
|
||||
|
||||
# if defined(X86_64)
|
||||
# if !defined(GENERIC_COMPARE_AND_SWAP)
|
||||
/* Returns TRUE if the comparison succeeded. */
|
||||
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
|
||||
GC_word old,
|
||||
GC_word new_val)
|
||||
{
|
||||
char result;
|
||||
__asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1"
|
||||
: "+m"(*(addr)), "=r"(result)
|
||||
: "r" (new_val), "a"(old) : "memory");
|
||||
return (GC_bool) result;
|
||||
}
|
||||
# endif /* !GENERIC_COMPARE_AND_SWAP */
|
||||
inline static void GC_memory_barrier()
|
||||
{
|
||||
/* We believe the processor ensures at least processor */
|
||||
/* consistent ordering. Thus a compiler barrier */
|
||||
/* should suffice. */
|
||||
__asm__ __volatile__("" : : : "memory");
|
||||
}
|
||||
# endif /* X86_64 */
|
||||
|
||||
# if defined(POWERPC)
|
||||
# if !defined(GENERIC_COMPARE_AND_SWAP)
|
||||
# if CPP_WORDSZ == 64
|
||||
|
||||
@@ -59,10 +59,15 @@
|
||||
# define FREEBSD
|
||||
# endif
|
||||
|
||||
/* And one for Darwin: */
|
||||
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
|
||||
# define DARWIN
|
||||
# endif
|
||||
|
||||
/* Determine the machine type: */
|
||||
# if defined(__arm__) || defined(__thumb__)
|
||||
# define ARM32
|
||||
# if !defined(LINUX) && !defined(NETBSD)
|
||||
# if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
|
||||
# define NOSYS
|
||||
# define mach_type_known
|
||||
# endif
|
||||
@@ -297,8 +302,7 @@
|
||||
# define MACOS
|
||||
# define mach_type_known
|
||||
# endif
|
||||
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
|
||||
# define DARWIN
|
||||
# ifdef DARWIN
|
||||
# if defined(__ppc__) || defined(__ppc64__)
|
||||
# define POWERPC
|
||||
# define mach_type_known
|
||||
@@ -326,6 +330,10 @@
|
||||
/* There seems to be some issues with trylock hanging on darwin. This
|
||||
should be looked into some more */
|
||||
# define NO_PTHREAD_TRYLOCK
|
||||
# elif defined(__arm__)
|
||||
# define ARM
|
||||
# define mach_type_known
|
||||
# define DARWIN_DONT_PARSE_STACK
|
||||
# endif
|
||||
# endif
|
||||
# if defined(NeXT) && defined(mc68000)
|
||||
@@ -1883,6 +1891,15 @@
|
||||
# define OS_TYPE "MSWINCE"
|
||||
# define DATAEND /* not needed */
|
||||
# endif
|
||||
# ifdef DARWIN
|
||||
# define OS_TYPE "DARWIN"
|
||||
# define DATASTART ((ptr_t) get_etext())
|
||||
# define DATAEND ((ptr_t) get_end())
|
||||
# define STACKBOTTOM ((ptr_t) 0x30000000)
|
||||
# define USE_MMAP
|
||||
# define USE_MMAP_ANON
|
||||
# define USE_MUNMAP
|
||||
# endif
|
||||
# ifdef NOSYS
|
||||
/* __data_start is usually defined in the target linker script. */
|
||||
extern int __data_start[];
|
||||
|
||||
+1
-12
@@ -4,23 +4,12 @@
|
||||
|
||||
2008-08-22 Massimiliano Mantione <[email protected]>
|
||||
|
||||
* mono.1: Restore original nonvisible formatting (' ', '\-', and '"'
|
||||
were added everywhere by mistake in r109428).
|
||||
|
||||
2008-08-21 Massimiliano Mantione <[email protected]>
|
||||
|
||||
* mono.1: Updated description of the logging profiler.
|
||||
* mono.1: Updated description of the logging profiler from trunk.
|
||||
|
||||
2008-08-08 Zoltan Varga <[email protected]>
|
||||
|
||||
* mono.1: Remove no-dlsym aot option for now.
|
||||
|
||||
* mono.1: Document the 'static' aot option.
|
||||
|
||||
2008-08-01 Massimiliano Mantione <[email protected]>
|
||||
|
||||
* mono.1: Updated description of the logging profiler.
|
||||
|
||||
2008-04-22 Robert Jordan <[email protected]>
|
||||
|
||||
* mono.1: Document MONO_DEBUG=no-gdb-backtrace.
|
||||
|
||||
+5
-13
@@ -5,7 +5,11 @@
|
||||
.\" Author:
|
||||
.\" Miguel de Icaza ([email protected])
|
||||
.\"
|
||||
.TH Mono "Mono 1.0"
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.TH Mono "Mono 2.0"
|
||||
.SH NAME
|
||||
mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
|
||||
.SH SYNOPSIS
|
||||
@@ -244,9 +248,6 @@ Unsafe code is not allowed but P/Invoke is. This mode should
|
||||
not allow managed code to crash mono. The verification is not as
|
||||
strict as ECMA 335 standard in order to stay compatible with the MS
|
||||
runtime.
|
||||
.TP
|
||||
The security system acts on user code: code contained in mscorlib or
|
||||
the global assembly cache is always trusted.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -254,15 +255,6 @@ the global assembly cache is always trusted.
|
||||
Configures the virtual machine to be better suited for server
|
||||
operations (currently, a no-op).
|
||||
.TP
|
||||
\fB--verify-all\fR
|
||||
Verifies mscorlib and assemblies in the global
|
||||
assembly cache for valid IL, and all user code for IL
|
||||
verifiability.
|
||||
|
||||
This is different from \fB--security\fR's verifiable
|
||||
or validil in that these options only check user code and skip
|
||||
mscorlib and assemblies located on the global assembly cache.
|
||||
.TP
|
||||
\fB-V\fR, \fB--version\fR
|
||||
Prints JIT version information (system configuration, release number
|
||||
and branch names if available).
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
2008-08-04 Zoltan Varga <[email protected]>
|
||||
|
||||
* rules.make (PROFILE): If no profile is passed on the command line, make
|
||||
net_2_0 the default.
|
||||
|
||||
2008-06-30 Marek Safar <[email protected]>
|
||||
|
||||
* platforms/linux.make: Enable mcs optimizations.
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
2008-08-20 Jb Evain <[email protected]>
|
||||
|
||||
* Consts.cs.in: add NET_3_0 case for wcf.
|
||||
|
||||
2008-07-24 Gert Driesen <[email protected]>
|
||||
|
||||
* Consts.cs.in; Update FxFileVersion and VsFileVersion for 2.0 SP1.
|
||||
|
||||
2008-04-13 Jb Evain <[email protected]>
|
||||
|
||||
* Consts.cs.in: update the 2.1 profile versions.
|
||||
|
||||
@@ -57,11 +57,6 @@ internal
|
||||
public const string FxFileVersion = "3.5.21022.8";
|
||||
|
||||
public const string VsVersion = "0.0.0.0"; // Useless ?
|
||||
#elif NET_3_0
|
||||
public const string FxVersion = "3.0.0.0";
|
||||
public const string VsVersion = "8.0.0.0";
|
||||
public const string FxFileVersion = "3.0.4506.648";
|
||||
public const string VsFileVersion = "6.0.6001.17014";
|
||||
#elif NET_2_1
|
||||
// Versions of .NET Framework for SilverLight
|
||||
public const string FxVersion = "2.0.5.0";
|
||||
@@ -72,8 +67,8 @@ internal
|
||||
// Versions of .NET Framework 2.0 RTM
|
||||
public const string FxVersion = "2.0.0.0";
|
||||
public const string VsVersion = "8.0.0.0";
|
||||
public const string FxFileVersion = "2.0.50727.1433";
|
||||
public const string VsFileVersion = "8.0.50727.1433";
|
||||
public const string FxFileVersion = "2.0.50727.42";
|
||||
public const string VsFileVersion = "8.0.50727.42";
|
||||
#elif NET_1_1
|
||||
// Versions of .NET Framework 1.1 SP1
|
||||
public const string FxVersion = "1.0.5000.0";
|
||||
|
||||
@@ -89,7 +89,7 @@ endif
|
||||
# Rest of the configuration
|
||||
|
||||
ifndef PROFILE
|
||||
PROFILE = net_2_0
|
||||
PROFILE = default
|
||||
endif
|
||||
|
||||
include $(topdir)/build/profiles/$(PROFILE).make
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
2008-08-21 Jb Evain <[email protected]>
|
||||
|
||||
* Makefile: add wcf and cardspace to the build.
|
||||
|
||||
2008-07-31 Jb Evain <[email protected]>
|
||||
|
||||
* Makefile: update net_2_1_bootstrap_SUBDIRS to only build
|
||||
corlib and System.
|
||||
2008-05-22 Andreia Gaita <[email protected]>
|
||||
|
||||
* Makefile, Mono.Mozilla, Mono.WebBrowser: Long overdue rename of
|
||||
|
||||
@@ -34,6 +34,9 @@ namespace I18N.CJK
|
||||
{
|
||||
DbcsConvert gb2312 = GetConvert ();
|
||||
int index = 0;
|
||||
#if NET_2_0
|
||||
EncoderFallbackBuffer buffer = null;
|
||||
#endif
|
||||
int length = 0;
|
||||
while (count-- > 0) {
|
||||
char c = chars[index++];
|
||||
|
||||
@@ -123,6 +123,9 @@ namespace I18N.CJK
|
||||
int index = 0;
|
||||
int length = 0;
|
||||
DbcsConvert convert = GetConvert ();
|
||||
#if NET_2_0
|
||||
EncoderFallbackBuffer buffer = null;
|
||||
#endif
|
||||
|
||||
// 00 00 - FF FF
|
||||
while (count-- > 0) {
|
||||
|
||||
@@ -33,6 +33,9 @@ namespace I18N.CJK
|
||||
DbcsConvert convert = GetConvert ();
|
||||
int index = 0;
|
||||
int length = 0;
|
||||
#if NET_2_0
|
||||
EncoderFallbackBuffer buffer = null;
|
||||
#endif
|
||||
|
||||
while (count-- > 0) {
|
||||
char c = chars[index++];
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace I18N.Common
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
[CLSCompliant (false)]
|
||||
public unsafe void HandleFallback (ref EncoderFallbackBuffer buffer,
|
||||
char* chars, ref int charIndex, ref int charCount,
|
||||
byte* bytes, ref int byteIndex, ref int byteCount)
|
||||
@@ -183,15 +184,11 @@ namespace I18N.Common
|
||||
|
||||
public abstract class MonoEncoder : Encoder
|
||||
{
|
||||
#if NET_2_0
|
||||
MonoEncoding encoding;
|
||||
#endif
|
||||
|
||||
public MonoEncoder (MonoEncoding encoding)
|
||||
{
|
||||
#if NET_2_0
|
||||
this.encoding = encoding;
|
||||
#endif
|
||||
}
|
||||
|
||||
public override int GetByteCount (
|
||||
@@ -260,6 +257,7 @@ namespace I18N.Common
|
||||
return GetBytesImpl (chars, charCount, bytes, byteCount, flush);
|
||||
}
|
||||
|
||||
//[CLSCompliant (false)]
|
||||
public unsafe void HandleFallback (
|
||||
char* chars, ref int charIndex, ref int charCount,
|
||||
byte* bytes, ref int byteIndex, ref int byteCount)
|
||||
|
||||
@@ -35,7 +35,7 @@ using System.Resources;
|
||||
public sealed class Strings
|
||||
{
|
||||
// Cached copy of the resources for this assembly.
|
||||
// private static ResourceManager resources = null;
|
||||
private static ResourceManager resources = null;
|
||||
|
||||
// Helper for obtaining string resources for this assembly.
|
||||
public static String GetString(String tag)
|
||||
|
||||
@@ -87,10 +87,14 @@ public abstract class ISCIIEncoding : MonoEncoding
|
||||
return s.Length;
|
||||
}
|
||||
|
||||
public unsafe override int GetByteCountImpl (char* chars, int count)
|
||||
public unsafe override int GetByteCountImpl (char* chars, int count)
|
||||
{
|
||||
#if NET_2_0
|
||||
EncoderFallbackBuffer buffer = null;
|
||||
int index = 0;
|
||||
int charIndex = 0;
|
||||
int byteIndex = 0;
|
||||
|
||||
int length = 0;
|
||||
char ch;
|
||||
char first = (char)shift;
|
||||
|
||||
+2
-7
@@ -103,12 +103,7 @@ net_2_0_dirs := \
|
||||
System.Web.Extensions.Design \
|
||||
System.Xml.Linq \
|
||||
System.Data.DataSetExtensions \
|
||||
System.Data.Linq \
|
||||
System.Runtime.Serialization \
|
||||
System.IdentityModel \
|
||||
System.IdentityModel.Selectors \
|
||||
System.ServiceModel \
|
||||
System.ServiceModel.Web
|
||||
System.Data.Linq
|
||||
|
||||
net_2_1_dirs := \
|
||||
corlib \
|
||||
@@ -123,7 +118,7 @@ net_3_5_dirs := \
|
||||
|
||||
default_SUBDIRS := $(common_dirs) $(default_dirs)
|
||||
net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs)
|
||||
net_2_1_bootstrap_SUBDIRS := corlib System
|
||||
net_2_1_bootstrap_SUBDIRS := $(net_2_1_dirs)
|
||||
net_2_1_raw_SUBDIRS := $(net_2_1_dirs)
|
||||
net_3_5_SUBDIRS := $(net_3_5_dirs)
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
2008-08-02 Gert Driesen <[email protected]>
|
||||
|
||||
* System.Windows.Forms_test.dll.sources: Added FormEventTest.cs.
|
||||
|
||||
2008-07-11 Jonathan Pobst <[email protected]>
|
||||
|
||||
* System.Windows.Forms.dll.sources: Remove the clearlooks, nice,
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
2008-07-31 George Giolfan <[email protected]>
|
||||
|
||||
* TabControlPainter.cs: Added DrawScrollButton, GetButtonState.
|
||||
|
||||
2008-06-09 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* TabControlPainter.cs: When calculating the display rectangle for
|
||||
|
||||
+2
-18
@@ -26,7 +26,6 @@ using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace System.Windows.Forms.Theming.Default
|
||||
{
|
||||
@@ -295,23 +294,8 @@ namespace System.Windows.Forms.Theming.Default
|
||||
if (tab.ShowSlider) {
|
||||
Rectangle right = GetRightScrollRect (tab);
|
||||
Rectangle left = GetLeftScrollRect (tab);
|
||||
DrawScrollButton (dc, right, area, ScrollButton.Right, tab.RightSliderState);
|
||||
DrawScrollButton (dc, left, area, ScrollButton.Left, tab.LeftSliderState);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void DrawScrollButton (Graphics dc, Rectangle bounds, Rectangle clippingArea, ScrollButton button, PushButtonState state)
|
||||
{
|
||||
ControlPaint.DrawScrollButton (dc, bounds, button, GetButtonState (state));
|
||||
}
|
||||
|
||||
static ButtonState GetButtonState (PushButtonState state)
|
||||
{
|
||||
switch (state) {
|
||||
case PushButtonState.Pressed:
|
||||
return ButtonState.Pushed;
|
||||
default:
|
||||
return ButtonState.Normal;
|
||||
ControlPaint.DrawScrollButton (dc, right, ScrollButton.Right, tab.RightSliderState);
|
||||
ControlPaint.DrawScrollButton (dc, left, ScrollButton.Left, tab.LeftSliderState);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
2008-07-31 George Giolfan <[email protected]>
|
||||
|
||||
* TabControlPainter.cs: Added DrawScrollButton.
|
||||
|
||||
2008-07-09 George Giolfan <[email protected]>
|
||||
|
||||
* TabControlPainter.cs, ToolStripPainter.cs: Now falls back to the default
|
||||
|
||||
-63
@@ -198,68 +198,5 @@ namespace System.Windows.Forms.Theming.VisualStyles
|
||||
return base.HasHotElementStyles (tabControl);
|
||||
return true;
|
||||
}
|
||||
protected override void DrawScrollButton (Graphics dc, Rectangle bounds, Rectangle clippingArea, ScrollButton button, PushButtonState state)
|
||||
{
|
||||
if (!ThemeVisualStyles.RenderClientAreas) {
|
||||
base.DrawScrollButton (dc, bounds, clippingArea, button, state);
|
||||
return;
|
||||
}
|
||||
VisualStyleElement element;
|
||||
if (button == ScrollButton.Left)
|
||||
switch (state) {
|
||||
case PushButtonState.Hot:
|
||||
element = VisualStyleElement.Spin.DownHorizontal.Hot;
|
||||
break;
|
||||
case PushButtonState.Pressed:
|
||||
element = VisualStyleElement.Spin.DownHorizontal.Pressed;
|
||||
break;
|
||||
default:
|
||||
element = VisualStyleElement.Spin.DownHorizontal.Normal;
|
||||
break;
|
||||
}
|
||||
else
|
||||
switch (state) {
|
||||
case PushButtonState.Hot:
|
||||
element = VisualStyleElement.Spin.UpHorizontal.Hot;
|
||||
break;
|
||||
case PushButtonState.Pressed:
|
||||
element = VisualStyleElement.Spin.UpHorizontal.Pressed;
|
||||
break;
|
||||
default:
|
||||
element = VisualStyleElement.Spin.UpHorizontal.Normal;
|
||||
break;
|
||||
}
|
||||
if (!VisualStyleRenderer.IsElementDefined (element)) {
|
||||
if (button == ScrollButton.Left)
|
||||
switch (state) {
|
||||
case PushButtonState.Hot:
|
||||
element = VisualStyleElement.ScrollBar.ArrowButton.LeftHot;
|
||||
break;
|
||||
case PushButtonState.Pressed:
|
||||
element = VisualStyleElement.ScrollBar.ArrowButton.LeftPressed;
|
||||
break;
|
||||
default:
|
||||
element = VisualStyleElement.ScrollBar.ArrowButton.LeftNormal;
|
||||
break;
|
||||
}
|
||||
else
|
||||
switch (state) {
|
||||
case PushButtonState.Hot:
|
||||
element = VisualStyleElement.ScrollBar.ArrowButton.RightHot;
|
||||
break;
|
||||
case PushButtonState.Pressed:
|
||||
element = VisualStyleElement.ScrollBar.ArrowButton.RightPressed;
|
||||
break;
|
||||
default:
|
||||
element = VisualStyleElement.ScrollBar.ArrowButton.RightNormal;
|
||||
break;
|
||||
}
|
||||
if (!VisualStyleRenderer.IsElementDefined (element)) {
|
||||
base.DrawScrollButton (dc, bounds, clippingArea, button, state);
|
||||
return;
|
||||
}
|
||||
}
|
||||
new VisualStyleRenderer (element).DrawBackground (dc, bounds, clippingArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,3 @@
|
||||
2008-07-31 George Giolfan <[email protected]>
|
||||
|
||||
* GtkPlus.cs, VisualStylesGtkPlus.cs: Added support for some elements,
|
||||
clipping and excluding a rectangle from the painted area.
|
||||
* VisualStyleElement.cs: Added constants for parts and states.
|
||||
|
||||
2008-07-14 George Giolfan <[email protected]>
|
||||
|
||||
* VisualStyleElement.cs: Fixed
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+170
-1448
File diff suppressed because it is too large.
Load diff
+22
-837
@@ -47,21 +47,7 @@ namespace System.Windows.Forms.VisualStyles
|
||||
S_FALSE
|
||||
}
|
||||
enum ThemeHandle {
|
||||
BUTTON = 1,
|
||||
#if NET_2_0
|
||||
COMBOBOX,
|
||||
#endif
|
||||
EDIT,
|
||||
HEADER,
|
||||
PROGRESS,
|
||||
REBAR,
|
||||
SCROLLBAR,
|
||||
SPIN,
|
||||
STATUS,
|
||||
TAB,
|
||||
TOOLBAR,
|
||||
TRACKBAR,
|
||||
TREEVIEW
|
||||
BUTTON = 1
|
||||
}
|
||||
|
||||
#region UxTheme
|
||||
@@ -79,682 +65,78 @@ namespace System.Windows.Forms.VisualStyles
|
||||
}
|
||||
public int UxThemeDrawThemeBackground (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds, Rectangle clipRectangle)
|
||||
{
|
||||
return (int)(DrawBackground ((ThemeHandle)(int)hTheme, dc, iPartId, iStateId, bounds, clipRectangle, Rectangle.Empty) ? S.S_OK : S.S_FALSE);
|
||||
return (int)(DrawBackground ((ThemeHandle)(int)hTheme, dc, iPartId, iStateId, bounds, clipRectangle) ? S.S_OK : S.S_FALSE);
|
||||
}
|
||||
public int UxThemeDrawThemeBackground (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds)
|
||||
{
|
||||
return UxThemeDrawThemeBackground (hTheme, dc, iPartId, iStateId, bounds, bounds);
|
||||
}
|
||||
bool DrawBackground (ThemeHandle themeHandle, IDeviceContext dc, int part, int state, Rectangle bounds, Rectangle clipRectangle, Rectangle excludedArea) {
|
||||
GtkPlusState gtk_plus_state;
|
||||
GtkPlusToggleButtonValue gtk_plus_toggle_button_value;
|
||||
static bool DrawBackground (ThemeHandle themeHandle, IDeviceContext dc, int part, int state, Rectangle bounds, Rectangle clipRectangle) {
|
||||
switch (themeHandle) {
|
||||
#region BUTTON
|
||||
case ThemeHandle.BUTTON:
|
||||
switch ((BUTTONPARTS)part) {
|
||||
#region BP_PUSHBUTTON
|
||||
case BUTTONPARTS.BP_PUSHBUTTON:
|
||||
switch ((PUSHBUTTONSTATES)state) {
|
||||
case PUSHBUTTONSTATES.PBS_NORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case PUSHBUTTONSTATES.PBS_HOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
break;
|
||||
case PUSHBUTTONSTATES.PBS_PRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
break;
|
||||
case PUSHBUTTONSTATES.PBS_DISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
break;
|
||||
case PUSHBUTTONSTATES.PBS_DEFAULTED:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
GtkPlus.ButtonPaint (dc, bounds, clipRectangle, (PUSHBUTTONSTATES)state == PUSHBUTTONSTATES.PBS_DEFAULTED, gtk_plus_state);
|
||||
return true;
|
||||
#endregion
|
||||
#region BP_RADIOBUTTON
|
||||
case BUTTONPARTS.BP_RADIOBUTTON:
|
||||
switch ((RADIOBUTTONSTATES)state) {
|
||||
case RADIOBUTTONSTATES.RBS_UNCHECKEDNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_UNCHECKEDPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_UNCHECKEDHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_UNCHECKEDDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_CHECKEDNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_CHECKEDPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_CHECKEDHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
break;
|
||||
case RADIOBUTTONSTATES.RBS_CHECKEDDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
GtkPlus.RadioButtonPaint (dc, bounds, clipRectangle, gtk_plus_state, gtk_plus_toggle_button_value);
|
||||
return true;
|
||||
#endregion
|
||||
#region BP_CHECKBOX
|
||||
case BUTTONPARTS.BP_CHECKBOX:
|
||||
GtkPlusState gtk_plus_state;
|
||||
GtkPlusCheckBoxValue gtk_plus_check_box_value;
|
||||
switch ((CHECKBOXSTATES)state) {
|
||||
case CHECKBOXSTATES.CBS_UNCHECKEDNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_UNCHECKEDPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_UNCHECKEDHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_UNCHECKEDDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Unchecked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Unchecked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_CHECKEDNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_CHECKEDPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_CHECKEDHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_CHECKEDDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Checked;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Checked;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_MIXEDNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_MIXEDPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_MIXEDHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
|
||||
break;
|
||||
case CHECKBOXSTATES.CBS_MIXEDDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
gtk_plus_toggle_button_value = GtkPlusToggleButtonValue.Mixed;
|
||||
gtk_plus_check_box_value = GtkPlusCheckBoxValue.Mixed;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
GtkPlus.CheckBoxPaint (dc, bounds, clipRectangle, gtk_plus_state, gtk_plus_toggle_button_value);
|
||||
return true;
|
||||
#endregion
|
||||
#region BP_GROUPBOX
|
||||
case BUTTONPARTS.BP_GROUPBOX:
|
||||
switch ((GROUPBOXSTATES)state) {
|
||||
case GROUPBOXSTATES.GBS_NORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case GROUPBOXSTATES.GBS_DISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
GtkPlus.GroupBoxPaint (dc, bounds, excludedArea, gtk_plus_state);
|
||||
return true;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region COMBOBOX
|
||||
#if NET_2_0
|
||||
case ThemeHandle.COMBOBOX:
|
||||
switch ((COMBOBOXPARTS)part) {
|
||||
#region CP_DROPDOWNBUTTON
|
||||
case COMBOBOXPARTS.CP_DROPDOWNBUTTON:
|
||||
switch ((COMBOBOXSTYLESTATES)state) {
|
||||
case COMBOBOXSTYLESTATES.CBXS_NORMAL: gtk_plus_state = GtkPlusState.Normal; break;
|
||||
case COMBOBOXSTYLESTATES.CBXS_HOT: gtk_plus_state = GtkPlusState.Hot; break;
|
||||
case COMBOBOXSTYLESTATES.CBXS_PRESSED: gtk_plus_state = GtkPlusState.Pressed; break;
|
||||
case COMBOBOXSTYLESTATES.CBXS_DISABLED: gtk_plus_state = GtkPlusState.Disabled; break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.ComboBoxPaintDropDownButton (dc, bounds, clipRectangle, gtk_plus_state);
|
||||
return true;
|
||||
#endregion
|
||||
#region CP_BORDER
|
||||
case COMBOBOXPARTS.CP_BORDER:
|
||||
switch ((BORDERSTATES)state) {
|
||||
case BORDERSTATES.CBB_NORMAL:
|
||||
case BORDERSTATES.CBB_HOT:
|
||||
case BORDERSTATES.CBB_FOCUSED:
|
||||
case BORDERSTATES.CBB_DISABLED:
|
||||
GtkPlus.ComboBoxPaintBorder (dc, bounds, clipRectangle);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
#region EDIT
|
||||
case ThemeHandle.EDIT:
|
||||
switch ((EDITPARTS)part) {
|
||||
#region EP_EDITTEXT
|
||||
case EDITPARTS.EP_EDITTEXT:
|
||||
switch ((EDITTEXTSTATES)state) {
|
||||
case EDITTEXTSTATES.ETS_NORMAL:
|
||||
case EDITTEXTSTATES.ETS_ASSIST:
|
||||
case EDITTEXTSTATES.ETS_READONLY:
|
||||
case EDITTEXTSTATES.ETS_HOT:
|
||||
case EDITTEXTSTATES.ETS_SELECTED:
|
||||
case EDITTEXTSTATES.ETS_FOCUSED:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case EDITTEXTSTATES.ETS_DISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.TextBoxPaint (dc, bounds, excludedArea, gtk_plus_state);
|
||||
return true;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region HEADER
|
||||
case ThemeHandle.HEADER:
|
||||
switch ((HEADERPARTS)part) {
|
||||
#region HP_HEADERITEM
|
||||
case HEADERPARTS.HP_HEADERITEM:
|
||||
switch ((HEADERITEMSTATES)state) {
|
||||
case HEADERITEMSTATES.HIS_NORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case HEADERITEMSTATES.HIS_HOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
break;
|
||||
case HEADERITEMSTATES.HIS_PRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.HeaderPaint (dc, bounds, clipRectangle, gtk_plus_state);
|
||||
return true;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region PROGRESS
|
||||
case ThemeHandle.PROGRESS:
|
||||
switch ((PROGRESSPARTS)part) {
|
||||
case PROGRESSPARTS.PP_BAR:
|
||||
case PROGRESSPARTS.PP_BARVERT:
|
||||
GtkPlus.ProgressBarPaintBar (dc, bounds, clipRectangle);
|
||||
return true;
|
||||
case PROGRESSPARTS.PP_CHUNK:
|
||||
case PROGRESSPARTS.PP_CHUNKVERT:
|
||||
GtkPlus.ProgressBarPaintChunk (dc, bounds, clipRectangle);
|
||||
GtkPlus.CheckBoxPaint (dc, bounds, clipRectangle, gtk_plus_state, gtk_plus_check_box_value);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region REBAR
|
||||
case ThemeHandle.REBAR:
|
||||
switch ((REBARPARTS)part) {
|
||||
case REBARPARTS.RP_BAND:
|
||||
GtkPlus.ToolBarPaint (dc, bounds, clipRectangle);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region SCROLLBAR
|
||||
case ThemeHandle.SCROLLBAR:
|
||||
switch ((SCROLLBARPARTS)part) {
|
||||
#region SBP_ARROWBTN
|
||||
case SCROLLBARPARTS.SBP_ARROWBTN:
|
||||
bool horizontal;
|
||||
bool up_or_left;
|
||||
switch ((ARROWBTNSTATES)state) {
|
||||
case ARROWBTNSTATES.ABS_UPNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
horizontal = false;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_UPHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
horizontal = false;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_UPPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
horizontal = false;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_UPDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
horizontal = false;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_DOWNNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
horizontal = false;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_DOWNHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
horizontal = false;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_DOWNPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
horizontal = false;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_DOWNDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
horizontal = false;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_LEFTNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
horizontal = true;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_LEFTHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
horizontal = true;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_LEFTPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
horizontal = true;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_LEFTDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
horizontal = true;
|
||||
up_or_left = true;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_RIGHTNORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
horizontal = true;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_RIGHTHOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
horizontal = true;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_RIGHTPRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
horizontal = true;
|
||||
up_or_left = false;
|
||||
break;
|
||||
case ARROWBTNSTATES.ABS_RIGHTDISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
horizontal = true;
|
||||
up_or_left = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.ScrollBarPaintArrowButton (dc, bounds, clipRectangle, gtk_plus_state, horizontal, up_or_left);
|
||||
return true;
|
||||
#endregion
|
||||
#region SBP_THUMBBTNHORZ, SBP_THUMBBTNVERT
|
||||
case SCROLLBARPARTS.SBP_THUMBBTNHORZ:
|
||||
case SCROLLBARPARTS.SBP_THUMBBTNVERT:
|
||||
if (!GetGtkPlusState ((SCROLLBARSTYLESTATES)state, out gtk_plus_state))
|
||||
return false;
|
||||
GtkPlus.ScrollBarPaintThumbButton (
|
||||
dc,
|
||||
bounds,
|
||||
clipRectangle,
|
||||
gtk_plus_state,
|
||||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_THUMBBTNHORZ);
|
||||
return true;
|
||||
#endregion
|
||||
#region SBP_LOWERTRACKHORZ, SBP_UPPERTRACKHORZ, SBP_LOWERTRACKVERT, SBP_UPPERTRACKVERT
|
||||
case SCROLLBARPARTS.SBP_LOWERTRACKHORZ:
|
||||
case SCROLLBARPARTS.SBP_UPPERTRACKHORZ:
|
||||
case SCROLLBARPARTS.SBP_LOWERTRACKVERT:
|
||||
case SCROLLBARPARTS.SBP_UPPERTRACKVERT:
|
||||
if (!GetGtkPlusState ((SCROLLBARSTYLESTATES)state, out gtk_plus_state))
|
||||
return false;
|
||||
GtkPlus.ScrollBarPaintTrack (
|
||||
dc,
|
||||
bounds,
|
||||
clipRectangle,
|
||||
gtk_plus_state,
|
||||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_LOWERTRACKHORZ ||
|
||||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_UPPERTRACKHORZ,
|
||||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_UPPERTRACKHORZ ||
|
||||
(SCROLLBARPARTS)part == SCROLLBARPARTS.SBP_UPPERTRACKVERT);
|
||||
return true;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region SPIN
|
||||
case ThemeHandle.SPIN:
|
||||
bool up;
|
||||
switch ((SPINPARTS)part) {
|
||||
#region SPNP_UP
|
||||
case SPINPARTS.SPNP_UP:
|
||||
up = true;
|
||||
switch ((UPSTATES)state) {
|
||||
case UPSTATES.UPS_NORMAL: gtk_plus_state = GtkPlusState.Normal; break;
|
||||
case UPSTATES.UPS_HOT: gtk_plus_state = GtkPlusState.Hot; break;
|
||||
case UPSTATES.UPS_PRESSED: gtk_plus_state = GtkPlusState.Pressed; break;
|
||||
case UPSTATES.UPS_DISABLED: gtk_plus_state = GtkPlusState.Disabled; break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region SPNP_DOWN
|
||||
case SPINPARTS.SPNP_DOWN:
|
||||
up = false;
|
||||
switch ((DOWNSTATES)state) {
|
||||
case DOWNSTATES.DNS_NORMAL: gtk_plus_state = GtkPlusState.Normal; break;
|
||||
case DOWNSTATES.DNS_HOT: gtk_plus_state = GtkPlusState.Hot; break;
|
||||
case DOWNSTATES.DNS_PRESSED: gtk_plus_state = GtkPlusState.Pressed; break;
|
||||
case DOWNSTATES.DNS_DISABLED: gtk_plus_state = GtkPlusState.Disabled; break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.UpDownPaint (dc, bounds, clipRectangle, up, gtk_plus_state);
|
||||
return true;
|
||||
#endregion
|
||||
#region STATUS
|
||||
case ThemeHandle.STATUS:
|
||||
switch ((STATUSPARTS)part) {
|
||||
case STATUSPARTS.SP_GRIPPER:
|
||||
GtkPlus.StatusBarPaintGripper (dc, bounds, clipRectangle);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TABCONTROL
|
||||
case ThemeHandle.TAB:
|
||||
bool selected;
|
||||
switch ((TABPARTS)part) {
|
||||
#region TABP_TABITEM
|
||||
case TABPARTS.TABP_TABITEM:
|
||||
switch ((TABITEMSTATES)state) {
|
||||
case TABITEMSTATES.TIS_SELECTED:
|
||||
selected = true;
|
||||
break;
|
||||
case TABITEMSTATES.TIS_NORMAL:
|
||||
case TABITEMSTATES.TIS_HOT:
|
||||
case TABITEMSTATES.TIS_DISABLED:
|
||||
selected = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TABITEMLEFTEDGE
|
||||
case TABPARTS.TABP_TABITEMLEFTEDGE:
|
||||
switch ((TABITEMLEFTEDGESTATES)state) {
|
||||
case TABITEMLEFTEDGESTATES.TILES_SELECTED:
|
||||
selected = true;
|
||||
break;
|
||||
case TABITEMLEFTEDGESTATES.TILES_NORMAL:
|
||||
case TABITEMLEFTEDGESTATES.TILES_HOT:
|
||||
case TABITEMLEFTEDGESTATES.TILES_DISABLED:
|
||||
selected = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TABITEMRIGHTEDGE
|
||||
case TABPARTS.TABP_TABITEMRIGHTEDGE:
|
||||
switch ((TABITEMRIGHTEDGESTATES)state) {
|
||||
case TABITEMRIGHTEDGESTATES.TIRES_SELECTED:
|
||||
selected = true;
|
||||
break;
|
||||
case TABITEMRIGHTEDGESTATES.TIRES_NORMAL:
|
||||
case TABITEMRIGHTEDGESTATES.TIRES_HOT:
|
||||
case TABITEMRIGHTEDGESTATES.TIRES_DISABLED:
|
||||
selected = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TABITEMBOTHEDGE
|
||||
case TABPARTS.TABP_TABITEMBOTHEDGE:
|
||||
selected = false;
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TOPTABITEM
|
||||
case TABPARTS.TABP_TOPTABITEM:
|
||||
switch ((TOPTABITEMSTATES)state) {
|
||||
case TOPTABITEMSTATES.TTIS_SELECTED:
|
||||
selected = true;
|
||||
break;
|
||||
case TOPTABITEMSTATES.TTIS_NORMAL:
|
||||
case TOPTABITEMSTATES.TTIS_HOT:
|
||||
case TOPTABITEMSTATES.TTIS_DISABLED:
|
||||
selected = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TOPTABITEMLEFTEDGE
|
||||
case TABPARTS.TABP_TOPTABITEMLEFTEDGE:
|
||||
switch ((TOPTABITEMLEFTEDGESTATES)state) {
|
||||
case TOPTABITEMLEFTEDGESTATES.TTILES_SELECTED:
|
||||
selected = true;
|
||||
break;
|
||||
case TOPTABITEMLEFTEDGESTATES.TTILES_NORMAL:
|
||||
case TOPTABITEMLEFTEDGESTATES.TTILES_HOT:
|
||||
case TOPTABITEMLEFTEDGESTATES.TTILES_DISABLED:
|
||||
selected = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TOPTABITEMRIGHTEDGE
|
||||
case TABPARTS.TABP_TOPTABITEMRIGHTEDGE:
|
||||
switch ((TOPTABITEMRIGHTEDGESTATES)state) {
|
||||
case TOPTABITEMRIGHTEDGESTATES.TTIRES_SELECTED:
|
||||
selected = true;
|
||||
break;
|
||||
case TOPTABITEMRIGHTEDGESTATES.TTIRES_NORMAL:
|
||||
case TOPTABITEMRIGHTEDGESTATES.TTIRES_HOT:
|
||||
case TOPTABITEMRIGHTEDGESTATES.TTIRES_DISABLED:
|
||||
selected = false;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_TOPTABITEMBOTHEDGE
|
||||
case TABPARTS.TABP_TOPTABITEMBOTHEDGE:
|
||||
selected = false;
|
||||
break;
|
||||
#endregion
|
||||
#region TABP_PANE
|
||||
case TABPARTS.TABP_PANE:
|
||||
GtkPlus.TabControlPaintPane (dc, bounds, clipRectangle);
|
||||
return true;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.TabControlPaintTabItem (dc, bounds, clipRectangle, selected ? GtkPlusState.Pressed : GtkPlusState.Normal);
|
||||
return true;
|
||||
#endregion
|
||||
#region TOOLBAR
|
||||
case ThemeHandle.TOOLBAR:
|
||||
switch ((TOOLBARPARTS)part) {
|
||||
case TOOLBARPARTS.TP_BUTTON:
|
||||
switch ((TOOLBARSTYLESTATES)state) {
|
||||
case TOOLBARSTYLESTATES.TS_NORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case TOOLBARSTYLESTATES.TS_HOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
break;
|
||||
case TOOLBARSTYLESTATES.TS_PRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
break;
|
||||
case TOOLBARSTYLESTATES.TS_DISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
break;
|
||||
case TOOLBARSTYLESTATES.TS_CHECKED:
|
||||
case TOOLBARSTYLESTATES.TS_HOTCHECKED:
|
||||
GtkPlus.ToolBarPaintCheckedButton (dc, bounds, clipRectangle);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.ToolBarPaintButton (dc, bounds, clipRectangle, gtk_plus_state);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TRACKBAR
|
||||
case ThemeHandle.TRACKBAR:
|
||||
switch ((TRACKBARPARTS)part) {
|
||||
#region TKP_TRACK
|
||||
case TRACKBARPARTS.TKP_TRACK:
|
||||
switch ((TRACKSTATES)state) {
|
||||
case TRACKSTATES.TRS_NORMAL:
|
||||
GtkPlus.TrackBarPaintTrack (dc, bounds, clipRectangle, true);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TKP_TRACKVERT
|
||||
case TRACKBARPARTS.TKP_TRACKVERT:
|
||||
switch ((TRACKVERTSTATES)state) {
|
||||
case TRACKVERTSTATES.TRVS_NORMAL:
|
||||
GtkPlus.TrackBarPaintTrack (dc, bounds, clipRectangle, false);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TKP_THUMB
|
||||
case TRACKBARPARTS.TKP_THUMB:
|
||||
switch ((THUMBSTATES)state) {
|
||||
case THUMBSTATES.TUS_NORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case THUMBSTATES.TUS_HOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
break;
|
||||
case THUMBSTATES.TUS_PRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
break;
|
||||
case THUMBSTATES.TUS_FOCUSED:
|
||||
gtk_plus_state = GtkPlusState.Selected;
|
||||
break;
|
||||
case THUMBSTATES.TUS_DISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.TrackBarPaintThumb (dc, bounds, clipRectangle, gtk_plus_state, true);
|
||||
return true;
|
||||
#endregion
|
||||
#region TKP_THUMBVERT
|
||||
case TRACKBARPARTS.TKP_THUMBVERT:
|
||||
switch ((THUMBVERTSTATES)state) {
|
||||
case THUMBVERTSTATES.TUVS_NORMAL:
|
||||
gtk_plus_state = GtkPlusState.Normal;
|
||||
break;
|
||||
case THUMBVERTSTATES.TUVS_HOT:
|
||||
gtk_plus_state = GtkPlusState.Hot;
|
||||
break;
|
||||
case THUMBVERTSTATES.TUVS_PRESSED:
|
||||
gtk_plus_state = GtkPlusState.Pressed;
|
||||
break;
|
||||
case THUMBVERTSTATES.TUVS_FOCUSED:
|
||||
gtk_plus_state = GtkPlusState.Selected;
|
||||
break;
|
||||
case THUMBVERTSTATES.TUVS_DISABLED:
|
||||
gtk_plus_state = GtkPlusState.Disabled;
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.TrackBarPaintThumb (dc, bounds, clipRectangle, gtk_plus_state, false);
|
||||
return true;
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TREEVIEW
|
||||
case ThemeHandle.TREEVIEW:
|
||||
switch ((TREEVIEWPARTS)part) {
|
||||
case TREEVIEWPARTS.TVP_GLYPH:
|
||||
bool closed;
|
||||
switch ((GLYPHSTATES)state) {
|
||||
case GLYPHSTATES.GLPS_CLOSED : closed = true; break;
|
||||
case GLYPHSTATES.GLPS_OPENED: closed = false; break;
|
||||
default: return false;
|
||||
}
|
||||
GtkPlus.TreeViewPaintGlyph (dc, bounds, clipRectangle, closed);
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
static bool GetGtkPlusState (SCROLLBARSTYLESTATES state, out GtkPlusState result)
|
||||
{
|
||||
switch (state) {
|
||||
case SCROLLBARSTYLESTATES.SCRBS_NORMAL:
|
||||
result = GtkPlusState.Normal;
|
||||
break;
|
||||
case SCROLLBARSTYLESTATES.SCRBS_HOT:
|
||||
result = GtkPlusState.Hot;
|
||||
break;
|
||||
case SCROLLBARSTYLESTATES.SCRBS_PRESSED:
|
||||
result = GtkPlusState.Pressed;
|
||||
break;
|
||||
case SCROLLBARSTYLESTATES.SCRBS_DISABLED:
|
||||
result = GtkPlusState.Disabled;
|
||||
break;
|
||||
default:
|
||||
result = (GtkPlusState)0;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public int UxThemeDrawThemeEdge (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects, out Rectangle result)
|
||||
{
|
||||
result = Rectangle.Empty;
|
||||
@@ -766,22 +148,8 @@ namespace System.Windows.Forms.VisualStyles
|
||||
}
|
||||
public int UxThemeGetThemeBackgroundContentRect (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle bounds, out Rectangle result)
|
||||
{
|
||||
return (int)(GetBackgroundContentRectangle ((ThemeHandle)(int)hTheme, iPartId, iStateId, bounds, out result) ? S.S_OK : S.S_FALSE);
|
||||
}
|
||||
bool GetBackgroundContentRectangle (ThemeHandle handle, int part, int state, Rectangle bounds, out Rectangle result)
|
||||
{
|
||||
switch (handle) {
|
||||
case ThemeHandle.PROGRESS:
|
||||
switch ((PROGRESSPARTS)part) {
|
||||
case PROGRESSPARTS.PP_BAR:
|
||||
case PROGRESSPARTS.PP_BARVERT:
|
||||
result = GtkPlus.ProgressBarGetBackgroundContentRectagle (bounds);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
result = Rectangle.Empty;
|
||||
return false;
|
||||
return (int)S.S_FALSE;
|
||||
}
|
||||
public int UxThemeGetThemeBackgroundExtent (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, Rectangle contentBounds, out Rectangle result)
|
||||
{
|
||||
@@ -815,29 +183,8 @@ namespace System.Windows.Forms.VisualStyles
|
||||
}
|
||||
public int UxThemeGetThemeInt (IntPtr hTheme, int iPartId, int iStateId, IntegerProperty prop, out int result)
|
||||
{
|
||||
return (int)(GetInteger ((ThemeHandle)(int)hTheme, iPartId, iStateId, prop, out result) ? S.S_OK : S.S_FALSE);
|
||||
}
|
||||
bool GetInteger (ThemeHandle handle, int part, int state, IntegerProperty property, out int result)
|
||||
{
|
||||
switch (handle) {
|
||||
case ThemeHandle.PROGRESS:
|
||||
switch ((PROGRESSPARTS)part) {
|
||||
case PROGRESSPARTS.PP_CHUNK:
|
||||
case PROGRESSPARTS.PP_CHUNKVERT:
|
||||
switch (property) {
|
||||
case IntegerProperty.ProgressChunkSize:
|
||||
result = ThemeWin32Classic.ProgressBarGetChunkSize ();
|
||||
return true;
|
||||
case IntegerProperty.ProgressSpaceSize:
|
||||
result = ThemeWin32Classic.ProgressBarChunkSpacing;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
result = 0;
|
||||
return false;
|
||||
return (int)S.S_FALSE;
|
||||
}
|
||||
public int UxThemeGetThemeMargins (IntPtr hTheme, IDeviceContext dc, int iPartId, int iStateId, MarginProperty prop, out Padding result)
|
||||
{
|
||||
@@ -855,48 +202,13 @@ namespace System.Windows.Forms.VisualStyles
|
||||
bool GetPartSize (ThemeHandle themeHandle, IDeviceContext dc, int part, int state, Rectangle bounds, bool rectangleSpecified, ThemeSizeType type, out Size result)
|
||||
{
|
||||
switch (themeHandle) {
|
||||
#region BUTTON
|
||||
case ThemeHandle.BUTTON:
|
||||
switch ((BUTTONPARTS)part) {
|
||||
case BUTTONPARTS.BP_RADIOBUTTON:
|
||||
result = GtkPlus.RadioButtonGetSize ();
|
||||
return true;
|
||||
case BUTTONPARTS.BP_CHECKBOX:
|
||||
result = GtkPlus.CheckBoxGetSize ();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region HEADER
|
||||
case ThemeHandle.HEADER:
|
||||
switch ((HEADERPARTS)part) {
|
||||
case HEADERPARTS.HP_HEADERITEM:
|
||||
result = new Size (0, ThemeWin32Classic.ListViewGetHeaderHeight ());
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
#region TRACKBAR
|
||||
case ThemeHandle.TRACKBAR:
|
||||
switch ((TRACKBARPARTS)part) {
|
||||
case TRACKBARPARTS.TKP_TRACK:
|
||||
result = new Size (0, ThemeWin32Classic.TrackBarHorizontalTrackHeight);
|
||||
return true;
|
||||
case TRACKBARPARTS.TKP_TRACKVERT:
|
||||
result = new Size (ThemeWin32Classic.TrackBarVerticalTrackWidth, 0);
|
||||
return true;
|
||||
case TRACKBARPARTS.TKP_THUMB:
|
||||
case TRACKBARPARTS.TKP_THUMBVERT:
|
||||
result = ThemeWin32Classic.TrackBarGetThumbSize ();
|
||||
if ((TRACKBARPARTS)part == TRACKBARPARTS.TKP_THUMBVERT) {
|
||||
int temporary = result.Width;
|
||||
result.Width = result.Height;
|
||||
result.Height = temporary;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
}
|
||||
result = Size.Empty;
|
||||
return false;
|
||||
@@ -946,138 +258,11 @@ namespace System.Windows.Forms.VisualStyles
|
||||
public bool UxThemeIsThemePartDefined (IntPtr hTheme, int iPartId)
|
||||
{
|
||||
switch ((ThemeHandle)(int)hTheme) {
|
||||
#region BUTTON
|
||||
case ThemeHandle.BUTTON:
|
||||
switch ((BUTTONPARTS)iPartId) {
|
||||
case BUTTONPARTS.BP_PUSHBUTTON:
|
||||
case BUTTONPARTS.BP_CHECKBOX:
|
||||
case BUTTONPARTS.BP_RADIOBUTTON:
|
||||
case BUTTONPARTS.BP_GROUPBOX:
|
||||
return true;
|
||||
case BUTTONPARTS.BP_CHECKBOX: return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region COMBOBOX
|
||||
#if NET_2_0
|
||||
case ThemeHandle.COMBOBOX:
|
||||
switch ((COMBOBOXPARTS)iPartId) {
|
||||
case COMBOBOXPARTS.CP_DROPDOWNBUTTON:
|
||||
case COMBOBOXPARTS.CP_BORDER:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
#region EDIT
|
||||
case ThemeHandle.EDIT:
|
||||
switch ((EDITPARTS)iPartId) {
|
||||
case EDITPARTS.EP_EDITTEXT:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region HEADER
|
||||
case ThemeHandle.HEADER:
|
||||
switch ((HEADERPARTS)iPartId) {
|
||||
case HEADERPARTS.HP_HEADERITEM:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region PROGRESS
|
||||
case ThemeHandle.PROGRESS:
|
||||
switch ((PROGRESSPARTS)iPartId) {
|
||||
case PROGRESSPARTS.PP_BAR:
|
||||
case PROGRESSPARTS.PP_BARVERT:
|
||||
case PROGRESSPARTS.PP_CHUNK:
|
||||
case PROGRESSPARTS.PP_CHUNKVERT:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region REBAR
|
||||
case ThemeHandle.REBAR:
|
||||
switch ((REBARPARTS)iPartId) {
|
||||
case REBARPARTS.RP_BAND:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region SCROLLBAR
|
||||
case ThemeHandle.SCROLLBAR:
|
||||
switch ((SCROLLBARPARTS)iPartId) {
|
||||
case SCROLLBARPARTS.SBP_ARROWBTN:
|
||||
case SCROLLBARPARTS.SBP_THUMBBTNHORZ:
|
||||
case SCROLLBARPARTS.SBP_THUMBBTNVERT:
|
||||
case SCROLLBARPARTS.SBP_LOWERTRACKHORZ:
|
||||
case SCROLLBARPARTS.SBP_UPPERTRACKHORZ:
|
||||
case SCROLLBARPARTS.SBP_LOWERTRACKVERT:
|
||||
case SCROLLBARPARTS.SBP_UPPERTRACKVERT:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region SPIN
|
||||
case ThemeHandle.SPIN:
|
||||
switch ((SPINPARTS)iPartId) {
|
||||
case SPINPARTS.SPNP_UP:
|
||||
case SPINPARTS.SPNP_DOWN:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region STATUS
|
||||
case ThemeHandle.STATUS:
|
||||
switch ((STATUSPARTS)iPartId) {
|
||||
case STATUSPARTS.SP_GRIPPER:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TABCONTROL
|
||||
case ThemeHandle.TAB:
|
||||
switch ((TABPARTS)iPartId) {
|
||||
case TABPARTS.TABP_TABITEM:
|
||||
case TABPARTS.TABP_TABITEMLEFTEDGE:
|
||||
case TABPARTS.TABP_TABITEMRIGHTEDGE:
|
||||
case TABPARTS.TABP_TABITEMBOTHEDGE:
|
||||
case TABPARTS.TABP_TOPTABITEM:
|
||||
case TABPARTS.TABP_TOPTABITEMLEFTEDGE:
|
||||
case TABPARTS.TABP_TOPTABITEMRIGHTEDGE:
|
||||
case TABPARTS.TABP_TOPTABITEMBOTHEDGE:
|
||||
case TABPARTS.TABP_PANE:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TOOLBAR
|
||||
case ThemeHandle.TOOLBAR:
|
||||
switch ((TOOLBARPARTS)iPartId) {
|
||||
case TOOLBARPARTS.TP_BUTTON:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TRACKBAR
|
||||
case ThemeHandle.TRACKBAR:
|
||||
switch ((TRACKBARPARTS)iPartId) {
|
||||
case TRACKBARPARTS.TKP_TRACK:
|
||||
case TRACKBARPARTS.TKP_TRACKVERT:
|
||||
case TRACKBARPARTS.TKP_THUMB:
|
||||
case TRACKBARPARTS.TKP_THUMBVERT:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
#region TREEVIEW
|
||||
case ThemeHandle.TREEVIEW:
|
||||
switch ((TREEVIEWPARTS)iPartId) {
|
||||
case TREEVIEWPARTS.TVP_GLYPH:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
#endregion
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
@@ -1167,7 +352,7 @@ namespace System.Windows.Forms.VisualStyles
|
||||
#region VisualStyleRenderer
|
||||
public void VisualStyleRendererDrawBackgroundExcludingArea (IntPtr theme, IDeviceContext dc, int part, int state, Rectangle bounds, Rectangle excludedArea)
|
||||
{
|
||||
DrawBackground ((ThemeHandle)(int)theme, dc, part, state, bounds, bounds, excludedArea);
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -99,6 +99,10 @@ namespace System.Windows.Forms {
|
||||
null_value = nullValue;
|
||||
format_string = formatString;
|
||||
format_info = formatInfo;
|
||||
|
||||
EventDescriptor prop_changed_event = GetPropertyChangedEvent (data_source, binding_member_info.BindingField);
|
||||
if (prop_changed_event != null)
|
||||
prop_changed_event.AddEventHandler (data_source, new EventHandler (SourcePropertyChangedHandler));
|
||||
}
|
||||
#else
|
||||
public Binding (string propertyName, object dataSource, string dataMember)
|
||||
@@ -107,6 +111,10 @@ namespace System.Windows.Forms {
|
||||
data_source = dataSource;
|
||||
data_member = dataMember;
|
||||
binding_member_info = new BindingMemberInfo (dataMember);
|
||||
|
||||
EventDescriptor prop_changed_event = GetPropertyChangedEvent (data_source, binding_member_info.BindingField);
|
||||
if (prop_changed_event != null)
|
||||
prop_changed_event.AddEventHandler (data_source, new EventHandler (SourcePropertyChangedHandler));
|
||||
}
|
||||
#endif
|
||||
#endregion // Public Constructors
|
||||
@@ -338,13 +346,9 @@ namespace System.Windows.Forms {
|
||||
return;
|
||||
|
||||
if (manager == null) {
|
||||
manager = control.BindingContext [data_source, binding_member_info.BindingPath];
|
||||
manager = control.BindingContext [data_source];
|
||||
manager.AddBinding (this);
|
||||
manager.PositionChanged += new EventHandler (PositionChangedHandler);
|
||||
|
||||
EventDescriptor prop_changed_event = GetPropertyChangedEvent (manager.Current, binding_member_info.BindingField);
|
||||
if (prop_changed_event != null)
|
||||
prop_changed_event.AddEventHandler (manager.Current, new EventHandler (SourcePropertyChangedHandler));
|
||||
}
|
||||
|
||||
if (manager.Position == -1)
|
||||
|
||||
@@ -131,6 +131,8 @@ namespace System.Windows.Forms {
|
||||
text_format_flags |= TextFormatFlags.WordBreak;
|
||||
}
|
||||
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "AutoEllipsis");
|
||||
this.Invalidate ();
|
||||
}
|
||||
}
|
||||
@@ -172,6 +174,9 @@ namespace System.Windows.Forms {
|
||||
set {
|
||||
if (flat_style != value) {
|
||||
flat_style = value;
|
||||
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "FlatStyle");
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
@@ -430,6 +435,8 @@ namespace System.Windows.Forms {
|
||||
set {
|
||||
if (use_compatible_text_rendering != value) {
|
||||
use_compatible_text_rendering = value;
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "UseCompatibleTextRendering");
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
get { return GridItemType.Category; }
|
||||
}
|
||||
|
||||
public override bool Expandable {
|
||||
get { return GridItems.Count > 0; }
|
||||
}
|
||||
|
||||
public override string Label {
|
||||
get { return label; }
|
||||
}
|
||||
|
||||
@@ -1,30 +1,62 @@
|
||||
2008-08-27 Jonathan Pobst <monkey@jpobst.com>
|
||||
2008-09-30 Everaldo Canuto <ecanuto@novell.com>
|
||||
|
||||
* DataGridView.cs: Raise CellContentClick event.
|
||||
[Fixes part of bug #420351]
|
||||
* MenuAPI.cs: Prevent NRE when deactivate menu. Fixes #413636.
|
||||
|
||||
2008-08-27 Mario Carrion <[email protected]>
|
||||
2008-09-08 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* ScrollBar.cs: Control enabled to support accessibility.
|
||||
[Fixes bug #416759]
|
||||
* ErrorProvider.cs: Unbreak my previous commit.
|
||||
|
||||
2008-08-27 Mario Carrion <[email protected]>
|
||||
2008-09-08 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* ComboBox.cs: Control enabled to support accessibility.
|
||||
[Fixes bug #416663]
|
||||
* ErrorProvider.cs: Icon should always be 16x16.
|
||||
[Fixes bug #424380]
|
||||
|
||||
2008-08-27 Mario Carrion <[email protected]>
|
||||
2008-09-07 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* ListBox.cs: Control enabled to support accessibility.
|
||||
[Fixes bug #416640]
|
||||
* GridEntry.cs: Invalidate the child items cache when the property
|
||||
value changes.
|
||||
|
||||
2008-08-27 Jonathan Pobst <mon[email protected]>
|
||||
2008-09-07 Ivan N. Zlatev <con[email protected]>
|
||||
|
||||
* ComboBox.cs: Don't suppress the TextChanged event when changing
|
||||
the SelectedIndex.
|
||||
* ToolStripComboBox.cs: Listen to the ComboBox's TextChanged event
|
||||
and re-raise it.
|
||||
[Fixes bug #420673]
|
||||
* GridEntry.cs, PropertyGridView.cs:
|
||||
- Update the ReadOnly detection and rendering to finally hopefully
|
||||
match the one of MSFT.
|
||||
- Niceify and move the debug CWLS.
|
||||
[Fixes bug #409028]
|
||||
|
||||
2008-09-04 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* GridEntry.cs, CategoryGridEntry.cs, RootGridEntry.cs, PropertyGrid.cs,
|
||||
PropertyGridView.sc: Implement lazy/delayed propertygrid population
|
||||
on item expansion. Improves performance and fixes bug #417955.
|
||||
[Fixes bug #417955]
|
||||
|
||||
2008-09-03 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* ButtonBase.cs CheckBox.cs, Control.cs, FlowLayoutPanel.cs,
|
||||
FlowLayoutSettings.cs, GroupBox.cs, Label.cs, ListBox.cs,
|
||||
PropertyGrid.cs, RadioButton.cs, TableLayoutPanel.cs,
|
||||
TableLayoutSettings.cs, ToolStrip.cs, ToolStripDropDownButton.cs,
|
||||
ToolStripDropDownMenu.cs, ToolStripItem.cs, ToolStripSplitButton.cs,
|
||||
ToolStripStatusLabel.cs: Add missing PerformLayout calls to various
|
||||
properties.
|
||||
[Fixes bug #418684]
|
||||
|
||||
2008-09-02 Jonathan Pobst <[email protected]>
|
||||
|
||||
* XplatUIWin32.cs: Ensure we never send the WS_EX_MDICHILD flag
|
||||
to Windows when creating a window, as we fake MDI stuffs.
|
||||
[Fixes bug #421858]
|
||||
|
||||
2008-09-01 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* TextBox.cs: Invalidate after UseSystemPasswordChar, so that the
|
||||
change takes effect.
|
||||
|
||||
2008-08-24 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: Provide MouseButtons/State information to the XPlatUI.
|
||||
[Fixes bug #419001]
|
||||
|
||||
2008-08-26 Jonathan Pobst <[email protected]>
|
||||
|
||||
@@ -32,38 +64,10 @@
|
||||
for a control before it has a parent.
|
||||
[Fixes bug #420305]
|
||||
|
||||
2008-08-25 Carlos Alberto Cortez <calberto.cortez@gmail.com>
|
||||
2008-08-19 Jonathan Pobst <monkey@jpobst.com>
|
||||
|
||||
* Binding.cs: Use the BindingManagerBase.Current value to obtain
|
||||
connect the property "Changed" event, instead of using the data
|
||||
sources - this is useful when the property specifies actually a
|
||||
multiple objects path.
|
||||
Fixes part of #417973.
|
||||
|
||||
2008-08-24 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* RelatedPropertyManager.cs: PropertyManager instances associated to a
|
||||
nested properties should return not the properties of the data source
|
||||
itself, but the properties of the type of a specific property in the
|
||||
data source - match .net.
|
||||
|
||||
2008-08-24 Gert Driesen <[email protected]>
|
||||
|
||||
* ListBox.cs (IntegerCollection): To avoid duplication, moved code for
|
||||
AddRange overloads into AddItems method, and added missing NULL check.
|
||||
Added extra argument check to RemoveAt for compatibility with MS.
|
||||
Modified IList implementation of Add, Contains, IndexOf and Remove to
|
||||
throw an ArgumentException if item is not an int. Modified IList.Insert
|
||||
to throw a NotSupportException instead of an Exception. Implemented
|
||||
ICollection.
|
||||
(ObjectCollection): To avoid duplication, use AddItems method from
|
||||
AddRange overloads. On 1.0 profile, first perform NULL check on items
|
||||
in AddItems.
|
||||
|
||||
2008-08-23 Gert Driesen <[email protected]>
|
||||
|
||||
* Control.cs: Do not modify bounds directly in .ctor's. Fixes bug
|
||||
#419087.
|
||||
* LinkLabel.cs: Always clear any previous links when LinkArea
|
||||
is set. [Fixes bug #410709]
|
||||
|
||||
2008-08-22 Atsushi Enomoto <[email protected]>
|
||||
|
||||
@@ -76,98 +80,11 @@
|
||||
receiving correct input, which blocked precise input handling
|
||||
on non-XIM mode.
|
||||
|
||||
2008-08-20 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ListView.cs: When calling OnCacheVirtualItems, cast to the right
|
||||
type of delegate, instead of EventHandler - this was causing a type
|
||||
cast exception in all apps handling this event.
|
||||
Fixes #417876.
|
||||
|
||||
2008-08-20 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripDropDownItem.cs: Always raise DropDownOpening in
|
||||
ShowDropDown to give the user a chance to dynamically add
|
||||
drop down items. [Step 1 of fixing bug #417877]
|
||||
|
||||
2008-08-20 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* X11Dnd.cs: Don't fire pseudo motion DragOver events if we haven't
|
||||
had any mouse motion since the call to StartDrag, to match the dnd
|
||||
behaviour of .net.
|
||||
Fixes part of #381876.
|
||||
|
||||
2008-08-20 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: Only do the children control bounds check for EnterNotify
|
||||
if mode is NotifyUngrab, and let it flow if mode is NotifyNormal.
|
||||
Also, if we are actually moving into a different window after
|
||||
grabbing, generate a LeaveNotify event for the previous window, since
|
||||
we need to fire the leave events until the grab ends, not when
|
||||
actually moving outside of the control.
|
||||
|
||||
2008-08-19 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: The check inside EnterNotify case to fire MouseEnter
|
||||
events only for client windows was wrong - we need to compare the
|
||||
client window against the window receiving the EnterNotify event, not
|
||||
against zero (since client window is never Zero, btw).
|
||||
This prevents having unnecessary handling of EnterNotify events for
|
||||
non-client windows when a gran begins.
|
||||
|
||||
2008-08-19 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: Handling X ButtonPress events, we must *not* generate
|
||||
MouseMove/MotionNotify events at all (which should only happen after
|
||||
MouseUp/ButtonRelease, as .Net does).
|
||||
This avoids firing an extra and unnecessary MouseMove event just after
|
||||
every MouseDown event.
|
||||
|
||||
2008-08-19 Jonathan Pobst <[email protected]>
|
||||
|
||||
* LinkLabel.cs: Always clear any previous links when LinkArea
|
||||
is set. [Fixes bug #410709]
|
||||
|
||||
2008-08-19 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripProfessionalRenderer.cs: Revert last change.
|
||||
* ProfessionalColorTable.cs: For Classic, use SystemColors.Window
|
||||
for ToolStripDropDownBackground.
|
||||
|
||||
2008-08-19 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripProfessionalRenderer.cs: Use Window color for the
|
||||
background of dropdowns to match .Net when the user is not
|
||||
using the default white. [Fixes bug #418108]
|
||||
|
||||
2008-08-19 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* XplatUIWin32.cs : SetTimer() used to set wrong window handle and
|
||||
it caused timer registration twice. Fixed bug #418107.
|
||||
|
||||
2008-08-18 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
[Correction: This is the actual change to X11Dnd issue, not the
|
||||
previous one, which was actually a different issue.]
|
||||
|
||||
* X11Dnd.cs: Increase the interval for the Timer, to not fire our
|
||||
pseudo motion HandleMouseOver method so aggresive. Also, don't call it
|
||||
when the pointer is actually in motion, but only when the pointer
|
||||
seems to stop (as .net does).
|
||||
Fixes part of #381876.
|
||||
|
||||
|
||||
2008-08-18 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ListBox.cs: Fix CopyTo implementation.
|
||||
[Fixes bug #409169]
|
||||
|
||||
2008-08-18 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ThemeWin32Classic.cs: Use ClientRectangle instead of Bounds when
|
||||
drawing a ComboBox's background. Fixes bad disabled rendering when
|
||||
the control is not at 0,0.
|
||||
[Fixes bug #416063]
|
||||
|
||||
2008-08-16 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* GridEntry.cs: Leave the ICustomTypeDescriptor handling up to the
|
||||
@@ -176,14 +93,6 @@
|
||||
the converter and editor.
|
||||
[Fixes bug #417729]
|
||||
|
||||
2008-08-15 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: Increase the interval for the Timer, to not fire our
|
||||
pseudo motion HandleMouseOver method so aggresive. Also, don't call it
|
||||
when the pointer is actually in motion, but only when the pointer
|
||||
seems to stop (as .net does).
|
||||
Fixes part of #381876.
|
||||
|
||||
2008-08-15 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* GridEntry.cs: Perform stricter check for the ParentEntry's
|
||||
@@ -193,11 +102,10 @@
|
||||
|
||||
2008-08-14 Geoff Norton <[email protected]>
|
||||
|
||||
* XplatUICarbon.cs: Properly implement PeekMessage and DoEvents.
|
||||
Fixes #396983. Properly fix ActiveWindow trackin and do not
|
||||
prematurely show POPUP windows.
|
||||
* XplatUICarbon.cs: Track the ActiveWindow internally for GetActive().
|
||||
Don't prematurely display POPUP windows. Fully fixed #393317.
|
||||
|
||||
2008-08-12 Carlos Alberto Cortez <[email protected]>
|
||||
2008-08-12 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: Handle the obscured regions while scrolling using
|
||||
GraphicsExpose event, processing it just after we copy the scrolled
|
||||
@@ -214,6 +122,14 @@
|
||||
MouseDown events - we are only interested in the real motion event.
|
||||
Fixes part of #414963.
|
||||
|
||||
2008-08-12 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* XplatUIX11.cs: When getting EnterNotify with mode other than
|
||||
NotifyNormal (pseudo motion events), ignore them as we used to do
|
||||
before, since it's breaking our selection code and some drag and drop
|
||||
operations, because of the confusion of generating extra events (not
|
||||
fired by .net, btw).
|
||||
|
||||
2008-08-08 Jonathan Pobst <[email protected]>
|
||||
|
||||
* DataGridViewCell.cs: Guard against an AOORE when checking if a cell
|
||||
@@ -231,6 +147,20 @@
|
||||
* PropertyGrid.cs: Refresh should also repopulate the PropertyGrid.
|
||||
[Fixes part of bug #415452]
|
||||
|
||||
2008-08-07 Andreia Gaita <[email protected]>
|
||||
|
||||
* WebBrowser.cs: Remove extraneous CWL. Fixes #411372 (partially)
|
||||
|
||||
2008-08-06 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ListBox.cs: Selection changes made in the MouseDown handler should
|
||||
use the *Core versions of selection in SelectedIndices collection,
|
||||
since the SelectedIndexChanged/SelectedValueChanged events are fired
|
||||
until we get a MouseUp event, and thus we need to separate the logic
|
||||
from the events, as done in the keyboard navigation. Also, fire those
|
||||
selection events from keyboard navigation in SelectionMode.None, even
|
||||
if we don't have a selection, as .Net does.
|
||||
|
||||
2008-08-05 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* GridEntry.cs: ITypeDescriptorContext should be relative to the parent
|
||||
@@ -244,22 +174,27 @@
|
||||
share the same logic.
|
||||
[Fixes bug #414454]
|
||||
|
||||
2008-08-03 Carlos Alberto Cortez <[email protected]>
|
||||
2008-08-01 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ListBox.cs: Selection changes made in the MouseDown handler should
|
||||
use the *Core versions of selection in SelectedIndices collection,
|
||||
since the SelectedIndexChanged/SelectedValueChanged events are fired
|
||||
until we get a MouseUp event, and thus we need to separate the logic
|
||||
from the events, as done in the keyboard navigation. Also, fire those
|
||||
selection events from keyboard navigation in SelectionMode.None, even
|
||||
if we don't have a selection, as .Net does.
|
||||
* DateTimePicker.cs:
|
||||
* ThemeWin32Classic.cs: Add a editing capability to DateTimePicker, in
|
||||
order to set the value as required (which means: when selection
|
||||
changes for a part being edited, and not before that if not needed).
|
||||
Also use an enum to describe which part are we using, and use the
|
||||
selection as a property in PartData, in order to notify the
|
||||
DateTimePicker owner that we need to end the current edit.
|
||||
Fixes #383462.
|
||||
|
||||
2008-08-01 Jonathan Pobst <monkey@jpobst.com>
|
||||
2008-08-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
|
||||
|
||||
* ToolStripButton.cs, ToolStripMenuItem.cs: Guard against a NRE my
|
||||
last change introduced when an item is clicked but isn't on a toolstrip.
|
||||
* ThemeWin32Classic.cs: Don't draw ListViewSubItem instances from
|
||||
DrawListViewItem - we need to reuse the main item's drawing for the
|
||||
first sub item in case owner draw is true, but wants the system to
|
||||
do the default draw for the first sub item, without incurring in a
|
||||
recursion problem.
|
||||
Fixes #410880.
|
||||
|
||||
2008-07-31 Carlos Alberto Cortez <[email protected]>
|
||||
2008-08-01 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ListBindingHelper.cs: When looking for an object's properties, check
|
||||
if it implements ICustomTypeDescriptor, in which case we should
|
||||
@@ -267,44 +202,22 @@
|
||||
actual properties. This is what .Net seems to do.
|
||||
Fixes a UsingWebBrowser problem during initialization.
|
||||
|
||||
|
||||
2008-08-01 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripButton.cs, ToolStripMenuItem.cs: Guard against a NRE my
|
||||
last change introduced when an item is clicked but isn't on a toolstrip.
|
||||
|
||||
2008-07-31 Geoff Norton <[email protected]>
|
||||
|
||||
* XplatUICarbon.cs: Properly implement PeekMessage and DoEvents.
|
||||
Fixes #396983
|
||||
|
||||
2008-07-31 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStrip.cs: Fix an NRE caused by clicking on a ToolStripButton
|
||||
sitting on a MenuStrip.
|
||||
|
||||
2008-07-31 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripButton.cs: If we "click" a top button on a menustrip that has
|
||||
no children with the keyboard, we need to release the keyboard capture.
|
||||
[Fixes bug #413567]
|
||||
|
||||
2008-07-31 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripMenuItem.cs: If we "click" a top level menu item that has
|
||||
no children with the keyboard, we need to release the keyboard capture.
|
||||
[Fixes bug #413567]
|
||||
|
||||
2008-07-31 George Giolfan <[email protected]>
|
||||
|
||||
* ThemeVisualStyles.cs: Made ScrollBar rendering less strict so it supports
|
||||
the GTK+-based implementation of VisualStyles.
|
||||
* ThemeWin32Classic.cs: Exposed various layout values for use in the
|
||||
GTK+-based implementation of VisualStyles: ListViewGetHeaderHeight(Font),
|
||||
ListViewGetHeaderHeight(), ProgressBarChunkSpacing, ProgressBarGetChunkSize(),
|
||||
ProgressBarGetChunkSize(int), ProgressBarDefaultHeight,
|
||||
TrackBarGetThumbSize(), TrackBarVerticalTrackWidth,
|
||||
TrackBarHorizontalTrackHeight.
|
||||
|
||||
2008-07-31 George Giolfan <[email protected]>
|
||||
|
||||
* TabControl.cs: Added hot style handling for the scroll buttons.
|
||||
right_slider_state, left_slider_state are now of type PushButtonState to
|
||||
allow for a hot state. Added tracking of the mouse button being held down
|
||||
on a tab page. Extracted HasHotElementStyles, RightScrollButtonArea,
|
||||
LeftScrollButtonArea.
|
||||
* Theme.cs, ThemeWin32Classic.cs: Removed TabControlGetLeftScrollRect,
|
||||
TabControlGetRightScrollRect.
|
||||
|
||||
2008-07-30 Everaldo Canuto <[email protected]>
|
||||
|
||||
* MenuAPI.cs: Check for null GrabControl on ProcessMnemonic to prevent
|
||||
@@ -322,6 +235,12 @@
|
||||
* Form.cs: Ensure closing events are raised only once.
|
||||
[Fixes bug #413143]
|
||||
|
||||
2008-07-29 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ListBox.cs: Don't let the user set TopIndex so high that it
|
||||
scrolls up far enough to show empty items.
|
||||
[Fixes bug #412728]
|
||||
|
||||
2008-07-30 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* X11Keyboard.cs: Refactor SendKeyboardInput to accept the keycode,
|
||||
@@ -342,7 +261,7 @@
|
||||
* MenuAPI.cs: Don't create tracker on TrackPopupMenu, it will be created in
|
||||
MainMenu (already done) and ContextMenu creation.
|
||||
|
||||
* ContextMenu.cs: Create tracker on construction.
|
||||
* ContextMenu.cs: Create tracker on construction.
|
||||
|
||||
2008-07-30 Everaldo Canuto <[email protected]>
|
||||
|
||||
@@ -380,27 +299,6 @@
|
||||
all keyboard messages.
|
||||
[Fixes bug #378728]
|
||||
|
||||
2008-07-29 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ListBox.cs: Don't let the user set TopIndex so high that it
|
||||
scrolls up far enough to show empty items.
|
||||
[Fixes bug #412728]
|
||||
|
||||
2008-07-29 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ThemeWin32Classic.cs: Actually commit the changes to fix #410880
|
||||
(I'm an idiot and forgot to commit the actual changes, as well as
|
||||
specify the right file, which is this one, not ListView.cs).
|
||||
|
||||
2008-07-28 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ListView.cs: Don't draw ListViewSubItem instances from
|
||||
DrawListViewItem - we need to reuse the main item's drawing for the
|
||||
first sub item in case owner draw is true, but wants the system to
|
||||
do the default draw for the first sub item, without incurring in a
|
||||
recursion problem.
|
||||
Fixes #410880.
|
||||
|
||||
2008-07-28 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ToolStripButton.cs: Update Checked for CheckOnClick before
|
||||
@@ -417,15 +315,6 @@
|
||||
* PropertyGrid.cs: Invalidate the View when the PropertyTab
|
||||
changes.
|
||||
|
||||
2008-07-25 Gert Driesen <[email protected]>
|
||||
|
||||
* WebBrowser.cs: Removed debug output.
|
||||
|
||||
2008-07-25 Jonathan Pobst <[email protected]>
|
||||
|
||||
* FileDialog.cs: Apply patch from Ernesto to clean up some
|
||||
dialog messages.
|
||||
|
||||
2008-07-25 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* TableLayoutPanel.cs: Perform layout on GrowStyle change, so
|
||||
@@ -469,26 +358,10 @@
|
||||
|
||||
* TableLayoutPanel.cs: Layout on Row/Column count change.
|
||||
|
||||
2008-07-22 Gert Driesen <[email protected]>
|
||||
|
||||
* ListViewItem.cs: Changed binary serialization to match MS. Fixes
|
||||
bug #409351.
|
||||
* PictureBox.cs: When ImageLocation is set to null or an empty string,
|
||||
only set image to null if it was previously initialized from an url
|
||||
(or using ImageLocation). In ImageLocation, load specified image
|
||||
asynchronously if WaitOnLoad is false. Added support for local file
|
||||
paths to LoadAsync, and added missing argument check.
|
||||
|
||||
2008-07-22 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* DateTimePicker.cs:
|
||||
* ThemeWin32Classic.cs: Add a editing capability to DateTimePicker, in
|
||||
order to set the value as required (which means: when selection
|
||||
changes for a part being edited, and not before that if not needed).
|
||||
Also use an enum to describe which part are we using, and use the
|
||||
selection as a property in PartData, in order to notify the
|
||||
DateTimePicker owner that we need to end the current edit.
|
||||
Fixes #383462.
|
||||
2008-07-15 Jonathan Pobst <[email protected]>
|
||||
[Backport to 2.0]
|
||||
* ImageList.cs: Fix ICollection.CopyTo implementation for
|
||||
ImageListCollection. [Fixes bug #409169]
|
||||
|
||||
2008-07-17 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
@@ -505,11 +378,6 @@
|
||||
returned which caused GetPropertiesSupported == false in most cases.
|
||||
[Fixes bug #409027]
|
||||
|
||||
2008-07-15 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ImageList.cs: Fix ICollection.CopyTo implementation for
|
||||
ImageListCollection. [Fixes bug #409169]
|
||||
|
||||
2008-07-14 Jonathan Pobst <[email protected]>
|
||||
|
||||
* MenuAPI.cs, ToolStripDropDown.cs: Use VirtualScreen instead of
|
||||
|
||||
@@ -170,6 +170,9 @@ namespace System.Windows.Forms {
|
||||
if (value != appearance) {
|
||||
appearance = value;
|
||||
OnAppearanceChanged (EventArgs.Empty);
|
||||
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "Appearance");
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
@@ -197,7 +200,8 @@ namespace System.Windows.Forms {
|
||||
set {
|
||||
if (value != check_alignment) {
|
||||
check_alignment = value;
|
||||
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "CheckAlign");
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,9 +675,9 @@ namespace System.Windows.Forms
|
||||
|
||||
if (dropdown_style != ComboBoxStyle.DropDownList) {
|
||||
if (value == -1)
|
||||
SetControlText (string.Empty, false);
|
||||
SetControlText("");
|
||||
else
|
||||
SetControlText (GetItemText (Items [value]), false);
|
||||
SetControlText (GetItemText (Items [value]));
|
||||
}
|
||||
|
||||
if (DropDownStyle == ComboBoxStyle.DropDownList)
|
||||
@@ -799,7 +799,7 @@ namespace System.Windows.Forms
|
||||
if (value == null) {
|
||||
if (SelectedIndex == -1) {
|
||||
if (dropdown_style != ComboBoxStyle.DropDownList)
|
||||
SetControlText (string.Empty, false);
|
||||
SetControlText ("");
|
||||
} else {
|
||||
SelectedIndex = -1;
|
||||
}
|
||||
@@ -838,14 +838,6 @@ namespace System.Windows.Forms
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UIA Framework Properties
|
||||
|
||||
internal TextBox UIATextBox {
|
||||
get { return textbox_ctrl; }
|
||||
}
|
||||
|
||||
#endregion UIA Framework Properties
|
||||
|
||||
#region Public Methods
|
||||
#if NET_2_0
|
||||
[Obsolete ("This method has been deprecated")]
|
||||
@@ -1036,7 +1028,7 @@ namespace System.Windows.Forms
|
||||
return;
|
||||
|
||||
if (selected_index != -1 && DropDownStyle != ComboBoxStyle.DropDownList)
|
||||
SetControlText (GetItemText (Items [selected_index]), true);
|
||||
SetControlText (GetItemText (Items [selected_index]));
|
||||
|
||||
if (!IsHandleCreated)
|
||||
return;
|
||||
@@ -1842,15 +1834,13 @@ namespace System.Windows.Forms
|
||||
if (process_textchanged_event == false)
|
||||
return;
|
||||
|
||||
OnTextChanged (EventArgs.Empty);
|
||||
|
||||
int item = FindStringCaseInsensitive (textbox_ctrl.Text);
|
||||
|
||||
if (item == -1) {
|
||||
// Setting base.Text below will raise this event
|
||||
// if we found something
|
||||
OnTextChanged (EventArgs.Empty);
|
||||
if (item == -1)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// TODO: THIS IS BROKEN-ISH
|
||||
// I don't think we should hilight, and setting the top item does weirdness
|
||||
// when there is no scrollbar
|
||||
@@ -1868,11 +1858,9 @@ namespace System.Windows.Forms
|
||||
selected_index = -1;
|
||||
}
|
||||
|
||||
internal void SetControlText (string s, bool suppressTextChanged)
|
||||
internal void SetControlText (string s)
|
||||
{
|
||||
if (suppressTextChanged)
|
||||
process_textchanged_event = false;
|
||||
|
||||
process_textchanged_event = false;
|
||||
textbox_ctrl.Text = s;
|
||||
textbox_ctrl.SelectAll ();
|
||||
process_textchanged_event = true;
|
||||
@@ -1925,32 +1913,6 @@ namespace System.Windows.Forms
|
||||
|
||||
private ComboBox owner;
|
||||
internal ArrayList object_items = new ArrayList ();
|
||||
|
||||
#region UIA Framework Events
|
||||
|
||||
#if NET_2_0
|
||||
//NOTE:
|
||||
// We are using Reflection to add/remove internal events.
|
||||
// Class ListProvider uses the events.
|
||||
//
|
||||
//Event used to generate UIA StructureChangedEvent
|
||||
static object UIACollectionChangedEvent = new object ();
|
||||
|
||||
internal event CollectionChangeEventHandler UIACollectionChanged {
|
||||
add { owner.Events.AddHandler (UIACollectionChangedEvent, value); }
|
||||
remove { owner.Events.RemoveHandler (UIACollectionChangedEvent, value); }
|
||||
}
|
||||
|
||||
internal void OnUIACollectionChangedEvent (CollectionChangeEventArgs args)
|
||||
{
|
||||
CollectionChangeEventHandler eh
|
||||
= (CollectionChangeEventHandler) owner.Events [UIACollectionChangedEvent];
|
||||
if (eh != null)
|
||||
eh (owner, args);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion UIA Framework Events
|
||||
|
||||
public ObjectCollection (ComboBox owner)
|
||||
{
|
||||
@@ -1981,18 +1943,7 @@ namespace System.Windows.Forms
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Removed
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
|
||||
#endif
|
||||
|
||||
object_items[index] = value;
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
|
||||
#endif
|
||||
|
||||
if (owner.listbox_ctrl != null)
|
||||
owner.listbox_ctrl.InvalidateItem (index);
|
||||
if (index == owner.SelectedIndex) {
|
||||
@@ -2045,11 +1996,6 @@ namespace System.Windows.Forms
|
||||
object_items.Clear ();
|
||||
owner.UpdatedItems ();
|
||||
owner.Refresh ();
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Items list cleared
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Refresh, -1));
|
||||
#endif
|
||||
}
|
||||
|
||||
public bool Contains (object value)
|
||||
@@ -2111,13 +2057,8 @@ namespace System.Windows.Forms
|
||||
|
||||
if (owner.Sorted)
|
||||
AddItem (item);
|
||||
else {
|
||||
else
|
||||
object_items.Insert (index, item);
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
|
||||
#endif
|
||||
}
|
||||
|
||||
owner.EndUpdate (); // Calls UpdatedItems
|
||||
}
|
||||
@@ -2143,11 +2084,6 @@ namespace System.Windows.Forms
|
||||
|
||||
object_items.RemoveAt (index);
|
||||
owner.UpdatedItems ();
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item removed
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
|
||||
#endif
|
||||
}
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -2169,23 +2105,12 @@ namespace System.Windows.Forms
|
||||
if (index <= owner.selected_index && owner.IsHandleCreated)
|
||||
owner.selected_index++;
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
|
||||
#endif
|
||||
|
||||
return index;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
object_items.Add (item);
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, object_items.Count - 1));
|
||||
#endif
|
||||
|
||||
return object_items.Count - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1097,6 +1097,10 @@ namespace System.Windows.Forms
|
||||
public Control (Control parent, string text, int left, int top, int width, int height) : this()
|
||||
{
|
||||
Parent=parent;
|
||||
bounds.X=left;
|
||||
bounds.Y=top;
|
||||
bounds.Width=width;
|
||||
bounds.Height=height;
|
||||
SetBounds(left, top, width, height, BoundsSpecified.All);
|
||||
Text=text;
|
||||
}
|
||||
@@ -1108,6 +1112,10 @@ namespace System.Windows.Forms
|
||||
|
||||
public Control (string text, int left, int top, int width, int height) : this()
|
||||
{
|
||||
bounds.X=left;
|
||||
bounds.Y=top;
|
||||
bounds.Width=width;
|
||||
bounds.Height=height;
|
||||
SetBounds(left, top, width, height, BoundsSpecified.All);
|
||||
Text=text;
|
||||
}
|
||||
@@ -2226,9 +2234,13 @@ namespace System.Windows.Forms
|
||||
auto_size = value;
|
||||
|
||||
// If we're turning this off, reset our size
|
||||
if (!value)
|
||||
if (!value) {
|
||||
Size = explicit_bounds.Size;
|
||||
|
||||
} else {
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "AutoSize");
|
||||
}
|
||||
|
||||
OnAutoSizeChanged (EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
@@ -3029,6 +3041,8 @@ namespace System.Windows.Forms
|
||||
set {
|
||||
if (this.margin != value) {
|
||||
this.margin = value;
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "Margin");
|
||||
OnMarginChanged (EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3866,11 +3866,8 @@ namespace System.Windows.Forms {
|
||||
|
||||
DataGridViewCell cell = GetCellInternal (hit.ColumnIndex, hit.RowIndex);
|
||||
|
||||
if (cell.GetContentBounds (hit.RowIndex).Contains (cellpoint)) {
|
||||
DataGridViewCellEventArgs dgvcea = new DataGridViewCellEventArgs (hit.ColumnIndex, hit.RowIndex);
|
||||
OnCellContentClick (dgvcea);
|
||||
cell.OnContentClickInternal (dgvcea);
|
||||
}
|
||||
if (cell.GetContentBounds (hit.RowIndex).Contains (cellpoint))
|
||||
cell.OnContentClickInternal (new DataGridViewCellEventArgs (hit.ColumnIndex, hit.RowIndex));
|
||||
|
||||
break;
|
||||
case DataGridViewHitTestType.ColumnHeader:
|
||||
|
||||
@@ -412,7 +412,10 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
|
||||
set {
|
||||
icon = value;
|
||||
if (value != null && (value.Height != 16 || value.Width != 16))
|
||||
icon = new Icon (value, 16, 16);
|
||||
else
|
||||
icon = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -940,7 +940,7 @@ namespace System.Windows.Forms
|
||||
|
||||
if (checkFileExists) {
|
||||
if (!File.Exists (internalfullfilename)) {
|
||||
string message = "\"" + internalfullfilename + "\" does not exist. Please verify that you have entered the correct file name.";
|
||||
string message = "\"" + internalfullfilename + "\" doesn't exist. Please verify that you have entered the correct file name.";
|
||||
MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
@@ -949,7 +949,7 @@ namespace System.Windows.Forms
|
||||
if (fileDialogType == FileDialogType.SaveFileDialog) {
|
||||
if (overwritePrompt) {
|
||||
if (File.Exists (internalfullfilename)) {
|
||||
string message = "\"" + internalfullfilename + "\" already exists. Do you want to overwrite it?";
|
||||
string message = "\"" + internalfullfilename + "\" exists. Overwrite ?";
|
||||
DialogResult dr = MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
|
||||
if (dr == DialogResult.Cancel)
|
||||
return;
|
||||
@@ -958,7 +958,7 @@ namespace System.Windows.Forms
|
||||
|
||||
if (createPrompt) {
|
||||
if (!File.Exists (internalfullfilename)) {
|
||||
string message = "\"" + internalfullfilename + "\" does not exist. Do you want to create it?";
|
||||
string message = "\"" + internalfullfilename + "\" doesn't exist. Create ?";
|
||||
DialogResult dr = MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
|
||||
if (dr == DialogResult.Cancel)
|
||||
return;
|
||||
@@ -994,7 +994,7 @@ namespace System.Windows.Forms
|
||||
|
||||
if (checkPathExists && mwfFileView.CurrentRealFolder != null) {
|
||||
if (!Directory.Exists (mwfFileView.CurrentRealFolder)) {
|
||||
string message = "\"" + mwfFileView.CurrentRealFolder + "\" does not exist. Please verify that you have entered the correct directory name.";
|
||||
string message = "\"" + mwfFileView.CurrentRealFolder + "\" doesn't exist. Please verify that you have entered the correct directory name.";
|
||||
MessageBox.Show (message, openSaveButton.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
|
||||
if (InitialDirectory.Length == 0 || !Directory.Exists (InitialDirectory))
|
||||
@@ -3339,7 +3339,7 @@ namespace System.Windows.Forms
|
||||
} else
|
||||
File.Move (sourceFileName, destFileName);
|
||||
} catch (Exception e) {
|
||||
MessageBox.Show (e.Message, "Error Renaming File",
|
||||
MessageBox.Show (e.Message, "Error Renaming Folder",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace System.Windows.Forms
|
||||
internal FlowLayoutSettings LayoutSettings {
|
||||
get {
|
||||
if (this.settings == null)
|
||||
this.settings = new FlowLayoutSettings ();
|
||||
this.settings = new FlowLayoutSettings (this);
|
||||
|
||||
return this.settings;
|
||||
}
|
||||
@@ -89,7 +89,6 @@ namespace System.Windows.Forms
|
||||
public void SetFlowBreak (Control control, bool value)
|
||||
{
|
||||
LayoutSettings.SetFlowBreak (control, value);
|
||||
this.PerformLayout (control, "FlowBreak");
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -40,19 +40,31 @@ namespace System.Windows.Forms
|
||||
private bool wrap_contents;
|
||||
private LayoutEngine layout_engine;
|
||||
private Dictionary<object, bool> flow_breaks;
|
||||
private Control owner;
|
||||
|
||||
internal FlowLayoutSettings ()
|
||||
internal FlowLayoutSettings () : this (null)
|
||||
{
|
||||
}
|
||||
|
||||
internal FlowLayoutSettings (Control owner)
|
||||
{
|
||||
flow_breaks = new Dictionary<object, bool> ();
|
||||
wrap_contents = true;
|
||||
flow_direction = FlowDirection.LeftToRight;
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
#region Public Properties
|
||||
[DefaultValue (FlowDirection.LeftToRight)]
|
||||
public FlowDirection FlowDirection {
|
||||
get { return this.flow_direction; }
|
||||
set { this.flow_direction = value; }
|
||||
set {
|
||||
if (this.flow_direction != value) {
|
||||
this.flow_direction = value;
|
||||
if (owner != null)
|
||||
owner.PerformLayout (owner, "FlowDirection");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override LayoutEngine LayoutEngine {
|
||||
@@ -67,7 +79,13 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (true)]
|
||||
public bool WrapContents {
|
||||
get { return this.wrap_contents; }
|
||||
set { this.wrap_contents = value; }
|
||||
set {
|
||||
if (this.wrap_contents != value) {
|
||||
this.wrap_contents = value;
|
||||
if (owner != null)
|
||||
owner.PerformLayout (owner, "WrapContents");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -85,6 +103,8 @@ namespace System.Windows.Forms
|
||||
public void SetFlowBreak (Object child, bool value)
|
||||
{
|
||||
flow_breaks[child] = value;
|
||||
if (owner != null)
|
||||
owner.PerformLayout ((Control)child, "FlowBreak");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
private PropertyDescriptor[] property_descriptors;
|
||||
private int top;
|
||||
private Rectangle plus_minus_bounds;
|
||||
private GridItemCollection child_griditems_cache;
|
||||
#endregion // Local Variables
|
||||
|
||||
#region Contructors
|
||||
@@ -61,6 +62,7 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
grid_items = new GridItemCollection ();
|
||||
expanded = false;
|
||||
this.parent = parent;
|
||||
child_griditems_cache = null;
|
||||
}
|
||||
|
||||
// Cannot use one PropertyDescriptor for all owners, because the
|
||||
@@ -78,7 +80,16 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
|
||||
|
||||
public override bool Expandable {
|
||||
get { return grid_items.Count > 0; }
|
||||
get {
|
||||
TypeConverter converter = GetConverter ();
|
||||
if (converter == null || !converter.GetPropertiesSupported ((ITypeDescriptorContext)this))
|
||||
return false;
|
||||
|
||||
if (GetChildGridItemsCached ().Count > 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Expanded {
|
||||
@@ -86,6 +97,7 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
set {
|
||||
if (expanded != value) {
|
||||
expanded = value;
|
||||
PopulateChildGridItems ();
|
||||
if (value)
|
||||
property_grid.OnExpandItem (this);
|
||||
else
|
||||
@@ -95,7 +107,10 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
}
|
||||
|
||||
public override GridItemCollection GridItems {
|
||||
get { return grid_items; }
|
||||
get {
|
||||
PopulateChildGridItems ();
|
||||
return grid_items;
|
||||
}
|
||||
}
|
||||
|
||||
public override GridItemType GridItemType {
|
||||
@@ -463,6 +478,7 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
return false;
|
||||
|
||||
if (SetValueCore (value, out error)) {
|
||||
InvalidateChildGridItemsCache ();
|
||||
property_grid.OnPropertyValueChangedInternal (this, this.Value);
|
||||
return true;
|
||||
}
|
||||
@@ -625,26 +641,18 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
//
|
||||
public virtual bool IsReadOnly {
|
||||
get {
|
||||
TypeConverter converter = GetConverter ();
|
||||
// if (PropertyDescriptor != null) {
|
||||
// Console.WriteLine ("=== [" + PropertyDescriptor.Name + "]");
|
||||
// Console.WriteLine ("PropertyDescriptor.IsReadOnly: " + PropertyDescriptor.IsReadOnly);
|
||||
// UITypeEditor editor = GetEditor ();
|
||||
// Console.WriteLine ("Editor: " + (editor == null ? "none" : GetEditor ().GetType ().Name));
|
||||
// if (editor != null)
|
||||
// Console.WriteLine ("Editor.EditorStyle: " + editor.GetEditStyle ((ITypeDescriptorContext)this));
|
||||
// Console.WriteLine ("Converter: " + (converter == null ? "none" : converter.GetType ().Name));
|
||||
// if (converter != null) {
|
||||
// Console.WriteLine ("Converter.GetStandardValuesSupported: " + converter.GetStandardValuesSupported ((ITypeDescriptorContext)this).ToString ());
|
||||
// Console.WriteLine ("Converter.GetStandardValuesExclusive: " + converter.GetStandardValuesExclusive ((ITypeDescriptorContext)this).ToString ());
|
||||
// Console.WriteLine ("ShouldCreateParentInstance: " + this.ShouldCreateParentInstance);
|
||||
// Console.WriteLine ("CanConvertFrom (string): " + converter.CanConvertFrom ((ITypeDescriptorContext)this, typeof (string)));
|
||||
// }
|
||||
// Console.WriteLine ("IsArray: " + PropertyDescriptor.PropertyType.IsArray.ToString ());
|
||||
// }
|
||||
if (PropertyDescriptor == null || PropertyOwner == null ||
|
||||
(PropertyDescriptor.IsReadOnly && !this.ShouldCreateParentInstance &&
|
||||
EditorStyle != UITypeEditorEditStyle.Modal))
|
||||
TypeConverter converter = GetConverter ();
|
||||
if (PropertyDescriptor == null || PropertyOwner == null)
|
||||
return true;
|
||||
else if (PropertyDescriptor.IsReadOnly &&
|
||||
(EditorStyle != UITypeEditorEditStyle.Modal || PropertyDescriptor.PropertyType.IsValueType) &&
|
||||
!this.ShouldCreateParentInstance)
|
||||
return true;
|
||||
else if (PropertyDescriptor.IsReadOnly &&
|
||||
TypeDescriptor.GetAttributes (PropertyDescriptor.PropertyType)
|
||||
[typeof(ImmutableObjectAttribute)].Equals (ImmutableObjectAttribute.Yes))
|
||||
return true;
|
||||
else if (ShouldCreateParentInstance && ParentEntry.IsReadOnly)
|
||||
return true;
|
||||
else if (!HasCustomEditor && converter == null)
|
||||
return true;
|
||||
@@ -661,15 +669,6 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsExpandable {
|
||||
get {
|
||||
TypeConverter converter = GetConverter ();
|
||||
if (converter != null && converter.GetPropertiesSupported ((ITypeDescriptorContext)this))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsPassword {
|
||||
get {
|
||||
#if NET_2_0
|
||||
@@ -723,5 +722,139 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
}
|
||||
}
|
||||
|
||||
#region Population
|
||||
protected void PopulateChildGridItems ()
|
||||
{
|
||||
grid_items = GetChildGridItemsCached ();
|
||||
}
|
||||
|
||||
private void InvalidateChildGridItemsCache ()
|
||||
{
|
||||
if (child_griditems_cache != null) {
|
||||
child_griditems_cache = null;
|
||||
PopulateChildGridItems ();
|
||||
}
|
||||
}
|
||||
|
||||
private GridItemCollection GetChildGridItemsCached ()
|
||||
{
|
||||
if (child_griditems_cache == null) {
|
||||
child_griditems_cache = GetChildGridItems ();
|
||||
// foreach (GridEntry item in child_griditems_cache)
|
||||
// PrintDebugInfo (item);
|
||||
}
|
||||
|
||||
return child_griditems_cache;
|
||||
}
|
||||
|
||||
// private static void PrintDebugInfo (GridEntry item)
|
||||
// {
|
||||
// if (item.PropertyDescriptor != null) {
|
||||
// Console.WriteLine ("=== [" + item.PropertyDescriptor.Name + "] ===");
|
||||
// try {
|
||||
// TypeConverter converter = item.GetConverter ();
|
||||
// Console.WriteLine ("IsReadOnly: " + item.IsReadOnly);
|
||||
// Console.WriteLine ("IsEditable: " + item.IsEditable);
|
||||
// Console.WriteLine ("PropertyDescriptor.IsReadOnly: " + item.PropertyDescriptor.IsReadOnly);
|
||||
// if (item.ParentEntry != null)
|
||||
// Console.WriteLine ("ParentEntry.IsReadOnly: " + item.ParentEntry.IsReadOnly);
|
||||
// Console.WriteLine ("ImmutableObjectAttribute.Yes: " + TypeDescriptor.GetAttributes (item.PropertyDescriptor.PropertyType)
|
||||
// [typeof(ImmutableObjectAttribute)].Equals (ImmutableObjectAttribute.Yes));
|
||||
// UITypeEditor editor = item.GetEditor ();
|
||||
// Console.WriteLine ("Editor: " + (editor == null ? "none" : editor.GetType ().Name));
|
||||
// if (editor != null)
|
||||
// Console.WriteLine ("Editor.EditorStyle: " + editor.GetEditStyle ((ITypeDescriptorContext)item));
|
||||
// Console.WriteLine ("Converter: " + (converter == null ? "none" : converter.GetType ().Name));
|
||||
// if (converter != null) {
|
||||
// Console.WriteLine ("Converter.GetStandardValuesSupported: " + converter.GetStandardValuesSupported ((ITypeDescriptorContext)item).ToString ());
|
||||
// Console.WriteLine ("Converter.GetStandardValuesExclusive: " + converter.GetStandardValuesExclusive ((ITypeDescriptorContext)item).ToString ());
|
||||
// Console.WriteLine ("ShouldCreateParentInstance: " + item.ShouldCreateParentInstance);
|
||||
// Console.WriteLine ("CanConvertFrom (string): " + converter.CanConvertFrom ((ITypeDescriptorContext)item, typeof (string)));
|
||||
// }
|
||||
// Console.WriteLine ("IsArray: " + item.PropertyDescriptor.PropertyType.IsArray.ToString ());
|
||||
// } catch { /* Some converters and editor throw NotImplementedExceptions */ }
|
||||
// }
|
||||
// }
|
||||
|
||||
private GridItemCollection GetChildGridItems ()
|
||||
{
|
||||
object[] propertyOwners = this.Values;
|
||||
string[] propertyNames = GetMergedPropertyNames (propertyOwners);
|
||||
GridItemCollection items = new GridItemCollection ();
|
||||
|
||||
foreach (string propertyName in propertyNames) {
|
||||
PropertyDescriptor[] properties = new PropertyDescriptor[propertyOwners.Length];
|
||||
for (int i=0; i < propertyOwners.Length; i++)
|
||||
properties[i] = GetPropertyDescriptor (propertyOwners[i], propertyName);
|
||||
items.Add (new GridEntry (property_grid, properties, this));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
private bool IsPropertyMergeable (PropertyDescriptor property)
|
||||
{
|
||||
if (property == null)
|
||||
return false;
|
||||
|
||||
MergablePropertyAttribute attrib = property.Attributes [typeof (MergablePropertyAttribute)] as MergablePropertyAttribute;
|
||||
if (attrib != null && !attrib.AllowMerge)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private string[] GetMergedPropertyNames (object [] objects)
|
||||
{
|
||||
if (objects == null || objects.Length == 0)
|
||||
return new string[0];
|
||||
|
||||
ArrayList intersection = new ArrayList ();
|
||||
for (int i = 0; i < objects.Length; i ++) {
|
||||
if (objects [i] == null)
|
||||
continue;
|
||||
|
||||
PropertyDescriptorCollection properties = GetProperties (objects[i], property_grid.BrowsableAttributes);
|
||||
ArrayList new_intersection = new ArrayList ();
|
||||
|
||||
foreach (PropertyDescriptor currentProperty in (i == 0 ? (ICollection)properties : (ICollection)intersection)) {
|
||||
PropertyDescriptor matchingProperty = (i == 0 ? currentProperty : properties [currentProperty.Name]);
|
||||
if (objects.Length > 1 && !IsPropertyMergeable (matchingProperty))
|
||||
continue;
|
||||
if (matchingProperty.PropertyType == currentProperty.PropertyType)
|
||||
new_intersection.Add (matchingProperty);
|
||||
}
|
||||
|
||||
intersection = new_intersection;
|
||||
}
|
||||
|
||||
string[] propertyNames = new string [intersection.Count];
|
||||
for (int i=0; i < intersection.Count; i++)
|
||||
propertyNames[i] = ((PropertyDescriptor)intersection[i]).Name;
|
||||
|
||||
return propertyNames;
|
||||
}
|
||||
|
||||
private PropertyDescriptor GetPropertyDescriptor (object propertyOwner, string propertyName)
|
||||
{
|
||||
if (propertyOwner == null || propertyName == null)
|
||||
return null;
|
||||
|
||||
PropertyDescriptorCollection properties = GetProperties (propertyOwner, property_grid.BrowsableAttributes);
|
||||
if (properties != null)
|
||||
return properties[propertyName];
|
||||
return null;
|
||||
}
|
||||
|
||||
private PropertyDescriptorCollection GetProperties (object propertyOwner, AttributeCollection attributes)
|
||||
{
|
||||
if (propertyOwner == null || property_grid.SelectedTab == null)
|
||||
return new PropertyDescriptorCollection (null);
|
||||
|
||||
Attribute[] atts = new Attribute[attributes.Count];
|
||||
attributes.CopyTo (atts, 0);
|
||||
return property_grid.SelectedTab.GetProperties ((ITypeDescriptorContext)this, propertyOwner, atts);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -307,7 +307,12 @@ namespace System.Windows.Forms
|
||||
}
|
||||
|
||||
set {
|
||||
use_compatible_text_rendering = value;
|
||||
if (use_compatible_text_rendering != value) {
|
||||
use_compatible_text_rendering = value;
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "UseCompatibleTextRendering");
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -186,6 +186,8 @@ namespace System.Windows.Forms
|
||||
else
|
||||
string_format.Trimming = StringTrimming.Character;
|
||||
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "AutoEllipsis");
|
||||
this.Invalidate ();
|
||||
}
|
||||
}
|
||||
@@ -289,6 +291,8 @@ namespace System.Windows.Forms
|
||||
return;
|
||||
|
||||
flat_style = value;
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "FlatStyle");
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,6 +323,8 @@ namespace System.Windows.Forms
|
||||
else
|
||||
item_heights = null;
|
||||
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "DrawMode");
|
||||
base.Refresh ();
|
||||
}
|
||||
}
|
||||
@@ -695,18 +697,6 @@ namespace System.Windows.Forms
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region UIA Framework Properties
|
||||
|
||||
internal ScrollBar UIAHScrollBar {
|
||||
get { return hscrollbar; }
|
||||
}
|
||||
|
||||
internal ScrollBar UIAVScrollBar {
|
||||
get { return vscrollbar; }
|
||||
}
|
||||
|
||||
#endregion UIA Framework Properties
|
||||
|
||||
#region Public Methods
|
||||
#if NET_2_0
|
||||
[Obsolete ("this method has been deprecated")]
|
||||
@@ -1103,7 +1093,7 @@ namespace System.Windows.Forms
|
||||
BeginUpdate ();
|
||||
try {
|
||||
Items.Clear ();
|
||||
Items.AddItems (value);
|
||||
Items.AddRange (value);
|
||||
} finally {
|
||||
EndUpdate ();
|
||||
}
|
||||
@@ -2254,26 +2244,22 @@ namespace System.Windows.Forms
|
||||
|
||||
public void AddRange (int[] items)
|
||||
{
|
||||
AddItems (items);
|
||||
foreach (int i in items)
|
||||
if (!list.Contains (i))
|
||||
list.Add (i);
|
||||
|
||||
list.Sort ();
|
||||
}
|
||||
|
||||
public void AddRange (IntegerCollection value)
|
||||
{
|
||||
AddItems (value);
|
||||
}
|
||||
|
||||
void AddItems (IList items)
|
||||
{
|
||||
if (items == null)
|
||||
throw new ArgumentNullException ("items");
|
||||
|
||||
foreach (int i in items)
|
||||
foreach (int i in value)
|
||||
if (!list.Contains (i))
|
||||
list.Add (i);
|
||||
|
||||
list.Sort ();
|
||||
}
|
||||
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
list.Clear ();
|
||||
@@ -2287,8 +2273,8 @@ namespace System.Windows.Forms
|
||||
|
||||
public void CopyTo (Array destination, int index)
|
||||
{
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
destination.SetValue (list[i], index++);
|
||||
for (int i = index; i < list.Count; i++)
|
||||
destination.SetValue (list[i], i);
|
||||
}
|
||||
|
||||
public int IndexOf (int item)
|
||||
@@ -2305,9 +2291,6 @@ namespace System.Windows.Forms
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
if (index < 0)
|
||||
throw new IndexOutOfRangeException ();
|
||||
|
||||
list.RemoveAt (index);
|
||||
list.Sort ();
|
||||
owner.CalculateTabStops ();
|
||||
@@ -2324,10 +2307,7 @@ namespace System.Windows.Forms
|
||||
#region IList Members
|
||||
int IList.Add (object item)
|
||||
{
|
||||
int? intValue = item as int?;
|
||||
if (!intValue.HasValue)
|
||||
throw new ArgumentException ("item");
|
||||
return Add (intValue.Value);
|
||||
return Add ((int) item);
|
||||
}
|
||||
|
||||
void IList.Clear ()
|
||||
@@ -2337,26 +2317,17 @@ namespace System.Windows.Forms
|
||||
|
||||
bool IList.Contains (object item)
|
||||
{
|
||||
int? intValue = item as int?;
|
||||
if (!intValue.HasValue)
|
||||
return false;
|
||||
return Contains (intValue.Value);
|
||||
return Contains ((int) item);
|
||||
}
|
||||
|
||||
int IList.IndexOf (object item)
|
||||
{
|
||||
int? intValue = item as int?;
|
||||
if (!intValue.HasValue)
|
||||
return -1;
|
||||
return IndexOf (intValue.Value);
|
||||
return IndexOf ((int) item);
|
||||
}
|
||||
|
||||
void IList.Insert (int index, object value)
|
||||
{
|
||||
throw new NotSupportedException (string.Format (
|
||||
CultureInfo.InvariantCulture, "No items "
|
||||
+ "can be inserted into {0}, since it is"
|
||||
+ " a sorted collection.", this.GetType ()));
|
||||
throw new Exception ("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
bool IList.IsFixedSize
|
||||
@@ -2371,11 +2342,7 @@ namespace System.Windows.Forms
|
||||
|
||||
void IList.Remove (object value)
|
||||
{
|
||||
int? intValue = value as int?;
|
||||
if (!intValue.HasValue)
|
||||
throw new ArgumentException ("value");
|
||||
|
||||
Remove (intValue.Value);
|
||||
Remove ((int)value);
|
||||
}
|
||||
|
||||
void IList.RemoveAt (int index)
|
||||
@@ -2390,12 +2357,14 @@ namespace System.Windows.Forms
|
||||
#endregion
|
||||
|
||||
#region ICollection Members
|
||||
bool ICollection.IsSynchronized {
|
||||
get { return true; }
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get { throw new Exception ("The method or operation is not implemented."); }
|
||||
}
|
||||
|
||||
object ICollection.SyncRoot {
|
||||
get { return this; }
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get { throw new Exception ("The method or operation is not implemented."); }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -2416,31 +2385,6 @@ namespace System.Windows.Forms
|
||||
|
||||
private ListBox owner;
|
||||
internal ArrayList object_items = new ArrayList ();
|
||||
|
||||
#region UIA Framework Events
|
||||
#if NET_2_0
|
||||
//NOTE:
|
||||
// We are using Reflection to add/remove internal events.
|
||||
// Class ListProvider uses the events.
|
||||
//
|
||||
//Event used to generate UIA StructureChangedEvent
|
||||
static object UIACollectionChangedEvent = new object ();
|
||||
|
||||
internal event CollectionChangeEventHandler UIACollectionChanged {
|
||||
add { owner.Events.AddHandler (UIACollectionChangedEvent, value); }
|
||||
remove { owner.Events.RemoveHandler (UIACollectionChangedEvent, value); }
|
||||
}
|
||||
|
||||
internal void OnUIACollectionChangedEvent (CollectionChangeEventArgs args)
|
||||
{
|
||||
CollectionChangeEventHandler eh
|
||||
= (CollectionChangeEventHandler) owner.Events [UIACollectionChangedEvent];
|
||||
if (eh != null)
|
||||
eh (owner, args);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endregion UIA Framework Events
|
||||
|
||||
public ObjectCollection (ListBox owner)
|
||||
{
|
||||
@@ -2482,19 +2426,8 @@ namespace System.Windows.Forms
|
||||
throw new ArgumentOutOfRangeException ("Index of out range");
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Removed
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
|
||||
#endif
|
||||
|
||||
object_items[index] = value;
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
|
||||
#endif
|
||||
|
||||
owner.CollectionChanged ();
|
||||
}
|
||||
}
|
||||
@@ -2525,26 +2458,29 @@ namespace System.Windows.Forms
|
||||
|
||||
public void AddRange (object[] items)
|
||||
{
|
||||
AddItems (items);
|
||||
if (items == null)
|
||||
throw new ArgumentNullException ("items");
|
||||
|
||||
foreach (object mi in items)
|
||||
AddItem (mi);
|
||||
|
||||
owner.CollectionChanged ();
|
||||
}
|
||||
|
||||
public void AddRange (ObjectCollection value)
|
||||
{
|
||||
AddItems (value);
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
|
||||
foreach (object mi in value)
|
||||
AddItem (mi);
|
||||
|
||||
owner.CollectionChanged ();
|
||||
}
|
||||
|
||||
internal void AddItems (IList items)
|
||||
internal void AddRange (IList list)
|
||||
{
|
||||
if (items == null)
|
||||
throw new ArgumentNullException ("items");
|
||||
|
||||
#if ONLY_1_1
|
||||
foreach (object mi in items)
|
||||
if (mi == null)
|
||||
throw new ArgumentNullException ("item");
|
||||
#endif
|
||||
|
||||
foreach (object mi in items)
|
||||
foreach (object mi in list)
|
||||
AddItem (mi);
|
||||
|
||||
owner.CollectionChanged ();
|
||||
@@ -2555,13 +2491,7 @@ namespace System.Windows.Forms
|
||||
owner.selected_indices.Clear ();
|
||||
object_items.Clear ();
|
||||
owner.CollectionChanged ();
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Items list cleared
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Refresh, -1));
|
||||
#endif
|
||||
}
|
||||
|
||||
public bool Contains (object value)
|
||||
{
|
||||
if (value == null)
|
||||
@@ -2621,11 +2551,6 @@ namespace System.Windows.Forms
|
||||
object_items.Insert (index, item);
|
||||
owner.CollectionChanged ();
|
||||
owner.EndUpdate ();
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
@@ -2633,9 +2558,7 @@ namespace System.Windows.Forms
|
||||
if (value == null)
|
||||
return;
|
||||
|
||||
int index = IndexOf (value);
|
||||
if (index != -1)
|
||||
RemoveAt (index);
|
||||
RemoveAt (IndexOf (value));
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
@@ -2646,11 +2569,6 @@ namespace System.Windows.Forms
|
||||
owner.selected_indices.Remove (index);
|
||||
object_items.RemoveAt (index);
|
||||
owner.CollectionChanged ();
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Removed
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Remove, index));
|
||||
#endif
|
||||
}
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -2662,12 +2580,6 @@ namespace System.Windows.Forms
|
||||
|
||||
int cnt = object_items.Count;
|
||||
object_items.Add (item);
|
||||
|
||||
#if NET_2_0
|
||||
//UIA Framework event: Item Added
|
||||
OnUIACollectionChangedEvent (new CollectionChangeEventArgs (CollectionChangeAction.Add, cnt));
|
||||
#endif
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
||||
@@ -3521,7 +3521,7 @@ namespace System.Windows.Forms
|
||||
#if NET_2_0
|
||||
protected internal virtual void OnCacheVirtualItems (CacheVirtualItemsEventArgs e)
|
||||
{
|
||||
CacheVirtualItemsEventHandler eh = (CacheVirtualItemsEventHandler)Events [CacheVirtualItemsEvent];
|
||||
EventHandler eh = (EventHandler)Events [CacheVirtualItemsEvent];
|
||||
if (eh != null)
|
||||
eh (this, e);
|
||||
}
|
||||
|
||||
@@ -1129,15 +1129,15 @@ namespace System.Windows.Forms
|
||||
[TypeConverter (typeof(ListViewSubItemConverter))]
|
||||
public class ListViewSubItem
|
||||
{
|
||||
[NonSerialized]
|
||||
private Color back_color;
|
||||
private Font font;
|
||||
private Color fore_color;
|
||||
internal ListViewItem owner;
|
||||
private string text = string.Empty;
|
||||
#if NET_2_0
|
||||
private string name;
|
||||
private object userData;
|
||||
private string name = String.Empty;
|
||||
private object tag;
|
||||
#endif
|
||||
private SubItemStyle style;
|
||||
[NonSerialized]
|
||||
internal Rectangle bounds;
|
||||
|
||||
#region Public Constructors
|
||||
@@ -1156,22 +1156,23 @@ namespace System.Windows.Forms
|
||||
{
|
||||
this.owner = owner;
|
||||
Text = text;
|
||||
this.style = new SubItemStyle (foreColor,
|
||||
backColor, font);
|
||||
this.fore_color = foreColor;
|
||||
this.back_color = backColor;
|
||||
this.font = font;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public Color BackColor {
|
||||
get {
|
||||
if (style.backColor != Color.Empty)
|
||||
return style.backColor;
|
||||
if (this.back_color != Color.Empty)
|
||||
return this.back_color;
|
||||
if (this.owner != null && this.owner.ListView != null)
|
||||
return this.owner.ListView.BackColor;
|
||||
return ThemeEngine.Current.ColorWindow;
|
||||
}
|
||||
set {
|
||||
style.backColor = value;
|
||||
back_color = value;
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
@@ -1198,30 +1199,30 @@ namespace System.Windows.Forms
|
||||
[Localizable (true)]
|
||||
public Font Font {
|
||||
get {
|
||||
if (style.font != null)
|
||||
return style.font;
|
||||
if (font != null)
|
||||
return font;
|
||||
else if (owner != null)
|
||||
return owner.Font;
|
||||
return ThemeEngine.Current.DefaultFont;
|
||||
}
|
||||
set {
|
||||
if (style.font == value)
|
||||
set {
|
||||
if (font == value)
|
||||
return;
|
||||
style.font = value;
|
||||
font = value;
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Color ForeColor {
|
||||
get {
|
||||
if (style.foreColor != Color.Empty)
|
||||
return style.foreColor;
|
||||
if (this.fore_color != Color.Empty)
|
||||
return this.fore_color;
|
||||
if (this.owner != null && this.owner.ListView != null)
|
||||
return this.owner.ListView.ForeColor;
|
||||
return ThemeEngine.Current.ColorWindowText;
|
||||
}
|
||||
set {
|
||||
style.foreColor = value;
|
||||
set {
|
||||
fore_color = value;
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
@@ -1230,12 +1231,10 @@ namespace System.Windows.Forms
|
||||
[Localizable (true)]
|
||||
public string Name {
|
||||
get {
|
||||
if (name == null)
|
||||
return string.Empty;
|
||||
return name;
|
||||
}
|
||||
set {
|
||||
name = value;
|
||||
name = value == null ? String.Empty : value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1245,10 +1244,10 @@ namespace System.Windows.Forms
|
||||
[Localizable (false)]
|
||||
public object Tag {
|
||||
get {
|
||||
return userData;
|
||||
return tag;
|
||||
}
|
||||
set {
|
||||
userData = value;
|
||||
tag = value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1273,7 +1272,9 @@ namespace System.Windows.Forms
|
||||
#region Public Methods
|
||||
public void ResetStyle ()
|
||||
{
|
||||
style.Reset ();
|
||||
font = ThemeEngine.Current.DefaultFont;
|
||||
back_color = ThemeEngine.Current.DefaultControlBackColor;
|
||||
fore_color = ThemeEngine.Current.DefaultControlForeColor;
|
||||
Invalidate ();
|
||||
}
|
||||
|
||||
@@ -1283,6 +1284,7 @@ namespace System.Windows.Forms
|
||||
}
|
||||
#endregion // Public Methods
|
||||
|
||||
|
||||
#region Private Methods
|
||||
private void Invalidate ()
|
||||
{
|
||||
@@ -1292,15 +1294,6 @@ namespace System.Windows.Forms
|
||||
owner.Invalidate ();
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
[OnDeserialized]
|
||||
void OnDeserialized (StreamingContext context)
|
||||
{
|
||||
name = null;
|
||||
userData = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
internal int Height {
|
||||
get {
|
||||
return bounds.Height;
|
||||
@@ -1313,32 +1306,6 @@ namespace System.Windows.Forms
|
||||
}
|
||||
|
||||
#endregion // Private Methods
|
||||
|
||||
[Serializable]
|
||||
class SubItemStyle
|
||||
{
|
||||
public SubItemStyle ()
|
||||
{
|
||||
}
|
||||
|
||||
public SubItemStyle (Color foreColor, Color backColor, Font font)
|
||||
{
|
||||
this.foreColor = foreColor;
|
||||
this.backColor = backColor;
|
||||
this.font = font;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
foreColor = Color.Empty;
|
||||
backColor = Color.Empty;
|
||||
font = null;
|
||||
}
|
||||
|
||||
public Color backColor;
|
||||
public Color foreColor;
|
||||
public Font font;
|
||||
}
|
||||
}
|
||||
|
||||
public class ListViewSubItemCollection : IList, ICollection, IEnumerable
|
||||
|
||||
@@ -93,7 +93,8 @@ namespace System.Windows.Forms {
|
||||
active = false;
|
||||
popup_active = false;
|
||||
hotkey_active = false;
|
||||
GrabControl.ActiveTracker = null;
|
||||
if (GrabControl != null)
|
||||
GrabControl.ActiveTracker = null;
|
||||
keynav_state = KeyNavState.Idle;
|
||||
if (TopMenu is ContextMenu) {
|
||||
PopUpWindow puw = TopMenu.Wnd as PopUpWindow;
|
||||
|
||||
@@ -57,7 +57,6 @@ namespace System.Windows.Forms {
|
||||
private Image initial_image;
|
||||
private bool wait_on_load;
|
||||
private WebClient image_download;
|
||||
private bool image_from_url;
|
||||
#endif
|
||||
private int no_update;
|
||||
#endregion // Fields
|
||||
@@ -121,7 +120,22 @@ namespace System.Windows.Forms {
|
||||
[Localizable(true)]
|
||||
public Image Image {
|
||||
get { return image; }
|
||||
set { ChangeImage (value, false); }
|
||||
set {
|
||||
StopAnimation ();
|
||||
|
||||
image = value;
|
||||
|
||||
if (IsHandleCreated) {
|
||||
UpdateSize ();
|
||||
if (image != null && ImageAnimator.CanAnimate (image)) {
|
||||
frame_handler = new EventHandler (OnAnimateImage);
|
||||
ImageAnimator.Animate (image, frame_handler);
|
||||
}
|
||||
if (no_update == 0) {
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultValue(BorderStyle.None)]
|
||||
@@ -161,13 +175,8 @@ namespace System.Windows.Forms {
|
||||
set {
|
||||
image_location = value;
|
||||
|
||||
if (!string.IsNullOrEmpty (value)) {
|
||||
if (WaitOnLoad)
|
||||
Load (value);
|
||||
else
|
||||
LoadAsync (value);
|
||||
} else if (image_from_url)
|
||||
ChangeImage (null, true);
|
||||
if (!string.IsNullOrEmpty (value))
|
||||
Load (value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +276,7 @@ namespace System.Windows.Forms {
|
||||
|
||||
protected override void OnPaint (PaintEventArgs pe)
|
||||
{
|
||||
ThemeEngine.Current.DrawPictureBox (pe.Graphics, pe.ClipRectangle, this);
|
||||
ThemeEngine.Current.DrawPictureBox (pe.Graphics, pe.ClipRectangle, this);
|
||||
base.OnPaint (pe);
|
||||
}
|
||||
|
||||
@@ -378,29 +387,7 @@ namespace System.Windows.Forms {
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void ChangeImage (Image value, bool from_url)
|
||||
{
|
||||
StopAnimation ();
|
||||
|
||||
#if NET_2_0
|
||||
image_from_url = from_url;
|
||||
#endif
|
||||
image = value;
|
||||
|
||||
if (IsHandleCreated) {
|
||||
UpdateSize ();
|
||||
if (image != null && ImageAnimator.CanAnimate (image)) {
|
||||
frame_handler = new EventHandler (OnAnimateImage);
|
||||
ImageAnimator.Animate (image, frame_handler);
|
||||
}
|
||||
if (no_update == 0) {
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
private void StopAnimation ()
|
||||
{
|
||||
if (frame_handler == null)
|
||||
@@ -456,7 +443,7 @@ namespace System.Windows.Forms {
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if NET_2_0
|
||||
void ImageDownload_DownloadDataCompleted (object sender, DownloadDataCompletedEventArgs e)
|
||||
{
|
||||
@@ -502,9 +489,9 @@ namespace System.Windows.Forms {
|
||||
|
||||
if (url.Contains ("://"))
|
||||
using (Stream s = ImageDownload.OpenRead (url))
|
||||
ChangeImage (Image.FromStream (s), true);
|
||||
Image = Image.FromStream (s);
|
||||
else
|
||||
ChangeImage (Image.FromFile (url), true);
|
||||
Image = Image.FromFile (url);
|
||||
}
|
||||
|
||||
public void LoadAsync ()
|
||||
@@ -519,29 +506,17 @@ namespace System.Windows.Forms {
|
||||
Load (url);
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty (url))
|
||||
throw new InvalidOperationException ("ImageLocation not specified.");
|
||||
|
||||
image_location = url;
|
||||
ChangeImage (InitialImage, true);
|
||||
Image = InitialImage;
|
||||
|
||||
if (ImageDownload.IsBusy)
|
||||
ImageDownload.CancelAsync ();
|
||||
|
||||
Uri uri = null;
|
||||
try {
|
||||
uri = new Uri (url);
|
||||
} catch (UriFormatException) {
|
||||
uri = new Uri (Path.GetFullPath (url));
|
||||
}
|
||||
|
||||
ImageDownload.DownloadProgressChanged += new DownloadProgressChangedEventHandler (ImageDownload_DownloadProgressChanged);
|
||||
ImageDownload.DownloadDataCompleted += new DownloadDataCompletedEventHandler (ImageDownload_DownloadDataCompleted);
|
||||
ImageDownload.DownloadDataAsync (uri);
|
||||
ImageDownload.DownloadDataAsync (new Uri (url));
|
||||
}
|
||||
#endif
|
||||
|
||||
public override string ToString() {
|
||||
return String.Format("{0}, SizeMode: {1}", base.ToString (), SizeMode);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace System.Windows.Forms
|
||||
tool_strip_border = Color.FromArgb (219, 216, 209);
|
||||
tool_strip_content_panel_gradient_begin = SystemColors.ButtonFace;
|
||||
tool_strip_content_panel_gradient_end = Color.FromArgb (246, 245, 244);
|
||||
tool_strip_drop_down_background = SystemColors.Window;
|
||||
tool_strip_drop_down_background = Color.FromArgb (249, 248, 247);
|
||||
|
||||
tool_strip_gradient_begin = Color.FromArgb (245, 244, 242);
|
||||
tool_strip_gradient_end = SystemColors.ButtonFace;
|
||||
|
||||
@@ -603,7 +603,6 @@ namespace System.Windows.Forms
|
||||
|
||||
internal void OnPropertyValueChangedInternal (GridItem item, object property_value)
|
||||
{
|
||||
PopulateSubGridItems (selected_grid_item);
|
||||
property_grid_view.UpdateView ();
|
||||
OnPropertyValueChanged (new PropertyValueChangedEventArgs (item, property_value));
|
||||
}
|
||||
@@ -762,7 +761,14 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (false)]
|
||||
public bool UseCompatibleTextRendering {
|
||||
get { return use_compatible_text_rendering; }
|
||||
set { use_compatible_text_rendering = value; }
|
||||
set {
|
||||
if (use_compatible_text_rendering != value) {
|
||||
use_compatible_text_rendering = value;
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "UseCompatibleTextRendering");
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1583,144 +1589,13 @@ namespace System.Windows.Forms
|
||||
{
|
||||
if (objects.Length > 0) {
|
||||
root_grid_item = new RootGridEntry (this, objects);
|
||||
PopulateRootGridItems (root_grid_item, objects, GetMergedPropertyNames (objects));
|
||||
root_grid_item.Expanded = true;
|
||||
UpdateSortLayout (root_grid_item);
|
||||
} else {
|
||||
root_grid_item = null;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsPropertyVisible (PropertyDescriptor property, bool merging)
|
||||
{
|
||||
if (property == null)
|
||||
return false;
|
||||
|
||||
if (merging) {
|
||||
MergablePropertyAttribute attrib = property.Attributes [typeof (MergablePropertyAttribute)] as MergablePropertyAttribute;
|
||||
if (attrib != null && !attrib.AllowMerge)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private string[] GetMergedPropertyNames (object [] objects)
|
||||
{
|
||||
ArrayList intersection = null;
|
||||
for (int i = 0; i < objects.Length; i ++) {
|
||||
if (objects [i] == null)
|
||||
continue;
|
||||
|
||||
PropertyDescriptorCollection properties = GetProperties (objects[i], BrowsableAttributes);
|
||||
ArrayList new_intersection = new ArrayList ();
|
||||
|
||||
foreach (PropertyDescriptor currentProperty in (i == 0 ? (ICollection)properties : (ICollection)intersection)) {
|
||||
PropertyDescriptor matchingProperty = (i == 0 ? currentProperty : properties [currentProperty.Name]);
|
||||
|
||||
if (!IsPropertyVisible (matchingProperty, objects.Length > 1))
|
||||
continue;
|
||||
if (matchingProperty.PropertyType == currentProperty.PropertyType)
|
||||
new_intersection.Add (matchingProperty);
|
||||
}
|
||||
|
||||
intersection = new_intersection;
|
||||
}
|
||||
|
||||
string[] propertyNames = new string [intersection.Count];
|
||||
for (int i=0; i < intersection.Count; i++)
|
||||
propertyNames[i] = ((PropertyDescriptor)intersection[i]).Name;
|
||||
|
||||
return propertyNames;
|
||||
}
|
||||
|
||||
private PropertyDescriptor GetPropertyDescriptor (object propertyOwner, string propertyName)
|
||||
{
|
||||
if (propertyOwner == null || propertyName == null)
|
||||
return null;
|
||||
|
||||
PropertyDescriptorCollection properties = GetProperties (propertyOwner, BrowsableAttributes);
|
||||
if (properties != null)
|
||||
return properties[propertyName];
|
||||
return null;
|
||||
}
|
||||
|
||||
private PropertyDescriptorCollection GetProperties (object propertyOwner, AttributeCollection attributes)
|
||||
{
|
||||
if (propertyOwner == null || selected_tab == null)
|
||||
return new PropertyDescriptorCollection (null);
|
||||
|
||||
Attribute[] atts = new Attribute[attributes.Count];
|
||||
attributes.CopyTo (atts, 0);
|
||||
return selected_tab.GetProperties (propertyOwner, atts);
|
||||
}
|
||||
|
||||
private void PopulateRootGridItems (GridEntry rootItem, object[] propertyOwners, string[] propertyNames)
|
||||
{
|
||||
if (propertyOwners == null || propertyNames == null)
|
||||
return;
|
||||
|
||||
bool categorized = property_sort == PropertySort.Categorized ||
|
||||
property_sort == PropertySort.CategorizedAlphabetical;
|
||||
rootItem.GridItems.Clear ();
|
||||
|
||||
foreach (string propertyName in propertyNames) {
|
||||
GridEntry item = null;
|
||||
PropertyDescriptor[] properties = new PropertyDescriptor[propertyOwners.Length];
|
||||
for (int i=0; i < propertyOwners.Length; i++)
|
||||
properties[i] = GetPropertyDescriptor (propertyOwners[i], propertyName);
|
||||
|
||||
if (categorized) {
|
||||
string categoryName = null;
|
||||
foreach (PropertyDescriptor property in properties) {
|
||||
categoryName = property.Category;
|
||||
if (categoryName != null)
|
||||
break;
|
||||
}
|
||||
if (categoryName == null)
|
||||
categoryName = UNCATEGORIZED_CATEGORY_LABEL;
|
||||
GridEntry category = (GridEntry)root_grid_item.GridItems[categoryName];
|
||||
if (category == null) {
|
||||
category = new CategoryGridEntry (this, categoryName, rootItem);
|
||||
category.Expanded = true;
|
||||
rootItem.GridItems.Add (category);
|
||||
}
|
||||
item = new GridEntry (this, properties, category);
|
||||
category.GridItems.Add (item);
|
||||
} else {
|
||||
item = new GridEntry (this, properties, rootItem);
|
||||
rootItem.GridItems.Add (item);
|
||||
}
|
||||
|
||||
PopulateSubGridItems (item);
|
||||
}
|
||||
}
|
||||
|
||||
private void PopulateSubGridItems (GridEntry parentItem)
|
||||
{
|
||||
parentItem.GridItems.Clear ();
|
||||
if (!parentItem.IsExpandable)
|
||||
return;
|
||||
|
||||
object[] propertyOwners = parentItem.Values;
|
||||
if (propertyOwners == null)
|
||||
return;
|
||||
|
||||
PropertyDescriptorCollection propertiesCollection = GetProperties (propertyOwners[0], BrowsableAttributes);
|
||||
if (propertiesCollection == null)
|
||||
return;
|
||||
|
||||
foreach (PropertyDescriptor property in propertiesCollection) {
|
||||
string propertyName = property.Name;
|
||||
|
||||
PropertyDescriptor[] properties = new PropertyDescriptor[propertyOwners.Length];
|
||||
for (int i=0; i < propertyOwners.Length; i++)
|
||||
properties[i] = GetPropertyDescriptor (propertyOwners[i], propertyName);
|
||||
|
||||
GridEntry item = new GridEntry (this, properties, parentItem);
|
||||
parentItem.GridItems.Add (item);
|
||||
PopulateSubGridItems (item);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateSortLayout (GridEntry rootItem)
|
||||
{
|
||||
if (rootItem == null)
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace System.Windows.Forms.PropertyGridInternal {
|
||||
brush = SystemBrushes.HighlightText;
|
||||
}
|
||||
else {
|
||||
brush = grid_item.IsReadOnly && !grid_item.IsExpandable ? inactive_text_brush : SystemBrushes.ControlText;
|
||||
brush = grid_item.IsReadOnly ? inactive_text_brush : SystemBrushes.ControlText;
|
||||
}
|
||||
}
|
||||
pevent.Graphics.DrawString (grid_item.Label, font, brush,
|
||||
@@ -647,7 +647,7 @@ namespace System.Windows.Forms.PropertyGridInternal {
|
||||
Font font = this.Font;
|
||||
if (grid_item.IsResetable || !grid_item.HasDefaultValue)
|
||||
font = bold_font;
|
||||
Brush brush = grid_item.IsReadOnly && !grid_item.IsExpandable ? inactive_text_brush : SystemBrushes.ControlText;
|
||||
Brush brush = grid_item.IsReadOnly ? inactive_text_brush : SystemBrushes.ControlText;
|
||||
string valueText = String.Empty;
|
||||
if (!grid_item.IsMerged || grid_item.IsMerged && grid_item.HasMergedValue) {
|
||||
if (grid_item.IsPassword)
|
||||
@@ -854,7 +854,7 @@ namespace System.Windows.Forms.PropertyGridInternal {
|
||||
else
|
||||
grid_textbox.Font = this.Font;
|
||||
|
||||
if (entry.IsReadOnly && !entry.IsExpandable) {
|
||||
if (entry.IsReadOnly) {
|
||||
grid_textbox.DropDownButtonVisible = false;
|
||||
grid_textbox.DialogButtonVisible = false;
|
||||
grid_textbox.ReadOnly = true;
|
||||
|
||||
@@ -188,6 +188,8 @@ namespace System.Windows.Forms {
|
||||
EventHandler eh = (EventHandler)(Events [AppearanceChangedEvent]);
|
||||
if (eh != null)
|
||||
eh (this, EventArgs.Empty);
|
||||
if (Parent != null)
|
||||
Parent.PerformLayout (this, "Appearance");
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,12 +53,6 @@ namespace System.Windows.Forms {
|
||||
|
||||
OnCurrentChanged (EventArgs.Empty);
|
||||
}
|
||||
|
||||
public override PropertyDescriptorCollection GetItemProperties ()
|
||||
{
|
||||
PropertyDescriptor property = parent.GetItemProperties ().Find (property_name, true);
|
||||
return TypeDescriptor.GetProperties (property.PropertyType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace System.Windows.Forms.PropertyGridInternal
|
||||
val = obj;
|
||||
}
|
||||
|
||||
public override bool Expandable {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override GridItemType GridItemType {
|
||||
get { return GridItemType.Root; }
|
||||
}
|
||||
|
||||
@@ -783,13 +783,6 @@ namespace System.Windows.Forms
|
||||
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
|
||||
OnScroll (event_args);
|
||||
Value = event_args.NewValue;
|
||||
|
||||
#if NET_2_0
|
||||
// UIA Framework event invoked when the "LargeIncrement
|
||||
// Button" is "clicked" either by using the Invoke Pattern
|
||||
// or the space between the thumb and the bottom/right button
|
||||
OnUIAScroll (new ScrollEventArgs (ScrollEventType.LargeIncrement, Value));
|
||||
#endif
|
||||
}
|
||||
|
||||
private void LargeDecrement ()
|
||||
@@ -804,13 +797,6 @@ namespace System.Windows.Forms
|
||||
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
|
||||
OnScroll (event_args);
|
||||
Value = event_args.NewValue;
|
||||
|
||||
#if NET_2_0
|
||||
// UIA Framework event invoked when the "LargeDecrement
|
||||
// Button" is "clicked" either by using the Invoke Pattern
|
||||
// or the space between the thumb and the top/left button
|
||||
OnUIAScroll (new ScrollEventArgs (ScrollEventType.LargeDecrement, Value));
|
||||
#endif
|
||||
}
|
||||
|
||||
private void OnResizeSB (Object o, EventArgs e)
|
||||
@@ -1305,13 +1291,6 @@ namespace System.Windows.Forms
|
||||
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
|
||||
OnScroll (event_args);
|
||||
Value = event_args.NewValue;
|
||||
|
||||
#if NET_2_0
|
||||
// UIA Framework event invoked when the "SmallIncrement
|
||||
// Button" (a.k.a bottom/right button) is "clicked" either
|
||||
// by using the Invoke Pattern or the button itself
|
||||
OnUIAScroll (new ScrollEventArgs (ScrollEventType.SmallIncrement, Value));
|
||||
#endif
|
||||
}
|
||||
|
||||
private void SmallDecrement ()
|
||||
@@ -1326,13 +1305,6 @@ namespace System.Windows.Forms
|
||||
event_args = new ScrollEventArgs (ScrollEventType.EndScroll, Value);
|
||||
OnScroll (event_args);
|
||||
Value = event_args.NewValue;
|
||||
|
||||
#if NET_2_0
|
||||
// UIA Framework event invoked when the "SmallDecrement
|
||||
// Button" (a.k.a top/left button) is "clicked" either
|
||||
// by using the Invoke Pattern or the button itself
|
||||
OnUIAScroll (new ScrollEventArgs (ScrollEventType.SmallDecrement, Value));
|
||||
#endif
|
||||
}
|
||||
|
||||
private void SetHoldButtonClickTimer ()
|
||||
@@ -1556,64 +1528,6 @@ namespace System.Windows.Forms
|
||||
base.OnMouseWheel (e);
|
||||
}
|
||||
#endif
|
||||
|
||||
#region UIA Framework Section: Events, Methods and Properties.
|
||||
|
||||
#if NET_2_0
|
||||
//NOTE:
|
||||
// We are using Reflection to add/remove internal events.
|
||||
// Class ScrollBarButtonInvokePatternInvokeEvent uses the events.
|
||||
//
|
||||
// Events used to generate UIA InvokedEvent
|
||||
// * args.Type = ScrollEventType.LargeIncrement. Space between Thumb and bottom/right Button
|
||||
// * args.Type = ScrollEventType.LargeDecrement. Space between Thumb and top/left Button
|
||||
// * args.Type = ScrollEventType.SmallIncrement. Small increment UIA Button (bottom/right Button)
|
||||
// * args.Type = ScrollEventType.SmallDecrement. Small decrement UIA Button (top/left Button)
|
||||
static object UIAScrollEvent = new object ();
|
||||
|
||||
internal event ScrollEventHandler UIAScroll {
|
||||
add { Events.AddHandler (UIAScrollEvent, value); }
|
||||
remove { Events.RemoveHandler (UIAScrollEvent, value); }
|
||||
}
|
||||
|
||||
internal void OnUIAScroll (ScrollEventArgs args)
|
||||
{
|
||||
ScrollEventHandler eh = (ScrollEventHandler) Events [UIAScrollEvent];
|
||||
if (eh != null)
|
||||
eh (this, args);
|
||||
}
|
||||
|
||||
//NOTE:
|
||||
// Wrapper methods used by the Reflection.
|
||||
// Class ScrollBarButtonInvokeProviderBehavior uses the events.
|
||||
//
|
||||
internal void UIALargeIncrement ()
|
||||
{
|
||||
LargeIncrement ();
|
||||
}
|
||||
|
||||
internal void UIALargeDecrement ()
|
||||
{
|
||||
LargeDecrement ();
|
||||
}
|
||||
|
||||
internal void UIASmallIncrement ()
|
||||
{
|
||||
SmallIncrement ();
|
||||
}
|
||||
|
||||
internal void UIASmallDecrement ()
|
||||
{
|
||||
SmallDecrement ();
|
||||
}
|
||||
|
||||
internal Rectangle UIAThumbArea {
|
||||
get { return thumb_area; }
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion UIA Framework Section: Events, Methods and Properties.
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ using System.ComponentModel.Design;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms.Theming;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
#if NET_2_0
|
||||
@@ -56,11 +55,10 @@ namespace System.Windows.Forms {
|
||||
private bool show_tool_tips;
|
||||
private TabSizeMode size_mode;
|
||||
private bool show_slider = false;
|
||||
private PushButtonState right_slider_state = PushButtonState.Normal;
|
||||
private PushButtonState left_slider_state = PushButtonState.Normal;
|
||||
private ButtonState right_slider_state;
|
||||
private ButtonState left_slider_state;
|
||||
private int slider_pos = 0;
|
||||
TabPage entered_tab_page;
|
||||
bool mouse_down_on_a_tab_page;
|
||||
#if NET_2_0
|
||||
private bool rightToLeftLayout;
|
||||
#endif
|
||||
@@ -317,7 +315,7 @@ namespace System.Windows.Forms {
|
||||
|
||||
if (new_index != -1) {
|
||||
int le = TabPages[new_index].TabBounds.Right;
|
||||
int re = LeftScrollButtonArea.Left;
|
||||
int re = ThemeEngine.Current.TabControlGetLeftScrollRect (this).Left;
|
||||
if (show_slider && le > re) {
|
||||
int i = 0;
|
||||
for (i = 0; i < new_index - 1; i++) {
|
||||
@@ -453,36 +451,12 @@ namespace System.Windows.Forms {
|
||||
get { return slider_pos; }
|
||||
}
|
||||
|
||||
internal PushButtonState RightSliderState {
|
||||
internal ButtonState RightSliderState {
|
||||
get { return right_slider_state; }
|
||||
private set {
|
||||
if (right_slider_state == value)
|
||||
return;
|
||||
PushButtonState old_value = right_slider_state;
|
||||
right_slider_state = value;
|
||||
if (NeedsToInvalidateScrollButton (old_value, value))
|
||||
Invalidate (RightScrollButtonArea);
|
||||
}
|
||||
}
|
||||
|
||||
internal PushButtonState LeftSliderState {
|
||||
internal ButtonState LeftSliderState {
|
||||
get { return left_slider_state; }
|
||||
set {
|
||||
if (left_slider_state == value)
|
||||
return;
|
||||
PushButtonState old_value = left_slider_state;
|
||||
left_slider_state = value;
|
||||
if (NeedsToInvalidateScrollButton (old_value, value))
|
||||
Invalidate (LeftScrollButtonArea);
|
||||
}
|
||||
}
|
||||
|
||||
bool NeedsToInvalidateScrollButton (PushButtonState oldState, PushButtonState newState)
|
||||
{
|
||||
if ((oldState == PushButtonState.Hot && newState == PushButtonState.Normal) ||
|
||||
(oldState == PushButtonState.Normal && newState == PushButtonState.Hot))
|
||||
return HasHotElementStyles;
|
||||
return true;
|
||||
}
|
||||
|
||||
internal TabPage EnteredTabPage {
|
||||
@@ -490,7 +464,7 @@ namespace System.Windows.Forms {
|
||||
private set {
|
||||
if (entered_tab_page == value)
|
||||
return;
|
||||
if (HasHotElementStyles) {
|
||||
if (ThemeElements.CurrentTheme.TabControlPainter.HasHotElementStyles (this)) {
|
||||
Region area_to_invalidate = new Region ();
|
||||
area_to_invalidate.MakeEmpty ();
|
||||
if (entered_tab_page != null)
|
||||
@@ -908,10 +882,10 @@ namespace System.Windows.Forms {
|
||||
return;
|
||||
|
||||
if (ShowSlider) {
|
||||
Rectangle right = RightScrollButtonArea;
|
||||
Rectangle left = LeftScrollButtonArea;
|
||||
Rectangle right = ThemeEngine.Current.TabControlGetRightScrollRect (this);
|
||||
Rectangle left = ThemeEngine.Current.TabControlGetLeftScrollRect (this);
|
||||
if (right.Contains (e.X, e.Y)) {
|
||||
right_slider_state = PushButtonState.Pressed;
|
||||
right_slider_state = ButtonState.Pushed;
|
||||
if (CanScrollRight) {
|
||||
slider_pos++;
|
||||
SizeTabs ();
|
||||
@@ -936,7 +910,7 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
return;
|
||||
} else if (left.Contains (e.X, e.Y)) {
|
||||
left_slider_state = PushButtonState.Pressed;
|
||||
left_slider_state = ButtonState.Pushed;
|
||||
if (CanScrollLeft) {
|
||||
slider_pos--;
|
||||
SizeTabs ();
|
||||
@@ -967,50 +941,25 @@ namespace System.Windows.Forms {
|
||||
if (!GetTabRect (i).Contains (e.X, e.Y))
|
||||
continue;
|
||||
SelectedIndex = i;
|
||||
mouse_down_on_a_tab_page = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void MouseUpHandler (object sender, MouseEventArgs e)
|
||||
{
|
||||
mouse_down_on_a_tab_page = false;
|
||||
if (ShowSlider && (left_slider_state == PushButtonState.Pressed || right_slider_state == PushButtonState.Pressed)) {
|
||||
if (ShowSlider && (left_slider_state == ButtonState.Pushed || right_slider_state == ButtonState.Pushed)) {
|
||||
Rectangle invalid;
|
||||
if (left_slider_state == PushButtonState.Pressed) {
|
||||
invalid = LeftScrollButtonArea;
|
||||
left_slider_state = GetScrollButtonState (invalid, e.Location);
|
||||
} else {
|
||||
invalid = RightScrollButtonArea;
|
||||
right_slider_state = GetScrollButtonState (invalid, e.Location);
|
||||
}
|
||||
if (left_slider_state == ButtonState.Pushed)
|
||||
invalid = ThemeEngine.Current.TabControlGetLeftScrollRect (this);
|
||||
else
|
||||
invalid = ThemeEngine.Current.TabControlGetRightScrollRect (this);
|
||||
left_slider_state = ButtonState.Normal;
|
||||
right_slider_state = ButtonState.Normal;
|
||||
|
||||
Invalidate (invalid);
|
||||
}
|
||||
}
|
||||
|
||||
bool HasHotElementStyles {
|
||||
get {
|
||||
return ThemeElements.CurrentTheme.TabControlPainter.HasHotElementStyles (this);
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle LeftScrollButtonArea {
|
||||
get {
|
||||
return ThemeElements.CurrentTheme.TabControlPainter.GetLeftScrollRect (this);
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle RightScrollButtonArea {
|
||||
get {
|
||||
return ThemeElements.CurrentTheme.TabControlPainter.GetRightScrollRect (this);
|
||||
}
|
||||
}
|
||||
|
||||
static PushButtonState GetScrollButtonState (Rectangle scrollButtonArea, Point cursorLocation)
|
||||
{
|
||||
return scrollButtonArea.Contains (cursorLocation) ? PushButtonState.Hot : PushButtonState.Normal;
|
||||
}
|
||||
|
||||
private void SizeChangedHandler (object sender, EventArgs e)
|
||||
{
|
||||
Redraw ();
|
||||
@@ -1435,25 +1384,6 @@ namespace System.Windows.Forms {
|
||||
|
||||
void OnMouseMove (object sender, MouseEventArgs e)
|
||||
{
|
||||
if (!mouse_down_on_a_tab_page && ShowSlider) {
|
||||
if (LeftSliderState == PushButtonState.Pressed ||
|
||||
RightSliderState == PushButtonState.Pressed)
|
||||
return;
|
||||
if (LeftScrollButtonArea.Contains (e.Location)) {
|
||||
LeftSliderState = PushButtonState.Hot;
|
||||
RightSliderState = PushButtonState.Normal;
|
||||
EnteredTabPage = null;
|
||||
return;
|
||||
}
|
||||
if (RightScrollButtonArea.Contains (e.Location)) {
|
||||
RightSliderState = PushButtonState.Hot;
|
||||
LeftSliderState = PushButtonState.Normal;
|
||||
EnteredTabPage = null;
|
||||
return;
|
||||
}
|
||||
LeftSliderState = PushButtonState.Normal;
|
||||
RightSliderState = PushButtonState.Normal;
|
||||
}
|
||||
if (EnteredTabPage != null && EnteredTabPage.TabBounds.Contains (e.Location))
|
||||
return;
|
||||
for (int index = 0; index < TabCount; index++) {
|
||||
@@ -1468,10 +1398,6 @@ namespace System.Windows.Forms {
|
||||
|
||||
void OnMouseLeave (object sender, EventArgs e)
|
||||
{
|
||||
if (ShowSlider) {
|
||||
LeftSliderState = PushButtonState.Normal;
|
||||
RightSliderState = PushButtonState.Normal;
|
||||
}
|
||||
EnteredTabPage = null;
|
||||
}
|
||||
#endregion // Internal & Private Methods
|
||||
|
||||
@@ -96,12 +96,7 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (0)]
|
||||
public int ColumnCount {
|
||||
get { return settings.ColumnCount; }
|
||||
set {
|
||||
if (settings.ColumnCount != value) {
|
||||
settings.ColumnCount = value;
|
||||
this.PerformLayout (this, "ColumnCount");
|
||||
}
|
||||
}
|
||||
set { settings.ColumnCount = value; }
|
||||
}
|
||||
|
||||
[Browsable (false)]
|
||||
@@ -121,12 +116,7 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (TableLayoutPanelGrowStyle.AddRows)]
|
||||
public TableLayoutPanelGrowStyle GrowStyle {
|
||||
get { return settings.GrowStyle; }
|
||||
set {
|
||||
if (settings.GrowStyle != value) {
|
||||
settings.GrowStyle = value;
|
||||
PerformLayout (this, "GrowStyle");
|
||||
}
|
||||
}
|
||||
set { settings.GrowStyle = value; }
|
||||
}
|
||||
|
||||
public override System.Windows.Forms.Layout.LayoutEngine LayoutEngine {
|
||||
@@ -155,12 +145,7 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (0)]
|
||||
public int RowCount {
|
||||
get { return settings.RowCount; }
|
||||
set {
|
||||
if (settings.RowCount != value) {
|
||||
settings.RowCount = value;
|
||||
this.PerformLayout (this, "RowCount");
|
||||
}
|
||||
}
|
||||
set { settings.RowCount = value; }
|
||||
}
|
||||
|
||||
[Browsable (false)]
|
||||
@@ -252,31 +237,26 @@ namespace System.Windows.Forms
|
||||
public void SetCellPosition (Control control, TableLayoutPanelCellPosition position)
|
||||
{
|
||||
settings.SetCellPosition (control, position);
|
||||
this.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetColumn (Control control, int column)
|
||||
{
|
||||
settings.SetColumn (control, column);
|
||||
this.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetColumnSpan (Control control, int value)
|
||||
{
|
||||
settings.SetColumnSpan (control, value);
|
||||
this.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetRow (Control control, int row)
|
||||
{
|
||||
settings.SetRow (control, row);
|
||||
this.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetRowSpan (Control control, int value)
|
||||
{
|
||||
settings.SetRowSpan (control, value);
|
||||
this.PerformLayout ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -526,7 +506,7 @@ namespace System.Windows.Forms
|
||||
|
||||
internal override Size GetPreferredSizeCore (Size proposedSize)
|
||||
{
|
||||
// If the tablelayoutpanel is autosize, we have to make sure it is big enough
|
||||
// If the tablelayoutowner is autosize, we have to make sure it is big enough
|
||||
// to hold every non-autosize control
|
||||
actual_positions = (LayoutEngine as TableLayout).CalculateControlPositions (this, Math.Max (ColumnCount, 1), Math.Max (RowCount, 1));
|
||||
|
||||
@@ -534,7 +514,7 @@ namespace System.Windows.Forms
|
||||
int actual_cols = actual_positions.GetLength (0);
|
||||
int actual_rows = actual_positions.GetLength (1);
|
||||
|
||||
// Figure out how wide the panel needs to be
|
||||
// Figure out how wide the owner needs to be
|
||||
int[] column_widths = new int[actual_cols];
|
||||
float total_column_percentage = 0f;
|
||||
|
||||
@@ -560,7 +540,7 @@ namespace System.Windows.Forms
|
||||
}
|
||||
|
||||
// Because percentage based rows divy up the remaining space,
|
||||
// we have to make the panel big enough so that all the rows
|
||||
// we have to make the owner big enough so that all the rows
|
||||
// get bigger, even if we only need one to be bigger.
|
||||
int non_percent_total_width = 0;
|
||||
int percent_total_width = 0;
|
||||
@@ -573,7 +553,7 @@ namespace System.Windows.Forms
|
||||
}
|
||||
|
||||
|
||||
// Figure out how tall the panel needs to be
|
||||
// Figure out how tall the owner needs to be
|
||||
int[] row_heights = new int[actual_rows];
|
||||
float total_row_percentage = 0f;
|
||||
|
||||
@@ -599,7 +579,7 @@ namespace System.Windows.Forms
|
||||
}
|
||||
|
||||
// Because percentage based rows divy up the remaining space,
|
||||
// we have to make the panel big enough so that all the rows
|
||||
// we have to make the owner big enough so that all the rows
|
||||
// get bigger, even if we only need one to be bigger.
|
||||
int non_percent_total_height = 0;
|
||||
int percent_total_height = 0;
|
||||
|
||||
@@ -95,7 +95,10 @@ namespace System.Windows.Forms
|
||||
if (value < 0)
|
||||
throw new ArgumentOutOfRangeException();
|
||||
|
||||
column_count = value;
|
||||
if (column_count != value) {
|
||||
column_count = value;
|
||||
panel.PerformLayout (panel, "ColumnCount");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +114,10 @@ namespace System.Windows.Forms
|
||||
if (!Enum.IsDefined (typeof(TableLayoutPanelGrowStyle), value))
|
||||
throw new ArgumentException();
|
||||
|
||||
grow_style = value;
|
||||
if (grow_style != value) {
|
||||
grow_style = value;
|
||||
panel.PerformLayout (panel, "GrowStyle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +131,11 @@ namespace System.Windows.Forms
|
||||
set {
|
||||
if (value < 0)
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
row_count = value;
|
||||
|
||||
if (row_count != value) {
|
||||
row_count = value;
|
||||
panel.PerformLayout (panel, "RowCount");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,6 +225,7 @@ namespace System.Windows.Forms
|
||||
|
||||
columns[control] = cellPosition.Column;
|
||||
rows[control] = cellPosition.Row;
|
||||
panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetColumn (Object control, int column)
|
||||
@@ -225,6 +236,7 @@ namespace System.Windows.Forms
|
||||
throw new ArgumentException ();
|
||||
|
||||
columns[control] = column;
|
||||
panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetColumnSpan (Object control, int value)
|
||||
@@ -235,6 +247,7 @@ namespace System.Windows.Forms
|
||||
throw new ArgumentException ();
|
||||
|
||||
column_spans[control] = value;
|
||||
panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetRow (Object control, int row)
|
||||
@@ -245,6 +258,7 @@ namespace System.Windows.Forms
|
||||
throw new ArgumentException ();
|
||||
|
||||
rows[control] = row;
|
||||
panel.PerformLayout ();
|
||||
}
|
||||
|
||||
public void SetRowSpan (Object control, int value)
|
||||
@@ -255,6 +269,7 @@ namespace System.Windows.Forms
|
||||
throw new ArgumentException ();
|
||||
|
||||
row_spans[control] = value;
|
||||
panel.PerformLayout ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -379,6 +379,7 @@ namespace System.Windows.Forms {
|
||||
document.PasswordChar = PasswordChar.ToString ();
|
||||
else
|
||||
document.PasswordChar = string.Empty;
|
||||
Invalidate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -945,6 +945,8 @@ namespace System.Windows.Forms
|
||||
public abstract Point TabControlImagePadding { get; }
|
||||
public abstract int TabControlScrollerWidth { get; }
|
||||
|
||||
public abstract Rectangle TabControlGetLeftScrollRect (TabControl tab);
|
||||
public abstract Rectangle TabControlGetRightScrollRect (TabControl tab);
|
||||
public abstract Rectangle TabControlGetDisplayRectangle (TabControl tab);
|
||||
public abstract Rectangle TabControlGetPanelRect (TabControl tab);
|
||||
public abstract Size TabControlGetSpacing (TabControl tab);
|
||||
|
||||
@@ -1319,10 +1319,8 @@ namespace System.Windows.Forms
|
||||
|
||||
if (bar.Enabled && bar.ThumbPos.Height >= 20) {
|
||||
element = VisualStyleElement.ScrollBar.GripperVertical.Normal;
|
||||
if (VisualStyleRenderer.IsElementDefined (element)) {
|
||||
renderer = new VisualStyleRenderer (element);
|
||||
renderer.DrawBackground (dc, bar.ThumbPos, clip);
|
||||
}
|
||||
renderer = new VisualStyleRenderer (element);
|
||||
renderer.DrawBackground (dc, bar.ThumbPos, clip);
|
||||
}
|
||||
#endregion
|
||||
} else {
|
||||
@@ -1411,10 +1409,8 @@ namespace System.Windows.Forms
|
||||
|
||||
if (bar.Enabled && bar.ThumbPos.Height >= 20) {
|
||||
element = VisualStyleElement.ScrollBar.GripperHorizontal.Normal;
|
||||
if (VisualStyleRenderer.IsElementDefined (element)) {
|
||||
renderer = new VisualStyleRenderer (element);
|
||||
renderer.DrawBackground (dc, bar.ThumbPos, clip);
|
||||
}
|
||||
renderer = new VisualStyleRenderer (element);
|
||||
renderer.DrawBackground (dc, bar.ThumbPos, clip);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -1448,9 +1444,12 @@ namespace System.Windows.Forms
|
||||
get {
|
||||
return
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ArrowButton.DownDisabled) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.GripperHorizontal.Normal) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.GripperVertical.Normal) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.LeftTrackHorizontal.Disabled) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.LowerTrackVertical.Disabled) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.RightTrackHorizontal.Disabled) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.SizeBox.LeftAlign) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ThumbButtonHorizontal.Disabled) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.ThumbButtonVertical.Disabled) &&
|
||||
VisualStyleRenderer.IsElementDefined (VisualStyleElement.ScrollBar.UpperTrackVertical.Disabled);
|
||||
@@ -2164,4 +2163,4 @@ namespace System.Windows.Forms
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1599,7 +1599,7 @@ namespace System.Windows.Forms
|
||||
public override void ComboBoxDrawBackground (ComboBox comboBox, Graphics g, Rectangle clippingArea, FlatStyle style)
|
||||
{
|
||||
if (!comboBox.Enabled)
|
||||
g.FillRectangle (ResPool.GetSolidBrush (ColorControl), comboBox.ClientRectangle);
|
||||
g.FillRectangle (ResPool.GetSolidBrush (ColorControl), comboBox.Bounds);
|
||||
|
||||
if (comboBox.DropDownStyle == ComboBoxStyle.Simple)
|
||||
g.FillRectangle (ResPool.GetSolidBrush (comboBox.Parent.BackColor), comboBox.ClientRectangle);
|
||||
@@ -3138,20 +3138,10 @@ namespace System.Windows.Forms
|
||||
|
||||
// Sizing
|
||||
public override int ListViewGetHeaderHeight (ListView listView, Font font)
|
||||
{
|
||||
return ListViewGetHeaderHeight (font);
|
||||
}
|
||||
|
||||
static int ListViewGetHeaderHeight (Font font)
|
||||
{
|
||||
return font.Height + 5;
|
||||
}
|
||||
|
||||
public static int ListViewGetHeaderHeight ()
|
||||
{
|
||||
return ListViewGetHeaderHeight (ThemeEngine.Current.DefaultFont);
|
||||
}
|
||||
|
||||
public override Size ListViewCheckBoxSize {
|
||||
get { return new Size (16, 16); }
|
||||
}
|
||||
@@ -4202,13 +4192,13 @@ namespace System.Windows.Forms
|
||||
case 0:
|
||||
default: // Blocks
|
||||
Rectangle block_rect;
|
||||
int space_betweenblocks = ProgressBarChunkSpacing;
|
||||
int space_betweenblocks = 2;
|
||||
int block_width;
|
||||
int increment;
|
||||
int barpos_pixels;
|
||||
int block_count = 0;
|
||||
|
||||
block_width = ProgressBarGetChunkSize (client_area.Height);
|
||||
block_width = (client_area.Height * 2) / 3;
|
||||
barpos_pixels = (int)(((double)(ctrl.Value - ctrl.Minimum) * client_area.Width) / (Math.Max (ctrl.Maximum - ctrl.Minimum, 1)));
|
||||
increment = block_width + space_betweenblocks;
|
||||
|
||||
@@ -4236,23 +4226,9 @@ namespace System.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
public const int ProgressBarChunkSpacing = 2;
|
||||
|
||||
public static int ProgressBarGetChunkSize ()
|
||||
{
|
||||
return ProgressBarGetChunkSize (ProgressBarDefaultHeight);
|
||||
}
|
||||
|
||||
static int ProgressBarGetChunkSize (int progressBarClientAreaHeight)
|
||||
{
|
||||
return (progressBarClientAreaHeight * 2) / 3;
|
||||
}
|
||||
|
||||
const int ProgressBarDefaultHeight = 23;
|
||||
|
||||
public override Size ProgressBarDefaultSize {
|
||||
get {
|
||||
return new Size (100, ProgressBarDefaultHeight);
|
||||
return new Size (100, 23);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5012,6 +4988,16 @@ namespace System.Windows.Forms
|
||||
ThemeElements.CurrentTheme.TabControlPainter.Draw (dc, area, tab);
|
||||
}
|
||||
|
||||
public override Rectangle TabControlGetLeftScrollRect (TabControl tab)
|
||||
{
|
||||
return ThemeElements.CurrentTheme.TabControlPainter.GetLeftScrollRect (tab);
|
||||
}
|
||||
|
||||
public override Rectangle TabControlGetRightScrollRect (TabControl tab)
|
||||
{
|
||||
return ThemeElements.CurrentTheme.TabControlPainter.GetRightScrollRect (tab);
|
||||
}
|
||||
|
||||
public override Rectangle TabControlGetDisplayRectangle (TabControl tab)
|
||||
{
|
||||
return ThemeElements.CurrentTheme.TabControlPainter.GetDisplayRectangle (tab);
|
||||
@@ -5538,7 +5524,7 @@ namespace System.Windows.Forms
|
||||
thumb_area.X = area.X + channel_startpoint.X;
|
||||
thumb_area.Y = area.Y + channel_startpoint.Y;
|
||||
thumb_area.Height = area.Height - space_from_right - space_from_left;
|
||||
thumb_area.Width = TrackBarVerticalTrackWidth;
|
||||
thumb_area.Width = 4;
|
||||
|
||||
pixel_len = thumb_area.Height - 11;
|
||||
if (tb.Maximum == tb.Minimum) {
|
||||
@@ -5586,7 +5572,7 @@ namespace System.Windows.Forms
|
||||
thumb_area.X = area.X + channel_startpoint.X;
|
||||
thumb_area.Y = area.Y + channel_startpoint.Y;
|
||||
thumb_area.Width = area.Width - space_from_right - space_from_left;
|
||||
thumb_area.Height = TrackBarHorizontalTrackHeight;
|
||||
thumb_area.Height = 4;
|
||||
|
||||
pixel_len = thumb_area.Width - 11;
|
||||
if (tb.Maximum == tb.Minimum) {
|
||||
@@ -5602,20 +5588,11 @@ namespace System.Windows.Forms
|
||||
}
|
||||
|
||||
protected virtual Size TrackBarGetThumbSize (TrackBar trackBar)
|
||||
{
|
||||
return TrackBarGetThumbSize ();
|
||||
}
|
||||
|
||||
public static Size TrackBarGetThumbSize ()
|
||||
{
|
||||
/* Draw thumb fixed 10x22 size */
|
||||
return new Size (10, 22);
|
||||
}
|
||||
|
||||
public const int TrackBarVerticalTrackWidth = 4;
|
||||
|
||||
public const int TrackBarHorizontalTrackHeight = 4;
|
||||
|
||||
#region Ticks
|
||||
protected interface ITrackBarTickPainter
|
||||
{
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace System.Windows.Forms
|
||||
if (!Enum.IsDefined (typeof (ToolStripGripStyle), value))
|
||||
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ToolStripGripStyle", value));
|
||||
this.grip_style = value;
|
||||
this.PerformLayout ();
|
||||
this.PerformLayout (this, "GripStyle");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -403,7 +403,12 @@ namespace System.Windows.Forms
|
||||
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
|
||||
public LayoutSettings LayoutSettings {
|
||||
get { return this.layout_settings; }
|
||||
set { this.layout_settings = value; }
|
||||
set {
|
||||
if (this.layout_settings != value) {
|
||||
this.layout_settings = value;
|
||||
PerformLayout (this, "LayoutSettings");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[AmbientValue (ToolStripLayoutStyle.StackWithOverflow)]
|
||||
@@ -435,7 +440,7 @@ namespace System.Windows.Forms
|
||||
|
||||
this.layout_settings = this.CreateLayoutSettings (value);
|
||||
|
||||
this.PerformLayout ();
|
||||
this.PerformLayout (this, "LayoutStyle");
|
||||
this.OnLayoutStyleChanged (EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
@@ -465,7 +470,7 @@ namespace System.Windows.Forms
|
||||
if (this.renderer != value) {
|
||||
this.renderer = value;
|
||||
this.render_mode = ToolStripRenderMode.Custom;
|
||||
this.PerformLayout ();
|
||||
this.PerformLayout (this, "Renderer");
|
||||
this.OnRendererChanged (EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
@@ -704,7 +709,7 @@ namespace System.Windows.Forms
|
||||
{
|
||||
switch (layoutStyle) {
|
||||
case ToolStripLayoutStyle.Flow:
|
||||
return new FlowLayoutSettings ();
|
||||
return new FlowLayoutSettings (this);
|
||||
case ToolStripLayoutStyle.Table:
|
||||
//return new TableLayoutSettings ();
|
||||
case ToolStripLayoutStyle.StackWithOverflow:
|
||||
|
||||
@@ -319,8 +319,7 @@ namespace System.Windows.Forms
|
||||
this.ComboBox.DropDownClosed += new EventHandler(HandleDropDownClosed);
|
||||
this.ComboBox.DropDownStyleChanged += new EventHandler (HandleDropDownStyleChanged);
|
||||
this.ComboBox.SelectedIndexChanged += new EventHandler (HandleSelectedIndexChanged);
|
||||
this.ComboBox.TextChanged += new EventHandler (HandleTextChanged);
|
||||
this.ComboBox.TextUpdate += new EventHandler (HandleTextUpdate);
|
||||
this.ComboBox.TextUpdate += new EventHandler(HandleTextUpdate);
|
||||
}
|
||||
|
||||
protected virtual void OnTextUpdate (EventArgs e)
|
||||
@@ -396,11 +395,6 @@ namespace System.Windows.Forms
|
||||
{
|
||||
OnSelectedIndexChanged (e);
|
||||
}
|
||||
|
||||
private void HandleTextChanged (object sender, EventArgs e)
|
||||
{
|
||||
OnTextChanged (e);
|
||||
}
|
||||
|
||||
private void HandleTextUpdate (object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,12 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (true)]
|
||||
public bool ShowDropDownArrow {
|
||||
get { return this.show_drop_down_arrow; }
|
||||
set { this.show_drop_down_arrow = value; }
|
||||
set {
|
||||
if (this.show_drop_down_arrow != value) {
|
||||
this.show_drop_down_arrow = value;
|
||||
CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -138,15 +138,13 @@ namespace System.Windows.Forms
|
||||
|
||||
public void ShowDropDown ()
|
||||
{
|
||||
// Call this before the HasDropDownItems check to give
|
||||
// users a chance to handle it and add drop down items
|
||||
this.OnDropDownShow (EventArgs.Empty);
|
||||
|
||||
if (!this.HasDropDownItems)
|
||||
return;
|
||||
|
||||
this.Invalidate ();
|
||||
this.OnDropDownOpening (this, EventArgs.Empty);
|
||||
this.DropDown.Show (this.DropDownLocation);
|
||||
this.OnDropDownShow (EventArgs.Empty);
|
||||
this.OnDropDownOpened (EventArgs.Empty);
|
||||
}
|
||||
#endregion
|
||||
@@ -211,9 +209,6 @@ namespace System.Windows.Forms
|
||||
|
||||
protected virtual void OnDropDownShow (EventArgs e)
|
||||
{
|
||||
EventHandler eh = (EventHandler)(Events[DropDownOpeningEvent]);
|
||||
if (eh != null)
|
||||
eh (this, e);
|
||||
}
|
||||
|
||||
protected override void OnFontChanged (EventArgs e)
|
||||
@@ -331,6 +326,13 @@ namespace System.Windows.Forms
|
||||
{
|
||||
e.Item.owner_item = this;
|
||||
}
|
||||
|
||||
private void OnDropDownOpening (object sender, EventArgs e)
|
||||
{
|
||||
EventHandler eh = (EventHandler)(Events[DropDownOpeningEvent]);
|
||||
if (eh != null)
|
||||
eh (this, e);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,13 +68,23 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (false)]
|
||||
public bool ShowCheckMargin {
|
||||
get { return this.show_check_margin; }
|
||||
set { this.show_check_margin = value; }
|
||||
set {
|
||||
if (this.show_check_margin != value) {
|
||||
this.show_check_margin = value;
|
||||
PerformLayout (this, "ShowCheckMargin");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultValue (true)]
|
||||
public bool ShowImageMargin {
|
||||
get { return this.show_image_margin; }
|
||||
set { this.show_image_margin = value; }
|
||||
set {
|
||||
if (this.show_image_margin != value) {
|
||||
this.show_image_margin = value;
|
||||
PerformLayout (this, "ShowImageMargin");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -217,7 +217,10 @@ namespace System.Windows.Forms
|
||||
if (!Enum.IsDefined (typeof (ToolStripItemAlignment), value))
|
||||
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ToolStripItemAlignment", value));
|
||||
|
||||
this.alignment = value;
|
||||
if (this.alignment != value) {
|
||||
this.alignment = value;
|
||||
this.CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,8 +343,6 @@ namespace System.Windows.Forms
|
||||
this.display_style = value;
|
||||
this.CalculateAutoSize ();
|
||||
OnDisplayStyleChanged (EventArgs.Empty);
|
||||
if (this.Parent != null)
|
||||
this.Parent.PerformLayout ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -477,8 +478,10 @@ namespace System.Windows.Forms
|
||||
if (!Enum.IsDefined (typeof (ContentAlignment), value))
|
||||
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ContentAlignment", value));
|
||||
|
||||
this.image_align = value;
|
||||
this.Invalidate ();
|
||||
if (image_align != value) {
|
||||
this.image_align = value;
|
||||
this.CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -529,9 +532,10 @@ namespace System.Windows.Forms
|
||||
public ToolStripItemImageScaling ImageScaling {
|
||||
get { return this.image_scaling; }
|
||||
set {
|
||||
this.image_scaling = value;
|
||||
this.CalculateAutoSize ();
|
||||
this.Invalidate ();
|
||||
if (image_scaling != value) {
|
||||
this.image_scaling = value;
|
||||
this.CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,8 +724,11 @@ namespace System.Windows.Forms
|
||||
set {
|
||||
if (!Enum.IsDefined (typeof (ContentAlignment), value))
|
||||
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ContentAlignment", value));
|
||||
this.text_align = value;
|
||||
this.Invalidate ();
|
||||
|
||||
if (this.text_align != value) {
|
||||
this.text_align = value;
|
||||
this.CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,10 @@ namespace System.Windows.Forms
|
||||
set {
|
||||
if (value < 0)
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
this.drop_down_button_width = value;
|
||||
if (this.drop_down_button_width != value) {
|
||||
this.drop_down_button_width = value;
|
||||
CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,12 @@ namespace System.Windows.Forms
|
||||
[DefaultValue (false)]
|
||||
public bool Spring {
|
||||
get { return this.spring; }
|
||||
set { this.spring = value; }
|
||||
set {
|
||||
if (this.spring != value) {
|
||||
this.spring = value;
|
||||
CalculateAutoSize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -345,7 +345,6 @@ namespace System.Windows.Forms {
|
||||
|
||||
private bool tracking = false;
|
||||
private bool dropped = false;
|
||||
private int motion_poll;
|
||||
//private X11Keyboard keyboard;
|
||||
|
||||
public X11Dnd (IntPtr display, X11Keyboard keyboard)
|
||||
@@ -409,7 +408,8 @@ namespace System.Windows.Forms {
|
||||
|
||||
Timer timer = new Timer ();
|
||||
timer.Tick += new EventHandler (DndTickHandler);
|
||||
timer.Interval = 100;
|
||||
timer.Interval = 50;
|
||||
timer.Start ();
|
||||
|
||||
int suc;
|
||||
drag_data.State = DragState.Dragging;
|
||||
@@ -427,8 +427,6 @@ namespace System.Windows.Forms {
|
||||
drag_data.CurMousePos = new Point ();
|
||||
dropped = false;
|
||||
tracking = true;
|
||||
motion_poll = -1;
|
||||
timer.Start ();
|
||||
|
||||
while (tracking && XplatUI.GetMessage (queue_id, ref msg, IntPtr.Zero, 0, 0)) {
|
||||
|
||||
@@ -453,8 +451,6 @@ namespace System.Windows.Forms {
|
||||
RemoveCapture (msg.hwnd);
|
||||
continue;
|
||||
case Msg.WM_MOUSEMOVE:
|
||||
motion_poll = 0;
|
||||
|
||||
drag_data.CurMousePos.X = Control.LowOrder ((int) msg.lParam.ToInt32 ());
|
||||
drag_data.CurMousePos.Y = Control.HighOrder ((int) msg.lParam.ToInt32 ());
|
||||
|
||||
@@ -490,14 +486,7 @@ namespace System.Windows.Forms {
|
||||
t.Interval = 500;
|
||||
}
|
||||
|
||||
|
||||
// If motion_poll is -1, there hasn't been motion at all, so don't simulate motion yet.
|
||||
// Otherwise if more than 100 milliseconds have lapsed, we assume the pointer is not
|
||||
// in motion anymore, and we simulate the mouse over operation, like .Net does.
|
||||
if (motion_poll > 1)
|
||||
HandleMouseOver ();
|
||||
else if (motion_poll > -1)
|
||||
motion_poll++;
|
||||
HandleMouseOver ();
|
||||
}
|
||||
|
||||
public void HandleButtonUpMsg ()
|
||||
|
||||
@@ -2203,6 +2203,12 @@ namespace System.Windows.Forms {
|
||||
internal override bool MouseButtonsSwapped { get{ throw new NotImplementedException(); } }
|
||||
internal override bool MouseWheelPresent { get{ throw new NotImplementedException(); } }
|
||||
|
||||
internal override MouseButtons MouseButtons {
|
||||
get {
|
||||
return MouseState;
|
||||
}
|
||||
}
|
||||
|
||||
internal override Rectangle VirtualScreen {
|
||||
get {
|
||||
return WorkingArea;
|
||||
|
||||
@@ -1612,6 +1612,11 @@ namespace System.Windows.Forms {
|
||||
string class_name = RegisterWindowClass (cp.ClassStyle);
|
||||
HwndCreating = hwnd;
|
||||
|
||||
// We cannot actually send the WS_EX_MDICHILD flag to Windows because we
|
||||
// are faking MDI, not uses Windows' version.
|
||||
if ((cp.WindowExStyle & WindowExStyles.WS_EX_MDICHILD) == WindowExStyles.WS_EX_MDICHILD)
|
||||
cp.WindowExStyle ^= WindowExStyles.WS_EX_MDICHILD;
|
||||
|
||||
WindowHandle = Win32CreateWindow (cp.WindowExStyle, class_name, cp.Caption, cp.WindowStyle, location.X, location.Y, cp.Width, cp.Height, ParentHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||
|
||||
HwndCreating = null;
|
||||
|
||||
@@ -133,9 +133,6 @@ namespace System.Windows.Forms {
|
||||
// Caret
|
||||
private static CaretStruct Caret; //
|
||||
|
||||
// Last window containing the pointer
|
||||
private static IntPtr LastPointerWindow; // The last window containing the pointer
|
||||
|
||||
// Our atoms
|
||||
private static IntPtr WM_PROTOCOLS;
|
||||
private static IntPtr WM_DELETE_WINDOW;
|
||||
@@ -2258,6 +2255,12 @@ namespace System.Windows.Forms {
|
||||
}
|
||||
}
|
||||
|
||||
internal override MouseButtons MouseButtons {
|
||||
get {
|
||||
return MouseState;
|
||||
}
|
||||
}
|
||||
|
||||
internal override Rectangle VirtualScreen {
|
||||
get {
|
||||
IntPtr actual_atom;
|
||||
@@ -3831,6 +3834,17 @@ namespace System.Windows.Forms {
|
||||
|
||||
if (msg.message == Msg.WM_LBUTTONDOWN || msg.message == Msg.WM_MBUTTONDOWN || msg.message == Msg.WM_RBUTTONDOWN) {
|
||||
SendParentNotify(msg.hwnd, msg.message, mouse_position.X, mouse_position.Y);
|
||||
|
||||
// Win32 splurts MouseMove events all over the place, regardless of whether the mouse is actually moving or
|
||||
// not, especially after mousedown and mouseup. To support apps relying on mousemove events between and after
|
||||
// mouse clicks to repaint or whatever, we generate a mousemove event here. *sigh*
|
||||
XEvent motionEvent = new XEvent ();
|
||||
motionEvent.type = XEventName.MotionNotify;
|
||||
motionEvent.MotionEvent.display = DisplayHandle;
|
||||
motionEvent.MotionEvent.window = xevent.ButtonEvent.window;
|
||||
motionEvent.MotionEvent.x = xevent.ButtonEvent.x;
|
||||
motionEvent.MotionEvent.y = xevent.ButtonEvent.y;
|
||||
hwnd.Queue.EnqueueLocked (motionEvent);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -4001,44 +4015,9 @@ namespace System.Windows.Forms {
|
||||
if (!hwnd.Enabled) {
|
||||
goto ProcessNextMessage;
|
||||
}
|
||||
if (xevent.CrossingEvent.mode == NotifyMode.NotifyGrab || xevent.AnyEvent.window != hwnd.client_window) {
|
||||
if (xevent.CrossingEvent.mode != NotifyMode.NotifyNormal) {
|
||||
goto ProcessNextMessage;
|
||||
}
|
||||
if (xevent.CrossingEvent.mode == NotifyMode.NotifyUngrab) { // Pseudo motion caused by grabbing
|
||||
if (LastPointerWindow == xevent.AnyEvent.window)
|
||||
goto ProcessNextMessage;
|
||||
|
||||
if (LastPointerWindow != IntPtr.Zero) {
|
||||
Point enter_loc = new Point (xevent.ButtonEvent.x, xevent.ButtonEvent.y);
|
||||
|
||||
// We need this due to EnterNotify being fired on all the parent controls
|
||||
// of the Control being grabbed, and obviously in that scenario we are not
|
||||
// actuallty entering them
|
||||
Control ctrl = Control.FromHandle (hwnd.client_window);
|
||||
foreach (Control child_control in ctrl.Controls)
|
||||
if (child_control.Bounds.Contains (enter_loc))
|
||||
goto ProcessNextMessage;
|
||||
|
||||
// A MouseLeave/LeaveNotify event is sent to the previous window
|
||||
// until the mouse is ungrabbed, not when actually leaving its bounds
|
||||
int x = xevent.CrossingEvent.x_root;
|
||||
int y = xevent.CrossingEvent.y_root;
|
||||
ScreenToClient (LastPointerWindow, ref x, ref y);
|
||||
|
||||
XEvent leaveEvent = new XEvent ();
|
||||
leaveEvent.type = XEventName.LeaveNotify;
|
||||
leaveEvent.CrossingEvent.display = DisplayHandle;
|
||||
leaveEvent.CrossingEvent.window = LastPointerWindow;
|
||||
leaveEvent.CrossingEvent.x = x;
|
||||
leaveEvent.CrossingEvent.y = y;
|
||||
leaveEvent.CrossingEvent.mode = NotifyMode.NotifyNormal;
|
||||
Hwnd last_pointer_hwnd = Hwnd.ObjectFromHandle (LastPointerWindow);
|
||||
last_pointer_hwnd.Queue.EnqueueLocked (leaveEvent);
|
||||
}
|
||||
}
|
||||
|
||||
LastPointerWindow = xevent.AnyEvent.window;
|
||||
|
||||
msg.message = Msg.WM_MOUSE_ENTER;
|
||||
HoverState.X = xevent.CrossingEvent.x;
|
||||
HoverState.Y = xevent.CrossingEvent.y;
|
||||
@@ -4067,9 +4046,6 @@ namespace System.Windows.Forms {
|
||||
if ((xevent.CrossingEvent.mode != NotifyMode.NotifyNormal) || (xevent.CrossingEvent.window != hwnd.client_window)) {
|
||||
goto ProcessNextMessage;
|
||||
}
|
||||
// If a grab is taking place, ignore it - we handle it in EnterNotify
|
||||
if (Grab.Hwnd != IntPtr.Zero)
|
||||
goto ProcessNextMessage;
|
||||
|
||||
// Reset the cursor explicitly on X11.
|
||||
// X11 remembers the last set cursor for the window and in cases where
|
||||
|
||||
@@ -74,7 +74,6 @@ System.Windows.Forms/ErrorProviderTest.cs
|
||||
System.Windows.Forms/FlowPanelTests.cs
|
||||
System.Windows.Forms/FocusTest.cs
|
||||
System.Windows.Forms/FolderBrowserDialogTest.cs
|
||||
System.Windows.Forms/FormEventTest.cs
|
||||
System.Windows.Forms/FormHandleTest.cs
|
||||
System.Windows.Forms/FormTest.cs
|
||||
System.Windows.Forms/EventArgsTest.cs
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
2008-08-24 Gert Driesen <[email protected]>
|
||||
|
||||
* ResXFileRefTest.cs: Fixed/added attributes on SetUp and TearDown
|
||||
methods.
|
||||
|
||||
2008-07-07 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ResXResourceReaderTest.cs: Ignore test that is dependent on
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace MonoTests.System.Resources
|
||||
[TestFixture]
|
||||
public class ResXFileRefConverterTest
|
||||
{
|
||||
[SetUp]
|
||||
[Test]
|
||||
public void SetUp ()
|
||||
{
|
||||
_converter = new ResXFileRef.Converter ();
|
||||
@@ -151,11 +151,11 @@ namespace MonoTests.System.Resources
|
||||
}
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown ()
|
||||
{
|
||||
if (Directory.Exists (_tempDirectory))
|
||||
if (Directory.Exists (_tempDirectory)) {
|
||||
Directory.Delete (_tempDirectory, true);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
|
||||
{
|
||||
BindingContext bc = new BindingContext ();
|
||||
ArrayList data_source = new ArrayList ();
|
||||
BindingManagerBase a, b, c, d;
|
||||
BindingManagerBase a, b, c;
|
||||
|
||||
data_source.AddRange (new string [] { "1", "2", "3", "4", "5" });
|
||||
|
||||
@@ -164,21 +164,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
|
||||
|
||||
b = bc [data_source, "Length"];
|
||||
Assert.AreSame (a, b, "INWM4");
|
||||
|
||||
// Non List type
|
||||
MockItem item = new MockItem ("Mono", -1);
|
||||
MockContainer container = new MockContainer ();
|
||||
container.Item = item;
|
||||
|
||||
d = bc [container, "Item.Text"];
|
||||
Assert.AreEqual ("Mono", d.Current, "INWM5");
|
||||
Assert.AreEqual (1, d.Count, "INWM6");
|
||||
Assert.AreEqual (0, d.Position, "INWM7");
|
||||
|
||||
d = bc [container, "Item.Text.Length"];
|
||||
Assert.AreEqual (4, d.Current, "INWM8");
|
||||
Assert.AreEqual (1, d.Count, "INWM9");
|
||||
Assert.AreEqual (0, d.Position, "INWM10");
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
|
||||
@@ -1,77 +1,23 @@
|
||||
2008-08-26 Jonathan Pobst <monkey@jpobst.com>
|
||||
|
||||
* ErrorProviderTest.cs: Add test for bug #420305.
|
||||
|
||||
2008-08-24 Carlos Alberto Cortez <[email protected]>
|
||||
|
||||
* ListControlTest.cs: Add a container for a mock item, to test
|
||||
multiple nested properties.
|
||||
* BindingContextTest.cs: New test for the overload of the indexer
|
||||
taking a data source with a data member (including nested properties,
|
||||
or multiple objects, as msdnstates).
|
||||
|
||||
2008-08-24 Gert Driesen <[email protected]>
|
||||
|
||||
* ListBoxTest.cs: Added tests for SetItemsCore. Added and improved tests
|
||||
for ObjectCollection. Added tests for IntegerCollection.
|
||||
|
||||
2008-08-23 Gert Driesen <[email protected]>
|
||||
|
||||
* ControlTest.cs: Added .ctor tests.
|
||||
|
||||
2008-08-19 Jonathan Pobst <[email protected]>
|
||||
|
||||
* LinkLabelTest.cs: Add test for bug #410709.
|
||||
|
||||
2008-08-02 Gert Driesen <[email protected]>
|
||||
|
||||
* FormEventTest.cs: Modified several tests to no longer require manual
|
||||
intervention. Added/improved tests for Form events.
|
||||
|
||||
2008-07-31 Carlos Alberto Cortez <[email protected]>
|
||||
2008-08-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
|
||||
|
||||
* ListBindingHelperTest.cs: New test for GetList receiving an IEnumerable
|
||||
object which return instances of ICustomTypeDescriptor instances,
|
||||
instead of actual items.
|
||||
|
||||
2008-07-30 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* TableLayoutTest.cs: Add tests for bug #412582
|
||||
|
||||
2008-07-29 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ListBox.cs: Make test not font dependent.
|
||||
|
||||
2008-07-29 Jonathan Pobst <[email protected]>
|
||||
|
||||
* ListBox.cs: Add test for bug #412728.
|
||||
|
||||
2008-07-30 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* TableLayoutTest.cs: Add tests for bug #412582
|
||||
|
||||
2008-07-25 Ivan N. Zlatev <[email protected]>
|
||||
|
||||
* TableLayoutTest.cs: Add test for bug #412161
|
||||
|
||||
2008-07-23 Gert Driesen <[email protected]>
|
||||
|
||||
* ListViewItemTest.cs: Marked SerializeExact_Mono as NotWorking to fix
|
||||
buildbot.
|
||||
|
||||
2008-07-22 Gert Driesen <[email protected]>
|
||||
|
||||
* ListViewItemTest.cs: Enabled (de)serialization tests.
|
||||
* PictureBoxTest.cs: Enabled tests for bug #378308.
|
||||
|
||||
2008-07-20 Gert Driesen <[email protected]>
|
||||
|
||||
* ListViewItemTest.cs: Fixed tests.
|
||||
|
||||
2008-07-20 Gert Driesen <[email protected]>
|
||||
|
||||
* ListViewItemTest.cs: Added ListViewSubItem (de)serialization tests,
|
||||
added/improved ctor tests and add property tests.
|
||||
* PictureBoxTest.cs: Added tests for Load(Async) argument checks.
|
||||
|
||||
2008-07-15 Jonathan Pobst <[email protected]>
|
||||
|
||||
[Backport to 2.0]
|
||||
* ImageListTest.cs: Add test for bug #409169.
|
||||
|
||||
2008-07-14 Jonathan Pobst <[email protected]>
|
||||
@@ -85,7 +31,7 @@
|
||||
2008-07-12 Gert Driesen <[email protected]>
|
||||
|
||||
* PictureBoxTest.cs: Split up ImageLocation test in sync and async
|
||||
tests.
|
||||
tests. Added tests for Load argument checks.
|
||||
|
||||
2008-07-11 Gert Driesen <[email protected]>
|
||||
|
||||
|
||||
Loaded 100 of 3356 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user