From 4175e95227c9a88e4a32dbf1e9caa1a8d84fed47 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 1 Apr 2002 11:41:59 +0000 Subject: [PATCH] Temporarily use self-made wxTextCtrl in wxX11 until the in /src/univ.cpp works better. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 640 +++++----- configure.in | 6 +- distrib/msw/tmake/filelist.txt | 3 +- include/wx/textctrl.h | 4 +- include/wx/x11/textctrl.h | 379 ++++++ src/mgl/makefile.wat | 8 +- src/univ/textctrl.cpp | 1 + src/univ/themes/win32.cpp | 4 +- src/wxUniv.dsp | 4 +- src/wxWindows.dsp | 16 +- src/x11/app.cpp | 2 + src/x11/files.lst | 1 + src/x11/textctrl.cpp | 2135 ++++++++++++++++++++++++++++++++ 13 files changed, 2866 insertions(+), 337 deletions(-) create mode 100644 include/wx/x11/textctrl.h create mode 100644 src/x11/textctrl.cpp diff --git a/configure b/configure index 669f1fe917..35913c4407 100755 --- a/configure +++ b/configure @@ -13189,7 +13189,11 @@ rm -f conftest* ALL_HEADERS="\$(ALL_HEADERS) \${UNIV_HEADERS}" PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst" - TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}" + if test "$wxUSE_X11" = 1; then + TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}${PATH_IFS}\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes" + else + TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}" + fi TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__" WIDGET_SET=univ else @@ -13263,17 +13267,17 @@ if test "$wxUSE_OPENGL" = "yes"; then ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 -echo "configure:13267: checking for GL/gl.h" >&5 +echo "configure:13271: checking for GL/gl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13291,7 +13295,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for -lGL""... $ac_c" 1>&6 -echo "configure:13295: checking for -lGL" >&5 +echo "configure:13299: checking for -lGL" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -13324,7 +13328,7 @@ for ac_dir in $SEARCH_LIB; else echo "$ac_t""no" 1>&6 echo $ac_n "checking for -lMesaGL""... $ac_c" 1>&6 -echo "configure:13328: checking for -lMesaGL" >&5 +echo "configure:13332: checking for -lMesaGL" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -13514,13 +13518,13 @@ if test "$wxUSE_SHARED" = "yes"; then *-*-linux* ) if test "$GCC" != "yes"; then echo $ac_n "checking for Intel compiler""... $ac_c" 1>&6 -echo "configure:13518: checking for Intel compiler" >&5 +echo "configure:13522: checking for Intel compiler" >&5 if eval "test \"`echo '$''{'wx_cv_prog_icc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_prog_icc=yes else @@ -13654,7 +13658,7 @@ if test "$wxUSE_MAC" = 1; then # Extract the first word of "Rez", so it can be a program name with args. set dummy Rez; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13658: checking for $ac_word" >&5 +echo "configure:13662: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RESCOMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13684,7 +13688,7 @@ fi # Extract the first word of "DeRez", so it can be a program name with args. set dummy DeRez; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13688: checking for $ac_word" >&5 +echo "configure:13692: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DEREZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13727,17 +13731,17 @@ if test "$wxUSE_MAC" != 1; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13731: checking for $ac_hdr" >&5 +echo "configure:13735: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13769,17 +13773,17 @@ for ac_hdr in stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13773: checking for $ac_hdr" >&5 +echo "configure:13777: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13809,17 +13813,17 @@ for ac_hdr in malloc.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13813: checking for $ac_hdr" >&5 +echo "configure:13817: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13849,17 +13853,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13853: checking for $ac_hdr" >&5 +echo "configure:13857: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13889,17 +13893,17 @@ for ac_hdr in wchar.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13893: checking for $ac_hdr" >&5 +echo "configure:13897: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13931,17 +13935,17 @@ if test "$ac_cv_header_wchar_h" != "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13935: checking for $ac_hdr" >&5 +echo "configure:13939: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13974,17 +13978,17 @@ for ac_hdr in fnmatch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13978: checking for $ac_hdr" >&5 +echo "configure:13982: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14014,17 +14018,17 @@ for ac_hdr in langinfo.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:14018: checking for $ac_hdr" >&5 +echo "configure:14022: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14057,17 +14061,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:14061: checking for $ac_hdr" >&5 +echo "configure:14065: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14098,12 +14102,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:14102: checking for ANSI C header files" >&5 +echo "configure:14106: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -14111,7 +14115,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14128,7 +14132,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -14146,7 +14150,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -14167,7 +14171,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -14178,7 +14182,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:14182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -14202,12 +14206,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:14206: checking for mode_t" >&5 +echo "configure:14210: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -14235,12 +14239,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:14239: checking for off_t" >&5 +echo "configure:14243: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -14268,12 +14272,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:14272: checking for pid_t" >&5 +echo "configure:14276: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -14301,12 +14305,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:14305: checking for size_t" >&5 +echo "configure:14309: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -14334,12 +14338,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:14338: checking for uid_t in sys/types.h" >&5 +echo "configure:14342: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -14369,13 +14373,13 @@ fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:14373: checking for wchar_t" >&5 +echo "configure:14377: checking for wchar_t" >&5 if eval "test \"`echo '$''{'wx_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_wchar_t=yes else @@ -14428,12 +14432,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if size_t is unsigned int""... $ac_c" 1>&6 -echo "configure:14432: checking if size_t is unsigned int" >&5 +echo "configure:14436: checking if size_t is unsigned int" >&5 if eval "test \"`echo '$''{'wx_cv_size_t_is_uint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14446,7 +14450,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_size_t_is_uint=no else @@ -14469,12 +14473,12 @@ EOF else echo $ac_n "checking if size_t is unsigned long""... $ac_c" 1>&6 -echo "configure:14473: checking if size_t is unsigned long" >&5 +echo "configure:14477: checking if size_t is unsigned long" >&5 if eval "test \"`echo '$''{'wx_cv_size_t_is_ulong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14487,7 +14491,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_size_t_is_ulong=no else @@ -14521,13 +14525,13 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for pw_gecos in struct passwd""... $ac_c" 1>&6 -echo "configure:14525: checking for pw_gecos in struct passwd" >&5 +echo "configure:14529: checking for pw_gecos in struct passwd" >&5 if eval "test \"`echo '$''{'wx_cv_struct_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14538,7 +14542,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_pw_gecos=yes @@ -14568,12 +14572,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:14572: checking for working const" >&5 +echo "configure:14576: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -14643,21 +14647,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:14647: checking for inline" >&5 +echo "configure:14651: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -14684,7 +14688,7 @@ esac echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:14688: checking size of char" >&5 +echo "configure:14692: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14692,7 +14696,7 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < main() @@ -14703,7 +14707,7 @@ main() exit(0); } EOF -if { (eval echo configure:14707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -14723,7 +14727,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:14727: checking size of short" >&5 +echo "configure:14731: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14731,7 +14735,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -14742,7 +14746,7 @@ main() exit(0); } EOF -if { (eval echo configure:14746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -14762,7 +14766,7 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:14766: checking size of void *" >&5 +echo "configure:14770: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14770,7 +14774,7 @@ else ac_cv_sizeof_void_p=4 else cat > conftest.$ac_ext < main() @@ -14781,7 +14785,7 @@ main() exit(0); } EOF -if { (eval echo configure:14785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_void_p=`cat conftestval` else @@ -14801,7 +14805,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:14805: checking size of int" >&5 +echo "configure:14809: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14809,7 +14813,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -14820,7 +14824,7 @@ main() exit(0); } EOF -if { (eval echo configure:14824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -14840,7 +14844,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:14844: checking size of long" >&5 +echo "configure:14848: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14848,7 +14852,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -14859,7 +14863,7 @@ main() exit(0); } EOF -if { (eval echo configure:14863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -14882,7 +14886,7 @@ EOF case "${host}" in arm-*-linux* ) echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:14886: checking size of long long" >&5 +echo "configure:14890: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14890,7 +14894,7 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < main() @@ -14901,7 +14905,7 @@ main() exit(0); } EOF -if { (eval echo configure:14905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -14923,7 +14927,7 @@ EOF ;; * ) echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:14927: checking size of long long" >&5 +echo "configure:14931: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14931,7 +14935,7 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < main() @@ -14942,7 +14946,7 @@ main() exit(0); } EOF -if { (eval echo configure:14946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -14965,7 +14969,7 @@ esac echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 -echo "configure:14969: checking size of wchar_t" >&5 +echo "configure:14973: checking size of wchar_t" >&5 if eval "test \"`echo '$''{'wx_cv_sizeof_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14975,7 +14979,7 @@ else else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wx_cv_sizeof_wchar_t=`cat conftestval` else @@ -15020,14 +15024,14 @@ EOF echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:15024: checking whether byte ordering is bigendian" >&5 +echo "configure:15028: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -15038,11 +15042,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:15042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -15053,7 +15057,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:15057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -15073,7 +15077,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -15114,7 +15118,7 @@ fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:15118: checking how to run the C++ preprocessor" >&5 +echo "configure:15122: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15127,12 +15131,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -15176,17 +15180,17 @@ cross_compiling=$ac_cv_prog_cxx_cross do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:15180: checking for $ac_hdr" >&5 +echo "configure:15184: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15234,7 +15238,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking if C++ compiler supports bool""... $ac_c" 1>&6 -echo "configure:15238: checking if C++ compiler supports bool" >&5 +echo "configure:15242: checking if C++ compiler supports bool" >&5 if eval "test \"`echo '$''{'wx_cv_cpp_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15249,7 +15253,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_cpp_bool=yes @@ -15299,7 +15303,7 @@ EOF echo $ac_n "checking for wcslen in -lc""... $ac_c" 1>&6 -echo "configure:15303: checking for wcslen in -lc" >&5 +echo "configure:15307: checking for wcslen in -lc" >&5 ac_lib_var=`echo c'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15307,7 +15311,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15344,7 +15348,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wcslen in -lw""... $ac_c" 1>&6 -echo "configure:15348: checking for wcslen in -lw" >&5 +echo "configure:15352: checking for wcslen in -lw" >&5 ac_lib_var=`echo w'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15352,7 +15356,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15389,7 +15393,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wcslen in -lmsvcrt""... $ac_c" 1>&6 -echo "configure:15393: checking for wcslen in -lmsvcrt" >&5 +echo "configure:15397: checking for wcslen in -lmsvcrt" >&5 ac_lib_var=`echo msvcrt'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15397,7 +15401,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmsvcrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15444,12 +15448,12 @@ fi for ac_func in wcsrtombs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15448: checking for $ac_func" >&5 +echo "configure:15452: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15498,12 +15502,12 @@ done echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:15502: checking for vprintf" >&5 +echo "configure:15506: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -15550,12 +15554,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:15554: checking for _doprnt" >&5 +echo "configure:15558: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -15608,13 +15612,13 @@ fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:15612: checking for vsnprintf" >&5 +echo "configure:15616: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -15639,7 +15643,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* wx_cv_func_vsnprintf=yes @@ -15650,7 +15654,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -15675,7 +15679,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* wx_cv_func_vsnprintf=yes @@ -15707,13 +15711,13 @@ else fi echo $ac_n "checking for vsscanf""... $ac_c" 1>&6 -echo "configure:15711: checking for vsscanf" >&5 +echo "configure:15715: checking for vsscanf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsscanf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -15736,7 +15740,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_vsscanf=yes @@ -15788,7 +15792,7 @@ fi echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:15792: checking for iconv" >&5 +echo "configure:15796: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15796,7 +15800,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -15806,7 +15810,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:15810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else @@ -15818,7 +15822,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat > conftest.$ac_ext < #include @@ -15828,7 +15832,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:15832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes @@ -15849,12 +15853,12 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 EOF echo $ac_n "checking if iconv needs const""... $ac_c" 1>&6 -echo "configure:15853: checking if iconv needs const" >&5 +echo "configure:15857: checking if iconv needs const" >&5 if eval "test \"`echo '$''{'wx_cv_func_iconv_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -15873,7 +15877,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_iconv_const="no" else @@ -15918,12 +15922,12 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then for ac_func in sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15922: checking for $ac_func" >&5 +echo "configure:15926: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15987,13 +15991,13 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sa_handler type""... $ac_c" 1>&6 -echo "configure:15991: checking for sa_handler type" >&5 +echo "configure:15995: checking for sa_handler type" >&5 if eval "test \"`echo '$''{'wx_cv_type_sa_handler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16005,7 +16009,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_sa_handler=int @@ -16042,12 +16046,12 @@ fi for ac_func in vfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16046: checking for $ac_func" >&5 +echo "configure:16050: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16098,12 +16102,12 @@ done for ac_func in mkstemp mktemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16102: checking for $ac_func" >&5 +echo "configure:16106: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16152,12 +16156,12 @@ done echo $ac_n "checking for statfs""... $ac_c" 1>&6 -echo "configure:16156: checking for statfs" >&5 +echo "configure:16160: checking for statfs" >&5 if eval "test \"`echo '$''{'wx_cv_func_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statfs=yes @@ -16205,12 +16209,12 @@ EOF else echo $ac_n "checking for statvfs""... $ac_c" 1>&6 -echo "configure:16209: checking for statvfs" >&5 +echo "configure:16213: checking for statvfs" >&5 if eval "test \"`echo '$''{'wx_cv_func_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -16226,7 +16230,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statvfs=yes @@ -16260,12 +16264,12 @@ if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then for ac_func in fcntl flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16264: checking for $ac_func" >&5 +echo "configure:16268: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16322,12 +16326,12 @@ fi for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16326: checking for $ac_func" >&5 +echo "configure:16330: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16378,12 +16382,12 @@ done for ac_func in putenv setenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16382: checking for $ac_func" >&5 +echo "configure:16386: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16453,12 +16457,12 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16457: checking for $ac_func" >&5 +echo "configure:16461: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16506,7 +16510,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6 -echo "configure:16510: checking for nanosleep in -lposix4" >&5 +echo "configure:16514: checking for nanosleep in -lposix4" >&5 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16514,7 +16518,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16553,12 +16557,12 @@ else for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16557: checking for $ac_func" >&5 +echo "configure:16561: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16624,12 +16628,12 @@ fi for ac_func in uname gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16628: checking for $ac_func" >&5 +echo "configure:16632: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16689,12 +16693,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16693: checking for $ac_func" >&5 +echo "configure:16697: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16757,12 +16761,12 @@ INET_LINK= for ac_func in inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16761: checking for $ac_func" >&5 +echo "configure:16765: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16810,7 +16814,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:16814: checking for inet_addr in -lnsl" >&5 +echo "configure:16818: checking for inet_addr in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16818,7 +16822,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16848,7 +16852,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lresolv""... $ac_c" 1>&6 -echo "configure:16852: checking for inet_addr in -lresolv" >&5 +echo "configure:16856: checking for inet_addr in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16856,7 +16860,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16886,7 +16890,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lsocket""... $ac_c" 1>&6 -echo "configure:16890: checking for inet_addr in -lsocket" >&5 +echo "configure:16894: checking for inet_addr in -lsocket" >&5 ac_lib_var=`echo socket'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16894,7 +16898,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16941,12 +16945,12 @@ done for ac_func in inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16945: checking for $ac_func" >&5 +echo "configure:16949: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16994,7 +16998,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -l$INET_LINK""... $ac_c" 1>&6 -echo "configure:16998: checking for inet_aton in -l$INET_LINK" >&5 +echo "configure:17002: checking for inet_aton in -l$INET_LINK" >&5 ac_lib_var=`echo $INET_LINK'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17002,7 +17006,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$INET_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17128,7 +17132,7 @@ if test "$TOOLKIT" != "MSW"; then fi echo $ac_n "checking for pthread_create in -l$THREADS_LIB""... $ac_c" 1>&6 -echo "configure:17132: checking for pthread_create in -l$THREADS_LIB" >&5 +echo "configure:17136: checking for pthread_create in -l$THREADS_LIB" >&5 ac_lib_var=`echo $THREADS_LIB'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17136,7 +17140,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LIB $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17170,7 +17174,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:17174: checking for pthread_create in -lc_r" >&5 +echo "configure:17178: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17178,7 +17182,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17213,17 +17217,17 @@ else ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:17217: checking for sys/prctl.h" >&5 +echo "configure:17221: checking for sys/prctl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:17227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:17231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -17263,12 +17267,12 @@ fi for ac_func in thr_setconcurrency do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17267: checking for $ac_func" >&5 +echo "configure:17271: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17321,17 +17325,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:17325: checking for $ac_hdr" >&5 +echo "configure:17329: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:17335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:17339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -17359,7 +17363,7 @@ done echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:17363: checking for sched_yield in -l$THREADS_LINK" >&5 +echo "configure:17367: checking for sched_yield in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17367,7 +17371,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17400,7 +17404,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 -echo "configure:17404: checking for sched_yield in -lposix4" >&5 +echo "configure:17408: checking for sched_yield in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17408,7 +17412,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17450,7 +17454,7 @@ fi HAVE_PRIOR_FUNCS=0 echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:17454: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 +echo "configure:17458: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17458,7 +17462,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17485,7 +17489,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for pthread_attr_setschedparam in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:17489: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 +echo "configure:17493: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_setschedparam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17493,7 +17497,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17520,7 +17524,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for sched_get_priority_max in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:17524: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 +echo "configure:17528: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17528,7 +17532,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17558,7 +17562,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_get_priority_max in -lposix4""... $ac_c" 1>&6 -echo "configure:17562: checking for sched_get_priority_max in -lposix4" >&5 +echo "configure:17566: checking for sched_get_priority_max in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17566,7 +17570,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17624,7 +17628,7 @@ EOF fi echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:17628: checking for pthread_cancel in -l$THREADS_LINK" >&5 +echo "configure:17632: checking for pthread_cancel in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17632,7 +17636,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17669,13 +17673,13 @@ fi echo $ac_n "checking for pthread_cleanup_push/pop""... $ac_c" 1>&6 -echo "configure:17673: checking for pthread_cleanup_push/pop" >&5 +echo "configure:17677: checking for pthread_cleanup_push/pop" >&5 if eval "test \"`echo '$''{'wx_cv_func_pthread_cleanup_push'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -17685,7 +17689,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_pthread_cleanup_push=yes @@ -17717,13 +17721,13 @@ EOF fi echo $ac_n "checking for pthread_mutexattr_t""... $ac_c" 1>&6 -echo "configure:17721: checking for pthread_mutexattr_t" >&5 +echo "configure:17725: checking for pthread_mutexattr_t" >&5 if eval "test \"`echo '$''{'wx_cv_type_pthread_mutexattr_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -17733,7 +17737,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_mutexattr_t=yes @@ -17760,13 +17764,13 @@ EOF else echo $ac_n "checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER""... $ac_c" 1>&6 -echo "configure:17764: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER" >&5 +echo "configure:17768: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER" >&5 if eval "test \"`echo '$''{'wx_cv_type_pthread_rec_mutex_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -17775,7 +17779,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_rec_mutex_init=yes @@ -17827,7 +17831,7 @@ EOF else if test "$ac_cv_func_strtok_r" = "yes"; then echo $ac_n "checking if -D_REENTRANT is needed""... $ac_c" 1>&6 -echo "configure:17831: checking if -D_REENTRANT is needed" >&5 +echo "configure:17835: checking if -D_REENTRANT is needed" >&5 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D_REENTRANT" echo "$ac_t""yes" 1>&6 @@ -18207,12 +18211,12 @@ if test "$wxUSE_DATETIME" = "yes"; then for ac_func in strptime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18211: checking for $ac_func" >&5 +echo "configure:18215: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18261,13 +18265,13 @@ done echo $ac_n "checking for timezone variable in ""... $ac_c" 1>&6 -echo "configure:18265: checking for timezone variable in " >&5 +echo "configure:18269: checking for timezone variable in " >&5 if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -18279,7 +18283,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -18290,7 +18294,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -18302,7 +18306,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -18313,7 +18317,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -18325,7 +18329,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -18366,12 +18370,12 @@ EOF for ac_func in localtime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18370: checking for $ac_func" >&5 +echo "configure:18374: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18421,13 +18425,13 @@ done if test "$ac_cv_func_localtime" = "yes"; then echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:18425: checking for tm_gmtoff in struct tm" >&5 +echo "configure:18429: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -18439,7 +18443,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes @@ -18468,12 +18472,12 @@ EOF for ac_func in gettimeofday ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18472: checking for $ac_func" >&5 +echo "configure:18476: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18523,7 +18527,7 @@ done if test "$ac_cv_func_gettimeofday" = "yes"; then echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6 -echo "configure:18527: checking whether gettimeofday takes two arguments" >&5 +echo "configure:18531: checking whether gettimeofday takes two arguments" >&5 if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18538,7 +18542,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -18551,7 +18555,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -18559,7 +18563,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -18572,7 +18576,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -18627,12 +18631,12 @@ fi if test "$wxUSE_SOCKETS" = "yes"; then if test "$TOOLKIT" != "MSW"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:18631: checking for socket" >&5 +echo "configure:18635: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -18673,7 +18677,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:18677: checking for socket in -lsocket" >&5 +echo "configure:18681: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -18681,7 +18685,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -18728,7 +18732,7 @@ fi if test "$wxUSE_SOCKETS" = "yes" ; then if test "$TOOLKIT" != "MSW"; then echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:18732: checking what is the type of the third argument of getsockname" >&5 +echo "configure:18736: checking what is the type of the third argument of getsockname" >&5 if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18743,7 +18747,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -18756,7 +18760,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=socklen_t else @@ -18764,7 +18768,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -18777,7 +18781,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=size_t else @@ -18785,7 +18789,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -18798,7 +18802,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -18870,17 +18874,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:18874: checking for $ac_hdr" >&5 +echo "configure:18878: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:18884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:18888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -18934,12 +18938,12 @@ if test "$TOOLKIT" != "MSW"; then for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18938: checking for $ac_func" >&5 +echo "configure:18942: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18990,7 +18994,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:18994: checking for dlopen in -ldl" >&5 +echo "configure:18998: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -18998,7 +19002,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19038,12 +19042,12 @@ else for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19042: checking for $ac_func" >&5 +echo "configure:19046: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19094,7 +19098,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6 -echo "configure:19098: checking for dld in -lshl_load" >&5 +echo "configure:19102: checking for dld in -lshl_load" >&5 ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19102,7 +19106,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshl_load $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19152,12 +19156,12 @@ done for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19156: checking for $ac_func" >&5 +echo "configure:19160: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19205,7 +19209,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6 -echo "configure:19209: checking for dlerror in -ldl" >&5 +echo "configure:19213: checking for dlerror in -ldl" >&5 ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19213,7 +19217,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19299,7 +19303,7 @@ EOF if test "$wxUSE_MSW" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then echo $ac_n "checking for main in -lunicows""... $ac_c" 1>&6 -echo "configure:19303: checking for main in -lunicows" >&5 +echo "configure:19307: checking for main in -lunicows" >&5 ac_lib_var=`echo unicows'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19307,14 +19311,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lunicows $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19494,17 +19498,17 @@ if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19498: checking for $ac_hdr" >&5 +echo "configure:19502: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:19508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:19512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -20475,7 +20479,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:20479: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:20483: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/configure.in b/configure.in index d21fb8e912..e94e643409 100644 --- a/configure.in +++ b/configure.in @@ -2099,7 +2099,11 @@ equivalent variable and GTK+ is version 1.2.3 or above. ALL_HEADERS="\$(ALL_HEADERS) \${UNIV_HEADERS}" PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst" - TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}" + if test "$wxUSE_X11" = 1; then + TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}${PATH_IFS}\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes" + else + TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}" + fi TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__" WIDGET_SET=univ else diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index 16fa71ac9f..ad36c67b93 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -1217,6 +1217,7 @@ private.h X11H region.h X11H reparent.h X11H settings.h X11H +textctrl.h X11H toolbar.h X11H toplevel.h X11H window.h X11H @@ -1524,7 +1525,7 @@ statbox.h UnivH statline.h UnivH stattext.h UnivH statusbr.h UnivH -textctrl.h UnivH +textctrl.h UnivH NotX11 theme.h UnivH toolbar.h UnivH window.h UnivH diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index ef1fb11a3f..0905218aae 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -276,7 +276,9 @@ protected: // include the platform-dependent class definition // ---------------------------------------------------------------------------- -#if defined(__WXUNIVERSAL__) +#if defined(__WXX11__) + #include "wx/x11/textctrl.h" +#elif defined(__WXUNIVERSAL__) #include "wx/univ/textctrl.h" #elif defined(__WXMSW__) #include "wx/msw/textctrl.h" diff --git a/include/wx/x11/textctrl.h b/include/wx/x11/textctrl.h new file mode 100644 index 0000000000..515a2f2c9d --- /dev/null +++ b/include/wx/x11/textctrl.h @@ -0,0 +1,379 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: textctrl.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Id: $Id$ +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __X11TEXTCTRLH__ +#define __X11TEXTCTRLH__ + +#ifdef __GNUG__ + #pragma interface "textctrl.h" +#endif + +#include "wx/scrolwin.h" +#include "wx/dynarray.h" +#include "wx/datetime.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class wxTextCtrl; + +//----------------------------------------------------------------------------- +// helpers +//----------------------------------------------------------------------------- + +enum wxSourceUndo +{ + wxSOURCE_UNDO_LINE, + wxSOURCE_UNDO_ENTER, + wxSOURCE_UNDO_BACK, + wxSOURCE_UNDO_INSERT_LINE, + wxSOURCE_UNDO_DELETE, + wxSOURCE_UNDO_PASTE +}; + +class wxSourceUndoStep: public wxObject +{ +public: + wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner ); + + void Undo(); + + wxSourceUndo m_type; + int m_y1; + int m_y2; + int m_cursorX; + int m_cursorY; + wxTextCtrl *m_owner; + wxString m_text; + wxArrayString m_lines; +}; + +class wxSourceLine +{ +public: + wxSourceLine( const wxString &text = wxEmptyString ) + { + m_text = text; + } + + wxString m_text; +}; + +WX_DECLARE_OBJARRAY(wxSourceLine, wxSourceLineArray); + +enum wxSourceLanguage +{ + wxSOURCE_LANG_NONE, + wxSOURCE_LANG_CPP, + wxSOURCE_LANG_PERL, + wxSOURCE_LANG_PYTHON +}; + +//----------------------------------------------------------------------------- +// wxTextCtrl +//----------------------------------------------------------------------------- + +class wxTextCtrl: public wxTextCtrlBase, public wxScrollHelper +{ +public: + wxTextCtrl() { Init(); } + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + // required for scrolling with wxScrollHelper + // ------------------------------------------ + + virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } + + // implement base class pure virtuals + // ---------------------------------- + + virtual wxString GetValue() const; + virtual void SetValue(const wxString& value); + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + // more readable flag testing methods + // ---------------------------------- + + bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); } + bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; } + bool WrapLines() const { return FALSE; } + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(long* from, long* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + // clears the dirty flag + virtual void DiscardEdits(); + + virtual void SetMaxLength(unsigned long len); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // apply text attribute to the range of text (only works with richedit + // controls) + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Undo/redo + virtual void Undo(); + virtual void Redo() {} + + virtual bool CanUndo() const { return (m_undos.GetCount() > 0); } + virtual bool CanRedo() const { return FALSE; } + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); + + virtual bool Enable( bool enable ); + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + + bool SetFont(const wxFont& font); + bool SetForegroundColour(const wxColour& colour); + bool SetBackgroundColour(const wxColour& colour); + + void SetModified() { m_modified = TRUE; } + + virtual void Freeze(); + virtual void Thaw(); + + // textctrl specific scrolling + virtual bool ScrollLines(int lines); + virtual bool ScrollPages(int pages); + + // not part of the wxTextCtrl API from now on.. + + void Delete(); + void DeleteLine(); + + void Indent(); + void Unindent(); + + bool HasSelection(); + void ClearSelection(); + + int GetCursorX() { return m_cursorX; } + int GetCursorY() { return m_cursorY; } + bool IsModified() { return m_modified; } + bool OverwriteMode() { return m_overwrite; } + + // implementation from now on... + + void SearchForBrackets(); + + void DoChar( char c ); + void DoBack(); + void DoDelete(); + void DoReturn(); + void DoDClick(); + + wxString GetNextToken( wxString &line, int &pos ); + void DrawLine( wxDC &dc, int x, int y, const wxString &line, int lineNum ); + void OnPaint( wxPaintEvent &event ); + void OnMouse( wxMouseEvent &event ); + void OnChar( wxKeyEvent &event ); + void OnIdle( wxIdleEvent &event ); + + void RefreshLine( int n ); + void RefreshDown( int n ); + void MoveCursor( int new_x, int new_y, bool shift = FALSE, bool centre = FALSE ); + void MyAdjustScrollbars(); + +protected: + // common part of all ctors + void Init(); + + virtual wxSize DoGetBestSize() const; + + friend class wxSourceUndoStep; + + wxSourceLineArray m_lines; + + wxFont m_sourceFont; + wxColour m_sourceColour; + wxColour m_commentColour; + wxColour m_stringColour; + + int m_cursorX; + int m_cursorY; + + int m_selStartX,m_selStartY; + int m_selEndX,m_selEndY; + + int m_lineHeight; + int m_charWidth; + + int m_longestLine; + + bool m_overwrite; + bool m_modified; + bool m_editable; + bool m_ignoreInput; + + wxArrayString m_keywords; + wxColour m_keywordColour; + + wxArrayString m_defines; + wxColour m_defineColour; + + wxArrayString m_variables; + wxColour m_variableColour; + + wxSourceLanguage m_lang; + + wxList m_undos; + + bool m_capturing; + + int m_bracketX; + int m_bracketY; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl); +}; + +//----------------------------------------------------------------------------- +// this is superfluous here but helps to compile +//----------------------------------------------------------------------------- + +// cursor movement and also selection and delete operations +#define wxACTION_TEXT_GOTO _T("goto") // to pos in numArg +#define wxACTION_TEXT_FIRST _T("first") // go to pos 0 +#define wxACTION_TEXT_LAST _T("last") // go to last pos +#define wxACTION_TEXT_HOME _T("home") +#define wxACTION_TEXT_END _T("end") +#define wxACTION_TEXT_LEFT _T("left") +#define wxACTION_TEXT_RIGHT _T("right") +#define wxACTION_TEXT_UP _T("up") +#define wxACTION_TEXT_DOWN _T("down") +#define wxACTION_TEXT_WORD_LEFT _T("wordleft") +#define wxACTION_TEXT_WORD_RIGHT _T("wordright") +#define wxACTION_TEXT_PAGE_UP _T("pageup") +#define wxACTION_TEXT_PAGE_DOWN _T("pagedown") + +// clipboard operations +#define wxACTION_TEXT_COPY _T("copy") +#define wxACTION_TEXT_CUT _T("cut") +#define wxACTION_TEXT_PASTE _T("paste") + +// insert text at the cursor position: the text is in strArg of PerformAction +#define wxACTION_TEXT_INSERT _T("insert") + +// if the action starts with either of these prefixes and the rest of the +// string is one of the movement commands, it means to select/delete text from +// the current cursor position to the new one +#define wxACTION_TEXT_PREFIX_SEL _T("sel") +#define wxACTION_TEXT_PREFIX_DEL _T("del") + +// mouse selection +#define wxACTION_TEXT_ANCHOR_SEL _T("anchorsel") +#define wxACTION_TEXT_EXTEND_SEL _T("extendsel") +#define wxACTION_TEXT_SEL_WORD _T("wordsel") +#define wxACTION_TEXT_SEL_LINE _T("linesel") + +// undo or redo +#define wxACTION_TEXT_UNDO _T("undo") +#define wxACTION_TEXT_REDO _T("redo") + +// ---------------------------------------------------------------------------- +// wxTextCtrl types +// ---------------------------------------------------------------------------- + +// wxTextPos is the position in the text +typedef long wxTextPos; + +// wxTextCoord is the line or row number (which should have been unsigned but +// is long for backwards compatibility) +typedef long wxTextCoord; + +class WXDLLEXPORT wxStdTextCtrlInputHandler : public wxStdInputHandler +{ +public: + wxStdTextCtrlInputHandler(wxInputHandler *inphand) : wxStdInputHandler(inphand) {} + + virtual bool HandleKey(wxInputConsumer *consumer, + const wxKeyEvent& event, + bool pressed) { return FALSE; } + virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event) { return FALSE; } + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event) { return FALSE; } + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event) { return FALSE; } + +protected: + // get the position of the mouse click + static wxTextPos HitTest(const wxTextCtrl *text, const wxPoint& pos) { return 0; } + + // capture data + wxTextCtrl *m_winCapture; +}; + +#endif // __GTKTEXTCTRLH__ + diff --git a/src/mgl/makefile.wat b/src/mgl/makefile.wat index cf53427e6c..3571e590ea 100644 --- a/src/mgl/makefile.wat +++ b/src/mgl/makefile.wat @@ -59,7 +59,6 @@ GENERICOBJS= accel.obj & gridsel.obj & helpext.obj & helphtml.obj & - helpwxht.obj & imaglist.obj & laywin.obj & listctrl.obj & @@ -147,6 +146,7 @@ COMMONOBJS = & hashmap.obj & helpbase.obj & http.obj & + iconbndl.obj & imagall.obj & imagbmp.obj & image.obj & @@ -698,6 +698,9 @@ helpbase.obj: $(COMMDIR)\helpbase.cpp http.obj: $(COMMDIR)\http.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +iconbndl.obj: $(COMMDIR)\iconbndl.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + imagall.obj: $(COMMDIR)\imagall.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -982,9 +985,6 @@ helpext.obj: $(GENDIR)\helpext.cpp helphtml.obj: $(GENDIR)\helphtml.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -helpwxht.obj: $(GENDIR)\helpwxht.cpp - *$(CCC) $(CPPFLAGS) $(IFLAGS) $< - imaglist.obj: $(GENDIR)\imaglist.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 13d8d1054c..06eb991243 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -4117,6 +4117,7 @@ void wxTextCtrl::DoDraw(wxControlRenderer *renderer) // the update region is in window coords and text area is in the client // ones, so it must be shifted before computing intersection wxRegion rgnUpdate = GetUpdateRegion(); + wxRect rectTextArea = GetRealTextArea(); wxPoint pt = GetClientAreaOrigin(); wxRect rectTextAreaAdjusted = rectTextArea; diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index d17179d9b8..ab245bd069 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -4160,12 +4160,12 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control, wxPoint pos = event.GetPosition(); if (scrollbar->HasFlag( wxVERTICAL )) { - if (pos.x > -20 && pos.x < scrollbar->GetSize().x+20) + if (pos.x > -40 && pos.x < scrollbar->GetSize().x+40) pos.x = 5; } else { - if (pos.y > -20 && pos.y < scrollbar->GetSize().y+20) + if (pos.y > -40 && pos.y < scrollbar->GetSize().y+40) pos.y = 5; } ht = m_renderer->HitTestScrollbar(scrollbar, pos ); diff --git a/src/wxUniv.dsp b/src/wxUniv.dsp index ea6bec33fc..8f59a5bfe8 100644 --- a/src/wxUniv.dsp +++ b/src/wxUniv.dsp @@ -1215,7 +1215,7 @@ SOURCE=..\include\wx\univ\setup.h InputPath=..\include\wx\univ\setup.h "../lib/univ/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\univ\wx\setup.h + copy "$(InputPath)" ..\lib\univ\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxUniv - Win32 Debug" @@ -1223,7 +1223,7 @@ InputPath=..\include\wx\univ\setup.h InputPath=..\include\wx\univ\setup.h "../lib/univd/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\univd\wx\setup.h + copy "$(InputPath)" ..\lib\univd\wx\setup.h # End Custom Build !ENDIF diff --git a/src/wxWindows.dsp b/src/wxWindows.dsp index d36fb54842..81c44dbce9 100644 --- a/src/wxWindows.dsp +++ b/src/wxWindows.dsp @@ -1447,7 +1447,7 @@ SOURCE=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswdllu/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswdllu\wx\setup.h + copy "$(InputPath)" ..\lib\mswdllu\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL" @@ -1455,7 +1455,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswdllud/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswdllud\wx\setup.h + copy "$(InputPath)" ..\lib\mswdllud\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" @@ -1463,7 +1463,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswu/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswu\wx\setup.h + copy "$(InputPath)" ..\lib\mswu\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode" @@ -1471,7 +1471,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswud/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswud\wx\setup.h + copy "$(InputPath)" ..\lib\mswud\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL" @@ -1479,7 +1479,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswdll/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswdll\wx\setup.h + copy "$(InputPath)" ..\lib\mswdll\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL" @@ -1487,7 +1487,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswdlld/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswdlld\wx\setup.h + copy "$(InputPath)" ..\lib\mswdlld\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Release" @@ -1495,7 +1495,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/msw/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\msw\wx\setup.h + copy "$(InputPath)" ..\lib\msw\wx\setup.h # End Custom Build !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug" @@ -1503,7 +1503,7 @@ InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h "../lib/mswd/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(InputPath) ..\lib\mswd\wx\setup.h + copy "$(InputPath)" ..\lib\mswd\wx\setup.h # End Custom Build !ENDIF diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 84963e8d2e..e923a61920 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -562,6 +562,8 @@ bool wxApp::ProcessXEvent(WXEvent* _event) #if !wxUSE_NANOX case GraphicsExpose: { + printf( "GraphicExpose event\n" ); + // wxLogDebug( "GraphicsExpose from %s", win->GetName().c_str(), // event->xgraphicsexpose.x, event->xgraphicsexpose.y, // event->xgraphicsexpose.width, event->xgraphicsexpose.height); diff --git a/src/x11/files.lst b/src/x11/files.lst index 7e96ae2d12..32a2c70087 100644 --- a/src/x11/files.lst +++ b/src/x11/files.lst @@ -503,6 +503,7 @@ ALL_HEADERS = \ x11/region.h \ x11/reparent.h \ x11/settings.h \ + x11/textctrl.h \ x11/toolbar.h \ x11/toplevel.h \ x11/window.h \ diff --git a/src/x11/textctrl.cpp b/src/x11/textctrl.cpp new file mode 100644 index 0000000000..8a3e806199 --- /dev/null +++ b/src/x11/textctrl.cpp @@ -0,0 +1,2135 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: textctrl.cpp +// Purpose: +// Author: Robert Roebling +// Id: $Id$ +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "textctrl.h" +#endif + +#include "wx/textctrl.h" +#include "wx/utils.h" +#include "wx/intl.h" +#include "wx/log.h" +#include "wx/settings.h" +#include "wx/panel.h" +#include "wx/clipbrd.h" +#include "wx/tokenzr.h" + +#include "wx/univ/inphand.h" +#include "wx/univ/renderer.h" +#include "wx/univ/colschem.h" +#include "wx/univ/theme.h" + +//----------------------------------------------------------------------------- +// helpers +//----------------------------------------------------------------------------- + +wxSourceUndoStep::wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner ) +{ + m_type = type; + m_y1 = y1; + m_y2 = y2; + m_owner = owner; + + m_cursorX = m_owner->GetCursorX(); + m_cursorY = m_owner->GetCursorY(); + + if (m_type == wxSOURCE_UNDO_LINE) + { + m_text = m_owner->m_lines[m_y1].m_text; + } else + if (m_type == wxSOURCE_UNDO_ENTER) + { + m_text = m_owner->m_lines[m_y1].m_text; + } else + if (m_type == wxSOURCE_UNDO_BACK) + { + for (int i = m_y1; i < m_y2+2; i++) + { + if (i >= (int)m_owner->m_lines.GetCount()) + m_lines.Add( "" ); + else + m_lines.Add( m_owner->m_lines[i].m_text ); + } + } else + if (m_type == wxSOURCE_UNDO_DELETE) + { + for (int i = m_y1; i < m_y2+1; i++) + { + m_lines.Add( m_owner->m_lines[i].m_text ); + } + } else + if (m_type == wxSOURCE_UNDO_PASTE) + { + m_text = m_owner->m_lines[m_y1].m_text; + } +} + +void wxSourceUndoStep::Undo() +{ + if (m_type == wxSOURCE_UNDO_LINE) + { + m_owner->m_lines[m_y1].m_text = m_text; + m_owner->MoveCursor( m_cursorX, m_cursorY ); + m_owner->RefreshLine( m_y1 ); + } else + if (m_type == wxSOURCE_UNDO_ENTER) + { + m_owner->m_lines[m_y1].m_text = m_text; + m_owner->m_lines.RemoveAt( m_y1+1 ); + m_owner->MoveCursor( m_cursorX, m_cursorY ); + m_owner->RefreshDown( m_y1 ); + } else + if (m_type == wxSOURCE_UNDO_BACK) + { + m_owner->m_lines[m_y1].m_text = m_lines[0]; + m_owner->m_lines.Insert( new wxSourceLine( m_lines[1] ), m_y1+1 ); + m_owner->MyAdjustScrollbars(); + m_owner->MoveCursor( m_cursorX, m_cursorY ); + m_owner->RefreshDown( m_y1 ); + } else + if (m_type == wxSOURCE_UNDO_DELETE) + { + m_owner->m_lines[m_y1].m_text = m_lines[0]; + for (int i = 1; i < (int)m_lines.GetCount(); i++) + m_owner->m_lines.Insert( new wxSourceLine( m_lines[i] ), m_y1+i ); + m_owner->MyAdjustScrollbars(); + m_owner->MoveCursor( m_cursorX, m_cursorY ); + m_owner->RefreshDown( m_y1 ); + } else + if (m_type == wxSOURCE_UNDO_PASTE) + { + m_owner->m_lines[m_y1].m_text = m_text; + for (int i = 0; i < m_y2-m_y1; i++) + m_owner->m_lines.RemoveAt( m_y1+1 ); + m_owner->MyAdjustScrollbars(); + m_owner->MoveCursor( m_cursorX, m_cursorY ); + m_owner->RefreshDown( m_y1 ); + } else + if (m_type == wxSOURCE_UNDO_INSERT_LINE) + { + m_owner->m_lines.RemoveAt( m_y1 ); + m_owner->MyAdjustScrollbars(); + m_owner->MoveCursor( 0, m_y1 ); + m_owner->RefreshDown( m_y1 ); + } +} + +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxSourceLineArray); + +//----------------------------------------------------------------------------- +// wxTextCtrl +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl) + +BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) + EVT_PAINT(wxTextCtrl::OnPaint) + EVT_CHAR(wxTextCtrl::OnChar) + EVT_MOUSE_EVENTS(wxTextCtrl::OnMouse) + EVT_IDLE(wxTextCtrl::OnIdle) + + EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) + EVT_MENU(wxID_COPY, wxTextCtrl::OnCopy) + EVT_MENU(wxID_PASTE, wxTextCtrl::OnPaste) + EVT_MENU(wxID_UNDO, wxTextCtrl::OnUndo) + EVT_MENU(wxID_REDO, wxTextCtrl::OnRedo) + + EVT_UPDATE_UI(wxID_CUT, wxTextCtrl::OnUpdateCut) + EVT_UPDATE_UI(wxID_COPY, wxTextCtrl::OnUpdateCopy) + EVT_UPDATE_UI(wxID_PASTE, wxTextCtrl::OnUpdatePaste) + EVT_UPDATE_UI(wxID_UNDO, wxTextCtrl::OnUpdateUndo) + EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo) +END_EVENT_TABLE() + +void wxTextCtrl::Init() +{ + m_editable = TRUE; + m_modified = FALSE; + + m_sourceFont = wxFont( 12, wxMODERN, wxNORMAL, wxNORMAL ); + + m_undos.DeleteContents( TRUE ); + + m_lang = wxSOURCE_LANG_NONE; + + m_capturing = FALSE; + + wxClientDC dc(this); + dc.SetFont( m_sourceFont ); + m_lineHeight = dc.GetCharHeight(); + m_charWidth = dc.GetCharWidth(); + + m_cursorX = 0; + m_cursorY = 0; + + m_longestLine = 0; + + m_bracketX = -1; + m_bracketY = -1; + + m_overwrite = FALSE; + m_ignoreInput = FALSE; + + ClearSelection(); + + m_keywordColour = wxColour( 10, 140, 10 ); + + m_defineColour = *wxRED; + + m_variableColour = wxColour( 50, 120, 150 ); + + m_commentColour = wxColour( 130, 130, 130 ); + + m_stringColour = wxColour( 10, 140, 10 ); +} + +wxTextCtrl::wxTextCtrl( wxWindow *parent, + wxWindowID id, + const wxString &value, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& validator, + const wxString &name ) + : wxScrollHelper(this) +{ + Init(); + + Create( parent, id, value, pos, size, style, validator, name ); +} + +bool wxTextCtrl::Create( wxWindow *parent, + wxWindowID id, + const wxString &value, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& validator, + const wxString &name ) +{ + if ((style & wxBORDER_MASK) == 0) + style |= wxBORDER_SUNKEN; + + if ((style & wxTE_MULTILINE) != 0) + style |= wxALWAYS_SHOW_SB; + + wxTextCtrlBase::Create( parent, id, wxDefaultPosition, size, + style|wxVSCROLL|wxHSCROLL|wxNO_FULL_REPAINT_ON_RESIZE ); + + SetBackgroundColour( *wxWHITE ); + + SetCursor( wxCursor( wxCURSOR_IBEAM ) ); + + SetValue( value ); + + wxSize size_best( DoGetBestSize() ); + wxSize new_size( size ); + if (new_size.x == -1) + new_size.x = size_best.x; + if (new_size.y == -1) + new_size.y = size_best.y; + if ((new_size.x != size.x) || (new_size.y != size.y)) + SetSize( new_size.x, new_size.y ); + + // We create an input handler since it might be useful + CreateInputHandler(wxINP_HANDLER_TEXTCTRL); + + return TRUE; +} + +//----------------------------------------------------------------------------- +// public methods +//----------------------------------------------------------------------------- + +wxString wxTextCtrl::GetValue() const +{ + wxString ret; + for (size_t i = 0; i < m_lines.GetCount(); i++) + { + ret += m_lines[i].m_text; + if (i < m_lines.GetCount()) + ret += wxT('\n'); + } + + return ret; +} + +void wxTextCtrl::SetValue(const wxString& value) +{ + m_modified = TRUE; + m_cursorX = 0; + m_cursorY = 0; + ClearSelection(); + m_lines.Clear(); + m_longestLine = 0; + + int pos = 0; + for (;;) + { + // TODO make more efficient + wxString tmp = value; + tmp.Remove( 0, pos ); + pos = tmp.Find( '\n' ); + if (pos == -1) + { + if (tmp.Len() > m_longestLine) + m_longestLine = tmp.Len(); + + m_lines.Add( new wxSourceLine( tmp ) ); + break; + + } + else + { + if (pos > m_longestLine) + m_longestLine = pos; + + tmp.Remove( pos, tmp.Len()-pos ); + m_lines.Add( new wxSourceLine( tmp ) ); + } + } + + MyAdjustScrollbars(); + + Refresh(); +} + +int wxTextCtrl::GetLineLength(long lineNo) const +{ + if (lineNo >= (long)m_lines.GetCount()) + return 0; + + return m_lines[lineNo].m_text.Len(); +} + +wxString wxTextCtrl::GetLineText(long lineNo) const +{ + if (lineNo >= (long)m_lines.GetCount()) + return wxT(""); + + return m_lines[lineNo].m_text; +} + +int wxTextCtrl::GetNumberOfLines() const +{ + return m_lines.GetCount(); +} + +bool wxTextCtrl::IsModified() const +{ + return m_modified; +} + +bool wxTextCtrl::IsEditable() const +{ + return m_editable; +} + +void wxTextCtrl::GetSelection(long* from, long* to) const +{ +} + +void wxTextCtrl::Clear() +{ + m_modified = TRUE; + m_cursorX = 0; + m_cursorY = 0; + ClearSelection(); + m_lines.Clear(); + SetScrollbars( m_charWidth, m_lineHeight, 0, 0, 0, 0 ); + Refresh(); + m_undos.Clear(); +} + +void wxTextCtrl::Replace(long from, long to, const wxString& value) +{ +} + +void wxTextCtrl::Remove(long from, long to) +{ + +} + +void wxTextCtrl::DiscardEdits() +{ + ClearSelection(); + Refresh(); +} + +void wxTextCtrl::SetMaxLength(unsigned long len) +{ +} + +void wxTextCtrl::WriteText(const wxString& text2) +{ + m_modified = TRUE; + + wxString text( text2 ); + wxArrayString lines; + int pos; + while ( (pos = text.Find('\n')) != -1 ) + { + lines.Add( text.Left( pos ) ); + text.Remove( 0, pos+1 ); + } + lines.Add( text ); + int count = (int)lines.GetCount(); + + wxString tmp1( m_lines[m_cursorY].m_text ); + wxString tmp2( tmp1 ); + int len = (int)tmp1.Len(); + + if (len < m_cursorX) + { + wxString tmp; + for (int i = 0; i < m_cursorX-len; i++) + tmp.Append( ' ' ); + m_lines[m_cursorY].m_text.Append( tmp ); + tmp1.Append( tmp ); + tmp2.Append( tmp ); + } + + tmp1.Remove( m_cursorX ); + tmp2.Remove( 0, m_cursorX ); + tmp1.Append( lines[0] ); + + if (count == 1) + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, m_cursorY, m_cursorY, this ) ); + + tmp1.Append( tmp2 ); + m_lines[m_cursorY].m_text = tmp1; + RefreshLine( m_cursorY ); + } + else + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_PASTE, m_cursorY, m_cursorY+count-1, this ) ); + + m_lines[m_cursorY].m_text = tmp1; + int i; + for (i = 1; i < count; i++) + m_lines.Insert( new wxSourceLine( lines[i] ), m_cursorY+i ); + m_lines[m_cursorY+i-1].m_text.Append( tmp2 ); + + MyAdjustScrollbars(); + RefreshDown( m_cursorY ); + } +} + +void wxTextCtrl::AppendText(const wxString& text) +{ + // Leaves cursor garbage + + m_cursorY = m_lines.GetCount()-1; + m_cursorX = m_lines[m_cursorY].m_text.Len(); + + WriteText( text ); + + Refresh(); +} + +bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style) +{ + return FALSE; +} + +long wxTextCtrl::XYToPosition(long x, long y) const +{ + long ret = 0; + + for (size_t i = 0; i < m_lines.GetCount(); i++) + { + if (i < (size_t)y) + { + ret += m_lines[i].m_text.Len(); + continue; + } + + if ((size_t)x < m_lines[i].m_text.Len()) + return (ret + x); + else + return (ret + m_lines[i].m_text.Len()); + } + + return ret; +} + +bool wxTextCtrl::PositionToXY(long pos, long *x, long *y) const +{ + if (m_lines.GetCount() == 0) + { + if (x) *x = 0; + if (y) *y = 0; + + return (pos == 0); + } + + long xx = 0; + long yy = 0; + + for (size_t i = 0; i < m_lines.GetCount(); i++) + { + pos -= m_lines[i].m_text.Len(); + if (pos <= 0) + { + xx = -pos; + if (x) *x = xx; + if (y) *y = yy; + return TRUE; + } + yy++; + } + + // Last pos + xx = m_lines[ m_lines.GetCount()-1 ].m_text.Len(); + if (x) *x = xx; + if (y) *y = yy; + + return FALSE; +} + +void wxTextCtrl::ShowPosition(long pos) +{ +} + +void wxTextCtrl::Copy() +{ + if (!HasSelection()) return; + + wxString sel; + + int selStartY = m_selStartY; + int selEndY = m_selEndY; + int selStartX = m_selStartX; + int selEndX = m_selEndX; + + if ((selStartY > selEndY) || + ((selStartY == selEndY) && (selStartX > selEndX))) + { + int tmp = selStartX; + selStartX = selEndX; + selEndX = tmp; + tmp = selStartY; + selStartY = selEndY; + selEndY = tmp; + } + + if (selStartY == selEndY) + { + sel = m_lines[selStartY].m_text; + + if (selStartX >= (int)sel.Len()) return; + if (selEndX > (int)sel.Len()) + selEndX = sel.Len(); + + sel.Remove( selEndX, sel.Len()-selEndX ); + sel.Remove( 0, selStartX ); + } + else + { + wxString tmp( m_lines[selStartY].m_text ); + + if (selStartX < (int)tmp.Len()) + { + tmp.Remove( 0, selStartX ); + sel = tmp; + sel.Append( "\n" ); + } + for (int i = selStartY+1; i < selEndY; i++) + { + sel.Append( m_lines[i].m_text ); + sel.Append( "\n" ); + } + tmp = m_lines[selEndY].m_text; + if (selEndX > (int)tmp.Len()) + selEndX = tmp.Len(); + if (selEndX > 0) + { + tmp.Remove( selEndX, tmp.Len()-selEndX ); + sel.Append( tmp ); + } + } + + if (wxTheClipboard->Open()) + { + wxTheClipboard->SetData( new wxTextDataObject( sel ) ); + wxTheClipboard->Close(); + } +} + +void wxTextCtrl::Cut() +{ + Copy(); + + Delete(); +} + +void wxTextCtrl::Paste() +{ + Delete(); + + if (!wxTheClipboard->Open()) return; + + if (!wxTheClipboard->IsSupported( wxDF_TEXT )) + { + wxTheClipboard->Close(); + + return; + } + + wxTextDataObject data; + + bool ret = wxTheClipboard->GetData( data ); + + wxTheClipboard->Close(); + + if (!ret) return; + + m_modified = TRUE; + + wxString text( data.GetText() ); + wxArrayString lines; + int pos; + while ( (pos = text.Find('\n')) != -1 ) + { + lines.Add( text.Left( pos ) ); + text.Remove( 0, pos+1 ); + } + lines.Add( text ); + int count = (int)lines.GetCount(); + + wxString tmp1( m_lines[m_cursorY].m_text ); + wxString tmp2( tmp1 ); + int len = (int)tmp1.Len(); + + if (len < m_cursorX) + { + wxString tmp; + for (int i = 0; i < m_cursorX-len; i++) + tmp.Append( ' ' ); + m_lines[m_cursorY].m_text.Append( tmp ); + tmp1.Append( tmp ); + tmp2.Append( tmp ); + } + + tmp1.Remove( m_cursorX ); + tmp2.Remove( 0, m_cursorX ); + tmp1.Append( lines[0] ); + + if (count == 1) + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, m_cursorY, m_cursorY, this ) ); + + tmp1.Append( tmp2 ); + m_lines[m_cursorY].m_text = tmp1; + RefreshLine( m_cursorY ); + } + else + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_PASTE, m_cursorY, m_cursorY+count-1, this ) ); + + m_lines[m_cursorY].m_text = tmp1; + int i; + for (i = 1; i < count; i++) + m_lines.Insert( new wxSourceLine( lines[i] ), m_cursorY+i ); + m_lines[m_cursorY+i-1].m_text.Append( tmp2 ); + + MyAdjustScrollbars(); + RefreshDown( m_cursorY ); + } +} + +void wxTextCtrl::Undo() +{ + if (m_undos.GetCount() == 0) return; + + wxNode *node = m_undos.Nth( m_undos.GetCount()-1 ); + wxSourceUndoStep *undo = (wxSourceUndoStep*) node->Data(); + + undo->Undo(); + + delete node; + + m_modified = TRUE; +} + +void wxTextCtrl::SetInsertionPoint(long pos) +{ +} + +void wxTextCtrl::SetInsertionPointEnd() +{ +} + +long wxTextCtrl::GetInsertionPoint() const +{ + return XYToPosition( m_cursorX, m_cursorY ); +} + +long wxTextCtrl::GetLastPosition() const +{ + size_t lineCount = m_lines.GetCount() - 1; + return XYToPosition( m_lines[lineCount].m_text.Len()-1, lineCount ); +} + +void wxTextCtrl::SetSelection(long from, long to) +{ +} + +void wxTextCtrl::SetEditable(bool editable) +{ + m_editable = editable; +} + +bool wxTextCtrl::Enable( bool enable ) +{ + return FALSE; +} + +bool wxTextCtrl::SetFont(const wxFont& font) +{ + return FALSE; +} + +bool wxTextCtrl::SetForegroundColour(const wxColour& colour) +{ + return wxWindow::SetForegroundColour( colour ); +} + +bool wxTextCtrl::SetBackgroundColour(const wxColour& colour) +{ + return wxWindow::SetBackgroundColour( colour ); +} + +//----------------------------------------------------------------------------- +// private code and handlers +//----------------------------------------------------------------------------- + +void wxTextCtrl::SearchForBrackets() +{ + int oldBracketY = m_bracketY; + int oldBracketX = m_bracketX; + + if (m_cursorY < 0 || m_cursorY >= (int)m_lines.GetCount()) return; + + wxString current = m_lines[m_cursorY].m_text; + + // reverse search first + + char bracket = ' '; + + if (m_cursorX > 0) + bracket = current[m_cursorX-1]; + + if (bracket == ')' || bracket == ']' || bracket == '}') + { + char antibracket = '('; + if (bracket == ']') antibracket = '['; + if (bracket == '}') antibracket = '{'; + + int count = 1; + + int endY = m_cursorY-60; + if (endY < 0) endY = 0; + for (int y = m_cursorY; y >= endY; y--) + { + current = m_lines[y].m_text; + if (y == m_cursorY) + current.erase(m_cursorX-1,current.Len()-m_cursorX+1); + + for (int n = current.Len()-1; n >= 0; n--) + { + // ignore chars + if (current[n] == '\'') + { + for (int m = n-1; m >= 0; m--) + { + if (current[m] == '\'') + { + if (m == 0 || current[m-1] != '\\') + break; + } + n = m-1; + } + continue; + } + + // ignore strings + if (current[n] == '\"') + { + for (int m = n-1; m >= 0; m--) + { + if (current[m] == '\"') + { + if (m == 0 || current[m-1] != '\\') + break; + } + n = m-1; + } + continue; + } + + if (current[n] == antibracket) + { + count--; + if (count == 0) + { + m_bracketY = y; + m_bracketX = n; + if (oldBracketY != m_bracketY && oldBracketY != -1) + RefreshLine( oldBracketY ); + if (m_bracketY != oldBracketY || m_bracketX != oldBracketX) + RefreshLine( m_bracketY ); + return; + } + } + else if (current[n] == bracket) + { + count++; + } + } + } + } + + // then forward + + bracket = ' '; + if ((int)current.Len() > m_cursorX) + bracket = current[m_cursorX]; + if (bracket == '(' || bracket == '[' || bracket == '{') + { + char antibracket = ')'; + if (bracket == '[') antibracket = ']'; + if (bracket == '{') antibracket = '}'; + + int count = 1; + + int endY = m_cursorY+60; + if (endY > (int)(m_lines.GetCount()-1)) endY = m_lines.GetCount()-1; + for (int y = m_cursorY; y <= endY; y++) + { + current = m_lines[y].m_text; + int start = 0; + if (y == m_cursorY) + start = m_cursorX+1; + + for (int n = start; n < (int)current.Len(); n++) + { + // ignore chars + if (current[n] == '\'') + { + for (int m = n+1; m < (int)current.Len(); m++) + { + if (current[m] == '\'') + { + if (m == 0 || (current[m-1] != '\\') || (m >= 2 && current[m-2] == '\\')) + break; + } + n = m+1; + } + continue; + } + + // ignore strings + if (current[n] == '\"') + { + for (int m = n+1; m < (int)current.Len(); m++) + { + if (current[m] == '\"') + { + if (m == 0 || (current[m-1] != '\\') || (m >= 2 && current[m-2] == '\\')) + break; + } + n = m+1; + } + continue; + } + + if (current[n] == antibracket) + { + count--; + if (count == 0) + { + m_bracketY = y; + m_bracketX = n; + if (oldBracketY != m_bracketY && oldBracketY != -1) + RefreshLine( oldBracketY ); + if (m_bracketY != oldBracketY || m_bracketX != oldBracketX) + RefreshLine( m_bracketY ); + return; + } + } + else if (current[n] == bracket) + { + count++; + } + } + } + } + + if (oldBracketY != -1) + { + m_bracketY = -1; + RefreshLine( oldBracketY ); + } +} + +void wxTextCtrl::Delete() +{ + if (!HasSelection()) return; + + m_modified = TRUE; + + int selStartY = m_selStartY; + int selEndY = m_selEndY; + int selStartX = m_selStartX; + int selEndX = m_selEndX; + + if ((selStartY > selEndY) || + ((selStartY == selEndY) && (selStartX > selEndX))) + { + int tmp = selStartX; + selStartX = selEndX; + selEndX = tmp; + tmp = selStartY; + selStartY = selEndY; + selEndY = tmp; + } + + int len = (int)m_lines[selStartY].m_text.Len(); + + if (selStartY == selEndY) + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, selStartY, selStartY, this ) ); + + wxString tmp( m_lines[selStartY].m_text ); + if (selStartX < len) + { + if (selEndX > len) + selEndX = len; + tmp.Remove( selStartX, selEndX-selStartX ); + m_lines[selStartY].m_text = tmp; + } + ClearSelection(); + m_cursorX = selStartX; + RefreshLine( selStartY ); + } + else + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_DELETE, selStartY, selEndY, this ) ); + + if (selStartX < len) + m_lines[selStartY].m_text.Remove( selStartX ); + + for (int i = 0; i < selEndY-selStartY-1; i++) + m_lines.RemoveAt( selStartY+1 ); + + if (selEndX < (int)m_lines[selStartY+1].m_text.Len()) + m_lines[selStartY+1].m_text.Remove( 0, selEndX ); + else + m_lines[selStartY+1].m_text.Remove( 0 ); + + m_lines[selStartY].m_text.Append( m_lines[selStartY+1].m_text ); + m_lines.RemoveAt( selStartY+1 ); + + ClearSelection(); + MoveCursor( selStartX, selStartY ); + MyAdjustScrollbars(); + + RefreshDown( selStartY ); + } +} + +void wxTextCtrl::DeleteLine() +{ + if (HasSelection()) return; + + if (m_cursorY < 0 || m_cursorY >= (int)m_lines.GetCount()-1) return; // TODO + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_DELETE, m_cursorY, m_cursorY+1, this ) ); + + m_lines.RemoveAt( m_cursorY ); + m_cursorX = 0; + if (m_cursorY >= (int)m_lines.GetCount()) m_cursorY--; + + MyAdjustScrollbars(); + RefreshDown( m_cursorY ); +} + +void wxTextCtrl::DoChar( char c ) +{ + m_modified = TRUE; + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, m_cursorY, m_cursorY, this ) ); + + wxString tmp( m_lines[m_cursorY].m_text ); + tmp.Trim(); + if (m_cursorX >= (int)tmp.Len()) + { + int len = tmp.Len(); + for (int i = 0; i < m_cursorX - len; i++) + tmp.Append( ' ' ); + tmp.Append( c ); + } + else + { + if (m_overwrite) + tmp.SetChar( m_cursorX, c ); + else + tmp.insert( m_cursorX, 1, c ); + } + + m_lines[m_cursorY].m_text = tmp; + + if (tmp.Len() > m_longestLine) + { + m_longestLine = tmp.Len(); + MyAdjustScrollbars(); + } + + m_cursorX++; + + int y = m_cursorY*m_lineHeight; + int x = (m_cursorX-1)*m_charWidth; + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( x+2, y+2, 10000, m_lineHeight ); + Refresh( TRUE, &rect ); + + int size_x = 0; + int size_y = 0; + GetClientSize( &size_x, &size_y ); + size_x /= m_charWidth; + + int view_x = 0; + int view_y = 0; + GetViewStart( &view_x, &view_y ); + + if (m_cursorX < view_x) + Scroll( m_cursorX, -1 ); + else if (m_cursorX > view_x+size_x-1) + Scroll( m_cursorX-size_x+1, -1 ); +} + +void wxTextCtrl::DoBack() +{ + m_modified = TRUE; + + if (m_cursorX == 0) + { + if (m_cursorY == 0) return; + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_BACK, m_cursorY-1, m_cursorY, this ) ); + + wxString tmp1( m_lines[m_cursorY-1].m_text ); + tmp1.Trim(); + wxString tmp2( m_lines[m_cursorY].m_text ); + tmp2.Trim(); + m_cursorX = tmp1.Len(); + m_cursorY--; + tmp1.Append( tmp2 ); + m_lines[m_cursorY].m_text = tmp1; + m_lines.RemoveAt( m_cursorY+1 ); + + MyAdjustScrollbars(); + RefreshDown( m_cursorY-1 ); + } + else + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, m_cursorY, m_cursorY, this ) ); + + if (m_cursorX <= (int)m_lines[m_cursorY].m_text.Len()) + m_lines[m_cursorY].m_text.Remove( m_cursorX-1, 1 ); + m_cursorX--; + + int y = m_cursorY*m_lineHeight; + int x = m_cursorX*m_charWidth; + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( x+2, y+2, 10000, m_lineHeight ); + Refresh( TRUE, &rect ); + } +} + +void wxTextCtrl::DoDelete() +{ + m_modified = TRUE; + + wxString tmp( m_lines[m_cursorY].m_text ); + tmp.Trim(); + int len = (int)tmp.Len(); + if (m_cursorX >= len) + { + if (m_cursorY == (int)m_lines.GetCount()-1) return; + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_DELETE, m_cursorY, m_cursorY+1, this ) ); + + for (int i = 0; i < (m_cursorX-len); i++) + tmp += ' '; + + tmp += m_lines[m_cursorY+1].m_text; + + m_lines[m_cursorY] = tmp; + m_lines.RemoveAt( m_cursorY+1 ); + + MyAdjustScrollbars(); + RefreshDown( m_cursorY ); + } + else + { + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, m_cursorY, m_cursorY, this ) ); + + tmp.Remove( m_cursorX, 1 ); + m_lines[m_cursorY].m_text = tmp; + + int y = m_cursorY*m_lineHeight; + int x = m_cursorX*m_charWidth; + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( x+2, y+2, 10000, m_lineHeight ); + Refresh( TRUE, &rect ); + } +} + +void wxTextCtrl::DoReturn() +{ + m_modified = TRUE; + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_ENTER, m_cursorY, m_cursorY, this ) ); + + wxString tmp( m_lines[m_cursorY].m_text ); + size_t indent = tmp.find_first_not_of( ' ' ); + if (indent == wxSTRING_MAXLEN) indent = 0; + tmp.Trim(); + if (m_cursorX >= (int)tmp.Len()) + { + int cursorX = indent; + int cursorY = m_cursorY + 1; + + wxString new_tmp; + for (size_t i = 0; i < indent; i++) new_tmp.Append( ' ' ); + m_lines.Insert( new wxSourceLine( new_tmp ), cursorY ); + + MyAdjustScrollbars(); + MoveCursor( cursorX, cursorY ); + RefreshDown( m_cursorY ); + } + else + { + wxString tmp1( tmp ); + tmp1.Remove( m_cursorX, tmp.Len()-m_cursorX ); + m_lines[m_cursorY].m_text = tmp1; + + wxString tmp2( tmp ); + tmp2.Remove( 0, m_cursorX ); + + int cursorX = indent; + int cursorY = m_cursorY + 1; + + wxString new_tmp; + for (size_t i = 0; i < indent; i++) new_tmp.Append( ' ' ); + new_tmp.Append( tmp2 ); + m_lines.Insert( new wxSourceLine( new_tmp ), cursorY ); + + MyAdjustScrollbars(); + MoveCursor( cursorX, cursorY ); + RefreshDown( m_cursorY-1 ); + } +} + +void wxTextCtrl::DoDClick() +{ + wxString line( m_lines[ m_cursorY ].m_text ); + if (m_cursorX >= (int)line.Len()) return; + int p = m_cursorX; + char ch = line[p]; + if (((ch >= 'a') && (ch <= 'z')) || + ((ch >= 'A') && (ch <= 'Z')) || + ((ch >= '0') && (ch <= '9')) || + (ch == '_')) + { + m_selStartY = m_cursorY; + m_selEndY = m_cursorY; + if (p > 0) + { + ch = line[p-1]; + while (((ch >= 'a') && (ch <= 'z')) || + ((ch >= 'A') && (ch <= 'Z')) || + ((ch >= '0') && (ch <= '9')) || + (ch == '_')) + { + p--; + if (p == 0) break; + ch = line[p-1]; + } + } + m_selStartX = p; + + p = m_cursorX; + if (p < (int)line.Len()) + { + ch = line[p]; + while (((ch >= 'a') && (ch <= 'z')) || + ((ch >= 'A') && (ch <= 'Z')) || + ((ch >= '0') && (ch <= '9')) || + (ch == '_')) + { + if (p >= (int)line.Len()) break; + p++; + ch = line[p]; + } + } + m_selEndX = p; + RefreshLine( m_cursorY ); + } +} + +wxString wxTextCtrl::GetNextToken( wxString &line, int &pos ) +{ + wxString ret; + int len = (int)line.Len(); + for (int p = pos; p < len; p++) + { + if ((m_lang == wxSOURCE_LANG_PYTHON) || (m_lang == wxSOURCE_LANG_PERL)) + { + if (line[p] == '#') + { + for (int q = p; q < len; q++) + ret.Append( line[q] ); + pos = p; + return ret; + } + } + else + { + if ((line[p] == '/') && (p+1 < len) && (line[p+1] == '/')) + { + for (int q = p; q < len; q++) + ret.Append( line[q] ); + pos = p; + return ret; + } + } + + if (line[p] == '"') + { + ret.Append( line[p] ); + for (int q = p+1; q < len; q++) + { + ret.Append( line[q] ); + if ((line[q] == '"') && ((line[q-1] != '\\') || (q >= 2 && line[q-2] == '\\'))) + break; + } + pos = p; + return ret; + } + + if (line[p] == '\'') + { + ret.Append( line[p] ); + for (int q = p+1; q < len; q++) + { + ret.Append( line[q] ); + if ((line[q] == '\'') && ((line[q-1] != '\\') || (q >= 2 && line[q-2] == '\\'))) + break; + } + pos = p; + return ret; + } + + if (((line[p] >= 'a') && (line[p] <= 'z')) || + ((line[p] >= 'A') && (line[p] <= 'Z')) || + (line[p] == '_') || + (line[p] == '#')) + { + ret.Append( line[p] ); + for (int q = p+1; q < len; q++) + { + if (((line[q] >= 'a') && (line[q] <= 'z')) || + ((line[q] >= 'A') && (line[q] <= 'Z')) || + ((line[q] >= '0') && (line[q] <= '9')) || + (line[q] == '_')) + { + ret.Append( line[q] ); + continue; + } + else + { + pos = p; + return ret; + } + } + pos = p; + return ret; + } + } + + return ret; +} + +void wxTextCtrl::DrawLine( wxDC &dc, int x, int y, const wxString &line2, int lineNum ) +{ + int selStartY = m_selStartY; + int selEndY = m_selEndY; + int selStartX = m_selStartX; + int selEndX = m_selEndX; + + if ((selStartY > selEndY) || + ((selStartY == selEndY) && (selStartX > selEndX))) + { + int tmp = selStartX; + selStartX = selEndX; + selEndX = tmp; + tmp = selStartY; + selStartY = selEndY; + selEndY = tmp; + } + + wxString line( line2 ); + if (HasFlag(wxTE_PASSWORD)) + { + size_t len = line.Len(); + line = wxString( wxT('*'), len ); + } + + wxString keyword( ' ', line.Len() ); + wxString define( ' ', line.Len() ); + wxString variable( ' ', line.Len() ); + wxString comment( ' ', line.Len() ); + wxString my_string( ' ', line.Len() ); + + if (lineNum == m_bracketY) + { + wxString red( ' ', line.Len() ); + if (m_bracketX < (int)line.Len()) + { + red.SetChar( m_bracketX, line[m_bracketX] ); + line.SetChar( m_bracketX, ' ' ); + dc.SetTextForeground( *wxRED ); + dc.DrawText( red, x, y ); + dc.SetTextForeground( *wxBLACK ); + } + } + + int pos = 0; + wxString token( GetNextToken( line, pos) ); + while (!token.IsNull()) + { + if (m_keywords.Index( token ) != wxNOT_FOUND) + { + int end_pos = pos + (int)token.Len(); + for (int i = pos; i < end_pos; i++) + { + keyword.SetChar( i, line[i] ); + line.SetChar( i, ' ' ); + } + } else + if (m_defines.Index( token ) != wxNOT_FOUND) + { + int end_pos = pos + (int)token.Len(); + for (int i = pos; i < end_pos; i++) + { + define.SetChar( i, line[i] ); + line.SetChar( i, ' ' ); + } + } else + if ((m_variables.Index( token ) != wxNOT_FOUND) || + ((token.Len() > 2) && (token[0] == 'w') && (token[1] == 'x'))) + { + int end_pos = pos + (int)token.Len(); + for (int i = pos; i < end_pos; i++) + { + variable.SetChar( i, line[i] ); + line.SetChar( i, ' ' ); + } + } else + if ((token.Len() >= 2) && (token[0] == '/') && (token[1] == '/') && (m_lang == wxSOURCE_LANG_CPP)) + { + int end_pos = pos + (int)token.Len(); + for (int i = pos; i < end_pos; i++) + { + comment.SetChar( i, line[i] ); + line.SetChar( i, ' ' ); + } + } else + if ((token[0] == '#') && + ((m_lang == wxSOURCE_LANG_PYTHON) || (m_lang == wxSOURCE_LANG_PERL))) + { + int end_pos = pos + (int)token.Len(); + for (int i = pos; i < end_pos; i++) + { + comment.SetChar( i, line[i] ); + line.SetChar( i, ' ' ); + } + + } else + if ((token[0] == '"') || (token[0] == '\'')) + { + int end_pos = pos + (int)token.Len(); + for (int i = pos; i < end_pos; i++) + { + my_string.SetChar( i, line[i] ); + line.SetChar( i, ' ' ); + } + } + pos += token.Len(); + token = GetNextToken( line, pos); + } + + if ((lineNum < selStartY) || (lineNum > selEndY)) + { + dc.DrawText( line, x, y ); + dc.SetTextForeground( m_keywordColour ); + dc.DrawText( keyword, x, y ); + dc.SetTextForeground( m_defineColour ); + dc.DrawText( define, x, y ); + dc.SetTextForeground( m_variableColour ); + dc.DrawText( variable, x, y ); + dc.SetTextForeground( m_commentColour ); + dc.DrawText( comment, x, y ); + dc.SetTextForeground( m_stringColour ); + dc.DrawText( my_string, x, y ); + dc.SetTextForeground( *wxBLACK ); + return; + } + + if (selStartY == selEndY) + { + int i; + wxString tmp1( line ); + wxString tmp2( line ); + dc.DrawRectangle( selStartX*m_charWidth+2, lineNum*m_lineHeight+2, + (selEndX-selStartX)*m_charWidth, m_lineHeight ); + for (i = selStartX; i < selEndX; i++) + if ((int)tmp1.Len() > i) + tmp1.SetChar( i, ' ' ); + dc.DrawText( tmp1, x, y ); + for (i = 0; i < selStartX; i++) + if ((int)tmp2.Len() > i) + tmp2.SetChar( i, ' ' ); + for (i = selEndX; i < (int)tmp2.Len(); i++) + if ((int)tmp2.Len() > i) + tmp2.SetChar( i, ' ' ); + dc.SetTextForeground( *wxWHITE ); + dc.DrawText( tmp2, x, y ); + dc.SetTextForeground( *wxBLACK ); + } else + if ((lineNum > selStartY) && (lineNum < selEndY)) + { + dc.DrawRectangle( 0+2, lineNum*m_lineHeight+2, 10000, m_lineHeight ); + dc.SetTextForeground( *wxWHITE ); + dc.DrawText( line, x, y ); + dc.SetTextForeground( *wxBLACK ); + } else + if (lineNum == selStartY) + { + int i; + wxString tmp1( line ); + wxString tmp2( line ); + dc.DrawRectangle( selStartX*m_charWidth+2, lineNum*m_lineHeight+2, + 10000, m_lineHeight ); + for (i = selStartX; i < (int)tmp1.Len(); i++) + tmp1.SetChar( i, ' ' ); + dc.DrawText( tmp1, x, y ); + for (i = 0; i < selStartX; i++) + if ((int)tmp2.Len() > i) + tmp2.SetChar( i, ' ' ); + dc.SetTextForeground( *wxWHITE ); + dc.DrawText( tmp2, x, y ); + dc.SetTextForeground( *wxBLACK ); + } else + if (lineNum == selEndY) + { + int i; + wxString tmp1( line ); + wxString tmp2( line ); + dc.DrawRectangle( 0+2, lineNum*m_lineHeight+2, + selEndX*m_charWidth, m_lineHeight ); + for (i = 0; i < selEndX; i++) + if ((int)tmp1.Len() > i) + tmp1.SetChar( i, ' ' ); + dc.DrawText( tmp1, x, y ); + for (i = selEndX; i < (int)tmp2.Len(); i++) + tmp2.SetChar( i, ' ' ); + dc.SetTextForeground( *wxWHITE ); + dc.DrawText( tmp2, x, y ); + dc.SetTextForeground( *wxBLACK ); + } + + dc.SetTextForeground( m_keywordColour ); + dc.DrawText( keyword, x, y ); + dc.SetTextForeground( m_defineColour ); + dc.DrawText( define, x, y ); + dc.SetTextForeground( m_variableColour ); + dc.DrawText( variable, x, y ); + dc.SetTextForeground( m_commentColour ); + dc.DrawText( comment, x, y ); + dc.SetTextForeground( m_stringColour ); + dc.DrawText( my_string, x, y ); + dc.SetTextForeground( *wxBLACK ); +} + +void wxTextCtrl::OnPaint( wxPaintEvent &event ) +{ + wxPaintDC dc(this); + + if (m_lines.GetCount() == 0) return; + + PrepareDC( dc ); + + dc.SetFont( m_sourceFont ); + + int scroll_y = 0; + GetViewStart( NULL, &scroll_y ); + + int size_x = 0; + int size_y = 0; + GetClientSize( &size_x, &size_y ); + + dc.SetPen( *wxTRANSPARENT_PEN ); + dc.SetBrush( wxBrush( wxTHEME_COLOUR(HIGHLIGHT), wxSOLID ) ); + int upper = wxMin( (int)m_lines.GetCount(), scroll_y+(size_y/m_lineHeight)+1 ); + for (int i = scroll_y; i < upper; i++) + { + int x = 0+2; + int y = i*m_lineHeight+2; + int w = 10000; + int h = m_lineHeight; + CalcScrolledPosition( x,y,&x,&y ); + if (IsExposed(x,y,w,h)) + DrawLine( dc, 0+2, i*m_lineHeight+2, m_lines[i].m_text, i ); + } + + dc.SetBrush( *wxRED_BRUSH ); + dc.DrawRectangle( m_cursorX*m_charWidth+2, m_cursorY*m_lineHeight+2, 2, m_lineHeight ); +} + +void wxTextCtrl::OnMouse( wxMouseEvent &event ) +{ + if (m_lines.GetCount() == 0) return; + + +#if 0 // there is no middle button on iPAQs + if (event.MiddleDown()) + { + Paste( TRUE ); + return; + } +#endif + + if (event.LeftDClick()) + { + DoDClick(); + return; + } + + if (event.LeftDown()) + { + m_capturing = TRUE; + CaptureMouse(); + } + + if (event.LeftUp()) + { + m_capturing = FALSE; + ReleaseMouse(); + } + + if (event.LeftDown() || + (event.LeftIsDown() && m_capturing)) + { + int x = event.GetX(); + int y = event.GetY(); + CalcUnscrolledPosition( x, y, &x, &y ); + x /= m_charWidth; + y /= m_lineHeight; + MoveCursor( + wxMin( 1000, wxMax( 0, x ) ), + wxMin( (int)m_lines.GetCount()-1, wxMax( 0, y ) ), + event.ShiftDown() || !event.LeftDown() ); + } +} + +void wxTextCtrl::OnChar( wxKeyEvent &event ) +{ + if (m_lines.GetCount() == 0) return; + + int size_x = 0; + int size_y = 0; + GetClientSize( &size_x, &size_y ); + size_x /= m_charWidth; + size_y /= m_lineHeight; + size_y--; + + if (event.ShiftDown()) + { + switch (event.GetKeyCode()) + { + case '4': event.m_keyCode = WXK_LEFT; break; + case '8': event.m_keyCode = WXK_UP; break; + case '6': event.m_keyCode = WXK_RIGHT; break; + case '2': event.m_keyCode = WXK_DOWN; break; + case '9': event.m_keyCode = WXK_PRIOR; break; + case '3': event.m_keyCode = WXK_NEXT; break; + case '7': event.m_keyCode = WXK_HOME; break; + case '1': event.m_keyCode = WXK_END; break; + case '0': event.m_keyCode = WXK_INSERT; break; + } + } + + switch (event.GetKeyCode()) + { + case WXK_UP: + { + if (m_ignoreInput) return; + if (m_cursorY > 0) + MoveCursor( m_cursorX, m_cursorY-1, event.ShiftDown() ); + m_ignoreInput = TRUE; + return; + } + case WXK_DOWN: + { + if (m_ignoreInput) return; + if (m_cursorY < (int)(m_lines.GetCount()-1)) + MoveCursor( m_cursorX, m_cursorY+1, event.ShiftDown() ); + m_ignoreInput = TRUE; + return; + } + case WXK_LEFT: + { + if (m_ignoreInput) return; + if (m_cursorX > 0) + { + MoveCursor( m_cursorX-1, m_cursorY, event.ShiftDown() ); + } + else + { + if (m_cursorY > 0) + MoveCursor( m_lines[m_cursorY-1].m_text.Len(), m_cursorY-1, event.ShiftDown() ); + } + m_ignoreInput = TRUE; + return; + } + case WXK_RIGHT: + { + if (m_ignoreInput) return; + if (m_cursorX < 1000) + MoveCursor( m_cursorX+1, m_cursorY, event.ShiftDown() ); + m_ignoreInput = TRUE; + return; + } + case WXK_HOME: + { + if (event.ControlDown()) + MoveCursor( 0, 0, event.ShiftDown() ); + else + MoveCursor( 0, m_cursorY, event.ShiftDown() ); + return; + } + case WXK_END: + { + if (event.ControlDown()) + MoveCursor( 0, m_lines.GetCount()-1, event.ShiftDown() ); + else + MoveCursor( m_lines[m_cursorY].m_text.Len(), m_cursorY, event.ShiftDown() ); + return; + } + case WXK_NEXT: + { + if (m_ignoreInput) return; + MoveCursor( m_cursorX, wxMin( (int)(m_lines.GetCount()-1), m_cursorY+size_y ), event.ShiftDown() ); + m_ignoreInput = TRUE; + return; + } + case WXK_PRIOR: + { + if (m_ignoreInput) return; + MoveCursor( m_cursorX, wxMax( 0, m_cursorY-size_y ), event.ShiftDown() ); + m_ignoreInput = TRUE; + return; + } + case WXK_INSERT: + { + if (event.ShiftDown()) + Paste(); + else if (event.ControlDown()) + Copy(); + else + m_overwrite = !m_overwrite; + return; + } + case WXK_RETURN: + { + if (IsSingleLine()) + { + event.Skip(); + return; + } + + if (HasSelection()) + Delete(); + DoReturn(); + return; + } + case WXK_TAB: + { + if (HasSelection()) + Delete(); + bool save_overwrite = m_overwrite; + m_overwrite = FALSE; + int i = 4-(m_cursorX % 4); + if (i == 0) i = 4; + for (int c = 0; c < i; c++) + DoChar( ' ' ); + m_overwrite = save_overwrite; + return; + } + case WXK_BACK: + { + if (HasSelection()) + Delete(); + else + DoBack(); + return; + } + case WXK_DELETE: + { + if (HasSelection()) + Delete(); + else + DoDelete(); + return; + } + default: + { + if ( (event.KeyCode() >= 'a') && + (event.KeyCode() <= 'z') && + (event.AltDown()) ) + { + // Alt-F etc. + event.Skip(); + return; + } + + if ( (event.KeyCode() >= 32) && + (event.KeyCode() <= 255) && + !(event.ControlDown() && !event.AltDown()) ) // filters out Ctrl-X but leaves Alt-Gr + { + if (HasSelection()) + Delete(); + DoChar( (char) event.KeyCode() ); + return; + } + } + } + + event.Skip(); +} + +void wxTextCtrl::OnIdle( wxIdleEvent &event ) +{ + m_ignoreInput = FALSE; + + SearchForBrackets(); + + event.Skip( TRUE ); +} + +void wxTextCtrl::Indent() +{ + int startY = m_cursorY; + int endY = m_cursorY; + if (HasSelection()) + { + startY = m_selStartY; + endY = m_selEndY; + if (endY < startY) + { + int tmp = startY; + startY = endY; + endY = tmp; + } + } + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, startY, endY, this ) ); + + for (int i = startY; i <= endY; i++) + { + m_lines[i].m_text.insert( 0u, " " ); + RefreshLine( i ); + } +} + +void wxTextCtrl::Unindent() +{ + int startY = m_cursorY; + int endY = m_cursorY; + if (HasSelection()) + { + startY = m_selStartY; + endY = m_selEndY; + if (endY < startY) + { + int tmp = startY; + startY = endY; + endY = tmp; + } + } + + m_undos.Append( new wxSourceUndoStep( wxSOURCE_UNDO_LINE, startY, endY, this ) ); + + for (int i = startY; i <= endY; i++) + { + for (int n = 0; n < 4; n++) + { + if (m_lines[i].m_text[0u] == ' ') + m_lines[i].m_text.erase(0u,1u); + } + RefreshLine( i ); + } +} +bool wxTextCtrl::HasSelection() +{ + return ((m_selStartY != m_selEndY) || (m_selStartX != m_selEndX)); +} + +void wxTextCtrl::ClearSelection() +{ + m_selStartX = -1; + m_selStartY = -1; + m_selEndX = -1; + m_selEndY = -1; +} + +void wxTextCtrl::RefreshLine( int n ) +{ + int y = n*m_lineHeight; + int x = 0; + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( 0+2, y+2, 10000, m_lineHeight ); + Refresh( TRUE, &rect ); +} + +void wxTextCtrl::RefreshDown( int n ) +{ + int size_x = 0; + int size_y = 0; + GetClientSize( &size_x, &size_y ); + + int view_x = 0; + int view_y = 0; + GetViewStart( &view_x, &view_y ); + + if (n < view_y) + { + Refresh(); + } + else + { + int y = n*m_lineHeight; + int x = 0; + CalcScrolledPosition( x, y, &x, &y ); + + wxRect rect( 0+2, y+2, 10000, size_y ); + Refresh( TRUE, &rect ); + } +} + +void wxTextCtrl::MoveCursor( int new_x, int new_y, bool shift, bool centre ) +{ + // if (IsSingleLine()) + { + if (new_x > m_lines[new_y].m_text.Len()) + new_x = m_lines[new_y].m_text.Len(); + } + + if ((new_x == m_cursorX) && (new_y == m_cursorY)) return; + + bool no_cursor_refresh = FALSE; + + if (shift) + { + int x,y,w,h; + + if (!HasSelection()) + { + m_selStartX = m_cursorX; + m_selStartY = m_cursorY; + + x = 0; + w = 10000; + if (new_y > m_selStartY) + { + y = m_selStartY*m_lineHeight; + h = (new_y-m_selStartY+1)*m_lineHeight; + } + else if (new_y == m_selStartY) + { + y = m_selStartY*m_lineHeight; + h = m_lineHeight; + } + else + { + y = new_y*m_lineHeight; + h = (-new_y+m_selStartY+1)*m_lineHeight; + } + + no_cursor_refresh = TRUE; + m_cursorX = new_x; + m_cursorY = new_y; + } + else + { + if (new_y == m_selEndY) + { + y = new_y *m_lineHeight; + h = m_lineHeight; + if (m_selEndX > new_x) + { + x = new_x*m_charWidth; + w = (m_selEndX-new_x)*m_charWidth; + } + else + { + x = m_selEndX*m_charWidth; + w = (-m_selEndX+new_x)*m_charWidth; + } + } + else + { + x = 0; + w = 10000; + if (new_y > m_selEndY) + { + y = m_selEndY*m_lineHeight; + h = (new_y-m_selEndY+1) * m_lineHeight; + } + else + { + y = new_y*m_lineHeight; + h = (-new_y+m_selEndY+1) * m_lineHeight; + } + no_cursor_refresh = TRUE; + m_cursorX = new_x; + m_cursorY = new_y; + } + } + + m_selEndX = new_x; + m_selEndY = new_y; + + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( x+2, y+2, w, h ); + Refresh( TRUE, &rect ); + } + else + { + if (HasSelection()) + { + int ry1 = m_selEndY; + int ry2 = m_selStartY; + m_selEndX = -1; + m_selEndY = -1; + m_selStartX = -1; + m_selStartY = -1; + + if (ry1 > ry2) + { + int tmp = ry2; + ry2 = ry1; + ry1 = tmp; + } + + int x = 0; + int y = ry1*m_lineHeight; + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( 0+2, y+2, 10000, (ry2-ry1+1)*m_lineHeight ); + + Refresh( TRUE, &rect ); + } + } + +/* + printf( "startx %d starty %d endx %d endy %d\n", + m_selStartX, m_selStartY, m_selEndX, m_selEndY ); + + printf( "has %d\n", (int)HasSelection() ); +*/ + + if (!no_cursor_refresh) + { + int x = m_cursorX*m_charWidth; + int y = m_cursorY*m_lineHeight; + CalcScrolledPosition( x, y, &x, &y ); + wxRect rect( x+2, y+2, 4, m_lineHeight+2 ); + + m_cursorX = new_x; + m_cursorY = new_y; + + Refresh( TRUE, &rect ); + + wxClientDC dc(this); + PrepareDC( dc ); + dc.SetPen( *wxTRANSPARENT_PEN ); + dc.SetBrush( *wxRED_BRUSH ); + dc.DrawRectangle( m_cursorX*m_charWidth+2, m_cursorY*m_lineHeight+2, 2, m_lineHeight ); + } + + int size_x = 0; + int size_y = 0; + GetClientSize( &size_x, &size_y ); + size_x /= m_charWidth; + size_y /= m_lineHeight; + + int view_x = 0; + int view_y = 0; + GetViewStart( &view_x, &view_y ); + + if (centre) + { + int sy = m_cursorY - (size_y/2); + if (sy < 0) sy = 0; + Scroll( -1, sy ); + } + else + { + if (m_cursorY < view_y) + Scroll( -1, m_cursorY ); + else if (m_cursorY > view_y+size_y-1) + Scroll( -1, m_cursorY-size_y+1 ); + } + + if (m_cursorX < view_x) + Scroll( m_cursorX, -1 ); + else if (m_cursorX > view_x+size_x-1) + Scroll( m_cursorX-size_x+1, -1 ); +} + +void wxTextCtrl::MyAdjustScrollbars() +{ + if (IsSingleLine()) + return; + + int y_range = m_lines.GetCount(); + + int height = 0; + GetClientSize( NULL, &height ); + height -= 4; + if (height >= m_lines.GetCount() *m_lineHeight) + y_range = 0; + + int view_x = 0; + int view_y = 0; + GetViewStart( &view_x, &view_y ); + + SetScrollbars( m_charWidth, m_lineHeight, m_longestLine+2, y_range, view_x, view_y ); +} + +//----------------------------------------------------------------------------- +// clipboard handlers +//----------------------------------------------------------------------------- + +void wxTextCtrl::OnCut(wxCommandEvent& WXUNUSED(event)) +{ + Cut(); +} + +void wxTextCtrl::OnCopy(wxCommandEvent& WXUNUSED(event)) +{ + Copy(); +} + +void wxTextCtrl::OnPaste(wxCommandEvent& WXUNUSED(event)) +{ + Paste(); +} + +void wxTextCtrl::OnUndo(wxCommandEvent& WXUNUSED(event)) +{ + Undo(); +} + +void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event)) +{ + Redo(); +} + +void wxTextCtrl::OnUpdateCut(wxUpdateUIEvent& event) +{ + event.Enable( CanCut() ); +} + +void wxTextCtrl::OnUpdateCopy(wxUpdateUIEvent& event) +{ + event.Enable( CanCopy() ); +} + +void wxTextCtrl::OnUpdatePaste(wxUpdateUIEvent& event) +{ + event.Enable( CanPaste() ); +} + +void wxTextCtrl::OnUpdateUndo(wxUpdateUIEvent& event) +{ + event.Enable( CanUndo() ); +} + +void wxTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event) +{ + event.Enable( CanRedo() ); +} + +wxSize wxTextCtrl::DoGetBestSize() const +{ + if (IsSingleLine()) + { + wxSize ret(80, m_lineHeight + 4); + + if (HasFlag(wxBORDER_SUNKEN) || HasFlag(wxBORDER_RAISED)) + ret.y += 4; + + if (HasFlag(wxBORDER_SIMPLE)) + ret.y += 2; + + return ret; + } + else + { + return wxSize(80, 60); + } +} + +// ---------------------------------------------------------------------------- +// freeze/thaw +// ---------------------------------------------------------------------------- + +void wxTextCtrl::Freeze() +{ +} + +void wxTextCtrl::Thaw() +{ +} + +// ---------------------------------------------------------------------------- +// text control scrolling +// ---------------------------------------------------------------------------- + +bool wxTextCtrl::ScrollLines(int lines) +{ + wxFAIL_MSG( "wxTextCtrl::ScrollLines not implemented"); + + return FALSE; +} + +bool wxTextCtrl::ScrollPages(int pages) +{ + wxFAIL_MSG( "wxTextCtrl::ScrollPages not implemented"); + + return FALSE; +} + -- 2.45.2