Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2b4c23153f |
@@ -1216,7 +1216,6 @@ PYTHON_DIST:
|
|||||||
mkdir $(DISTDIR)/wxPython/demo
|
mkdir $(DISTDIR)/wxPython/demo
|
||||||
mkdir $(DISTDIR)/wxPython/demo/bitmaps
|
mkdir $(DISTDIR)/wxPython/demo/bitmaps
|
||||||
mkdir $(DISTDIR)/wxPython/demo/data
|
mkdir $(DISTDIR)/wxPython/demo/data
|
||||||
mkdir $(DISTDIR)/wxPython/distrib
|
|
||||||
mkdir $(DISTDIR)/wxPython/src
|
mkdir $(DISTDIR)/wxPython/src
|
||||||
mkdir $(DISTDIR)/wxPython/src/gtk
|
mkdir $(DISTDIR)/wxPython/src/gtk
|
||||||
mkdir $(DISTDIR)/wxPython/wxPython
|
mkdir $(DISTDIR)/wxPython/wxPython
|
||||||
@@ -1225,7 +1224,9 @@ PYTHON_DIST:
|
|||||||
mkdir $(DISTDIR)/wxPython/wxPython/lib/sizers
|
mkdir $(DISTDIR)/wxPython/wxPython/lib/sizers
|
||||||
|
|
||||||
cp $(WXDIR)/wxPython/*.txt $(DISTDIR)/wxPython
|
cp $(WXDIR)/wxPython/*.txt $(DISTDIR)/wxPython
|
||||||
cp $(WXDIR)/wxPython/contrib/buildall.py $(DISTDIR)/wxPython/contrib
|
cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython
|
||||||
|
cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython
|
||||||
|
cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython
|
||||||
-cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas
|
-cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas
|
||||||
cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk
|
cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk
|
||||||
-cp $(WXDIR)/wxPython/contrib/ogl/* $(DISTDIR)/wxPython/contrib/ogl
|
-cp $(WXDIR)/wxPython/contrib/ogl/* $(DISTDIR)/wxPython/contrib/ogl
|
||||||
@@ -1233,13 +1234,11 @@ PYTHON_DIST:
|
|||||||
-cp $(WXDIR)/wxPython/demo/* $(DISTDIR)/wxPython/demo
|
-cp $(WXDIR)/wxPython/demo/* $(DISTDIR)/wxPython/demo
|
||||||
-cp $(WXDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/wxPython/demo/bitmaps
|
-cp $(WXDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/wxPython/demo/bitmaps
|
||||||
-cp $(WXDIR)/wxPython/demo/data/* $(DISTDIR)/wxPython/demo/data
|
-cp $(WXDIR)/wxPython/demo/data/* $(DISTDIR)/wxPython/demo/data
|
||||||
cp $(WXDIR)/wxPython/distrib/build.py $(DISTDIR)/wxPython/distrib
|
|
||||||
-cp $(WXDIR)/wxPython/src/* $(DISTDIR)/wxPython/src
|
-cp $(WXDIR)/wxPython/src/* $(DISTDIR)/wxPython/src
|
||||||
cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk
|
cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk
|
||||||
cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk
|
cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk
|
||||||
cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib
|
cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib
|
||||||
cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor
|
cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor
|
||||||
cp $(WXDIR)/wxPython/wxPython/lib/sizers/*.py $(DISTDIR)/wxPython/wxPython/lib/sizers
|
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
$(RM) -r _dist_dir
|
$(RM) -r _dist_dir
|
||||||
|
205
configure
vendored
205
configure
vendored
@@ -907,10 +907,10 @@ test "$host_alias" != "$target_alias" &&
|
|||||||
|
|
||||||
WX_MAJOR_VERSION_NUMBER=2
|
WX_MAJOR_VERSION_NUMBER=2
|
||||||
WX_MINOR_VERSION_NUMBER=2
|
WX_MINOR_VERSION_NUMBER=2
|
||||||
WX_RELEASE_NUMBER=1
|
WX_RELEASE_NUMBER=5
|
||||||
|
|
||||||
WX_INTERFACE_AGE=1
|
WX_INTERFACE_AGE=5
|
||||||
WX_BINARY_AGE=2
|
WX_BINARY_AGE=5
|
||||||
|
|
||||||
WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
|
WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
|
||||||
|
|
||||||
@@ -11988,12 +11988,13 @@ fi
|
|||||||
|
|
||||||
DEP_INFO_FLAGS=
|
DEP_INFO_FLAGS=
|
||||||
CODE_GEN_FLAGS=
|
CODE_GEN_FLAGS=
|
||||||
|
CODE_GEN_FLAGS_CXX=
|
||||||
if test "$GCC" = yes ; then
|
if test "$GCC" = yes ; then
|
||||||
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-rtti"
|
CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-rtti"
|
||||||
fi
|
fi
|
||||||
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-exceptions"
|
CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-exceptions"
|
||||||
fi
|
fi
|
||||||
if test "$wxUSE_PERMISSIVE" = "yes" ; then
|
if test "$wxUSE_PERMISSIVE" = "yes" ; then
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive"
|
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive"
|
||||||
@@ -12034,17 +12035,17 @@ EOF
|
|||||||
ZLIB_LINK=
|
ZLIB_LINK=
|
||||||
ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
|
echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
|
||||||
echo "configure:12038: checking for zlib.h" >&5
|
echo "configure:12039: checking for zlib.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12043 "configure"
|
#line 12044 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:12048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:12049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -12061,7 +12062,7 @@ fi
|
|||||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
|
echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
|
||||||
echo "configure:12065: checking for deflate in -lz" >&5
|
echo "configure:12066: checking for deflate in -lz" >&5
|
||||||
ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -12069,7 +12070,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lz $LIBS"
|
LIBS="-lz $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12073 "configure"
|
#line 12074 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -12080,7 +12081,7 @@ int main() {
|
|||||||
deflate()
|
deflate()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -12127,17 +12128,17 @@ EOF
|
|||||||
PNG_LINK=
|
PNG_LINK=
|
||||||
ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for png.h""... $ac_c" 1>&6
|
echo $ac_n "checking for png.h""... $ac_c" 1>&6
|
||||||
echo "configure:12131: checking for png.h" >&5
|
echo "configure:12132: checking for png.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12136 "configure"
|
#line 12137 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <png.h>
|
#include <png.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:12141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:12142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -12154,7 +12155,7 @@ fi
|
|||||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6
|
echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6
|
||||||
echo "configure:12158: checking for png_check_sig in -lpng" >&5
|
echo "configure:12159: checking for png_check_sig in -lpng" >&5
|
||||||
ac_lib_var=`echo png'_'png_check_sig | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo png'_'png_check_sig | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -12162,7 +12163,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lpng -lz -lm $LIBS"
|
LIBS="-lpng -lz -lm $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12166 "configure"
|
#line 12167 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -12173,7 +12174,7 @@ int main() {
|
|||||||
png_check_sig()
|
png_check_sig()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -12218,17 +12219,17 @@ EOF
|
|||||||
JPEG_LINK=
|
JPEG_LINK=
|
||||||
ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
|
echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
|
||||||
echo "configure:12222: checking for jpeglib.h" >&5
|
echo "configure:12223: checking for jpeglib.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12227 "configure"
|
#line 12228 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:12232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:12233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -12245,7 +12246,7 @@ fi
|
|||||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
|
echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
|
||||||
echo "configure:12249: checking for jpeg_read_header in -ljpeg" >&5
|
echo "configure:12250: checking for jpeg_read_header in -ljpeg" >&5
|
||||||
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -12253,7 +12254,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ljpeg $LIBS"
|
LIBS="-ljpeg $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12257 "configure"
|
#line 12258 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -12264,7 +12265,7 @@ int main() {
|
|||||||
jpeg_read_header()
|
jpeg_read_header()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -12306,17 +12307,17 @@ EOF
|
|||||||
TIFF_LINK=
|
TIFF_LINK=
|
||||||
ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
|
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
|
||||||
echo "configure:12310: checking for tiffio.h" >&5
|
echo "configure:12311: checking for tiffio.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12315 "configure"
|
#line 12316 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <tiffio.h>
|
#include <tiffio.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:12320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:12321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -12333,7 +12334,7 @@ fi
|
|||||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6
|
echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6
|
||||||
echo "configure:12337: checking for TIFFError in -ltiff" >&5
|
echo "configure:12338: checking for TIFFError in -ltiff" >&5
|
||||||
ac_lib_var=`echo tiff'_'TIFFError | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo tiff'_'TIFFError | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -12341,7 +12342,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ltiff -lm $LIBS"
|
LIBS="-ltiff -lm $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12345 "configure"
|
#line 12346 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -12352,7 +12353,7 @@ int main() {
|
|||||||
TIFFError()
|
TIFFError()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -12385,17 +12386,17 @@ fi
|
|||||||
if test "$wxUSE_OPENGL" = "yes"; then
|
if test "$wxUSE_OPENGL" = "yes"; then
|
||||||
ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
|
echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
|
||||||
echo "configure:12389: checking for GL/gl.h" >&5
|
echo "configure:12390: checking for GL/gl.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12394 "configure"
|
#line 12395 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:12399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:12400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -12421,7 +12422,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo $ac_n "checking for glFlush in -lGL""... $ac_c" 1>&6
|
echo $ac_n "checking for glFlush in -lGL""... $ac_c" 1>&6
|
||||||
echo "configure:12425: checking for glFlush in -lGL" >&5
|
echo "configure:12426: checking for glFlush in -lGL" >&5
|
||||||
ac_lib_var=`echo GL'_'glFlush | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo GL'_'glFlush | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -12429,7 +12430,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lGL $LIBS"
|
LIBS="-lGL $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12433 "configure"
|
#line 12434 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -12440,7 +12441,7 @@ int main() {
|
|||||||
glFlush()
|
glFlush()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -12462,7 +12463,7 @@ else
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for glFlush in -lMesaGL""... $ac_c" 1>&6
|
echo $ac_n "checking for glFlush in -lMesaGL""... $ac_c" 1>&6
|
||||||
echo "configure:12466: checking for glFlush in -lMesaGL" >&5
|
echo "configure:12467: checking for glFlush in -lMesaGL" >&5
|
||||||
ac_lib_var=`echo MesaGL'_'glFlush | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo MesaGL'_'glFlush | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -12470,7 +12471,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lMesaGL $LIBS"
|
LIBS="-lMesaGL $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12474 "configure"
|
#line 12475 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -12481,7 +12482,7 @@ int main() {
|
|||||||
glFlush()
|
glFlush()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -12684,12 +12685,12 @@ if test "$wxUSE_TIMEDATE" = "yes"; then
|
|||||||
for ac_func in strptime
|
for ac_func in strptime
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:12688: checking for $ac_func" >&5
|
echo "configure:12689: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12693 "configure"
|
#line 12694 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -12712,7 +12713,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -12738,13 +12739,13 @@ done
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for timezone variable in <time.h>""... $ac_c" 1>&6
|
echo $ac_n "checking for timezone variable in <time.h>""... $ac_c" 1>&6
|
||||||
echo "configure:12742: checking for timezone variable in <time.h>" >&5
|
echo "configure:12743: checking for timezone variable in <time.h>" >&5
|
||||||
if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12748 "configure"
|
#line 12749 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -12756,7 +12757,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:12761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
|
||||||
wx_cv_var_timezone=__timezone
|
wx_cv_var_timezone=__timezone
|
||||||
@@ -12767,7 +12768,7 @@ else
|
|||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12771 "configure"
|
#line 12772 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -12779,7 +12780,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:12784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
|
||||||
wx_cv_var_timezone=_timezone
|
wx_cv_var_timezone=_timezone
|
||||||
@@ -12790,7 +12791,7 @@ else
|
|||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12794 "configure"
|
#line 12795 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -12802,7 +12803,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:12807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
|
||||||
wx_cv_var_timezone=timezone
|
wx_cv_var_timezone=timezone
|
||||||
@@ -12837,12 +12838,12 @@ EOF
|
|||||||
for ac_func in localtime
|
for ac_func in localtime
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:12841: checking for $ac_func" >&5
|
echo "configure:12842: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12846 "configure"
|
#line 12847 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -12865,7 +12866,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -12892,13 +12893,13 @@ done
|
|||||||
|
|
||||||
if test "$ac_cv_func_localtime" = "yes"; then
|
if test "$ac_cv_func_localtime" = "yes"; then
|
||||||
echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
|
echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
|
||||||
echo "configure:12896: checking for tm_gmtoff in struct tm" >&5
|
echo "configure:12897: checking for tm_gmtoff in struct tm" >&5
|
||||||
if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12902 "configure"
|
#line 12903 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -12910,7 +12911,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:12915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
|
||||||
wx_cv_struct_tm_has_gmtoff=yes
|
wx_cv_struct_tm_has_gmtoff=yes
|
||||||
@@ -12936,12 +12937,12 @@ echo "$ac_t""$wx_cv_struct_tm_has_gmtoff" 1>&6
|
|||||||
for ac_func in gettimeofday ftime
|
for ac_func in gettimeofday ftime
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:12940: checking for $ac_func" >&5
|
echo "configure:12941: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 12945 "configure"
|
#line 12946 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -12964,7 +12965,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:12969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -12991,7 +12992,7 @@ done
|
|||||||
|
|
||||||
if test "$ac_cv_func_gettimeofday" = "yes"; then
|
if test "$ac_cv_func_gettimeofday" = "yes"; then
|
||||||
echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6
|
echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6
|
||||||
echo "configure:12995: checking whether gettimeofday takes two arguments" >&5
|
echo "configure:12996: checking whether gettimeofday takes two arguments" >&5
|
||||||
if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@@ -13006,7 +13007,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
|||||||
|
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13010 "configure"
|
#line 13011 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@@ -13020,7 +13021,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:13025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
wx_cv_func_gettimeofday_has_2_args=yes
|
wx_cv_func_gettimeofday_has_2_args=yes
|
||||||
else
|
else
|
||||||
@@ -13028,7 +13029,7 @@ else
|
|||||||
cat conftest.$ac_ext >&5
|
cat conftest.$ac_ext >&5
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13032 "configure"
|
#line 13033 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@@ -13041,7 +13042,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:13046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
wx_cv_func_gettimeofday_has_2_args=no
|
wx_cv_func_gettimeofday_has_2_args=no
|
||||||
else
|
else
|
||||||
@@ -13087,12 +13088,12 @@ if test "$TOOLKIT" != "MSW"; then
|
|||||||
|
|
||||||
if test "$wxUSE_SOCKETS" = "yes"; then
|
if test "$wxUSE_SOCKETS" = "yes"; then
|
||||||
echo $ac_n "checking for socket""... $ac_c" 1>&6
|
echo $ac_n "checking for socket""... $ac_c" 1>&6
|
||||||
echo "configure:13091: checking for socket" >&5
|
echo "configure:13092: checking for socket" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13096 "configure"
|
#line 13097 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char socket(); below. */
|
which can conflict with char socket(); below. */
|
||||||
@@ -13115,7 +13116,7 @@ socket();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_socket=yes"
|
eval "ac_cv_func_socket=yes"
|
||||||
else
|
else
|
||||||
@@ -13133,7 +13134,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
|
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
|
||||||
echo "configure:13137: checking for socket in -lsocket" >&5
|
echo "configure:13138: checking for socket in -lsocket" >&5
|
||||||
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -13141,7 +13142,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lsocket $LIBS"
|
LIBS="-lsocket $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13145 "configure"
|
#line 13146 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -13152,7 +13153,7 @@ int main() {
|
|||||||
socket()
|
socket()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -13186,7 +13187,7 @@ fi
|
|||||||
|
|
||||||
if test "$wxUSE_SOCKETS" = "yes" ; then
|
if test "$wxUSE_SOCKETS" = "yes" ; then
|
||||||
echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6
|
echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6
|
||||||
echo "configure:13190: checking what is the type of the third argument of getsockname" >&5
|
echo "configure:13191: checking what is the type of the third argument of getsockname" >&5
|
||||||
if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@@ -13201,7 +13202,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
|||||||
|
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13205 "configure"
|
#line 13206 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -13214,7 +13215,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:13219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
wx_cv_type_getsockname3=socklen_t
|
wx_cv_type_getsockname3=socklen_t
|
||||||
else
|
else
|
||||||
@@ -13222,7 +13223,7 @@ else
|
|||||||
cat conftest.$ac_ext >&5
|
cat conftest.$ac_ext >&5
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13226 "configure"
|
#line 13227 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -13235,7 +13236,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:13240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
wx_cv_type_getsockname3=size_t
|
wx_cv_type_getsockname3=size_t
|
||||||
else
|
else
|
||||||
@@ -13243,7 +13244,7 @@ else
|
|||||||
cat conftest.$ac_ext >&5
|
cat conftest.$ac_ext >&5
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13247 "configure"
|
#line 13248 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -13256,7 +13257,7 @@ int main() {
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:13261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
wx_cv_type_getsockname3=int
|
wx_cv_type_getsockname3=int
|
||||||
else
|
else
|
||||||
@@ -13316,17 +13317,17 @@ if test "$wxUSE_JOYSTICK" = "yes"; then
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:13320: checking for $ac_hdr" >&5
|
echo "configure:13321: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13325 "configure"
|
#line 13326 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:13330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:13331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -13379,12 +13380,12 @@ if test "$wxUSE_DYNLIB_CLASS" = "yes"; then
|
|||||||
for ac_func in dlopen
|
for ac_func in dlopen
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:13383: checking for $ac_func" >&5
|
echo "configure:13384: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13388 "configure"
|
#line 13389 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -13407,7 +13408,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -13435,7 +13436,7 @@ EOF
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||||
echo "configure:13439: checking for dlopen in -ldl" >&5
|
echo "configure:13440: checking for dlopen in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -13443,7 +13444,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13447 "configure"
|
#line 13448 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -13454,7 +13455,7 @@ int main() {
|
|||||||
dlopen()
|
dlopen()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -13483,12 +13484,12 @@ else
|
|||||||
for ac_func in shl_load
|
for ac_func in shl_load
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:13487: checking for $ac_func" >&5
|
echo "configure:13488: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13492 "configure"
|
#line 13493 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -13511,7 +13512,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -13539,7 +13540,7 @@ EOF
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6
|
echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6
|
||||||
echo "configure:13543: checking for dld in -lshl_load" >&5
|
echo "configure:13544: checking for dld in -lshl_load" >&5
|
||||||
ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -13547,7 +13548,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lshl_load $LIBS"
|
LIBS="-lshl_load $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13551 "configure"
|
#line 13552 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -13558,7 +13559,7 @@ int main() {
|
|||||||
dld()
|
dld()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -13597,12 +13598,12 @@ done
|
|||||||
for ac_func in dlerror
|
for ac_func in dlerror
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:13601: checking for $ac_func" >&5
|
echo "configure:13602: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13606 "configure"
|
#line 13607 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@@ -13625,7 +13626,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@@ -13650,7 +13651,7 @@ EOF
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6
|
||||||
echo "configure:13654: checking for dlerror in -ldl" >&5
|
echo "configure:13655: checking for dlerror in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -13658,7 +13659,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13662 "configure"
|
#line 13663 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@@ -13669,7 +13670,7 @@ int main() {
|
|||||||
dlerror()
|
dlerror()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:13673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:13674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@@ -13894,17 +13895,17 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
|
|||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:13898: checking for $ac_hdr" >&5
|
echo "configure:13899: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 13903 "configure"
|
#line 13904 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:13908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:13909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
@@ -14363,7 +14364,7 @@ LDFLAGS="$LDFLAGS $PROFILE"
|
|||||||
if test "$wxUSE_GUI" = "yes"; then
|
if test "$wxUSE_GUI" = "yes"; then
|
||||||
|
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag drawing dynamic \
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag drawing dynamic \
|
||||||
font fractal image menu minimal richedit"
|
font image menu minimal richedit"
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
|
CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
|
||||||
else
|
else
|
||||||
@@ -14464,10 +14465,11 @@ 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 $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
||||||
echo "configure:14471: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
echo "configure:14473: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||||
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
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
|
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@@ -14719,6 +14721,7 @@ s%@SHARED_LD@%$SHARED_LD%g
|
|||||||
s%@PIC_FLAG@%$PIC_FLAG%g
|
s%@PIC_FLAG@%$PIC_FLAG%g
|
||||||
s%@DEP_INFO_FLAGS@%$DEP_INFO_FLAGS%g
|
s%@DEP_INFO_FLAGS@%$DEP_INFO_FLAGS%g
|
||||||
s%@CODE_GEN_FLAGS@%$CODE_GEN_FLAGS%g
|
s%@CODE_GEN_FLAGS@%$CODE_GEN_FLAGS%g
|
||||||
|
s%@CODE_GEN_FLAGS_CXX@%$CODE_GEN_FLAGS_CXX%g
|
||||||
s%@BURNT_LIBRARY_NAME@%$BURNT_LIBRARY_NAME%g
|
s%@BURNT_LIBRARY_NAME@%$BURNT_LIBRARY_NAME%g
|
||||||
s%@BURNT_LIBRARY_NAME_GL@%$BURNT_LIBRARY_NAME_GL%g
|
s%@BURNT_LIBRARY_NAME_GL@%$BURNT_LIBRARY_NAME_GL%g
|
||||||
s%@WX_TARGET_LIBRARY_SONAME@%$WX_TARGET_LIBRARY_SONAME%g
|
s%@WX_TARGET_LIBRARY_SONAME@%$WX_TARGET_LIBRARY_SONAME%g
|
||||||
|
14
configure.in
14
configure.in
@@ -457,10 +457,10 @@ dnl WX_INTERFACE_AGE = 0
|
|||||||
|
|
||||||
WX_MAJOR_VERSION_NUMBER=2
|
WX_MAJOR_VERSION_NUMBER=2
|
||||||
WX_MINOR_VERSION_NUMBER=2
|
WX_MINOR_VERSION_NUMBER=2
|
||||||
WX_RELEASE_NUMBER=1
|
WX_RELEASE_NUMBER=5
|
||||||
|
|
||||||
WX_INTERFACE_AGE=1
|
WX_INTERFACE_AGE=5
|
||||||
WX_BINARY_AGE=2
|
WX_BINARY_AGE=5
|
||||||
|
|
||||||
WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
|
WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
|
||||||
|
|
||||||
@@ -2727,12 +2727,13 @@ fi
|
|||||||
|
|
||||||
DEP_INFO_FLAGS=
|
DEP_INFO_FLAGS=
|
||||||
CODE_GEN_FLAGS=
|
CODE_GEN_FLAGS=
|
||||||
|
CODE_GEN_FLAGS_CXX=
|
||||||
if test "$GCC" = yes ; then
|
if test "$GCC" = yes ; then
|
||||||
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-rtti"
|
CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-rtti"
|
||||||
fi
|
fi
|
||||||
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-exceptions"
|
CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-exceptions"
|
||||||
fi
|
fi
|
||||||
if test "$wxUSE_PERMISSIVE" = "yes" ; then
|
if test "$wxUSE_PERMISSIVE" = "yes" ; then
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive"
|
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive"
|
||||||
@@ -3752,7 +3753,7 @@ if test "$wxUSE_GUI" = "yes"; then
|
|||||||
dnl TODO some samples are never built so far:
|
dnl TODO some samples are never built so far:
|
||||||
dnl ipc, mfc, nativdlg, oleauto, ownerdrw, proplist
|
dnl ipc, mfc, nativdlg, oleauto, ownerdrw, proplist
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag drawing dynamic \
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag drawing dynamic \
|
||||||
font fractal image menu minimal richedit"
|
font image menu minimal richedit"
|
||||||
|
|
||||||
dnl this is needed to be able to find AFM files
|
dnl this is needed to be able to find AFM files
|
||||||
CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
|
CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
|
||||||
@@ -3806,6 +3807,7 @@ AC_SUBST(SHARED_LD)
|
|||||||
AC_SUBST(PIC_FLAG)
|
AC_SUBST(PIC_FLAG)
|
||||||
AC_SUBST(DEP_INFO_FLAGS)
|
AC_SUBST(DEP_INFO_FLAGS)
|
||||||
AC_SUBST(CODE_GEN_FLAGS)
|
AC_SUBST(CODE_GEN_FLAGS)
|
||||||
|
AC_SUBST(CODE_GEN_FLAGS_CXX)
|
||||||
AC_SUBST(BURNT_LIBRARY_NAME)
|
AC_SUBST(BURNT_LIBRARY_NAME)
|
||||||
AC_SUBST(BURNT_LIBRARY_NAME_GL)
|
AC_SUBST(BURNT_LIBRARY_NAME_GL)
|
||||||
AC_SUBST(WX_TARGET_LIBRARY_SONAME)
|
AC_SUBST(WX_TARGET_LIBRARY_SONAME)
|
||||||
|
5
contrib/docs/.cvsignore
Normal file
5
contrib/docs/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
html
|
||||||
|
htmlhelp
|
||||||
|
pdf
|
||||||
|
winhelp
|
||||||
|
htb
|
@@ -1,181 +0,0 @@
|
|||||||
// Scintilla source code edit control
|
|
||||||
// SciLexer - interface to the added lexer functions in the SciLexer version of the edit control
|
|
||||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
|
||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
|
||||||
|
|
||||||
#ifndef SCILEXER_H
|
|
||||||
#define SCILEXER_H
|
|
||||||
|
|
||||||
// SciLexer features - not in standard Scintilla
|
|
||||||
|
|
||||||
#define SCLEX_CONTAINER 0
|
|
||||||
#define SCLEX_NULL 1
|
|
||||||
#define SCLEX_PYTHON 2
|
|
||||||
#define SCLEX_CPP 3
|
|
||||||
#define SCLEX_HTML 4
|
|
||||||
#define SCLEX_XML 5
|
|
||||||
#define SCLEX_PERL 6
|
|
||||||
#define SCLEX_SQL 7
|
|
||||||
#define SCLEX_VB 8
|
|
||||||
#define SCLEX_PROPERTIES 9
|
|
||||||
#define SCLEX_ERRORLIST 10
|
|
||||||
#define SCLEX_MAKEFILE 11
|
|
||||||
#define SCLEX_BATCH 12
|
|
||||||
#define SCLEX_XCODE 13
|
|
||||||
#define SCLEX_LATEX 14
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_PYTHON
|
|
||||||
#define SCE_P_DEFAULT 0
|
|
||||||
#define SCE_P_COMMENTLINE 1
|
|
||||||
#define SCE_P_NUMBER 2
|
|
||||||
#define SCE_P_STRING 3
|
|
||||||
#define SCE_P_CHARACTER 4
|
|
||||||
#define SCE_P_WORD 5
|
|
||||||
#define SCE_P_TRIPLE 6
|
|
||||||
#define SCE_P_TRIPLEDOUBLE 7
|
|
||||||
#define SCE_P_CLASSNAME 8
|
|
||||||
#define SCE_P_DEFNAME 9
|
|
||||||
#define SCE_P_OPERATOR 10
|
|
||||||
#define SCE_P_IDENTIFIER 11
|
|
||||||
#define SCE_P_COMMENTBLOCK 12
|
|
||||||
#define SCE_P_STRINGEOL 13
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_CPP, SCLEX_VB
|
|
||||||
#define SCE_C_DEFAULT 0
|
|
||||||
#define SCE_C_COMMENT 1
|
|
||||||
#define SCE_C_COMMENTLINE 2
|
|
||||||
#define SCE_C_COMMENTDOC 3
|
|
||||||
#define SCE_C_NUMBER 4
|
|
||||||
#define SCE_C_WORD 5
|
|
||||||
#define SCE_C_STRING 6
|
|
||||||
#define SCE_C_CHARACTER 7
|
|
||||||
#define SCE_C_UUID 8
|
|
||||||
#define SCE_C_PREPROCESSOR 9
|
|
||||||
#define SCE_C_OPERATOR 10
|
|
||||||
#define SCE_C_IDENTIFIER 11
|
|
||||||
#define SCE_C_STRINGEOL 12
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_HTML, SCLEX_xML
|
|
||||||
#define SCE_H_DEFAULT 0
|
|
||||||
#define SCE_H_TAG 1
|
|
||||||
#define SCE_H_TAGUNKNOWN 2
|
|
||||||
#define SCE_H_ATTRIBUTE 3
|
|
||||||
#define SCE_H_ATTRIBUTEUNKNOWN 4
|
|
||||||
#define SCE_H_NUMBER 5
|
|
||||||
#define SCE_H_DOUBLESTRING 6
|
|
||||||
#define SCE_H_SINGLESTRING 7
|
|
||||||
#define SCE_H_OTHER 8
|
|
||||||
#define SCE_H_COMMENT 9
|
|
||||||
#define SCE_H_ENTITY 10
|
|
||||||
// XML and ASP
|
|
||||||
#define SCE_H_TAGEND 11
|
|
||||||
#define SCE_H_XMLSTART 12
|
|
||||||
#define SCE_H_XMLEND 13
|
|
||||||
#define SCE_H_SCRIPT 14
|
|
||||||
#define SCE_H_ASP 15
|
|
||||||
#define SCE_H_ASPAT 16
|
|
||||||
// Embedded Javascript
|
|
||||||
#define SCE_HJ_START 40
|
|
||||||
#define SCE_HJ_DEFAULT 41
|
|
||||||
#define SCE_HJ_COMMENT 42
|
|
||||||
#define SCE_HJ_COMMENTLINE 43
|
|
||||||
#define SCE_HJ_COMMENTDOC 44
|
|
||||||
#define SCE_HJ_NUMBER 45
|
|
||||||
#define SCE_HJ_WORD 46
|
|
||||||
#define SCE_HJ_KEYWORD 47
|
|
||||||
#define SCE_HJ_DOUBLESTRING 48
|
|
||||||
#define SCE_HJ_SINGLESTRING 49
|
|
||||||
#define SCE_HJ_SYMBOLS 50
|
|
||||||
#define SCE_HJ_STRINGEOL 51
|
|
||||||
// ASP Javascript
|
|
||||||
#define SCE_HJA_START 55
|
|
||||||
#define SCE_HJA_DEFAULT 56
|
|
||||||
#define SCE_HJA_COMMENT 57
|
|
||||||
#define SCE_HJA_COMMENTLINE 58
|
|
||||||
#define SCE_HJA_COMMENTDOC 59
|
|
||||||
#define SCE_HJA_NUMBER 60
|
|
||||||
#define SCE_HJA_WORD 61
|
|
||||||
#define SCE_HJA_KEYWORD 62
|
|
||||||
#define SCE_HJA_DOUBLESTRING 63
|
|
||||||
#define SCE_HJA_SINGLESTRING 64
|
|
||||||
#define SCE_HJA_SYMBOLS 65
|
|
||||||
#define SCE_HJA_STRINGEOL 66
|
|
||||||
// Embedded VBScript
|
|
||||||
#define SCE_HB_START 70
|
|
||||||
#define SCE_HB_DEFAULT 71
|
|
||||||
#define SCE_HB_COMMENTLINE 72
|
|
||||||
#define SCE_HB_NUMBER 73
|
|
||||||
#define SCE_HB_WORD 74
|
|
||||||
#define SCE_HB_STRING 75
|
|
||||||
#define SCE_HB_IDENTIFIER 76
|
|
||||||
#define SCE_HB_STRINGEOL 77
|
|
||||||
// ASP VBScript
|
|
||||||
#define SCE_HBA_START 80
|
|
||||||
#define SCE_HBA_DEFAULT 81
|
|
||||||
#define SCE_HBA_COMMENTLINE 82
|
|
||||||
#define SCE_HBA_NUMBER 83
|
|
||||||
#define SCE_HBA_WORD 84
|
|
||||||
#define SCE_HBA_STRING 85
|
|
||||||
#define SCE_HBA_IDENTIFIER 86
|
|
||||||
#define SCE_HBA_STRINGEOL 87
|
|
||||||
// Embedded Python
|
|
||||||
#define SCE_HP_START 90
|
|
||||||
#define SCE_HP_DEFAULT 91
|
|
||||||
#define SCE_HP_COMMENTLINE 92
|
|
||||||
#define SCE_HP_NUMBER 93
|
|
||||||
#define SCE_HP_STRING 94
|
|
||||||
#define SCE_HP_CHARACTER 95
|
|
||||||
#define SCE_HP_WORD 96
|
|
||||||
#define SCE_HP_TRIPLE 97
|
|
||||||
#define SCE_HP_TRIPLEDOUBLE 98
|
|
||||||
#define SCE_HP_CLASSNAME 99
|
|
||||||
#define SCE_HP_DEFNAME 100
|
|
||||||
#define SCE_HP_OPERATOR 101
|
|
||||||
#define SCE_HP_IDENTIFIER 102
|
|
||||||
// ASP Python
|
|
||||||
#define SCE_HPA_START 105
|
|
||||||
#define SCE_HPA_DEFAULT 106
|
|
||||||
#define SCE_HPA_COMMENTLINE 107
|
|
||||||
#define SCE_HPA_NUMBER 108
|
|
||||||
#define SCE_HPA_STRING 109
|
|
||||||
#define SCE_HPA_CHARACTER 110
|
|
||||||
#define SCE_HPA_WORD 111
|
|
||||||
#define SCE_HPA_TRIPLE 112
|
|
||||||
#define SCE_HPA_TRIPLEDOUBLE 113
|
|
||||||
#define SCE_HPA_CLASSNAME 114
|
|
||||||
#define SCE_HPA_DEFNAME 115
|
|
||||||
#define SCE_HPA_OPERATOR 116
|
|
||||||
#define SCE_HPA_IDENTIFIER 117
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_PERL
|
|
||||||
#define SCE_PL_DEFAULT 0
|
|
||||||
#define SCE_PL_HERE 1
|
|
||||||
#define SCE_PL_COMMENTLINE 2
|
|
||||||
#define SCE_PL_POD 3
|
|
||||||
#define SCE_PL_NUMBER 4
|
|
||||||
#define SCE_PL_WORD 5
|
|
||||||
#define SCE_PL_STRING 6
|
|
||||||
#define SCE_PL_CHARACTER 7
|
|
||||||
#define SCE_PL_PUNCTUATION 8
|
|
||||||
#define SCE_PL_PREPROCESSOR 9
|
|
||||||
#define SCE_PL_OPERATOR 10
|
|
||||||
#define SCE_PL_IDENTIFIER 11
|
|
||||||
#define SCE_PL_SCALAR 12
|
|
||||||
#define SCE_PL_ARRAY 13
|
|
||||||
#define SCE_PL_HASH 14
|
|
||||||
#define SCE_PL_SYMBOLTABLE 15
|
|
||||||
#define SCE_PL_REF 16
|
|
||||||
#define SCE_PL_REGEX 17
|
|
||||||
#define SCE_PL_REGSUBST 18
|
|
||||||
#define SCE_PL_LONGQUOTE 19
|
|
||||||
#define SCE_PL_BACKTICKS 20
|
|
||||||
#define SCE_PL_DATASECTION 21
|
|
||||||
|
|
||||||
// Lexical states for SCLEX_LATEX
|
|
||||||
#define SCE_L_DEFAULT 0
|
|
||||||
#define SCE_L_COMMAND 1
|
|
||||||
#define SCE_L_TAG 2
|
|
||||||
#define SCE_L_MATH 3
|
|
||||||
#define SCE_L_COMMENT 4
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,7 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
|||||||
DocumentAccessor.o \
|
DocumentAccessor.o \
|
||||||
LexCPP.o \
|
LexCPP.o \
|
||||||
LexHTML.o \
|
LexHTML.o \
|
||||||
|
LexLua.o \
|
||||||
LexOthers.o \
|
LexOthers.o \
|
||||||
LexPerl.o \
|
LexPerl.o \
|
||||||
LexPython.o \
|
LexPython.o \
|
||||||
@@ -47,6 +48,7 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
|||||||
ScintillaBase.o \
|
ScintillaBase.o \
|
||||||
Style.o \
|
Style.o \
|
||||||
ViewStyle.o \
|
ViewStyle.o \
|
||||||
|
PosRegExp.o \
|
||||||
|
|
||||||
|
|
||||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||||
|
@@ -9,13 +9,18 @@
|
|||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "wx/stc/stc.h"
|
#include "wx/stc/stc.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
Point Point::FromLong(long lpoint) {
|
Point Point::FromLong(long lpoint) {
|
||||||
return Point(lpoint & 0xFFFF, lpoint >> 16);
|
return Point(lpoint & 0xFFFF, lpoint >> 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRect wxRectFromPRectangle(PRectangle prc) {
|
wxRect wxRectFromPRectangle(PRectangle prc) {
|
||||||
wxRect rc(prc.left, prc.top,
|
wxRect rc(prc.left, prc.top,
|
||||||
prc.right-prc.left+1, prc.bottom-prc.top+1);
|
prc.right-prc.left, prc.bottom-prc.top);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +174,7 @@ void Surface::InitPixMap(int width, int height, Surface *surface_) {
|
|||||||
Release();
|
Release();
|
||||||
hdc = new wxMemoryDC(surface_->hdc);
|
hdc = new wxMemoryDC(surface_->hdc);
|
||||||
hdcOwned = true;
|
hdcOwned = true;
|
||||||
bitmap = new wxBitmap(width, height+1);
|
bitmap = new wxBitmap(width, height);
|
||||||
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
||||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||||
}
|
}
|
||||||
@@ -183,12 +188,7 @@ void Surface::BrushColor(Colour back) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Surface::SetFont(Font &font_) {
|
void Surface::SetFont(Font &font_) {
|
||||||
|
if (font_.GetID()) {
|
||||||
// I think the following check is valid.
|
|
||||||
// It eliminates a crash for me. -- eric@sourcegear.com
|
|
||||||
|
|
||||||
if (font_.GetID())
|
|
||||||
{
|
|
||||||
hdc->SetFont(*font_.GetID());
|
hdc->SetFont(*font_.GetID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -361,9 +361,6 @@ void Surface::SetClip(PRectangle rc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Surface::FlushCachedState() {
|
void Surface::FlushCachedState() {
|
||||||
// TODO Is there anything we need to do here? eric@sourcegear.com
|
|
||||||
// TODO I had to add this method when I merged new Scintilla code
|
|
||||||
// TODO from Neil.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Window::~Window() {
|
Window::~Window() {
|
||||||
@@ -395,7 +392,7 @@ void Window::SetPositionRelative(PRectangle rc, Window) {
|
|||||||
|
|
||||||
PRectangle Window::GetClientPosition() {
|
PRectangle Window::GetClientPosition() {
|
||||||
wxSize sz = id->GetClientSize();
|
wxSize sz = id->GetClientSize();
|
||||||
return PRectangle(0, 0, sz.x - 1, sz.y - 1);
|
return PRectangle(0, 0, sz.x, sz.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::Show(bool show) {
|
void Window::Show(bool show) {
|
||||||
@@ -454,6 +451,76 @@ void Window::SetTitle(const char *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class wxSTCListBox : public wxListBox {
|
||||||
|
public:
|
||||||
|
wxSTCListBox(wxWindow* parent, wxWindowID id)
|
||||||
|
: wxListBox(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||||
|
0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void OnFocus(wxFocusEvent& event) {
|
||||||
|
GetParent()->SetFocus();
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
void DoSetFirstItem(int n);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox)
|
||||||
|
EVT_SET_FOCUS(wxSTCListBox::OnFocus)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
// This can be removed after 2.2.2 I think
|
||||||
|
void wxSTCListBox::DoSetFirstItem( int n )
|
||||||
|
{
|
||||||
|
wxCHECK_RET( m_list, wxT("invalid listbox") );
|
||||||
|
|
||||||
|
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list))
|
||||||
|
return;
|
||||||
|
|
||||||
|
// terribly efficient
|
||||||
|
const gchar *vadjustment_key = "gtk-vadjustment";
|
||||||
|
guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
|
||||||
|
|
||||||
|
GtkAdjustment *adjustment =
|
||||||
|
(GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id);
|
||||||
|
wxCHECK_RET( adjustment, wxT("invalid listbox code") );
|
||||||
|
|
||||||
|
GList *target = g_list_nth( m_list->children, n );
|
||||||
|
wxCHECK_RET( target, wxT("invalid listbox index") );
|
||||||
|
|
||||||
|
GtkWidget *item = GTK_WIDGET(target->data);
|
||||||
|
wxCHECK_RET( item, wxT("invalid listbox code") );
|
||||||
|
|
||||||
|
// find the last item before this one which is already realized
|
||||||
|
size_t nItemsBefore;
|
||||||
|
for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ )
|
||||||
|
{
|
||||||
|
target = target->prev;
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
// nothing we can do if there are no allocated items yet
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
item = GTK_WIDGET(target->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_adjustment_set_value(adjustment,
|
||||||
|
item->allocation.y +
|
||||||
|
nItemsBefore*item->allocation.height);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ListBox::ListBox() {
|
ListBox::ListBox() {
|
||||||
}
|
}
|
||||||
@@ -462,9 +529,32 @@ ListBox::~ListBox() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ListBox::Create(Window &parent, int ctrlID) {
|
void ListBox::Create(Window &parent, int ctrlID) {
|
||||||
id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize,
|
id = new wxSTCListBox(parent.id, ctrlID);
|
||||||
0, NULL, wxLB_SINGLE | wxLB_SORT);
|
// id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize,
|
||||||
((wxListBox*)id)->Show(FALSE);
|
// 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
PRectangle ListBox::GetDesiredRect() {
|
||||||
|
wxSize sz = ((wxListBox*)id)->GetBestSize();
|
||||||
|
PRectangle rc;
|
||||||
|
rc.top = 0;
|
||||||
|
rc.left = 0;
|
||||||
|
if (sz.x > 150) // TODO: A better way to determine these max sizes
|
||||||
|
sz.x = 150;
|
||||||
|
if (sz.y > 100)
|
||||||
|
sz.y = 100;
|
||||||
|
rc.right = sz.x;
|
||||||
|
rc.bottom = sz.y;
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListBox::SetAverageCharWidth(int width) {
|
||||||
|
aveCharWidth = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListBox::SetFont(Font &font) {
|
||||||
|
Window::SetFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListBox::Clear() {
|
void ListBox::Clear() {
|
||||||
@@ -481,6 +571,13 @@ int ListBox::Length() {
|
|||||||
|
|
||||||
void ListBox::Select(int n) {
|
void ListBox::Select(int n) {
|
||||||
((wxListBox*)id)->SetSelection(n);
|
((wxListBox*)id)->SetSelection(n);
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
if (n > 4)
|
||||||
|
n = n - 4;
|
||||||
|
else
|
||||||
|
n = 1;
|
||||||
|
((wxListBox*)id)->SetFirstItem(n);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int ListBox::GetSelection() {
|
int ListBox::GetSelection() {
|
||||||
@@ -488,10 +585,12 @@ int ListBox::GetSelection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ListBox::Find(const char *prefix) {
|
int ListBox::Find(const char *prefix) {
|
||||||
for (int x=0; x < ((wxListBox*)id)->Number(); x++) {
|
if (prefix) {
|
||||||
wxString text = ((wxListBox*)id)->GetString(x);
|
for (int x=0; x < ((wxListBox*)id)->Number(); x++) {
|
||||||
if (text.StartsWith(prefix))
|
wxString text = ((wxListBox*)id)->GetString(x);
|
||||||
return x;
|
if (text.StartsWith(prefix))
|
||||||
|
return x;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@@ -273,8 +273,6 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
|
|||||||
|
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
popup.GetID()->Enable(cmd, enabled);
|
popup.GetID()->Enable(cmd, enabled);
|
||||||
|
|
||||||
// TODO: need to create event handler mappings for the cmd ID
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -283,18 +281,18 @@ void ScintillaWX::ClaimSelection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LRESULT ScintillaWX::DefWndProc(UINT /*iMessage*/, WPARAM /*wParam*/, LPARAM /*lParam*/) {
|
long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT ScintillaWX::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
|
long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
|
||||||
switch (iMessage) {
|
// switch (iMessage) {
|
||||||
case EM_CANPASTE:
|
// case EM_CANPASTE:
|
||||||
return CanPaste();
|
// return CanPaste();
|
||||||
default:
|
// default:
|
||||||
return ScintillaBase::WndProc(iMessage, wParam, lParam);
|
return ScintillaBase::WndProc(iMessage, wParam, lParam);
|
||||||
}
|
// }
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -317,6 +315,11 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
|||||||
FullPaint();
|
FullPaint();
|
||||||
}
|
}
|
||||||
paintState = notPainting;
|
paintState = notPainting;
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
// On wxGTK the editor window paints can overwrite the listbox...
|
||||||
|
if (ac.Active())
|
||||||
|
((wxWindow*)ac.lb.GetID())->Refresh(TRUE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -415,6 +418,29 @@ void ScintillaWX::DoAddChar(char ch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt) {
|
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt) {
|
||||||
|
switch (key) {
|
||||||
|
case WXK_DOWN: key = SCK_DOWN; break;
|
||||||
|
case WXK_UP: key = SCK_UP; break;
|
||||||
|
case WXK_LEFT: key = SCK_LEFT; break;
|
||||||
|
case WXK_RIGHT: key = SCK_RIGHT; break;
|
||||||
|
case WXK_HOME: key = SCK_HOME; break;
|
||||||
|
case WXK_END: key = SCK_END; break;
|
||||||
|
case WXK_PRIOR: key = SCK_PRIOR; break;
|
||||||
|
case WXK_NEXT: key = SCK_NEXT; break;
|
||||||
|
case WXK_DELETE: key = SCK_DELETE; break;
|
||||||
|
case WXK_INSERT: key = SCK_INSERT; break;
|
||||||
|
case WXK_ESCAPE: key = SCK_ESCAPE; break;
|
||||||
|
case WXK_BACK: key = SCK_BACK; break;
|
||||||
|
case WXK_TAB: key = SCK_TAB; break;
|
||||||
|
case WXK_RETURN: key = SCK_RETURN; break;
|
||||||
|
case WXK_ADD: key = SCK_ADD; break;
|
||||||
|
case WXK_SUBTRACT: key = SCK_SUBTRACT; break;
|
||||||
|
case WXK_DIVIDE: key = SCK_DIVIDE; break;
|
||||||
|
case WXK_CONTROL: key = 0; break;
|
||||||
|
case WXK_ALT: key = 0; break;
|
||||||
|
case WXK_SHIFT: key = 0; break;
|
||||||
|
}
|
||||||
|
|
||||||
return KeyDown(key, shift, ctrl, alt);
|
return KeyDown(key, shift, ctrl, alt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -97,8 +97,12 @@ public:
|
|||||||
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
|
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
|
||||||
virtual void ClaimSelection();
|
virtual void ClaimSelection();
|
||||||
|
|
||||||
virtual LRESULT DefWndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
|
virtual long DefWndProc(unsigned int iMessage,
|
||||||
virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
|
unsigned long wParam,
|
||||||
|
long lParam);
|
||||||
|
virtual long WndProc(unsigned int iMessage,
|
||||||
|
unsigned long wParam,
|
||||||
|
long lParam);
|
||||||
|
|
||||||
virtual void NotifyChange();
|
virtual void NotifyChange();
|
||||||
virtual void NotifyParent(SCNotification scn);
|
virtual void NotifyParent(SCNotification scn);
|
||||||
|
684
contrib/src/stc/gen_iface.py
Normal file
684
contrib/src/stc/gen_iface.py
Normal file
@@ -0,0 +1,684 @@
|
|||||||
|
#!/bin/env python
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Name: gen_iface.py
|
||||||
|
# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface
|
||||||
|
#
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 5-Sept-2000
|
||||||
|
# RCS-ID: $Id$
|
||||||
|
# Copyright: (c) 2000 by Total Control Software
|
||||||
|
# Licence: wxWindows license
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
import sys, string, re
|
||||||
|
from fileinput import FileInput
|
||||||
|
|
||||||
|
|
||||||
|
IFACE = './scintilla/include/Scintilla.iface'
|
||||||
|
H_TEMPLATE = './stc.h.in'
|
||||||
|
CPP_TEMPLATE = './stc.cpp.in'
|
||||||
|
H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' #
|
||||||
|
CPP_DEST = './stc.cpp' #'./stc_test.cpp'
|
||||||
|
|
||||||
|
|
||||||
|
# Value prefixes to convert
|
||||||
|
valPrefixes = [('SCI_', ''),
|
||||||
|
('SC_', ''),
|
||||||
|
('SCN_', None), # just toss these...
|
||||||
|
('SCEN_', None),
|
||||||
|
('SCE_', ''),
|
||||||
|
('SCLEX_', 'LEX_'),
|
||||||
|
('SCK_', 'KEY_'),
|
||||||
|
('SCFIND_', 'FIND_'),
|
||||||
|
('SCWS_', 'WS_'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Message funcion values that should have a CMD_ constant as well
|
||||||
|
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
|
||||||
|
|
||||||
|
|
||||||
|
# Map some generic typenames to wx types, using return value syntax
|
||||||
|
retTypeMap = {
|
||||||
|
'position': 'int',
|
||||||
|
'string': 'wxString',
|
||||||
|
'colour': 'wxColour',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Map some generic typenames to wx types, using parameter syntax
|
||||||
|
paramTypeMap = {
|
||||||
|
'position': 'int',
|
||||||
|
'string': 'const wxString&',
|
||||||
|
'colour': 'const wxColour&',
|
||||||
|
'keymod': 'int',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Map of method info that needs tweaked. Either the name needs changed, or
|
||||||
|
# the method definition/implementation. Tuple items are:
|
||||||
|
#
|
||||||
|
# 1. New method name. None to skip the method, 0 to leave the
|
||||||
|
# default name.
|
||||||
|
# 2. Method definition for the .h file, 0 to leave alone
|
||||||
|
# 3. Method implementation for the .cpp file, 0 to leave alone.
|
||||||
|
# 4. tuple of Doc string lines, or 0 to leave alone.
|
||||||
|
#
|
||||||
|
methodOverrideMap = {
|
||||||
|
'AddText' : (0,
|
||||||
|
'void %s(const wxString& text);',
|
||||||
|
|
||||||
|
'''void %s(const wxString& text) {
|
||||||
|
SendMsg(%s, text.Len(), (long)text.c_str());''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'AddStyledText' : (0,
|
||||||
|
'void %s(const wxString& text);',
|
||||||
|
|
||||||
|
'''void %s(const wxString& text) {
|
||||||
|
SendMsg(%s, text.Len(), (long)text.c_str());''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
|
||||||
|
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
|
||||||
|
|
||||||
|
'GetStyledText' : (0,
|
||||||
|
'wxString %s(int startPos, int endPos);',
|
||||||
|
|
||||||
|
'''wxString %s(int startPos, int endPos) {
|
||||||
|
wxString text;
|
||||||
|
int len = endPos - startPos;
|
||||||
|
TextRange tr;
|
||||||
|
tr.lpstrText = text.GetWriteBuf(len*2+1);
|
||||||
|
tr.chrg.cpMin = startPos;
|
||||||
|
tr.chrg.cpMax = endPos;
|
||||||
|
SendMsg(%s, 0, (long)&tr);
|
||||||
|
text.UngetWriteBuf(len*2);
|
||||||
|
return text;''',
|
||||||
|
|
||||||
|
('Retrieve a buffer of cells.',)),
|
||||||
|
|
||||||
|
|
||||||
|
'PositionFromPoint' : (0,
|
||||||
|
'int %s(wxPoint pt);',
|
||||||
|
|
||||||
|
'''int %s(wxPoint pt) {
|
||||||
|
return SendMsg(%s, pt.x, pt.y);''',
|
||||||
|
|
||||||
|
0),
|
||||||
|
|
||||||
|
'GetCurLine' : (0,
|
||||||
|
'wxString %s(int* OUTPUT=NULL);',
|
||||||
|
|
||||||
|
'''wxString %s(int* linePos) {
|
||||||
|
wxString text;
|
||||||
|
int len = LineLength(GetCurrentLine());
|
||||||
|
char* buf = text.GetWriteBuf(len+1);
|
||||||
|
|
||||||
|
int pos = SendMsg(%s, len, (long)buf);
|
||||||
|
text.UngetWriteBuf();
|
||||||
|
if (linePos) *linePos = pos;
|
||||||
|
|
||||||
|
return text;''',
|
||||||
|
|
||||||
|
0),
|
||||||
|
|
||||||
|
'SetUsePalette' : (None, 0,0,0),
|
||||||
|
|
||||||
|
'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0),
|
||||||
|
'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0),
|
||||||
|
|
||||||
|
'MarkerDefine' : (0,
|
||||||
|
'''void %s(int markerNumber, int markerSymbol,
|
||||||
|
const wxColour& foreground = wxNullColour,
|
||||||
|
const wxColour& background = wxNullColour);''',
|
||||||
|
|
||||||
|
'''void %s(int markerNumber, int markerSymbol,
|
||||||
|
const wxColour& foreground,
|
||||||
|
const wxColour& background) {
|
||||||
|
|
||||||
|
SendMsg(%s, markerNumber, markerSymbol);
|
||||||
|
if (foreground.Ok())
|
||||||
|
MarkerSetForeground(markerNumber, foreground);
|
||||||
|
if (background.Ok())
|
||||||
|
MarkerSetBackground(markerNumber, background);''',
|
||||||
|
|
||||||
|
('Set the symbol used for a particular marker number,',
|
||||||
|
'and optionally the for and background colours.')),
|
||||||
|
|
||||||
|
'SetMarginTypeN' : ('SetMarginType', 0, 0, 0),
|
||||||
|
'GetMarginTypeN' : ('GetMarginType', 0, 0, 0),
|
||||||
|
'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0),
|
||||||
|
'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0),
|
||||||
|
'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0),
|
||||||
|
'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0),
|
||||||
|
'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0),
|
||||||
|
'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0),
|
||||||
|
|
||||||
|
'StyleSetFore' : ('StyleSetForeground', 0, 0, 0),
|
||||||
|
'StyleSetBack' : ('StyleSetBackground', 0, 0, 0),
|
||||||
|
'SetSelFore' : ('SetSelForeground', 0, 0, 0),
|
||||||
|
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
|
||||||
|
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
|
||||||
|
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
|
||||||
|
|
||||||
|
# need to fix this to map between wx and scintilla encoding flags, leave it out for now...
|
||||||
|
'StyleSetCharacterSet' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
'AssignCmdKey' : ('CmdKeyAssign',
|
||||||
|
'void %s(int key, int modifiers, int cmd);',
|
||||||
|
|
||||||
|
'''void %s(int key, int modifiers, int cmd) {
|
||||||
|
SendMsg(%s, MAKELONG(key, modifiers), cmd);''',
|
||||||
|
|
||||||
|
0),
|
||||||
|
|
||||||
|
'ClearCmdKey' : ('CmdKeyClear',
|
||||||
|
'void %s(int key, int modifiers);',
|
||||||
|
|
||||||
|
'''void %s(int key, int modifiers) {
|
||||||
|
SendMsg(%s, MAKELONG(key, modifiers));''',
|
||||||
|
|
||||||
|
0),
|
||||||
|
|
||||||
|
'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0),
|
||||||
|
|
||||||
|
|
||||||
|
'SetStylingEx' : ('SetStyleBytes',
|
||||||
|
'void %s(int length, char* styleBytes);',
|
||||||
|
|
||||||
|
'''void %s(int length, char* styleBytes) {
|
||||||
|
SendMsg(%s, length, (long)styleBytes);''',
|
||||||
|
|
||||||
|
0),
|
||||||
|
|
||||||
|
|
||||||
|
'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0),
|
||||||
|
'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0),
|
||||||
|
'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0),
|
||||||
|
'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0),
|
||||||
|
|
||||||
|
'AutoCShow' : ('AutoCompShow', 0, 0, 0),
|
||||||
|
'AutoCCancel' : ('AutoCompCancel', 0, 0, 0),
|
||||||
|
'AutoCActive' : ('AutoCompActive', 0, 0, 0),
|
||||||
|
'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0),
|
||||||
|
'AutoCComplete' : ('AutoCompComplete', 0, 0, 0),
|
||||||
|
'AutoCStops' : ('AutoCompStops', 0, 0, 0),
|
||||||
|
'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0),
|
||||||
|
'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0),
|
||||||
|
'AutoCSelect' : ('AutoCompSelect', 0, 0, 0),
|
||||||
|
'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0),
|
||||||
|
'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0),
|
||||||
|
'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0),
|
||||||
|
'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0),
|
||||||
|
'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0),
|
||||||
|
'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0),
|
||||||
|
'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0),
|
||||||
|
|
||||||
|
'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0),
|
||||||
|
'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0),
|
||||||
|
|
||||||
|
'GetCaretFore' : ('GetCaretForeground', 0, 0, 0),
|
||||||
|
|
||||||
|
'GetUsePalette' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
'FindText' : (0,
|
||||||
|
'''int %s(int minPos, int maxPos,
|
||||||
|
const wxString& text,
|
||||||
|
bool caseSensitive, bool wholeWord);''',
|
||||||
|
'''int %s(int minPos, int maxPos,
|
||||||
|
const wxString& text,
|
||||||
|
bool caseSensitive, bool wholeWord) {
|
||||||
|
TextToFind ft;
|
||||||
|
int flags = 0;
|
||||||
|
|
||||||
|
flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
|
||||||
|
flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
|
||||||
|
ft.chrg.cpMin = minPos;
|
||||||
|
ft.chrg.cpMax = maxPos;
|
||||||
|
ft.lpstrText = (char*)text.c_str();
|
||||||
|
|
||||||
|
return SendMsg(%s, flags, (long)&ft);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'FormatRange' : (0,
|
||||||
|
'''int %s(bool doDraw,
|
||||||
|
int startPos,
|
||||||
|
int endPos,
|
||||||
|
wxDC* draw,
|
||||||
|
wxDC* target, // Why does it use two? Can they be the same?
|
||||||
|
wxRect renderRect,
|
||||||
|
wxRect pageRect);''',
|
||||||
|
''' int %s(bool doDraw,
|
||||||
|
int startPos,
|
||||||
|
int endPos,
|
||||||
|
wxDC* draw,
|
||||||
|
wxDC* target, // Why does it use two? Can they be the same?
|
||||||
|
wxRect renderRect,
|
||||||
|
wxRect pageRect) {
|
||||||
|
RangeToFormat fr;
|
||||||
|
|
||||||
|
fr.hdc = draw;
|
||||||
|
fr.hdcTarget = target;
|
||||||
|
fr.rc.top = renderRect.GetTop();
|
||||||
|
fr.rc.left = renderRect.GetLeft();
|
||||||
|
fr.rc.right = renderRect.GetRight();
|
||||||
|
fr.rc.bottom = renderRect.GetBottom();
|
||||||
|
fr.rcPage.top = pageRect.GetTop();
|
||||||
|
fr.rcPage.left = pageRect.GetLeft();
|
||||||
|
fr.rcPage.right = pageRect.GetRight();
|
||||||
|
fr.rcPage.bottom = pageRect.GetBottom();
|
||||||
|
fr.chrg.cpMin = startPos;
|
||||||
|
fr.chrg.cpMax = endPos;
|
||||||
|
|
||||||
|
return SendMsg(%s, doDraw, (long)&fr);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
|
||||||
|
'GetLine' : (0,
|
||||||
|
'wxString %s(int line);',
|
||||||
|
|
||||||
|
'''wxString %s(int line) {
|
||||||
|
wxString text;
|
||||||
|
int len = LineLength(line);
|
||||||
|
char* buf = text.GetWriteBuf(len+1);
|
||||||
|
|
||||||
|
int pos = SendMsg(%s, line, (long)buf);
|
||||||
|
text.UngetWriteBuf();
|
||||||
|
|
||||||
|
return text;''',
|
||||||
|
|
||||||
|
('Retrieve the contents of a line.',)),
|
||||||
|
|
||||||
|
'SetSel' : ('SetSelection', 0, 0, 0),
|
||||||
|
'GetSelText' : ('GetSelectedText',
|
||||||
|
'wxString %s();',
|
||||||
|
|
||||||
|
'''wxString %s() {
|
||||||
|
wxString text;
|
||||||
|
int start;
|
||||||
|
int end;
|
||||||
|
|
||||||
|
GetSelection(&start, &end);
|
||||||
|
int len = end - start;
|
||||||
|
char* buff = text.GetWriteBuf(len+1);
|
||||||
|
|
||||||
|
SendMsg(%s, 0, (long)buff);
|
||||||
|
text.UngetWriteBuf();
|
||||||
|
return text;''',
|
||||||
|
|
||||||
|
('Retrieve the selected text.',)),
|
||||||
|
|
||||||
|
'GetTextRange' : (0,
|
||||||
|
'wxString %s(int startPos, int endPos);',
|
||||||
|
|
||||||
|
'''wxString %s(int startPos, int endPos) {
|
||||||
|
wxString text;
|
||||||
|
int len = endPos - startPos;
|
||||||
|
char* buff = text.GetWriteBuf(len+1);
|
||||||
|
TextRange tr;
|
||||||
|
tr.lpstrText = buff;
|
||||||
|
tr.chrg.cpMin = startPos;
|
||||||
|
tr.chrg.cpMax = endPos;
|
||||||
|
|
||||||
|
SendMsg(%s, 0, (long)&tr);
|
||||||
|
text.UngetWriteBuf();
|
||||||
|
return text;''',
|
||||||
|
|
||||||
|
('Retrieve a range of text.',)),
|
||||||
|
|
||||||
|
'PointXFromPosition' : (None, 0, 0, 0),
|
||||||
|
'PointYFromPosition' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0),
|
||||||
|
'ReplaceSel' : ('ReplaceSelection', 0, 0, 0),
|
||||||
|
'Null' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
'GetText' : (0,
|
||||||
|
'wxString %s();',
|
||||||
|
|
||||||
|
'''wxString %s() {
|
||||||
|
wxString text;
|
||||||
|
int len = GetTextLength();
|
||||||
|
char* buff = text.GetWriteBuf(len+1);
|
||||||
|
|
||||||
|
SendMsg(%s, len, (long)buff);
|
||||||
|
buff[len] = 0;
|
||||||
|
text.UngetWriteBuf();
|
||||||
|
return text;''',
|
||||||
|
|
||||||
|
('Retrieve all the text in the document.', )),
|
||||||
|
|
||||||
|
'GetDirectFunction' : (None, 0, 0, 0),
|
||||||
|
'GetDirectPointer' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0),
|
||||||
|
'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0),
|
||||||
|
'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0),
|
||||||
|
|
||||||
|
|
||||||
|
# Remove all methods that are key commands since they can be
|
||||||
|
# executed with CmdKeyExecute
|
||||||
|
'LineDown' : (None, 0, 0, 0),
|
||||||
|
'LineDownExtend' : (None, 0, 0, 0),
|
||||||
|
'LineUp' : (None, 0, 0, 0),
|
||||||
|
'LineUpExtend' : (None, 0, 0, 0),
|
||||||
|
'CharLeft' : (None, 0, 0, 0),
|
||||||
|
'CharLeftExtend' : (None, 0, 0, 0),
|
||||||
|
'CharRight' : (None, 0, 0, 0),
|
||||||
|
'CharRightExtend' : (None, 0, 0, 0),
|
||||||
|
'WordLeft' : (None, 0, 0, 0),
|
||||||
|
'WordLeftExtend' : (None, 0, 0, 0),
|
||||||
|
'WordRight' : (None, 0, 0, 0),
|
||||||
|
'WordRightExtend' : (None, 0, 0, 0),
|
||||||
|
'Home' : (None, 0, 0, 0),
|
||||||
|
'HomeExtend' : (None, 0, 0, 0),
|
||||||
|
'LineEnd' : (None, 0, 0, 0),
|
||||||
|
'LineEndExtend' : (None, 0, 0, 0),
|
||||||
|
'DocumentStart' : (None, 0, 0, 0),
|
||||||
|
'DocumentStartExtend' : (None, 0, 0, 0),
|
||||||
|
'DocumentEnd' : (None, 0, 0, 0),
|
||||||
|
'DocumentEndExtend' : (None, 0, 0, 0),
|
||||||
|
'PageUp' : (None, 0, 0, 0),
|
||||||
|
'PageUpExtend' : (None, 0, 0, 0),
|
||||||
|
'PageDown' : (None, 0, 0, 0),
|
||||||
|
'PageDownExtend' : (None, 0, 0, 0),
|
||||||
|
'EditToggleOvertype' : (None, 0, 0, 0),
|
||||||
|
'Cancel' : (None, 0, 0, 0),
|
||||||
|
'DeleteBack' : (None, 0, 0, 0),
|
||||||
|
'Tab' : (None, 0, 0, 0),
|
||||||
|
'BackTab' : (None, 0, 0, 0),
|
||||||
|
'NewLine' : (None, 0, 0, 0),
|
||||||
|
'FormFeed' : (None, 0, 0, 0),
|
||||||
|
'VCHome' : (None, 0, 0, 0),
|
||||||
|
'VCHomeExtend' : (None, 0, 0, 0),
|
||||||
|
'ZoomIn' : (None, 0, 0, 0),
|
||||||
|
'ZoomOut' : (None, 0, 0, 0),
|
||||||
|
'DelWordLeft' : (None, 0, 0, 0),
|
||||||
|
'DelWordRight' : (None, 0, 0, 0),
|
||||||
|
'LineCut' : (None, 0, 0, 0),
|
||||||
|
'LineDelete' : (None, 0, 0, 0),
|
||||||
|
'LineTranspose' : (None, 0, 0, 0),
|
||||||
|
'LowerCase' : (None, 0, 0, 0),
|
||||||
|
'UpperCase' : (None, 0, 0, 0),
|
||||||
|
'LineScrollDown' : (None, 0, 0, 0),
|
||||||
|
'LineScrollUp' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
|
||||||
|
'GetDocPointer' : (0,
|
||||||
|
'void* %s();',
|
||||||
|
'''void* %s() {
|
||||||
|
return (void*)SendMsg(%s);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'SetDocPointer' : (0,
|
||||||
|
'void %s(void* docPointer);',
|
||||||
|
'''void %s(void* docPointer) {
|
||||||
|
SendMsg(%s, (long)docPointer);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'CreateDocument' : (0,
|
||||||
|
'void* %s();',
|
||||||
|
'''void* %s() {
|
||||||
|
return (void*)SendMsg(%s);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'AddRefDocument' : (0,
|
||||||
|
'void %s(void* docPointer);',
|
||||||
|
'''void %s(void* docPointer) {
|
||||||
|
SendMsg(%s, (long)docPointer);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'ReleaseDocument' : (0,
|
||||||
|
'void %s(void* docPointer);',
|
||||||
|
'''void %s(void* docPointer) {
|
||||||
|
SendMsg(%s, (long)docPointer);''',
|
||||||
|
0),
|
||||||
|
|
||||||
|
'GrabFocus' : (None, 0, 0, 0),
|
||||||
|
|
||||||
|
'' : ('', 0, 0, 0),
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
|
||||||
|
curDocStrings = []
|
||||||
|
values = []
|
||||||
|
methods = []
|
||||||
|
|
||||||
|
# parse iface file
|
||||||
|
fi = FileInput(iface)
|
||||||
|
for line in fi:
|
||||||
|
line = line[:-1]
|
||||||
|
if line[:2] == '##' or line == '':
|
||||||
|
#curDocStrings = []
|
||||||
|
continue
|
||||||
|
|
||||||
|
op = line[:4]
|
||||||
|
if line[:2] == '# ': # a doc string
|
||||||
|
curDocStrings.append(line[2:])
|
||||||
|
|
||||||
|
elif op == 'val ':
|
||||||
|
parseVal(line[4:], values, curDocStrings)
|
||||||
|
curDocStrings = []
|
||||||
|
|
||||||
|
elif op == 'fun ' or op == 'set ' or op == 'get ':
|
||||||
|
parseFun(line[4:], methods, curDocStrings, values)
|
||||||
|
curDocStrings = []
|
||||||
|
|
||||||
|
elif op == 'cat ':
|
||||||
|
if string.strip(line[4:]) == 'Deprecated':
|
||||||
|
break # skip the rest of the file
|
||||||
|
|
||||||
|
elif op == 'evt ':
|
||||||
|
pass
|
||||||
|
|
||||||
|
else:
|
||||||
|
print '***** Unknown line type: ', line
|
||||||
|
|
||||||
|
|
||||||
|
# process templates
|
||||||
|
data = {}
|
||||||
|
data['VALUES'] = processVals(values)
|
||||||
|
defs, imps = processMethods(methods)
|
||||||
|
data['METHOD_DEFS'] = defs
|
||||||
|
data['METHOD_IMPS'] = imps
|
||||||
|
|
||||||
|
# get template text
|
||||||
|
h_text = open(h_tmplt).read()
|
||||||
|
cpp_text = open(cpp_tmplt).read()
|
||||||
|
|
||||||
|
# do the substitutions
|
||||||
|
h_text = h_text % data
|
||||||
|
cpp_text = cpp_text % data
|
||||||
|
|
||||||
|
# write out destination files
|
||||||
|
open(h_dest, 'w').write(h_text)
|
||||||
|
open(cpp_dest, 'w').write(cpp_text)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def processVals(values):
|
||||||
|
text = []
|
||||||
|
for name, value, docs in values:
|
||||||
|
if docs:
|
||||||
|
text.append('')
|
||||||
|
for x in docs:
|
||||||
|
text.append('// ' + x)
|
||||||
|
text.append('#define %s %s' % (name, value))
|
||||||
|
return string.join(text, '\n')
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def processMethods(methods):
|
||||||
|
defs = []
|
||||||
|
imps = []
|
||||||
|
|
||||||
|
for retType, name, number, param1, param2, docs in methods:
|
||||||
|
retType = retTypeMap.get(retType, retType)
|
||||||
|
params = makeParamString(param1, param2)
|
||||||
|
|
||||||
|
name, theDef, theImp, docs = checkMethodOverride(name, number, docs)
|
||||||
|
|
||||||
|
if name is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Build the method definition for the .h file
|
||||||
|
if docs:
|
||||||
|
defs.append('')
|
||||||
|
for x in docs:
|
||||||
|
defs.append(' // ' + x)
|
||||||
|
if not theDef:
|
||||||
|
theDef = ' %s %s(%s);' % (retType, name, params)
|
||||||
|
defs.append(theDef)
|
||||||
|
|
||||||
|
# Build the method implementation string
|
||||||
|
if docs:
|
||||||
|
imps.append('')
|
||||||
|
for x in docs:
|
||||||
|
imps.append('// ' + x)
|
||||||
|
if not theImp:
|
||||||
|
theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params)
|
||||||
|
|
||||||
|
if retType == 'wxColour':
|
||||||
|
theImp = theImp + 'long c = '
|
||||||
|
elif retType != 'void':
|
||||||
|
theImp = theImp + 'return '
|
||||||
|
theImp = theImp + 'SendMsg(%s, %s, %s)' % (number,
|
||||||
|
makeArgString(param1),
|
||||||
|
makeArgString(param2))
|
||||||
|
if retType == 'bool':
|
||||||
|
theImp = theImp + ' != 0'
|
||||||
|
if retType == 'wxColour':
|
||||||
|
theImp = theImp + ';\n return wxColourFromLong(c)'
|
||||||
|
|
||||||
|
theImp = theImp + ';\n}'
|
||||||
|
imps.append(theImp)
|
||||||
|
|
||||||
|
|
||||||
|
return string.join(defs, '\n'), string.join(imps, '\n')
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def checkMethodOverride(name, number, docs):
|
||||||
|
theDef = theImp = None
|
||||||
|
if methodOverrideMap.has_key(name):
|
||||||
|
item = methodOverrideMap[name]
|
||||||
|
|
||||||
|
if item[0] != 0:
|
||||||
|
name = item[0]
|
||||||
|
if item[1] != 0:
|
||||||
|
theDef = ' ' + (item[1] % name)
|
||||||
|
if item[2] != 0:
|
||||||
|
theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}'
|
||||||
|
if item[3] != 0:
|
||||||
|
docs = item[3]
|
||||||
|
|
||||||
|
return name, theDef, theImp, docs
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def makeArgString(param):
|
||||||
|
if not param:
|
||||||
|
return '0'
|
||||||
|
|
||||||
|
typ, name = param
|
||||||
|
|
||||||
|
if typ == 'string':
|
||||||
|
return '(long)%s.c_str()' % name
|
||||||
|
if typ == 'colour':
|
||||||
|
return 'wxColourAsLong(%s)' % name
|
||||||
|
|
||||||
|
return name
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def makeParamString(param1, param2):
|
||||||
|
def doOne(param):
|
||||||
|
if param:
|
||||||
|
aType = paramTypeMap.get(param[0], param[0])
|
||||||
|
return aType + ' ' + param[1]
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
st = doOne(param1)
|
||||||
|
if st and param2:
|
||||||
|
st = st + ', '
|
||||||
|
st = st + doOne(param2)
|
||||||
|
return st
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def parseVal(line, values, docs):
|
||||||
|
name, val = string.split(line, '=')
|
||||||
|
|
||||||
|
# remove prefixes such as SCI, etc.
|
||||||
|
for old, new in valPrefixes:
|
||||||
|
lo = len(old)
|
||||||
|
if name[:lo] == old:
|
||||||
|
if new is None:
|
||||||
|
return
|
||||||
|
name = new + name[lo:]
|
||||||
|
|
||||||
|
# add it to the list
|
||||||
|
values.append( ('wxSTC_' + name, val, docs) )
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # <ws>return type
|
||||||
|
'\s+([a-zA-Z0-9_]+)=' # <ws>name=
|
||||||
|
'([0-9]+)' # number
|
||||||
|
'\(([ a-zA-Z0-9_]*),' # (param,
|
||||||
|
'([ a-zA-Z0-9_]*)\)') # param)
|
||||||
|
|
||||||
|
def parseFun(line, methods, docs, values):
|
||||||
|
def parseParam(param):
|
||||||
|
param = string.strip(param)
|
||||||
|
if param == '':
|
||||||
|
param = None
|
||||||
|
else:
|
||||||
|
param = tuple(string.split(param))
|
||||||
|
return param
|
||||||
|
|
||||||
|
mo = funregex.match(line)
|
||||||
|
if mo is None:
|
||||||
|
print "***** Line doesn't match! : " + line
|
||||||
|
|
||||||
|
retType, name, number, param1, param2 = mo.groups()
|
||||||
|
|
||||||
|
param1 = parseParam(param1)
|
||||||
|
param2 = parseParam(param2)
|
||||||
|
|
||||||
|
# Special case. For the key command functionss we want a value defined too
|
||||||
|
num = string.atoi(number)
|
||||||
|
for v in cmdValues:
|
||||||
|
if (type(v) == type(()) and v[0] <= num < v[1]) or v == num:
|
||||||
|
parseVal('CMD_%s=%s' % (string.upper(name), number), values, ())
|
||||||
|
|
||||||
|
#if retType == 'void' and not param1 and not param2:
|
||||||
|
|
||||||
|
methods.append( (retType, name, number, param1, param2, tuple(docs)) )
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
def main(args):
|
||||||
|
# TODO: parse command line args to replace default input/output files???
|
||||||
|
|
||||||
|
# Now just do it
|
||||||
|
processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main(sys.argv)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@@ -34,6 +34,7 @@ OBJECTS = \
|
|||||||
KeyWords.obj \
|
KeyWords.obj \
|
||||||
LexCPP.obj \
|
LexCPP.obj \
|
||||||
LexHTML.obj \
|
LexHTML.obj \
|
||||||
|
LexLua.obj \
|
||||||
LexOthers.obj \
|
LexOthers.obj \
|
||||||
LexPerl.obj \
|
LexPerl.obj \
|
||||||
LexPython.obj \
|
LexPython.obj \
|
||||||
@@ -41,6 +42,7 @@ OBJECTS = \
|
|||||||
LexVB.obj \
|
LexVB.obj \
|
||||||
LineMarker.obj \
|
LineMarker.obj \
|
||||||
PropSet.obj \
|
PropSet.obj \
|
||||||
|
PosRegExp.obj \
|
||||||
ScintillaBase.obj \
|
ScintillaBase.obj \
|
||||||
Style.obj \
|
Style.obj \
|
||||||
UniConversion.obj \
|
UniConversion.obj \
|
||||||
|
@@ -27,6 +27,7 @@ OBJECTS = \
|
|||||||
$(S)/ViewStyle.$(OBJSUFF) \
|
$(S)/ViewStyle.$(OBJSUFF) \
|
||||||
$(S)/LexCPP.$(OBJSUFF) \
|
$(S)/LexCPP.$(OBJSUFF) \
|
||||||
$(S)/LexHTML.$(OBJSUFF) \
|
$(S)/LexHTML.$(OBJSUFF) \
|
||||||
|
$(S)/LexLua.$(OBJSUFF) \
|
||||||
$(S)/LexOthers.$(OBJSUFF) \
|
$(S)/LexOthers.$(OBJSUFF) \
|
||||||
$(S)/LexPerl.$(OBJSUFF) \
|
$(S)/LexPerl.$(OBJSUFF) \
|
||||||
$(S)/LexPython.$(OBJSUFF) \
|
$(S)/LexPython.$(OBJSUFF) \
|
||||||
@@ -35,6 +36,7 @@ OBJECTS = \
|
|||||||
$(S)/DocumentAccessor.$(OBJSUFF)\
|
$(S)/DocumentAccessor.$(OBJSUFF)\
|
||||||
$(S)/UniConversion.$(OBJSUFF) \
|
$(S)/UniConversion.$(OBJSUFF) \
|
||||||
$(S)/WindowAccessor.$(OBJSUFF) \
|
$(S)/WindowAccessor.$(OBJSUFF) \
|
||||||
|
$(S)/PosRegExp.$(OBJSUFF) \
|
||||||
PlatWX.$(OBJSUFF) \
|
PlatWX.$(OBJSUFF) \
|
||||||
ScintillaWX.$(OBJSUFF) \
|
ScintillaWX.$(OBJSUFF) \
|
||||||
stc.$(OBJSUFF)
|
stc.$(OBJSUFF)
|
||||||
|
@@ -27,12 +27,14 @@ OBJECTS = \
|
|||||||
$(D)\KeyWords.obj \
|
$(D)\KeyWords.obj \
|
||||||
$(D)\LexCPP.obj \
|
$(D)\LexCPP.obj \
|
||||||
$(D)\LexHTML.obj \
|
$(D)\LexHTML.obj \
|
||||||
|
$(D)\LexLua.obj \
|
||||||
$(D)\LexOthers.obj \
|
$(D)\LexOthers.obj \
|
||||||
$(D)\LexPerl.obj \
|
$(D)\LexPerl.obj \
|
||||||
$(D)\LexPython.obj \
|
$(D)\LexPython.obj \
|
||||||
$(D)\LexSQL.obj \
|
$(D)\LexSQL.obj \
|
||||||
$(D)\LexVB.obj \
|
$(D)\LexVB.obj \
|
||||||
$(D)\LineMarker.obj \
|
$(D)\LineMarker.obj \
|
||||||
|
$(D)\PosRegExp.obj \
|
||||||
$(D)\PropSet.obj \
|
$(D)\PropSet.obj \
|
||||||
$(D)\ScintillaBase.obj \
|
$(D)\ScintillaBase.obj \
|
||||||
$(D)\Style.obj \
|
$(D)\Style.obj \
|
||||||
|
@@ -3,6 +3,5 @@ scintilla/include directories from the Scintilla/SCiTE source
|
|||||||
distribution. All other code needed to implement Scintilla on top of
|
distribution. All other code needed to implement Scintilla on top of
|
||||||
wxWindows is located in the directory above this one.
|
wxWindows is located in the directory above this one.
|
||||||
|
|
||||||
The current version of the Scintilla code is 1.25+ (from their CVS on
|
The current version of the Scintilla code is 1.32
|
||||||
5-19-2000).
|
|
||||||
|
|
||||||
|
@@ -80,12 +80,6 @@ typedef wxWindow* WindowID;
|
|||||||
typedef wxMenu* MenuID;
|
typedef wxMenu* MenuID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PLAT_GTK || PLAT_WX
|
|
||||||
#define SHIFT_PRESSED 1
|
|
||||||
#define LEFT_CTRL_PRESSED 2
|
|
||||||
#define LEFT_ALT_PRESSED 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably
|
// Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably
|
||||||
|
|
||||||
class Point {
|
class Point {
|
||||||
@@ -199,6 +193,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Font {
|
class Font {
|
||||||
|
protected:
|
||||||
FontID id;
|
FontID id;
|
||||||
#if PLAT_WX
|
#if PLAT_WX
|
||||||
int ascent;
|
int ascent;
|
||||||
@@ -208,10 +203,10 @@ class Font {
|
|||||||
Font &operator=(const Font &) { id=0; return *this; }
|
Font &operator=(const Font &) { id=0; return *this; }
|
||||||
public:
|
public:
|
||||||
Font();
|
Font();
|
||||||
~Font();
|
virtual ~Font();
|
||||||
|
|
||||||
void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
|
virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
|
||||||
void Release();
|
virtual void Release();
|
||||||
|
|
||||||
FontID GetID() { return id; }
|
FontID GetID() { return id; }
|
||||||
// Alias another font - caller guarantees not to Release
|
// Alias another font - caller guarantees not to Release
|
||||||
@@ -327,7 +322,7 @@ public:
|
|||||||
void Show(bool show=true);
|
void Show(bool show=true);
|
||||||
void InvalidateAll();
|
void InvalidateAll();
|
||||||
void InvalidateRectangle(PRectangle rc);
|
void InvalidateRectangle(PRectangle rc);
|
||||||
void SetFont(Font &font);
|
virtual void SetFont(Font &font);
|
||||||
enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow };
|
enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow };
|
||||||
void SetCursor(Cursor curs);
|
void SetCursor(Cursor curs);
|
||||||
void SetTitle(const char *s);
|
void SetTitle(const char *s);
|
||||||
@@ -344,14 +339,17 @@ class ListBox : public Window {
|
|||||||
WindowID scroller;
|
WindowID scroller;
|
||||||
int current;
|
int current;
|
||||||
#endif
|
#endif
|
||||||
|
int desiredVisibleRows;
|
||||||
|
unsigned int maxItemCharacters;
|
||||||
|
unsigned int aveCharWidth;
|
||||||
public:
|
public:
|
||||||
ListBox();
|
ListBox();
|
||||||
virtual ~ListBox();
|
virtual ~ListBox();
|
||||||
ListBox &operator=(WindowID id_) {
|
|
||||||
id = id_;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
void Create(Window &parent, int ctrlID);
|
void Create(Window &parent, int ctrlID);
|
||||||
|
virtual void SetFont(Font &font);
|
||||||
|
void SetAverageCharWidth(int width);
|
||||||
|
void SetVisibleRows(int rows);
|
||||||
|
PRectangle GetDesiredRect();
|
||||||
void Clear();
|
void Clear();
|
||||||
void Append(char *s);
|
void Append(char *s);
|
||||||
int Length();
|
int Length();
|
||||||
@@ -396,6 +394,16 @@ public:
|
|||||||
// These are utility functions not really tied to a platform
|
// These are utility functions not really tied to a platform
|
||||||
static int Minimum(int a, int b);
|
static int Minimum(int a, int b);
|
||||||
static int Maximum(int a, int b);
|
static int Maximum(int a, int b);
|
||||||
|
// Next three assume 16 bit shorts and 32 bit longs
|
||||||
|
static long LongFromTwoShorts(short a,short b) {
|
||||||
|
return (a) | ((b) << 16);
|
||||||
|
}
|
||||||
|
static short HighShortFromLong(long x) {
|
||||||
|
return static_cast<short>(x >> 16);
|
||||||
|
}
|
||||||
|
static short LowShortFromLong(long x) {
|
||||||
|
return static_cast<short>(x & 0xffff);
|
||||||
|
}
|
||||||
static void DebugPrintf(const char *format, ...);
|
static void DebugPrintf(const char *format, ...);
|
||||||
static int Clamp(int val, int minVal, int maxVal);
|
static int Clamp(int val, int minVal, int maxVal);
|
||||||
};
|
};
|
||||||
|
138
contrib/src/stc/scintilla/include/PosRegExp.h
Normal file
138
contrib/src/stc/scintilla/include/PosRegExp.h
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
#ifndef POSREGEXP_H
|
||||||
|
#define POSREGEXP_H
|
||||||
|
|
||||||
|
#define MatchesNum 0x10
|
||||||
|
|
||||||
|
enum EOps
|
||||||
|
{
|
||||||
|
ReBlockOps = 0x1000,
|
||||||
|
ReMul, // *
|
||||||
|
RePlus, // +
|
||||||
|
ReQuest, // ?
|
||||||
|
ReNGMul, // *?
|
||||||
|
ReNGPlus, // +?
|
||||||
|
ReNGQuest, // ??
|
||||||
|
ReRangeN, // {n,}
|
||||||
|
ReRangeNM, // {n,m}
|
||||||
|
ReNGRangeN, // {n,}?
|
||||||
|
ReNGRangeNM, // {n,m}?
|
||||||
|
ReOr, // |
|
||||||
|
ReBehind = 0x1100, // ?#n
|
||||||
|
ReNBehind = 0x1200, // ?~n
|
||||||
|
ReAhead = 0x1300, // ?=
|
||||||
|
ReNAhead = 0x1400, // ?!
|
||||||
|
|
||||||
|
ReSymbolOps = 0x2000,
|
||||||
|
ReEmpty,
|
||||||
|
ReSymb, // a b \W \s ...
|
||||||
|
ReEnum, // []
|
||||||
|
ReNEnum, // [^]
|
||||||
|
ReBrackets, // (...)
|
||||||
|
ReBkTrace = 0x2100, // \yN
|
||||||
|
ReBkBrack = 0x2200 // \N
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ESymbols
|
||||||
|
{
|
||||||
|
ReAnyChr = 0x4000, // .
|
||||||
|
ReSoL, // ^
|
||||||
|
ReEoL, // $
|
||||||
|
ReDigit, // \d
|
||||||
|
ReNDigit, // \D
|
||||||
|
ReWordSymb, // \w
|
||||||
|
ReNWordSymb, // \W
|
||||||
|
ReWSpace, // \s
|
||||||
|
ReNWSpace, // \S
|
||||||
|
ReUCase, // \u
|
||||||
|
ReNUCase , // \l
|
||||||
|
ReWBound, // \b
|
||||||
|
ReNWBound, // \B
|
||||||
|
RePreNW, // \c
|
||||||
|
ReStart, // \m
|
||||||
|
ReEnd, // \M
|
||||||
|
|
||||||
|
ReChr = 0x0 // Char in Lower Byte
|
||||||
|
};
|
||||||
|
enum ETempSymb
|
||||||
|
{
|
||||||
|
ReTemp = 0x7000,
|
||||||
|
ReLBrack, ReRBrack,
|
||||||
|
ReEnumS, ReEnumE, ReNEnumS,
|
||||||
|
ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum
|
||||||
|
};
|
||||||
|
|
||||||
|
#define BackSlash '\\'
|
||||||
|
|
||||||
|
typedef union SCharData
|
||||||
|
{
|
||||||
|
int IArr[8];
|
||||||
|
char CArr[32];
|
||||||
|
void SetBit(unsigned char Bit);
|
||||||
|
void ClearBit(unsigned char Bit);
|
||||||
|
bool GetBit(unsigned char Bit);
|
||||||
|
} *PCharData;
|
||||||
|
|
||||||
|
typedef struct SRegInfo
|
||||||
|
{
|
||||||
|
SRegInfo();
|
||||||
|
~SRegInfo();
|
||||||
|
|
||||||
|
EOps Op;
|
||||||
|
union{
|
||||||
|
SRegInfo *Param;
|
||||||
|
int Symb;
|
||||||
|
PCharData ChrClass;
|
||||||
|
}un;
|
||||||
|
int s,e;
|
||||||
|
SRegInfo *Parent;
|
||||||
|
SRegInfo *Next;
|
||||||
|
} *PRegInfo;
|
||||||
|
|
||||||
|
typedef struct SMatches
|
||||||
|
{
|
||||||
|
int s[MatchesNum];
|
||||||
|
int e[MatchesNum];
|
||||||
|
int CurMatch;
|
||||||
|
} *PMatches;
|
||||||
|
|
||||||
|
typedef class PosRegExp
|
||||||
|
{
|
||||||
|
PRegInfo Info;
|
||||||
|
PMatches BkTrace;
|
||||||
|
bool NoCase,Extend,NoMoves;
|
||||||
|
bool Error;
|
||||||
|
int *Exprn;
|
||||||
|
int posParse;
|
||||||
|
int posEnd,posStart;
|
||||||
|
int posBkStr;
|
||||||
|
int FirstChar;
|
||||||
|
|
||||||
|
bool SetExprLow(const char *Expr);
|
||||||
|
bool SetStructs(PRegInfo &Info,int st,int end);
|
||||||
|
void Optimize();
|
||||||
|
bool CheckSymb(int Symb,bool Inc);
|
||||||
|
bool LowParse(PRegInfo Re);
|
||||||
|
bool LowParseRe(PRegInfo &Next);
|
||||||
|
bool LowCheckNext(PRegInfo Re);
|
||||||
|
bool ParseRe(int posStr);
|
||||||
|
bool QuickCheck();
|
||||||
|
public:
|
||||||
|
PMatches Matches;
|
||||||
|
int Ok, CurMatch;
|
||||||
|
|
||||||
|
void *param;
|
||||||
|
char (*CharAt)(int pos, void *param);
|
||||||
|
|
||||||
|
PosRegExp();
|
||||||
|
~PosRegExp();
|
||||||
|
|
||||||
|
bool isok();
|
||||||
|
bool SetNoMoves(bool Moves);
|
||||||
|
bool SetBkTrace(int posStr,PMatches Trace);
|
||||||
|
bool SetExpr(const char *Expr);
|
||||||
|
bool Parse(int posStr, int posStop, PMatches Mtch);
|
||||||
|
bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1);
|
||||||
|
bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res);
|
||||||
|
} *PPosRegExp;
|
||||||
|
|
||||||
|
#endif /* POSREGEXP_H */
|
@@ -8,44 +8,92 @@
|
|||||||
|
|
||||||
bool EqualCaseInsensitive(const char *a, const char *b);
|
bool EqualCaseInsensitive(const char *a, const char *b);
|
||||||
|
|
||||||
|
#if PLAT_WIN
|
||||||
|
#define strcasecmp stricmp
|
||||||
|
#define strncasecmp strnicmp
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
#define strcasecmp stricmp
|
||||||
|
#define strncasecmp strnicmp
|
||||||
|
#endif
|
||||||
|
|
||||||
// Define another string class.
|
// Define another string class.
|
||||||
// While it would be 'better' to use std::string, that doubles the executable size.
|
// While it would be 'better' to use std::string, that doubles the executable size.
|
||||||
|
|
||||||
inline char *StringDup(const char *s) {
|
inline char *StringDup(const char *s, int len=-1) {
|
||||||
if (!s)
|
if (!s)
|
||||||
return 0;
|
return 0;
|
||||||
char *sNew = new char[strlen(s) + 1];
|
if (len == -1)
|
||||||
if (sNew)
|
len = strlen(s);
|
||||||
strcpy(sNew, s);
|
char *sNew = new char[len + 1];
|
||||||
|
if (sNew) {
|
||||||
|
strncpy(sNew, s, len);
|
||||||
|
sNew[len] = '\0';
|
||||||
|
}
|
||||||
return sNew;
|
return sNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SString {
|
class SString {
|
||||||
char *s;
|
char *s;
|
||||||
|
int ssize;
|
||||||
public:
|
public:
|
||||||
|
typedef const char* const_iterator;
|
||||||
|
typedef int size_type;
|
||||||
|
static size_type npos;
|
||||||
|
const char* begin(void) const {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
const char* end(void) const {
|
||||||
|
return &s[ssize];
|
||||||
|
}
|
||||||
|
size_type size(void) const {
|
||||||
|
if (s)
|
||||||
|
return ssize;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
SString &assign(const char* sother, int size_ = -1) {
|
||||||
|
char *t = s;
|
||||||
|
s = StringDup(sother,size_);
|
||||||
|
ssize = (s) ? strlen(s) : 0;
|
||||||
|
delete []t;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
SString &assign(const SString& sother, int size_ = -1) {
|
||||||
|
return assign(sother.s,size_);
|
||||||
|
}
|
||||||
|
SString &assign(const_iterator ibeg, const_iterator iend) {
|
||||||
|
return assign(ibeg,iend - ibeg);
|
||||||
|
}
|
||||||
SString() {
|
SString() {
|
||||||
s = 0;
|
s = 0;
|
||||||
|
ssize = 0;
|
||||||
}
|
}
|
||||||
SString(const SString &source) {
|
SString(const SString &source) {
|
||||||
s = StringDup(source.s);
|
s = StringDup(source.s);
|
||||||
|
ssize = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
SString(const char *s_) {
|
SString(const char *s_) {
|
||||||
s = StringDup(s_);
|
s = StringDup(s_);
|
||||||
|
ssize = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
SString(int i) {
|
SString(int i) {
|
||||||
char number[100];
|
char number[100];
|
||||||
sprintf(number, "%0d", i);
|
sprintf(number, "%0d", i);
|
||||||
//itoa(i, number, 10);
|
|
||||||
s = StringDup(number);
|
s = StringDup(number);
|
||||||
|
ssize = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
~SString() {
|
~SString() {
|
||||||
delete []s;
|
delete []s;
|
||||||
s = 0;
|
s = 0;
|
||||||
|
ssize = 0;
|
||||||
}
|
}
|
||||||
SString &operator=(const SString &source) {
|
SString &operator=(const SString &source) {
|
||||||
if (this != &source) {
|
if (this != &source) {
|
||||||
delete []s;
|
delete []s;
|
||||||
s = StringDup(source.s);
|
s = StringDup(source.s);
|
||||||
|
ssize = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -56,6 +104,9 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
return strcmp(s, other.s) == 0;
|
return strcmp(s, other.s) == 0;
|
||||||
}
|
}
|
||||||
|
bool operator!=(const SString &other) const {
|
||||||
|
return !operator==(other);
|
||||||
|
}
|
||||||
bool operator==(const char *sother) const {
|
bool operator==(const char *sother) const {
|
||||||
if ((s == 0) && (sother == 0))
|
if ((s == 0) && (sother == 0))
|
||||||
return true;
|
return true;
|
||||||
@@ -63,6 +114,9 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
return strcmp(s, sother) == 0;
|
return strcmp(s, sother) == 0;
|
||||||
}
|
}
|
||||||
|
bool operator!=(const char *sother) const {
|
||||||
|
return !operator==(sother);
|
||||||
|
}
|
||||||
const char *c_str() const {
|
const char *c_str() const {
|
||||||
if (s)
|
if (s)
|
||||||
return s;
|
return s;
|
||||||
@@ -82,99 +136,109 @@ public:
|
|||||||
return '\0';
|
return '\0';
|
||||||
}
|
}
|
||||||
SString &operator +=(const char *sother) {
|
SString &operator +=(const char *sother) {
|
||||||
|
return append(sother,-1);
|
||||||
|
}
|
||||||
|
SString &operator +=(const SString &sother) {
|
||||||
|
return append(sother.s,sother.ssize);
|
||||||
|
}
|
||||||
|
SString &operator +=(char ch) {
|
||||||
|
return append(&ch,1);
|
||||||
|
}
|
||||||
|
SString &append(const char* sother, int lenOther) {
|
||||||
int len = length();
|
int len = length();
|
||||||
int lenOther = strlen(sother);
|
if(lenOther < 0)
|
||||||
|
lenOther = strlen(sother);
|
||||||
char *sNew = new char[len + lenOther + 1];
|
char *sNew = new char[len + lenOther + 1];
|
||||||
if (sNew) {
|
if (sNew) {
|
||||||
if (s)
|
if (s)
|
||||||
memcpy(sNew, s, len);
|
memcpy(sNew, s, len);
|
||||||
memcpy(sNew + len, sother, lenOther);
|
strncpy(&sNew[len], sother, lenOther);
|
||||||
sNew[len + lenOther] = '\0';
|
sNew[len + lenOther] = '\0';
|
||||||
delete []s;
|
delete []s;
|
||||||
s = sNew;
|
s = sNew;
|
||||||
|
ssize = (s) ? strlen(s) : 0;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
int value() const {
|
int value() const {
|
||||||
if (s)
|
if (s)
|
||||||
return atoi(s);
|
return atoi(s);
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
void substitute(char find, char replace) {
|
||||||
|
char *t = s;
|
||||||
|
while (t) {
|
||||||
|
t = strchr(t, find);
|
||||||
|
if (t)
|
||||||
|
*t = replace;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// I don't think this really belongs here -- Neil
|
||||||
|
void correctPath() {
|
||||||
|
#ifdef unix
|
||||||
|
substitute('\\', '/');
|
||||||
|
#else
|
||||||
|
substitute('/', '\\');
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Property {
|
||||||
|
unsigned int hash;
|
||||||
|
char *key;
|
||||||
|
char *val;
|
||||||
|
Property *next;
|
||||||
|
Property() : hash(0), key(0), val(0), next(0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class PropSet {
|
class PropSet {
|
||||||
private:
|
private:
|
||||||
char **vals;
|
enum { hashRoots=31 };
|
||||||
int size;
|
Property *props[hashRoots];
|
||||||
int used;
|
|
||||||
public:
|
public:
|
||||||
PropSet *superPS;
|
PropSet *superPS;
|
||||||
PropSet();
|
PropSet();
|
||||||
~PropSet();
|
~PropSet();
|
||||||
void EnsureCanAddEntry();
|
|
||||||
void Set(const char *key, const char *val);
|
void Set(const char *key, const char *val);
|
||||||
void Set(char *keyval);
|
void Set(char *keyval);
|
||||||
SString Get(const char *key);
|
SString Get(const char *key);
|
||||||
|
SString GetExpanded(const char *key);
|
||||||
|
SString Expand(const char *withvars);
|
||||||
int GetInt(const char *key, int defaultValue=0);
|
int GetInt(const char *key, int defaultValue=0);
|
||||||
SString GetWild(const char *keybase, const char *filename);
|
SString GetWild(const char *keybase, const char *filename);
|
||||||
SString GetNewExpand(const char *keybase, const char *filename);
|
SString GetNewExpand(const char *keybase, const char *filename);
|
||||||
void Clear();
|
void Clear();
|
||||||
void ReadFromMemory(const char *data, int len);
|
void ReadFromMemory(const char *data, int len, const char *directoryForImports=0);
|
||||||
void Read(const char *filename);
|
void Read(const char *filename, const char *directoryForImports);
|
||||||
};
|
|
||||||
|
|
||||||
// This is a fixed length list of strings suitable for display in combo boxes
|
|
||||||
// as a memory of user entries
|
|
||||||
template<int sz>
|
|
||||||
class EntryMemory {
|
|
||||||
SString entries[sz];
|
|
||||||
public:
|
|
||||||
void Insert(SString s) {
|
|
||||||
for (int i=0;i<sz;i++) {
|
|
||||||
if (entries[i] == s) {
|
|
||||||
for (int j=i;j>0;j--) {
|
|
||||||
entries[j] = entries[j-1];
|
|
||||||
}
|
|
||||||
entries[0] = s;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int k=sz-1;k>0;k--) {
|
|
||||||
entries[k] = entries[k-1];
|
|
||||||
}
|
|
||||||
entries[0] = s;
|
|
||||||
}
|
|
||||||
int Length() const {
|
|
||||||
int len = 0;
|
|
||||||
for (int i=0;i<sz;i++)
|
|
||||||
if (entries[i].length())
|
|
||||||
len++;
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
SString At(int n) const {
|
|
||||||
return entries[n];
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class WordList {
|
class WordList {
|
||||||
public:
|
public:
|
||||||
// Each word contains at least one character - a empty word acts as sentinal at the end.
|
// Each word contains at least one character - a empty word acts as sentinal at the end.
|
||||||
char **words;
|
char **words;
|
||||||
|
char **wordsNoCase;
|
||||||
char *list;
|
char *list;
|
||||||
int len;
|
int len;
|
||||||
bool onlyLineEnds; // Delimited by any white space or only line ends
|
bool onlyLineEnds; // Delimited by any white space or only line ends
|
||||||
|
bool sorted;
|
||||||
int starts[256];
|
int starts[256];
|
||||||
WordList(bool onlyLineEnds_ = false) :
|
WordList(bool onlyLineEnds_ = false) :
|
||||||
words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_) {}
|
words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {}
|
||||||
~WordList() { Clear(); }
|
~WordList() { Clear(); }
|
||||||
operator bool() { return list ? true : false; }
|
operator bool() { return words ? true : false; }
|
||||||
const char *operator[](int ind) { return words[ind]; }
|
const char *operator[](int ind) { return words[ind]; }
|
||||||
void Clear();
|
void Clear();
|
||||||
void Set(const char *s);
|
void Set(const char *s);
|
||||||
char *Allocate(int size);
|
char *Allocate(int size);
|
||||||
void SetFromAllocated();
|
void SetFromAllocated();
|
||||||
bool InList(const char *s);
|
bool InList(const char *s);
|
||||||
|
const char *GetNearestWord(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
|
||||||
|
char *GetNearestWords(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline bool nonFuncChar(char ch) {
|
||||||
|
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -3,11 +3,15 @@
|
|||||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
|
|
||||||
|
// Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||||
|
// file which contains any comments about the definitions. HFacer.py does the generation.
|
||||||
|
|
||||||
#ifndef SCILEXER_H
|
#ifndef SCILEXER_H
|
||||||
#define SCILEXER_H
|
#define SCILEXER_H
|
||||||
|
|
||||||
// SciLexer features - not in standard Scintilla
|
// SciLexer features - not in standard Scintilla
|
||||||
|
|
||||||
|
//++Autogenerated -- start of section automatically generated from Scintilla.iface
|
||||||
#define SCLEX_CONTAINER 0
|
#define SCLEX_CONTAINER 0
|
||||||
#define SCLEX_NULL 1
|
#define SCLEX_NULL 1
|
||||||
#define SCLEX_PYTHON 2
|
#define SCLEX_PYTHON 2
|
||||||
@@ -23,8 +27,8 @@
|
|||||||
#define SCLEX_BATCH 12
|
#define SCLEX_BATCH 12
|
||||||
#define SCLEX_XCODE 13
|
#define SCLEX_XCODE 13
|
||||||
#define SCLEX_LATEX 14
|
#define SCLEX_LATEX 14
|
||||||
|
#define SCLEX_LUA 15
|
||||||
// Lexical states for SCLEX_PYTHON
|
#define SCLEX_DIFF 16
|
||||||
#define SCE_P_DEFAULT 0
|
#define SCE_P_DEFAULT 0
|
||||||
#define SCE_P_COMMENTLINE 1
|
#define SCE_P_COMMENTLINE 1
|
||||||
#define SCE_P_NUMBER 2
|
#define SCE_P_NUMBER 2
|
||||||
@@ -39,8 +43,6 @@
|
|||||||
#define SCE_P_IDENTIFIER 11
|
#define SCE_P_IDENTIFIER 11
|
||||||
#define SCE_P_COMMENTBLOCK 12
|
#define SCE_P_COMMENTBLOCK 12
|
||||||
#define SCE_P_STRINGEOL 13
|
#define SCE_P_STRINGEOL 13
|
||||||
|
|
||||||
// Lexical states for SCLEX_CPP, SCLEX_VB
|
|
||||||
#define SCE_C_DEFAULT 0
|
#define SCE_C_DEFAULT 0
|
||||||
#define SCE_C_COMMENT 1
|
#define SCE_C_COMMENT 1
|
||||||
#define SCE_C_COMMENTLINE 2
|
#define SCE_C_COMMENTLINE 2
|
||||||
@@ -54,8 +56,7 @@
|
|||||||
#define SCE_C_OPERATOR 10
|
#define SCE_C_OPERATOR 10
|
||||||
#define SCE_C_IDENTIFIER 11
|
#define SCE_C_IDENTIFIER 11
|
||||||
#define SCE_C_STRINGEOL 12
|
#define SCE_C_STRINGEOL 12
|
||||||
|
#define SCE_C_VERBATIM 13
|
||||||
// Lexical states for SCLEX_HTML, SCLEX_xML
|
|
||||||
#define SCE_H_DEFAULT 0
|
#define SCE_H_DEFAULT 0
|
||||||
#define SCE_H_TAG 1
|
#define SCE_H_TAG 1
|
||||||
#define SCE_H_TAGUNKNOWN 2
|
#define SCE_H_TAGUNKNOWN 2
|
||||||
@@ -67,14 +68,15 @@
|
|||||||
#define SCE_H_OTHER 8
|
#define SCE_H_OTHER 8
|
||||||
#define SCE_H_COMMENT 9
|
#define SCE_H_COMMENT 9
|
||||||
#define SCE_H_ENTITY 10
|
#define SCE_H_ENTITY 10
|
||||||
// XML and ASP
|
|
||||||
#define SCE_H_TAGEND 11
|
#define SCE_H_TAGEND 11
|
||||||
#define SCE_H_XMLSTART 12
|
#define SCE_H_XMLSTART 12
|
||||||
#define SCE_H_XMLEND 13
|
#define SCE_H_XMLEND 13
|
||||||
#define SCE_H_SCRIPT 14
|
#define SCE_H_SCRIPT 14
|
||||||
#define SCE_H_ASP 15
|
#define SCE_H_ASP 15
|
||||||
#define SCE_H_ASPAT 16
|
#define SCE_H_ASPAT 16
|
||||||
// Embedded Javascript
|
#define SCE_H_CDATA 17
|
||||||
|
#define SCE_H_QUESTION 18
|
||||||
|
#define SCE_H_VALUE 19
|
||||||
#define SCE_HJ_START 40
|
#define SCE_HJ_START 40
|
||||||
#define SCE_HJ_DEFAULT 41
|
#define SCE_HJ_DEFAULT 41
|
||||||
#define SCE_HJ_COMMENT 42
|
#define SCE_HJ_COMMENT 42
|
||||||
@@ -87,7 +89,6 @@
|
|||||||
#define SCE_HJ_SINGLESTRING 49
|
#define SCE_HJ_SINGLESTRING 49
|
||||||
#define SCE_HJ_SYMBOLS 50
|
#define SCE_HJ_SYMBOLS 50
|
||||||
#define SCE_HJ_STRINGEOL 51
|
#define SCE_HJ_STRINGEOL 51
|
||||||
// ASP Javascript
|
|
||||||
#define SCE_HJA_START 55
|
#define SCE_HJA_START 55
|
||||||
#define SCE_HJA_DEFAULT 56
|
#define SCE_HJA_DEFAULT 56
|
||||||
#define SCE_HJA_COMMENT 57
|
#define SCE_HJA_COMMENT 57
|
||||||
@@ -100,7 +101,6 @@
|
|||||||
#define SCE_HJA_SINGLESTRING 64
|
#define SCE_HJA_SINGLESTRING 64
|
||||||
#define SCE_HJA_SYMBOLS 65
|
#define SCE_HJA_SYMBOLS 65
|
||||||
#define SCE_HJA_STRINGEOL 66
|
#define SCE_HJA_STRINGEOL 66
|
||||||
// Embedded VBScript
|
|
||||||
#define SCE_HB_START 70
|
#define SCE_HB_START 70
|
||||||
#define SCE_HB_DEFAULT 71
|
#define SCE_HB_DEFAULT 71
|
||||||
#define SCE_HB_COMMENTLINE 72
|
#define SCE_HB_COMMENTLINE 72
|
||||||
@@ -109,7 +109,6 @@
|
|||||||
#define SCE_HB_STRING 75
|
#define SCE_HB_STRING 75
|
||||||
#define SCE_HB_IDENTIFIER 76
|
#define SCE_HB_IDENTIFIER 76
|
||||||
#define SCE_HB_STRINGEOL 77
|
#define SCE_HB_STRINGEOL 77
|
||||||
// ASP VBScript
|
|
||||||
#define SCE_HBA_START 80
|
#define SCE_HBA_START 80
|
||||||
#define SCE_HBA_DEFAULT 81
|
#define SCE_HBA_DEFAULT 81
|
||||||
#define SCE_HBA_COMMENTLINE 82
|
#define SCE_HBA_COMMENTLINE 82
|
||||||
@@ -118,7 +117,6 @@
|
|||||||
#define SCE_HBA_STRING 85
|
#define SCE_HBA_STRING 85
|
||||||
#define SCE_HBA_IDENTIFIER 86
|
#define SCE_HBA_IDENTIFIER 86
|
||||||
#define SCE_HBA_STRINGEOL 87
|
#define SCE_HBA_STRINGEOL 87
|
||||||
// Embedded Python
|
|
||||||
#define SCE_HP_START 90
|
#define SCE_HP_START 90
|
||||||
#define SCE_HP_DEFAULT 91
|
#define SCE_HP_DEFAULT 91
|
||||||
#define SCE_HP_COMMENTLINE 92
|
#define SCE_HP_COMMENTLINE 92
|
||||||
@@ -132,7 +130,6 @@
|
|||||||
#define SCE_HP_DEFNAME 100
|
#define SCE_HP_DEFNAME 100
|
||||||
#define SCE_HP_OPERATOR 101
|
#define SCE_HP_OPERATOR 101
|
||||||
#define SCE_HP_IDENTIFIER 102
|
#define SCE_HP_IDENTIFIER 102
|
||||||
// ASP Python
|
|
||||||
#define SCE_HPA_START 105
|
#define SCE_HPA_START 105
|
||||||
#define SCE_HPA_DEFAULT 106
|
#define SCE_HPA_DEFAULT 106
|
||||||
#define SCE_HPA_COMMENTLINE 107
|
#define SCE_HPA_COMMENTLINE 107
|
||||||
@@ -146,8 +143,15 @@
|
|||||||
#define SCE_HPA_DEFNAME 115
|
#define SCE_HPA_DEFNAME 115
|
||||||
#define SCE_HPA_OPERATOR 116
|
#define SCE_HPA_OPERATOR 116
|
||||||
#define SCE_HPA_IDENTIFIER 117
|
#define SCE_HPA_IDENTIFIER 117
|
||||||
|
#define SCE_HPHP_DEFAULT 118
|
||||||
// Lexical states for SCLEX_PERL
|
#define SCE_HPHP_HSTRING 119
|
||||||
|
#define SCE_HPHP_SIMPLESTRING 120
|
||||||
|
#define SCE_HPHP_WORD 121
|
||||||
|
#define SCE_HPHP_NUMBER 122
|
||||||
|
#define SCE_HPHP_VARIABLE 123
|
||||||
|
#define SCE_HPHP_COMMENT 124
|
||||||
|
#define SCE_HPHP_COMMENTLINE 125
|
||||||
|
#define SCE_HPHP_STRINGEOL 126
|
||||||
#define SCE_PL_DEFAULT 0
|
#define SCE_PL_DEFAULT 0
|
||||||
#define SCE_PL_HERE 1
|
#define SCE_PL_HERE 1
|
||||||
#define SCE_PL_COMMENTLINE 2
|
#define SCE_PL_COMMENTLINE 2
|
||||||
@@ -170,12 +174,31 @@
|
|||||||
#define SCE_PL_LONGQUOTE 19
|
#define SCE_PL_LONGQUOTE 19
|
||||||
#define SCE_PL_BACKTICKS 20
|
#define SCE_PL_BACKTICKS 20
|
||||||
#define SCE_PL_DATASECTION 21
|
#define SCE_PL_DATASECTION 21
|
||||||
|
|
||||||
// Lexical states for SCLEX_LATEX
|
|
||||||
#define SCE_L_DEFAULT 0
|
#define SCE_L_DEFAULT 0
|
||||||
#define SCE_L_COMMAND 1
|
#define SCE_L_COMMAND 1
|
||||||
#define SCE_L_TAG 2
|
#define SCE_L_TAG 2
|
||||||
#define SCE_L_MATH 3
|
#define SCE_L_MATH 3
|
||||||
#define SCE_L_COMMENT 4
|
#define SCE_L_COMMENT 4
|
||||||
|
#define SCE_LUA_DEFAULT 0
|
||||||
|
#define SCE_LUA_COMMENT 1
|
||||||
|
#define SCE_LUA_COMMENTLINE 2
|
||||||
|
#define SCE_LUA_COMMENTDOC 3
|
||||||
|
#define SCE_LUA_NUMBER 4
|
||||||
|
#define SCE_LUA_WORD 5
|
||||||
|
#define SCE_LUA_STRING 6
|
||||||
|
#define SCE_LUA_CHARACTER 7
|
||||||
|
#define SCE_LUA_LITERALSTRING 8
|
||||||
|
#define SCE_LUA_PREPROCESSOR 9
|
||||||
|
#define SCE_LUA_OPERATOR 10
|
||||||
|
#define SCE_LUA_IDENTIFIER 11
|
||||||
|
#define SCE_LUA_STRINGEOL 12
|
||||||
|
#define SCE_ERR_DEFAULT 0
|
||||||
|
#define SCE_ERR_PYTHON 1
|
||||||
|
#define SCE_ERR_GCC 2
|
||||||
|
#define SCE_ERR_MS 3
|
||||||
|
#define SCE_ERR_CMD 4
|
||||||
|
#define SCE_ERR_BORLAND 5
|
||||||
|
#define SCE_ERR_PERL 6
|
||||||
|
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -3,119 +3,74 @@
|
|||||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
|
|
||||||
|
// Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||||
|
// file which contains any comments about the definitions. HFacer.py does the generation.
|
||||||
|
|
||||||
#ifndef SCINTILLA_H
|
#ifndef SCINTILLA_H
|
||||||
#define SCINTILLA_H
|
#define SCINTILLA_H
|
||||||
|
|
||||||
// Compile-time configuration options
|
// Compile-time configuration options
|
||||||
#define MACRO_SUPPORT 1 // Comment out to remove macro hooks
|
#define MACRO_SUPPORT 1 // Comment out to remove macro hooks
|
||||||
|
|
||||||
#if PLAT_GTK
|
#if PLAT_WIN
|
||||||
#include <gdk/gdk.h>
|
#ifdef STATIC_BUILD
|
||||||
#include <gtk/gtkvbox.h>
|
void Scintilla_RegisterClasses(HINSTANCE hInstance);
|
||||||
|
#endif
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject)
|
typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam);
|
||||||
#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAS T (klass, scintilla_get_type (), ScintillaClass)
|
|
||||||
#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ())
|
|
||||||
|
|
||||||
typedef struct _ScintillaObject ScintillaObject;
|
//++Autogenerated -- start of section automatically generated from Scintilla.iface
|
||||||
typedef struct _ScintillaClass ScintillaClass;
|
#define INVALID_POSITION -1
|
||||||
|
|
||||||
struct _ScintillaObject
|
|
||||||
{
|
|
||||||
GtkFixed vbox;
|
|
||||||
void *pscin;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _ScintillaClass
|
|
||||||
{
|
|
||||||
GtkFixedClass parent_class;
|
|
||||||
|
|
||||||
void (* command) (ScintillaObject *ttt);
|
|
||||||
void (* notify) (ScintillaObject *ttt);
|
|
||||||
};
|
|
||||||
|
|
||||||
guint scintilla_get_type (void);
|
|
||||||
GtkWidget* scintilla_new (void);
|
|
||||||
void scintilla_set_id (ScintillaObject *sci,int id);
|
|
||||||
long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam);
|
|
||||||
|
|
||||||
#include "WinDefs.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if PLAT_WX
|
|
||||||
#include "WinDefs.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Both GTK and Windows
|
|
||||||
|
|
||||||
#define INVALID_POSITION -1
|
|
||||||
|
|
||||||
// Define start of Scintilla messages to be greater than all edit (EM_*) messages
|
|
||||||
// as many EM_ messages can be used.
|
|
||||||
#define SCI_START 2000
|
#define SCI_START 2000
|
||||||
#define SCI_OPTIONAL_START 3000
|
#define SCI_OPTIONAL_START 3000
|
||||||
#define SCI_LEXER_START 4000
|
#define SCI_LEXER_START 4000
|
||||||
|
#define SCI_ADDTEXT 2001
|
||||||
#define SCI_ADDTEXT SCI_START + 1
|
#define SCI_ADDSTYLEDTEXT 2002
|
||||||
#define SCI_ADDSTYLEDTEXT SCI_START + 2
|
#define SCI_INSERTTEXT 2003
|
||||||
#define SCI_INSERTTEXT SCI_START + 3
|
#define SCI_CLEARALL 2004
|
||||||
#define SCI_CLEARALL SCI_START + 4
|
#define SCI_CLEARDOCUMENTSTYLE 2005
|
||||||
#define SCI_GETLENGTH SCI_START + 6
|
#define SCI_GETLENGTH 2006
|
||||||
#define SCI_GETCHARAT SCI_START + 7
|
#define SCI_GETCHARAT 2007
|
||||||
#define SCI_GETCURRENTPOS SCI_START + 8
|
#define SCI_GETCURRENTPOS 2008
|
||||||
#define SCI_GETANCHOR SCI_START + 9
|
#define SCI_GETANCHOR 2009
|
||||||
#define SCI_GETSTYLEAT SCI_START + 10
|
#define SCI_GETSTYLEAT 2010
|
||||||
|
#define SCI_REDO 2011
|
||||||
#define SCI_REDO SCI_START + 11
|
#define SCI_SETUNDOCOLLECTION 2012
|
||||||
#define SCI_SETUNDOCOLLECTION SCI_START + 12
|
#define SCI_SELECTALL 2013
|
||||||
#define SCI_SELECTALL SCI_START + 13
|
#define SCI_SETSAVEPOINT 2014
|
||||||
#define SCI_SETSAVEPOINT SCI_START + 14
|
#define SCI_GETSTYLEDTEXT 2015
|
||||||
#define SCI_GETSTYLEDTEXT SCI_START + 15
|
#define SCI_CANREDO 2016
|
||||||
#define SCI_CANREDO SCI_START + 16
|
#define SCI_MARKERLINEFROMHANDLE 2017
|
||||||
#define SCI_MARKERLINEFROMHANDLE SCI_START + 17
|
#define SCI_MARKERDELETEHANDLE 2018
|
||||||
#define SCI_MARKERDELETEHANDLE SCI_START + 18
|
#define SCI_GETUNDOCOLLECTION 2019
|
||||||
|
#define SCWS_INVISIBLE 0
|
||||||
#define SC_UNDOCOLLECT_NONE 0
|
#define SCWS_VISIBLEALWAYS 1
|
||||||
#define SC_UNDOCOLLECT_AUTOSTART 1
|
#define SCWS_VISIBLEAFTERINDENT 2
|
||||||
|
#define SCI_GETVIEWWS 2020
|
||||||
#define SCI_GETVIEWWS SCI_START + 20
|
#define SCI_SETVIEWWS 2021
|
||||||
#define SCI_SETVIEWWS SCI_START + 21
|
#define SCI_POSITIONFROMPOINT 2022
|
||||||
#define SCI_GOTOLINE SCI_START + 24
|
#define SCI_GOTOLINE 2024
|
||||||
#define SCI_GOTOPOS SCI_START + 25
|
#define SCI_GOTOPOS 2025
|
||||||
#define SCI_SETANCHOR SCI_START + 26
|
#define SCI_SETANCHOR 2026
|
||||||
#define SCI_GETCURLINE SCI_START + 27
|
#define SCI_GETCURLINE 2027
|
||||||
#define SCI_GETENDSTYLED SCI_START + 28
|
#define SCI_GETENDSTYLED 2028
|
||||||
#define SCI_CONVERTEOLS SCI_START + 29
|
#define SCI_CONVERTEOLS 2029
|
||||||
|
|
||||||
#define SCI_GETEOLMODE SCI_START + 30
|
|
||||||
#define SCI_SETEOLMODE SCI_START + 31
|
|
||||||
|
|
||||||
#define SC_EOL_CRLF 0
|
#define SC_EOL_CRLF 0
|
||||||
#define SC_EOL_CR 1
|
#define SC_EOL_CR 1
|
||||||
#define SC_EOL_LF 2
|
#define SC_EOL_LF 2
|
||||||
|
#define SCI_GETEOLMODE 2030
|
||||||
#define SCI_STARTSTYLING SCI_START + 32
|
#define SCI_SETEOLMODE 2031
|
||||||
#define SCI_SETSTYLING SCI_START + 33
|
#define SCI_STARTSTYLING 2032
|
||||||
|
#define SCI_SETSTYLING 2033
|
||||||
// This is the same value as CP_UTF8 in Windows
|
#define SCI_GETBUFFEREDDRAW 2034
|
||||||
|
#define SCI_SETBUFFEREDDRAW 2035
|
||||||
|
#define SCI_SETTABWIDTH 2036
|
||||||
|
#define SCI_GETTABWIDTH 2121
|
||||||
#define SC_CP_UTF8 65001
|
#define SC_CP_UTF8 65001
|
||||||
|
#define SCI_SETCODEPAGE 2037
|
||||||
#define SCI_SETBUFFEREDDRAW SCI_START + 35
|
#define SCI_SETUSEPALETTE 2039
|
||||||
#define SCI_SETTABWIDTH SCI_START + 36
|
|
||||||
#define SCI_SETCODEPAGE SCI_START + 37
|
|
||||||
#define SCI_SETUSEPALETTE SCI_START + 39
|
|
||||||
|
|
||||||
#define MARKER_MAX 31
|
#define MARKER_MAX 31
|
||||||
|
|
||||||
#define SC_MARK_CIRCLE 0
|
#define SC_MARK_CIRCLE 0
|
||||||
#define SC_MARK_ROUNDRECT 1
|
#define SC_MARK_ROUNDRECT 1
|
||||||
#define SC_MARK_ARROW 2
|
#define SC_MARK_ARROW 2
|
||||||
@@ -125,255 +80,296 @@ extern "C" {
|
|||||||
#define SC_MARK_ARROWDOWN 6
|
#define SC_MARK_ARROWDOWN 6
|
||||||
#define SC_MARK_MINUS 7
|
#define SC_MARK_MINUS 7
|
||||||
#define SC_MARK_PLUS 8
|
#define SC_MARK_PLUS 8
|
||||||
|
|
||||||
#define SCI_MARKERDEFINE SCI_START + 40
|
|
||||||
#define SCI_MARKERSETFORE SCI_START + 41
|
|
||||||
#define SCI_MARKERSETBACK SCI_START + 42
|
|
||||||
#define SCI_MARKERADD SCI_START + 43
|
|
||||||
#define SCI_MARKERDELETE SCI_START + 44
|
|
||||||
#define SCI_MARKERDELETEALL SCI_START + 45
|
|
||||||
#define SCI_MARKERGET SCI_START + 46
|
|
||||||
#define SCI_MARKERNEXT SCI_START + 47
|
|
||||||
#define SCI_MARKERPREVIOUS SCI_START + 48
|
|
||||||
|
|
||||||
#define SC_MARKNUM_FOLDER 30
|
#define SC_MARKNUM_FOLDER 30
|
||||||
#define SC_MARKNUM_FOLDEROPEN 31
|
#define SC_MARKNUM_FOLDEROPEN 31
|
||||||
|
#define SCI_MARKERDEFINE 2040
|
||||||
#define SC_MASK_FOLDERS ((1<<SC_MARKNUM_FOLDER) | (1<<SC_MARKNUM_FOLDEROPEN))
|
#define SCI_MARKERSETFORE 2041
|
||||||
|
#define SCI_MARKERSETBACK 2042
|
||||||
|
#define SCI_MARKERADD 2043
|
||||||
|
#define SCI_MARKERDELETE 2044
|
||||||
|
#define SCI_MARKERDELETEALL 2045
|
||||||
|
#define SCI_MARKERGET 2046
|
||||||
|
#define SCI_MARKERNEXT 2047
|
||||||
|
#define SCI_MARKERPREVIOUS 2048
|
||||||
#define SC_MARGIN_SYMBOL 0
|
#define SC_MARGIN_SYMBOL 0
|
||||||
#define SC_MARGIN_NUMBER 1
|
#define SC_MARGIN_NUMBER 1
|
||||||
|
#define SCI_SETMARGINTYPEN 2240
|
||||||
#define SCI_SETMARGINTYPEN SCI_START + 240
|
#define SCI_GETMARGINTYPEN 2241
|
||||||
#define SCI_GETMARGINTYPEN SCI_START + 241
|
#define SCI_SETMARGINWIDTHN 2242
|
||||||
#define SCI_SETMARGINWIDTHN SCI_START + 242
|
#define SCI_GETMARGINWIDTHN 2243
|
||||||
#define SCI_GETMARGINWIDTHN SCI_START + 243
|
#define SCI_SETMARGINMASKN 2244
|
||||||
#define SCI_SETMARGINMASKN SCI_START + 244
|
#define SCI_GETMARGINMASKN 2245
|
||||||
#define SCI_GETMARGINMASKN SCI_START + 245
|
#define SCI_SETMARGINSENSITIVEN 2246
|
||||||
#define SCI_SETMARGINSENSITIVEN SCI_START + 246
|
#define SCI_GETMARGINSENSITIVEN 2247
|
||||||
#define SCI_GETMARGINSENSITIVEN SCI_START + 247
|
|
||||||
|
|
||||||
#define STYLE_DEFAULT 32
|
#define STYLE_DEFAULT 32
|
||||||
#define STYLE_LINENUMBER 33
|
#define STYLE_LINENUMBER 33
|
||||||
#define STYLE_BRACELIGHT 34
|
#define STYLE_BRACELIGHT 34
|
||||||
#define STYLE_BRACEBAD 35
|
#define STYLE_BRACEBAD 35
|
||||||
#define STYLE_CONTROLCHAR 36
|
#define STYLE_CONTROLCHAR 36
|
||||||
|
#define STYLE_INDENTGUIDE 37
|
||||||
#define STYLE_MAX 127
|
#define STYLE_MAX 127
|
||||||
|
|
||||||
#define SC_CHARSET_ANSI 0
|
#define SC_CHARSET_ANSI 0
|
||||||
#define SC_CHARSET_DEFAULT 1
|
#define SC_CHARSET_DEFAULT 1
|
||||||
|
#define SC_CHARSET_BALTIC 186
|
||||||
|
#define SC_CHARSET_CHINESEBIG5 136
|
||||||
|
#define SC_CHARSET_EASTEUROPE 238
|
||||||
|
#define SC_CHARSET_GB2312 134
|
||||||
|
#define SC_CHARSET_GREEK 161
|
||||||
|
#define SC_CHARSET_HANGUL 129
|
||||||
|
#define SC_CHARSET_MAC 77
|
||||||
|
#define SC_CHARSET_OEM 255
|
||||||
#define SC_CHARSET_RUSSIAN 204
|
#define SC_CHARSET_RUSSIAN 204
|
||||||
|
#define SC_CHARSET_SHIFTJIS 128
|
||||||
#define SCI_STYLECLEARALL SCI_START + 50
|
#define SC_CHARSET_SYMBOL 2
|
||||||
#define SCI_STYLESETFORE SCI_START + 51
|
#define SC_CHARSET_TURKISH 162
|
||||||
#define SCI_STYLESETBACK SCI_START + 52
|
#define SC_CHARSET_JOHAB 130
|
||||||
#define SCI_STYLESETBOLD SCI_START + 53
|
#define SC_CHARSET_HEBREW 177
|
||||||
#define SCI_STYLESETITALIC SCI_START + 54
|
#define SC_CHARSET_ARABIC 178
|
||||||
#define SCI_STYLESETSIZE SCI_START + 55
|
#define SC_CHARSET_VIETNAMESE 163
|
||||||
#define SCI_STYLESETFONT SCI_START + 56
|
#define SC_CHARSET_THAI 222
|
||||||
#define SCI_STYLESETEOLFILLED SCI_START + 57
|
#define SCI_STYLECLEARALL 2050
|
||||||
#define SCI_STYLERESETDEFAULT SCI_START + 58
|
#define SCI_STYLESETFORE 2051
|
||||||
#define SCI_STYLESETUNDERLINE SCI_START + 59
|
#define SCI_STYLESETBACK 2052
|
||||||
#define SCI_STYLESETCHARACTERSET SCI_START + 66
|
#define SCI_STYLESETBOLD 2053
|
||||||
|
#define SCI_STYLESETITALIC 2054
|
||||||
#define SCI_SETSELFORE SCI_START + 67
|
#define SCI_STYLESETSIZE 2055
|
||||||
#define SCI_SETSELBACK SCI_START + 68
|
#define SCI_STYLESETFONT 2056
|
||||||
#define SCI_SETCARETFORE SCI_START + 69
|
#define SCI_STYLESETEOLFILLED 2057
|
||||||
|
#define SCI_STYLERESETDEFAULT 2058
|
||||||
#define SCI_ASSIGNCMDKEY SCI_START + 70
|
#define SCI_STYLESETUNDERLINE 2059
|
||||||
#define SCI_CLEARCMDKEY SCI_START + 71
|
#define SCI_STYLESETCHARACTERSET 2066
|
||||||
#define SCI_CLEARALLCMDKEYS SCI_START + 72
|
#define SCI_SETSELFORE 2067
|
||||||
|
#define SCI_SETSELBACK 2068
|
||||||
#define SCI_SETSTYLINGEX SCI_START + 73
|
#define SCI_SETCARETFORE 2069
|
||||||
|
#define SCI_ASSIGNCMDKEY 2070
|
||||||
#define SCI_GETCARETPERIOD SCI_START + 75
|
#define SCI_CLEARCMDKEY 2071
|
||||||
#define SCI_SETCARETPERIOD SCI_START + 76
|
#define SCI_CLEARALLCMDKEYS 2072
|
||||||
#define SCI_SETWORDCHARS SCI_START + 77
|
#define SCI_SETSTYLINGEX 2073
|
||||||
|
#define SCI_STYLESETVISIBLE 2074
|
||||||
#define SCI_BEGINUNDOACTION SCI_START + 78
|
#define SCI_GETCARETPERIOD 2075
|
||||||
#define SCI_ENDUNDOACTION SCI_START + 79
|
#define SCI_SETCARETPERIOD 2076
|
||||||
|
#define SCI_SETWORDCHARS 2077
|
||||||
|
#define SCI_BEGINUNDOACTION 2078
|
||||||
|
#define SCI_ENDUNDOACTION 2079
|
||||||
#define INDIC_MAX 7
|
#define INDIC_MAX 7
|
||||||
|
|
||||||
#define INDIC_PLAIN 0
|
#define INDIC_PLAIN 0
|
||||||
#define INDIC_SQUIGGLE 1
|
#define INDIC_SQUIGGLE 1
|
||||||
#define INDIC_TT 2
|
#define INDIC_TT 2
|
||||||
#define INDIC_DIAGONAL 3
|
#define INDIC_DIAGONAL 3
|
||||||
#define INDIC_STRIKE 4
|
#define INDIC_STRIKE 4
|
||||||
|
|
||||||
#define INDIC0_MASK 32
|
#define INDIC0_MASK 32
|
||||||
#define INDIC1_MASK 64
|
#define INDIC1_MASK 64
|
||||||
#define INDIC2_MASK 128
|
#define INDIC2_MASK 128
|
||||||
#define INDICS_MASK (INDIC0_MASK | INDIC1_MASK | INDIC2_MASK)
|
#define INDICS_MASK INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
|
||||||
|
#define SCI_INDICSETSTYLE 2080
|
||||||
#define SCI_INDICSETSTYLE SCI_START + 80
|
#define SCI_INDICGETSTYLE 2081
|
||||||
#define SCI_INDICGETSTYLE SCI_START + 81
|
#define SCI_INDICSETFORE 2082
|
||||||
#define SCI_INDICSETFORE SCI_START + 82
|
#define SCI_INDICGETFORE 2083
|
||||||
#define SCI_INDICGETFORE SCI_START + 83
|
#define SCI_SETSTYLEBITS 2090
|
||||||
|
#define SCI_GETSTYLEBITS 2091
|
||||||
#define SCI_SETSTYLEBITS SCI_START + 90
|
#define SCI_SETLINESTATE 2092
|
||||||
#define SCI_GETSTYLEBITS SCI_START + 91
|
#define SCI_GETLINESTATE 2093
|
||||||
#define SCI_SETLINESTATE SCI_START + 92
|
#define SCI_GETMAXLINESTATE 2094
|
||||||
#define SCI_GETLINESTATE SCI_START + 93
|
#define SCI_AUTOCSHOW 2100
|
||||||
#define SCI_GETMAXLINESTATE SCI_START + 94
|
#define SCI_AUTOCCANCEL 2101
|
||||||
|
#define SCI_AUTOCACTIVE 2102
|
||||||
#define SCI_AUTOCSHOW SCI_START + 100
|
#define SCI_AUTOCPOSSTART 2103
|
||||||
#define SCI_AUTOCCANCEL SCI_START + 101
|
#define SCI_AUTOCCOMPLETE 2104
|
||||||
#define SCI_AUTOCACTIVE SCI_START + 102
|
#define SCI_AUTOCSTOPS 2105
|
||||||
#define SCI_AUTOCPOSSTART SCI_START + 103
|
#define SCI_AUTOCSETSEPARATOR 2106
|
||||||
#define SCI_AUTOCCOMPLETE SCI_START + 104
|
#define SCI_AUTOCGETSEPARATOR 2107
|
||||||
#define SCI_AUTOCSTOPS SCI_START + 105
|
#define SCI_AUTOCSELECT 2108
|
||||||
#define SCI_AUTOCSETSEPARATOR SCI_START + 106
|
#define SCI_AUTOCSETCANCELATSTART 2110
|
||||||
#define SCI_AUTOCGETSEPARATOR SCI_START + 107
|
#define SCI_AUTOCGETCANCELATSTART 2111
|
||||||
#define SCI_AUTOCSELECT SCI_START + 108
|
#define SCI_AUTOCSETFILLUPS 2112
|
||||||
|
#define SCI_AUTOCSETCHOOSESINGLE 2113
|
||||||
#define SCI_GETTABWIDTH SCI_START + 121
|
#define SCI_AUTOCGETCHOOSESINGLE 2114
|
||||||
#define SCI_SETINDENT SCI_START + 122
|
#define SCI_AUTOCSETIGNORECASE 2115
|
||||||
#define SCI_GETINDENT SCI_START + 123
|
#define SCI_AUTOCGETIGNORECASE 2116
|
||||||
#define SCI_SETUSETABS SCI_START + 124
|
#define SCI_SETINDENT 2122
|
||||||
#define SCI_GETUSETABS SCI_START + 125
|
#define SCI_GETINDENT 2123
|
||||||
#define SCI_SETLINEINDENTATION SCI_START + 126
|
#define SCI_SETUSETABS 2124
|
||||||
#define SCI_GETLINEINDENTATION SCI_START + 127
|
#define SCI_GETUSETABS 2125
|
||||||
#define SCI_GETLINEINDENTPOSITION SCI_START + 128
|
#define SCI_SETLINEINDENTATION 2126
|
||||||
|
#define SCI_GETLINEINDENTATION 2127
|
||||||
#define SCI_SETHSCROLLBAR SCI_START + 130
|
#define SCI_GETLINEINDENTPOSITION 2128
|
||||||
#define SCI_GETHSCROLLBAR SCI_START + 131
|
#define SCI_GETCOLUMN 2129
|
||||||
|
#define SCI_SETHSCROLLBAR 2130
|
||||||
#define SCI_CALLTIPSHOW SCI_START + 200
|
#define SCI_GETHSCROLLBAR 2131
|
||||||
#define SCI_CALLTIPCANCEL SCI_START + 201
|
#define SCI_SETINDENTATIONGUIDES 2132
|
||||||
#define SCI_CALLTIPACTIVE SCI_START + 202
|
#define SCI_GETINDENTATIONGUIDES 2133
|
||||||
#define SCI_CALLTIPPOSSTART SCI_START + 203
|
#define SCI_SETHIGHLIGHTGUIDE 2134
|
||||||
#define SCI_CALLTIPSETHLT SCI_START + 204
|
#define SCI_GETHIGHLIGHTGUIDE 2135
|
||||||
#define SCI_CALLTIPSETBACK SCI_START + 205
|
#define SCI_GETLINEENDPOSITION 2136
|
||||||
|
#define SCI_GETCODEPAGE 2137
|
||||||
|
#define SCI_GETCARETFORE 2138
|
||||||
|
#define SCI_GETUSEPALETTE 2139
|
||||||
|
#define SCI_GETREADONLY 2140
|
||||||
|
#define SCI_SETCURRENTPOS 2141
|
||||||
|
#define SCI_SETSELECTIONSTART 2142
|
||||||
|
#define SCI_GETSELECTIONSTART 2143
|
||||||
|
#define SCI_SETSELECTIONEND 2144
|
||||||
|
#define SCI_GETSELECTIONEND 2145
|
||||||
|
#define SCI_SETPRINTMAGNIFICATION 2146
|
||||||
|
#define SCI_GETPRINTMAGNIFICATION 2147
|
||||||
|
#define SC_PRINT_NORMAL 0
|
||||||
|
#define SC_PRINT_INVERTLIGHT 1
|
||||||
|
#define SC_PRINT_BLACKONWHITE 2
|
||||||
|
#define SCI_SETPRINTCOLOURMODE 2148
|
||||||
|
#define SCI_GETPRINTCOLOURMODE 2149
|
||||||
|
#define SCFIND_DOWN 1
|
||||||
|
#define SCFIND_WHOLEWORD 2
|
||||||
|
#define SCFIND_MATCHCASE 4
|
||||||
|
#define SCFIND_WORDSTART 0x00100000
|
||||||
|
#define SCFIND_REGEXP 0x00200000
|
||||||
|
#define SCI_FINDTEXT 2150
|
||||||
|
#define SCI_FORMATRANGE 2151
|
||||||
|
#define SCI_GETFIRSTVISIBLELINE 2152
|
||||||
|
#define SCI_GETLINE 2153
|
||||||
|
#define SCI_GETLINECOUNT 2154
|
||||||
|
#define SCI_SETMARGINLEFT 2155
|
||||||
|
#define SCI_GETMARGINLEFT 2156
|
||||||
|
#define SCI_SETMARGINRIGHT 2157
|
||||||
|
#define SCI_GETMARGINRIGHT 2158
|
||||||
|
#define SCI_GETMODIFY 2159
|
||||||
|
#define SCI_SETSEL 2160
|
||||||
|
#define SCI_GETSELTEXT 2161
|
||||||
|
#define SCI_GETTEXTRANGE 2162
|
||||||
|
#define SCI_HIDESELECTION 2163
|
||||||
|
#define SCI_POINTXFROMPOSITION 2164
|
||||||
|
#define SCI_POINTYFROMPOSITION 2165
|
||||||
|
#define SCI_LINEFROMPOSITION 2166
|
||||||
|
#define SCI_POSITIONFROMLINE 2167
|
||||||
|
#define SCI_LINESCROLL 2168
|
||||||
|
#define SCI_SCROLLCARET 2169
|
||||||
|
#define SCI_REPLACESEL 2170
|
||||||
|
#define SCI_SETREADONLY 2171
|
||||||
|
#define SCI_NULL 2172
|
||||||
|
#define SCI_CANPASTE 2173
|
||||||
|
#define SCI_CANUNDO 2174
|
||||||
|
#define SCI_EMPTYUNDOBUFFER 2175
|
||||||
|
#define SCI_UNDO 2176
|
||||||
|
#define SCI_CUT 2177
|
||||||
|
#define SCI_COPY 2178
|
||||||
|
#define SCI_PASTE 2179
|
||||||
|
#define SCI_CLEAR 2180
|
||||||
|
#define SCI_SETTEXT 2181
|
||||||
|
#define SCI_GETTEXT 2182
|
||||||
|
#define SCI_GETTEXTLENGTH 2183
|
||||||
|
#define SCI_GETDIRECTFUNCTION 2184
|
||||||
|
#define SCI_GETDIRECTPOINTER 2185
|
||||||
|
#define SCI_SETOVERTYPE 2186
|
||||||
|
#define SCI_GETOVERTYPE 2187
|
||||||
|
#define SCI_CALLTIPSHOW 2200
|
||||||
|
#define SCI_CALLTIPCANCEL 2201
|
||||||
|
#define SCI_CALLTIPACTIVE 2202
|
||||||
|
#define SCI_CALLTIPPOSSTART 2203
|
||||||
|
#define SCI_CALLTIPSETHLT 2204
|
||||||
|
#define SCI_CALLTIPSETBACK 2205
|
||||||
|
#define SCI_VISIBLEFROMDOCLINE 2220
|
||||||
|
#define SCI_DOCLINEFROMVISIBLE 2221
|
||||||
#define SC_FOLDLEVELBASE 0x400
|
#define SC_FOLDLEVELBASE 0x400
|
||||||
#define SC_FOLDLEVELWHITEFLAG 0x1000
|
#define SC_FOLDLEVELWHITEFLAG 0x1000
|
||||||
#define SC_FOLDLEVELHEADERFLAG 0x2000
|
#define SC_FOLDLEVELHEADERFLAG 0x2000
|
||||||
#define SC_FOLDLEVELNUMBERMASK 0x0FFF
|
#define SC_FOLDLEVELNUMBERMASK 0x0FFF
|
||||||
|
#define SCI_SETFOLDLEVEL 2222
|
||||||
#define SCI_VISIBLEFROMDOCLINE SCI_START + 220
|
#define SCI_GETFOLDLEVEL 2223
|
||||||
#define SCI_DOCLINEFROMVISIBLE SCI_START + 221
|
#define SCI_GETLASTCHILD 2224
|
||||||
#define SCI_SETFOLDLEVEL SCI_START + 222
|
#define SCI_GETFOLDPARENT 2225
|
||||||
#define SCI_GETFOLDLEVEL SCI_START + 223
|
#define SCI_SHOWLINES 2226
|
||||||
#define SCI_GETLASTCHILD SCI_START + 224
|
#define SCI_HIDELINES 2227
|
||||||
#define SCI_GETFOLDPARENT SCI_START + 225
|
#define SCI_GETLINEVISIBLE 2228
|
||||||
#define SCI_SHOWLINES SCI_START + 226
|
#define SCI_SETFOLDEXPANDED 2229
|
||||||
#define SCI_HIDELINES SCI_START + 227
|
#define SCI_GETFOLDEXPANDED 2230
|
||||||
#define SCI_GETLINEVISIBLE SCI_START + 228
|
#define SCI_TOGGLEFOLD 2231
|
||||||
#define SCI_SETFOLDEXPANDED SCI_START + 229
|
#define SCI_ENSUREVISIBLE 2232
|
||||||
#define SCI_GETFOLDEXPANDED SCI_START + 230
|
#define SCI_SETFOLDFLAGS 2233
|
||||||
#define SCI_TOGGLEFOLD SCI_START + 231
|
#define SCI_LINEDOWN 2300
|
||||||
#define SCI_ENSUREVISIBLE SCI_START + 232
|
#define SCI_LINEDOWNEXTEND 2301
|
||||||
#define SCI_SETFOLDFLAGS SCI_START + 233
|
#define SCI_LINEUP 2302
|
||||||
|
#define SCI_LINEUPEXTEND 2303
|
||||||
// Key messages
|
#define SCI_CHARLEFT 2304
|
||||||
#define SCI_LINEDOWN SCI_START + 300
|
#define SCI_CHARLEFTEXTEND 2305
|
||||||
#define SCI_LINEDOWNEXTEND SCI_START + 301
|
#define SCI_CHARRIGHT 2306
|
||||||
#define SCI_LINEUP SCI_START + 302
|
#define SCI_CHARRIGHTEXTEND 2307
|
||||||
#define SCI_LINEUPEXTEND SCI_START + 303
|
#define SCI_WORDLEFT 2308
|
||||||
#define SCI_CHARLEFT SCI_START + 304
|
#define SCI_WORDLEFTEXTEND 2309
|
||||||
#define SCI_CHARLEFTEXTEND SCI_START + 305
|
#define SCI_WORDRIGHT 2310
|
||||||
#define SCI_CHARRIGHT SCI_START + 306
|
#define SCI_WORDRIGHTEXTEND 2311
|
||||||
#define SCI_CHARRIGHTEXTEND SCI_START + 307
|
#define SCI_HOME 2312
|
||||||
#define SCI_WORDLEFT SCI_START + 308
|
#define SCI_HOMEEXTEND 2313
|
||||||
#define SCI_WORDLEFTEXTEND SCI_START + 309
|
#define SCI_LINEEND 2314
|
||||||
#define SCI_WORDRIGHT SCI_START + 310
|
#define SCI_LINEENDEXTEND 2315
|
||||||
#define SCI_WORDRIGHTEXTEND SCI_START + 311
|
#define SCI_DOCUMENTSTART 2316
|
||||||
#define SCI_HOME SCI_START + 312
|
#define SCI_DOCUMENTSTARTEXTEND 2317
|
||||||
#define SCI_HOMEEXTEND SCI_START + 313
|
#define SCI_DOCUMENTEND 2318
|
||||||
#define SCI_LINEEND SCI_START + 314
|
#define SCI_DOCUMENTENDEXTEND 2319
|
||||||
#define SCI_LINEENDEXTEND SCI_START + 315
|
#define SCI_PAGEUP 2320
|
||||||
#define SCI_DOCUMENTSTART SCI_START + 316
|
#define SCI_PAGEUPEXTEND 2321
|
||||||
#define SCI_DOCUMENTSTARTEXTEND SCI_START + 317
|
#define SCI_PAGEDOWN 2322
|
||||||
#define SCI_DOCUMENTEND SCI_START + 318
|
#define SCI_PAGEDOWNEXTEND 2323
|
||||||
#define SCI_DOCUMENTENDEXTEND SCI_START + 319
|
#define SCI_EDITTOGGLEOVERTYPE 2324
|
||||||
#define SCI_PAGEUP SCI_START + 320
|
#define SCI_CANCEL 2325
|
||||||
#define SCI_PAGEUPEXTEND SCI_START + 321
|
#define SCI_DELETEBACK 2326
|
||||||
#define SCI_PAGEDOWN SCI_START + 322
|
#define SCI_TAB 2327
|
||||||
#define SCI_PAGEDOWNEXTEND SCI_START + 323
|
#define SCI_BACKTAB 2328
|
||||||
#define SCI_EDITTOGGLEOVERTYPE SCI_START + 324
|
#define SCI_NEWLINE 2329
|
||||||
#define SCI_CANCEL SCI_START + 325
|
#define SCI_FORMFEED 2330
|
||||||
#define SCI_DELETEBACK SCI_START + 326
|
#define SCI_VCHOME 2331
|
||||||
#define SCI_TAB SCI_START + 327
|
#define SCI_VCHOMEEXTEND 2332
|
||||||
#define SCI_BACKTAB SCI_START + 328
|
#define SCI_ZOOMIN 2333
|
||||||
#define SCI_NEWLINE SCI_START + 329
|
#define SCI_ZOOMOUT 2334
|
||||||
#define SCI_FORMFEED SCI_START + 330
|
#define SCI_DELWORDLEFT 2335
|
||||||
#define SCI_VCHOME SCI_START + 331
|
#define SCI_DELWORDRIGHT 2336
|
||||||
#define SCI_VCHOMEEXTEND SCI_START + 332
|
#define SCI_LINECUT 2337
|
||||||
#define SCI_ZOOMIN SCI_START + 333
|
#define SCI_LINEDELETE 2338
|
||||||
#define SCI_ZOOMOUT SCI_START + 334
|
#define SCI_LINETRANSPOSE 2339
|
||||||
#define SCI_DELWORDLEFT SCI_START + 335
|
#define SCI_LOWERCASE 2340
|
||||||
#define SCI_DELWORDRIGHT SCI_START + 336
|
#define SCI_UPPERCASE 2341
|
||||||
#define SCI_LINECUT SCI_START + 337
|
#define SCI_LINESCROLLDOWN 2342
|
||||||
#define SCI_LINEDELETE SCI_START + 338
|
#define SCI_LINESCROLLUP 2343
|
||||||
#define SCI_LINETRANSPOSE SCI_START + 339
|
#define SCI_LINELENGTH 2350
|
||||||
#define SCI_LOWERCASE SCI_START + 340
|
#define SCI_BRACEHIGHLIGHT 2351
|
||||||
#define SCI_UPPERCASE SCI_START + 341
|
#define SCI_BRACEBADLIGHT 2352
|
||||||
#define SCI_LINESCROLLDOWN SCI_START + 342
|
#define SCI_BRACEMATCH 2353
|
||||||
#define SCI_LINESCROLLUP SCI_START + 343
|
#define SCI_GETVIEWEOL 2355
|
||||||
|
#define SCI_SETVIEWEOL 2356
|
||||||
#define SCI_LINELENGTH SCI_START + 350
|
#define SCI_GETDOCPOINTER 2357
|
||||||
#define SCI_BRACEHIGHLIGHT SCI_START + 351
|
#define SCI_SETDOCPOINTER 2358
|
||||||
#define SCI_BRACEBADLIGHT SCI_START + 352
|
#define SCI_SETMODEVENTMASK 2359
|
||||||
#define SCI_BRACEMATCH SCI_START + 353
|
|
||||||
#define SCI_GETVIEWEOL SCI_START + 355
|
|
||||||
#define SCI_SETVIEWEOL SCI_START + 356
|
|
||||||
#define SCI_GETDOCPOINTER SCI_START + 357
|
|
||||||
#define SCI_SETDOCPOINTER SCI_START + 358
|
|
||||||
#define SCI_SETMODEVENTMASK SCI_START + 359
|
|
||||||
|
|
||||||
#define EDGE_NONE 0
|
#define EDGE_NONE 0
|
||||||
#define EDGE_LINE 1
|
#define EDGE_LINE 1
|
||||||
#define EDGE_BACKGROUND 2
|
#define EDGE_BACKGROUND 2
|
||||||
|
#define SCI_GETEDGECOLUMN 2360
|
||||||
#define SCI_GETEDGECOLUMN SCI_START + 360
|
#define SCI_SETEDGECOLUMN 2361
|
||||||
#define SCI_SETEDGECOLUMN SCI_START + 361
|
#define SCI_GETEDGEMODE 2362
|
||||||
#define SCI_GETEDGEMODE SCI_START + 362
|
#define SCI_SETEDGEMODE 2363
|
||||||
#define SCI_SETEDGEMODE SCI_START + 363
|
#define SCI_GETEDGECOLOUR 2364
|
||||||
#define SCI_GETEDGECOLOUR SCI_START + 364
|
#define SCI_SETEDGECOLOUR 2365
|
||||||
#define SCI_SETEDGECOLOUR SCI_START + 365
|
#define SCI_SEARCHANCHOR 2366
|
||||||
|
#define SCI_SEARCHNEXT 2367
|
||||||
#define SCI_SEARCHANCHOR SCI_START + 366
|
#define SCI_SEARCHPREV 2368
|
||||||
#define SCI_SEARCHNEXT SCI_START + 367
|
#define CARET_SLOP 0x01
|
||||||
#define SCI_SEARCHPREV SCI_START + 368
|
#define CARET_CENTER 0x02
|
||||||
|
#define CARET_STRICT 0x04
|
||||||
#define CARET_SLOP 0x01 // Show caret within N lines of edge when it's scrolled to view
|
#define SCI_SETCARETPOLICY 2369
|
||||||
#define CARET_CENTER 0x02 // Center caret on screen when it's scrolled to view
|
#define SCI_LINESONSCREEN 2370
|
||||||
#define CARET_STRICT 0x04 // OR this with CARET_CENTER to reposition even when visible, or
|
#define SCI_USEPOPUP 2371
|
||||||
// OR this with CARET_SLOP to reposition whenever outside slop border
|
#define SCI_SELECTIONISRECTANGLE 2372
|
||||||
|
#define SCI_SETZOOM 2373
|
||||||
#define SCI_SETCARETPOLICY SCI_START + 369
|
#define SCI_GETZOOM 2374
|
||||||
#define SCI_LINESONSCREEN SCI_START + 370
|
#define SCI_CREATEDOCUMENT 2375
|
||||||
#define SCI_USEPOPUP SCI_START + 371
|
#define SCI_ADDREFDOCUMENT 2376
|
||||||
#define SCI_SELECTIONISRECTANGLE SCI_START + 372
|
#define SCI_RELEASEDOCUMENT 2377
|
||||||
#define SCI_SETZOOM SCI_START + 373
|
#define SCI_GETMODEVENTMASK 2378
|
||||||
#define SCI_GETZOOM SCI_START + 374
|
#define SCI_GRABFOCUS 2400
|
||||||
|
#define SCI_STARTRECORD 3001
|
||||||
#define SCI_ADDREFDOC SCI_START + 375
|
#define SCI_STOPRECORD 3002
|
||||||
#define SCI_RELEASEDOC SCI_START + 376
|
#define SCI_SETLEXER 4001
|
||||||
|
#define SCI_GETLEXER 4002
|
||||||
// GTK+ Specific
|
#define SCI_COLOURISE 4003
|
||||||
#define SCI_GRABFOCUS SCI_START + 400
|
#define SCI_SETPROPERTY 4004
|
||||||
|
#define SCI_SETKEYWORDS 4005
|
||||||
// Optional module for macro recording
|
|
||||||
#ifdef MACRO_SUPPORT
|
|
||||||
typedef void (tMacroRecorder)(UINT iMessage, WPARAM wParam, LPARAM lParam,
|
|
||||||
void *userData);
|
|
||||||
#define SCI_STARTRECORD SCI_OPTIONAL_START + 1
|
|
||||||
#define SCI_STOPRECORD SCI_OPTIONAL_START + 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SCI_SETLEXER SCI_LEXER_START + 1
|
|
||||||
#define SCI_GETLEXER SCI_LEXER_START + 2
|
|
||||||
#define SCI_COLOURISE SCI_LEXER_START + 3
|
|
||||||
#define SCI_SETPROPERTY SCI_LEXER_START + 4
|
|
||||||
#define SCI_SETKEYWORDS SCI_LEXER_START + 5
|
|
||||||
|
|
||||||
// Notifications
|
|
||||||
|
|
||||||
// Type of modification and the action which caused the modification
|
|
||||||
// These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
|
||||||
// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
|
|
||||||
#define SC_MOD_INSERTTEXT 0x1
|
#define SC_MOD_INSERTTEXT 0x1
|
||||||
#define SC_MOD_DELETETEXT 0x2
|
#define SC_MOD_DELETETEXT 0x2
|
||||||
#define SC_MOD_CHANGESTYLE 0x4
|
#define SC_MOD_CHANGESTYLE 0x4
|
||||||
@@ -385,11 +381,98 @@ typedef void (tMacroRecorder)(UINT iMessage, WPARAM wParam, LPARAM lParam,
|
|||||||
#define SC_MOD_CHANGEMARKER 0x200
|
#define SC_MOD_CHANGEMARKER 0x200
|
||||||
#define SC_MOD_BEFOREINSERT 0x400
|
#define SC_MOD_BEFOREINSERT 0x400
|
||||||
#define SC_MOD_BEFOREDELETE 0x800
|
#define SC_MOD_BEFOREDELETE 0x800
|
||||||
|
|
||||||
#define SC_MODEVENTMASKALL 0xF77
|
#define SC_MODEVENTMASKALL 0xF77
|
||||||
|
#define SCEN_CHANGE 768
|
||||||
|
#define SCEN_SETFOCUS 512
|
||||||
|
#define SCEN_KILLFOCUS 256
|
||||||
|
#define SCK_DOWN 300
|
||||||
|
#define SCK_UP 301
|
||||||
|
#define SCK_LEFT 302
|
||||||
|
#define SCK_RIGHT 303
|
||||||
|
#define SCK_HOME 304
|
||||||
|
#define SCK_END 305
|
||||||
|
#define SCK_PRIOR 306
|
||||||
|
#define SCK_NEXT 307
|
||||||
|
#define SCK_DELETE 308
|
||||||
|
#define SCK_INSERT 309
|
||||||
|
#define SCK_ESCAPE 7
|
||||||
|
#define SCK_BACK 8
|
||||||
|
#define SCK_TAB 9
|
||||||
|
#define SCK_RETURN 13
|
||||||
|
#define SCK_ADD 310
|
||||||
|
#define SCK_SUBTRACT 311
|
||||||
|
#define SCK_DIVIDE 312
|
||||||
|
#define SCMOD_SHIFT 1
|
||||||
|
#define SCMOD_CTRL 2
|
||||||
|
#define SCMOD_ALT 4
|
||||||
|
#define SCN_STYLENEEDED 2000
|
||||||
|
#define SCN_CHARADDED 2001
|
||||||
|
#define SCN_SAVEPOINTREACHED 2002
|
||||||
|
#define SCN_SAVEPOINTLEFT 2003
|
||||||
|
#define SCN_MODIFYATTEMPTRO 2004
|
||||||
|
#define SCN_KEY 2005
|
||||||
|
#define SCN_DOUBLECLICK 2006
|
||||||
|
#define SCN_UPDATEUI 2007
|
||||||
|
#define SCN_CHECKBRACE 2007
|
||||||
|
#define SCN_MODIFIED 2008
|
||||||
|
#define SCN_MACRORECORD 2009
|
||||||
|
#define SCN_MARGINCLICK 2010
|
||||||
|
#define SCN_NEEDSHOWN 2011
|
||||||
|
#define SCN_POSCHANGED 2012
|
||||||
|
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||||
|
|
||||||
|
// Optional module for macro recording
|
||||||
|
#ifdef MACRO_SUPPORT
|
||||||
|
typedef void (tMacroRecorder)(unsigned int iMessage, unsigned long wParam,
|
||||||
|
long lParam, void *userData);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// These structures are defined to be exactly the same shape as the Win32
|
||||||
|
// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
|
||||||
|
// So older code that treats Scintilla as a RichEdit will work.
|
||||||
|
|
||||||
|
struct CharacterRange {
|
||||||
|
long cpMin;
|
||||||
|
long cpMax;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TextRange {
|
||||||
|
CharacterRange chrg;
|
||||||
|
char *lpstrText;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TextToFind {
|
||||||
|
CharacterRange chrg;
|
||||||
|
char *lpstrText;
|
||||||
|
CharacterRange chrgText;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef PLATFORM_H
|
||||||
|
|
||||||
|
// This structure is used in printing and requires some of the graphics types
|
||||||
|
// from Platform.h. Not needed by most client code.
|
||||||
|
|
||||||
|
struct RangeToFormat {
|
||||||
|
SurfaceID hdc;
|
||||||
|
SurfaceID hdcTarget;
|
||||||
|
PRectangle rc;
|
||||||
|
PRectangle rcPage;
|
||||||
|
CharacterRange chrg;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct NotifyHeader {
|
||||||
|
// hwndFrom is really an environment specifc window handle or pointer
|
||||||
|
// but most clients of Scintilla.h do not have this type visible.
|
||||||
|
//WindowID hwndFrom;
|
||||||
|
void *hwndFrom;
|
||||||
|
unsigned int idFrom;
|
||||||
|
unsigned int code;
|
||||||
|
};
|
||||||
|
|
||||||
struct SCNotification {
|
struct SCNotification {
|
||||||
NMHDR nmhdr;
|
NotifyHeader nmhdr;
|
||||||
int position; // SCN_STYLENEEDED, SCN_MODIFIED
|
int position; // SCN_STYLENEEDED, SCN_MODIFIED
|
||||||
int ch; // SCN_CHARADDED, SCN_KEY
|
int ch; // SCN_CHARADDED, SCN_KEY
|
||||||
int modifiers; // SCN_KEY
|
int modifiers; // SCN_KEY
|
||||||
@@ -408,28 +491,7 @@ struct SCNotification {
|
|||||||
int margin; // SCN_MARGINCLICK
|
int margin; // SCN_MARGINCLICK
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SCN_STYLENEEDED 2000
|
#define SC_MASK_FOLDERS ((1<<SC_MARKNUM_FOLDER) | (1<<SC_MARKNUM_FOLDEROPEN))
|
||||||
#define SCN_CHARADDED 2001
|
|
||||||
#define SCN_SAVEPOINTREACHED 2002
|
|
||||||
#define SCN_SAVEPOINTLEFT 2003
|
|
||||||
#define SCN_MODIFYATTEMPTRO 2004
|
|
||||||
// GTK+ Specific to work around focus and accelerator problems:
|
|
||||||
#define SCN_KEY 2005
|
|
||||||
#define SCN_DOUBLECLICK 2006
|
|
||||||
#define SCN_UPDATEUI 2007
|
|
||||||
// The old name for SCN_UPDATEUI:
|
|
||||||
#define SCN_CHECKBRACE 2007
|
|
||||||
#define SCN_MODIFIED 2008
|
|
||||||
// Optional module for macro recording
|
|
||||||
#ifdef MACRO_SUPPORT
|
|
||||||
#define SCN_MACRORECORD 2009
|
|
||||||
#endif
|
|
||||||
#define SCN_MARGINCLICK 2010
|
|
||||||
#define SCN_NEEDSHOWN 2011
|
|
||||||
|
|
||||||
#ifdef STATIC_BUILD
|
|
||||||
void Scintilla_RegisterClasses(HINSTANCE hInstance);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Deprecation section listing all API features that are deprecated and will
|
// Deprecation section listing all API features that are deprecated and will
|
||||||
// will be removed completely in a future version.
|
// will be removed completely in a future version.
|
||||||
@@ -437,23 +499,9 @@ void Scintilla_RegisterClasses(HINSTANCE hInstance);
|
|||||||
|
|
||||||
#ifdef INCLUDE_DEPRECATED_FEATURES
|
#ifdef INCLUDE_DEPRECATED_FEATURES
|
||||||
|
|
||||||
#define SCI_CHANGEPOSITION SCI_START + 22
|
// Deprecated in 1.27
|
||||||
|
#define SC_UNDOCOLLECT_NONE 0
|
||||||
// Default style settings. These are deprecated and will be removed in a future version.
|
#define SC_UNDOCOLLECT_AUTOSTART 1
|
||||||
#define SCI_SETFORE SCI_START + 60
|
|
||||||
#define SCI_SETBACK SCI_START + 61
|
|
||||||
#define SCI_SETBOLD SCI_START + 62
|
|
||||||
#define SCI_SETITALIC SCI_START + 63
|
|
||||||
#define SCI_SETSIZE SCI_START + 64
|
|
||||||
#define SCI_SETFONT SCI_START + 65
|
|
||||||
|
|
||||||
#define SCI_APPENDUNDOSTARTACTION SCI_START + 74
|
|
||||||
|
|
||||||
#define SC_UNDOCOLLECT_MANUALSTART 2
|
|
||||||
|
|
||||||
// Deprecated in release 1.22
|
|
||||||
#define SCI_SETMARGINWIDTH SCI_START + 34
|
|
||||||
#define SCI_SETLINENUMBERWIDTH SCI_START + 38
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
1452
contrib/src/stc/scintilla/include/Scintilla.iface
Normal file
1452
contrib/src/stc/scintilla/include/Scintilla.iface
Normal file
File diff suppressed because it is too large
Load Diff
46
contrib/src/stc/scintilla/include/ScintillaWidget.h
Normal file
46
contrib/src/stc/scintilla/include/ScintillaWidget.h
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
// Scintilla source code edit control
|
||||||
|
// ScintillaWidget.h - definition of Scintilla widget for GTK+
|
||||||
|
// Only needed by GTK+ code but is harmless on other platforms.
|
||||||
|
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||||
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
|
|
||||||
|
#ifndef SCINTILLAWIDGET_H
|
||||||
|
#define SCINTILLAWIDGET_H
|
||||||
|
|
||||||
|
#if PLAT_GTK
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject)
|
||||||
|
#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
|
||||||
|
#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ())
|
||||||
|
|
||||||
|
typedef struct _ScintillaObject ScintillaObject;
|
||||||
|
typedef struct _ScintillaClass ScintillaClass;
|
||||||
|
|
||||||
|
struct _ScintillaObject {
|
||||||
|
GtkFixed vbox;
|
||||||
|
void *pscin;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _ScintillaClass {
|
||||||
|
GtkFixedClass parent_class;
|
||||||
|
|
||||||
|
void (* command) (ScintillaObject *ttt);
|
||||||
|
void (* notify) (ScintillaObject *ttt);
|
||||||
|
};
|
||||||
|
|
||||||
|
guint scintilla_get_type (void);
|
||||||
|
GtkWidget* scintilla_new (void);
|
||||||
|
void scintilla_set_id (ScintillaObject *sci,int id);
|
||||||
|
long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@@ -16,6 +16,7 @@
|
|||||||
#define LPSTR char *
|
#define LPSTR char *
|
||||||
#define LONG long
|
#define LONG long
|
||||||
|
|
||||||
|
//#if 0
|
||||||
/* RTF control */
|
/* RTF control */
|
||||||
#define EM_CANPASTE (1074)
|
#define EM_CANPASTE (1074)
|
||||||
#define EM_CANUNDO (198)
|
#define EM_CANUNDO (198)
|
||||||
@@ -52,12 +53,10 @@
|
|||||||
|
|
||||||
#define WM_NULL (0)
|
#define WM_NULL (0)
|
||||||
#define WM_CLEAR (771)
|
#define WM_CLEAR (771)
|
||||||
#define WM_COMMAND (273)
|
|
||||||
#define WM_COPY (769)
|
#define WM_COPY (769)
|
||||||
#define WM_CUT (768)
|
#define WM_CUT (768)
|
||||||
#define WM_GETTEXT (13)
|
#define WM_GETTEXT (13)
|
||||||
#define WM_GETTEXTLENGTH (14)
|
#define WM_GETTEXTLENGTH (14)
|
||||||
#define WM_NOTIFY (78)
|
|
||||||
#define WM_PASTE (770)
|
#define WM_PASTE (770)
|
||||||
#define WM_SETTEXT (12)
|
#define WM_SETTEXT (12)
|
||||||
#define WM_UNDO (772)
|
#define WM_UNDO (772)
|
||||||
@@ -70,6 +69,9 @@
|
|||||||
#define EC_RIGHTMARGIN 2
|
#define EC_RIGHTMARGIN 2
|
||||||
#define EC_USEFONTINFO 0xffff
|
#define EC_USEFONTINFO 0xffff
|
||||||
|
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
#if PLAT_GTK
|
#if PLAT_GTK
|
||||||
#define VK_DOWN GDK_Down
|
#define VK_DOWN GDK_Down
|
||||||
#define VK_UP GDK_Up
|
#define VK_UP GDK_Up
|
||||||
@@ -109,12 +111,16 @@
|
|||||||
#define VK_SUBTRACT WXK_SUBTRACT
|
#define VK_SUBTRACT WXK_SUBTRACT
|
||||||
//TODO:
|
//TODO:
|
||||||
#define VK_DIVIDE WXK_DIVIDE
|
#define VK_DIVIDE WXK_DIVIDE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SHIFT_PRESSED 1
|
||||||
|
#define LEFT_CTRL_PRESSED 2
|
||||||
|
#define LEFT_ALT_PRESSED 4
|
||||||
|
|
||||||
// Are these needed any more
|
// Are these needed any more
|
||||||
#define LPSTR char *
|
#define LPSTR char *
|
||||||
#define LONG long
|
#define LONG long
|
||||||
#define LPDWORD (long *)
|
#define LPDWORD (long *)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* SELCHANGE structure */
|
/* SELCHANGE structure */
|
||||||
#define SEL_EMPTY (0)
|
#define SEL_EMPTY (0)
|
||||||
@@ -123,15 +129,6 @@
|
|||||||
#define SEL_MULTICHAR (4)
|
#define SEL_MULTICHAR (4)
|
||||||
#define SEL_MULTIOBJECT (8)
|
#define SEL_MULTIOBJECT (8)
|
||||||
|
|
||||||
/* FINDREPLACE structure */
|
|
||||||
#define FR_MATCHCASE (0x4)
|
|
||||||
#define FR_WHOLEWORD (0x2)
|
|
||||||
#define FR_DOWN (0x1)
|
|
||||||
|
|
||||||
#define SHIFT_PRESSED 1
|
|
||||||
#define LEFT_CTRL_PRESSED 2
|
|
||||||
#define LEFT_ALT_PRESSED 4
|
|
||||||
|
|
||||||
struct RECT {
|
struct RECT {
|
||||||
LONG left;
|
LONG left;
|
||||||
LONG top;
|
LONG top;
|
||||||
@@ -139,6 +136,15 @@ struct RECT {
|
|||||||
LONG bottom;
|
LONG bottom;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* FINDREPLACE structure */
|
||||||
|
|
||||||
|
#define FR_MATCHCASE (0x4)
|
||||||
|
#define FR_WHOLEWORD (0x2)
|
||||||
|
#define FR_DOWN (0x1)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
struct CHARRANGE {
|
struct CHARRANGE {
|
||||||
LONG cpMin;
|
LONG cpMin;
|
||||||
LONG cpMax;
|
LONG cpMax;
|
||||||
@@ -168,9 +174,10 @@ struct FORMATRANGE {
|
|||||||
RECT rcPage;
|
RECT rcPage;
|
||||||
CHARRANGE chrg;
|
CHARRANGE chrg;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAKELONG(a, b) ((a) | ((b) << 16))
|
//#define MAKELONG(a, b) ((a) | ((b) << 16))
|
||||||
#define LOWORD(x) (x & 0xffff)
|
//#define LOWORD(x) (x & 0xffff)
|
||||||
#define HIWORD(x) (x >> 16)
|
//#define HIWORD(x) (x >> 16)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22,7 +22,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
WindowAccessor(WindowID id_, PropSet &props_) :
|
WindowAccessor(WindowID id_, PropSet &props_) :
|
||||||
Accessor(), id(id_), props(props_),
|
Accessor(), id(id_), props(props_),
|
||||||
lenDoc(-1), validLen(0), chFlags(0) {
|
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||||
}
|
}
|
||||||
~WindowAccessor();
|
~WindowAccessor();
|
||||||
char StyleAt(int position);
|
char StyleAt(int position);
|
||||||
|
@@ -10,12 +10,16 @@
|
|||||||
|
|
||||||
#include "AutoComplete.h"
|
#include "AutoComplete.h"
|
||||||
|
|
||||||
AutoComplete::AutoComplete() {
|
AutoComplete::AutoComplete() :
|
||||||
lb = 0;
|
active(false),
|
||||||
active = false;
|
separator(' '),
|
||||||
posStart = 0;
|
ignoreCase(false),
|
||||||
strcpy(stopChars, "");
|
chooseSingle(false),
|
||||||
separator = ' ';
|
posStart(0),
|
||||||
|
startLen(0),
|
||||||
|
cancelAtStartPos(true) {
|
||||||
|
stopChars[0] = '\0';
|
||||||
|
fillUpChars[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoComplete::~AutoComplete() {
|
AutoComplete::~AutoComplete() {
|
||||||
@@ -45,6 +49,15 @@ bool AutoComplete::IsStopChar(char ch) {
|
|||||||
return ch && strchr(stopChars, ch);
|
return ch && strchr(stopChars, ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoComplete::SetFillUpChars(const char *fillUpChars_) {
|
||||||
|
strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars));
|
||||||
|
fillUpChars[sizeof(fillUpChars) - 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AutoComplete::IsFillUpChar(char ch) {
|
||||||
|
return ch && strchr(fillUpChars, ch);
|
||||||
|
}
|
||||||
|
|
||||||
void AutoComplete::SetSeparator(char separator_) {
|
void AutoComplete::SetSeparator(char separator_) {
|
||||||
separator = separator_;
|
separator = separator_;
|
||||||
}
|
}
|
||||||
@@ -53,8 +66,7 @@ char AutoComplete::GetSeparator() {
|
|||||||
return separator;
|
return separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AutoComplete::SetList(const char *list) {
|
void AutoComplete::SetList(const char *list) {
|
||||||
int maxStrLen = 12;
|
|
||||||
lb.Clear();
|
lb.Clear();
|
||||||
char *words = new char[strlen(list) + 1];
|
char *words = new char[strlen(list) + 1];
|
||||||
if (words) {
|
if (words) {
|
||||||
@@ -65,18 +77,15 @@ int AutoComplete::SetList(const char *list) {
|
|||||||
if (words[i] == separator) {
|
if (words[i] == separator) {
|
||||||
words[i] = '\0';
|
words[i] = '\0';
|
||||||
lb.Append(startword);
|
lb.Append(startword);
|
||||||
maxStrLen = Platform::Maximum(maxStrLen, strlen(startword));
|
|
||||||
startword = words + i + 1;
|
startword = words + i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (startword) {
|
if (startword) {
|
||||||
lb.Append(startword);
|
lb.Append(startword);
|
||||||
maxStrLen = Platform::Maximum(maxStrLen, strlen(startword));
|
|
||||||
}
|
}
|
||||||
delete []words;
|
delete []words;
|
||||||
}
|
}
|
||||||
lb.Sort();
|
lb.Sort();
|
||||||
return maxStrLen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoComplete::Show() {
|
void AutoComplete::Show() {
|
||||||
@@ -87,7 +96,6 @@ void AutoComplete::Show() {
|
|||||||
void AutoComplete::Cancel() {
|
void AutoComplete::Cancel() {
|
||||||
if (lb.Created()) {
|
if (lb.Created()) {
|
||||||
lb.Destroy();
|
lb.Destroy();
|
||||||
lb = 0;
|
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,11 +9,16 @@
|
|||||||
class AutoComplete {
|
class AutoComplete {
|
||||||
bool active;
|
bool active;
|
||||||
char stopChars[256];
|
char stopChars[256];
|
||||||
|
char fillUpChars[256];
|
||||||
char separator;
|
char separator;
|
||||||
public:
|
public:
|
||||||
|
bool ignoreCase;
|
||||||
|
bool chooseSingle;
|
||||||
ListBox lb;
|
ListBox lb;
|
||||||
int posStart;
|
int posStart;
|
||||||
int startLen;
|
int startLen;
|
||||||
|
// Should autocompletion be canceled if editor's currentPos <= startPos?
|
||||||
|
bool cancelAtStartPos;
|
||||||
|
|
||||||
AutoComplete();
|
AutoComplete();
|
||||||
~AutoComplete();
|
~AutoComplete();
|
||||||
@@ -28,12 +33,16 @@ public:
|
|||||||
void SetStopChars(const char *stopChars_);
|
void SetStopChars(const char *stopChars_);
|
||||||
bool IsStopChar(char ch);
|
bool IsStopChar(char ch);
|
||||||
|
|
||||||
|
// The fillup chars are characters which, when typed, fill up the selected word
|
||||||
|
void SetFillUpChars(const char *fillUpChars_);
|
||||||
|
bool IsFillUpChar(char ch);
|
||||||
|
|
||||||
// The separator character is used when interpreting the list in SetList
|
// The separator character is used when interpreting the list in SetList
|
||||||
void SetSeparator(char separator_);
|
void SetSeparator(char separator_);
|
||||||
char GetSeparator();
|
char GetSeparator();
|
||||||
|
|
||||||
// The list string contains a sequence of words separated by the separator character
|
// The list string contains a sequence of words separated by the separator character
|
||||||
int SetList(const char *list);
|
void SetList(const char *list);
|
||||||
|
|
||||||
void Show();
|
void Show();
|
||||||
void Cancel();
|
void Cancel();
|
||||||
|
@@ -88,7 +88,7 @@ void MarkerHandleSet::RemoveHandle(int handle) {
|
|||||||
if (mhn->handle == handle) {
|
if (mhn->handle == handle) {
|
||||||
*pmhn = mhn->next;
|
*pmhn = mhn->next;
|
||||||
delete mhn;
|
delete mhn;
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
pmhn = &((*pmhn)->next);
|
pmhn = &((*pmhn)->next);
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ void MarkerHandleSet::RemoveNumber(int markerNum) {
|
|||||||
if (mhn->number == markerNum) {
|
if (mhn->number == markerNum) {
|
||||||
*pmhn = mhn->next;
|
*pmhn = mhn->next;
|
||||||
delete mhn;
|
delete mhn;
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
pmhn = &((*pmhn)->next);
|
pmhn = &((*pmhn)->next);
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,11 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) {
|
|||||||
LineVector::LineVector() {
|
LineVector::LineVector() {
|
||||||
linesData = 0;
|
linesData = 0;
|
||||||
lines = 0;
|
lines = 0;
|
||||||
|
size = 0;
|
||||||
levels = 0;
|
levels = 0;
|
||||||
|
sizeLevels = 0;
|
||||||
|
handleCurrent = 1;
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,6 +165,7 @@ void LineVector::Expand(int sizeNew) {
|
|||||||
Platform::DebugPrintf("No memory available\n");
|
Platform::DebugPrintf("No memory available\n");
|
||||||
// TODO: Blow up
|
// TODO: Blow up
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineVector::ExpandLevels(int sizeNew) {
|
void LineVector::ExpandLevels(int sizeNew) {
|
||||||
@@ -180,6 +185,13 @@ void LineVector::ExpandLevels(int sizeNew) {
|
|||||||
Platform::DebugPrintf("No memory available\n");
|
Platform::DebugPrintf("No memory available\n");
|
||||||
// TODO: Blow up
|
// TODO: Blow up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void LineVector::ClearLevels() {
|
||||||
|
delete []levels;
|
||||||
|
levels = 0;
|
||||||
|
sizeLevels = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineVector::InsertValue(int pos, int value) {
|
void LineVector::InsertValue(int pos, int value) {
|
||||||
@@ -202,10 +214,10 @@ void LineVector::InsertValue(int pos, int value) {
|
|||||||
}
|
}
|
||||||
if (pos == 0) {
|
if (pos == 0) {
|
||||||
levels[pos] = SC_FOLDLEVELBASE;
|
levels[pos] = SC_FOLDLEVELBASE;
|
||||||
} else if (pos == (lines-1)) { // Last line will not be a folder
|
} else if (pos == (lines - 1)) { // Last line will not be a folder
|
||||||
levels[pos] = SC_FOLDLEVELBASE;
|
levels[pos] = SC_FOLDLEVELBASE;
|
||||||
} else {
|
} else {
|
||||||
levels[pos] = levels[pos-1];
|
levels[pos] = levels[pos - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,10 +246,10 @@ void LineVector::Remove(int pos) {
|
|||||||
linesData[i] = linesData[i + 1];
|
linesData[i] = linesData[i + 1];
|
||||||
}
|
}
|
||||||
if (levels) {
|
if (levels) {
|
||||||
// Level information merges back onto previous line
|
// Level information merges back onto previous line
|
||||||
int posAbove = pos-1;
|
int posAbove = pos - 1;
|
||||||
if (posAbove < 0)
|
if (posAbove < 0)
|
||||||
posAbove = 0;
|
posAbove = 0;
|
||||||
for (int j = posAbove; j < lines; j++) {
|
for (int j = posAbove; j < lines; j++) {
|
||||||
levels[j] = levels[j + 1];
|
levels[j] = levels[j + 1];
|
||||||
}
|
}
|
||||||
@@ -280,11 +292,12 @@ int LineVector::AddMark(int line, int markerNum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LineVector::MergeMarkers(int pos) {
|
void LineVector::MergeMarkers(int pos) {
|
||||||
if (linesData[pos].handleSet || linesData[pos + 1].handleSet) {
|
if (linesData[pos + 1].handleSet != NULL) {
|
||||||
if (linesData[pos].handleSet && linesData[pos + 1].handleSet) {
|
if (linesData[pos].handleSet == NULL )
|
||||||
linesData[pos].handleSet->CombineWith(linesData[pos].handleSet);
|
linesData[pos].handleSet = new MarkerHandleSet;
|
||||||
linesData[pos].handleSet = 0;
|
linesData[pos].handleSet->CombineWith(linesData[pos + 1].handleSet);
|
||||||
}
|
delete linesData[pos + 1].handleSet;
|
||||||
|
linesData[pos + 1].handleSet = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +371,7 @@ void Action::Grab(Action *source) {
|
|||||||
data = source->data;
|
data = source->data;
|
||||||
lenData = source->lenData;
|
lenData = source->lenData;
|
||||||
mayCoalesce = source->mayCoalesce;
|
mayCoalesce = source->mayCoalesce;
|
||||||
|
|
||||||
// Ownership of source data transferred to this
|
// Ownership of source data transferred to this
|
||||||
source->position = 0;
|
source->position = 0;
|
||||||
source->at = startAction;
|
source->at = startAction;
|
||||||
@@ -367,21 +380,21 @@ void Action::Grab(Action *source) {
|
|||||||
source->mayCoalesce = true;
|
source->mayCoalesce = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The undo history stores a sequence of user operations that represent the user's view of the
|
// The undo history stores a sequence of user operations that represent the user's view of the
|
||||||
// commands executed on the text.
|
// commands executed on the text.
|
||||||
// Each user operation contains a sequence of text insertion and text deletion actions.
|
// Each user operation contains a sequence of text insertion and text deletion actions.
|
||||||
// All the user operations are stored in a list of individual actions with 'start' actions used
|
// All the user operations are stored in a list of individual actions with 'start' actions used
|
||||||
// as delimiters between user operations.
|
// as delimiters between user operations.
|
||||||
// Initially there is one start action in the history.
|
// Initially there is one start action in the history.
|
||||||
// As each action is performed, it is recorded in the history. The action may either become
|
// As each action is performed, it is recorded in the history. The action may either become
|
||||||
// part of the current user operation or may start a new user operation. If it is to be part of the
|
// part of the current user operation or may start a new user operation. If it is to be part of the
|
||||||
// current operation, then it overwrites the current last action. If it is to be part of a new
|
// current operation, then it overwrites the current last action. If it is to be part of a new
|
||||||
// operation, it is appended after the current last action.
|
// operation, it is appended after the current last action.
|
||||||
// After writing the new action, a new start action is appended at the end of the history.
|
// After writing the new action, a new start action is appended at the end of the history.
|
||||||
// The decision of whether to start a new user operation is based upon two factors. If a
|
// The decision of whether to start a new user operation is based upon two factors. If a
|
||||||
// compound operation has been explicitly started by calling BeginUndoAction and no matching
|
// compound operation has been explicitly started by calling BeginUndoAction and no matching
|
||||||
// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current
|
// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current
|
||||||
// operation. If there is no outstanding BeginUndoAction call then a new operation is started
|
// operation. If there is no outstanding BeginUndoAction call then a new operation is started
|
||||||
// unless it looks as if the new action is caused by the user typing or deleting a stream of text.
|
// unless it looks as if the new action is caused by the user typing or deleting a stream of text.
|
||||||
// Sequences that look like typing or deletion are coalesced into a single user operation.
|
// Sequences that look like typing or deletion are coalesced into a single user operation.
|
||||||
|
|
||||||
@@ -412,7 +425,7 @@ void UndoHistory::EnsureUndoRoom() {
|
|||||||
int lenActionsNew = lenActions * 2;
|
int lenActionsNew = lenActions * 2;
|
||||||
Action *actionsNew = new Action[lenActionsNew];
|
Action *actionsNew = new Action[lenActionsNew];
|
||||||
if (!actionsNew)
|
if (!actionsNew)
|
||||||
return;
|
return ;
|
||||||
for (int act = 0; act <= currentAction; act++)
|
for (int act = 0; act <= currentAction; act++)
|
||||||
actionsNew[act].Grab(&actions[act]);
|
actionsNew[act].Grab(&actions[act]);
|
||||||
delete []actions;
|
delete []actions;
|
||||||
@@ -425,11 +438,11 @@ void UndoHistory::EnsureUndoRoom() {
|
|||||||
void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData) {
|
void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData) {
|
||||||
EnsureUndoRoom();
|
EnsureUndoRoom();
|
||||||
//Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction);
|
//Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction);
|
||||||
//Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at,
|
//Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at,
|
||||||
// actions[currentAction - 1].position, actions[currentAction - 1].lenData);
|
// actions[currentAction - 1].position, actions[currentAction - 1].lenData);
|
||||||
if (currentAction >= 1) {
|
if (currentAction >= 1) {
|
||||||
if (0 == undoSequenceDepth) {
|
if (0 == undoSequenceDepth) {
|
||||||
// Top level actions may not always be coalesced
|
// Top level actions may not always be coalesced
|
||||||
Action &actPrevious = actions[currentAction - 1];
|
Action &actPrevious = actions[currentAction - 1];
|
||||||
// See if current action can be coalesced into previous action
|
// See if current action can be coalesced into previous action
|
||||||
// Will work if both are inserts or deletes and position is same
|
// Will work if both are inserts or deletes and position is same
|
||||||
@@ -437,22 +450,23 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng
|
|||||||
currentAction++;
|
currentAction++;
|
||||||
} else if (currentAction == savePoint) {
|
} else if (currentAction == savePoint) {
|
||||||
currentAction++;
|
currentAction++;
|
||||||
} else if ((at == removeAction) &&
|
} else if ((at == removeAction) &&
|
||||||
((position + lengthData * 2) != actPrevious.position)) {
|
((position + lengthData * 2) != actPrevious.position)) {
|
||||||
// Removals must be at same position to coalesce
|
// Removals must be at same position to coalesce
|
||||||
currentAction++;
|
currentAction++;
|
||||||
} else if ((at == insertAction) &&
|
} else if ((at == insertAction) &&
|
||||||
(position != (actPrevious.position + actPrevious.lenData*2))) {
|
(position != (actPrevious.position + actPrevious.lenData*2))) {
|
||||||
// Insertions must be immediately after to coalesce
|
// Insertions must be immediately after to coalesce
|
||||||
currentAction++;
|
currentAction++;
|
||||||
} else {
|
} else {
|
||||||
//Platform::DebugPrintf("action coalesced\n");
|
//Platform::DebugPrintf("action coalesced\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Actions not at top level are always coalesced unless this is after return to top level
|
// Actions not at top level are always coalesced unless this is after return to top level
|
||||||
if (!actions[currentAction].mayCoalesce)
|
if (!actions[currentAction].mayCoalesce)
|
||||||
currentAction++;
|
currentAction++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
currentAction++;
|
currentAction++;
|
||||||
}
|
}
|
||||||
@@ -487,7 +501,7 @@ void UndoHistory::EndUndoAction() {
|
|||||||
actions[currentAction].mayCoalesce = false;
|
actions[currentAction].mayCoalesce = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UndoHistory::DropUndoSequence() {
|
void UndoHistory::DropUndoSequence() {
|
||||||
undoSequenceDepth = 0;
|
undoSequenceDepth = 0;
|
||||||
}
|
}
|
||||||
@@ -517,9 +531,9 @@ int UndoHistory::StartUndo() {
|
|||||||
// Drop any trailing startAction
|
// Drop any trailing startAction
|
||||||
if (actions[currentAction].at == startAction && currentAction > 0)
|
if (actions[currentAction].at == startAction && currentAction > 0)
|
||||||
currentAction--;
|
currentAction--;
|
||||||
|
|
||||||
// Count the steps in this action
|
// Count the steps in this action
|
||||||
int act = currentAction;
|
int act = currentAction;
|
||||||
while (actions[act].at != startAction && act > 0) {
|
while (actions[act].at != startAction && act > 0) {
|
||||||
act--;
|
act--;
|
||||||
}
|
}
|
||||||
@@ -542,9 +556,9 @@ int UndoHistory::StartRedo() {
|
|||||||
// Drop any leading startAction
|
// Drop any leading startAction
|
||||||
if (actions[currentAction].at == startAction && currentAction < maxAction)
|
if (actions[currentAction].at == startAction && currentAction < maxAction)
|
||||||
currentAction++;
|
currentAction++;
|
||||||
|
|
||||||
// Count the steps in this action
|
// Count the steps in this action
|
||||||
int act = currentAction;
|
int act = currentAction;
|
||||||
while (actions[act].at != startAction && act < maxAction) {
|
while (actions[act].at != startAction && act < maxAction) {
|
||||||
act++;
|
act++;
|
||||||
}
|
}
|
||||||
@@ -563,11 +577,11 @@ CellBuffer::CellBuffer(int initialLength) {
|
|||||||
body = new char[initialLength];
|
body = new char[initialLength];
|
||||||
size = initialLength;
|
size = initialLength;
|
||||||
length = 0;
|
length = 0;
|
||||||
part1len = 0;
|
part1len = 0;
|
||||||
gaplen = initialLength;
|
gaplen = initialLength;
|
||||||
part2body = body + gaplen;
|
part2body = body + gaplen;
|
||||||
readOnly = false;
|
readOnly = false;
|
||||||
collectingUndo = undoCollectAutoStart;
|
collectingUndo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CellBuffer::~CellBuffer() {
|
CellBuffer::~CellBuffer() {
|
||||||
@@ -577,7 +591,7 @@ CellBuffer::~CellBuffer() {
|
|||||||
|
|
||||||
void CellBuffer::GapTo(int position) {
|
void CellBuffer::GapTo(int position) {
|
||||||
if (position == part1len)
|
if (position == part1len)
|
||||||
return;
|
return ;
|
||||||
if (position < part1len) {
|
if (position < part1len) {
|
||||||
int diff = part1len - position;
|
int diff = part1len - position;
|
||||||
//Platform::DebugPrintf("Move gap backwards to %d diff = %d part1len=%d length=%d \n", position,diff, part1len, length);
|
//Platform::DebugPrintf("Move gap backwards to %d diff = %d part1len=%d length=%d \n", position,diff, part1len, length);
|
||||||
@@ -609,6 +623,7 @@ void CellBuffer::RoomFor(int insertionLength) {
|
|||||||
size = newSize;
|
size = newSize;
|
||||||
//Platform::DebugPrintf("end need room %d %d - size=%d length=%d\n", gaplen, insertionLength,size,length);
|
//Platform::DebugPrintf("end need room %d %d - size=%d length=%d\n", gaplen, insertionLength,size,length);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// To make it easier to write code that uses ByteAt, a position outside the range of the buffer
|
// To make it easier to write code that uses ByteAt, a position outside the range of the buffer
|
||||||
@@ -633,16 +648,16 @@ void CellBuffer::SetByteAt(int position, char ch) {
|
|||||||
|
|
||||||
if (position < 0) {
|
if (position < 0) {
|
||||||
//Platform::DebugPrintf("Bad position %d\n",position);
|
//Platform::DebugPrintf("Bad position %d\n",position);
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
if (position >= length + 11) {
|
if (position >= length + 11) {
|
||||||
Platform::DebugPrintf("Very Bad position %d of %d\n", position, length);
|
Platform::DebugPrintf("Very Bad position %d of %d\n", position, length);
|
||||||
//exit(2);
|
//exit(2);
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
if (position >= length) {
|
if (position >= length) {
|
||||||
//Platform::DebugPrintf("Bad position %d of %d\n",position,length);
|
//Platform::DebugPrintf("Bad position %d of %d\n",position,length);
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (position < part1len) {
|
if (position < part1len) {
|
||||||
@@ -658,20 +673,20 @@ char CellBuffer::CharAt(int position) {
|
|||||||
|
|
||||||
void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
||||||
if (lengthRetrieve < 0)
|
if (lengthRetrieve < 0)
|
||||||
return;
|
return ;
|
||||||
if (position < 0)
|
if (position < 0)
|
||||||
return;
|
return ;
|
||||||
int bytePos = position * 2;
|
int bytePos = position * 2;
|
||||||
if ((bytePos + lengthRetrieve * 2) > length) {
|
if ((bytePos + lengthRetrieve * 2) > length) {
|
||||||
Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n",bytePos,
|
Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", bytePos,
|
||||||
lengthRetrieve, length);
|
lengthRetrieve, length);
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
GapTo(0); // Move the buffer so its easy to subscript into it
|
GapTo(0); // Move the buffer so its easy to subscript into it
|
||||||
char *pb = part2body + bytePos;
|
char *pb = part2body + bytePos;
|
||||||
while (lengthRetrieve--) {
|
while (lengthRetrieve--) {
|
||||||
*buffer++ = *pb;
|
*buffer++ = *pb;
|
||||||
pb +=2;
|
pb += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -706,7 +721,7 @@ void CellBuffer::InsertCharStyle(int position, char ch, char style) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CellBuffer::SetStyleAt(int position, char style, char mask) {
|
bool CellBuffer::SetStyleAt(int position, char style, char mask) {
|
||||||
char curVal = ByteAt(position*2 + 1);
|
char curVal = ByteAt(position * 2 + 1);
|
||||||
if ((curVal & mask) != style) {
|
if ((curVal & mask) != style) {
|
||||||
SetByteAt(position*2 + 1, static_cast<char>((curVal & ~mask) | style));
|
SetByteAt(position*2 + 1, static_cast<char>((curVal & ~mask) | style));
|
||||||
return true;
|
return true;
|
||||||
@@ -823,7 +838,7 @@ int CellBuffer::LineFromHandle(int markerHandle) {
|
|||||||
void CellBuffer::BasicInsertString(int position, char *s, int insertLength) {
|
void CellBuffer::BasicInsertString(int position, char *s, int insertLength) {
|
||||||
//Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength);
|
//Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength);
|
||||||
if (insertLength == 0)
|
if (insertLength == 0)
|
||||||
return;
|
return ;
|
||||||
RoomFor(insertLength);
|
RoomFor(insertLength);
|
||||||
GapTo(position);
|
GapTo(position);
|
||||||
|
|
||||||
@@ -883,7 +898,7 @@ void CellBuffer::BasicInsertString(int position, char *s, int insertLength) {
|
|||||||
void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
||||||
//Platform::DebugPrintf("Deleting at %d for %d\n", position, deleteLength);
|
//Platform::DebugPrintf("Deleting at %d for %d\n", position, deleteLength);
|
||||||
if (deleteLength == 0)
|
if (deleteLength == 0)
|
||||||
return;
|
return ;
|
||||||
|
|
||||||
if ((position == 0) && (deleteLength == length)) {
|
if ((position == 0) && (deleteLength == length)) {
|
||||||
// If whole buffer is being deleted, faster to reinitialise lines data
|
// If whole buffer is being deleted, faster to reinitialise lines data
|
||||||
@@ -915,6 +930,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
|||||||
ignoreNL = true; // First \n is not real deletion
|
ignoreNL = true; // First \n is not real deletion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char ch = chNext;
|
char ch = chNext;
|
||||||
for (int i = 0; i < deleteLength; i += 2) {
|
for (int i = 0; i < deleteLength; i += 2) {
|
||||||
chNext = ' ';
|
chNext = ' ';
|
||||||
@@ -932,6 +948,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
|||||||
ignoreNL = false; // Further \n are not real deletions
|
ignoreNL = false; // Further \n are not real deletions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ch = chNext;
|
ch = chNext;
|
||||||
}
|
}
|
||||||
// May have to fix up end if last deletion causes cr to be next to lf
|
// May have to fix up end if last deletion causes cr to be next to lf
|
||||||
@@ -952,7 +969,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) {
|
|||||||
part2body = body + gaplen;
|
part2body = body + gaplen;
|
||||||
}
|
}
|
||||||
|
|
||||||
undoCollectionType CellBuffer::SetUndoCollection(undoCollectionType collectUndo) {
|
bool CellBuffer::SetUndoCollection(bool collectUndo) {
|
||||||
collectingUndo = collectUndo;
|
collectingUndo = collectUndo;
|
||||||
uh.DropUndoSequence();
|
uh.DropUndoSequence();
|
||||||
return collectingUndo;
|
return collectingUndo;
|
||||||
@@ -994,12 +1011,12 @@ void CellBuffer::PerformUndoStep() {
|
|||||||
char *styledData = new char[actionStep.lenData * 2];
|
char *styledData = new char[actionStep.lenData * 2];
|
||||||
for (int i = 0; i < actionStep.lenData; i++) {
|
for (int i = 0; i < actionStep.lenData; i++) {
|
||||||
styledData[i*2] = actionStep.data[i];
|
styledData[i*2] = actionStep.data[i];
|
||||||
styledData[i*2+1] = 0;
|
styledData[i*2 + 1] = 0;
|
||||||
}
|
}
|
||||||
BasicInsertString(actionStep.position, styledData, actionStep.lenData*2);
|
BasicInsertString(actionStep.position, styledData, actionStep.lenData*2);
|
||||||
delete []styledData;
|
delete []styledData;
|
||||||
}
|
}
|
||||||
uh.CompletedUndoStep();
|
uh.CompletedUndoStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CellBuffer::CanRedo() {
|
bool CellBuffer::CanRedo() {
|
||||||
@@ -1020,14 +1037,14 @@ void CellBuffer::PerformRedoStep() {
|
|||||||
char *styledData = new char[actionStep.lenData * 2];
|
char *styledData = new char[actionStep.lenData * 2];
|
||||||
for (int i = 0; i < actionStep.lenData; i++) {
|
for (int i = 0; i < actionStep.lenData; i++) {
|
||||||
styledData[i*2] = actionStep.data[i];
|
styledData[i*2] = actionStep.data[i];
|
||||||
styledData[i*2+1] = 0;
|
styledData[i*2 + 1] = 0;
|
||||||
}
|
}
|
||||||
BasicInsertString(actionStep.position, styledData, actionStep.lenData*2);
|
BasicInsertString(actionStep.position, styledData, actionStep.lenData*2);
|
||||||
delete []styledData;
|
delete []styledData;
|
||||||
} else if (actionStep.at == removeAction) {
|
} else if (actionStep.at == removeAction) {
|
||||||
BasicDeleteChars(actionStep.position, actionStep.lenData*2);
|
BasicDeleteChars(actionStep.position, actionStep.lenData*2);
|
||||||
}
|
}
|
||||||
uh.CompletedRedoStep();
|
uh.CompletedRedoStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CellBuffer::SetLineState(int line, int state) {
|
int CellBuffer::SetLineState(int line, int state) {
|
||||||
@@ -1043,7 +1060,7 @@ int CellBuffer::GetLineState(int line) {
|
|||||||
int CellBuffer::GetMaxLineState() {
|
int CellBuffer::GetMaxLineState() {
|
||||||
return lineStates.Length();
|
return lineStates.Length();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CellBuffer::SetLevel(int line, int level) {
|
int CellBuffer::SetLevel(int line, int level) {
|
||||||
int prev = 0;
|
int prev = 0;
|
||||||
if ((line >= 0) && (line < lv.lines)) {
|
if ((line >= 0) && (line < lv.lines)) {
|
||||||
@@ -1066,3 +1083,6 @@ int CellBuffer::GetLevel(int line) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CellBuffer::ClearLevels() {
|
||||||
|
lv.ClearLevels();
|
||||||
|
}
|
||||||
|
@@ -58,6 +58,7 @@ public:
|
|||||||
|
|
||||||
void Expand(int sizeNew);
|
void Expand(int sizeNew);
|
||||||
void ExpandLevels(int sizeNew=-1);
|
void ExpandLevels(int sizeNew=-1);
|
||||||
|
void ClearLevels();
|
||||||
void InsertValue(int pos, int value);
|
void InsertValue(int pos, int value);
|
||||||
void SetValue(int pos, int value);
|
void SetValue(int pos, int value);
|
||||||
void Remove(int pos);
|
void Remove(int pos);
|
||||||
@@ -88,8 +89,6 @@ public:
|
|||||||
void Grab(Action *source);
|
void Grab(Action *source);
|
||||||
};
|
};
|
||||||
|
|
||||||
enum undoCollectionType { undoCollectNone, undoCollectAutoStart, undoCollectManualStart };
|
|
||||||
|
|
||||||
class UndoHistory {
|
class UndoHistory {
|
||||||
Action *actions;
|
Action *actions;
|
||||||
int lenActions;
|
int lenActions;
|
||||||
@@ -141,12 +140,12 @@ private:
|
|||||||
char *part2body;
|
char *part2body;
|
||||||
bool readOnly;
|
bool readOnly;
|
||||||
|
|
||||||
undoCollectionType collectingUndo;
|
bool collectingUndo;
|
||||||
UndoHistory uh;
|
UndoHistory uh;
|
||||||
|
|
||||||
LineVector lv;
|
LineVector lv;
|
||||||
|
|
||||||
SVector<int, 4000> lineStates;
|
SVector lineStates;
|
||||||
|
|
||||||
void GapTo(int position);
|
void GapTo(int position);
|
||||||
void RoomFor(int insertionLength);
|
void RoomFor(int insertionLength);
|
||||||
@@ -199,7 +198,7 @@ public:
|
|||||||
void BasicInsertString(int position, char *s, int insertLength);
|
void BasicInsertString(int position, char *s, int insertLength);
|
||||||
void BasicDeleteChars(int position, int deleteLength);
|
void BasicDeleteChars(int position, int deleteLength);
|
||||||
|
|
||||||
undoCollectionType SetUndoCollection(undoCollectionType collectUndo);
|
bool SetUndoCollection(bool collectUndo);
|
||||||
bool IsCollectingUndo();
|
bool IsCollectingUndo();
|
||||||
void BeginUndoAction();
|
void BeginUndoAction();
|
||||||
void EndUndoAction();
|
void EndUndoAction();
|
||||||
@@ -222,6 +221,7 @@ public:
|
|||||||
|
|
||||||
int SetLevel(int line, int level);
|
int SetLevel(int line, int level);
|
||||||
int GetLevel(int line);
|
int GetLevel(int line);
|
||||||
|
void ClearLevels();
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CELL_SIZE 2
|
#define CELL_SIZE 2
|
||||||
|
@@ -171,12 +171,6 @@ bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible
|
|||||||
delta += visible ? 1 : -1;
|
delta += visible ? 1 : -1;
|
||||||
lines[line].visible = visible;
|
lines[line].visible = visible;
|
||||||
}
|
}
|
||||||
lines[line].displayLine += delta;
|
|
||||||
}
|
|
||||||
if (delta != 0) {
|
|
||||||
for (int line=lineDocEnd+1; line <= linesInDoc; line++) {
|
|
||||||
lines[line].displayLine += delta;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
linesInDisplay += delta;
|
linesInDisplay += delta;
|
||||||
@@ -206,3 +200,9 @@ bool ContractionState::SetExpanded(int lineDoc, bool expanded) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ContractionState::ShowAll() {
|
||||||
|
delete []lines;
|
||||||
|
lines = 0;
|
||||||
|
size = 0;
|
||||||
|
}
|
||||||
|
@@ -42,9 +42,11 @@ public:
|
|||||||
|
|
||||||
bool GetVisible(int lineDoc) const;
|
bool GetVisible(int lineDoc) const;
|
||||||
bool SetVisible(int lineDocStart, int lineDocEnd, bool visible);
|
bool SetVisible(int lineDocStart, int lineDocEnd, bool visible);
|
||||||
|
|
||||||
bool GetExpanded(int lineDoc) const;
|
bool GetExpanded(int lineDoc) const;
|
||||||
bool SetExpanded(int lineDoc, bool expanded);
|
bool SetExpanded(int lineDoc, bool expanded);
|
||||||
|
|
||||||
|
void ShowAll();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -54,7 +54,7 @@ int Document::AddRef() {
|
|||||||
return refCount++;
|
return refCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decrease reference count and return its provius value.
|
// Decrease reference count and return its previous value.
|
||||||
// Delete the document if reference count reaches zero.
|
// Delete the document if reference count reaches zero.
|
||||||
int Document::Release() {
|
int Document::Release() {
|
||||||
int curRefCount = --refCount;
|
int curRefCount = --refCount;
|
||||||
@@ -201,8 +201,8 @@ bool Document::IsCrLf(int pos) {
|
|||||||
return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n');
|
return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Document::IsDBCS(int pos) {
|
|
||||||
#if PLAT_WIN
|
#if PLAT_WIN
|
||||||
|
bool Document::IsDBCS(int pos) {
|
||||||
if (dbcsCodePage) {
|
if (dbcsCodePage) {
|
||||||
if (SC_CP_UTF8 == dbcsCodePage) {
|
if (SC_CP_UTF8 == dbcsCodePage) {
|
||||||
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
|
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
|
||||||
@@ -224,10 +224,14 @@ bool Document::IsDBCS(int pos) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// PLAT_GTK or PLAT_WX
|
||||||
|
// TODO: support DBCS under GTK+ and WX
|
||||||
|
bool Document::IsDBCS(int) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int Document::LenChar(int pos) {
|
int Document::LenChar(int pos) {
|
||||||
if (IsCrLf(pos)) {
|
if (IsCrLf(pos)) {
|
||||||
@@ -334,6 +338,8 @@ void Document::ModifiedAt(int pos) {
|
|||||||
|
|
||||||
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
||||||
void Document::DeleteChars(int pos, int len) {
|
void Document::DeleteChars(int pos, int len) {
|
||||||
|
if ((pos + len) > Length())
|
||||||
|
return;
|
||||||
if (cb.IsReadOnly() && enteredReadOnlyCount==0) {
|
if (cb.IsReadOnly() && enteredReadOnlyCount==0) {
|
||||||
enteredReadOnlyCount++;
|
enteredReadOnlyCount++;
|
||||||
NotifyModifyAttempt();
|
NotifyModifyAttempt();
|
||||||
@@ -590,6 +596,8 @@ void Document::SetLineIndentation(int line, int indent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Document::GetLineIndentPosition(int line) {
|
int Document::GetLineIndentPosition(int line) {
|
||||||
|
if (line < 0)
|
||||||
|
return 0;
|
||||||
int pos = LineStart(line);
|
int pos = LineStart(line);
|
||||||
int length = Length();
|
int length = Length();
|
||||||
while ((pos < length) && isindentchar(cb.CharAt(pos))) {
|
while ((pos < length) && isindentchar(cb.CharAt(pos))) {
|
||||||
@@ -598,6 +606,25 @@ int Document::GetLineIndentPosition(int line) {
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Document::GetColumn(int pos) {
|
||||||
|
int column = 0;
|
||||||
|
int line = LineFromPosition(pos);
|
||||||
|
if ((line >= 0) && (line < LinesTotal())) {
|
||||||
|
for (int i=LineStart(line);i<pos;i++) {
|
||||||
|
char ch = cb.CharAt(i);
|
||||||
|
if (ch == '\t')
|
||||||
|
column = NextTab(column, tabInChars);
|
||||||
|
else if (ch == '\r')
|
||||||
|
return column;
|
||||||
|
else if (ch == '\n')
|
||||||
|
return column;
|
||||||
|
else
|
||||||
|
column++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return column;
|
||||||
|
}
|
||||||
|
|
||||||
void Document::Indent(bool forwards, int lineBottom, int lineTop) {
|
void Document::Indent(bool forwards, int lineBottom, int lineTop) {
|
||||||
// Dedent - suck white space off the front of the line to dedent by equivalent of a tab
|
// Dedent - suck white space off the front of the line to dedent by equivalent of a tab
|
||||||
for (int line = lineBottom; line >= lineTop; line--) {
|
for (int line = lineBottom; line >= lineTop; line--) {
|
||||||
@@ -690,25 +717,29 @@ int Document::NextWordStart(int pos, int delta) {
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Document::IsWordAt(int start, int end) {
|
bool Document::IsWordStartAt(int pos) {
|
||||||
int lengthDoc = Length();
|
if (pos > 0) {
|
||||||
if (start > 0) {
|
return !IsWordChar(CharAt(pos - 1));
|
||||||
char ch = CharAt(start - 1);
|
|
||||||
if (IsWordChar(ch))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (end < lengthDoc - 1) {
|
|
||||||
char ch = CharAt(end);
|
|
||||||
if (IsWordChar(ch))
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Document::IsWordEndAt(int pos) {
|
||||||
|
if (pos < Length() - 1) {
|
||||||
|
return !IsWordChar(CharAt(pos));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Document::IsWordAt(int start, int end) {
|
||||||
|
return IsWordStartAt(start) && IsWordEndAt(end);
|
||||||
|
}
|
||||||
|
|
||||||
// Find text in document, supporting both forward and backward
|
// Find text in document, supporting both forward and backward
|
||||||
// searches (just pass minPos > maxPos to do a backward search)
|
// searches (just pass minPos > maxPos to do a backward search)
|
||||||
// Has not been tested with backwards DBCS searches yet.
|
// Has not been tested with backwards DBCS searches yet.
|
||||||
long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word) {
|
long Document::FindText(int minPos, int maxPos, const char *s,
|
||||||
|
bool caseSensitive, bool word, bool wordStart) {
|
||||||
bool forward = minPos <= maxPos;
|
bool forward = minPos <= maxPos;
|
||||||
int increment = forward ? 1 : -1;
|
int increment = forward ? 1 : -1;
|
||||||
|
|
||||||
@@ -738,8 +769,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv
|
|||||||
found = false;
|
found = false;
|
||||||
}
|
}
|
||||||
if (found) {
|
if (found) {
|
||||||
if ((!word) || IsWordAt(pos, pos + lengthFind))
|
if ((!word && !wordStart) ||
|
||||||
return pos;
|
word && IsWordAt(pos, pos + lengthFind) ||
|
||||||
|
wordStart && IsWordStartAt(pos))
|
||||||
|
return pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -751,8 +784,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv
|
|||||||
found = false;
|
found = false;
|
||||||
}
|
}
|
||||||
if (found) {
|
if (found) {
|
||||||
if ((!word) || IsWordAt(pos, pos + lengthFind))
|
if (!(word && wordStart) ||
|
||||||
return pos;
|
word && IsWordAt(pos, pos + lengthFind) ||
|
||||||
|
wordStart && IsWordStartAt(pos))
|
||||||
|
return pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -113,9 +113,10 @@ public:
|
|||||||
bool CanUndo() { return cb.CanUndo(); }
|
bool CanUndo() { return cb.CanUndo(); }
|
||||||
bool CanRedo() { return cb.CanRedo(); }
|
bool CanRedo() { return cb.CanRedo(); }
|
||||||
void DeleteUndoHistory() { cb.DeleteUndoHistory(); }
|
void DeleteUndoHistory() { cb.DeleteUndoHistory(); }
|
||||||
undoCollectionType SetUndoCollection(undoCollectionType collectUndo) {
|
bool SetUndoCollection(bool collectUndo) {
|
||||||
return cb.SetUndoCollection(collectUndo);
|
return cb.SetUndoCollection(collectUndo);
|
||||||
}
|
}
|
||||||
|
bool IsCollectingUndo() { return cb.IsCollectingUndo(); }
|
||||||
void BeginUndoAction() { cb.BeginUndoAction(); }
|
void BeginUndoAction() { cb.BeginUndoAction(); }
|
||||||
void EndUndoAction() { cb.EndUndoAction(); }
|
void EndUndoAction() { cb.EndUndoAction(); }
|
||||||
void SetSavePoint();
|
void SetSavePoint();
|
||||||
@@ -124,9 +125,11 @@ public:
|
|||||||
int GetLineIndentation(int line);
|
int GetLineIndentation(int line);
|
||||||
void SetLineIndentation(int line, int indent);
|
void SetLineIndentation(int line, int indent);
|
||||||
int GetLineIndentPosition(int line);
|
int GetLineIndentPosition(int line);
|
||||||
|
int GetColumn(int position);
|
||||||
void Indent(bool forwards, int lineBottom, int lineTop);
|
void Indent(bool forwards, int lineBottom, int lineTop);
|
||||||
void ConvertLineEnds(int eolModeSet);
|
void ConvertLineEnds(int eolModeSet);
|
||||||
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
||||||
|
bool IsReadOnly() { return cb.IsReadOnly(); }
|
||||||
|
|
||||||
void InsertChar(int pos, char ch);
|
void InsertChar(int pos, char ch);
|
||||||
void InsertString(int position, const char *s);
|
void InsertString(int position, const char *s);
|
||||||
@@ -153,6 +156,7 @@ public:
|
|||||||
|
|
||||||
int SetLevel(int line, int level);
|
int SetLevel(int line, int level);
|
||||||
int GetLevel(int line) { return cb.GetLevel(line); }
|
int GetLevel(int line) { return cb.GetLevel(line); }
|
||||||
|
void ClearLevels() { cb.ClearLevels(); }
|
||||||
int GetLastChild(int lineParent, int level=-1);
|
int GetLastChild(int lineParent, int level=-1);
|
||||||
int GetFoldParent(int line);
|
int GetFoldParent(int line);
|
||||||
|
|
||||||
@@ -160,8 +164,9 @@ public:
|
|||||||
int ExtendWordSelect(int pos, int delta);
|
int ExtendWordSelect(int pos, int delta);
|
||||||
int NextWordStart(int pos, int delta);
|
int NextWordStart(int pos, int delta);
|
||||||
int Length() { return cb.Length(); }
|
int Length() { return cb.Length(); }
|
||||||
long FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word);
|
long FindText(int minPos, int maxPos, const char *s,
|
||||||
long FindText(WORD iMessage,WPARAM wParam,LPARAM lParam);
|
bool caseSensitive, bool word, bool wordStart);
|
||||||
|
long FindText(int iMessage, unsigned long wParam, long lParam);
|
||||||
int LinesTotal();
|
int LinesTotal();
|
||||||
|
|
||||||
void ChangeCase(Range r, bool makeUpperCase);
|
void ChangeCase(Range r, bool makeUpperCase);
|
||||||
@@ -186,6 +191,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool IsDBCS(int pos);
|
bool IsDBCS(int pos);
|
||||||
bool IsWordChar(unsigned char ch);
|
bool IsWordChar(unsigned char ch);
|
||||||
|
bool IsWordStartAt(int pos);
|
||||||
|
bool IsWordEndAt(int pos);
|
||||||
bool IsWordAt(int start, int end);
|
bool IsWordAt(int start, int end);
|
||||||
void ModifiedAt(int pos);
|
void ModifiedAt(int pos);
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -20,21 +21,22 @@
|
|||||||
DocumentAccessor::~DocumentAccessor() {
|
DocumentAccessor::~DocumentAccessor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PLAT_WIN
|
||||||
bool DocumentAccessor::InternalIsLeadByte(char ch) {
|
bool DocumentAccessor::InternalIsLeadByte(char ch) {
|
||||||
#if PLAT_GTK
|
|
||||||
// TODO: support DBCS under GTK+
|
|
||||||
return false;
|
|
||||||
#elif PLAT_WIN
|
|
||||||
if (SC_CP_UTF8 == codePage)
|
if (SC_CP_UTF8 == codePage)
|
||||||
// For lexing, all characters >= 0x80 are treated the
|
// For lexing, all characters >= 0x80 are treated the
|
||||||
// same so none is considered a lead byte.
|
// same so none is considered a lead byte.
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return IsDBCSLeadByteEx(codePage, ch);
|
return IsDBCSLeadByteEx(codePage, ch);
|
||||||
#elif PLAT_WX
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// PLAT_GTK or PLAT_WX
|
||||||
|
// TODO: support DBCS under GTK+ and WX
|
||||||
|
bool DocumentAccessor::InternalIsLeadByte(char) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void DocumentAccessor::Fill(int position) {
|
void DocumentAccessor::Fill(int position) {
|
||||||
if (lenDoc == -1)
|
if (lenDoc == -1)
|
||||||
|
@@ -24,7 +24,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
DocumentAccessor(Document *pdoc_, PropSet &props_) :
|
DocumentAccessor(Document *pdoc_, PropSet &props_) :
|
||||||
Accessor(), pdoc(pdoc_), props(props_),
|
Accessor(), pdoc(pdoc_), props(props_),
|
||||||
lenDoc(-1), validLen(0), chFlags(0) {
|
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||||
}
|
}
|
||||||
~DocumentAccessor();
|
~DocumentAccessor();
|
||||||
char StyleAt(int position);
|
char StyleAt(int position);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -31,10 +31,15 @@ public:
|
|||||||
// Drawing is only performed for maxLineLength characters on each line.
|
// Drawing is only performed for maxLineLength characters on each line.
|
||||||
enum {maxLineLength = 4000};
|
enum {maxLineLength = 4000};
|
||||||
int numCharsInLine;
|
int numCharsInLine;
|
||||||
char chars[maxLineLength];
|
int xHighlightGuide;
|
||||||
char styles[maxLineLength];
|
bool highlightColumn;
|
||||||
char indicators[maxLineLength];
|
int selStart;
|
||||||
int positions[maxLineLength];
|
int selEnd;
|
||||||
|
int edgeColumn;
|
||||||
|
char chars[maxLineLength+1];
|
||||||
|
char styles[maxLineLength+1];
|
||||||
|
char indicators[maxLineLength+1];
|
||||||
|
int positions[maxLineLength+1];
|
||||||
};
|
};
|
||||||
|
|
||||||
class Editor : public DocWatcher {
|
class Editor : public DocWatcher {
|
||||||
@@ -54,6 +59,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
bool stylesValid;
|
bool stylesValid;
|
||||||
ViewStyle vs;
|
ViewStyle vs;
|
||||||
Palette palette;
|
Palette palette;
|
||||||
|
int printMagnification;
|
||||||
|
int printColourMode;
|
||||||
|
|
||||||
bool hideSelection;
|
bool hideSelection;
|
||||||
bool inOverstrike;
|
bool inOverstrike;
|
||||||
@@ -69,6 +76,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
Surface pixmapLine;
|
Surface pixmapLine;
|
||||||
Surface pixmapSelMargin;
|
Surface pixmapSelMargin;
|
||||||
Surface pixmapSelPattern;
|
Surface pixmapSelPattern;
|
||||||
|
Surface pixmapIndentGuide;
|
||||||
|
Surface pixmapIndentGuideHighlight;
|
||||||
// Intellimouse support - currently only implemented for Windows
|
// Intellimouse support - currently only implemented for Windows
|
||||||
unsigned int ucWheelScrollLines;
|
unsigned int ucWheelScrollLines;
|
||||||
int cWheelDelta; //wheel delta from roll
|
int cWheelDelta; //wheel delta from roll
|
||||||
@@ -98,8 +107,8 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
bool needUpdateUI;
|
bool needUpdateUI;
|
||||||
Position braces[2];
|
Position braces[2];
|
||||||
int bracesMatchStyle;
|
int bracesMatchStyle;
|
||||||
|
int highlightGuideColumn;
|
||||||
|
|
||||||
int edgeState;
|
|
||||||
int theEdge;
|
int theEdge;
|
||||||
|
|
||||||
enum { notPainting, painting, paintAbandoned } paintState;
|
enum { notPainting, painting, paintAbandoned } paintState;
|
||||||
@@ -114,6 +123,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
enum { selStream, selRectangle, selRectangleFixed } selType;
|
enum { selStream, selRectangle, selRectangleFixed } selType;
|
||||||
int xStartSelect;
|
int xStartSelect;
|
||||||
int xEndSelect;
|
int xEndSelect;
|
||||||
|
bool primarySelection;
|
||||||
|
|
||||||
int caretPolicy;
|
int caretPolicy;
|
||||||
int caretSlop;
|
int caretSlop;
|
||||||
@@ -168,6 +178,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
void SetSelection(int currentPos_, int anchor_);
|
void SetSelection(int currentPos_, int anchor_);
|
||||||
void SetSelection(int currentPos_);
|
void SetSelection(int currentPos_);
|
||||||
void SetEmptySelection(int currentPos_);
|
void SetEmptySelection(int currentPos_);
|
||||||
|
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
||||||
int MovePositionTo(int newPos, bool extend = false);
|
int MovePositionTo(int newPos, bool extend = false);
|
||||||
int MovePositionSoVisible(int pos, int moveDir);
|
int MovePositionSoVisible(int pos, int moveDir);
|
||||||
void SetLastXChosen();
|
void SetLastXChosen();
|
||||||
@@ -183,10 +194,10 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
|
|
||||||
void PaintSelMargin(Surface *surface, PRectangle &rc);
|
void PaintSelMargin(Surface *surface, PRectangle &rc);
|
||||||
void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout &ll);
|
void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout &ll);
|
||||||
void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
|
void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
|
||||||
PRectangle rcLine, LineLayout &ll);
|
PRectangle rcLine, LineLayout &ll);
|
||||||
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
||||||
long FormatRange(bool draw, FORMATRANGE *pfr);
|
long FormatRange(bool draw, RangeToFormat *pfr);
|
||||||
|
|
||||||
virtual void SetVerticalScrollPos() = 0;
|
virtual void SetVerticalScrollPos() = 0;
|
||||||
virtual void SetHorizontalScrollPos() = 0;
|
virtual void SetHorizontalScrollPos() = 0;
|
||||||
@@ -199,6 +210,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
virtual void AddCharUTF(char *s, unsigned int len);
|
virtual void AddCharUTF(char *s, unsigned int len);
|
||||||
void ClearSelection();
|
void ClearSelection();
|
||||||
void ClearAll();
|
void ClearAll();
|
||||||
|
void ClearDocumentStyle();
|
||||||
void Cut();
|
void Cut();
|
||||||
void PasteRectangular(int pos, const char *ptr, int len);
|
void PasteRectangular(int pos, const char *ptr, int len);
|
||||||
virtual void Copy() = 0;
|
virtual void Copy() = 0;
|
||||||
@@ -216,6 +228,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
virtual void NotifyParent(SCNotification scn) = 0;
|
virtual void NotifyParent(SCNotification scn) = 0;
|
||||||
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
||||||
void NotifyChar(char ch);
|
void NotifyChar(char ch);
|
||||||
|
void NotifyMove(int position);
|
||||||
void NotifySavePoint(bool isSavePoint);
|
void NotifySavePoint(bool isSavePoint);
|
||||||
void NotifyModifyAttempt();
|
void NotifyModifyAttempt();
|
||||||
virtual void NotifyDoubleClick(Point pt, bool shift);
|
virtual void NotifyDoubleClick(Point pt, bool shift);
|
||||||
@@ -231,24 +244,25 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
|
|
||||||
|
|
||||||
#ifdef MACRO_SUPPORT
|
#ifdef MACRO_SUPPORT
|
||||||
void NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam);
|
void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void PageMove(int direction, bool extend=false);
|
void PageMove(int direction, bool extend=false);
|
||||||
void ChangeCaseOfSelection(bool makeUpperCase);
|
void ChangeCaseOfSelection(bool makeUpperCase);
|
||||||
void LineTranspose();
|
void LineTranspose();
|
||||||
virtual int KeyCommand(UINT iMessage);
|
virtual void CancelModes();
|
||||||
|
virtual int KeyCommand(unsigned int iMessage);
|
||||||
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
||||||
int KeyDown(int key, bool shift, bool ctrl, bool alt);
|
int KeyDown(int key, bool shift, bool ctrl, bool alt);
|
||||||
|
|
||||||
bool GetWhitespaceVisible();
|
int GetWhitespaceVisible();
|
||||||
void SetWhitespaceVisible(bool view);
|
void SetWhitespaceVisible(int view);
|
||||||
|
|
||||||
void Indent(bool forwards);
|
void Indent(bool forwards);
|
||||||
|
|
||||||
long FindText(UINT iMessage,WPARAM wParam,LPARAM lParam);
|
long FindText(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||||
void SearchAnchor();
|
void SearchAnchor();
|
||||||
long SearchText(UINT iMessage,WPARAM wParam,LPARAM lParam);
|
long SearchText(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||||
void GoToLine(int lineNo);
|
void GoToLine(int lineNo);
|
||||||
|
|
||||||
char *CopyRange(int start, int end);
|
char *CopyRange(int start, int end);
|
||||||
@@ -282,11 +296,11 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
|||||||
void ToggleContraction(int line);
|
void ToggleContraction(int line);
|
||||||
void EnsureLineVisible(int line);
|
void EnsureLineVisible(int line);
|
||||||
|
|
||||||
virtual LRESULT DefWndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) = 0;
|
virtual long DefWndProc(unsigned int iMessage, unsigned long wParam, long lParam) = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Public so scintilla_send_message can use it
|
// Public so scintilla_send_message can use it
|
||||||
virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
|
virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||||
// Public so scintilla_set_id can use it
|
// Public so scintilla_set_id can use it
|
||||||
int ctrlID;
|
int ctrlID;
|
||||||
};
|
};
|
||||||
|
@@ -28,7 +28,7 @@ void KeyMap::Clear() {
|
|||||||
alloc = 0;
|
alloc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyMap::AssignCmdKey(int key, int modifiers, UINT msg) {
|
void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) {
|
||||||
if ((len+1) >= alloc) {
|
if ((len+1) >= alloc) {
|
||||||
KeyToCommand *ktcNew = new KeyToCommand[alloc + 5];
|
KeyToCommand *ktcNew = new KeyToCommand[alloc + 5];
|
||||||
if (!ktcNew)
|
if (!ktcNew)
|
||||||
@@ -51,7 +51,7 @@ void KeyMap::AssignCmdKey(int key, int modifiers, UINT msg) {
|
|||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT KeyMap::Find(int key, int modifiers) {
|
unsigned int KeyMap::Find(int key, int modifiers) {
|
||||||
for (int i=0; i < len; i++) {
|
for (int i=0; i < len; i++) {
|
||||||
if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) {
|
if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) {
|
||||||
return kmap[i].msg;
|
return kmap[i].msg;
|
||||||
@@ -61,53 +61,55 @@ UINT KeyMap::Find(int key, int modifiers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
KeyToCommand KeyMap::MapDefault[] = {
|
KeyToCommand KeyMap::MapDefault[] = {
|
||||||
{VK_DOWN, SCI_NORM, SCI_LINEDOWN},
|
{SCK_DOWN, SCI_NORM, SCI_LINEDOWN},
|
||||||
{VK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND},
|
{SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND},
|
||||||
{VK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN},
|
{SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN},
|
||||||
{VK_UP, SCI_NORM, SCI_LINEUP},
|
{SCK_UP, SCI_NORM, SCI_LINEUP},
|
||||||
{VK_UP, SCI_SHIFT, SCI_LINEUPEXTEND},
|
{SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND},
|
||||||
{VK_UP, SCI_CTRL, SCI_LINESCROLLUP},
|
{SCK_UP, SCI_CTRL, SCI_LINESCROLLUP},
|
||||||
{VK_LEFT, SCI_NORM, SCI_CHARLEFT},
|
{SCK_LEFT, SCI_NORM, SCI_CHARLEFT},
|
||||||
{VK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND},
|
{SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND},
|
||||||
{VK_LEFT, SCI_CTRL, SCI_WORDLEFT},
|
{SCK_LEFT, SCI_CTRL, SCI_WORDLEFT},
|
||||||
{VK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND},
|
{SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND},
|
||||||
{VK_RIGHT, SCI_NORM, SCI_CHARRIGHT},
|
{SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT},
|
||||||
{VK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND},
|
{SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND},
|
||||||
{VK_RIGHT, SCI_CTRL, SCI_WORDRIGHT},
|
{SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT},
|
||||||
{VK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND},
|
{SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND},
|
||||||
{VK_HOME, SCI_NORM, SCI_VCHOME},
|
{SCK_HOME, SCI_NORM, SCI_VCHOME},
|
||||||
{VK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND},
|
{SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND},
|
||||||
{VK_HOME, SCI_CTRL, SCI_DOCUMENTSTART},
|
{SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART},
|
||||||
{VK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND},
|
{SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND},
|
||||||
{VK_END, SCI_NORM, SCI_LINEEND},
|
{SCK_END, SCI_NORM, SCI_LINEEND},
|
||||||
{VK_END, SCI_SHIFT, SCI_LINEENDEXTEND},
|
{SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND},
|
||||||
{VK_END, SCI_CTRL, SCI_DOCUMENTEND},
|
{SCK_END, SCI_CTRL, SCI_DOCUMENTEND},
|
||||||
{VK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND},
|
{SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND},
|
||||||
{VK_PRIOR, SCI_NORM, SCI_PAGEUP},
|
{SCK_PRIOR, SCI_NORM, SCI_PAGEUP},
|
||||||
{VK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND},
|
{SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND},
|
||||||
{VK_NEXT, SCI_NORM, SCI_PAGEDOWN},
|
{SCK_NEXT, SCI_NORM, SCI_PAGEDOWN},
|
||||||
{VK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND},
|
{SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND},
|
||||||
{VK_DELETE, SCI_NORM, WM_CLEAR},
|
{SCK_DELETE, SCI_NORM, SCI_CLEAR},
|
||||||
{VK_DELETE, SCI_SHIFT, WM_CUT},
|
{SCK_DELETE, SCI_SHIFT, SCI_CUT},
|
||||||
{VK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT},
|
{SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT},
|
||||||
{VK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE},
|
{SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE},
|
||||||
{VK_INSERT, SCI_SHIFT, WM_PASTE},
|
{SCK_INSERT, SCI_SHIFT, SCI_PASTE},
|
||||||
{VK_INSERT, SCI_CTRL, WM_COPY},
|
{SCK_INSERT, SCI_CTRL, SCI_COPY},
|
||||||
{VK_ESCAPE, SCI_NORM, SCI_CANCEL},
|
{SCK_ESCAPE, SCI_NORM, SCI_CANCEL},
|
||||||
{VK_BACK, SCI_NORM, SCI_DELETEBACK},
|
{SCK_BACK, SCI_NORM, SCI_DELETEBACK},
|
||||||
{VK_BACK, SCI_CTRL, SCI_DELWORDLEFT},
|
{SCK_BACK, SCI_SHIFT, SCI_DELETEBACK},
|
||||||
{'Z', SCI_CTRL, WM_UNDO},
|
{SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT},
|
||||||
|
{SCK_BACK, SCI_ALT, SCI_UNDO},
|
||||||
|
{'Z', SCI_CTRL, SCI_UNDO},
|
||||||
{'Y', SCI_CTRL, SCI_REDO},
|
{'Y', SCI_CTRL, SCI_REDO},
|
||||||
{'X', SCI_CTRL, WM_CUT},
|
{'X', SCI_CTRL, SCI_CUT},
|
||||||
{'C', SCI_CTRL, WM_COPY},
|
{'C', SCI_CTRL, SCI_COPY},
|
||||||
{'V', SCI_CTRL, WM_PASTE},
|
{'V', SCI_CTRL, SCI_PASTE},
|
||||||
{'A', SCI_CTRL, SCI_SELECTALL},
|
{'A', SCI_CTRL, SCI_SELECTALL},
|
||||||
{VK_TAB, SCI_NORM, SCI_TAB},
|
{SCK_TAB, SCI_NORM, SCI_TAB},
|
||||||
{VK_TAB, SCI_SHIFT, SCI_BACKTAB},
|
{SCK_TAB, SCI_SHIFT, SCI_BACKTAB},
|
||||||
{VK_RETURN, SCI_NORM, SCI_NEWLINE},
|
{SCK_RETURN, SCI_NORM, SCI_NEWLINE},
|
||||||
{VK_ADD, SCI_CTRL, SCI_ZOOMIN},
|
{SCK_ADD, SCI_CTRL, SCI_ZOOMIN},
|
||||||
{VK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT},
|
{SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT},
|
||||||
{VK_DIVIDE, SCI_CTRL, SCI_SETZOOM},
|
{SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM},
|
||||||
//'L', SCI_CTRL, SCI_FORMFEED,
|
//'L', SCI_CTRL, SCI_FORMFEED,
|
||||||
{'L', SCI_CTRL, SCI_LINECUT},
|
{'L', SCI_CTRL, SCI_LINECUT},
|
||||||
{'L', SCI_CSHIFT, SCI_LINEDELETE},
|
{'L', SCI_CSHIFT, SCI_LINEDELETE},
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
#define KEYTOCOMMAND_H
|
#define KEYTOCOMMAND_H
|
||||||
|
|
||||||
#define SCI_NORM 0
|
#define SCI_NORM 0
|
||||||
#define SCI_SHIFT SHIFT_PRESSED
|
#define SCI_SHIFT SCMOD_SHIFT
|
||||||
#define SCI_CTRL LEFT_CTRL_PRESSED
|
#define SCI_CTRL SCMOD_CTRL
|
||||||
#define SCI_ALT LEFT_ALT_PRESSED
|
#define SCI_ALT SCMOD_ALT
|
||||||
#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
|
#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
|
||||||
#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
|
#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ class KeyToCommand {
|
|||||||
public:
|
public:
|
||||||
int key;
|
int key;
|
||||||
int modifiers;
|
int modifiers;
|
||||||
UINT msg;
|
unsigned int msg;
|
||||||
};
|
};
|
||||||
|
|
||||||
class KeyMap {
|
class KeyMap {
|
||||||
@@ -29,8 +29,8 @@ public:
|
|||||||
KeyMap();
|
KeyMap();
|
||||||
~KeyMap();
|
~KeyMap();
|
||||||
void Clear();
|
void Clear();
|
||||||
void AssignCmdKey(int key, int modifiers, UINT msg);
|
void AssignCmdKey(int key, int modifiers, unsigned int msg);
|
||||||
UINT Find(int key, int modifiers); // 0 returned on failure
|
unsigned int Find(int key, int modifiers); // 0 returned on failure
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -19,14 +19,13 @@
|
|||||||
|
|
||||||
static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||||
char s[100];
|
char s[100];
|
||||||
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
|
|
||||||
bool wordIsUUID = false;
|
|
||||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||||
s[i] = styler[start + i];
|
s[i] = styler[start + i];
|
||||||
s[i + 1] = '\0';
|
s[i + 1] = '\0';
|
||||||
}
|
}
|
||||||
|
bool wordIsUUID = false;
|
||||||
char chAttr = SCE_C_IDENTIFIER;
|
char chAttr = SCE_C_IDENTIFIER;
|
||||||
if (wordIsNumber)
|
if (isdigit(s[0]) || (s[0] == '.'))
|
||||||
chAttr = SCE_C_NUMBER;
|
chAttr = SCE_C_NUMBER;
|
||||||
else {
|
else {
|
||||||
if (keywords.InList(s)) {
|
if (keywords.InList(s)) {
|
||||||
@@ -46,6 +45,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
styler.StartAt(startPos);
|
styler.StartAt(startPos);
|
||||||
|
|
||||||
bool fold = styler.GetPropertyInt("fold");
|
bool fold = styler.GetPropertyInt("fold");
|
||||||
|
bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor");
|
||||||
int lineCurrent = styler.GetLine(startPos);
|
int lineCurrent = styler.GetLine(startPos);
|
||||||
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
||||||
int levelCurrent = levelPrev;
|
int levelCurrent = levelPrev;
|
||||||
@@ -56,7 +56,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
char chPrev = ' ';
|
char chPrev = ' ';
|
||||||
char chNext = styler[startPos];
|
char chNext = styler[startPos];
|
||||||
unsigned int lengthDoc = startPos + length;
|
unsigned int lengthDoc = startPos + length;
|
||||||
int visChars = 0;
|
int visibleChars = 0;
|
||||||
styler.StartSegment(startPos);
|
styler.StartSegment(startPos);
|
||||||
bool lastWordWasUUID = false;
|
bool lastWordWasUUID = false;
|
||||||
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
||||||
@@ -64,6 +64,8 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
chNext = styler.SafeGetCharAt(i + 1);
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
|
||||||
if ((ch == '\r' && chNext != '\n') || (ch == '\n')) {
|
if ((ch == '\r' && chNext != '\n') || (ch == '\n')) {
|
||||||
|
// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)
|
||||||
|
// Avoid triggering two times on Dos/Win
|
||||||
// End of line
|
// End of line
|
||||||
if (state == SCE_C_STRINGEOL) {
|
if (state == SCE_C_STRINGEOL) {
|
||||||
styler.ColourTo(i, state);
|
styler.ColourTo(i, state);
|
||||||
@@ -71,18 +73,18 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
}
|
}
|
||||||
if (fold) {
|
if (fold) {
|
||||||
int lev = levelPrev;
|
int lev = levelPrev;
|
||||||
if (visChars == 0)
|
if (visibleChars == 0)
|
||||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||||
if ((levelCurrent > levelPrev) && (visChars > 0))
|
if ((levelCurrent > levelPrev) && (visibleChars > 0))
|
||||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||||
styler.SetLevel(lineCurrent, lev);
|
styler.SetLevel(lineCurrent, lev);
|
||||||
lineCurrent++;
|
lineCurrent++;
|
||||||
visChars = 0;
|
|
||||||
levelPrev = levelCurrent;
|
levelPrev = levelCurrent;
|
||||||
}
|
}
|
||||||
|
visibleChars = 0;
|
||||||
}
|
}
|
||||||
if (!isspace(ch))
|
if (!isspace(ch))
|
||||||
visChars++;
|
visibleChars++;
|
||||||
|
|
||||||
if (styler.IsLeadByte(ch)) {
|
if (styler.IsLeadByte(ch)) {
|
||||||
chNext = styler.SafeGetCharAt(i + 2);
|
chNext = styler.SafeGetCharAt(i + 2);
|
||||||
@@ -92,13 +94,19 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state == SCE_C_DEFAULT) {
|
if (state == SCE_C_DEFAULT) {
|
||||||
if (iswordstart(ch)) {
|
if (ch == '@' && chNext == '\"') {
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_C_VERBATIM;
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
} else if (iswordstart(ch) || (ch == '@')) {
|
||||||
styler.ColourTo(i-1, state);
|
styler.ColourTo(i-1, state);
|
||||||
if (lastWordWasUUID) {
|
if (lastWordWasUUID) {
|
||||||
state = SCE_C_UUID;
|
state = SCE_C_UUID;
|
||||||
lastWordWasUUID = false;
|
lastWordWasUUID = false;
|
||||||
} else {
|
} else {
|
||||||
state = SCE_C_WORD;
|
state = SCE_C_IDENTIFIER;
|
||||||
}
|
}
|
||||||
} else if (ch == '/' && chNext == '*') {
|
} else if (ch == '/' && chNext == '*') {
|
||||||
styler.ColourTo(i-1, state);
|
styler.ColourTo(i-1, state);
|
||||||
@@ -115,9 +123,16 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
} else if (ch == '\'') {
|
} else if (ch == '\'') {
|
||||||
styler.ColourTo(i-1, state);
|
styler.ColourTo(i-1, state);
|
||||||
state = SCE_C_CHARACTER;
|
state = SCE_C_CHARACTER;
|
||||||
} else if (ch == '#') {
|
} else if (ch == '#' && visibleChars == 1) {
|
||||||
|
// Preprocessor commands are alone on their line
|
||||||
styler.ColourTo(i-1, state);
|
styler.ColourTo(i-1, state);
|
||||||
state = SCE_C_PREPROCESSOR;
|
state = SCE_C_PREPROCESSOR;
|
||||||
|
// Skip whitespace between # and preprocessor word
|
||||||
|
do {
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
} while (isspace(ch) && (i < lengthDoc));
|
||||||
} else if (isoperator(ch)) {
|
} else if (isoperator(ch)) {
|
||||||
styler.ColourTo(i-1, state);
|
styler.ColourTo(i-1, state);
|
||||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||||
@@ -125,7 +140,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
levelCurrent += (ch == '{') ? 1 : -1;
|
levelCurrent += (ch == '{') ? 1 : -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (state == SCE_C_WORD) {
|
} else if (state == SCE_C_IDENTIFIER) {
|
||||||
if (!iswordchar(ch)) {
|
if (!iswordchar(ch)) {
|
||||||
lastWordWasUUID = classifyWordCpp(styler.GetStartSegment(), i - 1, keywords, styler);
|
lastWordWasUUID = classifyWordCpp(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||||
state = SCE_C_DEFAULT;
|
state = SCE_C_DEFAULT;
|
||||||
@@ -140,8 +155,6 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
state = SCE_C_STRING;
|
state = SCE_C_STRING;
|
||||||
} else if (ch == '\'') {
|
} else if (ch == '\'') {
|
||||||
state = SCE_C_CHARACTER;
|
state = SCE_C_CHARACTER;
|
||||||
} else if (ch == '#') {
|
|
||||||
state = SCE_C_PREPROCESSOR;
|
|
||||||
} else if (isoperator(ch)) {
|
} else if (isoperator(ch)) {
|
||||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||||
if ((ch == '{') || (ch == '}')) {
|
if ((ch == '{') || (ch == '}')) {
|
||||||
@@ -151,9 +164,16 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (state == SCE_C_PREPROCESSOR) {
|
if (state == SCE_C_PREPROCESSOR) {
|
||||||
if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) {
|
if (stylingWithinPreprocessor) {
|
||||||
styler.ColourTo(i-1, state);
|
if (isspace(ch)) {
|
||||||
state = SCE_C_DEFAULT;
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_C_DEFAULT;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) {
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_C_DEFAULT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (state == SCE_C_COMMENT) {
|
} else if (state == SCE_C_COMMENT) {
|
||||||
if (ch == '/' && chPrev == '*') {
|
if (ch == '/' && chPrev == '*') {
|
||||||
@@ -188,13 +208,10 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
} else if (ch == '\"') {
|
} else if (ch == '\"') {
|
||||||
styler.ColourTo(i, state);
|
styler.ColourTo(i, state);
|
||||||
state = SCE_C_DEFAULT;
|
state = SCE_C_DEFAULT;
|
||||||
i++;
|
} else if (chNext == '\r' || chNext == '\n') {
|
||||||
ch = chNext;
|
|
||||||
chNext = styler.SafeGetCharAt(i + 1);
|
|
||||||
} else if (chNext == '\r' || chNext == '\n') {
|
|
||||||
styler.ColourTo(i-1, SCE_C_STRINGEOL);
|
styler.ColourTo(i-1, SCE_C_STRINGEOL);
|
||||||
state = SCE_C_STRINGEOL;
|
state = SCE_C_STRINGEOL;
|
||||||
}
|
}
|
||||||
} else if (state == SCE_C_CHARACTER) {
|
} else if (state == SCE_C_CHARACTER) {
|
||||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
|
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
|
||||||
styler.ColourTo(i-1, SCE_C_STRINGEOL);
|
styler.ColourTo(i-1, SCE_C_STRINGEOL);
|
||||||
@@ -208,39 +225,26 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
|
|||||||
} else if (ch == '\'') {
|
} else if (ch == '\'') {
|
||||||
styler.ColourTo(i, state);
|
styler.ColourTo(i, state);
|
||||||
state = SCE_C_DEFAULT;
|
state = SCE_C_DEFAULT;
|
||||||
i++;
|
}
|
||||||
ch = chNext;
|
} else if (state == SCE_C_VERBATIM) {
|
||||||
chNext = styler.SafeGetCharAt(i + 1);
|
if (ch == '\"') {
|
||||||
|
if (chNext == '\"') {
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
} else {
|
||||||
|
styler.ColourTo(i, state);
|
||||||
|
state = SCE_C_DEFAULT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (state == SCE_C_UUID) {
|
} else if (state == SCE_C_UUID) {
|
||||||
if (ch == '\r' || ch == '\n' || ch == ')') {
|
if (ch == '\r' || ch == '\n' || ch == ')') {
|
||||||
styler.ColourTo(i-1, state);
|
styler.ColourTo(i-1, state);
|
||||||
|
if (ch == ')')
|
||||||
|
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||||
state = SCE_C_DEFAULT;
|
state = SCE_C_DEFAULT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state == SCE_C_DEFAULT) { // One of the above succeeded
|
|
||||||
if (ch == '/' && chNext == '*') {
|
|
||||||
if (styler.SafeGetCharAt(i + 2) == '*')
|
|
||||||
state = SCE_C_COMMENTDOC;
|
|
||||||
else
|
|
||||||
state = SCE_C_COMMENT;
|
|
||||||
} else if (ch == '/' && chNext == '/') {
|
|
||||||
state = SCE_C_COMMENTLINE;
|
|
||||||
} else if (ch == '\"') {
|
|
||||||
state = SCE_C_STRING;
|
|
||||||
} else if (ch == '\'') {
|
|
||||||
state = SCE_C_CHARACTER;
|
|
||||||
} else if (ch == '#') {
|
|
||||||
state = SCE_C_PREPROCESSOR;
|
|
||||||
} else if (iswordstart(ch)) {
|
|
||||||
state = SCE_C_WORD;
|
|
||||||
} else if (isoperator(ch)) {
|
|
||||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
|
||||||
if ((ch == '{') || (ch == '}')) {
|
|
||||||
levelCurrent += (ch == '{') ? 1 : -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
chPrev = ch;
|
chPrev = ch;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
298
contrib/src/stc/scintilla/src/LexLua.cxx
Normal file
298
contrib/src/stc/scintilla/src/LexLua.cxx
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
// LexLua.cxx - lexer for Lua language
|
||||||
|
// Written by Paul Winwood
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "Platform.h"
|
||||||
|
|
||||||
|
#include "PropSet.h"
|
||||||
|
#include "Accessor.h"
|
||||||
|
#include "KeyWords.h"
|
||||||
|
#include "Scintilla.h"
|
||||||
|
#include "SciLexer.h"
|
||||||
|
|
||||||
|
static void classifyWordLua(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler)
|
||||||
|
{
|
||||||
|
char s[100];
|
||||||
|
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++)
|
||||||
|
{
|
||||||
|
s[i] = styler[start + i];
|
||||||
|
s[i + 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
char chAttr = SCE_LUA_IDENTIFIER;
|
||||||
|
|
||||||
|
if (wordIsNumber)
|
||||||
|
chAttr = SCE_LUA_NUMBER;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (keywords.InList(s))
|
||||||
|
{
|
||||||
|
chAttr = SCE_LUA_WORD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
styler.ColourTo(end, chAttr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ColouriseLuaDoc(unsigned int startPos,
|
||||||
|
int length,
|
||||||
|
int initStyle,
|
||||||
|
WordList *keywordlists[],
|
||||||
|
Accessor &styler)
|
||||||
|
{
|
||||||
|
|
||||||
|
WordList &keywords = *keywordlists[0];
|
||||||
|
|
||||||
|
styler.StartAt(startPos);
|
||||||
|
styler.GetLine(startPos);
|
||||||
|
|
||||||
|
int state = initStyle;
|
||||||
|
char chPrev = ' ';
|
||||||
|
char chNext = styler[startPos];
|
||||||
|
unsigned int lengthDoc = startPos + length;
|
||||||
|
bool firstChar = true;
|
||||||
|
int literalString = 0;
|
||||||
|
|
||||||
|
styler.StartSegment(startPos);
|
||||||
|
for (unsigned int i = startPos; i <= lengthDoc; i++)
|
||||||
|
{
|
||||||
|
char ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
|
||||||
|
if (styler.IsLeadByte(ch))
|
||||||
|
{
|
||||||
|
chNext = styler.SafeGetCharAt(i + 2);
|
||||||
|
chPrev = ' ';
|
||||||
|
i += 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == SCE_LUA_STRINGEOL)
|
||||||
|
{
|
||||||
|
if (ch != '\r' && ch != '\n')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == SCE_LUA_LITERALSTRING && ch == '[' && chNext == '[')
|
||||||
|
{
|
||||||
|
literalString++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (state == SCE_LUA_DEFAULT)
|
||||||
|
{
|
||||||
|
if (ch == '-' && chNext == '-')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_COMMENTLINE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '[' && chNext == '[')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_LITERALSTRING;
|
||||||
|
literalString = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (iswordstart(ch))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_WORD;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\"')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_STRING;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\'')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_CHARACTER;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '$' && firstChar)
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_PREPROCESSOR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (isoperator(ch))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
styler.ColourTo(i, SCE_LUA_OPERATOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (state == SCE_LUA_WORD)
|
||||||
|
{
|
||||||
|
if (!iswordchar(ch))
|
||||||
|
{
|
||||||
|
classifyWordLua(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
if (ch == '[' && chNext == '[')
|
||||||
|
{
|
||||||
|
literalString = 1;
|
||||||
|
state = SCE_LUA_LITERALSTRING;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '-' && chNext == '-')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_COMMENTLINE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\"')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_STRING;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\'')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_CHARACTER;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '$' && firstChar)
|
||||||
|
{
|
||||||
|
state = SCE_LUA_PREPROCESSOR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (isoperator(ch))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i, SCE_LUA_OPERATOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (state == SCE_LUA_LITERALSTRING)
|
||||||
|
{
|
||||||
|
if (ch == ']' && (chPrev == ']') && (--literalString == 0))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i, state);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (state == SCE_LUA_PREPROCESSOR)
|
||||||
|
{
|
||||||
|
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (state == SCE_LUA_COMMENTLINE)
|
||||||
|
{
|
||||||
|
if (ch == '\r' || ch == '\n')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (state == SCE_LUA_STRING)
|
||||||
|
{
|
||||||
|
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_STRINGEOL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\\')
|
||||||
|
{
|
||||||
|
if (chNext == '\"' || chNext == '\\')
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\"')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i, state);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (state == SCE_LUA_CHARACTER)
|
||||||
|
{
|
||||||
|
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i-1, state);
|
||||||
|
state = SCE_LUA_STRINGEOL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\\')
|
||||||
|
{
|
||||||
|
if (chNext == '\'' || chNext == '\\')
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\'')
|
||||||
|
{
|
||||||
|
styler.ColourTo(i, state);
|
||||||
|
state = SCE_LUA_DEFAULT;
|
||||||
|
i++;
|
||||||
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == SCE_LUA_DEFAULT)
|
||||||
|
{
|
||||||
|
if (ch == '-' && chNext == '-')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_COMMENTLINE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\"')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_STRING;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '\'')
|
||||||
|
{
|
||||||
|
state = SCE_LUA_CHARACTER;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ch == '$' && firstChar)
|
||||||
|
{
|
||||||
|
state = SCE_LUA_PREPROCESSOR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (iswordstart(ch))
|
||||||
|
{
|
||||||
|
state = SCE_LUA_WORD;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (isoperator(ch))
|
||||||
|
{
|
||||||
|
styler.ColourTo(i, SCE_LUA_OPERATOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chPrev = ch;
|
||||||
|
firstChar = (ch == '\r' || ch == '\n');
|
||||||
|
}
|
||||||
|
styler.ColourTo(lengthDoc - 1, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc);
|
@@ -49,6 +49,46 @@ static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *
|
|||||||
ColouriseBatchLine(lineBuffer, startPos + length, styler);
|
ColouriseBatchLine(lineBuffer, startPos + length, styler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
|
||||||
|
// It is needed to remember the current state to recognize starting
|
||||||
|
// comment lines before the first "diff " or "--- ". If a real
|
||||||
|
// difference starts then each line starting with ' ' is a whitespace
|
||||||
|
// otherwise it is considered a comment (Only in..., Binary file...)
|
||||||
|
if (0 == strncmp(lineBuffer, "diff ", 3)) {
|
||||||
|
styler.ColourTo(endLine, 2);
|
||||||
|
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
|
||||||
|
styler.ColourTo(endLine, 3);
|
||||||
|
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
|
||||||
|
styler.ColourTo(endLine, 3);
|
||||||
|
} else if (lineBuffer[0] == '@') {
|
||||||
|
styler.ColourTo(endLine, 4);
|
||||||
|
} else if (lineBuffer[0] == '-') {
|
||||||
|
styler.ColourTo(endLine, 5);
|
||||||
|
} else if (lineBuffer[0] == '+') {
|
||||||
|
styler.ColourTo(endLine, 6);
|
||||||
|
} else if (lineBuffer[0] != ' ') {
|
||||||
|
styler.ColourTo(endLine, 1);
|
||||||
|
} else {
|
||||||
|
styler.ColourTo(endLine, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ColouriseDiffDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
|
||||||
|
char lineBuffer[1024];
|
||||||
|
styler.StartAt(startPos);
|
||||||
|
styler.StartSegment(startPos);
|
||||||
|
unsigned int linePos = 0;
|
||||||
|
for (unsigned int i = startPos; i < startPos + length; i++) {
|
||||||
|
lineBuffer[linePos++] = styler[i];
|
||||||
|
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
|
||||||
|
ColouriseDiffLine(lineBuffer, i, styler);
|
||||||
|
linePos = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (linePos > 0)
|
||||||
|
ColouriseDiffLine(lineBuffer, startPos + length, styler);
|
||||||
|
}
|
||||||
|
|
||||||
static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) {
|
static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
|
while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
|
||||||
@@ -126,15 +166,21 @@ static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[
|
|||||||
static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
|
static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
|
||||||
if (lineBuffer[0] == '>') {
|
if (lineBuffer[0] == '>') {
|
||||||
// Command or return status
|
// Command or return status
|
||||||
styler.ColourTo(endPos, 4);
|
styler.ColourTo(endPos, SCE_ERR_CMD);
|
||||||
} else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) {
|
} else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) {
|
||||||
styler.ColourTo(endPos, 1);
|
styler.ColourTo(endPos, SCE_ERR_PYTHON);
|
||||||
} else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) {
|
} else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) {
|
||||||
// Borland error message
|
// Borland error message
|
||||||
styler.ColourTo(endPos, 5);
|
styler.ColourTo(endPos, SCE_ERR_BORLAND);
|
||||||
} else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) {
|
} else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) {
|
||||||
// Borland warning message
|
// Borland warning message
|
||||||
styler.ColourTo(endPos, 5);
|
styler.ColourTo(endPos, SCE_ERR_BORLAND);
|
||||||
|
} else if (strstr(lineBuffer, " at " ) &&
|
||||||
|
strstr(lineBuffer, " at " ) < lineBuffer+lengthLine &&
|
||||||
|
strstr(lineBuffer, " line ") &&
|
||||||
|
strstr(lineBuffer, " line ") < lineBuffer+lengthLine) {
|
||||||
|
// perl error message
|
||||||
|
styler.ColourTo(endPos, SCE_ERR_PERL);
|
||||||
} else {
|
} else {
|
||||||
// Look for <filename>:<line>:message
|
// Look for <filename>:<line>:message
|
||||||
// Look for <filename>(line)message
|
// Look for <filename>(line)message
|
||||||
@@ -168,11 +214,11 @@ static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state == 3) {
|
if (state == 3) {
|
||||||
styler.ColourTo(endPos, 2);
|
styler.ColourTo(endPos, SCE_ERR_GCC);
|
||||||
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
||||||
styler.ColourTo(endPos, 3);
|
styler.ColourTo(endPos, SCE_ERR_MS);
|
||||||
} else {
|
} else {
|
||||||
styler.ColourTo(endPos, 0);
|
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,8 +343,9 @@ static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
styler.ColourTo(lengthDoc, state);
|
styler.ColourTo(lengthDoc, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc);
|
|
||||||
LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc);
|
|
||||||
LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc);
|
|
||||||
LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc);
|
LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc);
|
||||||
|
LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc);
|
||||||
|
LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc);
|
||||||
|
LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc);
|
||||||
|
LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc);
|
||||||
LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc);
|
LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc);
|
||||||
|
@@ -107,7 +107,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
state = SCE_PL_DEFAULT;
|
state = SCE_PL_DEFAULT;
|
||||||
}
|
}
|
||||||
styler.StartAt(startPos);
|
styler.StartAt(startPos);
|
||||||
char chPrev = ' ';
|
char chPrev = styler.SafeGetCharAt(startPos - 1);
|
||||||
char chNext = styler[startPos];
|
char chNext = styler[startPos];
|
||||||
styler.StartSegment(startPos);
|
styler.StartSegment(startPos);
|
||||||
for (int i = startPos; i < lengthDoc; i++) {
|
for (int i = startPos; i < lengthDoc; i++) {
|
||||||
@@ -230,7 +230,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
quotes = 0;
|
quotes = 0;
|
||||||
sookedpos = 0;
|
sookedpos = 0;
|
||||||
sooked[sookedpos] = '\0';
|
sooked[sookedpos] = '\0';
|
||||||
} else if (ch == '=' && isalpha(chNext)) {
|
} else if (ch == '=' && (chPrev == '\r' || chPrev == '\n') && isalpha(chNext)) {
|
||||||
styler.ColourTo(i - 1, state);
|
styler.ColourTo(i - 1, state);
|
||||||
state = SCE_PL_POD;
|
state = SCE_PL_POD;
|
||||||
quotes = 0;
|
quotes = 0;
|
||||||
@@ -284,7 +284,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
state = SCE_PL_DEFAULT;
|
state = SCE_PL_DEFAULT;
|
||||||
}
|
}
|
||||||
} else if (state == SCE_PL_HERE) {
|
} else if (state == SCE_PL_HERE) {
|
||||||
if (isalnum(ch) && quotes < 2) {
|
if ((isalnum(ch) || ch == '_') && quotes < 2) {
|
||||||
sooked[sookedpos++] = ch;
|
sooked[sookedpos++] = ch;
|
||||||
sooked[sookedpos] = '\0';
|
sooked[sookedpos] = '\0';
|
||||||
if (quotes == 0)
|
if (quotes == 0)
|
||||||
@@ -292,14 +292,17 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
} else {
|
} else {
|
||||||
quotes++;
|
quotes++;
|
||||||
}
|
}
|
||||||
if (quotes > 1 && isMatch(styler, lengthDoc, i, sooked) && (chPrev == '\n' || chPrev == '\r') ) {
|
if ((quotes > 1) &&
|
||||||
styler.ColourTo(i + sookedpos - 1, SCE_PL_HERE);
|
(chPrev == '\n' || chPrev == '\r') &&
|
||||||
|
isMatch(styler, lengthDoc, i, sooked)) {
|
||||||
i += sookedpos;
|
i += sookedpos;
|
||||||
chNext = styler.SafeGetCharAt(i);
|
chNext = styler.SafeGetCharAt(i);
|
||||||
if (chNext == '\n' || chNext == '\r') {
|
if (chNext == '\n' || chNext == '\r') {
|
||||||
|
styler.ColourTo(i - 1, SCE_PL_HERE);
|
||||||
state = SCE_PL_DEFAULT;
|
state = SCE_PL_DEFAULT;
|
||||||
}
|
}
|
||||||
chNext = ' ';
|
ch = chNext;
|
||||||
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
}
|
}
|
||||||
} else if (state == SCE_PL_STRING) {
|
} else if (state == SCE_PL_STRING) {
|
||||||
if (ch == '\\') {
|
if (ch == '\\') {
|
||||||
@@ -338,13 +341,13 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
chNext = styler.SafeGetCharAt(i + 1);
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
}
|
}
|
||||||
} else if (state == SCE_PL_POD) {
|
} else if (state == SCE_PL_POD) {
|
||||||
if (ch == '=') {
|
if (ch == '=' && (chPrev == '\r' || chPrev == '\n')) {
|
||||||
if (isMatch(styler, lengthDoc, i, "=cut")) {
|
if (isMatch(styler, lengthDoc, i, "=cut")) {
|
||||||
styler.ColourTo(i - 1 + 4, state);
|
styler.ColourTo(i - 1 + 4, state);
|
||||||
i += 4;
|
i += 4;
|
||||||
state = SCE_PL_DEFAULT;
|
state = SCE_PL_DEFAULT;
|
||||||
chNext = ' ';
|
ch = styler.SafeGetCharAt(i);
|
||||||
ch = ' ';
|
chNext = styler.SafeGetCharAt(i + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (state == SCE_PL_SCALAR) {
|
} else if (state == SCE_PL_SCALAR) {
|
||||||
@@ -409,7 +412,32 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
quoteDown = opposite(ch);
|
quoteDown = opposite(ch);
|
||||||
quotes++;
|
quotes++;
|
||||||
} else {
|
} else {
|
||||||
if (ch == quoteDown && chPrev != '\\') {
|
if (quotes == 0 && quoteRep == 1) {
|
||||||
|
/* We matched something like s(...) or tr{...}
|
||||||
|
* and are looking for the next matcher characters,
|
||||||
|
* which could be either bracketed ({...}) or non-bracketed
|
||||||
|
* (/.../).
|
||||||
|
*
|
||||||
|
* Number-signs are problematic. If they occur after
|
||||||
|
* the close of the first part, treat them like
|
||||||
|
* a quoteUp char, even if they actually start comments.
|
||||||
|
*
|
||||||
|
* If we find an alnum, we end the regsubst, and punt.
|
||||||
|
*
|
||||||
|
* Eric Promislow ericp@activestate.com Aug 9,2000
|
||||||
|
*/
|
||||||
|
if (isspace(ch)) {
|
||||||
|
// Keep going
|
||||||
|
} else if (isalnum(ch)) {
|
||||||
|
styler.ColourTo(i, state);
|
||||||
|
state = SCE_PL_DEFAULT;
|
||||||
|
ch = ' ';
|
||||||
|
} else {
|
||||||
|
quoteUp = ch;
|
||||||
|
quoteDown = opposite(ch);
|
||||||
|
quotes++;
|
||||||
|
}
|
||||||
|
} else if (ch == quoteDown && chPrev != '\\') {
|
||||||
quotes--;
|
quotes--;
|
||||||
if (quotes == 0) {
|
if (quotes == 0) {
|
||||||
quoteRep--;
|
quoteRep--;
|
||||||
|
@@ -33,6 +33,13 @@ static void ClassifyWordPy(unsigned int start, unsigned int end, WordList &keywo
|
|||||||
chAttr = SCE_P_NUMBER;
|
chAttr = SCE_P_NUMBER;
|
||||||
else if (keywords.InList(s))
|
else if (keywords.InList(s))
|
||||||
chAttr = SCE_P_WORD;
|
chAttr = SCE_P_WORD;
|
||||||
|
// make sure that dot-qualifiers inside the word are lexed correct
|
||||||
|
else for (unsigned int i = 0; i < end - start + 1; i++) {
|
||||||
|
if (styler[start + i] == '.') {
|
||||||
|
styler.ColourTo(start + i - 1, chAttr);
|
||||||
|
styler.ColourTo(start + i, SCE_P_OPERATOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
styler.ColourTo(end, chAttr);
|
styler.ColourTo(end, chAttr);
|
||||||
strcpy(prevWord, s);
|
strcpy(prevWord, s);
|
||||||
}
|
}
|
||||||
|
@@ -20,20 +20,21 @@
|
|||||||
static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||||
|
|
||||||
char s[100];
|
char s[100];
|
||||||
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
|
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') ||
|
||||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
(styler[start] == '&' && tolower(styler[start+1]) == 'h');
|
||||||
|
unsigned int i;
|
||||||
|
for (i = 0; i < end - start + 1 && i < 30; i++) {
|
||||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||||
s[i + 1] = '\0';
|
|
||||||
}
|
}
|
||||||
|
s[i] = '\0';
|
||||||
char chAttr = SCE_C_DEFAULT;
|
char chAttr = SCE_C_DEFAULT;
|
||||||
if (wordIsNumber)
|
if (wordIsNumber)
|
||||||
chAttr = SCE_C_NUMBER;
|
chAttr = SCE_C_NUMBER;
|
||||||
else {
|
else {
|
||||||
if (keywords.InList(s)) {
|
if (strcmp(s, "rem") == 0)
|
||||||
|
chAttr = SCE_C_COMMENTLINE;
|
||||||
|
else if (keywords.InList(s))
|
||||||
chAttr = SCE_C_WORD;
|
chAttr = SCE_C_WORD;
|
||||||
if (strcmp(s, "rem") == 0)
|
|
||||||
chAttr = SCE_C_COMMENTLINE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
styler.ColourTo(end, chAttr);
|
styler.ColourTo(end, chAttr);
|
||||||
if (chAttr == SCE_C_COMMENTLINE)
|
if (chAttr == SCE_C_COMMENTLINE)
|
||||||
@@ -49,6 +50,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
|
|
||||||
styler.StartAt(startPos);
|
styler.StartAt(startPos);
|
||||||
|
|
||||||
|
int visibleChars = 0;
|
||||||
int state = initStyle;
|
int state = initStyle;
|
||||||
char chNext = styler[startPos];
|
char chNext = styler[startPos];
|
||||||
styler.StartSegment(startPos);
|
styler.StartSegment(startPos);
|
||||||
@@ -63,6 +65,17 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ch == '\r' || ch == '\n') {
|
||||||
|
// End of line
|
||||||
|
if (state == SCE_C_COMMENTLINE || state == SCE_C_PREPROCESSOR) {
|
||||||
|
styler.ColourTo(i - 1, state);
|
||||||
|
state = SCE_C_DEFAULT;
|
||||||
|
}
|
||||||
|
visibleChars = 0;
|
||||||
|
}
|
||||||
|
if (!isspace(ch))
|
||||||
|
visibleChars++;
|
||||||
|
|
||||||
if (state == SCE_C_DEFAULT) {
|
if (state == SCE_C_DEFAULT) {
|
||||||
if (iswordstart(ch)) {
|
if (iswordstart(ch)) {
|
||||||
styler.ColourTo(i - 1, state);
|
styler.ColourTo(i - 1, state);
|
||||||
@@ -73,6 +86,16 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
} else if (ch == '\"') {
|
} else if (ch == '\"') {
|
||||||
styler.ColourTo(i - 1, state);
|
styler.ColourTo(i - 1, state);
|
||||||
state = SCE_C_STRING;
|
state = SCE_C_STRING;
|
||||||
|
} else if (ch == '#' && visibleChars == 1) {
|
||||||
|
// Preprocessor commands are alone on their line
|
||||||
|
styler.ColourTo(i - 1, state);
|
||||||
|
state = SCE_C_PREPROCESSOR;
|
||||||
|
} else if (ch == '&' && tolower(chNext) == 'h') {
|
||||||
|
styler.ColourTo(i - 1, state);
|
||||||
|
state = SCE_C_WORD;
|
||||||
|
} else if (isoperator(ch)) {
|
||||||
|
styler.ColourTo(i - 1, state);
|
||||||
|
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||||
}
|
}
|
||||||
} else if (state == SCE_C_WORD) {
|
} else if (state == SCE_C_WORD) {
|
||||||
if (!iswordchar(ch)) {
|
if (!iswordchar(ch)) {
|
||||||
@@ -82,16 +105,14 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
|
|||||||
state = SCE_C_COMMENTLINE;
|
state = SCE_C_COMMENTLINE;
|
||||||
} else if (ch == '\"') {
|
} else if (ch == '\"') {
|
||||||
state = SCE_C_STRING;
|
state = SCE_C_STRING;
|
||||||
|
} else if (isoperator(ch)) {
|
||||||
|
styler.ColourTo(i - 1, state);
|
||||||
|
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (state == SCE_C_COMMENTLINE) {
|
if (state == SCE_C_STRING) {
|
||||||
if (ch == '\r' || ch == '\n') {
|
|
||||||
styler.ColourTo(i - 1, state);
|
|
||||||
state = SCE_C_DEFAULT;
|
|
||||||
}
|
|
||||||
} else if (state == SCE_C_STRING) {
|
|
||||||
// VB doubles quotes to preserve them
|
// VB doubles quotes to preserve them
|
||||||
if (ch == '\"') {
|
if (ch == '\"') {
|
||||||
styler.ColourTo(i, state);
|
styler.ColourTo(i, state);
|
||||||
|
1181
contrib/src/stc/scintilla/src/PosRegExp.cxx
Normal file
1181
contrib/src/stc/scintilla/src/PosRegExp.cxx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,18 @@ bool EqualCaseInsensitive(const char *a, const char *b) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SString::size_type SString::npos = -1;
|
||||||
|
|
||||||
|
inline unsigned int HashString(const char *s) {
|
||||||
|
unsigned int ret = 0;
|
||||||
|
while (*s) {
|
||||||
|
ret <<= 4;
|
||||||
|
ret ^= *s;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
// Get a line of input. If end of line escaped with '\\' then continue reading.
|
// Get a line of input. If end of line escaped with '\\' then continue reading.
|
||||||
static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
|
static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
|
||||||
bool continuation = true;
|
bool continuation = true;
|
||||||
@@ -56,47 +68,39 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
|
|||||||
|
|
||||||
PropSet::PropSet() {
|
PropSet::PropSet() {
|
||||||
superPS = 0;
|
superPS = 0;
|
||||||
size = 10;
|
for (int root=0; root < hashRoots; root++)
|
||||||
used = 0;
|
props[root] = 0;
|
||||||
vals = new char * [size];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PropSet::~PropSet() {
|
PropSet::~PropSet() {
|
||||||
superPS = 0;
|
superPS = 0;
|
||||||
Clear();
|
Clear();
|
||||||
delete []vals;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PropSet::EnsureCanAddEntry() {
|
|
||||||
if (used >= size - 2) {
|
|
||||||
int newsize = size + 10;
|
|
||||||
char **newvals = new char * [newsize];
|
|
||||||
|
|
||||||
for (int i = 0; i < used; i++) {
|
|
||||||
newvals[i] = vals[i];
|
|
||||||
}
|
|
||||||
delete []vals;
|
|
||||||
vals = newvals;
|
|
||||||
size = newsize;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropSet::Set(const char *key, const char *val) {
|
void PropSet::Set(const char *key, const char *val) {
|
||||||
EnsureCanAddEntry();
|
unsigned int hash = HashString(key);
|
||||||
for (int i = 0; i < used; i += 2) {
|
for (Property *p=props[hash % hashRoots]; p; p=p->next) {
|
||||||
if (EqualCaseInsensitive(vals[i], key)) {
|
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
|
||||||
// Replace current value
|
// Replace current value
|
||||||
delete [](vals[i + 1]);
|
delete [](p->val);
|
||||||
vals[i + 1] = StringDup(val);
|
p->val = StringDup(val);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Not found
|
// Not found
|
||||||
vals[used++] = StringDup(key);
|
Property *pNew = new Property;
|
||||||
vals[used++] = StringDup(val);
|
if (pNew) {
|
||||||
|
pNew->hash = HashString(key);
|
||||||
|
pNew->key = StringDup(key);
|
||||||
|
pNew->val = StringDup(val);
|
||||||
|
pNew->next = props[hash % hashRoots];
|
||||||
|
props[hash % hashRoots] = pNew;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropSet::Set(char *keyval) {
|
void PropSet::Set(char *keyval) {
|
||||||
|
while (isspace(*keyval))
|
||||||
|
keyval++;
|
||||||
char *eqat = strchr(keyval, '=');
|
char *eqat = strchr(keyval, '=');
|
||||||
if (eqat) {
|
if (eqat) {
|
||||||
*eqat = '\0';
|
*eqat = '\0';
|
||||||
@@ -106,11 +110,12 @@ void PropSet::Set(char *keyval) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SString PropSet::Get(const char *key) {
|
SString PropSet::Get(const char *key) {
|
||||||
for (int i = 0; i < used; i += 2) {
|
unsigned int hash = HashString(key);
|
||||||
if (EqualCaseInsensitive(vals[i], key)) {
|
for (Property *p=props[hash % hashRoots]; p; p=p->next) {
|
||||||
return vals[i + 1];
|
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
|
||||||
}
|
return p->val;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (superPS) {
|
if (superPS) {
|
||||||
// Failed here, so try in base property set
|
// Failed here, so try in base property set
|
||||||
return superPS->Get(key);
|
return superPS->Get(key);
|
||||||
@@ -119,6 +124,36 @@ SString PropSet::Get(const char *key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SString PropSet::GetExpanded(const char *key) {
|
||||||
|
SString val = Get(key);
|
||||||
|
return Expand(val.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
SString PropSet::Expand(const char *withvars) {
|
||||||
|
char *base = StringDup(withvars);
|
||||||
|
char *cpvar = strstr(base, "$(");
|
||||||
|
while (cpvar) {
|
||||||
|
char *cpendvar = strchr(cpvar, ')');
|
||||||
|
if (cpendvar) {
|
||||||
|
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||||
|
char *var = StringDup(cpvar+2, lenvar);
|
||||||
|
SString val = GetExpanded(var);
|
||||||
|
int newlenbase = strlen(base) + val.length() - lenvar;
|
||||||
|
char *newbase = new char[newlenbase];
|
||||||
|
strncpy(newbase, base, cpvar - base);
|
||||||
|
strcpy(newbase + (cpvar - base), val.c_str());
|
||||||
|
strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1);
|
||||||
|
delete []var;
|
||||||
|
delete []base;
|
||||||
|
base = newbase;
|
||||||
|
}
|
||||||
|
cpvar = strstr(base, "$(");
|
||||||
|
}
|
||||||
|
SString sret = base;
|
||||||
|
delete []base;
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
|
||||||
int PropSet::GetInt(const char *key, int defaultValue) {
|
int PropSet::GetInt(const char *key, int defaultValue) {
|
||||||
SString val = Get(key);
|
SString val = Get(key);
|
||||||
if (val.length())
|
if (val.length())
|
||||||
@@ -127,9 +162,9 @@ int PropSet::GetInt(const char *key, int defaultValue) {
|
|||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isprefix(const char *target, const char *prefix) {
|
inline bool isprefix(const char *target, const char *prefix) {
|
||||||
while (*target && *prefix) {
|
while (*target && *prefix) {
|
||||||
if (toupper(*target) != toupper(*prefix))
|
if (*target != *prefix)
|
||||||
return false;
|
return false;
|
||||||
target++;
|
target++;
|
||||||
prefix++;
|
prefix++;
|
||||||
@@ -146,64 +181,63 @@ bool issuffix(const char *target, const char *suffix) {
|
|||||||
if (lensuffix > lentarget)
|
if (lensuffix > lentarget)
|
||||||
return false;
|
return false;
|
||||||
for (int i = lensuffix - 1; i >= 0; i--) {
|
for (int i = lensuffix - 1; i >= 0; i--) {
|
||||||
if (toupper(target[i + lentarget - lensuffix]) != toupper(suffix[i]))
|
if (target[i + lentarget - lensuffix] != suffix[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SString PropSet::GetWild(const char *keybase, const char *filename) {
|
SString PropSet::GetWild(const char *keybase, const char *filename) {
|
||||||
for (int i = 0; i < used; i += 2) {
|
for (int root=0; root < hashRoots; root++) {
|
||||||
if (isprefix(vals[i], keybase)) {
|
for (Property *p=props[root]; p; p=p->next) {
|
||||||
char *orgkeyfile = vals[i] + strlen(keybase);
|
if (isprefix(p->key, keybase)) {
|
||||||
char *keyfile = NULL;
|
char *orgkeyfile = p->key + strlen(keybase);
|
||||||
|
char *keyfile = NULL;
|
||||||
|
|
||||||
if (strstr(orgkeyfile, "$(") == orgkeyfile) {
|
if (strstr(orgkeyfile, "$(") == orgkeyfile) {
|
||||||
char *cpendvar = strchr(orgkeyfile, ')');
|
char *cpendvar = strchr(orgkeyfile, ')');
|
||||||
if (cpendvar) {
|
if (cpendvar) {
|
||||||
int lenvar = cpendvar - orgkeyfile - 2; // Subtract the $()
|
*cpendvar = '\0';
|
||||||
char *var = static_cast<char *>(malloc(lenvar + 1));
|
SString s = Get(orgkeyfile + 2);
|
||||||
strncpy(var, orgkeyfile + 2, lenvar);
|
*cpendvar= ')';
|
||||||
var[lenvar] = '\0';
|
keyfile = strdup(s.c_str());
|
||||||
SString s = Get(var);
|
}
|
||||||
free(var);
|
}
|
||||||
keyfile = strdup(s.c_str());
|
char *keyptr = keyfile;
|
||||||
}
|
|
||||||
}
|
|
||||||
char *keyptr = keyfile;
|
|
||||||
|
|
||||||
if (keyfile == NULL)
|
if (keyfile == NULL)
|
||||||
keyfile = orgkeyfile;
|
keyfile = orgkeyfile;
|
||||||
|
|
||||||
for (; ; ) {
|
for (; ; ) {
|
||||||
char *del = strchr(keyfile, ';');
|
char *del = strchr(keyfile, ';');
|
||||||
if (del == NULL)
|
if (del == NULL)
|
||||||
del = keyfile + strlen(keyfile);
|
del = keyfile + strlen(keyfile);
|
||||||
char delchr = *del;
|
char delchr = *del;
|
||||||
*del = '\0';
|
*del = '\0';
|
||||||
if (*keyfile == '*') {
|
if (*keyfile == '*') {
|
||||||
if (issuffix(filename, keyfile + 1)) {
|
if (issuffix(filename, keyfile + 1)) {
|
||||||
*del = delchr;
|
*del = delchr;
|
||||||
free(keyptr);
|
free(keyptr);
|
||||||
return vals[i + 1];
|
return p->val;
|
||||||
}
|
}
|
||||||
} else if (EqualCaseInsensitive(keyfile, filename)) {
|
} else if (0 == strcmp(keyfile, filename)) {
|
||||||
*del = delchr;
|
*del = delchr;
|
||||||
free(keyptr);
|
free(keyptr);
|
||||||
return vals[i + 1];
|
return p->val;
|
||||||
}
|
}
|
||||||
if (delchr == '\0')
|
if (delchr == '\0')
|
||||||
break;
|
break;
|
||||||
*del = delchr;
|
*del = delchr;
|
||||||
keyfile = del + 1;
|
keyfile = del + 1;
|
||||||
}
|
}
|
||||||
free(keyptr);
|
free(keyptr);
|
||||||
|
|
||||||
if (EqualCaseInsensitive(vals[i], keybase)) {
|
if (0 == strcmp(p->key, keybase)) {
|
||||||
return vals[i + 1];
|
return p->val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (superPS) {
|
if (superPS) {
|
||||||
// Failed here, so try in base property set
|
// Failed here, so try in base property set
|
||||||
return superPS->GetWild(keybase, filename);
|
return superPS->GetWild(keybase, filename);
|
||||||
@@ -219,9 +253,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) {
|
|||||||
char *cpendvar = strchr(cpvar, ')');
|
char *cpendvar = strchr(cpvar, ')');
|
||||||
if (cpendvar) {
|
if (cpendvar) {
|
||||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||||
char *var = new char[lenvar + 1];
|
char *var = StringDup(cpvar+2, lenvar);
|
||||||
strncpy(var, cpvar + 2, lenvar);
|
|
||||||
var[lenvar] = '\0';
|
|
||||||
SString val = GetWild(var, filename);
|
SString val = GetWild(var, filename);
|
||||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
int newlenbase = strlen(base) + val.length() - lenvar;
|
||||||
char *newbase = new char[newlenbase];
|
char *newbase = new char[newlenbase];
|
||||||
@@ -240,36 +272,54 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PropSet::Clear() {
|
void PropSet::Clear() {
|
||||||
for (int i = 0; i < used; i++) {
|
for (int root=0; root < hashRoots; root++) {
|
||||||
delete [](vals[i]);
|
Property *p=props[root];
|
||||||
vals[i] = 0;
|
while (p) {
|
||||||
}
|
Property *pNext=p->next;
|
||||||
used = 0;
|
p->hash = 0;
|
||||||
|
delete p->key;
|
||||||
|
p->key = 0;
|
||||||
|
delete p->val;
|
||||||
|
p->val = 0;
|
||||||
|
delete p;
|
||||||
|
p = pNext;
|
||||||
|
}
|
||||||
|
props[root] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropSet::ReadFromMemory(const char *data, int len) {
|
void PropSet::ReadFromMemory(const char *data, int len, const char *directoryForImports) {
|
||||||
if (len > 0) {
|
const char *pd = data;
|
||||||
const char *pd = data;
|
char linebuf[60000];
|
||||||
char linebuf[60000];
|
bool ifIsTrue = true;
|
||||||
while (GetFullLine(pd, len, linebuf, sizeof(linebuf))) {
|
while (len > 0) {
|
||||||
if (isalpha(linebuf[0]))
|
GetFullLine(pd, len, linebuf, sizeof(linebuf));
|
||||||
Set(linebuf);
|
if (isalpha(linebuf[0])) // If clause ends with first non-indented line
|
||||||
}
|
ifIsTrue = true;
|
||||||
// If there is a final line:
|
if (isprefix(linebuf, "if ")) {
|
||||||
if (isalpha(linebuf[0]))
|
const char *expr = linebuf + strlen("if") + 1;
|
||||||
|
ifIsTrue = GetInt(expr);
|
||||||
|
} else if (isprefix(linebuf, "import ") && directoryForImports) {
|
||||||
|
char importPath[1024];
|
||||||
|
strcpy(importPath, directoryForImports);
|
||||||
|
strcat(importPath, linebuf + strlen("import") + 1);
|
||||||
|
strcat(importPath, ".properties");
|
||||||
|
Read(importPath,directoryForImports);
|
||||||
|
} else if (isalpha(linebuf[0])) {
|
||||||
Set(linebuf);
|
Set(linebuf);
|
||||||
|
} else if (isspace(linebuf[0]) && ifIsTrue) {
|
||||||
|
Set(linebuf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropSet::Read(const char *filename) {
|
void PropSet::Read(const char *filename, const char *directoryForImports) {
|
||||||
//printf("Opening properties <%s>\n", filename);
|
|
||||||
Clear();
|
|
||||||
char propsData[60000];
|
char propsData[60000];
|
||||||
FILE *rcfile = fopen(filename, "rb");
|
FILE *rcfile = fopen(filename, "rb");
|
||||||
if (rcfile) {
|
if (rcfile) {
|
||||||
int lenFile = fread(propsData, 1, sizeof(propsData), rcfile);
|
int lenFile = fread(propsData, 1, sizeof(propsData), rcfile);
|
||||||
fclose(rcfile);
|
fclose(rcfile);
|
||||||
ReadFromMemory(propsData, lenFile);
|
ReadFromMemory(propsData, lenFile, directoryForImports);
|
||||||
} else {
|
} else {
|
||||||
//printf("Could not open <%s>\n", filename);
|
//printf("Could not open <%s>\n", filename);
|
||||||
}
|
}
|
||||||
@@ -285,7 +335,8 @@ static bool iswordsep(char ch, bool onlyLineEnds) {
|
|||||||
|
|
||||||
// Creates an array that points into each word in the string and puts \0 terminators
|
// Creates an array that points into each word in the string and puts \0 terminators
|
||||||
// after each word.
|
// after each word.
|
||||||
static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) {
|
static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) {
|
||||||
|
#if 1
|
||||||
char prev = '\n';
|
char prev = '\n';
|
||||||
int words = 0;
|
int words = 0;
|
||||||
for (int j = 0; wordlist[j]; j++) {
|
for (int j = 0; wordlist[j]; j++) {
|
||||||
@@ -297,8 +348,8 @@ static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) {
|
|||||||
if (keywords) {
|
if (keywords) {
|
||||||
words = 0;
|
words = 0;
|
||||||
prev = '\0';
|
prev = '\0';
|
||||||
int len = strlen(wordlist);
|
int slen = strlen(wordlist);
|
||||||
for (int k = 0; k < len; k++) {
|
for (int k = 0; k < slen; k++) {
|
||||||
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
||||||
if (!prev) {
|
if (!prev) {
|
||||||
keywords[words] = &wordlist[k];
|
keywords[words] = &wordlist[k];
|
||||||
@@ -309,25 +360,69 @@ static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) {
|
|||||||
}
|
}
|
||||||
prev = wordlist[k];
|
prev = wordlist[k];
|
||||||
}
|
}
|
||||||
keywords[words] = &wordlist[len];
|
keywords[words] = &wordlist[slen];
|
||||||
|
*len = words;
|
||||||
|
} else {
|
||||||
|
*len = 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
int words = 0; // length of the returned buffer of pointers
|
||||||
|
#undef APICHUNK // how many pointers will be pre-allocated (to avoid buffer reallocation on each new pointer)
|
||||||
|
#define APICHUNK 256
|
||||||
|
int size = APICHUNK; // real size of the returned buffer of pointers
|
||||||
|
char **keywords; // buffer for the pointers returned
|
||||||
|
int slen = strlen(wordlist); //length of the buffer with api file
|
||||||
|
keywords = (char**) malloc((size + 1) * sizeof (*keywords));
|
||||||
|
words = 0;
|
||||||
|
for (int k = 0;;) {
|
||||||
|
while (iswordsep(wordlist[k], onlyLineEnds))
|
||||||
|
wordlist[k++] = '\0';
|
||||||
|
if (k >= slen)
|
||||||
|
break;
|
||||||
|
if (words >= size) {
|
||||||
|
do
|
||||||
|
size += APICHUNK;
|
||||||
|
while (size <= words);
|
||||||
|
keywords = (char**) realloc(keywords, (size + 1) * sizeof (*keywords));
|
||||||
|
}
|
||||||
|
keywords[words++] = wordlist + k;
|
||||||
|
do
|
||||||
|
if (k < slen)
|
||||||
|
k++;
|
||||||
|
else
|
||||||
|
goto out;
|
||||||
|
while (!iswordsep(wordlist[k], onlyLineEnds));
|
||||||
|
}
|
||||||
|
out:
|
||||||
|
keywords[words] = wordlist + slen;
|
||||||
|
*len = words;
|
||||||
|
#endif
|
||||||
return keywords;
|
return keywords;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WordList::Clear() {
|
void WordList::Clear() {
|
||||||
if (words) {
|
if (words) {
|
||||||
delete []words;
|
|
||||||
delete []list;
|
delete []list;
|
||||||
|
#if 1
|
||||||
|
delete []words;
|
||||||
|
#else
|
||||||
|
free(words);
|
||||||
|
#endif
|
||||||
|
free(wordsNoCase);
|
||||||
}
|
}
|
||||||
words = 0;
|
words = 0;
|
||||||
|
wordsNoCase = 0;
|
||||||
list = 0;
|
list = 0;
|
||||||
len = 0;
|
len = 0;
|
||||||
|
sorted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WordList::Set(const char *s) {
|
void WordList::Set(const char *s) {
|
||||||
len = 0;
|
|
||||||
list = StringDup(s);
|
list = StringDup(s);
|
||||||
words = ArrayFromWordList(list, onlyLineEnds);
|
sorted = false;
|
||||||
|
words = ArrayFromWordList(list, &len, onlyLineEnds);
|
||||||
|
wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase));
|
||||||
|
memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
|
||||||
}
|
}
|
||||||
|
|
||||||
char *WordList::Allocate(int size) {
|
char *WordList::Allocate(int size) {
|
||||||
@@ -337,45 +432,35 @@ char *WordList::Allocate(int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WordList::SetFromAllocated() {
|
void WordList::SetFromAllocated() {
|
||||||
len = 0;
|
sorted = false;
|
||||||
words = ArrayFromWordList(list, onlyLineEnds);
|
words = ArrayFromWordList(list, &len, onlyLineEnds);
|
||||||
|
wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase));
|
||||||
|
memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shell sort based upon public domain C implementation by Raymond Gardner 1991
|
int cmpString(const void *a1, const void *a2) {
|
||||||
// Used here because of problems with mingw qsort.
|
// Can't work out the correct incantation to use modern casts here
|
||||||
static void SortWordList(char **words, unsigned int len) {
|
return strcmp(*(char**)(a1), *(char**)(a2));
|
||||||
unsigned int gap = len / 2;
|
|
||||||
|
|
||||||
while (gap > 0) {
|
|
||||||
unsigned int i = gap;
|
|
||||||
while (i < len) {
|
|
||||||
unsigned int j = i;
|
|
||||||
char **a = words + j;
|
|
||||||
do {
|
|
||||||
j -= gap;
|
|
||||||
char **b = a;
|
|
||||||
a -= gap;
|
|
||||||
if (strcmp(*a, *b) > 0) {
|
|
||||||
char *tmp = *a;
|
|
||||||
*a = *b;
|
|
||||||
*b = tmp;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while (j >= gap);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
gap = gap / 2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cmpStringNoCase(const void *a1, const void *a2) {
|
||||||
|
// Can't work out the correct incantation to use modern casts here
|
||||||
|
return strcasecmp(*(char**)(a1), *(char**)(a2));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SortWordList(char **words, char **wordsNoCase, unsigned int len) {
|
||||||
|
qsort(reinterpret_cast<void*>(words), len, sizeof(*words),
|
||||||
|
cmpString);
|
||||||
|
qsort(reinterpret_cast<void*>(wordsNoCase), len, sizeof(*wordsNoCase),
|
||||||
|
cmpStringNoCase);
|
||||||
|
}
|
||||||
|
|
||||||
bool WordList::InList(const char *s) {
|
bool WordList::InList(const char *s) {
|
||||||
if (0 == words)
|
if (0 == words)
|
||||||
return false;
|
return false;
|
||||||
if (len == 0) {
|
if (!sorted) {
|
||||||
for (int i = 0; words[i][0]; i++)
|
sorted = true;
|
||||||
len++;
|
SortWordList(words, wordsNoCase, len);
|
||||||
SortWordList(words, len);
|
|
||||||
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
||||||
starts[k] = -1;
|
starts[k] = -1;
|
||||||
for (int l = len - 1; l >= 0; l--) {
|
for (int l = len - 1; l >= 0; l--) {
|
||||||
@@ -402,3 +487,256 @@ bool WordList::InList(const char *s) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an element (complete) of the wordlist array which has the beginning
|
||||||
|
* the same as the passed string. The length of the word to compare is passed
|
||||||
|
* too. Letter case can be ignored or preserved (default).
|
||||||
|
*/
|
||||||
|
const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) {
|
||||||
|
int start = 0; // lower bound of the api array block to search
|
||||||
|
int end = len - 1; // upper bound of the api array block to search
|
||||||
|
int pivot; // index of api array element just being compared
|
||||||
|
int cond; // comparison result (in the sense of strcmp() result)
|
||||||
|
const char *word; // api array element just being compared
|
||||||
|
|
||||||
|
if (0 == words)
|
||||||
|
return NULL;
|
||||||
|
if (!sorted) {
|
||||||
|
sorted = true;
|
||||||
|
SortWordList(words, wordsNoCase, len);
|
||||||
|
}
|
||||||
|
if (ignoreCase)
|
||||||
|
while (start <= end) { // binary searching loop
|
||||||
|
pivot = (start + end) >> 1;
|
||||||
|
word = wordsNoCase[pivot];
|
||||||
|
cond = strncasecmp(wordStart, word, searchLen);
|
||||||
|
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
|
||||||
|
return word; // result must not be freed with free()
|
||||||
|
else if (cond < 0)
|
||||||
|
end = pivot - 1;
|
||||||
|
else if (cond > 0)
|
||||||
|
start = pivot + 1;
|
||||||
|
}
|
||||||
|
else // preserve the letter case
|
||||||
|
while (start <= end) { // binary searching loop
|
||||||
|
pivot = (start + end) >> 1;
|
||||||
|
word = words[pivot];
|
||||||
|
cond = strncmp(wordStart, word, searchLen);
|
||||||
|
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
|
||||||
|
return word; // result must not be freed with free()
|
||||||
|
else if (cond >= 0)
|
||||||
|
start = pivot + 1;
|
||||||
|
else if (cond < 0)
|
||||||
|
end = pivot - 1;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns elements (first words of them) of the wordlist array which have
|
||||||
|
* the beginning the same as the passed string. The length of the word to
|
||||||
|
* compare is passed too. Letter case can be ignored or preserved (default).
|
||||||
|
* If there are more words meeting the condition they are returned all of
|
||||||
|
* them in the ascending order separated with spaces.
|
||||||
|
*
|
||||||
|
* NOTE: returned buffer has to be freed with a free() call.
|
||||||
|
*/
|
||||||
|
char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) {
|
||||||
|
int wordlen; // length of the word part (before the '(' brace) of the api array element
|
||||||
|
int length = 0; // length of the returned buffer of words (string)
|
||||||
|
int newlength; // length of the new buffer before the reallocating itself
|
||||||
|
#undef WORDCHUNK // how many characters will be pre-allocated (to avoid buffer reallocation on each new word)
|
||||||
|
#define WORDCHUNK 100
|
||||||
|
int size = WORDCHUNK; // real size of the returned buffer of words
|
||||||
|
char *buffer; // buffer for the words returned
|
||||||
|
int start = 0; // lower bound of the api array block to search
|
||||||
|
int end = len - 1; // upper bound of the api array block to search
|
||||||
|
int pivot; // index of api array element just being compared
|
||||||
|
int cond; // comparison result (in the sense of strcmp() result)
|
||||||
|
int oldpivot; // pivot storage to be able to browse the api array upwards and then downwards
|
||||||
|
const char *word; // api array element just being compared
|
||||||
|
const char *brace; // position of the opening brace in the api array element just being compared
|
||||||
|
|
||||||
|
if (0 == words)
|
||||||
|
return NULL;
|
||||||
|
if (!sorted) {
|
||||||
|
sorted = true;
|
||||||
|
SortWordList(words, wordsNoCase, len);
|
||||||
|
}
|
||||||
|
buffer = (char*) malloc(size);
|
||||||
|
*buffer = '\0';
|
||||||
|
if (ignoreCase)
|
||||||
|
while (start <= end) { // binary searching loop
|
||||||
|
pivot = (start + end) >> 1;
|
||||||
|
word = wordsNoCase[pivot];
|
||||||
|
cond = strncasecmp(wordStart, word, searchLen);
|
||||||
|
if (!cond) {
|
||||||
|
oldpivot = pivot;
|
||||||
|
do { // browse sequentially the rest after the hit
|
||||||
|
brace = strchr(word, '(');
|
||||||
|
if (brace)
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
else {
|
||||||
|
brace = word + strlen(word);
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
}
|
||||||
|
wordlen = brace - word + 1;
|
||||||
|
newlength = length + wordlen; // stretch the buffer
|
||||||
|
if (length)
|
||||||
|
newlength++;
|
||||||
|
if (newlength >= size) {
|
||||||
|
do
|
||||||
|
size += WORDCHUNK;
|
||||||
|
while (size <= newlength);
|
||||||
|
buffer = (char*) realloc(buffer, size);
|
||||||
|
}
|
||||||
|
if (length) // append a new entry
|
||||||
|
buffer[length++] = ' ';
|
||||||
|
memcpy(buffer + length, word, wordlen);
|
||||||
|
length = newlength;
|
||||||
|
buffer[length] = '\0';
|
||||||
|
if (++pivot > end)
|
||||||
|
break;
|
||||||
|
word = wordsNoCase[pivot];
|
||||||
|
} while (!strncasecmp(wordStart, word, searchLen));
|
||||||
|
|
||||||
|
pivot = oldpivot;
|
||||||
|
for (;;) { // browse sequentially the rest before the hit
|
||||||
|
if (--pivot < start)
|
||||||
|
break;
|
||||||
|
word = wordsNoCase[pivot];
|
||||||
|
if (strncasecmp(wordStart, word, searchLen))
|
||||||
|
break;
|
||||||
|
brace = strchr(word, '(');
|
||||||
|
if (brace)
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
else {
|
||||||
|
brace = word + strlen(word);
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
}
|
||||||
|
wordlen = brace - word + 1;
|
||||||
|
newlength = length + wordlen; // stretch the buffer
|
||||||
|
if (length)
|
||||||
|
newlength++;
|
||||||
|
if (newlength >= size)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
size += WORDCHUNK;
|
||||||
|
while (size <= newlength);
|
||||||
|
buffer = (char*) realloc(buffer, size);
|
||||||
|
}
|
||||||
|
if (length) // append a new entry
|
||||||
|
buffer[length++] = ' ';
|
||||||
|
memcpy(buffer + length, word, wordlen);
|
||||||
|
length = newlength;
|
||||||
|
buffer[length] = '\0';
|
||||||
|
}
|
||||||
|
return buffer; // result has to be freed with free()
|
||||||
|
}
|
||||||
|
else if (cond < 0)
|
||||||
|
end = pivot - 1;
|
||||||
|
else if (cond > 0)
|
||||||
|
start = pivot + 1;
|
||||||
|
}
|
||||||
|
else // preserve the letter case
|
||||||
|
while (start <= end) { // binary searching loop
|
||||||
|
pivot = (start + end) >> 1;
|
||||||
|
word = words[pivot];
|
||||||
|
cond = strncmp(wordStart, word, searchLen);
|
||||||
|
if (!cond) {
|
||||||
|
oldpivot = pivot;
|
||||||
|
do { // browse sequentially the rest after the hit
|
||||||
|
brace = strchr(word, '(');
|
||||||
|
if (brace)
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
else {
|
||||||
|
brace = word + strlen(word);
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
}
|
||||||
|
wordlen = brace - word + 1;
|
||||||
|
newlength = length + wordlen; // stretch the buffer
|
||||||
|
if (length)
|
||||||
|
newlength++;
|
||||||
|
if (newlength >= size)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
size += WORDCHUNK;
|
||||||
|
while (size <= newlength);
|
||||||
|
buffer = (char*) realloc(buffer, size);
|
||||||
|
}
|
||||||
|
if (length) // append a new entry
|
||||||
|
buffer[length++] = ' ';
|
||||||
|
memcpy(buffer + length, word, wordlen);
|
||||||
|
length = newlength;
|
||||||
|
buffer[length] = '\0';
|
||||||
|
if (++pivot > end)
|
||||||
|
break;
|
||||||
|
word = words[pivot];
|
||||||
|
} while (!strncmp(wordStart, word, searchLen));
|
||||||
|
|
||||||
|
pivot = oldpivot;
|
||||||
|
for (;;) { // browse sequentially the rest before the hit
|
||||||
|
if (--pivot < start)
|
||||||
|
break;
|
||||||
|
word = words[pivot];
|
||||||
|
if (strncmp(wordStart, word, searchLen))
|
||||||
|
break;
|
||||||
|
brace = strchr(word, '(');
|
||||||
|
if (brace)
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
else {
|
||||||
|
brace = word + strlen(word);
|
||||||
|
do
|
||||||
|
if (--brace < word)
|
||||||
|
break;
|
||||||
|
while (isspace(*brace));
|
||||||
|
}
|
||||||
|
wordlen = brace - word + 1;
|
||||||
|
newlength = length + wordlen; // stretch the buffer
|
||||||
|
if (length)
|
||||||
|
newlength++;
|
||||||
|
if (newlength >= size)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
size += WORDCHUNK;
|
||||||
|
while (size <= newlength);
|
||||||
|
buffer = (char*) realloc(buffer, size);
|
||||||
|
}
|
||||||
|
if (length) // append a new entry
|
||||||
|
buffer[length++] = ' ';
|
||||||
|
memcpy(buffer + length, word, wordlen);
|
||||||
|
length = newlength;
|
||||||
|
buffer[length] = '\0';
|
||||||
|
}
|
||||||
|
return buffer; // result has to be freed with free()
|
||||||
|
}
|
||||||
|
else if (cond < 0)
|
||||||
|
end = pivot - 1;
|
||||||
|
else if (cond > 0)
|
||||||
|
start = pivot + 1;
|
||||||
|
}
|
||||||
|
free(buffer);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
@@ -6,13 +6,12 @@
|
|||||||
#ifndef SVECTOR_H
|
#ifndef SVECTOR_H
|
||||||
#define SVECTOR_H
|
#define SVECTOR_H
|
||||||
|
|
||||||
// A simple expandable vector.
|
// A simple expandable integer vector.
|
||||||
// T must support assignment.
|
|
||||||
// Storage not allocated for elements until an element is used.
|
// Storage not allocated for elements until an element is used.
|
||||||
// This makes it very lightweight unless used so is a good match for optional features.
|
// This makes it very lightweight unless used so is a good match for optional features.
|
||||||
template<class T, int sizeIncrement>
|
|
||||||
class SVector {
|
class SVector {
|
||||||
T *v;
|
int *v;
|
||||||
unsigned int size; // Number of elements allocated
|
unsigned int size; // Number of elements allocated
|
||||||
unsigned int len; // Number of elements in vector
|
unsigned int len; // Number of elements in vector
|
||||||
bool allocFailure; // A memory allocation call has failed
|
bool allocFailure; // A memory allocation call has failed
|
||||||
@@ -20,19 +19,23 @@ class SVector {
|
|||||||
// Internally allocate more elements than the user wants to avoid
|
// Internally allocate more elements than the user wants to avoid
|
||||||
// thrashng the memory allocator
|
// thrashng the memory allocator
|
||||||
void SizeTo(int newSize) {
|
void SizeTo(int newSize) {
|
||||||
if (newSize < sizeIncrement)
|
if (newSize < 4000)
|
||||||
newSize += sizeIncrement;
|
newSize += 4000;
|
||||||
else
|
else
|
||||||
newSize = (newSize * 3) / 2;
|
newSize = (newSize * 3) / 2;
|
||||||
T* newv = new T[newSize];
|
int* newv = new int[newSize];
|
||||||
if (!newv) {
|
if (!newv) {
|
||||||
allocFailure = true;
|
allocFailure = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
size = newSize;
|
size = newSize;
|
||||||
for (unsigned int i=0; i<len; i++) {
|
unsigned int i=0;
|
||||||
|
for (; i<len; i++) {
|
||||||
newv[i] = v[i];
|
newv[i] = v[i];
|
||||||
}
|
}
|
||||||
|
for (; i<size; i++) {
|
||||||
|
newv[i] = 0;
|
||||||
|
}
|
||||||
delete []v;
|
delete []v;
|
||||||
v = newv;
|
v = newv;
|
||||||
}
|
}
|
||||||
@@ -79,7 +82,7 @@ public:
|
|||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
T &operator[](unsigned int i) {
|
int &operator[](unsigned int i) {
|
||||||
if (i >= len) {
|
if (i >= len) {
|
||||||
if (i >= size) {
|
if (i >= size) {
|
||||||
SizeTo(i);
|
SizeTo(i);
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
|
|
||||||
#include "Scintilla.h"
|
#include "Scintilla.h"
|
||||||
|
#include "PropSet.h"
|
||||||
#ifdef SCI_LEXER
|
#ifdef SCI_LEXER
|
||||||
#include "SciLexer.h"
|
#include "SciLexer.h"
|
||||||
#include "PropSet.h"
|
|
||||||
#include "Accessor.h"
|
#include "Accessor.h"
|
||||||
#include "WindowAccessor.h"
|
#include "WindowAccessor.h"
|
||||||
#include "DocumentAccessor.h"
|
#include "DocumentAccessor.h"
|
||||||
@@ -41,9 +41,15 @@ ScintillaBase::ScintillaBase() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ScintillaBase::~ScintillaBase() {}
|
ScintillaBase::~ScintillaBase() {
|
||||||
|
#ifdef SCI_LEXER
|
||||||
|
for (int wl=0;wl<numWordLists;wl++)
|
||||||
|
delete keyWordLists[wl];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void ScintillaBase::Finalise() {
|
void ScintillaBase::Finalise() {
|
||||||
|
Editor::Finalise();
|
||||||
popup.Destroy();
|
popup.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +60,8 @@ void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) {
|
|||||||
|
|
||||||
void ScintillaBase::AddCharUTF(char *s, unsigned int len) {
|
void ScintillaBase::AddCharUTF(char *s, unsigned int len) {
|
||||||
bool acActiveBeforeCharAdded = ac.Active();
|
bool acActiveBeforeCharAdded = ac.Active();
|
||||||
Editor::AddCharUTF(s, len);
|
if (!acActiveBeforeCharAdded || !ac.IsFillUpChar(*s))
|
||||||
|
Editor::AddCharUTF(s, len);
|
||||||
if (acActiveBeforeCharAdded)
|
if (acActiveBeforeCharAdded)
|
||||||
AutoCompleteChanged(s[0]);
|
AutoCompleteChanged(s[0]);
|
||||||
}
|
}
|
||||||
@@ -70,7 +77,7 @@ void ScintillaBase::Command(int cmdId) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdUndo:
|
case idcmdUndo:
|
||||||
WndProc(WM_UNDO, 0, 0);
|
WndProc(SCI_UNDO, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdRedo:
|
case idcmdRedo:
|
||||||
@@ -78,19 +85,19 @@ void ScintillaBase::Command(int cmdId) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdCut:
|
case idcmdCut:
|
||||||
WndProc(WM_CUT, 0, 0);
|
WndProc(SCI_CUT, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdCopy:
|
case idcmdCopy:
|
||||||
WndProc(WM_COPY, 0, 0);
|
WndProc(SCI_COPY, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdPaste:
|
case idcmdPaste:
|
||||||
WndProc(WM_PASTE, 0, 0);
|
WndProc(SCI_PASTE, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdDelete:
|
case idcmdDelete:
|
||||||
WndProc(WM_CLEAR, 0, 0);
|
WndProc(SCI_CLEAR, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case idcmdSelectAll:
|
case idcmdSelectAll:
|
||||||
@@ -99,7 +106,7 @@ void ScintillaBase::Command(int cmdId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScintillaBase::KeyCommand(UINT iMessage) {
|
int ScintillaBase::KeyCommand(unsigned int iMessage) {
|
||||||
// Most key commands cancel autocompletion mode
|
// Most key commands cancel autocompletion mode
|
||||||
if (ac.Active()) {
|
if (ac.Active()) {
|
||||||
switch (iMessage) {
|
switch (iMessage) {
|
||||||
@@ -130,6 +137,9 @@ int ScintillaBase::KeyCommand(UINT iMessage) {
|
|||||||
case SCI_TAB:
|
case SCI_TAB:
|
||||||
AutoCompleteCompleted();
|
AutoCompleteCompleted();
|
||||||
return 0;
|
return 0;
|
||||||
|
case SCI_NEWLINE:
|
||||||
|
AutoCompleteCompleted();
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ac.Cancel();
|
ac.Cancel();
|
||||||
@@ -157,15 +167,30 @@ int ScintillaBase::KeyCommand(UINT iMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
||||||
//Platform::DebugPrintf("AutoCOmplete %s\n", list);
|
//Platform::DebugPrintf("AutoComplete %s\n", list);
|
||||||
ct.CallTipCancel();
|
ct.CallTipCancel();
|
||||||
|
|
||||||
|
if (ac.chooseSingle) {
|
||||||
|
if (list && !strchr(list, ac.GetSeparator())) {
|
||||||
|
if (ac.ignoreCase) {
|
||||||
|
SetEmptySelection(currentPos - lenEntered);
|
||||||
|
pdoc->DeleteChars(currentPos, lenEntered);
|
||||||
|
SetEmptySelection(currentPos);
|
||||||
|
pdoc->InsertString(currentPos, list);
|
||||||
|
SetEmptySelection(currentPos + strlen(list));
|
||||||
|
} else {
|
||||||
|
SetEmptySelection(currentPos);
|
||||||
|
pdoc->InsertString(currentPos, list + lenEntered);
|
||||||
|
SetEmptySelection(currentPos + strlen(list + lenEntered));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
ac.Start(wDraw, idAutoComplete, currentPos, lenEntered);
|
ac.Start(wDraw, idAutoComplete, currentPos, lenEntered);
|
||||||
|
|
||||||
PRectangle rcClient = GetClientRectangle();
|
PRectangle rcClient = GetClientRectangle();
|
||||||
Point pt = LocationFromPosition(currentPos-lenEntered);
|
Point pt = LocationFromPosition(currentPos-lenEntered);
|
||||||
|
|
||||||
//Platform::DebugPrintf("Auto complete %x\n", lbAutoComplete);
|
|
||||||
int heightLB = 100;
|
int heightLB = 100;
|
||||||
int widthLB = 100;
|
int widthLB = 100;
|
||||||
if (pt.x >= rcClient.right - widthLB) {
|
if (pt.x >= rcClient.right - widthLB) {
|
||||||
@@ -188,16 +213,18 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
|||||||
rcac.right = rcac.left + widthLB;
|
rcac.right = rcac.left + widthLB;
|
||||||
rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom);
|
rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom);
|
||||||
ac.lb.SetPositionRelative(rcac, wMain);
|
ac.lb.SetPositionRelative(rcac, wMain);
|
||||||
ac.lb.SetFont(vs.styles[0].font);
|
ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font);
|
||||||
|
ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth);
|
||||||
|
|
||||||
int maxStrLen = ac.SetList(list);
|
ac.SetList(list);
|
||||||
|
|
||||||
// Fiddle the position of the list so it is right next to the target and wide enough for all its strings
|
// Fiddle the position of the list so it is right next to the target and wide enough for all its strings
|
||||||
PRectangle rcList = ac.lb.GetPosition();
|
PRectangle rcList = ac.lb.GetDesiredRect();
|
||||||
int heightAlloced = rcList.bottom - rcList.top;
|
int heightAlloced = rcList.bottom - rcList.top;
|
||||||
|
widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left);
|
||||||
// Make an allowance for large strings in list
|
// Make an allowance for large strings in list
|
||||||
rcList.left = pt.x - 5;
|
rcList.left = pt.x - 5;
|
||||||
rcList.right = rcList.left + Platform::Maximum(widthLB, maxStrLen * 8 + 16);
|
rcList.right = rcList.left + widthLB;
|
||||||
if (pt.y >= rcClient.bottom - heightLB && // Wont fit below.
|
if (pt.y >= rcClient.bottom - heightLB && // Wont fit below.
|
||||||
pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above.
|
pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above.
|
||||||
rcList.top = pt.y - heightAlloced;
|
rcList.top = pt.y - heightAlloced;
|
||||||
@@ -206,8 +233,10 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
|||||||
}
|
}
|
||||||
rcList.bottom = rcList.top + heightAlloced;
|
rcList.bottom = rcList.top + heightAlloced;
|
||||||
ac.lb.SetPositionRelative(rcList, wMain);
|
ac.lb.SetPositionRelative(rcList, wMain);
|
||||||
//lbAutoComplete.SetPosition(rcList);
|
|
||||||
ac.Show();
|
ac.Show();
|
||||||
|
if (lenEntered != 0) {
|
||||||
|
AutoCompleteMoveToCurrentWord();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AutoCompleteCancel() {
|
void ScintillaBase::AutoCompleteCancel() {
|
||||||
@@ -218,36 +247,63 @@ void ScintillaBase::AutoCompleteMove(int delta) {
|
|||||||
ac.Move(delta);
|
ac.Move(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScintillaBase::AutoCompleteMoveToCurrentWord() {
|
||||||
|
char wordCurrent[1000];
|
||||||
|
int i;
|
||||||
|
int startWord = ac.posStart - ac.startLen;
|
||||||
|
for (i = startWord; i < currentPos; i++)
|
||||||
|
wordCurrent[i - startWord] = pdoc->CharAt(i);
|
||||||
|
wordCurrent[i - startWord] = '\0';
|
||||||
|
ac.Select(wordCurrent);
|
||||||
|
}
|
||||||
|
|
||||||
void ScintillaBase::AutoCompleteChanged(char ch) {
|
void ScintillaBase::AutoCompleteChanged(char ch) {
|
||||||
if (currentPos <= ac.posStart) {
|
if (ac.IsFillUpChar(ch)) {
|
||||||
|
AutoCompleteCompleted(ch);
|
||||||
|
} else if (currentPos <= ac.posStart - ac.startLen) {
|
||||||
|
ac.Cancel();
|
||||||
|
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
|
||||||
ac.Cancel();
|
ac.Cancel();
|
||||||
} else if (ac.IsStopChar(ch)) {
|
} else if (ac.IsStopChar(ch)) {
|
||||||
ac.Cancel();
|
ac.Cancel();
|
||||||
} else {
|
} else {
|
||||||
char wordCurrent[1000];
|
AutoCompleteMoveToCurrentWord();
|
||||||
int i;
|
|
||||||
int startWord = ac.posStart - ac.startLen;
|
|
||||||
for (i = startWord; i < currentPos; i++)
|
|
||||||
wordCurrent[i - startWord] = pdoc->CharAt(i);
|
|
||||||
wordCurrent[i - startWord] = '\0';
|
|
||||||
ac.Select(wordCurrent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::AutoCompleteCompleted() {
|
void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
||||||
int item = ac.lb.GetSelection();
|
int item = ac.lb.GetSelection();
|
||||||
char selected[200];
|
char selected[1000];
|
||||||
if (item != -1) {
|
if (item != -1) {
|
||||||
ac.lb.GetValue(item, selected, sizeof(selected));
|
ac.lb.GetValue(item, selected, sizeof(selected));
|
||||||
}
|
}
|
||||||
ac.Cancel();
|
ac.Cancel();
|
||||||
if (currentPos != ac.posStart) {
|
|
||||||
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
|
if (ac.ignoreCase) {
|
||||||
}
|
if (currentPos != ac.posStart) {
|
||||||
SetEmptySelection(ac.posStart);
|
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
|
||||||
if (item != -1) {
|
}
|
||||||
pdoc->InsertString(currentPos, selected + ac.startLen);
|
SetEmptySelection(ac.posStart - ac.startLen);
|
||||||
SetEmptySelection(currentPos + strlen(selected + ac.startLen));
|
pdoc->DeleteChars(ac.posStart - ac.startLen, ac.startLen);
|
||||||
|
if (item != -1) {
|
||||||
|
SString piece = selected;
|
||||||
|
if (fillUp)
|
||||||
|
piece += fillUp;
|
||||||
|
pdoc->InsertString(currentPos, piece.c_str());
|
||||||
|
SetEmptySelection(currentPos + piece.length());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (currentPos != ac.posStart) {
|
||||||
|
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
|
||||||
|
}
|
||||||
|
SetEmptySelection(ac.posStart);
|
||||||
|
if (item != -1) {
|
||||||
|
SString piece = selected + ac.startLen;
|
||||||
|
if (fillUp)
|
||||||
|
piece += fillUp;
|
||||||
|
pdoc->InsertString(currentPos, piece.c_str());
|
||||||
|
SetEmptySelection(currentPos + piece.length());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,16 +314,21 @@ void ScintillaBase::ContextMenu(Point pt) {
|
|||||||
AddToPopUp("");
|
AddToPopUp("");
|
||||||
AddToPopUp("Cut", idcmdCut, currentPos != anchor);
|
AddToPopUp("Cut", idcmdCut, currentPos != anchor);
|
||||||
AddToPopUp("Copy", idcmdCopy, currentPos != anchor);
|
AddToPopUp("Copy", idcmdCopy, currentPos != anchor);
|
||||||
AddToPopUp("Paste", idcmdPaste, WndProc(EM_CANPASTE, 0, 0));
|
AddToPopUp("Paste", idcmdPaste, WndProc(SCI_CANPASTE, 0, 0));
|
||||||
AddToPopUp("Delete", idcmdDelete, currentPos != anchor);
|
AddToPopUp("Delete", idcmdDelete, currentPos != anchor);
|
||||||
AddToPopUp("");
|
AddToPopUp("");
|
||||||
AddToPopUp("Select All", idcmdSelectAll);
|
AddToPopUp("Select All", idcmdSelectAll);
|
||||||
popup.Show(pt, wMain);
|
popup.Show(pt, wMain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
|
void ScintillaBase::CancelModes() {
|
||||||
AutoCompleteCancel();
|
AutoCompleteCancel();
|
||||||
ct.CallTipCancel();
|
ct.CallTipCancel();
|
||||||
|
Editor::CancelModes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
|
||||||
|
CancelModes();
|
||||||
Editor::ButtonDown(pt, curTime, shift, ctrl, alt);
|
Editor::ButtonDown(pt, curTime, shift, ctrl, alt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,8 +356,8 @@ void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) {
|
|||||||
#ifdef SCI_LEXER
|
#ifdef SCI_LEXER
|
||||||
if (lexLanguage != SCLEX_CONTAINER) {
|
if (lexLanguage != SCLEX_CONTAINER) {
|
||||||
int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0);
|
int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0);
|
||||||
int lineEndStyled = Platform::SendScintilla(wMain.GetID(), EM_LINEFROMCHAR, endStyled, 0);
|
int lineEndStyled = Platform::SendScintilla(wMain.GetID(), SCI_LINEFROMPOSITION, endStyled, 0);
|
||||||
endStyled = Platform::SendScintilla(wMain.GetID(), EM_LINEINDEX, lineEndStyled, 0);
|
endStyled = Platform::SendScintilla(wMain.GetID(), SCI_POSITIONFROMLINE, lineEndStyled, 0);
|
||||||
Colourise(endStyled, endStyleNeeded);
|
Colourise(endStyled, endStyleNeeded);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -304,7 +365,7 @@ void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) {
|
|||||||
Editor::NotifyStyleToNeeded(endStyleNeeded);
|
Editor::NotifyStyleToNeeded(endStyleNeeded);
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
|
long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
|
||||||
switch (iMessage) {
|
switch (iMessage) {
|
||||||
case SCI_AUTOCSHOW:
|
case SCI_AUTOCSHOW:
|
||||||
AutoCompleteStart(wParam, reinterpret_cast<const char *>(lParam));
|
AutoCompleteStart(wParam, reinterpret_cast<const char *>(lParam));
|
||||||
@@ -325,7 +386,7 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SCI_AUTOCSETSEPARATOR:
|
case SCI_AUTOCSETSEPARATOR:
|
||||||
ac.SetSeparator(wParam);
|
ac.SetSeparator(static_cast<char>(wParam));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCI_AUTOCGETSEPARATOR:
|
case SCI_AUTOCGETSEPARATOR:
|
||||||
@@ -338,13 +399,38 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
|
|||||||
case SCI_AUTOCSELECT:
|
case SCI_AUTOCSELECT:
|
||||||
ac.Select(reinterpret_cast<char *>(lParam));
|
ac.Select(reinterpret_cast<char *>(lParam));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCI_AUTOCSETCANCELATSTART:
|
||||||
|
ac.cancelAtStartPos = wParam;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCI_AUTOCGETCANCELATSTART:
|
||||||
|
return ac.cancelAtStartPos;
|
||||||
|
|
||||||
|
case SCI_AUTOCSETFILLUPS:
|
||||||
|
ac.SetFillUpChars(reinterpret_cast<char *>(lParam));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCI_AUTOCSETCHOOSESINGLE:
|
||||||
|
ac.chooseSingle = wParam;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCI_AUTOCGETCHOOSESINGLE:
|
||||||
|
return ac.chooseSingle;
|
||||||
|
|
||||||
|
case SCI_AUTOCSETIGNORECASE:
|
||||||
|
ac.ignoreCase = wParam;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCI_AUTOCGETIGNORECASE:
|
||||||
|
return ac.ignoreCase;
|
||||||
|
|
||||||
case SCI_CALLTIPSHOW: {
|
case SCI_CALLTIPSHOW: {
|
||||||
AutoCompleteCancel();
|
AutoCompleteCancel();
|
||||||
if (!ct.wCallTip.Created()) {
|
if (!ct.wCallTip.Created()) {
|
||||||
PRectangle rc = ct.CallTipStart(currentPos, LocationFromPosition(wParam),
|
PRectangle rc = ct.CallTipStart(currentPos, LocationFromPosition(wParam),
|
||||||
reinterpret_cast<char *>(lParam),
|
reinterpret_cast<char *>(lParam),
|
||||||
vs.styles[0].fontName, vs.styles[0].size);
|
vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].size);
|
||||||
// If the call-tip window would be out of the client
|
// If the call-tip window would be out of the client
|
||||||
// space, adjust so it displays above the text.
|
// space, adjust so it displays above the text.
|
||||||
PRectangle rcClient = GetClientRectangle();
|
PRectangle rcClient = GetClientRectangle();
|
||||||
|
@@ -47,13 +47,15 @@ protected:
|
|||||||
|
|
||||||
virtual void AddCharUTF(char *s, unsigned int len);
|
virtual void AddCharUTF(char *s, unsigned int len);
|
||||||
void Command(int cmdId);
|
void Command(int cmdId);
|
||||||
virtual int KeyCommand(UINT iMessage);
|
virtual void CancelModes();
|
||||||
|
virtual int KeyCommand(unsigned int iMessage);
|
||||||
|
|
||||||
void AutoCompleteStart(int lenEntered, const char *list);
|
void AutoCompleteStart(int lenEntered, const char *list);
|
||||||
void AutoCompleteCancel();
|
void AutoCompleteCancel();
|
||||||
void AutoCompleteMove(int delta);
|
void AutoCompleteMove(int delta);
|
||||||
void AutoCompleteChanged(char ch=0);
|
void AutoCompleteChanged(char ch=0);
|
||||||
void AutoCompleteCompleted();
|
void AutoCompleteCompleted(char fillUp='\0');
|
||||||
|
void AutoCompleteMoveToCurrentWord();
|
||||||
|
|
||||||
virtual void CreateCallTipWindow(PRectangle rc) = 0;
|
virtual void CreateCallTipWindow(PRectangle rc) = 0;
|
||||||
|
|
||||||
@@ -65,7 +67,7 @@ protected:
|
|||||||
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
||||||
public:
|
public:
|
||||||
// Public so scintilla_send_message can use it
|
// Public so scintilla_send_message can use it
|
||||||
virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
|
virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -14,13 +14,13 @@ Style::Style() {
|
|||||||
aliasOfDefaultFont = true;
|
aliasOfDefaultFont = true;
|
||||||
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||||
Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT,
|
Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT,
|
||||||
false, false, false, false);
|
false, false, false, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Style::Style(const Style &source) {
|
Style::Style(const Style &source) {
|
||||||
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||||
0, 0, 0,
|
0, 0, 0,
|
||||||
false, false, false, false);
|
false, false, false, false, true);
|
||||||
fore.desired = source.fore.desired;
|
fore.desired = source.fore.desired;
|
||||||
back.desired = source.back.desired;
|
back.desired = source.back.desired;
|
||||||
characterSet = source.characterSet;
|
characterSet = source.characterSet;
|
||||||
@@ -29,6 +29,7 @@ Style::Style(const Style &source) {
|
|||||||
size = source.size;
|
size = source.size;
|
||||||
eolFilled = source.eolFilled;
|
eolFilled = source.eolFilled;
|
||||||
underline = source.underline;
|
underline = source.underline;
|
||||||
|
visible = source.visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
Style::~Style() {
|
Style::~Style() {
|
||||||
@@ -44,7 +45,7 @@ Style &Style::operator=(const Style &source) {
|
|||||||
return *this;
|
return *this;
|
||||||
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||||
0, 0, SC_CHARSET_DEFAULT,
|
0, 0, SC_CHARSET_DEFAULT,
|
||||||
false, false, false, false);
|
false, false, false, false, true);
|
||||||
fore.desired = source.fore.desired;
|
fore.desired = source.fore.desired;
|
||||||
back.desired = source.back.desired;
|
back.desired = source.back.desired;
|
||||||
characterSet = source.characterSet;
|
characterSet = source.characterSet;
|
||||||
@@ -53,12 +54,13 @@ Style &Style::operator=(const Style &source) {
|
|||||||
size = source.size;
|
size = source.size;
|
||||||
eolFilled = source.eolFilled;
|
eolFilled = source.eolFilled;
|
||||||
underline = source.underline;
|
underline = source.underline;
|
||||||
|
visible = source.visible;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Style::Clear(Colour fore_, Colour back_, int size_,
|
void Style::Clear(Colour fore_, Colour back_, int size_,
|
||||||
const char *fontName_, int characterSet_,
|
const char *fontName_, int characterSet_,
|
||||||
bool bold_, bool italic_, bool eolFilled_, bool underline_) {
|
bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_) {
|
||||||
fore.desired = fore_;
|
fore.desired = fore_;
|
||||||
back.desired = back_;
|
back.desired = back_;
|
||||||
characterSet = characterSet_;
|
characterSet = characterSet_;
|
||||||
@@ -68,6 +70,7 @@ void Style::Clear(Colour fore_, Colour back_, int size_,
|
|||||||
fontName = fontName_;
|
fontName = fontName_;
|
||||||
eolFilled = eolFilled_;
|
eolFilled = eolFilled_;
|
||||||
underline = underline_;
|
underline = underline_;
|
||||||
|
visible = visible_;
|
||||||
if (aliasOfDefaultFont)
|
if (aliasOfDefaultFont)
|
||||||
font.SetID(0);
|
font.SetID(0);
|
||||||
else
|
else
|
||||||
|
@@ -18,6 +18,7 @@ public:
|
|||||||
int characterSet;
|
int characterSet;
|
||||||
bool eolFilled;
|
bool eolFilled;
|
||||||
bool underline;
|
bool underline;
|
||||||
|
bool visible;
|
||||||
|
|
||||||
Font font;
|
Font font;
|
||||||
unsigned int lineHeight;
|
unsigned int lineHeight;
|
||||||
@@ -34,7 +35,7 @@ public:
|
|||||||
void Clear(Colour fore_, Colour back_,
|
void Clear(Colour fore_, Colour back_,
|
||||||
int size_,
|
int size_,
|
||||||
const char *fontName_, int characterSet_,
|
const char *fontName_, int characterSet_,
|
||||||
bool bold_, bool italic_, bool eolFilled_, bool underline_);
|
bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_);
|
||||||
bool EquivalentFontTo(const Style *other) const;
|
bool EquivalentFontTo(const Style *other) const;
|
||||||
void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0);
|
void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0);
|
||||||
};
|
};
|
||||||
|
@@ -69,10 +69,12 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
|
|||||||
selforeground.desired = source.selforeground.desired;
|
selforeground.desired = source.selforeground.desired;
|
||||||
selbackset = source.selbackset;
|
selbackset = source.selbackset;
|
||||||
selbackground.desired = source.selbackground.desired;
|
selbackground.desired = source.selbackground.desired;
|
||||||
|
selbackground2.desired = source.selbackground2.desired;
|
||||||
selbar.desired = source.selbar.desired;
|
selbar.desired = source.selbar.desired;
|
||||||
selbarlight.desired = source.selbarlight.desired;
|
selbarlight.desired = source.selbarlight.desired;
|
||||||
caretcolour.desired = source.caretcolour.desired;
|
caretcolour.desired = source.caretcolour.desired;
|
||||||
edgecolour.desired = source.edgecolour.desired;
|
edgecolour.desired = source.edgecolour.desired;
|
||||||
|
edgeState = source.edgeState;
|
||||||
leftMarginWidth = source.leftMarginWidth;
|
leftMarginWidth = source.leftMarginWidth;
|
||||||
rightMarginWidth = source.rightMarginWidth;
|
rightMarginWidth = source.rightMarginWidth;
|
||||||
for (int i=0;i < margins; i++) {
|
for (int i=0;i < margins; i++) {
|
||||||
@@ -83,6 +85,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
|
|||||||
fixedColumnWidth = source.fixedColumnWidth;
|
fixedColumnWidth = source.fixedColumnWidth;
|
||||||
zoomLevel = source.zoomLevel;
|
zoomLevel = source.zoomLevel;
|
||||||
viewWhitespace = source.viewWhitespace;
|
viewWhitespace = source.viewWhitespace;
|
||||||
|
viewIndentationGuides = source.viewIndentationGuides;
|
||||||
viewEOL = source.viewEOL;
|
viewEOL = source.viewEOL;
|
||||||
showMarkedLines = source.showMarkedLines;
|
showMarkedLines = source.showMarkedLines;
|
||||||
}
|
}
|
||||||
@@ -111,6 +114,7 @@ void ViewStyle::Init() {
|
|||||||
selforeground.desired = Colour(0xff, 0, 0);
|
selforeground.desired = Colour(0xff, 0, 0);
|
||||||
selbackset = true;
|
selbackset = true;
|
||||||
selbackground.desired = Colour(0xc0, 0xc0, 0xc0);
|
selbackground.desired = Colour(0xc0, 0xc0, 0xc0);
|
||||||
|
selbackground2.desired = Colour(0xb0, 0xb0, 0xb0);
|
||||||
selbar.desired = Platform::Chrome();
|
selbar.desired = Platform::Chrome();
|
||||||
selbarlight.desired = Platform::ChromeHighlight();
|
selbarlight.desired = Platform::ChromeHighlight();
|
||||||
styles[STYLE_LINENUMBER].fore.desired = Colour(0, 0, 0);
|
styles[STYLE_LINENUMBER].fore.desired = Colour(0, 0, 0);
|
||||||
@@ -118,6 +122,7 @@ void ViewStyle::Init() {
|
|||||||
//caretcolour.desired = Colour(0xff, 0, 0);
|
//caretcolour.desired = Colour(0xff, 0, 0);
|
||||||
caretcolour.desired = Colour(0, 0, 0);
|
caretcolour.desired = Colour(0, 0, 0);
|
||||||
edgecolour.desired = Colour(0xc0, 0xc0, 0xc0);
|
edgecolour.desired = Colour(0xc0, 0xc0, 0xc0);
|
||||||
|
edgeState = EDGE_NONE;
|
||||||
|
|
||||||
leftMarginWidth = 1;
|
leftMarginWidth = 1;
|
||||||
rightMarginWidth = 1;
|
rightMarginWidth = 1;
|
||||||
@@ -142,7 +147,8 @@ void ViewStyle::Init() {
|
|||||||
maskInLine &= ~ms[margin].mask;
|
maskInLine &= ~ms[margin].mask;
|
||||||
}
|
}
|
||||||
zoomLevel = 0;
|
zoomLevel = 0;
|
||||||
viewWhitespace = false;
|
viewWhitespace = wsInvisible;
|
||||||
|
viewIndentationGuides = false;
|
||||||
viewEOL = false;
|
viewEOL = false;
|
||||||
showMarkedLines = true;
|
showMarkedLines = true;
|
||||||
}
|
}
|
||||||
@@ -162,6 +168,7 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
|
|||||||
}
|
}
|
||||||
pal.WantFind(selforeground, want);
|
pal.WantFind(selforeground, want);
|
||||||
pal.WantFind(selbackground, want);
|
pal.WantFind(selbackground, want);
|
||||||
|
pal.WantFind(selbackground2, want);
|
||||||
pal.WantFind(selbar, want);
|
pal.WantFind(selbar, want);
|
||||||
pal.WantFind(selbarlight, want);
|
pal.WantFind(selbarlight, want);
|
||||||
pal.WantFind(caretcolour, want);
|
pal.WantFind(caretcolour, want);
|
||||||
@@ -203,7 +210,7 @@ void ViewStyle::ResetDefaultStyle() {
|
|||||||
styles[STYLE_DEFAULT].Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
styles[STYLE_DEFAULT].Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||||
Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()),
|
Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()),
|
||||||
SC_CHARSET_DEFAULT,
|
SC_CHARSET_DEFAULT,
|
||||||
false, false, false, false);
|
false, false, false, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewStyle::ClearStyles() {
|
void ViewStyle::ClearStyles() {
|
||||||
@@ -219,7 +226,8 @@ void ViewStyle::ClearStyles() {
|
|||||||
styles[STYLE_DEFAULT].bold,
|
styles[STYLE_DEFAULT].bold,
|
||||||
styles[STYLE_DEFAULT].italic,
|
styles[STYLE_DEFAULT].italic,
|
||||||
styles[STYLE_DEFAULT].eolFilled,
|
styles[STYLE_DEFAULT].eolFilled,
|
||||||
styles[STYLE_DEFAULT].underline);
|
styles[STYLE_DEFAULT].underline,
|
||||||
|
styles[STYLE_DEFAULT].visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
|
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
|
||||||
|
@@ -26,6 +26,7 @@ public:
|
|||||||
const char *Save(const char *name);
|
const char *Save(const char *name);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
|
||||||
class ViewStyle {
|
class ViewStyle {
|
||||||
public:
|
public:
|
||||||
FontNames fontNames;
|
FontNames fontNames;
|
||||||
@@ -41,6 +42,7 @@ public:
|
|||||||
ColourPair selforeground;
|
ColourPair selforeground;
|
||||||
bool selbackset;
|
bool selbackset;
|
||||||
ColourPair selbackground;
|
ColourPair selbackground;
|
||||||
|
ColourPair selbackground2;
|
||||||
ColourPair selbar;
|
ColourPair selbar;
|
||||||
ColourPair selbarlight;
|
ColourPair selbarlight;
|
||||||
// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
|
// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
|
||||||
@@ -52,11 +54,13 @@ public:
|
|||||||
MarginStyle ms[margins];
|
MarginStyle ms[margins];
|
||||||
int fixedColumnWidth;
|
int fixedColumnWidth;
|
||||||
int zoomLevel;
|
int zoomLevel;
|
||||||
bool viewWhitespace;
|
WhiteSpaceVisibility viewWhitespace;
|
||||||
|
bool viewIndentationGuides;
|
||||||
bool viewEOL;
|
bool viewEOL;
|
||||||
bool showMarkedLines;
|
bool showMarkedLines;
|
||||||
ColourPair caretcolour;
|
ColourPair caretcolour;
|
||||||
ColourPair edgecolour;
|
ColourPair edgecolour;
|
||||||
|
int edgeState;
|
||||||
|
|
||||||
ViewStyle();
|
ViewStyle();
|
||||||
ViewStyle(const ViewStyle &source);
|
ViewStyle(const ViewStyle &source);
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
// The License.txt file describes the conditions under which this software may be distributed.
|
// The License.txt file describes the conditions under which this software may be distributed.
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -17,25 +18,26 @@
|
|||||||
WindowAccessor::~WindowAccessor() {
|
WindowAccessor::~WindowAccessor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PLAT_WIN
|
||||||
bool WindowAccessor::InternalIsLeadByte(char ch) {
|
bool WindowAccessor::InternalIsLeadByte(char ch) {
|
||||||
#if PLAT_GTK
|
|
||||||
// TODO: support DBCS under GTK+
|
|
||||||
return false;
|
|
||||||
#elif PLAT_WIN
|
|
||||||
if (SC_CP_UTF8 == codePage)
|
if (SC_CP_UTF8 == codePage)
|
||||||
// For lexing, all characters >= 0x80 are treated the
|
// For lexing, all characters >= 0x80 are treated the
|
||||||
// same so none is considered a lead byte.
|
// same so none is considered a lead byte.
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return IsDBCSLeadByteEx(codePage, ch);
|
return IsDBCSLeadByteEx(codePage, ch);
|
||||||
#elif PLAT_WX
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// PLAT_GTK or PLAT_WX
|
||||||
|
// TODO: support DBCS under GTK+ and WX
|
||||||
|
bool WindowAccessor::InternalIsLeadByte(char) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void WindowAccessor::Fill(int position) {
|
void WindowAccessor::Fill(int position) {
|
||||||
if (lenDoc == -1)
|
if (lenDoc == -1)
|
||||||
lenDoc = Platform::SendScintilla(id, WM_GETTEXTLENGTH, 0, 0);
|
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
|
||||||
startPos = position - slopSize;
|
startPos = position - slopSize;
|
||||||
if (startPos + bufferSize > lenDoc)
|
if (startPos + bufferSize > lenDoc)
|
||||||
startPos = lenDoc - bufferSize;
|
startPos = lenDoc - bufferSize;
|
||||||
@@ -45,8 +47,8 @@ void WindowAccessor::Fill(int position) {
|
|||||||
if (endPos > lenDoc)
|
if (endPos > lenDoc)
|
||||||
endPos = lenDoc;
|
endPos = lenDoc;
|
||||||
|
|
||||||
TEXTRANGE tr = {{startPos, endPos}, buf};
|
TextRange tr = {{startPos, endPos}, buf};
|
||||||
Platform::SendScintilla(id, EM_GETTEXTRANGE, 0, reinterpret_cast<LPARAM>(&tr));
|
Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast<long>(&tr));
|
||||||
}
|
}
|
||||||
|
|
||||||
char WindowAccessor::StyleAt(int position) {
|
char WindowAccessor::StyleAt(int position) {
|
||||||
@@ -55,11 +57,11 @@ char WindowAccessor::StyleAt(int position) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WindowAccessor::GetLine(int position) {
|
int WindowAccessor::GetLine(int position) {
|
||||||
return Platform::SendScintilla(id, EM_LINEFROMCHAR, position, 0);
|
return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int WindowAccessor::LineStart(int line) {
|
int WindowAccessor::LineStart(int line) {
|
||||||
return Platform::SendScintilla(id, EM_LINEINDEX, line, 0);
|
return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int WindowAccessor::LevelAt(int line) {
|
int WindowAccessor::LevelAt(int line) {
|
||||||
@@ -68,7 +70,7 @@ int WindowAccessor::LevelAt(int line) {
|
|||||||
|
|
||||||
int WindowAccessor::Length() {
|
int WindowAccessor::Length() {
|
||||||
if (lenDoc == -1)
|
if (lenDoc == -1)
|
||||||
lenDoc = Platform::SendScintilla(id, WM_GETTEXTLENGTH, 0, 0);
|
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
|
||||||
return lenDoc;
|
return lenDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +123,7 @@ void WindowAccessor::Flush() {
|
|||||||
lenDoc = -1;
|
lenDoc = -1;
|
||||||
if (validLen > 0) {
|
if (validLen > 0) {
|
||||||
Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen,
|
Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen,
|
||||||
reinterpret_cast<LPARAM>(styleBuf));
|
reinterpret_cast<long>(styleBuf));
|
||||||
validLen = 0;
|
validLen = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
523
contrib/src/stc/stc.cpp.in
Normal file
523
contrib/src/stc/stc.cpp.in
Normal file
@@ -0,0 +1,523 @@
|
|||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: stc.cpp
|
||||||
|
// Purpose: A wxWindows implementation of Scintilla. This class is the
|
||||||
|
// one meant to be used directly by wx applications. It does not
|
||||||
|
// derive directly from the Scintilla classes, but instead
|
||||||
|
// delegates most things to the real Scintilla class.
|
||||||
|
// This allows the use of Scintilla without polluting the
|
||||||
|
// namespace with all the classes and identifiers from Scintilla.
|
||||||
|
//
|
||||||
|
// Author: Robin Dunn
|
||||||
|
//
|
||||||
|
// Created: 13-Jan-2000
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 2000 by Total Control Software
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#include "wx/stc/stc.h"
|
||||||
|
#include "ScintillaWX.h"
|
||||||
|
|
||||||
|
#include <wx/tokenzr.h>
|
||||||
|
|
||||||
|
// The following code forces a reference to all of the Scintilla lexers.
|
||||||
|
// If we don't do something like this, then the linker tends to "optimize"
|
||||||
|
// them away. (eric@sourcegear.com)
|
||||||
|
|
||||||
|
int wxForceScintillaLexers(void)
|
||||||
|
{
|
||||||
|
extern LexerModule lmCPP;
|
||||||
|
extern LexerModule lmHTML;
|
||||||
|
extern LexerModule lmXML;
|
||||||
|
extern LexerModule lmProps;
|
||||||
|
extern LexerModule lmErrorList;
|
||||||
|
extern LexerModule lmMake;
|
||||||
|
extern LexerModule lmBatch;
|
||||||
|
extern LexerModule lmPerl;
|
||||||
|
extern LexerModule lmPython;
|
||||||
|
extern LexerModule lmSQL;
|
||||||
|
extern LexerModule lmVB;
|
||||||
|
|
||||||
|
if (
|
||||||
|
&lmCPP
|
||||||
|
&& &lmHTML
|
||||||
|
&& &lmXML
|
||||||
|
&& &lmProps
|
||||||
|
&& &lmErrorList
|
||||||
|
&& &lmMake
|
||||||
|
&& &lmBatch
|
||||||
|
&& &lmPerl
|
||||||
|
&& &lmPython
|
||||||
|
&& &lmSQL
|
||||||
|
&& &lmVB
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
const wxChar* wxSTCNameStr = "stcwindow";
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||||
|
EVT_PAINT (wxStyledTextCtrl::OnPaint)
|
||||||
|
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)
|
||||||
|
EVT_SIZE (wxStyledTextCtrl::OnSize)
|
||||||
|
EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown)
|
||||||
|
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||||
|
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||||
|
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||||
|
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||||
|
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||||
|
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
|
||||||
|
EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus)
|
||||||
|
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
|
||||||
|
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
|
||||||
|
EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu)
|
||||||
|
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl)
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Constructor and Destructor
|
||||||
|
|
||||||
|
wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxPoint& pos,
|
||||||
|
const wxSize& size,
|
||||||
|
long style,
|
||||||
|
const wxString& name) :
|
||||||
|
wxControl(parent, id, pos, size,
|
||||||
|
style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
||||||
|
wxDefaultValidator, name)
|
||||||
|
{
|
||||||
|
m_swx = new ScintillaWX(this);
|
||||||
|
m_stopWatch.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxStyledTextCtrl::~wxStyledTextCtrl() {
|
||||||
|
delete m_swx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
|
||||||
|
|
||||||
|
return m_swx->WndProc(msg, wp, lp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MAKELONG
|
||||||
|
#undef MAKELONG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MAKELONG(a, b) ((a) | ((b) << 16))
|
||||||
|
|
||||||
|
|
||||||
|
static long wxColourAsLong(const wxColour& co) {
|
||||||
|
return (((long)co.Blue() << 16) |
|
||||||
|
((long)co.Green() << 8) |
|
||||||
|
((long)co.Red()));
|
||||||
|
}
|
||||||
|
|
||||||
|
static wxColour wxColourFromLong(long c) {
|
||||||
|
wxColour clr;
|
||||||
|
clr.Set(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff);
|
||||||
|
return clr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static wxColour wxColourFromSpec(const wxString& spec) {
|
||||||
|
// spec should be #RRGGBB
|
||||||
|
char* junk;
|
||||||
|
int red = strtol(spec.Mid(1,2), &junk, 16);
|
||||||
|
int green = strtol(spec.Mid(3,2), &junk, 16);
|
||||||
|
int blue = strtol(spec.Mid(5,2), &junk, 16);
|
||||||
|
return wxColour(red, green, blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// BEGIN generated section. The following code is automatically generated
|
||||||
|
// by gen_iface.py from the contents of Scintilla.iface. Do not edit
|
||||||
|
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
|
||||||
|
|
||||||
|
%(METHOD_IMPS)s
|
||||||
|
|
||||||
|
// END of generated section
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Returns the line number of the line with the caret.
|
||||||
|
int wxStyledTextCtrl::GetCurrentLine() {
|
||||||
|
int line = LineFromPosition(GetCurrentPos());
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Extract style settings from a spec-string which is composed of one or
|
||||||
|
// more of the following comma separated elements:
|
||||||
|
//
|
||||||
|
// bold turns on bold
|
||||||
|
// italic turns on italics
|
||||||
|
// fore:#RRGGBB sets the foreground colour
|
||||||
|
// back:#RRGGBB sets the background colour
|
||||||
|
// face:[facename] sets the font face name to use
|
||||||
|
// size:[num] sets the font size in points
|
||||||
|
// eol turns on eol filling
|
||||||
|
// underline turns on underlining
|
||||||
|
//
|
||||||
|
void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) {
|
||||||
|
|
||||||
|
wxStringTokenizer tkz(spec, ",");
|
||||||
|
while (tkz.HasMoreTokens()) {
|
||||||
|
wxString token = tkz.GetNextToken();
|
||||||
|
|
||||||
|
wxString option = token.BeforeFirst(':');
|
||||||
|
wxString val = token.AfterFirst(':');
|
||||||
|
|
||||||
|
if (option == "bold")
|
||||||
|
StyleSetBold(styleNum, true);
|
||||||
|
|
||||||
|
else if (option == "italic")
|
||||||
|
StyleSetItalic(styleNum, true);
|
||||||
|
|
||||||
|
else if (option == "underline")
|
||||||
|
StyleSetUnderline(styleNum, true);
|
||||||
|
|
||||||
|
else if (option == "eol")
|
||||||
|
StyleSetEOLFilled(styleNum, true);
|
||||||
|
|
||||||
|
else if (option == "size") {
|
||||||
|
long points;
|
||||||
|
if (val.ToLong(&points))
|
||||||
|
StyleSetSize(styleNum, points);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (option == "face")
|
||||||
|
StyleSetFaceName(styleNum, val);
|
||||||
|
|
||||||
|
else if (option == "fore")
|
||||||
|
StyleSetForeground(styleNum, wxColourFromSpec(val));
|
||||||
|
|
||||||
|
else if (option == "back")
|
||||||
|
StyleSetBackground(styleNum, wxColourFromSpec(val));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set style size, face, bold, italic, and underline attributes from
|
||||||
|
// a wxFont's attributes.
|
||||||
|
void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
|
||||||
|
int size = font.GetPointSize();
|
||||||
|
wxString faceName = font.GetFaceName();
|
||||||
|
bool bold = font.GetWeight() == wxBOLD;
|
||||||
|
bool italic = font.GetStyle() != wxNORMAL;
|
||||||
|
bool under = font.GetUnderlined();
|
||||||
|
|
||||||
|
// TODO: add encoding/charset mapping
|
||||||
|
StyleSetFontAttr(styleNum, size, faceName, bold, italic, under);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set all font style attributes at once.
|
||||||
|
void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size,
|
||||||
|
const wxString& faceName,
|
||||||
|
bool bold, bool italic,
|
||||||
|
bool underline) {
|
||||||
|
StyleSetSize(styleNum, size);
|
||||||
|
StyleSetFaceName(styleNum, faceName);
|
||||||
|
StyleSetBold(styleNum, bold);
|
||||||
|
StyleSetItalic(styleNum, italic);
|
||||||
|
StyleSetUnderline(styleNum, underline);
|
||||||
|
|
||||||
|
// TODO: add encoding/charset mapping
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Perform one of the operations defined by the wxSTC_CMD_* constants.
|
||||||
|
void wxStyledTextCtrl::CmdKeyExecute(int cmd) {
|
||||||
|
SendMsg(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the left and right margin in the edit area, measured in pixels.
|
||||||
|
void wxStyledTextCtrl::SetMargins(int left, int right) {
|
||||||
|
SetMarginLeft(left);
|
||||||
|
SetMarginRight(right);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Retrieve the start and end positions of the current selection.
|
||||||
|
void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) {
|
||||||
|
if (startPos != NULL)
|
||||||
|
*startPos = SendMsg(SCI_GETSELECTIONSTART);
|
||||||
|
if (endPos != NULL)
|
||||||
|
*endPos = SendMsg(SCI_GETSELECTIONEND);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Retrieve the point in the window where a position is displayed.
|
||||||
|
wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
|
||||||
|
int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos);
|
||||||
|
int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos);
|
||||||
|
return wxPoint(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scroll enough to make the given line visible
|
||||||
|
void wxStyledTextCtrl::ScrollToLine(int line) {
|
||||||
|
m_swx->DoScrollToLine(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Scroll enough to make the given column visible
|
||||||
|
void wxStyledTextCtrl::ScrollToColumn(int column) {
|
||||||
|
m_swx->DoScrollToColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Event handlers
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) {
|
||||||
|
wxPaintDC dc(this);
|
||||||
|
wxRegion region = GetUpdateRegion();
|
||||||
|
|
||||||
|
m_swx->DoPaint(&dc, region.GetBox());
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) {
|
||||||
|
if (evt.GetOrientation() == wxHORIZONTAL)
|
||||||
|
m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition());
|
||||||
|
else
|
||||||
|
m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition());
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
|
||||||
|
wxSize sz = GetClientSize();
|
||||||
|
m_swx->DoSize(sz.x, sz.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
|
||||||
|
wxPoint pt = evt.GetPosition();
|
||||||
|
m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||||
|
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
|
||||||
|
wxPoint pt = evt.GetPosition();
|
||||||
|
m_swx->DoButtonMove(Point(pt.x, pt.y));
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
|
||||||
|
wxPoint pt = evt.GetPosition();
|
||||||
|
m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||||
|
evt.ControlDown());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
||||||
|
wxPoint pt = evt.GetPosition();
|
||||||
|
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||||
|
long key = evt.KeyCode();
|
||||||
|
if ((key > WXK_ESCAPE) &&
|
||||||
|
(key != WXK_DELETE) && (key < 255) &&
|
||||||
|
!evt.ControlDown() && !evt.AltDown()) {
|
||||||
|
|
||||||
|
m_swx->DoAddChar(key);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
evt.Skip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
|
||||||
|
long key = evt.KeyCode();
|
||||||
|
key = toupper(key);
|
||||||
|
int processed = m_swx->DoKeyDown(key, evt.ShiftDown(),
|
||||||
|
evt.ControlDown(), evt.AltDown());
|
||||||
|
if (! processed)
|
||||||
|
evt.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
|
||||||
|
m_swx->DoLoseFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
|
||||||
|
m_swx->DoGainFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) {
|
||||||
|
m_swx->DoSysColourChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) {
|
||||||
|
// do nothing to help avoid flashing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) {
|
||||||
|
m_swx->DoCommand(evt.GetId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) {
|
||||||
|
m_swx->DoOnListBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Turn notifications from Scintilla into events
|
||||||
|
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::NotifyChange() {
|
||||||
|
wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId());
|
||||||
|
GetEventHandler()->ProcessEvent(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
||||||
|
SCNotification& scn = *_scn;
|
||||||
|
int eventType = 0;
|
||||||
|
switch (scn.nmhdr.code) {
|
||||||
|
case SCN_STYLENEEDED:
|
||||||
|
eventType = wxEVT_STC_STYLENEEDED;
|
||||||
|
break;
|
||||||
|
case SCN_CHARADDED:
|
||||||
|
eventType = wxEVT_STC_CHARADDED;
|
||||||
|
break;
|
||||||
|
case SCN_UPDATEUI:
|
||||||
|
eventType = wxEVT_STC_UPDATEUI;
|
||||||
|
break;
|
||||||
|
case SCN_SAVEPOINTREACHED:
|
||||||
|
eventType = wxEVT_STC_SAVEPOINTREACHED;
|
||||||
|
break;
|
||||||
|
case SCN_SAVEPOINTLEFT:
|
||||||
|
eventType = wxEVT_STC_SAVEPOINTLEFT;
|
||||||
|
break;
|
||||||
|
case SCN_MODIFYATTEMPTRO:
|
||||||
|
eventType = wxEVT_STC_ROMODIFYATTEMPT;
|
||||||
|
break;
|
||||||
|
case SCN_DOUBLECLICK:
|
||||||
|
eventType = wxEVT_STC_DOUBLECLICK;
|
||||||
|
break;
|
||||||
|
case SCN_MODIFIED:
|
||||||
|
eventType = wxEVT_STC_MODIFIED;
|
||||||
|
break;
|
||||||
|
case SCN_KEY:
|
||||||
|
eventType = wxEVT_STC_KEY;
|
||||||
|
break;
|
||||||
|
case SCN_MACRORECORD:
|
||||||
|
eventType = wxEVT_STC_MACRORECORD;
|
||||||
|
break;
|
||||||
|
case SCN_MARGINCLICK:
|
||||||
|
eventType = wxEVT_STC_MARGINCLICK;
|
||||||
|
break;
|
||||||
|
case SCN_NEEDSHOWN:
|
||||||
|
eventType = wxEVT_STC_NEEDSHOWN;
|
||||||
|
break;
|
||||||
|
case SCN_POSCHANGED:
|
||||||
|
eventType = wxEVT_STC_POSCHANGED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (eventType) {
|
||||||
|
wxStyledTextEvent evt(eventType, GetId());
|
||||||
|
evt.SetPosition(scn.position);
|
||||||
|
evt.SetKey(scn.ch);
|
||||||
|
evt.SetModifiers(scn.modifiers);
|
||||||
|
if (eventType == wxEVT_STC_MODIFIED) {
|
||||||
|
evt.SetModificationType(scn.modificationType);
|
||||||
|
if (scn.text)
|
||||||
|
evt.SetText(wxString(scn.text, scn.length));
|
||||||
|
evt.SetLength(scn.length);
|
||||||
|
evt.SetLinesAdded(scn.linesAdded);
|
||||||
|
evt.SetLine(scn.line);
|
||||||
|
evt.SetFoldLevelNow(scn.foldLevelNow);
|
||||||
|
evt.SetFoldLevelPrev(scn.foldLevelPrev);
|
||||||
|
}
|
||||||
|
if (eventType == wxEVT_STC_MARGINCLICK)
|
||||||
|
evt.SetMargin(scn.margin);
|
||||||
|
if (eventType == wxEVT_STC_MACRORECORD) {
|
||||||
|
evt.SetMessage(scn.message);
|
||||||
|
evt.SetWParam(scn.wParam);
|
||||||
|
evt.SetLParam(scn.lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetEventHandler()->ProcessEvent(evt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
|
||||||
|
: wxCommandEvent(commandType, id)
|
||||||
|
{
|
||||||
|
m_position = 0;
|
||||||
|
m_key = 0;
|
||||||
|
m_modifiers = 0;
|
||||||
|
m_modificationType = 0;
|
||||||
|
m_length = 0;
|
||||||
|
m_linesAdded = 0;
|
||||||
|
m_line = 0;
|
||||||
|
m_foldLevelNow = 0;
|
||||||
|
m_foldLevelPrev = 0;
|
||||||
|
m_margin = 0;
|
||||||
|
m_message = 0;
|
||||||
|
m_wParam = 0;
|
||||||
|
m_lParam = 0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; }
|
||||||
|
bool wxStyledTextEvent::GetControl() const { return (m_modifiers & SCI_CTRL) != 0; }
|
||||||
|
bool wxStyledTextEvent::GetAlt() const { return (m_modifiers & SCI_ALT) != 0; }
|
||||||
|
|
||||||
|
void wxStyledTextEvent::CopyObject(wxObject& obj) const {
|
||||||
|
wxCommandEvent::CopyObject(obj);
|
||||||
|
|
||||||
|
wxStyledTextEvent* o = (wxStyledTextEvent*)&obj;
|
||||||
|
o->m_position = m_position;
|
||||||
|
o->m_key = m_key;
|
||||||
|
o->m_modifiers = m_modifiers;
|
||||||
|
o->m_modificationType = m_modificationType;
|
||||||
|
o->m_text = m_text;
|
||||||
|
o->m_length = m_length;
|
||||||
|
o->m_linesAdded = m_linesAdded;
|
||||||
|
o->m_line = m_line;
|
||||||
|
o->m_foldLevelNow = m_foldLevelNow;
|
||||||
|
o->m_foldLevelPrev = m_foldLevelPrev;
|
||||||
|
|
||||||
|
o->m_margin = m_margin;
|
||||||
|
|
||||||
|
o->m_message = m_message;
|
||||||
|
o->m_wParam = m_wParam;
|
||||||
|
o->m_lParam = m_lParam;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
297
contrib/src/stc/stc.h.in
Normal file
297
contrib/src/stc/stc.h.in
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: stc.h
|
||||||
|
// Purpose: A wxWindows implementation of Scintilla. This class is the
|
||||||
|
// one meant to be used directly by wx applications. It does not
|
||||||
|
// derive directly from the Scintilla classes, and in fact there
|
||||||
|
// is no mention of Scintilla classes at all in this header.
|
||||||
|
// This class delegates all method calls and events to the
|
||||||
|
// Scintilla objects and so forth. This allows the use of
|
||||||
|
// Scintilla without polluting the namespace with all the
|
||||||
|
// classes and itentifiers from Scintilla.
|
||||||
|
//
|
||||||
|
// Author: Robin Dunn
|
||||||
|
//
|
||||||
|
// Created: 13-Jan-2000
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 2000 by Total Control Software
|
||||||
|
// Licence: wxWindows license
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __stc_h__
|
||||||
|
#define __stc_h__
|
||||||
|
|
||||||
|
|
||||||
|
#include <wx/wx.h>
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// BEGIN generated section. The following code is automatically generated
|
||||||
|
// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
|
||||||
|
// and regenerate
|
||||||
|
|
||||||
|
%(VALUES)s
|
||||||
|
|
||||||
|
// END of generated section
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Others
|
||||||
|
|
||||||
|
#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class ScintillaWX; // forward declare
|
||||||
|
class WordList;
|
||||||
|
struct SCNotification;
|
||||||
|
|
||||||
|
|
||||||
|
extern const wxChar* wxSTCNameStr;
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxStyledTextCtrl : public wxControl {
|
||||||
|
public:
|
||||||
|
|
||||||
|
#ifdef SWIG
|
||||||
|
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
|
const char* name = "styledtext");
|
||||||
|
#else
|
||||||
|
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
|
const wxString& name = wxSTCNameStr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef SWIG
|
||||||
|
~wxStyledTextCtrl();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// BEGIN generated section. The following code is automatically generated
|
||||||
|
// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
|
||||||
|
// and regenerate
|
||||||
|
|
||||||
|
%(METHOD_DEFS)s
|
||||||
|
|
||||||
|
// END of generated section
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// Others...
|
||||||
|
|
||||||
|
|
||||||
|
// Returns the line number of the line with the caret.
|
||||||
|
int GetCurrentLine();
|
||||||
|
|
||||||
|
// Extract style settings from a spec-string which is composed of one or
|
||||||
|
// more of the following comma separated elements:
|
||||||
|
//
|
||||||
|
// bold turns on bold
|
||||||
|
// italic turns on italics
|
||||||
|
// fore:#RRGGBB sets the foreground colour
|
||||||
|
// back:#RRGGBB sets the background colour
|
||||||
|
// face:[facename] sets the font face name to use
|
||||||
|
// size:[num] sets the font size in points
|
||||||
|
// eol turns on eol filling
|
||||||
|
// underline turns on underlining
|
||||||
|
//
|
||||||
|
void StyleSetSpec(int styleNum, const wxString& spec);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set style size, face, bold, italic, and underline attributes from
|
||||||
|
// a wxFont's attributes.
|
||||||
|
void StyleSetFont(int styleNum, wxFont& font);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set all font style attributes at once.
|
||||||
|
void StyleSetFontAttr(int styleNum, int size,
|
||||||
|
const wxString& faceName,
|
||||||
|
bool bold, bool italic,
|
||||||
|
bool underline);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Perform one of the operations defined by the wxSTC_CMD_* constants.
|
||||||
|
void CmdKeyExecute(int cmd);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set the left and right margin in the edit area, measured in pixels.
|
||||||
|
void SetMargins(int left, int right);
|
||||||
|
|
||||||
|
|
||||||
|
// Retrieve the start and end positions of the current selection.
|
||||||
|
#ifdef SWIG
|
||||||
|
void GetSelection(int* OUTPUT, int* OUTPUT);
|
||||||
|
#else
|
||||||
|
void GetSelection(int* startPos, int* endPos);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Retrieve the point in the window where a position is displayed.
|
||||||
|
wxPoint PointFromPosition(int pos);
|
||||||
|
|
||||||
|
|
||||||
|
// Scroll enough to make the given line visible
|
||||||
|
void ScrollToLine(int line);
|
||||||
|
|
||||||
|
|
||||||
|
// Scroll enough to make the given column visible
|
||||||
|
void ScrollToColumn(int column);
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef SWIG
|
||||||
|
private:
|
||||||
|
// Event handlers
|
||||||
|
void OnPaint(wxPaintEvent& evt);
|
||||||
|
void OnScrollWin(wxScrollWinEvent& evt);
|
||||||
|
void OnSize(wxSizeEvent& evt);
|
||||||
|
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||||
|
void OnMouseMove(wxMouseEvent& evt);
|
||||||
|
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||||
|
void OnMouseRightUp(wxMouseEvent& evt);
|
||||||
|
void OnChar(wxKeyEvent& evt);
|
||||||
|
void OnKeyDown(wxKeyEvent& evt);
|
||||||
|
void OnLoseFocus(wxFocusEvent& evt);
|
||||||
|
void OnGainFocus(wxFocusEvent& evt);
|
||||||
|
void OnSysColourChanged(wxSysColourChangedEvent& evt);
|
||||||
|
void OnEraseBackground(wxEraseEvent& evt);
|
||||||
|
void OnMenu(wxCommandEvent& evt);
|
||||||
|
void OnListBox(wxCommandEvent& evt);
|
||||||
|
|
||||||
|
|
||||||
|
// Turn notifications from Scintilla into events
|
||||||
|
void NotifyChange();
|
||||||
|
void NotifyParent(SCNotification* scn);
|
||||||
|
|
||||||
|
long SendMsg(int msg, long wp=0, long lp=0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
DECLARE_CLASS(wxStyledTextCtrl)
|
||||||
|
|
||||||
|
ScintillaWX* m_swx;
|
||||||
|
wxStopWatch m_stopWatch;
|
||||||
|
|
||||||
|
|
||||||
|
friend class ScintillaWX;
|
||||||
|
friend class Platform;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxStyledTextEvent : public wxCommandEvent {
|
||||||
|
public:
|
||||||
|
wxStyledTextEvent(wxEventType commandType=0, int id=0);
|
||||||
|
~wxStyledTextEvent() {}
|
||||||
|
|
||||||
|
void SetPosition(int pos) { m_position = pos; }
|
||||||
|
void SetKey(int k) { m_key = k; }
|
||||||
|
void SetModifiers(int m) { m_modifiers = m; }
|
||||||
|
void SetModificationType(int t) { m_modificationType = t; }
|
||||||
|
void SetText(const char* t) { m_text = t; }
|
||||||
|
void SetLength(int len) { m_length = len; }
|
||||||
|
void SetLinesAdded(int num) { m_linesAdded = num; }
|
||||||
|
void SetLine(int val) { m_line = val; }
|
||||||
|
void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
|
||||||
|
void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
|
||||||
|
void SetMargin(int val) { m_margin = val; }
|
||||||
|
void SetMessage(int val) { m_message = val; }
|
||||||
|
void SetWParam(int val) { m_wParam = val; }
|
||||||
|
void SetLParam(int val) { m_lParam = val; }
|
||||||
|
|
||||||
|
int GetPosition() const { return m_position; }
|
||||||
|
int GetKey() const { return m_key; }
|
||||||
|
int GetModifiers() const { return m_modifiers; }
|
||||||
|
int GetModificationType() const { return m_modificationType; }
|
||||||
|
wxString GetText() const { return m_text; }
|
||||||
|
int GetLength() const { return m_length; }
|
||||||
|
int GetLinesAdded() const { return m_linesAdded; }
|
||||||
|
int GetLine() const { return m_line; }
|
||||||
|
int GetFoldLevelNow() const { return m_foldLevelNow; }
|
||||||
|
int GetFoldLevelPrev() const { return m_foldLevelPrev; }
|
||||||
|
int GetMargin() const { return m_margin; }
|
||||||
|
int GetMessage() const { return m_message; }
|
||||||
|
int GetWParam() const { return m_wParam; }
|
||||||
|
int GetLParam() const { return m_lParam; }
|
||||||
|
|
||||||
|
bool GetShift() const;
|
||||||
|
bool GetControl() const;
|
||||||
|
bool GetAlt() const;
|
||||||
|
|
||||||
|
void CopyObject(wxObject& obj) const;
|
||||||
|
|
||||||
|
#ifndef SWIG
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
|
||||||
|
|
||||||
|
int m_position;
|
||||||
|
int m_key;
|
||||||
|
int m_modifiers;
|
||||||
|
|
||||||
|
int m_modificationType; // wxEVT_STC_MODIFIED
|
||||||
|
wxString m_text;
|
||||||
|
int m_length;
|
||||||
|
int m_linesAdded;
|
||||||
|
int m_line;
|
||||||
|
int m_foldLevelNow;
|
||||||
|
int m_foldLevelPrev;
|
||||||
|
|
||||||
|
int m_margin; // wxEVT_STC_MARGINCLICK
|
||||||
|
|
||||||
|
int m_message; // wxEVT_STC_MACRORECORD
|
||||||
|
int m_wParam;
|
||||||
|
int m_lParam;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Event types
|
||||||
|
enum {
|
||||||
|
wxEVT_STC_CHANGE = 1650,
|
||||||
|
wxEVT_STC_STYLENEEDED,
|
||||||
|
wxEVT_STC_CHARADDED,
|
||||||
|
wxEVT_STC_UPDATEUI,
|
||||||
|
wxEVT_STC_SAVEPOINTREACHED,
|
||||||
|
wxEVT_STC_SAVEPOINTLEFT,
|
||||||
|
wxEVT_STC_ROMODIFYATTEMPT,
|
||||||
|
wxEVT_STC_DOUBLECLICK,
|
||||||
|
wxEVT_STC_MODIFIED,
|
||||||
|
wxEVT_STC_KEY,
|
||||||
|
wxEVT_STC_MACRORECORD,
|
||||||
|
wxEVT_STC_MARGINCLICK,
|
||||||
|
wxEVT_STC_NEEDSHOWN,
|
||||||
|
wxEVT_STC_POSCHANGED
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef SWIG
|
||||||
|
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
||||||
|
|
||||||
|
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
9
debian/README.Debian
vendored
9
debian/README.Debian
vendored
@@ -6,12 +6,18 @@ The following packages are built from the wxWindows CVS source.
|
|||||||
libwxbase wxBase runtime shared libraries
|
libwxbase wxBase runtime shared libraries
|
||||||
libwxbase-dev extra files and static libs for building wxBase apps
|
libwxbase-dev extra files and static libs for building wxBase apps
|
||||||
libwxbase-dbg wxBase libraries built with -g and __WXDEBUG__
|
libwxbase-dbg wxBase libraries built with -g and __WXDEBUG__
|
||||||
|
|
||||||
libwxgtk wxGTK runtime shared libraries
|
libwxgtk wxGTK runtime shared libraries
|
||||||
libwxgtk-dev extra files and static libs for building wxGTK apps
|
libwxgtk-dev extra files and static libs for building wxGTK apps
|
||||||
libwxgtk-dbg wxGTK libraries built with -g and __WXDEBUG__
|
libwxgtk-dbg wxGTK libraries built with -g and __WXDEBUG__
|
||||||
libwxgtk-python Python binding to wxGTK
|
|
||||||
|
libwxgtk-python Python binding to wxGTK (from 2.2.3 onward, this
|
||||||
|
obsoletes the libwxgtk-python-contrib package as
|
||||||
|
all python modules are build into a single monolith)
|
||||||
|
|
||||||
wxwin-contrib wxWin contrib runtime shared libs (built with wxGTK)
|
wxwin-contrib wxWin contrib runtime shared libs (built with wxGTK)
|
||||||
wxwin-contrib-dev extra files and static contrib libs for building apps
|
wxwin-contrib-dev extra files and static contrib libs for building apps
|
||||||
|
|
||||||
wxwin-headers common header files for building wxWindows apps
|
wxwin-headers common header files for building wxWindows apps
|
||||||
wxwin-doc HTML version of the wxWindows manual
|
wxwin-doc HTML version of the wxWindows manual
|
||||||
wxwin-examples wxWindows and wxPython demos and samples (source)
|
wxwin-examples wxWindows and wxPython demos and samples (source)
|
||||||
@@ -19,3 +25,4 @@ wxwin-i18n message catalogs for native language support
|
|||||||
|
|
||||||
|
|
||||||
-- Ron Lee <ron@debian.org>, Sun, 13 Feb 2000 18:40:00 +1030
|
-- Ron Lee <ron@debian.org>, Sun, 13 Feb 2000 18:40:00 +1030
|
||||||
|
|
||||||
|
25
debian/changelog
vendored
25
debian/changelog
vendored
@@ -1,3 +1,28 @@
|
|||||||
|
wxwindows2.2 (2.2.5) unstable; urgency=low
|
||||||
|
|
||||||
|
* Fixed parser.y for Alpha builds (#82949)
|
||||||
|
* changed mesa dependency to the virtual libgl package and
|
||||||
|
added Conflicts for the old 2.1 packages (which are now
|
||||||
|
gone from woody anyway) Closes: #80120, #70778, #70779, #70780
|
||||||
|
* wxPython now builds as a single unit (including contrib)
|
||||||
|
so removed the libwxgtk-python-contrib package
|
||||||
|
* updated translations
|
||||||
|
* new event table macro to enable code being written with 2.2
|
||||||
|
to be forward compatible with the changes in 2.4
|
||||||
|
* numerous sundry bugfixes
|
||||||
|
|
||||||
|
-- Ron Lee <ron@debian.org> Wed, 24 Jan 2001 18:51:24 -0800
|
||||||
|
|
||||||
|
wxwindows2.2 (2.2.2) unstable; urgency=low
|
||||||
|
|
||||||
|
* added missing dependancy for contrib-dev package. Closes: #70880
|
||||||
|
* by popular demand, added a package with the python-contrib libs.
|
||||||
|
* more tweaks to deb/rules. autodetect the python install location,
|
||||||
|
and cache the results of configure tests for all packages.
|
||||||
|
* and of course a whole stack of minor fixes in the main codebase too.
|
||||||
|
|
||||||
|
-- Ron Lee <ron@debian.org> Tue, 5 Sep 2000 18:51:24 +0930
|
||||||
|
|
||||||
wxwindows2.2 (2.2.1) unstable; urgency=low
|
wxwindows2.2 (2.2.1) unstable; urgency=low
|
||||||
|
|
||||||
* wxWin 2.2.1 stable release.
|
* wxWin 2.2.1 stable release.
|
||||||
|
22
debian/control.in
vendored
22
debian/control.in
vendored
@@ -1,9 +1,9 @@
|
|||||||
Source: wxwindows=V
|
Source: wxwindows=V
|
||||||
Section: libs
|
Section: libs
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper, flex, bison, libgtk1.2-dev, python-dev (>=1.5.2), zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, mesag-dev, libesd0-dev
|
Build-Depends: debhelper (>=1.1.17), flex, bison, libgtk1.2-dev, python-dev (>=1.5.2), python-distutils, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, libgl-dev, libesd0-dev
|
||||||
Maintainer: Ron Lee <ron@debian.org>
|
Maintainer: Ron Lee <ron@debian.org>
|
||||||
Standards-Version: 3.2.0
|
Standards-Version: 3.2.1.2
|
||||||
|
|
||||||
Package: libwxbase=V
|
Package: libwxbase=V
|
||||||
Architecture: any
|
Architecture: any
|
||||||
@@ -66,7 +66,8 @@ Package: libwxgtk=V
|
|||||||
Architecture: any
|
Architecture: any
|
||||||
Section: libs
|
Section: libs
|
||||||
Depends: ${shlibs:Depends}
|
Depends: ${shlibs:Depends}
|
||||||
Suggests: mesag3
|
Suggests: libgl1
|
||||||
|
Replaces: wxgtk2.1
|
||||||
Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ runtime)
|
Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ runtime)
|
||||||
wxWindows is a class library for C++ providing GUI (Graphical User
|
wxWindows is a class library for C++ providing GUI (Graphical User
|
||||||
Interface) and other facilities on more than one platform. Version =V
|
Interface) and other facilities on more than one platform. Version =V
|
||||||
@@ -80,9 +81,9 @@ Package: libwxgtk=V-dev
|
|||||||
Architecture: any
|
Architecture: any
|
||||||
Section: devel
|
Section: devel
|
||||||
Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libc6-dev
|
Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libc6-dev
|
||||||
Suggests: wxwin=V-doc, libstdc++-dev, gettext, mesag-dev
|
Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev
|
||||||
Conflicts: libwxgtk-dev
|
Conflicts: libwxgtk-dev
|
||||||
Replaces: libwxgtk-dev
|
Replaces: libwxgtk-dev, wxgtk2.1-dev
|
||||||
Provides: libwxgtk-dev
|
Provides: libwxgtk-dev
|
||||||
Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development)
|
Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development)
|
||||||
wxWindows is a class library for C++ providing GUI (Graphical User
|
wxWindows is a class library for C++ providing GUI (Graphical User
|
||||||
@@ -113,14 +114,17 @@ Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development)
|
|||||||
Package: libwxgtk=V-python
|
Package: libwxgtk=V-python
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Section: interpreters
|
Section: interpreters
|
||||||
Depends: libwxgtk=V (= ${Source-Version}), python-base (>=1.5.2), ${shlibs:Depends}
|
Depends: libwxgtk=V (= ${Source-Version}), libwxgtk=V-contrib (= ${Source-Version}), python-base (>=1.5.2), ${shlibs:Depends}
|
||||||
Suggests: wxwin=V-doc
|
Suggests: wxwin=V-doc
|
||||||
|
Conflicts: libwxgtk=V-python-contrib, python-wxwin
|
||||||
|
Replaces: libwxgtk=V-python-contrib, python-wxwin
|
||||||
Description: wxWindows Cross-platform C++ GUI toolkit (Python binding)
|
Description: wxWindows Cross-platform C++ GUI toolkit (Python binding)
|
||||||
wxWindows is a class library for C++ providing GUI (Graphical User
|
wxWindows is a class library for C++ providing GUI (Graphical User
|
||||||
Interface) and other facilities on more than one platform. Version =V
|
Interface) and other facilities on more than one platform. Version =V
|
||||||
currently supports subsets of GTK+, Motif, and MS Windows.
|
currently supports subsets of GTK+, Motif, and MS Windows.
|
||||||
.
|
.
|
||||||
This package provides a Python binding to the wxGTK library.
|
This package provides a Python binding to the wxGTK library and it's
|
||||||
|
contrib libs.
|
||||||
|
|
||||||
Package: libwxgtk=V-contrib
|
Package: libwxgtk=V-contrib
|
||||||
Architecture: any
|
Architecture: any
|
||||||
@@ -137,7 +141,7 @@ Description: wxWindows Cross-platform C++ GUI toolkit (runtime contrib libs)
|
|||||||
Package: libwxgtk=V-contrib-dev
|
Package: libwxgtk=V-contrib-dev
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Section: devel
|
Section: devel
|
||||||
Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V-dev (= ${Source-Version}), libc6-dev
|
Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V-dev (= ${Source-Version}), libwxgtk=V-contrib (= ${Source-Version}), libc6-dev
|
||||||
Conflicts: libwxgtk-contrib-dev
|
Conflicts: libwxgtk-contrib-dev
|
||||||
Replaces: libwxgtk-contrib-dev
|
Replaces: libwxgtk-contrib-dev
|
||||||
Provides: libwxgtk-contrib-dev
|
Provides: libwxgtk-contrib-dev
|
||||||
@@ -153,7 +157,7 @@ Package: wxwin=V-headers
|
|||||||
Architecture: any
|
Architecture: any
|
||||||
Section: devel
|
Section: devel
|
||||||
Conflicts: wxwin-headers
|
Conflicts: wxwin-headers
|
||||||
Replaces: wxwin-headers
|
Replaces: wxwin-headers, wxgtk2.1-dev
|
||||||
Provides: wxwin-headers
|
Provides: wxwin-headers
|
||||||
Description: wxWindows Cross-platform C++ GUI toolkit (header files)
|
Description: wxWindows Cross-platform C++ GUI toolkit (header files)
|
||||||
wxWindows is a class library for C++ providing GUI (Graphical User
|
wxWindows is a class library for C++ providing GUI (Graphical User
|
||||||
|
1
debian/libwxbase-dbg.dirs
vendored
1
debian/libwxbase-dbg.dirs
vendored
@@ -1,4 +1,5 @@
|
|||||||
usr/bin
|
usr/bin
|
||||||
usr/lib/wx/include/wx
|
usr/lib/wx/include/wx
|
||||||
usr/share/man/man1
|
usr/share/man/man1
|
||||||
|
usr/share/lintian/overrides
|
||||||
|
|
||||||
|
2
debian/libwxbase-dbg.docs
vendored
2
debian/libwxbase-dbg.docs
vendored
@@ -1,2 +0,0 @@
|
|||||||
docs/licence.txt
|
|
||||||
|
|
3
debian/libwxbase-dev.docs
vendored
3
debian/libwxbase-dev.docs
vendored
@@ -1,3 +0,0 @@
|
|||||||
docs/preamble.txt
|
|
||||||
docs/licence.txt
|
|
||||||
docs/licendoc.txt
|
|
1
debian/libwxbase.docs
vendored
1
debian/libwxbase.docs
vendored
@@ -1 +0,0 @@
|
|||||||
docs/licence.txt
|
|
2
debian/libwxgtk-contrib-dev.docs
vendored
2
debian/libwxgtk-contrib-dev.docs
vendored
@@ -1,2 +0,0 @@
|
|||||||
docs/licence.txt
|
|
||||||
|
|
2
debian/libwxgtk-contrib.docs
vendored
2
debian/libwxgtk-contrib.docs
vendored
@@ -1,2 +0,0 @@
|
|||||||
docs/licence.txt
|
|
||||||
|
|
1
debian/libwxgtk-dbg.dirs
vendored
1
debian/libwxgtk-dbg.dirs
vendored
@@ -1,4 +1,5 @@
|
|||||||
usr/bin
|
usr/bin
|
||||||
usr/lib/wx/include/wx/gtkd/
|
usr/lib/wx/include/wx/gtkd/
|
||||||
usr/share/man/man1
|
usr/share/man/man1
|
||||||
|
usr/share/lintian/overrides
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dbg.docs
vendored
2
debian/libwxgtk-dbg.docs
vendored
@@ -1,2 +0,0 @@
|
|||||||
docs/licence.txt
|
|
||||||
|
|
3
debian/libwxgtk-dev.docs
vendored
3
debian/libwxgtk-dev.docs
vendored
@@ -1,3 +0,0 @@
|
|||||||
docs/preamble.txt
|
|
||||||
docs/licence.txt
|
|
||||||
docs/licendoc.txt
|
|
3
debian/libwxgtk-python.dirs
vendored
3
debian/libwxgtk-python.dirs
vendored
@@ -1 +1,2 @@
|
|||||||
usr/lib/python1.5/site-packages/wxPython/lib/sizers
|
usr/lib/=PY/site-packages/wxPython/lib
|
||||||
|
|
||||||
|
2
debian/libwxgtk-python.files
vendored
2
debian/libwxgtk-python.files
vendored
@@ -1,4 +1,4 @@
|
|||||||
usr/lib/python1.5/site-packages/wxPython
|
usr/lib/=PY/site-packages/wxPython
|
||||||
usr/lib/libwxPyHelpers*.so
|
usr/lib/libwxPyHelpers*.so
|
||||||
usr/lib/libwxPyHelpers*.so.*
|
usr/lib/libwxPyHelpers*.so.*
|
||||||
|
|
||||||
|
7
debian/libwxgtk-python.postinst
vendored
7
debian/libwxgtk-python.postinst
vendored
@@ -2,12 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
WXPYTHONDIR="/usr/lib/python1.5/site-packages/wxPython"
|
WXPYTHONDIR="/usr/lib/=PY/site-packages/wxPython"
|
||||||
|
|
||||||
if [ "$1" = "configure" ]; then
|
if [ "$1" = "configure" ]; then
|
||||||
python /usr/lib/python1.5/compileall.py -q ${WXPYTHONDIR}
|
python /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
|
||||||
python -O /usr/lib/python1.5/compileall.py -q ${WXPYTHONDIR}
|
python -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
|
||||||
ldconfig
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
8
debian/libwxgtk-python.prerm
vendored
8
debian/libwxgtk-python.prerm
vendored
@@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
WXPYTHONDIR="/usr/lib/python1.5/site-packages/wxPython"
|
PACKAGE="libwxgtk=V-python"
|
||||||
find ${WXPYTHONDIR} -name "*.py?" -exec rm -f {} \;
|
|
||||||
|
dpkg --listfiles $PACKAGE |
|
||||||
|
awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
|
||||||
|
xargs rm -f >&2
|
||||||
|
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
|
1
debian/libwxgtk.docs
vendored
1
debian/libwxgtk.docs
vendored
@@ -1 +0,0 @@
|
|||||||
docs/licence.txt
|
|
5
debian/lintian-override
vendored
Normal file
5
debian/lintian-override
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
libwxgtk2.2-dbg: non-dev-pkg-with-shlib-symlink
|
||||||
|
libwxgtk2.2-dbg: unused-shlib-entry-in-control-file
|
||||||
|
libwxbase2.2-dbg: non-dev-pkg-with-shlib-symlink
|
||||||
|
libwxbase2.2-dbg: unused-shlib-entry-in-control-file
|
||||||
|
|
100
debian/rules
vendored
100
debian/rules
vendored
@@ -11,6 +11,7 @@ export DH_COMPAT=2
|
|||||||
export DH_OPTIONS
|
export DH_OPTIONS
|
||||||
|
|
||||||
release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p')
|
release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p')
|
||||||
|
python_dir:=python$(shell python -c "import sys;print sys.version[:3]")
|
||||||
|
|
||||||
# Packages to build:
|
# Packages to build:
|
||||||
package_wxbase_lib=libwxbase$(release)
|
package_wxbase_lib=libwxbase$(release)
|
||||||
@@ -42,21 +43,26 @@ objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_wxbase_debug) \
|
|||||||
$(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \
|
$(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \
|
||||||
$(objdir_doc) $(objdir_examples)
|
$(objdir_doc) $(objdir_examples)
|
||||||
|
|
||||||
build_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \
|
# Build stamps:
|
||||||
build-wxbase-debug-stamp build-gtk-shared-stamp \
|
build_arch_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \
|
||||||
build-gtk-static-stamp build-gtk-debug-stamp \
|
build-wxbase-debug-stamp build-gtk-shared-stamp \
|
||||||
build-contrib-shared-stamp build-contrib-static-stamp \
|
build-gtk-static-stamp build-gtk-debug-stamp \
|
||||||
build-gtk-python-stamp build-examples-stamp build-doc-stamp \
|
build-contrib-shared-stamp build-contrib-static-stamp \
|
||||||
build-i18n-stamp
|
build-gtk-py-stamp
|
||||||
|
|
||||||
install_all=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
|
build_indep_stamps=build-examples-stamp build-doc-stamp build-i18n-stamp
|
||||||
install-gtk-lib install-gtk-dev install-gtk-dbg \
|
|
||||||
install-gtk-contrib install-gtk-contrib-dev install-gtk-py \
|
|
||||||
install-headers install-i18n install-doc install-examples
|
|
||||||
|
|
||||||
wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \
|
build_stamps=$(build_arch_stamps) $(build_indep_stamps)
|
||||||
--prefix=$(shell pwd) \
|
|
||||||
--exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
|
# Install targets:
|
||||||
|
install_all_arch=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
|
||||||
|
install-gtk-lib install-gtk-dev install-gtk-dbg \
|
||||||
|
install-gtk-contrib install-gtk-contrib-dev install-gtk-py \
|
||||||
|
install-headers
|
||||||
|
|
||||||
|
install_all_indep=install-i18n install-doc install-examples
|
||||||
|
|
||||||
|
install_all=$(install_all_arch) $(install_all_indep)
|
||||||
|
|
||||||
|
|
||||||
# The Rules:
|
# The Rules:
|
||||||
@@ -95,7 +101,8 @@ control-files-stamp: debian/control debian/wxwin-doc.doc-base
|
|||||||
done;
|
done;
|
||||||
@for f in dirs docs files postinst prerm; do \
|
@for f in dirs docs files postinst prerm; do \
|
||||||
echo "generating control file $(package_gtk_py).$$f"; \
|
echo "generating control file $(package_gtk_py).$$f"; \
|
||||||
cp debian/libwxgtk-python.$$f debian/$(package_gtk_py).$$f; \
|
sed -e 's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian/libwxgtk-python.$$f \
|
||||||
|
> debian/$(package_gtk_py).$$f; \
|
||||||
done;
|
done;
|
||||||
@for f in dirs postinst; do \
|
@for f in dirs postinst; do \
|
||||||
echo "generating control file $(package_gtk_contrib).$$f"; \
|
echo "generating control file $(package_gtk_contrib).$$f"; \
|
||||||
@@ -123,6 +130,8 @@ control-files-stamp: debian/control debian/wxwin-doc.doc-base
|
|||||||
done;
|
done;
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
build_arch: control-files-stamp $(build_arch_stamps)
|
||||||
|
|
||||||
build: control-files-stamp $(build_stamps)
|
build: control-files-stamp $(build_stamps)
|
||||||
|
|
||||||
build-wxbase-shared-stamp:
|
build-wxbase-shared-stamp:
|
||||||
@@ -130,6 +139,7 @@ build-wxbase-shared-stamp:
|
|||||||
mkdir $(objdir_wxbase_shared)
|
mkdir $(objdir_wxbase_shared)
|
||||||
cd $(objdir_wxbase_shared) \
|
cd $(objdir_wxbase_shared) \
|
||||||
&& ../configure --prefix=/usr \
|
&& ../configure --prefix=/usr \
|
||||||
|
--cache-file=../config_deb.cache \
|
||||||
--disable-gui \
|
--disable-gui \
|
||||||
--enable-burnt_name \
|
--enable-burnt_name \
|
||||||
--with-zlib=sys \
|
--with-zlib=sys \
|
||||||
@@ -141,6 +151,7 @@ build-wxbase-static-stamp:
|
|||||||
mkdir $(objdir_wxbase_static)
|
mkdir $(objdir_wxbase_static)
|
||||||
cd $(objdir_wxbase_static) \
|
cd $(objdir_wxbase_static) \
|
||||||
&& ../configure --prefix=/usr \
|
&& ../configure --prefix=/usr \
|
||||||
|
--cache-file=../config_deb.cache \
|
||||||
--disable-gui \
|
--disable-gui \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--with-zlib=sys \
|
--with-zlib=sys \
|
||||||
@@ -152,6 +163,7 @@ build-wxbase-debug-stamp:
|
|||||||
mkdir $(objdir_wxbase_debug)
|
mkdir $(objdir_wxbase_debug)
|
||||||
cd $(objdir_wxbase_debug) \
|
cd $(objdir_wxbase_debug) \
|
||||||
&& ../configure --prefix=/usr \
|
&& ../configure --prefix=/usr \
|
||||||
|
--cache-file=../config_deb.cache \
|
||||||
--disable-gui \
|
--disable-gui \
|
||||||
--enable-debug \
|
--enable-debug \
|
||||||
--enable-burnt_name \
|
--enable-burnt_name \
|
||||||
@@ -164,6 +176,7 @@ build-gtk-shared-stamp:
|
|||||||
mkdir $(objdir_gtk_shared)
|
mkdir $(objdir_gtk_shared)
|
||||||
cd $(objdir_gtk_shared) \
|
cd $(objdir_gtk_shared) \
|
||||||
&& ../configure --prefix=/usr \
|
&& ../configure --prefix=/usr \
|
||||||
|
--cache-file=../config_deb.cache \
|
||||||
--with-gtk \
|
--with-gtk \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
--enable-burnt_name \
|
--enable-burnt_name \
|
||||||
@@ -179,6 +192,7 @@ build-gtk-static-stamp:
|
|||||||
mkdir $(objdir_gtk_static)
|
mkdir $(objdir_gtk_static)
|
||||||
cd $(objdir_gtk_static) \
|
cd $(objdir_gtk_static) \
|
||||||
&& ../configure --prefix=/usr \
|
&& ../configure --prefix=/usr \
|
||||||
|
--cache-file=../config_deb.cache \
|
||||||
--with-gtk \
|
--with-gtk \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
@@ -194,6 +208,7 @@ build-gtk-debug-stamp:
|
|||||||
mkdir $(objdir_gtk_debug)
|
mkdir $(objdir_gtk_debug)
|
||||||
cd $(objdir_gtk_debug) \
|
cd $(objdir_gtk_debug) \
|
||||||
&& ../configure --prefix=/usr \
|
&& ../configure --prefix=/usr \
|
||||||
|
--cache-file=../config_deb.cache \
|
||||||
--with-gtk \
|
--with-gtk \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
--enable-debug \
|
--enable-debug \
|
||||||
@@ -207,19 +222,21 @@ build-gtk-debug-stamp:
|
|||||||
|
|
||||||
build-contrib-shared-stamp: build-gtk-shared-stamp
|
build-contrib-shared-stamp: build-gtk-shared-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
cd $(objdir_gtk_shared)/contrib/src && $(MAKE)
|
cd $(objdir_gtk_shared)/contrib/src \
|
||||||
|
&& $(MAKE)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build-contrib-static-stamp: build-gtk-static-stamp
|
build-contrib-static-stamp: build-gtk-static-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
cd $(objdir_gtk_static)/contrib/src && $(MAKE)
|
cd $(objdir_gtk_static)/contrib/src \
|
||||||
|
&& $(MAKE)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build-gtk-python-stamp: build-gtk-shared-stamp
|
build-gtk-py-stamp: build-gtk-shared-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
cd wxPython/src \
|
touch docs/lgpl.txt
|
||||||
&& touch gtk/*.cpp gtk/*.py \
|
cd wxPython \
|
||||||
&& ../distrib/build.py -b WXDIR=../.. WXCONFIG='$(wxconfig)'
|
&& ./setup.py build IN_CVS_TREE=1
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build-doc-stamp: build-gtk-shared-stamp
|
build-doc-stamp: build-gtk-shared-stamp
|
||||||
@@ -266,8 +283,9 @@ build-i18n-stamp: build-gtk-shared-stamp
|
|||||||
clean: debian/control
|
clean: debian/control
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
rm -rf control-files-stamp $(build_stamps) $(objdirs)
|
rm -rf config_deb.cache control-files-stamp $(build_stamps) $(objdirs)
|
||||||
-cd wxPython/src && $(MAKE) clean
|
rm -f docs/lgpl.txt
|
||||||
|
cd wxPython && ./setup.py clean
|
||||||
dh_clean
|
dh_clean
|
||||||
rm -f debian/$(package_wxbase_lib).*
|
rm -f debian/$(package_wxbase_lib).*
|
||||||
rm -f debian/$(package_wxbase_dev).*
|
rm -f debian/$(package_wxbase_dev).*
|
||||||
@@ -283,6 +301,8 @@ clean: debian/control
|
|||||||
rm -f debian/$(package_doc).*
|
rm -f debian/$(package_doc).*
|
||||||
rm -f debian/$(package_examples).*
|
rm -f debian/$(package_examples).*
|
||||||
|
|
||||||
|
install_arch: build_arch $(install_all_arch)
|
||||||
|
|
||||||
install: build $(install_all)
|
install: build $(install_all)
|
||||||
|
|
||||||
install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib)
|
install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib)
|
||||||
@@ -311,6 +331,7 @@ install-wxbase-dbg: build-wxbase-debug-stamp
|
|||||||
dh_installdirs
|
dh_installdirs
|
||||||
cp -a $(objdir_wxbase_debug)/lib/* debian/$(package_wxbase_dbg)/usr/lib
|
cp -a $(objdir_wxbase_debug)/lib/* debian/$(package_wxbase_dbg)/usr/lib
|
||||||
cp $(objdir_wxbase_debug)/wxbased-config debian/$(package_wxbase_dbg)/usr/bin/
|
cp $(objdir_wxbase_debug)/wxbased-config debian/$(package_wxbase_dbg)/usr/bin/
|
||||||
|
cp debian/lintian-override debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg)
|
||||||
|
|
||||||
install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib)
|
install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib)
|
||||||
install-gtk-lib: build-gtk-shared-stamp
|
install-gtk-lib: build-gtk-shared-stamp
|
||||||
@@ -339,6 +360,7 @@ install-gtk-dbg: build-gtk-debug-stamp
|
|||||||
dh_installdirs
|
dh_installdirs
|
||||||
cp -a $(objdir_gtk_debug)/lib/* debian/$(package_gtk_dbg)/usr/lib
|
cp -a $(objdir_gtk_debug)/lib/* debian/$(package_gtk_dbg)/usr/lib
|
||||||
cp $(objdir_gtk_debug)/wxgtkd-config debian/$(package_gtk_dbg)/usr/bin/
|
cp $(objdir_gtk_debug)/wxgtkd-config debian/$(package_gtk_dbg)/usr/bin/
|
||||||
|
cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
|
||||||
|
|
||||||
install-gtk-contrib: DH_OPTIONS=-p$(package_gtk_contrib)
|
install-gtk-contrib: DH_OPTIONS=-p$(package_gtk_contrib)
|
||||||
install-gtk-contrib: build-contrib-shared-stamp
|
install-gtk-contrib: build-contrib-shared-stamp
|
||||||
@@ -360,18 +382,14 @@ install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-dev
|
|||||||
rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk*.a
|
rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk*.a
|
||||||
|
|
||||||
install-gtk-py: DH_OPTIONS=-p$(package_gtk_py)
|
install-gtk-py: DH_OPTIONS=-p$(package_gtk_py)
|
||||||
install-gtk-py: build-gtk-python-stamp
|
install-gtk-py: build-gtk-py-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_clean -k
|
dh_clean -k
|
||||||
dh_installdirs
|
dh_installdirs
|
||||||
cd wxPython/src \
|
cd wxPython \
|
||||||
&& ../distrib/build.py -i \
|
&& ./setup.py install --prefix=`pwd`/../debian/$(package_gtk_py)/usr
|
||||||
TARGETDIR=../../debian/$(package_gtk_py)/usr/lib/python1.5/site-packages/wxPython \
|
find debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \
|
||||||
HELPERLIBDIR=../../debian/$(package_gtk_py)/usr/lib \
|
|
||||||
WXDIR=../..
|
|
||||||
rm -rf debian/$(package_gtk_py)/usr/lib/python1.5/site-packages/wxPython/demo
|
|
||||||
find debian/$(package_gtk_py)/usr/lib/python1.5/site-packages/wxPython \
|
|
||||||
-name '*.py?' -exec rm '{}' ';'
|
-name '*.py?' -exec rm '{}' ';'
|
||||||
|
|
||||||
install-headers: DH_OPTIONS=-p$(package_headers)
|
install-headers: DH_OPTIONS=-p$(package_headers)
|
||||||
@@ -422,19 +440,21 @@ binary-common:
|
|||||||
dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg)
|
dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg)
|
||||||
dh_compress
|
dh_compress
|
||||||
dh_fixperms
|
dh_fixperms
|
||||||
dh_makeshlibs
|
dh_makeshlibs -N$(package_gtk_py)
|
||||||
dh_installdeb
|
dh_installdeb
|
||||||
dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_py)/usr/lib
|
dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib
|
||||||
dh_gencontrol
|
dh_gencontrol
|
||||||
dh_md5sums
|
dh_md5sums
|
||||||
dh_builddeb
|
dh_builddeb
|
||||||
|
|
||||||
# Build architecture-independent files here.
|
# Build architecture-independent files here.
|
||||||
|
# Note that you currently can't build the indep packages without first
|
||||||
|
# building the arch specific package files needed to create them.
|
||||||
binary-indep: build install
|
binary-indep: build install
|
||||||
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
||||||
|
|
||||||
# Build architecture-dependent files here.
|
# Build just the architecture-dependent files here.
|
||||||
binary-arch: build install
|
binary-arch: build_arch install_arch
|
||||||
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
|
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
|
||||||
|
|
||||||
# Build all packages target.
|
# Build all packages target.
|
||||||
@@ -478,10 +498,10 @@ binary-doc: control-files-stamp install-doc
|
|||||||
$(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common
|
$(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build clean binary-indep binary-arch binary binary-common binary-gtk \
|
.PHONY: build build_arch clean binary-indep binary-arch binary binary-common \
|
||||||
binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \
|
binary-gtk binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \
|
||||||
binary-wxbase-dbg binary-doc install install-wxbase-lib \
|
binary-wxbase-dbg binary-doc install install_arch install-wxbase-lib \
|
||||||
install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \
|
install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \
|
||||||
install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \
|
install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \
|
||||||
install-gtk-py install-headers install-i18n install-doc install-examples
|
install-gtk-py install-headers install-i18n install-doc install-examples
|
||||||
|
|
||||||
|
1
debian/wxwin-examples.docs
vendored
1
debian/wxwin-examples.docs
vendored
@@ -1 +0,0 @@
|
|||||||
docs/licence.txt
|
|
2
debian/wxwin-headers.docs
vendored
2
debian/wxwin-headers.docs
vendored
@@ -1,2 +0,0 @@
|
|||||||
docs/licence.txt
|
|
||||||
|
|
2
debian/wxwin-i18n.docs
vendored
2
debian/wxwin-i18n.docs
vendored
@@ -1,2 +0,0 @@
|
|||||||
docs/licence.txt
|
|
||||||
|
|
@@ -603,6 +603,7 @@ samples/dnd/*.xpm
|
|||||||
samples/dnd/*.png
|
samples/dnd/*.png
|
||||||
samples/dnd/*.ico
|
samples/dnd/*.ico
|
||||||
samples/dnd/*.txt
|
samples/dnd/*.txt
|
||||||
|
samples/dnd/*.cur
|
||||||
|
|
||||||
samples/tab/*.cpp
|
samples/tab/*.cpp
|
||||||
samples/tab/*.h
|
samples/tab/*.h
|
||||||
|
@@ -12,8 +12,12 @@ Rem TODO: check differing setup.h options, again by programmatic modification
|
|||||||
set WXDIR=%WXWIN%
|
set WXDIR=%WXWIN%
|
||||||
set FATWXWIN=%WXDIR%
|
set FATWXWIN=%WXDIR%
|
||||||
set FULLWXWIN=%WXDIR%
|
set FULLWXWIN=%WXDIR%
|
||||||
if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FATWXWIN=%@PATH[%WXDIR%]wxwind~
|
if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FATWXWIN=%@PATH[%WXDIR%]wxwind~1
|
||||||
if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FULLWXWIN=%@PATH[%WXDIR%]wxWindows
|
if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FULLWXWIN=%@PATH[%WXDIR%]wxWindows
|
||||||
|
|
||||||
|
Rem The following line is for a specific environment -- edit, or comment out
|
||||||
|
if not %@INDEX["%WXDIR%","wx2stable"] == "-1" set FATWXWIN=d:\wx2sta~1\wxwind~1
|
||||||
|
|
||||||
echo Full wxWindows path is %FULLWXWIN%, FAT path is %FATWXWIN%
|
echo Full wxWindows path is %FULLWXWIN%, FAT path is %FATWXWIN%
|
||||||
set BUILDDEST=o:\wxWinBuild
|
set BUILDDEST=o:\wxWinBuild
|
||||||
Rem Only carry on if we haven't specified a single target
|
Rem Only carry on if we haven't specified a single target
|
||||||
@@ -577,40 +581,40 @@ call borland
|
|||||||
echo *** 16-bit BC++ Debug ***
|
echo *** 16-bit BC++ Debug ***
|
||||||
Rem 16-bit BC++ Debug
|
Rem 16-bit BC++ Debug
|
||||||
cd %WXDIR%\src\msw
|
cd %WXDIR%\src\msw
|
||||||
nmake -f makefile.bcc cleanall
|
make -f makefile.bcc cleanall
|
||||||
nmake -f makefile.bcc
|
make -f makefile.bcc
|
||||||
if not direxist %BUILDDEST%\BC16Debug mkdir /S %BUILDDEST%\BC16Debug
|
if not direxist %BUILDDEST%\BC16Debug mkdir /S %BUILDDEST%\BC16Debug
|
||||||
erase /F /Y %BUILDDEST%\BC16Debug
|
erase /F /Y %BUILDDEST%\BC16Debug
|
||||||
|
|
||||||
Rem Make one sample, just to make sure Debug mode is OK
|
Rem Make one sample, just to make sure Debug mode is OK
|
||||||
cd %WXDIR%\samples\minimal
|
cd %WXDIR%\samples\minimal
|
||||||
nmake -f makefile.bcc clean
|
make -f makefile.bcc clean
|
||||||
nmake -f makefile.bcc
|
make -f makefile.bcc
|
||||||
copy minimal.exe /S %BUILDDEST%\BC16Debug
|
copy minimal.exe /S %BUILDDEST%\BC16Debug
|
||||||
nmake -f makefile.bcc clean
|
make -f makefile.bcc clean
|
||||||
|
|
||||||
cd %WXDIR%\src\msw
|
cd %WXDIR%\src\msw
|
||||||
nmake -f makefile.bcc cleanall
|
make -f makefile.bcc cleanall
|
||||||
|
|
||||||
echo *** 16-bit BC++ Release ***
|
echo *** 16-bit BC++ Release ***
|
||||||
|
|
||||||
nmake -f makefile.bcc cleanall FINAL=1
|
make -f makefile.bcc cleanall FINAL=1
|
||||||
nmake -f makefile.bcc FINAL=1
|
make -f makefile.bcc FINAL=1
|
||||||
|
|
||||||
if not direxist %BUILDDEST%\BC16Release mkdir /S %BUILDDEST%\BC16Release
|
if not direxist %BUILDDEST%\BC16Release mkdir /S %BUILDDEST%\BC16Release
|
||||||
erase /F /Y %BUILDDEST%\BC16Release
|
erase /F /Y %BUILDDEST%\BC16Release
|
||||||
|
|
||||||
Rem Make one sample, just to make sure Release mode is OK
|
Rem Make one sample, just to make sure Release mode is OK
|
||||||
cd %WXDIR%\samples\minimal
|
cd %WXDIR%\samples\minimal
|
||||||
nmake -f makefile.bcc clean
|
make -f makefile.bcc clean
|
||||||
nmake -f makefile.bcc FINAL=1
|
make -f makefile.bcc FINAL=1
|
||||||
copy minimal.exe /S %BUILDDEST%\BC16Release
|
copy minimal.exe /S %BUILDDEST%\BC16Release
|
||||||
nmake -f makefile.bcc clean
|
make -f makefile.bcc clean
|
||||||
|
|
||||||
Rem Clean up
|
Rem Clean up
|
||||||
|
|
||||||
cd %WXDIR%\src\msw
|
cd %WXDIR%\src\msw
|
||||||
nmake -f makefile.bcc cleanall FINAL=1
|
make -f makefile.bcc cleanall FINAL=1
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@ samples/dragimag/Makefile.in
|
|||||||
samples/drawing/Makefile.in
|
samples/drawing/Makefile.in
|
||||||
samples/dynamic/Makefile.in
|
samples/dynamic/Makefile.in
|
||||||
samples/exec/Makefile.in
|
samples/exec/Makefile.in
|
||||||
samples/genvalid/Makefile.in
|
|
||||||
samples/grid/Makefile.in
|
samples/grid/Makefile.in
|
||||||
samples/newgrid/Makefile.in
|
samples/newgrid/Makefile.in
|
||||||
samples/help/Makefile.in
|
samples/help/Makefile.in
|
||||||
@@ -60,7 +59,6 @@ samples/treectrl/Makefile.in
|
|||||||
samples/typetest/Makefile.in
|
samples/typetest/Makefile.in
|
||||||
samples/validate/Makefile.in
|
samples/validate/Makefile.in
|
||||||
samples/wizard/Makefile.in
|
samples/wizard/Makefile.in
|
||||||
samples/socket/Makefile.in
|
|
||||||
samples/dialup/Makefile.in
|
samples/dialup/Makefile.in
|
||||||
samples/font/Makefile.in
|
samples/font/Makefile.in
|
||||||
samples/menu/Makefile.in
|
samples/menu/Makefile.in
|
||||||
|
@@ -29,6 +29,7 @@ include/wx/motif/*.h
|
|||||||
include/install-sh
|
include/install-sh
|
||||||
include/wx/install-sh
|
include/wx/install-sh
|
||||||
|
|
||||||
|
docs/base/*.txt
|
||||||
docs/motif/*.txt
|
docs/motif/*.txt
|
||||||
docs/motif/makewxmotif
|
docs/motif/makewxmotif
|
||||||
|
|
||||||
|
@@ -59,6 +59,7 @@ src/common/dosyacc.c
|
|||||||
src/common/doslex.c
|
src/common/doslex.c
|
||||||
src/common/y_tab.c
|
src/common/y_tab.c
|
||||||
src/common/lex_yy.c
|
src/common/lex_yy.c
|
||||||
|
src/common/*.rc
|
||||||
|
|
||||||
src/msw/*.cpp
|
src/msw/*.cpp
|
||||||
src/msw/*.h
|
src/msw/*.h
|
||||||
|
@@ -1,9 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# tardist: make up a tar.gz distribution of wxWindows 2
|
# tardist: make up a tar.gz distribution of wxWindows 2
|
||||||
# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
|
# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
|
||||||
|
# THIS SCRIPT IS OBSOLETE: USE E.G. TARWXMOTIF INSTEAD
|
||||||
|
|
||||||
init=""
|
init=""
|
||||||
WXVER=2.1.16
|
WXVER=2.2.1
|
||||||
if [ $1 = "" ]
|
if [ $1 = "" ]
|
||||||
then
|
then
|
||||||
exit
|
exit
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
|
# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
|
||||||
|
|
||||||
init=""
|
init=""
|
||||||
WXVER=2.2.0
|
WXVER=2.2.1
|
||||||
if [ $1 = "" ]
|
if [ $1 = "" ]
|
||||||
then
|
then
|
||||||
exit
|
exit
|
||||||
|
@@ -172,7 +172,7 @@ all: all_libs all_execs
|
|||||||
|
|
||||||
$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
|
$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
|
||||||
-erase $(LIBTARGET)
|
-erase $(LIBTARGET)
|
||||||
tlib $(LIBTARGET) /P1024 @&&!
|
tlib "$(LIBTARGET)" /P1024 @&&!
|
||||||
+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
|
+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
|
||||||
!
|
!
|
||||||
|
|
||||||
|
@@ -235,7 +235,7 @@ $(WXDIR)\lib\$(WXLIBNAME).lib: $(DUMMYOBJ) $(OBJECTS)
|
|||||||
|
|
||||||
!if "$(USE_GLCANVAS)" == "1"
|
!if "$(USE_GLCANVAS)" == "1"
|
||||||
GL_LIBS=opengl32.lib glu32.lib
|
GL_LIBS=opengl32.lib glu32.lib
|
||||||
GL_LIBS_DELAY=/delayload:opengl32.dll
|
# GL_LIBS_DELAY=/delayload:opengl32.dll
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# Update the dynamic link library
|
# Update the dynamic link library
|
||||||
|
@@ -28,12 +28,17 @@
|
|||||||
Project('CONFIG += wx');
|
Project('CONFIG += wx');
|
||||||
}
|
}
|
||||||
if ( Config("wx") ) {
|
if ( Config("wx") ) {
|
||||||
#! VC 6.0 supports env vars in include path
|
if ( Config("wxnodir") ) {
|
||||||
#! $WXDIR = $ENV{'WX'};
|
$WXDIR = "..\\..";
|
||||||
if ( $ENV{'wx'} ) { $WXDIR = "\$(wx)"; }
|
}
|
||||||
else { $WXDIR = "\$(WXWIN)"; }
|
else {
|
||||||
$TMAKE_INCDIR_WX = $WXDIR . "\\include";
|
#! VC 6.0 supports env vars in include path
|
||||||
AddIncludePath($TMAKE_INCDIR_WX);
|
#! $WXDIR = $ENV{'WX'};
|
||||||
|
if ( $ENV{'wx'} ) { $WXDIR = "\$(wx)"; }
|
||||||
|
else { $WXDIR = "\$(WXWIN)"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
AddIncludePath($WXDIR . "\\include");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( Config("unicode") ) {
|
if ( Config("unicode") ) {
|
||||||
|
3
distrib/msw/utilmake.rsp
Normal file
3
distrib/msw/utilmake.rsp
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
utils/HelpGen/Makefile.in
|
||||||
|
utils/HelpGen/src/Makefile.in
|
||||||
|
utils/makegen/Makefile.in
|
60
distrib/msw/utils.rsp
Normal file
60
distrib/msw/utils.rsp
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
utils/wxgraph/src/*.cpp
|
||||||
|
utils/wxgraph/src/*.c
|
||||||
|
utils/wxgraph/src/*.h
|
||||||
|
utils/wxgraph/src/makefile*
|
||||||
|
utils/wxgraph/src/*.xbm
|
||||||
|
utils/wxgraph/src/*.xpm
|
||||||
|
utils/wxgraph/lib/dummy
|
||||||
|
utils/wxgraph/src/*.ico
|
||||||
|
utils/wxgraph/src/*.def
|
||||||
|
utils/wxgraph/src/*.rc
|
||||||
|
|
||||||
|
utils/rcparser/src/*.cpp
|
||||||
|
utils/rcparser/src/*.c
|
||||||
|
utils/rcparser/src/*.h
|
||||||
|
utils/rcparser/src/makefile*
|
||||||
|
utils/rcparser/src/*.xbm
|
||||||
|
utils/rcparser/src/*.xpm
|
||||||
|
utils/rcparser/lib/dummy
|
||||||
|
utils/rcparser/src/*.ico
|
||||||
|
utils/rcparser/src/*.def
|
||||||
|
utils/rcparser/src/*.rc
|
||||||
|
utils/rcparser/src/*.rh
|
||||||
|
|
||||||
|
utils/colours/*.h
|
||||||
|
utils/colours/*.cpp
|
||||||
|
utils/colours/*.def
|
||||||
|
utils/colours/*.rc
|
||||||
|
utils/colours/makefile*
|
||||||
|
utils/colours/*.xbm
|
||||||
|
utils/colours/*.xpm
|
||||||
|
utils/colours/*.txt
|
||||||
|
|
||||||
|
utils/serialize/*.h
|
||||||
|
utils/serialize/*.cpp
|
||||||
|
utils/serialize/*.def
|
||||||
|
utils/serialize/*.rc
|
||||||
|
utils/serialize/makefile*
|
||||||
|
utils/serialize/*.xbm
|
||||||
|
utils/serialize/*.xpm
|
||||||
|
utils/serialize/*.txt
|
||||||
|
|
||||||
|
utils/makegen/*.h
|
||||||
|
utils/makegen/*.cpp
|
||||||
|
utils/makegen/*.def
|
||||||
|
utils/makegen/*.rc
|
||||||
|
utils/makegen/makefile*
|
||||||
|
utils/makegen/*.xbm
|
||||||
|
utils/makegen/*.xpm
|
||||||
|
utils/makegen/*.txt
|
||||||
|
utils/makegen/templates/make*
|
||||||
|
|
||||||
|
utils/HelpGen/src/*.h
|
||||||
|
utils/HelpGen/src/*.cpp
|
||||||
|
utils/HelpGen/src/*.def
|
||||||
|
utils/HelpGen/src/*.rc
|
||||||
|
utils/HelpGen/src/makefile*
|
||||||
|
utils/HelpGen/src/*.xbm
|
||||||
|
utils/HelpGen/src/*.xpm
|
||||||
|
utils/HelpGen/src/*.txt
|
||||||
|
|
@@ -146,6 +146,9 @@ samples/notebook/NotebookVC.dsw
|
|||||||
samples/ownerdrw/OwnerDrwVC.dsp
|
samples/ownerdrw/OwnerDrwVC.dsp
|
||||||
samples/ownerdrw/OwnerDrwVC.dsw
|
samples/ownerdrw/OwnerDrwVC.dsw
|
||||||
|
|
||||||
|
samples/oleauto/OleautoVC.dsp
|
||||||
|
samples/oleauto/OleautoVC.dsw
|
||||||
|
|
||||||
samples/plot/PlotVC.dsp
|
samples/plot/PlotVC.dsp
|
||||||
samples/plot/PlotVC.dsw
|
samples/plot/PlotVC.dsw
|
||||||
|
|
||||||
@@ -155,6 +158,9 @@ samples/png/PngVC.dsw
|
|||||||
samples/printing/PrintingVC.dsp
|
samples/printing/PrintingVC.dsp
|
||||||
samples/printing/PrintingVC.dsw
|
samples/printing/PrintingVC.dsw
|
||||||
|
|
||||||
|
samples/proplist/ProplistVC.dsp
|
||||||
|
samples/proplist/ProplistVC.dsw
|
||||||
|
|
||||||
samples/propsize/PropsizeVC.dsp
|
samples/propsize/PropsizeVC.dsp
|
||||||
samples/propsize/PropsizeVC.dsw
|
samples/propsize/PropsizeVC.dsw
|
||||||
|
|
||||||
@@ -180,6 +186,8 @@ samples/scrollsub/ScrollsubVC.dsp
|
|||||||
samples/scrollsub/ScrollsubVC.dsw
|
samples/scrollsub/ScrollsubVC.dsw
|
||||||
|
|
||||||
samples/sockets/ClientVC.dsp
|
samples/sockets/ClientVC.dsp
|
||||||
|
samples/sockets/ServerVC.dsp
|
||||||
|
samples/sockets/ClientVC.dsw
|
||||||
samples/sockets/ServerVC.dsw
|
samples/sockets/ServerVC.dsw
|
||||||
|
|
||||||
samples/splitter/SplitterVC.dsp
|
samples/splitter/SplitterVC.dsp
|
||||||
@@ -252,6 +260,9 @@ utils/tex2rtf/src/Tex2RTFVC.dsw
|
|||||||
utils/hhp2cached/hhp2cachedVC.dsp
|
utils/hhp2cached/hhp2cachedVC.dsp
|
||||||
utils/hhp2cached/hhp2cachedVC.dsw
|
utils/hhp2cached/hhp2cachedVC.dsw
|
||||||
|
|
||||||
|
utils/helpgen/src/HelpGenVC.dsp
|
||||||
|
utils/helpgen/src/HelpGenVC.dsw
|
||||||
|
|
||||||
contrib/src/ogl/OglVC.dsp
|
contrib/src/ogl/OglVC.dsp
|
||||||
contrib/src/ogl/OglVC.dsw
|
contrib/src/ogl/OglVC.dsw
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
Rem Replace the DLL version number in the VC++ project files
|
Rem Replace the DLL version number in the VC++ project files.
|
||||||
|
Rem This has to be called from the root directory.
|
||||||
|
|
||||||
input Enter the old version name (e.g. wx22_0): %%oldName
|
input Enter the old version name (e.g. wx22_0): %%oldName
|
||||||
input Enter the new version name (e.g. wx22_1): %%newName
|
input Enter the new version name (e.g. wx22_1): %%newName
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
Document Type: WSE
|
Document Type: WSE
|
||||||
item: Global
|
item: Global
|
||||||
Version=5.0
|
Version=5.0
|
||||||
Title=wxWindows 2.2.1 Installation
|
Title=wxWindows 2.2.3 Installation
|
||||||
Flags=00000100
|
Flags=00000100
|
||||||
Split=1420
|
Split=1420
|
||||||
Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
@@ -17,7 +17,7 @@ item: Global
|
|||||||
Patch Flags=0000000000000001
|
Patch Flags=0000000000000001
|
||||||
Patch Threshold=85
|
Patch Threshold=85
|
||||||
Patch Memory=4000
|
Patch Memory=4000
|
||||||
EXE Filename=D:\wx2\wxWindows\deliver\setup.exe
|
EXE Filename=D:\wx2stable\wxWindows\deliver\setup.exe
|
||||||
FTP Cluster Size=20
|
FTP Cluster Size=20
|
||||||
Variable Name1=_SYS_
|
Variable Name1=_SYS_
|
||||||
Variable Default1=C:\WINDOWS\SYSTEM
|
Variable Default1=C:\WINDOWS\SYSTEM
|
||||||
@@ -47,7 +47,7 @@ item: End Block
|
|||||||
end
|
end
|
||||||
item: Set Variable
|
item: Set Variable
|
||||||
Variable=APPTITLE
|
Variable=APPTITLE
|
||||||
Value=wxWindows 2.2.1
|
Value=wxWindows 2.2.3
|
||||||
end
|
end
|
||||||
item: Set Variable
|
item: Set Variable
|
||||||
Variable=GROUP
|
Variable=GROUP
|
||||||
@@ -62,7 +62,7 @@ item: Set Variable
|
|||||||
Value=wx2
|
Value=wx2
|
||||||
end
|
end
|
||||||
item: Display Graphic
|
item: Display Graphic
|
||||||
Pathname=D:\wx2\wxWindows\distrib\msw\wxwin01.bmp
|
Pathname=D:\wx2stable\wxWindows\distrib\msw\wxwin01.bmp
|
||||||
X Position=16
|
X Position=16
|
||||||
Y Position=16
|
Y Position=16
|
||||||
end
|
end
|
||||||
|
@@ -5,7 +5,7 @@ set dest=%src\deliver
|
|||||||
set wise=0
|
set wise=0
|
||||||
|
|
||||||
Rem Set this to the required version
|
Rem Set this to the required version
|
||||||
set version=2.2.1
|
set version=2.2.4
|
||||||
|
|
||||||
if "%src" == "" goto usage
|
if "%src" == "" goto usage
|
||||||
if "%dest" == "" goto usage
|
if "%dest" == "" goto usage
|
||||||
@@ -14,6 +14,7 @@ if "%1" == "--help" goto usage
|
|||||||
if "%1" == "/?" goto usage
|
if "%1" == "/?" goto usage
|
||||||
if "%1" == "wiseonly" goto dounzip
|
if "%1" == "wiseonly" goto dounzip
|
||||||
if "%1" == "wise" set wise=1
|
if "%1" == "wise" set wise=1
|
||||||
|
if "%1" == "tidyup" goto tidyup
|
||||||
echo About to archive an external wxWindows distribution:
|
echo About to archive an external wxWindows distribution:
|
||||||
echo From %src
|
echo From %src
|
||||||
echo To %dest
|
echo To %dest
|
||||||
@@ -32,7 +33,7 @@ erase %dest\utils.zip
|
|||||||
erase %dest\extradoc.zip
|
erase %dest\extradoc.zip
|
||||||
erase %dest\*-win32.zip
|
erase %dest\*-win32.zip
|
||||||
|
|
||||||
if direxist %dest\wx deltree /Y %dest\wx
|
if direxist %dest\wx del /sxyz %dest\wx\
|
||||||
|
|
||||||
cd %src
|
cd %src
|
||||||
echo Zipping...
|
echo Zipping...
|
||||||
@@ -169,7 +170,7 @@ erase /Y contrib\docs\winhelp\stc.*
|
|||||||
erase /Y contrib\docs\htmlhelp\mmedia.*
|
erase /Y contrib\docs\htmlhelp\mmedia.*
|
||||||
erase /Y contrib\docs\htmlhelp\stc.*
|
erase /Y contrib\docs\htmlhelp\stc.*
|
||||||
erase /Y contrib\docs\pdf\*.*
|
erase /Y contrib\docs\pdf\*.*
|
||||||
deltree /Y contrib\docs\latex\ogl
|
del /sxzy contrib\docs\latex\ogl
|
||||||
erase /Y src\mingegcs.bat
|
erase /Y src\mingegcs.bat
|
||||||
erase /Y distrib
|
erase /Y distrib
|
||||||
|
|
||||||
@@ -201,6 +202,7 @@ start %wisecmd
|
|||||||
pause Press any key to continue with the wxWindows distribution...
|
pause Press any key to continue with the wxWindows distribution...
|
||||||
Rem ren %WXWIN\deliver\setup.EXE %WXWIN\deliver\wxMSW-%version%-setup.exe
|
Rem ren %WXWIN\deliver\setup.EXE %WXWIN\deliver\wxMSW-%version%-setup.exe
|
||||||
|
|
||||||
|
:tidyup
|
||||||
cd %dest
|
cd %dest
|
||||||
|
|
||||||
Rem tidy up capitalisation of filenames
|
Rem tidy up capitalisation of filenames
|
||||||
@@ -240,6 +242,6 @@ echo DOS wxWindows distribution. Zips up all GTK/Motif/MSW/doc files,
|
|||||||
echo and optionally makes a deliver\wx directory and a setup.exe
|
echo and optionally makes a deliver\wx directory and a setup.exe
|
||||||
echo if you specify 'wise' (skipping the zipping if you use 'wiseonly').
|
echo if you specify 'wise' (skipping the zipping if you use 'wiseonly').
|
||||||
echo.
|
echo.
|
||||||
echo Usage: zipdist [wise | wiseonly]
|
echo "Usage: zipdist [wise | wiseonly]"
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
@@ -1,5 +1,46 @@
|
|||||||
wxWindows 2 Change Log
|
wxWindows 2.2 Change Log
|
||||||
----------------------
|
========================
|
||||||
|
|
||||||
|
INCOMPATIBLE CHANGES
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
wxMSW:
|
||||||
|
|
||||||
|
- wxListCtrl::Find() parameter meaning changed, see docs for details
|
||||||
|
(starting item is now included in the search, use 0 to search from the
|
||||||
|
beginning)
|
||||||
|
|
||||||
|
OTHER CHANGES
|
||||||
|
-------------
|
||||||
|
|
||||||
|
2.2.5
|
||||||
|
-----
|
||||||
|
|
||||||
|
- fixed memory corruption/crash in wxStreamBuffer
|
||||||
|
- wxTree/ListCtrl position fix (Mike Oliver <oliver@math.ucla.edu>)
|
||||||
|
- Italian translations updated
|
||||||
|
- Windows 2000 toolbar colours problem fixed
|
||||||
|
|
||||||
|
2.2.4
|
||||||
|
-----
|
||||||
|
|
||||||
|
- chinese translations added
|
||||||
|
- wxTreeEvent::GetPoint() returns correct position for ITEM_XXX_CLICK events
|
||||||
|
|
||||||
|
2.2.3
|
||||||
|
-----
|
||||||
|
|
||||||
|
wxGTK:
|
||||||
|
|
||||||
|
- frames created with wxDefaultSize will have some reasonable default size and
|
||||||
|
not be created with 0 size
|
||||||
|
|
||||||
|
2.2.2
|
||||||
|
-----
|
||||||
|
|
||||||
|
wxGTK:
|
||||||
|
|
||||||
|
- better (implicit) themes support
|
||||||
|
|
||||||
2.2.1
|
2.2.1
|
||||||
-----
|
-----
|
||||||
|
@@ -1,8 +1,114 @@
|
|||||||
|
This file contains the detailed log of wxGTK-specific changes, please see
|
||||||
|
doc/changes.txt for the concise log of important changes in all wxWindows
|
||||||
|
ports.
|
||||||
|
|
||||||
22nd July 2000: wxWindows 2.2.1 released
|
|
||||||
|
|
||||||
|
*** 29th January 2001: wxWindows 2.2.5 released ***
|
||||||
|
|
||||||
|
Synchronized with wxMSW 2.2.5, include macros
|
||||||
|
for upwards 2.4.0 compatibility.
|
||||||
|
|
||||||
|
Added missing wxEntry prototype to wx/gtk/app.h.
|
||||||
|
|
||||||
|
Fixed compilation with --enable-no_rtti/no_exceptions
|
||||||
|
with older egcs.
|
||||||
|
|
||||||
|
*** 15th January 2001: wxWindows 2.2.4 released ***
|
||||||
|
|
||||||
|
Corrected wxYield() to handle recursive calls
|
||||||
|
more gracefully (and with a warning in debug mode).
|
||||||
|
This fixes a problem with crashing wxTreeCtrl's
|
||||||
|
built-in drag'n'drop and probably some other as
|
||||||
|
well.
|
||||||
|
|
||||||
|
Corrected wxMenuItem::GetLabel() to handle deliberate '_'
|
||||||
|
characters correctly.
|
||||||
|
|
||||||
|
Patch for better 8-bit-display support.
|
||||||
|
|
||||||
|
Corrected log error message box.
|
||||||
|
|
||||||
|
Implememted wxCommandEvent::IsSelection() for wxListBox.
|
||||||
|
|
||||||
|
Corrected wxListBox::Set() for sorted mode.
|
||||||
|
|
||||||
|
Added EVT_TEXT_UPDATED for spin ctrl.
|
||||||
|
|
||||||
|
Corrected wrongly rounded value in slider and scrollbar
|
||||||
|
for negative values.
|
||||||
|
|
||||||
|
Small fix for wxTextFile type guessing.
|
||||||
|
|
||||||
|
Translation updates.
|
||||||
|
|
||||||
|
Various other fixes.
|
||||||
|
|
||||||
|
Synchronized release with wxMSW again.
|
||||||
|
|
||||||
|
*** 3rd November: wxWindows 2.2.3 released ***
|
||||||
|
|
||||||
|
Fixed bugs in HTTP code.
|
||||||
|
|
||||||
|
Implemented wxNO_FULL_REPAINT_ON_RESIZE whenever possible
|
||||||
|
and reduced flicker a little (no longer diables GTK's own
|
||||||
|
anti-flicker code).
|
||||||
|
|
||||||
|
Always have a clipping region equivalent to the update
|
||||||
|
region in OnPaint events (such as under wxMSW and wxMac).
|
||||||
|
|
||||||
|
Implemented wxListBox::SetFirstItem().
|
||||||
|
|
||||||
|
Fixed some minor problems in HTML code, wxListCtrl,
|
||||||
|
wxListBox.
|
||||||
|
|
||||||
|
Fixed compilation on RedHat 7.0.
|
||||||
|
|
||||||
|
Updated many translations, added Swedish.
|
||||||
|
|
||||||
|
Changed default screenpixels-per-inch from 100 to 75 in
|
||||||
|
printing code.
|
||||||
|
|
||||||
|
Updated AFM font metrics for Ghostscript fonts and let
|
||||||
|
Linux and FreeBSD default to using GS fonts (and not
|
||||||
|
Adobe fonts).
|
||||||
|
|
||||||
|
*** 20th September: wxWindows 2.2.2 released ***
|
||||||
|
|
||||||
|
Fixed wxSizer bug that made items with option
|
||||||
|
flags greater than 1 report a wrong size.
|
||||||
|
|
||||||
|
Fixed many incompatibilties with GTK themes -
|
||||||
|
essentially a backport from the 2.3 branch.
|
||||||
|
|
||||||
|
Added missing wxImage::Paste() for transparent
|
||||||
|
images.
|
||||||
|
|
||||||
|
Fixed a drawing error for ellipses and arc in both
|
||||||
|
the DC code and the PostScript code.
|
||||||
|
|
||||||
|
Fixed wxListCtrl::HitTest() for report mode.
|
||||||
|
|
||||||
|
Other minor fixes.
|
||||||
|
|
||||||
|
*** 20th August 2000: wxWindows 2.2.1 released ***
|
||||||
|
|
||||||
Minor build fixes.
|
Minor build fixes.
|
||||||
|
|
||||||
|
Use the wxCommmandEvent::IsChecked() function for checkable
|
||||||
|
menu items. This mean that the m_int parameter no longer
|
||||||
|
contains the ID of the menu!
|
||||||
|
|
||||||
|
Fixed major problems in ODBC logging code. This change is
|
||||||
|
binary backward incompatible.
|
||||||
|
|
||||||
|
Fixed reentry problems in DnD code.
|
||||||
|
|
||||||
|
Changed PostScript code so that it can handle a higher
|
||||||
|
resolution (720dpi).
|
||||||
|
|
||||||
|
Minor improvements to wxGrid code.
|
||||||
|
|
||||||
Corrected guffow-scrolling so that no surplus expose
|
Corrected guffow-scrolling so that no surplus expose
|
||||||
events are generated.
|
events are generated.
|
||||||
|
|
||||||
@@ -12,14 +118,13 @@ Minor correction to wxDC::DrawRoundedRectangle.
|
|||||||
|
|
||||||
Added support for <INSERT> and <DELETE> menu accelerators.
|
Added support for <INSERT> and <DELETE> menu accelerators.
|
||||||
|
|
||||||
Use the wxCommmandEvent::IsChecked() function for checkable
|
|
||||||
menu items.
|
|
||||||
|
|
||||||
Made wxComboBox case-sensitive.
|
Made wxComboBox case-sensitive.
|
||||||
|
|
||||||
Minor correction to doc-view architecture.
|
Minor correction to doc-view architecture.
|
||||||
|
|
||||||
10th July 2000: wxWindows 2.2.0 released
|
Minor wxCommandLineParser changes.
|
||||||
|
|
||||||
|
*** 10th July 2000: wxWindows 2.2.0 released ***
|
||||||
|
|
||||||
Added code for writing BMP images.
|
Added code for writing BMP images.
|
||||||
|
|
||||||
@@ -50,7 +155,7 @@ Various fixes to the new wxGrid class.
|
|||||||
|
|
||||||
Bug-fixes.
|
Bug-fixes.
|
||||||
|
|
||||||
4th June 2000: wxWindows pre-2.2 release
|
*** 4th June 2000: wxWindows pre-2.2 release ***
|
||||||
|
|
||||||
Complete freeze now. Only vital bug-fixes allowed.
|
Complete freeze now. Only vital bug-fixes allowed.
|
||||||
|
|
||||||
@@ -62,12 +167,12 @@ Reworked wxURL.
|
|||||||
|
|
||||||
MANY bugfixes.
|
MANY bugfixes.
|
||||||
|
|
||||||
22th March 2000: wxWindows 2.1.15 released
|
*** 22th March 2000: wxWindows 2.1.15 released ***
|
||||||
|
|
||||||
Build fix. RPMs no loner require GTK's include files.
|
Build fix. RPMs no loner require GTK's include files.
|
||||||
|
|
||||||
An extra library for the OpenGl class now gets builts
|
An extra library for the OpenGl class now gets builts
|
||||||
19th March 2000: wxWindows 2.1.14 released
|
*** 19th March 2000: wxWindows 2.1.14 released ***
|
||||||
|
|
||||||
An extra library for the OpenGl class now gets builts
|
An extra library for the OpenGl class now gets builts
|
||||||
and installed. There is also an extra RPM for this
|
and installed. There is also an extra RPM for this
|
||||||
@@ -128,7 +233,7 @@ style when using the default.
|
|||||||
The L-GPL iODBC library must now be enables explicitly so as
|
The L-GPL iODBC library must now be enables explicitly so as
|
||||||
to not mislead people into reading the license wrong.
|
to not mislead people into reading the license wrong.
|
||||||
|
|
||||||
24th January '2000: wxWindows 2.1.13 released
|
*** 24th January '2000: wxWindows 2.1.13 released ***
|
||||||
|
|
||||||
Corrections to TAB handling in notebooks.
|
Corrections to TAB handling in notebooks.
|
||||||
|
|
||||||
@@ -173,7 +278,7 @@ Updates to the ODBC classes (George Tasker).
|
|||||||
|
|
||||||
Build-fixes for various platforms and compilers.
|
Build-fixes for various platforms and compilers.
|
||||||
|
|
||||||
6th January '2000: wxWindows 2.1.12 released
|
*** 6th January '2000: wxWindows 2.1.12 released ***
|
||||||
|
|
||||||
Who has a BigEndian computer (e.g. Sparc or PowerPC) that runs a 15
|
Who has a BigEndian computer (e.g. Sparc or PowerPC) that runs a 15
|
||||||
and/or 16 bit colour mode? I need this for testing purposes, i.e. this
|
and/or 16 bit colour mode? I need this for testing purposes, i.e. this
|
||||||
@@ -284,7 +389,7 @@ More minor changes and fixes.
|
|||||||
|
|
||||||
Began work on a new dialog and resource editor (wxDesigner).
|
Began work on a new dialog and resource editor (wxDesigner).
|
||||||
|
|
||||||
7st November '99: wxWindows 2.1.11 released
|
*** 7st November '99: wxWindows 2.1.11 released ***
|
||||||
|
|
||||||
There is still an unresolved problem with bitmap to image
|
There is still an unresolved problem with bitmap to image
|
||||||
conversion on big-endian architectures (such as Solaris),
|
conversion on big-endian architectures (such as Solaris),
|
||||||
@@ -704,7 +809,7 @@ Note that the next release might bring about changes to keyboard
|
|||||||
handling and scroll event intercepting from wxScrolledWindow.
|
handling and scroll event intercepting from wxScrolledWindow.
|
||||||
|
|
||||||
By and large much of the code has stabilized and won't be much
|
By and large much of the code has stabilized and won't be much
|
||||||
different in the final wxWindows 2.1 release. Please test as
|
*** different in the final wxWindows 2.1 release. Please test as ***
|
||||||
much as you can.
|
much as you can.
|
||||||
|
|
||||||
The next release will have a new build system.
|
The next release will have a new build system.
|
||||||
@@ -831,7 +936,7 @@ gooddies, possibly world domination.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
5th March '99: wxWindows 2.0 released
|
*** 5th March '99: wxWindows 2.0 released ***
|
||||||
|
|
||||||
|
|
||||||
This is the final version of wxWindows 2.0 for GTK. The versions for
|
This is the final version of wxWindows 2.0 for GTK. The versions for
|
||||||
@@ -840,7 +945,7 @@ site. The Mac version is still under development.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
19th February '99: wxWindows 2.0 beta 5
|
*** 19th February '99: wxWindows 2.0 beta 5 ***
|
||||||
|
|
||||||
|
|
||||||
This is the fifth beta release and it contains mostly bug fixes and
|
This is the fifth beta release and it contains mostly bug fixes and
|
||||||
@@ -850,7 +955,7 @@ Applied compile fixes for Solaris (different flavours and compilers).
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
12th February '99: wxWindows 2.0 beta 4
|
*** 12th February '99: wxWindows 2.0 beta 4 ***
|
||||||
|
|
||||||
|
|
||||||
This is the fourth beta release and it contains mostly bug fixes and
|
This is the fourth beta release and it contains mostly bug fixes and
|
||||||
@@ -869,7 +974,7 @@ Fixed many bugs. You guessed it.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
29th January '99: wxWindows 2.0 beta 3
|
*** 29th January '99: wxWindows 2.0 beta 3 ***
|
||||||
|
|
||||||
|
|
||||||
This is the third beta release and it contains mostly bug fixes.
|
This is the third beta release and it contains mostly bug fixes.
|
||||||
@@ -910,7 +1015,7 @@ SuSE 6.0 as SuSE decided to ship 6.0 with a broken GTK+ package.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
6th January '99: wxWindows 2.0 beta 2
|
*** 6th January '99: wxWindows 2.0 beta 2 ***
|
||||||
|
|
||||||
|
|
||||||
This is the second beta release and contains it mostly build and
|
This is the second beta release and contains it mostly build and
|
||||||
@@ -919,7 +1024,7 @@ commercial Unices and Windows.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
20th December '98: wxWindows 2.0 beta 1
|
*** 20th December '98: wxWindows 2.0 beta 1 ***
|
||||||
|
|
||||||
|
|
||||||
This is the first beta release and we have used the time before
|
This is the first beta release and we have used the time before
|
||||||
|
@@ -254,9 +254,7 @@ The following options handle the kind of library you want to build.
|
|||||||
|
|
||||||
--disable-threads Compile without thread support.
|
--disable-threads Compile without thread support.
|
||||||
|
|
||||||
--disable-shared Do not create shared libraries.
|
--disable-shared Create static libraries.
|
||||||
|
|
||||||
--enable-static Create static libraries.
|
|
||||||
|
|
||||||
--disable-optimise Do not optimise the code. Can
|
--disable-optimise Do not optimise the code. Can
|
||||||
sometimes be useful for debugging
|
sometimes be useful for debugging
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
-------------------- High priority ---------------------
|
-------------------- High priority ---------------------
|
||||||
|
|
||||||
Improve, update translations. Install *.mo files somewhere.
|
Improve, update translations. Mostly done.
|
||||||
|
|
||||||
-------------------- Medium priority ---------------------
|
-------------------- Medium priority ---------------------
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user