Compare commits
473 Commits
wxPy_2_3_2
...
wxPy_2_3_2
Author | SHA1 | Date | |
---|---|---|---|
|
b9d1d22ca5 | ||
|
79f1bf32d7 | ||
|
c9ce02acf8 | ||
|
c20da25748 | ||
|
3bcd5e1c64 | ||
|
0e94700456 | ||
|
54a816a683 | ||
|
db4192047f | ||
|
a697845484 | ||
|
b1e930a50d | ||
|
75cada8e68 | ||
|
f96b15a3c2 | ||
|
f056ea60f3 | ||
|
fe0aca3712 | ||
|
76e280e796 | ||
|
30dbb45440 | ||
|
b8b0e4022e | ||
|
2fe212b033 | ||
|
5a8f04e382 | ||
|
4fcf087dda | ||
|
251b80c4b5 | ||
|
19193a2c85 | ||
|
7361f176df | ||
|
8e0c305167 | ||
|
b64a84736d | ||
|
2f67ae898e | ||
|
0c718eb7e0 | ||
|
652d930d65 | ||
|
8082483b70 | ||
|
f3c2c22108 | ||
|
df9176ab71 | ||
|
9d37f96428 | ||
|
9e0a12c958 | ||
|
de448406da | ||
|
de112a55a2 | ||
|
99f7d3407f | ||
|
1d341cf4f7 | ||
|
43edcf13ca | ||
|
49f992a5ff | ||
|
874efd13e1 | ||
|
47834fab06 | ||
|
61e6020f90 | ||
|
cece1d88c0 | ||
|
bf69498afc | ||
|
5039d7edc2 | ||
|
85cdcb7a20 | ||
|
cdcb56fc96 | ||
|
fa7cdd7f48 | ||
|
a9a05059b9 | ||
|
df02852424 | ||
|
6311b1e88c | ||
|
63f06c22b9 | ||
|
48c1b6f937 | ||
|
7f664d9878 | ||
|
fe9fea7ec7 | ||
|
e1bdd5078c | ||
|
a93e536be0 | ||
|
498fd97d9e | ||
|
bbed9595c1 | ||
|
e23081dec8 | ||
|
2277aeccc8 | ||
|
2baaf735f4 | ||
|
c641b1d20d | ||
|
065f27fe3a | ||
|
0a89ac9c27 | ||
|
3902989824 | ||
|
e3fc616c07 | ||
|
5fd1ea325c | ||
|
c109254cc6 | ||
|
493bdcc72a | ||
|
0cba94f21a | ||
|
41e929e5cf | ||
|
1ccd23f5c4 | ||
|
91f5c4d03b | ||
|
71e030352d | ||
|
5d9007815f | ||
|
7f6097f17d | ||
|
f4ac069301 | ||
|
24fcf68943 | ||
|
d739313fc0 | ||
|
3369df870b | ||
|
a29b6191ca | ||
|
54abcc91d0 | ||
|
7cf43d5ef9 | ||
|
b8c0528db3 | ||
|
a9f994d915 | ||
|
4403ced6fc | ||
|
da2b4b7a57 | ||
|
b9b7804a43 | ||
|
777db7a5bf | ||
|
5271933eeb | ||
|
ed12f1dd6d | ||
|
13c0541d3c | ||
|
dd8914bc51 | ||
|
293e425d0e | ||
|
0220cbc169 | ||
|
0122b7e3fc | ||
|
8754feb848 | ||
|
4eb438cf7c | ||
|
758bce950b | ||
|
337a001037 | ||
|
8b530febd8 | ||
|
2d02117538 | ||
|
85f296a342 | ||
|
4cd411faee | ||
|
956797563c | ||
|
c5b7bb59ec | ||
|
735d1db6cb | ||
|
f5643147a4 | ||
|
62b1c48cd7 | ||
|
28efed0faa | ||
|
b889a3a24b | ||
|
a69103348f | ||
|
b88c44e735 | ||
|
a6ee08e16a | ||
|
3fa826301b | ||
|
1a40c31edf | ||
|
603fd22177 | ||
|
5baa230d46 | ||
|
95e59663dc | ||
|
92622ef4c2 | ||
|
a46935cb54 | ||
|
1ac162ad06 | ||
|
afadf3bc6a | ||
|
f417f1d53f | ||
|
d2a533a059 | ||
|
ad781c239e | ||
|
683dccdaeb | ||
|
908381536e | ||
|
8976cbbc48 | ||
|
ec2995088d | ||
|
00b2a97f34 | ||
|
750b113f76 | ||
|
4878d85ccc | ||
|
654d905270 | ||
|
e111559956 | ||
|
0041d4b672 | ||
|
edb89f7e35 | ||
|
f85d862c23 | ||
|
1944a74bb3 | ||
|
c5627cd855 | ||
|
e0221ef7cb | ||
|
268766dd1f | ||
|
16d38102e8 | ||
|
e0d876d20c | ||
|
ffc63dcae0 | ||
|
88a9f974b8 | ||
|
56f23a5855 | ||
|
61bd618fe7 | ||
|
4c7852186d | ||
|
14dd645ee1 | ||
|
31a06b07cc | ||
|
aeb7499407 | ||
|
f001799009 | ||
|
3baaf31317 | ||
|
29d18d6945 | ||
|
56cfd0d766 | ||
|
4040fe6eaf | ||
|
594f0f5bf1 | ||
|
18a1f588e7 | ||
|
45eb524957 | ||
|
a7ae8fea47 | ||
|
4649b5eded | ||
|
2431209ccd | ||
|
b9989817f4 | ||
|
f17393f199 | ||
|
9feee261c9 | ||
|
1ce58dc6f3 | ||
|
fb93b610c5 | ||
|
f783e7acf3 | ||
|
e4b713a278 | ||
|
d11710cbb5 | ||
|
a8d20c57ae | ||
|
85da9c3e35 | ||
|
37fa909534 | ||
|
02cbc27a34 | ||
|
ead60ec54b | ||
|
b225f65995 | ||
|
f1e1ed3b77 | ||
|
d497dca475 | ||
|
9b86543d92 | ||
|
61e8948797 | ||
|
553dce51e9 | ||
|
31ae546e16 | ||
|
bc6abe52a7 | ||
|
bd73ba41f9 | ||
|
bd20dac196 | ||
|
917afc7b81 | ||
|
15678bec37 | ||
|
d46330c586 | ||
|
a08afcce1c | ||
|
3bfba010c7 | ||
|
7cdbf02cd4 | ||
|
a26e0bc1fd | ||
|
6821401b1b | ||
|
0aa236cddc | ||
|
b7f4f35038 | ||
|
c6b0ee9abd | ||
|
11d13ed03b | ||
|
ff18659103 | ||
|
2aabc7da6a | ||
|
e07f9efa03 | ||
|
f5e6ed7cc8 | ||
|
470252df3c | ||
|
a350a48841 | ||
|
bf44306ebc | ||
|
76bfdc7816 | ||
|
72594e90b2 | ||
|
13d068d93e | ||
|
3f38e38ba5 | ||
|
cdbe233029 | ||
|
f7b2395841 | ||
|
ea48aa7c2d | ||
|
8cbc39e803 | ||
|
bc297519b8 | ||
|
2b03b51b8c | ||
|
39178e3bdf | ||
|
32c988a34d | ||
|
8366ae934a | ||
|
2beb01db00 | ||
|
1650623133 | ||
|
65fe3842bf | ||
|
f32afe1c2c | ||
|
c0881dc32e | ||
|
32d77178d8 | ||
|
d6582821b6 | ||
|
243d4b3603 | ||
|
4f92cd25f1 | ||
|
ac2834ab04 | ||
|
da63acebda | ||
|
a111f2b216 | ||
|
8b6e6947fc | ||
|
e17978953a | ||
|
93d2bf4406 | ||
|
9b985798bc | ||
|
89fcec9514 | ||
|
d8ac90031d | ||
|
80806624f8 | ||
|
50563ef1bd | ||
|
17d5cf65bd | ||
|
5e46051f91 | ||
|
7c8253236f | ||
|
5f8dc32401 | ||
|
9aee09a34b | ||
|
124193837f | ||
|
477243897a | ||
|
25db1b74f1 | ||
|
bde9072f68 | ||
|
32bc74c034 | ||
|
bae170097e | ||
|
b3ca11f706 | ||
|
283e4f282a | ||
|
1bc3fa0180 | ||
|
3576334ead | ||
|
085f07e2c8 | ||
|
65191ae8f2 | ||
|
900d98862d | ||
|
a068364f32 | ||
|
17533c89d2 | ||
|
fc26f4abde | ||
|
1a4f0015e4 | ||
|
985520bc47 | ||
|
2ec3892d77 | ||
|
7995616276 | ||
|
4fcd60c72f | ||
|
7b7a763758 | ||
|
e8106239b2 | ||
|
447f908aff | ||
|
334f0d2c11 | ||
|
85f7ec579e | ||
|
d9e4c43beb | ||
|
8c03f242ce | ||
|
cba5db5ff0 | ||
|
077c564202 | ||
|
d08b457ba8 | ||
|
8eee02518d | ||
|
fedad417ce | ||
|
89d25d58c5 | ||
|
f8e3449ceb | ||
|
2343d81ba2 | ||
|
544c782d76 | ||
|
8c8fb2f6f6 | ||
|
c19d0121f6 | ||
|
018e2f1300 | ||
|
dbd25330c5 | ||
|
9e4e191af3 | ||
|
bb48ed2caa | ||
|
b22d16ad20 | ||
|
b11e8fb666 | ||
|
bff995bf71 | ||
|
7cd955997c | ||
|
b4819fcaea | ||
|
660cc2a5f9 | ||
|
7f9510b24e | ||
|
2d1e89de65 | ||
|
edae85724d | ||
|
0406324575 | ||
|
7ee7c43f7e | ||
|
be71e18af4 | ||
|
0797afee60 | ||
|
56029a746e | ||
|
c7b3563e24 | ||
|
d275c7eb84 | ||
|
f1c1831fc5 | ||
|
a15eb0a5c8 | ||
|
752b40b1da | ||
|
8b0bd21b3d | ||
|
b584b7d24a | ||
|
4965c3d7f6 | ||
|
08b6f23906 | ||
|
fe08e59704 | ||
|
93b4dc4b14 | ||
|
379ff23b1c | ||
|
3deeefebd7 | ||
|
9c3cc136fc | ||
|
bbb7a9314d | ||
|
ea5c1679ad | ||
|
e4b7b2b052 | ||
|
8dc52d208e | ||
|
813edf09b3 | ||
|
e8c12a53e8 | ||
|
2545022c72 | ||
|
655b7383d2 | ||
|
496beb3fc0 | ||
|
cff7ef893d | ||
|
ea1b0d6ccb | ||
|
82f2d91978 | ||
|
4c97e02448 | ||
|
d13fd3e468 | ||
|
bed118ca9e | ||
|
6c5ac6e1f1 | ||
|
551adc4b47 | ||
|
afb74fdd76 | ||
|
a308135449 | ||
|
a6f5aa49cf | ||
|
b3e8d00ab0 | ||
|
3a922bb4bd | ||
|
0e300ddd7d | ||
|
74b1c2658a | ||
|
ecc08ead91 | ||
|
34a1d7328f | ||
|
c8bc33d5b5 | ||
|
5bf2abe348 | ||
|
361128cbf7 | ||
|
edd971741e | ||
|
217cb2fab8 | ||
|
12bba77343 | ||
|
9b9cab370f | ||
|
134677bde9 | ||
|
c8e8ae85c8 | ||
|
bcbf288197 | ||
|
c50536396d | ||
|
2e9f62dafb | ||
|
55fb2c6cc2 | ||
|
f427e0d634 | ||
|
8191741f68 | ||
|
75ad8febf6 | ||
|
23d8bb2c66 | ||
|
b231914f6a | ||
|
cc1e14d625 | ||
|
d08e6e59ed | ||
|
37d0bdff98 | ||
|
b09bda689c | ||
|
82c9f85ce5 | ||
|
c2fd78b10f | ||
|
24a23c3573 | ||
|
038072e2f1 | ||
|
e6adf05834 | ||
|
db0aec831d | ||
|
fb1a41cd75 | ||
|
9e9140114e | ||
|
d50d561a05 | ||
|
a8945eeff6 | ||
|
a8bf5281df | ||
|
79c3b7b216 | ||
|
5b60dec5c1 | ||
|
21f4383ae7 | ||
|
f819b4a3ab | ||
|
c981cbe951 | ||
|
38189fd599 | ||
|
5145e34f09 | ||
|
67e49a98bb | ||
|
a9152a05f8 | ||
|
23645bfa01 | ||
|
d6eaea2845 | ||
|
98ffddb1db | ||
|
4693b20c75 | ||
|
eb71219dd0 | ||
|
e1b435afad | ||
|
e355628241 | ||
|
b72a54d1a5 | ||
|
f63e248ec1 | ||
|
b2a9ee3025 | ||
|
dd4f7467b2 | ||
|
6ee2116be1 | ||
|
b9f2926155 | ||
|
0cecad314c | ||
|
297e4185cc | ||
|
11e82c1ba3 | ||
|
e752575a1f | ||
|
c5257cab15 | ||
|
0f1bf77d3d | ||
|
a200c35efa | ||
|
45eb404791 | ||
|
19008b7bb8 | ||
|
d9d4df0e42 | ||
|
b85a6d855b | ||
|
0e0de6b8aa | ||
|
563c260640 | ||
|
1d8dd65e62 | ||
|
55e80573e2 | ||
|
d28516c7c4 | ||
|
8db6ac55e6 | ||
|
8a46f0a21d | ||
|
993cfa8757 | ||
|
85d4fc42e9 | ||
|
ae332f7c0a | ||
|
401d3cc731 | ||
|
ce32af5d96 | ||
|
cefd71d783 | ||
|
059a841c96 | ||
|
80823340ab | ||
|
bd2aeb7ab6 | ||
|
6dbaf73491 | ||
|
0cefee80e7 | ||
|
97c70a028e | ||
|
faac85bf09 | ||
|
19a97bd6f9 | ||
|
72fa862b04 | ||
|
7d9f12f3b9 | ||
|
280df08533 | ||
|
244531bc96 | ||
|
210e3a3a50 | ||
|
ce68e8d061 | ||
|
a3fbed81b2 | ||
|
b1cfebd9f4 | ||
|
3f288b12cc | ||
|
ec8ecff48c | ||
|
87445c2f5c | ||
|
1f603d3d9e | ||
|
a4a6984d5e | ||
|
9968ba85be | ||
|
d11ec3df93 | ||
|
3ad252c96a | ||
|
610c6dedc1 | ||
|
89ce51d52e | ||
|
f36e7ad877 | ||
|
af2c734bc4 | ||
|
b57b228b84 | ||
|
faed65f610 | ||
|
0ad0dc5760 | ||
|
8252c9ca38 | ||
|
52b5ab7edc | ||
|
84553c516c | ||
|
a0bb22c231 | ||
|
e72aa7f5ac | ||
|
88dcf47c56 | ||
|
7335c5a588 | ||
|
70c1945c6a | ||
|
505710ca37 | ||
|
cdf14688f5 | ||
|
431f4c161d | ||
|
651d7a1ff8 | ||
|
a23c00470e | ||
|
977bf6ff42 | ||
|
58782f84f8 | ||
|
59078e629d | ||
|
567f21d2cd | ||
|
8d07927991 | ||
|
97f1fb1987 | ||
|
fea018f801 | ||
|
8de28db94f | ||
|
33381c829b |
@@ -25,6 +25,10 @@ Release
|
||||
Debug
|
||||
ReleaseDLL
|
||||
DebugDLL
|
||||
UnivRelease
|
||||
UnivDebug
|
||||
BaseRelease
|
||||
BaseDebug
|
||||
robert
|
||||
stamp-h.in
|
||||
Makefile
|
||||
|
38
BuildCVS.txt
38
BuildCVS.txt
@@ -158,8 +158,10 @@ VII) Unix->Windows cross-compiling using configure
|
||||
|
||||
First you'll need a cross-compiler; linux glibc binaries of mingw32 and
|
||||
cygwin32 (both based on egcs) can be found at
|
||||
ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Otherwise you can
|
||||
compile one yourself. Check the relevant FAQs.
|
||||
ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Alternative binaries,
|
||||
based on the latest MinGW release can be found at
|
||||
http://members.telering.at/jessich/mingw/mingwcross/mingw_cross.html
|
||||
Otherwise you can compile one yourself.
|
||||
|
||||
[ A Note about cygwin32 and mingw32: the main difference is that cygwin32
|
||||
binaries are always linked against cygwin.dll. This dll encapsulates most
|
||||
@@ -179,8 +181,7 @@ To cross compile the windows library, do
|
||||
-> cd win32
|
||||
(or whatever you called it)
|
||||
Now run configure. There are two ways to do this
|
||||
-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw \
|
||||
--enable-dnd=no --without-odbc
|
||||
-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw
|
||||
where --build= should read whatever platform you're building on. Configure
|
||||
will notice that build and host platforms differ, and automatically prepend
|
||||
i586-mingw32- to gcc, ar, ld, etc (make sure they're in the PATH!).
|
||||
@@ -188,29 +189,22 @@ The other way to run configure is by specifying the names of the binaries
|
||||
yourself:
|
||||
-> CC=i586-mingw32-gcc CXX=i586-mingw32-g++ RANLIB=i586-mingw32-ranlib \
|
||||
DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \
|
||||
../configure --host=i586-mingw32 --with-mingw --enable-dnd=no
|
||||
../configure --host=i586-mingw32 --with-mingw
|
||||
|
||||
(all assuming you're using mingw32)
|
||||
Drag'n'drop is disabled because mingw32 lacks (AFAIK) OLE headers.
|
||||
|
||||
[ Update: some new mingw32 versions now have a new set of windows header
|
||||
files, which apparently can handle ole. Untested at the moment ]
|
||||
|
||||
ODBC files don't compile as of 13.10.99 - may be this will be fixed by the
|
||||
moment you're reading these lines.
|
||||
|
||||
Configure will conclude that shared libraries are out of the question and
|
||||
opt for a static one. I haven't looked into DLL creation yet.
|
||||
By default this will compile a DLL, if you want a static library,
|
||||
specify --disable-shared.
|
||||
|
||||
Type
|
||||
-> make
|
||||
and wait, wait, wait. Don't leave the room, because the minute you do there
|
||||
will be a compile error :-)
|
||||
|
||||
NB: you risk to get quite a few warnings about "ANSI C++ forbids implicit
|
||||
conversion from 'void *'" in all places where va_arg macro is used. This
|
||||
is due to a bug in (some versions of) mingw32 headers which may be
|
||||
corrected by editing the file
|
||||
NB: if you are using a very old compiler you risk to get quite a few warnings
|
||||
about "ANSI C++ forbids implicit conversion from 'void *'" in all places
|
||||
where va_arg macro is used. This is due to a bug in (some versions of)
|
||||
mingw32 headers which may be corrected by upgrading your compier,
|
||||
otherwise you might edit the file
|
||||
|
||||
${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h
|
||||
|
||||
@@ -231,8 +225,9 @@ typedef void *__gnuc_va_list;
|
||||
and adding "|| defined(_WIN32)" to the list of platforms on which
|
||||
__gnuc_va_list is char *.
|
||||
|
||||
If this is successful, you end up with a libwx_msw.a in win32/lib. Now try
|
||||
building the minimal sample:
|
||||
If this is successful, you end up with a wx23_2.dll/libwx23_2.a in win32/lib
|
||||
( or just libwx_msw.a if you opted for a static build ).
|
||||
Now try building the minimal sample:
|
||||
|
||||
-> cd samples/minimal
|
||||
-> make
|
||||
@@ -252,6 +247,5 @@ Cross-compiling TODO:
|
||||
- resource compiling must be done manually for now (should/can we link the
|
||||
default wx resources into libwx_msw.a?) [ No we can't; the linker won't
|
||||
link it in... you have to supply an object file ]
|
||||
- dynamic libraries
|
||||
- static executables are HUGE -- there must be room for improvement.
|
||||
|
||||
|
285
Makefile.in
285
Makefile.in
@@ -1,11 +1,12 @@
|
||||
#
|
||||
# File: makefile.unx
|
||||
# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
|
||||
# Author: Julian Smart, Robert Roebling, Vadim Zeitlin, Ron Lee
|
||||
# Created: 1993
|
||||
# Updated: 1999
|
||||
# Updated: 2001
|
||||
# Copyright:(c) 1993, AIAI, University of Edinburgh,
|
||||
# Copyright:(c) 1999, Vadim Zeitlin
|
||||
# Copyright:(c) 1999, Robert Roebling
|
||||
# Copyright:(c) 2001, Ron Lee
|
||||
#
|
||||
# Makefile for libwx_gtk.a, libwx_motif.a and libwx_msw.a
|
||||
|
||||
@@ -15,17 +16,17 @@ include ./src/make.env
|
||||
|
||||
############## override make.env for PIC ##########################
|
||||
|
||||
# Clears all default suffixes
|
||||
.SUFFIXES: .o .cpp .c .cxx
|
||||
%.o : %.c
|
||||
$(CC) -c $(CFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
|
||||
.c.o :
|
||||
$(CCC) -c @DEP_INFO_FLAGS@ $(CFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
%.o : %.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c @DEP_INFO_FLAGS@ $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
%.o : %.cxx
|
||||
$(CXX) -c $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
|
||||
.cxx.o :
|
||||
$(CC) -c @DEP_INFO_FLAGS@ $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
%.r : %.rsrc
|
||||
$(DEREZ) $^ Carbon.r -useDF > $@
|
||||
|
||||
########################### Paths #################################
|
||||
|
||||
@@ -44,55 +45,31 @@ VP9 = @top_srcdir@/src/zlib
|
||||
VPA = @top_srcdir@/src/regex
|
||||
VP10 = @top_srcdir@/src/iodbc
|
||||
VP11 = @top_srcdir@/src/msw/ole
|
||||
VP12 = $(FTVP01)@PATH_IFS@$(FTVP02)@PATH_IFS@$(FTVP03)@PATH_IFS@$(FTVP04)@PATH_IFS@$(FTVP05)@PATH_IFS@$(FTVP06)@PATH_IFS@$(FTVP07)@PATH_IFS@$(FTVP08)@PATH_IFS@
|
||||
VP13 = $(FTVP09)@PATH_IFS@$(FTVP10)@PATH_IFS@$(FTVP11)@PATH_IFS@$(FTVP12)@PATH_IFS@$(FTVP13)@PATH_IFS@$(FTVP14)@PATH_IFS@$(FTVP15)@PATH_IFS@
|
||||
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VPA)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11)@PATH_IFS@$(VP12)@PATH_IFS@$(VP13) # ':' for autoconf
|
||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VPA)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
build_libdir = $(top_builddir)/lib
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
# my autoconf doesn't set this
|
||||
#INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
# maybe do an additional chmod if needed?
|
||||
INSTALL_SCRIPT = @INSTALL@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_alias = @build_alias@
|
||||
build_triplet = @build@
|
||||
host_alias = @host_alias@
|
||||
@@ -117,6 +94,7 @@ PNGDIR = $(WXDIR)/src/png
|
||||
JPEGDIR = $(WXDIR)/src/jpeg
|
||||
TIFFDIR = $(WXDIR)/src/tiff
|
||||
ZLIBDIR = $(WXDIR)/src/zlib
|
||||
REGEXDIR = $(WXDIR)/src/regex
|
||||
GTKDIR = $(WXDIR)/src/gtk
|
||||
MOTIFDIR = $(WXDIR)/src/motif
|
||||
MSWDIR = $(WXDIR)/src/msw
|
||||
@@ -166,7 +144,6 @@ HEADERS = $(ALL_HEADERS)
|
||||
# for the objects and depfiles, we might be bulding only part of them
|
||||
# depending on configure arguments, so select a subset of ALL
|
||||
OBJECTS = @ALL_OBJECTS@
|
||||
DEPFILES = @ALL_DEPFILES@
|
||||
|
||||
# the object files of sublibraries (we assume that they don't change [often],
|
||||
# so we don't generate these lists with tmake but embed them here)
|
||||
@@ -328,80 +305,49 @@ IODBCOBJS = \
|
||||
prepare.o \
|
||||
result.o
|
||||
|
||||
OLEOBJS = \
|
||||
automtn.o \
|
||||
dataobj.o \
|
||||
dropsrc.o \
|
||||
droptgt.o \
|
||||
oleutils.o \
|
||||
uuid.o
|
||||
|
||||
############################## Rules ##################################
|
||||
|
||||
BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@
|
||||
BURNT_LIBRARY_NAME_GL = @BURNT_LIBRARY_NAME_GL@
|
||||
SONAME_FLAGS = @SONAME_FLAGS@
|
||||
SONAME_FLAGS_GL = @SONAME_FLAGS_GL@
|
||||
|
||||
all: @WX_ALL@
|
||||
|
||||
@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
|
||||
@$(INSTALL) -d ./lib
|
||||
$(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS)
|
||||
$(RANLIB) ./lib/$@
|
||||
$(build_libdir)/@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
|
||||
@$(INSTALL) -d $(build_libdir)
|
||||
$(AR) $(AROPTIONS) $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
@WX_LIBRARY_NAME_STATIC_GL@: glcanvas.o
|
||||
@$(INSTALL) -d ./lib
|
||||
$(AR) $(AROPTIONS) ./lib/$@ glcanvas.o
|
||||
$(RANLIB) ./lib/$@
|
||||
$(build_libdir)/@WX_LIBRARY_NAME_STATIC_GL@: glcanvas.o
|
||||
@$(INSTALL) -d $(build_libdir)
|
||||
$(AR) $(AROPTIONS) $@ glcanvas.o
|
||||
$(RANLIB) $@
|
||||
|
||||
@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
|
||||
@$(INSTALL) -d ./lib
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS)
|
||||
$(build_libdir)/@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
|
||||
@$(INSTALL) -d $(build_libdir)
|
||||
$(SHARED_LD) $@ $(SONAME_FLAGS) $(OBJECTS) $(EXTRALIBS)
|
||||
|
||||
@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o @WX_LIBRARY_NAME_SHARED@
|
||||
@$(INSTALL) -d ./lib
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o ./lib/@WX_LIBRARY_NAME_SHARED@ $(EXTRALIBS) $(OPENGLLIBS)
|
||||
$(build_libdir)/@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o $(build_libdir)/@WX_LIBRARY_NAME_SHARED@
|
||||
@$(INSTALL) -d $(build_libdir)
|
||||
$(SHARED_LD) $@ $(SONAME_FLAGS_GL) glcanvas.o -L$(build_libdir) @WXCONFIG_LIBS@ $(EXTRALIBS) $(OPENGLLIBS)
|
||||
|
||||
./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).r: ./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).rsrc
|
||||
$(DEREZ) $^ $(DEREZFLAGS) > $@
|
||||
$(build_libdir)/@WX_RESOURCES_MACOSX@: $(MACRESOURCES)
|
||||
@$(INSTALL) -d $(build_libdir)
|
||||
$(RESCOMP) -d __UNIX__ -useDF $^ -o $@
|
||||
|
||||
./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).rsrc: $(MACRESOURCES)
|
||||
$(REZ) $(REZFLAGS) $^ -o $@
|
||||
|
||||
CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK1@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK2@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK3@
|
||||
cd lib \
|
||||
$(build_libdir)/@WX_LIBRARY_LINK1@: $(build_libdir)/@WX_LIBRARY_NAME_SHARED@
|
||||
@$(RM) $(build_libdir)/@WX_LIBRARY_LINK1@
|
||||
@$(RM) $(build_libdir)/@WX_LIBRARY_LINK2@
|
||||
cd $(build_libdir) \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK1@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK2@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK3@
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK2@
|
||||
|
||||
CREATE_LINKS_GL: @WX_LIBRARY_NAME_SHARED_GL@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK1_GL@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK2_GL@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK3_GL@
|
||||
cd lib \
|
||||
$(build_libdir)/@WX_LIBRARY_LINK1_GL@: $(build_libdir)/@WX_LIBRARY_NAME_SHARED_GL@
|
||||
@$(RM) $(build_libdir)/@WX_LIBRARY_LINK1_GL@
|
||||
@$(RM) $(build_libdir)/@WX_LIBRARY_LINK2_GL@
|
||||
cd $(build_libdir) \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK1_GL@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK2_GL@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK3_GL@
|
||||
|
||||
CREATE_INSTALLED_LINKS: preinstall
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK2@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK3@
|
||||
cd $(libdir) \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK1@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK2@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK3@
|
||||
|
||||
CREATE_INSTALLED_LINKS_GL: preinstall_gl
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK3_GL@
|
||||
cd $(libdir) \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK1_GL@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK2_GL@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK3_GL@
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK2_GL@
|
||||
|
||||
$(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h
|
||||
|
||||
@@ -426,7 +372,22 @@ lexer.c: $(COMMDIR)/lexer.l
|
||||
sed -e "s/unput/PROIO_unput/g" > lexer.c
|
||||
@$(RM) @LEX_STEM@.c
|
||||
|
||||
-include $(DEPFILES)
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
|
||||
CREATE_INSTALLED_LINKS: preinstall
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK2@
|
||||
cd $(libdir) \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK1@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK2@
|
||||
|
||||
CREATE_INSTALLED_LINKS_GL: preinstall_gl
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@
|
||||
cd $(libdir) \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK1_GL@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK2_GL@
|
||||
|
||||
afminstall: preinstall
|
||||
@if test ! -d $(datadir); then $(INSTALL) -d $(datadir); fi
|
||||
@@ -438,7 +399,7 @@ afminstall: preinstall
|
||||
|
||||
# this is the real install target: copies the library, wx-config and the
|
||||
# headers to the installation directory
|
||||
preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_NAME@-config
|
||||
preinstall: $(build_libdir)/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLCHAIN_NAME@-config
|
||||
@echo " "
|
||||
@echo " Installing wxWindows..."
|
||||
@echo " "
|
||||
@@ -447,17 +408,19 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
||||
@if test ! -d $(bindir); then $(INSTALL) -d $(bindir); fi
|
||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
||||
|
||||
$(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLKIT_NAME@-config $(bindir)/wx@TOOLKIT_NAME@-config
|
||||
cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLKIT_NAME@-config wx-config
|
||||
$(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(libdir)/@WX_TARGET_LIBRARY@
|
||||
$(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLCHAIN_NAME@-config $(bindir)/wx@TOOLCHAIN_NAME@-config
|
||||
cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLCHAIN_NAME@-config wx-config
|
||||
$(INSTALL_PROGRAM) $(build_libdir)/@WX_TARGET_LIBRARY@ $(libdir)/@WX_TARGET_LIBRARY@
|
||||
|
||||
$(INSTALL) -d $(libdir)/wx
|
||||
$(INSTALL) -d $(libdir)/wx/include
|
||||
$(INSTALL) -d $(libdir)/wx/include/wx
|
||||
$(INSTALL) -d $(libdir)/wx/include/wx/@TOOLKIT_NAME@
|
||||
$(INSTALL_DATA) $(top_builddir)/include/wx/@TOOLKIT_DIR@/setup.h $(libdir)/wx/include/wx/@TOOLKIT_NAME@/setup.h
|
||||
$(INSTALL) -d $(libdir)/wx/include/@TOOLCHAIN_NAME@
|
||||
$(INSTALL) -d $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx
|
||||
$(INSTALL_DATA) $(build_libdir)/wx/include/@TOOLCHAIN_NAME@/wx/setup.h \
|
||||
$(libdir)/wx/include/@TOOLCHAIN_NAME@/wx/setup.h
|
||||
|
||||
$(INSTALL) -d $(includedir)/wx
|
||||
@# FIXME: This will erroneously install a wx/base dir for wxBase..
|
||||
@if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/@TOOLKIT_DIR@; fi
|
||||
@if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/html; fi
|
||||
@if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/generic; fi
|
||||
@@ -476,12 +439,19 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
||||
echo "$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \
|
||||
done
|
||||
|
||||
preinstall_gl: $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@
|
||||
preinstall_res: $(build_libdir)/@WX_RESOURCES_MACOSX_COMPILED@
|
||||
@echo " "
|
||||
@echo " Installing wxWindows Mac resource ..."
|
||||
@echo " "
|
||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
||||
$(INSTALL_PROGRAM) $(build_libdir)/@WX_RESOURCES_MACOSX_COMPILED@ $(libdir)/@WX_RESOURCES_MACOSX_COMPILED@
|
||||
|
||||
preinstall_gl: $(build_libdir)/@WX_TARGET_LIBRARY_GL@
|
||||
@echo " "
|
||||
@echo " Installing wxWindows OpenGl add-on..."
|
||||
@echo " "
|
||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
||||
$(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@ $(libdir)/@WX_TARGET_LIBRARY_GL@
|
||||
$(INSTALL_PROGRAM) $(build_libdir)/@WX_TARGET_LIBRARY_GL@ $(libdir)/@WX_TARGET_LIBRARY_GL@
|
||||
|
||||
install: @AFMINSTALL@ @WX_ALL_INSTALLED@
|
||||
@echo " "
|
||||
@@ -504,16 +474,14 @@ uninstall:
|
||||
@$(RM) $(libdir)/@WX_TARGET_LIBRARY@
|
||||
@$(RM) $(libdir)/@WX_LIBRARY_LINK1@
|
||||
@$(RM) $(libdir)/@WX_LIBRARY_LINK2@
|
||||
@$(RM) $(libdir)/@WX_LIBRARY_LINK3@
|
||||
@echo " Removing GL library..."
|
||||
@$(RM) $(libdir)/@WX_TARGET_LIBRARY_GL@
|
||||
@$(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@
|
||||
@$(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@
|
||||
@$(RM) $(libdir)/@WX_LIBRARY_LINK3_GL@
|
||||
@echo " Removing helper files..."
|
||||
@$(RM) $(libdir)/wx/include/wx/@TOOLKIT_NAME@/setup.h
|
||||
@$(RM) $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx/setup.h
|
||||
@$(RM) $(bindir)/wx-config
|
||||
@$(RM) $(bindir)/wx@TOOLKIT_NAME@-config
|
||||
@$(RM) $(bindir)/wx@TOOLCHAIN_NAME@-config
|
||||
@$(RM) $(datadir)/wx/afm/*
|
||||
@$(RM) $(datadir)/wx/gs_afm/*
|
||||
# FIXME: wxBase doesnt install these next 3 dirs.
|
||||
@@ -532,8 +500,8 @@ uninstall:
|
||||
done
|
||||
@echo " Removing directories..."
|
||||
@-rmdir $(localedir)
|
||||
@if test -d $(libdir)/wx/include/wx/@TOOLKIT_NAME@; then rmdir $(libdir)/wx/include/wx/@TOOLKIT_NAME@; fi
|
||||
@if test -d $(libdir)/wx/include/wx; then rmdir $(libdir)/wx/include/wx; fi
|
||||
@if test -d $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx; then rmdir $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx; fi
|
||||
@if test -d $(libdir)/wx/include/@TOOLCHAIN_NAME@; then rmdir $(libdir)/wx/include/@TOOLCHAIN_NAME@; fi
|
||||
@if test -d $(libdir)/wx/include; then rmdir $(libdir)/wx/include; fi
|
||||
@if test -d $(libdir)/wx; then rmdir $(libdir)/wx; fi
|
||||
@if test -d $(includedir)/wx/gtk; then rmdir $(includedir)/wx/gtk; fi
|
||||
@@ -573,6 +541,11 @@ ALL_DIST: distclean
|
||||
cp $(ZLIBDIR)/*.c $(DISTDIR)/src/zlib
|
||||
cp $(ZLIBDIR)/README $(DISTDIR)/src/zlib
|
||||
cp $(ZLIBDIR)/*.mms $(DISTDIR)/src/zlib
|
||||
mkdir $(DISTDIR)/src/regex
|
||||
cp $(REGEXDIR)/*.{i,}h $(DISTDIR)/src/regex
|
||||
cp $(REGEXDIR)/*.c $(DISTDIR)/src/regex
|
||||
cp $(REGEXDIR)/{Makefile,COPYRIGHT,README,WHATSNEW} $(DISTDIR)/src/regex
|
||||
cp $(REGEXDIR)/{mkh,tests} $(DISTDIR)/src/regex
|
||||
|
||||
# this target is the common part of distribution script for all GUI toolkits,
|
||||
# but is not used when building wxBase distribution
|
||||
@@ -608,7 +581,7 @@ ALL_GUI_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/src/tiff
|
||||
mkdir $(DISTDIR)/src/iodbc
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
||||
cp $(SRCDIR)/files.lst $(DISTDIR)/src/
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
||||
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
||||
@@ -648,7 +621,7 @@ BASE_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/include/wx/unix
|
||||
mkdir $(DISTDIR)/src/common
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
||||
cp @PORT_FILES@ $(DISTDIR)
|
||||
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
||||
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
|
||||
cp $(WXDIR)/wxBase*.ds[pw] $(DISTDIR)
|
||||
@@ -679,6 +652,7 @@ BASE_DIST: ALL_DIST
|
||||
GTK_DIST: ALL_GUI_DIST
|
||||
cp $(INCDIR)/wx/gtk/*.h $(DISTDIR)/include/wx/gtk
|
||||
cp $(INCDIR)/wx/gtk/*.xpm $(DISTDIR)/include/wx/gtk
|
||||
cp $(GTKDIR)/files.lst $(DISTDIR)/src/gtk
|
||||
cp $(GTKDIR)/*.cpp $(DISTDIR)/src/gtk
|
||||
cp $(GTKDIR)/*.c $(DISTDIR)/src/gtk
|
||||
cp $(GTKDIR)/*.xbm $(DISTDIR)/src/gtk
|
||||
@@ -689,6 +663,7 @@ GTK_DIST: ALL_GUI_DIST
|
||||
MOTIF_DIST: ALL_GUI_DIST
|
||||
cp $(WXDIR)/wxMOTIF.spec $(DISTDIR)
|
||||
cp $(INCDIR)/wx/motif/*.h $(DISTDIR)/include/wx/motif
|
||||
cp $(MOTIFDIR)/files.lst $(DISTDIR)/src/motif
|
||||
cp $(MOTIFDIR)/*.cpp $(DISTDIR)/src/motif
|
||||
cp $(MOTIFDIR)/*.xbm $(DISTDIR)/src/motif
|
||||
mkdir $(DISTDIR)/src/motif/xmcombo
|
||||
@@ -697,21 +672,58 @@ MOTIF_DIST: ALL_GUI_DIST
|
||||
cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo
|
||||
|
||||
MACX_DIST: ALL_GUI_DIST
|
||||
echo "Apple Mac OS X specific distribution not complete"
|
||||
cp $(INCDIR)/wx/mac/*.h $(DISTDIR)/include/wx/mac
|
||||
cp $(MACDIR)/files.lst $(DISTDIR)/src/mac
|
||||
cp $(MACDIR)/*.cpp $(DISTDIR)/src/mac
|
||||
cp $(MACDIR)/*.c $(DISTDIR)/src/mac
|
||||
mkdir $(DISTDIR)/src/mac/morefile
|
||||
cp $(MACDIR)/morefile/*.h $(DISTDIR)/src/mac/morefile
|
||||
cp $(MACDIR)/morefile/*.cpp $(DISTDIR)/src/mac/morefile
|
||||
mkdir $(DISTDIR)/src/mac/cdef
|
||||
cp $(MACDIR)/cdef/*.h $(DISTDIR)/src/mac/cdef
|
||||
cp $(MACDIR)/cdef/*.cpp $(DISTDIR)/src/mac/cdef
|
||||
cp $(MACDIR)/cdef/*.mcp $(DISTDIR)/src/mac/cdef
|
||||
mkdir $(DISTDIR)/src/mac/ldef
|
||||
cp $(MACDIR)/ldef/*.h $(DISTDIR)/src/mac/ldef
|
||||
cp $(MACDIR)/ldef/*.cpp $(DISTDIR)/src/mac/ldef
|
||||
cp $(MACDIR)/ldef/*.mcp $(DISTDIR)/src/mac/cdef
|
||||
mkdir $(DISTDIR)/src/mac/morefile
|
||||
cp $(MACDIR)/morefile/*.c $(DISTDIR)/src/mac/morefile
|
||||
cp $(MACDIR)/morefile/*.h $(DISTDIR)/src/mac/morefile
|
||||
|
||||
MSW_DIST: ALL_GUI_DIST
|
||||
cp $(WXDIR)/wxWINE.spec $(DISTDIR)
|
||||
mkdir $(DISTDIR)/include/wx/msw/ctl3d
|
||||
mkdir $(DISTDIR)/include/wx/msw/gnuwin32
|
||||
mkdir $(DISTDIR)/include/wx/msw/gnuwin32/gl
|
||||
mkdir $(DISTDIR)/include/wx/msw/ole
|
||||
cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw
|
||||
cp $(INCDIR)/wx/msw/*.cur $(DISTDIR)/include/wx/msw
|
||||
cp $(INCDIR)/wx/msw/*.ico $(DISTDIR)/include/wx/msw
|
||||
cp $(INCDIR)/wx/msw/*.bmp $(DISTDIR)/include/wx/msw
|
||||
cp $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw
|
||||
cp $(INCDIR)/wx/msw/ctl3d/*.h $(DISTDIR)/include/wx/msw/ctl3d
|
||||
cp $(INCDIR)/wx/msw/gnuwin32/*.h $(DISTDIR)/include/wx/msw/gnuwin32
|
||||
cp $(INCDIR)/wx/msw/gnuwin32/gl/*.h $(DISTDIR)/include/wx/msw/gnuwin32/gl
|
||||
cp $(INCDIR)/wx/msw/gnuwin32/gl/*.def $(DISTDIR)/include/wx/msw/gnuwin32/gl
|
||||
cp $(INCDIR)/wx/msw/ole/*.h $(DISTDIR)/include/wx/msw/ole
|
||||
|
||||
mkdir $(DISTDIR)/src/msw/ole
|
||||
cp $(MSWDIR)/files.lst $(DISTDIR)/src/msw
|
||||
cp $(MSWDIR)/*.cpp $(DISTDIR)/src/msw
|
||||
cp $(MSWDIR)/*.c $(DISTDIR)/src/msw
|
||||
cp $(MSWDIR)/*.def $(DISTDIR)/src/msw
|
||||
mkdir $(DISTDIR)/src/msw/ole
|
||||
cp $(MSWDIR)/ole/*.cpp $(DISTDIR)/src/msw/ole
|
||||
|
||||
UNIV_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/include/wx/univ
|
||||
mkdir $(DISTDIR)/src/univ
|
||||
mkdir $(DISTDIR)/src/univ/themes
|
||||
cp $(INCDIR)/wx/univ/*.h $(DISTDIR)/include/wx/univ
|
||||
cp $(SRCDIR)/univ/files.lst $(DISTDIR)/src/univ
|
||||
cp $(SRCDIR)/univ/*.cpp $(DISTDIR)/src/univ
|
||||
cp $(SRCDIR)/univ/themes/*.cpp $(DISTDIR)/src/univ/themes
|
||||
|
||||
DEMOS_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/demos
|
||||
cp $(DEMODIR)/Makefile.in $(DISTDIR)/demos
|
||||
@@ -1203,6 +1215,12 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/wizard/*.cpp $(DISTDIR)/samples/wizard
|
||||
cp $(SAMPDIR)/wizard/*.xpm $(DISTDIR)/samples/wizard
|
||||
|
||||
mkdir $(DISTDIR)/samples/widgets
|
||||
mkdir $(DISTDIR)/samples/widgets/icons
|
||||
cp $(SAMPDIR)/widgets/Makefile.in $(DISTDIR)/samples/widgets
|
||||
cp $(SAMPDIR)/widgets/*.{cpp,h,rc} $(DISTDIR)/samples/widgets
|
||||
cp $(SAMPDIR)/widgets/icons/*.xpm $(DISTDIR)/samples/widgets/icons
|
||||
|
||||
UTILS_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/utils
|
||||
cp $(UTILSDIR)/Makefile.in $(DISTDIR)/utils
|
||||
@@ -1266,6 +1284,7 @@ PYTHON_DIST:
|
||||
mkdir $(DISTDIR)/wxPython/contrib/glcanvas/gtk
|
||||
mkdir $(DISTDIR)/wxPython/contrib/ogl
|
||||
mkdir $(DISTDIR)/wxPython/contrib/stc
|
||||
mkdir $(DISTDIR)/wxPython/contrib/xrc
|
||||
mkdir $(DISTDIR)/wxPython/demo
|
||||
mkdir $(DISTDIR)/wxPython/demo/bitmaps
|
||||
mkdir $(DISTDIR)/wxPython/demo/data
|
||||
@@ -1274,7 +1293,7 @@ PYTHON_DIST:
|
||||
mkdir $(DISTDIR)/wxPython/wxPython
|
||||
mkdir $(DISTDIR)/wxPython/wxPython/lib
|
||||
mkdir $(DISTDIR)/wxPython/wxPython/lib/editor
|
||||
mkdir $(DISTDIR)/wxPython/wxPython/lib/sizers
|
||||
mkdir $(DISTDIR)/wxPython/wxPython/lib/mixins
|
||||
|
||||
cp $(WXDIR)/wxPython/*.txt $(DISTDIR)/wxPython
|
||||
cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython
|
||||
@@ -1284,6 +1303,7 @@ PYTHON_DIST:
|
||||
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/stc/* $(DISTDIR)/wxPython/contrib/stc
|
||||
-cp $(WXDIR)/wxPython/contrib/xrc/xrc.* $(DISTDIR)/wxPython/contrib/xrc
|
||||
-cp $(WXDIR)/wxPython/demo/* $(DISTDIR)/wxPython/demo
|
||||
-cp $(WXDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/wxPython/demo/bitmaps
|
||||
-cp $(WXDIR)/wxPython/demo/data/* $(DISTDIR)/wxPython/demo/data
|
||||
@@ -1292,6 +1312,7 @@ PYTHON_DIST:
|
||||
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/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor
|
||||
cp $(WXDIR)/wxPython/wxPython/lib/mixins/*.py $(DISTDIR)/wxPython/wxPython/lib/mixins
|
||||
|
||||
distclean:
|
||||
$(RM) -r _dist_dir
|
||||
@@ -1314,7 +1335,6 @@ dist-only:
|
||||
fi
|
||||
|
||||
dist: @GUIDIST@
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
@cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE);
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
@@ -1345,7 +1365,6 @@ bzip-dist-only:
|
||||
fi
|
||||
|
||||
bzip-dist: @GUIDIST@
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src/
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
@cd _dist_dir && tar ch $(DISTDIRNAME) | bzip2 -f9 > ../$(WXARCHIVE_BZIP)
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
@@ -1358,24 +1377,41 @@ bzip-dist: @GUIDIST@
|
||||
mv wxDemos demos; \
|
||||
fi
|
||||
|
||||
debian-dist: @GUIDIST@ MANUAL_DIST PYTHON_DIST
|
||||
debian-dist: debian-native-dist debian-msw-dirs MSW_DIST
|
||||
mkdir $(DISTDIR)/debian
|
||||
-cp $(WXDIR)/debian/* $(DISTDIR)/debian
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src/
|
||||
cp $(DOCDIR)/licence.txt $(DISTDIR)/docs
|
||||
cp $(DOCDIR)/licendoc.txt $(DISTDIR)/docs
|
||||
cp $(DOCDIR)/preamble.txt $(DISTDIR)/docs
|
||||
rm -f $(DISTDIR)/*.spec
|
||||
|
||||
@# now prune away a lot of the crap included by using cp -R
|
||||
@# in other dist targets. Ugly and hardly portable but it
|
||||
@# will run on any Debian box and that's enough for now.
|
||||
|
||||
find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \
|
||||
\( -name "makefile.*" -a ! -name "makefile.unx" \) \) \
|
||||
-print0 | xargs -0 rm -rf
|
||||
|
||||
rm -rf $(WXDIR)/../wxwindows$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)
|
||||
mv $(DISTDIR) $(WXDIR)/../wxwindows$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)
|
||||
|
||||
debian-native-dist: @GUIDIST@ UNIV_DIST MANUAL_DIST PYTHON_DIST
|
||||
|
||||
debian-msw-dirs:
|
||||
mkdir $(DISTDIR)/include/wx/msw
|
||||
mkdir $(DISTDIR)/src/msw
|
||||
|
||||
|
||||
clean:
|
||||
$(RM) *.o
|
||||
$(RM) *.d
|
||||
$(RM) parser.c
|
||||
$(RM) lexer.c
|
||||
# $(RM) -r ./lib/wx/*
|
||||
$(RM) ./lib/lib*
|
||||
$(RM) $(build_libdir)/lib*
|
||||
# Don't remove this lot, configure will reuse it
|
||||
# if it's still good
|
||||
# $(RM) -r $(build_libdir)/wx/*
|
||||
|
||||
cleanall: clean
|
||||
|
||||
@@ -1393,3 +1429,4 @@ rpm: dist
|
||||
cp -f $(WXARCHIVE) $(RPMTOP)/SOURCES
|
||||
rpm -ba --define "_topdir `pwd`/$(RPMTOP)" $(WXDIR)/wx$(TOOLKIT).spec
|
||||
mv -f `find $(RPMTOP) -name "wx$(TARGET)*.rpm"` .
|
||||
|
||||
|
594
config.guess
vendored
594
config.guess
vendored
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
version='2000-10-23'
|
||||
timestamp='2001-09-04'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -32,30 +32,41 @@ version='2000-10-23'
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
# don't specify an explicit build system type.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of this system.
|
||||
Output the configuration name of the system \`$me' is run on.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
-h, --help print this help, then exit
|
||||
-t, --time-stamp print date of last modification, then exit
|
||||
-v, --version print version number, then exit
|
||||
|
||||
Report bugs and patches to <config-patches@gnu.org>."
|
||||
|
||||
version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
@@ -64,9 +75,7 @@ while test $# -gt 0 ; do
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
echo "$me: invalid option $1$help" >&2
|
||||
exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
@@ -78,34 +87,42 @@ if test $# != 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use $HOST_CC if defined. $CC may point to a cross-compiler
|
||||
if test x"$CC_FOR_BUILD" = x; then
|
||||
if test x"$HOST_CC" != x; then
|
||||
CC_FOR_BUILD="$HOST_CC"
|
||||
else
|
||||
if test x"$CC" != x; then
|
||||
CC_FOR_BUILD="$CC"
|
||||
else
|
||||
CC_FOR_BUILD=cc
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
|
||||
# CC_FOR_BUILD -- compiler used by this script.
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $dummy.c $dummy.o $dummy.rel ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
@@ -129,16 +146,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format.
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
os=netbsd
|
||||
else
|
||||
os=netbsdelf
|
||||
fi
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
os=netbsd
|
||||
else
|
||||
os=netbsdelf
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
@@ -179,6 +205,7 @@ main:
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
@@ -200,6 +227,9 @@ EOF
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
2-1307)
|
||||
UNAME_MACHINE="alphaev68"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
@@ -247,7 +277,7 @@ EOF
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
||||
@@ -303,6 +333,9 @@ EOF
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:NetBSD:*)
|
||||
echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -360,6 +393,7 @@ EOF
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
@@ -383,10 +417,13 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm $dummy.c $dummy && exit 0
|
||||
&& rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
echo powerpc-motorola-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
@@ -434,11 +471,20 @@ EOF
|
||||
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
||||
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
||||
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
||||
i?86:AIX:*:*)
|
||||
i*86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
ia64:AIX:*:*)
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
@@ -450,7 +496,7 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
@@ -459,9 +505,9 @@ EOF
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
@@ -469,7 +515,7 @@ EOF
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
@@ -495,10 +541,29 @@ EOF
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[34678]??:HP-UX:*:*)
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
@@ -532,13 +597,19 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ia64-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
@@ -564,7 +635,7 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
@@ -574,7 +645,7 @@ EOF
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
*9??*:MPE/iX:*:*)
|
||||
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
|
||||
echo hppa1.0-hp-mpeix
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
@@ -583,7 +654,7 @@ EOF
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
i?86:OSF1:*:*)
|
||||
i*86:OSF1:*:*)
|
||||
if [ -x /usr/sbin/sysversion ] ; then
|
||||
echo ${UNAME_MACHINE}-unknown-osf1mk
|
||||
else
|
||||
@@ -618,37 +689,39 @@ EOF
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE}
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*[A-Z]90:*:*:*)
|
||||
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
|
||||
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
|
||||
-e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
@@ -693,205 +766,93 @@ EOF
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
|
||||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-unknown-linux-gnu && exit 0 ;;
|
||||
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
EV56) UNAME_MACHINE=alphaev56 ;;
|
||||
PCA56) UNAME_MACHINE=alphapca56 ;;
|
||||
PCA57) UNAME_MACHINE=alphapca56 ;;
|
||||
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
exit 0 ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
esac
|
||||
exit 0 ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit 0 ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_emulations=`cd /; ld --help 2>&1 \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/.*supported targets: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
*ia64)
|
||||
echo "${UNAME_MACHINE}-unknown-linux"
|
||||
exit 0
|
||||
;;
|
||||
i?86linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf_i?86)
|
||||
case "$ld_supported_targets" in
|
||||
elf32-i386)
|
||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
||||
;;
|
||||
i?86coff)
|
||||
a.out-i386-linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0 ;;
|
||||
coff-i386)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
;;
|
||||
sparclinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
armlinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32arm*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
|
||||
exit 0
|
||||
;;
|
||||
armelf_linux*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
m68klinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32ppc | elf32ppclinux)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#if defined(__GLIBC__)
|
||||
extern char __libc_version[];
|
||||
extern char __libc_release[];
|
||||
#endif
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#if defined(__GLIBC__)
|
||||
printf("%s %s\n", __libc_version, __libc_release);
|
||||
#else
|
||||
printf("unkown\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy | grep 1\.99 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
exit 0
|
||||
;;
|
||||
shelf_linux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
exit 0 ;;
|
||||
"")
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or
|
||||
# one that does not give us useful --help.
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers $dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
elif test "${UNAME_MACHINE}" = "s390"; then
|
||||
echo s390-ibm-linux && exit 0
|
||||
elif test "${UNAME_MACHINE}" = "x86_64"; then
|
||||
echo x86_64-unknown-linux-gnu && exit 0
|
||||
elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*)
|
||||
echo hppa1.1-unknown-linux-gnu
|
||||
;;
|
||||
PA8*)
|
||||
echo hppa2.0-unknown-linux-gnu
|
||||
;;
|
||||
*)
|
||||
echo hppa-unknown-linux-gnu
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
test -z "$ld_supported_emulations" \
|
||||
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
@@ -902,29 +863,30 @@ EOF
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
# earlier versions are messed up and put the nodename in both
|
||||
# sysname and nodename.
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i?86:UNIX_SV:4.2MP:2.*)
|
||||
i*86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
@@ -932,7 +894,7 @@ EOF
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
|
||||
@@ -940,16 +902,15 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:5:7*)
|
||||
# Fixed at (any) Pentium or better
|
||||
UNAME_MACHINE=i586
|
||||
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
|
||||
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
i*86:*:5:[78]*)
|
||||
case `/bin/uname -X | grep "^Machine"` in
|
||||
*486*) UNAME_MACHINE=i486 ;;
|
||||
*Pentium) UNAME_MACHINE=i586 ;;
|
||||
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
|
||||
esac
|
||||
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
i*86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
@@ -967,7 +928,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*DOS:*:*)
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
@@ -1006,21 +967,24 @@ EOF
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m68*:LynxOS:2.*:*)
|
||||
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
|
||||
rs6000:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
|
||||
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -1038,8 +1002,8 @@ EOF
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
@@ -1051,6 +1015,10 @@ EOF
|
||||
# From seanf@swdc.stratus.com.
|
||||
echo i860-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:VOS:*:*)
|
||||
# From Paul.Green@stratus.com.
|
||||
echo hppa1.1-stratus-vos
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -1120,11 +1088,41 @@ EOF
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
*:TENEX:*:*)
|
||||
echo pdp10-unknown-tenex
|
||||
exit 0 ;;
|
||||
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
|
||||
echo pdp10-dec-tops20
|
||||
exit 0 ;;
|
||||
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
|
||||
echo pdp10-xkl-tops20
|
||||
exit 0 ;;
|
||||
*:TOPS-20:*:*)
|
||||
echo pdp10-unknown-tops20
|
||||
exit 0 ;;
|
||||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
@@ -1211,11 +1209,24 @@ main ()
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
# if !defined (ultrix)
|
||||
# include <sys/param.h>
|
||||
# if defined (BSD)
|
||||
# if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
# else
|
||||
# if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
@@ -1226,7 +1237,7 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
@@ -1262,8 +1273,9 @@ fi
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
The $version version of this script cannot recognize your system type.
|
||||
Please download the most up to date version of the config scripts:
|
||||
This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/config/
|
||||
|
||||
@@ -1272,7 +1284,7 @@ send the following data and any information you think might be
|
||||
pertinent to <config-patches@gnu.org> in order to provide the needed
|
||||
information to handle your system.
|
||||
|
||||
config.guess version = $version
|
||||
config.guess timestamp = $timestamp
|
||||
|
||||
uname -m = `(uname -m) 2>/dev/null || echo unknown`
|
||||
uname -r = `(uname -r) 2>/dev/null || echo unknown`
|
||||
@@ -1299,7 +1311,7 @@ exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
241
config.sub
vendored
241
config.sub
vendored
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
version='2000-11-04'
|
||||
timestamp='2001-09-07'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -60,16 +60,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
Canonicalize a configuration name.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
-h, --help print this help, then exit
|
||||
-t, --time-stamp print date of last modification, then exit
|
||||
-v, --version print version number, then exit
|
||||
|
||||
Report bugs and patches to <config-patches@gnu.org>."
|
||||
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
case $1 in
|
||||
--time-stamp | --time* | -t )
|
||||
echo "$timestamp" ; exit 0 ;;
|
||||
--version | -v )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
@@ -78,9 +92,7 @@ while test $# -gt 0 ; do
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
echo "$me: invalid option $1$help"
|
||||
exit 1 ;;
|
||||
|
||||
*local*)
|
||||
@@ -105,7 +117,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos*)
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -145,6 +157,14 @@ case $os in
|
||||
os=-vxworks
|
||||
basic_machine=$1
|
||||
;;
|
||||
-chorusos*)
|
||||
os=-chorusos
|
||||
basic_machine=$1
|
||||
;;
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
@@ -203,22 +223,36 @@ esac
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
| alphaev6[78] \
|
||||
| we32k | ns16k | clipper | i370 | sh | sh[34] \
|
||||
| powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | d30v | fr30 | avr)
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dsp16xx \
|
||||
| fr30 \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
||||
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
|
||||
| mipsisa32 \
|
||||
| mn10200 | mn10300 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| stormy16 | strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| v850 \
|
||||
| we32k \
|
||||
| x86 | xscale \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
@@ -226,13 +260,13 @@ case $basic_machine in
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[234567]86 | x86_64)
|
||||
i*86 | x86_64)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
@@ -241,28 +275,43 @@ case $basic_machine in
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| alphaev6[78]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
|
||||
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alphapca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
||||
| clipper-* | cray2-* | cydra-* \
|
||||
| d10v-* | d30v-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| m32r-* \
|
||||
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
|
||||
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
|
||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -353,8 +402,8 @@ case $basic_machine in
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[ctj]90-cray)
|
||||
basic_machine=c90-cray
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -410,6 +459,10 @@ case $basic_machine in
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
go32)
|
||||
basic_machine=i386-pc
|
||||
os=-go32
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
@@ -485,19 +538,19 @@ case $basic_machine in
|
||||
basic_machine=i370-ibm
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
i*86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[34567]86v4*)
|
||||
i*86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[34567]86v)
|
||||
i*86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[34567]86sol2)
|
||||
i*86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
@@ -509,18 +562,6 @@ case $basic_machine in
|
||||
basic_machine=i386-unknown
|
||||
os=-vsta
|
||||
;;
|
||||
i386-go32 | go32)
|
||||
basic_machine=i386-unknown
|
||||
os=-go32
|
||||
;;
|
||||
i386-mingw32 | mingw32)
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
i[34567]86-pw32 | pw32)
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
@@ -546,6 +587,10 @@ case $basic_machine in
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
@@ -576,7 +621,7 @@ case $basic_machine in
|
||||
os=-coff
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-unknown
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
mvs)
|
||||
@@ -686,7 +731,7 @@ case $basic_machine in
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
@@ -695,12 +740,12 @@ case $basic_machine in
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=rs6000-ibm
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
@@ -712,9 +757,23 @@ case $basic_machine in
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64) basic_machine=powerpc64-unknown
|
||||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
;;
|
||||
ppc64le-* | powerpc64little-*)
|
||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
pw32)
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -862,6 +921,10 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
@@ -905,16 +968,20 @@ case $basic_machine in
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp10)
|
||||
# there are many clones, so DEC is not a safe bet
|
||||
basic_machine=pdp10-unknown
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4)
|
||||
sh3 | sh4 | sh3eb | sh4eb)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv9)
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -936,6 +1003,9 @@ case $basic_machine in
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*-unknown)
|
||||
# Make sure to match an already-canonicalized machine name.
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
@@ -992,15 +1062,18 @@ case $os in
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*)
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
case $basic_machine in
|
||||
x86-* | i[34567]86-*)
|
||||
x86-* | i*86-*)
|
||||
;;
|
||||
*)
|
||||
os=-nto$os
|
||||
@@ -1093,7 +1166,7 @@ case $os in
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
;;
|
||||
-none)
|
||||
@@ -1127,6 +1200,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
@@ -1235,7 +1311,7 @@ case $basic_machine in
|
||||
*-masscomp)
|
||||
os=-rtu
|
||||
;;
|
||||
f301-fujitsu)
|
||||
f30[01]-fujitsu | f700-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
@@ -1313,9 +1389,12 @@ case $basic_machine in
|
||||
-mpw* | -macos*)
|
||||
vendor=apple
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
vendor=atari
|
||||
;;
|
||||
-vos*)
|
||||
vendor=stratus
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
@@ -1326,7 +1405,7 @@ exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
1421
configure.in
1421
configure.in
File diff suppressed because it is too large
Load Diff
57
contrib/include/wx/applet/plugin.h
Normal file
57
contrib/include/wx/applet/plugin.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.wxwindows.org/licence3.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the wxQlet class
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_PLUGIN_H
|
||||
#define __WX_PLUGIN_H
|
||||
|
||||
// Forward declaration
|
||||
class wxHtmlAppletWindow;
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the abstract base class for wxQlet objects.
|
||||
****************************************************************************/
|
||||
class wxPlugIn : public wxObject {
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxPlugIn);
|
||||
|
||||
wxHtmlAppletWindow *m_parent;
|
||||
public:
|
||||
// Constructor (called during dynamic creation)
|
||||
wxPlugIn() { m_parent = NULL; };
|
||||
|
||||
// Psuedo virtual constructor
|
||||
virtual bool Create(wxHtmlAppletWindow *parent);
|
||||
|
||||
// Virtual destructor
|
||||
virtual ~wxPlugIn();
|
||||
};
|
||||
#endif // __WX_PLUGIN_H
|
||||
|
@@ -41,10 +41,9 @@ wxIncludePrep class Definition
|
||||
class wxIncludePrep : public wxHtmlProcessor {
|
||||
private:
|
||||
//DECLARE_DYNAMIC_CLASS(wxIncludePrep);
|
||||
wxString DOC_ROOT;
|
||||
|
||||
wxFileSystem *m_FS;
|
||||
public:
|
||||
wxIncludePrep() : wxHtmlProcessor() {DOC_ROOT = wxString("");}
|
||||
wxIncludePrep() : wxHtmlProcessor() {}
|
||||
~wxIncludePrep() {}
|
||||
|
||||
// Process input text and return processed result
|
||||
@@ -54,8 +53,7 @@ public:
|
||||
// is the processor applied to the text.
|
||||
int GetPriority() const { return wxHTML_PRIORITY_SYSTEM; }
|
||||
|
||||
void ChangeDirectory(const wxString &dir);
|
||||
wxString GetDirectory() { return DOC_ROOT; }
|
||||
void ChangeDirectory(wxFileSystem *);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -5,23 +5,19 @@
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ======================================================================
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* | |
|
||||
* |This copyrighted computer code is a proprietary trade secret of |
|
||||
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||
* |written authorization from SciTech to possess or use this code, you |
|
||||
* |may be subject to civil and/or criminal penalties. |
|
||||
* | |
|
||||
* |If you received this code in error or you would like to report |
|
||||
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||
* |530-894-8400. |
|
||||
* | |
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* ======================================================================
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.wxwindows.org/licence3.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
@@ -38,9 +34,11 @@
|
||||
|
||||
// Forward declare
|
||||
class wxApplet;
|
||||
class wxQlet;
|
||||
class wxLoadPageEvent;
|
||||
class wxPageLoadedEvent;
|
||||
class wxIncludePrep;
|
||||
class wxToolBarBase;
|
||||
|
||||
// Declare a linked list of wxApplet pointers
|
||||
WX_DECLARE_LIST(wxApplet, wxAppletList);
|
||||
@@ -64,6 +62,8 @@ public:
|
||||
wxString& group,
|
||||
wxString& href );
|
||||
|
||||
VirtualData();
|
||||
|
||||
// Gets
|
||||
wxString GetName(){ return m_name;};
|
||||
wxString GetGroup(){ return m_group;};
|
||||
@@ -86,15 +86,21 @@ private:
|
||||
DECLARE_CLASS(wxHtmlAppletWindow);
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
bool m_mutexLock;
|
||||
wxIncludePrep *incPreprocessor; // deleted by list it is added too in constructor
|
||||
bool m_mutexLock;
|
||||
wxIncludePrep *incPreprocessor; // deleted by list it is added too in constructor
|
||||
|
||||
protected:
|
||||
wxAppletList m_AppletList;
|
||||
static wxHashTable m_Cookies;
|
||||
bool m_NavBarEnabled;
|
||||
wxToolBarBase *m_NavBar;
|
||||
int m_NavBackId;
|
||||
int m_NavForwardId;
|
||||
wxString m_DocRoot;
|
||||
wxPalette m_globalPalette;
|
||||
|
||||
// Override this so we can do proper palette management!!
|
||||
virtual void OnDraw(wxDC& dc);
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
wxHtmlAppletWindow(
|
||||
@@ -107,7 +113,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_AUTO,
|
||||
const wxString& name = "htmlAppletWindow",
|
||||
const wxString& docroot = "" );
|
||||
const wxPalette& globalPalette = wxNullPalette);
|
||||
|
||||
// Destructor
|
||||
~wxHtmlAppletWindow();
|
||||
@@ -119,6 +125,9 @@ public:
|
||||
const wxHtmlTag ¶ms,
|
||||
const wxSize& size);
|
||||
|
||||
// Create an instance of an Qlet based on it's class name
|
||||
bool CreatePlugIn(const wxString& classId );
|
||||
|
||||
// Find an instance of an applet based on it's class name
|
||||
wxApplet *FindApplet(const wxString& className);
|
||||
|
||||
@@ -137,6 +146,14 @@ public:
|
||||
// Handles backwards navigation within the HTML stack
|
||||
bool HistoryBack();
|
||||
|
||||
// Disables Nav bars
|
||||
void DisableNavBar();
|
||||
|
||||
// Enables Nav bars
|
||||
void EnableNavBar();
|
||||
|
||||
void SetNavBar(wxToolBarBase *navBar);
|
||||
|
||||
// Broadcast a message to all applets on the page
|
||||
void SendMessage(wxEvent& msg);
|
||||
|
||||
@@ -186,6 +203,24 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the class for wxHtmlAppletCell
|
||||
***************************************************************************/
|
||||
class wxHtmlAppletCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlAppletCell(wxWindow *wnd, int w = 0);
|
||||
~wxHtmlAppletCell() { m_Wnd->Destroy(); }
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
virtual void Layout(int w);
|
||||
|
||||
protected:
|
||||
wxWindow* m_Wnd;
|
||||
// width float is used in adjustWidth (it is in percents)
|
||||
};
|
||||
|
||||
|
||||
#endif // __WX_APPLET_WINDOW_H
|
||||
|
||||
|
@@ -1052,6 +1052,8 @@ public:
|
||||
cbUpdatesManagerBase( wxFrameLayout* pPanel )
|
||||
: mpLayout( pPanel ) {}
|
||||
|
||||
virtual ~cbUpdatesManagerBase() {}
|
||||
|
||||
void SetLayout( wxFrameLayout* pLayout ) { mpLayout = pLayout; }
|
||||
|
||||
// notificiactions received from frame-layout (in the order, in which
|
||||
|
@@ -116,17 +116,17 @@ public:
|
||||
// overridables
|
||||
|
||||
virtual void AddTool( int toolIndex,
|
||||
wxWindow* pToolWindow,
|
||||
const wxSize& size = wxDefaultSize );
|
||||
wxWindow* pToolWindow,
|
||||
const wxSize& size = wxDefaultSize );
|
||||
|
||||
virtual void AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
int imageFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex, wxBitmap labelBmp,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
wxBitmapType imageFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex, wxBitmap labelBmp,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
|
||||
// method from wxToolBarBase (for compatibility), only
|
||||
// first two arguments are valid
|
||||
|
@@ -50,7 +50,7 @@ protected:
|
||||
|
||||
wxString mLabelText;
|
||||
wxString mImageFileName;
|
||||
int mImageFileType;
|
||||
wxBitmapType mImageFileType;
|
||||
|
||||
wxBitmap mDepressedBmp; // source image for rendering
|
||||
// labels for particular state
|
||||
@@ -114,17 +114,17 @@ public:
|
||||
// use this constructor if buttons have to be persistant
|
||||
|
||||
wxNewBitmapButton( const wxString& bitmapFileName,
|
||||
const int bitmapFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "",
|
||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
bool isFlat = TRUE,
|
||||
// this is the default type of fired events
|
||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2,
|
||||
bool isSticky = FALSE
|
||||
);
|
||||
const wxBitmapType bitmapFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "",
|
||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
bool isFlat = TRUE,
|
||||
// this is the default type of fired events
|
||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2,
|
||||
bool isSticky = FALSE
|
||||
);
|
||||
|
||||
~wxNewBitmapButton();
|
||||
|
||||
|
@@ -33,7 +33,8 @@ public:
|
||||
|
||||
// Send a message.
|
||||
// Specify profile, or leave it to wxWindows to find the current user name
|
||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString );
|
||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString,
|
||||
const wxString& sendMail = wxT("/usr/lib/sendmail -t"));
|
||||
|
||||
protected:
|
||||
};
|
||||
|
@@ -27,12 +27,14 @@ public:
|
||||
|
||||
// A common usage
|
||||
wxMailMessage(const wxString& subject, const wxString& to,
|
||||
const wxString& body, const wxString& attachment = wxEmptyString,
|
||||
const wxString& body, const wxString& from = wxEmptyString,
|
||||
const wxString& attachment = wxEmptyString,
|
||||
const wxString& attachmentTitle = wxEmptyString)
|
||||
{
|
||||
m_to.Add(to);
|
||||
m_subject = subject;
|
||||
m_body = body;
|
||||
m_from = from;
|
||||
if (!attachment.IsEmpty())
|
||||
{
|
||||
m_attachments.Add(attachment);
|
||||
@@ -52,9 +54,11 @@ public:
|
||||
|
||||
void SetSubject(const wxString& subject) { m_subject = subject; }
|
||||
void SetBody(const wxString& body) { m_body = body; }
|
||||
void SetFrom(const wxString& from) { m_from = from; }
|
||||
|
||||
public:
|
||||
wxArrayString m_to; //The To: Recipients
|
||||
wxString m_from; //The From: email address (optional)
|
||||
wxArrayString m_cc; //The CC: Recipients
|
||||
wxArrayString m_bcc; //The BCC Recipients
|
||||
wxString m_subject; //The Subject of the message
|
||||
|
@@ -72,6 +72,7 @@
|
||||
#define wxSTC_MARK_CIRCLEPLUSCONNECTED 19
|
||||
#define wxSTC_MARK_CIRCLEMINUS 20
|
||||
#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21
|
||||
#define wxSTC_MARK_CHARACTER 10000
|
||||
|
||||
// Markers used for outlining column
|
||||
#define wxSTC_MARKNUM_FOLDEREND 25
|
||||
@@ -83,12 +84,16 @@
|
||||
#define wxSTC_MARKNUM_FOLDEROPEN 31
|
||||
#define wxSTC_MARGIN_SYMBOL 0
|
||||
#define wxSTC_MARGIN_NUMBER 1
|
||||
|
||||
// Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
|
||||
// Styles 38 and 39 are for future use.
|
||||
#define wxSTC_STYLE_DEFAULT 32
|
||||
#define wxSTC_STYLE_LINENUMBER 33
|
||||
#define wxSTC_STYLE_BRACELIGHT 34
|
||||
#define wxSTC_STYLE_BRACEBAD 35
|
||||
#define wxSTC_STYLE_CONTROLCHAR 36
|
||||
#define wxSTC_STYLE_INDENTGUIDE 37
|
||||
#define wxSTC_STYLE_LASTPREDEFINED 39
|
||||
#define wxSTC_STYLE_MAX 127
|
||||
|
||||
// Character set identifiers are used in StyleSetCharacterSet.
|
||||
@@ -295,6 +300,7 @@
|
||||
#define wxSTC_LEX_EIFFEL 23
|
||||
#define wxSTC_LEX_EIFFELKW 24
|
||||
#define wxSTC_LEX_TCL 25
|
||||
#define wxSTC_LEX_NNCRONTAB 26
|
||||
|
||||
// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||
// value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||
@@ -334,6 +340,8 @@
|
||||
#define wxSTC_C_REGEX 14
|
||||
#define wxSTC_C_COMMENTLINEDOC 15
|
||||
#define wxSTC_C_WORD2 16
|
||||
#define wxSTC_C_COMMENTDOCKEYWORD 17
|
||||
#define wxSTC_C_COMMENTDOCKEYWORDERROR 18
|
||||
|
||||
// Lexical states for SCLEX_HTML, SCLEX_XML
|
||||
#define wxSTC_H_DEFAULT 0
|
||||
@@ -365,7 +373,17 @@
|
||||
#define wxSTC_H_XCCOMMENT 20
|
||||
|
||||
// SGML
|
||||
#define wxSTC_H_SGML 21
|
||||
#define wxSTC_H_SGML_DEFAULT 21
|
||||
#define wxSTC_H_SGML_COMMAND 22
|
||||
#define wxSTC_H_SGML_1ST_PARAM 23
|
||||
#define wxSTC_H_SGML_DOUBLESTRING 24
|
||||
#define wxSTC_H_SGML_SIMPLESTRING 25
|
||||
#define wxSTC_H_SGML_ERROR 26
|
||||
#define wxSTC_H_SGML_SPECIAL 27
|
||||
#define wxSTC_H_SGML_ENTITY 28
|
||||
#define wxSTC_H_SGML_COMMENT 29
|
||||
#define wxSTC_H_SGML_1ST_PARAM_COMMENT 30
|
||||
#define wxSTC_H_SGML_BLOCK_DEFAULT 31
|
||||
|
||||
// Embedded Javascript
|
||||
#define wxSTC_HJ_START 40
|
||||
@@ -604,6 +622,19 @@
|
||||
#define wxSTC_EIFFEL_IDENTIFIER 7
|
||||
#define wxSTC_EIFFEL_STRINGEOL 8
|
||||
|
||||
// Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
||||
#define wxSTC_NNCRONTAB_DEFAULT 0
|
||||
#define wxSTC_NNCRONTAB_COMMENT 1
|
||||
#define wxSTC_NNCRONTAB_TASK 2
|
||||
#define wxSTC_NNCRONTAB_SECTION 3
|
||||
#define wxSTC_NNCRONTAB_KEYWORD 4
|
||||
#define wxSTC_NNCRONTAB_MODIFIER 5
|
||||
#define wxSTC_NNCRONTAB_ASTERISK 6
|
||||
#define wxSTC_NNCRONTAB_NUMBER 7
|
||||
#define wxSTC_NNCRONTAB_STRING 8
|
||||
#define wxSTC_NNCRONTAB_ENVIRONMENT 9
|
||||
#define wxSTC_NNCRONTAB_IDENTIFIER 10
|
||||
|
||||
// END of generated section
|
||||
//----------------------------------------------------------------------
|
||||
// Others
|
||||
@@ -631,6 +662,8 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const char* name = "styledtext");
|
||||
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
|
||||
#else
|
||||
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -734,7 +767,11 @@ public:
|
||||
|
||||
// Retrieve the text of the line containing the caret.
|
||||
// Returns the index of the caret on the line.
|
||||
wxString GetCurLine(int* OUTPUT=NULL);
|
||||
#ifdef SWIG
|
||||
wxString GetCurLine(int* OUTPUT);
|
||||
#else
|
||||
wxString GetCurLine(int* linePos=NULL);
|
||||
#endif
|
||||
|
||||
// Retrieve the position of the last correctly styled character.
|
||||
int GetEndStyled();
|
||||
@@ -1217,10 +1254,12 @@ public:
|
||||
int GetTargetEnd();
|
||||
|
||||
// Replace the target text with the argument text.
|
||||
// Text is counted so it can contain nulls.
|
||||
// Returns the length of the replacement text.
|
||||
int ReplaceTarget(const wxString& text);
|
||||
|
||||
// Replace the target text with the argument text after \d processing.
|
||||
// Text is counted so it can contain nulls.
|
||||
// Looks for \d where d is between 1 and 9 and replaces these with the strings
|
||||
// matched in the last search operation which were surrounded by \( and \).
|
||||
// Returns the length of the replacement text including any change
|
||||
@@ -1228,7 +1267,7 @@ public:
|
||||
int ReplaceTargetRE(const wxString& text);
|
||||
|
||||
// Search for a counted string in the target and set the target to the found
|
||||
// range.
|
||||
// range. Text is counted so it can contain nulls.
|
||||
// Returns length of range or -1 for failure in which case target is not moved.
|
||||
int SearchInTarget(const wxString& text);
|
||||
|
||||
@@ -1417,10 +1456,10 @@ public:
|
||||
int GetModEventMask();
|
||||
|
||||
// Change internal focus flag
|
||||
void SetFocus(bool focus);
|
||||
void SetSTCFocus(bool focus);
|
||||
|
||||
// Get internal focus flag
|
||||
bool GetFocus();
|
||||
bool GetSTCFocus();
|
||||
|
||||
// Change error status - 0 = OK
|
||||
void SetStatus(int statusCode);
|
||||
@@ -1589,6 +1628,7 @@ private:
|
||||
ScintillaWX* m_swx;
|
||||
wxStopWatch m_stopWatch;
|
||||
|
||||
bool m_lastKeyDownConsumed;
|
||||
|
||||
friend class ScintillaWX;
|
||||
friend class Platform;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,6 @@ public:
|
||||
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnStyleNeeded(wxStyledTextEvent& event);
|
||||
|
||||
private:
|
||||
wxStyledTextCtrl* ed;
|
||||
@@ -70,7 +69,6 @@ enum
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU (ID_Quit, MyFrame::OnQuit)
|
||||
EVT_MENU (ID_About, MyFrame::OnAbout)
|
||||
EVT_STC_STYLENEEDED (ID_ED, MyFrame::OnStyleNeeded)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
@@ -128,7 +126,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
ed = new wxStyledTextCtrl(this, ID_ED);
|
||||
|
||||
// Default font
|
||||
wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
wxFont font(10, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
ed->StyleSetFont(wxSTC_STYLE_DEFAULT, font);
|
||||
ed->StyleClearAll();
|
||||
|
||||
@@ -148,9 +146,9 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
ed->StyleSetBold(10, TRUE);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:7");
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:9");
|
||||
#else
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:7");
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:9");
|
||||
#endif
|
||||
|
||||
// give it some text to play with
|
||||
@@ -181,14 +179,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
|
||||
// event handlers
|
||||
|
||||
void MyFrame::OnStyleNeeded(wxStyledTextEvent& event) {
|
||||
int currEndStyled = ed->GetEndStyled();
|
||||
ed->Colourise(currEndStyled, event.GetPosition());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# $Id$
|
||||
|
||||
CONTRIB_SUBDIRS=ogl mmedia stc xrc applet plot canvas animate fl
|
||||
CONTRIB_SUBDIRS=ogl mmedia stc xrc plot canvas animate fl #applet
|
||||
|
||||
all:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=plot
|
||||
HEADERS=animate.h
|
||||
|
||||
OBJECTS=animate.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=applet
|
||||
HEADERS=applet.h appletwindow.h
|
||||
|
||||
OBJECTS=applet.o appletwindow.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -5,23 +5,19 @@
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ======================================================================
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* | |
|
||||
* |This copyrighted computer code is a proprietary trade secret of |
|
||||
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||
* |written authorization from SciTech to possess or use this code, you |
|
||||
* |may be subject to civil and/or criminal penalties. |
|
||||
* | |
|
||||
* |If you received this code in error or you would like to report |
|
||||
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||
* |530-894-8400. |
|
||||
* | |
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* ======================================================================
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.wxwindows.org/licence3.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
@@ -37,10 +33,16 @@
|
||||
#include "wx/spawnbrowser.h"
|
||||
#include "wx/html/forcelnk.h"
|
||||
|
||||
// crt
|
||||
#ifdef __WXMSW__
|
||||
#include <process.h> // spawnl()
|
||||
#endif
|
||||
|
||||
// Include private headers
|
||||
#include "wx/applet/applet.h"
|
||||
#include "wx/applet/window.h"
|
||||
#include "wx/applet/loadpage.h"
|
||||
#include "wx/applet/plugin.h"
|
||||
|
||||
// Preprocessor Stuff
|
||||
#include "wx/applet/prepinclude.h"
|
||||
@@ -82,30 +84,36 @@ wxHtmlAppletWindow::wxHtmlAppletWindow(
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name,
|
||||
const wxString& docroot )
|
||||
: wxHtmlWindow(parent,id,pos,size,style,name)
|
||||
const wxPalette& globalPalette)
|
||||
: wxHtmlWindow(parent,id,pos,size,style,name), m_globalPalette(globalPalette)
|
||||
{
|
||||
// Init our locks
|
||||
UnLock();
|
||||
|
||||
// setup client navbars
|
||||
if (navBar) {
|
||||
m_NavBarEnabled = true;
|
||||
m_NavBar = navBar;
|
||||
m_NavBackId = navBackId;
|
||||
m_NavForwardId = navForwardId;
|
||||
}
|
||||
else {
|
||||
m_NavBarEnabled = false;
|
||||
m_NavBar = NULL;
|
||||
}
|
||||
|
||||
// Set up docroot
|
||||
m_DocRoot = docroot;
|
||||
m_NavBackId = navBackId;
|
||||
m_NavForwardId = navForwardId;
|
||||
|
||||
|
||||
// Set the key_type for applets
|
||||
m_AppletList = wxAppletList(wxKEY_STRING);
|
||||
|
||||
// Add HTML preprocessors
|
||||
// deleting preprocessors is done by the code within the window
|
||||
|
||||
incPreprocessor = new wxIncludePrep(); // #include preprocessor
|
||||
incPreprocessor->ChangeDirectory(m_DocRoot);
|
||||
incPreprocessor->ChangeDirectory(m_FS); // give it access to our filesys object
|
||||
|
||||
wxEchoPrep * echoPreprocessor = new wxEchoPrep(); // #echo preprocessor
|
||||
wxIfElsePrep * ifPreprocessor = new wxIfElsePrep();
|
||||
@@ -123,6 +131,27 @@ wxHtmlAppletWindow::~wxHtmlAppletWindow()
|
||||
{
|
||||
}
|
||||
|
||||
#include "scitech.h"
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
dc - wxDC object to draw on
|
||||
|
||||
REMARKS:
|
||||
This function handles drawing the HTML applet window. Because the standard
|
||||
wxWindows classes don't properly handle palette management, we add code
|
||||
in here to properly select the global palette that we use for all drawing
|
||||
into the DC before we allow the regular wxWindows code to finish the
|
||||
drawing process.
|
||||
****************************************************************************/
|
||||
void wxHtmlAppletWindow::OnDraw(
|
||||
wxDC& dc)
|
||||
{
|
||||
// TODO: Only do this for <= 8bpp modes!
|
||||
dc.SetPalette(m_globalPalette);
|
||||
wxHtmlWindow::OnDraw(dc);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
className - Name of the applet class to create an object for
|
||||
@@ -157,10 +186,51 @@ wxApplet *wxHtmlAppletWindow::CreateApplet(
|
||||
delete applet;
|
||||
return NULL;
|
||||
}
|
||||
m_AppletList.Append(iName,applet);
|
||||
else {
|
||||
// do some fixups on the size if its screwed up
|
||||
wxSize nsize = applet->GetBestSize();
|
||||
if (nsize.x < size.x) nsize.x = size.x;
|
||||
if (nsize.y < size.y) nsize.y = size.y;
|
||||
applet->SetSize(nsize);
|
||||
}
|
||||
|
||||
m_AppletList.Append(iName,(wxObject*)applet);
|
||||
return applet;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
classId - Name of the Plugin class to create an object for
|
||||
|
||||
RETURNS:
|
||||
Pointer to the wxplugIn created, or NULL if unable to create the PlugIn.
|
||||
|
||||
REMARKS:
|
||||
This function is used to create new wxPlugIn objects dynamically based on the
|
||||
class name as a string. This allows instances of wxPlugIn classes to be
|
||||
created dynamically based on string values embedded in the custom tags of an
|
||||
HTML page.
|
||||
****************************************************************************/
|
||||
bool wxHtmlAppletWindow::CreatePlugIn(
|
||||
const wxString& classId )
|
||||
{
|
||||
// Dynamically create the class instance at runtime
|
||||
wxClassInfo *info = wxClassInfo::FindClass(classId.c_str());
|
||||
if (!info)
|
||||
return false;
|
||||
wxObject *obj = info->CreateObject();
|
||||
if (!obj)
|
||||
return false;
|
||||
wxPlugIn *plugIn = wxDynamicCast(obj,wxPlugIn);
|
||||
if (!plugIn)
|
||||
return false;
|
||||
if (!plugIn->Create(this)) {
|
||||
delete plugIn;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
appletName - Name of the applet class to find
|
||||
@@ -216,25 +286,25 @@ Remove an applet from the manager. Called during applet destruction
|
||||
bool wxHtmlAppletWindow::LoadPage(
|
||||
const wxString& link)
|
||||
{
|
||||
wxString href(link);
|
||||
wxString href(link);
|
||||
|
||||
// Check for abs path. If it is not then tack on the path
|
||||
// supplied at creation.
|
||||
if (!wxIsAbsolutePath(href))
|
||||
href = m_DocRoot + href;
|
||||
|
||||
// TODO: This needs to be made platform inde if possible.
|
||||
if (link.GetChar(0) == '?'){
|
||||
wxString cmd = link.BeforeFirst('=');
|
||||
wxString cmdValue = link.AfterFirst('=');
|
||||
|
||||
// Launches the default Internet browser for the system.
|
||||
if(!(cmd.CmpNoCase("?EXTERNAL"))){
|
||||
return wxSpawnBrowser(this, cmdValue.c_str());
|
||||
}
|
||||
|
||||
// Launches an external program on the system.
|
||||
if (!(cmd.CmpNoCase("?EXECUTE"))){
|
||||
wxProcess *child = new AppletProcess(this);
|
||||
wxExecute(cmdValue, false, child);
|
||||
return true;
|
||||
int code = spawnl( P_NOWAIT, cmdValue , NULL );
|
||||
return (!code);
|
||||
}
|
||||
|
||||
// Looks for a href in a variable stored as a cookie. The href can be
|
||||
// changed on the fly.
|
||||
if (!(cmd.CmpNoCase("?VIRTUAL"))){
|
||||
VirtualData& temp = *((VirtualData*)FindCookie(cmdValue));
|
||||
if (&temp) {
|
||||
@@ -247,17 +317,31 @@ bool wxHtmlAppletWindow::LoadPage(
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// This launches a qlet - It is like an applet but is more generic in that it
|
||||
// can be of any wxWin type so it then has the freedom to do more stuff.
|
||||
if (!(cmd.CmpNoCase("?WXAPPLET"))){
|
||||
if (!cmdValue.IsNull()){
|
||||
if (!CreatePlugIn(cmdValue)){
|
||||
#ifdef CHECKED
|
||||
wxLogError(_T("Launch Applet ERROR: '%s' does not exist."), cmdValue.c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Inform all the applets that the new page is being loaded
|
||||
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
||||
(node->GetData())->OnLinkClicked(wxHtmlLinkInfo(href));
|
||||
Show(false);
|
||||
|
||||
bool stat = wxHtmlWindow::LoadPage(href);
|
||||
Show(true);
|
||||
|
||||
// Enable/Dis the navbar tools
|
||||
if (m_NavBar) {
|
||||
if (m_NavBarEnabled) {
|
||||
m_NavBar->EnableTool(m_NavForwardId,HistoryCanForward());
|
||||
m_NavBar->EnableTool(m_NavBackId,HistoryCanBack());
|
||||
}
|
||||
@@ -312,6 +396,37 @@ bool wxHtmlAppletWindow::HistoryBack()
|
||||
return wxHtmlWindow::HistoryBack();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
This function is used to disable the navigation bars. If you want to
|
||||
toggle to the navbars off you must call this function.
|
||||
****************************************************************************/
|
||||
void wxHtmlAppletWindow::DisableNavBar()
|
||||
{
|
||||
m_NavBarEnabled = false;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
This function is used to enable the nav bars. If you toggle the nav bars on
|
||||
you must call this function.
|
||||
****************************************************************************/
|
||||
void wxHtmlAppletWindow::EnableNavBar()
|
||||
{
|
||||
m_NavBarEnabled = true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
This function is used to set the nav bar to a new nav bar if you deleted the
|
||||
one that you were useing. Usally this happens when you toggle a nav bar
|
||||
on or off.
|
||||
****************************************************************************/
|
||||
void wxHtmlAppletWindow::SetNavBar(wxToolBarBase *navBar)
|
||||
{
|
||||
m_NavBar = navBar;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
msg - wxEvent message to be sent to all wxApplets
|
||||
@@ -494,6 +609,18 @@ VirtualData::VirtualData(
|
||||
m_href = href;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
REMARKS:
|
||||
VirtualData is used to store information on the virtual links.
|
||||
****************************************************************************/
|
||||
VirtualData::VirtualData()
|
||||
{
|
||||
m_name.Empty();
|
||||
m_group.Empty();
|
||||
m_href.Empty();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
REMARKS:
|
||||
@@ -528,8 +655,28 @@ TAG_HANDLER_PROC(tag)
|
||||
wnd = m_WParser->GetWindow();
|
||||
|
||||
if ((appletWindow = wxDynamicCast(wnd,wxHtmlAppletWindow)) != NULL){
|
||||
tag.ScanParam("WIDTH", "%i", &width);
|
||||
tag.ScanParam("HEIGHT", "%i", &height);
|
||||
wxSize size = wxDefaultSize;
|
||||
int al;
|
||||
if (tag.HasParam("WIDTH")) {
|
||||
tag.GetParamAsInt("WIDTH", &width);
|
||||
size.SetWidth(width);
|
||||
}
|
||||
|
||||
if (tag.HasParam("HEIGHT")) {
|
||||
tag.GetParamAsInt("HEIGHT", &height);
|
||||
size.SetHeight(height);
|
||||
}
|
||||
|
||||
al = wxHTML_ALIGN_BOTTOM;
|
||||
if (tag.HasParam(wxT("ALIGN"))) {
|
||||
wxString alstr = tag.GetParam(wxT("ALIGN"));
|
||||
alstr.MakeUpper(); // for the case alignment was in ".."
|
||||
if (alstr == wxT("TEXTTOP") || alstr == wxT("TOP"))
|
||||
al = wxHTML_ALIGN_TOP;
|
||||
else if ((alstr == wxT("CENTER")) || (alstr == wxT("ABSCENTER")))
|
||||
al = wxHTML_ALIGN_CENTER;
|
||||
}
|
||||
|
||||
if (tag.HasParam("CLASSID")){
|
||||
classId = tag.GetParam("CLASSID");
|
||||
if ( classId.IsNull() || classId.Len() == 0 ){
|
||||
@@ -545,9 +692,9 @@ TAG_HANDLER_PROC(tag)
|
||||
name = classId;
|
||||
|
||||
// We got all the params and can now create the applet
|
||||
if ((applet = appletWindow->CreateApplet(classId, name, tag , wxSize(width, height))) != NULL){
|
||||
if ((applet = appletWindow->CreateApplet(classId, name, tag , size)) != NULL){
|
||||
applet->Show(true);
|
||||
m_WParser->OpenContainer()->InsertCell(new wxHtmlWidgetCell(applet,0));
|
||||
m_WParser->OpenContainer()->InsertCell(new wxHtmlAppletCell(applet,al));
|
||||
}
|
||||
else
|
||||
wxMessageBox("wxApplet error: Could not create:" + classId + "," + name);
|
||||
@@ -570,6 +717,81 @@ TAGS_MODULE_BEGIN(wxApplet)
|
||||
TAGS_MODULE_ADD(wxApplet)
|
||||
TAGS_MODULE_END(wxApplet)
|
||||
|
||||
/*********************************************************************************
|
||||
wxHtmlAppletCell
|
||||
*********************************************************************************/
|
||||
wxHtmlAppletCell::wxHtmlAppletCell(wxWindow *wnd, int align) : wxHtmlCell()
|
||||
{
|
||||
int sx, sy;
|
||||
m_Wnd = wnd;
|
||||
m_Wnd->GetSize(&sx, &sy);
|
||||
m_Width = sx, m_Height = sy;
|
||||
|
||||
switch (align) {
|
||||
case wxHTML_ALIGN_TOP :
|
||||
m_Descent = m_Height;
|
||||
break;
|
||||
case wxHTML_ALIGN_CENTER :
|
||||
m_Descent = m_Height / 2;
|
||||
break;
|
||||
case wxHTML_ALIGN_BOTTOM :
|
||||
default :
|
||||
m_Descent = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
SetCanLiveOnPagebreak(FALSE);
|
||||
}
|
||||
|
||||
|
||||
void wxHtmlAppletCell::Draw(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||
{
|
||||
int absx = 0, absy = 0, stx, sty;
|
||||
wxHtmlCell *c = this;
|
||||
|
||||
while (c)
|
||||
{
|
||||
absx += c->GetPosX();
|
||||
absy += c->GetPosY();
|
||||
c = c->GetParent();
|
||||
}
|
||||
|
||||
((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
|
||||
m_Wnd->Move(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlAppletCell::DrawInvisible(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y))
|
||||
{
|
||||
int absx = 0, absy = 0, stx, sty;
|
||||
wxHtmlCell *c = this;
|
||||
|
||||
while (c)
|
||||
{
|
||||
absx += c->GetPosX();
|
||||
absy += c->GetPosY();
|
||||
c = c->GetParent();
|
||||
}
|
||||
|
||||
((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
|
||||
m_Wnd->Move(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlAppletCell::Layout(int w)
|
||||
{
|
||||
int sx, sy;
|
||||
m_Wnd->GetSize(&sx, &sy);
|
||||
m_Width = sx, m_Height = sy;
|
||||
|
||||
wxHtmlCell::Layout(w);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// This is our little forcelink hack.
|
||||
FORCE_LINK(loadpage)
|
||||
|
||||
|
60
contrib/src/applet/plugin.cpp
Normal file
60
contrib/src/applet/plugin.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.wxwindows.org/licence3.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Main wxPlugIn class implementation
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// For compilers that support precompilation
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
// Include private headers
|
||||
#include "wx/applet/plugin.h"
|
||||
#include "wx/applet/window.h"
|
||||
|
||||
/*------------------------- Implementation --------------------------------*/
|
||||
|
||||
// Implement the abstract class functions
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxPlugIn, wxObject);
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Psuedo virtual constructor for the wxPlugIn class.
|
||||
****************************************************************************/
|
||||
bool wxPlugIn::Create(
|
||||
wxHtmlAppletWindow *parent)
|
||||
{
|
||||
m_parent = parent;
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Destructor for the wxPlugIn class.
|
||||
****************************************************************************/
|
||||
wxPlugIn::~wxPlugIn()
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -115,9 +115,14 @@ wxString wxEchoPrep::Process(
|
||||
|
||||
// grab the value from the class, put it in tag since the data is no longer needed
|
||||
tag = wxEchoVariable::FindValue(cname, parms.c_str());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// remove ampersands and <> chars
|
||||
tag.Replace("&", "&");
|
||||
tag.Replace("<", "<");
|
||||
tag.Replace(">", ">");
|
||||
|
||||
output = (output.Mid(0,i) + tag + output.Mid(i));
|
||||
}
|
||||
|
||||
|
@@ -49,12 +49,17 @@ do not correctly pass the given return value.
|
||||
****************************************************************************/
|
||||
int ReverseFind(
|
||||
const wxString &tstr,
|
||||
const wxString &str)
|
||||
const wxString &str,
|
||||
int start = -1)
|
||||
{
|
||||
wxASSERT( str.GetStringData()->IsValid() );
|
||||
|
||||
// TODO could be made much quicker than that
|
||||
int p = tstr.Len()-str.Len()-1;
|
||||
int p2 = start-str.Len();
|
||||
|
||||
// if the user supplied a valid start point, use it
|
||||
if (start != -1 && p > p2) p = p2;
|
||||
while ( p >= 0 ) {
|
||||
if ( wxStrncmp(tstr.c_str() + p, str.c_str(), str.Len()) == 0 )
|
||||
return p;
|
||||
@@ -64,6 +69,131 @@ int ReverseFind(
|
||||
return -1;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
str - text of #if statement
|
||||
|
||||
RETURNS:
|
||||
true or false depending on how it evaluated
|
||||
|
||||
REMARKS:
|
||||
|
||||
SEE ALSO:
|
||||
wxIfElseVariable
|
||||
****************************************************************************/
|
||||
bool ParseIfStatementValue(wxString &str) {
|
||||
|
||||
// Find out if the tag has parenthesis
|
||||
// recursive to parse the text within the parenthesis,
|
||||
// replacing the text with 1 or 0, (hardcoded true or false)
|
||||
int b;
|
||||
while ((b = str.Find('(')) != -1) {
|
||||
int e;
|
||||
// Find the matching parenthesis
|
||||
int nextbeg, nextend;
|
||||
int parencount = 1, min = b+1;
|
||||
do {
|
||||
|
||||
nextbeg = str.find('(', min);
|
||||
nextend = str.find(')', min);
|
||||
if (nextbeg < nextend && nextbeg != wxString::npos) {
|
||||
parencount++;
|
||||
min = nextbeg+1;
|
||||
}
|
||||
else {
|
||||
parencount--;
|
||||
min = nextend+1;
|
||||
}
|
||||
|
||||
if (nextend == wxString::npos) {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox("wxHTML #if\\else error: Unmatched parenthesis in #if expression.","Error",wxICON_ERROR);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
// once parencount reaches 0 again we have found our matchin )
|
||||
} while (parencount > 0);
|
||||
|
||||
e = nextend;
|
||||
|
||||
// Extract the expression from the parenthesis block and recurse
|
||||
// to solve it.
|
||||
wxString tag;
|
||||
tag = str.Mid(b+1, e-b-1);
|
||||
bool val = ParseIfStatementValue(tag);
|
||||
// Add extra spaces just in case of NOT(VAL)
|
||||
if (val) str = str.Mid(0, b) + " 1" + str.Mid(e+1);
|
||||
else str = str.Mid(0, b) + " 0" + str.Mid(e+1);
|
||||
|
||||
}
|
||||
|
||||
// Remove spaces from left and right
|
||||
str.Trim(false);
|
||||
str.Trim(true);
|
||||
|
||||
// Convert text method of operators "AND" and "OR" to c style
|
||||
// this makes only one special case necessary for each later on
|
||||
str.Replace(" AND ", "&&");
|
||||
str.Replace(" OR ", "||");
|
||||
|
||||
// We use ReverseFind so that the whole left expression gets evaluated agains
|
||||
// the right single item, creating a left -> right evaluation
|
||||
// Search for || operators, recurse to solve (so we don't have to handle special cases here)
|
||||
int and, or;
|
||||
and = ReverseFind(str, "&&");
|
||||
or = ReverseFind(str, "||");
|
||||
if ( (and != -1) || (or != -1) ) {
|
||||
wxString tag1, tag2;
|
||||
// handle the rightmost first to force left->right evaluation
|
||||
if (and > or) {
|
||||
return (
|
||||
ParseIfStatementValue(tag2 = str.Mid(and+2)) &&
|
||||
ParseIfStatementValue(tag1 = str.Mid(0, and)) );
|
||||
}
|
||||
else {
|
||||
return (
|
||||
ParseIfStatementValue(tag2 = str.Mid(or+2)) ||
|
||||
ParseIfStatementValue(tag1 = str.Mid(0, or)) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// By the time we get to this place in the function we are guarenteed to have a single
|
||||
// variable operation, perhaps with a NOT or ! operator
|
||||
bool notval = false;
|
||||
|
||||
// search for a NOT or ! operator
|
||||
if (str.Mid(0, 1) == "!") {
|
||||
str.Remove(0, 1);
|
||||
str.Trim(false); // trim spaces from left
|
||||
notval = true;
|
||||
}
|
||||
else if (str.Mid(0,4).CmpNoCase("NOT ") == 0) {
|
||||
str.Remove(0, 4);
|
||||
str.Trim(false); // trim any extra spaces from left
|
||||
notval = true;
|
||||
}
|
||||
|
||||
// now all we have left is the name of the class or a hardcoded 0 or 1
|
||||
|
||||
if (str == "") {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox("wxHTML #if\\else error: Empty expression in #if\\#elif statement.","Error",wxICON_ERROR);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
// check for hardcoded 0 and 1 cases, (these are used by parenthesis catcher)
|
||||
// this just decomplicates the recursion algorithm
|
||||
if (str == "0") return notval;
|
||||
if (str == "1") return !notval;
|
||||
|
||||
// Grab the value from the variable class identified by cname
|
||||
bool value = wxIfElseVariable::FindValue(str);
|
||||
if (notval) value = !value;
|
||||
return value;
|
||||
|
||||
}
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
text - HTML to process for if/else blocks
|
||||
@@ -72,7 +202,7 @@ RETURNS:
|
||||
The string containing the processed HTML
|
||||
|
||||
REMARKS:
|
||||
This function replaces #if, #else, and #endif directives with the text
|
||||
This function replaces #if, #else, #elif, and #endif directives with the text
|
||||
contained within the blocks, dependant on the value of the given boolean
|
||||
variable. The variable is created by making a sub class of wxIfElseVariable.
|
||||
Dynamic class construction is used at run time internally to create an instance
|
||||
@@ -86,14 +216,81 @@ wxString wxIfElsePrep::Process(
|
||||
{
|
||||
int b;
|
||||
char ft[] = "<!--#if ";
|
||||
char ftend[] = "<!--#endif-->";
|
||||
char ftelse[] = "<!--#else-->";
|
||||
char ftnot[] = "<!--#if not ";
|
||||
char ftnot2[] = "<!--#if !";
|
||||
|
||||
char ftelif[] = "<!--#elif ";
|
||||
|
||||
// make a copy so we can replace text as we go without affecting the original
|
||||
// make a copy so we can replace text as we go without affecting the original
|
||||
wxString output = text;
|
||||
|
||||
// Avoid duplication of our parsing code by turning any #elif blocks into appropriate
|
||||
// else/if blocks
|
||||
while ((b = ReverseFind(output.Lower(), ftelif)) != -1) {
|
||||
int e;
|
||||
// Replace beginning of block
|
||||
e = output.find("-->", b + strlen(ftelif));
|
||||
|
||||
if (e == wxString::npos) {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox("wxHTML #elif error: Premature end of file while parsing #elif.","Error",wxICON_ERROR);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
// Convert to lower case so find is easy, grab everything after #elif tag
|
||||
wxString remains = (output.Mid(e+strlen("-->"))).Lower();
|
||||
|
||||
// find matching else or endif
|
||||
int nextif, nextendif;
|
||||
int ifcount = 1, min = 0;
|
||||
do {
|
||||
nextif = remains.find(ft, min);
|
||||
nextendif = remains.find(ftend, min);
|
||||
if (nextif < nextendif && nextif != wxString::npos) {
|
||||
ifcount++;
|
||||
min = nextif+1;
|
||||
}
|
||||
else {
|
||||
ifcount--;
|
||||
min = nextendif+1;
|
||||
}
|
||||
|
||||
if (nextendif == wxString::npos) {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox("wxHTML #elif error: Premature end of file before finding #endif.","Error",wxICON_ERROR);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
// once ifcount reaches 0 again we have found our matchin #endif
|
||||
} while (ifcount > 0);
|
||||
|
||||
// If it couldn't be found die gracefully
|
||||
if (nextendif == wxString::npos) {
|
||||
// We already displayed a message, just break all the way out
|
||||
break;
|
||||
}
|
||||
|
||||
int elifsize = e - (b + strlen(ftelif)) + strlen("-->");
|
||||
// Create the #if/else block, removing the #elif code
|
||||
output = output.Mid(0, b) +
|
||||
wxString(wxString(ftelse)+wxString(ft)) +
|
||||
output.Mid(b+strlen(ftelif), elifsize+nextendif) +
|
||||
wxString(ftend) +
|
||||
output.Mid(b+strlen(ftelif)+elifsize+nextendif);
|
||||
|
||||
}
|
||||
|
||||
// Parse out the if else blocks themselves
|
||||
while ((b = ReverseFind(output.Lower(), ft)) != -1) {
|
||||
// Loop until every #echo directive is found
|
||||
// Loop until every #if directive is found
|
||||
// We search from the end of the string so that #if statements will properly recurse
|
||||
// and we avoid the hassle of matching statements with the correct <!--#endif-->
|
||||
int end, c, n;
|
||||
bool notval = false;
|
||||
int off = 0;
|
||||
int end;
|
||||
wxString usecode, code;
|
||||
wxString cname;
|
||||
wxString tag;
|
||||
@@ -111,29 +308,14 @@ wxString wxIfElsePrep::Process(
|
||||
}
|
||||
|
||||
end += 3;
|
||||
tag = output.Mid(b, end);
|
||||
// remove the <!--#if and --> sections from the tag before passing it on to be parsed
|
||||
tag = output.Mid(b+strlen(ft), end-strlen(ft)-3);
|
||||
output.Remove(b, end);
|
||||
|
||||
c = tag.Find("-->");
|
||||
n = c;
|
||||
|
||||
// find the classname
|
||||
c = (tag.Mid(8, n-8)).Find(" ");
|
||||
if (c == -1) n -= 8;
|
||||
else n = c;
|
||||
cname = tag.Mid(8, n);
|
||||
|
||||
cname.Trim(false);
|
||||
c = cname.Find("\"");
|
||||
if (c != -1) cname = cname.Mid(c+1);
|
||||
c = cname.Find("\"");
|
||||
if (c != -1) cname = cname.Mid(0, c);
|
||||
|
||||
// Grab the value from the variable class identified by cname
|
||||
value = wxIfElseVariable::FindValue(cname);
|
||||
value = ParseIfStatementValue(tag);
|
||||
|
||||
// Find the end of the tag (<!--#endif-->) and copy it all into the variable code
|
||||
end = ((output.Mid(b)).Lower()).Find("<!--#endif-->");
|
||||
end = ((output.Mid(b)).Lower()).Find(ftend);
|
||||
if (end == -1) {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox("wxHTML #if error: Premature end of file while searching for matching #endif.","Error",wxICON_ERROR);
|
||||
@@ -142,14 +324,14 @@ wxString wxIfElsePrep::Process(
|
||||
}
|
||||
|
||||
code = output.Mid(b, end);
|
||||
output.Remove(b, end+13); // remove the entire #if block from original document
|
||||
output.Remove(b, end+strlen(ftend)); // remove the entire #if block from original document
|
||||
|
||||
// Find out if there is an else statement
|
||||
end = (code.Lower()).Find("<!--#else-->");
|
||||
end = (code.Lower()).Find(ftelse);
|
||||
if (end != -1) {
|
||||
if (!value) {
|
||||
// Use the else statement
|
||||
usecode = code.Mid(end+12);
|
||||
usecode = code.Mid(end+strlen(ftelse));
|
||||
}
|
||||
else {
|
||||
// Use statement before #else
|
||||
|
@@ -59,8 +59,6 @@ wxString wxIncludePrep::Process(
|
||||
int i;
|
||||
char ft[] = "<!--#include virtual=";
|
||||
|
||||
wxFileSystem *fs = new wxFileSystem;
|
||||
fs->ChangePathTo(DOC_ROOT, true);
|
||||
|
||||
int openedcount = 0;
|
||||
|
||||
@@ -92,8 +90,9 @@ wxString wxIncludePrep::Process(
|
||||
// remove the #include tag
|
||||
output.Remove(i, n+21+3);
|
||||
|
||||
wxFSFile * file = fs->OpenFile(fname);
|
||||
|
||||
wxFSFile * file;
|
||||
file = m_FS->OpenFile(fname);
|
||||
|
||||
if (!file) {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox(wxString("wxHTML #include error: File not Found ") + fname + wxString("."),"Error",wxICON_ERROR);
|
||||
@@ -125,7 +124,6 @@ wxString wxIncludePrep::Process(
|
||||
delete file;
|
||||
}
|
||||
|
||||
delete fs;
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -138,9 +136,8 @@ This function sets the directory to get included HTML files from. The default
|
||||
value is the current directory. Directorys may be given as a relative path.
|
||||
****************************************************************************/
|
||||
void wxIncludePrep::ChangeDirectory(
|
||||
const wxString &dir)
|
||||
wxFileSystem *fs)
|
||||
{
|
||||
|
||||
DOC_ROOT = dir;
|
||||
m_FS = fs;
|
||||
}
|
||||
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=canvas
|
||||
HEADERS=canvas.h bbox.h liner.h polygon.h
|
||||
|
||||
OBJECTS=canvas.o bbox.o liner.o polygon.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -1,29 +1,62 @@
|
||||
#
|
||||
# File: Makefile
|
||||
# Author: Hans Van Leemputten
|
||||
# Created: 2001
|
||||
# Updated:
|
||||
# Copyright: (c) wxWorkshop team, 2001
|
||||
#
|
||||
# Makefile for wxWindows FrameLayout library (Linux/wxGTK).
|
||||
# $Id$
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
libsrc_dir = contrib/src/fl
|
||||
|
||||
TARGET_LIBNAME = libfl
|
||||
OBJ_EXT = o
|
||||
|
||||
# Version Info.
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
include ./files.lst
|
||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||
HEADER_SUBDIR=fl
|
||||
|
||||
OBJECTS = $(FL_OBJECTS)
|
||||
HEADERS = \
|
||||
bardragpl.h \
|
||||
cbcustom.h \
|
||||
dynbarhnd.h \
|
||||
dyntbarhnd.h \
|
||||
garbagec.h \
|
||||
hintanimpl.h \
|
||||
panedrawpl.h \
|
||||
rowlayoutpl.h \
|
||||
updatesmgr.h \
|
||||
antiflickpl.h \
|
||||
barhintspl.h \
|
||||
controlbar.h \
|
||||
dyntbar.h \
|
||||
frmview.h \
|
||||
gcupdatesmgr.h \
|
||||
newbmpbtn.h \
|
||||
rowdragpl.h \
|
||||
toolwnd.h
|
||||
|
||||
OBJECTS = \
|
||||
antiflickpl.o \
|
||||
gcupdatesmgr.o \
|
||||
rowlayoutpl.o \
|
||||
bardragpl.o \
|
||||
dyntbar.o \
|
||||
hintanimpl.o \
|
||||
toolwnd.o \
|
||||
barhintspl.o \
|
||||
dyntbarhnd.o \
|
||||
newbmpbtn.o \
|
||||
updatesmgr.o \
|
||||
cbcustom.o \
|
||||
frmview.o \
|
||||
panedrawpl.o \
|
||||
controlbar.o \
|
||||
garbagec.o \
|
||||
rowdragpl.o
|
||||
|
||||
DEPFILES= $(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS = -I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
||||
|
@@ -125,10 +125,10 @@ void wxDynamicToolBar::AddTool( int toolIndex,
|
||||
}
|
||||
|
||||
void wxDynamicToolBar::AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
int imageFileType,
|
||||
const wxString& labelText, bool alignTextRight,
|
||||
bool isFlat )
|
||||
const wxString& imageFileName,
|
||||
wxBitmapType imageFileType,
|
||||
const wxString& labelText, bool alignTextRight,
|
||||
bool isFlat )
|
||||
{
|
||||
wxNewBitmapButton* pBtn =
|
||||
|
||||
|
@@ -228,7 +228,7 @@ wxNewBitmapButton::wxNewBitmapButton( const wxBitmap& labelBitmap,
|
||||
mIsSticky( isSticky ),
|
||||
mIsFlat( isFlat ),
|
||||
mLabelText( labelText ),
|
||||
mImageFileType( -1 ),
|
||||
mImageFileType( wxBITMAP_TYPE_INVALID ),
|
||||
mDepressedBmp( labelBitmap ),
|
||||
|
||||
mpDepressedImg( NULL ),
|
||||
@@ -257,15 +257,15 @@ wxNewBitmapButton::wxNewBitmapButton( const wxBitmap& labelBitmap,
|
||||
}
|
||||
|
||||
wxNewBitmapButton::wxNewBitmapButton( const wxString& bitmapFileName,
|
||||
const int bitmapFileType,
|
||||
const wxString& labelText,
|
||||
int alignText,
|
||||
bool isFlat,
|
||||
int firedEventType,
|
||||
int marginX,
|
||||
int marginY,
|
||||
int textToLabelGap,
|
||||
bool isSticky)
|
||||
const wxBitmapType bitmapFileType,
|
||||
const wxString& labelText,
|
||||
int alignText,
|
||||
bool isFlat,
|
||||
int firedEventType,
|
||||
int marginX,
|
||||
int marginY,
|
||||
int textToLabelGap,
|
||||
bool isSticky)
|
||||
|
||||
: mTextToLabelGap ( 2 ),
|
||||
mMarginX( 2 ),
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=gizmos
|
||||
HEADERS=multicell.h splittree.h editlbox.h dynamicsash.h
|
||||
|
||||
OBJECTS=multicell.o splittree.o editlbox.o dynamicsash.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -18,12 +18,14 @@ HEADERS=cdbase.h cdunix.h cdwin.h sndaiff.h sndbase.h sndcodec.h \
|
||||
sndpcm.h sndulaw.h sndwav.h sndwin.h vidbase.h vidwin.h \
|
||||
vidxanm.h
|
||||
|
||||
OBJECTS=cdbase.o cdwin.o g711.o g721.o g723_24.o \
|
||||
OBJECTS=cdbase.o cdunix.o cdwin.o g711.o g721.o g723_24.o \
|
||||
g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \
|
||||
sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \
|
||||
sndwav.o sndwin.o vidbase.o vidwin.o vidxanm.o sndoss.o sndesd.o
|
||||
sndcpcm.o sndesd.o sndfile.o sndg72x.o sndmsad.o sndoss.o \
|
||||
sndpcm.o sndulaw.o sndwav.o sndwin.o vidbase.o vidwin.o vidxanm.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=plot
|
||||
HEADERS=msg.h email.h web.h
|
||||
|
||||
OBJECTS=email.o web.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -84,15 +84,23 @@ LIB32=link.exe -lib
|
||||
# Name "NetVC - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smapi.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\email.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\web.cpp
|
||||
SOURCE=..\..\include\wx\net\email.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\net\msg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smapi.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -100,7 +108,11 @@ SOURCE=..\..\include\wx\net\smapi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
SOURCE=.\web.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\net\web.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
@@ -31,11 +31,19 @@
|
||||
#include "wx/net/smapi.h"
|
||||
#endif
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/wfstream.h"
|
||||
#include "stdlib.h"
|
||||
#include "unistd.h"
|
||||
#endif
|
||||
|
||||
// Send a message.
|
||||
// Specify profile, or leave it to wxWindows to find the current user name
|
||||
|
||||
#ifdef __WXMSW__
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName)
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName, const wxString& WXUNUSED(sendMail))
|
||||
{
|
||||
wxASSERT (message.m_to.GetCount() > 0) ;
|
||||
|
||||
@@ -52,6 +60,64 @@ bool wxEmail::Send(wxMailMessage& message, const wxString& profileName)
|
||||
|
||||
return session.Send(message);
|
||||
}
|
||||
#elif defined(__UNIX__)
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName, const wxString& sendMail)
|
||||
{
|
||||
wxASSERT (message.m_to.GetCount() > 0) ;
|
||||
|
||||
// The 'from' field is optionally supplied by the app; it's not needed
|
||||
// by MAPI, and on Unix, will be guessed if not supplied.
|
||||
wxString from = message.m_from;
|
||||
if (from.IsEmpty())
|
||||
{
|
||||
from = wxGetEmailAddress();
|
||||
}
|
||||
|
||||
wxASSERT (!from.IsEmpty());
|
||||
|
||||
wxString msg;
|
||||
msg << wxT("To: ");
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < message.m_to.GetCount(); i++)
|
||||
{
|
||||
msg << message.m_to[i];
|
||||
if (i < message.m_to.GetCount())
|
||||
msg << wxT(", ");
|
||||
}
|
||||
|
||||
msg << wxT("\nFrom: ") << from << wxT("\nSubject: ") << message.m_subject;
|
||||
msg << wxT("\n\n") << message.m_body;
|
||||
|
||||
wxString filename;
|
||||
filename.Printf(wxT("/tmp/msg-%ld-%ld-%ld.txt"), (long) getpid(), wxGetLocalTime(),
|
||||
(long) rand());
|
||||
|
||||
{
|
||||
wxFileOutputStream stream(filename);
|
||||
if (stream.Ok())
|
||||
{
|
||||
stream.Write(msg, msg.Length());
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE ;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO search for a suitable sendmail if sendMail is empty
|
||||
wxString sendmail(sendMail);
|
||||
|
||||
wxString cmd;
|
||||
cmd << sendmail << wxT(" < ") << filename;
|
||||
|
||||
// TODO: check return code
|
||||
wxSystem(cmd.c_str());
|
||||
|
||||
wxRemoveFile(filename);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
#error Send not yet implemented for this platform.
|
||||
#endif
|
||||
|
@@ -286,6 +286,17 @@ bool wxMapiSession::Send(wxMailMessage& message)
|
||||
|
||||
//Allocate the recipients array
|
||||
mapiMessage.lpRecips = new MapiRecipDesc[mapiMessage.nRecipCount];
|
||||
|
||||
// If we have a 'From' field, use it
|
||||
if (!message.m_from.IsEmpty())
|
||||
{
|
||||
mapiMessage.lpOriginator = new MapiRecipDesc;
|
||||
ZeroMemory(mapiMessage.lpOriginator, sizeof(MapiRecipDesc));
|
||||
|
||||
mapiMessage.lpOriginator->ulRecipClass = MAPI_ORIG;
|
||||
// TODO Do we have to call Resolve?
|
||||
mapiMessage.lpOriginator->lpszName = (LPSTR) message.m_from.c_str();
|
||||
}
|
||||
|
||||
//Setup the "To" recipients
|
||||
int nRecipIndex = 0;
|
||||
@@ -413,8 +424,9 @@ bool wxMapiSession::Send(wxMailMessage& message)
|
||||
if (nAttachmentSize)
|
||||
delete [] mapiMessage.lpFiles;
|
||||
|
||||
//Free up the Recipients memory
|
||||
//Free up the Recipients and Originator memory
|
||||
delete [] mapiMessage.lpRecips;
|
||||
delete mapiMessage.lpOriginator;
|
||||
|
||||
return bSuccess;
|
||||
}
|
||||
|
@@ -19,8 +19,10 @@ HEADERS=basic.h basicp.h bmpshape.h canvas.h composit.h constrnt.h \
|
||||
|
||||
OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \
|
||||
basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -338,6 +338,11 @@ wxShape::~wxShape()
|
||||
if (m_canvas)
|
||||
m_canvas->RemoveShape(this);
|
||||
|
||||
if (m_clientData) {
|
||||
delete m_clientData;
|
||||
m_clientData = NULL;
|
||||
}
|
||||
|
||||
GetEventHandler()->OnDelete();
|
||||
}
|
||||
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=plot
|
||||
HEADERS=plot.h
|
||||
|
||||
OBJECTS=plot.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -23,34 +23,46 @@ HEADER_SUBDIR=stc
|
||||
HEADERS=stc.h
|
||||
|
||||
OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
||||
DocumentAccessor.o \
|
||||
LexCPP.o \
|
||||
LexHTML.o \
|
||||
LexLua.o \
|
||||
LexOthers.o \
|
||||
LexPerl.o \
|
||||
LexPython.o \
|
||||
LexSQL.o \
|
||||
LexVB.o \
|
||||
UniConversion.o \
|
||||
WindowAccessor.o \
|
||||
AutoComplete.o \
|
||||
CallTip.o \
|
||||
CellBuffer.o \
|
||||
ContractionState.o \
|
||||
Document.o \
|
||||
DocumentAccessor.o \
|
||||
Editor.o \
|
||||
Indicator.o \
|
||||
KeyMap.o \
|
||||
KeyWords.o \
|
||||
LexAVE.o \
|
||||
LexAda.o \
|
||||
LexCPP.o \
|
||||
LexConf.o \
|
||||
LexCrontab.o \
|
||||
LexEiffel.o \
|
||||
LexHTML.o \
|
||||
LexLisp.o \
|
||||
LexLua.o \
|
||||
LexOthers.o \
|
||||
LexPascal.o \
|
||||
LexPerl.o \
|
||||
LexPython.o \
|
||||
LexRuby.o \
|
||||
LexSQL.o \
|
||||
LexVB.o \
|
||||
LineMarker.o \
|
||||
PropSet.o \
|
||||
RESearch.o \
|
||||
ScintillaBase.o \
|
||||
Style.o \
|
||||
StyleContext.o \
|
||||
UniConversion.o \
|
||||
ViewStyle.o \
|
||||
PosRegExp.o \
|
||||
WindowAccessor.o \
|
||||
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -174,6 +174,8 @@ void Surface::InitPixMap(int width, int height, Surface *surface_) {
|
||||
Release();
|
||||
hdc = new wxMemoryDC(surface_->hdc);
|
||||
hdcOwned = true;
|
||||
if (width < 1) width = 1;
|
||||
if (height < 1) height = 1;
|
||||
bitmap = new wxBitmap(width, height);
|
||||
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
||||
}
|
||||
@@ -198,7 +200,7 @@ int Surface::LogPixelsY() {
|
||||
|
||||
|
||||
int Surface::DeviceHeightFont(int points) {
|
||||
return points * LogPixelsY() / 72;
|
||||
return points;
|
||||
}
|
||||
|
||||
|
||||
@@ -454,7 +456,7 @@ class wxSTCListBox : public wxListBox {
|
||||
public:
|
||||
wxSTCListBox(wxWindow* parent, wxWindowID id)
|
||||
: wxListBox(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER)
|
||||
0, NULL, wxLB_SINGLE | wxSIMPLE_BORDER) // | wxLB_SORT )
|
||||
{}
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
@@ -462,10 +464,6 @@ public:
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
void DoSetFirstItem(int n);
|
||||
#endif
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@@ -475,52 +473,6 @@ BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox)
|
||||
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() {
|
||||
}
|
||||
|
||||
@@ -529,8 +481,10 @@ ListBox::~ListBox() {
|
||||
|
||||
void ListBox::Create(Window &parent, int ctrlID) {
|
||||
id = new wxSTCListBox(parent.id, ctrlID);
|
||||
// id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize,
|
||||
// 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER);
|
||||
}
|
||||
|
||||
void ListBox::SetVisibleRows(int rows) {
|
||||
desiredVisibleRows = rows;
|
||||
}
|
||||
|
||||
PRectangle ListBox::GetDesiredRect() {
|
||||
@@ -538,13 +492,12 @@ PRectangle ListBox::GetDesiredRect() {
|
||||
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;
|
||||
if (sz.x > 400)
|
||||
sz.x = 400;
|
||||
// if (sz.y > 150) // TODO: Use desiredVisibleRows??
|
||||
// sz.y = 150; // For now just use the default from GetBestSize
|
||||
rc.right = sz.x;
|
||||
rc.bottom = sz.y;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -584,13 +537,7 @@ int ListBox::GetSelection() {
|
||||
}
|
||||
|
||||
int ListBox::Find(const char *prefix) {
|
||||
if (prefix) {
|
||||
for (int x=0; x < ((wxListBox*)id)->GetCount(); x++) {
|
||||
wxString text = ((wxListBox*)id)->GetString(x);
|
||||
if (text.StartsWith(prefix))
|
||||
return x;
|
||||
}
|
||||
}
|
||||
// No longer used
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@@ -122,9 +122,10 @@ void ScintillaWX::Finalise() {
|
||||
|
||||
void ScintillaWX::StartDrag() {
|
||||
wxDropSource source(wMain.GetID());
|
||||
wxTextDataObject data(dragChars);
|
||||
wxTextDataObject data(wxString(drag.s, drag.len));
|
||||
wxDragResult result;
|
||||
|
||||
dropWentOutside = true;
|
||||
source.SetData(data);
|
||||
result = source.DoDragDrop(TRUE);
|
||||
if (result == wxDragMove && dropWentOutside)
|
||||
@@ -217,9 +218,10 @@ void ScintillaWX::NotifyParent(SCNotification scn) {
|
||||
|
||||
void ScintillaWX::Copy() {
|
||||
if (currentPos != anchor) {
|
||||
char* text = CopySelectionRange();
|
||||
SelectionText st;
|
||||
CopySelectionRange(&st);
|
||||
wxTheClipboard->Open();
|
||||
wxTheClipboard->SetData(new wxTextDataObject(text));
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString(st.s, st.len)));
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
}
|
||||
@@ -421,37 +423,52 @@ void ScintillaWX::DoButtonMove(Point pt) {
|
||||
|
||||
|
||||
void ScintillaWX::DoAddChar(char ch) {
|
||||
//bool acActiveBeforeCharAdded = ac.Active();
|
||||
AddChar(ch);
|
||||
//if (acActiveBeforeCharAdded)
|
||||
// AutoCompleteChanged(ch);
|
||||
}
|
||||
|
||||
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) {
|
||||
#ifdef __WXGTK__
|
||||
// Ctrl chars (A-Z) end up with the wrong keycode on wxGTK...
|
||||
if (ctrl && key >= 1 && key <= 26)
|
||||
key += 'A' - 1;
|
||||
#endif
|
||||
|
||||
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;
|
||||
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:
|
||||
case WXK_NUMPAD_ADD:
|
||||
key = SCK_ADD; break;
|
||||
case WXK_SUBTRACT:
|
||||
case WXK_NUMPAD_SUBTRACT:
|
||||
key = SCK_SUBTRACT; break;
|
||||
case WXK_DIVIDE:
|
||||
case WXK_NUMPAD_DIVIDE:
|
||||
key = SCK_DIVIDE; break;
|
||||
case WXK_CONTROL: key = 0; break;
|
||||
case WXK_ALT: key = 0; break;
|
||||
case WXK_SHIFT: key = 0; break;
|
||||
case WXK_MENU: key = 0; break;
|
||||
}
|
||||
|
||||
return KeyDown(key, shift, ctrl, alt, consumed);
|
||||
int rv = KeyDown(key, shift, ctrl, alt, consumed);
|
||||
|
||||
if (key)
|
||||
return rv;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -479,14 +496,15 @@ bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
|
||||
|
||||
|
||||
wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return def;
|
||||
dragResult = def;
|
||||
return dragResult;
|
||||
}
|
||||
|
||||
|
||||
wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
SetDragPosition(PositionFromLocation(Point(x, y)));
|
||||
dragResult = def;
|
||||
return def;
|
||||
return dragResult;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -108,15 +108,19 @@ methodOverrideMap = {
|
||||
0),
|
||||
|
||||
'GetCurLine' : (0,
|
||||
'wxString %s(int* OUTPUT=NULL);',
|
||||
'#ifdef SWIG\n wxString %s(int* OUTPUT);\n#else\n wxString GetCurLine(int* linePos=NULL);\n#endif',
|
||||
|
||||
'''wxString %s(int* linePos) {
|
||||
wxString text;
|
||||
int len = LineLength(GetCurrentLine());
|
||||
if (!len) return "";
|
||||
char* buf = text.GetWriteBuf(len);
|
||||
if (!len) {
|
||||
if (linePos) *linePos = 0;
|
||||
return "";
|
||||
}
|
||||
// Need an extra byte because SCI_GETCURLINE writes a null to the string
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(%s, len, (long)buf);
|
||||
int pos = SendMsg(%s, len+1, (long)buf);
|
||||
text.UngetWriteBuf(len);
|
||||
if (linePos) *linePos = pos;
|
||||
|
||||
@@ -346,11 +350,11 @@ methodOverrideMap = {
|
||||
|
||||
'''wxString %s() {
|
||||
wxString text;
|
||||
int len = GetTextLength()+1;
|
||||
char* buff = text.GetWriteBuf(len);
|
||||
int len = GetTextLength();
|
||||
char* buff = text.GetWriteBuf(len+1); // leave room for the null...
|
||||
|
||||
SendMsg(%s, len, (long)buff);
|
||||
text.UngetWriteBuf(len-1);
|
||||
SendMsg(%s, len+1, (long)buff);
|
||||
text.UngetWriteBuf(len);
|
||||
return text;''',
|
||||
|
||||
('Retrieve all the text in the document.', )),
|
||||
@@ -474,6 +478,9 @@ methodOverrideMap = {
|
||||
0),
|
||||
|
||||
'GrabFocus' : (None, 0, 0, 0),
|
||||
'SetFocus' : ('SetSTCFocus', 0, 0, 0),
|
||||
'GetFocus' : ('GetSTCFocus', 0, 0, 0),
|
||||
|
||||
|
||||
'' : ('', 0, 0, 0),
|
||||
|
||||
|
@@ -14,49 +14,57 @@
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
SCINTILLA=.\scintilla
|
||||
|
||||
S=$(SCINTILLA)\src
|
||||
|
||||
STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S)
|
||||
|
||||
LIBTARGET=$(WXDIR)\lib\stc.lib
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\stc.lib
|
||||
|
||||
OBJECTS = \
|
||||
AutoComplete.obj \
|
||||
CallTip.obj \
|
||||
CellBuffer.obj \
|
||||
ContractionState.obj \
|
||||
Document.obj \
|
||||
AutoComplete.obj \
|
||||
CallTip.obj \
|
||||
CellBuffer.obj \
|
||||
ContractionState.obj \
|
||||
Document.obj \
|
||||
DocumentAccessor.obj \
|
||||
Editor.obj \
|
||||
Indicator.obj \
|
||||
KeyMap.obj \
|
||||
KeyWords.obj \
|
||||
Editor.obj \
|
||||
Indicator.obj \
|
||||
KeyMap.obj \
|
||||
KeyWords.obj \
|
||||
LexAVE.obj \
|
||||
LexAda.obj \
|
||||
LexCPP.obj \
|
||||
LexConf.obj \
|
||||
LexCrontab.obj \
|
||||
LexEiffel.obj \
|
||||
LexHTML.obj \
|
||||
LexLisp.obj \
|
||||
LexLua.obj \
|
||||
LexOthers.obj \
|
||||
LexPascal.obj \
|
||||
LexPerl.obj \
|
||||
LexPython.obj \
|
||||
LexRuby.obj \
|
||||
LexSQL.obj \
|
||||
LexVB.obj \
|
||||
LineMarker.obj \
|
||||
PropSet.obj \
|
||||
PosRegExp.obj \
|
||||
ScintillaBase.obj \
|
||||
Style.obj \
|
||||
LineMarker.obj \
|
||||
PropSet.obj \
|
||||
RESearch.obj \
|
||||
ScintillaBase.obj \
|
||||
Style.obj \
|
||||
StyleContext.obj \
|
||||
UniConversion.obj \
|
||||
ViewStyle.obj \
|
||||
ViewStyle.obj \
|
||||
WindowAccessor.obj \
|
||||
\
|
||||
PlatWX.obj \
|
||||
ScintillaWX.obj \
|
||||
stc.obj \
|
||||
\
|
||||
PlatWX.obj \
|
||||
ScintillaWX.obj \
|
||||
stc.obj \
|
||||
|
||||
|
||||
!include $(WXDIR)\src\makelib.b32
|
||||
|
||||
all: stc.cfg $(LIBTARGET)
|
||||
|
||||
CFG = stc.cfg
|
||||
CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
|
||||
|
||||
|
@@ -10,32 +10,42 @@ S=$(SCINTILLA)/src
|
||||
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)/contrib/include
|
||||
|
||||
OBJECTS = \
|
||||
$(S)/AutoComplete.$(OBJSUFF) \
|
||||
$(S)/CallTip.$(OBJSUFF) \
|
||||
$(S)/CellBuffer.$(OBJSUFF) \
|
||||
$(S)/ContractionState.$(OBJSUFF)\
|
||||
$(S)/Document.$(OBJSUFF) \
|
||||
$(S)/Editor.$(OBJSUFF) \
|
||||
$(S)/Indicator.$(OBJSUFF) \
|
||||
$(S)/KeyMap.$(OBJSUFF) \
|
||||
$(S)/KeyWords.$(OBJSUFF) \
|
||||
$(S)/LineMarker.$(OBJSUFF) \
|
||||
$(S)/PropSet.$(OBJSUFF) \
|
||||
$(S)/ScintillaBase.$(OBJSUFF) \
|
||||
$(S)/Style.$(OBJSUFF) \
|
||||
$(S)/ViewStyle.$(OBJSUFF) \
|
||||
$(S)/LexCPP.$(OBJSUFF) \
|
||||
$(S)/LexHTML.$(OBJSUFF) \
|
||||
$(S)/LexLua.$(OBJSUFF) \
|
||||
$(S)/LexOthers.$(OBJSUFF) \
|
||||
$(S)/LexPerl.$(OBJSUFF) \
|
||||
$(S)/LexPython.$(OBJSUFF) \
|
||||
$(S)/LexSQL.$(OBJSUFF) \
|
||||
$(S)/LexVB.$(OBJSUFF) \
|
||||
$(S)/DocumentAccessor.$(OBJSUFF)\
|
||||
$(S)/AutoComplete.$(OBJSUFF) \
|
||||
$(S)/CallTip.$(OBJSUFF) \
|
||||
$(S)/CellBuffer.$(OBJSUFF) \
|
||||
$(S)/ContractionState.$(OBJSUFF) \
|
||||
$(S)/Document.$(OBJSUFF) \
|
||||
$(S)/DocumentAccessor.$(OBJSUFF) \
|
||||
$(S)/Editor.$(OBJSUFF) \
|
||||
$(S)/Indicator.$(OBJSUFF) \
|
||||
$(S)/KeyMap.$(OBJSUFF) \
|
||||
$(S)/KeyWords.$(OBJSUFF) \
|
||||
$(S)/LexAVE.$(OBJSUFF) \
|
||||
$(S)/LexAda.$(OBJSUFF) \
|
||||
$(S)/LexCPP.$(OBJSUFF) \
|
||||
$(S)/LexConf.$(OBJSUFF) \
|
||||
$(S)/LexCrontab.$(OBJSUFF) \
|
||||
$(S)/LexEiffel.$(OBJSUFF) \
|
||||
$(S)/LexHTML.$(OBJSUFF) \
|
||||
$(S)/LexLisp.$(OBJSUFF) \
|
||||
$(S)/LexLua.$(OBJSUFF) \
|
||||
$(S)/LexOthers.$(OBJSUFF) \
|
||||
$(S)/LexPascal.$(OBJSUFF) \
|
||||
$(S)/LexPerl.$(OBJSUFF) \
|
||||
$(S)/LexPython.$(OBJSUFF) \
|
||||
$(S)/LexRuby.$(OBJSUFF) \
|
||||
$(S)/LexSQL.$(OBJSUFF) \
|
||||
$(S)/LexVB.$(OBJSUFF) \
|
||||
$(S)/LineMarker.$(OBJSUFF) \
|
||||
$(S)/PropSet.$(OBJSUFF) \
|
||||
$(S)/RESearch.$(OBJSUFF) \
|
||||
$(S)/ScintillaBase.$(OBJSUFF) \
|
||||
$(S)/Style.$(OBJSUFF) \
|
||||
$(S)/StyleContext.$(OBJSUFF) \
|
||||
$(S)/UniConversion.$(OBJSUFF) \
|
||||
$(S)/ViewStyle.$(OBJSUFF) \
|
||||
$(S)/WindowAccessor.$(OBJSUFF) \
|
||||
$(S)/PosRegExp.$(OBJSUFF) \
|
||||
\
|
||||
PlatWX.$(OBJSUFF) \
|
||||
ScintillaWX.$(OBJSUFF) \
|
||||
stc.$(OBJSUFF)
|
||||
|
@@ -15,32 +15,41 @@ NOPCH=1
|
||||
!include $(WXDIR)\src\makevc.env
|
||||
|
||||
OBJECTS = \
|
||||
$(D)\AutoComplete.obj \
|
||||
$(D)\CallTip.obj \
|
||||
$(D)\CellBuffer.obj \
|
||||
$(D)\ContractionState.obj\
|
||||
$(D)\Document.obj \
|
||||
$(D)\DocumentAccessor.obj\
|
||||
$(D)\Editor.obj \
|
||||
$(D)\Indicator.obj \
|
||||
$(D)\KeyMap.obj \
|
||||
$(D)\KeyWords.obj \
|
||||
$(D)\LexCPP.obj \
|
||||
$(D)\LexHTML.obj \
|
||||
$(D)\LexLua.obj \
|
||||
$(D)\LexOthers.obj \
|
||||
$(D)\LexPerl.obj \
|
||||
$(D)\LexPython.obj \
|
||||
$(D)\LexSQL.obj \
|
||||
$(D)\LexVB.obj \
|
||||
$(D)\LineMarker.obj \
|
||||
$(D)\PosRegExp.obj \
|
||||
$(D)\PropSet.obj \
|
||||
$(D)\ScintillaBase.obj \
|
||||
$(D)\Style.obj \
|
||||
$(D)\UniConversion.obj \
|
||||
$(D)\ViewStyle.obj \
|
||||
$(D)\WindowAccessor.obj \
|
||||
$(D)\AutoComplete.obj \
|
||||
$(D)\CallTip.obj \
|
||||
$(D)\CellBuffer.obj \
|
||||
$(D)\ContractionState.obj \
|
||||
$(D)\Document.obj \
|
||||
$(D)\DocumentAccessor.obj \
|
||||
$(D)\Editor.obj \
|
||||
$(D)\Indicator.obj \
|
||||
$(D)\KeyMap.obj \
|
||||
$(D)\KeyWords.obj \
|
||||
$(D)\LexAVE.obj \
|
||||
$(D)\LexAda.obj \
|
||||
$(D)\LexCPP.obj \
|
||||
$(D)\LexConf.obj \
|
||||
$(D)\LexCrontab.obj \
|
||||
$(D)\LexEiffel.obj \
|
||||
$(D)\LexHTML.obj \
|
||||
$(D)\LexLisp.obj \
|
||||
$(D)\LexLua.obj \
|
||||
$(D)\LexOthers.obj \
|
||||
$(D)\LexPascal.obj \
|
||||
$(D)\LexPerl.obj \
|
||||
$(D)\LexPython.obj \
|
||||
$(D)\LexRuby.obj \
|
||||
$(D)\LexSQL.obj \
|
||||
$(D)\LexVB.obj \
|
||||
$(D)\LineMarker.obj \
|
||||
$(D)\PropSet.obj \
|
||||
$(D)\RESearch.obj \
|
||||
$(D)\ScintillaBase.obj \
|
||||
$(D)\Style.obj \
|
||||
$(D)\StyleContext.obj \
|
||||
$(D)\UniConversion.obj \
|
||||
$(D)\ViewStyle.obj \
|
||||
$(D)\WindowAccessor.obj \
|
||||
\
|
||||
$(D)\PlatWX.obj \
|
||||
$(D)\ScintillaWX.obj \
|
||||
|
@@ -3,5 +3,5 @@ scintilla/include directories from the Scintilla/SCiTE source
|
||||
distribution. All other code needed to implement Scintilla on top of
|
||||
wxWindows is located in the directory above this one.
|
||||
|
||||
The current version of the Scintilla code is 1.39
|
||||
The current version of the Scintilla code is 1.40
|
||||
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#define SCLEX_EIFFEL 23
|
||||
#define SCLEX_EIFFELKW 24
|
||||
#define SCLEX_TCL 25
|
||||
#define SCLEX_NNCRONTAB 26
|
||||
#define SCLEX_AUTOMATIC 1000
|
||||
#define SCE_P_DEFAULT 0
|
||||
#define SCE_P_COMMENTLINE 1
|
||||
@@ -72,6 +73,8 @@
|
||||
#define SCE_C_REGEX 14
|
||||
#define SCE_C_COMMENTLINEDOC 15
|
||||
#define SCE_C_WORD2 16
|
||||
#define SCE_C_COMMENTDOCKEYWORD 17
|
||||
#define SCE_C_COMMENTDOCKEYWORDERROR 18
|
||||
#define SCE_H_DEFAULT 0
|
||||
#define SCE_H_TAG 1
|
||||
#define SCE_H_TAGUNKNOWN 2
|
||||
@@ -93,7 +96,17 @@
|
||||
#define SCE_H_QUESTION 18
|
||||
#define SCE_H_VALUE 19
|
||||
#define SCE_H_XCCOMMENT 20
|
||||
#define SCE_H_SGML 21
|
||||
#define SCE_H_SGML_DEFAULT 21
|
||||
#define SCE_H_SGML_COMMAND 22
|
||||
#define SCE_H_SGML_1ST_PARAM 23
|
||||
#define SCE_H_SGML_DOUBLESTRING 24
|
||||
#define SCE_H_SGML_SIMPLESTRING 25
|
||||
#define SCE_H_SGML_ERROR 26
|
||||
#define SCE_H_SGML_SPECIAL 27
|
||||
#define SCE_H_SGML_ENTITY 28
|
||||
#define SCE_H_SGML_COMMENT 29
|
||||
#define SCE_H_SGML_1ST_PARAM_COMMENT 30
|
||||
#define SCE_H_SGML_BLOCK_DEFAULT 31
|
||||
#define SCE_HJ_START 40
|
||||
#define SCE_HJ_DEFAULT 41
|
||||
#define SCE_HJ_COMMENT 42
|
||||
@@ -295,6 +308,17 @@
|
||||
#define SCE_EIFFEL_OPERATOR 6
|
||||
#define SCE_EIFFEL_IDENTIFIER 7
|
||||
#define SCE_EIFFEL_STRINGEOL 8
|
||||
#define SCE_NNCRONTAB_DEFAULT 0
|
||||
#define SCE_NNCRONTAB_COMMENT 1
|
||||
#define SCE_NNCRONTAB_TASK 2
|
||||
#define SCE_NNCRONTAB_SECTION 3
|
||||
#define SCE_NNCRONTAB_KEYWORD 4
|
||||
#define SCE_NNCRONTAB_MODIFIER 5
|
||||
#define SCE_NNCRONTAB_ASTERISK 6
|
||||
#define SCE_NNCRONTAB_NUMBER 7
|
||||
#define SCE_NNCRONTAB_STRING 8
|
||||
#define SCE_NNCRONTAB_ENVIRONMENT 9
|
||||
#define SCE_NNCRONTAB_IDENTIFIER 10
|
||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||
|
||||
#endif
|
||||
|
@@ -11,9 +11,6 @@
|
||||
#ifndef SCINTILLA_H
|
||||
#define SCINTILLA_H
|
||||
|
||||
// Compile-time configuration options
|
||||
#define MACRO_SUPPORT 1 // Comment out to remove macro hooks
|
||||
|
||||
#if PLAT_WIN
|
||||
#ifdef STATIC_BUILD
|
||||
void Scintilla_RegisterClasses(HINSTANCE hInstance);
|
||||
@@ -102,6 +99,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SC_MARK_CIRCLEPLUSCONNECTED 19
|
||||
#define SC_MARK_CIRCLEMINUS 20
|
||||
#define SC_MARK_CIRCLEMINUSCONNECTED 21
|
||||
#define SC_MARK_CHARACTER 10000
|
||||
#define SC_MARKNUM_FOLDEREND 25
|
||||
#define SC_MARKNUM_FOLDEROPENMID 26
|
||||
#define SC_MARKNUM_FOLDERMIDTAIL 27
|
||||
@@ -134,6 +132,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define STYLE_BRACEBAD 35
|
||||
#define STYLE_CONTROLCHAR 36
|
||||
#define STYLE_INDENTGUIDE 37
|
||||
#define STYLE_LASTPREDEFINED 39
|
||||
#define STYLE_MAX 127
|
||||
#define SC_CHARSET_ANSI 0
|
||||
#define SC_CHARSET_DEFAULT 1
|
||||
@@ -507,12 +506,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCN_DWELLEND 2017
|
||||
//--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.
|
||||
@@ -566,11 +559,9 @@ struct SCNotification {
|
||||
const char *text; // SCN_MODIFIED
|
||||
int length; // SCN_MODIFIED
|
||||
int linesAdded; // SCN_MODIFIED
|
||||
#ifdef MACRO_SUPPORT
|
||||
int message; // SCN_MACRORECORD
|
||||
uptr_t wParam; // SCN_MACRORECORD
|
||||
sptr_t lParam; // SCN_MACRORECORD
|
||||
#endif
|
||||
sptr_t lParam; // SCN_MACRORECORD
|
||||
int line; // SCN_MODIFIED
|
||||
int foldLevelNow; // SCN_MODIFIED
|
||||
int foldLevelPrev; // SCN_MODIFIED
|
||||
|
@@ -229,6 +229,8 @@ val SC_MARK_CIRCLEPLUSCONNECTED=19
|
||||
val SC_MARK_CIRCLEMINUS=20
|
||||
val SC_MARK_CIRCLEMINUSCONNECTED=21
|
||||
|
||||
val SC_MARK_CHARACTER=10000
|
||||
|
||||
# Markers used for outlining column
|
||||
val SC_MARKNUM_FOLDEREND=25
|
||||
val SC_MARKNUM_FOLDEROPENMID=26
|
||||
@@ -292,12 +294,15 @@ set void SetMarginSensitiveN=2246(int margin, bool sensitive)
|
||||
# Retrieve the mouse click sensitivity of a margin.
|
||||
get bool GetMarginSensitiveN=2247(int margin,)
|
||||
|
||||
# Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
|
||||
# Styles 38 and 39 are for future use.
|
||||
val STYLE_DEFAULT=32
|
||||
val STYLE_LINENUMBER=33
|
||||
val STYLE_BRACELIGHT=34
|
||||
val STYLE_BRACEBAD=35
|
||||
val STYLE_CONTROLCHAR=36
|
||||
val STYLE_INDENTGUIDE=37
|
||||
val STYLE_LASTPREDEFINED=39
|
||||
val STYLE_MAX=127
|
||||
|
||||
# Character set identifiers are used in StyleSetCharacterSet.
|
||||
@@ -759,10 +764,12 @@ set void SetTargetEnd=2192(position pos,)
|
||||
get position GetTargetEnd=2193(,)
|
||||
|
||||
# Replace the target text with the argument text.
|
||||
# Text is counted so it can contain nulls.
|
||||
# Returns the length of the replacement text.
|
||||
fun int ReplaceTarget=2194(int length, string text)
|
||||
|
||||
# Replace the target text with the argument text after \d processing.
|
||||
# Text is counted so it can contain nulls.
|
||||
# Looks for \d where d is between 1 and 9 and replaces these with the strings
|
||||
# matched in the last search operation which were surrounded by \( and \).
|
||||
# Returns the length of the replacement text including any change
|
||||
@@ -770,7 +777,7 @@ fun int ReplaceTarget=2194(int length, string text)
|
||||
fun int ReplaceTargetRE=2195(int length, string text)
|
||||
|
||||
# Search for a counted string in the target and set the target to the found
|
||||
# range.
|
||||
# range. Text is counted so it can contain nulls.
|
||||
# Returns length of range or -1 for failure in which case target is not moved.
|
||||
fun int SearchInTarget=2197(int length, string text)
|
||||
|
||||
@@ -1265,6 +1272,7 @@ val SCLEX_RUBY=22
|
||||
val SCLEX_EIFFEL=23
|
||||
val SCLEX_EIFFELKW=24
|
||||
val SCLEX_TCL=25
|
||||
val SCLEX_NNCRONTAB=26
|
||||
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||
val SCLEX_AUTOMATIC=1000
|
||||
@@ -1301,6 +1309,8 @@ val SCE_C_VERBATIM=13
|
||||
val SCE_C_REGEX=14
|
||||
val SCE_C_COMMENTLINEDOC=15
|
||||
val SCE_C_WORD2=16
|
||||
val SCE_C_COMMENTDOCKEYWORD=17
|
||||
val SCE_C_COMMENTDOCKEYWORDERROR=18
|
||||
# Lexical states for SCLEX_HTML, SCLEX_XML
|
||||
val SCE_H_DEFAULT=0
|
||||
val SCE_H_TAG=1
|
||||
@@ -1327,7 +1337,17 @@ val SCE_H_VALUE=19
|
||||
# X-Code
|
||||
val SCE_H_XCCOMMENT=20
|
||||
# SGML
|
||||
val SCE_H_SGML=21
|
||||
val SCE_H_SGML_DEFAULT=21
|
||||
val SCE_H_SGML_COMMAND=22
|
||||
val SCE_H_SGML_1ST_PARAM=23
|
||||
val SCE_H_SGML_DOUBLESTRING=24
|
||||
val SCE_H_SGML_SIMPLESTRING=25
|
||||
val SCE_H_SGML_ERROR=26
|
||||
val SCE_H_SGML_SPECIAL=27
|
||||
val SCE_H_SGML_ENTITY=28
|
||||
val SCE_H_SGML_COMMENT=29
|
||||
val SCE_H_SGML_1ST_PARAM_COMMENT=30
|
||||
val SCE_H_SGML_BLOCK_DEFAULT=31
|
||||
# Embedded Javascript
|
||||
val SCE_HJ_START=40
|
||||
val SCE_HJ_DEFAULT=41
|
||||
@@ -1547,6 +1567,18 @@ val SCE_EIFFEL_CHARACTER=5
|
||||
val SCE_EIFFEL_OPERATOR=6
|
||||
val SCE_EIFFEL_IDENTIFIER=7
|
||||
val SCE_EIFFEL_STRINGEOL=8
|
||||
# Lexical states for the SCLEX_NNCRONTAB (nnCron crontab Lexer)
|
||||
val SCE_NNCRONTAB_DEFAULT=0
|
||||
val SCE_NNCRONTAB_COMMENT=1
|
||||
val SCE_NNCRONTAB_TASK=2
|
||||
val SCE_NNCRONTAB_SECTION=3
|
||||
val SCE_NNCRONTAB_KEYWORD=4
|
||||
val SCE_NNCRONTAB_MODIFIER=5
|
||||
val SCE_NNCRONTAB_ASTERISK=6
|
||||
val SCE_NNCRONTAB_NUMBER=7
|
||||
val SCE_NNCRONTAB_STRING=8
|
||||
val SCE_NNCRONTAB_ENVIRONMENT=9
|
||||
val SCE_NNCRONTAB_IDENTIFIER=10
|
||||
|
||||
# Events
|
||||
|
||||
@@ -1574,171 +1606,3 @@ evt void DwellStart=2016(int position)
|
||||
evt void DwellEnd=2017(int position)
|
||||
|
||||
cat Deprecated
|
||||
|
||||
val SCFIND_DOWN=1
|
||||
|
||||
################################################
|
||||
# From WinDefs.h
|
||||
|
||||
# ***** DEPRECATED from here to end of file ******
|
||||
|
||||
# Will a paste succeed?
|
||||
fun bool EM_CanPaste=1074(,)
|
||||
|
||||
# Are there any undoable actions in the undo history.
|
||||
fun bool EM_CanUndo=198(,)
|
||||
|
||||
# Find the position and line from a point within the window.
|
||||
fun int EM_CharFromPos=215(,point pt)
|
||||
|
||||
# Delete the undo history.
|
||||
fun void EM_EmptyUndoBuffer=205(,)
|
||||
|
||||
# Retrieve the selection range.
|
||||
fun void EM_ExGetSel=1076(,charrangeresult cr)
|
||||
|
||||
# Retrieve the line number of a position in the document.
|
||||
get int EM_ExLineFromChar=1078(,position pos)
|
||||
|
||||
# Select a range of text.
|
||||
fun void EM_ExSetSel=1079(,charrange cr)
|
||||
|
||||
# Find some text in the document.
|
||||
fun position EM_FindText=1080(int flags, findtext ft)
|
||||
|
||||
# Find some text in the document. Returns range of found text in ft argument.
|
||||
fun position EM_FindTextEx=1103(int flags, findtextex ft)
|
||||
|
||||
# On Windows will draw the document into a display context such as a printer.
|
||||
fun void EM_FormatRange=1081(bool draw, formatrange fr)
|
||||
|
||||
# Retrieve the line at the top of the display.
|
||||
get int EM_GetFirstVisibleLine=206(,)
|
||||
|
||||
# Retrieve the contents of a line.
|
||||
# Returns the length of the line.
|
||||
fun int EM_GetLine=196(int line, countedstring text)
|
||||
|
||||
# Returns the number of lines in the document. There is always at least one.
|
||||
fun int EM_GetLineCount=186(,)
|
||||
|
||||
# Returns the size in pixels of left and right margins packed into one integer.
|
||||
# The left margin is in the low half and the right margin in the high half.
|
||||
fun int EM_GetMargins=212(,)
|
||||
|
||||
# Is the document different from when it was last saved?
|
||||
get bool EM_GetModify=184(,)
|
||||
|
||||
# Get the area used to display the document.
|
||||
fun void EM_GetRect=178(,rectangle r)
|
||||
|
||||
# Return the selection packed into one integer with the start of the selection
|
||||
# in the low half and the end in the high half.
|
||||
fun int EM_GetSel=176(,)
|
||||
|
||||
# Retrieve the selected text.
|
||||
# Return the length of the text.
|
||||
fun int EM_GetSelText=1086(,stringresult text)
|
||||
|
||||
# Retrieve a range of text.
|
||||
# Return the length of the text.
|
||||
fun int EM_GetTextRange=1099(, textrange tr)
|
||||
|
||||
# Draw the selection in normal style or with selection highlighted.
|
||||
fun void EM_HideSelection=1087(bool normal,)
|
||||
|
||||
# Retrieve the line of a position.
|
||||
fun int EM_LineFromChar=201(position pos,)
|
||||
|
||||
# Retrieve the position at the start of a line.
|
||||
fun position EM_LineIndex=187(int line,)
|
||||
|
||||
# Retrieve the number of characters on a line not including end of line characters.
|
||||
fun int EM_LineLength=193(int line,)
|
||||
|
||||
# Scroll horizontally and vertically.
|
||||
fun void EM_LineScroll=182(int columns, int lines)
|
||||
|
||||
# Retrieve the point in the window where a position is displayed.
|
||||
fun void EM_PosFromChar=214(pointresult pt, position pos)
|
||||
|
||||
# Replace the selected text with the argument text.
|
||||
fun void EM_ReplaceSel=194(, string text)
|
||||
|
||||
# Ensure the caret is visible.
|
||||
fun void EM_ScrollCaret=183(,)
|
||||
|
||||
# Returns SEL_EMPTY if selection contains no characters, otherwise SEL_TEXT.
|
||||
fun void EM_SelectionType=1090(,)
|
||||
|
||||
# Set the width of the left and right margins
|
||||
fun void EM_SetMargins=211(int flags, int values)
|
||||
|
||||
# Set to read only or read write.
|
||||
set void EM_SetReadOnly=207(bool readOnly,)
|
||||
|
||||
# Select the range of text from start to end.
|
||||
fun void EM_SetSel=177(position start, position end)
|
||||
|
||||
# Undo one action in the undo history.
|
||||
fun void EM_Undo=199(,)
|
||||
|
||||
# Null operation.
|
||||
fun void WM_Null=0(,)
|
||||
|
||||
# Clear the selection.
|
||||
fun void WM_Clear=771(,)
|
||||
|
||||
fun void WM_Command=273(,)
|
||||
|
||||
# Copy the selection to the clipboard.
|
||||
fun void WM_Copy=769(,)
|
||||
|
||||
# Cut the selection to the clipboard.
|
||||
fun void WM_Cut=768(,)
|
||||
|
||||
# Retrieve all the text in the document.
|
||||
# Returns number of characters retrieved.
|
||||
fun int WM_GetText=13(int length, stringresult text)
|
||||
|
||||
# Retrieve the number of characters in the document.
|
||||
fun int WM_GetTextLength=14(,)
|
||||
|
||||
# Notification back to container
|
||||
fun void WM_Notify=78(int id, int stuff)
|
||||
|
||||
# Paste the contents of the clipboard into the document replacing the selection.
|
||||
fun void WM_Paste=770(,)
|
||||
|
||||
# Replace the contents of the document with the argument text.
|
||||
fun void WM_SetText=12(, string text)
|
||||
|
||||
# Undo one action in the undo history.
|
||||
fun void WM_Undo=772(,)
|
||||
|
||||
# Notification codes
|
||||
val EN_CHANGE=768
|
||||
val EN_KILLFOCUS=512
|
||||
val EN_SETFOCUS=256
|
||||
|
||||
# Flags for setting margins.
|
||||
val EC_LEFTMARGIN=1
|
||||
val EC_RIGHTMARGIN=2
|
||||
val EC_USEFONTINFO=0xffff
|
||||
|
||||
# Selection type.
|
||||
val SEL_EMPTY=0
|
||||
val SEL_TEXT=1
|
||||
|
||||
# Find replace mask constants
|
||||
val FR_MATCHCASE=0x4
|
||||
val FR_WHOLEWORD=0x2
|
||||
val FR_DOWN=0x1
|
||||
|
||||
# Key modifier flag.
|
||||
val SHIFT_PRESSED=1
|
||||
val LEFT_CTRL_PRESSED=2
|
||||
val LEFT_ALT_PRESSED=4
|
||||
|
||||
#events
|
||||
evt void EN_Change=768(void)
|
||||
|
@@ -11,17 +11,6 @@
|
||||
|
||||
#if PLAT_GTK
|
||||
|
||||
#ifndef SCINTILLA_H
|
||||
#ifdef _MSC_VER
|
||||
#pragma message(__FILE__ "(1) : warning : Scintilla.h should be included before ScintillaWidget.h")
|
||||
#pragma message("This will be required in the next version of Scintilla")
|
||||
#else
|
||||
#warning Scintilla.h should be included before ScintillaWidget.h
|
||||
#warning This will be required in the next version of Scintilla
|
||||
#endif
|
||||
#include "Scintilla.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@@ -357,8 +357,10 @@ void Document::ModifiedAt(int pos) {
|
||||
|
||||
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
||||
void Document::DeleteChars(int pos, int len) {
|
||||
if (len == 0)
|
||||
return;
|
||||
if ((pos + len) > Length())
|
||||
return ;
|
||||
return;
|
||||
if (cb.IsReadOnly() && enteredReadOnlyCount == 0) {
|
||||
enteredReadOnlyCount++;
|
||||
NotifyModifyAttempt();
|
||||
|
@@ -14,10 +14,6 @@
|
||||
|
||||
#include "Scintilla.h"
|
||||
|
||||
#if PLAT_WX || PLAT_GTK
|
||||
#include "WinDefs.h"
|
||||
#endif
|
||||
|
||||
#include "ContractionState.h"
|
||||
#include "SVector.h"
|
||||
#include "CellBuffer.h"
|
||||
@@ -58,7 +54,6 @@ Editor::Editor() {
|
||||
dwelling = false;
|
||||
ptMouseLast.x = 0;
|
||||
ptMouseLast.y = 0;
|
||||
firstExpose = true;
|
||||
inDragDrop = false;
|
||||
dropWentOutside = false;
|
||||
posDrag = invalidPosition;
|
||||
@@ -69,9 +64,6 @@ Editor::Editor() {
|
||||
lineAnchor = 0;
|
||||
originalAnchorPos = 0;
|
||||
|
||||
dragChars = 0;
|
||||
lenDrag = 0;
|
||||
dragIsRectangle = false;
|
||||
selType = selStream;
|
||||
xStartSelect = 0;
|
||||
xEndSelect = 0;
|
||||
@@ -85,9 +77,6 @@ Editor::Editor() {
|
||||
|
||||
searchAnchor = 0;
|
||||
|
||||
ucWheelScrollLines = 0;
|
||||
cWheelDelta = 0; //wheel delta from roll
|
||||
|
||||
xOffset = 0;
|
||||
xCaretMargin = 50;
|
||||
horizontalScrollBarVisible = true;
|
||||
@@ -114,15 +103,11 @@ Editor::Editor() {
|
||||
|
||||
modEventMask = SC_MODEVENTMASKALL;
|
||||
|
||||
displayPopupMenu = true;
|
||||
|
||||
pdoc = new Document();
|
||||
pdoc ->AddRef();
|
||||
pdoc->AddWatcher(this, 0);
|
||||
|
||||
#ifdef MACRO_SUPPORT
|
||||
recordingMacro = 0;
|
||||
#endif
|
||||
recordingMacro = false;
|
||||
foldFlags = 0;
|
||||
}
|
||||
|
||||
@@ -131,10 +116,6 @@ Editor::~Editor() {
|
||||
pdoc->Release();
|
||||
pdoc = 0;
|
||||
DropGraphics();
|
||||
|
||||
delete []dragChars;
|
||||
dragChars = 0;
|
||||
lenDrag = 0;
|
||||
}
|
||||
|
||||
void Editor::Finalise() {
|
||||
@@ -874,7 +855,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) {
|
||||
if (marks) {
|
||||
for (int markBit = 0; (markBit < 32) && marks; markBit++) {
|
||||
if (marks & 1) {
|
||||
vs.markers[markBit].Draw(surface, rcMarker);
|
||||
vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font);
|
||||
}
|
||||
marks >>= 1;
|
||||
}
|
||||
@@ -1917,14 +1898,12 @@ void Editor::NotifyChar(int ch) {
|
||||
scn.nmhdr.code = SCN_CHARADDED;
|
||||
scn.ch = ch;
|
||||
NotifyParent(scn);
|
||||
#ifdef MACRO_SUPPORT
|
||||
if (recordingMacro) {
|
||||
char txt[2];
|
||||
txt[0] = static_cast<char>(ch);
|
||||
txt[1] = '\0';
|
||||
NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast<long>(txt));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Editor::NotifySavePoint(bool isSavePoint) {
|
||||
@@ -2150,7 +2129,6 @@ void Editor::NotifyDeleted(Document *, void *) {
|
||||
/* Do nothing */
|
||||
}
|
||||
|
||||
#ifdef MACRO_SUPPORT
|
||||
void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam) {
|
||||
|
||||
// Enumerates all macroable messages
|
||||
@@ -2159,10 +2137,6 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long
|
||||
case SCI_COPY:
|
||||
case SCI_PASTE:
|
||||
case SCI_CLEAR:
|
||||
case WM_CUT:
|
||||
case WM_COPY:
|
||||
case WM_PASTE:
|
||||
case WM_CLEAR:
|
||||
case SCI_REPLACESEL:
|
||||
case SCI_ADDTEXT:
|
||||
case SCI_INSERTTEXT:
|
||||
@@ -2236,7 +2210,6 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long
|
||||
scn.lParam = lParam;
|
||||
NotifyParent(scn);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Force scroll and keep position relative to top of window
|
||||
void Editor::PageMove(int direction, bool extend) {
|
||||
@@ -2674,7 +2647,6 @@ void Editor::Indent(bool forwards) {
|
||||
* @return The position of the found text, -1 if not found.
|
||||
*/
|
||||
long Editor::FindText(
|
||||
unsigned int iMessage, ///< Can be @c EM_FINDTEXT or @c EM_FINDTEXTEX or @c SCI_FINDTEXT.
|
||||
unsigned long wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD,
|
||||
///< @c SCFIND_WORDSTART or @c SCFIND_REGEXP.
|
||||
long lParam) { ///< @c TextToFind structure: The text to search for in the given range.
|
||||
@@ -2688,10 +2660,8 @@ long Editor::FindText(
|
||||
wParam & SCFIND_REGEXP,
|
||||
&lengthFound);
|
||||
if (pos != -1) {
|
||||
if (iMessage != EM_FINDTEXT) {
|
||||
ft->chrgText.cpMin = pos;
|
||||
ft->chrgText.cpMax = pos + lengthFound;
|
||||
}
|
||||
ft->chrgText.cpMin = pos;
|
||||
ft->chrgText.cpMax = pos + lengthFound;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
@@ -2800,33 +2770,23 @@ char *Editor::CopyRange(int start, int end) {
|
||||
return text;
|
||||
}
|
||||
|
||||
int Editor::SelectionRangeLength() {
|
||||
void Editor::CopySelectionRange(SelectionText *ss) {
|
||||
char *text = 0;
|
||||
int size = 0;
|
||||
if (selType == selRectangle) {
|
||||
int lineStart = pdoc->LineFromPosition(SelectionStart());
|
||||
int lineEnd = pdoc->LineFromPosition(SelectionEnd());
|
||||
int totalSize = 0;
|
||||
for (int line = lineStart; line <= lineEnd; line++) {
|
||||
totalSize += SelectionEnd(line) - SelectionStart(line) + 1;
|
||||
int line;
|
||||
for (line = lineStart; line <= lineEnd; line++) {
|
||||
size += SelectionEnd(line) - SelectionStart(line) + 1;
|
||||
if (pdoc->eolMode == SC_EOL_CRLF)
|
||||
totalSize++;
|
||||
size++;
|
||||
}
|
||||
return totalSize;
|
||||
} else {
|
||||
return SelectionEnd() - SelectionStart();
|
||||
}
|
||||
}
|
||||
|
||||
char *Editor::CopySelectionRange() {
|
||||
if (selType == selRectangle) {
|
||||
char *text = 0;
|
||||
int lineStart = pdoc->LineFromPosition(SelectionStart());
|
||||
int lineEnd = pdoc->LineFromPosition(SelectionEnd());
|
||||
int totalSize = SelectionRangeLength();
|
||||
if (totalSize > 0) {
|
||||
text = new char[totalSize + 1];
|
||||
if (size > 0) {
|
||||
text = new char[size + 1];
|
||||
if (text) {
|
||||
int j = 0;
|
||||
for (int line = lineStart; line <= lineEnd; line++) {
|
||||
for (line = lineStart; line <= lineEnd; line++) {
|
||||
for (int i = SelectionStart(line);i < SelectionEnd(line);i++) {
|
||||
text[j++] = pdoc->CharAt(i);
|
||||
}
|
||||
@@ -2835,24 +2795,14 @@ char *Editor::CopySelectionRange() {
|
||||
if (pdoc->eolMode != SC_EOL_CR)
|
||||
text[j++] = '\n';
|
||||
}
|
||||
text[totalSize] = '\0';
|
||||
text[size] = '\0';
|
||||
}
|
||||
}
|
||||
return text;
|
||||
} else {
|
||||
return CopyRange(SelectionStart(), SelectionEnd());
|
||||
}
|
||||
}
|
||||
|
||||
void Editor::CopySelectionIntoDrag() {
|
||||
delete []dragChars;
|
||||
dragChars = 0;
|
||||
lenDrag = SelectionRangeLength();
|
||||
dragChars = CopySelectionRange();
|
||||
dragIsRectangle = selType == selRectangle;
|
||||
if (!dragChars) {
|
||||
lenDrag = 0;
|
||||
size = SelectionEnd() - SelectionStart();
|
||||
text = CopyRange(SelectionStart(), SelectionEnd());
|
||||
}
|
||||
ss->Set(text, size, selType == selRectangle);
|
||||
}
|
||||
|
||||
void Editor::SetDragPosition(int newPos) {
|
||||
@@ -2882,8 +2832,6 @@ void Editor::StartDrag() {
|
||||
//DisplayCursor(Window::cursorArrow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) {
|
||||
//Platform::DebugPrintf("DropAt %d\n", inDragDrop);
|
||||
if (inDragDrop)
|
||||
@@ -3115,7 +3063,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b
|
||||
if (inDragDrop) {
|
||||
SetMouseCapture(false);
|
||||
SetDragPosition(newPos);
|
||||
CopySelectionIntoDrag();
|
||||
CopySelectionRange(&drag);
|
||||
StartDrag();
|
||||
} else {
|
||||
xStartSelect = pt.x - vs.fixedColumnWidth + xOffset;
|
||||
@@ -3220,25 +3168,23 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
||||
int selStart = SelectionStart();
|
||||
int selEnd = SelectionEnd();
|
||||
if (selStart < selEnd) {
|
||||
if (dragChars && lenDrag) {
|
||||
if (drag.len) {
|
||||
if (ctrl) {
|
||||
pdoc->InsertString(newPos, dragChars, lenDrag);
|
||||
SetSelection(newPos, newPos + lenDrag);
|
||||
pdoc->InsertString(newPos, drag.s, drag.len);
|
||||
SetSelection(newPos, newPos + drag.len);
|
||||
} else if (newPos < selStart) {
|
||||
pdoc->DeleteChars(selStart, lenDrag);
|
||||
pdoc->InsertString(newPos, dragChars, lenDrag);
|
||||
SetSelection(newPos, newPos + lenDrag);
|
||||
pdoc->DeleteChars(selStart, drag.len);
|
||||
pdoc->InsertString(newPos, drag.s, drag.len);
|
||||
SetSelection(newPos, newPos + drag.len);
|
||||
} else if (newPos > selEnd) {
|
||||
pdoc->DeleteChars(selStart, lenDrag);
|
||||
newPos -= lenDrag;
|
||||
pdoc->InsertString(newPos, dragChars, lenDrag);
|
||||
SetSelection(newPos, newPos + lenDrag);
|
||||
pdoc->DeleteChars(selStart, drag.len);
|
||||
newPos -= drag.len;
|
||||
pdoc->InsertString(newPos, drag.s, drag.len);
|
||||
SetSelection(newPos, newPos + drag.len);
|
||||
} else {
|
||||
SetEmptySelection(newPos);
|
||||
}
|
||||
delete []dragChars;
|
||||
dragChars = 0;
|
||||
lenDrag = 0;
|
||||
drag.Set(0, 0);
|
||||
}
|
||||
selectionType = selChar;
|
||||
}
|
||||
@@ -3545,14 +3491,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
//Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam);
|
||||
|
||||
// Optional macro recording hook
|
||||
#ifdef MACRO_SUPPORT
|
||||
if (recordingMacro)
|
||||
NotifyMacroRecord(iMessage, wParam, lParam);
|
||||
#endif
|
||||
|
||||
switch (iMessage) {
|
||||
|
||||
case WM_GETTEXT:
|
||||
case SCI_GETTEXT:
|
||||
{
|
||||
if (lParam == 0)
|
||||
@@ -3565,7 +3508,6 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return iChar;
|
||||
}
|
||||
|
||||
case WM_SETTEXT:
|
||||
case SCI_SETTEXT:
|
||||
{
|
||||
if (lParam == 0)
|
||||
@@ -3576,130 +3518,45 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_GETTEXTLENGTH:
|
||||
case SCI_GETTEXTLENGTH:
|
||||
return pdoc->Length();
|
||||
|
||||
case WM_CUT:
|
||||
case SCI_CUT:
|
||||
Cut();
|
||||
SetLastXChosen();
|
||||
break;
|
||||
|
||||
case WM_COPY:
|
||||
case SCI_COPY:
|
||||
Copy();
|
||||
break;
|
||||
|
||||
case WM_PASTE:
|
||||
case SCI_PASTE:
|
||||
Paste();
|
||||
SetLastXChosen();
|
||||
EnsureCaretVisible();
|
||||
break;
|
||||
|
||||
case WM_CLEAR:
|
||||
case SCI_CLEAR:
|
||||
Clear();
|
||||
SetLastXChosen();
|
||||
break;
|
||||
|
||||
case WM_UNDO:
|
||||
case SCI_UNDO:
|
||||
Undo();
|
||||
SetLastXChosen();
|
||||
break;
|
||||
|
||||
// Edit control messages
|
||||
|
||||
// Not supported (no-ops):
|
||||
// EM_GETWORDBREAKPROC
|
||||
// EM_GETWORDBREAKPROCEX
|
||||
// EM_SETWORDBREAKPROC
|
||||
// EM_SETWORDBREAKPROCEX
|
||||
// EM_GETWORDWRAPMODE
|
||||
// EM_SETWORDWRAPMODE
|
||||
// EM_LIMITTEXT
|
||||
// EM_EXLIMITTEXT
|
||||
// EM_SETRECT
|
||||
// EM_SETRECTNP
|
||||
// EM_FMTLINES
|
||||
// EM_GETHANDLE
|
||||
// EM_SETHANDLE
|
||||
// EM_GETPASSWORDCHAR
|
||||
// EM_SETPASSWORDCHAR
|
||||
// EM_SETTABSTOPS
|
||||
// EM_FINDWORDBREAK
|
||||
// EM_GETCHARFORMAT
|
||||
// EM_SETCHARFORMAT
|
||||
// EM_GETOLEINTERFACE
|
||||
// EM_SETOLEINTERFACE
|
||||
// EM_SETOLECALLBACK
|
||||
// EM_GETPARAFORMAT
|
||||
// EM_SETPARAFORMAT
|
||||
// EM_PASTESPECIAL
|
||||
// EM_REQUESTRESIZE
|
||||
// EM_GETBKGNDCOLOR
|
||||
// EM_SETBKGNDCOLOR
|
||||
// EM_STREAMIN
|
||||
// EM_STREAMOUT
|
||||
// EM_GETIMECOLOR
|
||||
// EM_SETIMECOLOR
|
||||
// EM_GETIMEOPTIONS
|
||||
// EM_SETIMEOPTIONS
|
||||
// EM_GETOPTIONS
|
||||
// EM_SETOPTIONS
|
||||
// EM_GETPUNCTUATION
|
||||
// EM_SETPUNCTUATION
|
||||
// EM_GETTHUMB
|
||||
// EM_SETTARGETDEVICE
|
||||
|
||||
// Not supported but should be:
|
||||
// EM_GETEVENTMASK
|
||||
// EM_SETEVENTMASK
|
||||
// For printing:
|
||||
// EM_DISPLAYBAND
|
||||
|
||||
case EM_CANUNDO:
|
||||
case SCI_CANUNDO:
|
||||
return pdoc->CanUndo() ? TRUE : FALSE;
|
||||
|
||||
case EM_UNDO:
|
||||
Undo();
|
||||
SetLastXChosen();
|
||||
break;
|
||||
|
||||
case EM_EMPTYUNDOBUFFER:
|
||||
case SCI_EMPTYUNDOBUFFER:
|
||||
pdoc->DeleteUndoHistory();
|
||||
return 0;
|
||||
|
||||
case EM_GETFIRSTVISIBLELINE:
|
||||
case SCI_GETFIRSTVISIBLELINE:
|
||||
return topLine;
|
||||
|
||||
case EM_GETLINE: {
|
||||
if (lParam == 0) {
|
||||
return 0;
|
||||
}
|
||||
char *ptr = reinterpret_cast<char *>(lParam);
|
||||
short *pBufSize = reinterpret_cast<short *>(lParam);
|
||||
short bufSize = *pBufSize;
|
||||
ptr[0] = '\0'; // If no characters copied, have to put a NUL into buffer
|
||||
if (static_cast<int>(wParam) > pdoc->LinesTotal()) {
|
||||
return 0;
|
||||
}
|
||||
int lineStart = pdoc->LineStart(wParam);
|
||||
int lineEnd = pdoc->LineStart(wParam + 1);
|
||||
// The first word of the buffer is the size, in TCHARs, of the buffer
|
||||
int iPlace = 0;
|
||||
for (int iChar = lineStart; iChar < lineEnd && iPlace < bufSize; iChar++) {
|
||||
ptr[iPlace++] = pdoc->CharAt(iChar);
|
||||
}
|
||||
return iPlace;
|
||||
}
|
||||
|
||||
case SCI_GETLINE: { // Simpler than EM_GETLINE, but with risk of overwriting the end of the buffer
|
||||
case SCI_GETLINE: { // Risk of overwriting the end of the buffer
|
||||
if (lParam == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -3713,42 +3570,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return iPlace;
|
||||
}
|
||||
|
||||
case EM_GETLINECOUNT:
|
||||
case SCI_GETLINECOUNT:
|
||||
if (pdoc->LinesTotal() == 0)
|
||||
return 1;
|
||||
else
|
||||
return pdoc->LinesTotal();
|
||||
|
||||
case EM_GETMODIFY:
|
||||
case SCI_GETMODIFY:
|
||||
return !pdoc->IsSavePoint();
|
||||
|
||||
case EM_GETRECT:
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
*(reinterpret_cast<PRectangle *>(lParam)) = GetClientRectangle();
|
||||
break;
|
||||
|
||||
case EM_GETSEL:
|
||||
if (wParam)
|
||||
*reinterpret_cast<int *>(wParam) = SelectionStart();
|
||||
if (lParam)
|
||||
*reinterpret_cast<int *>(lParam) = SelectionEnd();
|
||||
return Platform::LongFromTwoShorts(
|
||||
static_cast<short>(SelectionStart()),
|
||||
static_cast<short>(SelectionEnd()));
|
||||
|
||||
case EM_EXGETSEL: {
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
CharacterRange *pCR = reinterpret_cast<CharacterRange *>(lParam);
|
||||
pCR->cpMin = SelectionStart();
|
||||
pCR->cpMax = SelectionEnd();
|
||||
}
|
||||
break;
|
||||
|
||||
case EM_SETSEL:
|
||||
case SCI_SETSEL: {
|
||||
int nStart = static_cast<int>(wParam);
|
||||
int nEnd = static_cast<int>(lParam);
|
||||
@@ -3762,55 +3592,28 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
}
|
||||
break;
|
||||
|
||||
case EM_EXSETSEL: {
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
CharacterRange *pCR = reinterpret_cast<CharacterRange *>(lParam);
|
||||
selType = selStream;
|
||||
if (pCR->cpMax == -1) {
|
||||
SetSelection(pCR->cpMin, pdoc->Length());
|
||||
} else {
|
||||
SetSelection(pCR->cpMin, pCR->cpMax);
|
||||
}
|
||||
EnsureCaretVisible();
|
||||
return pdoc->LineFromPosition(SelectionStart());
|
||||
}
|
||||
|
||||
case EM_GETSELTEXT:
|
||||
case SCI_GETSELTEXT: {
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
SelectionText selectedText;
|
||||
CopySelectionRange(&selectedText);
|
||||
char *ptr = reinterpret_cast<char *>(lParam);
|
||||
int selSize = SelectionRangeLength();
|
||||
char *text = CopySelectionRange();
|
||||
int iChar = 0;
|
||||
if (text) {
|
||||
for (; iChar < selSize; iChar++)
|
||||
ptr[iChar] = text[iChar];
|
||||
if (selectedText.len) {
|
||||
for (; iChar < selectedText.len; iChar++)
|
||||
ptr[iChar] = selectedText.s[iChar];
|
||||
ptr[iChar] = '\0';
|
||||
delete []text;
|
||||
} else {
|
||||
ptr[0] = '\0';
|
||||
}
|
||||
return iChar;
|
||||
}
|
||||
|
||||
case EM_LINEFROMCHAR:
|
||||
if (static_cast<int>(wParam) < 0)
|
||||
wParam = SelectionStart();
|
||||
return pdoc->LineFromPosition(wParam);
|
||||
|
||||
case EM_EXLINEFROMCHAR:
|
||||
if (static_cast<int>(lParam) < 0)
|
||||
lParam = SelectionStart(); // Not specified, but probably OK
|
||||
return pdoc->LineFromPosition(lParam);
|
||||
|
||||
case SCI_LINEFROMPOSITION:
|
||||
if (static_cast<int>(wParam) < 0)
|
||||
return 0;
|
||||
return pdoc->LineFromPosition(wParam);
|
||||
|
||||
case EM_LINEINDEX:
|
||||
case SCI_POSITIONFROMLINE:
|
||||
if (static_cast<int>(wParam) < 0)
|
||||
wParam = pdoc->LineFromPosition(SelectionStart());
|
||||
@@ -3822,28 +3625,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
// return -1;
|
||||
return pdoc->LineStart(wParam);
|
||||
|
||||
case EM_LINELENGTH: {
|
||||
if (static_cast<int>(wParam) < 0) // Who use this anyway?
|
||||
return 0; // Should be... Too complex to describe here, see MS specs!
|
||||
if (static_cast<int>(wParam) > pdoc->Length()) // Useful test, anyway...
|
||||
return 0;
|
||||
int line = pdoc->LineFromPosition(wParam);
|
||||
int charsOnLine = 0;
|
||||
for (int pos = pdoc->LineStart(line); pos < pdoc->LineStart(line + 1); pos++) {
|
||||
if ((pdoc->CharAt(pos) != '\r') && (pdoc->CharAt(pos) != '\n'))
|
||||
charsOnLine++;
|
||||
}
|
||||
return charsOnLine;
|
||||
}
|
||||
|
||||
// Replacement of the old Scintilla interpretation of EM_LINELENGTH
|
||||
// Replacement of the old Scintilla interpretation of EM_LINELENGTH
|
||||
case SCI_LINELENGTH:
|
||||
if ((static_cast<int>(wParam) < 0) ||
|
||||
(static_cast<int>(wParam) > pdoc->LineFromPosition(pdoc->Length())))
|
||||
return 0;
|
||||
return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam);
|
||||
|
||||
case EM_REPLACESEL:
|
||||
case SCI_REPLACESEL: {
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
@@ -3890,18 +3678,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case SCI_GETSEARCHFLAGS:
|
||||
return searchFlags;
|
||||
|
||||
case EM_LINESCROLL:
|
||||
case SCI_LINESCROLL:
|
||||
ScrollTo(topLine + lParam);
|
||||
HorizontalScrollTo(xOffset + wParam * vs.spaceWidth);
|
||||
return TRUE;
|
||||
|
||||
case EM_SCROLLCARET:
|
||||
case SCI_SCROLLCARET:
|
||||
EnsureCaretVisible();
|
||||
break;
|
||||
|
||||
case EM_SETREADONLY:
|
||||
case SCI_SETREADONLY:
|
||||
pdoc->SetReadOnly(wParam);
|
||||
return TRUE;
|
||||
@@ -3909,33 +3694,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case SCI_GETREADONLY:
|
||||
return pdoc->IsReadOnly();
|
||||
|
||||
case EM_CANPASTE:
|
||||
case SCI_CANPASTE:
|
||||
return CanPaste();
|
||||
|
||||
case EM_CHARFROMPOS: {
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
Point *ppt = reinterpret_cast<Point *>(lParam);
|
||||
int pos = PositionFromLocation(*ppt);
|
||||
int line = pdoc->LineFromPosition(pos);
|
||||
return Platform::LongFromTwoShorts(
|
||||
static_cast<short>(pos), static_cast < short > (line));
|
||||
}
|
||||
|
||||
case EM_POSFROMCHAR: {
|
||||
// The MS specs for this have changed 3 times: using the RichEdit 3 version
|
||||
if (wParam == 0)
|
||||
return 0;
|
||||
Point *ppt = reinterpret_cast<Point *>(wParam);
|
||||
if (lParam < 0) {
|
||||
*ppt = Point(0, 0);
|
||||
} else {
|
||||
*ppt = LocationFromPosition(lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
case SCI_POINTXFROMPOSITION:
|
||||
if (lParam < 0) {
|
||||
return 0;
|
||||
@@ -3952,14 +3713,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return pt.y;
|
||||
}
|
||||
|
||||
case EM_FINDTEXT:
|
||||
return FindText(iMessage, wParam, lParam);
|
||||
|
||||
case EM_FINDTEXTEX:
|
||||
case SCI_FINDTEXT:
|
||||
return FindText(iMessage, wParam, lParam);
|
||||
return FindText(wParam, lParam);
|
||||
|
||||
case EM_GETTEXTRANGE:
|
||||
case SCI_GETTEXTRANGE: {
|
||||
if (lParam == 0)
|
||||
return 0;
|
||||
@@ -3974,53 +3730,20 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
return len; // Not including NUL
|
||||
}
|
||||
|
||||
|
||||
|
||||
case EM_SELECTIONTYPE:
|
||||
#ifdef SEL_EMPTY
|
||||
if (currentPos == anchor)
|
||||
return SEL_EMPTY;
|
||||
else
|
||||
return SEL_TEXT;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
case EM_HIDESELECTION:
|
||||
case SCI_HIDESELECTION:
|
||||
hideSelection = wParam;
|
||||
Redraw();
|
||||
break;
|
||||
|
||||
case EM_FORMATRANGE:
|
||||
case SCI_FORMATRANGE:
|
||||
return FormatRange(wParam, reinterpret_cast<RangeToFormat *>(lParam));
|
||||
|
||||
case EM_GETMARGINS:
|
||||
return Platform::LongFromTwoShorts(static_cast<short>(vs.leftMarginWidth),
|
||||
static_cast<short>(vs.rightMarginWidth));
|
||||
|
||||
case SCI_GETMARGINLEFT:
|
||||
return vs.leftMarginWidth;
|
||||
|
||||
case SCI_GETMARGINRIGHT:
|
||||
return vs.rightMarginWidth;
|
||||
|
||||
case EM_SETMARGINS:
|
||||
#ifdef EC_LEFTMARGIN
|
||||
if (wParam & EC_LEFTMARGIN) {
|
||||
vs.leftMarginWidth = Platform::LowShortFromLong(lParam);
|
||||
}
|
||||
if (wParam & EC_RIGHTMARGIN) {
|
||||
vs.rightMarginWidth = Platform::HighShortFromLong(lParam);
|
||||
}
|
||||
if (wParam == EC_USEFONTINFO) {
|
||||
vs.leftMarginWidth = vs.aveCharWidth / 2;
|
||||
vs.rightMarginWidth = vs.aveCharWidth / 2;
|
||||
}
|
||||
InvalidateStyleRedraw();
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SCI_SETMARGINLEFT:
|
||||
vs.leftMarginWidth = lParam;
|
||||
InvalidateStyleRedraw();
|
||||
@@ -4667,10 +4390,6 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case SCI_LINESONSCREEN:
|
||||
return LinesOnScreen();
|
||||
|
||||
case SCI_USEPOPUP:
|
||||
displayPopupMenu = wParam;
|
||||
break;
|
||||
|
||||
case SCI_SETSELFORE:
|
||||
vs.selforeset = wParam;
|
||||
vs.selforeground.desired = Colour(lParam);
|
||||
@@ -4711,7 +4430,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
|
||||
case SCI_CLEARCMDKEY:
|
||||
kmap.AssignCmdKey(Platform::LowShortFromLong(wParam),
|
||||
Platform::HighShortFromLong(wParam), WM_NULL);
|
||||
Platform::HighShortFromLong(wParam), SCI_NULL);
|
||||
break;
|
||||
|
||||
case SCI_CLEARALLCMDKEYS:
|
||||
@@ -4915,15 +4634,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||
case SCI_GETCURSOR:
|
||||
return cursorMode;
|
||||
|
||||
#ifdef MACRO_SUPPORT
|
||||
case SCI_STARTRECORD:
|
||||
recordingMacro = 1;
|
||||
recordingMacro = true;
|
||||
return 0;
|
||||
|
||||
case SCI_STOPRECORD:
|
||||
recordingMacro = 0;
|
||||
recordingMacro = false;
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
case SCI_MOVECARETINSIDEVIEW:
|
||||
MoveCaretInsideView();
|
||||
|
@@ -50,6 +50,26 @@ public:
|
||||
int positions[maxLineLength+1];
|
||||
};
|
||||
|
||||
class SelectionText {
|
||||
public:
|
||||
char *s;
|
||||
int len;
|
||||
bool rectangular;
|
||||
SelectionText() : s(0), len(0), rectangular(false) {}
|
||||
~SelectionText() {
|
||||
Set(0, 0);
|
||||
}
|
||||
void Set(char *s_, int len_, bool rectangular_=false) {
|
||||
delete []s;
|
||||
s = s_;
|
||||
if (s)
|
||||
len = len_;
|
||||
else
|
||||
len = 0;
|
||||
rectangular = rectangular_;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
class Editor : public DocWatcher {
|
||||
@@ -68,6 +88,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
bool stylesValid;
|
||||
ViewStyle vs;
|
||||
Palette palette;
|
||||
|
||||
int printMagnification;
|
||||
int printColourMode;
|
||||
int cursorMode;
|
||||
@@ -91,9 +112,6 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
Surface pixmapSelPattern;
|
||||
Surface pixmapIndentGuide;
|
||||
Surface pixmapIndentGuideHighlight;
|
||||
// Intellimouse support - currently only implemented for Windows
|
||||
unsigned int ucWheelScrollLines;
|
||||
int cWheelDelta; ///< Wheel delta from roll
|
||||
|
||||
KeyMap kmap;
|
||||
|
||||
@@ -109,7 +127,6 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
bool dwelling;
|
||||
enum { selChar, selWord, selLine } selectionType;
|
||||
Point ptMouseLast;
|
||||
bool firstExpose;
|
||||
bool inDragDrop;
|
||||
bool dropWentOutside;
|
||||
int posDrag;
|
||||
@@ -138,9 +155,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
|
||||
int modEventMask;
|
||||
|
||||
char *dragChars;
|
||||
int lenDrag;
|
||||
bool dragIsRectangle;
|
||||
SelectionText drag;
|
||||
enum { selStream, selRectangle, selRectangleFixed } selType;
|
||||
int xStartSelect;
|
||||
int xEndSelect;
|
||||
@@ -154,11 +169,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
|
||||
int searchAnchor;
|
||||
|
||||
int displayPopupMenu;
|
||||
|
||||
#ifdef MACRO_SUPPORT
|
||||
int recordingMacro;
|
||||
#endif
|
||||
bool recordingMacro;
|
||||
|
||||
int foldFlags;
|
||||
ContractionState cs;
|
||||
@@ -270,11 +281,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
void NotifyModified(Document *document, DocModification mh, void *userData);
|
||||
void NotifyDeleted(Document *document, void *userData);
|
||||
void NotifyStyleNeeded(Document *doc, void *userData, int endPos);
|
||||
|
||||
|
||||
#ifdef MACRO_SUPPORT
|
||||
void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
#endif
|
||||
|
||||
void PageMove(int direction, bool extend=false);
|
||||
void ChangeCaseOfSelection(bool makeUpperCase);
|
||||
@@ -289,16 +296,14 @@ protected: // ScintillaBase subclass needs access to much of Editor
|
||||
|
||||
void Indent(bool forwards);
|
||||
|
||||
long FindText(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
long FindText(unsigned long wParam, long lParam);
|
||||
void SearchAnchor();
|
||||
long SearchText(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
long SearchInTarget(const char *text, int length);
|
||||
void GoToLine(int lineNo);
|
||||
|
||||
char *CopyRange(int start, int end);
|
||||
int SelectionRangeLength();
|
||||
char *CopySelectionRange();
|
||||
void CopySelectionIntoDrag();
|
||||
void CopySelectionRange(SelectionText *ss);
|
||||
void SetDragPosition(int newPos);
|
||||
void DisplayCursor(Window::Cursor c);
|
||||
virtual void StartDrag();
|
||||
|
@@ -108,22 +108,26 @@ LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");
|
||||
int wxForceScintillaLexers(void) {
|
||||
extern LexerModule lmAda;
|
||||
extern LexerModule lmAVE;
|
||||
extern LexerModule lmConf;
|
||||
extern LexerModule lmDiff;
|
||||
extern LexerModule lmLatex;
|
||||
extern LexerModule lmPascal;
|
||||
extern LexerModule lmCPP;
|
||||
extern LexerModule lmHTML;
|
||||
extern LexerModule lmXML;
|
||||
extern LexerModule lmProps;
|
||||
extern LexerModule lmErrorList;
|
||||
extern LexerModule lmMake;
|
||||
extern LexerModule lmBatch;
|
||||
extern LexerModule lmConf;
|
||||
extern LexerModule lmCPP;
|
||||
extern LexerModule lmDiff;
|
||||
extern LexerModule lmEiffel;
|
||||
extern LexerModule lmEiffelkw;
|
||||
extern LexerModule lmErrorList;
|
||||
extern LexerModule lmHTML;
|
||||
extern LexerModule lmLatex;
|
||||
extern LexerModule lmLISP;
|
||||
extern LexerModule lmLua;
|
||||
extern LexerModule lmMake;
|
||||
extern LexerModule lmPascal;
|
||||
extern LexerModule lmPerl;
|
||||
extern LexerModule lmProps;
|
||||
extern LexerModule lmPython;
|
||||
extern LexerModule lmRuby;
|
||||
extern LexerModule lmSQL;
|
||||
extern LexerModule lmVB;
|
||||
extern LexerModule lmRuby;
|
||||
extern LexerModule lmXML;
|
||||
|
||||
if (
|
||||
&lmAda
|
||||
@@ -143,7 +147,12 @@ int wxForceScintillaLexers(void) {
|
||||
&& &lmPython
|
||||
&& &lmSQL
|
||||
&& &lmVB
|
||||
&& &lmRuby
|
||||
&& &lmRuby
|
||||
&& &lmEiffel
|
||||
&& &lmEiffelkw
|
||||
&& &lmLISP
|
||||
&& &lmLua
|
||||
&& &lmNull
|
||||
)
|
||||
{
|
||||
return 1;
|
||||
|
@@ -15,317 +15,255 @@
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
static bool IsOKBeforeRE(int ch) {
|
||||
static bool IsOKBeforeRE(const int ch) {
|
||||
return (ch == '(') || (ch == '=') || (ch == ',');
|
||||
}
|
||||
|
||||
static void getRange(unsigned int start,
|
||||
unsigned int end,
|
||||
Accessor &styler,
|
||||
char *s,
|
||||
unsigned int len) {
|
||||
unsigned int i = 0;
|
||||
while ((i < end - start + 1) && (i < len-1)) {
|
||||
s[i] = styler[start + i];
|
||||
i++;
|
||||
}
|
||||
s[i] = '\0';
|
||||
}
|
||||
|
||||
inline bool IsASpace(int ch) {
|
||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||
}
|
||||
|
||||
inline bool IsAWordChar(int ch) {
|
||||
inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||
}
|
||||
|
||||
inline bool IsAWordStart(int ch) {
|
||||
inline bool IsAWordStart(const int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||
}
|
||||
|
||||
inline bool IsADigit(int ch) {
|
||||
return (ch >= '0') && (ch <= '9');
|
||||
inline bool IsADoxygenChar(const int ch) {
|
||||
return (islower(ch) || ch == '$' || ch == '@' ||
|
||||
ch == '\\' || ch == '&' || ch == '<' ||
|
||||
ch == '>' || ch == '#' || ch == '{' ||
|
||||
ch == '}' || ch == '[' || ch == ']');
|
||||
}
|
||||
|
||||
// All languages handled so far can treat all characters >= 0x80 as one class
|
||||
// which just continues the current token or starts an identifier if in default.
|
||||
// DBCS treated specially as the second character can be < 0x80 and hence
|
||||
// syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80
|
||||
class ColouriseContext {
|
||||
Accessor &styler;
|
||||
int lengthDoc;
|
||||
int currentPos;
|
||||
ColouriseContext& operator=(const ColouriseContext&) {
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
bool atEOL;
|
||||
int state;
|
||||
int chPrev;
|
||||
int ch;
|
||||
int chNext;
|
||||
inline bool IsStateComment(const int state) {
|
||||
return ((state == SCE_C_COMMENT) ||
|
||||
(state == SCE_C_COMMENTLINE) ||
|
||||
(state == SCE_C_COMMENTDOC) ||
|
||||
(state == SCE_C_COMMENTDOCKEYWORD) ||
|
||||
(state == SCE_C_COMMENTDOCKEYWORDERROR));
|
||||
}
|
||||
|
||||
ColouriseContext(unsigned int startPos, int length,
|
||||
int initStyle, Accessor &styler_) :
|
||||
styler(styler_),
|
||||
lengthDoc(startPos + length),
|
||||
currentPos(startPos),
|
||||
atEOL(false),
|
||||
state(initStyle),
|
||||
chPrev(0),
|
||||
ch(0),
|
||||
chNext(0) {
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
int pos = currentPos;
|
||||
ch = static_cast<unsigned char>(styler.SafeGetCharAt(pos));
|
||||
if (styler.IsLeadByte(static_cast<char>(ch))) {
|
||||
pos++;
|
||||
ch = ch << 8;
|
||||
ch |= static_cast<unsigned char>(styler.SafeGetCharAt(pos));
|
||||
}
|
||||
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(pos+1));
|
||||
if (styler.IsLeadByte(static_cast<char>(chNext))) {
|
||||
chNext = chNext << 8;
|
||||
chNext |= static_cast<unsigned char>(styler.SafeGetCharAt(pos+2));
|
||||
}
|
||||
atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
}
|
||||
void Complete() {
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
}
|
||||
bool More() {
|
||||
return currentPos <= lengthDoc;
|
||||
}
|
||||
void Forward() {
|
||||
// A lot of this is repeated from the constructor - TODO: merge code
|
||||
chPrev = ch;
|
||||
currentPos++;
|
||||
if (ch >= 0x100)
|
||||
currentPos++;
|
||||
ch = chNext;
|
||||
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+1));
|
||||
if (styler.IsLeadByte(static_cast<char>(chNext))) {
|
||||
chNext = chNext << 8;
|
||||
chNext |= static_cast<unsigned char>(styler.SafeGetCharAt(currentPos + 2));
|
||||
}
|
||||
// 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
|
||||
atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
}
|
||||
void ChangeState(int state_) {
|
||||
state = state_;
|
||||
}
|
||||
void SetState(int state_) {
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
state = state_;
|
||||
}
|
||||
void ForwardSetState(int state_) {
|
||||
Forward();
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
state = state_;
|
||||
}
|
||||
void GetCurrent(char *s, int len) {
|
||||
getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len);
|
||||
}
|
||||
int LengthCurrent() {
|
||||
return currentPos - styler.GetStartSegment();
|
||||
}
|
||||
bool Match(char ch0) {
|
||||
return ch == ch0;
|
||||
}
|
||||
bool Match(char ch0, char ch1) {
|
||||
return (ch == ch0) && (chNext == ch1);
|
||||
}
|
||||
bool Match(const char *s) {
|
||||
if (ch != *s)
|
||||
return false;
|
||||
s++;
|
||||
if (chNext != *s)
|
||||
return false;
|
||||
s++;
|
||||
for (int n=2; *s; n++) {
|
||||
if (*s != styler.SafeGetCharAt(currentPos+n))
|
||||
return false;
|
||||
s++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
inline bool IsStateString(const int state) {
|
||||
return ((state == SCE_C_STRING) || (state == SCE_C_VERBATIM));
|
||||
}
|
||||
|
||||
static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
WordList &keywords2 = *keywordlists[1];
|
||||
WordList &keywords3 = *keywordlists[2];
|
||||
|
||||
bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor");
|
||||
|
||||
if (initStyle == SCE_C_STRINGEOL) // Does not leak onto next line
|
||||
// Do not leak onto next line
|
||||
if (initStyle == SCE_C_STRINGEOL)
|
||||
initStyle = SCE_C_DEFAULT;
|
||||
|
||||
int chPrevNonWhite = ' ';
|
||||
int visibleChars = 0;
|
||||
int noDocChars = 0;
|
||||
bool lastWordWasUUID = false;
|
||||
|
||||
ColouriseContext cc(startPos, length, initStyle, styler);
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
for (; cc.More(); cc.Forward()) {
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
|
||||
// Handle line continuation generically.
|
||||
if (sc.ch == '\\') {
|
||||
if (sc.Match("\\\n")) {
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
continue;
|
||||
}
|
||||
if (sc.Match("\\\r\n")) {
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (cc.state == SCE_C_STRINGEOL) {
|
||||
if (cc.atEOL) {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
// Determine if the current state should terminate.
|
||||
if (sc.state == SCE_C_OPERATOR) {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
} else if (sc.state == SCE_C_NUMBER) {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} else if (cc.state == SCE_C_OPERATOR) {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
} else if (cc.state == SCE_C_NUMBER) {
|
||||
if (!IsAWordChar(cc.ch)) {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} else if (cc.state == SCE_C_IDENTIFIER) {
|
||||
if (!IsAWordChar(cc.ch) || (cc.ch == '.')) {
|
||||
} else if (sc.state == SCE_C_IDENTIFIER) {
|
||||
if (!IsAWordChar(sc.ch) || (sc.ch == '.')) {
|
||||
char s[100];
|
||||
cc.GetCurrent(s, sizeof(s));
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
if (keywords.InList(s)) {
|
||||
lastWordWasUUID = strcmp(s, "uuid") == 0;
|
||||
cc.ChangeState(SCE_C_WORD);
|
||||
sc.ChangeState(SCE_C_WORD);
|
||||
} else if (keywords2.InList(s)) {
|
||||
cc.ChangeState(SCE_C_WORD2);
|
||||
sc.ChangeState(SCE_C_WORD2);
|
||||
}
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} if (cc.state == SCE_C_PREPROCESSOR) {
|
||||
} else if (sc.state == SCE_C_PREPROCESSOR) {
|
||||
if (stylingWithinPreprocessor) {
|
||||
if (IsASpace(cc.ch)) {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
if (IsASpace(sc.ch)) {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} else {
|
||||
if (cc.atEOL && (cc.chPrev != '\\')) {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
}
|
||||
} else if (cc.state == SCE_C_COMMENT) {
|
||||
if (cc.Match('*', '/')) {
|
||||
cc.Forward();
|
||||
cc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (sc.state == SCE_C_COMMENT) {
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} else if (cc.state == SCE_C_COMMENTDOC) {
|
||||
if (cc.Match('*', '/')) {
|
||||
cc.Forward();
|
||||
cc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (sc.state == SCE_C_COMMENTDOC) {
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if ((sc.ch == '@' || sc.ch == '\\') && (noDocChars == 0)) {
|
||||
sc.SetState(SCE_C_COMMENTDOCKEYWORD);
|
||||
} else if (sc.atLineEnd) {
|
||||
noDocChars = 0;
|
||||
} else if (!isspace(sc.ch) && (sc.ch != '*')) {
|
||||
noDocChars++;
|
||||
}
|
||||
} else if (cc.state == SCE_C_COMMENTLINE || cc.state == SCE_C_COMMENTLINEDOC) {
|
||||
if (cc.ch == '\r' || cc.ch == '\n') {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
} else if (sc.state == SCE_C_COMMENTLINE || sc.state == SCE_C_COMMENTLINEDOC) {
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
visibleChars = 0;
|
||||
}
|
||||
} else if (cc.state == SCE_C_STRING) {
|
||||
if (cc.ch == '\\') {
|
||||
if (cc.chNext == '\"' || cc.chNext == '\'' || cc.chNext == '\\') {
|
||||
cc.Forward();
|
||||
} else if (sc.state == SCE_C_COMMENTDOCKEYWORD) {
|
||||
if (sc.Match('*', '/')) {
|
||||
sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR);
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (!IsADoxygenChar(sc.ch)) {
|
||||
char s[100];
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
if (!isspace(sc.ch) || !keywords3.InList(s+1)) {
|
||||
sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR);
|
||||
}
|
||||
} else if (cc.ch == '\"') {
|
||||
cc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if ((cc.atEOL) && (cc.chPrev != '\\')) {
|
||||
cc.ChangeState(SCE_C_STRINGEOL);
|
||||
sc.SetState(SCE_C_COMMENTDOC);
|
||||
}
|
||||
} else if (cc.state == SCE_C_CHARACTER) {
|
||||
if ((cc.ch == '\r' || cc.ch == '\n') && (cc.chPrev != '\\')) {
|
||||
cc.ChangeState(SCE_C_STRINGEOL);
|
||||
} else if (cc.ch == '\\') {
|
||||
if (cc.chNext == '\"' || cc.chNext == '\'' || cc.chNext == '\\') {
|
||||
cc.Forward();
|
||||
} else if (sc.state == SCE_C_STRING) {
|
||||
if (sc.ch == '\\') {
|
||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (cc.ch == '\'') {
|
||||
cc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (sc.atLineEnd) {
|
||||
sc.ChangeState(SCE_C_STRINGEOL);
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
visibleChars = 0;
|
||||
}
|
||||
} else if (cc.state == SCE_C_REGEX) {
|
||||
if (cc.ch == '\r' || cc.ch == '\n' || cc.ch == '/') {
|
||||
cc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (cc.ch == '\\') {
|
||||
} else if (sc.state == SCE_C_CHARACTER) {
|
||||
if (sc.atLineEnd) {
|
||||
sc.ChangeState(SCE_C_STRINGEOL);
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
visibleChars = 0;
|
||||
} else if (sc.ch == '\\') {
|
||||
if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_C_REGEX) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == '/') {
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
} else if (sc.ch == '\\') {
|
||||
// Gobble up the quoted character
|
||||
if (cc.chNext == '\\' || cc.chNext == '/') {
|
||||
cc.Forward();
|
||||
if (sc.chNext == '\\' || sc.chNext == '/') {
|
||||
sc.Forward();
|
||||
}
|
||||
}
|
||||
} else if (cc.state == SCE_C_VERBATIM) {
|
||||
if (cc.ch == '\"') {
|
||||
if (cc.chNext == '\"') {
|
||||
cc.Forward();
|
||||
} else if (sc.state == SCE_C_VERBATIM) {
|
||||
if (sc.ch == '\"') {
|
||||
if (sc.chNext == '\"') {
|
||||
sc.Forward();
|
||||
} else {
|
||||
cc.ForwardSetState(SCE_C_DEFAULT);
|
||||
sc.ForwardSetState(SCE_C_DEFAULT);
|
||||
}
|
||||
}
|
||||
} else if (cc.state == SCE_C_UUID) {
|
||||
if (cc.ch == '\r' || cc.ch == '\n' || cc.ch == ')') {
|
||||
cc.SetState(SCE_C_DEFAULT);
|
||||
} else if (sc.state == SCE_C_UUID) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == ')') {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (cc.state == SCE_C_DEFAULT) {
|
||||
if (cc.Match('@', '\"')) {
|
||||
cc.SetState(SCE_C_VERBATIM);
|
||||
cc.Forward();
|
||||
} else if (IsADigit(cc.ch) || (cc.ch == '.' && IsADigit(cc.chNext))) {
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_C_DEFAULT) {
|
||||
if (sc.Match('@', '\"')) {
|
||||
sc.SetState(SCE_C_VERBATIM);
|
||||
sc.Forward();
|
||||
} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||
if (lastWordWasUUID) {
|
||||
cc.SetState(SCE_C_UUID);
|
||||
sc.SetState(SCE_C_UUID);
|
||||
lastWordWasUUID = false;
|
||||
} else {
|
||||
cc.SetState(SCE_C_NUMBER);
|
||||
sc.SetState(SCE_C_NUMBER);
|
||||
}
|
||||
} else if (IsAWordStart(cc.ch) || (cc.ch == '@')) {
|
||||
} else if (IsAWordStart(sc.ch) || (sc.ch == '@')) {
|
||||
if (lastWordWasUUID) {
|
||||
cc.SetState(SCE_C_UUID);
|
||||
sc.SetState(SCE_C_UUID);
|
||||
lastWordWasUUID = false;
|
||||
} else {
|
||||
cc.SetState(SCE_C_IDENTIFIER);
|
||||
sc.SetState(SCE_C_IDENTIFIER);
|
||||
}
|
||||
} else if (cc.Match('/', '*')) {
|
||||
if (cc.Match("/**") || cc.Match("/*!")) // Support of Qt/Doxygen doc. style
|
||||
cc.SetState(SCE_C_COMMENTDOC);
|
||||
} else if (sc.Match('/', '*')) {
|
||||
if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style
|
||||
noDocChars = 0;
|
||||
sc.SetState(SCE_C_COMMENTDOC);
|
||||
} else {
|
||||
sc.SetState(SCE_C_COMMENT);
|
||||
}
|
||||
sc.Forward(); // Eat the * so it isn't used for the end of the comment
|
||||
} else if (sc.Match('/', '/')) {
|
||||
if (sc.Match("///") || sc.Match("//!")) // Support of Qt/Doxygen doc. style
|
||||
sc.SetState(SCE_C_COMMENTLINEDOC);
|
||||
else
|
||||
cc.SetState(SCE_C_COMMENT);
|
||||
cc.Forward(); // Eat the * so it isn't used for the end of the comment
|
||||
} else if (cc.Match('/', '/')) {
|
||||
if (cc.Match("///") || cc.Match("//!")) // Support of Qt/Doxygen doc. style
|
||||
cc.SetState(SCE_C_COMMENTLINEDOC);
|
||||
else
|
||||
cc.SetState(SCE_C_COMMENTLINE);
|
||||
} else if (cc.ch == '/' && IsOKBeforeRE(chPrevNonWhite)) {
|
||||
cc.SetState(SCE_C_REGEX);
|
||||
} else if (cc.ch == '\"') {
|
||||
cc.SetState(SCE_C_STRING);
|
||||
} else if (cc.ch == '\'') {
|
||||
cc.SetState(SCE_C_CHARACTER);
|
||||
} else if (cc.ch == '#' && visibleChars == 0) {
|
||||
sc.SetState(SCE_C_COMMENTLINE);
|
||||
} else if (sc.ch == '/' && IsOKBeforeRE(chPrevNonWhite)) {
|
||||
sc.SetState(SCE_C_REGEX);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_C_STRING);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_C_CHARACTER);
|
||||
} else if (sc.ch == '#' && visibleChars == 0) {
|
||||
// Preprocessor commands are alone on their line
|
||||
cc.SetState(SCE_C_PREPROCESSOR);
|
||||
sc.SetState(SCE_C_PREPROCESSOR);
|
||||
// Skip whitespace between # and preprocessor word
|
||||
do {
|
||||
cc.Forward();
|
||||
} while (IsASpace(cc.ch) && cc.More());
|
||||
} else if (isoperator(static_cast<char>(cc.ch))) {
|
||||
cc.SetState(SCE_C_OPERATOR);
|
||||
sc.Forward();
|
||||
} while ((sc.ch == ' ') && (sc.ch == '\t') && sc.More());
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
}
|
||||
} else if (isoperator(static_cast<char>(sc.ch))) {
|
||||
sc.SetState(SCE_C_OPERATOR);
|
||||
}
|
||||
}
|
||||
if (cc.atEOL) {
|
||||
|
||||
if (sc.atLineEnd) {
|
||||
// Reset states to begining of colourise so no surprises
|
||||
// if different sets of lines lexed.
|
||||
chPrevNonWhite = ' ';
|
||||
visibleChars = 0;
|
||||
lastWordWasUUID = false;
|
||||
}
|
||||
if (!IsASpace(cc.ch)) {
|
||||
chPrevNonWhite = cc.ch;
|
||||
if (!IsASpace(sc.ch)) {
|
||||
chPrevNonWhite = sc.ch;
|
||||
visibleChars++;
|
||||
}
|
||||
}
|
||||
cc.Complete();
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[],
|
||||
|
204
contrib/src/stc/scintilla/src/LexCrontab.cxx
Normal file
204
contrib/src/stc/scintilla/src/LexCrontab.cxx
Normal file
@@ -0,0 +1,204 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file LexCrontab.cxx
|
||||
** Lexer to use with extended crontab files used by a powerful
|
||||
** Windows scheduler/event monitor/automation manager nnCron.
|
||||
** (http://nemtsev.virtualave.net/)
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordList
|
||||
*keywordLists[], Accessor &styler)
|
||||
{
|
||||
int state = SCE_NNCRONTAB_DEFAULT;
|
||||
char chNext = styler[startPos];
|
||||
int lengthDoc = startPos + length;
|
||||
// create a buffer large enough to take the largest chunk...
|
||||
char *buffer = new char[length];
|
||||
int bufferCount = 0;
|
||||
// used when highliting environment variables inside quoted string:
|
||||
bool insideString = false;
|
||||
|
||||
// this assumes that we have 3 keyword list in conf.properties
|
||||
WordList §ion = *keywordLists[0];
|
||||
WordList &keyword = *keywordLists[1];
|
||||
WordList &modifier = *keywordLists[2];
|
||||
|
||||
// go through all provided text segment
|
||||
// using the hand-written state machine shown below
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
for (int i = startPos; i < lengthDoc; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
switch(state) {
|
||||
case SCE_NNCRONTAB_DEFAULT:
|
||||
if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') {
|
||||
// whitespace is simply ignored here...
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT);
|
||||
break;
|
||||
} else if( ch == '#' && styler.SafeGetCharAt(i+1) == '(') {
|
||||
// signals the start of a task...
|
||||
state = SCE_NNCRONTAB_TASK;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
||||
}
|
||||
else if( ch == '\\' && styler.SafeGetCharAt(i+1) == ' ') {
|
||||
// signals the start of an extended comment...
|
||||
state = SCE_NNCRONTAB_COMMENT;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
||||
} else if( ch == '#' ) {
|
||||
// signals the start of a plain comment...
|
||||
state = SCE_NNCRONTAB_COMMENT;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
||||
} else if( ch == ')' && styler.SafeGetCharAt(i+1) == '#') {
|
||||
// signals the end of a task...
|
||||
state = SCE_NNCRONTAB_TASK;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
||||
} else if( ch == '"') {
|
||||
state = SCE_NNCRONTAB_STRING;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_STRING);
|
||||
} else if( ch == '%') {
|
||||
// signals environment variables
|
||||
state = SCE_NNCRONTAB_ENVIRONMENT;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||
} else if( ch == '*' ) {
|
||||
// signals an asterisk
|
||||
// no state jump necessary for this simple case...
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_ASTERISK);
|
||||
} else if( isalpha(ch) || ch == '<' ) {
|
||||
// signals the start of an identifier
|
||||
bufferCount = 0;
|
||||
buffer[bufferCount++] = ch;
|
||||
state = SCE_NNCRONTAB_IDENTIFIER;
|
||||
} else if( isdigit(ch) ) {
|
||||
// signals the start of a number
|
||||
bufferCount = 0;
|
||||
buffer[bufferCount++] = ch;
|
||||
state = SCE_NNCRONTAB_NUMBER;
|
||||
} else {
|
||||
// style it the default style..
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT);
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_NNCRONTAB_COMMENT:
|
||||
// if we find a newline here,
|
||||
// we simply go to default state
|
||||
// else continue to work on it...
|
||||
if( ch == '\n' || ch == '\r' ) {
|
||||
state = SCE_NNCRONTAB_DEFAULT;
|
||||
} else {
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_COMMENT);
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_NNCRONTAB_TASK:
|
||||
// if we find a newline here,
|
||||
// we simply go to default state
|
||||
// else continue to work on it...
|
||||
if( ch == '\n' || ch == '\r' ) {
|
||||
state = SCE_NNCRONTAB_DEFAULT;
|
||||
} else {
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_TASK);
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_NNCRONTAB_STRING:
|
||||
if( ch == '%' ) {
|
||||
state = SCE_NNCRONTAB_ENVIRONMENT;
|
||||
insideString = true;
|
||||
styler.ColourTo(i-1,SCE_NNCRONTAB_STRING);
|
||||
break;
|
||||
}
|
||||
// if we find the end of a string char, we simply go to default state
|
||||
// else we're still dealing with an string...
|
||||
if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') ||
|
||||
(ch == '\n') || (ch == '\r') ) {
|
||||
state = SCE_NNCRONTAB_DEFAULT;
|
||||
}
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_STRING);
|
||||
break;
|
||||
|
||||
case SCE_NNCRONTAB_ENVIRONMENT:
|
||||
// if we find the end of a string char, we simply go to default state
|
||||
// else we're still dealing with an string...
|
||||
if( ch == '%' && insideString ) {
|
||||
state = SCE_NNCRONTAB_STRING;
|
||||
insideString = false;
|
||||
break;
|
||||
}
|
||||
if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\')
|
||||
|| (ch == '\n') || (ch == '\r') ) {
|
||||
state = SCE_NNCRONTAB_DEFAULT;
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT);
|
||||
break;
|
||||
}
|
||||
styler.ColourTo(i+1,SCE_NNCRONTAB_ENVIRONMENT);
|
||||
break;
|
||||
|
||||
case SCE_NNCRONTAB_IDENTIFIER:
|
||||
// stay in CONF_IDENTIFIER state until we find a non-alphanumeric
|
||||
if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') ||
|
||||
(ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') ) {
|
||||
buffer[bufferCount++] = ch;
|
||||
} else {
|
||||
state = SCE_NNCRONTAB_DEFAULT;
|
||||
buffer[bufferCount] = '\0';
|
||||
|
||||
// check if the buffer contains a keyword,
|
||||
// and highlight it if it is a keyword...
|
||||
if(section.InList(buffer)) {
|
||||
styler.ColourTo(i,SCE_NNCRONTAB_SECTION );
|
||||
} else if(keyword.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_NNCRONTAB_KEYWORD );
|
||||
} // else if(strchr(buffer,'/') || strchr(buffer,'.')) {
|
||||
// styler.ColourTo(i-1,SCE_NNCRONTAB_EXTENSION);
|
||||
// }
|
||||
else if(modifier.InList(buffer)) {
|
||||
styler.ColourTo(i-1,SCE_NNCRONTAB_MODIFIER );
|
||||
} else {
|
||||
styler.ColourTo(i-1,SCE_NNCRONTAB_DEFAULT);
|
||||
}
|
||||
// push back the faulty character
|
||||
chNext = styler[i--];
|
||||
}
|
||||
break;
|
||||
|
||||
case SCE_NNCRONTAB_NUMBER:
|
||||
// stay in CONF_NUMBER state until we find a non-numeric
|
||||
if( isdigit(ch) /* || ch == '.' */ ) {
|
||||
buffer[bufferCount++] = ch;
|
||||
} else {
|
||||
state = SCE_NNCRONTAB_DEFAULT;
|
||||
buffer[bufferCount] = '\0';
|
||||
// Colourize here... (normal number)
|
||||
styler.ColourTo(i-1,SCE_NNCRONTAB_NUMBER);
|
||||
// push back a character
|
||||
chNext = styler[i--];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, "nncrontab");
|
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
@@ -31,23 +32,6 @@ inline bool isEiffelOperator(unsigned int ch) {
|
||||
ch == '!' || ch == '@' || ch == '?';
|
||||
}
|
||||
|
||||
static void getRangeLowered(unsigned int start,
|
||||
unsigned int end,
|
||||
Accessor &styler,
|
||||
char *s,
|
||||
unsigned int len) {
|
||||
unsigned int i = 0;
|
||||
while ((i < end - start + 1) && (i < len-1)) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
i++;
|
||||
}
|
||||
s[i] = '\0';
|
||||
}
|
||||
|
||||
inline bool IsASpace(unsigned int ch) {
|
||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||
}
|
||||
|
||||
inline bool IsAWordChar(unsigned int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||
}
|
||||
@@ -56,81 +40,6 @@ inline bool IsAWordStart(unsigned int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||
}
|
||||
|
||||
inline bool IsADigit(unsigned int ch) {
|
||||
return (ch >= '0') && (ch <= '9');
|
||||
}
|
||||
|
||||
// All languages handled so far can treat all characters >= 0x80 as one class
|
||||
// which just continues the current token or starts an identifier if in default.
|
||||
// DBCS treated specially as the second character can be < 0x80 and hence
|
||||
// syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80
|
||||
class xColouriseContext {
|
||||
Accessor &styler;
|
||||
int lengthDoc;
|
||||
int currentPos;
|
||||
xColouriseContext& operator=(const xColouriseContext&) {
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
int state;
|
||||
unsigned int chPrev;
|
||||
unsigned int ch;
|
||||
unsigned int chNext;
|
||||
|
||||
xColouriseContext(unsigned int startPos, int length,
|
||||
int initStyle, Accessor &styler_) :
|
||||
styler(styler_),
|
||||
lengthDoc(startPos + length),
|
||||
currentPos(startPos),
|
||||
state(initStyle),
|
||||
chPrev(0),
|
||||
ch(0),
|
||||
chNext(0) {
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
int pos = currentPos;
|
||||
ch = static_cast<unsigned char>(styler.SafeGetCharAt(pos));
|
||||
if (styler.IsLeadByte(static_cast<char>(ch))) {
|
||||
pos++;
|
||||
ch = ch << 8;
|
||||
ch |= static_cast<unsigned char>(styler.SafeGetCharAt(pos));
|
||||
}
|
||||
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(pos+1));
|
||||
if (styler.IsLeadByte(static_cast<char>(chNext))) {
|
||||
chNext = chNext << 8;
|
||||
chNext |= static_cast<unsigned char>(styler.SafeGetCharAt(pos+2));
|
||||
}
|
||||
}
|
||||
void Complete() {
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
}
|
||||
bool More() {
|
||||
return currentPos <= lengthDoc;
|
||||
}
|
||||
void Forward() {
|
||||
chPrev = ch;
|
||||
currentPos++;
|
||||
if (ch >= 0x100)
|
||||
currentPos++;
|
||||
ch = chNext;
|
||||
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+1));
|
||||
if (styler.IsLeadByte(static_cast<char>(chNext))) {
|
||||
chNext = chNext << 8;
|
||||
chNext |= static_cast<unsigned char>(styler.SafeGetCharAt(currentPos + 2));
|
||||
}
|
||||
}
|
||||
void ChangeState(int state_) {
|
||||
state = state_;
|
||||
}
|
||||
void SetState(int state_) {
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
state = state_;
|
||||
}
|
||||
void GetCurrentLowered(char *s, int len) {
|
||||
getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len);
|
||||
}
|
||||
};
|
||||
|
||||
static void ColouriseEiffelDoc(unsigned int startPos,
|
||||
int length,
|
||||
int initStyle,
|
||||
@@ -139,68 +48,68 @@ static void ColouriseEiffelDoc(unsigned int startPos,
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
xColouriseContext lc(startPos, length, initStyle, styler);
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
for (; lc.More(); lc.Forward()) {
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
|
||||
if (lc.state == SCE_EIFFEL_STRINGEOL) {
|
||||
if (lc.ch != '\r' && lc.ch != '\n') {
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
if (sc.state == SCE_EIFFEL_STRINGEOL) {
|
||||
if (sc.ch != '\r' && sc.ch != '\n') {
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
}
|
||||
} else if (lc.state == SCE_EIFFEL_OPERATOR) {
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
} else if (lc.state == SCE_EIFFEL_WORD) {
|
||||
if (!IsAWordChar(lc.ch)) {
|
||||
} else if (sc.state == SCE_EIFFEL_OPERATOR) {
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
} else if (sc.state == SCE_EIFFEL_WORD) {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
char s[100];
|
||||
lc.GetCurrentLowered(s, sizeof(s));
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
if (!keywords.InList(s)) {
|
||||
lc.ChangeState(SCE_EIFFEL_IDENTIFIER);
|
||||
sc.ChangeState(SCE_EIFFEL_IDENTIFIER);
|
||||
}
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
}
|
||||
} else if (lc.state == SCE_EIFFEL_NUMBER) {
|
||||
if (!IsAWordChar(lc.ch)) {
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
} else if (sc.state == SCE_EIFFEL_NUMBER) {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
}
|
||||
} else if (lc.state == SCE_EIFFEL_COMMENTLINE) {
|
||||
if (lc.ch == '\r' || lc.ch == '\n') {
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
} else if (sc.state == SCE_EIFFEL_COMMENTLINE) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n') {
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
}
|
||||
} else if (lc.state == SCE_EIFFEL_STRING) {
|
||||
if (lc.ch == '%') {
|
||||
lc.Forward();
|
||||
} else if (lc.ch == '\"') {
|
||||
lc.Forward();
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
} else if (sc.state == SCE_EIFFEL_STRING) {
|
||||
if (sc.ch == '%') {
|
||||
sc.Forward();
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.Forward();
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
}
|
||||
} else if (lc.state == SCE_EIFFEL_CHARACTER) {
|
||||
if (lc.ch == '\r' || lc.ch == '\n') {
|
||||
lc.SetState(SCE_EIFFEL_STRINGEOL);
|
||||
} else if (lc.ch == '%') {
|
||||
lc.Forward();
|
||||
} else if (lc.ch == '\'') {
|
||||
lc.Forward();
|
||||
lc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
} else if (sc.state == SCE_EIFFEL_CHARACTER) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n') {
|
||||
sc.SetState(SCE_EIFFEL_STRINGEOL);
|
||||
} else if (sc.ch == '%') {
|
||||
sc.Forward();
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.Forward();
|
||||
sc.SetState(SCE_EIFFEL_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (lc.state == SCE_EIFFEL_DEFAULT) {
|
||||
if (lc.ch == '-' && lc.chNext == '-') {
|
||||
lc.SetState(SCE_EIFFEL_COMMENTLINE);
|
||||
} else if (lc.ch == '\"') {
|
||||
lc.SetState(SCE_EIFFEL_STRING);
|
||||
} else if (lc.ch == '\'') {
|
||||
lc.SetState(SCE_EIFFEL_CHARACTER);
|
||||
} else if (IsADigit(lc.ch) || (lc.ch == '.')) {
|
||||
lc.SetState(SCE_EIFFEL_NUMBER);
|
||||
} else if (IsAWordStart(lc.ch)) {
|
||||
lc.SetState(SCE_EIFFEL_WORD);
|
||||
} else if (isEiffelOperator(lc.ch)) {
|
||||
lc.SetState(SCE_EIFFEL_OPERATOR);
|
||||
if (sc.state == SCE_EIFFEL_DEFAULT) {
|
||||
if (sc.ch == '-' && sc.chNext == '-') {
|
||||
sc.SetState(SCE_EIFFEL_COMMENTLINE);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_EIFFEL_STRING);
|
||||
} else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_EIFFEL_CHARACTER);
|
||||
} else if (IsADigit(sc.ch) || (sc.ch == '.')) {
|
||||
sc.SetState(SCE_EIFFEL_NUMBER);
|
||||
} else if (IsAWordStart(sc.ch)) {
|
||||
sc.SetState(SCE_EIFFEL_WORD);
|
||||
} else if (isEiffelOperator(sc.ch)) {
|
||||
sc.SetState(SCE_EIFFEL_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
lc.Complete();
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static bool IsEiffelComment(Accessor &styler, int pos, int len) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file LexHTML.cxx
|
||||
** Lexer for HTML.
|
||||
**/
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START)
|
||||
#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START)
|
||||
|
||||
enum { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML };
|
||||
enum { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock };
|
||||
enum { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc };
|
||||
|
||||
static int segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, int prevValue) {
|
||||
char s[30 + 1];
|
||||
s[0] = '\0';
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
//Platform::DebugPrintf("Scripting indicator [%s]\n", s);
|
||||
if (strstr(s, "src")) // External script
|
||||
return eScriptNone;
|
||||
@@ -55,11 +55,11 @@ static int segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigne
|
||||
static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, unsigned int end) {
|
||||
int iResult = 0;
|
||||
char s[30 + 1];
|
||||
s[0] = '\0';
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
if (0 == strncmp(s, "php", 3)) {
|
||||
iResult = 3;
|
||||
}
|
||||
@@ -68,22 +68,21 @@ static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, u
|
||||
}
|
||||
|
||||
static int ScriptOfState(int state) {
|
||||
int scriptLanguage;
|
||||
|
||||
if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) {
|
||||
scriptLanguage = eScriptPython;
|
||||
return eScriptPython;
|
||||
} else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) {
|
||||
scriptLanguage = eScriptVBS;
|
||||
return eScriptVBS;
|
||||
} else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) {
|
||||
scriptLanguage = eScriptJS;
|
||||
return eScriptJS;
|
||||
} else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) {
|
||||
scriptLanguage = eScriptPHP;
|
||||
return eScriptPHP;
|
||||
} else if ((state >= SCE_H_SGML_DEFAULT) && (state <= SCE_H_SGML_BLOCK_DEFAULT)) {
|
||||
return eScriptSGML;
|
||||
} else if (state == SCE_H_SGML_BLOCK_DEFAULT) {
|
||||
return eScriptSGMLblock;
|
||||
} else {
|
||||
// scriptLanguage = defaultScript;
|
||||
scriptLanguage = eScriptNone;
|
||||
return eScriptNone;
|
||||
}
|
||||
|
||||
return scriptLanguage;
|
||||
}
|
||||
|
||||
static int statePrintForState(int state, int inScriptType) {
|
||||
@@ -174,11 +173,11 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k
|
||||
chAttr = SCE_H_NUMBER;
|
||||
} else {
|
||||
char s[30 + 1];
|
||||
s[0] = '\0';
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
if (keywords.InList(s))
|
||||
chAttr = SCE_H_ATTRIBUTE;
|
||||
}
|
||||
@@ -195,18 +194,14 @@ static int classifyTagHTML(unsigned int start, unsigned int end,
|
||||
unsigned int i = 0;
|
||||
for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) {
|
||||
char ch = styler[cPos];
|
||||
if (ch != '<')
|
||||
if ((ch != '<') && (ch != '/'))
|
||||
s[i++] = static_cast<char>(tolower(ch));
|
||||
}
|
||||
s[i] = '\0';
|
||||
bool isScript = false;
|
||||
char chAttr = SCE_H_TAGUNKNOWN;
|
||||
if (s[0] == '!' && s[1] == '-' && s[2] == '-') { //Comment
|
||||
chAttr = SCE_H_COMMENT;
|
||||
} else if (strcmp(s, "![cdata[") == 0) { // In lower case because already converted
|
||||
chAttr = SCE_H_CDATA;
|
||||
} else if (s[0] == '!') {
|
||||
chAttr = SCE_H_SGML;
|
||||
if (s[0] == '!') {
|
||||
chAttr = SCE_H_SGML_DEFAULT;
|
||||
} else if (s[0] == '/') { // Closing tag
|
||||
if (keywords.InList(s + 1))
|
||||
chAttr = SCE_H_TAG;
|
||||
@@ -231,10 +226,11 @@ static void classifyWordHTJS(unsigned int start, unsigned int end,
|
||||
chAttr = SCE_HJ_NUMBER;
|
||||
else {
|
||||
char s[30 + 1];
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
if (keywords.InList(s))
|
||||
chAttr = SCE_HJ_KEYWORD;
|
||||
}
|
||||
@@ -248,10 +244,11 @@ static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keyw
|
||||
chAttr = SCE_HB_NUMBER;
|
||||
else {
|
||||
char s[30 + 1];
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
if (keywords.InList(s)) {
|
||||
chAttr = SCE_HB_WORD;
|
||||
if (strcmp(s, "rem") == 0)
|
||||
@@ -268,10 +265,11 @@ static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keyw
|
||||
static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord, int inScriptType) {
|
||||
bool wordIsNumber = isdigit(styler[start]);
|
||||
char s[30 + 1];
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
char chAttr = SCE_HP_IDENTIFIER;
|
||||
if (0 == strcmp(prevWord, "class"))
|
||||
chAttr = SCE_HP_CLASSNAME;
|
||||
@@ -294,16 +292,37 @@ static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &ke
|
||||
chAttr = SCE_HPHP_NUMBER;
|
||||
else {
|
||||
char s[30 + 1];
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
s[i] = '\0';
|
||||
if (keywords.InList(s))
|
||||
chAttr = SCE_HPHP_WORD;
|
||||
}
|
||||
styler.ColourTo(end, chAttr);
|
||||
}
|
||||
|
||||
static bool isWordHSGML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||
char s[30 + 1];
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
}
|
||||
s[i] = '\0';
|
||||
return keywords.InList(s);
|
||||
}
|
||||
|
||||
static bool isWordCdata(unsigned int start, unsigned int end, Accessor &styler) {
|
||||
char s[30 + 1];
|
||||
unsigned int i = 0;
|
||||
for (; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
}
|
||||
s[i] = '\0';
|
||||
return (0 == strcmp(s, "[CDATA["));
|
||||
}
|
||||
|
||||
// Return the first state to reach when entering a scripting language
|
||||
static int StateForScript(int scriptLanguage) {
|
||||
int Result;
|
||||
@@ -320,6 +339,9 @@ static int StateForScript(int scriptLanguage) {
|
||||
case eScriptXML:
|
||||
Result = SCE_H_TAGUNKNOWN;
|
||||
break;
|
||||
case eScriptSGML:
|
||||
Result = SCE_H_SGML_DEFAULT;
|
||||
break;
|
||||
default :
|
||||
Result = SCE_HJ_START;
|
||||
break;
|
||||
@@ -331,6 +353,10 @@ inline bool ishtmlwordchar(char ch) {
|
||||
return isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#';
|
||||
}
|
||||
|
||||
inline bool issgmlwordchar(char ch) {
|
||||
return isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '[';
|
||||
}
|
||||
|
||||
static bool InTagState(int state) {
|
||||
return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN ||
|
||||
state == SCE_H_SCRIPT ||
|
||||
@@ -339,6 +365,10 @@ static bool InTagState(int state) {
|
||||
state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING;
|
||||
}
|
||||
|
||||
static bool IsCommentState(const int state) {
|
||||
return state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT;
|
||||
}
|
||||
|
||||
static bool isLineEnd(char ch) {
|
||||
return ch == '\r' || ch == '\n';
|
||||
}
|
||||
@@ -348,23 +378,23 @@ static bool isOKBeforeRE(char ch) {
|
||||
}
|
||||
|
||||
static bool isPHPStringState(int state) {
|
||||
return
|
||||
(state == SCE_HPHP_HSTRING) ||
|
||||
(state == SCE_HPHP_SIMPLESTRING) ||
|
||||
(state == SCE_HPHP_HSTRING_VARIABLE);
|
||||
return
|
||||
(state == SCE_HPHP_HSTRING) ||
|
||||
(state == SCE_HPHP_SIMPLESTRING) ||
|
||||
(state == SCE_HPHP_HSTRING_VARIABLE);
|
||||
}
|
||||
|
||||
static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
WordList &keywords2 = *keywordlists[1];
|
||||
WordList &keywords3 = *keywordlists[2];
|
||||
WordList &keywords4 = *keywordlists[3];
|
||||
WordList &keywords5 = *keywordlists[4];
|
||||
WordList &keywords6 = *keywordlists[5]; // SGML (DTD) keywords
|
||||
|
||||
// Lexer for HTML requires more lexical states (7 bits worth) than most lexers
|
||||
styler.StartAt(startPos, 127);
|
||||
styler.StartAt(startPos, STYLE_MAX);
|
||||
char prevWord[200];
|
||||
prevWord[0] = '\0';
|
||||
int StateToPrint = initStyle;
|
||||
@@ -374,49 +404,51 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
if (InTagState(state)) {
|
||||
while ((startPos > 0) && (InTagState(styler.StyleAt(startPos - 1)))) {
|
||||
startPos--;
|
||||
length++;
|
||||
length++;
|
||||
}
|
||||
state = SCE_H_DEFAULT;
|
||||
}
|
||||
styler.StartAt(startPos, 127);
|
||||
styler.StartAt(startPos, STYLE_MAX);
|
||||
|
||||
int lineState = eScriptVBS;
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
if (lineCurrent > 0)
|
||||
int lineState;
|
||||
if (lineCurrent > 0) {
|
||||
lineState = styler.GetLineState(lineCurrent);
|
||||
int inScriptType = (lineState >> 0) & 0x03; // 2 bits of scripting type
|
||||
bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag
|
||||
bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag
|
||||
int defaultScript = (lineState >> 4) & 0x0F; // 4 bits of script name
|
||||
int beforePreProc = (lineState >> 8) & 0xFF; // 8 bits of state
|
||||
} else {
|
||||
// Default client and ASP scripting language is JavaScript
|
||||
lineState = eScriptJS << 8;
|
||||
lineState |= styler.GetPropertyInt("asp.default.language", eScriptJS) << 4;
|
||||
}
|
||||
int inScriptType = (lineState >> 0) & 0x03; // 2 bits of scripting type
|
||||
bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag
|
||||
bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag
|
||||
int aspScript = (lineState >> 4) & 0x0F; // 4 bits of script name
|
||||
int clientScript = (lineState >> 8) & 0x0F; // 4 bits of script name
|
||||
int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state
|
||||
|
||||
int scriptLanguage = ScriptOfState(state);
|
||||
|
||||
bool fold = styler.GetPropertyInt("fold");
|
||||
bool foldHTML = styler.GetPropertyInt("fold.html",0);
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact",1);
|
||||
|
||||
fold = foldHTML && fold;
|
||||
const bool foldHTML = styler.GetPropertyInt("fold.html", 0);
|
||||
const bool fold = foldHTML && styler.GetPropertyInt("fold");
|
||||
const bool foldCompact = styler.GetPropertyInt("fold.compact", 1);
|
||||
|
||||
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
||||
int levelCurrent = levelPrev;
|
||||
int visibleChars;
|
||||
|
||||
visibleChars = 0;
|
||||
int visibleChars = 0;
|
||||
|
||||
char chPrev = ' ';
|
||||
char ch = ' ';
|
||||
char chPrevNonWhite = ' ';
|
||||
styler.StartSegment(startPos);
|
||||
int lengthDoc = startPos + length;
|
||||
const int lengthDoc = startPos + length;
|
||||
for (int i = startPos; i < lengthDoc; i++) {
|
||||
char chPrev2 = chPrev;
|
||||
const char chPrev2 = chPrev;
|
||||
chPrev = ch;
|
||||
if (ch != ' ' && ch != '\t')
|
||||
chPrevNonWhite = ch;
|
||||
ch = styler[i];
|
||||
char chNext = styler.SafeGetCharAt(i + 1);
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
const char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
|
||||
// Handle DBCS codepages
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
@@ -451,18 +483,21 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
} else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) {
|
||||
// check if the number of tabs is lower than the level
|
||||
int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8;
|
||||
for (int j = 0;Findlevel > 0;j++) {
|
||||
for (int j = 0; Findlevel > 0; j++) {
|
||||
char chTmp = styler.SafeGetCharAt(i + j + 1);
|
||||
if (chTmp == '\t') {
|
||||
Findlevel -= 8;
|
||||
} else if (chTmp == ' ') {
|
||||
} else if (chTmp == ' ') {
|
||||
Findlevel--;
|
||||
} else break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Findlevel > 0) {
|
||||
levelCurrent -= Findlevel / 8;
|
||||
if (Findlevel % 8) levelCurrent--;
|
||||
if (Findlevel % 8)
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -487,11 +522,12 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
}
|
||||
lineCurrent++;
|
||||
styler.SetLineState(lineCurrent,
|
||||
((inScriptType & 0x03) << 0) |
|
||||
((tagOpened & 0x01) << 2) |
|
||||
((tagClosing & 0x01) << 3) |
|
||||
((defaultScript & 0x0F) << 4) |
|
||||
((beforePreProc & 0xFF) << 8));
|
||||
((inScriptType & 0x03) << 0) |
|
||||
((tagOpened & 0x01) << 2) |
|
||||
((tagClosing & 0x01) << 3) |
|
||||
((aspScript & 0x0F) << 4) |
|
||||
((clientScript & 0x0F) << 8) |
|
||||
((beforePreProc & 0xFF) << 12));
|
||||
}
|
||||
|
||||
// generic end of script processing
|
||||
@@ -503,9 +539,9 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
case SCE_H_SINGLESTRING:
|
||||
case SCE_HJ_COMMENT:
|
||||
case SCE_HJ_COMMENTDOC:
|
||||
// SCE_HJ_COMMENTLINE removed as this is a common thing done to hide
|
||||
// the end of script marker from some JS interpreters.
|
||||
//case SCE_HJ_COMMENTLINE:
|
||||
// SCE_HJ_COMMENTLINE removed as this is a common thing done to hide
|
||||
// the end of script marker from some JS interpreters.
|
||||
//case SCE_HJ_COMMENTLINE:
|
||||
case SCE_HJ_DOUBLESTRING:
|
||||
case SCE_HJ_SINGLESTRING:
|
||||
case SCE_HB_STRING:
|
||||
@@ -514,29 +550,31 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
case SCE_HP_TRIPLEDOUBLE:
|
||||
break;
|
||||
default :
|
||||
// maybe we should check here if it's a tag and if it's SCRIPT
|
||||
// closing tag of the script (it's a closing HTML tag anyway)
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
state = SCE_H_TAGUNKNOWN;
|
||||
inScriptType = eHtml;
|
||||
scriptLanguage = eScriptNone;
|
||||
clientScript = eScriptJS;
|
||||
i += 2;
|
||||
// unfold closing script
|
||||
levelCurrent--;
|
||||
visibleChars += 2;
|
||||
tagClosing = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
// handle the start of PHP pre-processor = Non-HTML
|
||||
else if ((state != SCE_H_ASPAT) &&
|
||||
!isPHPStringState(state) &&
|
||||
(state != SCE_HPHP_COMMENT) &&
|
||||
(ch == '<') &&
|
||||
(chNext == '?')) {
|
||||
else if ((state != SCE_H_ASPAT) &&
|
||||
!isPHPStringState(state) &&
|
||||
(state != SCE_HPHP_COMMENT) &&
|
||||
(ch == '<') &&
|
||||
(chNext == '?')) {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
beforePreProc = state;
|
||||
scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment() + 2, i + 10, eScriptPHP);
|
||||
i++;
|
||||
visibleChars++;
|
||||
i += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 10);
|
||||
if (scriptLanguage == eScriptXML)
|
||||
styler.ColourTo(i, SCE_H_XMLSTART);
|
||||
@@ -567,6 +605,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
|
||||
if (chNext2 == '@') {
|
||||
i += 2; // place as if it was the second next char treated
|
||||
visibleChars += 2;
|
||||
state = SCE_H_ASPAT;
|
||||
} else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) {
|
||||
styler.ColourTo(i + 3, SCE_H_ASP);
|
||||
@@ -576,11 +615,13 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
} else {
|
||||
if (chNext2 == '=') {
|
||||
i += 2; // place as if it was the second next char treated
|
||||
visibleChars += 2;
|
||||
} else {
|
||||
i++; // place as if it was the next char treated
|
||||
visibleChars++;
|
||||
}
|
||||
|
||||
state = StateForScript(defaultScript);
|
||||
state = StateForScript(aspScript);
|
||||
}
|
||||
scriptLanguage = eScriptVBS;
|
||||
styler.ColourTo(i, SCE_H_ASP);
|
||||
@@ -591,17 +632,42 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
continue;
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
// handle the start of SGML language (DTD)
|
||||
else if (((scriptLanguage == eScriptNone) || (scriptLanguage == eScriptXML)) &&
|
||||
(chPrev == '<') &&
|
||||
(ch == '!') &&
|
||||
(StateToPrint != SCE_H_CDATA) && (!IsCommentState(StateToPrint))) {
|
||||
beforePreProc = state;
|
||||
styler.ColourTo(i - 2, StateToPrint);
|
||||
if ((chNext == '-') && (chNext2 == '-')) {
|
||||
state = SCE_H_COMMENT; // wait for a pending command
|
||||
}
|
||||
else if (isWordCdata(i + 1, i + 7, styler)) {
|
||||
state = SCE_H_CDATA;
|
||||
} else {
|
||||
styler.ColourTo(i, SCE_H_SGML_DEFAULT); // <! is default
|
||||
scriptLanguage = eScriptSGML;
|
||||
state = SCE_H_SGML_COMMAND; // wait for a pending command
|
||||
}
|
||||
// fold whole tag (-- when closing the tag)
|
||||
|
||||
levelCurrent++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// handle the end of a pre-processor = Non-HTML
|
||||
else if (
|
||||
((inScriptType == eNonHtmlPreProc)
|
||||
|| (inScriptType == eNonHtmlScriptPreProc)) && (
|
||||
((scriptLanguage == eScriptPHP) && (ch == '?') && !isPHPStringState(state) && (state != SCE_HPHP_COMMENT)) ||
|
||||
((scriptLanguage != eScriptNone) && !isStringState(state) &&
|
||||
(ch == '%'))
|
||||
) && (chNext == '>')) {
|
||||
else if ((
|
||||
((inScriptType == eNonHtmlPreProc)
|
||||
|| (inScriptType == eNonHtmlScriptPreProc)) && (
|
||||
((scriptLanguage == eScriptPHP) && (ch == '?') && !isPHPStringState(state) && (state != SCE_HPHP_COMMENT)) ||
|
||||
((scriptLanguage != eScriptNone) && !isStringState(state) &&
|
||||
(ch == '%'))
|
||||
) && (chNext == '>')) ||
|
||||
((scriptLanguage == eScriptSGML) && (ch == '>') && (state != SCE_H_SGML_COMMENT))) {
|
||||
if (state == SCE_H_ASPAT) {
|
||||
defaultScript = segIsScriptingIndicator(styler,
|
||||
styler.GetStartSegment(), i - 1, defaultScript);
|
||||
aspScript = segIsScriptingIndicator(styler,
|
||||
styler.GetStartSegment(), i - 1, aspScript);
|
||||
}
|
||||
// Bounce out of any ASP mode
|
||||
switch (state) {
|
||||
@@ -624,11 +690,16 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (scriptLanguage != eScriptSGML) {
|
||||
i++;
|
||||
visibleChars++;
|
||||
}
|
||||
if (ch == '%')
|
||||
styler.ColourTo(i, SCE_H_ASP);
|
||||
else if (scriptLanguage == eScriptXML)
|
||||
styler.ColourTo(i, SCE_H_XMLEND);
|
||||
else if (scriptLanguage == eScriptSGML)
|
||||
styler.ColourTo(i, SCE_H_SGML_DEFAULT);
|
||||
else
|
||||
styler.ColourTo(i, SCE_H_QUESTION);
|
||||
state = beforePreProc;
|
||||
@@ -648,47 +719,156 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
if (ch == '<') {
|
||||
// in HTML, fold on tag open and unfold on tag close
|
||||
tagOpened = true;
|
||||
if (chNext == '/') {
|
||||
tagClosing = true;
|
||||
} else {
|
||||
tagClosing = false;
|
||||
}
|
||||
|
||||
tagClosing = (chNext == '/');
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
if (chNext == '!' && chNext2 == '-' && styler.SafeGetCharAt(i + 3) == '-') {
|
||||
// should be better
|
||||
i += 3;
|
||||
levelCurrent++;
|
||||
state = SCE_H_COMMENT;
|
||||
} else
|
||||
if (chNext != '!')
|
||||
state = SCE_H_TAGUNKNOWN;
|
||||
} else if (ch == '&') {
|
||||
styler.ColourTo(i - 1, SCE_H_DEFAULT);
|
||||
state = SCE_H_ENTITY;
|
||||
}
|
||||
break;
|
||||
case SCE_H_COMMENT:
|
||||
if ((ch == '>') && (chPrev == '-') && (chPrev2 == '-')) {
|
||||
// unfold HTML comment
|
||||
levelCurrent--;
|
||||
case SCE_H_SGML_DEFAULT:
|
||||
if (scriptLanguage == eScriptSGMLblock)
|
||||
StateToPrint = SCE_H_SGML_BLOCK_DEFAULT;
|
||||
|
||||
if (ch == '\"') {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
state = SCE_H_SGML_DOUBLESTRING;
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
state = SCE_H_SGML_SIMPLESTRING;
|
||||
} else if ((ch == '-') && (chPrev == '-')) {
|
||||
styler.ColourTo(i - 2, StateToPrint);
|
||||
state = SCE_H_SGML_COMMENT;
|
||||
} else if (isalpha(ch) && (chPrev == '%')) {
|
||||
styler.ColourTo(i - 2, StateToPrint);
|
||||
state = SCE_H_SGML_ENTITY;
|
||||
} else if (ch == '#') {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
state = SCE_H_SGML_SPECIAL;
|
||||
} else if (ch == '[') {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
scriptLanguage = eScriptSGMLblock;
|
||||
} else if (ch == ']') {
|
||||
if (scriptLanguage == eScriptSGMLblock) {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
scriptLanguage = eScriptSGML;
|
||||
} else {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
styler.ColourTo(i, SCE_H_SGML_ERROR);
|
||||
}
|
||||
} else if (scriptLanguage == eScriptSGMLblock) {
|
||||
if ((ch == '!') && (chPrev == '<')) {
|
||||
styler.ColourTo(i - 2, StateToPrint);
|
||||
styler.ColourTo(i, SCE_H_SGML_DEFAULT);
|
||||
state = SCE_H_SGML_COMMAND;
|
||||
} else if (ch == '>') {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
styler.ColourTo(i, SCE_H_SGML_DEFAULT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_COMMAND:
|
||||
if ((ch == '-') && (chPrev == '-')) {
|
||||
styler.ColourTo(i - 2, StateToPrint);
|
||||
state = SCE_H_SGML_COMMENT;
|
||||
} else if (!issgmlwordchar(ch)) {
|
||||
if (isWordHSGML(styler.GetStartSegment(), i - 1, keywords6, styler)) {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
state = SCE_H_SGML_1ST_PARAM;
|
||||
} else {
|
||||
state = SCE_H_SGML_ERROR;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_1ST_PARAM:
|
||||
// wait for the beginning of the word
|
||||
if ((ch == '-') && (chPrev == '-')) {
|
||||
if (scriptLanguage == eScriptSGMLblock) {
|
||||
styler.ColourTo(i - 2, SCE_H_SGML_BLOCK_DEFAULT);
|
||||
} else {
|
||||
styler.ColourTo(i - 2, SCE_H_SGML_DEFAULT);
|
||||
}
|
||||
state = SCE_H_SGML_1ST_PARAM_COMMENT;
|
||||
} else if (issgmlwordchar(ch)) {
|
||||
if (scriptLanguage == eScriptSGMLblock) {
|
||||
styler.ColourTo(i - 1, SCE_H_SGML_BLOCK_DEFAULT);
|
||||
} else {
|
||||
styler.ColourTo(i - 1, SCE_H_SGML_DEFAULT);
|
||||
}
|
||||
// find the length of the word
|
||||
int size = 1;
|
||||
while (ishtmlwordchar(styler.SafeGetCharAt(i + size)))
|
||||
size++;
|
||||
styler.ColourTo(i + size - 1, StateToPrint);
|
||||
i += size - 1;
|
||||
visibleChars += size - 1;
|
||||
ch = styler.SafeGetCharAt(i);
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_ERROR:
|
||||
if ((ch == '-') && (chPrev == '-')) {
|
||||
styler.ColourTo(i - 2, StateToPrint);
|
||||
state = SCE_H_SGML_COMMENT;
|
||||
}
|
||||
case SCE_H_SGML_DOUBLESTRING:
|
||||
if (ch == '\"') {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
state = SCE_H_DEFAULT;
|
||||
tagOpened = false;
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_SIMPLESTRING:
|
||||
if (ch == '\'') {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_COMMENT:
|
||||
if ((ch == '-') && (chPrev == '-')) {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_H_CDATA:
|
||||
if ((ch == '>') && (chPrev == ']') && (chPrev2 == ']')) {
|
||||
if ((chPrev2 == ']') && (chPrev == ']') && (ch == '>')) {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
state = SCE_H_DEFAULT;
|
||||
tagOpened = false;
|
||||
levelCurrent--;
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML:
|
||||
if (ch == '>') {
|
||||
levelCurrent--;
|
||||
case SCE_H_COMMENT:
|
||||
if ((chPrev2 == '-') && (chPrev == '-') && (ch == '>')) {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
state = SCE_H_DEFAULT;
|
||||
tagOpened = false;
|
||||
levelCurrent--;
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_1ST_PARAM_COMMENT:
|
||||
if ((ch == '-') && (chPrev == '-')) {
|
||||
styler.ColourTo(i, SCE_H_SGML_COMMENT);
|
||||
state = SCE_H_SGML_1ST_PARAM;
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_SPECIAL:
|
||||
if (!isupper(ch)) {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
if (isalnum(ch)) {
|
||||
state = SCE_H_SGML_ERROR;
|
||||
} else {
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SCE_H_SGML_ENTITY:
|
||||
if (ch == ';') {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
} else if (!isalnum(ch) && ch != '-' && ch != '.') {
|
||||
styler.ColourTo(i, SCE_H_SGML_ERROR);
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_H_ENTITY:
|
||||
@@ -705,9 +885,14 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
if (!ishtmlwordchar(ch) && !((ch == '/') && (chPrev == '<')) && ch != '[') {
|
||||
int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||
if (eClass == SCE_H_SCRIPT) {
|
||||
inScriptType = eNonHtmlScript;
|
||||
scriptLanguage = defaultScript;
|
||||
eClass = SCE_H_TAG;
|
||||
if (!tagClosing) {
|
||||
inScriptType = eNonHtmlScript;
|
||||
scriptLanguage = clientScript;
|
||||
eClass = SCE_H_TAG;
|
||||
} else {
|
||||
scriptLanguage = eScriptNone;
|
||||
eClass = SCE_H_TAG;
|
||||
}
|
||||
}
|
||||
if (ch == '>') {
|
||||
styler.ColourTo(i, eClass);
|
||||
@@ -717,28 +902,27 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
state = SCE_H_DEFAULT;
|
||||
}
|
||||
tagOpened = false;
|
||||
if (tagClosing)
|
||||
if (tagClosing) {
|
||||
levelCurrent--;
|
||||
else
|
||||
levelCurrent++;
|
||||
tagClosing = false;
|
||||
} else if (ch == '/' && chNext == '>') {
|
||||
if (eClass == SCE_H_TAGUNKNOWN) {
|
||||
styler.ColourTo(i + 1, SCE_H_TAGUNKNOWN);
|
||||
} else {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
styler.ColourTo(i + 1, SCE_H_TAGEND);
|
||||
levelCurrent++;
|
||||
}
|
||||
i++;
|
||||
ch = chNext;
|
||||
state = SCE_H_DEFAULT;
|
||||
tagClosing = false;
|
||||
} else if (ch == '/' && chNext == '>') {
|
||||
if (eClass == SCE_H_TAGUNKNOWN) {
|
||||
styler.ColourTo(i + 1, SCE_H_TAGUNKNOWN);
|
||||
} else {
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
styler.ColourTo(i + 1, SCE_H_TAGEND);
|
||||
}
|
||||
i++;
|
||||
ch = chNext;
|
||||
state = SCE_H_DEFAULT;
|
||||
tagOpened = false;
|
||||
} else {
|
||||
if (eClass != SCE_H_TAGUNKNOWN) {
|
||||
if (eClass == SCE_H_CDATA) {
|
||||
state = SCE_H_CDATA;
|
||||
} else if (eClass == SCE_H_SGML) {
|
||||
state = SCE_H_SGML;
|
||||
if (eClass == SCE_H_SGML_DEFAULT) {
|
||||
state = SCE_H_SGML_DEFAULT;
|
||||
} else {
|
||||
state = SCE_H_OTHER;
|
||||
}
|
||||
@@ -750,7 +934,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') {
|
||||
if (inScriptType == eNonHtmlScript) {
|
||||
int scriptLanguagePrev = scriptLanguage;
|
||||
scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage);
|
||||
clientScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage);
|
||||
scriptLanguage = clientScript;
|
||||
if ((scriptLanguagePrev != scriptLanguage) && (scriptLanguage == eScriptNone))
|
||||
inScriptType = eHtml;
|
||||
}
|
||||
@@ -1217,18 +1402,18 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
case SCE_HPHP_NUMBER:
|
||||
if (!isdigit(ch)) {
|
||||
styler.ColourTo(i - 1, SCE_HPHP_NUMBER);
|
||||
if (isoperator(ch))
|
||||
state =SCE_HPHP_OPERATOR;
|
||||
else
|
||||
if (isoperator(ch))
|
||||
state = SCE_HPHP_OPERATOR;
|
||||
else
|
||||
state = SCE_HPHP_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_HPHP_VARIABLE:
|
||||
if (!iswordstart(ch)) {
|
||||
styler.ColourTo(i - 1, SCE_HPHP_VARIABLE);
|
||||
if (isoperator(ch))
|
||||
state =SCE_HPHP_OPERATOR;
|
||||
else
|
||||
if (isoperator(ch))
|
||||
state = SCE_HPHP_OPERATOR;
|
||||
else
|
||||
state = SCE_HPHP_DEFAULT;
|
||||
}
|
||||
break;
|
||||
@@ -1249,7 +1434,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
// skip the next char
|
||||
i++;
|
||||
} else if (ch == '$') {
|
||||
styler.ColourTo(i-1, StateToPrint);
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
state = SCE_HPHP_HSTRING_VARIABLE;
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i, StateToPrint);
|
||||
@@ -1267,13 +1452,13 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
break;
|
||||
case SCE_HPHP_HSTRING_VARIABLE:
|
||||
if (!iswordstart(ch)) {
|
||||
styler.ColourTo(i-1, StateToPrint);
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
i--; // strange but it works
|
||||
state = SCE_HPHP_HSTRING;
|
||||
}
|
||||
break;
|
||||
case SCE_HPHP_OPERATOR:
|
||||
case SCE_HPHP_DEFAULT:
|
||||
case SCE_HPHP_DEFAULT:
|
||||
styler.ColourTo(i - 1, StateToPrint);
|
||||
if (isdigit(ch)) {
|
||||
state = SCE_HPHP_NUMBER;
|
||||
@@ -1304,6 +1489,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
|
||||
// Some of the above terminated their lexeme but since the same character starts
|
||||
// the same class again, only reenter if non empty segment.
|
||||
|
||||
bool nonEmptySegment = i >= static_cast<int>(styler.GetStartSegment());
|
||||
if (state == SCE_HB_DEFAULT) { // One of the above succeeded
|
||||
if ((ch == '\"') && (nonEmptySegment)) {
|
||||
@@ -1335,7 +1521,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
state = SCE_HJ_COMMENTLINE;
|
||||
} else if ((ch == '\"') && (nonEmptySegment)) {
|
||||
state = SCE_HJ_DOUBLESTRING;
|
||||
} else if ((ch == '\'') && (nonEmptySegment)) {
|
||||
} else if ((ch == '\'') && (nonEmptySegment)) {
|
||||
state = SCE_HJ_SINGLESTRING;
|
||||
} else if (iswordstart(ch)) {
|
||||
state = SCE_HJ_WORD;
|
||||
@@ -1357,4 +1543,3 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
|
||||
LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc, "hypertext");
|
||||
LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc, "xml");
|
||||
|
||||
|
@@ -15,70 +15,18 @@
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
/* Returns true if the "as" word that begins at start follows an import statement */
|
||||
static bool IsImportAs(unsigned int start, Accessor &styler) {
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
char s[10];
|
||||
|
||||
/* Find any import before start but after any statement terminator or quote */
|
||||
i = start;
|
||||
while (i > 0) {
|
||||
char ch = styler[i - 1];
|
||||
|
||||
if (ch == '\n' || ch == '\r' || ch == ';' || ch == '\'' || ch == '"' || ch == '`')
|
||||
break;
|
||||
if (ch == 't' && i > 5) {
|
||||
for (j = 0; j < 6; j++)
|
||||
s[j] = styler[(i - 6) + j];
|
||||
s[j] = '\0';
|
||||
if (strcmp(s, "import") == 0)
|
||||
return true;
|
||||
}
|
||||
i--;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void ClassifyWordPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
|
||||
char s[100];
|
||||
bool wordIsNumber = isdigit(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_P_IDENTIFIER;
|
||||
if (0 == strcmp(prevWord, "class"))
|
||||
chAttr = SCE_P_CLASSNAME;
|
||||
else if (0 == strcmp(prevWord, "def"))
|
||||
chAttr = SCE_P_DEFNAME;
|
||||
else if (wordIsNumber)
|
||||
chAttr = SCE_P_NUMBER;
|
||||
else if (keywords.InList(s))
|
||||
chAttr = SCE_P_WORD;
|
||||
else if (strcmp(s, "as") == 0 && IsImportAs(start, styler))
|
||||
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);
|
||||
strcpy(prevWord, s);
|
||||
}
|
||||
enum kwType { kwOther, kwClass, kwDef, kwImport };
|
||||
|
||||
static bool IsPyComment(Accessor &styler, int pos, int len) {
|
||||
return len>0 && styler[pos]=='#';
|
||||
}
|
||||
|
||||
static bool IsPyStringStart(char ch, char chNext, char chNext2) {
|
||||
static bool IsPyStringStart(int ch, int chNext, int chNext2) {
|
||||
if (ch == '\'' || ch == '"')
|
||||
return true;
|
||||
if (ch == 'u' || ch == 'U') {
|
||||
@@ -93,10 +41,6 @@ static bool IsPyStringStart(char ch, char chNext, char chNext2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool IsPyWordStart(char ch, char chNext, char chNext2) {
|
||||
return (iswordchar(ch) && !IsPyStringStart(ch, chNext, chNext2));
|
||||
}
|
||||
|
||||
/* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */
|
||||
static int GetPyStringState(Accessor &styler, int i, int *nextIndex) {
|
||||
char ch = styler.SafeGetCharAt(i);
|
||||
@@ -139,10 +83,18 @@ static int GetPyStringState(Accessor &styler, int i, int *nextIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
inline bool IsAWordChar(int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||
}
|
||||
|
||||
inline bool IsAWordStart(int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||
}
|
||||
|
||||
static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
int lengthDoc = startPos + length;
|
||||
int endPos = startPos + length;
|
||||
|
||||
// Backtrack to previous line in case need to fix its tab whinging
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
@@ -156,32 +108,27 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
|
||||
}
|
||||
}
|
||||
|
||||
// Python uses a different mask because bad indentation is marked by oring with 32
|
||||
styler.StartAt(startPos, 127);
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");
|
||||
char prevWord[200];
|
||||
prevWord[0] = '\0';
|
||||
if (length == 0)
|
||||
return ;
|
||||
const int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");
|
||||
|
||||
int state = initStyle & 31;
|
||||
initStyle = initStyle & 31;
|
||||
if (initStyle == SCE_P_STRINGEOL) {
|
||||
initStyle = SCE_P_DEFAULT;
|
||||
}
|
||||
|
||||
int nextIndex = 0;
|
||||
char chPrev = ' ';
|
||||
char chPrev2 = ' ';
|
||||
char chNext = styler[startPos];
|
||||
styler.StartSegment(startPos);
|
||||
bool atStartLine = true;
|
||||
kwType kwLast = kwOther;
|
||||
int spaceFlags = 0;
|
||||
styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);
|
||||
for (int i = startPos; i < lengthDoc; i++) {
|
||||
|
||||
// Python uses a different mask because bad indentation is marked by oring with 32
|
||||
StyleContext sc(startPos, endPos-startPos, initStyle, styler, 0x7f);
|
||||
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
|
||||
if (atStartLine) {
|
||||
char chBad = static_cast<char>(64);
|
||||
char chGood = static_cast<char>(0);
|
||||
if (sc.atLineStart) {
|
||||
const char chBad = static_cast<char>(64);
|
||||
const char chGood = static_cast<char>(0);
|
||||
char chFlags = chGood;
|
||||
if (whingeLevel == 1) {
|
||||
chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood;
|
||||
@@ -192,132 +139,117 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
|
||||
} else if (whingeLevel == 4) {
|
||||
chFlags = (spaceFlags & wsTab) ? chBad : chGood;
|
||||
}
|
||||
styler.SetFlags(chFlags, static_cast<char>(state));
|
||||
atStartLine = false;
|
||||
styler.SetFlags(chFlags, static_cast<char>(sc.state));
|
||||
}
|
||||
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
|
||||
if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) {
|
||||
if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) {
|
||||
if (sc.atLineEnd) {
|
||||
if ((sc.state == SCE_P_DEFAULT) ||
|
||||
(sc.state == SCE_P_TRIPLE) ||
|
||||
(sc.state == SCE_P_TRIPLEDOUBLE)) {
|
||||
// Perform colourisation of white space and triple quoted strings at end of each line to allow
|
||||
// tab marking to work inside white space and triple quoted strings
|
||||
styler.ColourTo(i, state);
|
||||
sc.ForwardSetState(sc.state);
|
||||
}
|
||||
lineCurrent++;
|
||||
styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);
|
||||
atStartLine = true;
|
||||
if ((sc.state == SCE_P_STRING) || (sc.state == SCE_P_CHARACTER)) {
|
||||
sc.ChangeState(SCE_P_STRINGEOL);
|
||||
sc.ForwardSetState(SCE_P_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
chPrev = ' ';
|
||||
chPrev2 = ' ';
|
||||
i += 1;
|
||||
continue;
|
||||
// Check for a state end
|
||||
if (sc.state == SCE_P_OPERATOR) {
|
||||
kwLast = kwOther;
|
||||
sc.SetState(SCE_C_DEFAULT);
|
||||
} else if (sc.state == SCE_P_NUMBER) {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
sc.SetState(SCE_P_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_P_WORD) {
|
||||
if ((sc.ch == '.') || (!IsAWordChar(sc.ch))) {
|
||||
char s[100];
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
int style = SCE_P_IDENTIFIER;
|
||||
if ((kwLast == kwImport) && (strcmp(s, "as") == 0)) {
|
||||
style = SCE_P_WORD;
|
||||
} else if (keywords.InList(s)) {
|
||||
style = SCE_P_WORD;
|
||||
} else if (kwLast == kwClass) {
|
||||
style = SCE_P_CLASSNAME;
|
||||
} else if (kwLast == kwDef) {
|
||||
style = SCE_P_DEFNAME;
|
||||
}
|
||||
sc.ChangeState(style);
|
||||
sc.SetState(SCE_P_DEFAULT);
|
||||
if (style == SCE_P_WORD) {
|
||||
if (0 == strcmp(s, "class"))
|
||||
kwLast = kwClass;
|
||||
else if (0 == strcmp(s, "def"))
|
||||
kwLast = kwDef;
|
||||
else if (0 == strcmp(s, "import"))
|
||||
kwLast = kwImport;
|
||||
else
|
||||
kwLast = kwOther;
|
||||
} else if (style == SCE_P_CLASSNAME) {
|
||||
kwLast = kwOther;
|
||||
} else if (style == SCE_P_DEFNAME) {
|
||||
kwLast = kwOther;
|
||||
}
|
||||
}
|
||||
} else if ((sc.state == SCE_P_COMMENTLINE) || (sc.state == SCE_P_COMMENTBLOCK)) {
|
||||
if (sc.ch == '\r' || sc.ch == '\n') {
|
||||
sc.SetState(SCE_P_DEFAULT);
|
||||
}
|
||||
} else if ((sc.state == SCE_P_STRING) || (sc.state == SCE_P_CHARACTER)) {
|
||||
if (sc.ch == '\\') {
|
||||
if ((sc.chNext == '\r') && (sc.GetRelative(2) == '\n')) {
|
||||
sc.Forward();
|
||||
}
|
||||
sc.Forward();
|
||||
} else if ((sc.state == SCE_P_STRING) && (sc.ch == '\"')) {
|
||||
sc.ForwardSetState(SCE_P_DEFAULT);
|
||||
} else if ((sc.state == SCE_P_CHARACTER) && (sc.ch == '\'')) {
|
||||
sc.ForwardSetState(SCE_P_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_P_TRIPLE) {
|
||||
if (sc.ch == '\\') {
|
||||
sc.Forward();
|
||||
} else if (sc.Match("\'\'\'")) {
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_P_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_P_TRIPLEDOUBLE) {
|
||||
if (sc.ch == '\\') {
|
||||
sc.Forward();
|
||||
} else if (sc.Match("\"\"\"")) {
|
||||
sc.Forward();
|
||||
sc.Forward();
|
||||
sc.ForwardSetState(SCE_P_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
if (state == SCE_P_STRINGEOL) {
|
||||
if (ch != '\r' && ch != '\n') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
// Check for a new state starting character
|
||||
if (sc.state == SCE_P_DEFAULT) {
|
||||
if (isascii(sc.ch) && isoperator(static_cast<char>(sc.ch)) || sc.ch == '`') {
|
||||
sc.SetState(SCE_P_OPERATOR);
|
||||
} else if (sc.ch == '#') {
|
||||
sc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE);
|
||||
} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
|
||||
sc.SetState(SCE_P_NUMBER);
|
||||
} else if (IsPyStringStart(sc.ch, sc.chNext, sc.GetRelative(2))) {
|
||||
int nextIndex = 0;
|
||||
sc.SetState(GetPyStringState(styler, sc.currentPos, &nextIndex));
|
||||
while (nextIndex > (sc.currentPos+1)) {
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (IsAWordStart(sc.ch)) {
|
||||
sc.SetState(SCE_P_WORD);
|
||||
}
|
||||
}
|
||||
if (state == SCE_P_DEFAULT) {
|
||||
if (IsPyWordStart(ch, chNext, chNext2)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_P_WORD;
|
||||
} else if (ch == '#') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE;
|
||||
} else if (IsPyStringStart(ch, chNext, chNext2)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = GetPyStringState(styler, i, &nextIndex);
|
||||
if (nextIndex != i + 1) {
|
||||
i = nextIndex - 1;
|
||||
ch = ' ';
|
||||
chPrev = ' ';
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
styler.ColourTo(i, SCE_P_OPERATOR);
|
||||
}
|
||||
} else if (state == SCE_P_WORD) {
|
||||
if (!iswordchar(ch)) {
|
||||
ClassifyWordPy(styler.GetStartSegment(), i - 1, keywords, styler, prevWord);
|
||||
state = SCE_P_DEFAULT;
|
||||
if (ch == '#') {
|
||||
state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE;
|
||||
} else if (IsPyStringStart(ch, chNext, chNext2)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = GetPyStringState(styler, i, &nextIndex);
|
||||
if (nextIndex != i + 1) {
|
||||
i = nextIndex - 1;
|
||||
ch = ' ';
|
||||
chPrev = ' ';
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i, SCE_P_OPERATOR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (state == SCE_P_COMMENTLINE || state == SCE_P_COMMENTBLOCK) {
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_P_STRING) {
|
||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_P_STRINGEOL;
|
||||
} else if (ch == '\\') {
|
||||
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_P_CHARACTER) {
|
||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_P_STRINGEOL;
|
||||
} else if (ch == '\\') {
|
||||
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_P_TRIPLE) {
|
||||
if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_P_TRIPLEDOUBLE) {
|
||||
if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
chPrev2 = chPrev;
|
||||
chPrev = ch;
|
||||
}
|
||||
if (state == SCE_P_WORD) {
|
||||
ClassifyWordPy(styler.GetStartSegment(), lengthDoc, keywords, styler, prevWord);
|
||||
} else {
|
||||
styler.ColourTo(lengthDoc, state);
|
||||
}
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static bool IsCommentLine(int line, Accessor &styler) {
|
||||
@@ -338,14 +270,15 @@ static bool IsQuoteLine(int line, Accessor &styler) {
|
||||
return ((style == SCE_P_TRIPLE) || (style== SCE_P_TRIPLEDOUBLE));
|
||||
}
|
||||
|
||||
|
||||
static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unused*/,
|
||||
WordList *[], Accessor &styler) {
|
||||
int maxPos = startPos + length;
|
||||
int maxLines = styler.GetLine(maxPos-1);
|
||||
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment.python");
|
||||
bool foldQuotes = styler.GetPropertyInt("fold.quotes.python");
|
||||
|
||||
const int maxPos = startPos + length;
|
||||
const int maxLines = styler.GetLine(maxPos-1); // Requested last line
|
||||
const int docLines = styler.GetLine(styler.Length() - 1); // Available last line
|
||||
const bool foldComment = styler.GetPropertyInt("fold.comment.python");
|
||||
const bool foldQuotes = styler.GetPropertyInt("fold.quotes.python");
|
||||
|
||||
// Backtrack to previous non-blank line so we can determine indent level
|
||||
// for any white space lines (needed esp. within triple quoted strings)
|
||||
// and so we can fix any preceding fold level (which is why we go back
|
||||
@@ -363,8 +296,8 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
||||
}
|
||||
int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;
|
||||
|
||||
// Set up initial loop state
|
||||
startPos = styler.LineStart(lineCurrent);
|
||||
// Set up initial state
|
||||
int prev_state = SCE_P_DEFAULT & 31;
|
||||
if (lineCurrent >= 1)
|
||||
prev_state = styler.StyleAt(startPos-1) & 31;
|
||||
@@ -374,21 +307,27 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
||||
prevComment = foldComment && IsCommentLine(lineCurrent - 1, styler);
|
||||
|
||||
// Process all characters to end of requested range or end of any triple quote
|
||||
// or comment that hangs over the end of the range
|
||||
while ((lineCurrent <= maxLines) || prevQuote || prevComment) {
|
||||
// or comment that hangs over the end of the range. Cap processing in all cases
|
||||
// to end of document (in case of unclosed quote or comment at end).
|
||||
while ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevQuote || prevComment)) {
|
||||
|
||||
// Gather info
|
||||
int lev = indentCurrent;
|
||||
int lineNext = lineCurrent + 1;
|
||||
int style = styler.StyleAt(styler.LineStart(lineNext)) & 31;
|
||||
int indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
|
||||
int quote = foldQuotes && ((style == SCE_P_TRIPLE) || (style== SCE_P_TRIPLEDOUBLE));
|
||||
int quote_start = (quote && !prevQuote);
|
||||
int quote_continue = (quote && prevQuote);
|
||||
int comment = foldComment && IsCommentLine(lineCurrent, styler);
|
||||
int comment_start = (comment && !prevComment &&
|
||||
int indentNext = indentCurrent;
|
||||
int quote = false;
|
||||
if (lineNext <= docLines) {
|
||||
// Information about next line is only available if not at end of document
|
||||
indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
|
||||
int style = styler.StyleAt(styler.LineStart(lineNext)) & 31;
|
||||
quote = foldQuotes && ((style == SCE_P_TRIPLE) || (style== SCE_P_TRIPLEDOUBLE));
|
||||
}
|
||||
const int quote_start = (quote && !prevQuote);
|
||||
const int quote_continue = (quote && prevQuote);
|
||||
const int comment = foldComment && IsCommentLine(lineCurrent, styler);
|
||||
const int comment_start = (comment && !prevComment && (lineNext <= docLines) &&
|
||||
IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE));
|
||||
int comment_continue = (comment && prevComment);
|
||||
const int comment_continue = (comment && prevComment);
|
||||
if ((!quote || !prevQuote) && !comment)
|
||||
indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK;
|
||||
if (quote)
|
||||
@@ -411,22 +350,35 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
||||
}
|
||||
|
||||
// Skip past any blank lines for next indent level info; we skip also comments
|
||||
// starting in column 0 which effectively folds them into surrounding code
|
||||
// rather than screwing up folding. Then set indent level on the lines
|
||||
// we skipped to be same as maximum of current and next indent. This approach
|
||||
// does a reasonable job of collapsing white space into surrounding code
|
||||
// without getting confused by white space at the start of an indented level.
|
||||
// starting in column 0 which effectively folds them into surrounding code rather
|
||||
// than screwing up folding.
|
||||
const int saveIndentNext = indentNext;
|
||||
while (!quote &&
|
||||
((indentNext & SC_FOLDLEVELWHITEFLAG) || styler[styler.LineStart(lineNext)] == '#') &&
|
||||
(lineNext < maxLines)) {
|
||||
int level = Platform::Maximum(indentCurrent, indentNext);
|
||||
if (indentNext & SC_FOLDLEVELWHITEFLAG)
|
||||
level = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel;
|
||||
styler.SetLevel(lineNext, level);
|
||||
(lineNext < docLines) &&
|
||||
((indentNext & SC_FOLDLEVELWHITEFLAG) ||
|
||||
(lineNext <= docLines && styler[styler.LineStart(lineNext)] == '#'))) {
|
||||
|
||||
lineNext++;
|
||||
indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
|
||||
}
|
||||
|
||||
// Next compute max indent level of current line and next non-blank line.
|
||||
// This is the level to which we set all the intervening blank or comment lines.
|
||||
const int skip_level = Platform::Maximum(indentCurrentLevel,
|
||||
indentNext & SC_FOLDLEVELNUMBERMASK);
|
||||
|
||||
// Now set all the indent levels on the lines we skipped
|
||||
int skipLine = lineCurrent + 1;
|
||||
int skipIndentNext = saveIndentNext;
|
||||
while (skipLine < lineNext) {
|
||||
int skipLineLevel = skip_level;
|
||||
if (skipIndentNext & SC_FOLDLEVELWHITEFLAG)
|
||||
skipLineLevel = SC_FOLDLEVELWHITEFLAG | skipLineLevel;
|
||||
styler.SetLevel(skipLine, skipLineLevel);
|
||||
skipLine++;
|
||||
skipIndentNext = styler.IndentAmount(skipLine, &spaceFlags, NULL);
|
||||
}
|
||||
|
||||
// Set fold header on non-quote/non-comment line
|
||||
if (!quote && !comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG) ) {
|
||||
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK))
|
||||
@@ -443,8 +395,9 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse
|
||||
lineCurrent = lineNext;
|
||||
}
|
||||
|
||||
// Make sure last line indent level is set too
|
||||
styler.SetLevel(lineCurrent, indentCurrent);
|
||||
// NOTE: Cannot set level of last line here because indentCurrent doesn't have
|
||||
// header flag set; the loop above is crafted to take care of this case!
|
||||
//styler.SetLevel(lineCurrent, indentCurrent);
|
||||
}
|
||||
|
||||
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc);
|
||||
|
@@ -40,7 +40,7 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C
|
||||
surface->FillRectangle(rcH, fore);
|
||||
}
|
||||
|
||||
void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) {
|
||||
void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter) {
|
||||
// Restrict most shapes a bit
|
||||
PRectangle rc = rcWhole;
|
||||
rc.top++;
|
||||
@@ -230,6 +230,15 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) {
|
||||
surface->MoveTo(centreX, rcWhole.top);
|
||||
surface->LineTo(centreX, centreY - blobSize);
|
||||
|
||||
} else if (markType >= SC_MARK_CHARACTER) {
|
||||
char character[1];
|
||||
character[0] = static_cast<char>(markType - SC_MARK_CHARACTER);
|
||||
int width = surface->WidthText(fontForCharacter, character, 1);
|
||||
rc.left += (rc.Width() - width) / 2;
|
||||
rc.right = rc.left + width;
|
||||
surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2,
|
||||
character, 1, fore.allocated, back.allocated);
|
||||
|
||||
} else { // SC_MARK_SHORTARROW
|
||||
Point pts[] = {
|
||||
Point(centreX, centreY + dimOn2),
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
fore = Colour(0,0,0);
|
||||
back = Colour(0xff,0xff,0xff);
|
||||
}
|
||||
void Draw(Surface *surface, PRectangle &rc);
|
||||
void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -26,13 +26,23 @@ static inline char MakeUpperCase(char ch) {
|
||||
return static_cast<char>(ch - 'a' + 'A');
|
||||
}
|
||||
|
||||
static inline bool IsLetter(char ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'));
|
||||
}
|
||||
|
||||
|
||||
int CompareCaseInsensitive(const char *a, const char *b) {
|
||||
while (*a && *b) {
|
||||
if (*a != *b) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
if (IsLetter(*a) && IsLetter(*b)) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
}
|
||||
else {
|
||||
return *a - *b;
|
||||
}
|
||||
}
|
||||
a++;
|
||||
b++;
|
||||
@@ -44,10 +54,15 @@ int CompareCaseInsensitive(const char *a, const char *b) {
|
||||
int CompareNCaseInsensitive(const char *a, const char *b, int len) {
|
||||
while (*a && *b && len) {
|
||||
if (*a != *b) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
if (IsLetter(*a) && IsLetter(*b)) {
|
||||
char upperA = MakeUpperCase(*a);
|
||||
char upperB = MakeUpperCase(*b);
|
||||
if (upperA != upperB)
|
||||
return upperA - upperB;
|
||||
}
|
||||
else {
|
||||
return *a - *b;
|
||||
}
|
||||
}
|
||||
a++;
|
||||
b++;
|
||||
@@ -94,8 +109,8 @@ void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) {
|
||||
lenVal = strlen(val);
|
||||
unsigned int hash = HashString(key, lenKey);
|
||||
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
|
||||
if ((hash == p->hash) &&
|
||||
((strlen(p->key) == static_cast<unsigned int>(lenKey)) &&
|
||||
if ((hash == p->hash) &&
|
||||
((strlen(p->key) == static_cast<unsigned int>(lenKey)) &&
|
||||
(0 == strncmp(p->key, key, lenKey)))) {
|
||||
// Replace current value
|
||||
delete [](p->val);
|
||||
@@ -660,13 +675,13 @@ char *WordList::GetNearestWords(
|
||||
if (!cond) {
|
||||
// Find first match
|
||||
while ((pivot > start) &&
|
||||
(0 == CompareNCaseInsensitive(wordStart,
|
||||
(0 == CompareNCaseInsensitive(wordStart,
|
||||
wordsNoCase[pivot-1], searchLen))) {
|
||||
--pivot;
|
||||
}
|
||||
// Grab each match
|
||||
while ((pivot <= end) &&
|
||||
(0 == CompareNCaseInsensitive(wordStart,
|
||||
(0 == CompareNCaseInsensitive(wordStart,
|
||||
wordsNoCase[pivot], searchLen))) {
|
||||
wordlen = LengthWord(wordsNoCase[pivot], otherSeparator) + 1;
|
||||
wordsNear.append(wordsNoCase[pivot], wordlen, ' ');
|
||||
@@ -686,14 +701,14 @@ char *WordList::GetNearestWords(
|
||||
if (!cond) {
|
||||
// Find first match
|
||||
while ((pivot > start) &&
|
||||
(0 == strncmp(wordStart,
|
||||
words[pivot-1], searchLen))) {
|
||||
(0 == strncmp(wordStart,
|
||||
words[pivot-1], searchLen))) {
|
||||
--pivot;
|
||||
}
|
||||
// Grab each match
|
||||
while ((pivot <= end) &&
|
||||
(0 == strncmp(wordStart,
|
||||
words[pivot], searchLen))) {
|
||||
(0 == strncmp(wordStart,
|
||||
words[pivot], searchLen))) {
|
||||
wordlen = LengthWord(words[pivot], otherSeparator) + 1;
|
||||
wordsNear.append(words[pivot], wordlen, ' ');
|
||||
++pivot;
|
||||
|
@@ -30,9 +30,8 @@
|
||||
* Modification history:
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1 2001/09/01 03:05:24 RD
|
||||
* Upgraded to version 1.39 of Scintilla, and upated wxStyledTextCtrl
|
||||
* accordingly.
|
||||
* Revision 1.2 2001/10/18 01:24:58 RD
|
||||
* Updated to version 1.40 of Scintilla
|
||||
*
|
||||
* Revision 1.6 2001/04/29 13:32:10 nyamatongwe
|
||||
* Addition of new target methods - versions of ReplaceTarget that take counted
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include "ScintillaBase.h"
|
||||
|
||||
ScintillaBase::ScintillaBase() {
|
||||
displayPopupMenu = true;
|
||||
listType = 0;
|
||||
#ifdef SCI_LEXER
|
||||
lexLanguage = SCLEX_CONTAINER;
|
||||
@@ -514,6 +515,10 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
case SCI_USEPOPUP:
|
||||
displayPopupMenu = wParam;
|
||||
break;
|
||||
|
||||
#ifdef SCI_LEXER
|
||||
case SCI_SETLEXER:
|
||||
SetLexer(wParam);
|
||||
|
@@ -30,6 +30,7 @@ protected:
|
||||
idcmdSelectAll=16
|
||||
};
|
||||
|
||||
bool displayPopupMenu;
|
||||
Menu popup;
|
||||
AutoComplete ac;
|
||||
|
||||
@@ -42,7 +43,7 @@ protected:
|
||||
int lexLanguage;
|
||||
LexerModule *lexCurrent;
|
||||
PropSet props;
|
||||
enum {numWordLists=5};
|
||||
enum {numWordLists=6};
|
||||
WordList *keyWordLists[numWordLists+1];
|
||||
void SetLexer(uptr_t wParam);
|
||||
void SetLexerLanguage(const char *languageName);
|
||||
|
51
contrib/src/stc/scintilla/src/StyleContext.cxx
Normal file
51
contrib/src/stc/scintilla/src/StyleContext.cxx
Normal file
@@ -0,0 +1,51 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file StyleContext.cxx
|
||||
** Lexer infrastructure.
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// This file is in the public domain.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
|
||||
static void getRange(unsigned int start,
|
||||
unsigned int end,
|
||||
Accessor &styler,
|
||||
char *s,
|
||||
unsigned int len) {
|
||||
unsigned int i = 0;
|
||||
while ((i < end - start + 1) && (i < len-1)) {
|
||||
s[i] = styler[start + i];
|
||||
i++;
|
||||
}
|
||||
s[i] = '\0';
|
||||
}
|
||||
|
||||
void StyleContext::GetCurrent(char *s, int len) {
|
||||
getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len);
|
||||
}
|
||||
|
||||
static void getRangeLowered(unsigned int start,
|
||||
unsigned int end,
|
||||
Accessor &styler,
|
||||
char *s,
|
||||
unsigned int len) {
|
||||
unsigned int i = 0;
|
||||
while ((i < end - start + 1) && (i < len-1)) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
i++;
|
||||
}
|
||||
s[i] = '\0';
|
||||
}
|
||||
|
||||
void StyleContext::GetCurrentLowered(char *s, int len) {
|
||||
getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len);
|
||||
}
|
127
contrib/src/stc/scintilla/src/StyleContext.h
Normal file
127
contrib/src/stc/scintilla/src/StyleContext.h
Normal file
@@ -0,0 +1,127 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file StyleContext.cxx
|
||||
** Lexer infrastructure.
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// This file is in the public domain.
|
||||
|
||||
// All languages handled so far can treat all characters >= 0x80 as one class
|
||||
// which just continues the current token or starts an identifier if in default.
|
||||
// DBCS treated specially as the second character can be < 0x80 and hence
|
||||
// syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80
|
||||
class StyleContext {
|
||||
Accessor &styler;
|
||||
int endPos;
|
||||
StyleContext& operator=(const StyleContext&) {
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
int currentPos;
|
||||
bool atLineStart;
|
||||
bool atLineEnd;
|
||||
int state;
|
||||
int chPrev;
|
||||
int ch;
|
||||
int chNext;
|
||||
|
||||
StyleContext(unsigned int startPos, int length,
|
||||
int initStyle, Accessor &styler_, char chMask=31) :
|
||||
styler(styler_),
|
||||
endPos(startPos + length),
|
||||
currentPos(startPos),
|
||||
atLineStart(true),
|
||||
atLineEnd(false),
|
||||
state(initStyle),
|
||||
chPrev(0),
|
||||
ch(0),
|
||||
chNext(0) {
|
||||
styler.StartAt(startPos, chMask);
|
||||
styler.StartSegment(startPos);
|
||||
int pos = currentPos;
|
||||
ch = static_cast<unsigned char>(styler.SafeGetCharAt(pos));
|
||||
if (styler.IsLeadByte(static_cast<char>(ch))) {
|
||||
pos++;
|
||||
ch = ch << 8;
|
||||
ch |= static_cast<unsigned char>(styler.SafeGetCharAt(pos));
|
||||
}
|
||||
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(pos+1));
|
||||
if (styler.IsLeadByte(static_cast<char>(chNext))) {
|
||||
chNext = chNext << 8;
|
||||
chNext |= static_cast<unsigned char>(styler.SafeGetCharAt(pos+2));
|
||||
}
|
||||
atLineEnd = (ch == '\r' && chNext != '\n') || (ch == '\n') || (currentPos >= endPos);
|
||||
}
|
||||
void Complete() {
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
}
|
||||
bool More() {
|
||||
return currentPos <= endPos;
|
||||
}
|
||||
void Forward() {
|
||||
atLineStart = atLineEnd;
|
||||
// A lot of this is repeated from the constructor - TODO: merge code
|
||||
chPrev = ch;
|
||||
currentPos++;
|
||||
if (ch >= 0x100)
|
||||
currentPos++;
|
||||
ch = chNext;
|
||||
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+1));
|
||||
if (styler.IsLeadByte(static_cast<char>(chNext))) {
|
||||
chNext = chNext << 8;
|
||||
chNext |= static_cast<unsigned char>(styler.SafeGetCharAt(currentPos + 2));
|
||||
}
|
||||
// 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
|
||||
atLineEnd = (ch == '\r' && chNext != '\n') || (ch == '\n') || (currentPos >= endPos);
|
||||
}
|
||||
void ChangeState(int state_) {
|
||||
state = state_;
|
||||
}
|
||||
void SetState(int state_) {
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
state = state_;
|
||||
}
|
||||
void ForwardSetState(int state_) {
|
||||
Forward();
|
||||
styler.ColourTo(currentPos - 1, state);
|
||||
state = state_;
|
||||
}
|
||||
int LengthCurrent() {
|
||||
return currentPos - styler.GetStartSegment();
|
||||
}
|
||||
int GetRelative(int n) {
|
||||
return styler.SafeGetCharAt(currentPos+n);
|
||||
}
|
||||
bool Match(char ch0) {
|
||||
return ch == ch0;
|
||||
}
|
||||
bool Match(char ch0, char ch1) {
|
||||
return (ch == ch0) && (chNext == ch1);
|
||||
}
|
||||
bool Match(const char *s) {
|
||||
if (ch != *s)
|
||||
return false;
|
||||
s++;
|
||||
if (chNext != *s)
|
||||
return false;
|
||||
s++;
|
||||
for (int n=2; *s; n++) {
|
||||
if (*s != styler.SafeGetCharAt(currentPos+n))
|
||||
return false;
|
||||
s++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Non-inline
|
||||
void GetCurrent(char *s, int len);
|
||||
void GetCurrentLowered(char *s, int len);
|
||||
};
|
||||
|
||||
inline bool IsASpace(unsigned int ch) {
|
||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||
}
|
||||
|
||||
inline bool IsADigit(unsigned int ch) {
|
||||
return (ch >= '0') && (ch <= '9');
|
||||
}
|
@@ -32,6 +32,7 @@ int wxForceScintillaLexers(void)
|
||||
extern LexerModule lmAVE;
|
||||
extern LexerModule lmConf;
|
||||
extern LexerModule lmCPP;
|
||||
extern LexerModule lmNncrontab;
|
||||
extern LexerModule lmEiffel;
|
||||
extern LexerModule lmHTML;
|
||||
extern LexerModule lmLISP;
|
||||
@@ -48,6 +49,7 @@ int wxForceScintillaLexers(void)
|
||||
&& &lmAVE
|
||||
&& &lmConf
|
||||
&& &lmCPP
|
||||
&& &lmNncrontab
|
||||
&& &lmEiffel
|
||||
&& &lmHTML
|
||||
&& &lmLISP
|
||||
@@ -137,6 +139,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
||||
{
|
||||
m_swx = new ScintillaWX(this);
|
||||
m_stopWatch.Start();
|
||||
m_lastKeyDownConsumed = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -338,10 +341,14 @@ void wxStyledTextCtrl::SetAnchor(int posAnchor) {
|
||||
wxString wxStyledTextCtrl::GetCurLine(int* linePos) {
|
||||
wxString text;
|
||||
int len = LineLength(GetCurrentLine());
|
||||
if (!len) return "";
|
||||
char* buf = text.GetWriteBuf(len);
|
||||
if (!len) {
|
||||
if (linePos) *linePos = 0;
|
||||
return "";
|
||||
}
|
||||
// Need an extra byte because SCI_GETCURLINE writes a null to the string
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(2027, len, (long)buf);
|
||||
int pos = SendMsg(2027, len+1, (long)buf);
|
||||
text.UngetWriteBuf(len);
|
||||
if (linePos) *linePos = pos;
|
||||
|
||||
@@ -1141,11 +1148,11 @@ void wxStyledTextCtrl::SetText(const wxString& text) {
|
||||
// Retrieve all the text in the document.
|
||||
wxString wxStyledTextCtrl::GetText() {
|
||||
wxString text;
|
||||
int len = GetTextLength()+1;
|
||||
char* buff = text.GetWriteBuf(len);
|
||||
int len = GetTextLength();
|
||||
char* buff = text.GetWriteBuf(len+1); // leave room for the null...
|
||||
|
||||
SendMsg(2182, len, (long)buff);
|
||||
text.UngetWriteBuf(len-1);
|
||||
SendMsg(2182, len+1, (long)buff);
|
||||
text.UngetWriteBuf(len);
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -1197,6 +1204,7 @@ int wxStyledTextCtrl::GetTargetEnd() {
|
||||
}
|
||||
|
||||
// Replace the target text with the argument text.
|
||||
// Text is counted so it can contain nulls.
|
||||
// Returns the length of the replacement text.
|
||||
|
||||
int wxStyledTextCtrl::ReplaceTarget(const wxString& text) {
|
||||
@@ -1205,6 +1213,7 @@ int wxStyledTextCtrl::GetTargetEnd() {
|
||||
}
|
||||
|
||||
// Replace the target text with the argument text after \d processing.
|
||||
// Text is counted so it can contain nulls.
|
||||
// Looks for \d where d is between 1 and 9 and replaces these with the strings
|
||||
// matched in the last search operation which were surrounded by \( and \).
|
||||
// Returns the length of the replacement text including any change
|
||||
@@ -1216,7 +1225,7 @@ int wxStyledTextCtrl::GetTargetEnd() {
|
||||
}
|
||||
|
||||
// Search for a counted string in the target and set the target to the found
|
||||
// range.
|
||||
// range. Text is counted so it can contain nulls.
|
||||
// Returns length of range or -1 for failure in which case target is not moved.
|
||||
|
||||
int wxStyledTextCtrl::SearchInTarget(const wxString& text) {
|
||||
@@ -1526,12 +1535,12 @@ int wxStyledTextCtrl::GetModEventMask() {
|
||||
}
|
||||
|
||||
// Change internal focus flag
|
||||
void wxStyledTextCtrl::SetFocus(bool focus) {
|
||||
void wxStyledTextCtrl::SetSTCFocus(bool focus) {
|
||||
SendMsg(2380, focus, 0);
|
||||
}
|
||||
|
||||
// Get internal focus flag
|
||||
bool wxStyledTextCtrl::GetFocus() {
|
||||
bool wxStyledTextCtrl::GetSTCFocus() {
|
||||
return SendMsg(2381, 0, 0) != 0;
|
||||
}
|
||||
|
||||
@@ -1829,42 +1838,60 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
|
||||
|
||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
if ((key > WXK_ESCAPE) &&
|
||||
(key != WXK_DELETE) && (key < 255) &&
|
||||
!evt.ControlDown() && !evt.AltDown()) {
|
||||
|
||||
// printf("OnChar key:%d consumed:%d ctrl:%d alt:%d\n",
|
||||
// key, m_lastKeyDownConsumed, evt.ControlDown(), evt.AltDown());
|
||||
|
||||
// AltGr keys???
|
||||
// \|@#<23>[]{}?<3F>$~ <20>,<2C>,<2C>,<2C>, <20>, <20>
|
||||
|
||||
// On (some?) non-US keyboards the AltGr key is required to enter some
|
||||
// common characters. It comes to us as both Alt and Ctrl down so we need
|
||||
// to let the char through in that case, otherwise if only ctrl or only
|
||||
// alt let's skip it.
|
||||
bool ctrl = evt.ControlDown();
|
||||
bool alt = evt.AltDown();
|
||||
bool skip = (ctrl || alt && ! (ctrl && alt));
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed && !skip) {
|
||||
m_swx->DoAddChar(key);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
evt.Skip();
|
||||
}
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
//key = toupper(key); //**** ????
|
||||
bool consumed = FALSE;
|
||||
int processed = m_swx->DoKeyDown(key,
|
||||
evt.ShiftDown(),
|
||||
evt.ControlDown(),
|
||||
evt.AltDown(),
|
||||
&consumed);
|
||||
if (!processed && !consumed)
|
||||
bool shift = evt.ShiftDown(),
|
||||
ctrl = evt.ControlDown(),
|
||||
alt = evt.AltDown();
|
||||
|
||||
int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, &m_lastKeyDownConsumed);
|
||||
|
||||
// printf("key: %d shift: %d ctrl: %d alt: %d processed: %d consumed: %d\n",
|
||||
// key, shift, ctrl, alt, processed, m_lastKeyDownConsumed);
|
||||
|
||||
if (!processed && !m_lastKeyDownConsumed)
|
||||
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
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ int wxForceScintillaLexers(void)
|
||||
extern LexerModule lmAVE;
|
||||
extern LexerModule lmConf;
|
||||
extern LexerModule lmCPP;
|
||||
extern LexerModule lmNncrontab;
|
||||
extern LexerModule lmEiffel;
|
||||
extern LexerModule lmHTML;
|
||||
extern LexerModule lmLISP;
|
||||
@@ -48,6 +49,7 @@ int wxForceScintillaLexers(void)
|
||||
&& &lmAVE
|
||||
&& &lmConf
|
||||
&& &lmCPP
|
||||
&& &lmNncrontab
|
||||
&& &lmEiffel
|
||||
&& &lmHTML
|
||||
&& &lmLISP
|
||||
@@ -137,6 +139,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
||||
{
|
||||
m_swx = new ScintillaWX(this);
|
||||
m_stopWatch.Start();
|
||||
m_lastKeyDownConsumed = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -379,42 +382,60 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
|
||||
|
||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
if ((key > WXK_ESCAPE) &&
|
||||
(key != WXK_DELETE) && (key < 255) &&
|
||||
!evt.ControlDown() && !evt.AltDown()) {
|
||||
|
||||
// printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d\n",
|
||||
// key, m_lastKeyDownConsumed, evt.ControlDown(), evt.AltDown());
|
||||
|
||||
// AltGr keys???
|
||||
// \|@#<23>[]{}?<3F>$~ <20>,<2C>,<2C>,<2C>, <20>, <20>
|
||||
|
||||
// On (some?) non-US keyboards the AltGr key is required to enter some
|
||||
// common characters. It comes to us as both Alt and Ctrl down so we need
|
||||
// to let the char through in that case, otherwise if only ctrl or only
|
||||
// alt let's skip it.
|
||||
bool ctrl = evt.ControlDown();
|
||||
bool alt = evt.AltDown();
|
||||
bool skip = (ctrl || alt && ! (ctrl && alt));
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed && !skip) {
|
||||
m_swx->DoAddChar(key);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
evt.Skip();
|
||||
}
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
//key = toupper(key); //**** ????
|
||||
bool consumed = FALSE;
|
||||
int processed = m_swx->DoKeyDown(key,
|
||||
evt.ShiftDown(),
|
||||
evt.ControlDown(),
|
||||
evt.AltDown(),
|
||||
&consumed);
|
||||
if (!processed && !consumed)
|
||||
bool shift = evt.ShiftDown(),
|
||||
ctrl = evt.ControlDown(),
|
||||
alt = evt.AltDown();
|
||||
|
||||
int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, &m_lastKeyDownConsumed);
|
||||
|
||||
// printf("key: %%d shift: %%d ctrl: %%d alt: %%d processed: %%d consumed: %%d\n",
|
||||
// key, shift, ctrl, alt, processed, m_lastKeyDownConsumed);
|
||||
|
||||
if (!processed && !m_lastKeyDownConsumed)
|
||||
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
|
||||
}
|
||||
|
@@ -57,6 +57,8 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const char* name = "styledtext");
|
||||
%%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
|
||||
#else
|
||||
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -180,6 +182,7 @@ private:
|
||||
ScintillaWX* m_swx;
|
||||
wxStopWatch m_stopWatch;
|
||||
|
||||
bool m_lastKeyDownConsumed;
|
||||
|
||||
friend class ScintillaWX;
|
||||
friend class Platform;
|
||||
|
@@ -34,8 +34,10 @@ OBJECTS=$(EXPAT_OBJECTS) \
|
||||
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
|
||||
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
|
||||
xh_frame.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS)
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "xh_unkwn.h"
|
||||
#endif
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "wx/window.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/panel.h"
|
||||
|
||||
|
||||
class wxUnknownControlContainer : public wxPanel
|
||||
@@ -35,14 +36,14 @@ public:
|
||||
const wxSize& size = wxDefaultSize)
|
||||
: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||
controlName + wxT("_container")),
|
||||
m_controlName(controlName), m_controlAdded(FALSE)
|
||||
m_controlName(controlName), m_controlAdded(FALSE)
|
||||
{
|
||||
m_bg = GetBackgroundColour();
|
||||
SetBackgroundColour(wxColour(255, 0, 255));
|
||||
}
|
||||
|
||||
virtual void AddChild(wxWindowBase *child);
|
||||
|
||||
|
||||
protected:
|
||||
wxString m_controlName;
|
||||
bool m_controlAdded;
|
||||
@@ -54,12 +55,12 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child)
|
||||
wxASSERT_MSG( !m_controlAdded, wxT("Couldn't add two unknown controls to the same container!") )
|
||||
|
||||
wxPanel::AddChild(child);
|
||||
|
||||
|
||||
SetBackgroundColour(m_bg);
|
||||
child->SetName(m_controlName);
|
||||
child->SetId(wxXmlResource::GetXMLID(m_controlName));
|
||||
m_controlAdded = TRUE;
|
||||
|
||||
|
||||
wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add((wxWindow*)child, 1, wxEXPAND);
|
||||
SetSizer(sizer);
|
||||
@@ -69,14 +70,14 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child)
|
||||
|
||||
|
||||
|
||||
wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
}
|
||||
|
||||
wxObject *wxUnknownWidgetXmlHandler::DoCreateResource()
|
||||
{
|
||||
wxPanel *panel =
|
||||
{
|
||||
wxPanel *panel =
|
||||
new wxUnknownControlContainer(m_parentAsWindow,
|
||||
GetName(), -1,
|
||||
GetPosition(), GetSize());
|
||||
|
42
debian/changelog
vendored
42
debian/changelog
vendored
@@ -1,33 +1,59 @@
|
||||
wxwindows2.2 (2.3.1) unstable; urgency=low
|
||||
wxwindows2.3 (2.3.2) unstable; urgency=low
|
||||
|
||||
* 2.3.1 debs -- still not QA'd for general release yet.
|
||||
* Major Overhaul. First serious release contender.
|
||||
|
||||
-- Ron <ron@debian.org> Sun, 10 Jun 2001 20:10:36 -0700
|
||||
-- Ron Lee <ron@debian.org> Thu, 27 Sep 2001 05:55:07 -0700
|
||||
|
||||
wxwindows2.2 (2.3.0) unstable; urgency=low
|
||||
wxwindows2.3 (2.3.1) unstable; urgency=low
|
||||
|
||||
* 2.3.1 test debs -- still not QA'd for general release yet.
|
||||
|
||||
-- Ron Lee <ron@debian.org> Sun, 10 Jun 2001 20:10:36 -0700
|
||||
|
||||
wxwindows2.3 (2.3.0) unstable; urgency=low
|
||||
|
||||
* Updated 2.2 build scripts for 2.3
|
||||
* initial test builds, please do not release..
|
||||
|
||||
-- Ron Lee <ron@debian.org> Sat, 27 Jan 2001 01:51:24 -0800
|
||||
|
||||
wxwindows2.2 (2.2.8) unstable; urgency=low
|
||||
|
||||
* Fixed bogus samples makefile. Closes: #110061
|
||||
* Added ability to build wxMSW-cross packages, but they
|
||||
are not built and distributed by default.
|
||||
|
||||
If you think such creatures belong in the archive,
|
||||
register your vote by filing a wishlist bug (or preferably
|
||||
append some reasoned response to one already posted ;)
|
||||
|
||||
* Pruned more inapplicable files from the raw cvs source,
|
||||
cleaned configure.in and removed the need for a common setup.h,
|
||||
removed superfluous library links and generally tweaked things
|
||||
so as to make adding new ports easier.
|
||||
* added --gl-libs flag to wx-config.
|
||||
|
||||
-- Ron Lee <ron@debian.org> Thu, 30 Aug 2001 15:41:49 -0700
|
||||
|
||||
wxwindows2.2 (2.2.7) unstable; urgency=medium
|
||||
|
||||
* The "Testing Tarantella" release.
|
||||
* various small control (mis)behaviours corrected.
|
||||
* added missing build-dep for gettext.
|
||||
* updated wxPython description, Closes: #102689
|
||||
* Never publicly released, oh well.
|
||||
|
||||
-- Ron <ron@debian.org> Sun, 10 Jun 2001 19:32:46 -0700
|
||||
-- Ron Lee <ron@debian.org> Sun, 10 Jun 2001 19:32:46 -0700
|
||||
|
||||
wxwindows2.2 (2.2.6.1) unstable; urgency=low
|
||||
|
||||
* fix rules so it really doesn't build -indep for ports
|
||||
and fixed ambiguous oveload bug in mmedia contrib.
|
||||
and fixed ambiguous overload bug in mmedia contrib.
|
||||
This time it will build on alpha for sure. Really. :)
|
||||
Closes: #92288
|
||||
* added extra -dev package deps. Closes: #91364
|
||||
|
||||
-- Ron <ron@aeon.otsys.com> Sat, 7 Apr 2001 06:49:58 -0700
|
||||
-- Ron Lee <ron@debian.org> Sat, 7 Apr 2001 06:49:58 -0700
|
||||
|
||||
wxwindows2.2 (2.2.6) unstable; urgency=low
|
||||
|
||||
@@ -39,7 +65,7 @@ wxwindows2.2 (2.2.6) unstable; urgency=low
|
||||
likely default use.
|
||||
* general buglet count reduced.
|
||||
|
||||
-- Ron <ron@debian.org> Thu, 8 Mar 2001 21:10:07 -0800
|
||||
-- Ron Lee <ron@debian.org> Thu, 8 Mar 2001 21:10:07 -0800
|
||||
|
||||
wxwindows2.2 (2.2.5.1) unstable; urgency=low
|
||||
|
||||
|
49
debian/control.in
vendored
49
debian/control.in
vendored
@@ -3,7 +3,7 @@ Section: libs
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>=2.0), flex, bison, gettext, 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>
|
||||
Standards-Version: 3.2.1.2
|
||||
Standards-Version: 3.5.6.0
|
||||
|
||||
Package: libwxbase=V
|
||||
Architecture: any
|
||||
@@ -117,10 +117,10 @@ Package: libwxgtk=V-python
|
||||
Architecture: any
|
||||
Section: interpreters
|
||||
Depends: python-base (>=1.5.2), ${shlibs:Depends}
|
||||
Suggests: wxwin=V-doc
|
||||
Suggests: wxwin=V-doc, wxwin=V-examples
|
||||
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 (wxPython binding)
|
||||
wxWindows is a class library for C++ providing GUI (Graphical User
|
||||
Interface) and other facilities on more than one platform. Version =V
|
||||
currently supports subsets of GTK+, Motif, and MS Windows.
|
||||
@@ -140,6 +140,19 @@ Description: wxWindows Cross-platform C++ GUI toolkit (runtime contrib libs)
|
||||
This package provides the contrib libs of the wxWindows source tree
|
||||
(mmedia, ogl, stc)
|
||||
|
||||
Package: libwxgtk=V-univ
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libgtk1.2-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, libc6-dev, ${shlibs:Depends}
|
||||
Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev
|
||||
Description: wxWindows Cross-platform C++ GUI toolkit (wxUNIVERSAL widgets)
|
||||
wxWindows is a class library for C++ providing GUI (Graphical User
|
||||
Interface) and other facilities on more than one platform. Version =V
|
||||
currently supports subsets of GTK+, Motif, and MS Windows.
|
||||
.
|
||||
This package is built to use the wxUNIVERSAL widget set instead of
|
||||
native gtk widgets.
|
||||
|
||||
Package: libwxgtk=V-contrib-dev
|
||||
Architecture: any
|
||||
Section: devel
|
||||
@@ -204,3 +217,33 @@ Description: wxWindows Cross-platform C++ GUI toolkit (examples)
|
||||
.
|
||||
This package contains examples of using the wxWindows toolkit.
|
||||
|
||||
Package: libwxbase-msw=V-dev
|
||||
Architecture: i386
|
||||
Section: otherosfs
|
||||
Depends: wxwin=V-headers-msw (= ${Source-Version})
|
||||
Conflicts: libwxbase-msw-dev
|
||||
Replaces: libwxbase-msw-dev
|
||||
Provides: libwxbase-msw-dev
|
||||
Description: wxBase mingw32msvc-cross
|
||||
mingw32msvc-cross wxBase libs.
|
||||
|
||||
Package: libwxmsw=V-dev
|
||||
Architecture: i386
|
||||
Section: otherosfs
|
||||
Depends: wxwin=V-headers-msw (= ${Source-Version})
|
||||
Conflicts: libwxmsw-dev
|
||||
Replaces: libwxmsw-dev
|
||||
Provides: libwxmsw-dev
|
||||
Description: wxMSW mingw32msvc-cross
|
||||
mingw32msvc-cross wxMSW libs.
|
||||
|
||||
Package: wxwin=V-headers-msw
|
||||
Architecture: i386
|
||||
Section: otherosfs
|
||||
Depends: wxwin=V-headers (= ${Source-Version})
|
||||
Conflicts: wxwin-headers-msw
|
||||
Replaces: wxwin-headers-msw
|
||||
Provides: wxwin-headers-msw
|
||||
Description: Extra wxWindows headers for mingw32msvc-cross
|
||||
Headers required by the wxWindows mingw32msvc-cross libraries.
|
||||
|
||||
|
2
debian/libwxbase-dbg.dirs
vendored
2
debian/libwxbase-dbg.dirs
vendored
@@ -1,5 +1,5 @@
|
||||
usr/bin
|
||||
usr/lib/wx/include/wx
|
||||
usr/lib/wx/include/based-=V/wx
|
||||
usr/share/man/man1
|
||||
usr/share/lintian/overrides
|
||||
|
||||
|
2
debian/libwxbase-dbg.links
vendored
2
debian/libwxbase-dbg.links
vendored
@@ -1,2 +1,2 @@
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbased-config.1.gz
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbased-=V-config.1.gz
|
||||
|
||||
|
2
debian/libwxbase-dbg.postinst
vendored
2
debian/libwxbase-dbg.postinst
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbased-config 50
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbased-=V-config 50
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
ldconfig
|
||||
|
2
debian/libwxbase-dbg.prerm
vendored
2
debian/libwxbase-dbg.prerm
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --remove wx-config /usr/bin/wxbased-config
|
||||
update-alternatives --remove wx-config /usr/bin/wxbased-=V-config
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
2
debian/libwxbase-dev.dirs
vendored
2
debian/libwxbase-dev.dirs
vendored
@@ -1,3 +1,3 @@
|
||||
usr/bin
|
||||
usr/lib/wx/include/wx
|
||||
usr/lib/wx/include/base-=V/wx
|
||||
usr/share/man/man1
|
||||
|
4
debian/libwxbase-dev.files
vendored
4
debian/libwxbase-dev.files
vendored
@@ -1,4 +1,4 @@
|
||||
usr/bin/wxbase-config
|
||||
usr/lib/wx/include/wx/base/setup.h
|
||||
usr/bin/wxbase-=V-config
|
||||
usr/lib/wx/include/base-=V/wx/setup.h
|
||||
usr/lib/libwx_base*.so
|
||||
|
||||
|
2
debian/libwxbase-dev.links
vendored
2
debian/libwxbase-dev.links
vendored
@@ -1 +1 @@
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbase-config.1.gz
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbase-=V-config.1.gz
|
||||
|
2
debian/libwxbase-dev.postinst
vendored
2
debian/libwxbase-dev.postinst
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbase-config 60
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbase-=V-config 60
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
2
debian/libwxbase-dev.prerm
vendored
2
debian/libwxbase-dev.prerm
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --remove wx-config /usr/bin/wxbase-config
|
||||
update-alternatives --remove wx-config /usr/bin/wxbase-=V-config
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
4
debian/libwxbase-msw-dev.dirs
vendored
Normal file
4
debian/libwxbase-msw-dev.dirs
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
usr/bin
|
||||
usr/=H/lib/wx/include/base-=V-=H/wx
|
||||
usr/share/man/man1
|
||||
|
2
debian/libwxbase-msw-dev.links
vendored
Normal file
2
debian/libwxbase-msw-dev.links
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbase-=V-=H-config.1.gz
|
||||
|
7
debian/libwxbase-msw-dev.postinst
vendored
Normal file
7
debian/libwxbase-msw-dev.postinst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbase-=V-=H-config 40
|
||||
|
||||
#DEBHELPER#
|
||||
|
7
debian/libwxbase-msw-dev.prerm
vendored
Normal file
7
debian/libwxbase-msw-dev.prerm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --remove wx-config /usr/bin/wxbase-=V-=H-config
|
||||
|
||||
#DEBHELPER#
|
||||
|
4
debian/libwxgtk-contrib-dev.files
vendored
4
debian/libwxgtk-contrib-dev.files
vendored
@@ -1,5 +1,9 @@
|
||||
usr/include/wx/
|
||||
usr/lib/libcanvas.so
|
||||
usr/lib/libfl.so
|
||||
usr/lib/libmmedia.so
|
||||
usr/lib/libogl.so
|
||||
usr/lib/libstc.so
|
||||
usr/lib/libwx_plot.so
|
||||
usr/lib/libwxxrc.so
|
||||
|
||||
|
2
debian/libwxgtk-dbg.dirs
vendored
2
debian/libwxgtk-dbg.dirs
vendored
@@ -1,5 +1,5 @@
|
||||
usr/bin
|
||||
usr/lib/wx/include/wx/gtkd/
|
||||
usr/lib/wx/include/gtkd-=V/wx
|
||||
usr/share/man/man1
|
||||
usr/share/lintian/overrides
|
||||
|
||||
|
2
debian/libwxgtk-dbg.links
vendored
2
debian/libwxgtk-dbg.links
vendored
@@ -1,2 +1,2 @@
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtkd-config.1.gz
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtkd-=V-config.1.gz
|
||||
|
||||
|
2
debian/libwxgtk-dbg.postinst
vendored
2
debian/libwxgtk-dbg.postinst
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtkd-config 50
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtkd-=V-config 50
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
ldconfig
|
||||
|
2
debian/libwxgtk-dbg.prerm
vendored
2
debian/libwxgtk-dbg.prerm
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --remove wx-config /usr/bin/wxgtkd-config
|
||||
update-alternatives --remove wx-config /usr/bin/wxgtkd-=V-config
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
3
debian/libwxgtk-dev.dirs
vendored
3
debian/libwxgtk-dev.dirs
vendored
@@ -1,3 +1,4 @@
|
||||
usr/bin
|
||||
usr/lib/wx/include/wx/gtk/
|
||||
usr/lib/wx/include/gtk-=V/wx
|
||||
usr/share/man/man1
|
||||
|
||||
|
8
debian/libwxgtk-dev.files
vendored
8
debian/libwxgtk-dev.files
vendored
@@ -1,6 +1,4 @@
|
||||
usr/bin/wxgtk-config
|
||||
usr/lib/wx/include/wx/gtk/setup.h
|
||||
usr/lib/libwx_gtk-*.so
|
||||
usr/lib/libwx_gtk.so
|
||||
usr/lib/libwx_gtk_gl*.so
|
||||
usr/bin/wxgtk-=V-config
|
||||
usr/lib/wx/include/gtk-=V/wx/setup.h
|
||||
usr/lib/libwx_gtk*.so
|
||||
|
||||
|
3
debian/libwxgtk-dev.links
vendored
3
debian/libwxgtk-dev.links
vendored
@@ -1 +1,2 @@
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk-config.1.gz
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk-=V-config.1.gz
|
||||
|
||||
|
2
debian/libwxgtk-dev.postinst
vendored
2
debian/libwxgtk-dev.postinst
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk-config 70
|
||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk-=V-config 70
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
2
debian/libwxgtk-dev.prerm
vendored
2
debian/libwxgtk-dev.prerm
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
update-alternatives --remove wx-config /usr/bin/wxgtk-config
|
||||
update-alternatives --remove wx-config /usr/bin/wxgtk-=V-config
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
4
debian/libwxgtk-univ.dirs
vendored
Normal file
4
debian/libwxgtk-univ.dirs
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
usr/bin
|
||||
usr/lib/wx/include/gtkuniv-=V/wx
|
||||
usr/share/man/man1
|
||||
|
2
debian/libwxgtk-univ.links
vendored
Normal file
2
debian/libwxgtk-univ.links
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtkuniv-=V-config.1.gz
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user