Compare commits
4463 Commits
wxPython-2
...
wxPy_2_2_2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f35e7719e | ||
|
|
ec06bb93ba | ||
|
|
b04973acaa | ||
|
|
4ac0d24da4 | ||
|
|
5e60be2f7f | ||
|
|
470562a9af | ||
|
|
e852f9033e | ||
|
|
898e82a8c7 | ||
|
|
40f7b5f76b | ||
|
|
8068015e65 | ||
|
|
f658d298bb | ||
|
|
285c885e12 | ||
|
|
b787791b21 | ||
|
|
438b4b52f2 | ||
|
|
17a2186215 | ||
|
|
1c6e38f4df | ||
|
|
02b1952cd9 | ||
|
|
7e1199769b | ||
|
|
9d794a4e7b | ||
|
|
b669d817ea | ||
|
|
24260d5ec5 | ||
|
|
1e081845e5 | ||
|
|
52e72fde27 | ||
|
|
be62e9322d | ||
|
|
f1c90907c3 | ||
|
|
b91be9807d | ||
|
|
b46c6fa3dd | ||
|
|
c3728eafab | ||
|
|
1a184fd470 | ||
|
|
e55ff14df0 | ||
|
|
57751708cb | ||
|
|
7034f0a799 | ||
|
|
3923605351 | ||
|
|
2acd3b1ae2 | ||
|
|
5c3c8ede8a | ||
|
|
c8d4a993c1 | ||
|
|
bcb16e4402 | ||
|
|
88766d7767 | ||
|
|
4123879f82 | ||
|
|
2bac07b9d0 | ||
|
|
d1640f9bd5 | ||
|
|
39ec07c3b0 | ||
|
|
f25ec3c10a | ||
|
|
96f0d9b535 | ||
|
|
b267ab6fd2 | ||
|
|
1f4952e59d | ||
|
|
ec76d0c268 | ||
|
|
3928193dd5 | ||
|
|
e2b9df51a4 | ||
|
|
be481aacfe | ||
|
|
76c42b8f41 | ||
|
|
1d6bef6dbe | ||
|
|
58ac0a3b73 | ||
|
|
d1ce109158 | ||
|
|
913f5facbf | ||
|
|
987b4db3a1 | ||
|
|
a2949715ec | ||
|
|
17e5eeeea8 | ||
|
|
0a5f6de6fc | ||
|
|
2aad589775 | ||
|
|
c05578d7c1 | ||
|
|
35a652d600 | ||
|
|
a2bc08c3de | ||
|
|
c4445de880 | ||
|
|
058973c50c | ||
|
|
20f07d3994 | ||
|
|
5a17ae7706 | ||
|
|
f115125c20 | ||
|
|
8c9b2984a8 | ||
|
|
cccb6b65cb | ||
|
|
5dacdafd9c | ||
|
|
0498ecf0d4 | ||
|
|
e1b27de63f | ||
|
|
2814e52084 | ||
|
|
9fcc7e1447 | ||
|
|
fb1c66b394 | ||
|
|
4a7a4df4a7 | ||
|
|
da3c8ac72c | ||
|
|
44134176ae | ||
|
|
529df28444 | ||
|
|
8e4b3c4793 | ||
|
|
c84b4372d6 | ||
|
|
aebe7b130e | ||
|
|
6c7a36cc1b | ||
|
|
012c2554ac | ||
|
|
adc78fbb81 | ||
|
|
394c9cd3eb | ||
|
|
8953ebb64d | ||
|
|
ced50b3323 | ||
|
|
66181ca50d | ||
|
|
e88b97e6e0 | ||
|
|
f234e7bd93 | ||
|
|
cc2b7dde15 | ||
|
|
4d21e7b0fb | ||
|
|
915d094abb | ||
|
|
7f20d9c3ac | ||
|
|
1b826fd8cf | ||
|
|
99aa2d72c7 | ||
|
|
68f73e7b18 | ||
|
|
ed7d26fec1 | ||
|
|
a927ed1665 | ||
|
|
2bd6903d18 | ||
|
|
9c60ef71f1 | ||
|
|
cf0ecf5234 | ||
|
|
75bea72e72 | ||
|
|
e5a314fa9b | ||
|
|
b0bcf6799e | ||
|
|
9f9619d8a6 | ||
|
|
19d900fd6a | ||
|
|
2e7005d54f | ||
|
|
73215dd510 | ||
|
|
0cc42bb8a0 | ||
|
|
e61d76a7da | ||
|
|
9721958798 | ||
|
|
16ce088893 | ||
|
|
5e50c7aed0 | ||
|
|
ac2b4e619a | ||
|
|
603ad17064 | ||
|
|
07e9e6a82e | ||
|
|
95e98de61b | ||
|
|
6c35149269 | ||
|
|
e98408c5af | ||
|
|
b8e3e48747 | ||
|
|
ed152d040a | ||
|
|
0668ed67d3 | ||
|
|
cd50efc412 | ||
|
|
bc22fbf50d | ||
|
|
0941825d49 | ||
|
|
a03430838d | ||
|
|
11d4a2d65b | ||
|
|
7cbc29972f | ||
|
|
130641a308 | ||
|
|
fa711ca3ea | ||
|
|
ef65dc1c96 | ||
|
|
261df93f45 | ||
|
|
77bb48f9bb | ||
|
|
009b6d2972 | ||
|
|
982afb26d2 | ||
|
|
f6ea16541e | ||
|
|
26270ea4c9 | ||
|
|
d55a17e6c8 | ||
|
|
7af8ff97ce | ||
|
|
c636399301 | ||
|
|
b65c371ca8 | ||
|
|
8317194692 | ||
|
|
49849fadb8 | ||
|
|
ed64fd2518 | ||
|
|
bcb751a9d5 | ||
|
|
d88eb514de | ||
|
|
dd98264971 | ||
|
|
4a0a9b03d6 | ||
|
|
9444f8dbc3 | ||
|
|
5101dc00ca | ||
|
|
3e223a8a1e | ||
|
|
06c193f271 | ||
|
|
e47abcc98a | ||
|
|
d3b2361621 | ||
|
|
1180177533 | ||
|
|
4ab299e341 | ||
|
|
9c7013a23b | ||
|
|
d57fe8787b | ||
|
|
521d92a66d | ||
|
|
e51b06d56f | ||
|
|
07793870fb | ||
|
|
cff4d2f859 | ||
|
|
b0b9777d40 | ||
|
|
0f4e4da55c | ||
|
|
c898f79a9f | ||
|
|
e231753983 | ||
|
|
3ed3532bd7 | ||
|
|
39dd8deaa6 | ||
|
|
b4927bb94a | ||
|
|
67c2cc3e74 | ||
|
|
9926c07ad1 | ||
|
|
61ef71d148 | ||
|
|
ae90bcd749 | ||
|
|
8397d5f719 | ||
|
|
9708091a2f | ||
|
|
9ca7ea0da6 | ||
|
|
22d9baa993 | ||
|
|
55ee71e1bf | ||
|
|
676f03dba3 | ||
|
|
5c2fa2063c | ||
|
|
46f20c3227 | ||
|
|
5bdb26305f | ||
|
|
03f3fe6fb7 | ||
|
|
cb3c5d853f | ||
|
|
daf91c018c | ||
|
|
aafdc5a46c | ||
|
|
7f7c1d269c | ||
|
|
d9131af011 | ||
|
|
7ae8234630 | ||
|
|
3d84f97e52 | ||
|
|
bfb9d722c0 | ||
|
|
9d84a7e5ef | ||
|
|
d63f569944 | ||
|
|
19f590b4da | ||
|
|
211bac8177 | ||
|
|
45d27b94de | ||
|
|
95fecb054a | ||
|
|
5647a063a5 | ||
|
|
c83d183606 | ||
|
|
e0f38535d6 | ||
|
|
a2d51707f9 | ||
|
|
3193682a45 | ||
|
|
43908bd296 | ||
|
|
6a26a72df2 | ||
|
|
7c49c6b7fc | ||
|
|
5fb1f6406a | ||
|
|
4324fb1968 | ||
|
|
d19729d528 | ||
|
|
f21cb9a888 | ||
|
|
30f2a1119a | ||
|
|
2abeae78b2 | ||
|
|
46861a80df | ||
|
|
d42d40692b | ||
|
|
f7acd7dfc5 | ||
|
|
282d3ee19a | ||
|
|
e159092cf0 | ||
|
|
6c06c16203 | ||
|
|
2f476ae972 | ||
|
|
6a40611b52 | ||
|
|
0fde4c5a66 | ||
|
|
d212f35a39 | ||
|
|
a198ebda98 | ||
|
|
f4824f1c2a | ||
|
|
b4d77d6767 | ||
|
|
ff622b0add | ||
|
|
6faafed2c0 | ||
|
|
517444edb1 | ||
|
|
0a78ba3df5 | ||
|
|
1e6237babe | ||
|
|
5efb426fb0 | ||
|
|
46bbeb6c59 | ||
|
|
3a084b48d0 | ||
|
|
0d8ab7638d | ||
|
|
f29dc62250 | ||
|
|
d29fe953ec | ||
|
|
f743e9389e | ||
|
|
037759a02e | ||
|
|
69b7ff3a83 | ||
|
|
23c44a6134 | ||
|
|
a3a57f29ce | ||
|
|
c539c9d998 | ||
|
|
d7bd0e960c | ||
|
|
1e1567d221 | ||
|
|
6456a7f792 | ||
|
|
2941f53242 | ||
|
|
3c8c835c23 | ||
|
|
7109c7c2f8 | ||
|
|
77dbcbc141 | ||
|
|
6953221642 | ||
|
|
b66b97e53c | ||
|
|
8d67403dfd | ||
|
|
50e38d88a2 | ||
|
|
0b471f42ee | ||
|
|
d350269679 | ||
|
|
13d6e033a3 | ||
|
|
2eec5d7fe2 | ||
|
|
523a1a306a | ||
|
|
1173ab2b37 | ||
|
|
386cd1e43b | ||
|
|
50dce4e225 | ||
|
|
bfcc7524b1 | ||
|
|
755528fe9a | ||
|
|
7cafa89468 | ||
|
|
ad7560cc1b | ||
|
|
eae6b980f6 | ||
|
|
361189d912 | ||
|
|
4f71eca5df | ||
|
|
72f6809886 | ||
|
|
dedae23fe7 | ||
|
|
b2a64291ba | ||
|
|
9c26be6b7c | ||
|
|
c8da1e98e8 | ||
|
|
80ccc1282c | ||
|
|
30ebe8b325 | ||
|
|
01da3752ff | ||
|
|
2a3d83ce71 | ||
|
|
dd37e60373 | ||
|
|
bbca093198 | ||
|
|
146e73f9fc | ||
|
|
ccb0fa4972 | ||
|
|
e6a879172a | ||
|
|
ef289fac18 | ||
|
|
fce5b5df0c | ||
|
|
75cd4558aa | ||
|
|
d89a9967e2 | ||
|
|
0c0dba254a | ||
|
|
9c18af7c6f | ||
|
|
1247459058 | ||
|
|
0b397099c7 | ||
|
|
2c33291c88 | ||
|
|
0855205063 | ||
|
|
b0f8234dd5 | ||
|
|
ba305d2c09 | ||
|
|
157ec6f245 | ||
|
|
c0eacd8c9d | ||
|
|
a6f8c30c69 | ||
|
|
e1f35294c9 | ||
|
|
1afd23b4fe | ||
|
|
ad4e1ada75 | ||
|
|
97ede207f5 | ||
|
|
69be06765c | ||
|
|
ec89413101 | ||
|
|
f82c893819 | ||
|
|
5f6d27e2fe | ||
|
|
c941c715dc | ||
|
|
3a4d5eac4b | ||
|
|
01fd9fc23a | ||
|
|
1d8b4ecf12 | ||
|
|
893f085de3 | ||
|
|
f98b3e0b10 | ||
|
|
542c5b121a | ||
|
|
f8ddb870c1 | ||
|
|
cba254cf9a | ||
|
|
3f4983bf30 | ||
|
|
ab1b83b633 | ||
|
|
fad2710181 | ||
|
|
ff11fd4c62 | ||
|
|
2c11e7c121 | ||
|
|
336c799602 | ||
|
|
53b9834d36 | ||
|
|
0afe3164b4 | ||
|
|
e4277eca0a | ||
|
|
c097dc3d01 | ||
|
|
8de3998d30 | ||
|
|
5edfb31e95 | ||
|
|
4f229bd746 | ||
|
|
ab2cd8651e | ||
|
|
54355138d0 | ||
|
|
3d68c787aa | ||
|
|
8f3299d8ee | ||
|
|
555b2cf3c9 | ||
|
|
b98b2b27d6 | ||
|
|
90678ba2ea | ||
|
|
ab5df9e686 | ||
|
|
5ba9fb0691 | ||
|
|
27c89aeac2 | ||
|
|
8b6d09851d | ||
|
|
028de29b9d | ||
|
|
f9e9953e80 | ||
|
|
afe121c935 | ||
|
|
949f446dfc | ||
|
|
f2e0f93a0f | ||
|
|
29963001d3 | ||
|
|
c18da485ed | ||
|
|
2e07b29dd9 | ||
|
|
a75b761a1d | ||
|
|
f656067f27 | ||
|
|
5016f35584 | ||
|
|
c3a6e88593 | ||
|
|
e1e0d52884 | ||
|
|
262804532c | ||
|
|
e44fed2cb2 | ||
|
|
8598648fd1 | ||
|
|
efcc189ef2 | ||
|
|
6b5f146a2b | ||
|
|
d19e79247c | ||
|
|
723c762269 | ||
|
|
6bf87dad49 | ||
|
|
c55f0098d5 | ||
|
|
906b7d74a9 | ||
|
|
cf9c8f73a9 | ||
|
|
fca5322810 | ||
|
|
59acb9f291 | ||
|
|
d4a0c23fcd | ||
|
|
05b8c7b93c | ||
|
|
2e5b3a4634 | ||
|
|
a49123d60d | ||
|
|
ad17bd33cf | ||
|
|
838ab8a108 | ||
|
|
0f82c38d0c | ||
|
|
a3d1c18e7b | ||
|
|
3a035fb95f | ||
|
|
92eaf25bd0 | ||
|
|
4c10583a28 | ||
|
|
0d3c36e208 | ||
|
|
c04727830b | ||
|
|
df5361af0f | ||
|
|
765814e38e | ||
|
|
78067d6c40 | ||
|
|
678ddc9aa9 | ||
|
|
717562e490 | ||
|
|
0119459c53 | ||
|
|
97b0241cf2 | ||
|
|
faf08d09e2 | ||
|
|
a3e99a54fb | ||
|
|
3450f21ccf | ||
|
|
05c7d17691 | ||
|
|
0d14df868d | ||
|
|
1fc97740b8 | ||
|
|
268934d26f | ||
|
|
1dcb6a4e5d | ||
|
|
b814f3aa5c | ||
|
|
b18568fe30 | ||
|
|
29285225da | ||
|
|
48a4aaa207 | ||
|
|
70e5dd6b56 | ||
|
|
5623e844b6 | ||
|
|
a1d19f87a3 | ||
|
|
73c6e8505e | ||
|
|
a8f9e1f310 | ||
|
|
068407ed84 | ||
|
|
7eec402f36 | ||
|
|
d506e640af | ||
|
|
8a7ec928f5 | ||
|
|
18747d0f9d | ||
|
|
3c10c250ff | ||
|
|
62786fc3be | ||
|
|
e21e241714 | ||
|
|
8dbef32aaf | ||
|
|
122e8c139e | ||
|
|
a7798d1ce7 | ||
|
|
71462b226d | ||
|
|
1362e5d0a0 | ||
|
|
3dd8eab441 | ||
|
|
792a17440e | ||
|
|
2e18172773 | ||
|
|
41c3173dde | ||
|
|
0955d39bd0 | ||
|
|
06ca83c4ee | ||
|
|
948f1f2b77 | ||
|
|
888b22c897 | ||
|
|
ae519b8df7 | ||
|
|
b024dc9b26 | ||
|
|
057327a687 | ||
|
|
0e86e26936 | ||
|
|
c17d222122 | ||
|
|
741ca84241 | ||
|
|
97d80a31a7 | ||
|
|
177903e236 | ||
|
|
94aaac5f83 | ||
|
|
2ebbd666d9 | ||
|
|
0e591a96d8 | ||
|
|
e1ce4782d4 | ||
|
|
e554697812 | ||
|
|
2bde25b093 | ||
|
|
0c3e16933d | ||
|
|
09d7c0f79e | ||
|
|
8064dd594d | ||
|
|
b0f0a3bd19 | ||
|
|
b6ab93c400 | ||
|
|
a750cce7a5 | ||
|
|
9e677ba35c | ||
|
|
4d32dae4fe | ||
|
|
551490e542 | ||
|
|
7aed63fdb7 | ||
|
|
1ac341e016 | ||
|
|
46f2e76b49 | ||
|
|
ed55d1091b | ||
|
|
6b59747c47 | ||
|
|
c446668e29 | ||
|
|
9393e156ef | ||
|
|
00ce683fb0 | ||
|
|
da872f02a5 | ||
|
|
26eb0ba5b8 | ||
|
|
2ed1896868 | ||
|
|
1008a84515 | ||
|
|
d1016f9826 | ||
|
|
7669ba3c67 | ||
|
|
3ffdc4cfeb | ||
|
|
0c25b1bc0a | ||
|
|
8034c36f53 | ||
|
|
271c9d0c5b | ||
|
|
0a856f043d | ||
|
|
00f4f2918f | ||
|
|
5d7899a2aa | ||
|
|
7e5510c0ad | ||
|
|
86d60447c3 | ||
|
|
ec66f52340 | ||
|
|
3a3377d7bf | ||
|
|
f7585687b2 | ||
|
|
43bc2aae58 | ||
|
|
3d66a009ac | ||
|
|
ddbed9f4d0 | ||
|
|
c68a7f32c4 | ||
|
|
5c5978df98 | ||
|
|
c10d06a2bb | ||
|
|
3e47e5afcf | ||
|
|
b4e9e877bd | ||
|
|
0890fc3629 | ||
|
|
8494b2036a | ||
|
|
f4cabb889c | ||
|
|
bdbb707f0c | ||
|
|
c1e56e2c29 | ||
|
|
b09e1f2987 | ||
|
|
e797f13aca | ||
|
|
b270f6e30e | ||
|
|
4145aa5c05 | ||
|
|
b7bcf0138c | ||
|
|
3591a31424 | ||
|
|
8dad40e19b | ||
|
|
6ceff2c99a | ||
|
|
f35ae7efb5 | ||
|
|
0cf4561f43 | ||
|
|
5b22c8f89e | ||
|
|
74cb08107a | ||
|
|
3e00a662d6 | ||
|
|
5cc9ffe646 | ||
|
|
5f53644cbb | ||
|
|
ac82c949d0 | ||
|
|
afa7da4a16 | ||
|
|
8ebc8d5d7d | ||
|
|
f333c6e7bb | ||
|
|
37dc9a7012 | ||
|
|
5208c1aa1e | ||
|
|
12675983a2 | ||
|
|
aa54dcf52c | ||
|
|
f5f1197540 | ||
|
|
c51147cf23 | ||
|
|
9be9d2f53d | ||
|
|
c3e5348ff8 | ||
|
|
5f3c23cb12 | ||
|
|
b1f22e19ef | ||
|
|
21be423168 | ||
|
|
089ec5295e | ||
|
|
845b598c7a | ||
|
|
cc2a0b0170 | ||
|
|
27e4c09614 | ||
|
|
1dea0a08fe | ||
|
|
a0c0d1c333 | ||
|
|
b3dc3e89a6 | ||
|
|
8e8d1fee57 | ||
|
|
a8452a5005 | ||
|
|
492dc50b67 | ||
|
|
be1018ee90 | ||
|
|
d76f2a46dd | ||
|
|
4320a952c6 | ||
|
|
04ae894cf4 | ||
|
|
c63e4e6898 | ||
|
|
f76a45441a | ||
|
|
04e158348e | ||
|
|
0f9a3aaea8 | ||
|
|
59277cb364 | ||
|
|
d26a990438 | ||
|
|
174345b445 | ||
|
|
adb176e718 | ||
|
|
551a706062 | ||
|
|
eb5ad261fd | ||
|
|
fec5a2a4b1 | ||
|
|
a38940ab11 | ||
|
|
ab88076643 | ||
|
|
f880e232cc | ||
|
|
fd094b9d81 | ||
|
|
8beb7b3288 | ||
|
|
e6f3a43816 | ||
|
|
29f3b96f83 | ||
|
|
f75f6530b0 | ||
|
|
2bcb5cfd6a | ||
|
|
758ac86c09 | ||
|
|
09efdbdbdd | ||
|
|
7e446e11e0 | ||
|
|
62e6b49c33 | ||
|
|
d9ca264808 | ||
|
|
5902841d30 | ||
|
|
3639911da7 | ||
|
|
8a6be78d08 | ||
|
|
9f92fb287b | ||
|
|
d9a54596d5 | ||
|
|
9aa0f3f84e | ||
|
|
9604ea8a1f | ||
|
|
9f27c30f49 | ||
|
|
2b8df44d57 | ||
|
|
8731dddafd | ||
|
|
a95ee79d9c | ||
|
|
c1af1ea6b5 | ||
|
|
089337645a | ||
|
|
ee4ddd9f0b | ||
|
|
1f15195e08 | ||
|
|
ff05c6bb11 | ||
|
|
5681482475 | ||
|
|
3c6bc198d9 | ||
|
|
04fc6c1725 | ||
|
|
70db8eec06 | ||
|
|
74008a4cd4 | ||
|
|
b6276d5829 | ||
|
|
eff56bb979 | ||
|
|
540ad1b39d | ||
|
|
d270402a9f | ||
|
|
e54334e7f1 | ||
|
|
d6ce5a908c | ||
|
|
b8ad056e8d | ||
|
|
aa680ee1e8 | ||
|
|
3d0b89c1ca | ||
|
|
5fff5f8a27 | ||
|
|
bbc7adbd09 | ||
|
|
45c09d1e66 | ||
|
|
9879663237 | ||
|
|
af899cb15b | ||
|
|
d168273d36 | ||
|
|
31fb9a5779 | ||
|
|
54d5ffd6c3 | ||
|
|
b912a066c2 | ||
|
|
7b235d47c0 | ||
|
|
b0d2cd55b4 | ||
|
|
92963bc943 | ||
|
|
fbdcfa4c82 | ||
|
|
5272b7f059 | ||
|
|
8c43f741f4 | ||
|
|
ac27286674 | ||
|
|
029bc77adc | ||
|
|
29afd50360 | ||
|
|
0212a4c2aa | ||
|
|
9be0381b20 | ||
|
|
37bb827fa9 | ||
|
|
c777c58b76 | ||
|
|
133d8d0745 | ||
|
|
ef854828f2 | ||
|
|
96901a6f4c | ||
|
|
f998c383d4 | ||
|
|
a1777c3e92 | ||
|
|
b91a42d6d9 | ||
|
|
a61421124a | ||
|
|
d30143f3cb | ||
|
|
77a93d3eb4 | ||
|
|
fcd984f8a1 | ||
|
|
4c25e5b0ba | ||
|
|
0126cabac6 | ||
|
|
9047a3c139 | ||
|
|
3844b70dd8 | ||
|
|
04652a15c8 | ||
|
|
77bc12b08f | ||
|
|
fd4afea729 | ||
|
|
7a702aa804 | ||
|
|
0acd3d9a08 | ||
|
|
da14645955 | ||
|
|
9bcefc38f1 | ||
|
|
5469ae1795 | ||
|
|
7c777c5c15 | ||
|
|
72ef08c782 | ||
|
|
d683b85f75 | ||
|
|
fc5e41a7ba | ||
|
|
1c09143020 | ||
|
|
b9464e8d4e | ||
|
|
b4e0cd2a78 | ||
|
|
cf5d275eb8 | ||
|
|
c160361dcf | ||
|
|
8ba2c5be88 | ||
|
|
aaa42385ce | ||
|
|
99f792deea | ||
|
|
eb7d6db675 | ||
|
|
fec9970c39 | ||
|
|
e1cac7c231 | ||
|
|
1f5e577084 | ||
|
|
9c54b21732 | ||
|
|
569de831ba | ||
|
|
8ab9b79aa1 | ||
|
|
70b6f373b0 | ||
|
|
7b271e861b | ||
|
|
1fd26975c8 | ||
|
|
9ced6db5a5 | ||
|
|
398637f576 | ||
|
|
99d564be95 | ||
|
|
a61639123c | ||
|
|
e36ee5f7aa | ||
|
|
42413911cc | ||
|
|
cc63ae0fcc | ||
|
|
6d9092202d | ||
|
|
14f5789360 | ||
|
|
e2f3066a9c | ||
|
|
c74f7c1383 | ||
|
|
1a3cfaf5a6 | ||
|
|
0bd879bad6 | ||
|
|
7a5a0c9f34 | ||
|
|
cabc28c46e | ||
|
|
a1e181ef4d | ||
|
|
1b51ff0849 | ||
|
|
a5fc62d05d | ||
|
|
efcd017c71 | ||
|
|
c449ac8125 | ||
|
|
797aa4038f | ||
|
|
10b371fa0e | ||
|
|
902153ef4a | ||
|
|
3ce78ed297 | ||
|
|
adf72aeaf7 | ||
|
|
5b0d059b3e | ||
|
|
015e85cdf7 | ||
|
|
e0c1bcc8f4 | ||
|
|
c866dfa40c | ||
|
|
53b3fe94d5 | ||
|
|
be8e2100c1 | ||
|
|
34de32c717 | ||
|
|
5e22259222 | ||
|
|
d3c3c062d9 | ||
|
|
f6f9b93b17 | ||
|
|
f5ea644170 | ||
|
|
5d301221bc | ||
|
|
fbbfc840a4 | ||
|
|
d66093c7b6 | ||
|
|
aa59afd1ea | ||
|
|
029713d7e1 | ||
|
|
fc3e2a3a66 | ||
|
|
44faee407c | ||
|
|
08392f16cc | ||
|
|
1f5e4b9004 | ||
|
|
7162312f78 | ||
|
|
9b9d5355c8 | ||
|
|
364de90c91 | ||
|
|
548812d9af | ||
|
|
bf49fbcff9 | ||
|
|
804a3434d6 | ||
|
|
5a6d3ec3b1 | ||
|
|
dde04b1546 | ||
|
|
5c06d1b014 | ||
|
|
c17cc4a96f | ||
|
|
a58b3aa909 | ||
|
|
8dbbdfd06f | ||
|
|
fb5ac85a06 | ||
|
|
ed62f512c0 | ||
|
|
cdde63f535 | ||
|
|
6b958cfc0b | ||
|
|
8e1a0be217 | ||
|
|
4a18b95556 | ||
|
|
76dfc86313 | ||
|
|
5c89255496 | ||
|
|
76727e0cbf | ||
|
|
366e627490 | ||
|
|
61471de76f | ||
|
|
10c16e31a6 | ||
|
|
64561c3308 | ||
|
|
42ab7508e8 | ||
|
|
ddc0b275b3 | ||
|
|
36ce8f44db | ||
|
|
fa3a64d1ad | ||
|
|
af9bf0bc25 | ||
|
|
d55da698a8 | ||
|
|
d70b1ce4d2 | ||
|
|
5fe87ba09f | ||
|
|
758a4bb5a6 | ||
|
|
806b8a2301 | ||
|
|
f96ed10a83 | ||
|
|
da131498e8 | ||
|
|
c518860f60 | ||
|
|
066b2a4c3e | ||
|
|
69400134a8 | ||
|
|
5eabe5bbbf | ||
|
|
dc3f2c920f | ||
|
|
3d3cbc05f6 | ||
|
|
076e41016d | ||
|
|
cd73d539f6 | ||
|
|
421da573e5 | ||
|
|
9faba833a2 | ||
|
|
4401790cca | ||
|
|
efe67f809f | ||
|
|
6b0b085ef4 | ||
|
|
0ca080a91b | ||
|
|
01f39d1f1a | ||
|
|
0e950afdf3 | ||
|
|
da95cfa91d | ||
|
|
0187c87a03 | ||
|
|
bb5aa6e588 | ||
|
|
478e209df5 | ||
|
|
a2b28e922b | ||
|
|
498db281b5 | ||
|
|
2442422672 | ||
|
|
6e96414894 | ||
|
|
91c93b48e9 | ||
|
|
1f9c607e98 | ||
|
|
9f0e1cfc63 | ||
|
|
9215f35ef8 | ||
|
|
d7030ac6aa | ||
|
|
9de1150e2d | ||
|
|
89ee194efd | ||
|
|
4cf39e614a | ||
|
|
23cf28b3db | ||
|
|
61dfd2bea1 | ||
|
|
647455ee0f | ||
|
|
efecda0bf7 | ||
|
|
21aff0fe10 | ||
|
|
2073bb3d4d | ||
|
|
9e13e99d6d | ||
|
|
4f96bc6cb6 | ||
|
|
4dbc8006b4 | ||
|
|
007d1132e2 | ||
|
|
df8442a339 | ||
|
|
b12ce2ff6d | ||
|
|
071bb1283a | ||
|
|
7322bbe14e | ||
|
|
19c9086b55 | ||
|
|
7a618981ce | ||
|
|
fc2518abb5 | ||
|
|
5eaa587e28 | ||
|
|
24e1c5fbb2 | ||
|
|
1a0e95d600 | ||
|
|
3e7b695396 | ||
|
|
77836a61b3 | ||
|
|
a99c0d5331 | ||
|
|
4aba0fc00a | ||
|
|
63e26a7756 | ||
|
|
a5b3c8eaae | ||
|
|
c513dcd1dd | ||
|
|
f8cc27023e | ||
|
|
01e92d1232 | ||
|
|
ac41c5e183 | ||
|
|
c4ad8c9c3a | ||
|
|
9bc38e1e0c | ||
|
|
2ba791ada8 | ||
|
|
37aba5df39 | ||
|
|
547b668c7b | ||
|
|
041bc561e8 | ||
|
|
9d98a27ad6 | ||
|
|
e54cfe2b28 | ||
|
|
300f993794 | ||
|
|
510336b11a | ||
|
|
161973e94e | ||
|
|
ce006a8f2b | ||
|
|
cdc6bea96e | ||
|
|
640fcfb074 | ||
|
|
6c8a91b333 | ||
|
|
40a9876e4f | ||
|
|
a8aff7b454 | ||
|
|
1a77ecaae2 | ||
|
|
d6a1ccea22 | ||
|
|
59c777d597 | ||
|
|
caf1045491 | ||
|
|
6d2df48070 | ||
|
|
4a969a50f3 | ||
|
|
b2720efe88 | ||
|
|
a1f822476a | ||
|
|
2dce793e22 | ||
|
|
2c1bc3a7fa | ||
|
|
ed93eb78ec | ||
|
|
3049cbeb6a | ||
|
|
4f0a1b07e6 | ||
|
|
f9a07d0026 | ||
|
|
c20c8cb95d | ||
|
|
d05e8f3f5c | ||
|
|
c72dfe98dc | ||
|
|
d298a528f4 | ||
|
|
5c70756a8f | ||
|
|
e48b7d7c05 | ||
|
|
80b2a27b78 | ||
|
|
0fa7b0e3e5 | ||
|
|
076d7d4005 | ||
|
|
f9bcbc2e9c | ||
|
|
6917fd5dee | ||
|
|
50b5f614b9 | ||
|
|
b2531949f3 | ||
|
|
01fa0d6d0f | ||
|
|
f00772c92e | ||
|
|
ebdaf2dec8 | ||
|
|
cf55f9ed7e | ||
|
|
f70cba4b45 | ||
|
|
9a993e53d7 | ||
|
|
aad4335f6b | ||
|
|
017582cd23 | ||
|
|
156cb8c2e4 | ||
|
|
07b1aad30f | ||
|
|
9a92e83940 | ||
|
|
b261e3335a | ||
|
|
f0d481f8fe | ||
|
|
e920d72d4a | ||
|
|
2512232672 | ||
|
|
51422a89ac | ||
|
|
140601fe00 | ||
|
|
a1a43473a6 | ||
|
|
9b4c5d5a21 | ||
|
|
d72d009d64 | ||
|
|
a5940b398c | ||
|
|
5498f96bfe | ||
|
|
9bafeae845 | ||
|
|
c3d12e0433 | ||
|
|
a94d44b9b7 | ||
|
|
fa1b3a43cc | ||
|
|
0a47db39df | ||
|
|
9d62ffe24a | ||
|
|
88c3e369b9 | ||
|
|
f908d9c1ea | ||
|
|
1b6220e1e1 | ||
|
|
86d43dcfc0 | ||
|
|
3a48624f10 | ||
|
|
7354522239 | ||
|
|
b8be5a9f03 | ||
|
|
897e170014 | ||
|
|
23373d8e9b | ||
|
|
9d7ec6e5d8 | ||
|
|
4536c57837 | ||
|
|
32ca12e65e | ||
|
|
ad2fbd102d | ||
|
|
c5da51bcb3 | ||
|
|
9980663066 | ||
|
|
50963011c2 | ||
|
|
9bf69b7bb5 | ||
|
|
833a6790ad | ||
|
|
59d3027c0c | ||
|
|
831026c188 | ||
|
|
231237044b | ||
|
|
eb24f2e86d | ||
|
|
7bdff45316 | ||
|
|
6f3340ff6e | ||
|
|
ad41d52d22 | ||
|
|
8518f82156 | ||
|
|
a053a88994 | ||
|
|
ae85cb4b2c | ||
|
|
26d865b08d | ||
|
|
8f2a1b9c01 | ||
|
|
18d014e3ed | ||
|
|
dc4ab3c264 | ||
|
|
1d0430ce13 | ||
|
|
85c9db78f3 | ||
|
|
c617e0de6b | ||
|
|
e10b3395bc | ||
|
|
9382d73538 | ||
|
|
351cc2a737 | ||
|
|
87f968fb5a | ||
|
|
f568f52dd8 | ||
|
|
27df708603 | ||
|
|
49f74d51eb | ||
|
|
b820f3ab56 | ||
|
|
9f6de777bb | ||
|
|
f6f09fc812 | ||
|
|
99f55f5c26 | ||
|
|
cbb5561c49 | ||
|
|
5a6c3a9171 | ||
|
|
4360bc4eae | ||
|
|
970047bbc3 | ||
|
|
379b9ba2cf | ||
|
|
1e58bda79b | ||
|
|
afb749d412 | ||
|
|
e12fec0574 | ||
|
|
49b332a96d | ||
|
|
02d3522ba6 | ||
|
|
dbe13b1101 | ||
|
|
1de119b2d9 | ||
|
|
8b3b778f3d | ||
|
|
bea6a318d9 | ||
|
|
6b9c32dccc | ||
|
|
6ff5b6cd0a | ||
|
|
d51d8a8d8a | ||
|
|
cd847575d0 | ||
|
|
c5a94cbde9 | ||
|
|
9083d34b55 | ||
|
|
cfff4cf98d | ||
|
|
aaca0586f2 | ||
|
|
7b84e4c356 | ||
|
|
05255a3cb4 | ||
|
|
a3e29acf45 | ||
|
|
d7102a0b12 | ||
|
|
706e8aa34d | ||
|
|
287456ff2f | ||
|
|
732c17643c | ||
|
|
7b41d11654 | ||
|
|
f018ef133c | ||
|
|
b92f1634b4 | ||
|
|
101751fbef | ||
|
|
03d95fca3e | ||
|
|
9d9d970d70 | ||
|
|
36508e0a17 | ||
|
|
40f04bce6e | ||
|
|
bf5b9adcfd | ||
|
|
98420eb8ab | ||
|
|
64dffa993f | ||
|
|
f0d59a5183 | ||
|
|
48f1ed8cf1 | ||
|
|
df9b4349d5 | ||
|
|
d096e52c4e | ||
|
|
fb71e6560f | ||
|
|
073638823a | ||
|
|
91b240626c | ||
|
|
2d853594de | ||
|
|
25935ea919 | ||
|
|
a8ef3d8656 | ||
|
|
6565df6e22 | ||
|
|
29dc4ad27d | ||
|
|
5ceaa05a92 | ||
|
|
164d4e5f7d | ||
|
|
0cf8500f7f | ||
|
|
ea9547993b | ||
|
|
569077d4d6 | ||
|
|
cacdec1b9c | ||
|
|
82f640ebc2 | ||
|
|
6dcd4ea9fb | ||
|
|
a9a3ea615f | ||
|
|
6313775835 | ||
|
|
da4912c332 | ||
|
|
36777af9e0 | ||
|
|
f9823427eb | ||
|
|
7fa76dcfec | ||
|
|
ffe8056c56 | ||
|
|
7b68a8190e | ||
|
|
9899bb5bef | ||
|
|
d1a4ef79ad | ||
|
|
a410206586 | ||
|
|
87b389965c | ||
|
|
487d976143 | ||
|
|
73cdc44ee3 | ||
|
|
9d0c056be4 | ||
|
|
81acc00826 | ||
|
|
94ff3feeee | ||
|
|
6067cee7fa | ||
|
|
8bbce21e90 | ||
|
|
e7e0babfe6 | ||
|
|
7ea5a250fb | ||
|
|
19cec877f7 | ||
|
|
3afa16bc19 | ||
|
|
92f4ec38a5 | ||
|
|
476e5f73c1 | ||
|
|
f30f5bd933 | ||
|
|
7295717d1d | ||
|
|
f5cc1e2daf | ||
|
|
31638be931 | ||
|
|
787b465cf0 | ||
|
|
8474223c94 | ||
|
|
a7db881a8b | ||
|
|
dda9ed859c | ||
|
|
bb942f0b29 | ||
|
|
21536be6cc | ||
|
|
91eebab42f | ||
|
|
d22a51d11e | ||
|
|
cc33eb194d | ||
|
|
d229db78be | ||
|
|
6a7d62f318 | ||
|
|
3703308721 | ||
|
|
b5c119361b | ||
|
|
d756f29d61 | ||
|
|
b8aa8301fc | ||
|
|
3646a28b11 | ||
|
|
74d178603e | ||
|
|
eaa8de7cdb | ||
|
|
27452ac50e | ||
|
|
7d12fcd019 | ||
|
|
54d02b59ad | ||
|
|
4e0291da3c | ||
|
|
66c750fe1f | ||
|
|
316917bffc | ||
|
|
9a0fa1f97d | ||
|
|
edd170072c | ||
|
|
9a4920b88f | ||
|
|
8a2a71db83 | ||
|
|
8f2a695c7e | ||
|
|
4d350ff2ca | ||
|
|
73830147df | ||
|
|
9728ba5c8a | ||
|
|
a250a49231 | ||
|
|
f696bf6ad8 | ||
|
|
01065b945b | ||
|
|
37b592312a | ||
|
|
89d645f834 | ||
|
|
67c9a0797c | ||
|
|
101c20d554 | ||
|
|
94f171bf97 | ||
|
|
31dd5b6281 | ||
|
|
f81f04c12c | ||
|
|
39d4044805 | ||
|
|
3877d3b5bc | ||
|
|
b3000445d8 | ||
|
|
39cd08a993 | ||
|
|
41f8d6eecb | ||
|
|
722c71a8cf | ||
|
|
1904bfd1e9 | ||
|
|
848bb8e625 | ||
|
|
864714b947 | ||
|
|
dbb6642ba2 | ||
|
|
7f30725c85 | ||
|
|
40dd4a59a2 | ||
|
|
1c45dfd0e9 | ||
|
|
54d68b7174 | ||
|
|
597acb605c | ||
|
|
3139a47403 | ||
|
|
6577ef5ffc | ||
|
|
68a1337089 | ||
|
|
2dff8d830d | ||
|
|
7188bfcf6e | ||
|
|
abb5e0c057 | ||
|
|
266f6c261f | ||
|
|
bbeed8c707 | ||
|
|
428f582c20 | ||
|
|
053ad70036 | ||
|
|
f9b5150a08 | ||
|
|
24754f6ac2 | ||
|
|
ee5bb015fe | ||
|
|
45680bc875 | ||
|
|
4c751ba476 | ||
|
|
5150fda961 | ||
|
|
16d8c174e7 | ||
|
|
7a063aed7c | ||
|
|
724b684729 | ||
|
|
d0a52e0bbd | ||
|
|
43e3c488db | ||
|
|
a8657df481 | ||
|
|
43c558d6c6 | ||
|
|
3b1dca0421 | ||
|
|
3658812d91 | ||
|
|
970f410fba | ||
|
|
441284d297 | ||
|
|
50ef70097b | ||
|
|
b30ba481be | ||
|
|
b60473e401 | ||
|
|
d6f6f90a65 | ||
|
|
bf37745c30 | ||
|
|
6b44ceb65f | ||
|
|
8527a3f264 | ||
|
|
809527ae06 | ||
|
|
595f4bc27a | ||
|
|
8a2d60784d | ||
|
|
387cdaf2f4 | ||
|
|
fc478ddb79 | ||
|
|
5ab57de77d | ||
|
|
b328857cfb | ||
|
|
b56958a1b8 | ||
|
|
3ca1eceb08 | ||
|
|
bcfc655bca | ||
|
|
3a46d09870 | ||
|
|
233da17eb2 | ||
|
|
bc23effaaa | ||
|
|
de69e5b8fb | ||
|
|
fdbd6b7d7c | ||
|
|
6989e08f3a | ||
|
|
48ed8556ac | ||
|
|
ad7e243fbd | ||
|
|
ad5730d735 | ||
|
|
849963ea9e | ||
|
|
049bf7d36f | ||
|
|
ab64366836 | ||
|
|
12c1498d81 | ||
|
|
659755d7c2 | ||
|
|
0166fed863 | ||
|
|
caf45e24c0 | ||
|
|
8fac236758 | ||
|
|
c6f724133d | ||
|
|
a056ae5da9 | ||
|
|
9f6905e5e9 | ||
|
|
ae65b148b8 | ||
|
|
ec48224709 | ||
|
|
857a175053 | ||
|
|
afc91dbf75 | ||
|
|
ff9282a83f | ||
|
|
7dc5c3c803 | ||
|
|
7f4bca30df | ||
|
|
dc25e1d304 | ||
|
|
356cbde599 | ||
|
|
39d496f99f | ||
|
|
8fb34454e4 | ||
|
|
2e377124b4 | ||
|
|
eb118c55fd | ||
|
|
5f5083ca69 | ||
|
|
93f4eec3c9 | ||
|
|
62a2a686a5 | ||
|
|
846b6d921a | ||
|
|
d15a450d54 | ||
|
|
9be2e3416d | ||
|
|
f7b5f357d4 | ||
|
|
6ed30bba72 | ||
|
|
9c1df6be77 | ||
|
|
8dcaa21a6d | ||
|
|
4fc4819958 | ||
|
|
5983e80bae | ||
|
|
5795cc366f | ||
|
|
fe2ebc8542 | ||
|
|
8b0cbaa206 | ||
|
|
d68bc1ffa6 | ||
|
|
f6eb66c345 | ||
|
|
988ba3ce13 | ||
|
|
fb5e087649 | ||
|
|
ad269e4c7c | ||
|
|
c26fc0be88 | ||
|
|
9a0466f130 | ||
|
|
dcb8d5e619 | ||
|
|
f7bdc70eca | ||
|
|
dc3d889d0b | ||
|
|
b18cfdd9bd | ||
|
|
f8f3e76318 | ||
|
|
f47cd02d71 | ||
|
|
05edc41991 | ||
|
|
6aa929e784 | ||
|
|
8916026b7e | ||
|
|
0a0352f2f8 | ||
|
|
26993c4f64 | ||
|
|
062a3faae7 | ||
|
|
09fb214e01 | ||
|
|
34cb2199dc | ||
|
|
cca602accb | ||
|
|
dae167759c | ||
|
|
8c5907cea3 | ||
|
|
c2c436609d | ||
|
|
dbf75be725 | ||
|
|
ceded8b925 | ||
|
|
281b0186b8 | ||
|
|
1f3c610d03 | ||
|
|
a20b6d3ab3 | ||
|
|
7ff26ec2ae | ||
|
|
bae411099c | ||
|
|
bd3277fec0 | ||
|
|
15909a16b3 | ||
|
|
3d6f72618e | ||
|
|
9c6751aa46 | ||
|
|
7fee680be8 | ||
|
|
8e792b5432 | ||
|
|
3720ab6a98 | ||
|
|
2633045c32 | ||
|
|
c837a756e8 | ||
|
|
a5ea1d7cc8 | ||
|
|
08c921042e | ||
|
|
e9f88d0414 | ||
|
|
af7451accc | ||
|
|
f7aa71fa81 | ||
|
|
444cb676b2 | ||
|
|
6e58645e86 | ||
|
|
d06b34a73e | ||
|
|
aaef15bf82 | ||
|
|
3711412e38 | ||
|
|
ede8795ff0 | ||
|
|
e8741ccae8 | ||
|
|
feea7c52e9 | ||
|
|
3b415ba4cd | ||
|
|
b59c98ddb8 | ||
|
|
999e841c9e | ||
|
|
7a85f3f97c | ||
|
|
6040c9de74 | ||
|
|
468e327aac | ||
|
|
eb4efbdc86 | ||
|
|
08abd69b58 | ||
|
|
c56371028f | ||
|
|
99ad02720b | ||
|
|
1bd59dddc3 | ||
|
|
fac2666314 | ||
|
|
7c1122c4eb | ||
|
|
2b33b72819 | ||
|
|
90cfeaab3f | ||
|
|
2d027cfa88 | ||
|
|
d50af7148c | ||
|
|
2c68bdb64e | ||
|
|
541418efad | ||
|
|
741f371c68 | ||
|
|
6787e41e49 | ||
|
|
528e0faf1c | ||
|
|
ee284519e4 | ||
|
|
bd53731ec3 | ||
|
|
4107335720 | ||
|
|
de9d9ed211 | ||
|
|
89e6035748 | ||
|
|
2e8a1588f8 | ||
|
|
c092213d52 | ||
|
|
1f0500b3ee | ||
|
|
8759d4d519 | ||
|
|
aa9fb2be6d | ||
|
|
6a6d5b4731 | ||
|
|
a7987cc1a2 | ||
|
|
b2b3552407 | ||
|
|
fb04b3438d | ||
|
|
b2cf617cb8 | ||
|
|
a37a5a73c5 | ||
|
|
3bfbab1e83 | ||
|
|
5d9fe0892b | ||
|
|
7d9fd00474 | ||
|
|
e5b502f3a6 | ||
|
|
bc1dcfc1aa | ||
|
|
f4bfe7e0c1 | ||
|
|
a18db02249 | ||
|
|
2d8a5cb1da | ||
|
|
7ef53f2dc5 | ||
|
|
5a074a3c22 | ||
|
|
780ee02d16 | ||
|
|
1c85008fcf | ||
|
|
a78e08d6cb | ||
|
|
27f37ae504 | ||
|
|
f6a3517155 | ||
|
|
ec974d2300 | ||
|
|
2750885629 | ||
|
|
6158481fe5 | ||
|
|
9c824f2977 | ||
|
|
595b5c4eb6 | ||
|
|
e2f1cfb2cc | ||
|
|
6fb8177afd | ||
|
|
d3f5d09d47 | ||
|
|
c3cea74805 | ||
|
|
cc534ff767 | ||
|
|
5c9eff3055 | ||
|
|
032d558182 | ||
|
|
80629c8bf6 | ||
|
|
609c60af5e | ||
|
|
8185521695 | ||
|
|
69d042c37d | ||
|
|
039bec17f4 | ||
|
|
3f755e2d96 | ||
|
|
df991b9dfb | ||
|
|
fdc0367851 | ||
|
|
4a8fc2c8b3 | ||
|
|
8128349e81 | ||
|
|
ab0f03868e | ||
|
|
4e0dcbb14a | ||
|
|
0d910be798 | ||
|
|
23d38b36f8 | ||
|
|
ccdb23df47 | ||
|
|
9239628cfc | ||
|
|
8e3aec856b | ||
|
|
13588544c5 | ||
|
|
aac67d4c3d | ||
|
|
29c25a8e01 | ||
|
|
0ca580f6fb | ||
|
|
967a572877 | ||
|
|
27df579a6f | ||
|
|
117082d17b | ||
|
|
89fc5e5d66 | ||
|
|
9fc3cba7fa | ||
|
|
8a9c22462a | ||
|
|
9eb662e94c | ||
|
|
7e42f2f863 | ||
|
|
c0dbf1fb90 | ||
|
|
8138a3b0c6 | ||
|
|
a99b3d76f2 | ||
|
|
d834f22c8e | ||
|
|
8dfea369ea | ||
|
|
669f7a111f | ||
|
|
2d8e9af9c9 | ||
|
|
8e907a13ea | ||
|
|
76990f630b | ||
|
|
e893cd66dc | ||
|
|
39fc1a6a05 | ||
|
|
5f3629babd | ||
|
|
7b28543293 | ||
|
|
f4d5e0098a | ||
|
|
52fbdb5892 | ||
|
|
53adbc34a2 | ||
|
|
896e4cbf4d | ||
|
|
2288191b9c | ||
|
|
032da43172 | ||
|
|
3cfd2b707d | ||
|
|
de8e98f133 | ||
|
|
bbd41262ca | ||
|
|
9f303149a0 | ||
|
|
ed2eb9afcb | ||
|
|
bac6b9676c | ||
|
|
f6f13cd4a8 | ||
|
|
627a3091c8 | ||
|
|
fa482912e4 | ||
|
|
8cb9f0d0f8 | ||
|
|
07a9af327e | ||
|
|
11e2dfd37d | ||
|
|
c4f02b1fd8 | ||
|
|
6718d773ad | ||
|
|
b2f757f9b7 | ||
|
|
14057bf4dc | ||
|
|
f30dcba95d | ||
|
|
8fef0a6eae | ||
|
|
13f5935c36 | ||
|
|
68662769ff | ||
|
|
5301d93336 | ||
|
|
e72007907a | ||
|
|
eeb75ae603 | ||
|
|
30b641919c | ||
|
|
9ce2171eed | ||
|
|
9ba09ba5e6 | ||
|
|
b4bee866f3 | ||
|
|
8461a0598c | ||
|
|
aaa2f29761 | ||
|
|
624d1a4f31 | ||
|
|
110b5d83a6 | ||
|
|
0f8df1b95c | ||
|
|
e9b663934d | ||
|
|
5d525ad911 | ||
|
|
e32ddbaae5 | ||
|
|
4e6bceff3b | ||
|
|
8e97b17bbd | ||
|
|
a1a4396142 | ||
|
|
8ba3dcde1e | ||
|
|
f6c881b448 | ||
|
|
73fd4a6046 | ||
|
|
dafec3de59 | ||
|
|
367e57ec9b | ||
|
|
a8a0b892df | ||
|
|
ee453a161f | ||
|
|
0902e71a16 | ||
|
|
9f15eeb32a | ||
|
|
0f3168aa5b | ||
|
|
997e13fca4 | ||
|
|
c0bcc48068 | ||
|
|
bc7e88ae03 | ||
|
|
da051b23fe | ||
|
|
09707570eb | ||
|
|
8c014dbafe | ||
|
|
1c282a3a62 | ||
|
|
70988afbb1 | ||
|
|
5ff8699684 | ||
|
|
ac6482e0eb | ||
|
|
711df835d3 | ||
|
|
672186efa8 | ||
|
|
8b8bff20d0 | ||
|
|
43b5058d59 | ||
|
|
e828e4f7f1 | ||
|
|
d29e95a922 | ||
|
|
afc68427d8 | ||
|
|
8df85a6123 | ||
|
|
399b60a0ad | ||
|
|
add95ac378 | ||
|
|
58b3bdc933 | ||
|
|
c6e7d14fa9 | ||
|
|
2035e10e83 | ||
|
|
5f170f33fd | ||
|
|
c9ce2da080 | ||
|
|
d5ab387d2a | ||
|
|
236a9de39a | ||
|
|
dfd2e67583 | ||
|
|
8290d43d0d | ||
|
|
6fc0f38fe0 | ||
|
|
12646a5ae2 | ||
|
|
e59890c3e8 | ||
|
|
f83e3685a5 | ||
|
|
6098c7f953 | ||
|
|
67003d1af8 | ||
|
|
a06066343d | ||
|
|
6e395e9c60 | ||
|
|
7e8583bdef | ||
|
|
856bc99a57 | ||
|
|
6e7b6cc6f7 | ||
|
|
760e231bf0 | ||
|
|
d6d26e0414 | ||
|
|
0d3a69ec70 | ||
|
|
2eca425d4b | ||
|
|
8f19c916dc | ||
|
|
10d432b1b4 | ||
|
|
36ba4665ff | ||
|
|
79f585d903 | ||
|
|
cbc66a2704 | ||
|
|
5028104652 | ||
|
|
e81910e077 | ||
|
|
f5ba273ecd | ||
|
|
86f6187197 | ||
|
|
0b7e6e7da2 | ||
|
|
c78b3acd0c | ||
|
|
451868847b | ||
|
|
aa5e1f75d9 | ||
|
|
4a64bee465 | ||
|
|
f3d05fe417 | ||
|
|
f3979fcc3b | ||
|
|
5d9dba5b1a | ||
|
|
71155438f0 | ||
|
|
04a4a2afd5 | ||
|
|
de52822400 | ||
|
|
ba9f095e75 | ||
|
|
77611ad4da | ||
|
|
7ece89c6b1 | ||
|
|
c5a7371313 | ||
|
|
954de0f158 | ||
|
|
7ff49f0c73 | ||
|
|
4c9993c3c7 | ||
|
|
8775b35700 | ||
|
|
b7e1921351 | ||
|
|
378d2bd3a8 | ||
|
|
7c8aaed1c7 | ||
|
|
b41cdbf4d3 | ||
|
|
9a0c6b1ed2 | ||
|
|
7bed7a507c | ||
|
|
0b7e77395d | ||
|
|
4a277ceb2b | ||
|
|
b420fb6a37 | ||
|
|
5adbbc2995 | ||
|
|
27d0ab2482 | ||
|
|
186baeb237 | ||
|
|
a5a55c458f | ||
|
|
66f55ec64c | ||
|
|
723d1b1da1 | ||
|
|
32e768ae94 | ||
|
|
3d407edab0 | ||
|
|
e32352cf66 | ||
|
|
2c4ad28347 | ||
|
|
3f8e5072f7 | ||
|
|
0a5835068c | ||
|
|
9bdc99bec2 | ||
|
|
af7b970e76 | ||
|
|
d853016702 | ||
|
|
02d15cad11 | ||
|
|
ee80814753 | ||
|
|
bffc1eaaf5 | ||
|
|
cdc59bb69e | ||
|
|
ecc888a08f | ||
|
|
f41986da2d | ||
|
|
dee1b66f85 | ||
|
|
d7da975624 | ||
|
|
3adb47a937 | ||
|
|
557e701169 | ||
|
|
5da69e38e6 | ||
|
|
98beeb8ba9 | ||
|
|
75acb5321e | ||
|
|
052e089dce | ||
|
|
413098d06c | ||
|
|
1d4ad4df1d | ||
|
|
4de601b128 | ||
|
|
7e415a0f66 | ||
|
|
3bedfb1d17 | ||
|
|
426d574504 | ||
|
|
60b8078990 | ||
|
|
9add53a470 | ||
|
|
b0a0942105 | ||
|
|
3283290881 | ||
|
|
7b28757f5e | ||
|
|
b4414c1f37 | ||
|
|
304e5625e5 | ||
|
|
9ce192d417 | ||
|
|
7b22b912fd | ||
|
|
fe98790977 | ||
|
|
50a5c3f33e | ||
|
|
c17e495529 | ||
|
|
7e12d1bf7f | ||
|
|
b4da05a638 | ||
|
|
8862e11b01 | ||
|
|
b97f6d757b | ||
|
|
bd9724b905 | ||
|
|
6cbe6d0821 | ||
|
|
0e8c82331d | ||
|
|
771779ed91 | ||
|
|
793867a736 | ||
|
|
c5d3832cfe | ||
|
|
0e93516996 | ||
|
|
6b10575493 | ||
|
|
f0d5fc50ef | ||
|
|
ca4f2b729c | ||
|
|
4bd87101b3 | ||
|
|
30bb7c133e | ||
|
|
d95b0c2ba0 | ||
|
|
b6fa52db66 | ||
|
|
6da3a3ef1f | ||
|
|
c77ae1d950 | ||
|
|
39d03faf4e | ||
|
|
5bcea60e1b | ||
|
|
ecb017924c | ||
|
|
a00d62c913 | ||
|
|
87e1d2a51b | ||
|
|
8fdffc7e9b | ||
|
|
58ca01aeae | ||
|
|
4dcfef961d | ||
|
|
7c4a59a881 | ||
|
|
07fce3c2f9 | ||
|
|
5fa399c9e2 | ||
|
|
90da75e673 | ||
|
|
061379e2ac | ||
|
|
6bf783984a | ||
|
|
f187448d85 | ||
|
|
62ea79f381 | ||
|
|
6ad7611a5c | ||
|
|
96becbd8fa | ||
|
|
70a5b429e7 | ||
|
|
f23208cacc | ||
|
|
49af73a59b | ||
|
|
3e282d337f | ||
|
|
fbf5995c02 | ||
|
|
635b44a118 | ||
|
|
71622a7ac0 | ||
|
|
3965571c7c | ||
|
|
ea8849aaf6 | ||
|
|
cf58a48f62 | ||
|
|
9898fcda80 | ||
|
|
3c002e048d | ||
|
|
f077f5c39f | ||
|
|
efa7ad84f6 | ||
|
|
78d5068a96 | ||
|
|
cb9fb5bb00 | ||
|
|
07e87221f6 | ||
|
|
1b6dea5de1 | ||
|
|
d76bb2182d | ||
|
|
d6c85bee75 | ||
|
|
3fa056ab78 | ||
|
|
19701d22df | ||
|
|
2a7750d939 | ||
|
|
3f04dfd331 | ||
|
|
ed8297b98d | ||
|
|
e8773bdf80 | ||
|
|
45ef0076bf | ||
|
|
a24cc774ec | ||
|
|
0dcf989311 | ||
|
|
59917a749b | ||
|
|
425652451b | ||
|
|
65dc92ca0f | ||
|
|
a6e2b3a831 | ||
|
|
6b4a39fb51 | ||
|
|
5cb9148949 | ||
|
|
03bbd98b9c | ||
|
|
b4e87ec32c | ||
|
|
1ea670896b | ||
|
|
d2249417f8 | ||
|
|
70d213e08b | ||
|
|
89e6463c1a | ||
|
|
67c0489076 | ||
|
|
260460ae06 | ||
|
|
f547e9bb27 | ||
|
|
a059bcd21c | ||
|
|
b3ddc4c2ec | ||
|
|
ee8dbe6308 | ||
|
|
b3ef4fb50c | ||
|
|
40903af771 | ||
|
|
05a1104392 | ||
|
|
5dffa63b2f | ||
|
|
e8482f24cf | ||
|
|
f5b9cde232 | ||
|
|
c661ecca60 | ||
|
|
0649ebbdb7 | ||
|
|
84899251f1 | ||
|
|
4d44947336 | ||
|
|
4767810533 | ||
|
|
87798c0030 | ||
|
|
d31b7b682c | ||
|
|
f7bd3a7d8f | ||
|
|
5e1febface | ||
|
|
41fd4136fc | ||
|
|
0912bee1aa | ||
|
|
581e8516ea | ||
|
|
0dd8a49d4d | ||
|
|
983a384436 | ||
|
|
5c8fc7c1de | ||
|
|
1f80a703f2 | ||
|
|
777fd647dc | ||
|
|
39a16cb41d | ||
|
|
11eaa98105 | ||
|
|
c07c37d70a | ||
|
|
043d16b225 | ||
|
|
a56fcaaf46 | ||
|
|
f1567cddea | ||
|
|
e1208c3103 | ||
|
|
a85139a1b7 | ||
|
|
d90d994c74 | ||
|
|
b14159f7d8 | ||
|
|
993f97eed6 | ||
|
|
36bec0acf0 | ||
|
|
bd4d918f36 | ||
|
|
2b396caaa2 | ||
|
|
261b9a3df1 | ||
|
|
5824f314a3 | ||
|
|
77a36397c0 | ||
|
|
3072610753 | ||
|
|
5d25c05039 | ||
|
|
9764dcbca3 | ||
|
|
9181a38382 | ||
|
|
d7bd7ca5bf | ||
|
|
e51b013093 | ||
|
|
70dc22dcc9 | ||
|
|
20590f751f | ||
|
|
a6a1ef9e7b | ||
|
|
75f245410a | ||
|
|
29b07a3821 | ||
|
|
5f9fd7ea86 | ||
|
|
2a47e1401b | ||
|
|
b58088819b | ||
|
|
d2e4966591 | ||
|
|
b531e140f1 | ||
|
|
b0230a69bc | ||
|
|
91ff98b7b5 | ||
|
|
1fc25a89ac | ||
|
|
b14391d1c8 | ||
|
|
422107f900 | ||
|
|
2c8e47380e | ||
|
|
914589c26c | ||
|
|
294f6bcbdb | ||
|
|
bc3cedfa48 | ||
|
|
cd6ce4a90c | ||
|
|
21e5527b59 | ||
|
|
d8e41d423d | ||
|
|
42d14d4e8f | ||
|
|
61a021a822 | ||
|
|
bc2e39e366 | ||
|
|
1cab5b8d99 | ||
|
|
0824a13502 | ||
|
|
9121bed249 | ||
|
|
a95e38c034 | ||
|
|
bc9027cc74 | ||
|
|
6d072a854f | ||
|
|
bdad4e7e02 | ||
|
|
69e9bc09b8 | ||
|
|
3ca6942f6a | ||
|
|
335258dcdd | ||
|
|
77c4358743 | ||
|
|
d81a8f2ece | ||
|
|
25d0821b7f | ||
|
|
c4608a8af3 | ||
|
|
66eca538a0 | ||
|
|
831243b127 | ||
|
|
c733b2224f | ||
|
|
641f5461b2 | ||
|
|
16162a64d6 | ||
|
|
afff720b28 | ||
|
|
47e92c4137 | ||
|
|
68be9f090f | ||
|
|
c443296124 | ||
|
|
1c2d49808c | ||
|
|
294d195c3c | ||
|
|
4c4a393f3e | ||
|
|
2b0b4c55aa | ||
|
|
22e90769f8 | ||
|
|
e02567553f | ||
|
|
19da72379f | ||
|
|
fc4b32c270 | ||
|
|
6f505cae82 | ||
|
|
24d24189f5 | ||
|
|
0141d2c9bd | ||
|
|
658c54003b | ||
|
|
e72b421324 | ||
|
|
0b190b0f6a | ||
|
|
39bcce60fe | ||
|
|
af547d51b7 | ||
|
|
c2bb85e9e3 | ||
|
|
d3cc7c6521 | ||
|
|
589c9fff04 | ||
|
|
c5145d4177 | ||
|
|
7beec8135e | ||
|
|
dd54fca3f3 | ||
|
|
bebb64f0e2 | ||
|
|
ad115b2d65 | ||
|
|
cfdd3a98d8 | ||
|
|
7f82eb0018 | ||
|
|
477350ceb4 | ||
|
|
3f7bc32b53 | ||
|
|
ebd773c6f8 | ||
|
|
cab472ecf9 | ||
|
|
29a99be398 | ||
|
|
a68c1246db | ||
|
|
3f5513f5bb | ||
|
|
cc023d9fd9 | ||
|
|
611cb66656 | ||
|
|
0990cd942e | ||
|
|
266e83674a | ||
|
|
bb338b31a7 | ||
|
|
94799627ee | ||
|
|
dc6eda546b | ||
|
|
babc97583e | ||
|
|
43b2cccb4b | ||
|
|
f9566e1007 | ||
|
|
2d08140fdb | ||
|
|
8b089c5e8c | ||
|
|
61243a510f | ||
|
|
dcd386834a | ||
|
|
984ef9dce7 | ||
|
|
b25753b802 | ||
|
|
dbddf57391 | ||
|
|
cadd476dab | ||
|
|
9704b2509a | ||
|
|
26de8b7d32 | ||
|
|
24528b0c14 | ||
|
|
93d3817568 | ||
|
|
8eb9501e82 | ||
|
|
c826213d96 | ||
|
|
272c44532a | ||
|
|
b480710b16 | ||
|
|
8b33ae2d5a | ||
|
|
bdeca1d18c | ||
|
|
7cd315c655 | ||
|
|
5ab1fa8e64 | ||
|
|
446fba815b | ||
|
|
57c086ef99 | ||
|
|
d5a5af9d39 | ||
|
|
72041ceca2 | ||
|
|
98440bc354 | ||
|
|
8355a72fa5 | ||
|
|
9dff41820a | ||
|
|
7b0b2dcc0c | ||
|
|
c12a24e223 | ||
|
|
0efe4a9855 | ||
|
|
d147774515 | ||
|
|
bfbd6dc192 | ||
|
|
171774fcf3 | ||
|
|
0b8410f3ca | ||
|
|
52a17fe534 | ||
|
|
bcaa23de09 | ||
|
|
794bcc2dea | ||
|
|
a9c3ed030e | ||
|
|
13d12797d2 | ||
|
|
52a07708c4 | ||
|
|
2f4ef631af | ||
|
|
e006f096ad | ||
|
|
ec06b234d2 | ||
|
|
7c5c05ae65 | ||
|
|
ed23853bc0 | ||
|
|
cff5ce9e7a | ||
|
|
47677e9bf2 | ||
|
|
2018e574e7 | ||
|
|
079bb992e1 | ||
|
|
3c79cf49ec | ||
|
|
6dc3e5dc9c | ||
|
|
542875a8c4 | ||
|
|
b2a81bd914 | ||
|
|
c239a4bb76 | ||
|
|
abceee76ea | ||
|
|
488fe1feb6 | ||
|
|
030d06e13f | ||
|
|
c41ea66a5d | ||
|
|
225fe9d6ef | ||
|
|
18d2e17080 | ||
|
|
802e2f34c1 | ||
|
|
775c1df40f | ||
|
|
b0e282b34d | ||
|
|
a368a8c4a8 | ||
|
|
f42c2a7a62 | ||
|
|
dc1efb1d9f | ||
|
|
07eb77a690 | ||
|
|
b0c8fc357c | ||
|
|
5c0e67b250 | ||
|
|
e16143f6c7 | ||
|
|
ea5d599df3 | ||
|
|
66b3609e6a | ||
|
|
ab70fb1de1 | ||
|
|
857eb08152 | ||
|
|
a7ef993c98 | ||
|
|
122603f10f | ||
|
|
b94ae1ea10 | ||
|
|
2f74ed2859 | ||
|
|
6be0044cf2 | ||
|
|
a5777624e2 | ||
|
|
fc3398f8e0 | ||
|
|
b8b9762a1b | ||
|
|
829f05419d | ||
|
|
54a8f42b9d | ||
|
|
0131687bb5 | ||
|
|
cb105ad434 | ||
|
|
69d8f6124d | ||
|
|
809934d22a | ||
|
|
c52a6847be | ||
|
|
e06b95691f | ||
|
|
9c4ba61452 | ||
|
|
3324d5f50f | ||
|
|
8def743e8f | ||
|
|
d2d93fdde4 | ||
|
|
d1f82b073f | ||
|
|
fe482327a5 | ||
|
|
a40860394c | ||
|
|
7c8a8ad57e | ||
|
|
4cfa5de640 | ||
|
|
28a77bc43b | ||
|
|
7cc8c9884d | ||
|
|
c86c44a080 | ||
|
|
491e9f50b3 | ||
|
|
8e217128a0 | ||
|
|
956ddeca4a | ||
|
|
8e3f126189 | ||
|
|
e5aff4c568 | ||
|
|
ea179c7b4a | ||
|
|
ebaad2ccc7 | ||
|
|
85bc0351f7 | ||
|
|
c91f7c7e9f | ||
|
|
f938057092 | ||
|
|
2912e35f17 | ||
|
|
4ee5fc9c92 | ||
|
|
65e4e78efb | ||
|
|
33d0e17c11 | ||
|
|
efbb7287e6 | ||
|
|
816be743e8 | ||
|
|
66d6c315a3 | ||
|
|
99306db210 | ||
|
|
89fcf04c8c | ||
|
|
270e8b6a37 | ||
|
|
e5131165b0 | ||
|
|
2ed3265e18 | ||
|
|
6daa30a07e | ||
|
|
52130557bf | ||
|
|
86ad564eb1 | ||
|
|
05fc6c0a67 | ||
|
|
dd16fdaeaa | ||
|
|
6e8524b11b | ||
|
|
40c7018756 | ||
|
|
0ba143c9a0 | ||
|
|
f2d7623799 | ||
|
|
e0a4aa8a21 | ||
|
|
9b0326f79a | ||
|
|
9742d3cc18 | ||
|
|
7299b1b267 | ||
|
|
879345103c | ||
|
|
6f82295e5c | ||
|
|
05cdfc6fad | ||
|
|
35f97e951c | ||
|
|
5d097345ba | ||
|
|
dfc6cd933d | ||
|
|
439479796a | ||
|
|
0e09f76e6d | ||
|
|
1618dca721 | ||
|
|
6d55126d0b | ||
|
|
b0486e0dc3 | ||
|
|
b32719cc03 | ||
|
|
7c1cb26122 | ||
|
|
943d28e424 | ||
|
|
8dd4f53663 | ||
|
|
d16c04bb0a | ||
|
|
b3a7510d21 | ||
|
|
2cd31b57b2 | ||
|
|
3d2d8da1d8 | ||
|
|
78066fbfd4 | ||
|
|
5456b91616 | ||
|
|
d6a55c4bc2 | ||
|
|
ea968ccd07 | ||
|
|
0068587be2 | ||
|
|
ad288a8990 | ||
|
|
3d1b41968f | ||
|
|
6a088435b3 | ||
|
|
5f8525bf22 | ||
|
|
ed323aeaa8 | ||
|
|
3fa0976a57 | ||
|
|
a885d89ae9 | ||
|
|
f250631042 | ||
|
|
00cf120892 | ||
|
|
5aeda15836 | ||
|
|
4069116a15 | ||
|
|
2f17584941 | ||
|
|
967a322fe9 | ||
|
|
52e52bea12 | ||
|
|
5fb2f4ba7e | ||
|
|
6d5ca46c65 | ||
|
|
176fe5af12 | ||
|
|
c83b076636 | ||
|
|
69a492c9b2 | ||
|
|
0fe536e3f6 | ||
|
|
3dbeaa523d | ||
|
|
c4c829aeab | ||
|
|
352f281a24 | ||
|
|
ee6694a711 | ||
|
|
619fda4f5a | ||
|
|
266839eee9 | ||
|
|
6cedba093a | ||
|
|
7d533797a0 | ||
|
|
db2e2242ef | ||
|
|
e1c324c375 | ||
|
|
86fe74c5cd | ||
|
|
aadaf84128 | ||
|
|
28026dc671 | ||
|
|
ffae916f44 | ||
|
|
49676b852c | ||
|
|
8141573c1e | ||
|
|
80d83cbcc2 | ||
|
|
c692969f82 | ||
|
|
dcb86da021 | ||
|
|
058939fc08 | ||
|
|
c916e13bc0 | ||
|
|
d6f0a4b367 | ||
|
|
e195a54c31 | ||
|
|
297da4bad9 | ||
|
|
189d0213da | ||
|
|
f538864d03 | ||
|
|
88d3a15cc6 | ||
|
|
fa40e7a175 | ||
|
|
b51b78a9c7 | ||
|
|
c1e5e88134 | ||
|
|
2cb20bea55 | ||
|
|
676b8fb6f1 | ||
|
|
410207c3b3 | ||
|
|
ee6e1b1d9c | ||
|
|
508011ce6c | ||
|
|
45816ddded | ||
|
|
19a9df0980 | ||
|
|
cd9da20028 | ||
|
|
6d516e09b3 | ||
|
|
b14c14ff36 | ||
|
|
b54ba67107 | ||
|
|
b7f1f77f82 | ||
|
|
81ef7f0818 | ||
|
|
99ab9f3bf9 | ||
|
|
5e9ff6adaa | ||
|
|
102f951d7f | ||
|
|
eb018fd7d0 | ||
|
|
c0fba4d1be | ||
|
|
178f951f78 | ||
|
|
ea51d98d65 | ||
|
|
d0b223a148 | ||
|
|
2aa59ef436 | ||
|
|
283b7808d8 | ||
|
|
fb0de762f3 | ||
|
|
e4c4c1c697 | ||
|
|
b7fff980e7 | ||
|
|
d73dd2b2fc | ||
|
|
3da93aae50 | ||
|
|
4ed0aceb92 | ||
|
|
e97320d40d | ||
|
|
4de422dcd5 | ||
|
|
d1c0b4f97e | ||
|
|
0e10e17b86 | ||
|
|
4e5b5abbfd | ||
|
|
9b4aede26d | ||
|
|
615a9936a4 | ||
|
|
4d60017aa5 | ||
|
|
c3cb82e122 | ||
|
|
1dabb13fb4 | ||
|
|
0158f58424 | ||
|
|
fd7cf53286 | ||
|
|
2fa7c206f6 | ||
|
|
9e5c7daa4a | ||
|
|
fbbba98df4 | ||
|
|
2fc9954937 | ||
|
|
94fbea122f | ||
|
|
319445fe63 | ||
|
|
0ad07724bf | ||
|
|
3832c9464b | ||
|
|
714d23b44b | ||
|
|
2e002aa906 | ||
|
|
5888ef1e7d | ||
|
|
5af3f0efd5 | ||
|
|
91fc2bdc33 | ||
|
|
ac8ae254b4 | ||
|
|
019a60d625 | ||
|
|
9c0f7642cc | ||
|
|
74f551959f | ||
|
|
165b6ee097 | ||
|
|
418d9d6275 | ||
|
|
ff835f5006 | ||
|
|
dd8d32232d | ||
|
|
be83e8f193 | ||
|
|
71b59b447f | ||
|
|
a784652571 | ||
|
|
5bee458a0f | ||
|
|
bce1406bff | ||
|
|
f87ac92e02 | ||
|
|
dfde8cd357 | ||
|
|
fb65642cd4 | ||
|
|
a20a10fe1d | ||
|
|
7741c4e1f5 | ||
|
|
afa6a1a1d9 | ||
|
|
a796957ae0 | ||
|
|
3d3428c4e6 | ||
|
|
df529b49a4 | ||
|
|
4b41f6bc00 | ||
|
|
c1d139da69 | ||
|
|
29ff35bc63 | ||
|
|
1171c29741 | ||
|
|
409c4ffddd | ||
|
|
cc977e5fde | ||
|
|
310df81bd8 | ||
|
|
ff2d113e01 | ||
|
|
7b21891e54 | ||
|
|
19141178ec | ||
|
|
a19762cf3d | ||
|
|
49878561f0 | ||
|
|
9b33fe0222 | ||
|
|
695237bccd | ||
|
|
7ead72f2ff | ||
|
|
9e91a33c46 | ||
|
|
6148d1e6e9 | ||
|
|
530a7383f2 | ||
|
|
cb60902e04 | ||
|
|
ddb22eb4b5 | ||
|
|
fb2957900c | ||
|
|
ea258ad348 | ||
|
|
f1d626b203 | ||
|
|
23f681ec48 | ||
|
|
0bddb3cc6f | ||
|
|
75ecbe4594 | ||
|
|
dce4122902 | ||
|
|
d24ebec28b | ||
|
|
c42404a58e | ||
|
|
55196c5464 | ||
|
|
a31c84f389 | ||
|
|
2133c25075 | ||
|
|
32de7d24a5 | ||
|
|
f1a31d8891 | ||
|
|
d1a643a467 | ||
|
|
2c9a89e002 | ||
|
|
897d36c241 | ||
|
|
b54f1155cb | ||
|
|
07296f0b12 | ||
|
|
0dfef5a812 | ||
|
|
70054dc94d | ||
|
|
ef57d8662f | ||
|
|
025562fee3 | ||
|
|
5330a86957 | ||
|
|
c9a586dbe4 | ||
|
|
a1c5f7a357 | ||
|
|
dcfe4c3d71 | ||
|
|
1265b12ac9 | ||
|
|
e60908ca90 | ||
|
|
0f820c97ca | ||
|
|
cacc9daee9 | ||
|
|
af3cc6adf9 | ||
|
|
26b9cf270e | ||
|
|
854862f58d | ||
|
|
f97c9b5bf2 | ||
|
|
2796cce3f1 | ||
|
|
164b735b71 | ||
|
|
2b4313be05 | ||
|
|
2daa0ce9a4 | ||
|
|
c92b0f9abd | ||
|
|
ef366f3523 | ||
|
|
9bb3479c68 | ||
|
|
b5c91ac6b3 | ||
|
|
7dd7a90614 | ||
|
|
f97445f4aa | ||
|
|
758cbedf84 | ||
|
|
0a97676587 | ||
|
|
a2e661f9ce | ||
|
|
ecf527c06b | ||
|
|
ab79958a7f | ||
|
|
2e9a678817 | ||
|
|
3ace2e6d5c | ||
|
|
a5a0dd06b6 | ||
|
|
b59102d53f | ||
|
|
33e3914780 | ||
|
|
7d56fb8fcd | ||
|
|
181bfffdc8 | ||
|
|
e2b42eebeb | ||
|
|
c3b177ae63 | ||
|
|
80a58c9968 | ||
|
|
37a1f3f69b | ||
|
|
6d004f675d | ||
|
|
4aff28fc9b | ||
|
|
1d81a219db | ||
|
|
279ababf7b | ||
|
|
bbc3f89a82 | ||
|
|
7b848b0db2 | ||
|
|
f75fc92e11 | ||
|
|
5ce70b006d | ||
|
|
e8c6aabeaa | ||
|
|
ad30de59f6 | ||
|
|
b217783903 | ||
|
|
cb5df486e8 | ||
|
|
d624fd67f8 | ||
|
|
8fcae2d6ed | ||
|
|
105521d118 | ||
|
|
047473c90a | ||
|
|
1edc9f4576 | ||
|
|
2433bb2ed1 | ||
|
|
bd3c6758b5 | ||
|
|
04e1eb03b0 | ||
|
|
c67b773e19 | ||
|
|
c0eba78b86 | ||
|
|
ea0dbf30b3 | ||
|
|
a9cf40974a | ||
|
|
4ac99f4bbe | ||
|
|
d14f4fec2d | ||
|
|
b99be8fb78 | ||
|
|
7989fb3707 | ||
|
|
633d67bb49 | ||
|
|
26dfedc4fc | ||
|
|
06b466c74f | ||
|
|
61b1a1af1b | ||
|
|
9711961cb9 | ||
|
|
c1b2e2b6a8 | ||
|
|
5e2e843f00 | ||
|
|
27fa32469f | ||
|
|
18f9565d19 | ||
|
|
7807d81c73 | ||
|
|
c3e4873f84 | ||
|
|
4634a5d6d7 | ||
|
|
b0d6ff2f7f | ||
|
|
c6a51dcd05 | ||
|
|
2e8cd9776a | ||
|
|
4370c5b2de | ||
|
|
b137db1402 | ||
|
|
c3a1c7d272 | ||
|
|
21d734041a | ||
|
|
e0a4029251 | ||
|
|
bf4d9b2b9b | ||
|
|
c86423f922 | ||
|
|
b487a08f91 | ||
|
|
9f334beabb | ||
|
|
3e0b743f1d | ||
|
|
a2327a9f80 | ||
|
|
72174350ae | ||
|
|
c0043a5066 | ||
|
|
cd6d6d5b9f | ||
|
|
51a9fabaad | ||
|
|
92da8bde1b | ||
|
|
ad2522ad3f | ||
|
|
9453a61bd8 | ||
|
|
b93a2fe65a | ||
|
|
fa1993cce5 | ||
|
|
91b4c08d6f | ||
|
|
11f26ea0e2 | ||
|
|
2edc119be3 | ||
|
|
bd1b0b3ed1 | ||
|
|
ec90f5e53a | ||
|
|
b089607b63 | ||
|
|
a2a0d40dac | ||
|
|
6932a32c2b | ||
|
|
f5ac656c5a | ||
|
|
963863adad | ||
|
|
b81d8cfc81 | ||
|
|
be46e4a680 | ||
|
|
d17f05afeb | ||
|
|
96820af7cb | ||
|
|
57c1c6cb9b | ||
|
|
790cc4177a | ||
|
|
9496deb586 | ||
|
|
69d16e3ef8 | ||
|
|
95bf655c50 | ||
|
|
227c63bac9 | ||
|
|
cb309039b6 | ||
|
|
457e6c54a2 | ||
|
|
46132182f0 | ||
|
|
6f434e5041 | ||
|
|
7a632f1056 | ||
|
|
12c1b46a2f | ||
|
|
9b1801c19c | ||
|
|
2a23d36334 | ||
|
|
790ad94f70 | ||
|
|
0bd62129f6 | ||
|
|
70c7a608b4 | ||
|
|
81278df2b1 | ||
|
|
3ccf6cd7ea | ||
|
|
412e4edfb1 | ||
|
|
cc56206fcd | ||
|
|
66e3334451 | ||
|
|
af07f1749c | ||
|
|
96d9e4df78 | ||
|
|
608eeb0f24 | ||
|
|
796df70a76 | ||
|
|
8febdd3905 | ||
|
|
658fb8e6c5 | ||
|
|
d331afb7c8 | ||
|
|
8a9a9d58d9 | ||
|
|
7a5214a863 | ||
|
|
b922ef5a1b | ||
|
|
473d087e56 | ||
|
|
2531c7e393 | ||
|
|
ed79198695 | ||
|
|
85401ffe5c | ||
|
|
f603012fbb | ||
|
|
8fb66724c6 | ||
|
|
238c4e1798 | ||
|
|
6f837e5cc0 | ||
|
|
b63f97ea94 | ||
|
|
2286341c8d | ||
|
|
14e40b5aac | ||
|
|
7c968cee84 | ||
|
|
a42b93aaad | ||
|
|
d2fdd8d2af | ||
|
|
815a62d283 | ||
|
|
f0102d2a6d | ||
|
|
71fe5c01eb | ||
|
|
8712c6e799 | ||
|
|
58dd5b3b3e | ||
|
|
da6af900f1 | ||
|
|
2cce705aad | ||
|
|
c3baf426f8 | ||
|
|
d62e92203d | ||
|
|
60ff3b9976 | ||
|
|
8f0b51916e | ||
|
|
5d8bc5d35d | ||
|
|
170cbe33dc | ||
|
|
8ae6ce07de | ||
|
|
b27f2615c7 | ||
|
|
dfaf42d2e8 | ||
|
|
f445b8537b | ||
|
|
1f1ce28841 | ||
|
|
2d66e025ef | ||
|
|
fe366bc940 | ||
|
|
9e57c2a032 | ||
|
|
47c13eb766 | ||
|
|
d13b68d233 | ||
|
|
cf471cab82 | ||
|
|
c7fb814ac3 | ||
|
|
66806a0bf0 | ||
|
|
2d52841d08 | ||
|
|
a3a1ceae81 | ||
|
|
8771a3239e | ||
|
|
7eb4e9cc0f | ||
|
|
3fcdd07b5d | ||
|
|
68df5777c7 | ||
|
|
224ff7a50d | ||
|
|
7c66a49332 | ||
|
|
6c68273f97 | ||
|
|
7e99ad8621 | ||
|
|
8242fb3b6f | ||
|
|
84fba50b0c | ||
|
|
06bd2b5753 | ||
|
|
990416e0bd | ||
|
|
3e02f5ed14 | ||
|
|
4004f41e3c | ||
|
|
e00a018306 | ||
|
|
aa5df84fab | ||
|
|
e48fa619a1 | ||
|
|
e02c03a42e | ||
|
|
0c3d4bfdcf | ||
|
|
a4bde64fd2 | ||
|
|
f4e11bc941 | ||
|
|
9b97ee33d7 | ||
|
|
bfef20bf7d | ||
|
|
3d2b9c202d | ||
|
|
07dc73b114 | ||
|
|
9853e3b7d4 | ||
|
|
e6ed776fb2 | ||
|
|
103aab2664 | ||
|
|
eb17eaba37 | ||
|
|
7325fb80ae | ||
|
|
9329312b60 | ||
|
|
c29658ea7d | ||
|
|
df61c00971 | ||
|
|
dc8174d2a9 | ||
|
|
c45a4560f8 | ||
|
|
b8365facc3 | ||
|
|
5b615ed89b | ||
|
|
0bafad0cf4 | ||
|
|
70862fa81b | ||
|
|
8f06a01712 | ||
|
|
eec92d76f8 | ||
|
|
9e46ac75de | ||
|
|
bbf8fc5391 | ||
|
|
54744d3ab7 | ||
|
|
f83b9a7780 | ||
|
|
53faea4316 | ||
|
|
48fe83743a | ||
|
|
2224580a41 | ||
|
|
8480b297e7 | ||
|
|
13e3b45a89 | ||
|
|
f855d4cbf5 | ||
|
|
b9fa850da1 | ||
|
|
4bdad4464e | ||
|
|
1e92909e9a | ||
|
|
95ca6a20b5 | ||
|
|
8a89af527d | ||
|
|
b3630c4fb4 | ||
|
|
13b59a33b4 | ||
|
|
ed6e827e23 | ||
|
|
5d33ed2c6b | ||
|
|
c09d434d55 | ||
|
|
3fa344e531 | ||
|
|
b5ce269b14 | ||
|
|
0c8c86a6b0 | ||
|
|
e60a4e0706 | ||
|
|
8122471f4f | ||
|
|
a7060aacab | ||
|
|
de804346e4 | ||
|
|
56b79cb98d | ||
|
|
f6081a0462 | ||
|
|
4c45f240f6 | ||
|
|
b6c588e1a6 | ||
|
|
55c56a6d80 | ||
|
|
5ace021300 | ||
|
|
16b52fa1b7 | ||
|
|
d4aa3a4b86 | ||
|
|
107a178768 | ||
|
|
1b6452dfc4 | ||
|
|
3fd99dfceb | ||
|
|
b9de131510 | ||
|
|
70aedad68f | ||
|
|
34153050fe | ||
|
|
72fc5caf06 | ||
|
|
9922de0b73 | ||
|
|
55746b4c58 | ||
|
|
4acd108caf | ||
|
|
67b81440f0 | ||
|
|
faab619a85 | ||
|
|
7d0bb74d2b | ||
|
|
7923c64946 | ||
|
|
6dc6fda694 | ||
|
|
a02dc3e3ff | ||
|
|
1845dd9923 | ||
|
|
b5ffecfc98 | ||
|
|
0bd55cfa2c | ||
|
|
d76fe38b29 | ||
|
|
d71fa6fb2e | ||
|
|
c56dadd8ed | ||
|
|
579d7d1316 | ||
|
|
b2f60e03cc | ||
|
|
e98eb0f278 | ||
|
|
8ca97ad03c | ||
|
|
7517f8f540 | ||
|
|
3592c01e44 | ||
|
|
03a6a579ae | ||
|
|
5b315dd000 | ||
|
|
50a1f26154 | ||
|
|
21f95b5254 | ||
|
|
6ecb30a36f | ||
|
|
5be0cf6503 | ||
|
|
721ab90538 | ||
|
|
fc7dfaf8ee | ||
|
|
69626ba928 | ||
|
|
c5d22514ae | ||
|
|
56dade3c4d | ||
|
|
7818b39874 | ||
|
|
46745d9394 | ||
|
|
c2517b27a8 | ||
|
|
1a787c5dc8 | ||
|
|
49e6314f6e | ||
|
|
34d65dd2ae | ||
|
|
22224dec5b | ||
|
|
66b6b04535 | ||
|
|
ff7c6c9c36 | ||
|
|
cf27ef009f | ||
|
|
4c0ed91137 | ||
|
|
44141a18c3 | ||
|
|
438e3558ad | ||
|
|
50af7fa9f2 | ||
|
|
92fa3a1314 | ||
|
|
d5536adedf | ||
|
|
4f527e7158 | ||
|
|
531dfa446c | ||
|
|
25ba2b89d7 | ||
|
|
625e60c9d2 | ||
|
|
5656c6ef36 | ||
|
|
fbc899085c | ||
|
|
f9286bf5e6 | ||
|
|
096824d758 | ||
|
|
5fbc988f58 | ||
|
|
29e6059738 | ||
|
|
ecacdf8fc5 | ||
|
|
bd00574fd3 | ||
|
|
0646614dad | ||
|
|
d1022fd6ba | ||
|
|
13771c0847 | ||
|
|
568708e29f | ||
|
|
a58a12e9b7 | ||
|
|
d80cd92ae2 | ||
|
|
d24905b5e4 | ||
|
|
9376d86ede | ||
|
|
8e21d9ad05 | ||
|
|
4786aabdbd | ||
|
|
19695fbd61 | ||
|
|
e70e8f4cf3 | ||
|
|
176513eb42 | ||
|
|
4a539480fb | ||
|
|
eaeb6a3c37 | ||
|
|
8ad6ad991c | ||
|
|
31fd9b6bab | ||
|
|
2a6b16e36b | ||
|
|
006713a260 | ||
|
|
11e654da9c | ||
|
|
ae77fce66c | ||
|
|
e5a2291ac7 | ||
|
|
3c1a88d8b8 | ||
|
|
c857185ce0 | ||
|
|
d2f5093319 | ||
|
|
a294c6d53e | ||
|
|
88e243b29f | ||
|
|
069d0f27ef | ||
|
|
b97fa7cfd1 | ||
|
|
c3a4297caf | ||
|
|
de2d2cdc86 | ||
|
|
bf3dab485a | ||
|
|
b19d5e569e | ||
|
|
446f8f2aad | ||
|
|
b24e8265ed | ||
|
|
af7c105256 | ||
|
|
f49676ee8c | ||
|
|
55dfa8d3ea | ||
|
|
510fc784c0 | ||
|
|
6b82d89473 | ||
|
|
0f42a87192 | ||
|
|
5333ab8e8e | ||
|
|
3e2dd3db30 | ||
|
|
8614c46755 | ||
|
|
ae80f83724 | ||
|
|
f3c8285953 | ||
|
|
b662c13583 | ||
|
|
0292142ee8 | ||
|
|
521ccc1bc6 | ||
|
|
eca370a9cf | ||
|
|
545f9e3c7c | ||
|
|
4ee1741f75 | ||
|
|
7502bdff47 | ||
|
|
2f3eae6a19 | ||
|
|
8253c7fda1 | ||
|
|
a4372af60a | ||
|
|
2b75c8f219 | ||
|
|
e0eedd6818 | ||
|
|
d9506e7758 | ||
|
|
4c30035625 | ||
|
|
78316bbe35 | ||
|
|
cc638fc6ad | ||
|
|
4d2976ad6b | ||
|
|
2faa3a6b3f | ||
|
|
1d910ac1fc | ||
|
|
e680a37841 | ||
|
|
bfdc8d1870 | ||
|
|
8f80ec1acf | ||
|
|
e0f15f4ac0 | ||
|
|
f02b73c46c | ||
|
|
88413fec06 | ||
|
|
475f6e7ae8 | ||
|
|
6fdbbb0073 | ||
|
|
5c3beb8ee5 | ||
|
|
7337790c27 | ||
|
|
0d09b61a50 | ||
|
|
be0a33fbc0 | ||
|
|
26065a88bb | ||
|
|
087c0d5ebb | ||
|
|
ea451729db | ||
|
|
29e7e51a4d | ||
|
|
00c4e8974d | ||
|
|
54cd433261 | ||
|
|
89894079c0 | ||
|
|
708795b5e7 | ||
|
|
9f72a1d803 | ||
|
|
4ca0f293bf | ||
|
|
1cd04aa2e1 | ||
|
|
e1c8c2f806 | ||
|
|
4c5b61be53 | ||
|
|
cfd885695e | ||
|
|
bea5687993 | ||
|
|
4b7f216556 | ||
|
|
30b5fc118f | ||
|
|
1b7274a8c0 | ||
|
|
a46dafc834 | ||
|
|
23d056faac | ||
|
|
8727a1fe6f | ||
|
|
8ca2f11cf3 | ||
|
|
ec78053243 | ||
|
|
6097c3a28a | ||
|
|
636c47a794 | ||
|
|
d3ea65274f | ||
|
|
9bf10d6bd3 | ||
|
|
d93c719ac0 | ||
|
|
f1df09276c | ||
|
|
cded6e3c28 | ||
|
|
8a84f3a05c | ||
|
|
f608bc673f | ||
|
|
634d3cc8d8 | ||
|
|
7af206c1c4 | ||
|
|
d3a809c7dc | ||
|
|
e15421ad3b | ||
|
|
aeb040bfaf | ||
|
|
28459a0d28 | ||
|
|
846e1424e2 | ||
|
|
30a6d2d264 | ||
|
|
67e9aaa3c9 | ||
|
|
5d3cc7856f | ||
|
|
6e7ce6246c | ||
|
|
0765adca2b | ||
|
|
7ddef9ed7a | ||
|
|
9005a56e5e | ||
|
|
76b566d03f | ||
|
|
737255678c | ||
|
|
d2a190fe37 | ||
|
|
fbd278540e | ||
|
|
af1ed0c107 | ||
|
|
ecf23aa626 | ||
|
|
065eb1427a | ||
|
|
047640f231 | ||
|
|
f890e2d474 | ||
|
|
5d541a0366 | ||
|
|
d572bb7513 | ||
|
|
7dc3cc31af | ||
|
|
68263f63e5 | ||
|
|
2ae47e3f2b | ||
|
|
8211bdcc03 | ||
|
|
a4625b8c3b | ||
|
|
b8167e73f6 | ||
|
|
954e4e9883 | ||
|
|
583f6c5cb5 | ||
|
|
56880523be | ||
|
|
8e425133fb | ||
|
|
b854b7b82e | ||
|
|
6ee654e6bb | ||
|
|
a47ce4a764 | ||
|
|
95b1b9d3b3 | ||
|
|
617eb021db | ||
|
|
2bdebb91be | ||
|
|
2e2fd42aa7 | ||
|
|
f35822af10 | ||
|
|
eaf40b230e | ||
|
|
039f62f431 | ||
|
|
ef489f6a73 | ||
|
|
c8bc03c332 | ||
|
|
731dd422ea | ||
|
|
feda301187 | ||
|
|
6ab6a43579 | ||
|
|
298d19f9ad | ||
|
|
3ee6d0a7bc | ||
|
|
bf027a6daa | ||
|
|
b0c5c42156 | ||
|
|
2173065452 | ||
|
|
730bc726da | ||
|
|
a84fc80be3 | ||
|
|
ff0ea71cea | ||
|
|
15d4df3c71 | ||
|
|
0b75b49b60 | ||
|
|
491ea6fa20 | ||
|
|
459d420793 | ||
|
|
c26991edbb | ||
|
|
8eda3cb854 | ||
|
|
5c1bfc5da0 | ||
|
|
dff873d1aa | ||
|
|
5bd3a2da95 | ||
|
|
052e12db71 | ||
|
|
6aef9caf82 | ||
|
|
b5a7b00057 | ||
|
|
57e3f9d9cc | ||
|
|
981b25083e | ||
|
|
cf214c358c | ||
|
|
66bf55ca85 | ||
|
|
74accc5015 | ||
|
|
566bc3285e | ||
|
|
3e5296e75d | ||
|
|
c531f73602 | ||
|
|
5612e5243e | ||
|
|
aae3ccf88d | ||
|
|
eee786e9cb | ||
|
|
76a4f50db5 | ||
|
|
01ca9e8ea7 | ||
|
|
a8f0faf389 | ||
|
|
76fdaf8c47 | ||
|
|
35bc781e40 | ||
|
|
076bae67da | ||
|
|
27f5b0c3dc | ||
|
|
2686e01b0b | ||
|
|
d0cf484622 | ||
|
|
b250d38459 | ||
|
|
57f5902621 | ||
|
|
fa146dd713 | ||
|
|
981e62aa85 | ||
|
|
1e1d0be191 | ||
|
|
62ea506eaf | ||
|
|
139ab6fc26 | ||
|
|
32ab332fcc | ||
|
|
fc0200b944 | ||
|
|
c497114770 | ||
|
|
b4b58c41d2 | ||
|
|
a63f2bec29 | ||
|
|
37b8e67987 | ||
|
|
a0ff531586 | ||
|
|
b136d1fe86 | ||
|
|
1317fd5821 | ||
|
|
4d1951eb95 | ||
|
|
ac3c6ddba2 | ||
|
|
259c933b56 | ||
|
|
5801c56fa9 | ||
|
|
240c2873da | ||
|
|
0f91df4ff5 | ||
|
|
da590c59c7 | ||
|
|
cefc49fd8a | ||
|
|
655cf3107a | ||
|
|
cdf339c9de | ||
|
|
e0c734faa5 | ||
|
|
4c3f56612e | ||
|
|
6ef85b1b2c | ||
|
|
e7b35d4252 | ||
|
|
0d7ea90249 | ||
|
|
4b89c61845 | ||
|
|
9ca03a57ea | ||
|
|
40515a2167 | ||
|
|
69c33c6c58 | ||
|
|
9051ae8503 | ||
|
|
f40dba9350 | ||
|
|
74b28d5cc8 | ||
|
|
d6e4587ece | ||
|
|
76ae3c63db | ||
|
|
5b8a521e59 | ||
|
|
4157f43f4b | ||
|
|
adc1999b9c | ||
|
|
8f75cb6c75 | ||
|
|
9000c6246f | ||
|
|
41fbc84101 | ||
|
|
5dd26b0839 | ||
|
|
392f4b1b14 | ||
|
|
408b4168c8 | ||
|
|
b853f8981f | ||
|
|
f61715c852 | ||
|
|
31bc4fa550 | ||
|
|
5b10a61949 | ||
|
|
023d13a6bc | ||
|
|
86a37794ff | ||
|
|
9aab8b2009 | ||
|
|
0629823585 | ||
|
|
7a0d28d8e9 | ||
|
|
aa21388719 | ||
|
|
1b3d5e5566 | ||
|
|
610c985186 | ||
|
|
4e9fd9e259 | ||
|
|
7f071e73f2 | ||
|
|
e6ff5ac9ef | ||
|
|
9892d462f3 | ||
|
|
67cfebc2b6 | ||
|
|
fdd4d83689 | ||
|
|
60e87cb1fb | ||
|
|
5660c520d7 | ||
|
|
50494a55ae | ||
|
|
f3bcfd9bcd | ||
|
|
e7ee65ed51 | ||
|
|
cf3da716f6 | ||
|
|
27259273e4 | ||
|
|
8caa4ed10e | ||
|
|
dfd6b52fdb | ||
|
|
4b05d97389 | ||
|
|
5c5ab9ebc3 | ||
|
|
93759cda46 | ||
|
|
d9c09c79fa | ||
|
|
dc5c1114e1 | ||
|
|
58a003cea3 | ||
|
|
e183484e41 | ||
|
|
451458f4c9 | ||
|
|
3427517637 | ||
|
|
ae3dd4a589 | ||
|
|
d9317fd472 | ||
|
|
02b6f53109 | ||
|
|
f6e4e9ea30 | ||
|
|
d1e418eaea | ||
|
|
8208e181cb | ||
|
|
d47ebd1e05 | ||
|
|
60fe730339 | ||
|
|
94f8abf9d3 | ||
|
|
37e2cb08cd | ||
|
|
07cdd02764 | ||
|
|
4765d335f6 | ||
|
|
3b322b4a1f | ||
|
|
dc8497b15c | ||
|
|
c5c32d72aa | ||
|
|
5e64b2b6a1 | ||
|
|
cc42eb7afc | ||
|
|
82ea63e6e0 | ||
|
|
9260520f90 | ||
|
|
ec14dd32d8 | ||
|
|
b3402d0df8 | ||
|
|
8535af00e2 | ||
|
|
eeca623edd | ||
|
|
c6e62f74fc | ||
|
|
9bc8fded1b | ||
|
|
75515c52a4 | ||
|
|
c9c436eb70 | ||
|
|
24e148adbe | ||
|
|
eafef53a5f | ||
|
|
0b2dadd342 | ||
|
|
1be096c9f9 | ||
|
|
0de868d9dd | ||
|
|
c2754d2903 | ||
|
|
8bf9e177d5 | ||
|
|
4a3563c542 | ||
|
|
5692876f3b | ||
|
|
9856788f58 | ||
|
|
3b59cdbfaf | ||
|
|
ba2d860554 | ||
|
|
870ff2b13d | ||
|
|
47cb338282 | ||
|
|
cfb76a19a4 | ||
|
|
9e0c3ef2c3 | ||
|
|
ce64cf050d | ||
|
|
f59ba38691 | ||
|
|
749aa5c178 | ||
|
|
dad6c0ea77 | ||
|
|
6c8f8bc534 | ||
|
|
d51e8205da | ||
|
|
1cf4526de3 | ||
|
|
1222db7263 | ||
|
|
7d67275288 | ||
|
|
559d79aa3a | ||
|
|
7140577b50 | ||
|
|
81b92e17cd | ||
|
|
470d5a6769 | ||
|
|
31e78e0cb6 | ||
|
|
6f4968e281 | ||
|
|
dbefe3d8f5 | ||
|
|
a5f4a1bdc8 | ||
|
|
f66f0fd7b4 | ||
|
|
72c0d7d70e | ||
|
|
d599bc529d | ||
|
|
6648cd46dc | ||
|
|
6b0eebc537 | ||
|
|
3b61656e64 | ||
|
|
d3acd3697a | ||
|
|
2480be69b1 | ||
|
|
c72b150f5d | ||
|
|
3ac8d3bc52 | ||
|
|
a02b243269 | ||
|
|
b44d69bae3 | ||
|
|
70f7a477cb | ||
|
|
01fe050c17 | ||
|
|
cc65fceb3c | ||
|
|
fd4fe42c52 | ||
|
|
70d26c3f4f | ||
|
|
617ec45690 | ||
|
|
64d8470859 | ||
|
|
2a31049201 | ||
|
|
95837b4d96 | ||
|
|
471ed537e4 | ||
|
|
8bf3196d66 | ||
|
|
d6707afb72 | ||
|
|
172fde4fbe | ||
|
|
5a2155efdb | ||
|
|
098963c350 | ||
|
|
1b6d97f9b8 | ||
|
|
fc3463cc7e | ||
|
|
8536082d32 | ||
|
|
a1df7a9526 | ||
|
|
87fbe61486 | ||
|
|
5a1c877f57 | ||
|
|
265b0c070b | ||
|
|
85ac091e8f | ||
|
|
7e2b55cd96 | ||
|
|
6ce7355743 | ||
|
|
11b6a93b1e | ||
|
|
850ff48550 | ||
|
|
c75ea1a30b | ||
|
|
07e829dc26 | ||
|
|
674ac8b919 | ||
|
|
a6fc8ae3c2 | ||
|
|
6f2a55e34a | ||
|
|
c0f587c500 | ||
|
|
4021952304 | ||
|
|
ccebc98a67 | ||
|
|
087e4f4a5c | ||
|
|
b178e0c71a | ||
|
|
0834112f89 | ||
|
|
e612f101d3 | ||
|
|
2a36259f27 | ||
|
|
caa2c79b45 | ||
|
|
1e245dc267 | ||
|
|
2822ee33cc | ||
|
|
fd9f9f4c4b | ||
|
|
3ce65f6c9b | ||
|
|
479cd5de40 | ||
|
|
88195b2b70 | ||
|
|
25e3a937db | ||
|
|
96fa7876bf | ||
|
|
5fc7ede910 | ||
|
|
0f2f4986cb | ||
|
|
a5569657a0 | ||
|
|
d455cb5f83 | ||
|
|
7281ab041c | ||
|
|
b7e7242718 | ||
|
|
82dd98a702 | ||
|
|
4f40f5e370 | ||
|
|
d34bce842b | ||
|
|
9f83044fb8 | ||
|
|
e6527f9dd4 | ||
|
|
64d78265d0 | ||
|
|
238ddd26bd | ||
|
|
e04221b6d0 | ||
|
|
2d96836946 | ||
|
|
ecbdd409e1 | ||
|
|
04165bec2c | ||
|
|
3d62dcb6b5 | ||
|
|
e47c4d4874 | ||
|
|
ce96b7a010 | ||
|
|
d3e90957cf | ||
|
|
98959adb03 | ||
|
|
1696c17801 | ||
|
|
f8c0354763 | ||
|
|
c79853685d | ||
|
|
27e2ed8185 | ||
|
|
f21a7f94fc | ||
|
|
db434467a1 | ||
|
|
bf9b671186 | ||
|
|
31405c014d | ||
|
|
bb44855297 | ||
|
|
398b582f36 | ||
|
|
16ee521a22 | ||
|
|
7ab9bf9f2d | ||
|
|
a36f0f8345 | ||
|
|
ef8b2d9165 | ||
|
|
571f8dae5e | ||
|
|
380d9d6297 | ||
|
|
f2a497dcf9 | ||
|
|
46f9bb9475 | ||
|
|
0413cec527 | ||
|
|
08298395b2 | ||
|
|
eda22ec3a2 | ||
|
|
5d368213ca | ||
|
|
a8ee71c702 | ||
|
|
0e89bb17e8 | ||
|
|
4a0c68a70b | ||
|
|
5747aa84c1 | ||
|
|
aa2097dda2 | ||
|
|
d8cde57b83 | ||
|
|
55cca86849 | ||
|
|
b8f72dedd3 | ||
|
|
bc385ba9eb | ||
|
|
44762a6a87 | ||
|
|
1e8d2f694e | ||
|
|
7e949b437c | ||
|
|
94fc5183e9 | ||
|
|
6e7cdb7696 | ||
|
|
b919f007af | ||
|
|
6809ee4b8e | ||
|
|
273b7ed9d0 | ||
|
|
33720b2de5 | ||
|
|
312cd9e93d | ||
|
|
1bdda41cff | ||
|
|
faad32e5ab | ||
|
|
5a1dca125f | ||
|
|
cbf97a6cd6 | ||
|
|
e9fa75816c | ||
|
|
5b73520279 | ||
|
|
f37736559d | ||
|
|
f5166ed458 | ||
|
|
15b83243e8 | ||
|
|
74a533f7e9 | ||
|
|
4f6aed9c6a | ||
|
|
c88275cb7d | ||
|
|
548cadfd42 | ||
|
|
afc94fa6b4 | ||
|
|
82545b58f4 | ||
|
|
47e55c2f11 | ||
|
|
5b5d025c1d | ||
|
|
24e1f1ca21 | ||
|
|
cddfbd9f55 | ||
|
|
07f5b19a15 | ||
|
|
169267e61f | ||
|
|
f0b0b7d4b8 | ||
|
|
f4abae9cd7 | ||
|
|
0279e84482 | ||
|
|
f22e0c3c3f | ||
|
|
b40b0f5b20 | ||
|
|
17e799185b | ||
|
|
357d660c90 | ||
|
|
ff83a7701c | ||
|
|
70be2567de | ||
|
|
d59efe01ea | ||
|
|
1b55cabf50 | ||
|
|
a5e3f3e9fa | ||
|
|
c958260b38 | ||
|
|
a66fa4a84b | ||
|
|
a50a288b95 | ||
|
|
045c4fab85 | ||
|
|
2de89127de | ||
|
|
d6f941fdda | ||
|
|
0185cd0978 | ||
|
|
13111b2ac8 | ||
|
|
ce6d2511f8 | ||
|
|
1a8557b143 | ||
|
|
882a8f40e2 | ||
|
|
5d5b3a40f3 | ||
|
|
54b9688254 | ||
|
|
cfe17b7435 | ||
|
|
15807266c6 | ||
|
|
3af4e610b1 | ||
|
|
0148fe1e2a | ||
|
|
9d9b77552e | ||
|
|
924ef85080 | ||
|
|
e12be2f7fb | ||
|
|
29b5bcd515 | ||
|
|
23efdd028e | ||
|
|
c76dd5a121 | ||
|
|
75c74ca055 | ||
|
|
2ef31e80ee | ||
|
|
f59d80ca00 | ||
|
|
487c1f7ef2 | ||
|
|
5e095c55f9 | ||
|
|
ffef2bdec9 | ||
|
|
cff4a45c15 | ||
|
|
84e5f5395d | ||
|
|
1a3aa77fc7 | ||
|
|
52ca3f113e | ||
|
|
f2593d0dda | ||
|
|
9b6b575004 | ||
|
|
3f399a69cc | ||
|
|
7468b994be | ||
|
|
be25e48093 | ||
|
|
41acf5c0bd | ||
|
|
d5fc46616d | ||
|
|
406005d21b | ||
|
|
9c2882d9e1 | ||
|
|
6957717a00 | ||
|
|
ddb56b384d | ||
|
|
c91108763b | ||
|
|
200fed6cdf | ||
|
|
5eae411929 | ||
|
|
6fb0a92e2c | ||
|
|
e336790467 | ||
|
|
f9ee644eac | ||
|
|
605d715ddd | ||
|
|
9a66115de3 | ||
|
|
bb65ef80fe | ||
|
|
599a97e9ab | ||
|
|
6ed4970d21 | ||
|
|
f1ad10f373 | ||
|
|
194fa2aca0 | ||
|
|
d2103cf2e2 | ||
|
|
5e6a0e8315 | ||
|
|
9434fb903d | ||
|
|
f3314fbcb4 | ||
|
|
9c00cfa3e5 | ||
|
|
f533a674ae | ||
|
|
40973ea5fd | ||
|
|
f17fee68ea | ||
|
|
ab2208b54e | ||
|
|
2463329cd3 | ||
|
|
846914d18d | ||
|
|
f2c2fa4d62 | ||
|
|
2ea24d9f47 | ||
|
|
b49576e077 | ||
|
|
0656d2e68d | ||
|
|
874a1686d8 | ||
|
|
9b3d3bc44b | ||
|
|
8d772832a0 | ||
|
|
17bec151f9 | ||
|
|
8eb2940f7f | ||
|
|
921d0fb195 | ||
|
|
fe7a2e2529 | ||
|
|
e07802fc4a | ||
|
|
c7d68b4b70 | ||
|
|
35e20db0ee | ||
|
|
e2b8b0662c | ||
|
|
ad0dc53bff | ||
|
|
fb10f04c95 | ||
|
|
73c0666118 | ||
|
|
9750fc4245 | ||
|
|
57160afe2b | ||
|
|
84b63045ca | ||
|
|
e5436d5933 | ||
|
|
0ddea94696 | ||
|
|
b12915c104 | ||
|
|
e17e2b7c1d | ||
|
|
738f53e98d | ||
|
|
28f5bdb49b | ||
|
|
f30933a8c7 | ||
|
|
00e12320ca | ||
|
|
b38e2f7dc3 | ||
|
|
be4017f89b | ||
|
|
5f287370dd | ||
|
|
1845534dd4 | ||
|
|
738bfca98d | ||
|
|
08d038e7d1 | ||
|
|
610a6ee998 | ||
|
|
7618e37465 | ||
|
|
f0f951faab | ||
|
|
657d209757 | ||
|
|
28c9c76e7f | ||
|
|
77c3e48a9e | ||
|
|
341e7d2889 | ||
|
|
68ee7c4730 | ||
|
|
75399efbb2 | ||
|
|
7f684264b8 | ||
|
|
74cfc36921 | ||
|
|
97e0ceea08 | ||
|
|
112d35a2cb | ||
|
|
cd0b170911 | ||
|
|
e35edde9c3 | ||
|
|
e8f4c58406 | ||
|
|
6f67eafe67 | ||
|
|
c25a510b30 | ||
|
|
83307f338d | ||
|
|
bd046d4221 | ||
|
|
c7a9fa36e4 | ||
|
|
f9dbf34fc6 | ||
|
|
405e126cc8 | ||
|
|
ef01b72f17 | ||
|
|
f0b6a33f4c | ||
|
|
336e2d4424 | ||
|
|
8b260fbe33 | ||
|
|
c88293a404 | ||
|
|
5ea6dbbfff | ||
|
|
97734a7f33 | ||
|
|
239446b415 | ||
|
|
3e1ed7d709 | ||
|
|
5ebdc86afc | ||
|
|
300b128833 | ||
|
|
cae31b8b52 | ||
|
|
b704229ee2 | ||
|
|
df0c322667 | ||
|
|
08f6ac314a | ||
|
|
2063a4a0ca | ||
|
|
17d8ee1cbd | ||
|
|
4e0f4f97d7 | ||
|
|
334673a8bb | ||
|
|
b4eb4c6b55 | ||
|
|
6fd5fa4fcc | ||
|
|
b7c2b5c51d | ||
|
|
97fdfcc9fd | ||
|
|
d895ad7c54 | ||
|
|
b8f0499040 | ||
|
|
c5a1681bfe | ||
|
|
211c225069 | ||
|
|
8673da0de1 | ||
|
|
6e807169c4 | ||
|
|
2ffa221c58 | ||
|
|
d5e295970c | ||
|
|
7521ca7d84 | ||
|
|
8f177c8e73 | ||
|
|
b4d1ebf058 | ||
|
|
6bee9b5951 | ||
|
|
995a594ab4 | ||
|
|
6ecfe2ac49 | ||
|
|
e838cc1468 | ||
|
|
1eb6f40e2a | ||
|
|
51dba3f868 | ||
|
|
85806dc2d8 | ||
|
|
982b2cfc58 | ||
|
|
9fb35cf180 | ||
|
|
f35aa3daa3 | ||
|
|
5357c8e8b3 | ||
|
|
1b24a68eba | ||
|
|
90002c499c | ||
|
|
d32548aa77 | ||
|
|
cc9f7d7939 | ||
|
|
8f9846be80 | ||
|
|
c8b4eea8f2 | ||
|
|
89de9af3cb | ||
|
|
1aaaa7120e | ||
|
|
8f49300284 | ||
|
|
1dbe87089b | ||
|
|
8a0681f933 | ||
|
|
56f5d962ad | ||
|
|
5bff6bb8ea | ||
|
|
6de20863de | ||
|
|
bf84b0be84 | ||
|
|
360d6699d3 | ||
|
|
64a8976615 | ||
|
|
caf51f9536 | ||
|
|
ad4ae6ed7a | ||
|
|
a16a9bf350 | ||
|
|
3ed2e7ce82 | ||
|
|
e7bcded47c | ||
|
|
3070bd9633 | ||
|
|
8ea3f821b7 | ||
|
|
bed4d33171 | ||
|
|
1afe597eba | ||
|
|
9d08a1edf6 | ||
|
|
faa7a70eaf | ||
|
|
89d0045628 | ||
|
|
0848b0dd74 | ||
|
|
c9d01afd82 | ||
|
|
97507ccea7 | ||
|
|
980662342f | ||
|
|
44178d9214 | ||
|
|
2e8005ccaf | ||
|
|
ad81651f00 | ||
|
|
fed628b632 | ||
|
|
1c83cdc920 | ||
|
|
a68d00b192 | ||
|
|
9dea36ef6d | ||
|
|
aaf6c39ae6 | ||
|
|
93fa69f84b | ||
|
|
b685cd9bc8 | ||
|
|
84f19880c6 | ||
|
|
dc1dbfc640 | ||
|
|
672cedf866 | ||
|
|
c1dd939d3b | ||
|
|
78385733e7 | ||
|
|
5ef2e6333e | ||
|
|
d9c8e68e58 | ||
|
|
fc6bbc6dad | ||
|
|
fb5ddb4c13 | ||
|
|
d166a4f8e8 | ||
|
|
af79c52df0 | ||
|
|
d899618714 | ||
|
|
5ef37c79de | ||
|
|
65e4f9b986 | ||
|
|
75be3f5ef7 | ||
|
|
60be2f47e1 | ||
|
|
41b1047d91 | ||
|
|
78e848cac9 | ||
|
|
191ab39aee | ||
|
|
864e8bd0fc | ||
|
|
61eff74fb9 | ||
|
|
528dad23e5 | ||
|
|
ae373e59d5 | ||
|
|
7513f9ffc5 | ||
|
|
20d9661c04 | ||
|
|
85ec2f2634 | ||
|
|
f4cc15cd73 | ||
|
|
3cbe51d094 | ||
|
|
b58b1dfc21 | ||
|
|
6c3d9ced08 | ||
|
|
edbd0635f2 | ||
|
|
56ac3e75d4 | ||
|
|
16964b5ed5 | ||
|
|
c914a1a2d2 | ||
|
|
83edc0a574 | ||
|
|
fbff5d1ba5 | ||
|
|
6999b0d8e9 | ||
|
|
4afd752902 | ||
|
|
6bfd5671b0 | ||
|
|
151d66be0f | ||
|
|
299fcbfe98 | ||
|
|
e4b8154a65 | ||
|
|
036bc7d9e1 | ||
|
|
509a619604 | ||
|
|
8c264b23ad | ||
|
|
36cc39686a | ||
|
|
1f59726ed9 | ||
|
|
af159c4481 | ||
|
|
c51deffc32 | ||
|
|
178009938b | ||
|
|
d314c3bbb0 | ||
|
|
b3d810c0b3 | ||
|
|
97e64d8ad5 | ||
|
|
8fbb465f70 | ||
|
|
7c551d9594 | ||
|
|
0207122d52 | ||
|
|
2bf8e4ebcc | ||
|
|
b9517a0ae4 | ||
|
|
c53a2bb3d3 | ||
|
|
e694c22c31 | ||
|
|
68874acfed | ||
|
|
76443e70a5 | ||
|
|
13e8d36e0f | ||
|
|
1944c6bdd0 | ||
|
|
8708a10fa6 | ||
|
|
842d6c94bd | ||
|
|
5ac8158ad9 | ||
|
|
aa51b2e153 | ||
|
|
e4e901d18e | ||
|
|
c74016378e | ||
|
|
9a8c762076 | ||
|
|
c717373949 | ||
|
|
b79395c54b | ||
|
|
5ed3dab261 | ||
|
|
7ec2881ac5 | ||
|
|
d06800f14a | ||
|
|
6e228e42e2 | ||
|
|
d84b26a7b9 | ||
|
|
54acce9084 | ||
|
|
7799a2d76f | ||
|
|
00655497da | ||
|
|
470caaf9df | ||
|
|
0c62388988 | ||
|
|
6308151359 | ||
|
|
9b00bb1626 | ||
|
|
1fb4de3138 | ||
|
|
c61f4f6dbd | ||
|
|
696e1ea0b7 | ||
|
|
c8ce6bccc3 | ||
|
|
1b055864b6 | ||
|
|
85d11a7072 | ||
|
|
1b986aef6e | ||
|
|
4314ec480e | ||
|
|
2182e26fa3 | ||
|
|
d984207cc3 | ||
|
|
929eed4799 | ||
|
|
28a4627cfe | ||
|
|
9ec64fa758 | ||
|
|
70846f0a79 | ||
|
|
ef8d96c29c | ||
|
|
c92d798f9d | ||
|
|
0530737d1e | ||
|
|
1f897d251f | ||
|
|
95724b1aa2 | ||
|
|
43543d985b | ||
|
|
58b1642453 | ||
|
|
fd72e0b5e2 | ||
|
|
382e6efee4 | ||
|
|
fb5700fe76 | ||
|
|
a97a264f73 | ||
|
|
2b8f5a2488 | ||
|
|
340196c001 | ||
|
|
d62228a645 | ||
|
|
aaa37c0d23 | ||
|
|
bdc72a2268 | ||
|
|
1d62a8b425 | ||
|
|
280108ed82 | ||
|
|
1aaef61416 | ||
|
|
32db328c7a | ||
|
|
f03ec224dc | ||
|
|
5f445b310b | ||
|
|
309689b214 | ||
|
|
f6b7723929 | ||
|
|
58c837a4e6 | ||
|
|
4f72fe4f1a | ||
|
|
1ef54dcf12 | ||
|
|
270a909e20 | ||
|
|
abdd4565f1 | ||
|
|
5d1bd85974 | ||
|
|
6d75ea8f10 | ||
|
|
0240e8b1aa | ||
|
|
4378079d84 | ||
|
|
032af30f52 | ||
|
|
72e7876ba5 | ||
|
|
ef6bd27b35 | ||
|
|
6418cb9302 | ||
|
|
3b9e345522 | ||
|
|
d01cc696fc | ||
|
|
4c460b340f | ||
|
|
48c8a76b81 | ||
|
|
ecef04c293 | ||
|
|
16193c2b68 | ||
|
|
4304b42f1a | ||
|
|
e6ec579c77 | ||
|
|
f151e8b583 | ||
|
|
fcc3d7cbad | ||
|
|
fa5f6926ec | ||
|
|
ab857a4ed6 | ||
|
|
371ee4026e | ||
|
|
1193d8fa93 | ||
|
|
d9d8273d9c | ||
|
|
1c4f8f8d18 | ||
|
|
7941ba111c | ||
|
|
fb073f86d2 | ||
|
|
1c74a90041 | ||
|
|
52a5502004 | ||
|
|
955be36cf8 | ||
|
|
2f02cb8966 | ||
|
|
ec96574fbd | ||
|
|
eb7159455d | ||
|
|
b47c832e55 | ||
|
|
a6ad3e89c6 | ||
|
|
700ec4546c | ||
|
|
a05da1b682 | ||
|
|
9d0e21da25 | ||
|
|
065de61268 | ||
|
|
6b8b0e7ca0 | ||
|
|
9fc3ad34c5 | ||
|
|
7d3a036dc4 | ||
|
|
a3439c7d16 | ||
|
|
0b72db08a7 | ||
|
|
b8aa1680f2 | ||
|
|
c1b43f8220 | ||
|
|
d1f4970d73 | ||
|
|
58aefa56e7 | ||
|
|
bd73863347 | ||
|
|
2b0b665264 | ||
|
|
75a2d2c79c | ||
|
|
81a4f8460c | ||
|
|
71ba5d266c | ||
|
|
9c9f40d022 | ||
|
|
b080e420ad | ||
|
|
d352e8509a | ||
|
|
2dfe62c86d | ||
|
|
0f65af9942 | ||
|
|
0c83d66beb | ||
|
|
405c80ff3f | ||
|
|
46522c7910 | ||
|
|
b28c70cf9f | ||
|
|
448663022d | ||
|
|
2c4c6c4abf | ||
|
|
1f381068b7 | ||
|
|
b76b015ed9 | ||
|
|
2fc70a88e8 | ||
|
|
ee41971cbb | ||
|
|
394e8031cb | ||
|
|
ba5b8263f3 | ||
|
|
c9f56e70f4 | ||
|
|
ec74539c12 | ||
|
|
7dee4b2ba0 | ||
|
|
d5db80c269 | ||
|
|
31e24645c0 | ||
|
|
f09caa5758 | ||
|
|
bab537dc37 | ||
|
|
83efdf3393 | ||
|
|
e6f9a44829 | ||
|
|
d6a1e531a3 | ||
|
|
60a41aee69 | ||
|
|
1c8d8d21dc | ||
|
|
8e1c188720 | ||
|
|
257bcf288a | ||
|
|
448dd031e3 | ||
|
|
5ef9f90366 | ||
|
|
1e1fafb918 | ||
|
|
c7a2bf27da | ||
|
|
aec0ed2e25 | ||
|
|
57a1fd7304 | ||
|
|
aed8ac3f89 | ||
|
|
3f26799e25 | ||
|
|
5e7e9e1b68 | ||
|
|
16c1f79c04 | ||
|
|
0979c96223 | ||
|
|
acb8423c2b | ||
|
|
9063ea8ee2 | ||
|
|
b568d04ffa | ||
|
|
aa9a4ae1a5 | ||
|
|
0e0d88570a | ||
|
|
55703c9178 | ||
|
|
fb5dc8a2ee | ||
|
|
a075e27bf3 | ||
|
|
9826157f41 | ||
|
|
66f384064d | ||
|
|
56cfaa52a1 | ||
|
|
13fb7b7a1f | ||
|
|
72a7edf007 | ||
|
|
b16088bf11 | ||
|
|
e4c730e922 | ||
|
|
fef15b42f3 | ||
|
|
e959aee256 | ||
|
|
381dd4bfa2 | ||
|
|
e42a6c18c4 | ||
|
|
252a752e85 | ||
|
|
10a0bdb193 | ||
|
|
f048e32fcd | ||
|
|
1e7215e676 | ||
|
|
c181287ca4 | ||
|
|
6919c53fd2 | ||
|
|
0b0ca94c89 | ||
|
|
85fb5ef8f2 | ||
|
|
cd6361037d | ||
|
|
e5ad852877 | ||
|
|
7b5075ab92 | ||
|
|
d29aba2ff7 | ||
|
|
41509312d6 | ||
|
|
694759cfeb | ||
|
|
899493dd61 | ||
|
|
e9a145dfae | ||
|
|
ac4650263f | ||
|
|
e8af381479 | ||
|
|
285c163f98 | ||
|
|
848bc5ba18 | ||
|
|
c0d6c58bd0 | ||
|
|
0d0512bd8f | ||
|
|
6d167489bd | ||
|
|
162999bfb7 | ||
|
|
82a564fa35 | ||
|
|
bceff37520 | ||
|
|
e52cac90cd | ||
|
|
077def0b2a | ||
|
|
b731267565 | ||
|
|
80eab46937 | ||
|
|
84e4a8257d | ||
|
|
5bfb891ef8 | ||
|
|
2baa7b0cda | ||
|
|
80584ea306 | ||
|
|
c1b99516b6 | ||
|
|
2686d91e13 | ||
|
|
11694d1f12 | ||
|
|
e2b34251cb | ||
|
|
41404da71e | ||
|
|
60c65519d0 | ||
|
|
071a2d7814 | ||
|
|
20e05ffbd3 | ||
|
|
ae285bb56a | ||
|
|
39b307b82f | ||
|
|
ccaaf5b083 | ||
|
|
abd7a159d2 | ||
|
|
20947e08ca | ||
|
|
892b89f3b7 | ||
|
|
55e8450757 | ||
|
|
11b620511d | ||
|
|
e909371890 | ||
|
|
8a29359071 | ||
|
|
1cb6da2dda | ||
|
|
2e0e025ecd | ||
|
|
7eef8db20d | ||
|
|
dafb483b3a | ||
|
|
e78c4d503e | ||
|
|
06d2a9e76e | ||
|
|
7812795ed3 | ||
|
|
9fb56e0cbc | ||
|
|
37bebc1112 | ||
|
|
f38374d0d7 | ||
|
|
f68586e51b | ||
|
|
33879bb218 | ||
|
|
cc160ba62b | ||
|
|
c48afe2918 | ||
|
|
e395c057a3 | ||
|
|
5008c64c32 | ||
|
|
1dd521517c | ||
|
|
1395ff56f4 | ||
|
|
2c4c7d0466 | ||
|
|
cfcc3671ae | ||
|
|
3fa28b5803 | ||
|
|
2ce0a6e2d6 | ||
|
|
31d80f31af | ||
|
|
6d3d1bb786 | ||
|
|
c3f805b4ac | ||
|
|
0b939cbb2f | ||
|
|
72582399ed | ||
|
|
32193feb83 | ||
|
|
97d7bfb8b4 | ||
|
|
61b04ac652 | ||
|
|
f373f19798 | ||
|
|
ac7f0167aa | ||
|
|
338dd99216 | ||
|
|
742ff1e12f | ||
|
|
06a0865f41 | ||
|
|
2d8353236d | ||
|
|
7b9da2077d | ||
|
|
0b5d3315b3 | ||
|
|
2376d03d88 | ||
|
|
b75dd496d2 | ||
|
|
169ee06c44 | ||
|
|
9779893b90 | ||
|
|
5f2936dacb | ||
|
|
b8ad9f18ca | ||
|
|
e16ebee6a9 | ||
|
|
d5c22d1042 | ||
|
|
c49359e0fc | ||
|
|
3175c712e9 | ||
|
|
7c0ea335c7 | ||
|
|
40779a03e7 | ||
|
|
148cd9b6ec | ||
|
|
ebf2689b4d | ||
|
|
ec6f69825a | ||
|
|
4419ba31aa | ||
|
|
8a729bb860 | ||
|
|
bffa1c7746 | ||
|
|
bbdc9a8780 | ||
|
|
568e7b4ac8 | ||
|
|
d3fef91f56 | ||
|
|
776d87d504 | ||
|
|
329e50732b | ||
|
|
f49f2b0c33 | ||
|
|
ef30972aed | ||
|
|
f802b3d360 | ||
|
|
ce52ac88bc | ||
|
|
c4fda16bb0 | ||
|
|
266b635a28 | ||
|
|
fbf0c83d3c | ||
|
|
78ee892753 | ||
|
|
378b05f7f8 | ||
|
|
e2de943347 | ||
|
|
c2a05373bf | ||
|
|
5d5de0b677 | ||
|
|
9739d9ee80 | ||
|
|
c09f28798b | ||
|
|
7aa4cce853 | ||
|
|
1834190409 | ||
|
|
5b1eea6ab8 | ||
|
|
83ef322ddd | ||
|
|
9ed0fac8a8 | ||
|
|
d45d30c868 | ||
|
|
6b1e0606aa | ||
|
|
222594ead7 | ||
|
|
ba0e7d4111 | ||
|
|
5b0d48b32a | ||
|
|
cc82835c2b | ||
|
|
454e2a22c0 | ||
|
|
cb148defda | ||
|
|
bf9e3e7367 | ||
|
|
c0ab6adfed | ||
|
|
021e0f2105 | ||
|
|
4fe5383d6c | ||
|
|
954269e6dd | ||
|
|
69ffe1d20b | ||
|
|
7aa733b31e | ||
|
|
511f273f9e | ||
|
|
958012e0bd | ||
|
|
08942a0c0d | ||
|
|
5c9ea14d97 | ||
|
|
a24282a442 | ||
|
|
564747ee85 | ||
|
|
27df96a8d1 | ||
|
|
0572a7bb9c | ||
|
|
6230a84fdc | ||
|
|
51471a1074 | ||
|
|
e19b716460 | ||
|
|
3739399733 | ||
|
|
07cf98cb8e | ||
|
|
fd69e87d25 | ||
|
|
f76dbc4d52 | ||
|
|
148c45edfb | ||
|
|
f03a98d873 | ||
|
|
d465862f71 | ||
|
|
0470b1e6fe | ||
|
|
97d3f0eee6 | ||
|
|
741a9306b3 | ||
|
|
a4bacadeb2 | ||
|
|
23a8562d7a | ||
|
|
410eaf6d66 | ||
|
|
47f7a3a726 | ||
|
|
e4a71fc3f9 | ||
|
|
de6019fb15 | ||
|
|
837e96fc55 | ||
|
|
3cdb471c6a | ||
|
|
772507f1f4 | ||
|
|
423a556f53 | ||
|
|
4e15f6c57a | ||
|
|
43c9c17dfb | ||
|
|
2b8e283d47 | ||
|
|
8d0df10dcf | ||
|
|
7f4791dda9 | ||
|
|
43dc9c15ef | ||
|
|
816654badb | ||
|
|
548be1f513 | ||
|
|
7499ebbe6c | ||
|
|
f9cb48eff3 | ||
|
|
e22c27b6bd | ||
|
|
00ad47b0a2 | ||
|
|
14e5a5ed1c | ||
|
|
59f0336397 | ||
|
|
4900c03954 | ||
|
|
e1c70641a3 | ||
|
|
aec34b4682 | ||
|
|
6a370f427a | ||
|
|
af9d1662d9 | ||
|
|
d554e5da38 | ||
|
|
61f0d452ea | ||
|
|
07518267d1 | ||
|
|
62edfd9e59 | ||
|
|
0fcdf6dcc5 | ||
|
|
ff52285867 | ||
|
|
e0b3e85b5a | ||
|
|
79a8a691e9 | ||
|
|
a8a32ce2cf | ||
|
|
7e72d7aaa2 | ||
|
|
5230801e77 | ||
|
|
6842d18650 | ||
|
|
acdc3b6b5c | ||
|
|
c4886362e4 | ||
|
|
0db9d8d2ea | ||
|
|
8c58829804 | ||
|
|
c8f1f08817 | ||
|
|
2ccf68ce7c | ||
|
|
1c383dbac9 | ||
|
|
7c74e7fe1d | ||
|
|
8c651ab787 | ||
|
|
4b59bea3dd | ||
|
|
7790267175 | ||
|
|
a832f63206 | ||
|
|
cf1d22d685 | ||
|
|
1c6fb09fe2 | ||
|
|
13a4ea8d83 | ||
|
|
f28538c5f6 | ||
|
|
3f2711d5c1 | ||
|
|
e0473f5f5a | ||
|
|
26bf1ce0bc | ||
|
|
957d856c81 | ||
|
|
4f02408ec9 | ||
|
|
51abe921b8 | ||
|
|
944930d5f5 | ||
|
|
be2577e4e6 | ||
|
|
a7540f46f7 | ||
|
|
7bf07d2635 | ||
|
|
e75491071d | ||
|
|
eff869aad2 | ||
|
|
dcda1c71b1 | ||
|
|
9707f3fddd | ||
|
|
6ed6d1239a | ||
|
|
d30ab05b0d | ||
|
|
ae550e6b64 | ||
|
|
e8fd750b53 | ||
|
|
47f12f58db | ||
|
|
a925b00678 | ||
|
|
154f22b3fa | ||
|
|
3b0c8308f1 | ||
|
|
2f5292c3df | ||
|
|
3c0df30065 | ||
|
|
a5fc62a112 | ||
|
|
19d89516dd | ||
|
|
fe26d444bb | ||
|
|
0d0837053c | ||
|
|
ea9144a3bc | ||
|
|
270c23f7bd | ||
|
|
e041ce574b | ||
|
|
18f4ad8673 | ||
|
|
e66ad5c68d | ||
|
|
ac99a98ff0 | ||
|
|
e3baecd7d6 | ||
|
|
6adaedf0fc | ||
|
|
5e84fc5a82 | ||
|
|
8a28f119c8 | ||
|
|
4120ef2b38 | ||
|
|
085078a1c4 | ||
|
|
5d4b632ba3 | ||
|
|
57c4d796c5 | ||
|
|
aa33452c94 | ||
|
|
01dba85a7f | ||
|
|
a968c19a82 | ||
|
|
81c67e27fd | ||
|
|
8493118f58 | ||
|
|
d433a26fd4 | ||
|
|
9199e66fb5 | ||
|
|
d194ddf23b | ||
|
|
ad556aa948 | ||
|
|
65dd82cbce | ||
|
|
e4a330f1e5 | ||
|
|
6a2e72251f | ||
|
|
f3ac12aa7a | ||
|
|
106f039552 | ||
|
|
9f2d09aad2 | ||
|
|
74d38ad8e2 | ||
|
|
61a6d4c23a | ||
|
|
810b5e1f3b | ||
|
|
9695185a70 | ||
|
|
56dc1ffd50 | ||
|
|
81915974f6 | ||
|
|
0e528b997e | ||
|
|
78f071b6cc | ||
|
|
b581c7e649 | ||
|
|
41ee29dfda | ||
|
|
4349acd401 | ||
|
|
97206645f1 | ||
|
|
01325161d5 | ||
|
|
5c172c1788 | ||
|
|
42d306a033 | ||
|
|
6fa588a864 | ||
|
|
435151d7f2 | ||
|
|
f0dc00f39c | ||
|
|
bd6882eed7 | ||
|
|
7512153245 | ||
|
|
2d68e1b4f4 | ||
|
|
6e47faf150 | ||
|
|
0a2017e01e | ||
|
|
b1462dfa34 | ||
|
|
024fb9b98a | ||
|
|
82c87ed37c | ||
|
|
5f287fcf1d | ||
|
|
7e69b0e8ac | ||
|
|
11c7d5b6d1 | ||
|
|
51f79d5c67 | ||
|
|
ec939b6813 | ||
|
|
87d673313d | ||
|
|
79e4b6277e | ||
|
|
864753e906 | ||
|
|
7beba2fc73 | ||
|
|
feef75abca | ||
|
|
faecf4cb9a | ||
|
|
0c4234663d | ||
|
|
8487f88742 | ||
|
|
2bc1aa1174 | ||
|
|
60be19c4ba | ||
|
|
7e14e49f38 | ||
|
|
ef500a4059 | ||
|
|
bb44571b29 | ||
|
|
519cb848a8 | ||
|
|
20f2deb3cf | ||
|
|
cd77c08509 | ||
|
|
3c1866e88f | ||
|
|
7f24fdbfea | ||
|
|
2e5c594e36 | ||
|
|
90c6f4d6f5 | ||
|
|
330d6fd063 | ||
|
|
678b92a94a | ||
|
|
e8ce9e6baf | ||
|
|
66cbc96ddf | ||
|
|
508379ee46 | ||
|
|
58e648e00c | ||
|
|
f83db66133 | ||
|
|
16c61f1b48 | ||
|
|
5367e67d63 | ||
|
|
87a1e3085b | ||
|
|
775a998ed0 | ||
|
|
1db1f1ede2 | ||
|
|
12909796a5 | ||
|
|
c32bfc1090 | ||
|
|
7f45dffc96 | ||
|
|
a583e623c0 | ||
|
|
f152cf5a84 | ||
|
|
cb81efcd84 | ||
|
|
ce7f10f2a6 | ||
|
|
385c54d720 | ||
|
|
763809100c | ||
|
|
1bb6398255 | ||
|
|
08a43154b4 | ||
|
|
5efec44300 | ||
|
|
8c1c5302f3 | ||
|
|
9ac6ff7b80 | ||
|
|
d21895aec4 | ||
|
|
774b322d02 | ||
|
|
54b37e2e8b | ||
|
|
4e16881a08 | ||
|
|
51edda6af0 | ||
|
|
c03648c251 | ||
|
|
5b8ab3827f | ||
|
|
5558ce7ce4 | ||
|
|
fcdb55192c | ||
|
|
eb91c0be88 | ||
|
|
476607a777 | ||
|
|
51babd0983 | ||
|
|
69a568f06b | ||
|
|
e657520984 | ||
|
|
ab9b9eabe6 | ||
|
|
cfeb83fd7f | ||
|
|
af8ec91907 | ||
|
|
bf57d1adac | ||
|
|
b02da6b187 | ||
|
|
173348db5f | ||
|
|
4ff9eba644 | ||
|
|
10c1d2177a | ||
|
|
c71830c3b6 | ||
|
|
d76e994a28 | ||
|
|
ba337fe731 | ||
|
|
788deba173 | ||
|
|
dd10a64696 | ||
|
|
8b85d24e4c | ||
|
|
a80c322c0d | ||
|
|
4aee367ed0 | ||
|
|
1ee4ead5af | ||
|
|
1dddf8389f | ||
|
|
3096bd2fa7 | ||
|
|
1987af7e9f | ||
|
|
b86737ee11 | ||
|
|
909b4f08a1 | ||
|
|
d9b77fb236 | ||
|
|
1fb3eae500 | ||
|
|
3e469ea37f | ||
|
|
407f36811e | ||
|
|
e92f266ca7 | ||
|
|
d8dd11bab4 | ||
|
|
c5fb56c07a | ||
|
|
dd60b9ec1e | ||
|
|
600ea9da94 | ||
|
|
717a57c2fa | ||
|
|
cf85cb95f1 | ||
|
|
36edded90c | ||
|
|
fc9c7c09bd | ||
|
|
d361e74eb1 | ||
|
|
9ffdee8074 | ||
|
|
737f4d3d79 | ||
|
|
3dabc03fef | ||
|
|
aaa66113df | ||
|
|
6836465999 | ||
|
|
62877de0ed | ||
|
|
59fe1666ce | ||
|
|
e90196a556 | ||
|
|
d139753aed | ||
|
|
6474416b2e | ||
|
|
3da17724b6 | ||
|
|
2a0eb92258 | ||
|
|
354aa1e366 | ||
|
|
cb36238601 | ||
|
|
a1d58ddc15 | ||
|
|
740c28d5e8 | ||
|
|
dde11e6053 | ||
|
|
33a43c5e1e | ||
|
|
2abc0a0f9b | ||
|
|
dc2f8a65c0 | ||
|
|
3135f4a778 | ||
|
|
b32c6ff062 | ||
|
|
5d20e510b1 | ||
|
|
ddb2574624 | ||
|
|
669a6e11ae | ||
|
|
36f210c81e | ||
|
|
8b99adf475 | ||
|
|
da048e3d4c | ||
|
|
928b5c0860 | ||
|
|
995de2b488 | ||
|
|
825ba8f0de | ||
|
|
191549ed17 | ||
|
|
5612a51858 | ||
|
|
66a77a748e | ||
|
|
0e36104428 | ||
|
|
e08ee38353 | ||
|
|
7dd6292482 | ||
|
|
6eec2beef7 | ||
|
|
3e7fb41b4b | ||
|
|
8aaef28406 | ||
|
|
ce89fdd22e | ||
|
|
41d1f82d93 | ||
|
|
9853d97739 | ||
|
|
87b501f0f7 | ||
|
|
f6e9f05fa7 | ||
|
|
80df4d3169 | ||
|
|
345b024712 | ||
|
|
449f38b57e | ||
|
|
2bd5bbc948 | ||
|
|
678cd6de66 | ||
|
|
baccb51431 | ||
|
|
4e67bfc7a4 | ||
|
|
ecf9e593f8 | ||
|
|
0eb8c9383b | ||
|
|
09397bc6e9 | ||
|
|
223cb5ed5a | ||
|
|
d5bb85a0a4 | ||
|
|
a7a4d01bdb | ||
|
|
29435d814d | ||
|
|
afc31813f6 | ||
|
|
76db86e7e1 | ||
|
|
bd8ed12c5a | ||
|
|
c63c71069e | ||
|
|
3e58661e97 | ||
|
|
f512f90a83 | ||
|
|
304ccacc13 | ||
|
|
733dac4760 | ||
|
|
a66ebb5b82 | ||
|
|
10f2d63a82 | ||
|
|
95d15e64c3 | ||
|
|
75bce3ad34 | ||
|
|
9874b4ee83 | ||
|
|
d537080184 | ||
|
|
f3e6095286 | ||
|
|
e22da5d625 | ||
|
|
25f4712757 | ||
|
|
52068ea5ff | ||
|
|
ad9bb75ff2 | ||
|
|
a8cfd0cbf1 | ||
|
|
3dfac9707a | ||
|
|
196c87f43d | ||
|
|
9c5b332b83 | ||
|
|
92d2389ec5 | ||
|
|
ee1aaf9996 | ||
|
|
adc6fb165a | ||
|
|
eb553cb25b | ||
|
|
505928852c | ||
|
|
af111fc338 | ||
|
|
37d92fba28 | ||
|
|
49db7de411 | ||
|
|
afbdc52a1b | ||
|
|
50c375d311 | ||
|
|
2799df0c0d | ||
|
|
faf17c8acb | ||
|
|
16a12a3d27 | ||
|
|
257980e6f2 | ||
|
|
d111a89a85 | ||
|
|
bbeb6c2bc2 | ||
|
|
bbea8df359 | ||
|
|
974e8d946f | ||
|
|
84a3fe2c9b | ||
|
|
60a67569bf | ||
|
|
09fb22cf3c | ||
|
|
cb34a6eeac | ||
|
|
448af9a46e | ||
|
|
6ac64257e4 | ||
|
|
997bba3675 | ||
|
|
8cf1c13cfa | ||
|
|
8a5679d101 | ||
|
|
572eed55ba | ||
|
|
876325579b | ||
|
|
c54f522622 | ||
|
|
d98fcc003d | ||
|
|
ee31c269fc | ||
|
|
735c116a84 | ||
|
|
004fd0c883 | ||
|
|
2695a14e85 | ||
|
|
8fb3a512a8 | ||
|
|
2d93e1335c | ||
|
|
f96ac56ad3 | ||
|
|
99d967ac6f | ||
|
|
11e1c70d8e | ||
|
|
185fa6bf6f | ||
|
|
e6ebb51430 | ||
|
|
ace03f87d6 | ||
|
|
c7def858e5 | ||
|
|
5ae4432e86 | ||
|
|
0cdf89abb1 | ||
|
|
99a49d3e67 | ||
|
|
2b2739754f | ||
|
|
8ee9d6182c | ||
|
|
4d85bcd1f5 | ||
|
|
18c98e42ee | ||
|
|
d7928388eb | ||
|
|
775e1c62be | ||
|
|
d9a012add9 | ||
|
|
f078d013ae | ||
|
|
9d8bd15f99 | ||
|
|
7b5d569973 | ||
|
|
dcd307ee1f | ||
|
|
3f9ca77023 | ||
|
|
2185635d87 | ||
|
|
6c8a980fc4 | ||
|
|
2ee3ee1bc8 | ||
|
|
bd77da975b | ||
|
|
1e8335b0b7 | ||
|
|
b56c22469a | ||
|
|
88b1927cb3 | ||
|
|
e01c8145b1 | ||
|
|
90bc25c7c9 | ||
|
|
b0a6c154de | ||
|
|
c32a8bd4db | ||
|
|
1a7f306263 | ||
|
|
4b3d29db08 | ||
|
|
0c2b453f0a | ||
|
|
e87271f358 | ||
|
|
5dcec1d99b | ||
|
|
6dddc146fb | ||
|
|
2e1a688e3e | ||
|
|
4004aba331 | ||
|
|
dcc7139872 | ||
|
|
12db77cab1 | ||
|
|
a64a02efae | ||
|
|
6663339816 | ||
|
|
bc450ccdff | ||
|
|
fb61df8580 | ||
|
|
e30d5976c9 | ||
|
|
f2491e2d19 | ||
|
|
90e12284ec | ||
|
|
2edc8f5bd6 | ||
|
|
c9057ae1c5 | ||
|
|
e5d6aa2208 | ||
|
|
2c41c4404c | ||
|
|
572c6194d3 | ||
|
|
135ebb43cb | ||
|
|
f3d4cc30e9 | ||
|
|
ffd56fbcb5 | ||
|
|
ae125753e4 | ||
|
|
f536e0f24b | ||
|
|
51d7e4e762 | ||
|
|
08794f696f | ||
|
|
ffaaaacbca | ||
|
|
d54598dd85 | ||
|
|
97c79de27c | ||
|
|
79ec2ce20e | ||
|
|
b068c4e8a1 | ||
|
|
1be7f92adb | ||
|
|
d37acbdf1c | ||
|
|
af5ba963e7 | ||
|
|
c493315781 | ||
|
|
3922ecc98e | ||
|
|
9e2896e5c8 | ||
|
|
e1ee679c2e | ||
|
|
df485dc0d0 | ||
|
|
3f364be84b | ||
|
|
10e5b9303b | ||
|
|
2f073eb2e0 | ||
|
|
a6aa9b1ee8 | ||
|
|
50073cf24c | ||
|
|
f6aa390384 | ||
|
|
0398b1d65d | ||
|
|
1d2a5b31b1 | ||
|
|
7ac4c23700 | ||
|
|
3017f78d67 | ||
|
|
280132e34e | ||
|
|
2cdac55878 | ||
|
|
27dc7e21d9 | ||
|
|
78d50441dd | ||
|
|
ac0ac8241f | ||
|
|
8e00741dbd | ||
|
|
7cdc2f1e42 | ||
|
|
d6d3a0217e | ||
|
|
a3e7d24d21 | ||
|
|
98f026a6e4 | ||
|
|
7c7d8b16cb | ||
|
|
adaa20adcf | ||
|
|
d6538e2c55 | ||
|
|
bcdfb2cf30 | ||
|
|
c336585eec | ||
|
|
749692cc9f | ||
|
|
17732cec28 | ||
|
|
305b8c10f1 | ||
|
|
7b65ea1af9 | ||
|
|
1dd989e1bf | ||
|
|
314260fbd0 | ||
|
|
9abe166a30 | ||
|
|
ec6c9ccd7f | ||
|
|
72cdf4c9b3 | ||
|
|
72dd34b5dc | ||
|
|
26b8332978 | ||
|
|
3f1c6a14cb | ||
|
|
7ffdaf81b5 | ||
|
|
12234741d9 | ||
|
|
47765ba2b8 | ||
|
|
87202f787c | ||
|
|
ae8b97cf4b | ||
|
|
ce1a1ff40a | ||
|
|
c6d73ef67d | ||
|
|
d90895ac11 | ||
|
|
45bee2eea9 | ||
|
|
edc2c29006 | ||
|
|
98397babd3 | ||
|
|
d59ceba572 | ||
|
|
23d277e683 | ||
|
|
228de783a9 | ||
|
|
efba2b89f1 | ||
|
|
e8c504562f | ||
|
|
510d156fc5 | ||
|
|
04701dd94f | ||
|
|
eb38f734d2 | ||
|
|
d8d474af58 | ||
|
|
3ce369e687 | ||
|
|
30760ce7e5 | ||
|
|
8e193f384f | ||
|
|
6d693bb4fc | ||
|
|
c4d83d0a59 | ||
|
|
559fe022db | ||
|
|
7087444f7e | ||
|
|
e52d6dbca3 | ||
|
|
eb3a4aa9aa | ||
|
|
89966d5c0d | ||
|
|
d95e254418 | ||
|
|
fcd86df154 | ||
|
|
1dec68aa52 | ||
|
|
5a7823f599 | ||
|
|
1bb27b0cc6 | ||
|
|
409c9842c7 | ||
|
|
63d963a189 | ||
|
|
a492cb0f49 | ||
|
|
a1fffa9fd5 | ||
|
|
936895ee9d | ||
|
|
c19c1ca9be | ||
|
|
729d8f9158 | ||
|
|
d64af447da | ||
|
|
80810ca399 | ||
|
|
995612e2ab | ||
|
|
52f13e4930 | ||
|
|
cb0f56f978 | ||
|
|
5b7f1aab47 | ||
|
|
2b835535a9 | ||
|
|
ecab4dba7d | ||
|
|
9c40a88dbb | ||
|
|
11e59d47c0 | ||
|
|
fb46a9a6c6 | ||
|
|
4c0a2c5c3e | ||
|
|
be0872076f | ||
|
|
458ed37d80 | ||
|
|
d607e6c39d | ||
|
|
9e92b089c0 | ||
|
|
8f8ca6c952 | ||
|
|
f3ef286fee | ||
|
|
5451765210 | ||
|
|
791a21023f | ||
|
|
be4c1d33a7 | ||
|
|
b4fe51258d | ||
|
|
da8bed9bfd | ||
|
|
a0c3c734d7 | ||
|
|
cd34332fc4 | ||
|
|
cf1f0870d8 | ||
|
|
a9b832dd86 | ||
|
|
1c9143bd11 | ||
|
|
af563b6612 | ||
|
|
e7494fa996 | ||
|
|
5795d034f1 | ||
|
|
37f214d588 | ||
|
|
b5f788a51e | ||
|
|
d88de032d3 | ||
|
|
9bfa7bfcbd | ||
|
|
e43cab59ed | ||
|
|
634157786d | ||
|
|
a17e237f4a | ||
|
|
4882bf1b78 | ||
|
|
a0c79abb5d | ||
|
|
801e06d5a8 | ||
|
|
72a0c982c4 | ||
|
|
0709ee62f2 | ||
|
|
84a6b8590b | ||
|
|
3995f8eb97 | ||
|
|
fb882e1cbe | ||
|
|
aad0fe4b45 | ||
|
|
4debf1352d | ||
|
|
5d53c76bab | ||
|
|
07e632909b | ||
|
|
0c7571ef17 | ||
|
|
3fd528b939 | ||
|
|
f4c890fdbe | ||
|
|
0eee528340 | ||
|
|
3f2965162c | ||
|
|
616b488dbc | ||
|
|
38d679fdb5 | ||
|
|
652bbafac4 | ||
|
|
a497618a56 | ||
|
|
755c41bf1e | ||
|
|
cdf1e71425 | ||
|
|
1b68e0b5b9 | ||
|
|
8ad4b7acf4 | ||
|
|
3351164d4c | ||
|
|
53953cf736 | ||
|
|
c09ab26a49 | ||
|
|
e57fe6cc73 | ||
|
|
aa277f4ce2 | ||
|
|
79144b8a47 | ||
|
|
11cde40611 | ||
|
|
07cb3fd3d1 | ||
|
|
60a15c9b7b | ||
|
|
d5a07b9ec9 | ||
|
|
46c3e3d92a | ||
|
|
d1b15f03b8 | ||
|
|
147bc49159 | ||
|
|
4c61bdabd6 | ||
|
|
27d029c722 | ||
|
|
738f9e5a12 | ||
|
|
d66d3ce6dd | ||
|
|
75f11ad7ca | ||
|
|
b782f2e0f6 | ||
|
|
2083616e16 | ||
|
|
1b231e235b | ||
|
|
622ea7838d | ||
|
|
db98870d82 | ||
|
|
247e5b1632 | ||
|
|
bf0c00c6e8 | ||
|
|
fb9010ed40 | ||
|
|
89be8239db | ||
|
|
2726c66d5b | ||
|
|
5e4ff78a96 | ||
|
|
783ff666e0 | ||
|
|
bc29c5e0e1 | ||
|
|
06c0fba410 | ||
|
|
21422dd796 | ||
|
|
7e94145827 | ||
|
|
a091d18c61 | ||
|
|
e115e77131 | ||
|
|
2a6277d4f2 | ||
|
|
de87c35312 | ||
|
|
307f16e829 | ||
|
|
ca43a38c0f | ||
|
|
a79fa1ed13 | ||
|
|
272cd5dddb | ||
|
|
3156ba6ea6 | ||
|
|
45016e1a6b | ||
|
|
ed673c6a48 | ||
|
|
2136a764e5 | ||
|
|
44174280e5 | ||
|
|
223d09f6b5 | ||
|
|
b4a2ab728b | ||
|
|
fcc228b31e | ||
|
|
85f3749fd2 | ||
|
|
0371a69143 | ||
|
|
89aea7b0ef | ||
|
|
fbfe0e6a88 | ||
|
|
ae920857a7 | ||
|
|
ccba72313c | ||
|
|
86e7822245 | ||
|
|
4f63da7e98 | ||
|
|
f40dc1e275 | ||
|
|
9b5801d640 | ||
|
|
167b96c2ad | ||
|
|
6147ee3451 | ||
|
|
e1ea357c67 | ||
|
|
bbfa03228a | ||
|
|
48115f4a69 | ||
|
|
1475671a66 | ||
|
|
e9f2ef9429 | ||
|
|
c4684a42c8 | ||
|
|
39a7c7e167 | ||
|
|
00ded55423 | ||
|
|
2b37dc19c5 | ||
|
|
3976f6a846 | ||
|
|
a2115c88f3 | ||
|
|
9b64e79868 | ||
|
|
7c4eef7a75 | ||
|
|
3806d8a9f6 | ||
|
|
65d7ddc4eb | ||
|
|
d604ea3355 | ||
|
|
66242c8007 | ||
|
|
21802234df | ||
|
|
134d79dca7 | ||
|
|
2690830ea0 | ||
|
|
28d00598b3 | ||
|
|
934d4f8d8c | ||
|
|
7bf5436263 | ||
|
|
cdb5168095 | ||
|
|
b540eb2bee | ||
|
|
07818da861 | ||
|
|
3766781218 | ||
|
|
6768c790de | ||
|
|
064f8bf6f8 | ||
|
|
74697a5713 | ||
|
|
e87d60c93b | ||
|
|
a181ac202f | ||
|
|
e685e57bbd | ||
|
|
13971833d8 | ||
|
|
8f17924e73 | ||
|
|
f0261a7246 | ||
|
|
91233253ec | ||
|
|
f85afd4e46 | ||
|
|
10434f3c24 | ||
|
|
e442cc0d9d | ||
|
|
704d25e2a3 | ||
|
|
f0a56ab0c3 | ||
|
|
f7a11f8c8e | ||
|
|
fe8aa971c4 | ||
|
|
a20cd16ca0 | ||
|
|
aee3892569 | ||
|
|
d6d2b6ae8f | ||
|
|
27476f7368 | ||
|
|
1bd1d102fd | ||
|
|
73974df1f9 | ||
|
|
e90c1d2a19 | ||
|
|
9841339c74 | ||
|
|
1d61ebaca1 | ||
|
|
5e0201eaa1 | ||
|
|
c5342938e2 | ||
|
|
5b95b795cc | ||
|
|
f19d58d551 | ||
|
|
302aa842e9 | ||
|
|
4658cb18f1 | ||
|
|
d443da9d54 | ||
|
|
9b94d7f91e | ||
|
|
ef3ab00998 | ||
|
|
a61ddc4715 | ||
|
|
d676ebcf25 | ||
|
|
d57bf68500 | ||
|
|
fa3e4baf13 | ||
|
|
9b7e522ae9 | ||
|
|
a439ecef10 | ||
|
|
f35c265988 | ||
|
|
b714136483 | ||
|
|
f036b31cde | ||
|
|
2131a664df | ||
|
|
275abf24e1 | ||
|
|
c756f74260 | ||
|
|
24df4c19d9 | ||
|
|
a0b4c98b8a | ||
|
|
1949cd9c5c | ||
|
|
4cd056a7c1 | ||
|
|
5fd11f0971 | ||
|
|
1c8515f9ab | ||
|
|
6782163029 | ||
|
|
69941f0586 | ||
|
|
47f631042b | ||
|
|
ad1fa80802 | ||
|
|
5c15428b75 | ||
|
|
25a37c8cb1 | ||
|
|
df9cbfc2bf | ||
|
|
e8b04eb349 | ||
|
|
f1415824cc | ||
|
|
ce44c50e9b | ||
|
|
def6fb9bd8 | ||
|
|
83b1f35395 | ||
|
|
7cc391bd39 | ||
|
|
09884325fc | ||
|
|
7a903311aa | ||
|
|
0661ec3993 | ||
|
|
ddc8c2e3ab | ||
|
|
e1811a014b | ||
|
|
93ccaed869 | ||
|
|
d391a34510 | ||
|
|
e1393d82b3 | ||
|
|
5427610e6b | ||
|
|
1ccd74daf9 | ||
|
|
b9b3ccd9ea | ||
|
|
f85d901fcb | ||
|
|
483249fc1a | ||
|
|
75d684d9f7 | ||
|
|
5bb0807e96 | ||
|
|
96db102a93 | ||
|
|
8dc9904630 | ||
|
|
37f6a9770c | ||
|
|
60edeacfb7 | ||
|
|
e918362128 | ||
|
|
2ebcd5f5fd | ||
|
|
5e014a0c44 | ||
|
|
a9221a9508 | ||
|
|
e0f83017f5 | ||
|
|
36e2955a64 | ||
|
|
76e1c2debf | ||
|
|
2f90df854e | ||
|
|
2348eaee20 | ||
|
|
74b31181b3 | ||
|
|
4f3ac40926 | ||
|
|
f0599ea919 | ||
|
|
0c5d3e1ccd | ||
|
|
7a3ac80489 | ||
|
|
ab20a9a95a | ||
|
|
a3a7f8791c | ||
|
|
fdb7dadb6e | ||
|
|
4a0253b82b | ||
|
|
a77aa9d600 | ||
|
|
1b9315eb77 | ||
|
|
51c0a521a9 | ||
|
|
866592d872 | ||
|
|
172d3acb55 | ||
|
|
556921dc4e | ||
|
|
ba7ce6a0b7 | ||
|
|
23e4b7d824 | ||
|
|
0ba1a6f33c | ||
|
|
17023320be | ||
|
|
4486e1be1f | ||
|
|
269e82009d | ||
|
|
d57eb7b9b3 | ||
|
|
b5a4a47df5 | ||
|
|
6e58e01afa | ||
|
|
86de7616de | ||
|
|
22aed133d8 | ||
|
|
dd85fc6b89 | ||
|
|
77cff60663 | ||
|
|
9c3d0b59c4 | ||
|
|
a14e57f9f7 | ||
|
|
45fcbf3b7a | ||
|
|
0c0d686fe5 | ||
|
|
76f78a96ce | ||
|
|
9cce9de16f | ||
|
|
10534c0bb1 | ||
|
|
26197023a7 | ||
|
|
b2bc50e4ca | ||
|
|
9dea50fc65 | ||
|
|
90a53a3aed | ||
|
|
572d746108 | ||
|
|
a4c970041c | ||
|
|
ae8f576913 | ||
|
|
964688d8ec | ||
|
|
60df2e7d97 | ||
|
|
6e31e94063 | ||
|
|
45c94d784d | ||
|
|
d2682f231a | ||
|
|
07d4b94c3b | ||
|
|
ec6e0a192c | ||
|
|
014b0d064e | ||
|
|
1fa609b166 | ||
|
|
0b862e2069 | ||
|
|
c8c0e54c70 | ||
|
|
284b4c8866 | ||
|
|
7d5af6fa6b | ||
|
|
077968ca5e | ||
|
|
5aeeab1454 | ||
|
|
086c94af90 | ||
|
|
5d47c8a0d2 | ||
|
|
186005466d | ||
|
|
eb254be6df | ||
|
|
a419c3b116 | ||
|
|
0616b8382d | ||
|
|
2d0294308d | ||
|
|
0190e1faf8 | ||
|
|
e166644c53 | ||
|
|
2819545569 | ||
|
|
77cd51c3de | ||
|
|
af2fd9613a | ||
|
|
236ef8a966 | ||
|
|
a3daed0276 | ||
|
|
9f6af110ff | ||
|
|
0b26605d52 | ||
|
|
7183e38bec | ||
|
|
1e2c86ca5c | ||
|
|
1e8abce5e8 | ||
|
|
9fea1a5d62 | ||
|
|
a6f989f3db | ||
|
|
7fb233050c | ||
|
|
93840b31b9 | ||
|
|
455fadaa6a | ||
|
|
503f414edd | ||
|
|
2e4f15693a | ||
|
|
0ce742cf09 | ||
|
|
7c235f0914 | ||
|
|
17aa2bec08 | ||
|
|
68317b6d3f | ||
|
|
7c395bf3a1 | ||
|
|
c21b68f7dd | ||
|
|
3ef01ce5e3 | ||
|
|
4c2d8a30f6 | ||
|
|
2d996ed1c4 | ||
|
|
6627a4b049 | ||
|
|
0045dee3f4 | ||
|
|
d04d2fb520 | ||
|
|
eaac466a40 | ||
|
|
a98404cd24 | ||
|
|
91f491639e | ||
|
|
761a9d2b1f | ||
|
|
a65c6e1446 | ||
|
|
0f66a9f39d | ||
|
|
5b626e7f84 | ||
|
|
ec3e670f9f | ||
|
|
d426c97e9a | ||
|
|
389c55270a | ||
|
|
18ba9da6b9 | ||
|
|
d098a3572c | ||
|
|
c23bbc11ea | ||
|
|
2e39ec8448 | ||
|
|
7cb86a4c28 | ||
|
|
5454a9276b | ||
|
|
6b5286d112 | ||
|
|
0940bcf7f5 | ||
|
|
a19fb96bd0 | ||
|
|
28468136d0 | ||
|
|
46c6b9c0ec | ||
|
|
b31ba28885 | ||
|
|
c596875e23 | ||
|
|
ca8a9e603a | ||
|
|
c399c2de41 | ||
|
|
ea9a4296a2 | ||
|
|
7682a175b6 | ||
|
|
066f302c6c | ||
|
|
2c738dd87a | ||
|
|
ebb206a33d | ||
|
|
1cf27c6349 | ||
|
|
bfa2e032ef | ||
|
|
b661e6759e | ||
|
|
2bbf461836 | ||
|
|
f42b1601d6 | ||
|
|
e6a5dc94a4 | ||
|
|
fcd4694c3e | ||
|
|
a0250ba3e5 | ||
|
|
a097c93d4f | ||
|
|
93c95e18f4 | ||
|
|
90bb2919de | ||
|
|
8ec2b48446 | ||
|
|
a0378c28b8 | ||
|
|
4c28d606dd | ||
|
|
2f7c2af547 | ||
|
|
83802b0bd9 | ||
|
|
fade627a81 | ||
|
|
e9e3e3abaf | ||
|
|
56d8adc0c0 | ||
|
|
ef25e6386d | ||
|
|
483c6690e9 | ||
|
|
1235650ffb | ||
|
|
b730516c98 | ||
|
|
e91a9dfcc3 | ||
|
|
1afc06c2d8 | ||
|
|
922dc97681 | ||
|
|
3ab72185cb | ||
|
|
d559219f40 | ||
|
|
228b910aea | ||
|
|
9ab6ee851e | ||
|
|
2b98cb1f84 | ||
|
|
83b1bfaac9 | ||
|
|
83413d6d2d | ||
|
|
35809fe3d7 | ||
|
|
d80d1aba10 | ||
|
|
7be110e30d | ||
|
|
b9b32d5c4f | ||
|
|
6f349458f6 | ||
|
|
feeb816597 | ||
|
|
cb421e53cb | ||
|
|
a16d3c04d7 | ||
|
|
11235b74ce | ||
|
|
33bbfe4b23 | ||
|
|
0b1c443719 | ||
|
|
aa3981f2c6 | ||
|
|
2f85113366 | ||
|
|
b70ababc14 | ||
|
|
2618484fed | ||
|
|
881eba2c0d | ||
|
|
a9775f1f58 | ||
|
|
791b24c405 | ||
|
|
9bbd7ba3ea | ||
|
|
904ec517d3 | ||
|
|
2ef1f50a94 | ||
|
|
1a9469d7cb | ||
|
|
533c7161fc | ||
|
|
63dcfc151b | ||
|
|
fbb90f7f2b | ||
|
|
2f435842c5 | ||
|
|
24126cdde8 | ||
|
|
543f08a676 | ||
|
|
d87a962086 | ||
|
|
7e9a386e10 | ||
|
|
1044a386f0 | ||
|
|
ed75793627 | ||
|
|
aa6d970619 | ||
|
|
de3131e784 | ||
|
|
da4a658da4 | ||
|
|
aa8fb7a016 | ||
|
|
11d737b409 | ||
|
|
e951f847fa | ||
|
|
b387781ceb | ||
|
|
d84b1219a5 | ||
|
|
7a4b8f2770 | ||
|
|
765e386bfa | ||
|
|
da4b7ffc78 |
1396
contrib/include/wx/stc/stc.h
Normal file
1396
contrib/include/wx/stc/stc.h
Normal file
File diff suppressed because it is too large
Load Diff
56
contrib/src/stc/Makefile.in
Normal file
56
contrib/src/stc/Makefile.in
Normal file
@@ -0,0 +1,56 @@
|
||||
###############################################################################
|
||||
# Purpose: Makefile.in for STC contrib for Unix with autoconf
|
||||
# Created: 14.03.00
|
||||
# Author: VZ
|
||||
# Version: $Id$
|
||||
###############################################################################
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
|
||||
scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla
|
||||
libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src
|
||||
|
||||
TARGET_LIBNAME=libstc
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||
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 \
|
||||
Editor.o \
|
||||
Indicator.o \
|
||||
KeyMap.o \
|
||||
KeyWords.o \
|
||||
LineMarker.o \
|
||||
PropSet.o \
|
||||
ScintillaBase.o \
|
||||
Style.o \
|
||||
ViewStyle.o \
|
||||
PosRegExp.o \
|
||||
|
||||
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
712
contrib/src/stc/PlatWX.cpp
Normal file
712
contrib/src/stc/PlatWX.cpp
Normal file
@@ -0,0 +1,712 @@
|
||||
// Scintilla source code edit control
|
||||
// PlatWX.cxx - implementation of platform facilities on wxWindows
|
||||
// Copyright 1998-1999 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Robin Dunn <robin@aldunn.com>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
#include "wx/stc/stc.h"
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
Point Point::FromLong(long lpoint) {
|
||||
return Point(lpoint & 0xFFFF, lpoint >> 16);
|
||||
}
|
||||
|
||||
wxRect wxRectFromPRectangle(PRectangle prc) {
|
||||
wxRect rc(prc.left, prc.top,
|
||||
prc.right-prc.left, prc.bottom-prc.top);
|
||||
return rc;
|
||||
}
|
||||
|
||||
PRectangle PRectangleFromwxRect(wxRect rc) {
|
||||
return PRectangle(rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom());
|
||||
}
|
||||
|
||||
Colour::Colour(long lcol) {
|
||||
co.Set(lcol & 0xff, (lcol >> 8) & 0xff, (lcol >> 16) & 0xff);
|
||||
}
|
||||
|
||||
Colour::Colour(unsigned int red, unsigned int green, unsigned int blue) {
|
||||
co.Set(red, green, blue);
|
||||
}
|
||||
|
||||
bool Colour::operator==(const Colour &other) const {
|
||||
return co == other.co;
|
||||
}
|
||||
|
||||
long Colour::AsLong() const {
|
||||
return (((long)co.Blue() << 16) |
|
||||
((long)co.Green() << 8) |
|
||||
((long)co.Red()));
|
||||
}
|
||||
|
||||
unsigned int Colour::GetRed() {
|
||||
return co.Red();
|
||||
}
|
||||
|
||||
unsigned int Colour::GetGreen() {
|
||||
return co.Green();
|
||||
}
|
||||
|
||||
unsigned int Colour::GetBlue() {
|
||||
return co.Blue();
|
||||
}
|
||||
|
||||
Palette::Palette() {
|
||||
used = 0;
|
||||
allowRealization = false;
|
||||
}
|
||||
|
||||
Palette::~Palette() {
|
||||
Release();
|
||||
}
|
||||
|
||||
void Palette::Release() {
|
||||
used = 0;
|
||||
}
|
||||
|
||||
// This method either adds a colour to the list of wanted colours (want==true)
|
||||
// or retrieves the allocated colour back to the ColourPair.
|
||||
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
|
||||
void Palette::WantFind(ColourPair &cp, bool want) {
|
||||
if (want) {
|
||||
for (int i=0; i < used; i++) {
|
||||
if (entries[i].desired == cp.desired)
|
||||
return;
|
||||
}
|
||||
|
||||
if (used < numEntries) {
|
||||
entries[used].desired = cp.desired;
|
||||
entries[used].allocated = cp.desired;
|
||||
used++;
|
||||
}
|
||||
} else {
|
||||
for (int i=0; i < used; i++) {
|
||||
if (entries[i].desired == cp.desired) {
|
||||
cp.allocated = entries[i].allocated;
|
||||
return;
|
||||
}
|
||||
}
|
||||
cp.allocated = cp.desired;
|
||||
}
|
||||
}
|
||||
|
||||
void Palette::Allocate(Window &) {
|
||||
if (allowRealization) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Font::Font() {
|
||||
id = 0;
|
||||
ascent = 0;
|
||||
}
|
||||
|
||||
Font::~Font() {
|
||||
}
|
||||
|
||||
void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) {
|
||||
Release();
|
||||
id = new wxFont(size,
|
||||
wxDEFAULT,
|
||||
italic ? wxITALIC : wxNORMAL,
|
||||
bold ? wxBOLD : wxNORMAL,
|
||||
false,
|
||||
faceName,
|
||||
wxFONTENCODING_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
void Font::Release() {
|
||||
if (id)
|
||||
delete id;
|
||||
id = 0;
|
||||
}
|
||||
|
||||
|
||||
Surface::Surface() :
|
||||
hdc(0), hdcOwned(0), bitmap(0),
|
||||
x(0), y(0) {
|
||||
}
|
||||
|
||||
Surface::~Surface() {
|
||||
Release();
|
||||
}
|
||||
|
||||
void Surface::Release() {
|
||||
if (bitmap) {
|
||||
((wxMemoryDC*)hdc)->SelectObject(wxNullBitmap);
|
||||
delete bitmap;
|
||||
bitmap = 0;
|
||||
}
|
||||
if (hdcOwned) {
|
||||
delete hdc;
|
||||
hdc = 0;
|
||||
hdcOwned = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Surface::Initialised() {
|
||||
return hdc != 0;
|
||||
}
|
||||
|
||||
void Surface::Init() {
|
||||
Release();
|
||||
hdc = new wxMemoryDC();
|
||||
hdcOwned = true;
|
||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||
}
|
||||
|
||||
void Surface::Init(SurfaceID hdc_) {
|
||||
Release();
|
||||
hdc = hdc_;
|
||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||
}
|
||||
|
||||
void Surface::InitPixMap(int width, int height, Surface *surface_) {
|
||||
Release();
|
||||
hdc = new wxMemoryDC(surface_->hdc);
|
||||
hdcOwned = true;
|
||||
bitmap = new wxBitmap(width, height);
|
||||
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||
}
|
||||
|
||||
void Surface::PenColour(Colour fore) {
|
||||
hdc->SetPen(wxPen(fore.co, 1, wxSOLID));
|
||||
}
|
||||
|
||||
void Surface::BrushColor(Colour back) {
|
||||
hdc->SetBrush(wxBrush(back.co, wxSOLID));
|
||||
}
|
||||
|
||||
void Surface::SetFont(Font &font_) {
|
||||
if (font_.GetID()) {
|
||||
hdc->SetFont(*font_.GetID());
|
||||
}
|
||||
}
|
||||
|
||||
int Surface::LogPixelsY() {
|
||||
return hdc->GetPPI().y;
|
||||
}
|
||||
|
||||
|
||||
int Surface::DeviceHeightFont(int points) {
|
||||
return points * LogPixelsY() / 72;
|
||||
}
|
||||
|
||||
|
||||
void Surface::MoveTo(int x_, int y_) {
|
||||
x = x_;
|
||||
y = y_;
|
||||
}
|
||||
|
||||
void Surface::LineTo(int x_, int y_) {
|
||||
hdc->DrawLine(x,y, x_,y_);
|
||||
x = x_;
|
||||
y = y_;
|
||||
}
|
||||
|
||||
void Surface::Polygon(Point *pts, int npts, Colour fore,
|
||||
Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawPolygon(npts, (wxPoint*)pts);
|
||||
}
|
||||
|
||||
void Surface::RectangleDraw(PRectangle rc, Colour fore, Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawRectangle(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::FillRectangle(PRectangle rc, Colour back) {
|
||||
BrushColor(back);
|
||||
hdc->SetPen(*wxTRANSPARENT_PEN);
|
||||
hdc->DrawRectangle(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::FillRectangle(PRectangle rc, Surface &surfacePattern) {
|
||||
wxBrush br;
|
||||
if (surfacePattern.bitmap)
|
||||
br = wxBrush(*surfacePattern.bitmap);
|
||||
else // Something is wrong so display in red
|
||||
br = wxBrush(*wxRED, wxSOLID);
|
||||
hdc->SetPen(*wxTRANSPARENT_PEN);
|
||||
hdc->SetBrush(br);
|
||||
hdc->DrawRectangle(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4);
|
||||
}
|
||||
|
||||
void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawEllipse(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) {
|
||||
wxRect r = wxRectFromPRectangle(rc);
|
||||
hdc->Blit(r.x, r.y, r.width, r.height,
|
||||
surfaceSource.hdc, from.x, from.y, wxCOPY);
|
||||
}
|
||||
|
||||
void Surface::DrawText(PRectangle rc, Font &font, int ybase,
|
||||
const char *s, int len, Colour fore, Colour back) {
|
||||
SetFont(font);
|
||||
hdc->SetTextForeground(fore.co);
|
||||
hdc->SetTextBackground(back.co);
|
||||
FillRectangle(rc, back);
|
||||
|
||||
// ybase is where the baseline should be, but wxWin uses the upper left
|
||||
// corner, so I need to calculate the real position for the text...
|
||||
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
|
||||
}
|
||||
|
||||
void Surface::DrawTextClipped(PRectangle rc, Font &font, int ybase, const char *s, int len, Colour fore, Colour back) {
|
||||
SetFont(font);
|
||||
hdc->SetTextForeground(fore.co);
|
||||
hdc->SetTextBackground(back.co);
|
||||
FillRectangle(rc, back);
|
||||
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
|
||||
|
||||
// see comments above
|
||||
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
|
||||
hdc->DestroyClippingRegion();
|
||||
}
|
||||
|
||||
int Surface::WidthText(Font &font, const char *s, int len) {
|
||||
SetFont(font);
|
||||
int w;
|
||||
int h;
|
||||
hdc->GetTextExtent(wxString(s, len), &w, &h);
|
||||
return w;
|
||||
}
|
||||
|
||||
void Surface::MeasureWidths(Font &font, const char *s, int len, int *positions) {
|
||||
SetFont(font);
|
||||
int totalWidth = 0;
|
||||
for (int i=0; i<len; i++) {
|
||||
int w;
|
||||
int h;
|
||||
hdc->GetTextExtent(s[i], &w, &h);
|
||||
totalWidth += w;
|
||||
positions[i] = totalWidth;
|
||||
}
|
||||
}
|
||||
|
||||
int Surface::WidthChar(Font &font, char ch) {
|
||||
SetFont(font);
|
||||
int w;
|
||||
int h;
|
||||
hdc->GetTextExtent(ch, &w, &h);
|
||||
return w;
|
||||
}
|
||||
|
||||
#define EXTENT_TEST " `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
int Surface::Ascent(Font &font) {
|
||||
SetFont(font);
|
||||
int w, h, d, e;
|
||||
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
|
||||
font.ascent = h - d;
|
||||
return font.ascent;
|
||||
}
|
||||
|
||||
int Surface::Descent(Font &font) {
|
||||
SetFont(font);
|
||||
int w, h, d, e;
|
||||
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
|
||||
return d;
|
||||
}
|
||||
|
||||
int Surface::InternalLeading(Font &font) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Surface::ExternalLeading(Font &font) {
|
||||
SetFont(font);
|
||||
int w, h, d, e;
|
||||
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
|
||||
return e;
|
||||
}
|
||||
|
||||
int Surface::Height(Font &font) {
|
||||
SetFont(font);
|
||||
return hdc->GetCharHeight();
|
||||
}
|
||||
|
||||
int Surface::AverageCharWidth(Font &font) {
|
||||
SetFont(font);
|
||||
return hdc->GetCharWidth();
|
||||
}
|
||||
|
||||
int Surface::SetPalette(Palette *pal, bool inBackGround) {
|
||||
return 0; // **** figure out what to do with palettes...
|
||||
}
|
||||
|
||||
void Surface::SetClip(PRectangle rc) {
|
||||
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::FlushCachedState() {
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
}
|
||||
|
||||
void Window::Destroy() {
|
||||
if (id)
|
||||
id->Destroy();
|
||||
id = 0;
|
||||
}
|
||||
|
||||
bool Window::HasFocus() {
|
||||
return wxWindow::FindFocus() == id;
|
||||
}
|
||||
|
||||
PRectangle Window::GetPosition() {
|
||||
wxRect rc(id->GetPosition(), id->GetSize());
|
||||
return PRectangleFromwxRect(rc);
|
||||
}
|
||||
|
||||
void Window::SetPosition(PRectangle rc) {
|
||||
wxRect r = wxRectFromPRectangle(rc);
|
||||
id->SetSize(r);
|
||||
}
|
||||
|
||||
void Window::SetPositionRelative(PRectangle rc, Window) {
|
||||
SetPosition(rc); // ????
|
||||
}
|
||||
|
||||
PRectangle Window::GetClientPosition() {
|
||||
wxSize sz = id->GetClientSize();
|
||||
return PRectangle(0, 0, sz.x, sz.y);
|
||||
}
|
||||
|
||||
void Window::Show(bool show) {
|
||||
id->Show(show);
|
||||
}
|
||||
|
||||
void Window::InvalidateAll() {
|
||||
id->Refresh(false);
|
||||
}
|
||||
|
||||
void Window::InvalidateRectangle(PRectangle rc) {
|
||||
wxRect r = wxRectFromPRectangle(rc);
|
||||
id->Refresh(false, &r);
|
||||
}
|
||||
|
||||
void Window::SetFont(Font &font) {
|
||||
id->SetFont(*font.GetID());
|
||||
}
|
||||
|
||||
void Window::SetCursor(Cursor curs) {
|
||||
int cursorId;
|
||||
|
||||
switch (curs) {
|
||||
case cursorText:
|
||||
cursorId = wxCURSOR_IBEAM;
|
||||
break;
|
||||
case cursorArrow:
|
||||
cursorId = wxCURSOR_ARROW;
|
||||
break;
|
||||
case cursorUp:
|
||||
cursorId = wxCURSOR_ARROW; // ** no up arrow... wxCURSOR_UPARROW;
|
||||
break;
|
||||
case cursorWait:
|
||||
cursorId = wxCURSOR_WAIT;
|
||||
break;
|
||||
case cursorHoriz:
|
||||
cursorId = wxCURSOR_SIZEWE;
|
||||
break;
|
||||
case cursorVert:
|
||||
cursorId = wxCURSOR_SIZENS;
|
||||
break;
|
||||
case cursorReverseArrow:
|
||||
cursorId = wxCURSOR_POINT_RIGHT;
|
||||
break;
|
||||
default:
|
||||
cursorId = wxCURSOR_ARROW;
|
||||
break;
|
||||
}
|
||||
|
||||
id->SetCursor(wxCursor(cursorId));
|
||||
}
|
||||
|
||||
|
||||
void Window::SetTitle(const char *s) {
|
||||
id->SetTitle(s);
|
||||
}
|
||||
|
||||
|
||||
class wxSTCListBox : public wxListBox {
|
||||
public:
|
||||
wxSTCListBox(wxWindow* parent, wxWindowID id)
|
||||
: wxListBox(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER)
|
||||
{}
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
GetParent()->SetFocus();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
void DoSetFirstItem(int n);
|
||||
#endif
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox)
|
||||
EVT_SET_FOCUS(wxSTCListBox::OnFocus)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
// This can be removed after 2.2.2 I think
|
||||
void wxSTCListBox::DoSetFirstItem( int n )
|
||||
{
|
||||
wxCHECK_RET( m_list, wxT("invalid listbox") );
|
||||
|
||||
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list))
|
||||
return;
|
||||
|
||||
// terribly efficient
|
||||
const gchar *vadjustment_key = "gtk-vadjustment";
|
||||
guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
|
||||
|
||||
GtkAdjustment *adjustment =
|
||||
(GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id);
|
||||
wxCHECK_RET( adjustment, wxT("invalid listbox code") );
|
||||
|
||||
GList *target = g_list_nth( m_list->children, n );
|
||||
wxCHECK_RET( target, wxT("invalid listbox index") );
|
||||
|
||||
GtkWidget *item = GTK_WIDGET(target->data);
|
||||
wxCHECK_RET( item, wxT("invalid listbox code") );
|
||||
|
||||
// find the last item before this one which is already realized
|
||||
size_t nItemsBefore;
|
||||
for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ )
|
||||
{
|
||||
target = target->prev;
|
||||
if ( !target )
|
||||
{
|
||||
// nothing we can do if there are no allocated items yet
|
||||
return;
|
||||
}
|
||||
|
||||
item = GTK_WIDGET(target->data);
|
||||
}
|
||||
|
||||
gtk_adjustment_set_value(adjustment,
|
||||
item->allocation.y +
|
||||
nItemsBefore*item->allocation.height);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ListBox::ListBox() {
|
||||
}
|
||||
|
||||
ListBox::~ListBox() {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
PRectangle ListBox::GetDesiredRect() {
|
||||
wxSize sz = ((wxListBox*)id)->GetBestSize();
|
||||
PRectangle rc;
|
||||
rc.top = 0;
|
||||
rc.left = 0;
|
||||
if (sz.x > 150) // TODO: A better way to determine these max sizes
|
||||
sz.x = 150;
|
||||
if (sz.y > 100)
|
||||
sz.y = 100;
|
||||
rc.right = sz.x;
|
||||
rc.bottom = sz.y;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void ListBox::SetAverageCharWidth(int width) {
|
||||
aveCharWidth = width;
|
||||
}
|
||||
|
||||
void ListBox::SetFont(Font &font) {
|
||||
Window::SetFont(font);
|
||||
}
|
||||
|
||||
void ListBox::Clear() {
|
||||
((wxListBox*)id)->Clear();
|
||||
}
|
||||
|
||||
void ListBox::Append(char *s) {
|
||||
((wxListBox*)id)->Append(s);
|
||||
}
|
||||
|
||||
int ListBox::Length() {
|
||||
return ((wxListBox*)id)->Number();
|
||||
}
|
||||
|
||||
void ListBox::Select(int n) {
|
||||
((wxListBox*)id)->SetSelection(n);
|
||||
#ifdef __WXGTK__
|
||||
if (n > 4)
|
||||
n = n - 4;
|
||||
else
|
||||
n = 1;
|
||||
((wxListBox*)id)->SetFirstItem(n);
|
||||
#endif
|
||||
}
|
||||
|
||||
int ListBox::GetSelection() {
|
||||
return ((wxListBox*)id)->GetSelection();
|
||||
}
|
||||
|
||||
int ListBox::Find(const char *prefix) {
|
||||
if (prefix) {
|
||||
for (int x=0; x < ((wxListBox*)id)->Number(); x++) {
|
||||
wxString text = ((wxListBox*)id)->GetString(x);
|
||||
if (text.StartsWith(prefix))
|
||||
return x;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ListBox::GetValue(int n, char *value, int len) {
|
||||
wxString text = ((wxListBox*)id)->GetString(n);
|
||||
strncpy(value, text.c_str(), len);
|
||||
value[len-1] = '\0';
|
||||
}
|
||||
|
||||
void ListBox::Sort() {
|
||||
// wxWindows keeps sorted so no need to sort
|
||||
}
|
||||
|
||||
|
||||
Menu::Menu() : id(0) {
|
||||
}
|
||||
|
||||
void Menu::CreatePopUp() {
|
||||
Destroy();
|
||||
id = new wxMenu();
|
||||
}
|
||||
|
||||
void Menu::Destroy() {
|
||||
if (id)
|
||||
delete id;
|
||||
id = 0;
|
||||
}
|
||||
|
||||
void Menu::Show(Point pt, Window &w) {
|
||||
w.GetID()->PopupMenu(id, pt.x - 4, pt.y);
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
Colour Platform::Chrome() {
|
||||
wxColour c;
|
||||
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
|
||||
return Colour(c.Red(), c.Green(), c.Blue());
|
||||
}
|
||||
|
||||
Colour Platform::ChromeHighlight() {
|
||||
wxColour c;
|
||||
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT);
|
||||
return Colour(c.Red(), c.Green(), c.Blue());
|
||||
}
|
||||
|
||||
const char *Platform::DefaultFont() {
|
||||
return wxNORMAL_FONT->GetFaceName();
|
||||
}
|
||||
|
||||
int Platform::DefaultFontSize() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
unsigned int Platform::DoubleClickTime() {
|
||||
return 500; // **** ::GetDoubleClickTime();
|
||||
}
|
||||
|
||||
void Platform::DebugDisplay(const char *s) {
|
||||
wxLogDebug(s);
|
||||
}
|
||||
|
||||
bool Platform::IsKeyDown(int key) {
|
||||
return false; // I don't think we'll need this.
|
||||
}
|
||||
|
||||
long Platform::SendScintilla(WindowID w,
|
||||
unsigned int msg,
|
||||
unsigned long wParam,
|
||||
long lParam) {
|
||||
|
||||
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
|
||||
return stc->SendMsg(msg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
// These are utility functions not really tied to a platform
|
||||
|
||||
int Platform::Minimum(int a, int b) {
|
||||
if (a < b)
|
||||
return a;
|
||||
else
|
||||
return b;
|
||||
}
|
||||
|
||||
int Platform::Maximum(int a, int b) {
|
||||
if (a > b)
|
||||
return a;
|
||||
else
|
||||
return b;
|
||||
}
|
||||
|
||||
#define TRACE
|
||||
|
||||
void Platform::DebugPrintf(const char *format, ...) {
|
||||
#ifdef TRACE
|
||||
char buffer[2000];
|
||||
va_list pArguments;
|
||||
va_start(pArguments, format);
|
||||
vsprintf(buffer,format,pArguments);
|
||||
va_end(pArguments);
|
||||
Platform::DebugDisplay(buffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
int Platform::Clamp(int val, int minVal, int maxVal) {
|
||||
if (val > maxVal)
|
||||
val = maxVal;
|
||||
if (val < minVal)
|
||||
val = minVal;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
47
contrib/src/stc/README.txt
Normal file
47
contrib/src/stc/README.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
This contrib is the wxStyledTextCtrl, which is a wrapper around the
|
||||
Scintilla edit control. (See www.scintilla.org)
|
||||
|
||||
There is still VERY MUCH to be done, most notable of which is a more
|
||||
advanced sample that exercises more of the code. (I havn't tested
|
||||
AutoComplete or CallTips, or most of the event types at all yet.) And
|
||||
also documentation, adding wrappers for some new scintilla
|
||||
functionality, building and testing on wxGTK, etc. Be patient, it all
|
||||
will get there soon.
|
||||
|
||||
|
||||
|
||||
Let me describe a bit about the architecture I am implementing...
|
||||
Obviously there is the Platform layer which implements the varioius
|
||||
platform classes by using wxWindows classes and filling in where
|
||||
needed. Then there is a ScintillaWX class that is derived from
|
||||
ScintillaBase and implements the necessary virtual methods that
|
||||
Scintilla needs to fully funciton. This class however is not meant to
|
||||
ever be used directly by wx programmers. I call it one end of the
|
||||
bridge between the wx and Scintilla worlds. The other end of the
|
||||
bridge is a class called wxStyledTextCtrl that looks, feels and acts
|
||||
like other classes in wxWindows. Here is a diagram:
|
||||
|
||||
|
||||
+------------------+ +-------------------+
|
||||
| wxStyledTextCtrl |--bridge--| ScintillaWX |
|
||||
+------------------+ +-------------------+
|
||||
| ScintillaBase |
|
||||
+-------------------+
|
||||
| Editor |
|
||||
+-------------------+
|
||||
| PlatWX |
|
||||
+-------------------+
|
||||
|
||||
|
||||
wxStyledTextCtrl derives from wxControl so it has a window that can be
|
||||
drawn upon. When a wxStyledTextCtrl is constructed it constructs a
|
||||
ScintillaWX for itself and passes itself to the scintilla object to be
|
||||
set as the wMain and wDraw attributes. All method calls on the STC
|
||||
are sent over the bridge in the form of calls to ScintiallWX::WndProc.
|
||||
All notifications are sent back over the bridge and turned into
|
||||
wxEvents.
|
||||
|
||||
|
||||
Robin
|
||||
|
||||
|
||||
515
contrib/src/stc/ScintillaWX.cpp
Normal file
515
contrib/src/stc/ScintillaWX.cpp
Normal file
@@ -0,0 +1,515 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: ScintillaWX.cxx
|
||||
// Purpose: A wxWindows implementation of Scintilla. A class derived
|
||||
// from ScintillaBase that uses the "wx platform" defined in
|
||||
// PlatformWX.cxx This class is one end of a bridge between
|
||||
// the wx world and the Scintilla world. It needs a peer
|
||||
// object of type wxStyledTextCtrl to function.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "ScintillaWX.h"
|
||||
#include "wx/stc/stc.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const int H_SCROLL_MAX = 2000;
|
||||
const int H_SCROLL_STEP = 20;
|
||||
const int H_SCROLL_PAGE = 200;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Helper classes
|
||||
|
||||
class wxSTCTimer : public wxTimer {
|
||||
public:
|
||||
wxSTCTimer(ScintillaWX* swx) {
|
||||
this->swx = swx;
|
||||
}
|
||||
|
||||
void Notify() {
|
||||
swx->DoTick();
|
||||
}
|
||||
|
||||
private:
|
||||
ScintillaWX* swx;
|
||||
};
|
||||
|
||||
|
||||
|
||||
bool wxSTCDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data) {
|
||||
return swx->DoDropText(x, y, data);
|
||||
}
|
||||
|
||||
wxDragResult wxSTCDropTarget::OnEnter(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return swx->DoDragEnter(x, y, def);
|
||||
}
|
||||
|
||||
wxDragResult wxSTCDropTarget::OnDragOver(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return swx->DoDragOver(x, y, def);
|
||||
}
|
||||
|
||||
void wxSTCDropTarget::OnLeave() {
|
||||
swx->DoDragLeave();
|
||||
}
|
||||
|
||||
|
||||
class wxSTCCallTip : public wxWindow {
|
||||
public:
|
||||
wxSTCCallTip(wxWindow* parent, int ID, CallTip* ct)
|
||||
: wxWindow(parent, ID)
|
||||
{
|
||||
m_ct = ct;
|
||||
}
|
||||
|
||||
void OnPaint(wxPaintEvent& evt) {
|
||||
wxPaintDC dc(this);
|
||||
Surface surfaceWindow;
|
||||
surfaceWindow.Init(&dc);
|
||||
m_ct->PaintCT(&surfaceWindow);
|
||||
surfaceWindow.Release();
|
||||
}
|
||||
|
||||
CallTip* m_ct;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSTCCallTip, wxWindow)
|
||||
EVT_PAINT(wxSTCCallTip::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Constructor/Destructor
|
||||
|
||||
|
||||
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
||||
capturedMouse = false;
|
||||
wMain = win;
|
||||
wDraw = win;
|
||||
stc = win;
|
||||
Initialise();
|
||||
}
|
||||
|
||||
|
||||
ScintillaWX::~ScintillaWX() {
|
||||
SetTicking(false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// base class virtuals
|
||||
|
||||
|
||||
void ScintillaWX::Initialise() {
|
||||
//ScintillaBase::Initialise();
|
||||
dropTarget = new wxSTCDropTarget;
|
||||
dropTarget->SetScintilla(this);
|
||||
stc->SetDropTarget(dropTarget);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::Finalise() {
|
||||
ScintillaBase::Finalise();
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::StartDrag() {
|
||||
wxDropSource source(wMain.GetID());
|
||||
wxTextDataObject data(dragChars);
|
||||
wxDragResult result;
|
||||
|
||||
source.SetData(data);
|
||||
result = source.DoDragDrop(TRUE);
|
||||
if (result == wxDragMove && dropWentOutside)
|
||||
ClearSelection();
|
||||
inDragDrop = FALSE;
|
||||
SetDragPosition(invalidPosition);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::SetTicking(bool on) {
|
||||
wxSTCTimer* steTimer;
|
||||
if (timer.ticking != on) {
|
||||
timer.ticking = on;
|
||||
if (timer.ticking) {
|
||||
steTimer = new wxSTCTimer(this);
|
||||
steTimer->Start(timer.tickSize);
|
||||
timer.tickerID = (int)steTimer;
|
||||
} else {
|
||||
steTimer = (wxSTCTimer*)timer.tickerID;
|
||||
steTimer->Stop();
|
||||
delete steTimer;
|
||||
timer.tickerID = 0;
|
||||
}
|
||||
}
|
||||
timer.ticksToWait = caret.period;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::SetMouseCapture(bool on) {
|
||||
if (on && !capturedMouse)
|
||||
wMain.GetID()->CaptureMouse();
|
||||
else if (!on && capturedMouse)
|
||||
wMain.GetID()->ReleaseMouse();
|
||||
capturedMouse = on;
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::HaveMouseCapture() {
|
||||
return capturedMouse;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::ScrollText(int linesToMove) {
|
||||
int dy = vs.lineHeight * (linesToMove);
|
||||
// TODO: calculate the rectangle to refreshed...
|
||||
wMain.GetID()->ScrollWindow(0, dy);
|
||||
}
|
||||
|
||||
void ScintillaWX::SetVerticalScrollPos() {
|
||||
wMain.GetID()->SetScrollPos(wxVERTICAL, topLine);
|
||||
}
|
||||
|
||||
void ScintillaWX::SetHorizontalScrollPos() {
|
||||
wMain.GetID()->SetScrollPos(wxHORIZONTAL, xOffset);
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
||||
bool modified = false;
|
||||
int sbMax = wMain.GetID()->GetScrollRange(wxVERTICAL);
|
||||
int sbThumb = wMain.GetID()->GetScrollThumb(wxVERTICAL);
|
||||
int sbPos = wMain.GetID()->GetScrollPos(wxVERTICAL);
|
||||
|
||||
|
||||
if (sbMax != nMax || sbThumb != nPage) {
|
||||
wMain.GetID()->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
sbMax = wMain.GetID()->GetScrollRange(wxHORIZONTAL);
|
||||
sbThumb = wMain.GetID()->GetScrollThumb(wxHORIZONTAL);
|
||||
if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
|
||||
wMain.GetID()->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
|
||||
modified = true;
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::NotifyChange() {
|
||||
stc->NotifyChange();
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::NotifyParent(SCNotification scn) {
|
||||
stc->NotifyParent(&scn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ScintillaWX::Copy() {
|
||||
if (currentPos != anchor) {
|
||||
char* text = CopySelectionRange();
|
||||
wxTheClipboard->Open();
|
||||
wxTheClipboard->SetData(new wxTextDataObject(text));
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::Paste() {
|
||||
pdoc->BeginUndoAction();
|
||||
ClearSelection();
|
||||
|
||||
wxTextDataObject data;
|
||||
bool canPaste;
|
||||
|
||||
wxTheClipboard->Open();
|
||||
canPaste = wxTheClipboard->GetData(data);
|
||||
wxTheClipboard->Close();
|
||||
if (canPaste) {
|
||||
wxString str = data.GetText();
|
||||
int len = str.Length();
|
||||
pdoc->InsertString(currentPos, str.c_str(), len);
|
||||
SetEmptySelection(currentPos + len);
|
||||
}
|
||||
|
||||
pdoc->EndUndoAction();
|
||||
NotifyChange();
|
||||
Redraw();
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::CanPaste() {
|
||||
wxTextDataObject data;
|
||||
bool canPaste;
|
||||
|
||||
wxTheClipboard->Open();
|
||||
canPaste = wxTheClipboard->GetData(data);
|
||||
wxTheClipboard->Close();
|
||||
|
||||
return canPaste;
|
||||
}
|
||||
|
||||
void ScintillaWX::CreateCallTipWindow(PRectangle) {
|
||||
ct.wCallTip = new wxSTCCallTip(wDraw.GetID(), -1, &ct);
|
||||
ct.wDraw = ct.wCallTip;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
|
||||
if (!label[0])
|
||||
popup.GetID()->AppendSeparator();
|
||||
else
|
||||
popup.GetID()->Append(cmd, label);
|
||||
|
||||
if (!enabled)
|
||||
popup.GetID()->Enable(cmd, enabled);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::ClaimSelection() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
|
||||
// switch (iMessage) {
|
||||
// case EM_CANPASTE:
|
||||
// return CanPaste();
|
||||
// default:
|
||||
return ScintillaBase::WndProc(iMessage, wParam, lParam);
|
||||
// }
|
||||
// return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event delegates
|
||||
|
||||
void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
||||
|
||||
paintState = painting;
|
||||
Surface surfaceWindow;
|
||||
surfaceWindow.Init(dc);
|
||||
PRectangle rcPaint = PRectangleFromwxRect(rect);
|
||||
dc->BeginDrawing();
|
||||
Paint(&surfaceWindow, rcPaint);
|
||||
dc->EndDrawing();
|
||||
surfaceWindow.Release();
|
||||
if (paintState == paintAbandoned) {
|
||||
// Painting area was insufficient to cover new styling or brace highlight positions
|
||||
FullPaint();
|
||||
}
|
||||
paintState = notPainting;
|
||||
#ifdef __WXGTK__
|
||||
// On wxGTK the editor window paints can overwrite the listbox...
|
||||
if (ac.Active())
|
||||
((wxWindow*)ac.lb.GetID())->Refresh(TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoHScroll(int type, int pos) {
|
||||
int xPos = xOffset;
|
||||
switch (type) {
|
||||
case wxEVT_SCROLLWIN_LINEUP:
|
||||
xPos -= H_SCROLL_STEP;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_LINEDOWN:
|
||||
xPos += H_SCROLL_STEP;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEUP:
|
||||
xPos -= H_SCROLL_PAGE;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEDOWN:
|
||||
xPos += H_SCROLL_PAGE;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_TOP:
|
||||
xPos = 0;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_BOTTOM:
|
||||
xPos = H_SCROLL_MAX;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_THUMBTRACK:
|
||||
xPos = pos;
|
||||
break;
|
||||
}
|
||||
HorizontalScrollTo(xPos);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoVScroll(int type, int pos) {
|
||||
int topLineNew = topLine;
|
||||
switch (type) {
|
||||
case wxEVT_SCROLLWIN_LINEUP:
|
||||
topLineNew -= 1;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_LINEDOWN:
|
||||
topLineNew += 1;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEUP:
|
||||
topLineNew -= LinesToScroll();
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEDOWN:
|
||||
topLineNew += LinesToScroll();
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_TOP:
|
||||
topLineNew = 0;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_BOTTOM:
|
||||
topLineNew = MaxScrollPos();
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_THUMBTRACK:
|
||||
topLineNew = pos;
|
||||
break;
|
||||
}
|
||||
ScrollTo(topLineNew);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoSize(int width, int height) {
|
||||
PRectangle rcClient(0,0,width,height);
|
||||
SetScrollBarsTo(rcClient);
|
||||
DropGraphics();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoLoseFocus(){
|
||||
DropCaret();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoGainFocus(){
|
||||
ShowCaretAtCurrentPosition();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoSysColourChange() {
|
||||
InvalidateStyleData();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
|
||||
ButtonDown(pt, curTime, shift, ctrl, alt);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
||||
ButtonUp(pt, curTime, ctrl);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoButtonMove(Point pt) {
|
||||
ButtonMove(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) {
|
||||
switch (key) {
|
||||
case WXK_DOWN: key = SCK_DOWN; break;
|
||||
case WXK_UP: key = SCK_UP; break;
|
||||
case WXK_LEFT: key = SCK_LEFT; break;
|
||||
case WXK_RIGHT: key = SCK_RIGHT; break;
|
||||
case WXK_HOME: key = SCK_HOME; break;
|
||||
case WXK_END: key = SCK_END; break;
|
||||
case WXK_PRIOR: key = SCK_PRIOR; break;
|
||||
case WXK_NEXT: key = SCK_NEXT; break;
|
||||
case WXK_DELETE: key = SCK_DELETE; break;
|
||||
case WXK_INSERT: key = SCK_INSERT; break;
|
||||
case WXK_ESCAPE: key = SCK_ESCAPE; break;
|
||||
case WXK_BACK: key = SCK_BACK; break;
|
||||
case WXK_TAB: key = SCK_TAB; break;
|
||||
case WXK_RETURN: key = SCK_RETURN; break;
|
||||
case WXK_ADD: key = SCK_ADD; break;
|
||||
case WXK_SUBTRACT: key = SCK_SUBTRACT; break;
|
||||
case WXK_DIVIDE: key = SCK_DIVIDE; break;
|
||||
case WXK_CONTROL: key = 0; break;
|
||||
case WXK_ALT: key = 0; break;
|
||||
case WXK_SHIFT: key = 0; break;
|
||||
}
|
||||
|
||||
return KeyDown(key, shift, ctrl, alt);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoCommand(int ID) {
|
||||
Command(ID);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoContextMenu(Point pt) {
|
||||
ContextMenu(pt);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoOnListBox() {
|
||||
AutoCompleteCompleted();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
|
||||
SetDragPosition(invalidPosition);
|
||||
int movePos = PositionFromLocation(Point(x,y));
|
||||
DropAt(movePos, data, dragResult == wxDragMove, FALSE); // TODO: rectangular?
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
SetDragPosition(PositionFromLocation(Point(x, y)));
|
||||
dragResult = def;
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoDragLeave() {
|
||||
SetDragPosition(invalidPosition);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Redraw all of text area. This paint will not be abandoned.
|
||||
void ScintillaWX::FullPaint() {
|
||||
paintState = painting;
|
||||
// rcPaint = GetTextRectangle();
|
||||
// wxClientDC dc(wMain.GetID());
|
||||
// Surface surfaceWindow;
|
||||
// surfaceWindow.Init(&dc);
|
||||
// Paint(&surfaceWindow, rcPaint);
|
||||
// surfaceWindow.Release();
|
||||
wMain.GetID()->Refresh(FALSE);
|
||||
paintState = notPainting;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoScrollToLine(int line) {
|
||||
ScrollTo(line);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoScrollToColumn(int column) {
|
||||
HorizontalScrollTo(column * vs.spaceWidth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
152
contrib/src/stc/ScintillaWX.h
Normal file
152
contrib/src/stc/ScintillaWX.h
Normal file
@@ -0,0 +1,152 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: ScintillaWX.h
|
||||
// Purpose: A wxWindows implementation of Scintilla. A class derived
|
||||
// from ScintillaBase that uses the "wx platform" defined in
|
||||
// PlatWX.cpp. This class is one end of a bridge between
|
||||
// the wx world and the Scintilla world. It needs a peer
|
||||
// object of type wxStyledTextCtrl to function.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ScintillaWX_h__
|
||||
#define __ScintillaWX_h__
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#ifdef SCI_LEXER
|
||||
#include "SciLexer.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#endif
|
||||
#include "ContractionState.h"
|
||||
#include "SVector.h"
|
||||
#include "CellBuffer.h"
|
||||
#include "CallTip.h"
|
||||
#include "KeyMap.h"
|
||||
#include "Indicator.h"
|
||||
#include "LineMarker.h"
|
||||
#include "Style.h"
|
||||
#include "ViewStyle.h"
|
||||
#include "AutoComplete.h"
|
||||
#include "Document.h"
|
||||
#include "Editor.h"
|
||||
#include "ScintillaBase.h"
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/dataobj.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/dnd.h>
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStyledTextCtrl; // forward
|
||||
class ScintillaWX;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Helper classes
|
||||
|
||||
class wxSTCDropTarget : public wxTextDropTarget {
|
||||
public:
|
||||
void SetScintilla(ScintillaWX* swx) {
|
||||
this->swx = swx;
|
||||
}
|
||||
|
||||
bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
|
||||
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
|
||||
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
void OnLeave();
|
||||
|
||||
private:
|
||||
ScintillaWX* swx;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class ScintillaWX : public ScintillaBase {
|
||||
public:
|
||||
|
||||
ScintillaWX(wxStyledTextCtrl* win);
|
||||
~ScintillaWX();
|
||||
|
||||
// base class virtuals
|
||||
virtual void Initialise();
|
||||
virtual void Finalise();
|
||||
virtual void StartDrag();
|
||||
virtual void SetTicking(bool on);
|
||||
virtual void SetMouseCapture(bool on);
|
||||
virtual bool HaveMouseCapture();
|
||||
virtual void ScrollText(int linesToMove);
|
||||
virtual void SetVerticalScrollPos();
|
||||
virtual void SetHorizontalScrollPos();
|
||||
virtual bool ModifyScrollBars(int nMax, int nPage);
|
||||
virtual void Copy();
|
||||
virtual void Paste();
|
||||
virtual void CreateCallTipWindow(PRectangle rc);
|
||||
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
|
||||
virtual void ClaimSelection();
|
||||
|
||||
virtual long DefWndProc(unsigned int iMessage,
|
||||
unsigned long wParam,
|
||||
long lParam);
|
||||
virtual long WndProc(unsigned int iMessage,
|
||||
unsigned long wParam,
|
||||
long lParam);
|
||||
|
||||
virtual void NotifyChange();
|
||||
virtual void NotifyParent(SCNotification scn);
|
||||
|
||||
|
||||
// Event delegates
|
||||
void DoPaint(wxDC* dc, wxRect rect);
|
||||
void DoHScroll(int type, int pos);
|
||||
void DoVScroll(int type, int pos);
|
||||
void DoSize(int width, int height);
|
||||
void DoLoseFocus();
|
||||
void DoGainFocus();
|
||||
void DoSysColourChange();
|
||||
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
|
||||
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
|
||||
void DoButtonMove(Point pt);
|
||||
void DoAddChar(char ch);
|
||||
int DoKeyDown(int key, bool shift, bool ctrl, bool alt);
|
||||
void DoTick() { Tick(); }
|
||||
|
||||
bool DoDropText(long x, long y, const wxString& data);
|
||||
wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def);
|
||||
wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
void DoDragLeave();
|
||||
|
||||
void DoCommand(int ID);
|
||||
void DoContextMenu(Point pt);
|
||||
void DoOnListBox();
|
||||
|
||||
|
||||
// helpers
|
||||
void FullPaint();
|
||||
bool CanPaste();
|
||||
bool GetHideSelection() { return hideSelection; }
|
||||
void DoScrollToLine(int line);
|
||||
void DoScrollToColumn(int column);
|
||||
|
||||
private:
|
||||
bool capturedMouse;
|
||||
wxStyledTextCtrl* stc;
|
||||
|
||||
wxSTCDropTarget* dropTarget;
|
||||
wxDragResult dragResult;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
#endif
|
||||
250
contrib/src/stc/StcVC.dsp
Normal file
250
contrib/src/stc/StcVC.dsp
Normal file
@@ -0,0 +1,250 @@
|
||||
# Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=StcVC - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "StcVC.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "StcVC.mak" CFG="StcVC - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "StcVC - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "StcVC - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "StcVC - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\lib\stc.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "StcVC - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\lib\stcd.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "StcVC - Win32 Release"
|
||||
# Name "StcVC - Win32 Debug"
|
||||
# Begin Group "Stc"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PlatWX.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScintillaWX.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScintillaWX.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stc.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scintilla"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Accessor.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\AutoComplete.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\AutoComplete.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CallTip.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CallTip.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CellBuffer.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CellBuffer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ContractionState.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ContractionState.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Document.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Document.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Editor.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Editor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Indicator.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Indicator.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\KeyMap.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\KeyMap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\KeyWords.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexCPP.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexHTML.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexOthers.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexPerl.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexPython.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexSQL.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexVB.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LineMarker.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LineMarker.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\PropSet.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ScintillaBase.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ScintillaBase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Style.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Style.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\SVector.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ViewStyle.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ViewStyle.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
29
contrib/src/stc/StcVC.dsw
Normal file
29
contrib/src/stc/StcVC.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "StcVC"=.\StcVC.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
684
contrib/src/stc/gen_iface.py
Normal file
684
contrib/src/stc/gen_iface.py
Normal file
@@ -0,0 +1,684 @@
|
||||
#!/bin/env python
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: gen_iface.py
|
||||
# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 5-Sept-2000
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 2000 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
import sys, string, re
|
||||
from fileinput import FileInput
|
||||
|
||||
|
||||
IFACE = './scintilla/include/Scintilla.iface'
|
||||
H_TEMPLATE = './stc.h.in'
|
||||
CPP_TEMPLATE = './stc.cpp.in'
|
||||
H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' #
|
||||
CPP_DEST = './stc.cpp' #'./stc_test.cpp'
|
||||
|
||||
|
||||
# Value prefixes to convert
|
||||
valPrefixes = [('SCI_', ''),
|
||||
('SC_', ''),
|
||||
('SCN_', None), # just toss these...
|
||||
('SCEN_', None),
|
||||
('SCE_', ''),
|
||||
('SCLEX_', 'LEX_'),
|
||||
('SCK_', 'KEY_'),
|
||||
('SCFIND_', 'FIND_'),
|
||||
('SCWS_', 'WS_'),
|
||||
]
|
||||
|
||||
# Message funcion values that should have a CMD_ constant as well
|
||||
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
|
||||
|
||||
|
||||
# Map some generic typenames to wx types, using return value syntax
|
||||
retTypeMap = {
|
||||
'position': 'int',
|
||||
'string': 'wxString',
|
||||
'colour': 'wxColour',
|
||||
}
|
||||
|
||||
# Map some generic typenames to wx types, using parameter syntax
|
||||
paramTypeMap = {
|
||||
'position': 'int',
|
||||
'string': 'const wxString&',
|
||||
'colour': 'const wxColour&',
|
||||
'keymod': 'int',
|
||||
}
|
||||
|
||||
# Map of method info that needs tweaked. Either the name needs changed, or
|
||||
# the method definition/implementation. Tuple items are:
|
||||
#
|
||||
# 1. New method name. None to skip the method, 0 to leave the
|
||||
# default name.
|
||||
# 2. Method definition for the .h file, 0 to leave alone
|
||||
# 3. Method implementation for the .cpp file, 0 to leave alone.
|
||||
# 4. tuple of Doc string lines, or 0 to leave alone.
|
||||
#
|
||||
methodOverrideMap = {
|
||||
'AddText' : (0,
|
||||
'void %s(const wxString& text);',
|
||||
|
||||
'''void %s(const wxString& text) {
|
||||
SendMsg(%s, text.Len(), (long)text.c_str());''',
|
||||
0),
|
||||
|
||||
'AddStyledText' : (0,
|
||||
'void %s(const wxString& text);',
|
||||
|
||||
'''void %s(const wxString& text) {
|
||||
SendMsg(%s, text.Len(), (long)text.c_str());''',
|
||||
0),
|
||||
|
||||
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
|
||||
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
|
||||
|
||||
'GetStyledText' : (0,
|
||||
'wxString %s(int startPos, int endPos);',
|
||||
|
||||
'''wxString %s(int startPos, int endPos) {
|
||||
wxString text;
|
||||
int len = endPos - startPos;
|
||||
TextRange tr;
|
||||
tr.lpstrText = text.GetWriteBuf(len*2+1);
|
||||
tr.chrg.cpMin = startPos;
|
||||
tr.chrg.cpMax = endPos;
|
||||
SendMsg(%s, 0, (long)&tr);
|
||||
text.UngetWriteBuf(len*2);
|
||||
return text;''',
|
||||
|
||||
('Retrieve a buffer of cells.',)),
|
||||
|
||||
|
||||
'PositionFromPoint' : (0,
|
||||
'int %s(wxPoint pt);',
|
||||
|
||||
'''int %s(wxPoint pt) {
|
||||
return SendMsg(%s, pt.x, pt.y);''',
|
||||
|
||||
0),
|
||||
|
||||
'GetCurLine' : (0,
|
||||
'wxString %s(int* OUTPUT=NULL);',
|
||||
|
||||
'''wxString %s(int* linePos) {
|
||||
wxString text;
|
||||
int len = LineLength(GetCurrentLine());
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(%s, len, (long)buf);
|
||||
text.UngetWriteBuf();
|
||||
if (linePos) *linePos = pos;
|
||||
|
||||
return text;''',
|
||||
|
||||
0),
|
||||
|
||||
'SetUsePalette' : (None, 0,0,0),
|
||||
|
||||
'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0),
|
||||
'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0),
|
||||
|
||||
'MarkerDefine' : (0,
|
||||
'''void %s(int markerNumber, int markerSymbol,
|
||||
const wxColour& foreground = wxNullColour,
|
||||
const wxColour& background = wxNullColour);''',
|
||||
|
||||
'''void %s(int markerNumber, int markerSymbol,
|
||||
const wxColour& foreground,
|
||||
const wxColour& background) {
|
||||
|
||||
SendMsg(%s, markerNumber, markerSymbol);
|
||||
if (foreground.Ok())
|
||||
MarkerSetForeground(markerNumber, foreground);
|
||||
if (background.Ok())
|
||||
MarkerSetBackground(markerNumber, background);''',
|
||||
|
||||
('Set the symbol used for a particular marker number,',
|
||||
'and optionally the for and background colours.')),
|
||||
|
||||
'SetMarginTypeN' : ('SetMarginType', 0, 0, 0),
|
||||
'GetMarginTypeN' : ('GetMarginType', 0, 0, 0),
|
||||
'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0),
|
||||
'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0),
|
||||
'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0),
|
||||
'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0),
|
||||
'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0),
|
||||
'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0),
|
||||
|
||||
'StyleSetFore' : ('StyleSetForeground', 0, 0, 0),
|
||||
'StyleSetBack' : ('StyleSetBackground', 0, 0, 0),
|
||||
'SetSelFore' : ('SetSelForeground', 0, 0, 0),
|
||||
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
|
||||
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
|
||||
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
|
||||
|
||||
# need to fix this to map between wx and scintilla encoding flags, leave it out for now...
|
||||
'StyleSetCharacterSet' : (None, 0, 0, 0),
|
||||
|
||||
'AssignCmdKey' : ('CmdKeyAssign',
|
||||
'void %s(int key, int modifiers, int cmd);',
|
||||
|
||||
'''void %s(int key, int modifiers, int cmd) {
|
||||
SendMsg(%s, MAKELONG(key, modifiers), cmd);''',
|
||||
|
||||
0),
|
||||
|
||||
'ClearCmdKey' : ('CmdKeyClear',
|
||||
'void %s(int key, int modifiers);',
|
||||
|
||||
'''void %s(int key, int modifiers) {
|
||||
SendMsg(%s, MAKELONG(key, modifiers));''',
|
||||
|
||||
0),
|
||||
|
||||
'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0),
|
||||
|
||||
|
||||
'SetStylingEx' : ('SetStyleBytes',
|
||||
'void %s(int length, char* styleBytes);',
|
||||
|
||||
'''void %s(int length, char* styleBytes) {
|
||||
SendMsg(%s, length, (long)styleBytes);''',
|
||||
|
||||
0),
|
||||
|
||||
|
||||
'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0),
|
||||
'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0),
|
||||
'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0),
|
||||
'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0),
|
||||
|
||||
'AutoCShow' : ('AutoCompShow', 0, 0, 0),
|
||||
'AutoCCancel' : ('AutoCompCancel', 0, 0, 0),
|
||||
'AutoCActive' : ('AutoCompActive', 0, 0, 0),
|
||||
'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0),
|
||||
'AutoCComplete' : ('AutoCompComplete', 0, 0, 0),
|
||||
'AutoCStops' : ('AutoCompStops', 0, 0, 0),
|
||||
'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0),
|
||||
'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0),
|
||||
'AutoCSelect' : ('AutoCompSelect', 0, 0, 0),
|
||||
'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0),
|
||||
'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0),
|
||||
'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0),
|
||||
'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0),
|
||||
'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0),
|
||||
'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0),
|
||||
'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0),
|
||||
|
||||
'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0),
|
||||
'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0),
|
||||
|
||||
'GetCaretFore' : ('GetCaretForeground', 0, 0, 0),
|
||||
|
||||
'GetUsePalette' : (None, 0, 0, 0),
|
||||
|
||||
'FindText' : (0,
|
||||
'''int %s(int minPos, int maxPos,
|
||||
const wxString& text,
|
||||
bool caseSensitive, bool wholeWord);''',
|
||||
'''int %s(int minPos, int maxPos,
|
||||
const wxString& text,
|
||||
bool caseSensitive, bool wholeWord) {
|
||||
TextToFind ft;
|
||||
int flags = 0;
|
||||
|
||||
flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
|
||||
flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
|
||||
ft.chrg.cpMin = minPos;
|
||||
ft.chrg.cpMax = maxPos;
|
||||
ft.lpstrText = (char*)text.c_str();
|
||||
|
||||
return SendMsg(%s, flags, (long)&ft);''',
|
||||
0),
|
||||
|
||||
'FormatRange' : (0,
|
||||
'''int %s(bool doDraw,
|
||||
int startPos,
|
||||
int endPos,
|
||||
wxDC* draw,
|
||||
wxDC* target, // Why does it use two? Can they be the same?
|
||||
wxRect renderRect,
|
||||
wxRect pageRect);''',
|
||||
''' int %s(bool doDraw,
|
||||
int startPos,
|
||||
int endPos,
|
||||
wxDC* draw,
|
||||
wxDC* target, // Why does it use two? Can they be the same?
|
||||
wxRect renderRect,
|
||||
wxRect pageRect) {
|
||||
RangeToFormat fr;
|
||||
|
||||
fr.hdc = draw;
|
||||
fr.hdcTarget = target;
|
||||
fr.rc.top = renderRect.GetTop();
|
||||
fr.rc.left = renderRect.GetLeft();
|
||||
fr.rc.right = renderRect.GetRight();
|
||||
fr.rc.bottom = renderRect.GetBottom();
|
||||
fr.rcPage.top = pageRect.GetTop();
|
||||
fr.rcPage.left = pageRect.GetLeft();
|
||||
fr.rcPage.right = pageRect.GetRight();
|
||||
fr.rcPage.bottom = pageRect.GetBottom();
|
||||
fr.chrg.cpMin = startPos;
|
||||
fr.chrg.cpMax = endPos;
|
||||
|
||||
return SendMsg(%s, doDraw, (long)&fr);''',
|
||||
0),
|
||||
|
||||
|
||||
'GetLine' : (0,
|
||||
'wxString %s(int line);',
|
||||
|
||||
'''wxString %s(int line) {
|
||||
wxString text;
|
||||
int len = LineLength(line);
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(%s, line, (long)buf);
|
||||
text.UngetWriteBuf();
|
||||
|
||||
return text;''',
|
||||
|
||||
('Retrieve the contents of a line.',)),
|
||||
|
||||
'SetSel' : ('SetSelection', 0, 0, 0),
|
||||
'GetSelText' : ('GetSelectedText',
|
||||
'wxString %s();',
|
||||
|
||||
'''wxString %s() {
|
||||
wxString text;
|
||||
int start;
|
||||
int end;
|
||||
|
||||
GetSelection(&start, &end);
|
||||
int len = end - start;
|
||||
char* buff = text.GetWriteBuf(len+1);
|
||||
|
||||
SendMsg(%s, 0, (long)buff);
|
||||
text.UngetWriteBuf();
|
||||
return text;''',
|
||||
|
||||
('Retrieve the selected text.',)),
|
||||
|
||||
'GetTextRange' : (0,
|
||||
'wxString %s(int startPos, int endPos);',
|
||||
|
||||
'''wxString %s(int startPos, int endPos) {
|
||||
wxString text;
|
||||
int len = endPos - startPos;
|
||||
char* buff = text.GetWriteBuf(len+1);
|
||||
TextRange tr;
|
||||
tr.lpstrText = buff;
|
||||
tr.chrg.cpMin = startPos;
|
||||
tr.chrg.cpMax = endPos;
|
||||
|
||||
SendMsg(%s, 0, (long)&tr);
|
||||
text.UngetWriteBuf();
|
||||
return text;''',
|
||||
|
||||
('Retrieve a range of text.',)),
|
||||
|
||||
'PointXFromPosition' : (None, 0, 0, 0),
|
||||
'PointYFromPosition' : (None, 0, 0, 0),
|
||||
|
||||
'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0),
|
||||
'ReplaceSel' : ('ReplaceSelection', 0, 0, 0),
|
||||
'Null' : (None, 0, 0, 0),
|
||||
|
||||
'GetText' : (0,
|
||||
'wxString %s();',
|
||||
|
||||
'''wxString %s() {
|
||||
wxString text;
|
||||
int len = GetTextLength();
|
||||
char* buff = text.GetWriteBuf(len+1);
|
||||
|
||||
SendMsg(%s, len, (long)buff);
|
||||
buff[len] = 0;
|
||||
text.UngetWriteBuf();
|
||||
return text;''',
|
||||
|
||||
('Retrieve all the text in the document.', )),
|
||||
|
||||
'GetDirectFunction' : (None, 0, 0, 0),
|
||||
'GetDirectPointer' : (None, 0, 0, 0),
|
||||
|
||||
'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0),
|
||||
'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0),
|
||||
'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0),
|
||||
|
||||
|
||||
# Remove all methods that are key commands since they can be
|
||||
# executed with CmdKeyExecute
|
||||
'LineDown' : (None, 0, 0, 0),
|
||||
'LineDownExtend' : (None, 0, 0, 0),
|
||||
'LineUp' : (None, 0, 0, 0),
|
||||
'LineUpExtend' : (None, 0, 0, 0),
|
||||
'CharLeft' : (None, 0, 0, 0),
|
||||
'CharLeftExtend' : (None, 0, 0, 0),
|
||||
'CharRight' : (None, 0, 0, 0),
|
||||
'CharRightExtend' : (None, 0, 0, 0),
|
||||
'WordLeft' : (None, 0, 0, 0),
|
||||
'WordLeftExtend' : (None, 0, 0, 0),
|
||||
'WordRight' : (None, 0, 0, 0),
|
||||
'WordRightExtend' : (None, 0, 0, 0),
|
||||
'Home' : (None, 0, 0, 0),
|
||||
'HomeExtend' : (None, 0, 0, 0),
|
||||
'LineEnd' : (None, 0, 0, 0),
|
||||
'LineEndExtend' : (None, 0, 0, 0),
|
||||
'DocumentStart' : (None, 0, 0, 0),
|
||||
'DocumentStartExtend' : (None, 0, 0, 0),
|
||||
'DocumentEnd' : (None, 0, 0, 0),
|
||||
'DocumentEndExtend' : (None, 0, 0, 0),
|
||||
'PageUp' : (None, 0, 0, 0),
|
||||
'PageUpExtend' : (None, 0, 0, 0),
|
||||
'PageDown' : (None, 0, 0, 0),
|
||||
'PageDownExtend' : (None, 0, 0, 0),
|
||||
'EditToggleOvertype' : (None, 0, 0, 0),
|
||||
'Cancel' : (None, 0, 0, 0),
|
||||
'DeleteBack' : (None, 0, 0, 0),
|
||||
'Tab' : (None, 0, 0, 0),
|
||||
'BackTab' : (None, 0, 0, 0),
|
||||
'NewLine' : (None, 0, 0, 0),
|
||||
'FormFeed' : (None, 0, 0, 0),
|
||||
'VCHome' : (None, 0, 0, 0),
|
||||
'VCHomeExtend' : (None, 0, 0, 0),
|
||||
'ZoomIn' : (None, 0, 0, 0),
|
||||
'ZoomOut' : (None, 0, 0, 0),
|
||||
'DelWordLeft' : (None, 0, 0, 0),
|
||||
'DelWordRight' : (None, 0, 0, 0),
|
||||
'LineCut' : (None, 0, 0, 0),
|
||||
'LineDelete' : (None, 0, 0, 0),
|
||||
'LineTranspose' : (None, 0, 0, 0),
|
||||
'LowerCase' : (None, 0, 0, 0),
|
||||
'UpperCase' : (None, 0, 0, 0),
|
||||
'LineScrollDown' : (None, 0, 0, 0),
|
||||
'LineScrollUp' : (None, 0, 0, 0),
|
||||
|
||||
|
||||
'GetDocPointer' : (0,
|
||||
'void* %s();',
|
||||
'''void* %s() {
|
||||
return (void*)SendMsg(%s);''',
|
||||
0),
|
||||
|
||||
'SetDocPointer' : (0,
|
||||
'void %s(void* docPointer);',
|
||||
'''void %s(void* docPointer) {
|
||||
SendMsg(%s, (long)docPointer);''',
|
||||
0),
|
||||
|
||||
'CreateDocument' : (0,
|
||||
'void* %s();',
|
||||
'''void* %s() {
|
||||
return (void*)SendMsg(%s);''',
|
||||
0),
|
||||
|
||||
'AddRefDocument' : (0,
|
||||
'void %s(void* docPointer);',
|
||||
'''void %s(void* docPointer) {
|
||||
SendMsg(%s, (long)docPointer);''',
|
||||
0),
|
||||
|
||||
'ReleaseDocument' : (0,
|
||||
'void %s(void* docPointer);',
|
||||
'''void %s(void* docPointer) {
|
||||
SendMsg(%s, (long)docPointer);''',
|
||||
0),
|
||||
|
||||
'GrabFocus' : (None, 0, 0, 0),
|
||||
|
||||
'' : ('', 0, 0, 0),
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
|
||||
curDocStrings = []
|
||||
values = []
|
||||
methods = []
|
||||
|
||||
# parse iface file
|
||||
fi = FileInput(iface)
|
||||
for line in fi:
|
||||
line = line[:-1]
|
||||
if line[:2] == '##' or line == '':
|
||||
#curDocStrings = []
|
||||
continue
|
||||
|
||||
op = line[:4]
|
||||
if line[:2] == '# ': # a doc string
|
||||
curDocStrings.append(line[2:])
|
||||
|
||||
elif op == 'val ':
|
||||
parseVal(line[4:], values, curDocStrings)
|
||||
curDocStrings = []
|
||||
|
||||
elif op == 'fun ' or op == 'set ' or op == 'get ':
|
||||
parseFun(line[4:], methods, curDocStrings, values)
|
||||
curDocStrings = []
|
||||
|
||||
elif op == 'cat ':
|
||||
if string.strip(line[4:]) == 'Deprecated':
|
||||
break # skip the rest of the file
|
||||
|
||||
elif op == 'evt ':
|
||||
pass
|
||||
|
||||
else:
|
||||
print '***** Unknown line type: ', line
|
||||
|
||||
|
||||
# process templates
|
||||
data = {}
|
||||
data['VALUES'] = processVals(values)
|
||||
defs, imps = processMethods(methods)
|
||||
data['METHOD_DEFS'] = defs
|
||||
data['METHOD_IMPS'] = imps
|
||||
|
||||
# get template text
|
||||
h_text = open(h_tmplt).read()
|
||||
cpp_text = open(cpp_tmplt).read()
|
||||
|
||||
# do the substitutions
|
||||
h_text = h_text % data
|
||||
cpp_text = cpp_text % data
|
||||
|
||||
# write out destination files
|
||||
open(h_dest, 'w').write(h_text)
|
||||
open(cpp_dest, 'w').write(cpp_text)
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def processVals(values):
|
||||
text = []
|
||||
for name, value, docs in values:
|
||||
if docs:
|
||||
text.append('')
|
||||
for x in docs:
|
||||
text.append('// ' + x)
|
||||
text.append('#define %s %s' % (name, value))
|
||||
return string.join(text, '\n')
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def processMethods(methods):
|
||||
defs = []
|
||||
imps = []
|
||||
|
||||
for retType, name, number, param1, param2, docs in methods:
|
||||
retType = retTypeMap.get(retType, retType)
|
||||
params = makeParamString(param1, param2)
|
||||
|
||||
name, theDef, theImp, docs = checkMethodOverride(name, number, docs)
|
||||
|
||||
if name is None:
|
||||
continue
|
||||
|
||||
# Build the method definition for the .h file
|
||||
if docs:
|
||||
defs.append('')
|
||||
for x in docs:
|
||||
defs.append(' // ' + x)
|
||||
if not theDef:
|
||||
theDef = ' %s %s(%s);' % (retType, name, params)
|
||||
defs.append(theDef)
|
||||
|
||||
# Build the method implementation string
|
||||
if docs:
|
||||
imps.append('')
|
||||
for x in docs:
|
||||
imps.append('// ' + x)
|
||||
if not theImp:
|
||||
theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params)
|
||||
|
||||
if retType == 'wxColour':
|
||||
theImp = theImp + 'long c = '
|
||||
elif retType != 'void':
|
||||
theImp = theImp + 'return '
|
||||
theImp = theImp + 'SendMsg(%s, %s, %s)' % (number,
|
||||
makeArgString(param1),
|
||||
makeArgString(param2))
|
||||
if retType == 'bool':
|
||||
theImp = theImp + ' != 0'
|
||||
if retType == 'wxColour':
|
||||
theImp = theImp + ';\n return wxColourFromLong(c)'
|
||||
|
||||
theImp = theImp + ';\n}'
|
||||
imps.append(theImp)
|
||||
|
||||
|
||||
return string.join(defs, '\n'), string.join(imps, '\n')
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def checkMethodOverride(name, number, docs):
|
||||
theDef = theImp = None
|
||||
if methodOverrideMap.has_key(name):
|
||||
item = methodOverrideMap[name]
|
||||
|
||||
if item[0] != 0:
|
||||
name = item[0]
|
||||
if item[1] != 0:
|
||||
theDef = ' ' + (item[1] % name)
|
||||
if item[2] != 0:
|
||||
theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}'
|
||||
if item[3] != 0:
|
||||
docs = item[3]
|
||||
|
||||
return name, theDef, theImp, docs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def makeArgString(param):
|
||||
if not param:
|
||||
return '0'
|
||||
|
||||
typ, name = param
|
||||
|
||||
if typ == 'string':
|
||||
return '(long)%s.c_str()' % name
|
||||
if typ == 'colour':
|
||||
return 'wxColourAsLong(%s)' % name
|
||||
|
||||
return name
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def makeParamString(param1, param2):
|
||||
def doOne(param):
|
||||
if param:
|
||||
aType = paramTypeMap.get(param[0], param[0])
|
||||
return aType + ' ' + param[1]
|
||||
else:
|
||||
return ''
|
||||
|
||||
st = doOne(param1)
|
||||
if st and param2:
|
||||
st = st + ', '
|
||||
st = st + doOne(param2)
|
||||
return st
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def parseVal(line, values, docs):
|
||||
name, val = string.split(line, '=')
|
||||
|
||||
# remove prefixes such as SCI, etc.
|
||||
for old, new in valPrefixes:
|
||||
lo = len(old)
|
||||
if name[:lo] == old:
|
||||
if new is None:
|
||||
return
|
||||
name = new + name[lo:]
|
||||
|
||||
# add it to the list
|
||||
values.append( ('wxSTC_' + name, val, docs) )
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # <ws>return type
|
||||
'\s+([a-zA-Z0-9_]+)=' # <ws>name=
|
||||
'([0-9]+)' # number
|
||||
'\(([ a-zA-Z0-9_]*),' # (param,
|
||||
'([ a-zA-Z0-9_]*)\)') # param)
|
||||
|
||||
def parseFun(line, methods, docs, values):
|
||||
def parseParam(param):
|
||||
param = string.strip(param)
|
||||
if param == '':
|
||||
param = None
|
||||
else:
|
||||
param = tuple(string.split(param))
|
||||
return param
|
||||
|
||||
mo = funregex.match(line)
|
||||
if mo is None:
|
||||
print "***** Line doesn't match! : " + line
|
||||
|
||||
retType, name, number, param1, param2 = mo.groups()
|
||||
|
||||
param1 = parseParam(param1)
|
||||
param2 = parseParam(param2)
|
||||
|
||||
# Special case. For the key command functionss we want a value defined too
|
||||
num = string.atoi(number)
|
||||
for v in cmdValues:
|
||||
if (type(v) == type(()) and v[0] <= num < v[1]) or v == num:
|
||||
parseVal('CMD_%s=%s' % (string.upper(name), number), values, ())
|
||||
|
||||
#if retType == 'void' and not param1 and not param2:
|
||||
|
||||
methods.append( (retType, name, number, param1, param2, tuple(docs)) )
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
def main(args):
|
||||
# TODO: parse command line args to replace default input/output files???
|
||||
|
||||
# Now just do it
|
||||
processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
92
contrib/src/stc/makefile.b32
Normal file
92
contrib/src/stc/makefile.b32
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds wxMMedia library for 32-bit BC++
|
||||
|
||||
# N.B. use:
|
||||
# make -f makefile.b32 stc.cfg
|
||||
# make -f makefile.b32
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
SCINTILLA=.\scintilla
|
||||
S=$(SCINTILLA)\src
|
||||
|
||||
STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S)
|
||||
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\stc.lib
|
||||
|
||||
OBJECTS = \
|
||||
Accessor.obj \
|
||||
AutoComplete.obj \
|
||||
CallTip.obj \
|
||||
CellBuffer.obj \
|
||||
ContractionState.obj \
|
||||
Document.obj \
|
||||
DocumentAccessor.obj \
|
||||
Editor.obj \
|
||||
Indicator.obj \
|
||||
KeyMap.obj \
|
||||
KeyWords.obj \
|
||||
LexCPP.obj \
|
||||
LexHTML.obj \
|
||||
LexLua.obj \
|
||||
LexOthers.obj \
|
||||
LexPerl.obj \
|
||||
LexPython.obj \
|
||||
LexSQL.obj \
|
||||
LexVB.obj \
|
||||
LineMarker.obj \
|
||||
PropSet.obj \
|
||||
PosRegExp.obj \
|
||||
ScintillaBase.obj \
|
||||
Style.obj \
|
||||
UniConversion.obj \
|
||||
ViewStyle.obj \
|
||||
WindowAccessor.obj \
|
||||
\
|
||||
PlatWX.obj \
|
||||
ScintillaWX.obj \
|
||||
stc.obj \
|
||||
|
||||
|
||||
!include $(WXDIR)\src\makelib.b32
|
||||
|
||||
CFG = stc.cfg
|
||||
CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
|
||||
|
||||
{$(S)}.cxx.obj:
|
||||
bcc32 $(CPPFLAGS) -P -c {$< }
|
||||
|
||||
$(CFG): makefile.b32
|
||||
copy &&!
|
||||
-H=$(WXDIR)\src\msw\wx32.csm
|
||||
-3
|
||||
-d
|
||||
-a1 # byte alignment
|
||||
-R-
|
||||
-X
|
||||
-w-par
|
||||
-w-aus
|
||||
-w-hid # virtual function A hides virtual function B
|
||||
-WE
|
||||
-tWM
|
||||
|
||||
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm;$(WXDIR)/src/tiff
|
||||
-I$(WXDIR)\include\wx\msw\gnuwin32
|
||||
|
||||
-L$(BCCDIR)\lib
|
||||
-D__WXWIN__
|
||||
-D__WXMSW__
|
||||
-D__WINDOWS__
|
||||
-DWIN32
|
||||
$(OPT)
|
||||
$(DEBUG_FLAGS)
|
||||
$(WIN95FLAG)
|
||||
$(STCEXTRACPPFLAGS)
|
||||
! $(CFG)
|
||||
|
||||
46
contrib/src/stc/makefile.g95
Normal file
46
contrib/src/stc/makefile.g95
Normal file
@@ -0,0 +1,46 @@
|
||||
# File: makefile.g95 For stectrl
|
||||
# Author: Robin Dunn
|
||||
# Created: 1-Feb-2000
|
||||
# Updated:
|
||||
|
||||
WXDIR = ../../..
|
||||
|
||||
SCINTILLA=$(WXDIR)/contrib/src/stc/scintilla
|
||||
S=$(SCINTILLA)/src
|
||||
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)/contrib/include
|
||||
|
||||
OBJECTS = \
|
||||
$(S)/Accessor.$(OBJSUFF) \
|
||||
$(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)/UniConversion.$(OBJSUFF) \
|
||||
$(S)/WindowAccessor.$(OBJSUFF) \
|
||||
$(S)/PosRegExp.$(OBJSUFF) \
|
||||
PlatWX.$(OBJSUFF) \
|
||||
ScintillaWX.$(OBJSUFF) \
|
||||
stc.$(OBJSUFF)
|
||||
|
||||
LIBTARGET = $(WXDIR)/contrib/lib/libstc.a
|
||||
|
||||
include $(WXDIR)/src/makelib.g95
|
||||
105
contrib/src/stc/makefile.vc
Normal file
105
contrib/src/stc/makefile.vc
Normal file
@@ -0,0 +1,105 @@
|
||||
# File: makefile.vc For stectrl
|
||||
# Author: Robin Dunn
|
||||
# Created: 1-Feb-2000
|
||||
# Updated:
|
||||
|
||||
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
SCINTILLA=.\scintilla
|
||||
S=$(SCINTILLA)\src
|
||||
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)\contrib\include
|
||||
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)\PlatWX.obj \
|
||||
$(D)\ScintillaWX.obj \
|
||||
$(D)\stc.obj \
|
||||
|
||||
|
||||
|
||||
|
||||
LIBTARGET = $(WXDIR)\contrib\lib\stc$(LIBEXT).lib
|
||||
|
||||
all: $(D) $(LIBTARGET)
|
||||
|
||||
$(D) :
|
||||
mkdir $(D)
|
||||
|
||||
wx:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.vc FINAL=$(FINAL)
|
||||
cd $(THISDIR)
|
||||
|
||||
wxclean:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.vc clean
|
||||
cd $(THISDIR)
|
||||
|
||||
|
||||
|
||||
|
||||
$(LIBTARGET): $(OBJECTS)
|
||||
-erase $(LIBTARGET)
|
||||
$(implib) @<<
|
||||
-out:$(LIBTARGET)
|
||||
-machine:$(CPU)
|
||||
$(OBJECTS)
|
||||
<<
|
||||
|
||||
|
||||
|
||||
{$(S)}.cxx{$(D)}.obj:
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $<
|
||||
<<
|
||||
|
||||
{}.cpp{$(D)}.obj:
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $<
|
||||
<<
|
||||
|
||||
|
||||
show:
|
||||
@echo $(CPPFLAGS)
|
||||
|
||||
|
||||
clean:
|
||||
-erase $(D)\*.obj
|
||||
-erase *.sbr
|
||||
-erase *.exe
|
||||
-erase *.res
|
||||
-erase *.map
|
||||
-erase *.pdb
|
||||
-erase $(LIBTARGET)
|
||||
|
||||
7
contrib/src/stc/scintilla/README.txt
Normal file
7
contrib/src/stc/scintilla/README.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
This directory contains copies of the scintilla/src and
|
||||
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.32
|
||||
|
||||
70
contrib/src/stc/scintilla/include/Accessor.h
Normal file
70
contrib/src/stc/scintilla/include/Accessor.h
Normal file
@@ -0,0 +1,70 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// Accessor.h - rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
|
||||
|
||||
class Accessor;
|
||||
|
||||
typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
|
||||
|
||||
// Interface to data in a Scintilla
|
||||
class Accessor {
|
||||
protected:
|
||||
enum {extremePosition=0x7FFFFFFF};
|
||||
// bufferSize is a trade off between time taken to copy the characters and retrieval overhead
|
||||
// slopSize positions the buffer before the desired position in case there is some backtracking
|
||||
enum {bufferSize=4000, slopSize=bufferSize/8};
|
||||
char buf[bufferSize+1];
|
||||
int startPos;
|
||||
int endPos;
|
||||
int codePage;
|
||||
|
||||
virtual bool InternalIsLeadByte(char ch)=0;
|
||||
virtual void Fill(int position)=0;
|
||||
public:
|
||||
Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
|
||||
virtual ~Accessor() {}
|
||||
char operator[](int position) {
|
||||
if (position < startPos || position >= endPos) {
|
||||
Fill(position);
|
||||
}
|
||||
return buf[position - startPos];
|
||||
}
|
||||
char SafeGetCharAt(int position, char chDefault=' ') {
|
||||
// Safe version of operator[], returning a defined value for invalid position
|
||||
if (position < startPos || position >= endPos) {
|
||||
Fill(position);
|
||||
if (position < startPos || position >= endPos) {
|
||||
// Position is outside range of document
|
||||
return chDefault;
|
||||
}
|
||||
}
|
||||
return buf[position - startPos];
|
||||
}
|
||||
bool IsLeadByte(char ch) {
|
||||
return codePage && InternalIsLeadByte(ch);
|
||||
}
|
||||
void SetCodePage(int codePage_) { codePage = codePage_; }
|
||||
|
||||
virtual char StyleAt(int position)=0;
|
||||
virtual int GetLine(int position)=0;
|
||||
virtual int LineStart(int line)=0;
|
||||
virtual int LevelAt(int line)=0;
|
||||
virtual int Length()=0;
|
||||
virtual void Flush()=0;
|
||||
virtual int GetLineState(int line)=0;
|
||||
virtual int SetLineState(int line, int state)=0;
|
||||
virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
|
||||
|
||||
// Style setting
|
||||
virtual void StartAt(unsigned int start, char chMask=31)=0;
|
||||
virtual void SetFlags(char chFlags_, char chWhile_)=0;
|
||||
virtual unsigned int GetStartSegment()=0;
|
||||
virtual void StartSegment(unsigned int pos)=0;
|
||||
virtual void ColourTo(unsigned int pos, int chAttr)=0;
|
||||
virtual void SetLevel(int line, int level)=0;
|
||||
virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
|
||||
};
|
||||
|
||||
41
contrib/src/stc/scintilla/include/KeyWords.h
Normal file
41
contrib/src/stc/scintilla/include/KeyWords.h
Normal file
@@ -0,0 +1,41 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// KeyWords.h - colourise for particular languages
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler);
|
||||
|
||||
class LexerModule {
|
||||
static LexerModule *base;
|
||||
LexerModule *next;
|
||||
int language;
|
||||
LexerFunction fn;
|
||||
public:
|
||||
LexerModule(int language_, LexerFunction fn_);
|
||||
static void Colourise(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
int language, WordList *keywordlists[], Accessor &styler);
|
||||
};
|
||||
|
||||
inline bool iswordchar(char ch) {
|
||||
return isalnum(ch) || ch == '.' || ch == '_';
|
||||
}
|
||||
|
||||
inline bool iswordstart(char ch) {
|
||||
return isalnum(ch) || ch == '_';
|
||||
}
|
||||
|
||||
inline bool isoperator(char ch) {
|
||||
if (isalnum(ch))
|
||||
return false;
|
||||
// '.' left out as it is used to make up numbers
|
||||
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
|
||||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
|
||||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
|
||||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
|
||||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
|
||||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
411
contrib/src/stc/scintilla/include/Platform.h
Normal file
411
contrib/src/stc/scintilla/include/Platform.h
Normal file
@@ -0,0 +1,411 @@
|
||||
// Scintilla source code edit control
|
||||
// Platform.h - interface to platform facilities
|
||||
// Also includes some basic utilities
|
||||
// Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PLATFORM_H
|
||||
#define PLATFORM_H
|
||||
|
||||
// PLAT_GTK = GTK+ on Linux, PLAT_WIN = Win32 API on Win32 OS
|
||||
// PLAT_WX is wxWindows on any supported platform
|
||||
// Could also have PLAT_GTKWIN = GTK+ on Win32 OS in future
|
||||
|
||||
#define PLAT_GTK 0
|
||||
#define PLAT_WIN 0
|
||||
#define PLAT_WX 0
|
||||
|
||||
#if defined(__WX__)
|
||||
#undef PLAT_WX
|
||||
#define PLAT_WX 1
|
||||
|
||||
#elif defined(GTK)
|
||||
#undef PLAT_GTK
|
||||
#define PLAT_GTK 1
|
||||
|
||||
#else
|
||||
#undef PLAT_WIN
|
||||
#define PLAT_WIN 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Include the main header for each platform
|
||||
|
||||
#if PLAT_GTK
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#endif
|
||||
|
||||
#if PLAT_WIN
|
||||
#define _WIN32_WINNT 0x0400 // Otherwise some required stuff gets ifdef'd out
|
||||
// Vassili Bourdo: shut up annoying Visual C++ warnings:
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4800 4244 4309)
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#endif
|
||||
|
||||
#if PLAT_WX
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
// Underlying the implementation of the platform classes are platform specific types.
|
||||
// Sometimes these need to be passed around by client code so they are defined here
|
||||
|
||||
#if PLAT_GTK
|
||||
typedef GdkColor ColourID;
|
||||
typedef GdkFont* FontID;
|
||||
typedef GdkDrawable* SurfaceID;
|
||||
typedef GtkWidget* WindowID;
|
||||
typedef GtkItemFactory* MenuID;
|
||||
#endif
|
||||
|
||||
#if PLAT_WIN
|
||||
typedef COLORREF ColourID;
|
||||
typedef HFONT FontID;
|
||||
typedef HDC SurfaceID;
|
||||
typedef HWND WindowID;
|
||||
typedef HMENU MenuID;
|
||||
#endif
|
||||
|
||||
#if PLAT_WX
|
||||
typedef wxColour ColourID;
|
||||
typedef wxFont* FontID;
|
||||
typedef wxDC* SurfaceID;
|
||||
typedef wxWindow* WindowID;
|
||||
typedef wxMenu* MenuID;
|
||||
#endif
|
||||
|
||||
// Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably
|
||||
|
||||
class Point {
|
||||
public:
|
||||
int x;
|
||||
int y;
|
||||
|
||||
Point(int x_=0, int y_=0) : x(x_), y(y_) {
|
||||
}
|
||||
|
||||
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
|
||||
|
||||
static Point FromLong(long lpoint);
|
||||
};
|
||||
|
||||
// PRectangle is exactly the same as the Win32 RECT so can be used interchangeably
|
||||
// PRectangles contain their top and left sides, but not their right and bottom sides
|
||||
class PRectangle {
|
||||
public:
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
|
||||
PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) :
|
||||
left(left_), top(top_), right(right_), bottom(bottom_) {
|
||||
}
|
||||
|
||||
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
|
||||
|
||||
bool Contains(Point pt) {
|
||||
return (pt.x >= left) && (pt.x <= right) &&
|
||||
(pt.y >= top) && (pt.y <= bottom);
|
||||
}
|
||||
bool Contains(PRectangle rc) {
|
||||
return (rc.left >= left) && (rc.right <= right) &&
|
||||
(rc.top >= top) && (rc.bottom <= bottom);
|
||||
}
|
||||
bool Intersects(PRectangle other) {
|
||||
return (right >= other.left) && (left <= other.right) &&
|
||||
(bottom >= other.top) && (top <= other.bottom);
|
||||
}
|
||||
int Width() { return right - left; }
|
||||
int Height() { return bottom - top; }
|
||||
};
|
||||
|
||||
#if PLAT_WX
|
||||
wxRect wxRectFromPRectangle(PRectangle prc);
|
||||
PRectangle PRectangleFromwxRect(wxRect rc);
|
||||
#endif
|
||||
|
||||
class Colour {
|
||||
ColourID co;
|
||||
public:
|
||||
Colour(long lcol=0);
|
||||
Colour(unsigned int red, unsigned int green, unsigned int blue);
|
||||
bool operator==(const Colour &other) const;
|
||||
long AsLong() const;
|
||||
unsigned int GetRed();
|
||||
unsigned int GetGreen();
|
||||
unsigned int GetBlue();
|
||||
|
||||
friend class Surface;
|
||||
friend class Palette;
|
||||
};
|
||||
|
||||
// Colour pairs hold a desired colour and the colour that the graphics engine
|
||||
// allocates to approximate the desired colour.
|
||||
// To make palette management more automatic, ColourPairs could register at
|
||||
// construction time with a palette management object.
|
||||
struct ColourPair {
|
||||
Colour desired;
|
||||
Colour allocated;
|
||||
|
||||
ColourPair(Colour desired_=Colour(0,0,0)) {
|
||||
desired = desired_;
|
||||
allocated = desired;
|
||||
}
|
||||
};
|
||||
|
||||
class Window; // Forward declaration for Palette
|
||||
|
||||
class Palette {
|
||||
int used;
|
||||
enum {numEntries = 100};
|
||||
ColourPair entries[numEntries];
|
||||
#if PLAT_GTK
|
||||
GdkColor *allocatedPalette;
|
||||
int allocatedLen;
|
||||
#elif PLAT_WIN
|
||||
HPALETTE hpal;
|
||||
#elif PLAT_WX
|
||||
// wxPalette* pal; // **** Is this needed?
|
||||
#endif
|
||||
public:
|
||||
bool allowRealization;
|
||||
|
||||
Palette();
|
||||
~Palette();
|
||||
|
||||
void Release();
|
||||
|
||||
// This method either adds a colour to the list of wanted colours (want==true)
|
||||
// or retrieves the allocated colour back to the ColourPair.
|
||||
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
|
||||
void WantFind(ColourPair &cp, bool want);
|
||||
|
||||
void Allocate(Window &w);
|
||||
|
||||
friend class Surface;
|
||||
};
|
||||
|
||||
class Font {
|
||||
protected:
|
||||
FontID id;
|
||||
#if PLAT_WX
|
||||
int ascent;
|
||||
#endif
|
||||
// Private so Font objects can not be copied
|
||||
Font(const Font &) {}
|
||||
Font &operator=(const Font &) { id=0; return *this; }
|
||||
public:
|
||||
Font();
|
||||
virtual ~Font();
|
||||
|
||||
virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
|
||||
virtual void Release();
|
||||
|
||||
FontID GetID() { return id; }
|
||||
// Alias another font - caller guarantees not to Release
|
||||
void SetID(FontID id_) { id = id_; }
|
||||
friend class Surface;
|
||||
};
|
||||
|
||||
// A surface abstracts a place to draw
|
||||
class Surface {
|
||||
private:
|
||||
bool unicodeMode;
|
||||
#if PLAT_GTK
|
||||
GdkDrawable *drawable;
|
||||
GdkGC *gc;
|
||||
GdkPixmap *ppixmap;
|
||||
int x;
|
||||
int y;
|
||||
bool inited;
|
||||
bool createdGC;
|
||||
#elif PLAT_WIN
|
||||
HDC hdc;
|
||||
bool hdcOwned;
|
||||
HPEN pen;
|
||||
HPEN penOld;
|
||||
HBRUSH brush;
|
||||
HBRUSH brushOld;
|
||||
HFONT font;
|
||||
HFONT fontOld;
|
||||
HBITMAP bitmap;
|
||||
HBITMAP bitmapOld;
|
||||
HPALETTE paletteOld;
|
||||
#elif PLAT_WX
|
||||
wxDC* hdc;
|
||||
bool hdcOwned;
|
||||
wxBitmap* bitmap;
|
||||
int x;
|
||||
int y;
|
||||
#endif
|
||||
|
||||
// Private so Surface objects can not be copied
|
||||
Surface(const Surface &) {}
|
||||
Surface &operator=(const Surface &) { return *this; }
|
||||
#if PLAT_WIN || PLAT_WX
|
||||
void BrushColor(Colour back);
|
||||
void SetFont(Font &font_);
|
||||
#endif
|
||||
public:
|
||||
Surface();
|
||||
~Surface();
|
||||
|
||||
void Init();
|
||||
void Init(SurfaceID hdc_);
|
||||
void InitPixMap(int width, int height, Surface *surface_);
|
||||
|
||||
void Release();
|
||||
bool Initialised();
|
||||
void PenColour(Colour fore);
|
||||
int LogPixelsY();
|
||||
int DeviceHeightFont(int points);
|
||||
void MoveTo(int x_, int y_);
|
||||
void LineTo(int x_, int y_);
|
||||
void Polygon(Point *pts, int npts, Colour fore, Colour back);
|
||||
void RectangleDraw(PRectangle rc, Colour fore, Colour back);
|
||||
void FillRectangle(PRectangle rc, Colour back);
|
||||
void FillRectangle(PRectangle rc, Surface &surfacePattern);
|
||||
void RoundedRectangle(PRectangle rc, Colour fore, Colour back);
|
||||
void Ellipse(PRectangle rc, Colour fore, Colour back);
|
||||
void Copy(PRectangle rc, Point from, Surface &surfaceSource);
|
||||
|
||||
void DrawText(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
|
||||
void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
|
||||
void MeasureWidths(Font &font_, const char *s, int len, int *positions);
|
||||
int WidthText(Font &font_, const char *s, int len);
|
||||
int WidthChar(Font &font_, char ch);
|
||||
int Ascent(Font &font_);
|
||||
int Descent(Font &font_);
|
||||
int InternalLeading(Font &font_);
|
||||
int ExternalLeading(Font &font_);
|
||||
int Height(Font &font_);
|
||||
int AverageCharWidth(Font &font_);
|
||||
|
||||
int SetPalette(Palette *pal, bool inBackGround);
|
||||
void SetClip(PRectangle rc);
|
||||
void FlushCachedState();
|
||||
|
||||
void SetUnicodeMode(bool unicodeMode_) {
|
||||
unicodeMode=unicodeMode_;
|
||||
}
|
||||
};
|
||||
|
||||
// Class to hide the details of window manipulation
|
||||
// Does not own the window which will normally have a longer life than this object
|
||||
class Window {
|
||||
friend class ListBox;
|
||||
protected:
|
||||
WindowID id;
|
||||
public:
|
||||
Window() : id(0) {}
|
||||
Window(const Window &source) : id(source.id) {}
|
||||
virtual ~Window();
|
||||
Window &operator=(WindowID id_) {
|
||||
id = id_;
|
||||
return *this;
|
||||
}
|
||||
WindowID GetID() { return id; }
|
||||
bool Created() { return id != 0; }
|
||||
void Destroy();
|
||||
bool HasFocus();
|
||||
PRectangle GetPosition();
|
||||
void SetPosition(PRectangle rc);
|
||||
void SetPositionRelative(PRectangle rc, Window relativeTo);
|
||||
PRectangle GetClientPosition();
|
||||
void Show(bool show=true);
|
||||
void InvalidateAll();
|
||||
void InvalidateRectangle(PRectangle rc);
|
||||
virtual void SetFont(Font &font);
|
||||
enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow };
|
||||
void SetCursor(Cursor curs);
|
||||
void SetTitle(const char *s);
|
||||
#if PLAT_WIN
|
||||
LRESULT SendMessage(UINT msg, WPARAM wParam=0, LPARAM lParam=0);
|
||||
int GetDlgCtrlID();
|
||||
HINSTANCE GetInstance();
|
||||
#endif
|
||||
};
|
||||
|
||||
class ListBox : public Window {
|
||||
#if PLAT_GTK
|
||||
WindowID list;
|
||||
WindowID scroller;
|
||||
int current;
|
||||
#endif
|
||||
int desiredVisibleRows;
|
||||
unsigned int maxItemCharacters;
|
||||
unsigned int aveCharWidth;
|
||||
public:
|
||||
ListBox();
|
||||
virtual ~ListBox();
|
||||
void Create(Window &parent, int ctrlID);
|
||||
virtual void SetFont(Font &font);
|
||||
void SetAverageCharWidth(int width);
|
||||
void SetVisibleRows(int rows);
|
||||
PRectangle GetDesiredRect();
|
||||
void Clear();
|
||||
void Append(char *s);
|
||||
int Length();
|
||||
void Select(int n);
|
||||
int GetSelection();
|
||||
int Find(const char *prefix);
|
||||
void GetValue(int n, char *value, int len);
|
||||
void Sort();
|
||||
};
|
||||
|
||||
class Menu {
|
||||
MenuID id;
|
||||
public:
|
||||
Menu();
|
||||
MenuID GetID() { return id; }
|
||||
void CreatePopUp();
|
||||
void Destroy();
|
||||
void Show(Point pt, Window &w);
|
||||
};
|
||||
|
||||
// Platform class used to retrieve system wide parameters such as double click speed
|
||||
// and chrome colour. Not a creatable object, more of a module with several functions.
|
||||
class Platform {
|
||||
// Private so Platform objects can not be copied
|
||||
Platform(const Platform &) {}
|
||||
Platform &operator=(const Platform &) { return *this; }
|
||||
public:
|
||||
// Should be private because no new Platforms are ever created
|
||||
// but gcc warns about this
|
||||
Platform() {}
|
||||
~Platform() {}
|
||||
static Colour Chrome();
|
||||
static Colour ChromeHighlight();
|
||||
static const char *DefaultFont();
|
||||
static int DefaultFontSize();
|
||||
static unsigned int DoubleClickTime();
|
||||
static void DebugDisplay(const char *s);
|
||||
static bool IsKeyDown(int key);
|
||||
static long SendScintilla(
|
||||
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
|
||||
|
||||
// These are utility functions not really tied to a platform
|
||||
static int Minimum(int a, int b);
|
||||
static int Maximum(int a, int b);
|
||||
// Next three assume 16 bit shorts and 32 bit longs
|
||||
static long LongFromTwoShorts(short a,short b) {
|
||||
return (a) | ((b) << 16);
|
||||
}
|
||||
static short HighShortFromLong(long x) {
|
||||
return static_cast<short>(x >> 16);
|
||||
}
|
||||
static short LowShortFromLong(long x) {
|
||||
return static_cast<short>(x & 0xffff);
|
||||
}
|
||||
static void DebugPrintf(const char *format, ...);
|
||||
static int Clamp(int val, int minVal, int maxVal);
|
||||
};
|
||||
|
||||
#endif
|
||||
138
contrib/src/stc/scintilla/include/PosRegExp.h
Normal file
138
contrib/src/stc/scintilla/include/PosRegExp.h
Normal file
@@ -0,0 +1,138 @@
|
||||
#ifndef POSREGEXP_H
|
||||
#define POSREGEXP_H
|
||||
|
||||
#define MatchesNum 0x10
|
||||
|
||||
enum EOps
|
||||
{
|
||||
ReBlockOps = 0x1000,
|
||||
ReMul, // *
|
||||
RePlus, // +
|
||||
ReQuest, // ?
|
||||
ReNGMul, // *?
|
||||
ReNGPlus, // +?
|
||||
ReNGQuest, // ??
|
||||
ReRangeN, // {n,}
|
||||
ReRangeNM, // {n,m}
|
||||
ReNGRangeN, // {n,}?
|
||||
ReNGRangeNM, // {n,m}?
|
||||
ReOr, // |
|
||||
ReBehind = 0x1100, // ?#n
|
||||
ReNBehind = 0x1200, // ?~n
|
||||
ReAhead = 0x1300, // ?=
|
||||
ReNAhead = 0x1400, // ?!
|
||||
|
||||
ReSymbolOps = 0x2000,
|
||||
ReEmpty,
|
||||
ReSymb, // a b \W \s ...
|
||||
ReEnum, // []
|
||||
ReNEnum, // [^]
|
||||
ReBrackets, // (...)
|
||||
ReBkTrace = 0x2100, // \yN
|
||||
ReBkBrack = 0x2200 // \N
|
||||
};
|
||||
|
||||
enum ESymbols
|
||||
{
|
||||
ReAnyChr = 0x4000, // .
|
||||
ReSoL, // ^
|
||||
ReEoL, // $
|
||||
ReDigit, // \d
|
||||
ReNDigit, // \D
|
||||
ReWordSymb, // \w
|
||||
ReNWordSymb, // \W
|
||||
ReWSpace, // \s
|
||||
ReNWSpace, // \S
|
||||
ReUCase, // \u
|
||||
ReNUCase , // \l
|
||||
ReWBound, // \b
|
||||
ReNWBound, // \B
|
||||
RePreNW, // \c
|
||||
ReStart, // \m
|
||||
ReEnd, // \M
|
||||
|
||||
ReChr = 0x0 // Char in Lower Byte
|
||||
};
|
||||
enum ETempSymb
|
||||
{
|
||||
ReTemp = 0x7000,
|
||||
ReLBrack, ReRBrack,
|
||||
ReEnumS, ReEnumE, ReNEnumS,
|
||||
ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum
|
||||
};
|
||||
|
||||
#define BackSlash '\\'
|
||||
|
||||
typedef union SCharData
|
||||
{
|
||||
int IArr[8];
|
||||
char CArr[32];
|
||||
void SetBit(unsigned char Bit);
|
||||
void ClearBit(unsigned char Bit);
|
||||
bool GetBit(unsigned char Bit);
|
||||
} *PCharData;
|
||||
|
||||
typedef struct SRegInfo
|
||||
{
|
||||
SRegInfo();
|
||||
~SRegInfo();
|
||||
|
||||
EOps Op;
|
||||
union{
|
||||
SRegInfo *Param;
|
||||
int Symb;
|
||||
PCharData ChrClass;
|
||||
}un;
|
||||
int s,e;
|
||||
SRegInfo *Parent;
|
||||
SRegInfo *Next;
|
||||
} *PRegInfo;
|
||||
|
||||
typedef struct SMatches
|
||||
{
|
||||
int s[MatchesNum];
|
||||
int e[MatchesNum];
|
||||
int CurMatch;
|
||||
} *PMatches;
|
||||
|
||||
typedef class PosRegExp
|
||||
{
|
||||
PRegInfo Info;
|
||||
PMatches BkTrace;
|
||||
bool NoCase,Extend,NoMoves;
|
||||
bool Error;
|
||||
int *Exprn;
|
||||
int posParse;
|
||||
int posEnd,posStart;
|
||||
int posBkStr;
|
||||
int FirstChar;
|
||||
|
||||
bool SetExprLow(const char *Expr);
|
||||
bool SetStructs(PRegInfo &Info,int st,int end);
|
||||
void Optimize();
|
||||
bool CheckSymb(int Symb,bool Inc);
|
||||
bool LowParse(PRegInfo Re);
|
||||
bool LowParseRe(PRegInfo &Next);
|
||||
bool LowCheckNext(PRegInfo Re);
|
||||
bool ParseRe(int posStr);
|
||||
bool QuickCheck();
|
||||
public:
|
||||
PMatches Matches;
|
||||
int Ok, CurMatch;
|
||||
|
||||
void *param;
|
||||
char (*CharAt)(int pos, void *param);
|
||||
|
||||
PosRegExp();
|
||||
~PosRegExp();
|
||||
|
||||
bool isok();
|
||||
bool SetNoMoves(bool Moves);
|
||||
bool SetBkTrace(int posStr,PMatches Trace);
|
||||
bool SetExpr(const char *Expr);
|
||||
bool Parse(int posStr, int posStop, PMatches Mtch);
|
||||
bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1);
|
||||
bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res);
|
||||
} *PPosRegExp;
|
||||
|
||||
#endif /* POSREGEXP_H */
|
||||
244
contrib/src/stc/scintilla/include/PropSet.h
Normal file
244
contrib/src/stc/scintilla/include/PropSet.h
Normal file
@@ -0,0 +1,244 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// PropSet.h - a java style properties file module
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PROPSET_H
|
||||
#define PROPSET_H
|
||||
|
||||
bool EqualCaseInsensitive(const char *a, const char *b);
|
||||
|
||||
#if PLAT_WIN
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
// Define another string class.
|
||||
// While it would be 'better' to use std::string, that doubles the executable size.
|
||||
|
||||
inline char *StringDup(const char *s, int len=-1) {
|
||||
if (!s)
|
||||
return 0;
|
||||
if (len == -1)
|
||||
len = strlen(s);
|
||||
char *sNew = new char[len + 1];
|
||||
if (sNew) {
|
||||
strncpy(sNew, s, len);
|
||||
sNew[len] = '\0';
|
||||
}
|
||||
return sNew;
|
||||
}
|
||||
|
||||
class SString {
|
||||
char *s;
|
||||
int ssize;
|
||||
public:
|
||||
typedef const char* const_iterator;
|
||||
typedef int size_type;
|
||||
static size_type npos;
|
||||
const char* begin(void) const {
|
||||
return s;
|
||||
}
|
||||
const char* end(void) const {
|
||||
return &s[ssize];
|
||||
}
|
||||
size_type size(void) const {
|
||||
if (s)
|
||||
return ssize;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
SString &assign(const char* sother, int size_ = -1) {
|
||||
char *t = s;
|
||||
s = StringDup(sother,size_);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
delete []t;
|
||||
return *this;
|
||||
}
|
||||
SString &assign(const SString& sother, int size_ = -1) {
|
||||
return assign(sother.s,size_);
|
||||
}
|
||||
SString &assign(const_iterator ibeg, const_iterator iend) {
|
||||
return assign(ibeg,iend - ibeg);
|
||||
}
|
||||
SString() {
|
||||
s = 0;
|
||||
ssize = 0;
|
||||
}
|
||||
SString(const SString &source) {
|
||||
s = StringDup(source.s);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
SString(const char *s_) {
|
||||
s = StringDup(s_);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
SString(int i) {
|
||||
char number[100];
|
||||
sprintf(number, "%0d", i);
|
||||
s = StringDup(number);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
~SString() {
|
||||
delete []s;
|
||||
s = 0;
|
||||
ssize = 0;
|
||||
}
|
||||
SString &operator=(const SString &source) {
|
||||
if (this != &source) {
|
||||
delete []s;
|
||||
s = StringDup(source.s);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
bool operator==(const SString &other) const {
|
||||
if ((s == 0) && (other.s == 0))
|
||||
return true;
|
||||
if ((s == 0) || (other.s == 0))
|
||||
return false;
|
||||
return strcmp(s, other.s) == 0;
|
||||
}
|
||||
bool operator!=(const SString &other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
bool operator==(const char *sother) const {
|
||||
if ((s == 0) && (sother == 0))
|
||||
return true;
|
||||
if ((s == 0) || (sother == 0))
|
||||
return false;
|
||||
return strcmp(s, sother) == 0;
|
||||
}
|
||||
bool operator!=(const char *sother) const {
|
||||
return !operator==(sother);
|
||||
}
|
||||
const char *c_str() const {
|
||||
if (s)
|
||||
return s;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
int length() const {
|
||||
if (s)
|
||||
return strlen(s);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
char operator[](int i) const {
|
||||
if (s)
|
||||
return s[i];
|
||||
else
|
||||
return '\0';
|
||||
}
|
||||
SString &operator +=(const char *sother) {
|
||||
return append(sother,-1);
|
||||
}
|
||||
SString &operator +=(const SString &sother) {
|
||||
return append(sother.s,sother.ssize);
|
||||
}
|
||||
SString &operator +=(char ch) {
|
||||
return append(&ch,1);
|
||||
}
|
||||
SString &append(const char* sother, int lenOther) {
|
||||
int len = length();
|
||||
if(lenOther < 0)
|
||||
lenOther = strlen(sother);
|
||||
char *sNew = new char[len + lenOther + 1];
|
||||
if (sNew) {
|
||||
if (s)
|
||||
memcpy(sNew, s, len);
|
||||
strncpy(&sNew[len], sother, lenOther);
|
||||
sNew[len + lenOther] = '\0';
|
||||
delete []s;
|
||||
s = sNew;
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
int value() const {
|
||||
if (s)
|
||||
return atoi(s);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
void substitute(char find, char replace) {
|
||||
char *t = s;
|
||||
while (t) {
|
||||
t = strchr(t, find);
|
||||
if (t)
|
||||
*t = replace;
|
||||
}
|
||||
}
|
||||
// I don't think this really belongs here -- Neil
|
||||
void correctPath() {
|
||||
#ifdef unix
|
||||
substitute('\\', '/');
|
||||
#else
|
||||
substitute('/', '\\');
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
struct Property {
|
||||
unsigned int hash;
|
||||
char *key;
|
||||
char *val;
|
||||
Property *next;
|
||||
Property() : hash(0), key(0), val(0), next(0) {}
|
||||
};
|
||||
|
||||
class PropSet {
|
||||
private:
|
||||
enum { hashRoots=31 };
|
||||
Property *props[hashRoots];
|
||||
public:
|
||||
PropSet *superPS;
|
||||
PropSet();
|
||||
~PropSet();
|
||||
void Set(const char *key, const char *val);
|
||||
void Set(char *keyval);
|
||||
SString Get(const char *key);
|
||||
SString GetExpanded(const char *key);
|
||||
SString Expand(const char *withvars);
|
||||
int GetInt(const char *key, int defaultValue=0);
|
||||
SString GetWild(const char *keybase, const char *filename);
|
||||
SString GetNewExpand(const char *keybase, const char *filename);
|
||||
void Clear();
|
||||
void ReadFromMemory(const char *data, int len, const char *directoryForImports=0);
|
||||
void Read(const char *filename, const char *directoryForImports);
|
||||
};
|
||||
|
||||
class WordList {
|
||||
public:
|
||||
// Each word contains at least one character - a empty word acts as sentinal at the end.
|
||||
char **words;
|
||||
char **wordsNoCase;
|
||||
char *list;
|
||||
int len;
|
||||
bool onlyLineEnds; // Delimited by any white space or only line ends
|
||||
bool sorted;
|
||||
int starts[256];
|
||||
WordList(bool onlyLineEnds_ = false) :
|
||||
words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {}
|
||||
~WordList() { Clear(); }
|
||||
operator bool() { return words ? true : false; }
|
||||
const char *operator[](int ind) { return words[ind]; }
|
||||
void Clear();
|
||||
void Set(const char *s);
|
||||
char *Allocate(int size);
|
||||
void SetFromAllocated();
|
||||
bool InList(const char *s);
|
||||
const char *GetNearestWord(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
|
||||
char *GetNearestWords(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
|
||||
};
|
||||
|
||||
inline bool nonFuncChar(char ch) {
|
||||
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
204
contrib/src/stc/scintilla/include/SciLexer.h
Normal file
204
contrib/src/stc/scintilla/include/SciLexer.h
Normal file
@@ -0,0 +1,204 @@
|
||||
// Scintilla source code edit control
|
||||
// SciLexer - interface to the added lexer functions in the SciLexer version of the edit control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
// Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||
// file which contains any comments about the definitions. HFacer.py does the generation.
|
||||
|
||||
#ifndef SCILEXER_H
|
||||
#define SCILEXER_H
|
||||
|
||||
// SciLexer features - not in standard Scintilla
|
||||
|
||||
//++Autogenerated -- start of section automatically generated from Scintilla.iface
|
||||
#define SCLEX_CONTAINER 0
|
||||
#define SCLEX_NULL 1
|
||||
#define SCLEX_PYTHON 2
|
||||
#define SCLEX_CPP 3
|
||||
#define SCLEX_HTML 4
|
||||
#define SCLEX_XML 5
|
||||
#define SCLEX_PERL 6
|
||||
#define SCLEX_SQL 7
|
||||
#define SCLEX_VB 8
|
||||
#define SCLEX_PROPERTIES 9
|
||||
#define SCLEX_ERRORLIST 10
|
||||
#define SCLEX_MAKEFILE 11
|
||||
#define SCLEX_BATCH 12
|
||||
#define SCLEX_XCODE 13
|
||||
#define SCLEX_LATEX 14
|
||||
#define SCLEX_LUA 15
|
||||
#define SCLEX_DIFF 16
|
||||
#define SCE_P_DEFAULT 0
|
||||
#define SCE_P_COMMENTLINE 1
|
||||
#define SCE_P_NUMBER 2
|
||||
#define SCE_P_STRING 3
|
||||
#define SCE_P_CHARACTER 4
|
||||
#define SCE_P_WORD 5
|
||||
#define SCE_P_TRIPLE 6
|
||||
#define SCE_P_TRIPLEDOUBLE 7
|
||||
#define SCE_P_CLASSNAME 8
|
||||
#define SCE_P_DEFNAME 9
|
||||
#define SCE_P_OPERATOR 10
|
||||
#define SCE_P_IDENTIFIER 11
|
||||
#define SCE_P_COMMENTBLOCK 12
|
||||
#define SCE_P_STRINGEOL 13
|
||||
#define SCE_C_DEFAULT 0
|
||||
#define SCE_C_COMMENT 1
|
||||
#define SCE_C_COMMENTLINE 2
|
||||
#define SCE_C_COMMENTDOC 3
|
||||
#define SCE_C_NUMBER 4
|
||||
#define SCE_C_WORD 5
|
||||
#define SCE_C_STRING 6
|
||||
#define SCE_C_CHARACTER 7
|
||||
#define SCE_C_UUID 8
|
||||
#define SCE_C_PREPROCESSOR 9
|
||||
#define SCE_C_OPERATOR 10
|
||||
#define SCE_C_IDENTIFIER 11
|
||||
#define SCE_C_STRINGEOL 12
|
||||
#define SCE_C_VERBATIM 13
|
||||
#define SCE_H_DEFAULT 0
|
||||
#define SCE_H_TAG 1
|
||||
#define SCE_H_TAGUNKNOWN 2
|
||||
#define SCE_H_ATTRIBUTE 3
|
||||
#define SCE_H_ATTRIBUTEUNKNOWN 4
|
||||
#define SCE_H_NUMBER 5
|
||||
#define SCE_H_DOUBLESTRING 6
|
||||
#define SCE_H_SINGLESTRING 7
|
||||
#define SCE_H_OTHER 8
|
||||
#define SCE_H_COMMENT 9
|
||||
#define SCE_H_ENTITY 10
|
||||
#define SCE_H_TAGEND 11
|
||||
#define SCE_H_XMLSTART 12
|
||||
#define SCE_H_XMLEND 13
|
||||
#define SCE_H_SCRIPT 14
|
||||
#define SCE_H_ASP 15
|
||||
#define SCE_H_ASPAT 16
|
||||
#define SCE_H_CDATA 17
|
||||
#define SCE_H_QUESTION 18
|
||||
#define SCE_H_VALUE 19
|
||||
#define SCE_HJ_START 40
|
||||
#define SCE_HJ_DEFAULT 41
|
||||
#define SCE_HJ_COMMENT 42
|
||||
#define SCE_HJ_COMMENTLINE 43
|
||||
#define SCE_HJ_COMMENTDOC 44
|
||||
#define SCE_HJ_NUMBER 45
|
||||
#define SCE_HJ_WORD 46
|
||||
#define SCE_HJ_KEYWORD 47
|
||||
#define SCE_HJ_DOUBLESTRING 48
|
||||
#define SCE_HJ_SINGLESTRING 49
|
||||
#define SCE_HJ_SYMBOLS 50
|
||||
#define SCE_HJ_STRINGEOL 51
|
||||
#define SCE_HJA_START 55
|
||||
#define SCE_HJA_DEFAULT 56
|
||||
#define SCE_HJA_COMMENT 57
|
||||
#define SCE_HJA_COMMENTLINE 58
|
||||
#define SCE_HJA_COMMENTDOC 59
|
||||
#define SCE_HJA_NUMBER 60
|
||||
#define SCE_HJA_WORD 61
|
||||
#define SCE_HJA_KEYWORD 62
|
||||
#define SCE_HJA_DOUBLESTRING 63
|
||||
#define SCE_HJA_SINGLESTRING 64
|
||||
#define SCE_HJA_SYMBOLS 65
|
||||
#define SCE_HJA_STRINGEOL 66
|
||||
#define SCE_HB_START 70
|
||||
#define SCE_HB_DEFAULT 71
|
||||
#define SCE_HB_COMMENTLINE 72
|
||||
#define SCE_HB_NUMBER 73
|
||||
#define SCE_HB_WORD 74
|
||||
#define SCE_HB_STRING 75
|
||||
#define SCE_HB_IDENTIFIER 76
|
||||
#define SCE_HB_STRINGEOL 77
|
||||
#define SCE_HBA_START 80
|
||||
#define SCE_HBA_DEFAULT 81
|
||||
#define SCE_HBA_COMMENTLINE 82
|
||||
#define SCE_HBA_NUMBER 83
|
||||
#define SCE_HBA_WORD 84
|
||||
#define SCE_HBA_STRING 85
|
||||
#define SCE_HBA_IDENTIFIER 86
|
||||
#define SCE_HBA_STRINGEOL 87
|
||||
#define SCE_HP_START 90
|
||||
#define SCE_HP_DEFAULT 91
|
||||
#define SCE_HP_COMMENTLINE 92
|
||||
#define SCE_HP_NUMBER 93
|
||||
#define SCE_HP_STRING 94
|
||||
#define SCE_HP_CHARACTER 95
|
||||
#define SCE_HP_WORD 96
|
||||
#define SCE_HP_TRIPLE 97
|
||||
#define SCE_HP_TRIPLEDOUBLE 98
|
||||
#define SCE_HP_CLASSNAME 99
|
||||
#define SCE_HP_DEFNAME 100
|
||||
#define SCE_HP_OPERATOR 101
|
||||
#define SCE_HP_IDENTIFIER 102
|
||||
#define SCE_HPA_START 105
|
||||
#define SCE_HPA_DEFAULT 106
|
||||
#define SCE_HPA_COMMENTLINE 107
|
||||
#define SCE_HPA_NUMBER 108
|
||||
#define SCE_HPA_STRING 109
|
||||
#define SCE_HPA_CHARACTER 110
|
||||
#define SCE_HPA_WORD 111
|
||||
#define SCE_HPA_TRIPLE 112
|
||||
#define SCE_HPA_TRIPLEDOUBLE 113
|
||||
#define SCE_HPA_CLASSNAME 114
|
||||
#define SCE_HPA_DEFNAME 115
|
||||
#define SCE_HPA_OPERATOR 116
|
||||
#define SCE_HPA_IDENTIFIER 117
|
||||
#define SCE_HPHP_DEFAULT 118
|
||||
#define SCE_HPHP_HSTRING 119
|
||||
#define SCE_HPHP_SIMPLESTRING 120
|
||||
#define SCE_HPHP_WORD 121
|
||||
#define SCE_HPHP_NUMBER 122
|
||||
#define SCE_HPHP_VARIABLE 123
|
||||
#define SCE_HPHP_COMMENT 124
|
||||
#define SCE_HPHP_COMMENTLINE 125
|
||||
#define SCE_HPHP_STRINGEOL 126
|
||||
#define SCE_PL_DEFAULT 0
|
||||
#define SCE_PL_HERE 1
|
||||
#define SCE_PL_COMMENTLINE 2
|
||||
#define SCE_PL_POD 3
|
||||
#define SCE_PL_NUMBER 4
|
||||
#define SCE_PL_WORD 5
|
||||
#define SCE_PL_STRING 6
|
||||
#define SCE_PL_CHARACTER 7
|
||||
#define SCE_PL_PUNCTUATION 8
|
||||
#define SCE_PL_PREPROCESSOR 9
|
||||
#define SCE_PL_OPERATOR 10
|
||||
#define SCE_PL_IDENTIFIER 11
|
||||
#define SCE_PL_SCALAR 12
|
||||
#define SCE_PL_ARRAY 13
|
||||
#define SCE_PL_HASH 14
|
||||
#define SCE_PL_SYMBOLTABLE 15
|
||||
#define SCE_PL_REF 16
|
||||
#define SCE_PL_REGEX 17
|
||||
#define SCE_PL_REGSUBST 18
|
||||
#define SCE_PL_LONGQUOTE 19
|
||||
#define SCE_PL_BACKTICKS 20
|
||||
#define SCE_PL_DATASECTION 21
|
||||
#define SCE_L_DEFAULT 0
|
||||
#define SCE_L_COMMAND 1
|
||||
#define SCE_L_TAG 2
|
||||
#define SCE_L_MATH 3
|
||||
#define SCE_L_COMMENT 4
|
||||
#define SCE_LUA_DEFAULT 0
|
||||
#define SCE_LUA_COMMENT 1
|
||||
#define SCE_LUA_COMMENTLINE 2
|
||||
#define SCE_LUA_COMMENTDOC 3
|
||||
#define SCE_LUA_NUMBER 4
|
||||
#define SCE_LUA_WORD 5
|
||||
#define SCE_LUA_STRING 6
|
||||
#define SCE_LUA_CHARACTER 7
|
||||
#define SCE_LUA_LITERALSTRING 8
|
||||
#define SCE_LUA_PREPROCESSOR 9
|
||||
#define SCE_LUA_OPERATOR 10
|
||||
#define SCE_LUA_IDENTIFIER 11
|
||||
#define SCE_LUA_STRINGEOL 12
|
||||
#define SCE_ERR_DEFAULT 0
|
||||
#define SCE_ERR_PYTHON 1
|
||||
#define SCE_ERR_GCC 2
|
||||
#define SCE_ERR_MS 3
|
||||
#define SCE_ERR_CMD 4
|
||||
#define SCE_ERR_BORLAND 5
|
||||
#define SCE_ERR_PERL 6
|
||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||
|
||||
#endif
|
||||
508
contrib/src/stc/scintilla/include/Scintilla.h
Normal file
508
contrib/src/stc/scintilla/include/Scintilla.h
Normal file
@@ -0,0 +1,508 @@
|
||||
// Scintilla source code edit control
|
||||
// Scintilla.h - interface to the edit control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
// Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||
// file which contains any comments about the definitions. HFacer.py does the generation.
|
||||
|
||||
#ifndef SCINTILLA_H
|
||||
#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);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
|
||||
//++Autogenerated -- start of section automatically generated from Scintilla.iface
|
||||
#define INVALID_POSITION -1
|
||||
#define SCI_START 2000
|
||||
#define SCI_OPTIONAL_START 3000
|
||||
#define SCI_LEXER_START 4000
|
||||
#define SCI_ADDTEXT 2001
|
||||
#define SCI_ADDSTYLEDTEXT 2002
|
||||
#define SCI_INSERTTEXT 2003
|
||||
#define SCI_CLEARALL 2004
|
||||
#define SCI_CLEARDOCUMENTSTYLE 2005
|
||||
#define SCI_GETLENGTH 2006
|
||||
#define SCI_GETCHARAT 2007
|
||||
#define SCI_GETCURRENTPOS 2008
|
||||
#define SCI_GETANCHOR 2009
|
||||
#define SCI_GETSTYLEAT 2010
|
||||
#define SCI_REDO 2011
|
||||
#define SCI_SETUNDOCOLLECTION 2012
|
||||
#define SCI_SELECTALL 2013
|
||||
#define SCI_SETSAVEPOINT 2014
|
||||
#define SCI_GETSTYLEDTEXT 2015
|
||||
#define SCI_CANREDO 2016
|
||||
#define SCI_MARKERLINEFROMHANDLE 2017
|
||||
#define SCI_MARKERDELETEHANDLE 2018
|
||||
#define SCI_GETUNDOCOLLECTION 2019
|
||||
#define SCWS_INVISIBLE 0
|
||||
#define SCWS_VISIBLEALWAYS 1
|
||||
#define SCWS_VISIBLEAFTERINDENT 2
|
||||
#define SCI_GETVIEWWS 2020
|
||||
#define SCI_SETVIEWWS 2021
|
||||
#define SCI_POSITIONFROMPOINT 2022
|
||||
#define SCI_GOTOLINE 2024
|
||||
#define SCI_GOTOPOS 2025
|
||||
#define SCI_SETANCHOR 2026
|
||||
#define SCI_GETCURLINE 2027
|
||||
#define SCI_GETENDSTYLED 2028
|
||||
#define SCI_CONVERTEOLS 2029
|
||||
#define SC_EOL_CRLF 0
|
||||
#define SC_EOL_CR 1
|
||||
#define SC_EOL_LF 2
|
||||
#define SCI_GETEOLMODE 2030
|
||||
#define SCI_SETEOLMODE 2031
|
||||
#define SCI_STARTSTYLING 2032
|
||||
#define SCI_SETSTYLING 2033
|
||||
#define SCI_GETBUFFEREDDRAW 2034
|
||||
#define SCI_SETBUFFEREDDRAW 2035
|
||||
#define SCI_SETTABWIDTH 2036
|
||||
#define SCI_GETTABWIDTH 2121
|
||||
#define SC_CP_UTF8 65001
|
||||
#define SCI_SETCODEPAGE 2037
|
||||
#define SCI_SETUSEPALETTE 2039
|
||||
#define MARKER_MAX 31
|
||||
#define SC_MARK_CIRCLE 0
|
||||
#define SC_MARK_ROUNDRECT 1
|
||||
#define SC_MARK_ARROW 2
|
||||
#define SC_MARK_SMALLRECT 3
|
||||
#define SC_MARK_SHORTARROW 4
|
||||
#define SC_MARK_EMPTY 5
|
||||
#define SC_MARK_ARROWDOWN 6
|
||||
#define SC_MARK_MINUS 7
|
||||
#define SC_MARK_PLUS 8
|
||||
#define SC_MARKNUM_FOLDER 30
|
||||
#define SC_MARKNUM_FOLDEROPEN 31
|
||||
#define SCI_MARKERDEFINE 2040
|
||||
#define SCI_MARKERSETFORE 2041
|
||||
#define SCI_MARKERSETBACK 2042
|
||||
#define SCI_MARKERADD 2043
|
||||
#define SCI_MARKERDELETE 2044
|
||||
#define SCI_MARKERDELETEALL 2045
|
||||
#define SCI_MARKERGET 2046
|
||||
#define SCI_MARKERNEXT 2047
|
||||
#define SCI_MARKERPREVIOUS 2048
|
||||
#define SC_MARGIN_SYMBOL 0
|
||||
#define SC_MARGIN_NUMBER 1
|
||||
#define SCI_SETMARGINTYPEN 2240
|
||||
#define SCI_GETMARGINTYPEN 2241
|
||||
#define SCI_SETMARGINWIDTHN 2242
|
||||
#define SCI_GETMARGINWIDTHN 2243
|
||||
#define SCI_SETMARGINMASKN 2244
|
||||
#define SCI_GETMARGINMASKN 2245
|
||||
#define SCI_SETMARGINSENSITIVEN 2246
|
||||
#define SCI_GETMARGINSENSITIVEN 2247
|
||||
#define STYLE_DEFAULT 32
|
||||
#define STYLE_LINENUMBER 33
|
||||
#define STYLE_BRACELIGHT 34
|
||||
#define STYLE_BRACEBAD 35
|
||||
#define STYLE_CONTROLCHAR 36
|
||||
#define STYLE_INDENTGUIDE 37
|
||||
#define STYLE_MAX 127
|
||||
#define SC_CHARSET_ANSI 0
|
||||
#define SC_CHARSET_DEFAULT 1
|
||||
#define SC_CHARSET_BALTIC 186
|
||||
#define SC_CHARSET_CHINESEBIG5 136
|
||||
#define SC_CHARSET_EASTEUROPE 238
|
||||
#define SC_CHARSET_GB2312 134
|
||||
#define SC_CHARSET_GREEK 161
|
||||
#define SC_CHARSET_HANGUL 129
|
||||
#define SC_CHARSET_MAC 77
|
||||
#define SC_CHARSET_OEM 255
|
||||
#define SC_CHARSET_RUSSIAN 204
|
||||
#define SC_CHARSET_SHIFTJIS 128
|
||||
#define SC_CHARSET_SYMBOL 2
|
||||
#define SC_CHARSET_TURKISH 162
|
||||
#define SC_CHARSET_JOHAB 130
|
||||
#define SC_CHARSET_HEBREW 177
|
||||
#define SC_CHARSET_ARABIC 178
|
||||
#define SC_CHARSET_VIETNAMESE 163
|
||||
#define SC_CHARSET_THAI 222
|
||||
#define SCI_STYLECLEARALL 2050
|
||||
#define SCI_STYLESETFORE 2051
|
||||
#define SCI_STYLESETBACK 2052
|
||||
#define SCI_STYLESETBOLD 2053
|
||||
#define SCI_STYLESETITALIC 2054
|
||||
#define SCI_STYLESETSIZE 2055
|
||||
#define SCI_STYLESETFONT 2056
|
||||
#define SCI_STYLESETEOLFILLED 2057
|
||||
#define SCI_STYLERESETDEFAULT 2058
|
||||
#define SCI_STYLESETUNDERLINE 2059
|
||||
#define SCI_STYLESETCHARACTERSET 2066
|
||||
#define SCI_SETSELFORE 2067
|
||||
#define SCI_SETSELBACK 2068
|
||||
#define SCI_SETCARETFORE 2069
|
||||
#define SCI_ASSIGNCMDKEY 2070
|
||||
#define SCI_CLEARCMDKEY 2071
|
||||
#define SCI_CLEARALLCMDKEYS 2072
|
||||
#define SCI_SETSTYLINGEX 2073
|
||||
#define SCI_STYLESETVISIBLE 2074
|
||||
#define SCI_GETCARETPERIOD 2075
|
||||
#define SCI_SETCARETPERIOD 2076
|
||||
#define SCI_SETWORDCHARS 2077
|
||||
#define SCI_BEGINUNDOACTION 2078
|
||||
#define SCI_ENDUNDOACTION 2079
|
||||
#define INDIC_MAX 7
|
||||
#define INDIC_PLAIN 0
|
||||
#define INDIC_SQUIGGLE 1
|
||||
#define INDIC_TT 2
|
||||
#define INDIC_DIAGONAL 3
|
||||
#define INDIC_STRIKE 4
|
||||
#define INDIC0_MASK 32
|
||||
#define INDIC1_MASK 64
|
||||
#define INDIC2_MASK 128
|
||||
#define INDICS_MASK INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
|
||||
#define SCI_INDICSETSTYLE 2080
|
||||
#define SCI_INDICGETSTYLE 2081
|
||||
#define SCI_INDICSETFORE 2082
|
||||
#define SCI_INDICGETFORE 2083
|
||||
#define SCI_SETSTYLEBITS 2090
|
||||
#define SCI_GETSTYLEBITS 2091
|
||||
#define SCI_SETLINESTATE 2092
|
||||
#define SCI_GETLINESTATE 2093
|
||||
#define SCI_GETMAXLINESTATE 2094
|
||||
#define SCI_AUTOCSHOW 2100
|
||||
#define SCI_AUTOCCANCEL 2101
|
||||
#define SCI_AUTOCACTIVE 2102
|
||||
#define SCI_AUTOCPOSSTART 2103
|
||||
#define SCI_AUTOCCOMPLETE 2104
|
||||
#define SCI_AUTOCSTOPS 2105
|
||||
#define SCI_AUTOCSETSEPARATOR 2106
|
||||
#define SCI_AUTOCGETSEPARATOR 2107
|
||||
#define SCI_AUTOCSELECT 2108
|
||||
#define SCI_AUTOCSETCANCELATSTART 2110
|
||||
#define SCI_AUTOCGETCANCELATSTART 2111
|
||||
#define SCI_AUTOCSETFILLUPS 2112
|
||||
#define SCI_AUTOCSETCHOOSESINGLE 2113
|
||||
#define SCI_AUTOCGETCHOOSESINGLE 2114
|
||||
#define SCI_AUTOCSETIGNORECASE 2115
|
||||
#define SCI_AUTOCGETIGNORECASE 2116
|
||||
#define SCI_SETINDENT 2122
|
||||
#define SCI_GETINDENT 2123
|
||||
#define SCI_SETUSETABS 2124
|
||||
#define SCI_GETUSETABS 2125
|
||||
#define SCI_SETLINEINDENTATION 2126
|
||||
#define SCI_GETLINEINDENTATION 2127
|
||||
#define SCI_GETLINEINDENTPOSITION 2128
|
||||
#define SCI_GETCOLUMN 2129
|
||||
#define SCI_SETHSCROLLBAR 2130
|
||||
#define SCI_GETHSCROLLBAR 2131
|
||||
#define SCI_SETINDENTATIONGUIDES 2132
|
||||
#define SCI_GETINDENTATIONGUIDES 2133
|
||||
#define SCI_SETHIGHLIGHTGUIDE 2134
|
||||
#define SCI_GETHIGHLIGHTGUIDE 2135
|
||||
#define SCI_GETLINEENDPOSITION 2136
|
||||
#define SCI_GETCODEPAGE 2137
|
||||
#define SCI_GETCARETFORE 2138
|
||||
#define SCI_GETUSEPALETTE 2139
|
||||
#define SCI_GETREADONLY 2140
|
||||
#define SCI_SETCURRENTPOS 2141
|
||||
#define SCI_SETSELECTIONSTART 2142
|
||||
#define SCI_GETSELECTIONSTART 2143
|
||||
#define SCI_SETSELECTIONEND 2144
|
||||
#define SCI_GETSELECTIONEND 2145
|
||||
#define SCI_SETPRINTMAGNIFICATION 2146
|
||||
#define SCI_GETPRINTMAGNIFICATION 2147
|
||||
#define SC_PRINT_NORMAL 0
|
||||
#define SC_PRINT_INVERTLIGHT 1
|
||||
#define SC_PRINT_BLACKONWHITE 2
|
||||
#define SCI_SETPRINTCOLOURMODE 2148
|
||||
#define SCI_GETPRINTCOLOURMODE 2149
|
||||
#define SCFIND_DOWN 1
|
||||
#define SCFIND_WHOLEWORD 2
|
||||
#define SCFIND_MATCHCASE 4
|
||||
#define SCFIND_WORDSTART 0x00100000
|
||||
#define SCFIND_REGEXP 0x00200000
|
||||
#define SCI_FINDTEXT 2150
|
||||
#define SCI_FORMATRANGE 2151
|
||||
#define SCI_GETFIRSTVISIBLELINE 2152
|
||||
#define SCI_GETLINE 2153
|
||||
#define SCI_GETLINECOUNT 2154
|
||||
#define SCI_SETMARGINLEFT 2155
|
||||
#define SCI_GETMARGINLEFT 2156
|
||||
#define SCI_SETMARGINRIGHT 2157
|
||||
#define SCI_GETMARGINRIGHT 2158
|
||||
#define SCI_GETMODIFY 2159
|
||||
#define SCI_SETSEL 2160
|
||||
#define SCI_GETSELTEXT 2161
|
||||
#define SCI_GETTEXTRANGE 2162
|
||||
#define SCI_HIDESELECTION 2163
|
||||
#define SCI_POINTXFROMPOSITION 2164
|
||||
#define SCI_POINTYFROMPOSITION 2165
|
||||
#define SCI_LINEFROMPOSITION 2166
|
||||
#define SCI_POSITIONFROMLINE 2167
|
||||
#define SCI_LINESCROLL 2168
|
||||
#define SCI_SCROLLCARET 2169
|
||||
#define SCI_REPLACESEL 2170
|
||||
#define SCI_SETREADONLY 2171
|
||||
#define SCI_NULL 2172
|
||||
#define SCI_CANPASTE 2173
|
||||
#define SCI_CANUNDO 2174
|
||||
#define SCI_EMPTYUNDOBUFFER 2175
|
||||
#define SCI_UNDO 2176
|
||||
#define SCI_CUT 2177
|
||||
#define SCI_COPY 2178
|
||||
#define SCI_PASTE 2179
|
||||
#define SCI_CLEAR 2180
|
||||
#define SCI_SETTEXT 2181
|
||||
#define SCI_GETTEXT 2182
|
||||
#define SCI_GETTEXTLENGTH 2183
|
||||
#define SCI_GETDIRECTFUNCTION 2184
|
||||
#define SCI_GETDIRECTPOINTER 2185
|
||||
#define SCI_SETOVERTYPE 2186
|
||||
#define SCI_GETOVERTYPE 2187
|
||||
#define SCI_CALLTIPSHOW 2200
|
||||
#define SCI_CALLTIPCANCEL 2201
|
||||
#define SCI_CALLTIPACTIVE 2202
|
||||
#define SCI_CALLTIPPOSSTART 2203
|
||||
#define SCI_CALLTIPSETHLT 2204
|
||||
#define SCI_CALLTIPSETBACK 2205
|
||||
#define SCI_VISIBLEFROMDOCLINE 2220
|
||||
#define SCI_DOCLINEFROMVISIBLE 2221
|
||||
#define SC_FOLDLEVELBASE 0x400
|
||||
#define SC_FOLDLEVELWHITEFLAG 0x1000
|
||||
#define SC_FOLDLEVELHEADERFLAG 0x2000
|
||||
#define SC_FOLDLEVELNUMBERMASK 0x0FFF
|
||||
#define SCI_SETFOLDLEVEL 2222
|
||||
#define SCI_GETFOLDLEVEL 2223
|
||||
#define SCI_GETLASTCHILD 2224
|
||||
#define SCI_GETFOLDPARENT 2225
|
||||
#define SCI_SHOWLINES 2226
|
||||
#define SCI_HIDELINES 2227
|
||||
#define SCI_GETLINEVISIBLE 2228
|
||||
#define SCI_SETFOLDEXPANDED 2229
|
||||
#define SCI_GETFOLDEXPANDED 2230
|
||||
#define SCI_TOGGLEFOLD 2231
|
||||
#define SCI_ENSUREVISIBLE 2232
|
||||
#define SCI_SETFOLDFLAGS 2233
|
||||
#define SCI_LINEDOWN 2300
|
||||
#define SCI_LINEDOWNEXTEND 2301
|
||||
#define SCI_LINEUP 2302
|
||||
#define SCI_LINEUPEXTEND 2303
|
||||
#define SCI_CHARLEFT 2304
|
||||
#define SCI_CHARLEFTEXTEND 2305
|
||||
#define SCI_CHARRIGHT 2306
|
||||
#define SCI_CHARRIGHTEXTEND 2307
|
||||
#define SCI_WORDLEFT 2308
|
||||
#define SCI_WORDLEFTEXTEND 2309
|
||||
#define SCI_WORDRIGHT 2310
|
||||
#define SCI_WORDRIGHTEXTEND 2311
|
||||
#define SCI_HOME 2312
|
||||
#define SCI_HOMEEXTEND 2313
|
||||
#define SCI_LINEEND 2314
|
||||
#define SCI_LINEENDEXTEND 2315
|
||||
#define SCI_DOCUMENTSTART 2316
|
||||
#define SCI_DOCUMENTSTARTEXTEND 2317
|
||||
#define SCI_DOCUMENTEND 2318
|
||||
#define SCI_DOCUMENTENDEXTEND 2319
|
||||
#define SCI_PAGEUP 2320
|
||||
#define SCI_PAGEUPEXTEND 2321
|
||||
#define SCI_PAGEDOWN 2322
|
||||
#define SCI_PAGEDOWNEXTEND 2323
|
||||
#define SCI_EDITTOGGLEOVERTYPE 2324
|
||||
#define SCI_CANCEL 2325
|
||||
#define SCI_DELETEBACK 2326
|
||||
#define SCI_TAB 2327
|
||||
#define SCI_BACKTAB 2328
|
||||
#define SCI_NEWLINE 2329
|
||||
#define SCI_FORMFEED 2330
|
||||
#define SCI_VCHOME 2331
|
||||
#define SCI_VCHOMEEXTEND 2332
|
||||
#define SCI_ZOOMIN 2333
|
||||
#define SCI_ZOOMOUT 2334
|
||||
#define SCI_DELWORDLEFT 2335
|
||||
#define SCI_DELWORDRIGHT 2336
|
||||
#define SCI_LINECUT 2337
|
||||
#define SCI_LINEDELETE 2338
|
||||
#define SCI_LINETRANSPOSE 2339
|
||||
#define SCI_LOWERCASE 2340
|
||||
#define SCI_UPPERCASE 2341
|
||||
#define SCI_LINESCROLLDOWN 2342
|
||||
#define SCI_LINESCROLLUP 2343
|
||||
#define SCI_LINELENGTH 2350
|
||||
#define SCI_BRACEHIGHLIGHT 2351
|
||||
#define SCI_BRACEBADLIGHT 2352
|
||||
#define SCI_BRACEMATCH 2353
|
||||
#define SCI_GETVIEWEOL 2355
|
||||
#define SCI_SETVIEWEOL 2356
|
||||
#define SCI_GETDOCPOINTER 2357
|
||||
#define SCI_SETDOCPOINTER 2358
|
||||
#define SCI_SETMODEVENTMASK 2359
|
||||
#define EDGE_NONE 0
|
||||
#define EDGE_LINE 1
|
||||
#define EDGE_BACKGROUND 2
|
||||
#define SCI_GETEDGECOLUMN 2360
|
||||
#define SCI_SETEDGECOLUMN 2361
|
||||
#define SCI_GETEDGEMODE 2362
|
||||
#define SCI_SETEDGEMODE 2363
|
||||
#define SCI_GETEDGECOLOUR 2364
|
||||
#define SCI_SETEDGECOLOUR 2365
|
||||
#define SCI_SEARCHANCHOR 2366
|
||||
#define SCI_SEARCHNEXT 2367
|
||||
#define SCI_SEARCHPREV 2368
|
||||
#define CARET_SLOP 0x01
|
||||
#define CARET_CENTER 0x02
|
||||
#define CARET_STRICT 0x04
|
||||
#define SCI_SETCARETPOLICY 2369
|
||||
#define SCI_LINESONSCREEN 2370
|
||||
#define SCI_USEPOPUP 2371
|
||||
#define SCI_SELECTIONISRECTANGLE 2372
|
||||
#define SCI_SETZOOM 2373
|
||||
#define SCI_GETZOOM 2374
|
||||
#define SCI_CREATEDOCUMENT 2375
|
||||
#define SCI_ADDREFDOCUMENT 2376
|
||||
#define SCI_RELEASEDOCUMENT 2377
|
||||
#define SCI_GETMODEVENTMASK 2378
|
||||
#define SCI_GRABFOCUS 2400
|
||||
#define SCI_STARTRECORD 3001
|
||||
#define SCI_STOPRECORD 3002
|
||||
#define SCI_SETLEXER 4001
|
||||
#define SCI_GETLEXER 4002
|
||||
#define SCI_COLOURISE 4003
|
||||
#define SCI_SETPROPERTY 4004
|
||||
#define SCI_SETKEYWORDS 4005
|
||||
#define SC_MOD_INSERTTEXT 0x1
|
||||
#define SC_MOD_DELETETEXT 0x2
|
||||
#define SC_MOD_CHANGESTYLE 0x4
|
||||
#define SC_MOD_CHANGEFOLD 0x8
|
||||
#define SC_PERFORMED_USER 0x10
|
||||
#define SC_PERFORMED_UNDO 0x20
|
||||
#define SC_PERFORMED_REDO 0x40
|
||||
#define SC_LASTSTEPINUNDOREDO 0x100
|
||||
#define SC_MOD_CHANGEMARKER 0x200
|
||||
#define SC_MOD_BEFOREINSERT 0x400
|
||||
#define SC_MOD_BEFOREDELETE 0x800
|
||||
#define SC_MODEVENTMASKALL 0xF77
|
||||
#define SCEN_CHANGE 768
|
||||
#define SCEN_SETFOCUS 512
|
||||
#define SCEN_KILLFOCUS 256
|
||||
#define SCK_DOWN 300
|
||||
#define SCK_UP 301
|
||||
#define SCK_LEFT 302
|
||||
#define SCK_RIGHT 303
|
||||
#define SCK_HOME 304
|
||||
#define SCK_END 305
|
||||
#define SCK_PRIOR 306
|
||||
#define SCK_NEXT 307
|
||||
#define SCK_DELETE 308
|
||||
#define SCK_INSERT 309
|
||||
#define SCK_ESCAPE 7
|
||||
#define SCK_BACK 8
|
||||
#define SCK_TAB 9
|
||||
#define SCK_RETURN 13
|
||||
#define SCK_ADD 310
|
||||
#define SCK_SUBTRACT 311
|
||||
#define SCK_DIVIDE 312
|
||||
#define SCMOD_SHIFT 1
|
||||
#define SCMOD_CTRL 2
|
||||
#define SCMOD_ALT 4
|
||||
#define SCN_STYLENEEDED 2000
|
||||
#define SCN_CHARADDED 2001
|
||||
#define SCN_SAVEPOINTREACHED 2002
|
||||
#define SCN_SAVEPOINTLEFT 2003
|
||||
#define SCN_MODIFYATTEMPTRO 2004
|
||||
#define SCN_KEY 2005
|
||||
#define SCN_DOUBLECLICK 2006
|
||||
#define SCN_UPDATEUI 2007
|
||||
#define SCN_CHECKBRACE 2007
|
||||
#define SCN_MODIFIED 2008
|
||||
#define SCN_MACRORECORD 2009
|
||||
#define SCN_MARGINCLICK 2010
|
||||
#define SCN_NEEDSHOWN 2011
|
||||
#define SCN_POSCHANGED 2012
|
||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||
|
||||
// Optional module for macro recording
|
||||
#ifdef MACRO_SUPPORT
|
||||
typedef void (tMacroRecorder)(unsigned int iMessage, unsigned long wParam,
|
||||
long lParam, void *userData);
|
||||
#endif
|
||||
|
||||
// These structures are defined to be exactly the same shape as the Win32
|
||||
// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
|
||||
// So older code that treats Scintilla as a RichEdit will work.
|
||||
|
||||
struct CharacterRange {
|
||||
long cpMin;
|
||||
long cpMax;
|
||||
};
|
||||
|
||||
struct TextRange {
|
||||
CharacterRange chrg;
|
||||
char *lpstrText;
|
||||
};
|
||||
|
||||
struct TextToFind {
|
||||
CharacterRange chrg;
|
||||
char *lpstrText;
|
||||
CharacterRange chrgText;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_H
|
||||
|
||||
// This structure is used in printing and requires some of the graphics types
|
||||
// from Platform.h. Not needed by most client code.
|
||||
|
||||
struct RangeToFormat {
|
||||
SurfaceID hdc;
|
||||
SurfaceID hdcTarget;
|
||||
PRectangle rc;
|
||||
PRectangle rcPage;
|
||||
CharacterRange chrg;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct NotifyHeader {
|
||||
// hwndFrom is really an environment specifc window handle or pointer
|
||||
// but most clients of Scintilla.h do not have this type visible.
|
||||
//WindowID hwndFrom;
|
||||
void *hwndFrom;
|
||||
unsigned int idFrom;
|
||||
unsigned int code;
|
||||
};
|
||||
|
||||
struct SCNotification {
|
||||
NotifyHeader nmhdr;
|
||||
int position; // SCN_STYLENEEDED, SCN_MODIFIED
|
||||
int ch; // SCN_CHARADDED, SCN_KEY
|
||||
int modifiers; // SCN_KEY
|
||||
int modificationType; // SCN_MODIFIED
|
||||
const char *text; // SCN_MODIFIED
|
||||
int length; // SCN_MODIFIED
|
||||
int linesAdded; // SCN_MODIFIED
|
||||
#ifdef MACRO_SUPPORT
|
||||
int message; // SCN_MACRORECORD
|
||||
int wParam; // SCN_MACRORECORD
|
||||
int lParam; // SCN_MACRORECORD
|
||||
#endif
|
||||
int line; // SCN_MODIFIED
|
||||
int foldLevelNow; // SCN_MODIFIED
|
||||
int foldLevelPrev; // SCN_MODIFIED
|
||||
int margin; // SCN_MARGINCLICK
|
||||
};
|
||||
|
||||
#define SC_MASK_FOLDERS ((1<<SC_MARKNUM_FOLDER) | (1<<SC_MARKNUM_FOLDEROPEN))
|
||||
|
||||
// Deprecation section listing all API features that are deprecated and will
|
||||
// will be removed completely in a future version.
|
||||
// To enable these features define INCLUDE_DEPRECATED_FEATURES
|
||||
|
||||
#ifdef INCLUDE_DEPRECATED_FEATURES
|
||||
|
||||
// Deprecated in 1.27
|
||||
#define SC_UNDOCOLLECT_NONE 0
|
||||
#define SC_UNDOCOLLECT_AUTOSTART 1
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1452
contrib/src/stc/scintilla/include/Scintilla.iface
Normal file
1452
contrib/src/stc/scintilla/include/Scintilla.iface
Normal file
File diff suppressed because it is too large
Load Diff
46
contrib/src/stc/scintilla/include/ScintillaWidget.h
Normal file
46
contrib/src/stc/scintilla/include/ScintillaWidget.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Scintilla source code edit control
|
||||
// ScintillaWidget.h - definition of Scintilla widget for GTK+
|
||||
// Only needed by GTK+ code but is harmless on other platforms.
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef SCINTILLAWIDGET_H
|
||||
#define SCINTILLAWIDGET_H
|
||||
|
||||
#if PLAT_GTK
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject)
|
||||
#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
|
||||
#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ())
|
||||
|
||||
typedef struct _ScintillaObject ScintillaObject;
|
||||
typedef struct _ScintillaClass ScintillaClass;
|
||||
|
||||
struct _ScintillaObject {
|
||||
GtkFixed vbox;
|
||||
void *pscin;
|
||||
};
|
||||
|
||||
struct _ScintillaClass {
|
||||
GtkFixedClass parent_class;
|
||||
|
||||
void (* command) (ScintillaObject *ttt);
|
||||
void (* notify) (ScintillaObject *ttt);
|
||||
};
|
||||
|
||||
guint scintilla_get_type (void);
|
||||
GtkWidget* scintilla_new (void);
|
||||
void scintilla_set_id (ScintillaObject *sci,int id);
|
||||
long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
183
contrib/src/stc/scintilla/include/WinDefs.h
Normal file
183
contrib/src/stc/scintilla/include/WinDefs.h
Normal file
@@ -0,0 +1,183 @@
|
||||
// Scintilla source code edit control
|
||||
// WinDefs.h - the subset of definitions from Windows needed by Scintilla for GTK+
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef WINDEFS_H
|
||||
#define WINDEFS_H
|
||||
|
||||
#define WORD short
|
||||
#define WPARAM unsigned long
|
||||
#define LPARAM long
|
||||
#define LRESULT long
|
||||
#define DWORD long
|
||||
|
||||
#define UINT unsigned int
|
||||
#define LPSTR char *
|
||||
#define LONG long
|
||||
|
||||
//#if 0
|
||||
/* RTF control */
|
||||
#define EM_CANPASTE (1074)
|
||||
#define EM_CANUNDO (198)
|
||||
#define EM_CHARFROMPOS (215)
|
||||
#define EM_EMPTYUNDOBUFFER (205)
|
||||
#define EM_EXGETSEL (1076)
|
||||
#define EM_EXLINEFROMCHAR (1078)
|
||||
#define EM_EXSETSEL (1079)
|
||||
#define EM_FINDTEXT (1080)
|
||||
#define EM_FINDTEXTEX (1103)
|
||||
#define EM_FORMATRANGE (1081)
|
||||
#define EM_GETFIRSTVISIBLELINE (206)
|
||||
#define EM_GETLINE (196)
|
||||
#define EM_GETLINECOUNT (186)
|
||||
#define EM_GETMARGINS (212)
|
||||
#define EM_GETMODIFY (184)
|
||||
#define EM_GETRECT (178)
|
||||
#define EM_GETSEL (176)
|
||||
#define EM_GETSELTEXT (1086)
|
||||
#define EM_GETTEXTRANGE (1099)
|
||||
#define EM_HIDESELECTION (1087)
|
||||
#define EM_LINEFROMCHAR (201)
|
||||
#define EM_LINEINDEX (187)
|
||||
#define EM_LINELENGTH (193)
|
||||
#define EM_LINESCROLL (182)
|
||||
#define EM_POSFROMCHAR (214)
|
||||
#define EM_REPLACESEL (194)
|
||||
#define EM_SCROLLCARET (183)
|
||||
#define EM_SELECTIONTYPE (1090)
|
||||
#define EM_SETMARGINS (211)
|
||||
#define EM_SETREADONLY (207)
|
||||
#define EM_SETSEL (177)
|
||||
#define EM_UNDO (199)
|
||||
|
||||
#define WM_NULL (0)
|
||||
#define WM_CLEAR (771)
|
||||
#define WM_COPY (769)
|
||||
#define WM_CUT (768)
|
||||
#define WM_GETTEXT (13)
|
||||
#define WM_GETTEXTLENGTH (14)
|
||||
#define WM_PASTE (770)
|
||||
#define WM_SETTEXT (12)
|
||||
#define WM_UNDO (772)
|
||||
|
||||
#define EN_CHANGE (768)
|
||||
#define EN_KILLFOCUS (512)
|
||||
#define EN_SETFOCUS (256)
|
||||
|
||||
#define EC_LEFTMARGIN 1
|
||||
#define EC_RIGHTMARGIN 2
|
||||
#define EC_USEFONTINFO 0xffff
|
||||
|
||||
//#endif
|
||||
|
||||
#if 0
|
||||
#if PLAT_GTK
|
||||
#define VK_DOWN GDK_Down
|
||||
#define VK_UP GDK_Up
|
||||
#define VK_LEFT GDK_Left
|
||||
#define VK_RIGHT GDK_Right
|
||||
#define VK_HOME GDK_Home
|
||||
#define VK_END GDK_End
|
||||
#define VK_PRIOR GDK_Page_Up
|
||||
#define VK_NEXT GDK_Page_Down
|
||||
#define VK_DELETE GDK_Delete
|
||||
#define VK_INSERT GDK_Insert
|
||||
#define VK_ESCAPE GDK_Escape
|
||||
#define VK_BACK GDK_BackSpace
|
||||
#define VK_TAB GDK_Tab
|
||||
#define VK_RETURN GDK_Return
|
||||
#define VK_ADD GDK_KP_Add
|
||||
#define VK_SUBTRACT GDK_KP_Subtract
|
||||
#define VK_DIVIDE GDK_KP_Divide
|
||||
#endif
|
||||
|
||||
#if PLAT_WX
|
||||
#define VK_DOWN WXK_DOWN
|
||||
#define VK_UP WXK_UP
|
||||
#define VK_LEFT WXK_LEFT
|
||||
#define VK_RIGHT WXK_RIGHT
|
||||
#define VK_HOME WXK_HOME
|
||||
#define VK_END WXK_END
|
||||
#define VK_PRIOR WXK_PRIOR
|
||||
#define VK_NEXT WXK_NEXT
|
||||
#define VK_DELETE WXK_DELETE
|
||||
#define VK_INSERT WXK_INSERT
|
||||
#define VK_ESCAPE WXK_ESCAPE
|
||||
#define VK_BACK WXK_BACK
|
||||
#define VK_TAB WXK_TAB
|
||||
#define VK_RETURN WXK_RETURN
|
||||
#define VK_ADD WXK_ADD
|
||||
#define VK_SUBTRACT WXK_SUBTRACT
|
||||
//TODO:
|
||||
#define VK_DIVIDE WXK_DIVIDE
|
||||
#endif
|
||||
|
||||
#define SHIFT_PRESSED 1
|
||||
#define LEFT_CTRL_PRESSED 2
|
||||
#define LEFT_ALT_PRESSED 4
|
||||
|
||||
// Are these needed any more
|
||||
#define LPSTR char *
|
||||
#define LONG long
|
||||
#define LPDWORD (long *)
|
||||
|
||||
/* SELCHANGE structure */
|
||||
#define SEL_EMPTY (0)
|
||||
#define SEL_TEXT (1)
|
||||
#define SEL_OBJECT (2)
|
||||
#define SEL_MULTICHAR (4)
|
||||
#define SEL_MULTIOBJECT (8)
|
||||
|
||||
struct RECT {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
};
|
||||
|
||||
/* FINDREPLACE structure */
|
||||
|
||||
#define FR_MATCHCASE (0x4)
|
||||
#define FR_WHOLEWORD (0x2)
|
||||
#define FR_DOWN (0x1)
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
struct CHARRANGE {
|
||||
LONG cpMin;
|
||||
LONG cpMax;
|
||||
};
|
||||
|
||||
struct TEXTRANGE {
|
||||
CHARRANGE chrg;
|
||||
LPSTR lpstrText;
|
||||
};
|
||||
|
||||
struct FINDTEXTEX {
|
||||
CHARRANGE chrg;
|
||||
LPSTR lpstrText;
|
||||
CHARRANGE chrgText;
|
||||
};
|
||||
|
||||
struct NMHDR {
|
||||
WindowID hwndFrom;
|
||||
UINT idFrom;
|
||||
UINT code;
|
||||
};
|
||||
|
||||
struct FORMATRANGE {
|
||||
SurfaceID hdc;
|
||||
SurfaceID hdcTarget;
|
||||
RECT rc;
|
||||
RECT rcPage;
|
||||
CHARRANGE chrg;
|
||||
};
|
||||
#endif
|
||||
|
||||
//#define MAKELONG(a, b) ((a) | ((b) << 16))
|
||||
//#define LOWORD(x) (x & 0xffff)
|
||||
//#define HIWORD(x) (x >> 16)
|
||||
|
||||
#endif
|
||||
47
contrib/src/stc/scintilla/include/WindowAccessor.h
Normal file
47
contrib/src/stc/scintilla/include/WindowAccessor.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// WindowAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
class WindowAccessor : public Accessor {
|
||||
// Private so WindowAccessor objects can not be copied
|
||||
WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
|
||||
WindowAccessor &operator=(const WindowAccessor &) { return *this; }
|
||||
protected:
|
||||
WindowID id;
|
||||
PropSet &props;
|
||||
int lenDoc;
|
||||
|
||||
char styleBuf[bufferSize];
|
||||
int validLen;
|
||||
char chFlags;
|
||||
char chWhile;
|
||||
unsigned int startSeg;
|
||||
|
||||
bool InternalIsLeadByte(char ch);
|
||||
void Fill(int position);
|
||||
public:
|
||||
WindowAccessor(WindowID id_, PropSet &props_) :
|
||||
Accessor(), id(id_), props(props_),
|
||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||
}
|
||||
~WindowAccessor();
|
||||
char StyleAt(int position);
|
||||
int GetLine(int position);
|
||||
int LineStart(int line);
|
||||
int LevelAt(int line);
|
||||
int Length();
|
||||
void Flush();
|
||||
int GetLineState(int line);
|
||||
int SetLineState(int line, int state);
|
||||
int GetPropertyInt(const char *key, int defaultValue=0) {
|
||||
return props.GetInt(key, defaultValue);
|
||||
}
|
||||
|
||||
void StartAt(unsigned int start, char chMask=31);
|
||||
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
|
||||
unsigned int GetStartSegment() { return startSeg; }
|
||||
void StartSegment(unsigned int pos);
|
||||
void ColourTo(unsigned int pos, int chAttr);
|
||||
void SetLevel(int line, int level);
|
||||
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
|
||||
};
|
||||
121
contrib/src/stc/scintilla/src/AutoComplete.cxx
Normal file
121
contrib/src/stc/scintilla/src/AutoComplete.cxx
Normal file
@@ -0,0 +1,121 @@
|
||||
// Scintilla source code edit control
|
||||
// AutoComplete.cxx - defines the auto completion list box
|
||||
// Copyright 1998-2000 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 "Platform.h"
|
||||
|
||||
#include "AutoComplete.h"
|
||||
|
||||
AutoComplete::AutoComplete() :
|
||||
active(false),
|
||||
separator(' '),
|
||||
ignoreCase(false),
|
||||
chooseSingle(false),
|
||||
posStart(0),
|
||||
startLen(0),
|
||||
cancelAtStartPos(true) {
|
||||
stopChars[0] = '\0';
|
||||
fillUpChars[0] = '\0';
|
||||
}
|
||||
|
||||
AutoComplete::~AutoComplete() {
|
||||
lb.Destroy();
|
||||
}
|
||||
|
||||
bool AutoComplete::Active() {
|
||||
return active;
|
||||
}
|
||||
|
||||
void AutoComplete::Start(Window &parent, int ctrlID, int position, int startLen_) {
|
||||
if (!lb.Created()) {
|
||||
lb.Create(parent, ctrlID);
|
||||
}
|
||||
lb.Clear();
|
||||
active = true;
|
||||
startLen = startLen_;
|
||||
posStart = position;
|
||||
}
|
||||
|
||||
void AutoComplete::SetStopChars(const char *stopChars_) {
|
||||
strncpy(stopChars, stopChars_, sizeof(stopChars));
|
||||
stopChars[sizeof(stopChars) - 1] = '\0';
|
||||
}
|
||||
|
||||
bool AutoComplete::IsStopChar(char ch) {
|
||||
return ch && strchr(stopChars, ch);
|
||||
}
|
||||
|
||||
void AutoComplete::SetFillUpChars(const char *fillUpChars_) {
|
||||
strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars));
|
||||
fillUpChars[sizeof(fillUpChars) - 1] = '\0';
|
||||
}
|
||||
|
||||
bool AutoComplete::IsFillUpChar(char ch) {
|
||||
return ch && strchr(fillUpChars, ch);
|
||||
}
|
||||
|
||||
void AutoComplete::SetSeparator(char separator_) {
|
||||
separator = separator_;
|
||||
}
|
||||
|
||||
char AutoComplete::GetSeparator() {
|
||||
return separator;
|
||||
}
|
||||
|
||||
void AutoComplete::SetList(const char *list) {
|
||||
lb.Clear();
|
||||
char *words = new char[strlen(list) + 1];
|
||||
if (words) {
|
||||
strcpy(words, list);
|
||||
char *startword = words;
|
||||
int i = 0;
|
||||
for (; words && words[i]; i++) {
|
||||
if (words[i] == separator) {
|
||||
words[i] = '\0';
|
||||
lb.Append(startword);
|
||||
startword = words + i + 1;
|
||||
}
|
||||
}
|
||||
if (startword) {
|
||||
lb.Append(startword);
|
||||
}
|
||||
delete []words;
|
||||
}
|
||||
lb.Sort();
|
||||
}
|
||||
|
||||
void AutoComplete::Show() {
|
||||
lb.Show();
|
||||
lb.Select(0);
|
||||
}
|
||||
|
||||
void AutoComplete::Cancel() {
|
||||
if (lb.Created()) {
|
||||
lb.Destroy();
|
||||
active = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AutoComplete::Move(int delta) {
|
||||
int count = lb.Length();
|
||||
int current = lb.GetSelection();
|
||||
current += delta;
|
||||
if (current >= count)
|
||||
current = count - 1;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
lb.Select(current);
|
||||
}
|
||||
|
||||
void AutoComplete::Select(const char *word) {
|
||||
int pos = lb.Find(word);
|
||||
//Platform::DebugPrintf("Autocompleting at <%s> %d\n", wordCurrent, pos);
|
||||
if (pos != -1)
|
||||
lb.Select(pos);
|
||||
}
|
||||
|
||||
57
contrib/src/stc/scintilla/src/AutoComplete.h
Normal file
57
contrib/src/stc/scintilla/src/AutoComplete.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// Scintilla source code edit control
|
||||
// AutoComplete.h - defines the auto completion list box
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef AUTOCOMPLETE_H
|
||||
#define AUTOCOMPLETE_H
|
||||
|
||||
class AutoComplete {
|
||||
bool active;
|
||||
char stopChars[256];
|
||||
char fillUpChars[256];
|
||||
char separator;
|
||||
public:
|
||||
bool ignoreCase;
|
||||
bool chooseSingle;
|
||||
ListBox lb;
|
||||
int posStart;
|
||||
int startLen;
|
||||
// Should autocompletion be canceled if editor's currentPos <= startPos?
|
||||
bool cancelAtStartPos;
|
||||
|
||||
AutoComplete();
|
||||
~AutoComplete();
|
||||
|
||||
// Is the auto completion list displayed?
|
||||
bool Active();
|
||||
|
||||
// Display the auto completion list positioned to be near a character position
|
||||
void Start(Window &parent, int ctrlID, int position, int startLen_);
|
||||
|
||||
// The stop chars are characters which, when typed, cause the auto completion list to disappear
|
||||
void SetStopChars(const char *stopChars_);
|
||||
bool IsStopChar(char ch);
|
||||
|
||||
// The fillup chars are characters which, when typed, fill up the selected word
|
||||
void SetFillUpChars(const char *fillUpChars_);
|
||||
bool IsFillUpChar(char ch);
|
||||
|
||||
// The separator character is used when interpreting the list in SetList
|
||||
void SetSeparator(char separator_);
|
||||
char GetSeparator();
|
||||
|
||||
// The list string contains a sequence of words separated by the separator character
|
||||
void SetList(const char *list);
|
||||
|
||||
void Show();
|
||||
void Cancel();
|
||||
|
||||
// Move the current list element by delta, scrolling appropriately
|
||||
void Move(int delta);
|
||||
|
||||
// Select a list element that starts with word as the current element
|
||||
void Select(const char *word);
|
||||
};
|
||||
|
||||
#endif
|
||||
169
contrib/src/stc/scintilla/src/CallTip.cxx
Normal file
169
contrib/src/stc/scintilla/src/CallTip.cxx
Normal file
@@ -0,0 +1,169 @@
|
||||
// Scintilla source code edit control
|
||||
// CallTip.cxx - code for displaying call tips
|
||||
// Copyright 1998-2000 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 "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "CallTip.h"
|
||||
|
||||
CallTip::CallTip() {
|
||||
wCallTip = 0;
|
||||
inCallTipMode = false;
|
||||
posStartCallTip = 0;
|
||||
val = 0;
|
||||
startHighlight = 0;
|
||||
endHighlight = 0;
|
||||
|
||||
colourBG.desired = Colour(0xff, 0xff, 0xff);
|
||||
colourUnSel.desired = Colour(0x80, 0x80, 0x80);
|
||||
colourSel.desired = Colour(0, 0, 0x80);
|
||||
colourShade.desired = Colour(0, 0, 0);
|
||||
colourLight.desired = Colour(0xc0, 0xc0, 0xc0);
|
||||
}
|
||||
|
||||
CallTip::~CallTip() {
|
||||
wCallTip.Destroy();
|
||||
delete []val;
|
||||
val = 0;
|
||||
}
|
||||
|
||||
void CallTip::RefreshColourPalette(Palette &pal, bool want) {
|
||||
pal.WantFind(colourBG, want);
|
||||
pal.WantFind(colourUnSel, want);
|
||||
pal.WantFind(colourSel, want);
|
||||
pal.WantFind(colourShade, want);
|
||||
pal.WantFind(colourLight, want);
|
||||
}
|
||||
|
||||
void CallTip::PaintCT(Surface *surfaceWindow) {
|
||||
if (!val)
|
||||
return;
|
||||
PRectangle rcClientPos = wCallTip.GetClientPosition();
|
||||
PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left,
|
||||
rcClientPos.bottom - rcClientPos.top);
|
||||
PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1);
|
||||
|
||||
surfaceWindow->FillRectangle(rcClient, colourBG.allocated);
|
||||
// To make a nice small call tip window, it is only sized to fit most normal characters without accents
|
||||
int lineHeight = surfaceWindow->Height(font);
|
||||
int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font);
|
||||
|
||||
// For each line...
|
||||
// Draw the definition in three parts: before highlight, highlighted, after highlight
|
||||
int ytext = rcClient.top + ascent + 1;
|
||||
char *chunkVal = val;
|
||||
bool moreChunks = true;
|
||||
while (moreChunks) {
|
||||
char *chunkEnd = strchr(chunkVal, '\n');
|
||||
if (chunkEnd == NULL) {
|
||||
chunkEnd = chunkVal + strlen(chunkVal);
|
||||
moreChunks = false;
|
||||
}
|
||||
int chunkOffset = chunkVal - val;
|
||||
int chunkLength = chunkEnd - chunkVal;
|
||||
int chunkEndOffset = chunkOffset + chunkLength;
|
||||
int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset);
|
||||
thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset);
|
||||
thisStartHighlight -= chunkOffset;
|
||||
int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset);
|
||||
thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset);
|
||||
thisEndHighlight -= chunkOffset;
|
||||
int x = 5;
|
||||
int xEnd = x + surfaceWindow->WidthText(font, chunkVal, thisStartHighlight);
|
||||
rcClient.left = x;
|
||||
rcClient.top = ytext - ascent - 1;
|
||||
rcClient.right = xEnd;
|
||||
surfaceWindow->DrawText(rcClient, font, ytext,
|
||||
chunkVal, thisStartHighlight,
|
||||
colourUnSel.allocated, colourBG.allocated);
|
||||
x = xEnd;
|
||||
|
||||
xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisStartHighlight,
|
||||
thisEndHighlight - thisStartHighlight);
|
||||
rcClient.top = ytext;
|
||||
rcClient.left = x;
|
||||
rcClient.right = xEnd;
|
||||
surfaceWindow->DrawText(rcClient, font, ytext,
|
||||
chunkVal + thisStartHighlight, thisEndHighlight - thisStartHighlight,
|
||||
colourSel.allocated, colourBG.allocated);
|
||||
x = xEnd;
|
||||
|
||||
xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisEndHighlight,
|
||||
chunkLength - thisEndHighlight);
|
||||
rcClient.left = x;
|
||||
rcClient.right = xEnd;
|
||||
surfaceWindow->DrawText(rcClient, font, ytext,
|
||||
chunkVal + thisEndHighlight, chunkLength - thisEndHighlight,
|
||||
colourUnSel.allocated, colourBG.allocated);
|
||||
chunkVal = chunkEnd + 1;
|
||||
ytext += lineHeight;
|
||||
}
|
||||
// Draw a raised border around the edges of the window
|
||||
surfaceWindow->MoveTo(0, rcClientSize.bottom - 1);
|
||||
surfaceWindow->PenColour(colourShade.allocated);
|
||||
surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1);
|
||||
surfaceWindow->LineTo(rcClientSize.right - 1, 0);
|
||||
surfaceWindow->PenColour(colourLight.allocated);
|
||||
surfaceWindow->LineTo(0, 0);
|
||||
surfaceWindow->LineTo(0, rcClientSize.bottom - 1);
|
||||
}
|
||||
|
||||
PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
|
||||
const char *faceName, int size) {
|
||||
Surface surfaceMeasure;
|
||||
surfaceMeasure.Init();
|
||||
int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72;
|
||||
font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false);
|
||||
if (val)
|
||||
delete []val;
|
||||
val = new char[strlen(defn) + 1];
|
||||
if (!val)
|
||||
return PRectangle();
|
||||
strcpy(val, defn);
|
||||
startHighlight = 0;
|
||||
endHighlight = 0;
|
||||
inCallTipMode = true;
|
||||
posStartCallTip = pos;
|
||||
// Look for multiple lines in the text
|
||||
// Only support \n here - simply means container must avoid \r!
|
||||
int width = 0;
|
||||
int numLines = 1;
|
||||
const char *newline;
|
||||
const char *look = val;
|
||||
while ((newline = strchr(look, '\n')) != NULL) {
|
||||
int thisWidth = surfaceMeasure.WidthText(font, look, newline - look);
|
||||
width = Platform::Maximum(width, thisWidth);
|
||||
look = newline + 1;
|
||||
numLines++;
|
||||
}
|
||||
int lastWidth = surfaceMeasure.WidthText(font, look, strlen(look));
|
||||
width = Platform::Maximum(width, lastWidth) + 10;
|
||||
int lineHeight = surfaceMeasure.Height(font);
|
||||
// Extra line for border and an empty line at top and bottom
|
||||
int height = lineHeight * numLines - surfaceMeasure.InternalLeading(font) + 2 + 2;
|
||||
return PRectangle(pt.x -5, pt.y + lineHeight + 1, pt.x + width - 5, pt.y + lineHeight + 1 + height);
|
||||
}
|
||||
|
||||
|
||||
void CallTip::CallTipCancel() {
|
||||
inCallTipMode = false;
|
||||
if (wCallTip.Created()) {
|
||||
wCallTip.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void CallTip::SetHighlight(int start, int end) {
|
||||
// Avoid flashing by checking something has really changed
|
||||
if ((start != startHighlight) || (end != endHighlight)) {
|
||||
startHighlight = start;
|
||||
endHighlight = end;
|
||||
if (wCallTip.Created()) {
|
||||
wCallTip.InvalidateAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
contrib/src/stc/scintilla/src/CallTip.h
Normal file
47
contrib/src/stc/scintilla/src/CallTip.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// Scintilla source code edit control
|
||||
// CallTip.h - interface to the call tip control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CALLTIP_H
|
||||
#define CALLTIP_H
|
||||
|
||||
class CallTip {
|
||||
int startHighlight;
|
||||
int endHighlight;
|
||||
char *val;
|
||||
Font font;
|
||||
// Private so CallTip objects can not be copied
|
||||
CallTip(const CallTip &) {}
|
||||
CallTip &operator=(const CallTip &) { return *this; }
|
||||
public:
|
||||
Window wCallTip;
|
||||
Window wDraw;
|
||||
bool inCallTipMode;
|
||||
int posStartCallTip;
|
||||
ColourPair colourBG;
|
||||
ColourPair colourUnSel;
|
||||
ColourPair colourSel;
|
||||
ColourPair colourShade;
|
||||
ColourPair colourLight;
|
||||
|
||||
CallTip();
|
||||
~CallTip();
|
||||
|
||||
// Claim or accept palette entries for the colours required to paint a calltip
|
||||
void RefreshColourPalette(Palette &pal, bool want);
|
||||
|
||||
void PaintCT(Surface *surfaceWindow);
|
||||
|
||||
// Setup the calltip and return a rectangle of the area required
|
||||
PRectangle CallTipStart(int pos, Point pt, const char *defn,
|
||||
const char *faceName, int size);
|
||||
|
||||
void CallTipCancel();
|
||||
|
||||
// Set a range of characters to be displayed in a highlight style.
|
||||
// Commonly used to highlight the current parameter.
|
||||
void SetHighlight(int start, int end);
|
||||
};
|
||||
|
||||
#endif
|
||||
1088
contrib/src/stc/scintilla/src/CellBuffer.cxx
Normal file
1088
contrib/src/stc/scintilla/src/CellBuffer.cxx
Normal file
File diff suppressed because it is too large
Load Diff
229
contrib/src/stc/scintilla/src/CellBuffer.h
Normal file
229
contrib/src/stc/scintilla/src/CellBuffer.h
Normal file
@@ -0,0 +1,229 @@
|
||||
// Scintilla source code edit control
|
||||
// CellBuffer.h - manages the text of the document
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CELLBUFFER_H
|
||||
#define CELLBUFFER_H
|
||||
|
||||
// This holds the marker identifier and the marker type to display.
|
||||
// MarkerHandleNumbers are members of lists.
|
||||
struct MarkerHandleNumber {
|
||||
int handle;
|
||||
int number;
|
||||
MarkerHandleNumber *next;
|
||||
};
|
||||
|
||||
// A marker handle set contains any number of MarkerHandleNumbers
|
||||
class MarkerHandleSet {
|
||||
MarkerHandleNumber *root;
|
||||
public:
|
||||
MarkerHandleSet();
|
||||
~MarkerHandleSet();
|
||||
int Length();
|
||||
int NumberFromHandle(int handle);
|
||||
int MarkValue(); // Bit set of marker numbers
|
||||
bool Contains(int handle);
|
||||
bool InsertHandle(int handle, int markerNum);
|
||||
void RemoveHandle(int handle);
|
||||
void RemoveNumber(int markerNum);
|
||||
void CombineWith(MarkerHandleSet *other);
|
||||
};
|
||||
|
||||
// Each line stores the starting position of the first character of the line in the cell buffer
|
||||
// and potentially a marker handle set. Often a line will not have any attached markers.
|
||||
struct LineData {
|
||||
int startPosition;
|
||||
MarkerHandleSet *handleSet;
|
||||
LineData() : startPosition(0), handleSet(0) {
|
||||
}
|
||||
};
|
||||
|
||||
// The line vector contains information about each of the lines in a cell buffer.
|
||||
class LineVector {
|
||||
public:
|
||||
enum { growSize = 4000 };
|
||||
int lines;
|
||||
LineData *linesData;
|
||||
int size;
|
||||
int *levels;
|
||||
int sizeLevels;
|
||||
|
||||
// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big.
|
||||
int handleCurrent;
|
||||
|
||||
LineVector();
|
||||
~LineVector();
|
||||
void Init();
|
||||
|
||||
void Expand(int sizeNew);
|
||||
void ExpandLevels(int sizeNew=-1);
|
||||
void ClearLevels();
|
||||
void InsertValue(int pos, int value);
|
||||
void SetValue(int pos, int value);
|
||||
void Remove(int pos);
|
||||
int LineFromPosition(int pos);
|
||||
|
||||
int AddMark(int line, int marker);
|
||||
void MergeMarkers(int pos);
|
||||
void DeleteMark(int line, int markerNum);
|
||||
void DeleteMarkFromHandle(int markerHandle);
|
||||
int LineFromHandle(int markerHandle);
|
||||
};
|
||||
|
||||
// Actions are used to store all the information required to perform one undo/redo step.
|
||||
enum actionType { insertAction, removeAction, startAction };
|
||||
|
||||
class Action {
|
||||
public:
|
||||
actionType at;
|
||||
int position;
|
||||
char *data;
|
||||
int lenData;
|
||||
bool mayCoalesce;
|
||||
|
||||
Action();
|
||||
~Action();
|
||||
void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true);
|
||||
void Destroy();
|
||||
void Grab(Action *source);
|
||||
};
|
||||
|
||||
class UndoHistory {
|
||||
Action *actions;
|
||||
int lenActions;
|
||||
int maxAction;
|
||||
int currentAction;
|
||||
int undoSequenceDepth;
|
||||
int savePoint;
|
||||
|
||||
void EnsureUndoRoom();
|
||||
|
||||
public:
|
||||
UndoHistory();
|
||||
~UndoHistory();
|
||||
|
||||
void AppendAction(actionType at, int position, char *data, int length);
|
||||
|
||||
void BeginUndoAction();
|
||||
void EndUndoAction();
|
||||
void DropUndoSequence();
|
||||
void DeleteUndoHistory();
|
||||
|
||||
// The save point is a marker in the undo stack where the container has stated that
|
||||
// the buffer was saved. Undo and redo can move over the save point.
|
||||
void SetSavePoint();
|
||||
bool IsSavePoint() const;
|
||||
|
||||
// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
|
||||
// called that many times. Similarly for redo.
|
||||
bool CanUndo() const;
|
||||
int StartUndo();
|
||||
const Action &GetUndoStep() const;
|
||||
void CompletedUndoStep();
|
||||
bool CanRedo() const;
|
||||
int StartRedo();
|
||||
const Action &GetRedoStep() const;
|
||||
void CompletedRedoStep();
|
||||
};
|
||||
|
||||
// Holder for an expandable array of characters that supports undo and line markers
|
||||
// Based on article "Data Structures in a Bit-Mapped Text Editor"
|
||||
// by Wilfred J. Hansen, Byte January 1987, page 183
|
||||
class CellBuffer {
|
||||
private:
|
||||
char *body;
|
||||
int size;
|
||||
int length;
|
||||
int part1len;
|
||||
int gaplen;
|
||||
char *part2body;
|
||||
bool readOnly;
|
||||
|
||||
bool collectingUndo;
|
||||
UndoHistory uh;
|
||||
|
||||
LineVector lv;
|
||||
|
||||
SVector lineStates;
|
||||
|
||||
void GapTo(int position);
|
||||
void RoomFor(int insertionLength);
|
||||
|
||||
inline char ByteAt(int position);
|
||||
void SetByteAt(int position, char ch);
|
||||
|
||||
public:
|
||||
|
||||
CellBuffer(int initialLength = 4000);
|
||||
~CellBuffer();
|
||||
|
||||
// Retrieving positions outside the range of the buffer works and returns 0
|
||||
char CharAt(int position);
|
||||
void GetCharRange(char *buffer, int position, int lengthRetrieve);
|
||||
char StyleAt(int position);
|
||||
|
||||
int ByteLength();
|
||||
int Length();
|
||||
int Lines();
|
||||
int LineStart(int line);
|
||||
int LineFromPosition(int pos) { return lv.LineFromPosition(pos); }
|
||||
const char *InsertString(int position, char *s, int insertLength);
|
||||
void InsertCharStyle(int position, char ch, char style);
|
||||
|
||||
// Setting styles for positions outside the range of the buffer is safe and has no effect.
|
||||
// True is returned if the style of a character changed.
|
||||
bool SetStyleAt(int position, char style, char mask='\377');
|
||||
bool SetStyleFor(int position, int length, char style, char mask);
|
||||
|
||||
const char *DeleteChars(int position, int deleteLength);
|
||||
|
||||
bool IsReadOnly();
|
||||
void SetReadOnly(bool set);
|
||||
|
||||
// The save point is a marker in the undo stack where the container has stated that
|
||||
// the buffer was saved. Undo and redo can move over the save point.
|
||||
void SetSavePoint();
|
||||
bool IsSavePoint();
|
||||
|
||||
// Line marker functions
|
||||
int AddMark(int line, int markerNum);
|
||||
void DeleteMark(int line, int markerNum);
|
||||
void DeleteMarkFromHandle(int markerHandle);
|
||||
int GetMark(int line);
|
||||
void DeleteAllMarks(int markerNum);
|
||||
int LineFromHandle(int markerHandle);
|
||||
|
||||
// Without undo
|
||||
void BasicInsertString(int position, char *s, int insertLength);
|
||||
void BasicDeleteChars(int position, int deleteLength);
|
||||
|
||||
bool SetUndoCollection(bool collectUndo);
|
||||
bool IsCollectingUndo();
|
||||
void BeginUndoAction();
|
||||
void EndUndoAction();
|
||||
void DeleteUndoHistory();
|
||||
|
||||
// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
|
||||
// called that many times. Similarly for redo.
|
||||
bool CanUndo();
|
||||
int StartUndo();
|
||||
const Action &GetUndoStep() const;
|
||||
void PerformUndoStep();
|
||||
bool CanRedo();
|
||||
int StartRedo();
|
||||
const Action &GetRedoStep() const;
|
||||
void PerformRedoStep();
|
||||
|
||||
int SetLineState(int line, int state);
|
||||
int GetLineState(int line);
|
||||
int GetMaxLineState();
|
||||
|
||||
int SetLevel(int line, int level);
|
||||
int GetLevel(int line);
|
||||
void ClearLevels();
|
||||
};
|
||||
|
||||
#define CELL_SIZE 2
|
||||
|
||||
#endif
|
||||
208
contrib/src/stc/scintilla/src/ContractionState.cxx
Normal file
208
contrib/src/stc/scintilla/src/ContractionState.cxx
Normal file
@@ -0,0 +1,208 @@
|
||||
// Scintilla source code edit control
|
||||
// ContractionState.cxx - manages visibility of lines for folding
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "ContractionState.h"
|
||||
|
||||
OneLine::OneLine() {
|
||||
displayLine = 0;
|
||||
docLine = 0;
|
||||
visible = true;
|
||||
expanded = true;
|
||||
}
|
||||
|
||||
ContractionState::ContractionState() {
|
||||
lines = 0;
|
||||
size = 0;
|
||||
linesInDoc = 1;
|
||||
linesInDisplay = 1;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
ContractionState::~ContractionState() {
|
||||
Clear();
|
||||
}
|
||||
|
||||
void ContractionState::MakeValid() const {
|
||||
if (!valid) {
|
||||
// Could be cleverer by keeping the index of the last still valid entry
|
||||
// rather than invalidating all.
|
||||
int lineDisplay = 0;
|
||||
for (int line=0; line<linesInDoc; line++) {
|
||||
lines[line].displayLine = lineDisplay;
|
||||
if (lines[line].visible) {
|
||||
lines[lineDisplay].docLine = line;
|
||||
lineDisplay++;
|
||||
}
|
||||
}
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ContractionState::Clear() {
|
||||
delete []lines;
|
||||
lines = 0;
|
||||
size = 0;
|
||||
linesInDoc = 1;
|
||||
linesInDisplay = 1;
|
||||
}
|
||||
|
||||
int ContractionState::LinesInDoc() const {
|
||||
return linesInDoc;
|
||||
}
|
||||
|
||||
int ContractionState::LinesDisplayed() const {
|
||||
return linesInDisplay;
|
||||
}
|
||||
|
||||
int ContractionState::DisplayFromDoc(int lineDoc) const {
|
||||
if (size == 0) {
|
||||
return lineDoc;
|
||||
}
|
||||
MakeValid();
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
return lines[lineDoc].displayLine;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ContractionState::DocFromDisplay(int lineDisplay) const {
|
||||
if (lineDisplay <= 0)
|
||||
return 0;
|
||||
if (lineDisplay >= linesInDisplay)
|
||||
return linesInDoc-1;
|
||||
if (size == 0)
|
||||
return lineDisplay;
|
||||
MakeValid();
|
||||
return lines[lineDisplay].docLine;
|
||||
}
|
||||
|
||||
void ContractionState::Grow(int sizeNew) {
|
||||
OneLine *linesNew = new OneLine[sizeNew];
|
||||
if (linesNew) {
|
||||
int i = 0;
|
||||
for (; i < size; i++) {
|
||||
linesNew[i] = lines[i];
|
||||
}
|
||||
for (; i < sizeNew; i++) {
|
||||
linesNew[i].displayLine = i;
|
||||
}
|
||||
delete []lines;
|
||||
lines = linesNew;
|
||||
size = sizeNew;
|
||||
valid = false;
|
||||
} else {
|
||||
Platform::DebugPrintf("No memory available\n");
|
||||
// TODO: Blow up
|
||||
}
|
||||
}
|
||||
|
||||
void ContractionState::InsertLines(int lineDoc, int lineCount) {
|
||||
if (size == 0) {
|
||||
linesInDoc += lineCount;
|
||||
linesInDisplay += lineCount;
|
||||
return;
|
||||
}
|
||||
//Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc);
|
||||
if ((linesInDoc + lineCount + 2) >= size) {
|
||||
Grow(linesInDoc + lineCount + growSize);
|
||||
}
|
||||
linesInDoc += lineCount;
|
||||
linesInDisplay += lineCount;
|
||||
for (int i = linesInDoc; i >= lineDoc + lineCount; i--) {
|
||||
lines[i].visible = lines[i - lineCount].visible;
|
||||
lines[i].expanded = lines[i - lineCount].expanded;
|
||||
}
|
||||
for (int d=0;d<lineCount;d++) {
|
||||
lines[lineDoc+d].visible = true; // Should inherit visibility from context ?
|
||||
lines[lineDoc+d].expanded = true;
|
||||
}
|
||||
valid = false;
|
||||
}
|
||||
|
||||
void ContractionState::DeleteLines(int lineDoc, int lineCount) {
|
||||
if (size == 0) {
|
||||
linesInDoc -= lineCount;
|
||||
linesInDisplay -= lineCount;
|
||||
return;
|
||||
}
|
||||
int deltaDisplayed = 0;
|
||||
for (int d=0;d<lineCount;d++) {
|
||||
if (lines[lineDoc+d].visible)
|
||||
deltaDisplayed--;
|
||||
}
|
||||
for (int i = lineDoc; i < linesInDoc-lineCount; i++) {
|
||||
if (i != 0) // Line zero is always visible
|
||||
lines[i].visible = lines[i + lineCount].visible;
|
||||
lines[i].expanded = lines[i + lineCount].expanded;
|
||||
}
|
||||
linesInDoc -= lineCount;
|
||||
linesInDisplay += deltaDisplayed;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
bool ContractionState::GetVisible(int lineDoc) const {
|
||||
if (size == 0)
|
||||
return true;
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
return lines[lineDoc].visible;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) {
|
||||
if (lineDocStart == 0)
|
||||
lineDocStart++;
|
||||
if (lineDocStart > lineDocEnd)
|
||||
return false;
|
||||
if (size == 0) {
|
||||
Grow(linesInDoc + growSize);
|
||||
}
|
||||
// TODO: modify docLine members to mirror displayLine
|
||||
int delta = 0;
|
||||
// Change lineDocs
|
||||
if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < linesInDoc)) {
|
||||
for (int line=lineDocStart; line <= lineDocEnd; line++) {
|
||||
if (lines[line].visible != visible) {
|
||||
delta += visible ? 1 : -1;
|
||||
lines[line].visible = visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
linesInDisplay += delta;
|
||||
valid = false;
|
||||
return delta != 0;
|
||||
}
|
||||
|
||||
bool ContractionState::GetExpanded(int lineDoc) const {
|
||||
if (size == 0)
|
||||
return true;
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
return lines[lineDoc].expanded;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ContractionState::SetExpanded(int lineDoc, bool expanded) {
|
||||
if (size == 0) {
|
||||
Grow(linesInDoc + growSize);
|
||||
}
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
if (lines[lineDoc].expanded != expanded) {
|
||||
lines[lineDoc].expanded = expanded;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ContractionState::ShowAll() {
|
||||
delete []lines;
|
||||
lines = 0;
|
||||
size = 0;
|
||||
}
|
||||
52
contrib/src/stc/scintilla/src/ContractionState.h
Normal file
52
contrib/src/stc/scintilla/src/ContractionState.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Scintilla source code edit control
|
||||
// ContractionState.h - manages visibility of lines for folding
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CONTRACTIONSTATE_H
|
||||
#define CONTRACTIONSTATE_H
|
||||
|
||||
class OneLine {
|
||||
public:
|
||||
int displayLine; // position within set of visible lines
|
||||
int docLine; // inverse of displayLine
|
||||
bool visible;
|
||||
bool expanded;
|
||||
|
||||
OneLine();
|
||||
virtual ~OneLine() {}
|
||||
};
|
||||
|
||||
class ContractionState {
|
||||
void Grow(int sizeNew);
|
||||
enum { growSize = 4000 };
|
||||
int linesInDoc;
|
||||
int linesInDisplay;
|
||||
mutable OneLine *lines;
|
||||
int size;
|
||||
mutable bool valid;
|
||||
void MakeValid() const;
|
||||
public:
|
||||
ContractionState();
|
||||
virtual ~ContractionState();
|
||||
|
||||
void Clear();
|
||||
|
||||
int LinesInDoc() const;
|
||||
int LinesDisplayed() const;
|
||||
int DisplayFromDoc(int lineDoc) const;
|
||||
int DocFromDisplay(int lineDisplay) const;
|
||||
|
||||
void InsertLines(int lineDoc, int lineCount);
|
||||
void DeleteLines(int lineDoc, int lineCount);
|
||||
|
||||
bool GetVisible(int lineDoc) const;
|
||||
bool SetVisible(int lineDocStart, int lineDocEnd, bool visible);
|
||||
|
||||
bool GetExpanded(int lineDoc) const;
|
||||
bool SetExpanded(int lineDoc, bool expanded);
|
||||
|
||||
void ShowAll();
|
||||
};
|
||||
|
||||
#endif
|
||||
960
contrib/src/stc/scintilla/src/Document.cxx
Normal file
960
contrib/src/stc/scintilla/src/Document.cxx
Normal file
@@ -0,0 +1,960 @@
|
||||
// Scintilla source code edit control
|
||||
// Document.cxx - text document that handles notifications, DBCS, styling, words and end of line
|
||||
// Copyright 1998-2000 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 <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "SVector.h"
|
||||
#include "CellBuffer.h"
|
||||
#include "Document.h"
|
||||
|
||||
Document::Document() {
|
||||
refCount = 0;
|
||||
#ifdef unix
|
||||
eolMode = SC_EOL_LF;
|
||||
#else
|
||||
eolMode = SC_EOL_CRLF;
|
||||
#endif
|
||||
dbcsCodePage = 0;
|
||||
stylingBits = 5;
|
||||
stylingBitsMask = 0x1F;
|
||||
stylingPos = 0;
|
||||
stylingMask = 0;
|
||||
for (int ch = 0; ch < 256; ch++) {
|
||||
wordchars[ch] = isalnum(ch) || ch == '_';
|
||||
}
|
||||
endStyled = 0;
|
||||
enteredCount = 0;
|
||||
enteredReadOnlyCount = 0;
|
||||
tabInChars = 8;
|
||||
indentInChars = 0;
|
||||
useTabs = true;
|
||||
watchers = 0;
|
||||
lenWatchers = 0;
|
||||
}
|
||||
|
||||
Document::~Document() {
|
||||
for (int i = 0; i < lenWatchers; i++) {
|
||||
watchers[i].watcher->NotifyDeleted(this, watchers[i].userData);
|
||||
}
|
||||
delete []watchers;
|
||||
watchers = 0;
|
||||
lenWatchers = 0;
|
||||
}
|
||||
|
||||
// Increase reference count and return its previous value.
|
||||
int Document::AddRef() {
|
||||
return refCount++;
|
||||
}
|
||||
|
||||
// Decrease reference count and return its previous value.
|
||||
// Delete the document if reference count reaches zero.
|
||||
int Document::Release() {
|
||||
int curRefCount = --refCount;
|
||||
if (curRefCount == 0)
|
||||
delete this;
|
||||
return curRefCount;
|
||||
}
|
||||
|
||||
void Document::SetSavePoint() {
|
||||
cb.SetSavePoint();
|
||||
NotifySavePoint(true);
|
||||
}
|
||||
|
||||
int Document::AddMark(int line, int markerNum) {
|
||||
int prev = cb.AddMark(line, markerNum);
|
||||
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0);
|
||||
NotifyModified(mh);
|
||||
return prev;
|
||||
}
|
||||
|
||||
void Document::DeleteMark(int line, int markerNum) {
|
||||
cb.DeleteMark(line, markerNum);
|
||||
DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0);
|
||||
NotifyModified(mh);
|
||||
}
|
||||
|
||||
void Document::DeleteMarkFromHandle(int markerHandle) {
|
||||
cb.DeleteMarkFromHandle(markerHandle);
|
||||
DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0);
|
||||
NotifyModified(mh);
|
||||
}
|
||||
|
||||
void Document::DeleteAllMarks(int markerNum) {
|
||||
cb.DeleteAllMarks(markerNum);
|
||||
DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0);
|
||||
NotifyModified(mh);
|
||||
}
|
||||
|
||||
int Document::LineStart(int line) {
|
||||
return cb.LineStart(line);
|
||||
}
|
||||
|
||||
int Document::LineEnd(int line) {
|
||||
if (line == LinesTotal() - 1) {
|
||||
return LineStart(line + 1);
|
||||
} else {
|
||||
int position = LineStart(line + 1) - 1;
|
||||
// When line terminator is CR+LF, may need to go back one more
|
||||
if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) {
|
||||
position--;
|
||||
}
|
||||
return position;
|
||||
}
|
||||
}
|
||||
|
||||
int Document::LineFromPosition(int pos) {
|
||||
return cb.LineFromPosition(pos);
|
||||
}
|
||||
|
||||
int Document::LineEndPosition(int position) {
|
||||
return LineEnd(LineFromPosition(position));
|
||||
}
|
||||
|
||||
int Document::VCHomePosition(int position) {
|
||||
int line = LineFromPosition(position);
|
||||
int startPosition = LineStart(line);
|
||||
int endLine = LineStart(line + 1) - 1;
|
||||
int startText = startPosition;
|
||||
while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) )
|
||||
startText++;
|
||||
if (position == startText)
|
||||
return startPosition;
|
||||
else
|
||||
return startText;
|
||||
}
|
||||
|
||||
int Document::SetLevel(int line, int level) {
|
||||
int prev = cb.SetLevel(line, level);
|
||||
if (prev != level) {
|
||||
DocModification mh(SC_MOD_CHANGEFOLD, LineStart(line), 0, 0, 0);
|
||||
mh.line = line;
|
||||
mh.foldLevelNow = level;
|
||||
mh.foldLevelPrev = prev;
|
||||
NotifyModified(mh);
|
||||
}
|
||||
return prev;
|
||||
}
|
||||
|
||||
static bool IsSubordinate(int levelStart, int levelTry) {
|
||||
if (levelTry & SC_FOLDLEVELWHITEFLAG)
|
||||
return true;
|
||||
else
|
||||
return (levelStart & SC_FOLDLEVELNUMBERMASK) < (levelTry & SC_FOLDLEVELNUMBERMASK);
|
||||
}
|
||||
|
||||
int Document::GetLastChild(int lineParent, int level) {
|
||||
if (level == -1)
|
||||
level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK;
|
||||
int maxLine = LinesTotal();
|
||||
int lineMaxSubord = lineParent;
|
||||
while (lineMaxSubord < maxLine-1) {
|
||||
EnsureStyledTo(LineStart(lineMaxSubord+2));
|
||||
if (!IsSubordinate(level, GetLevel(lineMaxSubord+1)))
|
||||
break;
|
||||
lineMaxSubord++;
|
||||
}
|
||||
if (lineMaxSubord > lineParent) {
|
||||
if (level > (GetLevel(lineMaxSubord+1) & SC_FOLDLEVELNUMBERMASK)) {
|
||||
// Have chewed up some whitespace that belongs to a parent so seek back
|
||||
if ((lineMaxSubord > lineParent) && (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG)) {
|
||||
lineMaxSubord--;
|
||||
}
|
||||
}
|
||||
}
|
||||
return lineMaxSubord;
|
||||
}
|
||||
|
||||
int Document::GetFoldParent(int line) {
|
||||
int level = GetLevel(line);
|
||||
int lineLook = line-1;
|
||||
while ((lineLook > 0) && (
|
||||
(!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) ||
|
||||
((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) >= level))
|
||||
) {
|
||||
lineLook--;
|
||||
}
|
||||
if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) &&
|
||||
((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) < level)) {
|
||||
return lineLook;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int Document::ClampPositionIntoDocument(int pos) {
|
||||
return Platform::Clamp(pos, 0, Length());
|
||||
}
|
||||
|
||||
bool Document::IsCrLf(int pos) {
|
||||
if (pos < 0)
|
||||
return false;
|
||||
if (pos >= (Length() - 1))
|
||||
return false;
|
||||
return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n');
|
||||
}
|
||||
|
||||
#if PLAT_WIN
|
||||
bool Document::IsDBCS(int pos) {
|
||||
if (dbcsCodePage) {
|
||||
if (SC_CP_UTF8 == dbcsCodePage) {
|
||||
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
|
||||
return ch >= 0x80;
|
||||
} else {
|
||||
// Anchor DBCS calculations at start of line because start of line can
|
||||
// not be a DBCS trail byte.
|
||||
int startLine = pos;
|
||||
while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n')
|
||||
startLine--;
|
||||
while (startLine <= pos) {
|
||||
if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) {
|
||||
startLine++;
|
||||
if (startLine >= pos)
|
||||
return true;
|
||||
}
|
||||
startLine++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// PLAT_GTK or PLAT_WX
|
||||
// TODO: support DBCS under GTK+ and WX
|
||||
bool Document::IsDBCS(int) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
int Document::LenChar(int pos) {
|
||||
if (IsCrLf(pos)) {
|
||||
return 2;
|
||||
} else if (SC_CP_UTF8 == dbcsCodePage) {
|
||||
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
|
||||
if (ch < 0x80)
|
||||
return 1;
|
||||
int len = 2;
|
||||
if (ch >= (0x80+0x40+0x20))
|
||||
len = 3;
|
||||
int lengthDoc = Length();
|
||||
if ((pos + len) > lengthDoc)
|
||||
return lengthDoc-pos;
|
||||
else
|
||||
return len;
|
||||
} else if (IsDBCS(pos)) {
|
||||
return 2;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Normalise a position so that it is not halfway through a two byte character.
|
||||
// This can occur in two situations -
|
||||
// When lines are terminated with \r\n pairs which should be treated as one character.
|
||||
// When displaying DBCS text such as Japanese.
|
||||
// If moving, move the position in the indicated direction.
|
||||
int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) {
|
||||
//Platform::DebugPrintf("NoCRLF %d %d\n", pos, moveDir);
|
||||
// If out of range, just return value - should be fixed up after
|
||||
if (pos < 0)
|
||||
return pos;
|
||||
if (pos > Length())
|
||||
return pos;
|
||||
|
||||
// Position 0 and Length() can not be between any two characters
|
||||
if (pos == 0)
|
||||
return pos;
|
||||
if (pos == Length())
|
||||
return pos;
|
||||
|
||||
// assert pos > 0 && pos < Length()
|
||||
if (checkLineEnd && IsCrLf(pos - 1)) {
|
||||
if (moveDir > 0)
|
||||
return pos + 1;
|
||||
else
|
||||
return pos - 1;
|
||||
}
|
||||
|
||||
// Not between CR and LF
|
||||
|
||||
#if PLAT_WIN
|
||||
if (dbcsCodePage) {
|
||||
if (SC_CP_UTF8 == dbcsCodePage) {
|
||||
unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos));
|
||||
while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) {
|
||||
// ch is a trail byte
|
||||
if (moveDir > 0)
|
||||
pos++;
|
||||
else
|
||||
pos--;
|
||||
ch = static_cast<unsigned char>(cb.CharAt(pos));
|
||||
}
|
||||
} else {
|
||||
// Anchor DBCS calculations at start of line because start of line can
|
||||
// not be a DBCS trail byte.
|
||||
int startLine = pos;
|
||||
while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n')
|
||||
startLine--;
|
||||
bool atLeadByte = false;
|
||||
while (startLine < pos) {
|
||||
if (atLeadByte)
|
||||
atLeadByte = false;
|
||||
else if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine)))
|
||||
atLeadByte = true;
|
||||
else
|
||||
atLeadByte = false;
|
||||
startLine++;
|
||||
//Platform::DebugPrintf("DBCS %s\n", atlead ? "D" : "-");
|
||||
}
|
||||
|
||||
if (atLeadByte) {
|
||||
// Position is between a lead byte and a trail byte
|
||||
if (moveDir > 0)
|
||||
return pos + 1;
|
||||
else
|
||||
return pos - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
void Document::ModifiedAt(int pos) {
|
||||
if (endStyled > pos)
|
||||
endStyled = pos;
|
||||
}
|
||||
|
||||
// Document only modified by gateways DeleteChars, InsertStyledString, Undo, Redo, and SetStyleAt.
|
||||
// SetStyleAt does not change the persistent state of a document
|
||||
|
||||
// Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number
|
||||
void Document::DeleteChars(int pos, int len) {
|
||||
if ((pos + len) > Length())
|
||||
return;
|
||||
if (cb.IsReadOnly() && enteredReadOnlyCount==0) {
|
||||
enteredReadOnlyCount++;
|
||||
NotifyModifyAttempt();
|
||||
enteredReadOnlyCount--;
|
||||
}
|
||||
if (enteredCount == 0) {
|
||||
enteredCount++;
|
||||
if (!cb.IsReadOnly()) {
|
||||
NotifyModified(
|
||||
DocModification(
|
||||
SC_MOD_BEFOREDELETE | SC_PERFORMED_USER,
|
||||
pos, len,
|
||||
0, 0));
|
||||
int prevLinesTotal = LinesTotal();
|
||||
bool startSavePoint = cb.IsSavePoint();
|
||||
const char *text = cb.DeleteChars(pos*2, len * 2);
|
||||
if (startSavePoint && cb.IsCollectingUndo())
|
||||
NotifySavePoint(!startSavePoint);
|
||||
ModifiedAt(pos);
|
||||
NotifyModified(
|
||||
DocModification(
|
||||
SC_MOD_DELETETEXT | SC_PERFORMED_USER,
|
||||
pos, len,
|
||||
LinesTotal() - prevLinesTotal, text));
|
||||
}
|
||||
enteredCount--;
|
||||
}
|
||||
}
|
||||
|
||||
void Document::InsertStyledString(int position, char *s, int insertLength) {
|
||||
if (cb.IsReadOnly() && enteredReadOnlyCount==0) {
|
||||
enteredReadOnlyCount++;
|
||||
NotifyModifyAttempt();
|
||||
enteredReadOnlyCount--;
|
||||
}
|
||||
if (enteredCount == 0) {
|
||||
enteredCount++;
|
||||
if (!cb.IsReadOnly()) {
|
||||
NotifyModified(
|
||||
DocModification(
|
||||
SC_MOD_BEFOREINSERT | SC_PERFORMED_USER,
|
||||
position / 2, insertLength / 2,
|
||||
0, 0));
|
||||
int prevLinesTotal = LinesTotal();
|
||||
bool startSavePoint = cb.IsSavePoint();
|
||||
const char *text = cb.InsertString(position, s, insertLength);
|
||||
if (startSavePoint && cb.IsCollectingUndo())
|
||||
NotifySavePoint(!startSavePoint);
|
||||
ModifiedAt(position / 2);
|
||||
NotifyModified(
|
||||
DocModification(
|
||||
SC_MOD_INSERTTEXT | SC_PERFORMED_USER,
|
||||
position / 2, insertLength / 2,
|
||||
LinesTotal() - prevLinesTotal, text));
|
||||
}
|
||||
enteredCount--;
|
||||
}
|
||||
}
|
||||
|
||||
int Document::Undo() {
|
||||
int newPos = 0;
|
||||
if (enteredCount == 0) {
|
||||
enteredCount++;
|
||||
bool startSavePoint = cb.IsSavePoint();
|
||||
int steps = cb.StartUndo();
|
||||
//Platform::DebugPrintf("Steps=%d\n", steps);
|
||||
for (int step=0; step<steps; step++) {
|
||||
int prevLinesTotal = LinesTotal();
|
||||
const Action &action = cb.GetUndoStep();
|
||||
if (action.at == removeAction) {
|
||||
NotifyModified(DocModification(
|
||||
SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action));
|
||||
} else {
|
||||
NotifyModified(DocModification(
|
||||
SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action));
|
||||
}
|
||||
cb.PerformUndoStep();
|
||||
int cellPosition = action.position / 2;
|
||||
ModifiedAt(cellPosition);
|
||||
newPos = cellPosition;
|
||||
|
||||
int modFlags = SC_PERFORMED_UNDO;
|
||||
// With undo, an insertion action becomes a deletion notification
|
||||
if (action.at == removeAction) {
|
||||
newPos += action.lenData;
|
||||
modFlags |= SC_MOD_INSERTTEXT;
|
||||
} else {
|
||||
modFlags |= SC_MOD_DELETETEXT;
|
||||
}
|
||||
if (step == steps-1)
|
||||
modFlags |= SC_LASTSTEPINUNDOREDO;
|
||||
NotifyModified(DocModification(modFlags, cellPosition, action.lenData,
|
||||
LinesTotal() - prevLinesTotal, action.data));
|
||||
}
|
||||
|
||||
bool endSavePoint = cb.IsSavePoint();
|
||||
if (startSavePoint != endSavePoint)
|
||||
NotifySavePoint(endSavePoint);
|
||||
enteredCount--;
|
||||
}
|
||||
return newPos;
|
||||
}
|
||||
|
||||
int Document::Redo() {
|
||||
int newPos = 0;
|
||||
if (enteredCount == 0) {
|
||||
enteredCount++;
|
||||
bool startSavePoint = cb.IsSavePoint();
|
||||
int steps = cb.StartRedo();
|
||||
for (int step=0; step<steps; step++) {
|
||||
int prevLinesTotal = LinesTotal();
|
||||
const Action &action = cb.GetRedoStep();
|
||||
if (action.at == insertAction) {
|
||||
NotifyModified(DocModification(
|
||||
SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action));
|
||||
} else {
|
||||
NotifyModified(DocModification(
|
||||
SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action));
|
||||
}
|
||||
cb.PerformRedoStep();
|
||||
ModifiedAt(action.position / 2);
|
||||
newPos = action.position / 2;
|
||||
|
||||
int modFlags = SC_PERFORMED_REDO;
|
||||
if (action.at == insertAction) {
|
||||
newPos += action.lenData;
|
||||
modFlags |= SC_MOD_INSERTTEXT;
|
||||
} else {
|
||||
modFlags |= SC_MOD_DELETETEXT;
|
||||
}
|
||||
if (step == steps-1)
|
||||
modFlags |= SC_LASTSTEPINUNDOREDO;
|
||||
NotifyModified(
|
||||
DocModification(modFlags, action.position / 2, action.lenData,
|
||||
LinesTotal() - prevLinesTotal, action.data));
|
||||
}
|
||||
|
||||
bool endSavePoint = cb.IsSavePoint();
|
||||
if (startSavePoint != endSavePoint)
|
||||
NotifySavePoint(endSavePoint);
|
||||
enteredCount--;
|
||||
}
|
||||
return newPos;
|
||||
}
|
||||
|
||||
void Document::InsertChar(int pos, char ch) {
|
||||
char chs[2];
|
||||
chs[0] = ch;
|
||||
chs[1] = 0;
|
||||
InsertStyledString(pos*2, chs, 2);
|
||||
}
|
||||
|
||||
// Insert a null terminated string
|
||||
void Document::InsertString(int position, const char *s) {
|
||||
InsertString(position, s, strlen(s));
|
||||
}
|
||||
|
||||
// Insert a string with a length
|
||||
void Document::InsertString(int position, const char *s, int insertLength) {
|
||||
char *sWithStyle = new char[insertLength * 2];
|
||||
if (sWithStyle) {
|
||||
for (int i = 0; i < insertLength; i++) {
|
||||
sWithStyle[i*2] = s[i];
|
||||
sWithStyle[i*2 + 1] = 0;
|
||||
}
|
||||
InsertStyledString(position*2, sWithStyle, insertLength*2);
|
||||
delete []sWithStyle;
|
||||
}
|
||||
}
|
||||
|
||||
void Document::ChangeChar(int pos, char ch) {
|
||||
DeleteChars(pos, 1);
|
||||
InsertChar(pos, ch);
|
||||
}
|
||||
|
||||
void Document::DelChar(int pos) {
|
||||
DeleteChars(pos, LenChar(pos));
|
||||
}
|
||||
|
||||
int Document::DelCharBack(int pos) {
|
||||
if (pos <= 0) {
|
||||
return pos;
|
||||
} else if (IsCrLf(pos - 2)) {
|
||||
DeleteChars(pos - 2, 2);
|
||||
return pos - 2;
|
||||
} else if (SC_CP_UTF8 == dbcsCodePage) {
|
||||
int startChar = MovePositionOutsideChar(pos-1, -1, false);
|
||||
DeleteChars(startChar, pos - startChar);
|
||||
return startChar;
|
||||
} else if (IsDBCS(pos - 1)) {
|
||||
DeleteChars(pos - 2, 2);
|
||||
return pos - 2;
|
||||
} else {
|
||||
DeleteChars(pos - 1, 1);
|
||||
return pos - 1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool isindentchar(char ch) {
|
||||
return (ch == ' ') || (ch == '\t');
|
||||
}
|
||||
|
||||
static int NextTab(int pos, int tabSize) {
|
||||
return ((pos / tabSize) + 1) * tabSize;
|
||||
}
|
||||
|
||||
static void CreateIndentation(char *linebuf, int length, int indent, int tabSize, bool insertSpaces) {
|
||||
length--; // ensure space for \0
|
||||
if (!insertSpaces) {
|
||||
while ((indent >= tabSize) && (length > 0)) {
|
||||
*linebuf++ = '\t';
|
||||
indent -= tabSize;
|
||||
length--;
|
||||
}
|
||||
}
|
||||
while ((indent > 0) && (length > 0)) {
|
||||
*linebuf++ = ' ';
|
||||
indent--;
|
||||
length--;
|
||||
}
|
||||
*linebuf = '\0';
|
||||
}
|
||||
|
||||
int Document::GetLineIndentation(int line) {
|
||||
int indent = 0;
|
||||
if ((line >= 0) && (line < LinesTotal())) {
|
||||
int lineStart = LineStart(line);
|
||||
int length = Length();
|
||||
for (int i=lineStart;i<length;i++) {
|
||||
char ch = cb.CharAt(i);
|
||||
if (ch == ' ')
|
||||
indent++;
|
||||
else if (ch == '\t')
|
||||
indent = NextTab(indent, tabInChars);
|
||||
else
|
||||
return indent;
|
||||
}
|
||||
}
|
||||
return indent;
|
||||
}
|
||||
|
||||
void Document::SetLineIndentation(int line, int indent) {
|
||||
int indentOfLine = GetLineIndentation(line);
|
||||
if (indent < 0)
|
||||
indent = 0;
|
||||
if (indent != indentOfLine) {
|
||||
char linebuf[1000];
|
||||
CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs);
|
||||
int thisLineStart = LineStart(line);
|
||||
int indentPos = GetLineIndentPosition(line);
|
||||
DeleteChars(thisLineStart, indentPos - thisLineStart);
|
||||
InsertString(thisLineStart, linebuf);
|
||||
}
|
||||
}
|
||||
|
||||
int Document::GetLineIndentPosition(int line) {
|
||||
if (line < 0)
|
||||
return 0;
|
||||
int pos = LineStart(line);
|
||||
int length = Length();
|
||||
while ((pos < length) && isindentchar(cb.CharAt(pos))) {
|
||||
pos++;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
int Document::GetColumn(int pos) {
|
||||
int column = 0;
|
||||
int line = LineFromPosition(pos);
|
||||
if ((line >= 0) && (line < LinesTotal())) {
|
||||
for (int i=LineStart(line);i<pos;i++) {
|
||||
char ch = cb.CharAt(i);
|
||||
if (ch == '\t')
|
||||
column = NextTab(column, tabInChars);
|
||||
else if (ch == '\r')
|
||||
return column;
|
||||
else if (ch == '\n')
|
||||
return column;
|
||||
else
|
||||
column++;
|
||||
}
|
||||
}
|
||||
return column;
|
||||
}
|
||||
|
||||
void Document::Indent(bool forwards, int lineBottom, int lineTop) {
|
||||
// Dedent - suck white space off the front of the line to dedent by equivalent of a tab
|
||||
for (int line = lineBottom; line >= lineTop; line--) {
|
||||
int indentOfLine = GetLineIndentation(line);
|
||||
if (forwards)
|
||||
SetLineIndentation(line, indentOfLine + IndentSize());
|
||||
else
|
||||
SetLineIndentation(line, indentOfLine - IndentSize());
|
||||
}
|
||||
}
|
||||
|
||||
void Document::ConvertLineEnds(int eolModeSet) {
|
||||
BeginUndoAction();
|
||||
for (int pos = 0; pos < Length(); pos++) {
|
||||
if (cb.CharAt(pos) == '\r') {
|
||||
if (cb.CharAt(pos+1) == '\n') {
|
||||
if (eolModeSet != SC_EOL_CRLF) {
|
||||
DeleteChars(pos, 2);
|
||||
if (eolModeSet == SC_EOL_CR)
|
||||
InsertString(pos, "\r", 1);
|
||||
else
|
||||
InsertString(pos, "\n", 1);
|
||||
} else {
|
||||
pos++;
|
||||
}
|
||||
} else {
|
||||
if (eolModeSet != SC_EOL_CR) {
|
||||
DeleteChars(pos, 1);
|
||||
if (eolModeSet == SC_EOL_CRLF) {
|
||||
InsertString(pos, "\r\n", 2);
|
||||
pos++;
|
||||
} else {
|
||||
InsertString(pos, "\n", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (cb.CharAt(pos) == '\n') {
|
||||
if (eolModeSet != SC_EOL_LF) {
|
||||
DeleteChars(pos, 1);
|
||||
if (eolModeSet == SC_EOL_CRLF) {
|
||||
InsertString(pos, "\r\n", 2);
|
||||
pos++;
|
||||
} else {
|
||||
InsertString(pos, "\r", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EndUndoAction();
|
||||
}
|
||||
|
||||
bool Document::IsWordChar(unsigned char ch) {
|
||||
if ((SC_CP_UTF8 == dbcsCodePage) && (ch >0x80))
|
||||
return true;
|
||||
return wordchars[ch];
|
||||
}
|
||||
|
||||
int Document::ExtendWordSelect(int pos, int delta) {
|
||||
if (delta < 0) {
|
||||
while (pos > 0 && IsWordChar(cb.CharAt(pos - 1)))
|
||||
pos--;
|
||||
} else {
|
||||
while (pos < (Length()) && IsWordChar(cb.CharAt(pos)))
|
||||
pos++;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
int Document::NextWordStart(int pos, int delta) {
|
||||
if (delta < 0) {
|
||||
while (pos > 0 && (cb.CharAt(pos - 1) == ' ' || cb.CharAt(pos - 1) == '\t'))
|
||||
pos--;
|
||||
if (isspace(cb.CharAt(pos - 1))) { // Back up to previous line
|
||||
while (pos > 0 && isspace(cb.CharAt(pos - 1)))
|
||||
pos--;
|
||||
} else {
|
||||
bool startAtWordChar = IsWordChar(cb.CharAt(pos - 1));
|
||||
while (pos > 0 && !isspace(cb.CharAt(pos - 1)) && (startAtWordChar == IsWordChar(cb.CharAt(pos - 1))))
|
||||
pos--;
|
||||
}
|
||||
} else {
|
||||
bool startAtWordChar = IsWordChar(cb.CharAt(pos));
|
||||
while (pos < (Length()) && isspace(cb.CharAt(pos)))
|
||||
pos++;
|
||||
while (pos < (Length()) && !isspace(cb.CharAt(pos)) && (startAtWordChar == IsWordChar(cb.CharAt(pos))))
|
||||
pos++;
|
||||
while (pos < (Length()) && (cb.CharAt(pos) == ' ' || cb.CharAt(pos) == '\t'))
|
||||
pos++;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
bool Document::IsWordStartAt(int pos) {
|
||||
if (pos > 0) {
|
||||
return !IsWordChar(CharAt(pos - 1));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Document::IsWordEndAt(int pos) {
|
||||
if (pos < Length() - 1) {
|
||||
return !IsWordChar(CharAt(pos));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Document::IsWordAt(int start, int end) {
|
||||
return IsWordStartAt(start) && IsWordEndAt(end);
|
||||
}
|
||||
|
||||
// Find text in document, supporting both forward and backward
|
||||
// searches (just pass minPos > maxPos to do a backward search)
|
||||
// Has not been tested with backwards DBCS searches yet.
|
||||
long Document::FindText(int minPos, int maxPos, const char *s,
|
||||
bool caseSensitive, bool word, bool wordStart) {
|
||||
bool forward = minPos <= maxPos;
|
||||
int increment = forward ? 1 : -1;
|
||||
|
||||
// Range endpoints should not be inside DBCS characters, but just in case, move them.
|
||||
int startPos = MovePositionOutsideChar(minPos, increment, false);
|
||||
int endPos = MovePositionOutsideChar(maxPos, increment, false);
|
||||
|
||||
// Compute actual search ranges needed
|
||||
int lengthFind = strlen(s);
|
||||
int endSearch = endPos;
|
||||
if (startPos <= endPos) {
|
||||
endSearch = endPos - lengthFind + 1;
|
||||
}
|
||||
//Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind);
|
||||
char firstChar = s[0];
|
||||
if (!caseSensitive)
|
||||
firstChar = static_cast<char>(toupper(firstChar));
|
||||
int pos = startPos;
|
||||
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
|
||||
char ch = CharAt(pos);
|
||||
if (caseSensitive) {
|
||||
if (ch == firstChar) {
|
||||
bool found = true;
|
||||
for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) {
|
||||
ch = CharAt(pos + posMatch);
|
||||
if (ch != s[posMatch])
|
||||
found = false;
|
||||
}
|
||||
if (found) {
|
||||
if ((!word && !wordStart) ||
|
||||
word && IsWordAt(pos, pos + lengthFind) ||
|
||||
wordStart && IsWordStartAt(pos))
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (toupper(ch) == firstChar) {
|
||||
bool found = true;
|
||||
for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) {
|
||||
ch = CharAt(pos + posMatch);
|
||||
if (toupper(ch) != toupper(s[posMatch]))
|
||||
found = false;
|
||||
}
|
||||
if (found) {
|
||||
if (!(word && wordStart) ||
|
||||
word && IsWordAt(pos, pos + lengthFind) ||
|
||||
wordStart && IsWordStartAt(pos))
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
pos += increment;
|
||||
if (dbcsCodePage) {
|
||||
// Ensure trying to match from start of character
|
||||
pos = MovePositionOutsideChar(pos, increment, false);
|
||||
}
|
||||
}
|
||||
//Platform::DebugPrintf("Not found\n");
|
||||
return - 1;
|
||||
}
|
||||
|
||||
int Document::LinesTotal() {
|
||||
return cb.Lines();
|
||||
}
|
||||
|
||||
void Document::ChangeCase(Range r, bool makeUpperCase) {
|
||||
for (int pos=r.start; pos<r.end; pos++) {
|
||||
char ch = CharAt(pos);
|
||||
if (dbcsCodePage && IsDBCS(pos)) {
|
||||
pos += LenChar(pos);
|
||||
} else {
|
||||
if (makeUpperCase) {
|
||||
if (islower(ch)) {
|
||||
ChangeChar(pos, static_cast<char>(toupper(ch)));
|
||||
}
|
||||
} else {
|
||||
if (isupper(ch)) {
|
||||
ChangeChar(pos, static_cast<char>(tolower(ch)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Document::SetWordChars(unsigned char *chars) {
|
||||
int ch;
|
||||
for (ch = 0; ch < 256; ch++) {
|
||||
wordchars[ch] = false;
|
||||
}
|
||||
if (chars) {
|
||||
while (*chars) {
|
||||
wordchars[*chars] = true;
|
||||
chars++;
|
||||
}
|
||||
} else {
|
||||
for (ch = 0; ch < 256; ch++) {
|
||||
wordchars[ch] = isalnum(ch) || ch == '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Document::SetStylingBits(int bits) {
|
||||
stylingBits = bits;
|
||||
stylingBitsMask = 0;
|
||||
for (int bit=0; bit<stylingBits; bit++) {
|
||||
stylingBitsMask <<= 1;
|
||||
stylingBitsMask |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void Document::StartStyling(int position, char mask) {
|
||||
stylingPos = position;
|
||||
stylingMask = mask;
|
||||
}
|
||||
|
||||
void Document::SetStyleFor(int length, char style) {
|
||||
if (enteredCount == 0) {
|
||||
enteredCount++;
|
||||
int prevEndStyled = endStyled;
|
||||
if (cb.SetStyleFor(stylingPos, length, style, stylingMask)) {
|
||||
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
|
||||
prevEndStyled, length);
|
||||
NotifyModified(mh);
|
||||
}
|
||||
stylingPos += length;
|
||||
endStyled = stylingPos;
|
||||
enteredCount--;
|
||||
}
|
||||
}
|
||||
|
||||
void Document::SetStyles(int length, char *styles) {
|
||||
if (enteredCount == 0) {
|
||||
enteredCount++;
|
||||
int prevEndStyled = endStyled;
|
||||
bool didChange = false;
|
||||
for (int iPos = 0; iPos < length; iPos++, stylingPos++) {
|
||||
if (cb.SetStyleAt(stylingPos, styles[iPos], stylingMask)) {
|
||||
didChange = true;
|
||||
}
|
||||
}
|
||||
endStyled = stylingPos;
|
||||
if (didChange) {
|
||||
DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER,
|
||||
prevEndStyled, endStyled - prevEndStyled);
|
||||
NotifyModified(mh);
|
||||
}
|
||||
enteredCount--;
|
||||
}
|
||||
}
|
||||
|
||||
bool Document::EnsureStyledTo(int pos) {
|
||||
// Ask the watchers to style, and stop as soon as one responds.
|
||||
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++)
|
||||
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
|
||||
return pos <= GetEndStyled();
|
||||
}
|
||||
|
||||
bool Document::AddWatcher(DocWatcher *watcher, void *userData) {
|
||||
for (int i = 0; i < lenWatchers; i++) {
|
||||
if ((watchers[i].watcher == watcher) &&
|
||||
(watchers[i].userData == userData))
|
||||
return false;
|
||||
}
|
||||
WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1];
|
||||
if (!pwNew)
|
||||
return false;
|
||||
for (int j = 0; j < lenWatchers; j++)
|
||||
pwNew[j] = watchers[j];
|
||||
pwNew[lenWatchers].watcher = watcher;
|
||||
pwNew[lenWatchers].userData = userData;
|
||||
delete []watchers;
|
||||
watchers = pwNew;
|
||||
lenWatchers++;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) {
|
||||
for (int i = 0; i < lenWatchers; i++) {
|
||||
if ((watchers[i].watcher == watcher) &&
|
||||
(watchers[i].userData == userData)) {
|
||||
if (lenWatchers == 1) {
|
||||
delete []watchers;
|
||||
watchers = 0;
|
||||
lenWatchers = 0;
|
||||
} else {
|
||||
WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers];
|
||||
if (!pwNew)
|
||||
return false;
|
||||
for (int j = 0; j < lenWatchers - 1; j++) {
|
||||
pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1];
|
||||
}
|
||||
delete []watchers;
|
||||
watchers = pwNew;
|
||||
lenWatchers--;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Document::NotifyModifyAttempt() {
|
||||
for (int i = 0; i < lenWatchers; i++) {
|
||||
watchers[i].watcher->NotifyModifyAttempt(this, watchers[i].userData);
|
||||
}
|
||||
}
|
||||
|
||||
void Document::NotifySavePoint(bool atSavePoint) {
|
||||
for (int i = 0; i < lenWatchers; i++) {
|
||||
watchers[i].watcher->NotifySavePoint(this, watchers[i].userData, atSavePoint);
|
||||
}
|
||||
}
|
||||
|
||||
void Document::NotifyModified(DocModification mh) {
|
||||
for (int i = 0; i < lenWatchers; i++) {
|
||||
watchers[i].watcher->NotifyModified(this, mh, watchers[i].userData);
|
||||
}
|
||||
}
|
||||
255
contrib/src/stc/scintilla/src/Document.h
Normal file
255
contrib/src/stc/scintilla/src/Document.h
Normal file
@@ -0,0 +1,255 @@
|
||||
// Scintilla source code edit control
|
||||
// Document.h - text document that handles notifications, DBCS, styling, words and end of line
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef DOCUMENT_H
|
||||
#define DOCUMENT_H
|
||||
|
||||
// A Position is a position within a document between two characters or at the beginning or end.
|
||||
// Sometimes used as a character index where it identifies the character after the position.
|
||||
typedef int Position;
|
||||
const Position invalidPosition = -1;
|
||||
|
||||
// The range class represents a range of text in a document.
|
||||
// The two values are not sorted as one end may be more significant than the other
|
||||
// as is the case for the selection where the end position is the position of the caret.
|
||||
// If either position is invalidPosition then the range is invalid and most operations will fail.
|
||||
class Range {
|
||||
public:
|
||||
Position start;
|
||||
Position end;
|
||||
|
||||
Range(Position pos=0) :
|
||||
start(pos), end(pos) {
|
||||
};
|
||||
Range(Position start_, Position end_) :
|
||||
start(start_), end(end_) {
|
||||
};
|
||||
|
||||
bool Valid() const {
|
||||
return (start != invalidPosition) && (end != invalidPosition);
|
||||
}
|
||||
|
||||
bool Contains(Position pos) const {
|
||||
if (start < end) {
|
||||
return (pos >= start && pos <= end);
|
||||
} else {
|
||||
return (pos <= start && pos >= end);
|
||||
}
|
||||
}
|
||||
|
||||
bool Contains(Range other) const {
|
||||
return Contains(other.start) && Contains(other.end);
|
||||
}
|
||||
|
||||
bool Overlaps(Range other) const {
|
||||
return
|
||||
Contains(other.start) ||
|
||||
Contains(other.end) ||
|
||||
other.Contains(start) ||
|
||||
other.Contains(end);
|
||||
}
|
||||
};
|
||||
|
||||
class DocWatcher;
|
||||
class DocModification;
|
||||
|
||||
class Document {
|
||||
|
||||
public:
|
||||
// Used to pair watcher pointer with user data
|
||||
class WatcherWithUserData {
|
||||
public:
|
||||
DocWatcher *watcher;
|
||||
void *userData;
|
||||
WatcherWithUserData() {
|
||||
watcher = 0;
|
||||
userData = 0;
|
||||
}
|
||||
};
|
||||
|
||||
private:
|
||||
int refCount;
|
||||
CellBuffer cb;
|
||||
bool wordchars[256];
|
||||
int stylingPos;
|
||||
char stylingMask;
|
||||
int endStyled;
|
||||
int enteredCount;
|
||||
int enteredReadOnlyCount;
|
||||
|
||||
WatcherWithUserData *watchers;
|
||||
int lenWatchers;
|
||||
|
||||
public:
|
||||
int stylingBits;
|
||||
int stylingBitsMask;
|
||||
|
||||
int eolMode;
|
||||
// dbcsCodePage can also be SC_CP_UTF8 to enable UTF-8 mode
|
||||
int dbcsCodePage;
|
||||
int tabInChars;
|
||||
int indentInChars;
|
||||
bool useTabs;
|
||||
|
||||
Document();
|
||||
virtual ~Document();
|
||||
|
||||
int AddRef();
|
||||
int Release();
|
||||
|
||||
int LineFromPosition(int pos);
|
||||
int ClampPositionIntoDocument(int pos);
|
||||
bool IsCrLf(int pos);
|
||||
int LenChar(int pos);
|
||||
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
||||
|
||||
// Gateways to modifying document
|
||||
void DeleteChars(int pos, int len);
|
||||
void InsertStyledString(int position, char *s, int insertLength);
|
||||
int Undo();
|
||||
int Redo();
|
||||
bool CanUndo() { return cb.CanUndo(); }
|
||||
bool CanRedo() { return cb.CanRedo(); }
|
||||
void DeleteUndoHistory() { cb.DeleteUndoHistory(); }
|
||||
bool SetUndoCollection(bool collectUndo) {
|
||||
return cb.SetUndoCollection(collectUndo);
|
||||
}
|
||||
bool IsCollectingUndo() { return cb.IsCollectingUndo(); }
|
||||
void BeginUndoAction() { cb.BeginUndoAction(); }
|
||||
void EndUndoAction() { cb.EndUndoAction(); }
|
||||
void SetSavePoint();
|
||||
bool IsSavePoint() { return cb.IsSavePoint(); }
|
||||
|
||||
int GetLineIndentation(int line);
|
||||
void SetLineIndentation(int line, int indent);
|
||||
int GetLineIndentPosition(int line);
|
||||
int GetColumn(int position);
|
||||
void Indent(bool forwards, int lineBottom, int lineTop);
|
||||
void ConvertLineEnds(int eolModeSet);
|
||||
void SetReadOnly(bool set) { cb.SetReadOnly(set); }
|
||||
bool IsReadOnly() { return cb.IsReadOnly(); }
|
||||
|
||||
void InsertChar(int pos, char ch);
|
||||
void InsertString(int position, const char *s);
|
||||
void InsertString(int position, const char *s, int insertLength);
|
||||
void ChangeChar(int pos, char ch);
|
||||
void DelChar(int pos);
|
||||
int DelCharBack(int pos);
|
||||
|
||||
char CharAt(int position) { return cb.CharAt(position); }
|
||||
void GetCharRange(char *buffer, int position, int lengthRetrieve) {
|
||||
cb.GetCharRange(buffer, position, lengthRetrieve);
|
||||
}
|
||||
char StyleAt(int position) { return cb.StyleAt(position); }
|
||||
int GetMark(int line) { return cb.GetMark(line); }
|
||||
int AddMark(int line, int markerNum);
|
||||
void DeleteMark(int line, int markerNum);
|
||||
void DeleteMarkFromHandle(int markerHandle);
|
||||
void DeleteAllMarks(int markerNum);
|
||||
int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); }
|
||||
int LineStart(int line);
|
||||
int LineEnd(int line);
|
||||
int LineEndPosition(int position);
|
||||
int VCHomePosition(int position);
|
||||
|
||||
int SetLevel(int line, int level);
|
||||
int GetLevel(int line) { return cb.GetLevel(line); }
|
||||
void ClearLevels() { cb.ClearLevels(); }
|
||||
int GetLastChild(int lineParent, int level=-1);
|
||||
int GetFoldParent(int line);
|
||||
|
||||
void Indent(bool forwards);
|
||||
int ExtendWordSelect(int pos, int delta);
|
||||
int NextWordStart(int pos, int delta);
|
||||
int Length() { return cb.Length(); }
|
||||
long FindText(int minPos, int maxPos, const char *s,
|
||||
bool caseSensitive, bool word, bool wordStart);
|
||||
long FindText(int iMessage, unsigned long wParam, long lParam);
|
||||
int LinesTotal();
|
||||
|
||||
void ChangeCase(Range r, bool makeUpperCase);
|
||||
|
||||
void SetWordChars(unsigned char *chars);
|
||||
void SetStylingBits(int bits);
|
||||
void StartStyling(int position, char mask);
|
||||
void SetStyleFor(int length, char style);
|
||||
void SetStyles(int length, char *styles);
|
||||
int GetEndStyled() { return endStyled; }
|
||||
bool EnsureStyledTo(int pos);
|
||||
|
||||
int SetLineState(int line, int state) { return cb.SetLineState(line, state); }
|
||||
int GetLineState(int line) { return cb.GetLineState(line); }
|
||||
int GetMaxLineState() { return cb.GetMaxLineState(); }
|
||||
|
||||
bool AddWatcher(DocWatcher *watcher, void *userData);
|
||||
bool RemoveWatcher(DocWatcher *watcher, void *userData);
|
||||
const WatcherWithUserData *GetWatchers() const { return watchers; }
|
||||
int GetLenWatchers() const { return lenWatchers; }
|
||||
|
||||
private:
|
||||
bool IsDBCS(int pos);
|
||||
bool IsWordChar(unsigned char ch);
|
||||
bool IsWordStartAt(int pos);
|
||||
bool IsWordEndAt(int pos);
|
||||
bool IsWordAt(int start, int end);
|
||||
void ModifiedAt(int pos);
|
||||
|
||||
void NotifyModifyAttempt();
|
||||
void NotifySavePoint(bool atSavePoint);
|
||||
void NotifyModified(DocModification mh);
|
||||
|
||||
int IndentSize() { return indentInChars ? indentInChars : tabInChars; }
|
||||
};
|
||||
|
||||
// To optimise processing of document modifications by DocWatchers, a hint is passed indicating the
|
||||
// scope of the change.
|
||||
// If the DocWatcher is a document view then this can be used to optimise screen updating.
|
||||
class DocModification {
|
||||
public:
|
||||
int modificationType;
|
||||
int position;
|
||||
int length;
|
||||
int linesAdded; // Negative if lines deleted
|
||||
const char *text; // Only valid for changes to text, not for changes to style
|
||||
int line;
|
||||
int foldLevelNow;
|
||||
int foldLevelPrev;
|
||||
|
||||
DocModification(int modificationType_, int position_=0, int length_=0,
|
||||
int linesAdded_=0, const char *text_=0) :
|
||||
modificationType(modificationType_),
|
||||
position(position_),
|
||||
length(length_),
|
||||
linesAdded(linesAdded_),
|
||||
text(text_),
|
||||
line(0),
|
||||
foldLevelNow(0),
|
||||
foldLevelPrev(0) {}
|
||||
|
||||
DocModification(int modificationType_, const Action &act, int linesAdded_=0) :
|
||||
modificationType(modificationType_),
|
||||
position(act.position / 2),
|
||||
length(act.lenData),
|
||||
linesAdded(linesAdded_),
|
||||
text(act.data),
|
||||
line(0),
|
||||
foldLevelNow(0),
|
||||
foldLevelPrev(0) {}
|
||||
};
|
||||
|
||||
// A class that wants to receive notifications from a Document must be derived from DocWatcher
|
||||
// and implement the notification methods. It can then be added to the watcher list with AddWatcher.
|
||||
class DocWatcher {
|
||||
public:
|
||||
virtual ~DocWatcher() {}
|
||||
|
||||
virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0;
|
||||
virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0;
|
||||
virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0;
|
||||
virtual void NotifyDeleted(Document *doc, void *userData) = 0;
|
||||
virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
176
contrib/src/stc/scintilla/src/DocumentAccessor.cxx
Normal file
176
contrib/src/stc/scintilla/src/DocumentAccessor.cxx
Normal file
@@ -0,0 +1,176 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// Accessor.cxx - rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 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 "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "SVector.h"
|
||||
#include "Accessor.h"
|
||||
#include "DocumentAccessor.h"
|
||||
#include "CellBuffer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "Document.h"
|
||||
|
||||
DocumentAccessor::~DocumentAccessor() {
|
||||
}
|
||||
|
||||
#if PLAT_WIN
|
||||
bool DocumentAccessor::InternalIsLeadByte(char ch) {
|
||||
if (SC_CP_UTF8 == codePage)
|
||||
// For lexing, all characters >= 0x80 are treated the
|
||||
// same so none is considered a lead byte.
|
||||
return false;
|
||||
else
|
||||
return IsDBCSLeadByteEx(codePage, ch);
|
||||
}
|
||||
#else
|
||||
// PLAT_GTK or PLAT_WX
|
||||
// TODO: support DBCS under GTK+ and WX
|
||||
bool DocumentAccessor::InternalIsLeadByte(char) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void DocumentAccessor::Fill(int position) {
|
||||
if (lenDoc == -1)
|
||||
lenDoc = pdoc->Length();
|
||||
startPos = position - slopSize;
|
||||
if (startPos + bufferSize > lenDoc)
|
||||
startPos = lenDoc - bufferSize;
|
||||
if (startPos < 0)
|
||||
startPos = 0;
|
||||
endPos = startPos + bufferSize;
|
||||
if (endPos > lenDoc)
|
||||
endPos = lenDoc;
|
||||
|
||||
pdoc->GetCharRange(buf, startPos, endPos-startPos);
|
||||
buf[endPos-startPos] = '\0';
|
||||
}
|
||||
|
||||
char DocumentAccessor::StyleAt(int position) {
|
||||
return pdoc->StyleAt(position);
|
||||
}
|
||||
|
||||
int DocumentAccessor::GetLine(int position) {
|
||||
return pdoc->LineFromPosition(position);
|
||||
}
|
||||
|
||||
int DocumentAccessor::LineStart(int line) {
|
||||
return pdoc->LineStart(line);
|
||||
}
|
||||
|
||||
int DocumentAccessor::LevelAt(int line) {
|
||||
return pdoc->GetLevel(line);
|
||||
}
|
||||
|
||||
int DocumentAccessor::Length() {
|
||||
if (lenDoc == -1)
|
||||
lenDoc = pdoc->Length();
|
||||
return lenDoc;
|
||||
}
|
||||
|
||||
int DocumentAccessor::GetLineState(int line) {
|
||||
return pdoc->GetLineState(line);
|
||||
}
|
||||
|
||||
int DocumentAccessor::SetLineState(int line, int state) {
|
||||
return pdoc->SetLineState(line, state);
|
||||
}
|
||||
|
||||
void DocumentAccessor::StartAt(unsigned int start, char chMask) {
|
||||
pdoc->StartStyling(start, chMask);
|
||||
}
|
||||
|
||||
void DocumentAccessor::StartSegment(unsigned int pos) {
|
||||
startSeg = pos;
|
||||
}
|
||||
|
||||
void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) {
|
||||
// Only perform styling if non empty range
|
||||
if (pos != startSeg - 1) {
|
||||
if (pos < startSeg) {
|
||||
Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos);
|
||||
}
|
||||
|
||||
if (validLen + (pos - startSeg + 1) >= bufferSize)
|
||||
Flush();
|
||||
if (validLen + (pos - startSeg + 1) >= bufferSize) {
|
||||
// Too big for buffer so send directly
|
||||
pdoc->SetStyleFor(pos - startSeg + 1, static_cast<char>(chAttr));
|
||||
} else {
|
||||
if (chAttr != chWhile)
|
||||
chFlags = 0;
|
||||
chAttr |= chFlags;
|
||||
for (unsigned int i = startSeg; i <= pos; i++) {
|
||||
styleBuf[validLen++] = static_cast<char>(chAttr);
|
||||
}
|
||||
}
|
||||
}
|
||||
startSeg = pos+1;
|
||||
}
|
||||
|
||||
void DocumentAccessor::SetLevel(int line, int level) {
|
||||
pdoc->SetLevel(line, level);
|
||||
}
|
||||
|
||||
void DocumentAccessor::Flush() {
|
||||
startPos = extremePosition;
|
||||
lenDoc = -1;
|
||||
if (validLen > 0) {
|
||||
pdoc->SetStyles(validLen, styleBuf);
|
||||
validLen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {
|
||||
int end = Length();
|
||||
int spaceFlags = 0;
|
||||
|
||||
// Determines the indentation level of the current line and also checks for consistent
|
||||
// indentation compared to the previous line.
|
||||
// Indentation is judged consistent when the indentation whitespace of each line lines
|
||||
// the same or the indentation of one line is a prefix of the other.
|
||||
|
||||
int pos = LineStart(line);
|
||||
char ch = (*this)[pos];
|
||||
int indent = 0;
|
||||
bool inPrevPrefix = line > 0;
|
||||
int posPrev = inPrevPrefix ? LineStart(line-1) : 0;
|
||||
while ((ch == ' ' || ch == '\t') && (pos < end)) {
|
||||
if (inPrevPrefix) {
|
||||
char chPrev = (*this)[posPrev++];
|
||||
if (chPrev == ' ' || chPrev == '\t') {
|
||||
if (chPrev != ch)
|
||||
spaceFlags |= wsInconsistent;
|
||||
} else {
|
||||
inPrevPrefix = false;
|
||||
}
|
||||
}
|
||||
if (ch == ' ') {
|
||||
spaceFlags |= wsSpace;
|
||||
indent++;
|
||||
} else { // Tab
|
||||
spaceFlags |= wsTab;
|
||||
if (spaceFlags & wsSpace)
|
||||
spaceFlags |= wsSpaceTab;
|
||||
indent = (indent / 8 + 1) * 8;
|
||||
}
|
||||
ch = (*this)[++pos];
|
||||
}
|
||||
|
||||
*flags = spaceFlags;
|
||||
indent += SC_FOLDLEVELBASE;
|
||||
// if completely empty line or the start of a comment...
|
||||
if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) )
|
||||
return indent | SC_FOLDLEVELWHITEFLAG;
|
||||
else
|
||||
return indent;
|
||||
}
|
||||
|
||||
49
contrib/src/stc/scintilla/src/DocumentAccessor.h
Normal file
49
contrib/src/stc/scintilla/src/DocumentAccessor.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// DocumentAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
class Document;
|
||||
|
||||
class DocumentAccessor : public Accessor {
|
||||
// Private so DocumentAccessor objects can not be copied
|
||||
DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {}
|
||||
DocumentAccessor &operator=(const DocumentAccessor &) { return *this; }
|
||||
protected:
|
||||
Document *pdoc;
|
||||
PropSet &props;
|
||||
int lenDoc;
|
||||
|
||||
char styleBuf[bufferSize];
|
||||
int validLen;
|
||||
char chFlags;
|
||||
char chWhile;
|
||||
unsigned int startSeg;
|
||||
|
||||
bool InternalIsLeadByte(char ch);
|
||||
void Fill(int position);
|
||||
public:
|
||||
DocumentAccessor(Document *pdoc_, PropSet &props_) :
|
||||
Accessor(), pdoc(pdoc_), props(props_),
|
||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||
}
|
||||
~DocumentAccessor();
|
||||
char StyleAt(int position);
|
||||
int GetLine(int position);
|
||||
int LineStart(int line);
|
||||
int LevelAt(int line);
|
||||
int Length();
|
||||
void Flush();
|
||||
int GetLineState(int line);
|
||||
int SetLineState(int line, int state);
|
||||
int GetPropertyInt(const char *key, int defaultValue=0) {
|
||||
return props.GetInt(key, defaultValue);
|
||||
}
|
||||
|
||||
void StartAt(unsigned int start, char chMask=31);
|
||||
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
|
||||
unsigned int GetStartSegment() { return startSeg; }
|
||||
void StartSegment(unsigned int pos);
|
||||
void ColourTo(unsigned int pos, int chAttr);
|
||||
void SetLevel(int line, int level);
|
||||
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
|
||||
};
|
||||
4260
contrib/src/stc/scintilla/src/Editor.cxx
Normal file
4260
contrib/src/stc/scintilla/src/Editor.cxx
Normal file
File diff suppressed because it is too large
Load Diff
308
contrib/src/stc/scintilla/src/Editor.h
Normal file
308
contrib/src/stc/scintilla/src/Editor.h
Normal file
@@ -0,0 +1,308 @@
|
||||
// Scintilla source code edit control
|
||||
// Editor.h - defines the main editor class
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef EDITOR_H
|
||||
#define EDITOR_H
|
||||
|
||||
class Caret {
|
||||
public:
|
||||
bool active;
|
||||
bool on;
|
||||
int period;
|
||||
|
||||
Caret();
|
||||
};
|
||||
|
||||
class Timer {
|
||||
|
||||
public:
|
||||
bool ticking;
|
||||
int ticksToWait;
|
||||
enum {tickSize = 100};
|
||||
int tickerID;
|
||||
|
||||
Timer();
|
||||
};
|
||||
|
||||
class LineLayout {
|
||||
public:
|
||||
// Drawing is only performed for maxLineLength characters on each line.
|
||||
enum {maxLineLength = 4000};
|
||||
int numCharsInLine;
|
||||
int xHighlightGuide;
|
||||
bool highlightColumn;
|
||||
int selStart;
|
||||
int selEnd;
|
||||
int edgeColumn;
|
||||
char chars[maxLineLength+1];
|
||||
char styles[maxLineLength+1];
|
||||
char indicators[maxLineLength+1];
|
||||
int positions[maxLineLength+1];
|
||||
};
|
||||
|
||||
class Editor : public DocWatcher {
|
||||
// Private so Editor objects can not be copied
|
||||
Editor(const Editor &) : DocWatcher() {}
|
||||
Editor &operator=(const Editor &) { return *this; }
|
||||
protected: // ScintillaBase subclass needs access to much of Editor
|
||||
|
||||
// On GTK+, Scintilla is a container widget holding two scroll bars and a drawing area
|
||||
// whereas on Windows there is just one window with both scroll bars turned on.
|
||||
// Therefore, on GTK+ the following are separate windows but only one window on Windows.
|
||||
Window wMain; // The Scintilla parent window
|
||||
Window wDraw; // The text drawing area
|
||||
|
||||
// Style resources may be expensive to allocate so are cached between uses.
|
||||
// When a style attribute is changed, this cache is flushed.
|
||||
bool stylesValid;
|
||||
ViewStyle vs;
|
||||
Palette palette;
|
||||
int printMagnification;
|
||||
int printColourMode;
|
||||
|
||||
bool hideSelection;
|
||||
bool inOverstrike;
|
||||
|
||||
// In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to
|
||||
// the screen. This avoids flashing but is about 30% slower.
|
||||
bool bufferedDraw;
|
||||
|
||||
int xOffset; // Horizontal scrolled amount in pixels
|
||||
int xCaretMargin; // Ensure this many pixels visible on both sides of caret
|
||||
bool horizontalScrollBarVisible;
|
||||
|
||||
Surface pixmapLine;
|
||||
Surface pixmapSelMargin;
|
||||
Surface pixmapSelPattern;
|
||||
Surface pixmapIndentGuide;
|
||||
Surface pixmapIndentGuideHighlight;
|
||||
// Intellimouse support - currently only implemented for Windows
|
||||
unsigned int ucWheelScrollLines;
|
||||
int cWheelDelta; //wheel delta from roll
|
||||
|
||||
KeyMap kmap;
|
||||
|
||||
Caret caret;
|
||||
Timer timer;
|
||||
|
||||
Point lastClick;
|
||||
unsigned int lastClickTime;
|
||||
enum { selChar, selWord, selLine } selectionType;
|
||||
Point ptMouseLast;
|
||||
bool firstExpose;
|
||||
bool inDragDrop;
|
||||
bool dropWentOutside;
|
||||
int posDrag;
|
||||
int posDrop;
|
||||
int lastXChosen;
|
||||
int lineAnchor;
|
||||
int originalAnchorPos;
|
||||
int currentPos;
|
||||
int anchor;
|
||||
int topLine;
|
||||
int posTopLine;
|
||||
|
||||
bool needUpdateUI;
|
||||
Position braces[2];
|
||||
int bracesMatchStyle;
|
||||
int highlightGuideColumn;
|
||||
|
||||
int theEdge;
|
||||
|
||||
enum { notPainting, painting, paintAbandoned } paintState;
|
||||
PRectangle rcPaint;
|
||||
bool paintingAllText;
|
||||
|
||||
int modEventMask;
|
||||
|
||||
char *dragChars;
|
||||
int lenDrag;
|
||||
bool dragIsRectangle;
|
||||
enum { selStream, selRectangle, selRectangleFixed } selType;
|
||||
int xStartSelect;
|
||||
int xEndSelect;
|
||||
bool primarySelection;
|
||||
|
||||
int caretPolicy;
|
||||
int caretSlop;
|
||||
|
||||
int searchAnchor;
|
||||
|
||||
int displayPopupMenu;
|
||||
|
||||
#ifdef MACRO_SUPPORT
|
||||
int recordingMacro;
|
||||
#endif
|
||||
|
||||
int foldFlags;
|
||||
ContractionState cs;
|
||||
|
||||
Document *pdoc;
|
||||
|
||||
Editor();
|
||||
virtual ~Editor();
|
||||
virtual void Initialise() = 0;
|
||||
virtual void Finalise();
|
||||
|
||||
void InvalidateStyleData();
|
||||
void InvalidateStyleRedraw();
|
||||
virtual void RefreshColourPalette(Palette &pal, bool want);
|
||||
void RefreshStyleData();
|
||||
void DropGraphics();
|
||||
|
||||
PRectangle GetClientRectangle();
|
||||
PRectangle GetTextRectangle();
|
||||
|
||||
int LinesOnScreen();
|
||||
int LinesToScroll();
|
||||
int MaxScrollPos();
|
||||
Point LocationFromPosition(unsigned int pos);
|
||||
int XFromPosition(unsigned int pos);
|
||||
int PositionFromLocation(Point pt);
|
||||
int PositionFromLineX(int line, int x);
|
||||
int LineFromLocation(Point pt);
|
||||
void SetTopLine(int topLineNew);
|
||||
|
||||
void RedrawRect(PRectangle rc);
|
||||
void Redraw();
|
||||
void RedrawSelMargin();
|
||||
PRectangle RectangleFromRange(int start, int end);
|
||||
void InvalidateRange(int start, int end);
|
||||
|
||||
int CurrentPosition();
|
||||
bool SelectionEmpty();
|
||||
int SelectionStart(int line=-1);
|
||||
int SelectionEnd(int line=-1);
|
||||
void SetSelection(int currentPos_, int anchor_);
|
||||
void SetSelection(int currentPos_);
|
||||
void SetEmptySelection(int currentPos_);
|
||||
int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true);
|
||||
int MovePositionTo(int newPos, bool extend = false);
|
||||
int MovePositionSoVisible(int pos, int moveDir);
|
||||
void SetLastXChosen();
|
||||
|
||||
void ScrollTo(int line);
|
||||
virtual void ScrollText(int linesToMove);
|
||||
void HorizontalScrollTo(int xPos);
|
||||
void MoveCaretInsideView();
|
||||
void EnsureCaretVisible(bool useMargin=true);
|
||||
void ShowCaretAtCurrentPosition();
|
||||
void DropCaret();
|
||||
void InvalidateCaret();
|
||||
|
||||
void PaintSelMargin(Surface *surface, PRectangle &rc);
|
||||
void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout &ll);
|
||||
void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart,
|
||||
PRectangle rcLine, LineLayout &ll);
|
||||
void Paint(Surface *surfaceWindow, PRectangle rcArea);
|
||||
long FormatRange(bool draw, RangeToFormat *pfr);
|
||||
|
||||
virtual void SetVerticalScrollPos() = 0;
|
||||
virtual void SetHorizontalScrollPos() = 0;
|
||||
virtual bool ModifyScrollBars(int nMax, int nPage) = 0;
|
||||
virtual void ReconfigureScrollBars();
|
||||
void SetScrollBarsTo(PRectangle rsClient);
|
||||
void SetScrollBars();
|
||||
|
||||
void AddChar(char ch);
|
||||
virtual void AddCharUTF(char *s, unsigned int len);
|
||||
void ClearSelection();
|
||||
void ClearAll();
|
||||
void ClearDocumentStyle();
|
||||
void Cut();
|
||||
void PasteRectangular(int pos, const char *ptr, int len);
|
||||
virtual void Copy() = 0;
|
||||
virtual void Paste() = 0;
|
||||
void Clear();
|
||||
void SelectAll();
|
||||
void Undo();
|
||||
void Redo();
|
||||
void DelChar();
|
||||
void DelCharBack();
|
||||
virtual void ClaimSelection() = 0;
|
||||
|
||||
virtual void NotifyChange() = 0;
|
||||
virtual void NotifyFocus(bool focus);
|
||||
virtual void NotifyParent(SCNotification scn) = 0;
|
||||
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
||||
void NotifyChar(char ch);
|
||||
void NotifyMove(int position);
|
||||
void NotifySavePoint(bool isSavePoint);
|
||||
void NotifyModifyAttempt();
|
||||
virtual void NotifyDoubleClick(Point pt, bool shift);
|
||||
void NotifyUpdateUI();
|
||||
bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
|
||||
void NotifyNeedShown(int pos, int len);
|
||||
|
||||
void NotifyModifyAttempt(Document *document, void *userData);
|
||||
void NotifySavePoint(Document *document, void *userData, bool atSavePoint);
|
||||
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);
|
||||
void LineTranspose();
|
||||
virtual void CancelModes();
|
||||
virtual int KeyCommand(unsigned int iMessage);
|
||||
virtual int KeyDefault(int /* key */, int /*modifiers*/);
|
||||
int KeyDown(int key, bool shift, bool ctrl, bool alt);
|
||||
|
||||
int GetWhitespaceVisible();
|
||||
void SetWhitespaceVisible(int view);
|
||||
|
||||
void Indent(bool forwards);
|
||||
|
||||
long FindText(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
void SearchAnchor();
|
||||
long SearchText(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
void GoToLine(int lineNo);
|
||||
|
||||
char *CopyRange(int start, int end);
|
||||
int SelectionRangeLength();
|
||||
char *CopySelectionRange();
|
||||
void CopySelectionIntoDrag();
|
||||
void SetDragPosition(int newPos);
|
||||
virtual void StartDrag();
|
||||
void DropAt(int position, const char *value, bool moving, bool rectangular);
|
||||
// PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after.
|
||||
// Before means either before any line of selection or before selection on its line, with a similar meaning to after
|
||||
int PositionInSelection(int pos);
|
||||
bool PointInSelection(Point pt);
|
||||
bool PointInSelMargin(Point pt);
|
||||
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
|
||||
void ButtonMove(Point pt);
|
||||
void ButtonUp(Point pt, unsigned int curTime, bool ctrl);
|
||||
|
||||
void Tick();
|
||||
virtual void SetTicking(bool on) = 0;
|
||||
virtual void SetMouseCapture(bool on) = 0;
|
||||
virtual bool HaveMouseCapture() = 0;
|
||||
|
||||
void CheckForChangeOutsidePaint(Range r);
|
||||
int BraceMatch(int position, int maxReStyle);
|
||||
void SetBraceHighlight(Position pos0, Position pos1, int matchStyle);
|
||||
|
||||
void SetDocPointer(Document *document);
|
||||
|
||||
void Expand(int &line, bool doExpand);
|
||||
void ToggleContraction(int line);
|
||||
void EnsureLineVisible(int line);
|
||||
|
||||
virtual long DefWndProc(unsigned int iMessage, unsigned long wParam, long lParam) = 0;
|
||||
|
||||
public:
|
||||
// Public so scintilla_send_message can use it
|
||||
virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
// Public so scintilla_set_id can use it
|
||||
int ctrlID;
|
||||
};
|
||||
|
||||
#endif
|
||||
61
contrib/src/stc/scintilla/src/Indicator.cxx
Normal file
61
contrib/src/stc/scintilla/src/Indicator.cxx
Normal file
@@ -0,0 +1,61 @@
|
||||
// Scintilla source code edit control
|
||||
// Indicator.cxx - defines the style of indicators which are text decorations such as underlining
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "Indicator.h"
|
||||
|
||||
void Indicator::Draw(Surface *surface, PRectangle &rc) {
|
||||
surface->PenColour(fore.allocated);
|
||||
int ymid = (rc.bottom + rc.top) / 2;
|
||||
if (style == INDIC_SQUIGGLE) {
|
||||
surface->MoveTo(rc.left, rc.top);
|
||||
int x = rc.left + 2;
|
||||
int y = 2;
|
||||
while (x < rc.right) {
|
||||
surface->LineTo(x, rc.top + y);
|
||||
x += 2;
|
||||
y = 2 - y;
|
||||
}
|
||||
surface->LineTo(rc.right, rc.top + y); // Finish the line
|
||||
} else if (style == INDIC_TT) {
|
||||
surface->MoveTo(rc.left, ymid);
|
||||
int x = rc.left + 5;
|
||||
while (x < rc.right) {
|
||||
surface->LineTo(x, ymid);
|
||||
surface->MoveTo(x-3, ymid);
|
||||
surface->LineTo(x-3, ymid+2);
|
||||
x++;
|
||||
surface->MoveTo(x, ymid);
|
||||
x += 5;
|
||||
}
|
||||
surface->LineTo(rc.right, ymid); // Finish the line
|
||||
if (x - 3 <= rc.right) {
|
||||
surface->MoveTo(x-3, ymid);
|
||||
surface->LineTo(x-3, ymid+2);
|
||||
}
|
||||
} else if (style == INDIC_DIAGONAL) {
|
||||
int x = rc.left;
|
||||
while (x < rc.right) {
|
||||
surface->MoveTo(x, rc.top+2);
|
||||
int endX = x+3;
|
||||
int endY = rc.top - 1;
|
||||
if (endX > rc.right) {
|
||||
endY += endX - rc.right;
|
||||
endX = rc.right;
|
||||
}
|
||||
surface->LineTo(endX, endY);
|
||||
x += 4;
|
||||
}
|
||||
} else if (style == INDIC_STRIKE) {
|
||||
surface->MoveTo(rc.left, rc.top - 4);
|
||||
surface->LineTo(rc.right, rc.top - 4);
|
||||
} else { // Either INDIC_PLAIN or unknown
|
||||
surface->MoveTo(rc.left, ymid);
|
||||
surface->LineTo(rc.right, ymid);
|
||||
}
|
||||
}
|
||||
|
||||
18
contrib/src/stc/scintilla/src/Indicator.h
Normal file
18
contrib/src/stc/scintilla/src/Indicator.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// Scintilla source code edit control
|
||||
// Indicator.h - defines the style of indicators which are text decorations such as underlining
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef INDICATOR_H
|
||||
#define INDICATOR_H
|
||||
|
||||
class Indicator {
|
||||
public:
|
||||
int style;
|
||||
ColourPair fore;
|
||||
Indicator() : style(INDIC_PLAIN), fore(Colour(0,0,0)) {
|
||||
}
|
||||
void Draw(Surface *surface, PRectangle &rc);
|
||||
};
|
||||
|
||||
#endif
|
||||
121
contrib/src/stc/scintilla/src/KeyMap.cxx
Normal file
121
contrib/src/stc/scintilla/src/KeyMap.cxx
Normal file
@@ -0,0 +1,121 @@
|
||||
// Scintilla source code edit control
|
||||
// KeyMap.cxx - defines a mapping between keystrokes and commands
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
|
||||
#include "KeyMap.h"
|
||||
|
||||
KeyMap::KeyMap() : kmap(0), len(0), alloc(0) {
|
||||
for (int i = 0; MapDefault[i].key; i++) {
|
||||
AssignCmdKey(MapDefault[i].key,
|
||||
MapDefault[i].modifiers,
|
||||
MapDefault[i].msg);
|
||||
}
|
||||
}
|
||||
|
||||
KeyMap::~KeyMap() {
|
||||
Clear();
|
||||
}
|
||||
|
||||
void KeyMap::Clear() {
|
||||
delete []kmap;
|
||||
kmap = 0;
|
||||
len = 0;
|
||||
alloc = 0;
|
||||
}
|
||||
|
||||
void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) {
|
||||
if ((len+1) >= alloc) {
|
||||
KeyToCommand *ktcNew = new KeyToCommand[alloc + 5];
|
||||
if (!ktcNew)
|
||||
return;
|
||||
for (int k=0;k<len;k++)
|
||||
ktcNew[k] = kmap[k];
|
||||
alloc += 5;
|
||||
delete []kmap;
|
||||
kmap = ktcNew;
|
||||
}
|
||||
for (int keyIndex = 0; keyIndex < len; keyIndex++) {
|
||||
if ((key == kmap[keyIndex].key) && (modifiers == kmap[keyIndex].modifiers)) {
|
||||
kmap[keyIndex].msg = msg;
|
||||
return;
|
||||
}
|
||||
}
|
||||
kmap[len].key = key;
|
||||
kmap[len].modifiers = modifiers;
|
||||
kmap[len].msg = msg;
|
||||
len++;
|
||||
}
|
||||
|
||||
unsigned int KeyMap::Find(int key, int modifiers) {
|
||||
for (int i=0; i < len; i++) {
|
||||
if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) {
|
||||
return kmap[i].msg;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
KeyToCommand KeyMap::MapDefault[] = {
|
||||
{SCK_DOWN, SCI_NORM, SCI_LINEDOWN},
|
||||
{SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND},
|
||||
{SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN},
|
||||
{SCK_UP, SCI_NORM, SCI_LINEUP},
|
||||
{SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND},
|
||||
{SCK_UP, SCI_CTRL, SCI_LINESCROLLUP},
|
||||
{SCK_LEFT, SCI_NORM, SCI_CHARLEFT},
|
||||
{SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND},
|
||||
{SCK_LEFT, SCI_CTRL, SCI_WORDLEFT},
|
||||
{SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND},
|
||||
{SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT},
|
||||
{SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND},
|
||||
{SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT},
|
||||
{SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND},
|
||||
{SCK_HOME, SCI_NORM, SCI_VCHOME},
|
||||
{SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND},
|
||||
{SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART},
|
||||
{SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND},
|
||||
{SCK_END, SCI_NORM, SCI_LINEEND},
|
||||
{SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND},
|
||||
{SCK_END, SCI_CTRL, SCI_DOCUMENTEND},
|
||||
{SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND},
|
||||
{SCK_PRIOR, SCI_NORM, SCI_PAGEUP},
|
||||
{SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND},
|
||||
{SCK_NEXT, SCI_NORM, SCI_PAGEDOWN},
|
||||
{SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND},
|
||||
{SCK_DELETE, SCI_NORM, SCI_CLEAR},
|
||||
{SCK_DELETE, SCI_SHIFT, SCI_CUT},
|
||||
{SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT},
|
||||
{SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE},
|
||||
{SCK_INSERT, SCI_SHIFT, SCI_PASTE},
|
||||
{SCK_INSERT, SCI_CTRL, SCI_COPY},
|
||||
{SCK_ESCAPE, SCI_NORM, SCI_CANCEL},
|
||||
{SCK_BACK, SCI_NORM, SCI_DELETEBACK},
|
||||
{SCK_BACK, SCI_SHIFT, SCI_DELETEBACK},
|
||||
{SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT},
|
||||
{SCK_BACK, SCI_ALT, SCI_UNDO},
|
||||
{'Z', SCI_CTRL, SCI_UNDO},
|
||||
{'Y', SCI_CTRL, SCI_REDO},
|
||||
{'X', SCI_CTRL, SCI_CUT},
|
||||
{'C', SCI_CTRL, SCI_COPY},
|
||||
{'V', SCI_CTRL, SCI_PASTE},
|
||||
{'A', SCI_CTRL, SCI_SELECTALL},
|
||||
{SCK_TAB, SCI_NORM, SCI_TAB},
|
||||
{SCK_TAB, SCI_SHIFT, SCI_BACKTAB},
|
||||
{SCK_RETURN, SCI_NORM, SCI_NEWLINE},
|
||||
{SCK_ADD, SCI_CTRL, SCI_ZOOMIN},
|
||||
{SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT},
|
||||
{SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM},
|
||||
//'L', SCI_CTRL, SCI_FORMFEED,
|
||||
{'L', SCI_CTRL, SCI_LINECUT},
|
||||
{'L', SCI_CSHIFT, SCI_LINEDELETE},
|
||||
{'T', SCI_CTRL, SCI_LINETRANSPOSE},
|
||||
{'U', SCI_CTRL, SCI_LOWERCASE},
|
||||
{'U', SCI_CSHIFT, SCI_UPPERCASE},
|
||||
{0,0,0},
|
||||
};
|
||||
|
||||
36
contrib/src/stc/scintilla/src/KeyMap.h
Normal file
36
contrib/src/stc/scintilla/src/KeyMap.h
Normal file
@@ -0,0 +1,36 @@
|
||||
// Scintilla source code edit control
|
||||
// KeyMap.h - defines a mapping between keystrokes and commands
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef KEYTOCOMMAND_H
|
||||
#define KEYTOCOMMAND_H
|
||||
|
||||
#define SCI_NORM 0
|
||||
#define SCI_SHIFT SCMOD_SHIFT
|
||||
#define SCI_CTRL SCMOD_CTRL
|
||||
#define SCI_ALT SCMOD_ALT
|
||||
#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
|
||||
#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
|
||||
|
||||
class KeyToCommand {
|
||||
public:
|
||||
int key;
|
||||
int modifiers;
|
||||
unsigned int msg;
|
||||
};
|
||||
|
||||
class KeyMap {
|
||||
KeyToCommand *kmap;
|
||||
int len;
|
||||
int alloc;
|
||||
static KeyToCommand MapDefault[];
|
||||
public:
|
||||
KeyMap();
|
||||
~KeyMap();
|
||||
void Clear();
|
||||
void AssignCmdKey(int key, int modifiers, unsigned int msg);
|
||||
unsigned int Find(int key, int modifiers); // 0 returned on failure
|
||||
};
|
||||
|
||||
#endif
|
||||
45
contrib/src/stc/scintilla/src/KeyWords.cxx
Normal file
45
contrib/src/stc/scintilla/src/KeyWords.cxx
Normal file
@@ -0,0 +1,45 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// KeyWords.cxx - colourise for particular languages
|
||||
// Copyright 1998-2000 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"
|
||||
|
||||
LexerModule *LexerModule::base = 0;
|
||||
|
||||
LexerModule::LexerModule(int language_, LexerFunction fn_) :
|
||||
language(language_), fn(fn_) {
|
||||
next = base;
|
||||
base = this;
|
||||
}
|
||||
|
||||
void LexerModule::Colourise(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
int language, WordList *keywordlists[], Accessor &styler) {
|
||||
LexerModule *lm = base;
|
||||
while (lm) {
|
||||
if (lm->language == language) {
|
||||
lm->fn(startPos, lengthDoc, initStyle, keywordlists, styler);
|
||||
return;
|
||||
}
|
||||
lm = lm->next;
|
||||
}
|
||||
// Unknown language
|
||||
// Null language means all style bytes are 0 so just mark the end - no need to fill in.
|
||||
if (lengthDoc > 0) {
|
||||
styler.StartAt(startPos + lengthDoc - 1);
|
||||
styler.StartSegment(startPos + lengthDoc - 1);
|
||||
styler.ColourTo(startPos + lengthDoc - 1, 0);
|
||||
}
|
||||
}
|
||||
262
contrib/src/stc/scintilla/src/LexCPP.cxx
Normal file
262
contrib/src/stc/scintilla/src/LexCPP.cxx
Normal file
@@ -0,0 +1,262 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// LexCPP.cxx - lexer for C++, C, Java, and Javascript
|
||||
// Copyright 1998-2000 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 bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||
char s[100];
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
bool wordIsUUID = false;
|
||||
char chAttr = SCE_C_IDENTIFIER;
|
||||
if (isdigit(s[0]) || (s[0] == '.'))
|
||||
chAttr = SCE_C_NUMBER;
|
||||
else {
|
||||
if (keywords.InList(s)) {
|
||||
chAttr = SCE_C_WORD;
|
||||
wordIsUUID = strcmp(s, "uuid") == 0;
|
||||
}
|
||||
}
|
||||
styler.ColourTo(end, chAttr);
|
||||
return wordIsUUID;
|
||||
}
|
||||
|
||||
static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
styler.StartAt(startPos);
|
||||
|
||||
bool fold = styler.GetPropertyInt("fold");
|
||||
bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor");
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
||||
int levelCurrent = levelPrev;
|
||||
|
||||
int state = initStyle;
|
||||
if (state == SCE_C_STRINGEOL) // Does not leak onto next line
|
||||
state = SCE_C_DEFAULT;
|
||||
char chPrev = ' ';
|
||||
char chNext = styler[startPos];
|
||||
unsigned int lengthDoc = startPos + length;
|
||||
int visibleChars = 0;
|
||||
styler.StartSegment(startPos);
|
||||
bool lastWordWasUUID = false;
|
||||
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
|
||||
if ((ch == '\r' && chNext != '\n') || (ch == '\n')) {
|
||||
// Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix)
|
||||
// Avoid triggering two times on Dos/Win
|
||||
// End of line
|
||||
if (state == SCE_C_STRINGEOL) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
if (fold) {
|
||||
int lev = levelPrev;
|
||||
if (visibleChars == 0)
|
||||
lev |= SC_FOLDLEVELWHITEFLAG;
|
||||
if ((levelCurrent > levelPrev) && (visibleChars > 0))
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
lineCurrent++;
|
||||
levelPrev = levelCurrent;
|
||||
}
|
||||
visibleChars = 0;
|
||||
}
|
||||
if (!isspace(ch))
|
||||
visibleChars++;
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
chPrev = ' ';
|
||||
i += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state == SCE_C_DEFAULT) {
|
||||
if (ch == '@' && chNext == '\"') {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_VERBATIM;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} else if (iswordstart(ch) || (ch == '@')) {
|
||||
styler.ColourTo(i-1, state);
|
||||
if (lastWordWasUUID) {
|
||||
state = SCE_C_UUID;
|
||||
lastWordWasUUID = false;
|
||||
} else {
|
||||
state = SCE_C_IDENTIFIER;
|
||||
}
|
||||
} else if (ch == '/' && chNext == '*') {
|
||||
styler.ColourTo(i-1, state);
|
||||
if (styler.SafeGetCharAt(i + 2) == '*')
|
||||
state = SCE_C_COMMENTDOC;
|
||||
else
|
||||
state = SCE_C_COMMENT;
|
||||
} else if (ch == '/' && chNext == '/') {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_STRING;
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_CHARACTER;
|
||||
} else if (ch == '#' && visibleChars == 1) {
|
||||
// Preprocessor commands are alone on their line
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_PREPROCESSOR;
|
||||
// Skip whitespace between # and preprocessor word
|
||||
do {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} while (isspace(ch) && (i < lengthDoc));
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i-1, state);
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
if ((ch == '{') || (ch == '}')) {
|
||||
levelCurrent += (ch == '{') ? 1 : -1;
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_C_IDENTIFIER) {
|
||||
if (!iswordchar(ch)) {
|
||||
lastWordWasUUID = classifyWordCpp(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||
state = SCE_C_DEFAULT;
|
||||
if (ch == '/' && chNext == '*') {
|
||||
if (styler.SafeGetCharAt(i + 2) == '*')
|
||||
state = SCE_C_COMMENTDOC;
|
||||
else
|
||||
state = SCE_C_COMMENT;
|
||||
} else if (ch == '/' && chNext == '/') {
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
state = SCE_C_STRING;
|
||||
} else if (ch == '\'') {
|
||||
state = SCE_C_CHARACTER;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
if ((ch == '{') || (ch == '}')) {
|
||||
levelCurrent += (ch == '{') ? 1 : -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (state == SCE_C_PREPROCESSOR) {
|
||||
if (stylingWithinPreprocessor) {
|
||||
if (isspace(ch)) {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
} else {
|
||||
if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_C_COMMENT) {
|
||||
if (ch == '/' && chPrev == '*') {
|
||||
if (((i > styler.GetStartSegment() + 2) || (
|
||||
(initStyle == SCE_C_COMMENT) &&
|
||||
(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_C_COMMENTDOC) {
|
||||
if (ch == '/' && chPrev == '*') {
|
||||
if (((i > styler.GetStartSegment() + 2) || (
|
||||
(initStyle == SCE_C_COMMENTDOC) &&
|
||||
(styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_C_COMMENTLINE) {
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_C_STRING) {
|
||||
if (ch == '\\') {
|
||||
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
} else if (chNext == '\r' || chNext == '\n') {
|
||||
styler.ColourTo(i-1, SCE_C_STRINGEOL);
|
||||
state = SCE_C_STRINGEOL;
|
||||
}
|
||||
} else if (state == SCE_C_CHARACTER) {
|
||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) {
|
||||
styler.ColourTo(i-1, SCE_C_STRINGEOL);
|
||||
state = SCE_C_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_C_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_C_VERBATIM) {
|
||||
if (ch == '\"') {
|
||||
if (chNext == '\"') {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} else {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_C_UUID) {
|
||||
if (ch == '\r' || ch == '\n' || ch == ')') {
|
||||
styler.ColourTo(i-1, state);
|
||||
if (ch == ')')
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
chPrev = ch;
|
||||
}
|
||||
styler.ColourTo(lengthDoc - 1, state);
|
||||
|
||||
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
|
||||
if (fold) {
|
||||
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
|
||||
//styler.SetLevel(lineCurrent, levelCurrent | flagsNext);
|
||||
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc);
|
||||
1151
contrib/src/stc/scintilla/src/LexHTML.cxx
Normal file
1151
contrib/src/stc/scintilla/src/LexHTML.cxx
Normal file
File diff suppressed because it is too large
Load Diff
298
contrib/src/stc/scintilla/src/LexLua.cxx
Normal file
298
contrib/src/stc/scintilla/src/LexLua.cxx
Normal file
@@ -0,0 +1,298 @@
|
||||
// LexLua.cxx - lexer for Lua language
|
||||
// Written by Paul Winwood
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
static void classifyWordLua(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler)
|
||||
{
|
||||
char s[100];
|
||||
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
|
||||
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++)
|
||||
{
|
||||
s[i] = styler[start + i];
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
|
||||
char chAttr = SCE_LUA_IDENTIFIER;
|
||||
|
||||
if (wordIsNumber)
|
||||
chAttr = SCE_LUA_NUMBER;
|
||||
else
|
||||
{
|
||||
if (keywords.InList(s))
|
||||
{
|
||||
chAttr = SCE_LUA_WORD;
|
||||
}
|
||||
}
|
||||
styler.ColourTo(end, chAttr);
|
||||
}
|
||||
|
||||
static void ColouriseLuaDoc(unsigned int startPos,
|
||||
int length,
|
||||
int initStyle,
|
||||
WordList *keywordlists[],
|
||||
Accessor &styler)
|
||||
{
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
styler.StartAt(startPos);
|
||||
styler.GetLine(startPos);
|
||||
|
||||
int state = initStyle;
|
||||
char chPrev = ' ';
|
||||
char chNext = styler[startPos];
|
||||
unsigned int lengthDoc = startPos + length;
|
||||
bool firstChar = true;
|
||||
int literalString = 0;
|
||||
|
||||
styler.StartSegment(startPos);
|
||||
for (unsigned int i = startPos; i <= lengthDoc; i++)
|
||||
{
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
|
||||
if (styler.IsLeadByte(ch))
|
||||
{
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
chPrev = ' ';
|
||||
i += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state == SCE_LUA_STRINGEOL)
|
||||
{
|
||||
if (ch != '\r' && ch != '\n')
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
if (state == SCE_LUA_LITERALSTRING && ch == '[' && chNext == '[')
|
||||
{
|
||||
literalString++;
|
||||
}
|
||||
else
|
||||
if (state == SCE_LUA_DEFAULT)
|
||||
{
|
||||
if (ch == '-' && chNext == '-')
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_COMMENTLINE;
|
||||
}
|
||||
else
|
||||
if (ch == '[' && chNext == '[')
|
||||
{
|
||||
state = SCE_LUA_LITERALSTRING;
|
||||
literalString = 1;
|
||||
}
|
||||
else
|
||||
if (iswordstart(ch))
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_WORD;
|
||||
}
|
||||
else
|
||||
if (ch == '\"')
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_STRING;
|
||||
}
|
||||
else
|
||||
if (ch == '\'')
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_CHARACTER;
|
||||
}
|
||||
else
|
||||
if (ch == '$' && firstChar)
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_PREPROCESSOR;
|
||||
}
|
||||
else
|
||||
if (isoperator(ch))
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
styler.ColourTo(i, SCE_LUA_OPERATOR);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (state == SCE_LUA_WORD)
|
||||
{
|
||||
if (!iswordchar(ch))
|
||||
{
|
||||
classifyWordLua(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
if (ch == '[' && chNext == '[')
|
||||
{
|
||||
literalString = 1;
|
||||
state = SCE_LUA_LITERALSTRING;
|
||||
}
|
||||
else
|
||||
if (ch == '-' && chNext == '-')
|
||||
{
|
||||
state = SCE_LUA_COMMENTLINE;
|
||||
}
|
||||
else
|
||||
if (ch == '\"')
|
||||
{
|
||||
state = SCE_LUA_STRING;
|
||||
}
|
||||
else
|
||||
if (ch == '\'')
|
||||
{
|
||||
state = SCE_LUA_CHARACTER;
|
||||
}
|
||||
else
|
||||
if (ch == '$' && firstChar)
|
||||
{
|
||||
state = SCE_LUA_PREPROCESSOR;
|
||||
}
|
||||
else
|
||||
if (isoperator(ch))
|
||||
{
|
||||
styler.ColourTo(i, SCE_LUA_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state == SCE_LUA_LITERALSTRING)
|
||||
{
|
||||
if (ch == ']' && (chPrev == ']') && (--literalString == 0))
|
||||
{
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (state == SCE_LUA_PREPROCESSOR)
|
||||
{
|
||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (state == SCE_LUA_COMMENTLINE)
|
||||
{
|
||||
if (ch == '\r' || ch == '\n')
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (state == SCE_LUA_STRING)
|
||||
{
|
||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_STRINGEOL;
|
||||
}
|
||||
else
|
||||
if (ch == '\\')
|
||||
{
|
||||
if (chNext == '\"' || chNext == '\\')
|
||||
{
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (ch == '\"')
|
||||
{
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (state == SCE_LUA_CHARACTER)
|
||||
{
|
||||
if ((ch == '\r' || ch == '\n') && (chPrev != '\\'))
|
||||
{
|
||||
styler.ColourTo(i-1, state);
|
||||
state = SCE_LUA_STRINGEOL;
|
||||
}
|
||||
else
|
||||
if (ch == '\\')
|
||||
{
|
||||
if (chNext == '\'' || chNext == '\\')
|
||||
{
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (ch == '\'')
|
||||
{
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_LUA_DEFAULT;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (state == SCE_LUA_DEFAULT)
|
||||
{
|
||||
if (ch == '-' && chNext == '-')
|
||||
{
|
||||
state = SCE_LUA_COMMENTLINE;
|
||||
}
|
||||
else
|
||||
if (ch == '\"')
|
||||
{
|
||||
state = SCE_LUA_STRING;
|
||||
}
|
||||
else
|
||||
if (ch == '\'')
|
||||
{
|
||||
state = SCE_LUA_CHARACTER;
|
||||
}
|
||||
else
|
||||
if (ch == '$' && firstChar)
|
||||
{
|
||||
state = SCE_LUA_PREPROCESSOR;
|
||||
}
|
||||
else
|
||||
if (iswordstart(ch))
|
||||
{
|
||||
state = SCE_LUA_WORD;
|
||||
}
|
||||
else
|
||||
if (isoperator(ch))
|
||||
{
|
||||
styler.ColourTo(i, SCE_LUA_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
chPrev = ch;
|
||||
firstChar = (ch == '\r' || ch == '\n');
|
||||
}
|
||||
styler.ColourTo(lengthDoc - 1, state);
|
||||
}
|
||||
|
||||
LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc);
|
||||
351
contrib/src/stc/scintilla/src/LexOthers.cxx
Normal file
351
contrib/src/stc/scintilla/src/LexOthers.cxx
Normal file
@@ -0,0 +1,351 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// LexOthers.cxx - lexers for properties files, batch files, make files and error lists
|
||||
// Copyright 1998-2000 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 ColouriseBatchLine(char *lineBuffer, int endLine, Accessor &styler) {
|
||||
if (0 == strncmp(lineBuffer, "REM", 3)) {
|
||||
styler.ColourTo(endLine, 1);
|
||||
} else if (0 == strncmp(lineBuffer, "rem", 3)) {
|
||||
styler.ColourTo(endLine, 1);
|
||||
} else if (0 == strncmp(lineBuffer, "SET", 3)) {
|
||||
styler.ColourTo(endLine, 2);
|
||||
} else if (0 == strncmp(lineBuffer, "set", 3)) {
|
||||
styler.ColourTo(endLine, 2);
|
||||
} else if (lineBuffer[0] == ':') {
|
||||
styler.ColourTo(endLine, 3);
|
||||
} else {
|
||||
styler.ColourTo(endLine, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
|
||||
char lineBuffer[1024];
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
unsigned int linePos = 0;
|
||||
for (unsigned int i = startPos; i < startPos + length; i++) {
|
||||
lineBuffer[linePos++] = styler[i];
|
||||
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
|
||||
ColouriseBatchLine(lineBuffer, i, styler);
|
||||
linePos = 0;
|
||||
}
|
||||
}
|
||||
if (linePos > 0)
|
||||
ColouriseBatchLine(lineBuffer, startPos + length, styler);
|
||||
}
|
||||
|
||||
static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) {
|
||||
// It is needed to remember the current state to recognize starting
|
||||
// comment lines before the first "diff " or "--- ". If a real
|
||||
// difference starts then each line starting with ' ' is a whitespace
|
||||
// otherwise it is considered a comment (Only in..., Binary file...)
|
||||
if (0 == strncmp(lineBuffer, "diff ", 3)) {
|
||||
styler.ColourTo(endLine, 2);
|
||||
} else if (0 == strncmp(lineBuffer, "--- ", 3)) {
|
||||
styler.ColourTo(endLine, 3);
|
||||
} else if (0 == strncmp(lineBuffer, "+++ ", 3)) {
|
||||
styler.ColourTo(endLine, 3);
|
||||
} else if (lineBuffer[0] == '@') {
|
||||
styler.ColourTo(endLine, 4);
|
||||
} else if (lineBuffer[0] == '-') {
|
||||
styler.ColourTo(endLine, 5);
|
||||
} else if (lineBuffer[0] == '+') {
|
||||
styler.ColourTo(endLine, 6);
|
||||
} else if (lineBuffer[0] != ' ') {
|
||||
styler.ColourTo(endLine, 1);
|
||||
} else {
|
||||
styler.ColourTo(endLine, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseDiffDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
|
||||
char lineBuffer[1024];
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
unsigned int linePos = 0;
|
||||
for (unsigned int i = startPos; i < startPos + length; i++) {
|
||||
lineBuffer[linePos++] = styler[i];
|
||||
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
|
||||
ColouriseDiffLine(lineBuffer, i, styler);
|
||||
linePos = 0;
|
||||
}
|
||||
}
|
||||
if (linePos > 0)
|
||||
ColouriseDiffLine(lineBuffer, startPos + length, styler);
|
||||
}
|
||||
|
||||
static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) {
|
||||
int i = 0;
|
||||
while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
|
||||
i++;
|
||||
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
|
||||
styler.ColourTo(endPos, 1);
|
||||
} else if (lineBuffer[i] == '[') {
|
||||
styler.ColourTo(endPos, 2);
|
||||
} else if (lineBuffer[i] == '@') {
|
||||
styler.ColourTo(startLine+i, 4);
|
||||
if (lineBuffer[++i] == '=')
|
||||
styler.ColourTo(startLine+i, 3);
|
||||
styler.ColourTo(endPos, 0);
|
||||
} else {
|
||||
while (lineBuffer[i] != '=' && (i < lengthLine)) // Search the '=' character
|
||||
i++;
|
||||
if (lineBuffer[i] == '=') {
|
||||
styler.ColourTo(startLine+i-1, 0);
|
||||
styler.ColourTo(startLine+i, 3);
|
||||
styler.ColourTo(endPos, 0);
|
||||
} else {
|
||||
styler.ColourTo(endPos, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
|
||||
char lineBuffer[1024];
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
unsigned int linePos = 0;
|
||||
int startLine = startPos;
|
||||
for (unsigned int i = startPos; i <= startPos + length; i++) {
|
||||
lineBuffer[linePos++] = styler[i];
|
||||
if ((styler[i] == '\r' && styler.SafeGetCharAt(i+1) != '\n') ||
|
||||
styler[i] == '\n' ||
|
||||
(linePos >= sizeof(lineBuffer) - 1)) {
|
||||
lineBuffer[linePos] = '\0';
|
||||
ColourisePropsLine(lineBuffer, linePos, startLine, i, styler);
|
||||
linePos = 0;
|
||||
startLine = i+1;
|
||||
}
|
||||
}
|
||||
if (linePos > 0)
|
||||
ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length, styler);
|
||||
}
|
||||
|
||||
static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
|
||||
int i = 0;
|
||||
while (isspace(lineBuffer[i]) && (i < lengthLine))
|
||||
i++;
|
||||
if (lineBuffer[i] == '#' || lineBuffer[i] == '!') {
|
||||
styler.ColourTo(endPos, 1);
|
||||
} else {
|
||||
styler.ColourTo(endPos, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
|
||||
char lineBuffer[1024];
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
unsigned int linePos = 0;
|
||||
for (unsigned int i = startPos; i <= startPos + length; i++) {
|
||||
lineBuffer[linePos++] = styler[i];
|
||||
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
|
||||
ColouriseMakeLine(lineBuffer, linePos, i, styler);
|
||||
linePos = 0;
|
||||
}
|
||||
}
|
||||
if (linePos > 0)
|
||||
ColouriseMakeLine(lineBuffer, linePos, startPos + length, styler);
|
||||
}
|
||||
|
||||
static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
|
||||
if (lineBuffer[0] == '>') {
|
||||
// Command or return status
|
||||
styler.ColourTo(endPos, SCE_ERR_CMD);
|
||||
} else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) {
|
||||
styler.ColourTo(endPos, SCE_ERR_PYTHON);
|
||||
} else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) {
|
||||
// Borland error message
|
||||
styler.ColourTo(endPos, SCE_ERR_BORLAND);
|
||||
} else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) {
|
||||
// Borland warning message
|
||||
styler.ColourTo(endPos, SCE_ERR_BORLAND);
|
||||
} else if (strstr(lineBuffer, " at " ) &&
|
||||
strstr(lineBuffer, " at " ) < lineBuffer+lengthLine &&
|
||||
strstr(lineBuffer, " line ") &&
|
||||
strstr(lineBuffer, " line ") < lineBuffer+lengthLine) {
|
||||
// perl error message
|
||||
styler.ColourTo(endPos, SCE_ERR_PERL);
|
||||
} else {
|
||||
// Look for <filename>:<line>:message
|
||||
// Look for <filename>(line)message
|
||||
// Look for <filename>(line,pos)message
|
||||
int state = 0;
|
||||
for (int i = 0; i < lengthLine; i++) {
|
||||
if (state == 0 && lineBuffer[i] == ':' && isdigit(lineBuffer[i + 1])) {
|
||||
state = 1;
|
||||
} else if (state == 0 && lineBuffer[i] == '(') {
|
||||
state = 10;
|
||||
} else if (state == 1 && isdigit(lineBuffer[i])) {
|
||||
state = 2;
|
||||
} else if (state == 2 && lineBuffer[i] == ':') {
|
||||
state = 3;
|
||||
break;
|
||||
} else if (state == 2 && !isdigit(lineBuffer[i])) {
|
||||
state = 99;
|
||||
} else if (state == 10 && isdigit(lineBuffer[i])) {
|
||||
state = 11;
|
||||
} else if (state == 11 && lineBuffer[i] == ',') {
|
||||
state = 14;
|
||||
} else if (state == 11 && lineBuffer[i] == ')') {
|
||||
state = 12;
|
||||
} else if (state == 12 && lineBuffer[i] == ':') {
|
||||
state = 13;
|
||||
} else if (state == 14 && lineBuffer[i] == ')') {
|
||||
state = 15;
|
||||
break;
|
||||
} else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) {
|
||||
state = 99;
|
||||
}
|
||||
}
|
||||
if (state == 3) {
|
||||
styler.ColourTo(endPos, SCE_ERR_GCC);
|
||||
} else if ((state == 13) || (state == 14) || (state == 15)) {
|
||||
styler.ColourTo(endPos, SCE_ERR_MS);
|
||||
} else {
|
||||
styler.ColourTo(endPos, SCE_ERR_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
|
||||
char lineBuffer[1024];
|
||||
styler.StartAt(startPos);
|
||||
styler.StartSegment(startPos);
|
||||
unsigned int linePos = 0;
|
||||
for (unsigned int i = startPos; i <= startPos + length; i++) {
|
||||
lineBuffer[linePos++] = styler[i];
|
||||
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
|
||||
ColouriseErrorListLine(lineBuffer, linePos, i, styler);
|
||||
linePos = 0;
|
||||
}
|
||||
}
|
||||
if (linePos > 0)
|
||||
ColouriseErrorListLine(lineBuffer, linePos, startPos + length, styler);
|
||||
}
|
||||
|
||||
static int isSpecial(char s) {
|
||||
|
||||
return (s == '\\') || (s == ',') || (s == ';') || (s == '\'') || (s == ' ') ||
|
||||
(s == '\"') || (s == '`') || (s == '^') || (s == '~');
|
||||
}
|
||||
|
||||
static int isTag(int start, Accessor &styler) {
|
||||
|
||||
char s[6];
|
||||
unsigned int i = 0, e=1;
|
||||
while (i < 5 && e) {
|
||||
s[i] = styler[start + i];
|
||||
i++;
|
||||
e = styler[start + i] != '{';
|
||||
}
|
||||
s[i] = '\0';
|
||||
return (strcmp(s, "begin") == 0) || (strcmp(s, "end") == 0);
|
||||
}
|
||||
|
||||
static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *[], Accessor &styler) {
|
||||
|
||||
styler.StartAt(startPos);
|
||||
|
||||
int state = initStyle;
|
||||
char chNext = styler[startPos];
|
||||
styler.StartSegment(startPos);
|
||||
int lengthDoc = startPos + length;
|
||||
|
||||
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_L_DEFAULT :
|
||||
switch(ch) {
|
||||
case '\\' :
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (isSpecial(styler[i + 1])) {
|
||||
styler.ColourTo(i + 1, SCE_L_COMMAND);
|
||||
i++;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
else {
|
||||
if (isTag(i+1, styler))
|
||||
state = SCE_L_TAG;
|
||||
else
|
||||
state = SCE_L_COMMAND;
|
||||
}
|
||||
break;
|
||||
case '$' :
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_L_MATH;
|
||||
if (chNext == '$') {
|
||||
i++;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
break;
|
||||
case '%' :
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_L_COMMENT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SCE_L_COMMAND :
|
||||
if (chNext == '[' || chNext == '{' || chNext == '}' ||
|
||||
chNext == ' ' || chNext == '\r' || chNext == '\n') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_L_DEFAULT;
|
||||
i++;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
break;
|
||||
case SCE_L_TAG :
|
||||
if (ch == '}') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_L_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_L_MATH :
|
||||
if (ch == '$') {
|
||||
if (chNext == '$') {
|
||||
i++;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_L_DEFAULT;
|
||||
}
|
||||
break;
|
||||
case SCE_L_COMMENT :
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_L_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
styler.ColourTo(lengthDoc, state);
|
||||
}
|
||||
|
||||
LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc);
|
||||
LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc);
|
||||
LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc);
|
||||
LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc);
|
||||
LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc);
|
||||
LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc);
|
||||
508
contrib/src/stc/scintilla/src/LexPerl.cxx
Normal file
508
contrib/src/stc/scintilla/src/LexPerl.cxx
Normal file
@@ -0,0 +1,508 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// LexPerl.cxx - lexer for subset of Perl
|
||||
// Copyright 1998-2000 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"
|
||||
|
||||
inline bool isPerlOperator(char ch) {
|
||||
if (isalnum(ch))
|
||||
return false;
|
||||
// '.' left out as it is used to make up numbers
|
||||
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '\\' ||
|
||||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
|
||||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
|
||||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
|
||||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
|
||||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||
char s[100];
|
||||
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = styler[start + i];
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
char chAttr = SCE_PL_IDENTIFIER;
|
||||
if (wordIsNumber)
|
||||
chAttr = SCE_PL_NUMBER;
|
||||
else {
|
||||
if (keywords.InList(s))
|
||||
chAttr = SCE_PL_WORD;
|
||||
}
|
||||
styler.ColourTo(end, chAttr);
|
||||
return chAttr;
|
||||
}
|
||||
|
||||
static bool isEndVar(char ch) {
|
||||
return !isalnum(ch) && ch != '#' && ch != '$' &&
|
||||
ch != '_' && ch != '\'';
|
||||
}
|
||||
|
||||
static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) {
|
||||
if ((pos + static_cast<int>(strlen(val))) >= lengthDoc) {
|
||||
return false;
|
||||
}
|
||||
while (*val) {
|
||||
if (*val != styler[pos++]) {
|
||||
return false;
|
||||
}
|
||||
val++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static char opposite(char ch) {
|
||||
if (ch == '(')
|
||||
return ')';
|
||||
if (ch == '[')
|
||||
return ']';
|
||||
if (ch == '{')
|
||||
return '}';
|
||||
if (ch == '<')
|
||||
return '>';
|
||||
return ch;
|
||||
}
|
||||
|
||||
static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
// Lexer for perl often has to backtrack to start of current style to determine
|
||||
// which characters are being used as quotes, how deeply nested is the
|
||||
// start position and what the termination string is for here documents
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
char sooked[100];
|
||||
int quotes = 0;
|
||||
char quoteDown = 'd';
|
||||
char quoteUp = 'd';
|
||||
int quoteRep = 1;
|
||||
int sookedpos = 0;
|
||||
bool preferRE = true;
|
||||
sooked[sookedpos] = '\0';
|
||||
int state = initStyle;
|
||||
int lengthDoc = startPos + length;
|
||||
// If in a long distance lexical state, seek to the beginning to find quote characters
|
||||
if (state == SCE_PL_HERE || state == SCE_PL_REGEX ||
|
||||
state == SCE_PL_REGSUBST || state == SCE_PL_LONGQUOTE) {
|
||||
while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) {
|
||||
startPos--;
|
||||
}
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
styler.StartAt(startPos);
|
||||
char chPrev = styler.SafeGetCharAt(startPos - 1);
|
||||
char chNext = styler[startPos];
|
||||
styler.StartSegment(startPos);
|
||||
for (int i = startPos; i < lengthDoc; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
char chNext2 = styler.SafeGetCharAt(i + 2);
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
chPrev = ' ';
|
||||
i += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state == SCE_PL_DEFAULT) {
|
||||
if (iswordstart(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (ch == 's' && !isalnum(chNext)) {
|
||||
state = SCE_PL_REGSUBST;
|
||||
quotes = 0;
|
||||
quoteUp = '\0';
|
||||
quoteDown = '\0';
|
||||
quoteRep = 2;
|
||||
} else if (ch == 'm' && !isalnum(chNext)) {
|
||||
state = SCE_PL_REGEX;
|
||||
quotes = 0;
|
||||
quoteUp = '\0';
|
||||
quoteDown = '\0';
|
||||
quoteRep = 1;
|
||||
} else if (ch == 't' && chNext == 'r' && !isalnum(chNext2)) {
|
||||
state = SCE_PL_REGSUBST;
|
||||
quotes = 0;
|
||||
quoteUp = '\0';
|
||||
quoteDown = '\0';
|
||||
quoteRep = 2;
|
||||
i++;
|
||||
chNext = chNext2;
|
||||
} else if (ch == 'q' && (chNext == 'q' || chNext == 'r' || chNext == 'w' || chNext == 'x') && !isalnum(chNext2)) {
|
||||
state = SCE_PL_LONGQUOTE;
|
||||
i++;
|
||||
chNext = chNext2;
|
||||
quotes = 0;
|
||||
quoteUp = '\0';
|
||||
quoteDown = '\0';
|
||||
quoteRep = 1;
|
||||
} else {
|
||||
state = SCE_PL_WORD;
|
||||
preferRE = false;
|
||||
}
|
||||
} else if (ch == '#') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_STRING;
|
||||
} else if (ch == '\'') {
|
||||
if (chPrev == '&') {
|
||||
// Archaic call
|
||||
styler.ColourTo(i, state);
|
||||
} else {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_CHARACTER;
|
||||
}
|
||||
} else if (ch == '`') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_BACKTICKS;
|
||||
} else if (ch == '$') {
|
||||
preferRE = false;
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (isalnum(chNext) || chNext == '#' || chNext == '$' || chNext == '_') {
|
||||
state = SCE_PL_SCALAR;
|
||||
} else if (chNext != '{' && chNext != '[') {
|
||||
styler.ColourTo(i, SCE_PL_SCALAR);
|
||||
i++;
|
||||
ch = ' ';
|
||||
chNext = ' ';
|
||||
} else {
|
||||
styler.ColourTo(i, SCE_PL_SCALAR);
|
||||
}
|
||||
} else if (ch == '@') {
|
||||
preferRE = false;
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') {
|
||||
state = SCE_PL_ARRAY;
|
||||
} else if (chNext != '{' && chNext != '[') {
|
||||
styler.ColourTo(i, SCE_PL_ARRAY);
|
||||
i++;
|
||||
ch = ' ';
|
||||
} else {
|
||||
styler.ColourTo(i, SCE_PL_ARRAY);
|
||||
}
|
||||
} else if (ch == '%') {
|
||||
preferRE = false;
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') {
|
||||
state = SCE_PL_HASH;
|
||||
} else if (chNext != '{' && chNext != '[') {
|
||||
styler.ColourTo(i, SCE_PL_HASH);
|
||||
i++;
|
||||
ch = ' ';
|
||||
} else {
|
||||
styler.ColourTo(i, SCE_PL_HASH);
|
||||
}
|
||||
} else if (ch == '*') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_SYMBOLTABLE;
|
||||
} else if (ch == '/' && preferRE) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_REGEX;
|
||||
quoteUp = '/';
|
||||
quoteDown = '/';
|
||||
quotes = 1;
|
||||
quoteRep = 1;
|
||||
} else if (ch == '<' && chNext == '<') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_HERE;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = chNext2;
|
||||
quotes = 0;
|
||||
sookedpos = 0;
|
||||
sooked[sookedpos] = '\0';
|
||||
} else if (ch == '=' && (chPrev == '\r' || chPrev == '\n') && isalpha(chNext)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_POD;
|
||||
quotes = 0;
|
||||
sookedpos = 0;
|
||||
sooked[sookedpos] = '\0';
|
||||
} else if (isPerlOperator(ch)) {
|
||||
if (ch == ')' || ch == ']')
|
||||
preferRE = false;
|
||||
else
|
||||
preferRE = true;
|
||||
styler.ColourTo(i - 1, state);
|
||||
styler.ColourTo(i, SCE_PL_OPERATOR);
|
||||
}
|
||||
} else if (state == SCE_PL_WORD) {
|
||||
if (!iswordchar(ch) && ch != '\'') { // Archaic Perl has quotes inside names
|
||||
if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__DATA__")) {
|
||||
styler.ColourTo(i, SCE_PL_DATASECTION);
|
||||
state = SCE_PL_DATASECTION;
|
||||
} else if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__END__")) {
|
||||
styler.ColourTo(i, SCE_PL_DATASECTION);
|
||||
state = SCE_PL_DATASECTION;
|
||||
} else {
|
||||
if (classifyWordPerl(styler.GetStartSegment(), i - 1, keywords, styler) == SCE_PL_WORD)
|
||||
preferRE = true;
|
||||
state = SCE_PL_DEFAULT;
|
||||
if (ch == '#') {
|
||||
state = SCE_PL_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
state = SCE_PL_STRING;
|
||||
} else if (ch == '\'') {
|
||||
state = SCE_PL_CHARACTER;
|
||||
} else if (ch == '<' && chNext == '<') {
|
||||
state = SCE_PL_HERE;
|
||||
quotes = 0;
|
||||
sookedpos = 0;
|
||||
sooked[sookedpos] = '\0';
|
||||
} else if (isPerlOperator(ch)) {
|
||||
if (ch == ')' || ch == ']')
|
||||
preferRE = false;
|
||||
else
|
||||
preferRE = true;
|
||||
styler.ColourTo(i, SCE_PL_OPERATOR);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (state == SCE_PL_COMMENTLINE) {
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_PL_HERE) {
|
||||
if ((isalnum(ch) || ch == '_') && quotes < 2) {
|
||||
sooked[sookedpos++] = ch;
|
||||
sooked[sookedpos] = '\0';
|
||||
if (quotes == 0)
|
||||
quotes = 1;
|
||||
} else {
|
||||
quotes++;
|
||||
}
|
||||
if ((quotes > 1) &&
|
||||
(chPrev == '\n' || chPrev == '\r') &&
|
||||
isMatch(styler, lengthDoc, i, sooked)) {
|
||||
i += sookedpos;
|
||||
chNext = styler.SafeGetCharAt(i);
|
||||
if (chNext == '\n' || chNext == '\r') {
|
||||
styler.ColourTo(i - 1, SCE_PL_HERE);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (state == SCE_PL_STRING) {
|
||||
if (ch == '\\') {
|
||||
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (state == SCE_PL_CHARACTER) {
|
||||
if (ch == '\\') {
|
||||
if (chNext == '\"' || chNext == '\'' || chNext == '\\') {
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (state == SCE_PL_BACKTICKS) {
|
||||
if (ch == '`') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
} else if (state == SCE_PL_POD) {
|
||||
if (ch == '=' && (chPrev == '\r' || chPrev == '\n')) {
|
||||
if (isMatch(styler, lengthDoc, i, "=cut")) {
|
||||
styler.ColourTo(i - 1 + 4, state);
|
||||
i += 4;
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = styler.SafeGetCharAt(i);
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_PL_SCALAR) {
|
||||
if (isEndVar(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_PL_ARRAY) {
|
||||
if (isEndVar(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_PL_HASH) {
|
||||
if (isEndVar(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_PL_SYMBOLTABLE) {
|
||||
if (isEndVar(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_PL_REF) {
|
||||
if (isEndVar(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_PL_REGEX) {
|
||||
if (!quoteUp && !isspace(ch)) {
|
||||
quoteUp = ch;
|
||||
quoteDown = opposite(ch);
|
||||
quotes++;
|
||||
} else {
|
||||
if (ch == quoteDown && chPrev != '\\') {
|
||||
quotes--;
|
||||
if (quotes == 0) {
|
||||
quoteRep--;
|
||||
if (quoteUp == quoteDown) {
|
||||
quotes++;
|
||||
}
|
||||
}
|
||||
if (!isalpha(chNext)) {
|
||||
if (quoteRep <= 0) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = ' ';
|
||||
}
|
||||
}
|
||||
} else if (ch == quoteUp && chPrev != '\\') {
|
||||
quotes++;
|
||||
} else if (!isalpha(chNext)) {
|
||||
if (quoteRep <= 0) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_PL_REGSUBST) {
|
||||
if (!quoteUp && !isspace(ch)) {
|
||||
quoteUp = ch;
|
||||
quoteDown = opposite(ch);
|
||||
quotes++;
|
||||
} else {
|
||||
if (quotes == 0 && quoteRep == 1) {
|
||||
/* We matched something like s(...) or tr{...}
|
||||
* and are looking for the next matcher characters,
|
||||
* which could be either bracketed ({...}) or non-bracketed
|
||||
* (/.../).
|
||||
*
|
||||
* Number-signs are problematic. If they occur after
|
||||
* the close of the first part, treat them like
|
||||
* a quoteUp char, even if they actually start comments.
|
||||
*
|
||||
* If we find an alnum, we end the regsubst, and punt.
|
||||
*
|
||||
* Eric Promislow ericp@activestate.com Aug 9,2000
|
||||
*/
|
||||
if (isspace(ch)) {
|
||||
// Keep going
|
||||
} else if (isalnum(ch)) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = ' ';
|
||||
} else {
|
||||
quoteUp = ch;
|
||||
quoteDown = opposite(ch);
|
||||
quotes++;
|
||||
}
|
||||
} else if (ch == quoteDown && chPrev != '\\') {
|
||||
quotes--;
|
||||
if (quotes == 0) {
|
||||
quoteRep--;
|
||||
}
|
||||
if (!isalpha(chNext)) {
|
||||
if (quoteRep <= 0) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = ' ';
|
||||
}
|
||||
}
|
||||
if (quoteUp == quoteDown) {
|
||||
quotes++;
|
||||
}
|
||||
} else if (ch == quoteUp && chPrev != '\\') {
|
||||
quotes++;
|
||||
} else if (!isalpha(chNext)) {
|
||||
if (quoteRep <= 0) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_PL_LONGQUOTE) {
|
||||
if (!quoteDown && !isspace(ch)) {
|
||||
quoteUp = ch;
|
||||
quoteDown = opposite(quoteUp);
|
||||
quotes++;
|
||||
} else if (ch == quoteDown) {
|
||||
quotes--;
|
||||
if (quotes == 0) {
|
||||
quoteRep--;
|
||||
if (quoteRep <= 0) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_PL_DEFAULT;
|
||||
ch = ' ';
|
||||
}
|
||||
if (quoteUp == quoteDown) {
|
||||
quotes++;
|
||||
}
|
||||
}
|
||||
} else if (ch == quoteUp) {
|
||||
quotes++;
|
||||
}
|
||||
}
|
||||
|
||||
if (state == SCE_PL_DEFAULT) { // One of the above succeeded
|
||||
if (ch == '#') {
|
||||
state = SCE_PL_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
state = SCE_PL_STRING;
|
||||
} else if (ch == '\'') {
|
||||
state = SCE_PL_CHARACTER;
|
||||
} else if (iswordstart(ch)) {
|
||||
state = SCE_PL_WORD;
|
||||
preferRE = false;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i, SCE_PL_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
chPrev = ch;
|
||||
}
|
||||
styler.ColourTo(lengthDoc, state);
|
||||
}
|
||||
|
||||
LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc);
|
||||
281
contrib/src/stc/scintilla/src/LexPython.cxx
Normal file
281
contrib/src/stc/scintilla/src/LexPython.cxx
Normal file
@@ -0,0 +1,281 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// LexPython.cxx - lexer for Python
|
||||
// Copyright 1998-2000 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 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;
|
||||
// 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);
|
||||
}
|
||||
|
||||
static bool IsPyComment(Accessor &styler, int pos, int len) {
|
||||
return len>0 && styler[pos]=='#';
|
||||
}
|
||||
|
||||
static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
int lengthDoc = startPos + length;
|
||||
|
||||
// Backtrack to previous line in case need to fix its fold status or tab whinging
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
if (startPos > 0) {
|
||||
if (lineCurrent > 0) {
|
||||
lineCurrent--;
|
||||
startPos = styler.LineStart(lineCurrent);
|
||||
if (startPos == 0)
|
||||
initStyle = SCE_P_DEFAULT;
|
||||
else
|
||||
initStyle = styler.StyleAt(startPos-1);
|
||||
}
|
||||
}
|
||||
|
||||
// Python uses a different mask because bad indentation is marked by oring with 32
|
||||
styler.StartAt(startPos, 127);
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
bool fold = styler.GetPropertyInt("fold");
|
||||
int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level");
|
||||
char prevWord[200];
|
||||
prevWord[0] = '\0';
|
||||
if (length == 0)
|
||||
return ;
|
||||
int spaceFlags = 0;
|
||||
|
||||
int state = initStyle & 31;
|
||||
|
||||
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment);
|
||||
if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))
|
||||
indentCurrent |= SC_FOLDLEVELWHITEFLAG;
|
||||
|
||||
char chPrev = ' ';
|
||||
char chPrev2 = ' ';
|
||||
char chNext = styler[startPos];
|
||||
styler.StartSegment(startPos);
|
||||
bool atStartLine = true;
|
||||
for (int i = startPos; i < lengthDoc; i++) {
|
||||
|
||||
if (atStartLine) {
|
||||
char chBad = static_cast<char>(64);
|
||||
char chGood = static_cast<char>(0);
|
||||
char chFlags = chGood;
|
||||
if (whingeLevel == 1) {
|
||||
chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood;
|
||||
} else if (whingeLevel == 2) {
|
||||
chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood;
|
||||
} else if (whingeLevel == 3) {
|
||||
chFlags = (spaceFlags & wsSpace) ? chBad : chGood;
|
||||
} else if (whingeLevel == 4) {
|
||||
chFlags = (spaceFlags & wsTab) ? chBad : chGood;
|
||||
}
|
||||
styler.SetFlags(chFlags, static_cast<char>(state));
|
||||
atStartLine = false;
|
||||
}
|
||||
|
||||
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)) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
int lev = indentCurrent;
|
||||
int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsPyComment);
|
||||
if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE))
|
||||
indentNext |= SC_FOLDLEVELWHITEFLAG;
|
||||
if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {
|
||||
// Only non whitespace lines can be headers
|
||||
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) {
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
} else if (indentNext & SC_FOLDLEVELWHITEFLAG) {
|
||||
// Line after is blank so check the next - maybe should continue further?
|
||||
int spaceFlags2 = 0;
|
||||
int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsPyComment);
|
||||
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) {
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
}
|
||||
}
|
||||
}
|
||||
indentCurrent = indentNext;
|
||||
if (fold) {
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
lineCurrent++;
|
||||
atStartLine = true;
|
||||
}
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
chPrev = ' ';
|
||||
chPrev2 = ' ';
|
||||
i += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state == SCE_P_STRINGEOL) {
|
||||
if (ch != '\r' && ch != '\n') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_P_DEFAULT;
|
||||
}
|
||||
}
|
||||
if (state == SCE_P_DEFAULT) {
|
||||
if (iswordstart(ch)) {
|
||||
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 (ch == '\"') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (chNext == '\"' && chNext2 == '\"') {
|
||||
i += 2;
|
||||
state = SCE_P_TRIPLEDOUBLE;
|
||||
ch = ' ';
|
||||
chPrev = ' ';
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} else {
|
||||
state = SCE_P_STRING;
|
||||
}
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
if (chNext == '\'' && chNext2 == '\'') {
|
||||
i += 2;
|
||||
state = SCE_P_TRIPLE;
|
||||
ch = ' ';
|
||||
chPrev = ' ';
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} else {
|
||||
state = SCE_P_CHARACTER;
|
||||
}
|
||||
} 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 (ch == '\"') {
|
||||
if (chNext == '\"' && chNext2 == '\"') {
|
||||
i += 2;
|
||||
state = SCE_P_TRIPLEDOUBLE;
|
||||
ch = ' ';
|
||||
chPrev = ' ';
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} else {
|
||||
state = SCE_P_STRING;
|
||||
}
|
||||
} else if (ch == '\'') {
|
||||
if (chNext == '\'' && chNext2 == '\'') {
|
||||
i += 2;
|
||||
state = SCE_P_TRIPLE;
|
||||
ch = ' ';
|
||||
chPrev = ' ';
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
} else {
|
||||
state = SCE_P_CHARACTER;
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
||||
LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc);
|
||||
156
contrib/src/stc/scintilla/src/LexSQL.cxx
Normal file
156
contrib/src/stc/scintilla/src/LexSQL.cxx
Normal file
@@ -0,0 +1,156 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// LexSQL.cxx - lexer for SQL
|
||||
// Copyright 1998-2000 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 classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||
char s[100];
|
||||
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
|
||||
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = static_cast<char>(toupper(styler[start + i]));
|
||||
s[i + 1] = '\0';
|
||||
}
|
||||
char chAttr = SCE_C_IDENTIFIER;
|
||||
if (wordIsNumber)
|
||||
chAttr = SCE_C_NUMBER;
|
||||
else {
|
||||
if (keywords.InList(s))
|
||||
chAttr = SCE_C_WORD;
|
||||
}
|
||||
styler.ColourTo(end, chAttr);
|
||||
}
|
||||
|
||||
static void ColouriseSQLDoc(unsigned int startPos, int length,
|
||||
int initStyle, WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
styler.StartAt(startPos);
|
||||
|
||||
bool fold = styler.GetPropertyInt("fold");
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
int spaceFlags = 0;
|
||||
|
||||
int state = initStyle;
|
||||
char chPrev = ' ';
|
||||
char chNext = styler[startPos];
|
||||
styler.StartSegment(startPos);
|
||||
unsigned int lengthDoc = startPos + length;
|
||||
for (unsigned int i = startPos; i < lengthDoc; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
|
||||
if ((ch == '\r' && chNext != '\n') || (ch == '\n')) {
|
||||
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags);
|
||||
int lev = indentCurrent;
|
||||
if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) {
|
||||
// Only non whitespace lines can be headers
|
||||
int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags);
|
||||
if (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) {
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
}
|
||||
}
|
||||
if (fold) {
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
}
|
||||
}
|
||||
|
||||
if (styler.IsLeadByte(ch)) {
|
||||
chNext = styler.SafeGetCharAt(i + 2);
|
||||
chPrev = ' ';
|
||||
i += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state == SCE_C_DEFAULT) {
|
||||
if (iswordstart(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_WORD;
|
||||
} else if (ch == '/' && chNext == '*') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_COMMENT;
|
||||
} else if (ch == '-' && chNext == '-') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_STRING;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
}
|
||||
} else if (state == SCE_C_WORD) {
|
||||
if (!iswordchar(ch)) {
|
||||
classifyWordSQL(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||
state = SCE_C_DEFAULT;
|
||||
if (ch == '/' && chNext == '*') {
|
||||
state = SCE_C_COMMENT;
|
||||
} else if (ch == '-' && chNext == '-') {
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\'') {
|
||||
state = SCE_C_STRING;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (state == SCE_C_COMMENT) {
|
||||
if (ch == '/' && chPrev == '*') {
|
||||
if (((i > (styler.GetStartSegment() + 2)) || ((initStyle == SCE_C_COMMENT) &&
|
||||
(styler.GetStartSegment() == startPos)))) {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
}
|
||||
} else if (state == SCE_C_COMMENTLINE) {
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
} else if (state == SCE_C_STRING) {
|
||||
if (ch == '\'') {
|
||||
if ( chNext == '\'' ) {
|
||||
i++;
|
||||
} else {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
i++;
|
||||
}
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
if (state == SCE_C_DEFAULT) { // One of the above succeeded
|
||||
if (ch == '/' && chNext == '*') {
|
||||
state = SCE_C_COMMENT;
|
||||
} else if (ch == '-' && chNext == '-') {
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\'') {
|
||||
state = SCE_C_STRING;
|
||||
} else if (iswordstart(ch)) {
|
||||
state = SCE_C_WORD;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
chPrev = ch;
|
||||
}
|
||||
styler.ColourTo(lengthDoc - 1, state);
|
||||
}
|
||||
|
||||
LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc);
|
||||
139
contrib/src/stc/scintilla/src/LexVB.cxx
Normal file
139
contrib/src/stc/scintilla/src/LexVB.cxx
Normal file
@@ -0,0 +1,139 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// LexVB.cxx - lexer for Visual Basic and VBScript
|
||||
// Copyright 1998-2000 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 int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
|
||||
|
||||
char s[100];
|
||||
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') ||
|
||||
(styler[start] == '&' && tolower(styler[start+1]) == 'h');
|
||||
unsigned int i;
|
||||
for (i = 0; i < end - start + 1 && i < 30; i++) {
|
||||
s[i] = static_cast<char>(tolower(styler[start + i]));
|
||||
}
|
||||
s[i] = '\0';
|
||||
char chAttr = SCE_C_DEFAULT;
|
||||
if (wordIsNumber)
|
||||
chAttr = SCE_C_NUMBER;
|
||||
else {
|
||||
if (strcmp(s, "rem") == 0)
|
||||
chAttr = SCE_C_COMMENTLINE;
|
||||
else if (keywords.InList(s))
|
||||
chAttr = SCE_C_WORD;
|
||||
}
|
||||
styler.ColourTo(end, chAttr);
|
||||
if (chAttr == SCE_C_COMMENTLINE)
|
||||
return SCE_C_COMMENTLINE;
|
||||
else
|
||||
return SCE_C_DEFAULT;
|
||||
}
|
||||
|
||||
static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
|
||||
styler.StartAt(startPos);
|
||||
|
||||
int visibleChars = 0;
|
||||
int state = initStyle;
|
||||
char chNext = styler[startPos];
|
||||
styler.StartSegment(startPos);
|
||||
int lengthDoc = startPos + length;
|
||||
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 += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
// End of line
|
||||
if (state == SCE_C_COMMENTLINE || state == SCE_C_PREPROCESSOR) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
}
|
||||
visibleChars = 0;
|
||||
}
|
||||
if (!isspace(ch))
|
||||
visibleChars++;
|
||||
|
||||
if (state == SCE_C_DEFAULT) {
|
||||
if (iswordstart(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_WORD;
|
||||
} else if (ch == '\'') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_STRING;
|
||||
} else if (ch == '#' && visibleChars == 1) {
|
||||
// Preprocessor commands are alone on their line
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_PREPROCESSOR;
|
||||
} else if (ch == '&' && tolower(chNext) == 'h') {
|
||||
styler.ColourTo(i - 1, state);
|
||||
state = SCE_C_WORD;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
}
|
||||
} else if (state == SCE_C_WORD) {
|
||||
if (!iswordchar(ch)) {
|
||||
state = classifyWordVB(styler.GetStartSegment(), i - 1, keywords, styler);
|
||||
if (state == SCE_C_DEFAULT) {
|
||||
if (ch == '\'') {
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
state = SCE_C_STRING;
|
||||
} else if (isoperator(ch)) {
|
||||
styler.ColourTo(i - 1, state);
|
||||
styler.ColourTo(i, SCE_C_OPERATOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (state == SCE_C_STRING) {
|
||||
// VB doubles quotes to preserve them
|
||||
if (ch == '\"') {
|
||||
styler.ColourTo(i, state);
|
||||
state = SCE_C_DEFAULT;
|
||||
i++;
|
||||
ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
}
|
||||
}
|
||||
if (state == SCE_C_DEFAULT) { // One of the above succeeded
|
||||
if (ch == '\'') {
|
||||
state = SCE_C_COMMENTLINE;
|
||||
} else if (ch == '\"') {
|
||||
state = SCE_C_STRING;
|
||||
} else if (iswordstart(ch)) {
|
||||
state = SCE_C_WORD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
styler.ColourTo(lengthDoc, state);
|
||||
}
|
||||
|
||||
LexerModule lmVB(SCLEX_VB, ColouriseVBDoc);
|
||||
105
contrib/src/stc/scintilla/src/LineMarker.cxx
Normal file
105
contrib/src/stc/scintilla/src/LineMarker.cxx
Normal file
@@ -0,0 +1,105 @@
|
||||
// Scintilla source code edit control
|
||||
// LineMarker.cxx - defines the look of a line marker in the margin
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "LineMarker.h"
|
||||
|
||||
void LineMarker::Draw(Surface *surface, PRectangle &rc) {
|
||||
int minDim = Platform::Minimum(rc.Width(), rc.Height());
|
||||
minDim--; // Ensure does not go beyond edge
|
||||
int centreX = (rc.right + rc.left) / 2;
|
||||
int centreY = (rc.bottom + rc.top) / 2;
|
||||
int dimOn2 = minDim / 2;
|
||||
int dimOn4 = minDim / 4;
|
||||
if (rc.Width() > (rc.Height() * 2)) {
|
||||
// Wide column is line number so move to left to try to avoid overlapping number
|
||||
centreX = rc.left + dimOn2 + 1;
|
||||
}
|
||||
if (markType == SC_MARK_ROUNDRECT) {
|
||||
PRectangle rcRounded = rc;
|
||||
rcRounded.left = rc.left + 1;
|
||||
rcRounded.right = rc.right - 1;
|
||||
surface->RoundedRectangle(rcRounded, fore.allocated, back.allocated);
|
||||
} else if (markType == SC_MARK_CIRCLE) {
|
||||
PRectangle rcCircle;
|
||||
rcCircle.left = centreX - dimOn2;
|
||||
rcCircle.top = centreY - dimOn2;
|
||||
rcCircle.right = centreX + dimOn2;
|
||||
rcCircle.bottom = centreY + dimOn2;
|
||||
surface->Ellipse(rcCircle, fore.allocated, back.allocated);
|
||||
} else if (markType == SC_MARK_ARROW) {
|
||||
Point pts[] = {
|
||||
Point(centreX - dimOn4, centreY - dimOn2),
|
||||
Point(centreX - dimOn4, centreY + dimOn2),
|
||||
Point(centreX + dimOn2 - dimOn4, centreY),
|
||||
};
|
||||
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
|
||||
fore.allocated, back.allocated);
|
||||
|
||||
} else if (markType == SC_MARK_ARROWDOWN) {
|
||||
Point pts[] = {
|
||||
Point(centreX - dimOn2, centreY - dimOn4),
|
||||
Point(centreX + dimOn2, centreY - dimOn4),
|
||||
Point(centreX, centreY + dimOn2 - dimOn4),
|
||||
};
|
||||
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
|
||||
fore.allocated, back.allocated);
|
||||
|
||||
} else if (markType == SC_MARK_PLUS) {
|
||||
int armSize = dimOn2-2;
|
||||
Point pts[] = {
|
||||
Point(centreX - armSize, centreY - 1),
|
||||
Point(centreX - 1, centreY - 1),
|
||||
Point(centreX - 1, centreY - armSize),
|
||||
Point(centreX + 1, centreY - armSize),
|
||||
Point(centreX + 1, centreY - 1),
|
||||
Point(centreX + armSize, centreY -1),
|
||||
Point(centreX + armSize, centreY +1),
|
||||
Point(centreX + 1, centreY + 1),
|
||||
Point(centreX + 1, centreY + armSize),
|
||||
Point(centreX - 1, centreY + armSize),
|
||||
Point(centreX - 1, centreY + 1),
|
||||
Point(centreX - armSize, centreY + 1),
|
||||
};
|
||||
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
|
||||
fore.allocated, back.allocated);
|
||||
|
||||
} else if (markType == SC_MARK_MINUS) {
|
||||
int armSize = dimOn2-2;
|
||||
Point pts[] = {
|
||||
Point(centreX - armSize, centreY - 1),
|
||||
Point(centreX + armSize, centreY -1),
|
||||
Point(centreX + armSize, centreY +1),
|
||||
Point(centreX - armSize, centreY + 1),
|
||||
};
|
||||
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
|
||||
fore.allocated, back.allocated);
|
||||
|
||||
} else if (markType == SC_MARK_SMALLRECT) {
|
||||
PRectangle rcSmall;
|
||||
rcSmall.left = rc.left + 1;
|
||||
rcSmall.top = rc.top + 2;
|
||||
rcSmall.right = rc.right - 1;
|
||||
rcSmall.bottom = rc.bottom - 2;
|
||||
surface->RectangleDraw(rcSmall, fore.allocated, back.allocated);
|
||||
} else if (markType == SC_MARK_EMPTY) {
|
||||
// An invisible marker so don't draw anything
|
||||
} else { // SC_MARK_SHORTARROW
|
||||
Point pts[] = {
|
||||
Point(centreX, centreY + dimOn2),
|
||||
Point(centreX + dimOn2, centreY),
|
||||
Point(centreX, centreY - dimOn2),
|
||||
Point(centreX, centreY - dimOn4),
|
||||
Point(centreX - dimOn4, centreY - dimOn4),
|
||||
Point(centreX - dimOn4, centreY + dimOn4),
|
||||
Point(centreX, centreY + dimOn4),
|
||||
Point(centreX, centreY + dimOn2),
|
||||
};
|
||||
surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]),
|
||||
fore.allocated, back.allocated);
|
||||
}
|
||||
}
|
||||
22
contrib/src/stc/scintilla/src/LineMarker.h
Normal file
22
contrib/src/stc/scintilla/src/LineMarker.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// Scintilla source code edit control
|
||||
// LineMarker.h - defines the look of a line marker in the margin
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef LINEMARKER_H
|
||||
#define LINEMARKER_H
|
||||
|
||||
class LineMarker {
|
||||
public:
|
||||
int markType;
|
||||
ColourPair fore;
|
||||
ColourPair back;
|
||||
LineMarker() {
|
||||
markType = SC_MARK_CIRCLE;
|
||||
fore = Colour(0,0,0);
|
||||
back = Colour(0xff,0xff,0xff);
|
||||
}
|
||||
void Draw(Surface *surface, PRectangle &rc);
|
||||
};
|
||||
|
||||
#endif
|
||||
1181
contrib/src/stc/scintilla/src/PosRegExp.cxx
Normal file
1181
contrib/src/stc/scintilla/src/PosRegExp.cxx
Normal file
File diff suppressed because it is too large
Load Diff
742
contrib/src/stc/scintilla/src/PropSet.cxx
Normal file
742
contrib/src/stc/scintilla/src/PropSet.cxx
Normal file
@@ -0,0 +1,742 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// PropSet.cxx - a java style properties file module
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
// Maintain a dictionary of properties
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
|
||||
bool EqualCaseInsensitive(const char *a, const char *b) {
|
||||
#if PLAT_GTK
|
||||
return 0 == strcasecmp(a, b);
|
||||
#elif PLAT_WIN
|
||||
return 0 == stricmp(a, b);
|
||||
#elif PLAT_WX
|
||||
return 0 == wxStricmp(a, b);
|
||||
#endif
|
||||
}
|
||||
|
||||
SString::size_type SString::npos = -1;
|
||||
|
||||
inline unsigned int HashString(const char *s) {
|
||||
unsigned int ret = 0;
|
||||
while (*s) {
|
||||
ret <<= 4;
|
||||
ret ^= *s;
|
||||
s++;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Get a line of input. If end of line escaped with '\\' then continue reading.
|
||||
static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
|
||||
bool continuation = true;
|
||||
s[0] = '\0';
|
||||
while ((len > 1) && lenData > 0) {
|
||||
char ch = *fpc;
|
||||
fpc++;
|
||||
lenData--;
|
||||
if ((ch == '\r') || (ch == '\n')) {
|
||||
if (!continuation) {
|
||||
if ((lenData > 0) && (ch == '\r') && ((*fpc) == '\n')) {
|
||||
// munch the second half of a crlf
|
||||
fpc++;
|
||||
lenData--;
|
||||
}
|
||||
*s = '\0';
|
||||
return true;
|
||||
}
|
||||
} else if ((ch == '\\') && (lenData > 0) && ((*fpc == '\r') || (*fpc == '\n'))) {
|
||||
continuation = true;
|
||||
} else {
|
||||
continuation = false;
|
||||
*s++ = ch;
|
||||
*s = '\0';
|
||||
len--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
PropSet::PropSet() {
|
||||
superPS = 0;
|
||||
for (int root=0; root < hashRoots; root++)
|
||||
props[root] = 0;
|
||||
}
|
||||
|
||||
PropSet::~PropSet() {
|
||||
superPS = 0;
|
||||
Clear();
|
||||
}
|
||||
|
||||
void PropSet::Set(const char *key, const char *val) {
|
||||
unsigned int hash = HashString(key);
|
||||
for (Property *p=props[hash % hashRoots]; p; p=p->next) {
|
||||
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
|
||||
// Replace current value
|
||||
delete [](p->val);
|
||||
p->val = StringDup(val);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Not found
|
||||
Property *pNew = new Property;
|
||||
if (pNew) {
|
||||
pNew->hash = HashString(key);
|
||||
pNew->key = StringDup(key);
|
||||
pNew->val = StringDup(val);
|
||||
pNew->next = props[hash % hashRoots];
|
||||
props[hash % hashRoots] = pNew;
|
||||
}
|
||||
}
|
||||
|
||||
void PropSet::Set(char *keyval) {
|
||||
while (isspace(*keyval))
|
||||
keyval++;
|
||||
char *eqat = strchr(keyval, '=');
|
||||
if (eqat) {
|
||||
*eqat = '\0';
|
||||
Set(keyval, eqat + 1);
|
||||
*eqat = '=';
|
||||
}
|
||||
}
|
||||
|
||||
SString PropSet::Get(const char *key) {
|
||||
unsigned int hash = HashString(key);
|
||||
for (Property *p=props[hash % hashRoots]; p; p=p->next) {
|
||||
if ((hash == p->hash) && (0 == strcmp(p->key, key))) {
|
||||
return p->val;
|
||||
}
|
||||
}
|
||||
if (superPS) {
|
||||
// Failed here, so try in base property set
|
||||
return superPS->Get(key);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
SString PropSet::GetExpanded(const char *key) {
|
||||
SString val = Get(key);
|
||||
return Expand(val.c_str());
|
||||
}
|
||||
|
||||
SString PropSet::Expand(const char *withvars) {
|
||||
char *base = StringDup(withvars);
|
||||
char *cpvar = strstr(base, "$(");
|
||||
while (cpvar) {
|
||||
char *cpendvar = strchr(cpvar, ')');
|
||||
if (cpendvar) {
|
||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||
char *var = StringDup(cpvar+2, lenvar);
|
||||
SString val = GetExpanded(var);
|
||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
||||
char *newbase = new char[newlenbase];
|
||||
strncpy(newbase, base, cpvar - base);
|
||||
strcpy(newbase + (cpvar - base), val.c_str());
|
||||
strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1);
|
||||
delete []var;
|
||||
delete []base;
|
||||
base = newbase;
|
||||
}
|
||||
cpvar = strstr(base, "$(");
|
||||
}
|
||||
SString sret = base;
|
||||
delete []base;
|
||||
return sret;
|
||||
}
|
||||
|
||||
int PropSet::GetInt(const char *key, int defaultValue) {
|
||||
SString val = Get(key);
|
||||
if (val.length())
|
||||
return val.value();
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
inline bool isprefix(const char *target, const char *prefix) {
|
||||
while (*target && *prefix) {
|
||||
if (*target != *prefix)
|
||||
return false;
|
||||
target++;
|
||||
prefix++;
|
||||
}
|
||||
if (*prefix)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
bool issuffix(const char *target, const char *suffix) {
|
||||
int lentarget = strlen(target);
|
||||
int lensuffix = strlen(suffix);
|
||||
if (lensuffix > lentarget)
|
||||
return false;
|
||||
for (int i = lensuffix - 1; i >= 0; i--) {
|
||||
if (target[i + lentarget - lensuffix] != suffix[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
SString PropSet::GetWild(const char *keybase, const char *filename) {
|
||||
for (int root=0; root < hashRoots; root++) {
|
||||
for (Property *p=props[root]; p; p=p->next) {
|
||||
if (isprefix(p->key, keybase)) {
|
||||
char *orgkeyfile = p->key + strlen(keybase);
|
||||
char *keyfile = NULL;
|
||||
|
||||
if (strstr(orgkeyfile, "$(") == orgkeyfile) {
|
||||
char *cpendvar = strchr(orgkeyfile, ')');
|
||||
if (cpendvar) {
|
||||
*cpendvar = '\0';
|
||||
SString s = Get(orgkeyfile + 2);
|
||||
*cpendvar= ')';
|
||||
keyfile = strdup(s.c_str());
|
||||
}
|
||||
}
|
||||
char *keyptr = keyfile;
|
||||
|
||||
if (keyfile == NULL)
|
||||
keyfile = orgkeyfile;
|
||||
|
||||
for (; ; ) {
|
||||
char *del = strchr(keyfile, ';');
|
||||
if (del == NULL)
|
||||
del = keyfile + strlen(keyfile);
|
||||
char delchr = *del;
|
||||
*del = '\0';
|
||||
if (*keyfile == '*') {
|
||||
if (issuffix(filename, keyfile + 1)) {
|
||||
*del = delchr;
|
||||
free(keyptr);
|
||||
return p->val;
|
||||
}
|
||||
} else if (0 == strcmp(keyfile, filename)) {
|
||||
*del = delchr;
|
||||
free(keyptr);
|
||||
return p->val;
|
||||
}
|
||||
if (delchr == '\0')
|
||||
break;
|
||||
*del = delchr;
|
||||
keyfile = del + 1;
|
||||
}
|
||||
free(keyptr);
|
||||
|
||||
if (0 == strcmp(p->key, keybase)) {
|
||||
return p->val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (superPS) {
|
||||
// Failed here, so try in base property set
|
||||
return superPS->GetWild(keybase, filename);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
SString PropSet::GetNewExpand(const char *keybase, const char *filename) {
|
||||
char *base = StringDup(GetWild(keybase, filename).c_str());
|
||||
char *cpvar = strstr(base, "$(");
|
||||
while (cpvar) {
|
||||
char *cpendvar = strchr(cpvar, ')');
|
||||
if (cpendvar) {
|
||||
int lenvar = cpendvar - cpvar - 2; // Subtract the $()
|
||||
char *var = StringDup(cpvar+2, lenvar);
|
||||
SString val = GetWild(var, filename);
|
||||
int newlenbase = strlen(base) + val.length() - lenvar;
|
||||
char *newbase = new char[newlenbase];
|
||||
strncpy(newbase, base, cpvar - base);
|
||||
strcpy(newbase + (cpvar - base), val.c_str());
|
||||
strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1);
|
||||
delete []var;
|
||||
delete []base;
|
||||
base = newbase;
|
||||
}
|
||||
cpvar = strstr(base, "$(");
|
||||
}
|
||||
SString sret = base;
|
||||
delete []base;
|
||||
return sret;
|
||||
}
|
||||
|
||||
void PropSet::Clear() {
|
||||
for (int root=0; root < hashRoots; root++) {
|
||||
Property *p=props[root];
|
||||
while (p) {
|
||||
Property *pNext=p->next;
|
||||
p->hash = 0;
|
||||
delete p->key;
|
||||
p->key = 0;
|
||||
delete p->val;
|
||||
p->val = 0;
|
||||
delete p;
|
||||
p = pNext;
|
||||
}
|
||||
props[root] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void PropSet::ReadFromMemory(const char *data, int len, const char *directoryForImports) {
|
||||
const char *pd = data;
|
||||
char linebuf[60000];
|
||||
bool ifIsTrue = true;
|
||||
while (len > 0) {
|
||||
GetFullLine(pd, len, linebuf, sizeof(linebuf));
|
||||
if (isalpha(linebuf[0])) // If clause ends with first non-indented line
|
||||
ifIsTrue = true;
|
||||
if (isprefix(linebuf, "if ")) {
|
||||
const char *expr = linebuf + strlen("if") + 1;
|
||||
ifIsTrue = GetInt(expr);
|
||||
} else if (isprefix(linebuf, "import ") && directoryForImports) {
|
||||
char importPath[1024];
|
||||
strcpy(importPath, directoryForImports);
|
||||
strcat(importPath, linebuf + strlen("import") + 1);
|
||||
strcat(importPath, ".properties");
|
||||
Read(importPath,directoryForImports);
|
||||
} else if (isalpha(linebuf[0])) {
|
||||
Set(linebuf);
|
||||
} else if (isspace(linebuf[0]) && ifIsTrue) {
|
||||
Set(linebuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PropSet::Read(const char *filename, const char *directoryForImports) {
|
||||
char propsData[60000];
|
||||
FILE *rcfile = fopen(filename, "rb");
|
||||
if (rcfile) {
|
||||
int lenFile = fread(propsData, 1, sizeof(propsData), rcfile);
|
||||
fclose(rcfile);
|
||||
ReadFromMemory(propsData, lenFile, directoryForImports);
|
||||
} else {
|
||||
//printf("Could not open <%s>\n", filename);
|
||||
}
|
||||
}
|
||||
|
||||
static bool iswordsep(char ch, bool onlyLineEnds) {
|
||||
if (!isspace(ch))
|
||||
return false;
|
||||
if (!onlyLineEnds)
|
||||
return true;
|
||||
return ch == '\r' || ch == '\n';
|
||||
}
|
||||
|
||||
// Creates an array that points into each word in the string and puts \0 terminators
|
||||
// after each word.
|
||||
static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) {
|
||||
#if 1
|
||||
char prev = '\n';
|
||||
int words = 0;
|
||||
for (int j = 0; wordlist[j]; j++) {
|
||||
if (!iswordsep(wordlist[j], onlyLineEnds) && iswordsep(prev, onlyLineEnds))
|
||||
words++;
|
||||
prev = wordlist[j];
|
||||
}
|
||||
char **keywords = new char * [words + 1];
|
||||
if (keywords) {
|
||||
words = 0;
|
||||
prev = '\0';
|
||||
int slen = strlen(wordlist);
|
||||
for (int k = 0; k < slen; k++) {
|
||||
if (!iswordsep(wordlist[k], onlyLineEnds)) {
|
||||
if (!prev) {
|
||||
keywords[words] = &wordlist[k];
|
||||
words++;
|
||||
}
|
||||
} else {
|
||||
wordlist[k] = '\0';
|
||||
}
|
||||
prev = wordlist[k];
|
||||
}
|
||||
keywords[words] = &wordlist[slen];
|
||||
*len = words;
|
||||
} else {
|
||||
*len = 0;
|
||||
}
|
||||
#else
|
||||
int words = 0; // length of the returned buffer of pointers
|
||||
#undef APICHUNK // how many pointers will be pre-allocated (to avoid buffer reallocation on each new pointer)
|
||||
#define APICHUNK 256
|
||||
int size = APICHUNK; // real size of the returned buffer of pointers
|
||||
char **keywords; // buffer for the pointers returned
|
||||
int slen = strlen(wordlist); //length of the buffer with api file
|
||||
keywords = (char**) malloc((size + 1) * sizeof (*keywords));
|
||||
words = 0;
|
||||
for (int k = 0;;) {
|
||||
while (iswordsep(wordlist[k], onlyLineEnds))
|
||||
wordlist[k++] = '\0';
|
||||
if (k >= slen)
|
||||
break;
|
||||
if (words >= size) {
|
||||
do
|
||||
size += APICHUNK;
|
||||
while (size <= words);
|
||||
keywords = (char**) realloc(keywords, (size + 1) * sizeof (*keywords));
|
||||
}
|
||||
keywords[words++] = wordlist + k;
|
||||
do
|
||||
if (k < slen)
|
||||
k++;
|
||||
else
|
||||
goto out;
|
||||
while (!iswordsep(wordlist[k], onlyLineEnds));
|
||||
}
|
||||
out:
|
||||
keywords[words] = wordlist + slen;
|
||||
*len = words;
|
||||
#endif
|
||||
return keywords;
|
||||
}
|
||||
|
||||
void WordList::Clear() {
|
||||
if (words) {
|
||||
delete []list;
|
||||
#if 1
|
||||
delete []words;
|
||||
#else
|
||||
free(words);
|
||||
#endif
|
||||
free(wordsNoCase);
|
||||
}
|
||||
words = 0;
|
||||
wordsNoCase = 0;
|
||||
list = 0;
|
||||
len = 0;
|
||||
sorted = false;
|
||||
}
|
||||
|
||||
void WordList::Set(const char *s) {
|
||||
list = StringDup(s);
|
||||
sorted = false;
|
||||
words = ArrayFromWordList(list, &len, onlyLineEnds);
|
||||
wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase));
|
||||
memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
|
||||
}
|
||||
|
||||
char *WordList::Allocate(int size) {
|
||||
list = new char[size + 1];
|
||||
list[size] = '\0';
|
||||
return list;
|
||||
}
|
||||
|
||||
void WordList::SetFromAllocated() {
|
||||
sorted = false;
|
||||
words = ArrayFromWordList(list, &len, onlyLineEnds);
|
||||
wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase));
|
||||
memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
|
||||
}
|
||||
|
||||
int cmpString(const void *a1, const void *a2) {
|
||||
// Can't work out the correct incantation to use modern casts here
|
||||
return strcmp(*(char**)(a1), *(char**)(a2));
|
||||
}
|
||||
|
||||
int cmpStringNoCase(const void *a1, const void *a2) {
|
||||
// Can't work out the correct incantation to use modern casts here
|
||||
return strcasecmp(*(char**)(a1), *(char**)(a2));
|
||||
}
|
||||
|
||||
static void SortWordList(char **words, char **wordsNoCase, unsigned int len) {
|
||||
qsort(reinterpret_cast<void*>(words), len, sizeof(*words),
|
||||
cmpString);
|
||||
qsort(reinterpret_cast<void*>(wordsNoCase), len, sizeof(*wordsNoCase),
|
||||
cmpStringNoCase);
|
||||
}
|
||||
|
||||
bool WordList::InList(const char *s) {
|
||||
if (0 == words)
|
||||
return false;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, wordsNoCase, len);
|
||||
for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
|
||||
starts[k] = -1;
|
||||
for (int l = len - 1; l >= 0; l--) {
|
||||
unsigned char indexChar = words[l][0];
|
||||
starts[indexChar] = l;
|
||||
}
|
||||
}
|
||||
unsigned char firstChar = s[0];
|
||||
int j = starts[firstChar];
|
||||
if (j >= 0) {
|
||||
while (words[j][0] == firstChar) {
|
||||
if (s[1] == words[j][1]) {
|
||||
const char *a = words[j] + 1;
|
||||
const char *b = s + 1;
|
||||
while (*a && *a == *b) {
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
if (!*a && !*b)
|
||||
return true;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an element (complete) of the wordlist array which has the beginning
|
||||
* the same as the passed string. The length of the word to compare is passed
|
||||
* too. Letter case can be ignored or preserved (default).
|
||||
*/
|
||||
const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) {
|
||||
int start = 0; // lower bound of the api array block to search
|
||||
int end = len - 1; // upper bound of the api array block to search
|
||||
int pivot; // index of api array element just being compared
|
||||
int cond; // comparison result (in the sense of strcmp() result)
|
||||
const char *word; // api array element just being compared
|
||||
|
||||
if (0 == words)
|
||||
return NULL;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, wordsNoCase, len);
|
||||
}
|
||||
if (ignoreCase)
|
||||
while (start <= end) { // binary searching loop
|
||||
pivot = (start + end) >> 1;
|
||||
word = wordsNoCase[pivot];
|
||||
cond = strncasecmp(wordStart, word, searchLen);
|
||||
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
|
||||
return word; // result must not be freed with free()
|
||||
else if (cond < 0)
|
||||
end = pivot - 1;
|
||||
else if (cond > 0)
|
||||
start = pivot + 1;
|
||||
}
|
||||
else // preserve the letter case
|
||||
while (start <= end) { // binary searching loop
|
||||
pivot = (start + end) >> 1;
|
||||
word = words[pivot];
|
||||
cond = strncmp(wordStart, word, searchLen);
|
||||
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
|
||||
return word; // result must not be freed with free()
|
||||
else if (cond >= 0)
|
||||
start = pivot + 1;
|
||||
else if (cond < 0)
|
||||
end = pivot - 1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns elements (first words of them) of the wordlist array which have
|
||||
* the beginning the same as the passed string. The length of the word to
|
||||
* compare is passed too. Letter case can be ignored or preserved (default).
|
||||
* If there are more words meeting the condition they are returned all of
|
||||
* them in the ascending order separated with spaces.
|
||||
*
|
||||
* NOTE: returned buffer has to be freed with a free() call.
|
||||
*/
|
||||
char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) {
|
||||
int wordlen; // length of the word part (before the '(' brace) of the api array element
|
||||
int length = 0; // length of the returned buffer of words (string)
|
||||
int newlength; // length of the new buffer before the reallocating itself
|
||||
#undef WORDCHUNK // how many characters will be pre-allocated (to avoid buffer reallocation on each new word)
|
||||
#define WORDCHUNK 100
|
||||
int size = WORDCHUNK; // real size of the returned buffer of words
|
||||
char *buffer; // buffer for the words returned
|
||||
int start = 0; // lower bound of the api array block to search
|
||||
int end = len - 1; // upper bound of the api array block to search
|
||||
int pivot; // index of api array element just being compared
|
||||
int cond; // comparison result (in the sense of strcmp() result)
|
||||
int oldpivot; // pivot storage to be able to browse the api array upwards and then downwards
|
||||
const char *word; // api array element just being compared
|
||||
const char *brace; // position of the opening brace in the api array element just being compared
|
||||
|
||||
if (0 == words)
|
||||
return NULL;
|
||||
if (!sorted) {
|
||||
sorted = true;
|
||||
SortWordList(words, wordsNoCase, len);
|
||||
}
|
||||
buffer = (char*) malloc(size);
|
||||
*buffer = '\0';
|
||||
if (ignoreCase)
|
||||
while (start <= end) { // binary searching loop
|
||||
pivot = (start + end) >> 1;
|
||||
word = wordsNoCase[pivot];
|
||||
cond = strncasecmp(wordStart, word, searchLen);
|
||||
if (!cond) {
|
||||
oldpivot = pivot;
|
||||
do { // browse sequentially the rest after the hit
|
||||
brace = strchr(word, '(');
|
||||
if (brace)
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
else {
|
||||
brace = word + strlen(word);
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
}
|
||||
wordlen = brace - word + 1;
|
||||
newlength = length + wordlen; // stretch the buffer
|
||||
if (length)
|
||||
newlength++;
|
||||
if (newlength >= size) {
|
||||
do
|
||||
size += WORDCHUNK;
|
||||
while (size <= newlength);
|
||||
buffer = (char*) realloc(buffer, size);
|
||||
}
|
||||
if (length) // append a new entry
|
||||
buffer[length++] = ' ';
|
||||
memcpy(buffer + length, word, wordlen);
|
||||
length = newlength;
|
||||
buffer[length] = '\0';
|
||||
if (++pivot > end)
|
||||
break;
|
||||
word = wordsNoCase[pivot];
|
||||
} while (!strncasecmp(wordStart, word, searchLen));
|
||||
|
||||
pivot = oldpivot;
|
||||
for (;;) { // browse sequentially the rest before the hit
|
||||
if (--pivot < start)
|
||||
break;
|
||||
word = wordsNoCase[pivot];
|
||||
if (strncasecmp(wordStart, word, searchLen))
|
||||
break;
|
||||
brace = strchr(word, '(');
|
||||
if (brace)
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
else {
|
||||
brace = word + strlen(word);
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
}
|
||||
wordlen = brace - word + 1;
|
||||
newlength = length + wordlen; // stretch the buffer
|
||||
if (length)
|
||||
newlength++;
|
||||
if (newlength >= size)
|
||||
{
|
||||
do
|
||||
size += WORDCHUNK;
|
||||
while (size <= newlength);
|
||||
buffer = (char*) realloc(buffer, size);
|
||||
}
|
||||
if (length) // append a new entry
|
||||
buffer[length++] = ' ';
|
||||
memcpy(buffer + length, word, wordlen);
|
||||
length = newlength;
|
||||
buffer[length] = '\0';
|
||||
}
|
||||
return buffer; // result has to be freed with free()
|
||||
}
|
||||
else if (cond < 0)
|
||||
end = pivot - 1;
|
||||
else if (cond > 0)
|
||||
start = pivot + 1;
|
||||
}
|
||||
else // preserve the letter case
|
||||
while (start <= end) { // binary searching loop
|
||||
pivot = (start + end) >> 1;
|
||||
word = words[pivot];
|
||||
cond = strncmp(wordStart, word, searchLen);
|
||||
if (!cond) {
|
||||
oldpivot = pivot;
|
||||
do { // browse sequentially the rest after the hit
|
||||
brace = strchr(word, '(');
|
||||
if (brace)
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
else {
|
||||
brace = word + strlen(word);
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
}
|
||||
wordlen = brace - word + 1;
|
||||
newlength = length + wordlen; // stretch the buffer
|
||||
if (length)
|
||||
newlength++;
|
||||
if (newlength >= size)
|
||||
{
|
||||
do
|
||||
size += WORDCHUNK;
|
||||
while (size <= newlength);
|
||||
buffer = (char*) realloc(buffer, size);
|
||||
}
|
||||
if (length) // append a new entry
|
||||
buffer[length++] = ' ';
|
||||
memcpy(buffer + length, word, wordlen);
|
||||
length = newlength;
|
||||
buffer[length] = '\0';
|
||||
if (++pivot > end)
|
||||
break;
|
||||
word = words[pivot];
|
||||
} while (!strncmp(wordStart, word, searchLen));
|
||||
|
||||
pivot = oldpivot;
|
||||
for (;;) { // browse sequentially the rest before the hit
|
||||
if (--pivot < start)
|
||||
break;
|
||||
word = words[pivot];
|
||||
if (strncmp(wordStart, word, searchLen))
|
||||
break;
|
||||
brace = strchr(word, '(');
|
||||
if (brace)
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
else {
|
||||
brace = word + strlen(word);
|
||||
do
|
||||
if (--brace < word)
|
||||
break;
|
||||
while (isspace(*brace));
|
||||
}
|
||||
wordlen = brace - word + 1;
|
||||
newlength = length + wordlen; // stretch the buffer
|
||||
if (length)
|
||||
newlength++;
|
||||
if (newlength >= size)
|
||||
{
|
||||
do
|
||||
size += WORDCHUNK;
|
||||
while (size <= newlength);
|
||||
buffer = (char*) realloc(buffer, size);
|
||||
}
|
||||
if (length) // append a new entry
|
||||
buffer[length++] = ' ';
|
||||
memcpy(buffer + length, word, wordlen);
|
||||
length = newlength;
|
||||
buffer[length] = '\0';
|
||||
}
|
||||
return buffer; // result has to be freed with free()
|
||||
}
|
||||
else if (cond < 0)
|
||||
end = pivot - 1;
|
||||
else if (cond > 0)
|
||||
start = pivot + 1;
|
||||
}
|
||||
free(buffer);
|
||||
return NULL;
|
||||
}
|
||||
113
contrib/src/stc/scintilla/src/SVector.h
Normal file
113
contrib/src/stc/scintilla/src/SVector.h
Normal file
@@ -0,0 +1,113 @@
|
||||
// Scintilla source code edit control
|
||||
// SVector.h - a simple expandable vector
|
||||
// Copyright 1998-1999 by Neil Hodgson <neilh@hare.net.au>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef SVECTOR_H
|
||||
#define SVECTOR_H
|
||||
|
||||
// A simple expandable integer vector.
|
||||
// Storage not allocated for elements until an element is used.
|
||||
// This makes it very lightweight unless used so is a good match for optional features.
|
||||
|
||||
class SVector {
|
||||
int *v;
|
||||
unsigned int size; // Number of elements allocated
|
||||
unsigned int len; // Number of elements in vector
|
||||
bool allocFailure; // A memory allocation call has failed
|
||||
|
||||
// Internally allocate more elements than the user wants to avoid
|
||||
// thrashng the memory allocator
|
||||
void SizeTo(int newSize) {
|
||||
if (newSize < 4000)
|
||||
newSize += 4000;
|
||||
else
|
||||
newSize = (newSize * 3) / 2;
|
||||
int* newv = new int[newSize];
|
||||
if (!newv) {
|
||||
allocFailure = true;
|
||||
return;
|
||||
}
|
||||
size = newSize;
|
||||
unsigned int i=0;
|
||||
for (; i<len; i++) {
|
||||
newv[i] = v[i];
|
||||
}
|
||||
for (; i<size; i++) {
|
||||
newv[i] = 0;
|
||||
}
|
||||
delete []v;
|
||||
v = newv;
|
||||
}
|
||||
|
||||
public:
|
||||
SVector() {
|
||||
allocFailure = false;
|
||||
v = 0;
|
||||
len = 0;
|
||||
size = 0;
|
||||
}
|
||||
~SVector() {
|
||||
Free();
|
||||
}
|
||||
SVector(const SVector &other) {
|
||||
allocFailure = false;
|
||||
v = 0;
|
||||
len = 0;
|
||||
size = 0;
|
||||
if (other.Length() > 0) {
|
||||
SizeTo(other.Length());
|
||||
if (!allocFailure) {
|
||||
for (int i=0;i<other.Length();i++)
|
||||
v[i] = other.v[i];
|
||||
len = other.Length();
|
||||
}
|
||||
}
|
||||
}
|
||||
SVector &operator=(const SVector &other) {
|
||||
if (this != &other) {
|
||||
delete []v;
|
||||
allocFailure = false;
|
||||
v = 0;
|
||||
len = 0;
|
||||
size = 0;
|
||||
if (other.Length() > 0) {
|
||||
SizeTo(other.Length());
|
||||
if (!allocFailure) {
|
||||
for (int i=0;i<other.Length();i++)
|
||||
v[i] = other.v[i];
|
||||
}
|
||||
len = other.Length();
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
int &operator[](unsigned int i) {
|
||||
if (i >= len) {
|
||||
if (i >= size) {
|
||||
SizeTo(i);
|
||||
}
|
||||
len = i+1;
|
||||
}
|
||||
return v[i];
|
||||
}
|
||||
void Free() {
|
||||
delete []v;
|
||||
v = 0;
|
||||
size = 0;
|
||||
len = 0;
|
||||
}
|
||||
void SetLength(unsigned int newLength) {
|
||||
if (newLength > len) {
|
||||
if (newLength >= size) {
|
||||
SizeTo(newLength);
|
||||
}
|
||||
}
|
||||
len = newLength;
|
||||
}
|
||||
int Length() const {
|
||||
return len;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
499
contrib/src/stc/scintilla/src/ScintillaBase.cxx
Normal file
499
contrib/src/stc/scintilla/src/ScintillaBase.cxx
Normal file
@@ -0,0 +1,499 @@
|
||||
// Scintilla source code edit control
|
||||
// ScintillaBase.cxx - an enhanced subclass of Editor with calltips, autocomplete and context menu
|
||||
// Copyright 1998-2000 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 <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "PropSet.h"
|
||||
#ifdef SCI_LEXER
|
||||
#include "SciLexer.h"
|
||||
#include "Accessor.h"
|
||||
#include "WindowAccessor.h"
|
||||
#include "DocumentAccessor.h"
|
||||
#include "KeyWords.h"
|
||||
#endif
|
||||
#include "ContractionState.h"
|
||||
#include "SVector.h"
|
||||
#include "CellBuffer.h"
|
||||
#include "CallTip.h"
|
||||
#include "KeyMap.h"
|
||||
#include "Indicator.h"
|
||||
#include "LineMarker.h"
|
||||
#include "Style.h"
|
||||
#include "ViewStyle.h"
|
||||
#include "AutoComplete.h"
|
||||
#include "Document.h"
|
||||
#include "Editor.h"
|
||||
#include "ScintillaBase.h"
|
||||
|
||||
ScintillaBase::ScintillaBase() {
|
||||
#ifdef SCI_LEXER
|
||||
lexLanguage = SCLEX_CONTAINER;
|
||||
for (int wl=0;wl<numWordLists;wl++)
|
||||
keyWordLists[wl] = new WordList;
|
||||
#endif
|
||||
}
|
||||
|
||||
ScintillaBase::~ScintillaBase() {
|
||||
#ifdef SCI_LEXER
|
||||
for (int wl=0;wl<numWordLists;wl++)
|
||||
delete keyWordLists[wl];
|
||||
#endif
|
||||
}
|
||||
|
||||
void ScintillaBase::Finalise() {
|
||||
Editor::Finalise();
|
||||
popup.Destroy();
|
||||
}
|
||||
|
||||
void ScintillaBase::RefreshColourPalette(Palette &pal, bool want) {
|
||||
Editor::RefreshColourPalette(pal, want);
|
||||
ct.RefreshColourPalette(pal, want);
|
||||
}
|
||||
|
||||
void ScintillaBase::AddCharUTF(char *s, unsigned int len) {
|
||||
bool acActiveBeforeCharAdded = ac.Active();
|
||||
if (!acActiveBeforeCharAdded || !ac.IsFillUpChar(*s))
|
||||
Editor::AddCharUTF(s, len);
|
||||
if (acActiveBeforeCharAdded)
|
||||
AutoCompleteChanged(s[0]);
|
||||
}
|
||||
|
||||
void ScintillaBase::Command(int cmdId) {
|
||||
|
||||
switch (cmdId) {
|
||||
|
||||
case idAutoComplete: // Nothing to do
|
||||
break;
|
||||
|
||||
case idCallTip: // Nothing to do
|
||||
break;
|
||||
|
||||
case idcmdUndo:
|
||||
WndProc(SCI_UNDO, 0, 0);
|
||||
break;
|
||||
|
||||
case idcmdRedo:
|
||||
WndProc(SCI_REDO, 0, 0);
|
||||
break;
|
||||
|
||||
case idcmdCut:
|
||||
WndProc(SCI_CUT, 0, 0);
|
||||
break;
|
||||
|
||||
case idcmdCopy:
|
||||
WndProc(SCI_COPY, 0, 0);
|
||||
break;
|
||||
|
||||
case idcmdPaste:
|
||||
WndProc(SCI_PASTE, 0, 0);
|
||||
break;
|
||||
|
||||
case idcmdDelete:
|
||||
WndProc(SCI_CLEAR, 0, 0);
|
||||
break;
|
||||
|
||||
case idcmdSelectAll:
|
||||
WndProc(SCI_SELECTALL, 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int ScintillaBase::KeyCommand(unsigned int iMessage) {
|
||||
// Most key commands cancel autocompletion mode
|
||||
if (ac.Active()) {
|
||||
switch (iMessage) {
|
||||
// Except for these
|
||||
case SCI_LINEDOWN:
|
||||
AutoCompleteMove(1);
|
||||
return 0;
|
||||
case SCI_LINEUP:
|
||||
AutoCompleteMove( -1);
|
||||
return 0;
|
||||
case SCI_PAGEDOWN:
|
||||
AutoCompleteMove(5);
|
||||
return 0;
|
||||
case SCI_PAGEUP:
|
||||
AutoCompleteMove( -5);
|
||||
return 0;
|
||||
case SCI_VCHOME:
|
||||
AutoCompleteMove( -5000);
|
||||
return 0;
|
||||
case SCI_LINEEND:
|
||||
AutoCompleteMove(5000);
|
||||
return 0;
|
||||
case SCI_DELETEBACK:
|
||||
DelCharBack();
|
||||
AutoCompleteChanged();
|
||||
EnsureCaretVisible();
|
||||
return 0;
|
||||
case SCI_TAB:
|
||||
AutoCompleteCompleted();
|
||||
return 0;
|
||||
case SCI_NEWLINE:
|
||||
AutoCompleteCompleted();
|
||||
return 0;
|
||||
|
||||
default:
|
||||
ac.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
if (ct.inCallTipMode) {
|
||||
if (
|
||||
(iMessage != SCI_CHARLEFT) &&
|
||||
(iMessage != SCI_CHARLEFTEXTEND) &&
|
||||
(iMessage != SCI_CHARRIGHT) &&
|
||||
(iMessage != SCI_CHARLEFTEXTEND) &&
|
||||
(iMessage != SCI_EDITTOGGLEOVERTYPE) &&
|
||||
(iMessage != SCI_DELETEBACK)
|
||||
) {
|
||||
ct.CallTipCancel();
|
||||
}
|
||||
if (iMessage == SCI_DELETEBACK) {
|
||||
if (currentPos <= ct.posStartCallTip) {
|
||||
ct.CallTipCancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Editor::KeyCommand(iMessage);
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) {
|
||||
//Platform::DebugPrintf("AutoComplete %s\n", list);
|
||||
ct.CallTipCancel();
|
||||
|
||||
if (ac.chooseSingle) {
|
||||
if (list && !strchr(list, ac.GetSeparator())) {
|
||||
if (ac.ignoreCase) {
|
||||
SetEmptySelection(currentPos - lenEntered);
|
||||
pdoc->DeleteChars(currentPos, lenEntered);
|
||||
SetEmptySelection(currentPos);
|
||||
pdoc->InsertString(currentPos, list);
|
||||
SetEmptySelection(currentPos + strlen(list));
|
||||
} else {
|
||||
SetEmptySelection(currentPos);
|
||||
pdoc->InsertString(currentPos, list + lenEntered);
|
||||
SetEmptySelection(currentPos + strlen(list + lenEntered));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
ac.Start(wDraw, idAutoComplete, currentPos, lenEntered);
|
||||
|
||||
PRectangle rcClient = GetClientRectangle();
|
||||
Point pt = LocationFromPosition(currentPos-lenEntered);
|
||||
|
||||
int heightLB = 100;
|
||||
int widthLB = 100;
|
||||
if (pt.x >= rcClient.right - widthLB) {
|
||||
HorizontalScrollTo(xOffset + pt.x - rcClient.right + widthLB);
|
||||
Redraw();
|
||||
pt = LocationFromPosition(currentPos);
|
||||
}
|
||||
PRectangle rcac;
|
||||
rcac.left = pt.x - 5;
|
||||
if (pt.y >= rcClient.bottom - heightLB && // Wont fit below.
|
||||
pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above.
|
||||
rcac.top = pt.y - heightLB;
|
||||
if (rcac.top < 0) {
|
||||
heightLB += rcac.top;
|
||||
rcac.top = 0;
|
||||
}
|
||||
} else {
|
||||
rcac.top = pt.y + vs.lineHeight;
|
||||
}
|
||||
rcac.right = rcac.left + widthLB;
|
||||
rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom);
|
||||
ac.lb.SetPositionRelative(rcac, wMain);
|
||||
ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font);
|
||||
ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth);
|
||||
|
||||
ac.SetList(list);
|
||||
|
||||
// Fiddle the position of the list so it is right next to the target and wide enough for all its strings
|
||||
PRectangle rcList = ac.lb.GetDesiredRect();
|
||||
int heightAlloced = rcList.bottom - rcList.top;
|
||||
widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left);
|
||||
// Make an allowance for large strings in list
|
||||
rcList.left = pt.x - 5;
|
||||
rcList.right = rcList.left + widthLB;
|
||||
if (pt.y >= rcClient.bottom - heightLB && // Wont fit below.
|
||||
pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above.
|
||||
rcList.top = pt.y - heightAlloced;
|
||||
} else {
|
||||
rcList.top = pt.y + vs.lineHeight;
|
||||
}
|
||||
rcList.bottom = rcList.top + heightAlloced;
|
||||
ac.lb.SetPositionRelative(rcList, wMain);
|
||||
ac.Show();
|
||||
if (lenEntered != 0) {
|
||||
AutoCompleteMoveToCurrentWord();
|
||||
}
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteCancel() {
|
||||
ac.Cancel();
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteMove(int delta) {
|
||||
ac.Move(delta);
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteMoveToCurrentWord() {
|
||||
char wordCurrent[1000];
|
||||
int i;
|
||||
int startWord = ac.posStart - ac.startLen;
|
||||
for (i = startWord; i < currentPos; i++)
|
||||
wordCurrent[i - startWord] = pdoc->CharAt(i);
|
||||
wordCurrent[i - startWord] = '\0';
|
||||
ac.Select(wordCurrent);
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteChanged(char ch) {
|
||||
if (ac.IsFillUpChar(ch)) {
|
||||
AutoCompleteCompleted(ch);
|
||||
} else if (currentPos <= ac.posStart - ac.startLen) {
|
||||
ac.Cancel();
|
||||
} else if (ac.cancelAtStartPos && currentPos <= ac.posStart) {
|
||||
ac.Cancel();
|
||||
} else if (ac.IsStopChar(ch)) {
|
||||
ac.Cancel();
|
||||
} else {
|
||||
AutoCompleteMoveToCurrentWord();
|
||||
}
|
||||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) {
|
||||
int item = ac.lb.GetSelection();
|
||||
char selected[1000];
|
||||
if (item != -1) {
|
||||
ac.lb.GetValue(item, selected, sizeof(selected));
|
||||
}
|
||||
ac.Cancel();
|
||||
|
||||
if (ac.ignoreCase) {
|
||||
if (currentPos != ac.posStart) {
|
||||
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
|
||||
}
|
||||
SetEmptySelection(ac.posStart - ac.startLen);
|
||||
pdoc->DeleteChars(ac.posStart - ac.startLen, ac.startLen);
|
||||
if (item != -1) {
|
||||
SString piece = selected;
|
||||
if (fillUp)
|
||||
piece += fillUp;
|
||||
pdoc->InsertString(currentPos, piece.c_str());
|
||||
SetEmptySelection(currentPos + piece.length());
|
||||
}
|
||||
} else {
|
||||
if (currentPos != ac.posStart) {
|
||||
pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart);
|
||||
}
|
||||
SetEmptySelection(ac.posStart);
|
||||
if (item != -1) {
|
||||
SString piece = selected + ac.startLen;
|
||||
if (fillUp)
|
||||
piece += fillUp;
|
||||
pdoc->InsertString(currentPos, piece.c_str());
|
||||
SetEmptySelection(currentPos + piece.length());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScintillaBase::ContextMenu(Point pt) {
|
||||
popup.CreatePopUp();
|
||||
AddToPopUp("Undo", idcmdUndo, pdoc->CanUndo());
|
||||
AddToPopUp("Redo", idcmdRedo, pdoc->CanRedo());
|
||||
AddToPopUp("");
|
||||
AddToPopUp("Cut", idcmdCut, currentPos != anchor);
|
||||
AddToPopUp("Copy", idcmdCopy, currentPos != anchor);
|
||||
AddToPopUp("Paste", idcmdPaste, WndProc(SCI_CANPASTE, 0, 0));
|
||||
AddToPopUp("Delete", idcmdDelete, currentPos != anchor);
|
||||
AddToPopUp("");
|
||||
AddToPopUp("Select All", idcmdSelectAll);
|
||||
popup.Show(pt, wMain);
|
||||
}
|
||||
|
||||
void ScintillaBase::CancelModes() {
|
||||
AutoCompleteCancel();
|
||||
ct.CallTipCancel();
|
||||
Editor::CancelModes();
|
||||
}
|
||||
|
||||
void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
|
||||
CancelModes();
|
||||
Editor::ButtonDown(pt, curTime, shift, ctrl, alt);
|
||||
}
|
||||
|
||||
#ifdef SCI_LEXER
|
||||
void ScintillaBase::Colourise(int start, int end) {
|
||||
int lengthDoc = Platform::SendScintilla(wMain.GetID(), SCI_GETLENGTH, 0, 0);
|
||||
if (end == -1)
|
||||
end = lengthDoc;
|
||||
int len = end - start;
|
||||
|
||||
//WindowAccessor styler(wMain.GetID(), props);
|
||||
DocumentAccessor styler(pdoc, props);
|
||||
|
||||
int styleStart = 0;
|
||||
if (start > 0)
|
||||
styleStart = styler.StyleAt(start - 1);
|
||||
styler.SetCodePage(pdoc->dbcsCodePage);
|
||||
|
||||
LexerModule::Colourise(start, len, styleStart, lexLanguage, keyWordLists, styler);
|
||||
styler.Flush();
|
||||
}
|
||||
#endif
|
||||
|
||||
void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) {
|
||||
#ifdef SCI_LEXER
|
||||
if (lexLanguage != SCLEX_CONTAINER) {
|
||||
int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0);
|
||||
int lineEndStyled = Platform::SendScintilla(wMain.GetID(), SCI_LINEFROMPOSITION, endStyled, 0);
|
||||
endStyled = Platform::SendScintilla(wMain.GetID(), SCI_POSITIONFROMLINE, lineEndStyled, 0);
|
||||
Colourise(endStyled, endStyleNeeded);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
Editor::NotifyStyleToNeeded(endStyleNeeded);
|
||||
}
|
||||
|
||||
long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
|
||||
switch (iMessage) {
|
||||
case SCI_AUTOCSHOW:
|
||||
AutoCompleteStart(wParam, reinterpret_cast<const char *>(lParam));
|
||||
break;
|
||||
|
||||
case SCI_AUTOCCANCEL:
|
||||
AutoCompleteCancel();
|
||||
break;
|
||||
|
||||
case SCI_AUTOCACTIVE:
|
||||
return ac.Active();
|
||||
|
||||
case SCI_AUTOCPOSSTART:
|
||||
return ac.posStart;
|
||||
|
||||
case SCI_AUTOCCOMPLETE:
|
||||
AutoCompleteCompleted();
|
||||
break;
|
||||
|
||||
case SCI_AUTOCSETSEPARATOR:
|
||||
ac.SetSeparator(static_cast<char>(wParam));
|
||||
break;
|
||||
|
||||
case SCI_AUTOCGETSEPARATOR:
|
||||
return ac.GetSeparator();
|
||||
|
||||
case SCI_AUTOCSTOPS:
|
||||
ac.SetStopChars(reinterpret_cast<char *>(lParam));
|
||||
break;
|
||||
|
||||
case SCI_AUTOCSELECT:
|
||||
ac.Select(reinterpret_cast<char *>(lParam));
|
||||
break;
|
||||
|
||||
case SCI_AUTOCSETCANCELATSTART:
|
||||
ac.cancelAtStartPos = wParam;
|
||||
break;
|
||||
|
||||
case SCI_AUTOCGETCANCELATSTART:
|
||||
return ac.cancelAtStartPos;
|
||||
|
||||
case SCI_AUTOCSETFILLUPS:
|
||||
ac.SetFillUpChars(reinterpret_cast<char *>(lParam));
|
||||
break;
|
||||
|
||||
case SCI_AUTOCSETCHOOSESINGLE:
|
||||
ac.chooseSingle = wParam;
|
||||
break;
|
||||
|
||||
case SCI_AUTOCGETCHOOSESINGLE:
|
||||
return ac.chooseSingle;
|
||||
|
||||
case SCI_AUTOCSETIGNORECASE:
|
||||
ac.ignoreCase = wParam;
|
||||
break;
|
||||
|
||||
case SCI_AUTOCGETIGNORECASE:
|
||||
return ac.ignoreCase;
|
||||
|
||||
case SCI_CALLTIPSHOW: {
|
||||
AutoCompleteCancel();
|
||||
if (!ct.wCallTip.Created()) {
|
||||
PRectangle rc = ct.CallTipStart(currentPos, LocationFromPosition(wParam),
|
||||
reinterpret_cast<char *>(lParam),
|
||||
vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].size);
|
||||
// If the call-tip window would be out of the client
|
||||
// space, adjust so it displays above the text.
|
||||
PRectangle rcClient = GetClientRectangle();
|
||||
if (rc.bottom > rcClient.bottom) {
|
||||
int offset = vs.lineHeight + rc.Height();
|
||||
rc.top -= offset;
|
||||
rc.bottom -= offset;
|
||||
}
|
||||
// Now display the window.
|
||||
CreateCallTipWindow(rc);
|
||||
ct.wCallTip.SetPositionRelative(rc, wDraw);
|
||||
ct.wCallTip.Show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SCI_CALLTIPCANCEL:
|
||||
ct.CallTipCancel();
|
||||
break;
|
||||
|
||||
case SCI_CALLTIPACTIVE:
|
||||
return ct.inCallTipMode;
|
||||
|
||||
case SCI_CALLTIPPOSSTART:
|
||||
return ct.posStartCallTip;
|
||||
|
||||
case SCI_CALLTIPSETHLT:
|
||||
ct.SetHighlight(wParam, lParam);
|
||||
break;
|
||||
|
||||
case SCI_CALLTIPSETBACK:
|
||||
ct.colourBG = Colour(wParam);
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
#ifdef SCI_LEXER
|
||||
case SCI_SETLEXER:
|
||||
lexLanguage = wParam;
|
||||
break;
|
||||
|
||||
case SCI_GETLEXER:
|
||||
return lexLanguage;
|
||||
|
||||
case SCI_COLOURISE:
|
||||
Colourise(wParam, lParam);
|
||||
Redraw();
|
||||
break;
|
||||
|
||||
case SCI_SETPROPERTY:
|
||||
props.Set(reinterpret_cast<const char *>(wParam),
|
||||
reinterpret_cast<const char *>(lParam));
|
||||
break;
|
||||
|
||||
case SCI_SETKEYWORDS:
|
||||
if (wParam < numWordLists) {
|
||||
keyWordLists[wParam]->Clear();
|
||||
keyWordLists[wParam]->Set(reinterpret_cast<const char *>(lParam));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
return Editor::WndProc(iMessage, wParam, lParam);
|
||||
}
|
||||
return 0l;
|
||||
}
|
||||
73
contrib/src/stc/scintilla/src/ScintillaBase.h
Normal file
73
contrib/src/stc/scintilla/src/ScintillaBase.h
Normal file
@@ -0,0 +1,73 @@
|
||||
// Scintilla source code edit control
|
||||
// ScintillaBase.h - defines an enhanced subclass of Editor with calltips, autocomplete and context menu
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef SCINTILLABASE_H
|
||||
#define SCINTILLABASE_H
|
||||
|
||||
class ScintillaBase : public Editor {
|
||||
// Private so ScintillaBase objects can not be copied
|
||||
ScintillaBase(const ScintillaBase &) : Editor() {}
|
||||
ScintillaBase &operator=(const ScintillaBase &) { return *this; }
|
||||
protected:
|
||||
// Enumeration of commands and child windows
|
||||
enum {
|
||||
idCallTip=1,
|
||||
idAutoComplete=2,
|
||||
|
||||
idcmdUndo=10,
|
||||
idcmdRedo=11,
|
||||
idcmdCut=12,
|
||||
idcmdCopy=13,
|
||||
idcmdPaste=14,
|
||||
idcmdDelete=15,
|
||||
idcmdSelectAll=16
|
||||
};
|
||||
|
||||
Menu popup;
|
||||
AutoComplete ac;
|
||||
|
||||
CallTip ct;
|
||||
|
||||
#ifdef SCI_LEXER
|
||||
int lexLanguage;
|
||||
PropSet props;
|
||||
enum {numWordLists=5};
|
||||
WordList *keyWordLists[numWordLists];
|
||||
void Colourise(int start, int end);
|
||||
#endif
|
||||
|
||||
ScintillaBase();
|
||||
virtual ~ScintillaBase();
|
||||
virtual void Initialise() = 0;
|
||||
virtual void Finalise() = 0;
|
||||
|
||||
virtual void RefreshColourPalette(Palette &pal, bool want);
|
||||
|
||||
virtual void AddCharUTF(char *s, unsigned int len);
|
||||
void Command(int cmdId);
|
||||
virtual void CancelModes();
|
||||
virtual int KeyCommand(unsigned int iMessage);
|
||||
|
||||
void AutoCompleteStart(int lenEntered, const char *list);
|
||||
void AutoCompleteCancel();
|
||||
void AutoCompleteMove(int delta);
|
||||
void AutoCompleteChanged(char ch=0);
|
||||
void AutoCompleteCompleted(char fillUp='\0');
|
||||
void AutoCompleteMoveToCurrentWord();
|
||||
|
||||
virtual void CreateCallTipWindow(PRectangle rc) = 0;
|
||||
|
||||
virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
|
||||
void ContextMenu(Point pt);
|
||||
|
||||
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
|
||||
|
||||
virtual void NotifyStyleToNeeded(int endStyleNeeded);
|
||||
public:
|
||||
// Public so scintilla_send_message can use it
|
||||
virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
};
|
||||
|
||||
#endif
|
||||
125
contrib/src/stc/scintilla/src/Style.cxx
Normal file
125
contrib/src/stc/scintilla/src/Style.cxx
Normal file
@@ -0,0 +1,125 @@
|
||||
// Scintilla source code edit control
|
||||
// Style.cxx - defines the font and colour style for a class of text
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "Style.h"
|
||||
|
||||
Style::Style() {
|
||||
aliasOfDefaultFont = true;
|
||||
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||
Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT,
|
||||
false, false, false, false, true);
|
||||
}
|
||||
|
||||
Style::Style(const Style &source) {
|
||||
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||
0, 0, 0,
|
||||
false, false, false, false, true);
|
||||
fore.desired = source.fore.desired;
|
||||
back.desired = source.back.desired;
|
||||
characterSet = source.characterSet;
|
||||
bold = source.bold;
|
||||
italic = source.italic;
|
||||
size = source.size;
|
||||
eolFilled = source.eolFilled;
|
||||
underline = source.underline;
|
||||
visible = source.visible;
|
||||
}
|
||||
|
||||
Style::~Style() {
|
||||
if (aliasOfDefaultFont)
|
||||
font.SetID(0);
|
||||
else
|
||||
font.Release();
|
||||
aliasOfDefaultFont = false;
|
||||
}
|
||||
|
||||
Style &Style::operator=(const Style &source) {
|
||||
if (this == &source)
|
||||
return *this;
|
||||
Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||
0, 0, SC_CHARSET_DEFAULT,
|
||||
false, false, false, false, true);
|
||||
fore.desired = source.fore.desired;
|
||||
back.desired = source.back.desired;
|
||||
characterSet = source.characterSet;
|
||||
bold = source.bold;
|
||||
italic = source.italic;
|
||||
size = source.size;
|
||||
eolFilled = source.eolFilled;
|
||||
underline = source.underline;
|
||||
visible = source.visible;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Style::Clear(Colour fore_, Colour back_, int size_,
|
||||
const char *fontName_, int characterSet_,
|
||||
bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_) {
|
||||
fore.desired = fore_;
|
||||
back.desired = back_;
|
||||
characterSet = characterSet_;
|
||||
bold = bold_;
|
||||
italic = italic_;
|
||||
size = size_;
|
||||
fontName = fontName_;
|
||||
eolFilled = eolFilled_;
|
||||
underline = underline_;
|
||||
visible = visible_;
|
||||
if (aliasOfDefaultFont)
|
||||
font.SetID(0);
|
||||
else
|
||||
font.Release();
|
||||
aliasOfDefaultFont = false;
|
||||
}
|
||||
|
||||
bool Style::EquivalentFontTo(const Style *other) const {
|
||||
if (bold != other->bold ||
|
||||
italic != other->italic ||
|
||||
size != other->size ||
|
||||
characterSet != other->characterSet)
|
||||
return false;
|
||||
if (fontName == other->fontName)
|
||||
return true;
|
||||
if (!fontName)
|
||||
return false;
|
||||
if (!other->fontName)
|
||||
return false;
|
||||
return strcmp(fontName, other->fontName) == 0;
|
||||
}
|
||||
|
||||
void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) {
|
||||
int sizeZoomed = size + zoomLevel;
|
||||
if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1
|
||||
sizeZoomed = 2;
|
||||
|
||||
if (aliasOfDefaultFont)
|
||||
font.SetID(0);
|
||||
else
|
||||
font.Release();
|
||||
int deviceHeight = surface.DeviceHeightFont(sizeZoomed);
|
||||
aliasOfDefaultFont = defaultStyle &&
|
||||
(EquivalentFontTo(defaultStyle) || !fontName);
|
||||
if (aliasOfDefaultFont) {
|
||||
font.SetID(defaultStyle->font.GetID());
|
||||
} else if (fontName) {
|
||||
font.Create(fontName, characterSet, deviceHeight, bold, italic);
|
||||
} else {
|
||||
font.SetID(0);
|
||||
}
|
||||
|
||||
ascent = surface.Ascent(font);
|
||||
descent = surface.Descent(font);
|
||||
// Probably more typographically correct to include leading
|
||||
// but that means more complex drawing as leading must be erased
|
||||
//lineHeight = surface.ExternalLeading() + surface.Height();
|
||||
externalLeading = surface.ExternalLeading(font);
|
||||
lineHeight = surface.Height(font);
|
||||
aveCharWidth = surface.AverageCharWidth(font);
|
||||
spaceWidth = surface.WidthChar(font, ' ');
|
||||
}
|
||||
43
contrib/src/stc/scintilla/src/Style.h
Normal file
43
contrib/src/stc/scintilla/src/Style.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Scintilla source code edit control
|
||||
// Style.h - defines the font and colour style for a class of text
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef STYLE_H
|
||||
#define STYLE_H
|
||||
|
||||
class Style {
|
||||
public:
|
||||
ColourPair fore;
|
||||
ColourPair back;
|
||||
bool aliasOfDefaultFont;
|
||||
bool bold;
|
||||
bool italic;
|
||||
int size;
|
||||
const char *fontName;
|
||||
int characterSet;
|
||||
bool eolFilled;
|
||||
bool underline;
|
||||
bool visible;
|
||||
|
||||
Font font;
|
||||
unsigned int lineHeight;
|
||||
unsigned int ascent;
|
||||
unsigned int descent;
|
||||
unsigned int externalLeading;
|
||||
unsigned int aveCharWidth;
|
||||
unsigned int spaceWidth;
|
||||
|
||||
Style();
|
||||
Style(const Style &source);
|
||||
~Style();
|
||||
Style &operator=(const Style &source);
|
||||
void Clear(Colour fore_, Colour back_,
|
||||
int size_,
|
||||
const char *fontName_, int characterSet_,
|
||||
bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_);
|
||||
bool EquivalentFontTo(const Style *other) const;
|
||||
void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0);
|
||||
};
|
||||
|
||||
#endif
|
||||
77
contrib/src/stc/scintilla/src/UniConversion.cxx
Normal file
77
contrib/src/stc/scintilla/src/UniConversion.cxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// UniConversion.h - functions to handle UFT-8 and UCS-2 strings
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "UniConversion.h"
|
||||
|
||||
unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) {
|
||||
unsigned int len = 0;
|
||||
for (unsigned int i = 0; i < tlen && uptr[i]; i++) {
|
||||
unsigned int uch = uptr[i];
|
||||
if (uch < 0x80)
|
||||
len++;
|
||||
else if (uch < 0x800)
|
||||
len+=2;
|
||||
else
|
||||
len +=3;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) {
|
||||
int k = 0;
|
||||
for (unsigned int i = 0; i < tlen && uptr[i]; i++) {
|
||||
unsigned int uch = uptr[i];
|
||||
if (uch < 0x80) {
|
||||
putf[k++] = static_cast<char>(uch);
|
||||
} else if (uch < 0x800) {
|
||||
putf[k++] = static_cast<char>(0xC0 | (uch >> 6));
|
||||
putf[k++] = static_cast<char>(0x80 | (uch & 0x3f));
|
||||
} else {
|
||||
putf[k++] = static_cast<char>(0xE0 | (uch >> 12));
|
||||
putf[k++] = static_cast<char>(0x80 | ((uch >> 6) & 0x3f));
|
||||
putf[k++] = static_cast<char>(0x80 | (uch & 0x3f));
|
||||
}
|
||||
}
|
||||
putf[len] = '\0';
|
||||
}
|
||||
|
||||
unsigned int UCS2Length(const char *s, unsigned int len) {
|
||||
unsigned int ulen = 0;
|
||||
for (unsigned int i=0;i<len;i++) {
|
||||
unsigned char ch = static_cast<unsigned char>(s[i]);
|
||||
if ((ch < 0x80) || (ch > (0x80 + 0x40)))
|
||||
ulen++;
|
||||
}
|
||||
return ulen;
|
||||
}
|
||||
|
||||
unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen) {
|
||||
#ifdef USE_API
|
||||
return ::MultiByteToWideChar(CP_UTF8, 0, s, len, tbuf, tlen);
|
||||
#else
|
||||
unsigned int ui=0;
|
||||
const unsigned char *us = reinterpret_cast<const unsigned char *>(s);
|
||||
unsigned int i=0;
|
||||
while ((i<len) && (ui<tlen)) {
|
||||
unsigned char ch = us[i++];
|
||||
if (ch < 0x80) {
|
||||
tbuf[ui] = ch;
|
||||
} else if (ch < 0x80 + 0x40 + 0x20) {
|
||||
tbuf[ui] = static_cast<wchar_t>((ch & 0x1F) << 6);
|
||||
ch = us[i++];
|
||||
tbuf[ui] = static_cast<wchar_t>(tbuf[ui] + (ch & 0x7F));
|
||||
} else {
|
||||
tbuf[ui] = static_cast<wchar_t>((ch & 0xF) << 12);
|
||||
ch = us[i++];
|
||||
tbuf[ui] = static_cast<wchar_t>(tbuf[ui] + ((ch & 0x7F) << 6));
|
||||
ch = us[i++];
|
||||
tbuf[ui] = static_cast<wchar_t>(tbuf[ui] + (ch & 0x7F));
|
||||
}
|
||||
ui++;
|
||||
}
|
||||
return ui;
|
||||
#endif
|
||||
}
|
||||
9
contrib/src/stc/scintilla/src/UniConversion.h
Normal file
9
contrib/src/stc/scintilla/src/UniConversion.h
Normal file
@@ -0,0 +1,9 @@
|
||||
// UniConversion.h - functions to handle UFT-8 and UCS-2 strings
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen);
|
||||
void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len);
|
||||
unsigned int UCS2Length(const char *s, unsigned int len);
|
||||
unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen);
|
||||
|
||||
238
contrib/src/stc/scintilla/src/ViewStyle.cxx
Normal file
238
contrib/src/stc/scintilla/src/ViewStyle.cxx
Normal file
@@ -0,0 +1,238 @@
|
||||
// Scintilla source code edit control
|
||||
// ViewStyle.cxx - store information on how the document is to be viewed
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "Indicator.h"
|
||||
#include "LineMarker.h"
|
||||
#include "Style.h"
|
||||
#include "ViewStyle.h"
|
||||
|
||||
MarginStyle::MarginStyle() :
|
||||
symbol(false), width(16), mask(0xffffffff), sensitive(false) {
|
||||
}
|
||||
|
||||
// A list of the fontnames - avoids wasting space in each style
|
||||
FontNames::FontNames() {
|
||||
max = 0;
|
||||
}
|
||||
|
||||
FontNames::~FontNames() {
|
||||
Clear();
|
||||
}
|
||||
|
||||
void FontNames::Clear() {
|
||||
for (int i=0;i<max;i++) {
|
||||
delete []names[i];
|
||||
}
|
||||
max = 0;
|
||||
}
|
||||
|
||||
const char *FontNames::Save(const char *name) {
|
||||
if (!name)
|
||||
return 0;
|
||||
for (int i=0;i<max;i++) {
|
||||
if (strcmp(names[i], name) == 0) {
|
||||
return names[i];
|
||||
}
|
||||
}
|
||||
names[max] = new char[strlen(name) + 1];
|
||||
strcpy(names[max], name);
|
||||
max++;
|
||||
return names[max-1];
|
||||
}
|
||||
|
||||
ViewStyle::ViewStyle() {
|
||||
Init();
|
||||
}
|
||||
|
||||
ViewStyle::ViewStyle(const ViewStyle &source) {
|
||||
Init();
|
||||
for (unsigned int sty=0;sty<(sizeof(styles)/sizeof(styles[0]));sty++) {
|
||||
styles[sty] = source.styles[sty];
|
||||
// Can't just copy fontname as its lifetime is relative to its owning ViewStyle
|
||||
styles[sty].fontName = fontNames.Save(source.styles[sty].fontName);
|
||||
}
|
||||
for (int mrk=0;mrk<=MARKER_MAX;mrk++) {
|
||||
markers[mrk] = source.markers[mrk];
|
||||
}
|
||||
for (int ind=0;ind<=INDIC_MAX;ind++) {
|
||||
indicators[ind] = source.indicators[ind];
|
||||
}
|
||||
|
||||
selforeset = source.selforeset;
|
||||
selforeground.desired = source.selforeground.desired;
|
||||
selbackset = source.selbackset;
|
||||
selbackground.desired = source.selbackground.desired;
|
||||
selbackground2.desired = source.selbackground2.desired;
|
||||
selbar.desired = source.selbar.desired;
|
||||
selbarlight.desired = source.selbarlight.desired;
|
||||
caretcolour.desired = source.caretcolour.desired;
|
||||
edgecolour.desired = source.edgecolour.desired;
|
||||
edgeState = source.edgeState;
|
||||
leftMarginWidth = source.leftMarginWidth;
|
||||
rightMarginWidth = source.rightMarginWidth;
|
||||
for (int i=0;i < margins; i++) {
|
||||
ms[i] = source.ms[i];
|
||||
}
|
||||
symbolMargin = source.symbolMargin;
|
||||
maskInLine = source.maskInLine;
|
||||
fixedColumnWidth = source.fixedColumnWidth;
|
||||
zoomLevel = source.zoomLevel;
|
||||
viewWhitespace = source.viewWhitespace;
|
||||
viewIndentationGuides = source.viewIndentationGuides;
|
||||
viewEOL = source.viewEOL;
|
||||
showMarkedLines = source.showMarkedLines;
|
||||
}
|
||||
|
||||
ViewStyle::~ViewStyle() {
|
||||
}
|
||||
|
||||
void ViewStyle::Init() {
|
||||
fontNames.Clear();
|
||||
ResetDefaultStyle();
|
||||
|
||||
indicators[0].style = INDIC_SQUIGGLE;
|
||||
indicators[0].fore = Colour(0, 0x7f, 0);
|
||||
indicators[1].style = INDIC_TT;
|
||||
indicators[1].fore = Colour(0, 0, 0xff);
|
||||
indicators[2].style = INDIC_PLAIN;
|
||||
indicators[2].fore = Colour(0xff, 0, 0);
|
||||
|
||||
lineHeight = 1;
|
||||
maxAscent = 1;
|
||||
maxDescent = 1;
|
||||
aveCharWidth = 8;
|
||||
spaceWidth = 8;
|
||||
|
||||
selforeset = false;
|
||||
selforeground.desired = Colour(0xff, 0, 0);
|
||||
selbackset = true;
|
||||
selbackground.desired = Colour(0xc0, 0xc0, 0xc0);
|
||||
selbackground2.desired = Colour(0xb0, 0xb0, 0xb0);
|
||||
selbar.desired = Platform::Chrome();
|
||||
selbarlight.desired = Platform::ChromeHighlight();
|
||||
styles[STYLE_LINENUMBER].fore.desired = Colour(0, 0, 0);
|
||||
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
|
||||
//caretcolour.desired = Colour(0xff, 0, 0);
|
||||
caretcolour.desired = Colour(0, 0, 0);
|
||||
edgecolour.desired = Colour(0xc0, 0xc0, 0xc0);
|
||||
edgeState = EDGE_NONE;
|
||||
|
||||
leftMarginWidth = 1;
|
||||
rightMarginWidth = 1;
|
||||
ms[0].symbol = false;
|
||||
ms[0].width = 0;
|
||||
ms[0].mask = 0;
|
||||
ms[1].symbol = true;
|
||||
ms[1].width = 16;
|
||||
ms[1].mask = ~SC_MASK_FOLDERS;
|
||||
ms[2].symbol = true;
|
||||
ms[2].width = 14; // Nice width for arrows
|
||||
ms[2].mask = SC_MASK_FOLDERS;
|
||||
ms[2].width = 0; // Nice width for arrows
|
||||
ms[2].mask = 0;
|
||||
fixedColumnWidth = leftMarginWidth;
|
||||
symbolMargin = false;
|
||||
maskInLine = 0xffffffff;
|
||||
for (int margin=0; margin < margins; margin++) {
|
||||
fixedColumnWidth += ms[margin].width;
|
||||
symbolMargin = symbolMargin || ms[margin].symbol;
|
||||
if (ms[margin].width > 0)
|
||||
maskInLine &= ~ms[margin].mask;
|
||||
}
|
||||
zoomLevel = 0;
|
||||
viewWhitespace = wsInvisible;
|
||||
viewIndentationGuides = false;
|
||||
viewEOL = false;
|
||||
showMarkedLines = true;
|
||||
}
|
||||
|
||||
void ViewStyle::RefreshColourPalette(Palette &pal, bool want) {
|
||||
unsigned int i;
|
||||
for (i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {
|
||||
pal.WantFind(styles[i].fore, want);
|
||||
pal.WantFind(styles[i].back, want);
|
||||
}
|
||||
for (i=0;i<(sizeof(indicators)/sizeof(indicators[0]));i++) {
|
||||
pal.WantFind(indicators[i].fore, want);
|
||||
}
|
||||
for (i=0;i<(sizeof(markers)/sizeof(markers[0]));i++) {
|
||||
pal.WantFind(markers[i].fore, want);
|
||||
pal.WantFind(markers[i].back, want);
|
||||
}
|
||||
pal.WantFind(selforeground, want);
|
||||
pal.WantFind(selbackground, want);
|
||||
pal.WantFind(selbackground2, want);
|
||||
pal.WantFind(selbar, want);
|
||||
pal.WantFind(selbarlight, want);
|
||||
pal.WantFind(caretcolour, want);
|
||||
pal.WantFind(edgecolour, want);
|
||||
}
|
||||
|
||||
void ViewStyle::Refresh(Surface &surface) {
|
||||
selbar.desired = Platform::Chrome();
|
||||
selbarlight.desired = Platform::ChromeHighlight();
|
||||
styles[STYLE_DEFAULT].Realise(surface, zoomLevel);
|
||||
maxAscent = styles[STYLE_DEFAULT].ascent;
|
||||
maxDescent = styles[STYLE_DEFAULT].descent;
|
||||
for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {
|
||||
if (i != STYLE_DEFAULT) {
|
||||
styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT]);
|
||||
if (maxAscent < styles[i].ascent)
|
||||
maxAscent = styles[i].ascent;
|
||||
if (maxDescent < styles[i].descent)
|
||||
maxDescent = styles[i].descent;
|
||||
}
|
||||
}
|
||||
|
||||
lineHeight = maxAscent + maxDescent;
|
||||
aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth;
|
||||
spaceWidth = styles[STYLE_DEFAULT].spaceWidth;
|
||||
|
||||
fixedColumnWidth = leftMarginWidth;
|
||||
symbolMargin = false;
|
||||
maskInLine = 0xffffffff;
|
||||
for (int margin=0; margin < margins; margin++) {
|
||||
fixedColumnWidth += ms[margin].width;
|
||||
symbolMargin = symbolMargin || ms[margin].symbol;
|
||||
if (ms[margin].width > 0)
|
||||
maskInLine &= ~ms[margin].mask;
|
||||
}
|
||||
}
|
||||
|
||||
void ViewStyle::ResetDefaultStyle() {
|
||||
styles[STYLE_DEFAULT].Clear(Colour(0,0,0), Colour(0xff,0xff,0xff),
|
||||
Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()),
|
||||
SC_CHARSET_DEFAULT,
|
||||
false, false, false, false, true);
|
||||
}
|
||||
|
||||
void ViewStyle::ClearStyles() {
|
||||
// Reset all styles to be like the default style
|
||||
for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) {
|
||||
if (i != STYLE_DEFAULT) {
|
||||
styles[i].Clear(
|
||||
styles[STYLE_DEFAULT].fore.desired,
|
||||
styles[STYLE_DEFAULT].back.desired,
|
||||
styles[STYLE_DEFAULT].size,
|
||||
styles[STYLE_DEFAULT].fontName,
|
||||
styles[STYLE_DEFAULT].characterSet,
|
||||
styles[STYLE_DEFAULT].bold,
|
||||
styles[STYLE_DEFAULT].italic,
|
||||
styles[STYLE_DEFAULT].eolFilled,
|
||||
styles[STYLE_DEFAULT].underline,
|
||||
styles[STYLE_DEFAULT].visible);
|
||||
}
|
||||
}
|
||||
styles[STYLE_LINENUMBER].back.desired = Platform::Chrome();
|
||||
}
|
||||
|
||||
void ViewStyle::SetStyleFontName(int styleIndex, const char *name) {
|
||||
styles[styleIndex].fontName = fontNames.Save(name);
|
||||
}
|
||||
76
contrib/src/stc/scintilla/src/ViewStyle.h
Normal file
76
contrib/src/stc/scintilla/src/ViewStyle.h
Normal file
@@ -0,0 +1,76 @@
|
||||
// Scintilla source code edit control
|
||||
// ViewStyle.h - store information on how the document is to be viewed
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef VIEWSTYLE_H
|
||||
#define VIEWSTYLE_H
|
||||
|
||||
class MarginStyle {
|
||||
public:
|
||||
bool symbol;
|
||||
int width;
|
||||
int mask;
|
||||
bool sensitive;
|
||||
MarginStyle();
|
||||
};
|
||||
|
||||
class FontNames {
|
||||
private:
|
||||
char *names[STYLE_MAX + 1];
|
||||
int max;
|
||||
public:
|
||||
FontNames();
|
||||
~FontNames();
|
||||
void Clear();
|
||||
const char *Save(const char *name);
|
||||
};
|
||||
|
||||
enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
|
||||
class ViewStyle {
|
||||
public:
|
||||
FontNames fontNames;
|
||||
Style styles[STYLE_MAX + 1];
|
||||
LineMarker markers[MARKER_MAX + 1];
|
||||
Indicator indicators[INDIC_MAX + 1];
|
||||
int lineHeight;
|
||||
unsigned int maxAscent;
|
||||
unsigned int maxDescent;
|
||||
unsigned int aveCharWidth;
|
||||
unsigned int spaceWidth;
|
||||
bool selforeset;
|
||||
ColourPair selforeground;
|
||||
bool selbackset;
|
||||
ColourPair selbackground;
|
||||
ColourPair selbackground2;
|
||||
ColourPair selbar;
|
||||
ColourPair selbarlight;
|
||||
// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
|
||||
int leftMarginWidth; // Spacing margin on left of text
|
||||
int rightMarginWidth; // Spacing margin on left of text
|
||||
enum { margins=3 };
|
||||
bool symbolMargin;
|
||||
int maskInLine; // Mask for markers to be put into text because there is nowhere for them to go in margin
|
||||
MarginStyle ms[margins];
|
||||
int fixedColumnWidth;
|
||||
int zoomLevel;
|
||||
WhiteSpaceVisibility viewWhitespace;
|
||||
bool viewIndentationGuides;
|
||||
bool viewEOL;
|
||||
bool showMarkedLines;
|
||||
ColourPair caretcolour;
|
||||
ColourPair edgecolour;
|
||||
int edgeState;
|
||||
|
||||
ViewStyle();
|
||||
ViewStyle(const ViewStyle &source);
|
||||
~ViewStyle();
|
||||
void Init();
|
||||
void RefreshColourPalette(Palette &pal, bool want);
|
||||
void Refresh(Surface &surface);
|
||||
void ResetDefaultStyle();
|
||||
void ClearStyles();
|
||||
void SetStyleFontName(int styleIndex, const char *name);
|
||||
};
|
||||
|
||||
#endif
|
||||
175
contrib/src/stc/scintilla/src/WindowAccessor.cxx
Normal file
175
contrib/src/stc/scintilla/src/WindowAccessor.cxx
Normal file
@@ -0,0 +1,175 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// Accessor.cxx - rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 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 "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "WindowAccessor.h"
|
||||
#include "Scintilla.h"
|
||||
|
||||
WindowAccessor::~WindowAccessor() {
|
||||
}
|
||||
|
||||
#if PLAT_WIN
|
||||
bool WindowAccessor::InternalIsLeadByte(char ch) {
|
||||
if (SC_CP_UTF8 == codePage)
|
||||
// For lexing, all characters >= 0x80 are treated the
|
||||
// same so none is considered a lead byte.
|
||||
return false;
|
||||
else
|
||||
return IsDBCSLeadByteEx(codePage, ch);
|
||||
}
|
||||
#else
|
||||
// PLAT_GTK or PLAT_WX
|
||||
// TODO: support DBCS under GTK+ and WX
|
||||
bool WindowAccessor::InternalIsLeadByte(char) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void WindowAccessor::Fill(int position) {
|
||||
if (lenDoc == -1)
|
||||
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
|
||||
startPos = position - slopSize;
|
||||
if (startPos + bufferSize > lenDoc)
|
||||
startPos = lenDoc - bufferSize;
|
||||
if (startPos < 0)
|
||||
startPos = 0;
|
||||
endPos = startPos + bufferSize;
|
||||
if (endPos > lenDoc)
|
||||
endPos = lenDoc;
|
||||
|
||||
TextRange tr = {{startPos, endPos}, buf};
|
||||
Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast<long>(&tr));
|
||||
}
|
||||
|
||||
char WindowAccessor::StyleAt(int position) {
|
||||
return static_cast<char>(Platform::SendScintilla(
|
||||
id, SCI_GETSTYLEAT, position, 0));
|
||||
}
|
||||
|
||||
int WindowAccessor::GetLine(int position) {
|
||||
return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0);
|
||||
}
|
||||
|
||||
int WindowAccessor::LineStart(int line) {
|
||||
return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0);
|
||||
}
|
||||
|
||||
int WindowAccessor::LevelAt(int line) {
|
||||
return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0);
|
||||
}
|
||||
|
||||
int WindowAccessor::Length() {
|
||||
if (lenDoc == -1)
|
||||
lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0);
|
||||
return lenDoc;
|
||||
}
|
||||
|
||||
int WindowAccessor::GetLineState(int line) {
|
||||
return Platform::SendScintilla(id, SCI_GETLINESTATE, line);
|
||||
}
|
||||
|
||||
int WindowAccessor::SetLineState(int line, int state) {
|
||||
return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state);
|
||||
}
|
||||
|
||||
void WindowAccessor::StartAt(unsigned int start, char chMask) {
|
||||
Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask);
|
||||
}
|
||||
|
||||
void WindowAccessor::StartSegment(unsigned int pos) {
|
||||
startSeg = pos;
|
||||
}
|
||||
|
||||
void WindowAccessor::ColourTo(unsigned int pos, int chAttr) {
|
||||
// Only perform styling if non empty range
|
||||
if (pos != startSeg - 1) {
|
||||
if (pos < startSeg) {
|
||||
Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos);
|
||||
}
|
||||
|
||||
if (validLen + (pos - startSeg + 1) >= bufferSize)
|
||||
Flush();
|
||||
if (validLen + (pos - startSeg + 1) >= bufferSize) {
|
||||
// Too big for buffer so send directly
|
||||
Platform::SendScintilla(id, SCI_SETSTYLING, pos - startSeg + 1, chAttr);
|
||||
} else {
|
||||
if (chAttr != chWhile)
|
||||
chFlags = 0;
|
||||
chAttr |= chFlags;
|
||||
for (unsigned int i = startSeg; i <= pos; i++) {
|
||||
styleBuf[validLen++] = static_cast<char>(chAttr);
|
||||
}
|
||||
}
|
||||
}
|
||||
startSeg = pos+1;
|
||||
}
|
||||
|
||||
void WindowAccessor::SetLevel(int line, int level) {
|
||||
Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level);
|
||||
}
|
||||
|
||||
void WindowAccessor::Flush() {
|
||||
startPos = extremePosition;
|
||||
lenDoc = -1;
|
||||
if (validLen > 0) {
|
||||
Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen,
|
||||
reinterpret_cast<long>(styleBuf));
|
||||
validLen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {
|
||||
int end = Length();
|
||||
int spaceFlags = 0;
|
||||
|
||||
// Determines the indentation level of the current line and also checks for consistent
|
||||
// indentation compared to the previous line.
|
||||
// Indentation is judged consistent when the indentation whitespace of each line lines
|
||||
// the same or the indentation of one line is a prefix of the other.
|
||||
|
||||
int pos = LineStart(line);
|
||||
char ch = (*this)[pos];
|
||||
int indent = 0;
|
||||
bool inPrevPrefix = line > 0;
|
||||
int posPrev = inPrevPrefix ? LineStart(line-1) : 0;
|
||||
while ((ch == ' ' || ch == '\t') && (pos < end)) {
|
||||
if (inPrevPrefix) {
|
||||
char chPrev = (*this)[posPrev++];
|
||||
if (chPrev == ' ' || chPrev == '\t') {
|
||||
if (chPrev != ch)
|
||||
spaceFlags |= wsInconsistent;
|
||||
} else {
|
||||
inPrevPrefix = false;
|
||||
}
|
||||
}
|
||||
if (ch == ' ') {
|
||||
spaceFlags |= wsSpace;
|
||||
indent++;
|
||||
} else { // Tab
|
||||
spaceFlags |= wsTab;
|
||||
if (spaceFlags & wsSpace)
|
||||
spaceFlags |= wsSpaceTab;
|
||||
indent = (indent / 8 + 1) * 8;
|
||||
}
|
||||
ch = (*this)[++pos];
|
||||
}
|
||||
|
||||
*flags = spaceFlags;
|
||||
indent += SC_FOLDLEVELBASE;
|
||||
// if completely empty line or the start of a comment...
|
||||
if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) )
|
||||
return indent | SC_FOLDLEVELWHITEFLAG;
|
||||
else
|
||||
return indent;
|
||||
}
|
||||
|
||||
1729
contrib/src/stc/stc.cpp
Normal file
1729
contrib/src/stc/stc.cpp
Normal file
File diff suppressed because it is too large
Load Diff
523
contrib/src/stc/stc.cpp.in
Normal file
523
contrib/src/stc/stc.cpp.in
Normal file
@@ -0,0 +1,523 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stc.cpp
|
||||
// Purpose: A wxWindows implementation of Scintilla. This class is the
|
||||
// one meant to be used directly by wx applications. It does not
|
||||
// derive directly from the Scintilla classes, but instead
|
||||
// delegates most things to the real Scintilla class.
|
||||
// This allows the use of Scintilla without polluting the
|
||||
// namespace with all the classes and identifiers from Scintilla.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "wx/stc/stc.h"
|
||||
#include "ScintillaWX.h"
|
||||
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
// The following code forces a reference to all of the Scintilla lexers.
|
||||
// If we don't do something like this, then the linker tends to "optimize"
|
||||
// them away. (eric@sourcegear.com)
|
||||
|
||||
int wxForceScintillaLexers(void)
|
||||
{
|
||||
extern LexerModule lmCPP;
|
||||
extern LexerModule lmHTML;
|
||||
extern LexerModule lmXML;
|
||||
extern LexerModule lmProps;
|
||||
extern LexerModule lmErrorList;
|
||||
extern LexerModule lmMake;
|
||||
extern LexerModule lmBatch;
|
||||
extern LexerModule lmPerl;
|
||||
extern LexerModule lmPython;
|
||||
extern LexerModule lmSQL;
|
||||
extern LexerModule lmVB;
|
||||
|
||||
if (
|
||||
&lmCPP
|
||||
&& &lmHTML
|
||||
&& &lmXML
|
||||
&& &lmProps
|
||||
&& &lmErrorList
|
||||
&& &lmMake
|
||||
&& &lmBatch
|
||||
&& &lmPerl
|
||||
&& &lmPython
|
||||
&& &lmSQL
|
||||
&& &lmVB
|
||||
)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const wxChar* wxSTCNameStr = "stcwindow";
|
||||
|
||||
BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
||||
EVT_PAINT (wxStyledTextCtrl::OnPaint)
|
||||
EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin)
|
||||
EVT_SIZE (wxStyledTextCtrl::OnSize)
|
||||
EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown)
|
||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
|
||||
EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus)
|
||||
EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged)
|
||||
EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground)
|
||||
EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu)
|
||||
EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Constructor and Destructor
|
||||
|
||||
wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name) :
|
||||
wxControl(parent, id, pos, size,
|
||||
style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
||||
wxDefaultValidator, name)
|
||||
{
|
||||
m_swx = new ScintillaWX(this);
|
||||
m_stopWatch.Start();
|
||||
}
|
||||
|
||||
|
||||
wxStyledTextCtrl::~wxStyledTextCtrl() {
|
||||
delete m_swx;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
|
||||
|
||||
return m_swx->WndProc(msg, wp, lp);
|
||||
}
|
||||
|
||||
|
||||
#ifdef MAKELONG
|
||||
#undef MAKELONG
|
||||
#endif
|
||||
|
||||
#define MAKELONG(a, b) ((a) | ((b) << 16))
|
||||
|
||||
|
||||
static long wxColourAsLong(const wxColour& co) {
|
||||
return (((long)co.Blue() << 16) |
|
||||
((long)co.Green() << 8) |
|
||||
((long)co.Red()));
|
||||
}
|
||||
|
||||
static wxColour wxColourFromLong(long c) {
|
||||
wxColour clr;
|
||||
clr.Set(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff);
|
||||
return clr;
|
||||
}
|
||||
|
||||
|
||||
static wxColour wxColourFromSpec(const wxString& spec) {
|
||||
// spec should be #RRGGBB
|
||||
char* junk;
|
||||
int red = strtol(spec.Mid(1,2), &junk, 16);
|
||||
int green = strtol(spec.Mid(3,2), &junk, 16);
|
||||
int blue = strtol(spec.Mid(5,2), &junk, 16);
|
||||
return wxColour(red, green, blue);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// BEGIN generated section. The following code is automatically generated
|
||||
// by gen_iface.py from the contents of Scintilla.iface. Do not edit
|
||||
// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate.
|
||||
|
||||
%(METHOD_IMPS)s
|
||||
|
||||
// END of generated section
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
// Returns the line number of the line with the caret.
|
||||
int wxStyledTextCtrl::GetCurrentLine() {
|
||||
int line = LineFromPosition(GetCurrentPos());
|
||||
return line;
|
||||
}
|
||||
|
||||
|
||||
// Extract style settings from a spec-string which is composed of one or
|
||||
// more of the following comma separated elements:
|
||||
//
|
||||
// bold turns on bold
|
||||
// italic turns on italics
|
||||
// fore:#RRGGBB sets the foreground colour
|
||||
// back:#RRGGBB sets the background colour
|
||||
// face:[facename] sets the font face name to use
|
||||
// size:[num] sets the font size in points
|
||||
// eol turns on eol filling
|
||||
// underline turns on underlining
|
||||
//
|
||||
void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) {
|
||||
|
||||
wxStringTokenizer tkz(spec, ",");
|
||||
while (tkz.HasMoreTokens()) {
|
||||
wxString token = tkz.GetNextToken();
|
||||
|
||||
wxString option = token.BeforeFirst(':');
|
||||
wxString val = token.AfterFirst(':');
|
||||
|
||||
if (option == "bold")
|
||||
StyleSetBold(styleNum, true);
|
||||
|
||||
else if (option == "italic")
|
||||
StyleSetItalic(styleNum, true);
|
||||
|
||||
else if (option == "underline")
|
||||
StyleSetUnderline(styleNum, true);
|
||||
|
||||
else if (option == "eol")
|
||||
StyleSetEOLFilled(styleNum, true);
|
||||
|
||||
else if (option == "size") {
|
||||
long points;
|
||||
if (val.ToLong(&points))
|
||||
StyleSetSize(styleNum, points);
|
||||
}
|
||||
|
||||
else if (option == "face")
|
||||
StyleSetFaceName(styleNum, val);
|
||||
|
||||
else if (option == "fore")
|
||||
StyleSetForeground(styleNum, wxColourFromSpec(val));
|
||||
|
||||
else if (option == "back")
|
||||
StyleSetBackground(styleNum, wxColourFromSpec(val));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set style size, face, bold, italic, and underline attributes from
|
||||
// a wxFont's attributes.
|
||||
void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
|
||||
int size = font.GetPointSize();
|
||||
wxString faceName = font.GetFaceName();
|
||||
bool bold = font.GetWeight() == wxBOLD;
|
||||
bool italic = font.GetStyle() != wxNORMAL;
|
||||
bool under = font.GetUnderlined();
|
||||
|
||||
// TODO: add encoding/charset mapping
|
||||
StyleSetFontAttr(styleNum, size, faceName, bold, italic, under);
|
||||
}
|
||||
|
||||
// Set all font style attributes at once.
|
||||
void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size,
|
||||
const wxString& faceName,
|
||||
bool bold, bool italic,
|
||||
bool underline) {
|
||||
StyleSetSize(styleNum, size);
|
||||
StyleSetFaceName(styleNum, faceName);
|
||||
StyleSetBold(styleNum, bold);
|
||||
StyleSetItalic(styleNum, italic);
|
||||
StyleSetUnderline(styleNum, underline);
|
||||
|
||||
// TODO: add encoding/charset mapping
|
||||
}
|
||||
|
||||
|
||||
// Perform one of the operations defined by the wxSTC_CMD_* constants.
|
||||
void wxStyledTextCtrl::CmdKeyExecute(int cmd) {
|
||||
SendMsg(cmd);
|
||||
}
|
||||
|
||||
|
||||
// Set the left and right margin in the edit area, measured in pixels.
|
||||
void wxStyledTextCtrl::SetMargins(int left, int right) {
|
||||
SetMarginLeft(left);
|
||||
SetMarginRight(right);
|
||||
}
|
||||
|
||||
|
||||
// Retrieve the start and end positions of the current selection.
|
||||
void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) {
|
||||
if (startPos != NULL)
|
||||
*startPos = SendMsg(SCI_GETSELECTIONSTART);
|
||||
if (endPos != NULL)
|
||||
*endPos = SendMsg(SCI_GETSELECTIONEND);
|
||||
}
|
||||
|
||||
|
||||
// Retrieve the point in the window where a position is displayed.
|
||||
wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
|
||||
int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos);
|
||||
int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos);
|
||||
return wxPoint(x, y);
|
||||
}
|
||||
|
||||
// Scroll enough to make the given line visible
|
||||
void wxStyledTextCtrl::ScrollToLine(int line) {
|
||||
m_swx->DoScrollToLine(line);
|
||||
}
|
||||
|
||||
|
||||
// Scroll enough to make the given column visible
|
||||
void wxStyledTextCtrl::ScrollToColumn(int column) {
|
||||
m_swx->DoScrollToColumn(column);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event handlers
|
||||
|
||||
void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) {
|
||||
wxPaintDC dc(this);
|
||||
wxRegion region = GetUpdateRegion();
|
||||
|
||||
m_swx->DoPaint(&dc, region.GetBox());
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) {
|
||||
if (evt.GetOrientation() == wxHORIZONTAL)
|
||||
m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition());
|
||||
else
|
||||
m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition());
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
|
||||
wxSize sz = GetClientSize();
|
||||
m_swx->DoSize(sz.x, sz.y);
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoButtonMove(Point(pt.x, pt.y));
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||
evt.ControlDown());
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
if ((key > WXK_ESCAPE) &&
|
||||
(key != WXK_DELETE) && (key < 255) &&
|
||||
!evt.ControlDown() && !evt.AltDown()) {
|
||||
|
||||
m_swx->DoAddChar(key);
|
||||
}
|
||||
else {
|
||||
evt.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
key = toupper(key);
|
||||
int processed = m_swx->DoKeyDown(key, evt.ShiftDown(),
|
||||
evt.ControlDown(), evt.AltDown());
|
||||
if (! processed)
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
|
||||
m_swx->DoLoseFocus();
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
|
||||
m_swx->DoGainFocus();
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) {
|
||||
m_swx->DoSysColourChange();
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) {
|
||||
// do nothing to help avoid flashing
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) {
|
||||
m_swx->DoCommand(evt.GetId());
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) {
|
||||
m_swx->DoOnListBox();
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Turn notifications from Scintilla into events
|
||||
|
||||
|
||||
void wxStyledTextCtrl::NotifyChange() {
|
||||
wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId());
|
||||
GetEventHandler()->ProcessEvent(evt);
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
|
||||
SCNotification& scn = *_scn;
|
||||
int eventType = 0;
|
||||
switch (scn.nmhdr.code) {
|
||||
case SCN_STYLENEEDED:
|
||||
eventType = wxEVT_STC_STYLENEEDED;
|
||||
break;
|
||||
case SCN_CHARADDED:
|
||||
eventType = wxEVT_STC_CHARADDED;
|
||||
break;
|
||||
case SCN_UPDATEUI:
|
||||
eventType = wxEVT_STC_UPDATEUI;
|
||||
break;
|
||||
case SCN_SAVEPOINTREACHED:
|
||||
eventType = wxEVT_STC_SAVEPOINTREACHED;
|
||||
break;
|
||||
case SCN_SAVEPOINTLEFT:
|
||||
eventType = wxEVT_STC_SAVEPOINTLEFT;
|
||||
break;
|
||||
case SCN_MODIFYATTEMPTRO:
|
||||
eventType = wxEVT_STC_ROMODIFYATTEMPT;
|
||||
break;
|
||||
case SCN_DOUBLECLICK:
|
||||
eventType = wxEVT_STC_DOUBLECLICK;
|
||||
break;
|
||||
case SCN_MODIFIED:
|
||||
eventType = wxEVT_STC_MODIFIED;
|
||||
break;
|
||||
case SCN_KEY:
|
||||
eventType = wxEVT_STC_KEY;
|
||||
break;
|
||||
case SCN_MACRORECORD:
|
||||
eventType = wxEVT_STC_MACRORECORD;
|
||||
break;
|
||||
case SCN_MARGINCLICK:
|
||||
eventType = wxEVT_STC_MARGINCLICK;
|
||||
break;
|
||||
case SCN_NEEDSHOWN:
|
||||
eventType = wxEVT_STC_NEEDSHOWN;
|
||||
break;
|
||||
case SCN_POSCHANGED:
|
||||
eventType = wxEVT_STC_POSCHANGED;
|
||||
break;
|
||||
}
|
||||
if (eventType) {
|
||||
wxStyledTextEvent evt(eventType, GetId());
|
||||
evt.SetPosition(scn.position);
|
||||
evt.SetKey(scn.ch);
|
||||
evt.SetModifiers(scn.modifiers);
|
||||
if (eventType == wxEVT_STC_MODIFIED) {
|
||||
evt.SetModificationType(scn.modificationType);
|
||||
if (scn.text)
|
||||
evt.SetText(wxString(scn.text, scn.length));
|
||||
evt.SetLength(scn.length);
|
||||
evt.SetLinesAdded(scn.linesAdded);
|
||||
evt.SetLine(scn.line);
|
||||
evt.SetFoldLevelNow(scn.foldLevelNow);
|
||||
evt.SetFoldLevelPrev(scn.foldLevelPrev);
|
||||
}
|
||||
if (eventType == wxEVT_STC_MARGINCLICK)
|
||||
evt.SetMargin(scn.margin);
|
||||
if (eventType == wxEVT_STC_MACRORECORD) {
|
||||
evt.SetMessage(scn.message);
|
||||
evt.SetWParam(scn.wParam);
|
||||
evt.SetLParam(scn.lParam);
|
||||
}
|
||||
|
||||
GetEventHandler()->ProcessEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id)
|
||||
: wxCommandEvent(commandType, id)
|
||||
{
|
||||
m_position = 0;
|
||||
m_key = 0;
|
||||
m_modifiers = 0;
|
||||
m_modificationType = 0;
|
||||
m_length = 0;
|
||||
m_linesAdded = 0;
|
||||
m_line = 0;
|
||||
m_foldLevelNow = 0;
|
||||
m_foldLevelPrev = 0;
|
||||
m_margin = 0;
|
||||
m_message = 0;
|
||||
m_wParam = 0;
|
||||
m_lParam = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; }
|
||||
bool wxStyledTextEvent::GetControl() const { return (m_modifiers & SCI_CTRL) != 0; }
|
||||
bool wxStyledTextEvent::GetAlt() const { return (m_modifiers & SCI_ALT) != 0; }
|
||||
|
||||
void wxStyledTextEvent::CopyObject(wxObject& obj) const {
|
||||
wxCommandEvent::CopyObject(obj);
|
||||
|
||||
wxStyledTextEvent* o = (wxStyledTextEvent*)&obj;
|
||||
o->m_position = m_position;
|
||||
o->m_key = m_key;
|
||||
o->m_modifiers = m_modifiers;
|
||||
o->m_modificationType = m_modificationType;
|
||||
o->m_text = m_text;
|
||||
o->m_length = m_length;
|
||||
o->m_linesAdded = m_linesAdded;
|
||||
o->m_line = m_line;
|
||||
o->m_foldLevelNow = m_foldLevelNow;
|
||||
o->m_foldLevelPrev = m_foldLevelPrev;
|
||||
|
||||
o->m_margin = m_margin;
|
||||
|
||||
o->m_message = m_message;
|
||||
o->m_wParam = m_wParam;
|
||||
o->m_lParam = m_lParam;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
297
contrib/src/stc/stc.h.in
Normal file
297
contrib/src/stc/stc.h.in
Normal file
@@ -0,0 +1,297 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stc.h
|
||||
// Purpose: A wxWindows implementation of Scintilla. This class is the
|
||||
// one meant to be used directly by wx applications. It does not
|
||||
// derive directly from the Scintilla classes, and in fact there
|
||||
// is no mention of Scintilla classes at all in this header.
|
||||
// This class delegates all method calls and events to the
|
||||
// Scintilla objects and so forth. This allows the use of
|
||||
// Scintilla without polluting the namespace with all the
|
||||
// classes and itentifiers from Scintilla.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __stc_h__
|
||||
#define __stc_h__
|
||||
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// BEGIN generated section. The following code is automatically generated
|
||||
// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
|
||||
// and regenerate
|
||||
|
||||
%(VALUES)s
|
||||
|
||||
// END of generated section
|
||||
//----------------------------------------------------------------------
|
||||
// Others
|
||||
|
||||
#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class ScintillaWX; // forward declare
|
||||
class WordList;
|
||||
struct SCNotification;
|
||||
|
||||
|
||||
extern const wxChar* wxSTCNameStr;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStyledTextCtrl : public wxControl {
|
||||
public:
|
||||
|
||||
#ifdef SWIG
|
||||
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const char* name = "styledtext");
|
||||
#else
|
||||
wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = wxSTCNameStr);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SWIG
|
||||
~wxStyledTextCtrl();
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// BEGIN generated section. The following code is automatically generated
|
||||
// by gen_iface.py. Do not edit this file. Edit stc.h.in instead
|
||||
// and regenerate
|
||||
|
||||
%(METHOD_DEFS)s
|
||||
|
||||
// END of generated section
|
||||
//----------------------------------------------------------------------
|
||||
// Others...
|
||||
|
||||
|
||||
// Returns the line number of the line with the caret.
|
||||
int GetCurrentLine();
|
||||
|
||||
// Extract style settings from a spec-string which is composed of one or
|
||||
// more of the following comma separated elements:
|
||||
//
|
||||
// bold turns on bold
|
||||
// italic turns on italics
|
||||
// fore:#RRGGBB sets the foreground colour
|
||||
// back:#RRGGBB sets the background colour
|
||||
// face:[facename] sets the font face name to use
|
||||
// size:[num] sets the font size in points
|
||||
// eol turns on eol filling
|
||||
// underline turns on underlining
|
||||
//
|
||||
void StyleSetSpec(int styleNum, const wxString& spec);
|
||||
|
||||
|
||||
|
||||
// Set style size, face, bold, italic, and underline attributes from
|
||||
// a wxFont's attributes.
|
||||
void StyleSetFont(int styleNum, wxFont& font);
|
||||
|
||||
|
||||
|
||||
// Set all font style attributes at once.
|
||||
void StyleSetFontAttr(int styleNum, int size,
|
||||
const wxString& faceName,
|
||||
bool bold, bool italic,
|
||||
bool underline);
|
||||
|
||||
|
||||
|
||||
// Perform one of the operations defined by the wxSTC_CMD_* constants.
|
||||
void CmdKeyExecute(int cmd);
|
||||
|
||||
|
||||
|
||||
// Set the left and right margin in the edit area, measured in pixels.
|
||||
void SetMargins(int left, int right);
|
||||
|
||||
|
||||
// Retrieve the start and end positions of the current selection.
|
||||
#ifdef SWIG
|
||||
void GetSelection(int* OUTPUT, int* OUTPUT);
|
||||
#else
|
||||
void GetSelection(int* startPos, int* endPos);
|
||||
#endif
|
||||
|
||||
// Retrieve the point in the window where a position is displayed.
|
||||
wxPoint PointFromPosition(int pos);
|
||||
|
||||
|
||||
// Scroll enough to make the given line visible
|
||||
void ScrollToLine(int line);
|
||||
|
||||
|
||||
// Scroll enough to make the given column visible
|
||||
void ScrollToColumn(int column);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef SWIG
|
||||
private:
|
||||
// Event handlers
|
||||
void OnPaint(wxPaintEvent& evt);
|
||||
void OnScrollWin(wxScrollWinEvent& evt);
|
||||
void OnSize(wxSizeEvent& evt);
|
||||
void OnMouseLeftDown(wxMouseEvent& evt);
|
||||
void OnMouseMove(wxMouseEvent& evt);
|
||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||
void OnMouseRightUp(wxMouseEvent& evt);
|
||||
void OnChar(wxKeyEvent& evt);
|
||||
void OnKeyDown(wxKeyEvent& evt);
|
||||
void OnLoseFocus(wxFocusEvent& evt);
|
||||
void OnGainFocus(wxFocusEvent& evt);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& evt);
|
||||
void OnEraseBackground(wxEraseEvent& evt);
|
||||
void OnMenu(wxCommandEvent& evt);
|
||||
void OnListBox(wxCommandEvent& evt);
|
||||
|
||||
|
||||
// Turn notifications from Scintilla into events
|
||||
void NotifyChange();
|
||||
void NotifyParent(SCNotification* scn);
|
||||
|
||||
long SendMsg(int msg, long wp=0, long lp=0);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_CLASS(wxStyledTextCtrl)
|
||||
|
||||
ScintillaWX* m_swx;
|
||||
wxStopWatch m_stopWatch;
|
||||
|
||||
|
||||
friend class ScintillaWX;
|
||||
friend class Platform;
|
||||
#endif
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStyledTextEvent : public wxCommandEvent {
|
||||
public:
|
||||
wxStyledTextEvent(wxEventType commandType=0, int id=0);
|
||||
~wxStyledTextEvent() {}
|
||||
|
||||
void SetPosition(int pos) { m_position = pos; }
|
||||
void SetKey(int k) { m_key = k; }
|
||||
void SetModifiers(int m) { m_modifiers = m; }
|
||||
void SetModificationType(int t) { m_modificationType = t; }
|
||||
void SetText(const char* t) { m_text = t; }
|
||||
void SetLength(int len) { m_length = len; }
|
||||
void SetLinesAdded(int num) { m_linesAdded = num; }
|
||||
void SetLine(int val) { m_line = val; }
|
||||
void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
|
||||
void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
|
||||
void SetMargin(int val) { m_margin = val; }
|
||||
void SetMessage(int val) { m_message = val; }
|
||||
void SetWParam(int val) { m_wParam = val; }
|
||||
void SetLParam(int val) { m_lParam = val; }
|
||||
|
||||
int GetPosition() const { return m_position; }
|
||||
int GetKey() const { return m_key; }
|
||||
int GetModifiers() const { return m_modifiers; }
|
||||
int GetModificationType() const { return m_modificationType; }
|
||||
wxString GetText() const { return m_text; }
|
||||
int GetLength() const { return m_length; }
|
||||
int GetLinesAdded() const { return m_linesAdded; }
|
||||
int GetLine() const { return m_line; }
|
||||
int GetFoldLevelNow() const { return m_foldLevelNow; }
|
||||
int GetFoldLevelPrev() const { return m_foldLevelPrev; }
|
||||
int GetMargin() const { return m_margin; }
|
||||
int GetMessage() const { return m_message; }
|
||||
int GetWParam() const { return m_wParam; }
|
||||
int GetLParam() const { return m_lParam; }
|
||||
|
||||
bool GetShift() const;
|
||||
bool GetControl() const;
|
||||
bool GetAlt() const;
|
||||
|
||||
void CopyObject(wxObject& obj) const;
|
||||
|
||||
#ifndef SWIG
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
|
||||
|
||||
int m_position;
|
||||
int m_key;
|
||||
int m_modifiers;
|
||||
|
||||
int m_modificationType; // wxEVT_STC_MODIFIED
|
||||
wxString m_text;
|
||||
int m_length;
|
||||
int m_linesAdded;
|
||||
int m_line;
|
||||
int m_foldLevelNow;
|
||||
int m_foldLevelPrev;
|
||||
|
||||
int m_margin; // wxEVT_STC_MARGINCLICK
|
||||
|
||||
int m_message; // wxEVT_STC_MACRORECORD
|
||||
int m_wParam;
|
||||
int m_lParam;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
// Event types
|
||||
enum {
|
||||
wxEVT_STC_CHANGE = 1650,
|
||||
wxEVT_STC_STYLENEEDED,
|
||||
wxEVT_STC_CHARADDED,
|
||||
wxEVT_STC_UPDATEUI,
|
||||
wxEVT_STC_SAVEPOINTREACHED,
|
||||
wxEVT_STC_SAVEPOINTLEFT,
|
||||
wxEVT_STC_ROMODIFYATTEMPT,
|
||||
wxEVT_STC_DOUBLECLICK,
|
||||
wxEVT_STC_MODIFIED,
|
||||
wxEVT_STC_KEY,
|
||||
wxEVT_STC_MACRORECORD,
|
||||
wxEVT_STC_MARGINCLICK,
|
||||
wxEVT_STC_NEEDSHOWN,
|
||||
wxEVT_STC_POSCHANGED
|
||||
};
|
||||
|
||||
|
||||
#ifndef SWIG
|
||||
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
||||
|
||||
#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
|
||||
1396
include/wx/stc/stc.h
Normal file
1396
include/wx/stc/stc.h
Normal file
File diff suppressed because it is too large
Load Diff
56
src/stc/Makefile.in
Normal file
56
src/stc/Makefile.in
Normal file
@@ -0,0 +1,56 @@
|
||||
###############################################################################
|
||||
# Purpose: Makefile.in for STC contrib for Unix with autoconf
|
||||
# Created: 14.03.00
|
||||
# Author: VZ
|
||||
# Version: $Id$
|
||||
###############################################################################
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
|
||||
scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla
|
||||
libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src
|
||||
|
||||
TARGET_LIBNAME=libstc
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||
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 \
|
||||
Editor.o \
|
||||
Indicator.o \
|
||||
KeyMap.o \
|
||||
KeyWords.o \
|
||||
LineMarker.o \
|
||||
PropSet.o \
|
||||
ScintillaBase.o \
|
||||
Style.o \
|
||||
ViewStyle.o \
|
||||
PosRegExp.o \
|
||||
|
||||
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
712
src/stc/PlatWX.cpp
Normal file
712
src/stc/PlatWX.cpp
Normal file
@@ -0,0 +1,712 @@
|
||||
// Scintilla source code edit control
|
||||
// PlatWX.cxx - implementation of platform facilities on wxWindows
|
||||
// Copyright 1998-1999 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Robin Dunn <robin@aldunn.com>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
#include "wx/stc/stc.h"
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
Point Point::FromLong(long lpoint) {
|
||||
return Point(lpoint & 0xFFFF, lpoint >> 16);
|
||||
}
|
||||
|
||||
wxRect wxRectFromPRectangle(PRectangle prc) {
|
||||
wxRect rc(prc.left, prc.top,
|
||||
prc.right-prc.left, prc.bottom-prc.top);
|
||||
return rc;
|
||||
}
|
||||
|
||||
PRectangle PRectangleFromwxRect(wxRect rc) {
|
||||
return PRectangle(rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom());
|
||||
}
|
||||
|
||||
Colour::Colour(long lcol) {
|
||||
co.Set(lcol & 0xff, (lcol >> 8) & 0xff, (lcol >> 16) & 0xff);
|
||||
}
|
||||
|
||||
Colour::Colour(unsigned int red, unsigned int green, unsigned int blue) {
|
||||
co.Set(red, green, blue);
|
||||
}
|
||||
|
||||
bool Colour::operator==(const Colour &other) const {
|
||||
return co == other.co;
|
||||
}
|
||||
|
||||
long Colour::AsLong() const {
|
||||
return (((long)co.Blue() << 16) |
|
||||
((long)co.Green() << 8) |
|
||||
((long)co.Red()));
|
||||
}
|
||||
|
||||
unsigned int Colour::GetRed() {
|
||||
return co.Red();
|
||||
}
|
||||
|
||||
unsigned int Colour::GetGreen() {
|
||||
return co.Green();
|
||||
}
|
||||
|
||||
unsigned int Colour::GetBlue() {
|
||||
return co.Blue();
|
||||
}
|
||||
|
||||
Palette::Palette() {
|
||||
used = 0;
|
||||
allowRealization = false;
|
||||
}
|
||||
|
||||
Palette::~Palette() {
|
||||
Release();
|
||||
}
|
||||
|
||||
void Palette::Release() {
|
||||
used = 0;
|
||||
}
|
||||
|
||||
// This method either adds a colour to the list of wanted colours (want==true)
|
||||
// or retrieves the allocated colour back to the ColourPair.
|
||||
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
|
||||
void Palette::WantFind(ColourPair &cp, bool want) {
|
||||
if (want) {
|
||||
for (int i=0; i < used; i++) {
|
||||
if (entries[i].desired == cp.desired)
|
||||
return;
|
||||
}
|
||||
|
||||
if (used < numEntries) {
|
||||
entries[used].desired = cp.desired;
|
||||
entries[used].allocated = cp.desired;
|
||||
used++;
|
||||
}
|
||||
} else {
|
||||
for (int i=0; i < used; i++) {
|
||||
if (entries[i].desired == cp.desired) {
|
||||
cp.allocated = entries[i].allocated;
|
||||
return;
|
||||
}
|
||||
}
|
||||
cp.allocated = cp.desired;
|
||||
}
|
||||
}
|
||||
|
||||
void Palette::Allocate(Window &) {
|
||||
if (allowRealization) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Font::Font() {
|
||||
id = 0;
|
||||
ascent = 0;
|
||||
}
|
||||
|
||||
Font::~Font() {
|
||||
}
|
||||
|
||||
void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) {
|
||||
Release();
|
||||
id = new wxFont(size,
|
||||
wxDEFAULT,
|
||||
italic ? wxITALIC : wxNORMAL,
|
||||
bold ? wxBOLD : wxNORMAL,
|
||||
false,
|
||||
faceName,
|
||||
wxFONTENCODING_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
void Font::Release() {
|
||||
if (id)
|
||||
delete id;
|
||||
id = 0;
|
||||
}
|
||||
|
||||
|
||||
Surface::Surface() :
|
||||
hdc(0), hdcOwned(0), bitmap(0),
|
||||
x(0), y(0) {
|
||||
}
|
||||
|
||||
Surface::~Surface() {
|
||||
Release();
|
||||
}
|
||||
|
||||
void Surface::Release() {
|
||||
if (bitmap) {
|
||||
((wxMemoryDC*)hdc)->SelectObject(wxNullBitmap);
|
||||
delete bitmap;
|
||||
bitmap = 0;
|
||||
}
|
||||
if (hdcOwned) {
|
||||
delete hdc;
|
||||
hdc = 0;
|
||||
hdcOwned = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Surface::Initialised() {
|
||||
return hdc != 0;
|
||||
}
|
||||
|
||||
void Surface::Init() {
|
||||
Release();
|
||||
hdc = new wxMemoryDC();
|
||||
hdcOwned = true;
|
||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||
}
|
||||
|
||||
void Surface::Init(SurfaceID hdc_) {
|
||||
Release();
|
||||
hdc = hdc_;
|
||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||
}
|
||||
|
||||
void Surface::InitPixMap(int width, int height, Surface *surface_) {
|
||||
Release();
|
||||
hdc = new wxMemoryDC(surface_->hdc);
|
||||
hdcOwned = true;
|
||||
bitmap = new wxBitmap(width, height);
|
||||
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
||||
// **** ::SetTextAlign(hdc, TA_BASELINE);
|
||||
}
|
||||
|
||||
void Surface::PenColour(Colour fore) {
|
||||
hdc->SetPen(wxPen(fore.co, 1, wxSOLID));
|
||||
}
|
||||
|
||||
void Surface::BrushColor(Colour back) {
|
||||
hdc->SetBrush(wxBrush(back.co, wxSOLID));
|
||||
}
|
||||
|
||||
void Surface::SetFont(Font &font_) {
|
||||
if (font_.GetID()) {
|
||||
hdc->SetFont(*font_.GetID());
|
||||
}
|
||||
}
|
||||
|
||||
int Surface::LogPixelsY() {
|
||||
return hdc->GetPPI().y;
|
||||
}
|
||||
|
||||
|
||||
int Surface::DeviceHeightFont(int points) {
|
||||
return points * LogPixelsY() / 72;
|
||||
}
|
||||
|
||||
|
||||
void Surface::MoveTo(int x_, int y_) {
|
||||
x = x_;
|
||||
y = y_;
|
||||
}
|
||||
|
||||
void Surface::LineTo(int x_, int y_) {
|
||||
hdc->DrawLine(x,y, x_,y_);
|
||||
x = x_;
|
||||
y = y_;
|
||||
}
|
||||
|
||||
void Surface::Polygon(Point *pts, int npts, Colour fore,
|
||||
Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawPolygon(npts, (wxPoint*)pts);
|
||||
}
|
||||
|
||||
void Surface::RectangleDraw(PRectangle rc, Colour fore, Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawRectangle(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::FillRectangle(PRectangle rc, Colour back) {
|
||||
BrushColor(back);
|
||||
hdc->SetPen(*wxTRANSPARENT_PEN);
|
||||
hdc->DrawRectangle(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::FillRectangle(PRectangle rc, Surface &surfacePattern) {
|
||||
wxBrush br;
|
||||
if (surfacePattern.bitmap)
|
||||
br = wxBrush(*surfacePattern.bitmap);
|
||||
else // Something is wrong so display in red
|
||||
br = wxBrush(*wxRED, wxSOLID);
|
||||
hdc->SetPen(*wxTRANSPARENT_PEN);
|
||||
hdc->SetBrush(br);
|
||||
hdc->DrawRectangle(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4);
|
||||
}
|
||||
|
||||
void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) {
|
||||
PenColour(fore);
|
||||
BrushColor(back);
|
||||
hdc->DrawEllipse(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) {
|
||||
wxRect r = wxRectFromPRectangle(rc);
|
||||
hdc->Blit(r.x, r.y, r.width, r.height,
|
||||
surfaceSource.hdc, from.x, from.y, wxCOPY);
|
||||
}
|
||||
|
||||
void Surface::DrawText(PRectangle rc, Font &font, int ybase,
|
||||
const char *s, int len, Colour fore, Colour back) {
|
||||
SetFont(font);
|
||||
hdc->SetTextForeground(fore.co);
|
||||
hdc->SetTextBackground(back.co);
|
||||
FillRectangle(rc, back);
|
||||
|
||||
// ybase is where the baseline should be, but wxWin uses the upper left
|
||||
// corner, so I need to calculate the real position for the text...
|
||||
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
|
||||
}
|
||||
|
||||
void Surface::DrawTextClipped(PRectangle rc, Font &font, int ybase, const char *s, int len, Colour fore, Colour back) {
|
||||
SetFont(font);
|
||||
hdc->SetTextForeground(fore.co);
|
||||
hdc->SetTextBackground(back.co);
|
||||
FillRectangle(rc, back);
|
||||
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
|
||||
|
||||
// see comments above
|
||||
hdc->DrawText(wxString(s, len), rc.left, ybase - font.ascent);
|
||||
hdc->DestroyClippingRegion();
|
||||
}
|
||||
|
||||
int Surface::WidthText(Font &font, const char *s, int len) {
|
||||
SetFont(font);
|
||||
int w;
|
||||
int h;
|
||||
hdc->GetTextExtent(wxString(s, len), &w, &h);
|
||||
return w;
|
||||
}
|
||||
|
||||
void Surface::MeasureWidths(Font &font, const char *s, int len, int *positions) {
|
||||
SetFont(font);
|
||||
int totalWidth = 0;
|
||||
for (int i=0; i<len; i++) {
|
||||
int w;
|
||||
int h;
|
||||
hdc->GetTextExtent(s[i], &w, &h);
|
||||
totalWidth += w;
|
||||
positions[i] = totalWidth;
|
||||
}
|
||||
}
|
||||
|
||||
int Surface::WidthChar(Font &font, char ch) {
|
||||
SetFont(font);
|
||||
int w;
|
||||
int h;
|
||||
hdc->GetTextExtent(ch, &w, &h);
|
||||
return w;
|
||||
}
|
||||
|
||||
#define EXTENT_TEST " `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
int Surface::Ascent(Font &font) {
|
||||
SetFont(font);
|
||||
int w, h, d, e;
|
||||
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
|
||||
font.ascent = h - d;
|
||||
return font.ascent;
|
||||
}
|
||||
|
||||
int Surface::Descent(Font &font) {
|
||||
SetFont(font);
|
||||
int w, h, d, e;
|
||||
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
|
||||
return d;
|
||||
}
|
||||
|
||||
int Surface::InternalLeading(Font &font) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Surface::ExternalLeading(Font &font) {
|
||||
SetFont(font);
|
||||
int w, h, d, e;
|
||||
hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e);
|
||||
return e;
|
||||
}
|
||||
|
||||
int Surface::Height(Font &font) {
|
||||
SetFont(font);
|
||||
return hdc->GetCharHeight();
|
||||
}
|
||||
|
||||
int Surface::AverageCharWidth(Font &font) {
|
||||
SetFont(font);
|
||||
return hdc->GetCharWidth();
|
||||
}
|
||||
|
||||
int Surface::SetPalette(Palette *pal, bool inBackGround) {
|
||||
return 0; // **** figure out what to do with palettes...
|
||||
}
|
||||
|
||||
void Surface::SetClip(PRectangle rc) {
|
||||
hdc->SetClippingRegion(wxRectFromPRectangle(rc));
|
||||
}
|
||||
|
||||
void Surface::FlushCachedState() {
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
}
|
||||
|
||||
void Window::Destroy() {
|
||||
if (id)
|
||||
id->Destroy();
|
||||
id = 0;
|
||||
}
|
||||
|
||||
bool Window::HasFocus() {
|
||||
return wxWindow::FindFocus() == id;
|
||||
}
|
||||
|
||||
PRectangle Window::GetPosition() {
|
||||
wxRect rc(id->GetPosition(), id->GetSize());
|
||||
return PRectangleFromwxRect(rc);
|
||||
}
|
||||
|
||||
void Window::SetPosition(PRectangle rc) {
|
||||
wxRect r = wxRectFromPRectangle(rc);
|
||||
id->SetSize(r);
|
||||
}
|
||||
|
||||
void Window::SetPositionRelative(PRectangle rc, Window) {
|
||||
SetPosition(rc); // ????
|
||||
}
|
||||
|
||||
PRectangle Window::GetClientPosition() {
|
||||
wxSize sz = id->GetClientSize();
|
||||
return PRectangle(0, 0, sz.x, sz.y);
|
||||
}
|
||||
|
||||
void Window::Show(bool show) {
|
||||
id->Show(show);
|
||||
}
|
||||
|
||||
void Window::InvalidateAll() {
|
||||
id->Refresh(false);
|
||||
}
|
||||
|
||||
void Window::InvalidateRectangle(PRectangle rc) {
|
||||
wxRect r = wxRectFromPRectangle(rc);
|
||||
id->Refresh(false, &r);
|
||||
}
|
||||
|
||||
void Window::SetFont(Font &font) {
|
||||
id->SetFont(*font.GetID());
|
||||
}
|
||||
|
||||
void Window::SetCursor(Cursor curs) {
|
||||
int cursorId;
|
||||
|
||||
switch (curs) {
|
||||
case cursorText:
|
||||
cursorId = wxCURSOR_IBEAM;
|
||||
break;
|
||||
case cursorArrow:
|
||||
cursorId = wxCURSOR_ARROW;
|
||||
break;
|
||||
case cursorUp:
|
||||
cursorId = wxCURSOR_ARROW; // ** no up arrow... wxCURSOR_UPARROW;
|
||||
break;
|
||||
case cursorWait:
|
||||
cursorId = wxCURSOR_WAIT;
|
||||
break;
|
||||
case cursorHoriz:
|
||||
cursorId = wxCURSOR_SIZEWE;
|
||||
break;
|
||||
case cursorVert:
|
||||
cursorId = wxCURSOR_SIZENS;
|
||||
break;
|
||||
case cursorReverseArrow:
|
||||
cursorId = wxCURSOR_POINT_RIGHT;
|
||||
break;
|
||||
default:
|
||||
cursorId = wxCURSOR_ARROW;
|
||||
break;
|
||||
}
|
||||
|
||||
id->SetCursor(wxCursor(cursorId));
|
||||
}
|
||||
|
||||
|
||||
void Window::SetTitle(const char *s) {
|
||||
id->SetTitle(s);
|
||||
}
|
||||
|
||||
|
||||
class wxSTCListBox : public wxListBox {
|
||||
public:
|
||||
wxSTCListBox(wxWindow* parent, wxWindowID id)
|
||||
: wxListBox(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER)
|
||||
{}
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
GetParent()->SetFocus();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
void DoSetFirstItem(int n);
|
||||
#endif
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox)
|
||||
EVT_SET_FOCUS(wxSTCListBox::OnFocus)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
// This can be removed after 2.2.2 I think
|
||||
void wxSTCListBox::DoSetFirstItem( int n )
|
||||
{
|
||||
wxCHECK_RET( m_list, wxT("invalid listbox") );
|
||||
|
||||
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list))
|
||||
return;
|
||||
|
||||
// terribly efficient
|
||||
const gchar *vadjustment_key = "gtk-vadjustment";
|
||||
guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key);
|
||||
|
||||
GtkAdjustment *adjustment =
|
||||
(GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id);
|
||||
wxCHECK_RET( adjustment, wxT("invalid listbox code") );
|
||||
|
||||
GList *target = g_list_nth( m_list->children, n );
|
||||
wxCHECK_RET( target, wxT("invalid listbox index") );
|
||||
|
||||
GtkWidget *item = GTK_WIDGET(target->data);
|
||||
wxCHECK_RET( item, wxT("invalid listbox code") );
|
||||
|
||||
// find the last item before this one which is already realized
|
||||
size_t nItemsBefore;
|
||||
for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ )
|
||||
{
|
||||
target = target->prev;
|
||||
if ( !target )
|
||||
{
|
||||
// nothing we can do if there are no allocated items yet
|
||||
return;
|
||||
}
|
||||
|
||||
item = GTK_WIDGET(target->data);
|
||||
}
|
||||
|
||||
gtk_adjustment_set_value(adjustment,
|
||||
item->allocation.y +
|
||||
nItemsBefore*item->allocation.height);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ListBox::ListBox() {
|
||||
}
|
||||
|
||||
ListBox::~ListBox() {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
PRectangle ListBox::GetDesiredRect() {
|
||||
wxSize sz = ((wxListBox*)id)->GetBestSize();
|
||||
PRectangle rc;
|
||||
rc.top = 0;
|
||||
rc.left = 0;
|
||||
if (sz.x > 150) // TODO: A better way to determine these max sizes
|
||||
sz.x = 150;
|
||||
if (sz.y > 100)
|
||||
sz.y = 100;
|
||||
rc.right = sz.x;
|
||||
rc.bottom = sz.y;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void ListBox::SetAverageCharWidth(int width) {
|
||||
aveCharWidth = width;
|
||||
}
|
||||
|
||||
void ListBox::SetFont(Font &font) {
|
||||
Window::SetFont(font);
|
||||
}
|
||||
|
||||
void ListBox::Clear() {
|
||||
((wxListBox*)id)->Clear();
|
||||
}
|
||||
|
||||
void ListBox::Append(char *s) {
|
||||
((wxListBox*)id)->Append(s);
|
||||
}
|
||||
|
||||
int ListBox::Length() {
|
||||
return ((wxListBox*)id)->Number();
|
||||
}
|
||||
|
||||
void ListBox::Select(int n) {
|
||||
((wxListBox*)id)->SetSelection(n);
|
||||
#ifdef __WXGTK__
|
||||
if (n > 4)
|
||||
n = n - 4;
|
||||
else
|
||||
n = 1;
|
||||
((wxListBox*)id)->SetFirstItem(n);
|
||||
#endif
|
||||
}
|
||||
|
||||
int ListBox::GetSelection() {
|
||||
return ((wxListBox*)id)->GetSelection();
|
||||
}
|
||||
|
||||
int ListBox::Find(const char *prefix) {
|
||||
if (prefix) {
|
||||
for (int x=0; x < ((wxListBox*)id)->Number(); x++) {
|
||||
wxString text = ((wxListBox*)id)->GetString(x);
|
||||
if (text.StartsWith(prefix))
|
||||
return x;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ListBox::GetValue(int n, char *value, int len) {
|
||||
wxString text = ((wxListBox*)id)->GetString(n);
|
||||
strncpy(value, text.c_str(), len);
|
||||
value[len-1] = '\0';
|
||||
}
|
||||
|
||||
void ListBox::Sort() {
|
||||
// wxWindows keeps sorted so no need to sort
|
||||
}
|
||||
|
||||
|
||||
Menu::Menu() : id(0) {
|
||||
}
|
||||
|
||||
void Menu::CreatePopUp() {
|
||||
Destroy();
|
||||
id = new wxMenu();
|
||||
}
|
||||
|
||||
void Menu::Destroy() {
|
||||
if (id)
|
||||
delete id;
|
||||
id = 0;
|
||||
}
|
||||
|
||||
void Menu::Show(Point pt, Window &w) {
|
||||
w.GetID()->PopupMenu(id, pt.x - 4, pt.y);
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
Colour Platform::Chrome() {
|
||||
wxColour c;
|
||||
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
|
||||
return Colour(c.Red(), c.Green(), c.Blue());
|
||||
}
|
||||
|
||||
Colour Platform::ChromeHighlight() {
|
||||
wxColour c;
|
||||
c = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHIGHLIGHT);
|
||||
return Colour(c.Red(), c.Green(), c.Blue());
|
||||
}
|
||||
|
||||
const char *Platform::DefaultFont() {
|
||||
return wxNORMAL_FONT->GetFaceName();
|
||||
}
|
||||
|
||||
int Platform::DefaultFontSize() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
unsigned int Platform::DoubleClickTime() {
|
||||
return 500; // **** ::GetDoubleClickTime();
|
||||
}
|
||||
|
||||
void Platform::DebugDisplay(const char *s) {
|
||||
wxLogDebug(s);
|
||||
}
|
||||
|
||||
bool Platform::IsKeyDown(int key) {
|
||||
return false; // I don't think we'll need this.
|
||||
}
|
||||
|
||||
long Platform::SendScintilla(WindowID w,
|
||||
unsigned int msg,
|
||||
unsigned long wParam,
|
||||
long lParam) {
|
||||
|
||||
wxStyledTextCtrl* stc = (wxStyledTextCtrl*)w;
|
||||
return stc->SendMsg(msg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
// These are utility functions not really tied to a platform
|
||||
|
||||
int Platform::Minimum(int a, int b) {
|
||||
if (a < b)
|
||||
return a;
|
||||
else
|
||||
return b;
|
||||
}
|
||||
|
||||
int Platform::Maximum(int a, int b) {
|
||||
if (a > b)
|
||||
return a;
|
||||
else
|
||||
return b;
|
||||
}
|
||||
|
||||
#define TRACE
|
||||
|
||||
void Platform::DebugPrintf(const char *format, ...) {
|
||||
#ifdef TRACE
|
||||
char buffer[2000];
|
||||
va_list pArguments;
|
||||
va_start(pArguments, format);
|
||||
vsprintf(buffer,format,pArguments);
|
||||
va_end(pArguments);
|
||||
Platform::DebugDisplay(buffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
int Platform::Clamp(int val, int minVal, int maxVal) {
|
||||
if (val > maxVal)
|
||||
val = maxVal;
|
||||
if (val < minVal)
|
||||
val = minVal;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
47
src/stc/README.txt
Normal file
47
src/stc/README.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
This contrib is the wxStyledTextCtrl, which is a wrapper around the
|
||||
Scintilla edit control. (See www.scintilla.org)
|
||||
|
||||
There is still VERY MUCH to be done, most notable of which is a more
|
||||
advanced sample that exercises more of the code. (I havn't tested
|
||||
AutoComplete or CallTips, or most of the event types at all yet.) And
|
||||
also documentation, adding wrappers for some new scintilla
|
||||
functionality, building and testing on wxGTK, etc. Be patient, it all
|
||||
will get there soon.
|
||||
|
||||
|
||||
|
||||
Let me describe a bit about the architecture I am implementing...
|
||||
Obviously there is the Platform layer which implements the varioius
|
||||
platform classes by using wxWindows classes and filling in where
|
||||
needed. Then there is a ScintillaWX class that is derived from
|
||||
ScintillaBase and implements the necessary virtual methods that
|
||||
Scintilla needs to fully funciton. This class however is not meant to
|
||||
ever be used directly by wx programmers. I call it one end of the
|
||||
bridge between the wx and Scintilla worlds. The other end of the
|
||||
bridge is a class called wxStyledTextCtrl that looks, feels and acts
|
||||
like other classes in wxWindows. Here is a diagram:
|
||||
|
||||
|
||||
+------------------+ +-------------------+
|
||||
| wxStyledTextCtrl |--bridge--| ScintillaWX |
|
||||
+------------------+ +-------------------+
|
||||
| ScintillaBase |
|
||||
+-------------------+
|
||||
| Editor |
|
||||
+-------------------+
|
||||
| PlatWX |
|
||||
+-------------------+
|
||||
|
||||
|
||||
wxStyledTextCtrl derives from wxControl so it has a window that can be
|
||||
drawn upon. When a wxStyledTextCtrl is constructed it constructs a
|
||||
ScintillaWX for itself and passes itself to the scintilla object to be
|
||||
set as the wMain and wDraw attributes. All method calls on the STC
|
||||
are sent over the bridge in the form of calls to ScintiallWX::WndProc.
|
||||
All notifications are sent back over the bridge and turned into
|
||||
wxEvents.
|
||||
|
||||
|
||||
Robin
|
||||
|
||||
|
||||
515
src/stc/ScintillaWX.cpp
Normal file
515
src/stc/ScintillaWX.cpp
Normal file
@@ -0,0 +1,515 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: ScintillaWX.cxx
|
||||
// Purpose: A wxWindows implementation of Scintilla. A class derived
|
||||
// from ScintillaBase that uses the "wx platform" defined in
|
||||
// PlatformWX.cxx This class is one end of a bridge between
|
||||
// the wx world and the Scintilla world. It needs a peer
|
||||
// object of type wxStyledTextCtrl to function.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "ScintillaWX.h"
|
||||
#include "wx/stc/stc.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
const int H_SCROLL_MAX = 2000;
|
||||
const int H_SCROLL_STEP = 20;
|
||||
const int H_SCROLL_PAGE = 200;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Helper classes
|
||||
|
||||
class wxSTCTimer : public wxTimer {
|
||||
public:
|
||||
wxSTCTimer(ScintillaWX* swx) {
|
||||
this->swx = swx;
|
||||
}
|
||||
|
||||
void Notify() {
|
||||
swx->DoTick();
|
||||
}
|
||||
|
||||
private:
|
||||
ScintillaWX* swx;
|
||||
};
|
||||
|
||||
|
||||
|
||||
bool wxSTCDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data) {
|
||||
return swx->DoDropText(x, y, data);
|
||||
}
|
||||
|
||||
wxDragResult wxSTCDropTarget::OnEnter(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return swx->DoDragEnter(x, y, def);
|
||||
}
|
||||
|
||||
wxDragResult wxSTCDropTarget::OnDragOver(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return swx->DoDragOver(x, y, def);
|
||||
}
|
||||
|
||||
void wxSTCDropTarget::OnLeave() {
|
||||
swx->DoDragLeave();
|
||||
}
|
||||
|
||||
|
||||
class wxSTCCallTip : public wxWindow {
|
||||
public:
|
||||
wxSTCCallTip(wxWindow* parent, int ID, CallTip* ct)
|
||||
: wxWindow(parent, ID)
|
||||
{
|
||||
m_ct = ct;
|
||||
}
|
||||
|
||||
void OnPaint(wxPaintEvent& evt) {
|
||||
wxPaintDC dc(this);
|
||||
Surface surfaceWindow;
|
||||
surfaceWindow.Init(&dc);
|
||||
m_ct->PaintCT(&surfaceWindow);
|
||||
surfaceWindow.Release();
|
||||
}
|
||||
|
||||
CallTip* m_ct;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSTCCallTip, wxWindow)
|
||||
EVT_PAINT(wxSTCCallTip::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Constructor/Destructor
|
||||
|
||||
|
||||
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
||||
capturedMouse = false;
|
||||
wMain = win;
|
||||
wDraw = win;
|
||||
stc = win;
|
||||
Initialise();
|
||||
}
|
||||
|
||||
|
||||
ScintillaWX::~ScintillaWX() {
|
||||
SetTicking(false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// base class virtuals
|
||||
|
||||
|
||||
void ScintillaWX::Initialise() {
|
||||
//ScintillaBase::Initialise();
|
||||
dropTarget = new wxSTCDropTarget;
|
||||
dropTarget->SetScintilla(this);
|
||||
stc->SetDropTarget(dropTarget);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::Finalise() {
|
||||
ScintillaBase::Finalise();
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::StartDrag() {
|
||||
wxDropSource source(wMain.GetID());
|
||||
wxTextDataObject data(dragChars);
|
||||
wxDragResult result;
|
||||
|
||||
source.SetData(data);
|
||||
result = source.DoDragDrop(TRUE);
|
||||
if (result == wxDragMove && dropWentOutside)
|
||||
ClearSelection();
|
||||
inDragDrop = FALSE;
|
||||
SetDragPosition(invalidPosition);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::SetTicking(bool on) {
|
||||
wxSTCTimer* steTimer;
|
||||
if (timer.ticking != on) {
|
||||
timer.ticking = on;
|
||||
if (timer.ticking) {
|
||||
steTimer = new wxSTCTimer(this);
|
||||
steTimer->Start(timer.tickSize);
|
||||
timer.tickerID = (int)steTimer;
|
||||
} else {
|
||||
steTimer = (wxSTCTimer*)timer.tickerID;
|
||||
steTimer->Stop();
|
||||
delete steTimer;
|
||||
timer.tickerID = 0;
|
||||
}
|
||||
}
|
||||
timer.ticksToWait = caret.period;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::SetMouseCapture(bool on) {
|
||||
if (on && !capturedMouse)
|
||||
wMain.GetID()->CaptureMouse();
|
||||
else if (!on && capturedMouse)
|
||||
wMain.GetID()->ReleaseMouse();
|
||||
capturedMouse = on;
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::HaveMouseCapture() {
|
||||
return capturedMouse;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::ScrollText(int linesToMove) {
|
||||
int dy = vs.lineHeight * (linesToMove);
|
||||
// TODO: calculate the rectangle to refreshed...
|
||||
wMain.GetID()->ScrollWindow(0, dy);
|
||||
}
|
||||
|
||||
void ScintillaWX::SetVerticalScrollPos() {
|
||||
wMain.GetID()->SetScrollPos(wxVERTICAL, topLine);
|
||||
}
|
||||
|
||||
void ScintillaWX::SetHorizontalScrollPos() {
|
||||
wMain.GetID()->SetScrollPos(wxHORIZONTAL, xOffset);
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
|
||||
bool modified = false;
|
||||
int sbMax = wMain.GetID()->GetScrollRange(wxVERTICAL);
|
||||
int sbThumb = wMain.GetID()->GetScrollThumb(wxVERTICAL);
|
||||
int sbPos = wMain.GetID()->GetScrollPos(wxVERTICAL);
|
||||
|
||||
|
||||
if (sbMax != nMax || sbThumb != nPage) {
|
||||
wMain.GetID()->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
sbMax = wMain.GetID()->GetScrollRange(wxHORIZONTAL);
|
||||
sbThumb = wMain.GetID()->GetScrollThumb(wxHORIZONTAL);
|
||||
if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
|
||||
wMain.GetID()->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
|
||||
modified = true;
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::NotifyChange() {
|
||||
stc->NotifyChange();
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::NotifyParent(SCNotification scn) {
|
||||
stc->NotifyParent(&scn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ScintillaWX::Copy() {
|
||||
if (currentPos != anchor) {
|
||||
char* text = CopySelectionRange();
|
||||
wxTheClipboard->Open();
|
||||
wxTheClipboard->SetData(new wxTextDataObject(text));
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::Paste() {
|
||||
pdoc->BeginUndoAction();
|
||||
ClearSelection();
|
||||
|
||||
wxTextDataObject data;
|
||||
bool canPaste;
|
||||
|
||||
wxTheClipboard->Open();
|
||||
canPaste = wxTheClipboard->GetData(data);
|
||||
wxTheClipboard->Close();
|
||||
if (canPaste) {
|
||||
wxString str = data.GetText();
|
||||
int len = str.Length();
|
||||
pdoc->InsertString(currentPos, str.c_str(), len);
|
||||
SetEmptySelection(currentPos + len);
|
||||
}
|
||||
|
||||
pdoc->EndUndoAction();
|
||||
NotifyChange();
|
||||
Redraw();
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::CanPaste() {
|
||||
wxTextDataObject data;
|
||||
bool canPaste;
|
||||
|
||||
wxTheClipboard->Open();
|
||||
canPaste = wxTheClipboard->GetData(data);
|
||||
wxTheClipboard->Close();
|
||||
|
||||
return canPaste;
|
||||
}
|
||||
|
||||
void ScintillaWX::CreateCallTipWindow(PRectangle) {
|
||||
ct.wCallTip = new wxSTCCallTip(wDraw.GetID(), -1, &ct);
|
||||
ct.wDraw = ct.wCallTip;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
|
||||
if (!label[0])
|
||||
popup.GetID()->AppendSeparator();
|
||||
else
|
||||
popup.GetID()->Append(cmd, label);
|
||||
|
||||
if (!enabled)
|
||||
popup.GetID()->Enable(cmd, enabled);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::ClaimSelection() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) {
|
||||
// switch (iMessage) {
|
||||
// case EM_CANPASTE:
|
||||
// return CanPaste();
|
||||
// default:
|
||||
return ScintillaBase::WndProc(iMessage, wParam, lParam);
|
||||
// }
|
||||
// return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Event delegates
|
||||
|
||||
void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
||||
|
||||
paintState = painting;
|
||||
Surface surfaceWindow;
|
||||
surfaceWindow.Init(dc);
|
||||
PRectangle rcPaint = PRectangleFromwxRect(rect);
|
||||
dc->BeginDrawing();
|
||||
Paint(&surfaceWindow, rcPaint);
|
||||
dc->EndDrawing();
|
||||
surfaceWindow.Release();
|
||||
if (paintState == paintAbandoned) {
|
||||
// Painting area was insufficient to cover new styling or brace highlight positions
|
||||
FullPaint();
|
||||
}
|
||||
paintState = notPainting;
|
||||
#ifdef __WXGTK__
|
||||
// On wxGTK the editor window paints can overwrite the listbox...
|
||||
if (ac.Active())
|
||||
((wxWindow*)ac.lb.GetID())->Refresh(TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoHScroll(int type, int pos) {
|
||||
int xPos = xOffset;
|
||||
switch (type) {
|
||||
case wxEVT_SCROLLWIN_LINEUP:
|
||||
xPos -= H_SCROLL_STEP;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_LINEDOWN:
|
||||
xPos += H_SCROLL_STEP;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEUP:
|
||||
xPos -= H_SCROLL_PAGE;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEDOWN:
|
||||
xPos += H_SCROLL_PAGE;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_TOP:
|
||||
xPos = 0;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_BOTTOM:
|
||||
xPos = H_SCROLL_MAX;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_THUMBTRACK:
|
||||
xPos = pos;
|
||||
break;
|
||||
}
|
||||
HorizontalScrollTo(xPos);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoVScroll(int type, int pos) {
|
||||
int topLineNew = topLine;
|
||||
switch (type) {
|
||||
case wxEVT_SCROLLWIN_LINEUP:
|
||||
topLineNew -= 1;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_LINEDOWN:
|
||||
topLineNew += 1;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEUP:
|
||||
topLineNew -= LinesToScroll();
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_PAGEDOWN:
|
||||
topLineNew += LinesToScroll();
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_TOP:
|
||||
topLineNew = 0;
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_BOTTOM:
|
||||
topLineNew = MaxScrollPos();
|
||||
break;
|
||||
case wxEVT_SCROLLWIN_THUMBTRACK:
|
||||
topLineNew = pos;
|
||||
break;
|
||||
}
|
||||
ScrollTo(topLineNew);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoSize(int width, int height) {
|
||||
PRectangle rcClient(0,0,width,height);
|
||||
SetScrollBarsTo(rcClient);
|
||||
DropGraphics();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoLoseFocus(){
|
||||
DropCaret();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoGainFocus(){
|
||||
ShowCaretAtCurrentPosition();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoSysColourChange() {
|
||||
InvalidateStyleData();
|
||||
}
|
||||
|
||||
void ScintillaWX::DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
|
||||
ButtonDown(pt, curTime, shift, ctrl, alt);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoButtonUp(Point pt, unsigned int curTime, bool ctrl) {
|
||||
ButtonUp(pt, curTime, ctrl);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoButtonMove(Point pt) {
|
||||
ButtonMove(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) {
|
||||
switch (key) {
|
||||
case WXK_DOWN: key = SCK_DOWN; break;
|
||||
case WXK_UP: key = SCK_UP; break;
|
||||
case WXK_LEFT: key = SCK_LEFT; break;
|
||||
case WXK_RIGHT: key = SCK_RIGHT; break;
|
||||
case WXK_HOME: key = SCK_HOME; break;
|
||||
case WXK_END: key = SCK_END; break;
|
||||
case WXK_PRIOR: key = SCK_PRIOR; break;
|
||||
case WXK_NEXT: key = SCK_NEXT; break;
|
||||
case WXK_DELETE: key = SCK_DELETE; break;
|
||||
case WXK_INSERT: key = SCK_INSERT; break;
|
||||
case WXK_ESCAPE: key = SCK_ESCAPE; break;
|
||||
case WXK_BACK: key = SCK_BACK; break;
|
||||
case WXK_TAB: key = SCK_TAB; break;
|
||||
case WXK_RETURN: key = SCK_RETURN; break;
|
||||
case WXK_ADD: key = SCK_ADD; break;
|
||||
case WXK_SUBTRACT: key = SCK_SUBTRACT; break;
|
||||
case WXK_DIVIDE: key = SCK_DIVIDE; break;
|
||||
case WXK_CONTROL: key = 0; break;
|
||||
case WXK_ALT: key = 0; break;
|
||||
case WXK_SHIFT: key = 0; break;
|
||||
}
|
||||
|
||||
return KeyDown(key, shift, ctrl, alt);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoCommand(int ID) {
|
||||
Command(ID);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoContextMenu(Point pt) {
|
||||
ContextMenu(pt);
|
||||
}
|
||||
|
||||
void ScintillaWX::DoOnListBox() {
|
||||
AutoCompleteCompleted();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
bool ScintillaWX::DoDropText(long x, long y, const wxString& data) {
|
||||
SetDragPosition(invalidPosition);
|
||||
int movePos = PositionFromLocation(Point(x,y));
|
||||
DropAt(movePos, data, dragResult == wxDragMove, FALSE); // TODO: rectangular?
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) {
|
||||
SetDragPosition(PositionFromLocation(Point(x, y)));
|
||||
dragResult = def;
|
||||
return def;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoDragLeave() {
|
||||
SetDragPosition(invalidPosition);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Redraw all of text area. This paint will not be abandoned.
|
||||
void ScintillaWX::FullPaint() {
|
||||
paintState = painting;
|
||||
// rcPaint = GetTextRectangle();
|
||||
// wxClientDC dc(wMain.GetID());
|
||||
// Surface surfaceWindow;
|
||||
// surfaceWindow.Init(&dc);
|
||||
// Paint(&surfaceWindow, rcPaint);
|
||||
// surfaceWindow.Release();
|
||||
wMain.GetID()->Refresh(FALSE);
|
||||
paintState = notPainting;
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoScrollToLine(int line) {
|
||||
ScrollTo(line);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaWX::DoScrollToColumn(int column) {
|
||||
HorizontalScrollTo(column * vs.spaceWidth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
152
src/stc/ScintillaWX.h
Normal file
152
src/stc/ScintillaWX.h
Normal file
@@ -0,0 +1,152 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Name: ScintillaWX.h
|
||||
// Purpose: A wxWindows implementation of Scintilla. A class derived
|
||||
// from ScintillaBase that uses the "wx platform" defined in
|
||||
// PlatWX.cpp. This class is one end of a bridge between
|
||||
// the wx world and the Scintilla world. It needs a peer
|
||||
// object of type wxStyledTextCtrl to function.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 13-Jan-2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ScintillaWX_h__
|
||||
#define __ScintillaWX_h__
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#ifdef SCI_LEXER
|
||||
#include "SciLexer.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#endif
|
||||
#include "ContractionState.h"
|
||||
#include "SVector.h"
|
||||
#include "CellBuffer.h"
|
||||
#include "CallTip.h"
|
||||
#include "KeyMap.h"
|
||||
#include "Indicator.h"
|
||||
#include "LineMarker.h"
|
||||
#include "Style.h"
|
||||
#include "ViewStyle.h"
|
||||
#include "AutoComplete.h"
|
||||
#include "Document.h"
|
||||
#include "Editor.h"
|
||||
#include "ScintillaBase.h"
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/dataobj.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/dnd.h>
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStyledTextCtrl; // forward
|
||||
class ScintillaWX;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Helper classes
|
||||
|
||||
class wxSTCDropTarget : public wxTextDropTarget {
|
||||
public:
|
||||
void SetScintilla(ScintillaWX* swx) {
|
||||
this->swx = swx;
|
||||
}
|
||||
|
||||
bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
|
||||
wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def);
|
||||
wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
void OnLeave();
|
||||
|
||||
private:
|
||||
ScintillaWX* swx;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class ScintillaWX : public ScintillaBase {
|
||||
public:
|
||||
|
||||
ScintillaWX(wxStyledTextCtrl* win);
|
||||
~ScintillaWX();
|
||||
|
||||
// base class virtuals
|
||||
virtual void Initialise();
|
||||
virtual void Finalise();
|
||||
virtual void StartDrag();
|
||||
virtual void SetTicking(bool on);
|
||||
virtual void SetMouseCapture(bool on);
|
||||
virtual bool HaveMouseCapture();
|
||||
virtual void ScrollText(int linesToMove);
|
||||
virtual void SetVerticalScrollPos();
|
||||
virtual void SetHorizontalScrollPos();
|
||||
virtual bool ModifyScrollBars(int nMax, int nPage);
|
||||
virtual void Copy();
|
||||
virtual void Paste();
|
||||
virtual void CreateCallTipWindow(PRectangle rc);
|
||||
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
|
||||
virtual void ClaimSelection();
|
||||
|
||||
virtual long DefWndProc(unsigned int iMessage,
|
||||
unsigned long wParam,
|
||||
long lParam);
|
||||
virtual long WndProc(unsigned int iMessage,
|
||||
unsigned long wParam,
|
||||
long lParam);
|
||||
|
||||
virtual void NotifyChange();
|
||||
virtual void NotifyParent(SCNotification scn);
|
||||
|
||||
|
||||
// Event delegates
|
||||
void DoPaint(wxDC* dc, wxRect rect);
|
||||
void DoHScroll(int type, int pos);
|
||||
void DoVScroll(int type, int pos);
|
||||
void DoSize(int width, int height);
|
||||
void DoLoseFocus();
|
||||
void DoGainFocus();
|
||||
void DoSysColourChange();
|
||||
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
|
||||
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
|
||||
void DoButtonMove(Point pt);
|
||||
void DoAddChar(char ch);
|
||||
int DoKeyDown(int key, bool shift, bool ctrl, bool alt);
|
||||
void DoTick() { Tick(); }
|
||||
|
||||
bool DoDropText(long x, long y, const wxString& data);
|
||||
wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def);
|
||||
wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
void DoDragLeave();
|
||||
|
||||
void DoCommand(int ID);
|
||||
void DoContextMenu(Point pt);
|
||||
void DoOnListBox();
|
||||
|
||||
|
||||
// helpers
|
||||
void FullPaint();
|
||||
bool CanPaste();
|
||||
bool GetHideSelection() { return hideSelection; }
|
||||
void DoScrollToLine(int line);
|
||||
void DoScrollToColumn(int column);
|
||||
|
||||
private:
|
||||
bool capturedMouse;
|
||||
wxStyledTextCtrl* stc;
|
||||
|
||||
wxSTCDropTarget* dropTarget;
|
||||
wxDragResult dragResult;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
#endif
|
||||
250
src/stc/StcVC.dsp
Normal file
250
src/stc/StcVC.dsp
Normal file
@@ -0,0 +1,250 @@
|
||||
# Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=StcVC - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "StcVC.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "StcVC.mak" CFG="StcVC - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "StcVC - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "StcVC - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "StcVC - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\lib\stc.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "StcVC - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\..\lib\stcd.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "StcVC - Win32 Release"
|
||||
# Name "StcVC - Win32 Debug"
|
||||
# Begin Group "Stc"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PlatWX.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScintillaWX.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScintillaWX.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stc.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Scintilla"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Accessor.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\AutoComplete.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\AutoComplete.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CallTip.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CallTip.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CellBuffer.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\CellBuffer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ContractionState.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ContractionState.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Document.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Document.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Editor.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Editor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Indicator.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Indicator.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\KeyMap.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\KeyMap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\KeyWords.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexCPP.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexHTML.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexOthers.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexPerl.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexPython.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexSQL.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LexVB.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LineMarker.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\LineMarker.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\PropSet.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ScintillaBase.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ScintillaBase.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Style.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\Style.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\SVector.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ViewStyle.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scintilla\src\ViewStyle.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
29
src/stc/StcVC.dsw
Normal file
29
src/stc/StcVC.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "StcVC"=.\StcVC.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
684
src/stc/gen_iface.py
Normal file
684
src/stc/gen_iface.py
Normal file
@@ -0,0 +1,684 @@
|
||||
#!/bin/env python
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: gen_iface.py
|
||||
# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 5-Sept-2000
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 2000 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
import sys, string, re
|
||||
from fileinput import FileInput
|
||||
|
||||
|
||||
IFACE = './scintilla/include/Scintilla.iface'
|
||||
H_TEMPLATE = './stc.h.in'
|
||||
CPP_TEMPLATE = './stc.cpp.in'
|
||||
H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' #
|
||||
CPP_DEST = './stc.cpp' #'./stc_test.cpp'
|
||||
|
||||
|
||||
# Value prefixes to convert
|
||||
valPrefixes = [('SCI_', ''),
|
||||
('SC_', ''),
|
||||
('SCN_', None), # just toss these...
|
||||
('SCEN_', None),
|
||||
('SCE_', ''),
|
||||
('SCLEX_', 'LEX_'),
|
||||
('SCK_', 'KEY_'),
|
||||
('SCFIND_', 'FIND_'),
|
||||
('SCWS_', 'WS_'),
|
||||
]
|
||||
|
||||
# Message funcion values that should have a CMD_ constant as well
|
||||
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
|
||||
|
||||
|
||||
# Map some generic typenames to wx types, using return value syntax
|
||||
retTypeMap = {
|
||||
'position': 'int',
|
||||
'string': 'wxString',
|
||||
'colour': 'wxColour',
|
||||
}
|
||||
|
||||
# Map some generic typenames to wx types, using parameter syntax
|
||||
paramTypeMap = {
|
||||
'position': 'int',
|
||||
'string': 'const wxString&',
|
||||
'colour': 'const wxColour&',
|
||||
'keymod': 'int',
|
||||
}
|
||||
|
||||
# Map of method info that needs tweaked. Either the name needs changed, or
|
||||
# the method definition/implementation. Tuple items are:
|
||||
#
|
||||
# 1. New method name. None to skip the method, 0 to leave the
|
||||
# default name.
|
||||
# 2. Method definition for the .h file, 0 to leave alone
|
||||
# 3. Method implementation for the .cpp file, 0 to leave alone.
|
||||
# 4. tuple of Doc string lines, or 0 to leave alone.
|
||||
#
|
||||
methodOverrideMap = {
|
||||
'AddText' : (0,
|
||||
'void %s(const wxString& text);',
|
||||
|
||||
'''void %s(const wxString& text) {
|
||||
SendMsg(%s, text.Len(), (long)text.c_str());''',
|
||||
0),
|
||||
|
||||
'AddStyledText' : (0,
|
||||
'void %s(const wxString& text);',
|
||||
|
||||
'''void %s(const wxString& text) {
|
||||
SendMsg(%s, text.Len(), (long)text.c_str());''',
|
||||
0),
|
||||
|
||||
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
|
||||
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
|
||||
|
||||
'GetStyledText' : (0,
|
||||
'wxString %s(int startPos, int endPos);',
|
||||
|
||||
'''wxString %s(int startPos, int endPos) {
|
||||
wxString text;
|
||||
int len = endPos - startPos;
|
||||
TextRange tr;
|
||||
tr.lpstrText = text.GetWriteBuf(len*2+1);
|
||||
tr.chrg.cpMin = startPos;
|
||||
tr.chrg.cpMax = endPos;
|
||||
SendMsg(%s, 0, (long)&tr);
|
||||
text.UngetWriteBuf(len*2);
|
||||
return text;''',
|
||||
|
||||
('Retrieve a buffer of cells.',)),
|
||||
|
||||
|
||||
'PositionFromPoint' : (0,
|
||||
'int %s(wxPoint pt);',
|
||||
|
||||
'''int %s(wxPoint pt) {
|
||||
return SendMsg(%s, pt.x, pt.y);''',
|
||||
|
||||
0),
|
||||
|
||||
'GetCurLine' : (0,
|
||||
'wxString %s(int* OUTPUT=NULL);',
|
||||
|
||||
'''wxString %s(int* linePos) {
|
||||
wxString text;
|
||||
int len = LineLength(GetCurrentLine());
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(%s, len, (long)buf);
|
||||
text.UngetWriteBuf();
|
||||
if (linePos) *linePos = pos;
|
||||
|
||||
return text;''',
|
||||
|
||||
0),
|
||||
|
||||
'SetUsePalette' : (None, 0,0,0),
|
||||
|
||||
'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0),
|
||||
'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0),
|
||||
|
||||
'MarkerDefine' : (0,
|
||||
'''void %s(int markerNumber, int markerSymbol,
|
||||
const wxColour& foreground = wxNullColour,
|
||||
const wxColour& background = wxNullColour);''',
|
||||
|
||||
'''void %s(int markerNumber, int markerSymbol,
|
||||
const wxColour& foreground,
|
||||
const wxColour& background) {
|
||||
|
||||
SendMsg(%s, markerNumber, markerSymbol);
|
||||
if (foreground.Ok())
|
||||
MarkerSetForeground(markerNumber, foreground);
|
||||
if (background.Ok())
|
||||
MarkerSetBackground(markerNumber, background);''',
|
||||
|
||||
('Set the symbol used for a particular marker number,',
|
||||
'and optionally the for and background colours.')),
|
||||
|
||||
'SetMarginTypeN' : ('SetMarginType', 0, 0, 0),
|
||||
'GetMarginTypeN' : ('GetMarginType', 0, 0, 0),
|
||||
'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0),
|
||||
'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0),
|
||||
'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0),
|
||||
'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0),
|
||||
'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0),
|
||||
'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0),
|
||||
|
||||
'StyleSetFore' : ('StyleSetForeground', 0, 0, 0),
|
||||
'StyleSetBack' : ('StyleSetBackground', 0, 0, 0),
|
||||
'SetSelFore' : ('SetSelForeground', 0, 0, 0),
|
||||
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
|
||||
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
|
||||
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
|
||||
|
||||
# need to fix this to map between wx and scintilla encoding flags, leave it out for now...
|
||||
'StyleSetCharacterSet' : (None, 0, 0, 0),
|
||||
|
||||
'AssignCmdKey' : ('CmdKeyAssign',
|
||||
'void %s(int key, int modifiers, int cmd);',
|
||||
|
||||
'''void %s(int key, int modifiers, int cmd) {
|
||||
SendMsg(%s, MAKELONG(key, modifiers), cmd);''',
|
||||
|
||||
0),
|
||||
|
||||
'ClearCmdKey' : ('CmdKeyClear',
|
||||
'void %s(int key, int modifiers);',
|
||||
|
||||
'''void %s(int key, int modifiers) {
|
||||
SendMsg(%s, MAKELONG(key, modifiers));''',
|
||||
|
||||
0),
|
||||
|
||||
'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0),
|
||||
|
||||
|
||||
'SetStylingEx' : ('SetStyleBytes',
|
||||
'void %s(int length, char* styleBytes);',
|
||||
|
||||
'''void %s(int length, char* styleBytes) {
|
||||
SendMsg(%s, length, (long)styleBytes);''',
|
||||
|
||||
0),
|
||||
|
||||
|
||||
'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0),
|
||||
'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0),
|
||||
'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0),
|
||||
'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0),
|
||||
|
||||
'AutoCShow' : ('AutoCompShow', 0, 0, 0),
|
||||
'AutoCCancel' : ('AutoCompCancel', 0, 0, 0),
|
||||
'AutoCActive' : ('AutoCompActive', 0, 0, 0),
|
||||
'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0),
|
||||
'AutoCComplete' : ('AutoCompComplete', 0, 0, 0),
|
||||
'AutoCStops' : ('AutoCompStops', 0, 0, 0),
|
||||
'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0),
|
||||
'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0),
|
||||
'AutoCSelect' : ('AutoCompSelect', 0, 0, 0),
|
||||
'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0),
|
||||
'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0),
|
||||
'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0),
|
||||
'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0),
|
||||
'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0),
|
||||
'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0),
|
||||
'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0),
|
||||
|
||||
'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0),
|
||||
'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0),
|
||||
|
||||
'GetCaretFore' : ('GetCaretForeground', 0, 0, 0),
|
||||
|
||||
'GetUsePalette' : (None, 0, 0, 0),
|
||||
|
||||
'FindText' : (0,
|
||||
'''int %s(int minPos, int maxPos,
|
||||
const wxString& text,
|
||||
bool caseSensitive, bool wholeWord);''',
|
||||
'''int %s(int minPos, int maxPos,
|
||||
const wxString& text,
|
||||
bool caseSensitive, bool wholeWord) {
|
||||
TextToFind ft;
|
||||
int flags = 0;
|
||||
|
||||
flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
|
||||
flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
|
||||
ft.chrg.cpMin = minPos;
|
||||
ft.chrg.cpMax = maxPos;
|
||||
ft.lpstrText = (char*)text.c_str();
|
||||
|
||||
return SendMsg(%s, flags, (long)&ft);''',
|
||||
0),
|
||||
|
||||
'FormatRange' : (0,
|
||||
'''int %s(bool doDraw,
|
||||
int startPos,
|
||||
int endPos,
|
||||
wxDC* draw,
|
||||
wxDC* target, // Why does it use two? Can they be the same?
|
||||
wxRect renderRect,
|
||||
wxRect pageRect);''',
|
||||
''' int %s(bool doDraw,
|
||||
int startPos,
|
||||
int endPos,
|
||||
wxDC* draw,
|
||||
wxDC* target, // Why does it use two? Can they be the same?
|
||||
wxRect renderRect,
|
||||
wxRect pageRect) {
|
||||
RangeToFormat fr;
|
||||
|
||||
fr.hdc = draw;
|
||||
fr.hdcTarget = target;
|
||||
fr.rc.top = renderRect.GetTop();
|
||||
fr.rc.left = renderRect.GetLeft();
|
||||
fr.rc.right = renderRect.GetRight();
|
||||
fr.rc.bottom = renderRect.GetBottom();
|
||||
fr.rcPage.top = pageRect.GetTop();
|
||||
fr.rcPage.left = pageRect.GetLeft();
|
||||
fr.rcPage.right = pageRect.GetRight();
|
||||
fr.rcPage.bottom = pageRect.GetBottom();
|
||||
fr.chrg.cpMin = startPos;
|
||||
fr.chrg.cpMax = endPos;
|
||||
|
||||
return SendMsg(%s, doDraw, (long)&fr);''',
|
||||
0),
|
||||
|
||||
|
||||
'GetLine' : (0,
|
||||
'wxString %s(int line);',
|
||||
|
||||
'''wxString %s(int line) {
|
||||
wxString text;
|
||||
int len = LineLength(line);
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(%s, line, (long)buf);
|
||||
text.UngetWriteBuf();
|
||||
|
||||
return text;''',
|
||||
|
||||
('Retrieve the contents of a line.',)),
|
||||
|
||||
'SetSel' : ('SetSelection', 0, 0, 0),
|
||||
'GetSelText' : ('GetSelectedText',
|
||||
'wxString %s();',
|
||||
|
||||
'''wxString %s() {
|
||||
wxString text;
|
||||
int start;
|
||||
int end;
|
||||
|
||||
GetSelection(&start, &end);
|
||||
int len = end - start;
|
||||
char* buff = text.GetWriteBuf(len+1);
|
||||
|
||||
SendMsg(%s, 0, (long)buff);
|
||||
text.UngetWriteBuf();
|
||||
return text;''',
|
||||
|
||||
('Retrieve the selected text.',)),
|
||||
|
||||
'GetTextRange' : (0,
|
||||
'wxString %s(int startPos, int endPos);',
|
||||
|
||||
'''wxString %s(int startPos, int endPos) {
|
||||
wxString text;
|
||||
int len = endPos - startPos;
|
||||
char* buff = text.GetWriteBuf(len+1);
|
||||
TextRange tr;
|
||||
tr.lpstrText = buff;
|
||||
tr.chrg.cpMin = startPos;
|
||||
tr.chrg.cpMax = endPos;
|
||||
|
||||
SendMsg(%s, 0, (long)&tr);
|
||||
text.UngetWriteBuf();
|
||||
return text;''',
|
||||
|
||||
('Retrieve a range of text.',)),
|
||||
|
||||
'PointXFromPosition' : (None, 0, 0, 0),
|
||||
'PointYFromPosition' : (None, 0, 0, 0),
|
||||
|
||||
'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0),
|
||||
'ReplaceSel' : ('ReplaceSelection', 0, 0, 0),
|
||||
'Null' : (None, 0, 0, 0),
|
||||
|
||||
'GetText' : (0,
|
||||
'wxString %s();',
|
||||
|
||||
'''wxString %s() {
|
||||
wxString text;
|
||||
int len = GetTextLength();
|
||||
char* buff = text.GetWriteBuf(len+1);
|
||||
|
||||
SendMsg(%s, len, (long)buff);
|
||||
buff[len] = 0;
|
||||
text.UngetWriteBuf();
|
||||
return text;''',
|
||||
|
||||
('Retrieve all the text in the document.', )),
|
||||
|
||||
'GetDirectFunction' : (None, 0, 0, 0),
|
||||
'GetDirectPointer' : (None, 0, 0, 0),
|
||||
|
||||
'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0),
|
||||
'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0),
|
||||
'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0),
|
||||
|
||||
|
||||
# Remove all methods that are key commands since they can be
|
||||
# executed with CmdKeyExecute
|
||||
'LineDown' : (None, 0, 0, 0),
|
||||
'LineDownExtend' : (None, 0, 0, 0),
|
||||
'LineUp' : (None, 0, 0, 0),
|
||||
'LineUpExtend' : (None, 0, 0, 0),
|
||||
'CharLeft' : (None, 0, 0, 0),
|
||||
'CharLeftExtend' : (None, 0, 0, 0),
|
||||
'CharRight' : (None, 0, 0, 0),
|
||||
'CharRightExtend' : (None, 0, 0, 0),
|
||||
'WordLeft' : (None, 0, 0, 0),
|
||||
'WordLeftExtend' : (None, 0, 0, 0),
|
||||
'WordRight' : (None, 0, 0, 0),
|
||||
'WordRightExtend' : (None, 0, 0, 0),
|
||||
'Home' : (None, 0, 0, 0),
|
||||
'HomeExtend' : (None, 0, 0, 0),
|
||||
'LineEnd' : (None, 0, 0, 0),
|
||||
'LineEndExtend' : (None, 0, 0, 0),
|
||||
'DocumentStart' : (None, 0, 0, 0),
|
||||
'DocumentStartExtend' : (None, 0, 0, 0),
|
||||
'DocumentEnd' : (None, 0, 0, 0),
|
||||
'DocumentEndExtend' : (None, 0, 0, 0),
|
||||
'PageUp' : (None, 0, 0, 0),
|
||||
'PageUpExtend' : (None, 0, 0, 0),
|
||||
'PageDown' : (None, 0, 0, 0),
|
||||
'PageDownExtend' : (None, 0, 0, 0),
|
||||
'EditToggleOvertype' : (None, 0, 0, 0),
|
||||
'Cancel' : (None, 0, 0, 0),
|
||||
'DeleteBack' : (None, 0, 0, 0),
|
||||
'Tab' : (None, 0, 0, 0),
|
||||
'BackTab' : (None, 0, 0, 0),
|
||||
'NewLine' : (None, 0, 0, 0),
|
||||
'FormFeed' : (None, 0, 0, 0),
|
||||
'VCHome' : (None, 0, 0, 0),
|
||||
'VCHomeExtend' : (None, 0, 0, 0),
|
||||
'ZoomIn' : (None, 0, 0, 0),
|
||||
'ZoomOut' : (None, 0, 0, 0),
|
||||
'DelWordLeft' : (None, 0, 0, 0),
|
||||
'DelWordRight' : (None, 0, 0, 0),
|
||||
'LineCut' : (None, 0, 0, 0),
|
||||
'LineDelete' : (None, 0, 0, 0),
|
||||
'LineTranspose' : (None, 0, 0, 0),
|
||||
'LowerCase' : (None, 0, 0, 0),
|
||||
'UpperCase' : (None, 0, 0, 0),
|
||||
'LineScrollDown' : (None, 0, 0, 0),
|
||||
'LineScrollUp' : (None, 0, 0, 0),
|
||||
|
||||
|
||||
'GetDocPointer' : (0,
|
||||
'void* %s();',
|
||||
'''void* %s() {
|
||||
return (void*)SendMsg(%s);''',
|
||||
0),
|
||||
|
||||
'SetDocPointer' : (0,
|
||||
'void %s(void* docPointer);',
|
||||
'''void %s(void* docPointer) {
|
||||
SendMsg(%s, (long)docPointer);''',
|
||||
0),
|
||||
|
||||
'CreateDocument' : (0,
|
||||
'void* %s();',
|
||||
'''void* %s() {
|
||||
return (void*)SendMsg(%s);''',
|
||||
0),
|
||||
|
||||
'AddRefDocument' : (0,
|
||||
'void %s(void* docPointer);',
|
||||
'''void %s(void* docPointer) {
|
||||
SendMsg(%s, (long)docPointer);''',
|
||||
0),
|
||||
|
||||
'ReleaseDocument' : (0,
|
||||
'void %s(void* docPointer);',
|
||||
'''void %s(void* docPointer) {
|
||||
SendMsg(%s, (long)docPointer);''',
|
||||
0),
|
||||
|
||||
'GrabFocus' : (None, 0, 0, 0),
|
||||
|
||||
'' : ('', 0, 0, 0),
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
|
||||
curDocStrings = []
|
||||
values = []
|
||||
methods = []
|
||||
|
||||
# parse iface file
|
||||
fi = FileInput(iface)
|
||||
for line in fi:
|
||||
line = line[:-1]
|
||||
if line[:2] == '##' or line == '':
|
||||
#curDocStrings = []
|
||||
continue
|
||||
|
||||
op = line[:4]
|
||||
if line[:2] == '# ': # a doc string
|
||||
curDocStrings.append(line[2:])
|
||||
|
||||
elif op == 'val ':
|
||||
parseVal(line[4:], values, curDocStrings)
|
||||
curDocStrings = []
|
||||
|
||||
elif op == 'fun ' or op == 'set ' or op == 'get ':
|
||||
parseFun(line[4:], methods, curDocStrings, values)
|
||||
curDocStrings = []
|
||||
|
||||
elif op == 'cat ':
|
||||
if string.strip(line[4:]) == 'Deprecated':
|
||||
break # skip the rest of the file
|
||||
|
||||
elif op == 'evt ':
|
||||
pass
|
||||
|
||||
else:
|
||||
print '***** Unknown line type: ', line
|
||||
|
||||
|
||||
# process templates
|
||||
data = {}
|
||||
data['VALUES'] = processVals(values)
|
||||
defs, imps = processMethods(methods)
|
||||
data['METHOD_DEFS'] = defs
|
||||
data['METHOD_IMPS'] = imps
|
||||
|
||||
# get template text
|
||||
h_text = open(h_tmplt).read()
|
||||
cpp_text = open(cpp_tmplt).read()
|
||||
|
||||
# do the substitutions
|
||||
h_text = h_text % data
|
||||
cpp_text = cpp_text % data
|
||||
|
||||
# write out destination files
|
||||
open(h_dest, 'w').write(h_text)
|
||||
open(cpp_dest, 'w').write(cpp_text)
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def processVals(values):
|
||||
text = []
|
||||
for name, value, docs in values:
|
||||
if docs:
|
||||
text.append('')
|
||||
for x in docs:
|
||||
text.append('// ' + x)
|
||||
text.append('#define %s %s' % (name, value))
|
||||
return string.join(text, '\n')
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def processMethods(methods):
|
||||
defs = []
|
||||
imps = []
|
||||
|
||||
for retType, name, number, param1, param2, docs in methods:
|
||||
retType = retTypeMap.get(retType, retType)
|
||||
params = makeParamString(param1, param2)
|
||||
|
||||
name, theDef, theImp, docs = checkMethodOverride(name, number, docs)
|
||||
|
||||
if name is None:
|
||||
continue
|
||||
|
||||
# Build the method definition for the .h file
|
||||
if docs:
|
||||
defs.append('')
|
||||
for x in docs:
|
||||
defs.append(' // ' + x)
|
||||
if not theDef:
|
||||
theDef = ' %s %s(%s);' % (retType, name, params)
|
||||
defs.append(theDef)
|
||||
|
||||
# Build the method implementation string
|
||||
if docs:
|
||||
imps.append('')
|
||||
for x in docs:
|
||||
imps.append('// ' + x)
|
||||
if not theImp:
|
||||
theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params)
|
||||
|
||||
if retType == 'wxColour':
|
||||
theImp = theImp + 'long c = '
|
||||
elif retType != 'void':
|
||||
theImp = theImp + 'return '
|
||||
theImp = theImp + 'SendMsg(%s, %s, %s)' % (number,
|
||||
makeArgString(param1),
|
||||
makeArgString(param2))
|
||||
if retType == 'bool':
|
||||
theImp = theImp + ' != 0'
|
||||
if retType == 'wxColour':
|
||||
theImp = theImp + ';\n return wxColourFromLong(c)'
|
||||
|
||||
theImp = theImp + ';\n}'
|
||||
imps.append(theImp)
|
||||
|
||||
|
||||
return string.join(defs, '\n'), string.join(imps, '\n')
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def checkMethodOverride(name, number, docs):
|
||||
theDef = theImp = None
|
||||
if methodOverrideMap.has_key(name):
|
||||
item = methodOverrideMap[name]
|
||||
|
||||
if item[0] != 0:
|
||||
name = item[0]
|
||||
if item[1] != 0:
|
||||
theDef = ' ' + (item[1] % name)
|
||||
if item[2] != 0:
|
||||
theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}'
|
||||
if item[3] != 0:
|
||||
docs = item[3]
|
||||
|
||||
return name, theDef, theImp, docs
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def makeArgString(param):
|
||||
if not param:
|
||||
return '0'
|
||||
|
||||
typ, name = param
|
||||
|
||||
if typ == 'string':
|
||||
return '(long)%s.c_str()' % name
|
||||
if typ == 'colour':
|
||||
return 'wxColourAsLong(%s)' % name
|
||||
|
||||
return name
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def makeParamString(param1, param2):
|
||||
def doOne(param):
|
||||
if param:
|
||||
aType = paramTypeMap.get(param[0], param[0])
|
||||
return aType + ' ' + param[1]
|
||||
else:
|
||||
return ''
|
||||
|
||||
st = doOne(param1)
|
||||
if st and param2:
|
||||
st = st + ', '
|
||||
st = st + doOne(param2)
|
||||
return st
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
def parseVal(line, values, docs):
|
||||
name, val = string.split(line, '=')
|
||||
|
||||
# remove prefixes such as SCI, etc.
|
||||
for old, new in valPrefixes:
|
||||
lo = len(old)
|
||||
if name[:lo] == old:
|
||||
if new is None:
|
||||
return
|
||||
name = new + name[lo:]
|
||||
|
||||
# add it to the list
|
||||
values.append( ('wxSTC_' + name, val, docs) )
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # <ws>return type
|
||||
'\s+([a-zA-Z0-9_]+)=' # <ws>name=
|
||||
'([0-9]+)' # number
|
||||
'\(([ a-zA-Z0-9_]*),' # (param,
|
||||
'([ a-zA-Z0-9_]*)\)') # param)
|
||||
|
||||
def parseFun(line, methods, docs, values):
|
||||
def parseParam(param):
|
||||
param = string.strip(param)
|
||||
if param == '':
|
||||
param = None
|
||||
else:
|
||||
param = tuple(string.split(param))
|
||||
return param
|
||||
|
||||
mo = funregex.match(line)
|
||||
if mo is None:
|
||||
print "***** Line doesn't match! : " + line
|
||||
|
||||
retType, name, number, param1, param2 = mo.groups()
|
||||
|
||||
param1 = parseParam(param1)
|
||||
param2 = parseParam(param2)
|
||||
|
||||
# Special case. For the key command functionss we want a value defined too
|
||||
num = string.atoi(number)
|
||||
for v in cmdValues:
|
||||
if (type(v) == type(()) and v[0] <= num < v[1]) or v == num:
|
||||
parseVal('CMD_%s=%s' % (string.upper(name), number), values, ())
|
||||
|
||||
#if retType == 'void' and not param1 and not param2:
|
||||
|
||||
methods.append( (retType, name, number, param1, param2, tuple(docs)) )
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
def main(args):
|
||||
# TODO: parse command line args to replace default input/output files???
|
||||
|
||||
# Now just do it
|
||||
processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
92
src/stc/makefile.b32
Normal file
92
src/stc/makefile.b32
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds wxMMedia library for 32-bit BC++
|
||||
|
||||
# N.B. use:
|
||||
# make -f makefile.b32 stc.cfg
|
||||
# make -f makefile.b32
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
SCINTILLA=.\scintilla
|
||||
S=$(SCINTILLA)\src
|
||||
|
||||
STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S)
|
||||
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\stc.lib
|
||||
|
||||
OBJECTS = \
|
||||
Accessor.obj \
|
||||
AutoComplete.obj \
|
||||
CallTip.obj \
|
||||
CellBuffer.obj \
|
||||
ContractionState.obj \
|
||||
Document.obj \
|
||||
DocumentAccessor.obj \
|
||||
Editor.obj \
|
||||
Indicator.obj \
|
||||
KeyMap.obj \
|
||||
KeyWords.obj \
|
||||
LexCPP.obj \
|
||||
LexHTML.obj \
|
||||
LexLua.obj \
|
||||
LexOthers.obj \
|
||||
LexPerl.obj \
|
||||
LexPython.obj \
|
||||
LexSQL.obj \
|
||||
LexVB.obj \
|
||||
LineMarker.obj \
|
||||
PropSet.obj \
|
||||
PosRegExp.obj \
|
||||
ScintillaBase.obj \
|
||||
Style.obj \
|
||||
UniConversion.obj \
|
||||
ViewStyle.obj \
|
||||
WindowAccessor.obj \
|
||||
\
|
||||
PlatWX.obj \
|
||||
ScintillaWX.obj \
|
||||
stc.obj \
|
||||
|
||||
|
||||
!include $(WXDIR)\src\makelib.b32
|
||||
|
||||
CFG = stc.cfg
|
||||
CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
|
||||
|
||||
{$(S)}.cxx.obj:
|
||||
bcc32 $(CPPFLAGS) -P -c {$< }
|
||||
|
||||
$(CFG): makefile.b32
|
||||
copy &&!
|
||||
-H=$(WXDIR)\src\msw\wx32.csm
|
||||
-3
|
||||
-d
|
||||
-a1 # byte alignment
|
||||
-R-
|
||||
-X
|
||||
-w-par
|
||||
-w-aus
|
||||
-w-hid # virtual function A hides virtual function B
|
||||
-WE
|
||||
-tWM
|
||||
|
||||
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm;$(WXDIR)/src/tiff
|
||||
-I$(WXDIR)\include\wx\msw\gnuwin32
|
||||
|
||||
-L$(BCCDIR)\lib
|
||||
-D__WXWIN__
|
||||
-D__WXMSW__
|
||||
-D__WINDOWS__
|
||||
-DWIN32
|
||||
$(OPT)
|
||||
$(DEBUG_FLAGS)
|
||||
$(WIN95FLAG)
|
||||
$(STCEXTRACPPFLAGS)
|
||||
! $(CFG)
|
||||
|
||||
46
src/stc/makefile.g95
Normal file
46
src/stc/makefile.g95
Normal file
@@ -0,0 +1,46 @@
|
||||
# File: makefile.g95 For stectrl
|
||||
# Author: Robin Dunn
|
||||
# Created: 1-Feb-2000
|
||||
# Updated:
|
||||
|
||||
WXDIR = ../../..
|
||||
|
||||
SCINTILLA=$(WXDIR)/contrib/src/stc/scintilla
|
||||
S=$(SCINTILLA)/src
|
||||
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)/contrib/include
|
||||
|
||||
OBJECTS = \
|
||||
$(S)/Accessor.$(OBJSUFF) \
|
||||
$(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)/UniConversion.$(OBJSUFF) \
|
||||
$(S)/WindowAccessor.$(OBJSUFF) \
|
||||
$(S)/PosRegExp.$(OBJSUFF) \
|
||||
PlatWX.$(OBJSUFF) \
|
||||
ScintillaWX.$(OBJSUFF) \
|
||||
stc.$(OBJSUFF)
|
||||
|
||||
LIBTARGET = $(WXDIR)/contrib/lib/libstc.a
|
||||
|
||||
include $(WXDIR)/src/makelib.g95
|
||||
105
src/stc/makefile.vc
Normal file
105
src/stc/makefile.vc
Normal file
@@ -0,0 +1,105 @@
|
||||
# File: makefile.vc For stectrl
|
||||
# Author: Robin Dunn
|
||||
# Created: 1-Feb-2000
|
||||
# Updated:
|
||||
|
||||
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
SCINTILLA=.\scintilla
|
||||
S=$(SCINTILLA)\src
|
||||
EXTRAINC=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) -I. -I$(WXDIR)\contrib\include
|
||||
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)\PlatWX.obj \
|
||||
$(D)\ScintillaWX.obj \
|
||||
$(D)\stc.obj \
|
||||
|
||||
|
||||
|
||||
|
||||
LIBTARGET = $(WXDIR)\contrib\lib\stc$(LIBEXT).lib
|
||||
|
||||
all: $(D) $(LIBTARGET)
|
||||
|
||||
$(D) :
|
||||
mkdir $(D)
|
||||
|
||||
wx:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.vc FINAL=$(FINAL)
|
||||
cd $(THISDIR)
|
||||
|
||||
wxclean:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.vc clean
|
||||
cd $(THISDIR)
|
||||
|
||||
|
||||
|
||||
|
||||
$(LIBTARGET): $(OBJECTS)
|
||||
-erase $(LIBTARGET)
|
||||
$(implib) @<<
|
||||
-out:$(LIBTARGET)
|
||||
-machine:$(CPU)
|
||||
$(OBJECTS)
|
||||
<<
|
||||
|
||||
|
||||
|
||||
{$(S)}.cxx{$(D)}.obj:
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $<
|
||||
<<
|
||||
|
||||
{}.cpp{$(D)}.obj:
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Fo$@ /Tp $<
|
||||
<<
|
||||
|
||||
|
||||
show:
|
||||
@echo $(CPPFLAGS)
|
||||
|
||||
|
||||
clean:
|
||||
-erase $(D)\*.obj
|
||||
-erase *.sbr
|
||||
-erase *.exe
|
||||
-erase *.res
|
||||
-erase *.map
|
||||
-erase *.pdb
|
||||
-erase $(LIBTARGET)
|
||||
|
||||
7
src/stc/scintilla/README.txt
Normal file
7
src/stc/scintilla/README.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
This directory contains copies of the scintilla/src and
|
||||
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.32
|
||||
|
||||
70
src/stc/scintilla/include/Accessor.h
Normal file
70
src/stc/scintilla/include/Accessor.h
Normal file
@@ -0,0 +1,70 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// Accessor.h - rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
|
||||
|
||||
class Accessor;
|
||||
|
||||
typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
|
||||
|
||||
// Interface to data in a Scintilla
|
||||
class Accessor {
|
||||
protected:
|
||||
enum {extremePosition=0x7FFFFFFF};
|
||||
// bufferSize is a trade off between time taken to copy the characters and retrieval overhead
|
||||
// slopSize positions the buffer before the desired position in case there is some backtracking
|
||||
enum {bufferSize=4000, slopSize=bufferSize/8};
|
||||
char buf[bufferSize+1];
|
||||
int startPos;
|
||||
int endPos;
|
||||
int codePage;
|
||||
|
||||
virtual bool InternalIsLeadByte(char ch)=0;
|
||||
virtual void Fill(int position)=0;
|
||||
public:
|
||||
Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
|
||||
virtual ~Accessor() {}
|
||||
char operator[](int position) {
|
||||
if (position < startPos || position >= endPos) {
|
||||
Fill(position);
|
||||
}
|
||||
return buf[position - startPos];
|
||||
}
|
||||
char SafeGetCharAt(int position, char chDefault=' ') {
|
||||
// Safe version of operator[], returning a defined value for invalid position
|
||||
if (position < startPos || position >= endPos) {
|
||||
Fill(position);
|
||||
if (position < startPos || position >= endPos) {
|
||||
// Position is outside range of document
|
||||
return chDefault;
|
||||
}
|
||||
}
|
||||
return buf[position - startPos];
|
||||
}
|
||||
bool IsLeadByte(char ch) {
|
||||
return codePage && InternalIsLeadByte(ch);
|
||||
}
|
||||
void SetCodePage(int codePage_) { codePage = codePage_; }
|
||||
|
||||
virtual char StyleAt(int position)=0;
|
||||
virtual int GetLine(int position)=0;
|
||||
virtual int LineStart(int line)=0;
|
||||
virtual int LevelAt(int line)=0;
|
||||
virtual int Length()=0;
|
||||
virtual void Flush()=0;
|
||||
virtual int GetLineState(int line)=0;
|
||||
virtual int SetLineState(int line, int state)=0;
|
||||
virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
|
||||
|
||||
// Style setting
|
||||
virtual void StartAt(unsigned int start, char chMask=31)=0;
|
||||
virtual void SetFlags(char chFlags_, char chWhile_)=0;
|
||||
virtual unsigned int GetStartSegment()=0;
|
||||
virtual void StartSegment(unsigned int pos)=0;
|
||||
virtual void ColourTo(unsigned int pos, int chAttr)=0;
|
||||
virtual void SetLevel(int line, int level)=0;
|
||||
virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
|
||||
};
|
||||
|
||||
41
src/stc/scintilla/include/KeyWords.h
Normal file
41
src/stc/scintilla/include/KeyWords.h
Normal file
@@ -0,0 +1,41 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// KeyWords.h - colourise for particular languages
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler);
|
||||
|
||||
class LexerModule {
|
||||
static LexerModule *base;
|
||||
LexerModule *next;
|
||||
int language;
|
||||
LexerFunction fn;
|
||||
public:
|
||||
LexerModule(int language_, LexerFunction fn_);
|
||||
static void Colourise(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
int language, WordList *keywordlists[], Accessor &styler);
|
||||
};
|
||||
|
||||
inline bool iswordchar(char ch) {
|
||||
return isalnum(ch) || ch == '.' || ch == '_';
|
||||
}
|
||||
|
||||
inline bool iswordstart(char ch) {
|
||||
return isalnum(ch) || ch == '_';
|
||||
}
|
||||
|
||||
inline bool isoperator(char ch) {
|
||||
if (isalnum(ch))
|
||||
return false;
|
||||
// '.' left out as it is used to make up numbers
|
||||
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
|
||||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
|
||||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
|
||||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
|
||||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
|
||||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
411
src/stc/scintilla/include/Platform.h
Normal file
411
src/stc/scintilla/include/Platform.h
Normal file
@@ -0,0 +1,411 @@
|
||||
// Scintilla source code edit control
|
||||
// Platform.h - interface to platform facilities
|
||||
// Also includes some basic utilities
|
||||
// Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PLATFORM_H
|
||||
#define PLATFORM_H
|
||||
|
||||
// PLAT_GTK = GTK+ on Linux, PLAT_WIN = Win32 API on Win32 OS
|
||||
// PLAT_WX is wxWindows on any supported platform
|
||||
// Could also have PLAT_GTKWIN = GTK+ on Win32 OS in future
|
||||
|
||||
#define PLAT_GTK 0
|
||||
#define PLAT_WIN 0
|
||||
#define PLAT_WX 0
|
||||
|
||||
#if defined(__WX__)
|
||||
#undef PLAT_WX
|
||||
#define PLAT_WX 1
|
||||
|
||||
#elif defined(GTK)
|
||||
#undef PLAT_GTK
|
||||
#define PLAT_GTK 1
|
||||
|
||||
#else
|
||||
#undef PLAT_WIN
|
||||
#define PLAT_WIN 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Include the main header for each platform
|
||||
|
||||
#if PLAT_GTK
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#endif
|
||||
|
||||
#if PLAT_WIN
|
||||
#define _WIN32_WINNT 0x0400 // Otherwise some required stuff gets ifdef'd out
|
||||
// Vassili Bourdo: shut up annoying Visual C++ warnings:
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4800 4244 4309)
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#endif
|
||||
|
||||
#if PLAT_WX
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
// Underlying the implementation of the platform classes are platform specific types.
|
||||
// Sometimes these need to be passed around by client code so they are defined here
|
||||
|
||||
#if PLAT_GTK
|
||||
typedef GdkColor ColourID;
|
||||
typedef GdkFont* FontID;
|
||||
typedef GdkDrawable* SurfaceID;
|
||||
typedef GtkWidget* WindowID;
|
||||
typedef GtkItemFactory* MenuID;
|
||||
#endif
|
||||
|
||||
#if PLAT_WIN
|
||||
typedef COLORREF ColourID;
|
||||
typedef HFONT FontID;
|
||||
typedef HDC SurfaceID;
|
||||
typedef HWND WindowID;
|
||||
typedef HMENU MenuID;
|
||||
#endif
|
||||
|
||||
#if PLAT_WX
|
||||
typedef wxColour ColourID;
|
||||
typedef wxFont* FontID;
|
||||
typedef wxDC* SurfaceID;
|
||||
typedef wxWindow* WindowID;
|
||||
typedef wxMenu* MenuID;
|
||||
#endif
|
||||
|
||||
// Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably
|
||||
|
||||
class Point {
|
||||
public:
|
||||
int x;
|
||||
int y;
|
||||
|
||||
Point(int x_=0, int y_=0) : x(x_), y(y_) {
|
||||
}
|
||||
|
||||
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
|
||||
|
||||
static Point FromLong(long lpoint);
|
||||
};
|
||||
|
||||
// PRectangle is exactly the same as the Win32 RECT so can be used interchangeably
|
||||
// PRectangles contain their top and left sides, but not their right and bottom sides
|
||||
class PRectangle {
|
||||
public:
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
|
||||
PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) :
|
||||
left(left_), top(top_), right(right_), bottom(bottom_) {
|
||||
}
|
||||
|
||||
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
|
||||
|
||||
bool Contains(Point pt) {
|
||||
return (pt.x >= left) && (pt.x <= right) &&
|
||||
(pt.y >= top) && (pt.y <= bottom);
|
||||
}
|
||||
bool Contains(PRectangle rc) {
|
||||
return (rc.left >= left) && (rc.right <= right) &&
|
||||
(rc.top >= top) && (rc.bottom <= bottom);
|
||||
}
|
||||
bool Intersects(PRectangle other) {
|
||||
return (right >= other.left) && (left <= other.right) &&
|
||||
(bottom >= other.top) && (top <= other.bottom);
|
||||
}
|
||||
int Width() { return right - left; }
|
||||
int Height() { return bottom - top; }
|
||||
};
|
||||
|
||||
#if PLAT_WX
|
||||
wxRect wxRectFromPRectangle(PRectangle prc);
|
||||
PRectangle PRectangleFromwxRect(wxRect rc);
|
||||
#endif
|
||||
|
||||
class Colour {
|
||||
ColourID co;
|
||||
public:
|
||||
Colour(long lcol=0);
|
||||
Colour(unsigned int red, unsigned int green, unsigned int blue);
|
||||
bool operator==(const Colour &other) const;
|
||||
long AsLong() const;
|
||||
unsigned int GetRed();
|
||||
unsigned int GetGreen();
|
||||
unsigned int GetBlue();
|
||||
|
||||
friend class Surface;
|
||||
friend class Palette;
|
||||
};
|
||||
|
||||
// Colour pairs hold a desired colour and the colour that the graphics engine
|
||||
// allocates to approximate the desired colour.
|
||||
// To make palette management more automatic, ColourPairs could register at
|
||||
// construction time with a palette management object.
|
||||
struct ColourPair {
|
||||
Colour desired;
|
||||
Colour allocated;
|
||||
|
||||
ColourPair(Colour desired_=Colour(0,0,0)) {
|
||||
desired = desired_;
|
||||
allocated = desired;
|
||||
}
|
||||
};
|
||||
|
||||
class Window; // Forward declaration for Palette
|
||||
|
||||
class Palette {
|
||||
int used;
|
||||
enum {numEntries = 100};
|
||||
ColourPair entries[numEntries];
|
||||
#if PLAT_GTK
|
||||
GdkColor *allocatedPalette;
|
||||
int allocatedLen;
|
||||
#elif PLAT_WIN
|
||||
HPALETTE hpal;
|
||||
#elif PLAT_WX
|
||||
// wxPalette* pal; // **** Is this needed?
|
||||
#endif
|
||||
public:
|
||||
bool allowRealization;
|
||||
|
||||
Palette();
|
||||
~Palette();
|
||||
|
||||
void Release();
|
||||
|
||||
// This method either adds a colour to the list of wanted colours (want==true)
|
||||
// or retrieves the allocated colour back to the ColourPair.
|
||||
// This is one method to make it easier to keep the code for wanting and retrieving in sync.
|
||||
void WantFind(ColourPair &cp, bool want);
|
||||
|
||||
void Allocate(Window &w);
|
||||
|
||||
friend class Surface;
|
||||
};
|
||||
|
||||
class Font {
|
||||
protected:
|
||||
FontID id;
|
||||
#if PLAT_WX
|
||||
int ascent;
|
||||
#endif
|
||||
// Private so Font objects can not be copied
|
||||
Font(const Font &) {}
|
||||
Font &operator=(const Font &) { id=0; return *this; }
|
||||
public:
|
||||
Font();
|
||||
virtual ~Font();
|
||||
|
||||
virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic);
|
||||
virtual void Release();
|
||||
|
||||
FontID GetID() { return id; }
|
||||
// Alias another font - caller guarantees not to Release
|
||||
void SetID(FontID id_) { id = id_; }
|
||||
friend class Surface;
|
||||
};
|
||||
|
||||
// A surface abstracts a place to draw
|
||||
class Surface {
|
||||
private:
|
||||
bool unicodeMode;
|
||||
#if PLAT_GTK
|
||||
GdkDrawable *drawable;
|
||||
GdkGC *gc;
|
||||
GdkPixmap *ppixmap;
|
||||
int x;
|
||||
int y;
|
||||
bool inited;
|
||||
bool createdGC;
|
||||
#elif PLAT_WIN
|
||||
HDC hdc;
|
||||
bool hdcOwned;
|
||||
HPEN pen;
|
||||
HPEN penOld;
|
||||
HBRUSH brush;
|
||||
HBRUSH brushOld;
|
||||
HFONT font;
|
||||
HFONT fontOld;
|
||||
HBITMAP bitmap;
|
||||
HBITMAP bitmapOld;
|
||||
HPALETTE paletteOld;
|
||||
#elif PLAT_WX
|
||||
wxDC* hdc;
|
||||
bool hdcOwned;
|
||||
wxBitmap* bitmap;
|
||||
int x;
|
||||
int y;
|
||||
#endif
|
||||
|
||||
// Private so Surface objects can not be copied
|
||||
Surface(const Surface &) {}
|
||||
Surface &operator=(const Surface &) { return *this; }
|
||||
#if PLAT_WIN || PLAT_WX
|
||||
void BrushColor(Colour back);
|
||||
void SetFont(Font &font_);
|
||||
#endif
|
||||
public:
|
||||
Surface();
|
||||
~Surface();
|
||||
|
||||
void Init();
|
||||
void Init(SurfaceID hdc_);
|
||||
void InitPixMap(int width, int height, Surface *surface_);
|
||||
|
||||
void Release();
|
||||
bool Initialised();
|
||||
void PenColour(Colour fore);
|
||||
int LogPixelsY();
|
||||
int DeviceHeightFont(int points);
|
||||
void MoveTo(int x_, int y_);
|
||||
void LineTo(int x_, int y_);
|
||||
void Polygon(Point *pts, int npts, Colour fore, Colour back);
|
||||
void RectangleDraw(PRectangle rc, Colour fore, Colour back);
|
||||
void FillRectangle(PRectangle rc, Colour back);
|
||||
void FillRectangle(PRectangle rc, Surface &surfacePattern);
|
||||
void RoundedRectangle(PRectangle rc, Colour fore, Colour back);
|
||||
void Ellipse(PRectangle rc, Colour fore, Colour back);
|
||||
void Copy(PRectangle rc, Point from, Surface &surfaceSource);
|
||||
|
||||
void DrawText(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
|
||||
void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, Colour fore, Colour back);
|
||||
void MeasureWidths(Font &font_, const char *s, int len, int *positions);
|
||||
int WidthText(Font &font_, const char *s, int len);
|
||||
int WidthChar(Font &font_, char ch);
|
||||
int Ascent(Font &font_);
|
||||
int Descent(Font &font_);
|
||||
int InternalLeading(Font &font_);
|
||||
int ExternalLeading(Font &font_);
|
||||
int Height(Font &font_);
|
||||
int AverageCharWidth(Font &font_);
|
||||
|
||||
int SetPalette(Palette *pal, bool inBackGround);
|
||||
void SetClip(PRectangle rc);
|
||||
void FlushCachedState();
|
||||
|
||||
void SetUnicodeMode(bool unicodeMode_) {
|
||||
unicodeMode=unicodeMode_;
|
||||
}
|
||||
};
|
||||
|
||||
// Class to hide the details of window manipulation
|
||||
// Does not own the window which will normally have a longer life than this object
|
||||
class Window {
|
||||
friend class ListBox;
|
||||
protected:
|
||||
WindowID id;
|
||||
public:
|
||||
Window() : id(0) {}
|
||||
Window(const Window &source) : id(source.id) {}
|
||||
virtual ~Window();
|
||||
Window &operator=(WindowID id_) {
|
||||
id = id_;
|
||||
return *this;
|
||||
}
|
||||
WindowID GetID() { return id; }
|
||||
bool Created() { return id != 0; }
|
||||
void Destroy();
|
||||
bool HasFocus();
|
||||
PRectangle GetPosition();
|
||||
void SetPosition(PRectangle rc);
|
||||
void SetPositionRelative(PRectangle rc, Window relativeTo);
|
||||
PRectangle GetClientPosition();
|
||||
void Show(bool show=true);
|
||||
void InvalidateAll();
|
||||
void InvalidateRectangle(PRectangle rc);
|
||||
virtual void SetFont(Font &font);
|
||||
enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow };
|
||||
void SetCursor(Cursor curs);
|
||||
void SetTitle(const char *s);
|
||||
#if PLAT_WIN
|
||||
LRESULT SendMessage(UINT msg, WPARAM wParam=0, LPARAM lParam=0);
|
||||
int GetDlgCtrlID();
|
||||
HINSTANCE GetInstance();
|
||||
#endif
|
||||
};
|
||||
|
||||
class ListBox : public Window {
|
||||
#if PLAT_GTK
|
||||
WindowID list;
|
||||
WindowID scroller;
|
||||
int current;
|
||||
#endif
|
||||
int desiredVisibleRows;
|
||||
unsigned int maxItemCharacters;
|
||||
unsigned int aveCharWidth;
|
||||
public:
|
||||
ListBox();
|
||||
virtual ~ListBox();
|
||||
void Create(Window &parent, int ctrlID);
|
||||
virtual void SetFont(Font &font);
|
||||
void SetAverageCharWidth(int width);
|
||||
void SetVisibleRows(int rows);
|
||||
PRectangle GetDesiredRect();
|
||||
void Clear();
|
||||
void Append(char *s);
|
||||
int Length();
|
||||
void Select(int n);
|
||||
int GetSelection();
|
||||
int Find(const char *prefix);
|
||||
void GetValue(int n, char *value, int len);
|
||||
void Sort();
|
||||
};
|
||||
|
||||
class Menu {
|
||||
MenuID id;
|
||||
public:
|
||||
Menu();
|
||||
MenuID GetID() { return id; }
|
||||
void CreatePopUp();
|
||||
void Destroy();
|
||||
void Show(Point pt, Window &w);
|
||||
};
|
||||
|
||||
// Platform class used to retrieve system wide parameters such as double click speed
|
||||
// and chrome colour. Not a creatable object, more of a module with several functions.
|
||||
class Platform {
|
||||
// Private so Platform objects can not be copied
|
||||
Platform(const Platform &) {}
|
||||
Platform &operator=(const Platform &) { return *this; }
|
||||
public:
|
||||
// Should be private because no new Platforms are ever created
|
||||
// but gcc warns about this
|
||||
Platform() {}
|
||||
~Platform() {}
|
||||
static Colour Chrome();
|
||||
static Colour ChromeHighlight();
|
||||
static const char *DefaultFont();
|
||||
static int DefaultFontSize();
|
||||
static unsigned int DoubleClickTime();
|
||||
static void DebugDisplay(const char *s);
|
||||
static bool IsKeyDown(int key);
|
||||
static long SendScintilla(
|
||||
WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0);
|
||||
|
||||
// These are utility functions not really tied to a platform
|
||||
static int Minimum(int a, int b);
|
||||
static int Maximum(int a, int b);
|
||||
// Next three assume 16 bit shorts and 32 bit longs
|
||||
static long LongFromTwoShorts(short a,short b) {
|
||||
return (a) | ((b) << 16);
|
||||
}
|
||||
static short HighShortFromLong(long x) {
|
||||
return static_cast<short>(x >> 16);
|
||||
}
|
||||
static short LowShortFromLong(long x) {
|
||||
return static_cast<short>(x & 0xffff);
|
||||
}
|
||||
static void DebugPrintf(const char *format, ...);
|
||||
static int Clamp(int val, int minVal, int maxVal);
|
||||
};
|
||||
|
||||
#endif
|
||||
138
src/stc/scintilla/include/PosRegExp.h
Normal file
138
src/stc/scintilla/include/PosRegExp.h
Normal file
@@ -0,0 +1,138 @@
|
||||
#ifndef POSREGEXP_H
|
||||
#define POSREGEXP_H
|
||||
|
||||
#define MatchesNum 0x10
|
||||
|
||||
enum EOps
|
||||
{
|
||||
ReBlockOps = 0x1000,
|
||||
ReMul, // *
|
||||
RePlus, // +
|
||||
ReQuest, // ?
|
||||
ReNGMul, // *?
|
||||
ReNGPlus, // +?
|
||||
ReNGQuest, // ??
|
||||
ReRangeN, // {n,}
|
||||
ReRangeNM, // {n,m}
|
||||
ReNGRangeN, // {n,}?
|
||||
ReNGRangeNM, // {n,m}?
|
||||
ReOr, // |
|
||||
ReBehind = 0x1100, // ?#n
|
||||
ReNBehind = 0x1200, // ?~n
|
||||
ReAhead = 0x1300, // ?=
|
||||
ReNAhead = 0x1400, // ?!
|
||||
|
||||
ReSymbolOps = 0x2000,
|
||||
ReEmpty,
|
||||
ReSymb, // a b \W \s ...
|
||||
ReEnum, // []
|
||||
ReNEnum, // [^]
|
||||
ReBrackets, // (...)
|
||||
ReBkTrace = 0x2100, // \yN
|
||||
ReBkBrack = 0x2200 // \N
|
||||
};
|
||||
|
||||
enum ESymbols
|
||||
{
|
||||
ReAnyChr = 0x4000, // .
|
||||
ReSoL, // ^
|
||||
ReEoL, // $
|
||||
ReDigit, // \d
|
||||
ReNDigit, // \D
|
||||
ReWordSymb, // \w
|
||||
ReNWordSymb, // \W
|
||||
ReWSpace, // \s
|
||||
ReNWSpace, // \S
|
||||
ReUCase, // \u
|
||||
ReNUCase , // \l
|
||||
ReWBound, // \b
|
||||
ReNWBound, // \B
|
||||
RePreNW, // \c
|
||||
ReStart, // \m
|
||||
ReEnd, // \M
|
||||
|
||||
ReChr = 0x0 // Char in Lower Byte
|
||||
};
|
||||
enum ETempSymb
|
||||
{
|
||||
ReTemp = 0x7000,
|
||||
ReLBrack, ReRBrack,
|
||||
ReEnumS, ReEnumE, ReNEnumS,
|
||||
ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum
|
||||
};
|
||||
|
||||
#define BackSlash '\\'
|
||||
|
||||
typedef union SCharData
|
||||
{
|
||||
int IArr[8];
|
||||
char CArr[32];
|
||||
void SetBit(unsigned char Bit);
|
||||
void ClearBit(unsigned char Bit);
|
||||
bool GetBit(unsigned char Bit);
|
||||
} *PCharData;
|
||||
|
||||
typedef struct SRegInfo
|
||||
{
|
||||
SRegInfo();
|
||||
~SRegInfo();
|
||||
|
||||
EOps Op;
|
||||
union{
|
||||
SRegInfo *Param;
|
||||
int Symb;
|
||||
PCharData ChrClass;
|
||||
}un;
|
||||
int s,e;
|
||||
SRegInfo *Parent;
|
||||
SRegInfo *Next;
|
||||
} *PRegInfo;
|
||||
|
||||
typedef struct SMatches
|
||||
{
|
||||
int s[MatchesNum];
|
||||
int e[MatchesNum];
|
||||
int CurMatch;
|
||||
} *PMatches;
|
||||
|
||||
typedef class PosRegExp
|
||||
{
|
||||
PRegInfo Info;
|
||||
PMatches BkTrace;
|
||||
bool NoCase,Extend,NoMoves;
|
||||
bool Error;
|
||||
int *Exprn;
|
||||
int posParse;
|
||||
int posEnd,posStart;
|
||||
int posBkStr;
|
||||
int FirstChar;
|
||||
|
||||
bool SetExprLow(const char *Expr);
|
||||
bool SetStructs(PRegInfo &Info,int st,int end);
|
||||
void Optimize();
|
||||
bool CheckSymb(int Symb,bool Inc);
|
||||
bool LowParse(PRegInfo Re);
|
||||
bool LowParseRe(PRegInfo &Next);
|
||||
bool LowCheckNext(PRegInfo Re);
|
||||
bool ParseRe(int posStr);
|
||||
bool QuickCheck();
|
||||
public:
|
||||
PMatches Matches;
|
||||
int Ok, CurMatch;
|
||||
|
||||
void *param;
|
||||
char (*CharAt)(int pos, void *param);
|
||||
|
||||
PosRegExp();
|
||||
~PosRegExp();
|
||||
|
||||
bool isok();
|
||||
bool SetNoMoves(bool Moves);
|
||||
bool SetBkTrace(int posStr,PMatches Trace);
|
||||
bool SetExpr(const char *Expr);
|
||||
bool Parse(int posStr, int posStop, PMatches Mtch);
|
||||
bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1);
|
||||
bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res);
|
||||
} *PPosRegExp;
|
||||
|
||||
#endif /* POSREGEXP_H */
|
||||
244
src/stc/scintilla/include/PropSet.h
Normal file
244
src/stc/scintilla/include/PropSet.h
Normal file
@@ -0,0 +1,244 @@
|
||||
// SciTE - Scintilla based Text Editor
|
||||
// PropSet.h - a java style properties file module
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PROPSET_H
|
||||
#define PROPSET_H
|
||||
|
||||
bool EqualCaseInsensitive(const char *a, const char *b);
|
||||
|
||||
#if PLAT_WIN
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
// Define another string class.
|
||||
// While it would be 'better' to use std::string, that doubles the executable size.
|
||||
|
||||
inline char *StringDup(const char *s, int len=-1) {
|
||||
if (!s)
|
||||
return 0;
|
||||
if (len == -1)
|
||||
len = strlen(s);
|
||||
char *sNew = new char[len + 1];
|
||||
if (sNew) {
|
||||
strncpy(sNew, s, len);
|
||||
sNew[len] = '\0';
|
||||
}
|
||||
return sNew;
|
||||
}
|
||||
|
||||
class SString {
|
||||
char *s;
|
||||
int ssize;
|
||||
public:
|
||||
typedef const char* const_iterator;
|
||||
typedef int size_type;
|
||||
static size_type npos;
|
||||
const char* begin(void) const {
|
||||
return s;
|
||||
}
|
||||
const char* end(void) const {
|
||||
return &s[ssize];
|
||||
}
|
||||
size_type size(void) const {
|
||||
if (s)
|
||||
return ssize;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
SString &assign(const char* sother, int size_ = -1) {
|
||||
char *t = s;
|
||||
s = StringDup(sother,size_);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
delete []t;
|
||||
return *this;
|
||||
}
|
||||
SString &assign(const SString& sother, int size_ = -1) {
|
||||
return assign(sother.s,size_);
|
||||
}
|
||||
SString &assign(const_iterator ibeg, const_iterator iend) {
|
||||
return assign(ibeg,iend - ibeg);
|
||||
}
|
||||
SString() {
|
||||
s = 0;
|
||||
ssize = 0;
|
||||
}
|
||||
SString(const SString &source) {
|
||||
s = StringDup(source.s);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
SString(const char *s_) {
|
||||
s = StringDup(s_);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
SString(int i) {
|
||||
char number[100];
|
||||
sprintf(number, "%0d", i);
|
||||
s = StringDup(number);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
~SString() {
|
||||
delete []s;
|
||||
s = 0;
|
||||
ssize = 0;
|
||||
}
|
||||
SString &operator=(const SString &source) {
|
||||
if (this != &source) {
|
||||
delete []s;
|
||||
s = StringDup(source.s);
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
bool operator==(const SString &other) const {
|
||||
if ((s == 0) && (other.s == 0))
|
||||
return true;
|
||||
if ((s == 0) || (other.s == 0))
|
||||
return false;
|
||||
return strcmp(s, other.s) == 0;
|
||||
}
|
||||
bool operator!=(const SString &other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
bool operator==(const char *sother) const {
|
||||
if ((s == 0) && (sother == 0))
|
||||
return true;
|
||||
if ((s == 0) || (sother == 0))
|
||||
return false;
|
||||
return strcmp(s, sother) == 0;
|
||||
}
|
||||
bool operator!=(const char *sother) const {
|
||||
return !operator==(sother);
|
||||
}
|
||||
const char *c_str() const {
|
||||
if (s)
|
||||
return s;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
int length() const {
|
||||
if (s)
|
||||
return strlen(s);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
char operator[](int i) const {
|
||||
if (s)
|
||||
return s[i];
|
||||
else
|
||||
return '\0';
|
||||
}
|
||||
SString &operator +=(const char *sother) {
|
||||
return append(sother,-1);
|
||||
}
|
||||
SString &operator +=(const SString &sother) {
|
||||
return append(sother.s,sother.ssize);
|
||||
}
|
||||
SString &operator +=(char ch) {
|
||||
return append(&ch,1);
|
||||
}
|
||||
SString &append(const char* sother, int lenOther) {
|
||||
int len = length();
|
||||
if(lenOther < 0)
|
||||
lenOther = strlen(sother);
|
||||
char *sNew = new char[len + lenOther + 1];
|
||||
if (sNew) {
|
||||
if (s)
|
||||
memcpy(sNew, s, len);
|
||||
strncpy(&sNew[len], sother, lenOther);
|
||||
sNew[len + lenOther] = '\0';
|
||||
delete []s;
|
||||
s = sNew;
|
||||
ssize = (s) ? strlen(s) : 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
int value() const {
|
||||
if (s)
|
||||
return atoi(s);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
void substitute(char find, char replace) {
|
||||
char *t = s;
|
||||
while (t) {
|
||||
t = strchr(t, find);
|
||||
if (t)
|
||||
*t = replace;
|
||||
}
|
||||
}
|
||||
// I don't think this really belongs here -- Neil
|
||||
void correctPath() {
|
||||
#ifdef unix
|
||||
substitute('\\', '/');
|
||||
#else
|
||||
substitute('/', '\\');
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
struct Property {
|
||||
unsigned int hash;
|
||||
char *key;
|
||||
char *val;
|
||||
Property *next;
|
||||
Property() : hash(0), key(0), val(0), next(0) {}
|
||||
};
|
||||
|
||||
class PropSet {
|
||||
private:
|
||||
enum { hashRoots=31 };
|
||||
Property *props[hashRoots];
|
||||
public:
|
||||
PropSet *superPS;
|
||||
PropSet();
|
||||
~PropSet();
|
||||
void Set(const char *key, const char *val);
|
||||
void Set(char *keyval);
|
||||
SString Get(const char *key);
|
||||
SString GetExpanded(const char *key);
|
||||
SString Expand(const char *withvars);
|
||||
int GetInt(const char *key, int defaultValue=0);
|
||||
SString GetWild(const char *keybase, const char *filename);
|
||||
SString GetNewExpand(const char *keybase, const char *filename);
|
||||
void Clear();
|
||||
void ReadFromMemory(const char *data, int len, const char *directoryForImports=0);
|
||||
void Read(const char *filename, const char *directoryForImports);
|
||||
};
|
||||
|
||||
class WordList {
|
||||
public:
|
||||
// Each word contains at least one character - a empty word acts as sentinal at the end.
|
||||
char **words;
|
||||
char **wordsNoCase;
|
||||
char *list;
|
||||
int len;
|
||||
bool onlyLineEnds; // Delimited by any white space or only line ends
|
||||
bool sorted;
|
||||
int starts[256];
|
||||
WordList(bool onlyLineEnds_ = false) :
|
||||
words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {}
|
||||
~WordList() { Clear(); }
|
||||
operator bool() { return words ? true : false; }
|
||||
const char *operator[](int ind) { return words[ind]; }
|
||||
void Clear();
|
||||
void Set(const char *s);
|
||||
char *Allocate(int size);
|
||||
void SetFromAllocated();
|
||||
bool InList(const char *s);
|
||||
const char *GetNearestWord(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
|
||||
char *GetNearestWords(const char *wordStart, int searchLen = -1, bool ignoreCase = false);
|
||||
};
|
||||
|
||||
inline bool nonFuncChar(char ch) {
|
||||
return strchr("\t\n\r !\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", ch) != NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
204
src/stc/scintilla/include/SciLexer.h
Normal file
204
src/stc/scintilla/include/SciLexer.h
Normal file
@@ -0,0 +1,204 @@
|
||||
// Scintilla source code edit control
|
||||
// SciLexer - interface to the added lexer functions in the SciLexer version of the edit control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
// Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||
// file which contains any comments about the definitions. HFacer.py does the generation.
|
||||
|
||||
#ifndef SCILEXER_H
|
||||
#define SCILEXER_H
|
||||
|
||||
// SciLexer features - not in standard Scintilla
|
||||
|
||||
//++Autogenerated -- start of section automatically generated from Scintilla.iface
|
||||
#define SCLEX_CONTAINER 0
|
||||
#define SCLEX_NULL 1
|
||||
#define SCLEX_PYTHON 2
|
||||
#define SCLEX_CPP 3
|
||||
#define SCLEX_HTML 4
|
||||
#define SCLEX_XML 5
|
||||
#define SCLEX_PERL 6
|
||||
#define SCLEX_SQL 7
|
||||
#define SCLEX_VB 8
|
||||
#define SCLEX_PROPERTIES 9
|
||||
#define SCLEX_ERRORLIST 10
|
||||
#define SCLEX_MAKEFILE 11
|
||||
#define SCLEX_BATCH 12
|
||||
#define SCLEX_XCODE 13
|
||||
#define SCLEX_LATEX 14
|
||||
#define SCLEX_LUA 15
|
||||
#define SCLEX_DIFF 16
|
||||
#define SCE_P_DEFAULT 0
|
||||
#define SCE_P_COMMENTLINE 1
|
||||
#define SCE_P_NUMBER 2
|
||||
#define SCE_P_STRING 3
|
||||
#define SCE_P_CHARACTER 4
|
||||
#define SCE_P_WORD 5
|
||||
#define SCE_P_TRIPLE 6
|
||||
#define SCE_P_TRIPLEDOUBLE 7
|
||||
#define SCE_P_CLASSNAME 8
|
||||
#define SCE_P_DEFNAME 9
|
||||
#define SCE_P_OPERATOR 10
|
||||
#define SCE_P_IDENTIFIER 11
|
||||
#define SCE_P_COMMENTBLOCK 12
|
||||
#define SCE_P_STRINGEOL 13
|
||||
#define SCE_C_DEFAULT 0
|
||||
#define SCE_C_COMMENT 1
|
||||
#define SCE_C_COMMENTLINE 2
|
||||
#define SCE_C_COMMENTDOC 3
|
||||
#define SCE_C_NUMBER 4
|
||||
#define SCE_C_WORD 5
|
||||
#define SCE_C_STRING 6
|
||||
#define SCE_C_CHARACTER 7
|
||||
#define SCE_C_UUID 8
|
||||
#define SCE_C_PREPROCESSOR 9
|
||||
#define SCE_C_OPERATOR 10
|
||||
#define SCE_C_IDENTIFIER 11
|
||||
#define SCE_C_STRINGEOL 12
|
||||
#define SCE_C_VERBATIM 13
|
||||
#define SCE_H_DEFAULT 0
|
||||
#define SCE_H_TAG 1
|
||||
#define SCE_H_TAGUNKNOWN 2
|
||||
#define SCE_H_ATTRIBUTE 3
|
||||
#define SCE_H_ATTRIBUTEUNKNOWN 4
|
||||
#define SCE_H_NUMBER 5
|
||||
#define SCE_H_DOUBLESTRING 6
|
||||
#define SCE_H_SINGLESTRING 7
|
||||
#define SCE_H_OTHER 8
|
||||
#define SCE_H_COMMENT 9
|
||||
#define SCE_H_ENTITY 10
|
||||
#define SCE_H_TAGEND 11
|
||||
#define SCE_H_XMLSTART 12
|
||||
#define SCE_H_XMLEND 13
|
||||
#define SCE_H_SCRIPT 14
|
||||
#define SCE_H_ASP 15
|
||||
#define SCE_H_ASPAT 16
|
||||
#define SCE_H_CDATA 17
|
||||
#define SCE_H_QUESTION 18
|
||||
#define SCE_H_VALUE 19
|
||||
#define SCE_HJ_START 40
|
||||
#define SCE_HJ_DEFAULT 41
|
||||
#define SCE_HJ_COMMENT 42
|
||||
#define SCE_HJ_COMMENTLINE 43
|
||||
#define SCE_HJ_COMMENTDOC 44
|
||||
#define SCE_HJ_NUMBER 45
|
||||
#define SCE_HJ_WORD 46
|
||||
#define SCE_HJ_KEYWORD 47
|
||||
#define SCE_HJ_DOUBLESTRING 48
|
||||
#define SCE_HJ_SINGLESTRING 49
|
||||
#define SCE_HJ_SYMBOLS 50
|
||||
#define SCE_HJ_STRINGEOL 51
|
||||
#define SCE_HJA_START 55
|
||||
#define SCE_HJA_DEFAULT 56
|
||||
#define SCE_HJA_COMMENT 57
|
||||
#define SCE_HJA_COMMENTLINE 58
|
||||
#define SCE_HJA_COMMENTDOC 59
|
||||
#define SCE_HJA_NUMBER 60
|
||||
#define SCE_HJA_WORD 61
|
||||
#define SCE_HJA_KEYWORD 62
|
||||
#define SCE_HJA_DOUBLESTRING 63
|
||||
#define SCE_HJA_SINGLESTRING 64
|
||||
#define SCE_HJA_SYMBOLS 65
|
||||
#define SCE_HJA_STRINGEOL 66
|
||||
#define SCE_HB_START 70
|
||||
#define SCE_HB_DEFAULT 71
|
||||
#define SCE_HB_COMMENTLINE 72
|
||||
#define SCE_HB_NUMBER 73
|
||||
#define SCE_HB_WORD 74
|
||||
#define SCE_HB_STRING 75
|
||||
#define SCE_HB_IDENTIFIER 76
|
||||
#define SCE_HB_STRINGEOL 77
|
||||
#define SCE_HBA_START 80
|
||||
#define SCE_HBA_DEFAULT 81
|
||||
#define SCE_HBA_COMMENTLINE 82
|
||||
#define SCE_HBA_NUMBER 83
|
||||
#define SCE_HBA_WORD 84
|
||||
#define SCE_HBA_STRING 85
|
||||
#define SCE_HBA_IDENTIFIER 86
|
||||
#define SCE_HBA_STRINGEOL 87
|
||||
#define SCE_HP_START 90
|
||||
#define SCE_HP_DEFAULT 91
|
||||
#define SCE_HP_COMMENTLINE 92
|
||||
#define SCE_HP_NUMBER 93
|
||||
#define SCE_HP_STRING 94
|
||||
#define SCE_HP_CHARACTER 95
|
||||
#define SCE_HP_WORD 96
|
||||
#define SCE_HP_TRIPLE 97
|
||||
#define SCE_HP_TRIPLEDOUBLE 98
|
||||
#define SCE_HP_CLASSNAME 99
|
||||
#define SCE_HP_DEFNAME 100
|
||||
#define SCE_HP_OPERATOR 101
|
||||
#define SCE_HP_IDENTIFIER 102
|
||||
#define SCE_HPA_START 105
|
||||
#define SCE_HPA_DEFAULT 106
|
||||
#define SCE_HPA_COMMENTLINE 107
|
||||
#define SCE_HPA_NUMBER 108
|
||||
#define SCE_HPA_STRING 109
|
||||
#define SCE_HPA_CHARACTER 110
|
||||
#define SCE_HPA_WORD 111
|
||||
#define SCE_HPA_TRIPLE 112
|
||||
#define SCE_HPA_TRIPLEDOUBLE 113
|
||||
#define SCE_HPA_CLASSNAME 114
|
||||
#define SCE_HPA_DEFNAME 115
|
||||
#define SCE_HPA_OPERATOR 116
|
||||
#define SCE_HPA_IDENTIFIER 117
|
||||
#define SCE_HPHP_DEFAULT 118
|
||||
#define SCE_HPHP_HSTRING 119
|
||||
#define SCE_HPHP_SIMPLESTRING 120
|
||||
#define SCE_HPHP_WORD 121
|
||||
#define SCE_HPHP_NUMBER 122
|
||||
#define SCE_HPHP_VARIABLE 123
|
||||
#define SCE_HPHP_COMMENT 124
|
||||
#define SCE_HPHP_COMMENTLINE 125
|
||||
#define SCE_HPHP_STRINGEOL 126
|
||||
#define SCE_PL_DEFAULT 0
|
||||
#define SCE_PL_HERE 1
|
||||
#define SCE_PL_COMMENTLINE 2
|
||||
#define SCE_PL_POD 3
|
||||
#define SCE_PL_NUMBER 4
|
||||
#define SCE_PL_WORD 5
|
||||
#define SCE_PL_STRING 6
|
||||
#define SCE_PL_CHARACTER 7
|
||||
#define SCE_PL_PUNCTUATION 8
|
||||
#define SCE_PL_PREPROCESSOR 9
|
||||
#define SCE_PL_OPERATOR 10
|
||||
#define SCE_PL_IDENTIFIER 11
|
||||
#define SCE_PL_SCALAR 12
|
||||
#define SCE_PL_ARRAY 13
|
||||
#define SCE_PL_HASH 14
|
||||
#define SCE_PL_SYMBOLTABLE 15
|
||||
#define SCE_PL_REF 16
|
||||
#define SCE_PL_REGEX 17
|
||||
#define SCE_PL_REGSUBST 18
|
||||
#define SCE_PL_LONGQUOTE 19
|
||||
#define SCE_PL_BACKTICKS 20
|
||||
#define SCE_PL_DATASECTION 21
|
||||
#define SCE_L_DEFAULT 0
|
||||
#define SCE_L_COMMAND 1
|
||||
#define SCE_L_TAG 2
|
||||
#define SCE_L_MATH 3
|
||||
#define SCE_L_COMMENT 4
|
||||
#define SCE_LUA_DEFAULT 0
|
||||
#define SCE_LUA_COMMENT 1
|
||||
#define SCE_LUA_COMMENTLINE 2
|
||||
#define SCE_LUA_COMMENTDOC 3
|
||||
#define SCE_LUA_NUMBER 4
|
||||
#define SCE_LUA_WORD 5
|
||||
#define SCE_LUA_STRING 6
|
||||
#define SCE_LUA_CHARACTER 7
|
||||
#define SCE_LUA_LITERALSTRING 8
|
||||
#define SCE_LUA_PREPROCESSOR 9
|
||||
#define SCE_LUA_OPERATOR 10
|
||||
#define SCE_LUA_IDENTIFIER 11
|
||||
#define SCE_LUA_STRINGEOL 12
|
||||
#define SCE_ERR_DEFAULT 0
|
||||
#define SCE_ERR_PYTHON 1
|
||||
#define SCE_ERR_GCC 2
|
||||
#define SCE_ERR_MS 3
|
||||
#define SCE_ERR_CMD 4
|
||||
#define SCE_ERR_BORLAND 5
|
||||
#define SCE_ERR_PERL 6
|
||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||
|
||||
#endif
|
||||
508
src/stc/scintilla/include/Scintilla.h
Normal file
508
src/stc/scintilla/include/Scintilla.h
Normal file
@@ -0,0 +1,508 @@
|
||||
// Scintilla source code edit control
|
||||
// Scintilla.h - interface to the edit control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
// Most of this file is automatically generated from the Scintilla.iface interface definition
|
||||
// file which contains any comments about the definitions. HFacer.py does the generation.
|
||||
|
||||
#ifndef SCINTILLA_H
|
||||
#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);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam);
|
||||
|
||||
//++Autogenerated -- start of section automatically generated from Scintilla.iface
|
||||
#define INVALID_POSITION -1
|
||||
#define SCI_START 2000
|
||||
#define SCI_OPTIONAL_START 3000
|
||||
#define SCI_LEXER_START 4000
|
||||
#define SCI_ADDTEXT 2001
|
||||
#define SCI_ADDSTYLEDTEXT 2002
|
||||
#define SCI_INSERTTEXT 2003
|
||||
#define SCI_CLEARALL 2004
|
||||
#define SCI_CLEARDOCUMENTSTYLE 2005
|
||||
#define SCI_GETLENGTH 2006
|
||||
#define SCI_GETCHARAT 2007
|
||||
#define SCI_GETCURRENTPOS 2008
|
||||
#define SCI_GETANCHOR 2009
|
||||
#define SCI_GETSTYLEAT 2010
|
||||
#define SCI_REDO 2011
|
||||
#define SCI_SETUNDOCOLLECTION 2012
|
||||
#define SCI_SELECTALL 2013
|
||||
#define SCI_SETSAVEPOINT 2014
|
||||
#define SCI_GETSTYLEDTEXT 2015
|
||||
#define SCI_CANREDO 2016
|
||||
#define SCI_MARKERLINEFROMHANDLE 2017
|
||||
#define SCI_MARKERDELETEHANDLE 2018
|
||||
#define SCI_GETUNDOCOLLECTION 2019
|
||||
#define SCWS_INVISIBLE 0
|
||||
#define SCWS_VISIBLEALWAYS 1
|
||||
#define SCWS_VISIBLEAFTERINDENT 2
|
||||
#define SCI_GETVIEWWS 2020
|
||||
#define SCI_SETVIEWWS 2021
|
||||
#define SCI_POSITIONFROMPOINT 2022
|
||||
#define SCI_GOTOLINE 2024
|
||||
#define SCI_GOTOPOS 2025
|
||||
#define SCI_SETANCHOR 2026
|
||||
#define SCI_GETCURLINE 2027
|
||||
#define SCI_GETENDSTYLED 2028
|
||||
#define SCI_CONVERTEOLS 2029
|
||||
#define SC_EOL_CRLF 0
|
||||
#define SC_EOL_CR 1
|
||||
#define SC_EOL_LF 2
|
||||
#define SCI_GETEOLMODE 2030
|
||||
#define SCI_SETEOLMODE 2031
|
||||
#define SCI_STARTSTYLING 2032
|
||||
#define SCI_SETSTYLING 2033
|
||||
#define SCI_GETBUFFEREDDRAW 2034
|
||||
#define SCI_SETBUFFEREDDRAW 2035
|
||||
#define SCI_SETTABWIDTH 2036
|
||||
#define SCI_GETTABWIDTH 2121
|
||||
#define SC_CP_UTF8 65001
|
||||
#define SCI_SETCODEPAGE 2037
|
||||
#define SCI_SETUSEPALETTE 2039
|
||||
#define MARKER_MAX 31
|
||||
#define SC_MARK_CIRCLE 0
|
||||
#define SC_MARK_ROUNDRECT 1
|
||||
#define SC_MARK_ARROW 2
|
||||
#define SC_MARK_SMALLRECT 3
|
||||
#define SC_MARK_SHORTARROW 4
|
||||
#define SC_MARK_EMPTY 5
|
||||
#define SC_MARK_ARROWDOWN 6
|
||||
#define SC_MARK_MINUS 7
|
||||
#define SC_MARK_PLUS 8
|
||||
#define SC_MARKNUM_FOLDER 30
|
||||
#define SC_MARKNUM_FOLDEROPEN 31
|
||||
#define SCI_MARKERDEFINE 2040
|
||||
#define SCI_MARKERSETFORE 2041
|
||||
#define SCI_MARKERSETBACK 2042
|
||||
#define SCI_MARKERADD 2043
|
||||
#define SCI_MARKERDELETE 2044
|
||||
#define SCI_MARKERDELETEALL 2045
|
||||
#define SCI_MARKERGET 2046
|
||||
#define SCI_MARKERNEXT 2047
|
||||
#define SCI_MARKERPREVIOUS 2048
|
||||
#define SC_MARGIN_SYMBOL 0
|
||||
#define SC_MARGIN_NUMBER 1
|
||||
#define SCI_SETMARGINTYPEN 2240
|
||||
#define SCI_GETMARGINTYPEN 2241
|
||||
#define SCI_SETMARGINWIDTHN 2242
|
||||
#define SCI_GETMARGINWIDTHN 2243
|
||||
#define SCI_SETMARGINMASKN 2244
|
||||
#define SCI_GETMARGINMASKN 2245
|
||||
#define SCI_SETMARGINSENSITIVEN 2246
|
||||
#define SCI_GETMARGINSENSITIVEN 2247
|
||||
#define STYLE_DEFAULT 32
|
||||
#define STYLE_LINENUMBER 33
|
||||
#define STYLE_BRACELIGHT 34
|
||||
#define STYLE_BRACEBAD 35
|
||||
#define STYLE_CONTROLCHAR 36
|
||||
#define STYLE_INDENTGUIDE 37
|
||||
#define STYLE_MAX 127
|
||||
#define SC_CHARSET_ANSI 0
|
||||
#define SC_CHARSET_DEFAULT 1
|
||||
#define SC_CHARSET_BALTIC 186
|
||||
#define SC_CHARSET_CHINESEBIG5 136
|
||||
#define SC_CHARSET_EASTEUROPE 238
|
||||
#define SC_CHARSET_GB2312 134
|
||||
#define SC_CHARSET_GREEK 161
|
||||
#define SC_CHARSET_HANGUL 129
|
||||
#define SC_CHARSET_MAC 77
|
||||
#define SC_CHARSET_OEM 255
|
||||
#define SC_CHARSET_RUSSIAN 204
|
||||
#define SC_CHARSET_SHIFTJIS 128
|
||||
#define SC_CHARSET_SYMBOL 2
|
||||
#define SC_CHARSET_TURKISH 162
|
||||
#define SC_CHARSET_JOHAB 130
|
||||
#define SC_CHARSET_HEBREW 177
|
||||
#define SC_CHARSET_ARABIC 178
|
||||
#define SC_CHARSET_VIETNAMESE 163
|
||||
#define SC_CHARSET_THAI 222
|
||||
#define SCI_STYLECLEARALL 2050
|
||||
#define SCI_STYLESETFORE 2051
|
||||
#define SCI_STYLESETBACK 2052
|
||||
#define SCI_STYLESETBOLD 2053
|
||||
#define SCI_STYLESETITALIC 2054
|
||||
#define SCI_STYLESETSIZE 2055
|
||||
#define SCI_STYLESETFONT 2056
|
||||
#define SCI_STYLESETEOLFILLED 2057
|
||||
#define SCI_STYLERESETDEFAULT 2058
|
||||
#define SCI_STYLESETUNDERLINE 2059
|
||||
#define SCI_STYLESETCHARACTERSET 2066
|
||||
#define SCI_SETSELFORE 2067
|
||||
#define SCI_SETSELBACK 2068
|
||||
#define SCI_SETCARETFORE 2069
|
||||
#define SCI_ASSIGNCMDKEY 2070
|
||||
#define SCI_CLEARCMDKEY 2071
|
||||
#define SCI_CLEARALLCMDKEYS 2072
|
||||
#define SCI_SETSTYLINGEX 2073
|
||||
#define SCI_STYLESETVISIBLE 2074
|
||||
#define SCI_GETCARETPERIOD 2075
|
||||
#define SCI_SETCARETPERIOD 2076
|
||||
#define SCI_SETWORDCHARS 2077
|
||||
#define SCI_BEGINUNDOACTION 2078
|
||||
#define SCI_ENDUNDOACTION 2079
|
||||
#define INDIC_MAX 7
|
||||
#define INDIC_PLAIN 0
|
||||
#define INDIC_SQUIGGLE 1
|
||||
#define INDIC_TT 2
|
||||
#define INDIC_DIAGONAL 3
|
||||
#define INDIC_STRIKE 4
|
||||
#define INDIC0_MASK 32
|
||||
#define INDIC1_MASK 64
|
||||
#define INDIC2_MASK 128
|
||||
#define INDICS_MASK INDIC0_MASK | INDIC1_MASK | INDIC2_MASK
|
||||
#define SCI_INDICSETSTYLE 2080
|
||||
#define SCI_INDICGETSTYLE 2081
|
||||
#define SCI_INDICSETFORE 2082
|
||||
#define SCI_INDICGETFORE 2083
|
||||
#define SCI_SETSTYLEBITS 2090
|
||||
#define SCI_GETSTYLEBITS 2091
|
||||
#define SCI_SETLINESTATE 2092
|
||||
#define SCI_GETLINESTATE 2093
|
||||
#define SCI_GETMAXLINESTATE 2094
|
||||
#define SCI_AUTOCSHOW 2100
|
||||
#define SCI_AUTOCCANCEL 2101
|
||||
#define SCI_AUTOCACTIVE 2102
|
||||
#define SCI_AUTOCPOSSTART 2103
|
||||
#define SCI_AUTOCCOMPLETE 2104
|
||||
#define SCI_AUTOCSTOPS 2105
|
||||
#define SCI_AUTOCSETSEPARATOR 2106
|
||||
#define SCI_AUTOCGETSEPARATOR 2107
|
||||
#define SCI_AUTOCSELECT 2108
|
||||
#define SCI_AUTOCSETCANCELATSTART 2110
|
||||
#define SCI_AUTOCGETCANCELATSTART 2111
|
||||
#define SCI_AUTOCSETFILLUPS 2112
|
||||
#define SCI_AUTOCSETCHOOSESINGLE 2113
|
||||
#define SCI_AUTOCGETCHOOSESINGLE 2114
|
||||
#define SCI_AUTOCSETIGNORECASE 2115
|
||||
#define SCI_AUTOCGETIGNORECASE 2116
|
||||
#define SCI_SETINDENT 2122
|
||||
#define SCI_GETINDENT 2123
|
||||
#define SCI_SETUSETABS 2124
|
||||
#define SCI_GETUSETABS 2125
|
||||
#define SCI_SETLINEINDENTATION 2126
|
||||
#define SCI_GETLINEINDENTATION 2127
|
||||
#define SCI_GETLINEINDENTPOSITION 2128
|
||||
#define SCI_GETCOLUMN 2129
|
||||
#define SCI_SETHSCROLLBAR 2130
|
||||
#define SCI_GETHSCROLLBAR 2131
|
||||
#define SCI_SETINDENTATIONGUIDES 2132
|
||||
#define SCI_GETINDENTATIONGUIDES 2133
|
||||
#define SCI_SETHIGHLIGHTGUIDE 2134
|
||||
#define SCI_GETHIGHLIGHTGUIDE 2135
|
||||
#define SCI_GETLINEENDPOSITION 2136
|
||||
#define SCI_GETCODEPAGE 2137
|
||||
#define SCI_GETCARETFORE 2138
|
||||
#define SCI_GETUSEPALETTE 2139
|
||||
#define SCI_GETREADONLY 2140
|
||||
#define SCI_SETCURRENTPOS 2141
|
||||
#define SCI_SETSELECTIONSTART 2142
|
||||
#define SCI_GETSELECTIONSTART 2143
|
||||
#define SCI_SETSELECTIONEND 2144
|
||||
#define SCI_GETSELECTIONEND 2145
|
||||
#define SCI_SETPRINTMAGNIFICATION 2146
|
||||
#define SCI_GETPRINTMAGNIFICATION 2147
|
||||
#define SC_PRINT_NORMAL 0
|
||||
#define SC_PRINT_INVERTLIGHT 1
|
||||
#define SC_PRINT_BLACKONWHITE 2
|
||||
#define SCI_SETPRINTCOLOURMODE 2148
|
||||
#define SCI_GETPRINTCOLOURMODE 2149
|
||||
#define SCFIND_DOWN 1
|
||||
#define SCFIND_WHOLEWORD 2
|
||||
#define SCFIND_MATCHCASE 4
|
||||
#define SCFIND_WORDSTART 0x00100000
|
||||
#define SCFIND_REGEXP 0x00200000
|
||||
#define SCI_FINDTEXT 2150
|
||||
#define SCI_FORMATRANGE 2151
|
||||
#define SCI_GETFIRSTVISIBLELINE 2152
|
||||
#define SCI_GETLINE 2153
|
||||
#define SCI_GETLINECOUNT 2154
|
||||
#define SCI_SETMARGINLEFT 2155
|
||||
#define SCI_GETMARGINLEFT 2156
|
||||
#define SCI_SETMARGINRIGHT 2157
|
||||
#define SCI_GETMARGINRIGHT 2158
|
||||
#define SCI_GETMODIFY 2159
|
||||
#define SCI_SETSEL 2160
|
||||
#define SCI_GETSELTEXT 2161
|
||||
#define SCI_GETTEXTRANGE 2162
|
||||
#define SCI_HIDESELECTION 2163
|
||||
#define SCI_POINTXFROMPOSITION 2164
|
||||
#define SCI_POINTYFROMPOSITION 2165
|
||||
#define SCI_LINEFROMPOSITION 2166
|
||||
#define SCI_POSITIONFROMLINE 2167
|
||||
#define SCI_LINESCROLL 2168
|
||||
#define SCI_SCROLLCARET 2169
|
||||
#define SCI_REPLACESEL 2170
|
||||
#define SCI_SETREADONLY 2171
|
||||
#define SCI_NULL 2172
|
||||
#define SCI_CANPASTE 2173
|
||||
#define SCI_CANUNDO 2174
|
||||
#define SCI_EMPTYUNDOBUFFER 2175
|
||||
#define SCI_UNDO 2176
|
||||
#define SCI_CUT 2177
|
||||
#define SCI_COPY 2178
|
||||
#define SCI_PASTE 2179
|
||||
#define SCI_CLEAR 2180
|
||||
#define SCI_SETTEXT 2181
|
||||
#define SCI_GETTEXT 2182
|
||||
#define SCI_GETTEXTLENGTH 2183
|
||||
#define SCI_GETDIRECTFUNCTION 2184
|
||||
#define SCI_GETDIRECTPOINTER 2185
|
||||
#define SCI_SETOVERTYPE 2186
|
||||
#define SCI_GETOVERTYPE 2187
|
||||
#define SCI_CALLTIPSHOW 2200
|
||||
#define SCI_CALLTIPCANCEL 2201
|
||||
#define SCI_CALLTIPACTIVE 2202
|
||||
#define SCI_CALLTIPPOSSTART 2203
|
||||
#define SCI_CALLTIPSETHLT 2204
|
||||
#define SCI_CALLTIPSETBACK 2205
|
||||
#define SCI_VISIBLEFROMDOCLINE 2220
|
||||
#define SCI_DOCLINEFROMVISIBLE 2221
|
||||
#define SC_FOLDLEVELBASE 0x400
|
||||
#define SC_FOLDLEVELWHITEFLAG 0x1000
|
||||
#define SC_FOLDLEVELHEADERFLAG 0x2000
|
||||
#define SC_FOLDLEVELNUMBERMASK 0x0FFF
|
||||
#define SCI_SETFOLDLEVEL 2222
|
||||
#define SCI_GETFOLDLEVEL 2223
|
||||
#define SCI_GETLASTCHILD 2224
|
||||
#define SCI_GETFOLDPARENT 2225
|
||||
#define SCI_SHOWLINES 2226
|
||||
#define SCI_HIDELINES 2227
|
||||
#define SCI_GETLINEVISIBLE 2228
|
||||
#define SCI_SETFOLDEXPANDED 2229
|
||||
#define SCI_GETFOLDEXPANDED 2230
|
||||
#define SCI_TOGGLEFOLD 2231
|
||||
#define SCI_ENSUREVISIBLE 2232
|
||||
#define SCI_SETFOLDFLAGS 2233
|
||||
#define SCI_LINEDOWN 2300
|
||||
#define SCI_LINEDOWNEXTEND 2301
|
||||
#define SCI_LINEUP 2302
|
||||
#define SCI_LINEUPEXTEND 2303
|
||||
#define SCI_CHARLEFT 2304
|
||||
#define SCI_CHARLEFTEXTEND 2305
|
||||
#define SCI_CHARRIGHT 2306
|
||||
#define SCI_CHARRIGHTEXTEND 2307
|
||||
#define SCI_WORDLEFT 2308
|
||||
#define SCI_WORDLEFTEXTEND 2309
|
||||
#define SCI_WORDRIGHT 2310
|
||||
#define SCI_WORDRIGHTEXTEND 2311
|
||||
#define SCI_HOME 2312
|
||||
#define SCI_HOMEEXTEND 2313
|
||||
#define SCI_LINEEND 2314
|
||||
#define SCI_LINEENDEXTEND 2315
|
||||
#define SCI_DOCUMENTSTART 2316
|
||||
#define SCI_DOCUMENTSTARTEXTEND 2317
|
||||
#define SCI_DOCUMENTEND 2318
|
||||
#define SCI_DOCUMENTENDEXTEND 2319
|
||||
#define SCI_PAGEUP 2320
|
||||
#define SCI_PAGEUPEXTEND 2321
|
||||
#define SCI_PAGEDOWN 2322
|
||||
#define SCI_PAGEDOWNEXTEND 2323
|
||||
#define SCI_EDITTOGGLEOVERTYPE 2324
|
||||
#define SCI_CANCEL 2325
|
||||
#define SCI_DELETEBACK 2326
|
||||
#define SCI_TAB 2327
|
||||
#define SCI_BACKTAB 2328
|
||||
#define SCI_NEWLINE 2329
|
||||
#define SCI_FORMFEED 2330
|
||||
#define SCI_VCHOME 2331
|
||||
#define SCI_VCHOMEEXTEND 2332
|
||||
#define SCI_ZOOMIN 2333
|
||||
#define SCI_ZOOMOUT 2334
|
||||
#define SCI_DELWORDLEFT 2335
|
||||
#define SCI_DELWORDRIGHT 2336
|
||||
#define SCI_LINECUT 2337
|
||||
#define SCI_LINEDELETE 2338
|
||||
#define SCI_LINETRANSPOSE 2339
|
||||
#define SCI_LOWERCASE 2340
|
||||
#define SCI_UPPERCASE 2341
|
||||
#define SCI_LINESCROLLDOWN 2342
|
||||
#define SCI_LINESCROLLUP 2343
|
||||
#define SCI_LINELENGTH 2350
|
||||
#define SCI_BRACEHIGHLIGHT 2351
|
||||
#define SCI_BRACEBADLIGHT 2352
|
||||
#define SCI_BRACEMATCH 2353
|
||||
#define SCI_GETVIEWEOL 2355
|
||||
#define SCI_SETVIEWEOL 2356
|
||||
#define SCI_GETDOCPOINTER 2357
|
||||
#define SCI_SETDOCPOINTER 2358
|
||||
#define SCI_SETMODEVENTMASK 2359
|
||||
#define EDGE_NONE 0
|
||||
#define EDGE_LINE 1
|
||||
#define EDGE_BACKGROUND 2
|
||||
#define SCI_GETEDGECOLUMN 2360
|
||||
#define SCI_SETEDGECOLUMN 2361
|
||||
#define SCI_GETEDGEMODE 2362
|
||||
#define SCI_SETEDGEMODE 2363
|
||||
#define SCI_GETEDGECOLOUR 2364
|
||||
#define SCI_SETEDGECOLOUR 2365
|
||||
#define SCI_SEARCHANCHOR 2366
|
||||
#define SCI_SEARCHNEXT 2367
|
||||
#define SCI_SEARCHPREV 2368
|
||||
#define CARET_SLOP 0x01
|
||||
#define CARET_CENTER 0x02
|
||||
#define CARET_STRICT 0x04
|
||||
#define SCI_SETCARETPOLICY 2369
|
||||
#define SCI_LINESONSCREEN 2370
|
||||
#define SCI_USEPOPUP 2371
|
||||
#define SCI_SELECTIONISRECTANGLE 2372
|
||||
#define SCI_SETZOOM 2373
|
||||
#define SCI_GETZOOM 2374
|
||||
#define SCI_CREATEDOCUMENT 2375
|
||||
#define SCI_ADDREFDOCUMENT 2376
|
||||
#define SCI_RELEASEDOCUMENT 2377
|
||||
#define SCI_GETMODEVENTMASK 2378
|
||||
#define SCI_GRABFOCUS 2400
|
||||
#define SCI_STARTRECORD 3001
|
||||
#define SCI_STOPRECORD 3002
|
||||
#define SCI_SETLEXER 4001
|
||||
#define SCI_GETLEXER 4002
|
||||
#define SCI_COLOURISE 4003
|
||||
#define SCI_SETPROPERTY 4004
|
||||
#define SCI_SETKEYWORDS 4005
|
||||
#define SC_MOD_INSERTTEXT 0x1
|
||||
#define SC_MOD_DELETETEXT 0x2
|
||||
#define SC_MOD_CHANGESTYLE 0x4
|
||||
#define SC_MOD_CHANGEFOLD 0x8
|
||||
#define SC_PERFORMED_USER 0x10
|
||||
#define SC_PERFORMED_UNDO 0x20
|
||||
#define SC_PERFORMED_REDO 0x40
|
||||
#define SC_LASTSTEPINUNDOREDO 0x100
|
||||
#define SC_MOD_CHANGEMARKER 0x200
|
||||
#define SC_MOD_BEFOREINSERT 0x400
|
||||
#define SC_MOD_BEFOREDELETE 0x800
|
||||
#define SC_MODEVENTMASKALL 0xF77
|
||||
#define SCEN_CHANGE 768
|
||||
#define SCEN_SETFOCUS 512
|
||||
#define SCEN_KILLFOCUS 256
|
||||
#define SCK_DOWN 300
|
||||
#define SCK_UP 301
|
||||
#define SCK_LEFT 302
|
||||
#define SCK_RIGHT 303
|
||||
#define SCK_HOME 304
|
||||
#define SCK_END 305
|
||||
#define SCK_PRIOR 306
|
||||
#define SCK_NEXT 307
|
||||
#define SCK_DELETE 308
|
||||
#define SCK_INSERT 309
|
||||
#define SCK_ESCAPE 7
|
||||
#define SCK_BACK 8
|
||||
#define SCK_TAB 9
|
||||
#define SCK_RETURN 13
|
||||
#define SCK_ADD 310
|
||||
#define SCK_SUBTRACT 311
|
||||
#define SCK_DIVIDE 312
|
||||
#define SCMOD_SHIFT 1
|
||||
#define SCMOD_CTRL 2
|
||||
#define SCMOD_ALT 4
|
||||
#define SCN_STYLENEEDED 2000
|
||||
#define SCN_CHARADDED 2001
|
||||
#define SCN_SAVEPOINTREACHED 2002
|
||||
#define SCN_SAVEPOINTLEFT 2003
|
||||
#define SCN_MODIFYATTEMPTRO 2004
|
||||
#define SCN_KEY 2005
|
||||
#define SCN_DOUBLECLICK 2006
|
||||
#define SCN_UPDATEUI 2007
|
||||
#define SCN_CHECKBRACE 2007
|
||||
#define SCN_MODIFIED 2008
|
||||
#define SCN_MACRORECORD 2009
|
||||
#define SCN_MARGINCLICK 2010
|
||||
#define SCN_NEEDSHOWN 2011
|
||||
#define SCN_POSCHANGED 2012
|
||||
//--Autogenerated -- end of section automatically generated from Scintilla.iface
|
||||
|
||||
// Optional module for macro recording
|
||||
#ifdef MACRO_SUPPORT
|
||||
typedef void (tMacroRecorder)(unsigned int iMessage, unsigned long wParam,
|
||||
long lParam, void *userData);
|
||||
#endif
|
||||
|
||||
// These structures are defined to be exactly the same shape as the Win32
|
||||
// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
|
||||
// So older code that treats Scintilla as a RichEdit will work.
|
||||
|
||||
struct CharacterRange {
|
||||
long cpMin;
|
||||
long cpMax;
|
||||
};
|
||||
|
||||
struct TextRange {
|
||||
CharacterRange chrg;
|
||||
char *lpstrText;
|
||||
};
|
||||
|
||||
struct TextToFind {
|
||||
CharacterRange chrg;
|
||||
char *lpstrText;
|
||||
CharacterRange chrgText;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_H
|
||||
|
||||
// This structure is used in printing and requires some of the graphics types
|
||||
// from Platform.h. Not needed by most client code.
|
||||
|
||||
struct RangeToFormat {
|
||||
SurfaceID hdc;
|
||||
SurfaceID hdcTarget;
|
||||
PRectangle rc;
|
||||
PRectangle rcPage;
|
||||
CharacterRange chrg;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct NotifyHeader {
|
||||
// hwndFrom is really an environment specifc window handle or pointer
|
||||
// but most clients of Scintilla.h do not have this type visible.
|
||||
//WindowID hwndFrom;
|
||||
void *hwndFrom;
|
||||
unsigned int idFrom;
|
||||
unsigned int code;
|
||||
};
|
||||
|
||||
struct SCNotification {
|
||||
NotifyHeader nmhdr;
|
||||
int position; // SCN_STYLENEEDED, SCN_MODIFIED
|
||||
int ch; // SCN_CHARADDED, SCN_KEY
|
||||
int modifiers; // SCN_KEY
|
||||
int modificationType; // SCN_MODIFIED
|
||||
const char *text; // SCN_MODIFIED
|
||||
int length; // SCN_MODIFIED
|
||||
int linesAdded; // SCN_MODIFIED
|
||||
#ifdef MACRO_SUPPORT
|
||||
int message; // SCN_MACRORECORD
|
||||
int wParam; // SCN_MACRORECORD
|
||||
int lParam; // SCN_MACRORECORD
|
||||
#endif
|
||||
int line; // SCN_MODIFIED
|
||||
int foldLevelNow; // SCN_MODIFIED
|
||||
int foldLevelPrev; // SCN_MODIFIED
|
||||
int margin; // SCN_MARGINCLICK
|
||||
};
|
||||
|
||||
#define SC_MASK_FOLDERS ((1<<SC_MARKNUM_FOLDER) | (1<<SC_MARKNUM_FOLDEROPEN))
|
||||
|
||||
// Deprecation section listing all API features that are deprecated and will
|
||||
// will be removed completely in a future version.
|
||||
// To enable these features define INCLUDE_DEPRECATED_FEATURES
|
||||
|
||||
#ifdef INCLUDE_DEPRECATED_FEATURES
|
||||
|
||||
// Deprecated in 1.27
|
||||
#define SC_UNDOCOLLECT_NONE 0
|
||||
#define SC_UNDOCOLLECT_AUTOSTART 1
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1452
src/stc/scintilla/include/Scintilla.iface
Normal file
1452
src/stc/scintilla/include/Scintilla.iface
Normal file
File diff suppressed because it is too large
Load Diff
46
src/stc/scintilla/include/ScintillaWidget.h
Normal file
46
src/stc/scintilla/include/ScintillaWidget.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Scintilla source code edit control
|
||||
// ScintillaWidget.h - definition of Scintilla widget for GTK+
|
||||
// Only needed by GTK+ code but is harmless on other platforms.
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef SCINTILLAWIDGET_H
|
||||
#define SCINTILLAWIDGET_H
|
||||
|
||||
#if PLAT_GTK
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject)
|
||||
#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
|
||||
#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ())
|
||||
|
||||
typedef struct _ScintillaObject ScintillaObject;
|
||||
typedef struct _ScintillaClass ScintillaClass;
|
||||
|
||||
struct _ScintillaObject {
|
||||
GtkFixed vbox;
|
||||
void *pscin;
|
||||
};
|
||||
|
||||
struct _ScintillaClass {
|
||||
GtkFixedClass parent_class;
|
||||
|
||||
void (* command) (ScintillaObject *ttt);
|
||||
void (* notify) (ScintillaObject *ttt);
|
||||
};
|
||||
|
||||
guint scintilla_get_type (void);
|
||||
GtkWidget* scintilla_new (void);
|
||||
void scintilla_set_id (ScintillaObject *sci,int id);
|
||||
long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
183
src/stc/scintilla/include/WinDefs.h
Normal file
183
src/stc/scintilla/include/WinDefs.h
Normal file
@@ -0,0 +1,183 @@
|
||||
// Scintilla source code edit control
|
||||
// WinDefs.h - the subset of definitions from Windows needed by Scintilla for GTK+
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef WINDEFS_H
|
||||
#define WINDEFS_H
|
||||
|
||||
#define WORD short
|
||||
#define WPARAM unsigned long
|
||||
#define LPARAM long
|
||||
#define LRESULT long
|
||||
#define DWORD long
|
||||
|
||||
#define UINT unsigned int
|
||||
#define LPSTR char *
|
||||
#define LONG long
|
||||
|
||||
//#if 0
|
||||
/* RTF control */
|
||||
#define EM_CANPASTE (1074)
|
||||
#define EM_CANUNDO (198)
|
||||
#define EM_CHARFROMPOS (215)
|
||||
#define EM_EMPTYUNDOBUFFER (205)
|
||||
#define EM_EXGETSEL (1076)
|
||||
#define EM_EXLINEFROMCHAR (1078)
|
||||
#define EM_EXSETSEL (1079)
|
||||
#define EM_FINDTEXT (1080)
|
||||
#define EM_FINDTEXTEX (1103)
|
||||
#define EM_FORMATRANGE (1081)
|
||||
#define EM_GETFIRSTVISIBLELINE (206)
|
||||
#define EM_GETLINE (196)
|
||||
#define EM_GETLINECOUNT (186)
|
||||
#define EM_GETMARGINS (212)
|
||||
#define EM_GETMODIFY (184)
|
||||
#define EM_GETRECT (178)
|
||||
#define EM_GETSEL (176)
|
||||
#define EM_GETSELTEXT (1086)
|
||||
#define EM_GETTEXTRANGE (1099)
|
||||
#define EM_HIDESELECTION (1087)
|
||||
#define EM_LINEFROMCHAR (201)
|
||||
#define EM_LINEINDEX (187)
|
||||
#define EM_LINELENGTH (193)
|
||||
#define EM_LINESCROLL (182)
|
||||
#define EM_POSFROMCHAR (214)
|
||||
#define EM_REPLACESEL (194)
|
||||
#define EM_SCROLLCARET (183)
|
||||
#define EM_SELECTIONTYPE (1090)
|
||||
#define EM_SETMARGINS (211)
|
||||
#define EM_SETREADONLY (207)
|
||||
#define EM_SETSEL (177)
|
||||
#define EM_UNDO (199)
|
||||
|
||||
#define WM_NULL (0)
|
||||
#define WM_CLEAR (771)
|
||||
#define WM_COPY (769)
|
||||
#define WM_CUT (768)
|
||||
#define WM_GETTEXT (13)
|
||||
#define WM_GETTEXTLENGTH (14)
|
||||
#define WM_PASTE (770)
|
||||
#define WM_SETTEXT (12)
|
||||
#define WM_UNDO (772)
|
||||
|
||||
#define EN_CHANGE (768)
|
||||
#define EN_KILLFOCUS (512)
|
||||
#define EN_SETFOCUS (256)
|
||||
|
||||
#define EC_LEFTMARGIN 1
|
||||
#define EC_RIGHTMARGIN 2
|
||||
#define EC_USEFONTINFO 0xffff
|
||||
|
||||
//#endif
|
||||
|
||||
#if 0
|
||||
#if PLAT_GTK
|
||||
#define VK_DOWN GDK_Down
|
||||
#define VK_UP GDK_Up
|
||||
#define VK_LEFT GDK_Left
|
||||
#define VK_RIGHT GDK_Right
|
||||
#define VK_HOME GDK_Home
|
||||
#define VK_END GDK_End
|
||||
#define VK_PRIOR GDK_Page_Up
|
||||
#define VK_NEXT GDK_Page_Down
|
||||
#define VK_DELETE GDK_Delete
|
||||
#define VK_INSERT GDK_Insert
|
||||
#define VK_ESCAPE GDK_Escape
|
||||
#define VK_BACK GDK_BackSpace
|
||||
#define VK_TAB GDK_Tab
|
||||
#define VK_RETURN GDK_Return
|
||||
#define VK_ADD GDK_KP_Add
|
||||
#define VK_SUBTRACT GDK_KP_Subtract
|
||||
#define VK_DIVIDE GDK_KP_Divide
|
||||
#endif
|
||||
|
||||
#if PLAT_WX
|
||||
#define VK_DOWN WXK_DOWN
|
||||
#define VK_UP WXK_UP
|
||||
#define VK_LEFT WXK_LEFT
|
||||
#define VK_RIGHT WXK_RIGHT
|
||||
#define VK_HOME WXK_HOME
|
||||
#define VK_END WXK_END
|
||||
#define VK_PRIOR WXK_PRIOR
|
||||
#define VK_NEXT WXK_NEXT
|
||||
#define VK_DELETE WXK_DELETE
|
||||
#define VK_INSERT WXK_INSERT
|
||||
#define VK_ESCAPE WXK_ESCAPE
|
||||
#define VK_BACK WXK_BACK
|
||||
#define VK_TAB WXK_TAB
|
||||
#define VK_RETURN WXK_RETURN
|
||||
#define VK_ADD WXK_ADD
|
||||
#define VK_SUBTRACT WXK_SUBTRACT
|
||||
//TODO:
|
||||
#define VK_DIVIDE WXK_DIVIDE
|
||||
#endif
|
||||
|
||||
#define SHIFT_PRESSED 1
|
||||
#define LEFT_CTRL_PRESSED 2
|
||||
#define LEFT_ALT_PRESSED 4
|
||||
|
||||
// Are these needed any more
|
||||
#define LPSTR char *
|
||||
#define LONG long
|
||||
#define LPDWORD (long *)
|
||||
|
||||
/* SELCHANGE structure */
|
||||
#define SEL_EMPTY (0)
|
||||
#define SEL_TEXT (1)
|
||||
#define SEL_OBJECT (2)
|
||||
#define SEL_MULTICHAR (4)
|
||||
#define SEL_MULTIOBJECT (8)
|
||||
|
||||
struct RECT {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
};
|
||||
|
||||
/* FINDREPLACE structure */
|
||||
|
||||
#define FR_MATCHCASE (0x4)
|
||||
#define FR_WHOLEWORD (0x2)
|
||||
#define FR_DOWN (0x1)
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
struct CHARRANGE {
|
||||
LONG cpMin;
|
||||
LONG cpMax;
|
||||
};
|
||||
|
||||
struct TEXTRANGE {
|
||||
CHARRANGE chrg;
|
||||
LPSTR lpstrText;
|
||||
};
|
||||
|
||||
struct FINDTEXTEX {
|
||||
CHARRANGE chrg;
|
||||
LPSTR lpstrText;
|
||||
CHARRANGE chrgText;
|
||||
};
|
||||
|
||||
struct NMHDR {
|
||||
WindowID hwndFrom;
|
||||
UINT idFrom;
|
||||
UINT code;
|
||||
};
|
||||
|
||||
struct FORMATRANGE {
|
||||
SurfaceID hdc;
|
||||
SurfaceID hdcTarget;
|
||||
RECT rc;
|
||||
RECT rcPage;
|
||||
CHARRANGE chrg;
|
||||
};
|
||||
#endif
|
||||
|
||||
//#define MAKELONG(a, b) ((a) | ((b) << 16))
|
||||
//#define LOWORD(x) (x & 0xffff)
|
||||
//#define HIWORD(x) (x >> 16)
|
||||
|
||||
#endif
|
||||
47
src/stc/scintilla/include/WindowAccessor.h
Normal file
47
src/stc/scintilla/include/WindowAccessor.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// WindowAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
class WindowAccessor : public Accessor {
|
||||
// Private so WindowAccessor objects can not be copied
|
||||
WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
|
||||
WindowAccessor &operator=(const WindowAccessor &) { return *this; }
|
||||
protected:
|
||||
WindowID id;
|
||||
PropSet &props;
|
||||
int lenDoc;
|
||||
|
||||
char styleBuf[bufferSize];
|
||||
int validLen;
|
||||
char chFlags;
|
||||
char chWhile;
|
||||
unsigned int startSeg;
|
||||
|
||||
bool InternalIsLeadByte(char ch);
|
||||
void Fill(int position);
|
||||
public:
|
||||
WindowAccessor(WindowID id_, PropSet &props_) :
|
||||
Accessor(), id(id_), props(props_),
|
||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||
}
|
||||
~WindowAccessor();
|
||||
char StyleAt(int position);
|
||||
int GetLine(int position);
|
||||
int LineStart(int line);
|
||||
int LevelAt(int line);
|
||||
int Length();
|
||||
void Flush();
|
||||
int GetLineState(int line);
|
||||
int SetLineState(int line, int state);
|
||||
int GetPropertyInt(const char *key, int defaultValue=0) {
|
||||
return props.GetInt(key, defaultValue);
|
||||
}
|
||||
|
||||
void StartAt(unsigned int start, char chMask=31);
|
||||
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
|
||||
unsigned int GetStartSegment() { return startSeg; }
|
||||
void StartSegment(unsigned int pos);
|
||||
void ColourTo(unsigned int pos, int chAttr);
|
||||
void SetLevel(int line, int level);
|
||||
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
|
||||
};
|
||||
121
src/stc/scintilla/src/AutoComplete.cxx
Normal file
121
src/stc/scintilla/src/AutoComplete.cxx
Normal file
@@ -0,0 +1,121 @@
|
||||
// Scintilla source code edit control
|
||||
// AutoComplete.cxx - defines the auto completion list box
|
||||
// Copyright 1998-2000 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 "Platform.h"
|
||||
|
||||
#include "AutoComplete.h"
|
||||
|
||||
AutoComplete::AutoComplete() :
|
||||
active(false),
|
||||
separator(' '),
|
||||
ignoreCase(false),
|
||||
chooseSingle(false),
|
||||
posStart(0),
|
||||
startLen(0),
|
||||
cancelAtStartPos(true) {
|
||||
stopChars[0] = '\0';
|
||||
fillUpChars[0] = '\0';
|
||||
}
|
||||
|
||||
AutoComplete::~AutoComplete() {
|
||||
lb.Destroy();
|
||||
}
|
||||
|
||||
bool AutoComplete::Active() {
|
||||
return active;
|
||||
}
|
||||
|
||||
void AutoComplete::Start(Window &parent, int ctrlID, int position, int startLen_) {
|
||||
if (!lb.Created()) {
|
||||
lb.Create(parent, ctrlID);
|
||||
}
|
||||
lb.Clear();
|
||||
active = true;
|
||||
startLen = startLen_;
|
||||
posStart = position;
|
||||
}
|
||||
|
||||
void AutoComplete::SetStopChars(const char *stopChars_) {
|
||||
strncpy(stopChars, stopChars_, sizeof(stopChars));
|
||||
stopChars[sizeof(stopChars) - 1] = '\0';
|
||||
}
|
||||
|
||||
bool AutoComplete::IsStopChar(char ch) {
|
||||
return ch && strchr(stopChars, ch);
|
||||
}
|
||||
|
||||
void AutoComplete::SetFillUpChars(const char *fillUpChars_) {
|
||||
strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars));
|
||||
fillUpChars[sizeof(fillUpChars) - 1] = '\0';
|
||||
}
|
||||
|
||||
bool AutoComplete::IsFillUpChar(char ch) {
|
||||
return ch && strchr(fillUpChars, ch);
|
||||
}
|
||||
|
||||
void AutoComplete::SetSeparator(char separator_) {
|
||||
separator = separator_;
|
||||
}
|
||||
|
||||
char AutoComplete::GetSeparator() {
|
||||
return separator;
|
||||
}
|
||||
|
||||
void AutoComplete::SetList(const char *list) {
|
||||
lb.Clear();
|
||||
char *words = new char[strlen(list) + 1];
|
||||
if (words) {
|
||||
strcpy(words, list);
|
||||
char *startword = words;
|
||||
int i = 0;
|
||||
for (; words && words[i]; i++) {
|
||||
if (words[i] == separator) {
|
||||
words[i] = '\0';
|
||||
lb.Append(startword);
|
||||
startword = words + i + 1;
|
||||
}
|
||||
}
|
||||
if (startword) {
|
||||
lb.Append(startword);
|
||||
}
|
||||
delete []words;
|
||||
}
|
||||
lb.Sort();
|
||||
}
|
||||
|
||||
void AutoComplete::Show() {
|
||||
lb.Show();
|
||||
lb.Select(0);
|
||||
}
|
||||
|
||||
void AutoComplete::Cancel() {
|
||||
if (lb.Created()) {
|
||||
lb.Destroy();
|
||||
active = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AutoComplete::Move(int delta) {
|
||||
int count = lb.Length();
|
||||
int current = lb.GetSelection();
|
||||
current += delta;
|
||||
if (current >= count)
|
||||
current = count - 1;
|
||||
if (current < 0)
|
||||
current = 0;
|
||||
lb.Select(current);
|
||||
}
|
||||
|
||||
void AutoComplete::Select(const char *word) {
|
||||
int pos = lb.Find(word);
|
||||
//Platform::DebugPrintf("Autocompleting at <%s> %d\n", wordCurrent, pos);
|
||||
if (pos != -1)
|
||||
lb.Select(pos);
|
||||
}
|
||||
|
||||
57
src/stc/scintilla/src/AutoComplete.h
Normal file
57
src/stc/scintilla/src/AutoComplete.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// Scintilla source code edit control
|
||||
// AutoComplete.h - defines the auto completion list box
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef AUTOCOMPLETE_H
|
||||
#define AUTOCOMPLETE_H
|
||||
|
||||
class AutoComplete {
|
||||
bool active;
|
||||
char stopChars[256];
|
||||
char fillUpChars[256];
|
||||
char separator;
|
||||
public:
|
||||
bool ignoreCase;
|
||||
bool chooseSingle;
|
||||
ListBox lb;
|
||||
int posStart;
|
||||
int startLen;
|
||||
// Should autocompletion be canceled if editor's currentPos <= startPos?
|
||||
bool cancelAtStartPos;
|
||||
|
||||
AutoComplete();
|
||||
~AutoComplete();
|
||||
|
||||
// Is the auto completion list displayed?
|
||||
bool Active();
|
||||
|
||||
// Display the auto completion list positioned to be near a character position
|
||||
void Start(Window &parent, int ctrlID, int position, int startLen_);
|
||||
|
||||
// The stop chars are characters which, when typed, cause the auto completion list to disappear
|
||||
void SetStopChars(const char *stopChars_);
|
||||
bool IsStopChar(char ch);
|
||||
|
||||
// The fillup chars are characters which, when typed, fill up the selected word
|
||||
void SetFillUpChars(const char *fillUpChars_);
|
||||
bool IsFillUpChar(char ch);
|
||||
|
||||
// The separator character is used when interpreting the list in SetList
|
||||
void SetSeparator(char separator_);
|
||||
char GetSeparator();
|
||||
|
||||
// The list string contains a sequence of words separated by the separator character
|
||||
void SetList(const char *list);
|
||||
|
||||
void Show();
|
||||
void Cancel();
|
||||
|
||||
// Move the current list element by delta, scrolling appropriately
|
||||
void Move(int delta);
|
||||
|
||||
// Select a list element that starts with word as the current element
|
||||
void Select(const char *word);
|
||||
};
|
||||
|
||||
#endif
|
||||
169
src/stc/scintilla/src/CallTip.cxx
Normal file
169
src/stc/scintilla/src/CallTip.cxx
Normal file
@@ -0,0 +1,169 @@
|
||||
// Scintilla source code edit control
|
||||
// CallTip.cxx - code for displaying call tips
|
||||
// Copyright 1998-2000 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 "Platform.h"
|
||||
|
||||
#include "Scintilla.h"
|
||||
#include "CallTip.h"
|
||||
|
||||
CallTip::CallTip() {
|
||||
wCallTip = 0;
|
||||
inCallTipMode = false;
|
||||
posStartCallTip = 0;
|
||||
val = 0;
|
||||
startHighlight = 0;
|
||||
endHighlight = 0;
|
||||
|
||||
colourBG.desired = Colour(0xff, 0xff, 0xff);
|
||||
colourUnSel.desired = Colour(0x80, 0x80, 0x80);
|
||||
colourSel.desired = Colour(0, 0, 0x80);
|
||||
colourShade.desired = Colour(0, 0, 0);
|
||||
colourLight.desired = Colour(0xc0, 0xc0, 0xc0);
|
||||
}
|
||||
|
||||
CallTip::~CallTip() {
|
||||
wCallTip.Destroy();
|
||||
delete []val;
|
||||
val = 0;
|
||||
}
|
||||
|
||||
void CallTip::RefreshColourPalette(Palette &pal, bool want) {
|
||||
pal.WantFind(colourBG, want);
|
||||
pal.WantFind(colourUnSel, want);
|
||||
pal.WantFind(colourSel, want);
|
||||
pal.WantFind(colourShade, want);
|
||||
pal.WantFind(colourLight, want);
|
||||
}
|
||||
|
||||
void CallTip::PaintCT(Surface *surfaceWindow) {
|
||||
if (!val)
|
||||
return;
|
||||
PRectangle rcClientPos = wCallTip.GetClientPosition();
|
||||
PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left,
|
||||
rcClientPos.bottom - rcClientPos.top);
|
||||
PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1);
|
||||
|
||||
surfaceWindow->FillRectangle(rcClient, colourBG.allocated);
|
||||
// To make a nice small call tip window, it is only sized to fit most normal characters without accents
|
||||
int lineHeight = surfaceWindow->Height(font);
|
||||
int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font);
|
||||
|
||||
// For each line...
|
||||
// Draw the definition in three parts: before highlight, highlighted, after highlight
|
||||
int ytext = rcClient.top + ascent + 1;
|
||||
char *chunkVal = val;
|
||||
bool moreChunks = true;
|
||||
while (moreChunks) {
|
||||
char *chunkEnd = strchr(chunkVal, '\n');
|
||||
if (chunkEnd == NULL) {
|
||||
chunkEnd = chunkVal + strlen(chunkVal);
|
||||
moreChunks = false;
|
||||
}
|
||||
int chunkOffset = chunkVal - val;
|
||||
int chunkLength = chunkEnd - chunkVal;
|
||||
int chunkEndOffset = chunkOffset + chunkLength;
|
||||
int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset);
|
||||
thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset);
|
||||
thisStartHighlight -= chunkOffset;
|
||||
int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset);
|
||||
thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset);
|
||||
thisEndHighlight -= chunkOffset;
|
||||
int x = 5;
|
||||
int xEnd = x + surfaceWindow->WidthText(font, chunkVal, thisStartHighlight);
|
||||
rcClient.left = x;
|
||||
rcClient.top = ytext - ascent - 1;
|
||||
rcClient.right = xEnd;
|
||||
surfaceWindow->DrawText(rcClient, font, ytext,
|
||||
chunkVal, thisStartHighlight,
|
||||
colourUnSel.allocated, colourBG.allocated);
|
||||
x = xEnd;
|
||||
|
||||
xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisStartHighlight,
|
||||
thisEndHighlight - thisStartHighlight);
|
||||
rcClient.top = ytext;
|
||||
rcClient.left = x;
|
||||
rcClient.right = xEnd;
|
||||
surfaceWindow->DrawText(rcClient, font, ytext,
|
||||
chunkVal + thisStartHighlight, thisEndHighlight - thisStartHighlight,
|
||||
colourSel.allocated, colourBG.allocated);
|
||||
x = xEnd;
|
||||
|
||||
xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisEndHighlight,
|
||||
chunkLength - thisEndHighlight);
|
||||
rcClient.left = x;
|
||||
rcClient.right = xEnd;
|
||||
surfaceWindow->DrawText(rcClient, font, ytext,
|
||||
chunkVal + thisEndHighlight, chunkLength - thisEndHighlight,
|
||||
colourUnSel.allocated, colourBG.allocated);
|
||||
chunkVal = chunkEnd + 1;
|
||||
ytext += lineHeight;
|
||||
}
|
||||
// Draw a raised border around the edges of the window
|
||||
surfaceWindow->MoveTo(0, rcClientSize.bottom - 1);
|
||||
surfaceWindow->PenColour(colourShade.allocated);
|
||||
surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1);
|
||||
surfaceWindow->LineTo(rcClientSize.right - 1, 0);
|
||||
surfaceWindow->PenColour(colourLight.allocated);
|
||||
surfaceWindow->LineTo(0, 0);
|
||||
surfaceWindow->LineTo(0, rcClientSize.bottom - 1);
|
||||
}
|
||||
|
||||
PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn,
|
||||
const char *faceName, int size) {
|
||||
Surface surfaceMeasure;
|
||||
surfaceMeasure.Init();
|
||||
int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72;
|
||||
font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false);
|
||||
if (val)
|
||||
delete []val;
|
||||
val = new char[strlen(defn) + 1];
|
||||
if (!val)
|
||||
return PRectangle();
|
||||
strcpy(val, defn);
|
||||
startHighlight = 0;
|
||||
endHighlight = 0;
|
||||
inCallTipMode = true;
|
||||
posStartCallTip = pos;
|
||||
// Look for multiple lines in the text
|
||||
// Only support \n here - simply means container must avoid \r!
|
||||
int width = 0;
|
||||
int numLines = 1;
|
||||
const char *newline;
|
||||
const char *look = val;
|
||||
while ((newline = strchr(look, '\n')) != NULL) {
|
||||
int thisWidth = surfaceMeasure.WidthText(font, look, newline - look);
|
||||
width = Platform::Maximum(width, thisWidth);
|
||||
look = newline + 1;
|
||||
numLines++;
|
||||
}
|
||||
int lastWidth = surfaceMeasure.WidthText(font, look, strlen(look));
|
||||
width = Platform::Maximum(width, lastWidth) + 10;
|
||||
int lineHeight = surfaceMeasure.Height(font);
|
||||
// Extra line for border and an empty line at top and bottom
|
||||
int height = lineHeight * numLines - surfaceMeasure.InternalLeading(font) + 2 + 2;
|
||||
return PRectangle(pt.x -5, pt.y + lineHeight + 1, pt.x + width - 5, pt.y + lineHeight + 1 + height);
|
||||
}
|
||||
|
||||
|
||||
void CallTip::CallTipCancel() {
|
||||
inCallTipMode = false;
|
||||
if (wCallTip.Created()) {
|
||||
wCallTip.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void CallTip::SetHighlight(int start, int end) {
|
||||
// Avoid flashing by checking something has really changed
|
||||
if ((start != startHighlight) || (end != endHighlight)) {
|
||||
startHighlight = start;
|
||||
endHighlight = end;
|
||||
if (wCallTip.Created()) {
|
||||
wCallTip.InvalidateAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
src/stc/scintilla/src/CallTip.h
Normal file
47
src/stc/scintilla/src/CallTip.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// Scintilla source code edit control
|
||||
// CallTip.h - interface to the call tip control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CALLTIP_H
|
||||
#define CALLTIP_H
|
||||
|
||||
class CallTip {
|
||||
int startHighlight;
|
||||
int endHighlight;
|
||||
char *val;
|
||||
Font font;
|
||||
// Private so CallTip objects can not be copied
|
||||
CallTip(const CallTip &) {}
|
||||
CallTip &operator=(const CallTip &) { return *this; }
|
||||
public:
|
||||
Window wCallTip;
|
||||
Window wDraw;
|
||||
bool inCallTipMode;
|
||||
int posStartCallTip;
|
||||
ColourPair colourBG;
|
||||
ColourPair colourUnSel;
|
||||
ColourPair colourSel;
|
||||
ColourPair colourShade;
|
||||
ColourPair colourLight;
|
||||
|
||||
CallTip();
|
||||
~CallTip();
|
||||
|
||||
// Claim or accept palette entries for the colours required to paint a calltip
|
||||
void RefreshColourPalette(Palette &pal, bool want);
|
||||
|
||||
void PaintCT(Surface *surfaceWindow);
|
||||
|
||||
// Setup the calltip and return a rectangle of the area required
|
||||
PRectangle CallTipStart(int pos, Point pt, const char *defn,
|
||||
const char *faceName, int size);
|
||||
|
||||
void CallTipCancel();
|
||||
|
||||
// Set a range of characters to be displayed in a highlight style.
|
||||
// Commonly used to highlight the current parameter.
|
||||
void SetHighlight(int start, int end);
|
||||
};
|
||||
|
||||
#endif
|
||||
1088
src/stc/scintilla/src/CellBuffer.cxx
Normal file
1088
src/stc/scintilla/src/CellBuffer.cxx
Normal file
File diff suppressed because it is too large
Load Diff
229
src/stc/scintilla/src/CellBuffer.h
Normal file
229
src/stc/scintilla/src/CellBuffer.h
Normal file
@@ -0,0 +1,229 @@
|
||||
// Scintilla source code edit control
|
||||
// CellBuffer.h - manages the text of the document
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CELLBUFFER_H
|
||||
#define CELLBUFFER_H
|
||||
|
||||
// This holds the marker identifier and the marker type to display.
|
||||
// MarkerHandleNumbers are members of lists.
|
||||
struct MarkerHandleNumber {
|
||||
int handle;
|
||||
int number;
|
||||
MarkerHandleNumber *next;
|
||||
};
|
||||
|
||||
// A marker handle set contains any number of MarkerHandleNumbers
|
||||
class MarkerHandleSet {
|
||||
MarkerHandleNumber *root;
|
||||
public:
|
||||
MarkerHandleSet();
|
||||
~MarkerHandleSet();
|
||||
int Length();
|
||||
int NumberFromHandle(int handle);
|
||||
int MarkValue(); // Bit set of marker numbers
|
||||
bool Contains(int handle);
|
||||
bool InsertHandle(int handle, int markerNum);
|
||||
void RemoveHandle(int handle);
|
||||
void RemoveNumber(int markerNum);
|
||||
void CombineWith(MarkerHandleSet *other);
|
||||
};
|
||||
|
||||
// Each line stores the starting position of the first character of the line in the cell buffer
|
||||
// and potentially a marker handle set. Often a line will not have any attached markers.
|
||||
struct LineData {
|
||||
int startPosition;
|
||||
MarkerHandleSet *handleSet;
|
||||
LineData() : startPosition(0), handleSet(0) {
|
||||
}
|
||||
};
|
||||
|
||||
// The line vector contains information about each of the lines in a cell buffer.
|
||||
class LineVector {
|
||||
public:
|
||||
enum { growSize = 4000 };
|
||||
int lines;
|
||||
LineData *linesData;
|
||||
int size;
|
||||
int *levels;
|
||||
int sizeLevels;
|
||||
|
||||
// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big.
|
||||
int handleCurrent;
|
||||
|
||||
LineVector();
|
||||
~LineVector();
|
||||
void Init();
|
||||
|
||||
void Expand(int sizeNew);
|
||||
void ExpandLevels(int sizeNew=-1);
|
||||
void ClearLevels();
|
||||
void InsertValue(int pos, int value);
|
||||
void SetValue(int pos, int value);
|
||||
void Remove(int pos);
|
||||
int LineFromPosition(int pos);
|
||||
|
||||
int AddMark(int line, int marker);
|
||||
void MergeMarkers(int pos);
|
||||
void DeleteMark(int line, int markerNum);
|
||||
void DeleteMarkFromHandle(int markerHandle);
|
||||
int LineFromHandle(int markerHandle);
|
||||
};
|
||||
|
||||
// Actions are used to store all the information required to perform one undo/redo step.
|
||||
enum actionType { insertAction, removeAction, startAction };
|
||||
|
||||
class Action {
|
||||
public:
|
||||
actionType at;
|
||||
int position;
|
||||
char *data;
|
||||
int lenData;
|
||||
bool mayCoalesce;
|
||||
|
||||
Action();
|
||||
~Action();
|
||||
void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true);
|
||||
void Destroy();
|
||||
void Grab(Action *source);
|
||||
};
|
||||
|
||||
class UndoHistory {
|
||||
Action *actions;
|
||||
int lenActions;
|
||||
int maxAction;
|
||||
int currentAction;
|
||||
int undoSequenceDepth;
|
||||
int savePoint;
|
||||
|
||||
void EnsureUndoRoom();
|
||||
|
||||
public:
|
||||
UndoHistory();
|
||||
~UndoHistory();
|
||||
|
||||
void AppendAction(actionType at, int position, char *data, int length);
|
||||
|
||||
void BeginUndoAction();
|
||||
void EndUndoAction();
|
||||
void DropUndoSequence();
|
||||
void DeleteUndoHistory();
|
||||
|
||||
// The save point is a marker in the undo stack where the container has stated that
|
||||
// the buffer was saved. Undo and redo can move over the save point.
|
||||
void SetSavePoint();
|
||||
bool IsSavePoint() const;
|
||||
|
||||
// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
|
||||
// called that many times. Similarly for redo.
|
||||
bool CanUndo() const;
|
||||
int StartUndo();
|
||||
const Action &GetUndoStep() const;
|
||||
void CompletedUndoStep();
|
||||
bool CanRedo() const;
|
||||
int StartRedo();
|
||||
const Action &GetRedoStep() const;
|
||||
void CompletedRedoStep();
|
||||
};
|
||||
|
||||
// Holder for an expandable array of characters that supports undo and line markers
|
||||
// Based on article "Data Structures in a Bit-Mapped Text Editor"
|
||||
// by Wilfred J. Hansen, Byte January 1987, page 183
|
||||
class CellBuffer {
|
||||
private:
|
||||
char *body;
|
||||
int size;
|
||||
int length;
|
||||
int part1len;
|
||||
int gaplen;
|
||||
char *part2body;
|
||||
bool readOnly;
|
||||
|
||||
bool collectingUndo;
|
||||
UndoHistory uh;
|
||||
|
||||
LineVector lv;
|
||||
|
||||
SVector lineStates;
|
||||
|
||||
void GapTo(int position);
|
||||
void RoomFor(int insertionLength);
|
||||
|
||||
inline char ByteAt(int position);
|
||||
void SetByteAt(int position, char ch);
|
||||
|
||||
public:
|
||||
|
||||
CellBuffer(int initialLength = 4000);
|
||||
~CellBuffer();
|
||||
|
||||
// Retrieving positions outside the range of the buffer works and returns 0
|
||||
char CharAt(int position);
|
||||
void GetCharRange(char *buffer, int position, int lengthRetrieve);
|
||||
char StyleAt(int position);
|
||||
|
||||
int ByteLength();
|
||||
int Length();
|
||||
int Lines();
|
||||
int LineStart(int line);
|
||||
int LineFromPosition(int pos) { return lv.LineFromPosition(pos); }
|
||||
const char *InsertString(int position, char *s, int insertLength);
|
||||
void InsertCharStyle(int position, char ch, char style);
|
||||
|
||||
// Setting styles for positions outside the range of the buffer is safe and has no effect.
|
||||
// True is returned if the style of a character changed.
|
||||
bool SetStyleAt(int position, char style, char mask='\377');
|
||||
bool SetStyleFor(int position, int length, char style, char mask);
|
||||
|
||||
const char *DeleteChars(int position, int deleteLength);
|
||||
|
||||
bool IsReadOnly();
|
||||
void SetReadOnly(bool set);
|
||||
|
||||
// The save point is a marker in the undo stack where the container has stated that
|
||||
// the buffer was saved. Undo and redo can move over the save point.
|
||||
void SetSavePoint();
|
||||
bool IsSavePoint();
|
||||
|
||||
// Line marker functions
|
||||
int AddMark(int line, int markerNum);
|
||||
void DeleteMark(int line, int markerNum);
|
||||
void DeleteMarkFromHandle(int markerHandle);
|
||||
int GetMark(int line);
|
||||
void DeleteAllMarks(int markerNum);
|
||||
int LineFromHandle(int markerHandle);
|
||||
|
||||
// Without undo
|
||||
void BasicInsertString(int position, char *s, int insertLength);
|
||||
void BasicDeleteChars(int position, int deleteLength);
|
||||
|
||||
bool SetUndoCollection(bool collectUndo);
|
||||
bool IsCollectingUndo();
|
||||
void BeginUndoAction();
|
||||
void EndUndoAction();
|
||||
void DeleteUndoHistory();
|
||||
|
||||
// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is
|
||||
// called that many times. Similarly for redo.
|
||||
bool CanUndo();
|
||||
int StartUndo();
|
||||
const Action &GetUndoStep() const;
|
||||
void PerformUndoStep();
|
||||
bool CanRedo();
|
||||
int StartRedo();
|
||||
const Action &GetRedoStep() const;
|
||||
void PerformRedoStep();
|
||||
|
||||
int SetLineState(int line, int state);
|
||||
int GetLineState(int line);
|
||||
int GetMaxLineState();
|
||||
|
||||
int SetLevel(int line, int level);
|
||||
int GetLevel(int line);
|
||||
void ClearLevels();
|
||||
};
|
||||
|
||||
#define CELL_SIZE 2
|
||||
|
||||
#endif
|
||||
208
src/stc/scintilla/src/ContractionState.cxx
Normal file
208
src/stc/scintilla/src/ContractionState.cxx
Normal file
@@ -0,0 +1,208 @@
|
||||
// Scintilla source code edit control
|
||||
// ContractionState.cxx - manages visibility of lines for folding
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "ContractionState.h"
|
||||
|
||||
OneLine::OneLine() {
|
||||
displayLine = 0;
|
||||
docLine = 0;
|
||||
visible = true;
|
||||
expanded = true;
|
||||
}
|
||||
|
||||
ContractionState::ContractionState() {
|
||||
lines = 0;
|
||||
size = 0;
|
||||
linesInDoc = 1;
|
||||
linesInDisplay = 1;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
ContractionState::~ContractionState() {
|
||||
Clear();
|
||||
}
|
||||
|
||||
void ContractionState::MakeValid() const {
|
||||
if (!valid) {
|
||||
// Could be cleverer by keeping the index of the last still valid entry
|
||||
// rather than invalidating all.
|
||||
int lineDisplay = 0;
|
||||
for (int line=0; line<linesInDoc; line++) {
|
||||
lines[line].displayLine = lineDisplay;
|
||||
if (lines[line].visible) {
|
||||
lines[lineDisplay].docLine = line;
|
||||
lineDisplay++;
|
||||
}
|
||||
}
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ContractionState::Clear() {
|
||||
delete []lines;
|
||||
lines = 0;
|
||||
size = 0;
|
||||
linesInDoc = 1;
|
||||
linesInDisplay = 1;
|
||||
}
|
||||
|
||||
int ContractionState::LinesInDoc() const {
|
||||
return linesInDoc;
|
||||
}
|
||||
|
||||
int ContractionState::LinesDisplayed() const {
|
||||
return linesInDisplay;
|
||||
}
|
||||
|
||||
int ContractionState::DisplayFromDoc(int lineDoc) const {
|
||||
if (size == 0) {
|
||||
return lineDoc;
|
||||
}
|
||||
MakeValid();
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
return lines[lineDoc].displayLine;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ContractionState::DocFromDisplay(int lineDisplay) const {
|
||||
if (lineDisplay <= 0)
|
||||
return 0;
|
||||
if (lineDisplay >= linesInDisplay)
|
||||
return linesInDoc-1;
|
||||
if (size == 0)
|
||||
return lineDisplay;
|
||||
MakeValid();
|
||||
return lines[lineDisplay].docLine;
|
||||
}
|
||||
|
||||
void ContractionState::Grow(int sizeNew) {
|
||||
OneLine *linesNew = new OneLine[sizeNew];
|
||||
if (linesNew) {
|
||||
int i = 0;
|
||||
for (; i < size; i++) {
|
||||
linesNew[i] = lines[i];
|
||||
}
|
||||
for (; i < sizeNew; i++) {
|
||||
linesNew[i].displayLine = i;
|
||||
}
|
||||
delete []lines;
|
||||
lines = linesNew;
|
||||
size = sizeNew;
|
||||
valid = false;
|
||||
} else {
|
||||
Platform::DebugPrintf("No memory available\n");
|
||||
// TODO: Blow up
|
||||
}
|
||||
}
|
||||
|
||||
void ContractionState::InsertLines(int lineDoc, int lineCount) {
|
||||
if (size == 0) {
|
||||
linesInDoc += lineCount;
|
||||
linesInDisplay += lineCount;
|
||||
return;
|
||||
}
|
||||
//Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc);
|
||||
if ((linesInDoc + lineCount + 2) >= size) {
|
||||
Grow(linesInDoc + lineCount + growSize);
|
||||
}
|
||||
linesInDoc += lineCount;
|
||||
linesInDisplay += lineCount;
|
||||
for (int i = linesInDoc; i >= lineDoc + lineCount; i--) {
|
||||
lines[i].visible = lines[i - lineCount].visible;
|
||||
lines[i].expanded = lines[i - lineCount].expanded;
|
||||
}
|
||||
for (int d=0;d<lineCount;d++) {
|
||||
lines[lineDoc+d].visible = true; // Should inherit visibility from context ?
|
||||
lines[lineDoc+d].expanded = true;
|
||||
}
|
||||
valid = false;
|
||||
}
|
||||
|
||||
void ContractionState::DeleteLines(int lineDoc, int lineCount) {
|
||||
if (size == 0) {
|
||||
linesInDoc -= lineCount;
|
||||
linesInDisplay -= lineCount;
|
||||
return;
|
||||
}
|
||||
int deltaDisplayed = 0;
|
||||
for (int d=0;d<lineCount;d++) {
|
||||
if (lines[lineDoc+d].visible)
|
||||
deltaDisplayed--;
|
||||
}
|
||||
for (int i = lineDoc; i < linesInDoc-lineCount; i++) {
|
||||
if (i != 0) // Line zero is always visible
|
||||
lines[i].visible = lines[i + lineCount].visible;
|
||||
lines[i].expanded = lines[i + lineCount].expanded;
|
||||
}
|
||||
linesInDoc -= lineCount;
|
||||
linesInDisplay += deltaDisplayed;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
bool ContractionState::GetVisible(int lineDoc) const {
|
||||
if (size == 0)
|
||||
return true;
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
return lines[lineDoc].visible;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) {
|
||||
if (lineDocStart == 0)
|
||||
lineDocStart++;
|
||||
if (lineDocStart > lineDocEnd)
|
||||
return false;
|
||||
if (size == 0) {
|
||||
Grow(linesInDoc + growSize);
|
||||
}
|
||||
// TODO: modify docLine members to mirror displayLine
|
||||
int delta = 0;
|
||||
// Change lineDocs
|
||||
if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < linesInDoc)) {
|
||||
for (int line=lineDocStart; line <= lineDocEnd; line++) {
|
||||
if (lines[line].visible != visible) {
|
||||
delta += visible ? 1 : -1;
|
||||
lines[line].visible = visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
linesInDisplay += delta;
|
||||
valid = false;
|
||||
return delta != 0;
|
||||
}
|
||||
|
||||
bool ContractionState::GetExpanded(int lineDoc) const {
|
||||
if (size == 0)
|
||||
return true;
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
return lines[lineDoc].expanded;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ContractionState::SetExpanded(int lineDoc, bool expanded) {
|
||||
if (size == 0) {
|
||||
Grow(linesInDoc + growSize);
|
||||
}
|
||||
if ((lineDoc >= 0) && (lineDoc < linesInDoc)) {
|
||||
if (lines[lineDoc].expanded != expanded) {
|
||||
lines[lineDoc].expanded = expanded;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ContractionState::ShowAll() {
|
||||
delete []lines;
|
||||
lines = 0;
|
||||
size = 0;
|
||||
}
|
||||
52
src/stc/scintilla/src/ContractionState.h
Normal file
52
src/stc/scintilla/src/ContractionState.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Scintilla source code edit control
|
||||
// ContractionState.h - manages visibility of lines for folding
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CONTRACTIONSTATE_H
|
||||
#define CONTRACTIONSTATE_H
|
||||
|
||||
class OneLine {
|
||||
public:
|
||||
int displayLine; // position within set of visible lines
|
||||
int docLine; // inverse of displayLine
|
||||
bool visible;
|
||||
bool expanded;
|
||||
|
||||
OneLine();
|
||||
virtual ~OneLine() {}
|
||||
};
|
||||
|
||||
class ContractionState {
|
||||
void Grow(int sizeNew);
|
||||
enum { growSize = 4000 };
|
||||
int linesInDoc;
|
||||
int linesInDisplay;
|
||||
mutable OneLine *lines;
|
||||
int size;
|
||||
mutable bool valid;
|
||||
void MakeValid() const;
|
||||
public:
|
||||
ContractionState();
|
||||
virtual ~ContractionState();
|
||||
|
||||
void Clear();
|
||||
|
||||
int LinesInDoc() const;
|
||||
int LinesDisplayed() const;
|
||||
int DisplayFromDoc(int lineDoc) const;
|
||||
int DocFromDisplay(int lineDisplay) const;
|
||||
|
||||
void InsertLines(int lineDoc, int lineCount);
|
||||
void DeleteLines(int lineDoc, int lineCount);
|
||||
|
||||
bool GetVisible(int lineDoc) const;
|
||||
bool SetVisible(int lineDocStart, int lineDocEnd, bool visible);
|
||||
|
||||
bool GetExpanded(int lineDoc) const;
|
||||
bool SetExpanded(int lineDoc, bool expanded);
|
||||
|
||||
void ShowAll();
|
||||
};
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user